@vibe-agent-toolkit/cli 0.1.41-rc.8 → 0.1.41
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.js +11 -1
- package/dist/bin.js.map +1 -1
- package/dist/commands/audit/distributed-tree.d.ts +172 -0
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -0
- package/dist/commands/audit/distributed-tree.js +319 -0
- package/dist/commands/audit/distributed-tree.js.map +1 -0
- package/dist/commands/audit.d.ts +35 -0
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +312 -93
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +16 -4
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +21 -3
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +31 -3
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +105 -12
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +9 -2
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +90 -8
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +6 -2
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +40 -0
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +100 -4
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/positional-args.d.ts +36 -0
- package/dist/commands/positional-args.d.ts.map +1 -0
- package/dist/commands/positional-args.js +52 -0
- package/dist/commands/positional-args.js.map +1 -0
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +5 -0
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skills/build.d.ts +258 -9
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +698 -111
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts +64 -0
- package/dist/commands/skills/scope-guard.d.ts.map +1 -0
- package/dist/commands/skills/scope-guard.js +86 -0
- package/dist/commands/skills/scope-guard.js.map +1 -0
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +19 -1
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +37 -7
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +18 -4
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +77 -7
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +254 -57
- package/dist/commands/verify.js.map +1 -1
- package/dist/utils/issue-rendering.d.ts +42 -0
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +53 -0
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +51 -0
- package/dist/utils/issue-severity.d.ts.map +1 -0
- package/dist/utils/issue-severity.js +63 -0
- package/dist/utils/issue-severity.js.map +1 -0
- package/dist/version.d.ts +22 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +31 -2
- package/dist/version.js.map +1 -1
- package/docs/index.md +12 -0
- package/docs/skills.md +16 -2
- package/package.json +12 -12
|
@@ -38,13 +38,20 @@ export declare function createBuildCommand(): Command;
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function formatPreBuildIssueReport(validationResult: PackagingValidationResult, verbose: boolean): string[];
|
|
40
40
|
/**
|
|
41
|
-
* Render post-build integrity issues, each prefixed by its OWN
|
|
41
|
+
* Render ONE skill's post-build integrity issues, each prefixed by its OWN
|
|
42
|
+
* resolved severity.
|
|
42
43
|
*
|
|
43
44
|
* Reads BOTH post-build channels (see `collectPostBuildIssues`) so a build that
|
|
44
45
|
* failed purely on the built-output validation still shows the findings that
|
|
45
46
|
* failed it, and the heading names the set's actual severity mix rather than
|
|
46
47
|
* calling every set by its worst member.
|
|
47
48
|
*
|
|
49
|
+
* The heading NAMES THE SKILL, matching `vat claude plugin build`'s per-skill
|
|
50
|
+
* heading, because this line is printed in the outcome pass — the validation pass
|
|
51
|
+
* has already emitted every `Building skill: <name>` banner, so at scale (92
|
|
52
|
+
* banners, then 86 outcome blocks) an unnamed heading sits under an unrelated
|
|
53
|
+
* skill's banner and is read as that skill's findings.
|
|
54
|
+
*
|
|
48
55
|
* The heading is unconditional and counts the WHOLE set; `verbose` decides only
|
|
49
56
|
* which findings get a block beneath it (see `issuesToRenderAtVerbosity`). This
|
|
50
57
|
* loop printing every occurrence is what made a 90-skill build emit 6,552 stderr
|
|
@@ -53,10 +60,15 @@ export declare function formatPreBuildIssueReport(validationResult: PackagingVal
|
|
|
53
60
|
* still renders its heading: collapsing that too would turn a warning-carrying
|
|
54
61
|
* build into silence, which is the reassuring direction this module warns about.
|
|
55
62
|
*
|
|
63
|
+
* The trailing colon is what varies: it introduces the blocks below, so a heading
|
|
64
|
+
* with nothing beneath it does not print one. A colon promising a list that the
|
|
65
|
+
* current verbosity will not print is the defect this half fixes; the other half
|
|
66
|
+
* is the run-level `--verbose` hint (see `formatCollapsedFindingsHint`).
|
|
67
|
+
*
|
|
56
68
|
* Pure: returns the lines instead of writing them, so the whole rendered set is
|
|
57
69
|
* assertable without capturing a stream.
|
|
58
70
|
*/
|
|
59
|
-
export declare function formatPostBuildIssueReport(result: PackageSkillResult, verbose: boolean): string[];
|
|
71
|
+
export declare function formatPostBuildIssueReport(skillName: string, result: PackageSkillResult, verbose: boolean): string[];
|
|
60
72
|
/**
|
|
61
73
|
* The archived summary of a build, as YAML fields.
|
|
62
74
|
*
|
|
@@ -69,41 +81,226 @@ export declare function formatPostBuildIssueReport(result: PackageSkillResult, v
|
|
|
69
81
|
*
|
|
70
82
|
* The header total reconciles against the document, by construction:
|
|
71
83
|
*
|
|
72
|
-
* issueCounts === Σ skills[].issueCounts
|
|
84
|
+
* issueCounts === Σ (skills[] ∪ skillsStaged[])[].issueCounts
|
|
73
85
|
* + Σ failedSkills[].issueCounts
|
|
86
|
+
* + Σ validationFailedSkills[].issueCounts
|
|
74
87
|
* + runIssueCounts
|
|
75
88
|
*
|
|
89
|
+
* `skills` and `skillsStaged` are the same population under two names, and
|
|
90
|
+
* exactly one of them is ever non-empty (see the comment on `skills` below), so
|
|
91
|
+
* summing both is summing each packaged bundle once.
|
|
92
|
+
*
|
|
76
93
|
* Every addend therefore has a ROW a reader can point at. Counting the failures
|
|
77
94
|
* only in the header — which is how this first shipped — reproduced, one command
|
|
78
95
|
* over, the exact defect `vat skills validate` was fixed for: a header reporting
|
|
79
96
|
* more than its rows summed to (there, 1814 warnings against 1800), leaving a
|
|
80
97
|
* consumer to hand-count a list to find out what the difference was. `--help`
|
|
81
98
|
* states this identity; changing it means changing that text too.
|
|
99
|
+
*
|
|
100
|
+
* Each packaged row carries its `issues` as well as its counts. It did not, for
|
|
101
|
+
* a while: the findings were collected here and then dropped at the publish
|
|
102
|
+
* step, so the document offered a count with no `code`, no location and no fix
|
|
103
|
+
* string at ANY verbosity — an adopter run published 67 warnings and zero
|
|
104
|
+
* findings. That is acute for the four detectors this lane added: their output
|
|
105
|
+
* existed only on stderr, where no CI consumer reads it. Full findings on the
|
|
106
|
+
* rows is the shape `vat audit` and `vat skills validate --verbose` already
|
|
107
|
+
* publish, and it is verbosity-INDEPENDENT here for the reason stated in
|
|
108
|
+
* `issuesToRenderAtVerbosity`: filtering a machine-readable document by a human
|
|
109
|
+
* report's verbosity silently breaks the consumers that parse it.
|
|
110
|
+
*
|
|
111
|
+
* Takes the whole {@link SkillBuildRun} rather than a positional list of its
|
|
112
|
+
* parts: the run has four populations now, and a positional call site can
|
|
113
|
+
* transpose two same-shaped lists in silence.
|
|
82
114
|
*/
|
|
83
|
-
export declare function buildYamlSummary(
|
|
84
|
-
name: string;
|
|
85
|
-
result: PackageSkillResult;
|
|
86
|
-
}>, failures: readonly SkillBuildFailure[], duration: number, runIssues: readonly ValidationIssue[], skillsWithErrors: readonly string[]): {
|
|
115
|
+
export declare function buildYamlSummary(run: SkillBuildRun, duration: number): {
|
|
87
116
|
status: 'success' | 'warning' | 'error';
|
|
88
117
|
issueCounts: SeverityCounts;
|
|
89
118
|
runIssueCounts: SeverityCounts;
|
|
90
119
|
skillsBuilt: number;
|
|
91
120
|
skillsFailed: number;
|
|
121
|
+
skillsFailedValidation: number;
|
|
92
122
|
skillsWithErrors: string[];
|
|
123
|
+
outputCommitted: boolean;
|
|
124
|
+
/** Present only when the promotion/discard step itself failed. */
|
|
125
|
+
promotionError?: string;
|
|
93
126
|
skills: Array<{
|
|
94
127
|
name: string;
|
|
95
128
|
outputPath: string;
|
|
96
129
|
filesPackaged: number;
|
|
97
130
|
issueCounts: SeverityCounts;
|
|
131
|
+
issues: ValidationIssue[];
|
|
132
|
+
}>;
|
|
133
|
+
skillsStaged: Array<{
|
|
134
|
+
name: string;
|
|
135
|
+
filesPackaged: number;
|
|
136
|
+
issueCounts: SeverityCounts;
|
|
137
|
+
issues: ValidationIssue[];
|
|
98
138
|
}>;
|
|
99
139
|
failedSkills: Array<{
|
|
100
140
|
name: string;
|
|
101
141
|
error: string;
|
|
102
142
|
issueCounts: SeverityCounts;
|
|
103
143
|
}>;
|
|
144
|
+
validationFailedSkills: Array<{
|
|
145
|
+
name: string;
|
|
146
|
+
issueCounts: SeverityCounts;
|
|
147
|
+
}>;
|
|
104
148
|
runIssues: ValidationIssue[];
|
|
105
149
|
duration: string;
|
|
106
150
|
};
|
|
151
|
+
/**
|
|
152
|
+
* Re-anchor everything ONE skill's result says about where things are.
|
|
153
|
+
*
|
|
154
|
+
* Both post-build channels are rewritten, not just the one the summary reads:
|
|
155
|
+
* `collectPostBuildIssues` merges them and either can carry a staged location
|
|
156
|
+
* (the built-output validation runs against the staged `SKILL.md` itself), so a
|
|
157
|
+
* mapper applied to one of them leaves the report half-anchored.
|
|
158
|
+
*
|
|
159
|
+
* The `postBuildIssues` half is a live invariant with NO live producer today, and
|
|
160
|
+
* the distinction matters to anyone changing it. Every issue on that channel is
|
|
161
|
+
* anchored either on the bundle (`checkUnreferencedFiles`,
|
|
162
|
+
* `checkBrokenPackagedLinks`, `detectPackagedAgentInstructionFiles`,
|
|
163
|
+
* `checkPackagedTestInput` — all `relative(outputPath, …)`) or on the SOURCE
|
|
164
|
+
* project root (`droppedGlobMatchesToIssues`, `walkerExclusionsToIssues`,
|
|
165
|
+
* `deferredAssetsToIssues`, `FILENAME_COLLISION` — all `relative(projectRoot, …)`,
|
|
166
|
+
* where `projectRoot` is discovered from the skill's own source path). Neither
|
|
167
|
+
* spelling contains the staging prefix, so deleting this branch changes no
|
|
168
|
+
* fixture in the repo — which is exactly why it is unit-tested directly rather
|
|
169
|
+
* than through a build. Do not delete it on the strength of a green suite: the
|
|
170
|
+
* moment any producer anchors on `outputPath` ABSOLUTELY, this is the only thing
|
|
171
|
+
* standing between a report and a path its reader cannot open.
|
|
172
|
+
*
|
|
173
|
+
* Exported for that unit test.
|
|
174
|
+
*/
|
|
175
|
+
export declare function reanchorStagedResult(result: PackageSkillResult, mapPath: (value: string) => string): PackageSkillResult;
|
|
176
|
+
/**
|
|
177
|
+
* A build in progress: it writes under {@link root} and earns `dist/skills` only
|
|
178
|
+
* by finishing clean.
|
|
179
|
+
*
|
|
180
|
+
* The old flow deleted `dist/skills` up front and wrote the new bundles straight
|
|
181
|
+
* into it, so ANY failure left the tree destroyed rather than stale — and
|
|
182
|
+
* `dist/` is gitignored, so the previous good output was unrecoverable. Measured
|
|
183
|
+
* on a 90-skill adopter: 27 skill directories and 106 files present before,
|
|
184
|
+
* directory absent after. Downstream consumers (`vat claude plugin install
|
|
185
|
+
* --dev` symlinks out of `dist/skills`; plugin builds re-read it) then saw an
|
|
186
|
+
* ABSENT tree, and a later `vat build --only claude` reported
|
|
187
|
+
* `status: success / Skills available: 0` against a tree the previous command
|
|
188
|
+
* had deleted.
|
|
189
|
+
*/
|
|
190
|
+
export interface BuildStaging {
|
|
191
|
+
/** Where each bundle is written during the run, in place of `dist/skills`. */
|
|
192
|
+
root: string;
|
|
193
|
+
/** True when a previous build's output was set aside and can be restored. */
|
|
194
|
+
hadPreviousOutput: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Where the previous output is held while the run is in flight.
|
|
197
|
+
*
|
|
198
|
+
* Published so a failure on the promotion path can NAME it. It is a
|
|
199
|
+
* `mkdtemp`-suffixed sibling, so a reader who is not told the path cannot
|
|
200
|
+
* reconstruct it — which is the difference between "recover with one `mv`" and
|
|
201
|
+
* "your previous output is gone".
|
|
202
|
+
*/
|
|
203
|
+
parkedPath: string;
|
|
204
|
+
/**
|
|
205
|
+
* How the human stream names what THIS run promotes.
|
|
206
|
+
*
|
|
207
|
+
* `dist/skills` for a full build, `dist/skills/<name>` in `--skill` mode. The
|
|
208
|
+
* scope is not cosmetic: a failed `--skill bad` used to report "Nothing was
|
|
209
|
+
* written — dist/skills does not exist" while `dist/skills` sat on disk holding
|
|
210
|
+
* every sibling bundle. Only this skill's bundle was ever in question.
|
|
211
|
+
*/
|
|
212
|
+
promoteLabel: string;
|
|
213
|
+
/** True once this run's bundles have actually landed on the promotion target. */
|
|
214
|
+
promoted: () => boolean;
|
|
215
|
+
/** Promote the staged tree, discarding the previous output. */
|
|
216
|
+
commit: () => Promise<void>;
|
|
217
|
+
/** Discard the staged tree, restoring the previous output byte for byte. */
|
|
218
|
+
abort: () => Promise<void>;
|
|
219
|
+
/**
|
|
220
|
+
* Best-effort repair after {@link BuildStaging.commit} or
|
|
221
|
+
* {@link BuildStaging.abort} threw, and a description of what is left on disk.
|
|
222
|
+
*
|
|
223
|
+
* Never overwrites whatever occupies the promotion target: a promotion can fail
|
|
224
|
+
* BECAUSE a concurrent build already promoted its own tree there, and restoring
|
|
225
|
+
* over it would replace fresh output with a stale copy. When the target is
|
|
226
|
+
* occupied the parked tree is left where it is and named in the report instead.
|
|
227
|
+
*/
|
|
228
|
+
recover: () => Promise<StagingRecovery>;
|
|
229
|
+
}
|
|
230
|
+
/** What a best-effort {@link BuildStaging.recover} left behind. */
|
|
231
|
+
export interface StagingRecovery {
|
|
232
|
+
/** True when the previous output was moved back onto the promotion target. */
|
|
233
|
+
restoredPrevious: boolean;
|
|
234
|
+
/** Paths still on disk that this run could not clean up, in report order. */
|
|
235
|
+
residue: string[];
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Move the previous output aside and open a staging root for this run.
|
|
239
|
+
*
|
|
240
|
+
* Three properties the placement is load-bearing for:
|
|
241
|
+
*
|
|
242
|
+
* 1. **Same filesystem.** The staging root is a SIBLING of `dist/skills` under
|
|
243
|
+
* `dist/`, so promotion is a `rename` — atomic and free — never a
|
|
244
|
+
* cross-device copy of a tree that can be tens of thousands of files.
|
|
245
|
+
* 2. **Invisible to the run.** `createProjectRegistry` crawls the project for
|
|
246
|
+
* `**\/*.md` and excludes `**\/dist/**`, so nothing staged here can enter the
|
|
247
|
+
* registry the packager resolves links against. The leading dot is a second
|
|
248
|
+
* belt: a `files:` glob like `dist/**` does not descend into dot-directories.
|
|
249
|
+
* 3. **The final path is ABSENT while the build runs.** The previous tree is
|
|
250
|
+
* renamed away before the first bundle is written, which is exactly what the
|
|
251
|
+
* delete-up-front flow guaranteed — so no lane can read a half-replaced
|
|
252
|
+
* `dist/skills`, and a stale bundle cannot leak into the new output.
|
|
253
|
+
*
|
|
254
|
+
* `mkdtemp` rather than a fixed name: two builds in one `dist/` must not share a
|
|
255
|
+
* staging root, and a leftover root from a killed run must not be adopted.
|
|
256
|
+
*
|
|
257
|
+
* KNOWN WINDOW, deliberately not closed here: a run killed between the park and
|
|
258
|
+
* the commit/abort (Ctrl-C on a multi-minute build, a CI timeout, a crash) leaves
|
|
259
|
+
* `dist/skills` absent and the previous output parked at
|
|
260
|
+
* `dist/.vat-skills-<rand>.previous`. That is no worse than the delete-up-front
|
|
261
|
+
* flow this replaces — there, the same interrupt lost the tree outright — and the
|
|
262
|
+
* output is recoverable with a single `mv`. Auto-recovering it on the next run is
|
|
263
|
+
* NOT safe as long as `mkdtemp` allows concurrent builds in one `dist/`: a sweep
|
|
264
|
+
* cannot tell a dead run's parked tree from a live run's, and adopting the wrong
|
|
265
|
+
* one would restore stale bundles over fresh output. Closing this needs a lock on
|
|
266
|
+
* `dist/`, not a heuristic.
|
|
267
|
+
*
|
|
268
|
+
* That window covers KILLS only. A promotion that throws — EACCES, ENOSPC, or the
|
|
269
|
+
* ENOTEMPTY a concurrent build produces with no injection at all — is deterministic,
|
|
270
|
+
* needs no signal, and IS handled: see {@link BuildStaging.recover} and
|
|
271
|
+
* {@link settleStaging}.
|
|
272
|
+
*
|
|
273
|
+
* Exported for tests, which drive the primitives directly. Injecting a promotion
|
|
274
|
+
* failure through a whole `runSkillBuild` would mean racing the filesystem;
|
|
275
|
+
* holding the staging handle lets a test create the exact on-disk state
|
|
276
|
+
* (a target reoccupied between the park and the promotion) that produces one.
|
|
277
|
+
*/
|
|
278
|
+
export declare function beginStagedBuild(cwd: string, onlySkill: string | undefined): Promise<BuildStaging>;
|
|
279
|
+
/**
|
|
280
|
+
* Promote or discard the staged tree, and never leave the operator without an
|
|
281
|
+
* answer when that fails.
|
|
282
|
+
*
|
|
283
|
+
* `commit()` / `abort()` used to be called bare. Any throw on that path — the
|
|
284
|
+
* promotion `rename`, the restore `rename`, either cleanup — propagated to
|
|
285
|
+
* `buildCommand`'s catch, which exits 2 WITHOUT emitting the YAML document. The
|
|
286
|
+
* measured result: `dist/skills` absent, the user's previous output orphaned at
|
|
287
|
+
* `dist/.vat-skills-<rand>.previous` under a name the `mkdtemp` suffix makes
|
|
288
|
+
* unguessable, and not one byte of the report whose `outputCommitted` field
|
|
289
|
+
* `--help` tells an operator to read when they see a non-zero exit.
|
|
290
|
+
*
|
|
291
|
+
* So: repair what can be repaired, then return a message rather than throwing —
|
|
292
|
+
* the caller publishes the document first and exits 2 after.
|
|
293
|
+
*
|
|
294
|
+
* `outputCommitted` comes from {@link BuildStaging.promoted}, not from
|
|
295
|
+
* `!runFailed`: a `commit()` that renamed the tree into place and then failed to
|
|
296
|
+
* delete the parked copy DID replace `dist/skills`, and saying otherwise would
|
|
297
|
+
* put the report back into contradiction with the disk — the one thing this whole
|
|
298
|
+
* summary exists to prevent.
|
|
299
|
+
*/
|
|
300
|
+
export declare function settleStaging(staging: BuildStaging, runFailed: boolean, logger: ReturnType<typeof createLogger>): Promise<{
|
|
301
|
+
outputCommitted: boolean;
|
|
302
|
+
promotionError?: string;
|
|
303
|
+
}>;
|
|
107
304
|
/** One discovered skill paired with the packaging config merged for it. */
|
|
108
305
|
export interface BuildSkillSpec {
|
|
109
306
|
skill: DiscoveredSkill;
|
|
@@ -121,6 +318,21 @@ export interface SkillBuildFailure {
|
|
|
121
318
|
name: string;
|
|
122
319
|
message: string;
|
|
123
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* A skill the PRE-build source validation rejected — packaging was never
|
|
323
|
+
* attempted for it.
|
|
324
|
+
*
|
|
325
|
+
* The third of four populations, and deliberately not merged into either
|
|
326
|
+
* neighbour: {@link SkillBuildFailure} means packaging ran and threw, and
|
|
327
|
+
* `skillsWithErrors` means a bundle exists and is invalid. This one means the
|
|
328
|
+
* source never qualified. It carries real per-severity counts (a rejected
|
|
329
|
+
* source has a whole emitted finding set) rather than the one-error stand-in a
|
|
330
|
+
* throw is forced to publish.
|
|
331
|
+
*/
|
|
332
|
+
export interface SkillValidationFailure {
|
|
333
|
+
name: string;
|
|
334
|
+
issueCounts: SeverityCounts;
|
|
335
|
+
}
|
|
124
336
|
/** Everything one `vat build` invocation produced, ready to report on. */
|
|
125
337
|
export interface SkillBuildRun {
|
|
126
338
|
results: Array<{
|
|
@@ -133,6 +345,41 @@ export interface SkillBuildRun {
|
|
|
133
345
|
skillsWithErrors: string[];
|
|
134
346
|
/** Skills that never built because packaging threw. */
|
|
135
347
|
failures: SkillBuildFailure[];
|
|
348
|
+
/** Skills that never built because their SOURCE failed validation. */
|
|
349
|
+
validationFailures: SkillValidationFailure[];
|
|
350
|
+
/**
|
|
351
|
+
* Whether `dist/skills` was replaced by this run.
|
|
352
|
+
*
|
|
353
|
+
* `false` means the staged tree was thrown away and whatever was on disk
|
|
354
|
+
* before is still there, untouched — the fact an operator staring at exit 1
|
|
355
|
+
* needs before deciding whether their downstream consumers are broken.
|
|
356
|
+
*/
|
|
357
|
+
outputCommitted: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* The promotion/discard step itself failed — a SYSTEM error, not a validation
|
|
360
|
+
* one, and the only failure mode where the state of `dist/skills` is in doubt.
|
|
361
|
+
*
|
|
362
|
+
* Carried on the run rather than thrown so the document is still published: an
|
|
363
|
+
* exception here used to escape all the way to `handleCommandError`, which
|
|
364
|
+
* exits 2 having emitted nothing at all. Its text names what is on disk and how
|
|
365
|
+
* to recover it — see {@link describePromotionFailure}.
|
|
366
|
+
*/
|
|
367
|
+
promotionError?: string;
|
|
368
|
+
}
|
|
369
|
+
/** The inputs of ONE `vat skills build` invocation. */
|
|
370
|
+
export interface SkillBuildRunInput {
|
|
371
|
+
specs: readonly BuildSkillSpec[];
|
|
372
|
+
cwd: string;
|
|
373
|
+
logger: ReturnType<typeof createLogger>;
|
|
374
|
+
/** The RUN's declared eval suites — the whole project's, not `specs`'. */
|
|
375
|
+
projectSkills: readonly DeclaredEvalSuite[];
|
|
376
|
+
/**
|
|
377
|
+
* `--skill <name>`, or `undefined` for a full build. Scopes BOTH what gets
|
|
378
|
+
* built and what the swap replaces, so a single-skill build leaves its
|
|
379
|
+
* siblings' bundles exactly where they were.
|
|
380
|
+
*/
|
|
381
|
+
onlySkill: string | undefined;
|
|
382
|
+
verbose: boolean;
|
|
136
383
|
}
|
|
137
384
|
/**
|
|
138
385
|
* Validate, package, and drain — the whole span of ONE `vat build` invocation.
|
|
@@ -150,7 +397,9 @@ export interface SkillBuildRun {
|
|
|
150
397
|
* nothing"; only the union can. Hence one ledger, drained once, here.
|
|
151
398
|
*
|
|
152
399
|
* Extracted from the command body so the span is testable without driving
|
|
153
|
-
* `process.exit` — the drain seam is the thing worth asserting.
|
|
400
|
+
* `process.exit` — the drain seam is the thing worth asserting. Nothing in here
|
|
401
|
+
* exits: every failure of every kind is COLLECTED and returned, so one run
|
|
402
|
+
* surfaces all the work rather than the first item of it.
|
|
154
403
|
*/
|
|
155
|
-
export declare function runSkillBuild(
|
|
404
|
+
export declare function runSkillBuild(input: SkillBuildRunInput): Promise<SkillBuildRun>;
|
|
156
405
|
//# sourceMappingURL=build.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/skills/build.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAE9B,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/skills/build.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,yB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