@vibe-agent-toolkit/cli 0.2.0-rc.10 → 0.2.0-rc.11
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 +5 -3
- package/dist/bin/vat.js +5 -3
- package/dist/bin/vat.js.map +1 -1
- package/dist/commands/ard/emit.d.ts +18 -6
- package/dist/commands/ard/emit.d.ts.map +1 -1
- package/dist/commands/ard/emit.js +82 -20
- package/dist/commands/ard/emit.js.map +1 -1
- package/dist/commands/ard/index.d.ts.map +1 -1
- package/dist/commands/ard/index.js +6 -2
- package/dist/commands/ard/index.js.map +1 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +35 -11
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/claude/context.d.ts +32 -0
- package/dist/commands/claude/context.d.ts.map +1 -1
- package/dist/commands/claude/context.js +59 -24
- package/dist/commands/claude/context.js.map +1 -1
- package/dist/commands/okf/index.d.ts.map +1 -1
- package/dist/commands/okf/index.js +8 -6
- package/dist/commands/okf/index.js.map +1 -1
- package/dist/commands/okf/validate.d.ts +10 -6
- package/dist/commands/okf/validate.d.ts.map +1 -1
- package/dist/commands/okf/validate.js +18 -9
- package/dist/commands/okf/validate.js.map +1 -1
- package/dist/commands/resources/check-progress.d.ts +15 -2
- package/dist/commands/resources/check-progress.d.ts.map +1 -1
- package/dist/commands/resources/check-progress.js +35 -7
- package/dist/commands/resources/check-progress.js.map +1 -1
- package/dist/commands/resources/check-supervisor.d.ts +14 -0
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
- package/dist/commands/resources/check-supervisor.js +14 -0
- package/dist/commands/resources/check-supervisor.js.map +1 -1
- package/dist/commands/resources/check.d.ts +80 -53
- package/dist/commands/resources/check.d.ts.map +1 -1
- package/dist/commands/resources/check.js +185 -98
- package/dist/commands/resources/check.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +35 -23
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +1 -1
- package/dist/commands/resources/query.js +1 -1
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +4 -3
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +6 -2
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/utils/command-error.d.ts +9 -4
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +14 -7
- package/dist/utils/command-error.js.map +1 -1
- package/dist/utils/corpus-target.d.ts.map +1 -1
- package/dist/utils/corpus-target.js +40 -3
- package/dist/utils/corpus-target.js.map +1 -1
- package/dist/utils/projection-query.d.ts +1 -1
- package/dist/utils/resource-loader.d.ts +5 -3
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +5 -3
- package/dist/utils/resource-loader.js.map +1 -1
- package/docs/audit.md +3 -3
- package/package.json +16 -16
- package/schemas/ard-emit.json +4 -1
- package/schemas/resources-check.json +40 -12
|
@@ -73,9 +73,11 @@ export declare const OkfValidateDataSchema: z.ZodObject<{
|
|
|
73
73
|
* project declared no `okf.bundles` at all — a report indistinguishable from
|
|
74
74
|
* a bundle read in full and found conformant, so a mistyped key
|
|
75
75
|
* (`okf.bundle:`, `okf.Bundles:`) read as a clean bill of health. The
|
|
76
|
-
* envelope's REQUIRED `examined` now says `0` in that case,
|
|
77
|
-
* says why
|
|
78
|
-
*
|
|
76
|
+
* envelope's REQUIRED `examined` now says `0` in that case, this sentence
|
|
77
|
+
* says why, and the run is refused (`RESOURCE_CHECK_BROKEN`, exit 1): a gate
|
|
78
|
+
* that examined nothing must not read as a pass to a consumer gating on the
|
|
79
|
+
* status or the exit code. A project that declares no bundles has no reason
|
|
80
|
+
* to run this verb.
|
|
79
81
|
*/
|
|
80
82
|
notice: z.ZodOptional<z.ZodString>;
|
|
81
83
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -133,9 +135,11 @@ export declare const OKF_VALIDATE_REPORT_SCHEMA: import("@vibe-agent-toolkit/sch
|
|
|
133
135
|
* project declared no `okf.bundles` at all — a report indistinguishable from
|
|
134
136
|
* a bundle read in full and found conformant, so a mistyped key
|
|
135
137
|
* (`okf.bundle:`, `okf.Bundles:`) read as a clean bill of health. The
|
|
136
|
-
* envelope's REQUIRED `examined` now says `0` in that case,
|
|
137
|
-
* says why
|
|
138
|
-
*
|
|
138
|
+
* envelope's REQUIRED `examined` now says `0` in that case, this sentence
|
|
139
|
+
* says why, and the run is refused (`RESOURCE_CHECK_BROKEN`, exit 1): a gate
|
|
140
|
+
* that examined nothing must not read as a pass to a consumer gating on the
|
|
141
|
+
* status or the exit code. A project that declares no bundles has no reason
|
|
142
|
+
* to run this verb.
|
|
139
143
|
*/
|
|
140
144
|
notice: z.ZodOptional<z.ZodString>;
|
|
141
145
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/okf/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,+BAA+B,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/okf/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAML,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qGAAqG;AACr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SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAaf"}
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { dirname } from 'node:path';
|
|
11
11
|
import { okfBundleRuns, parseConfigFile, validateOkfBundle, } from '@vibe-agent-toolkit/resources';
|
|
12
|
-
import { buildReport,
|
|
12
|
+
import { buildReport, exitCodeForReport, reportSchema, toFindings, } from '@vibe-agent-toolkit/schema';
|
|
13
13
|
import { findConfigFile, issueLocation, safePath } from '@vibe-agent-toolkit/utils';
|
|
14
14
|
import { z } from 'zod';
|
|
15
15
|
import { handleReportCommandError } from '../../utils/command-error.js';
|
|
16
16
|
import { createLogger } from '../../utils/logger.js';
|
|
17
17
|
import { writeStructuredOutput } from '../../utils/output.js';
|
|
18
|
+
import { nothingCheckedFinding } from '../../utils/run-integrity.js';
|
|
18
19
|
/** One checked bundle's `data` row: what was read, never the findings (those are the envelope's). */
|
|
19
20
|
export const OkfBundleSummarySchema = z.object({
|
|
20
21
|
/** The `okf.bundles.<name>` key. */
|
|
@@ -38,9 +39,11 @@ export const OkfValidateDataSchema = z.object({
|
|
|
38
39
|
* project declared no `okf.bundles` at all — a report indistinguishable from
|
|
39
40
|
* a bundle read in full and found conformant, so a mistyped key
|
|
40
41
|
* (`okf.bundle:`, `okf.Bundles:`) read as a clean bill of health. The
|
|
41
|
-
* envelope's REQUIRED `examined` now says `0` in that case,
|
|
42
|
-
* says why
|
|
43
|
-
*
|
|
42
|
+
* envelope's REQUIRED `examined` now says `0` in that case, this sentence
|
|
43
|
+
* says why, and the run is refused (`RESOURCE_CHECK_BROKEN`, exit 1): a gate
|
|
44
|
+
* that examined nothing must not read as a pass to a consumer gating on the
|
|
45
|
+
* status or the exit code. A project that declares no bundles has no reason
|
|
46
|
+
* to run this verb.
|
|
44
47
|
*/
|
|
45
48
|
notice: z.string().optional(),
|
|
46
49
|
}).strict();
|
|
@@ -131,9 +134,16 @@ export function summarizeOkfBundles(checked, projectRoot) {
|
|
|
131
134
|
const findings = checked.flatMap((entry) => entry.report.findings.map((finding) => toFinding(finding, entry.root, projectRoot)));
|
|
132
135
|
const examined = bundles.reduce((sum, report) => sum + report.conceptDocuments.length + report.reservedDocuments.length, 0);
|
|
133
136
|
const notice = noticeFor(bundles);
|
|
137
|
+
// A run that examined nothing is refused through the shared run-integrity
|
|
138
|
+
// mechanism. It stands down when the run already carries a finding: the only
|
|
139
|
+
// way to examine zero AND find something is an unreadable root, whose own
|
|
140
|
+
// `error` finding already fails the run and says the truer thing.
|
|
141
|
+
const refusal = findings.length > 0
|
|
142
|
+
? []
|
|
143
|
+
: toFindings(nothingCheckedFinding(examined, [], () => notice ?? NO_BUNDLES_NOTICE));
|
|
134
144
|
return buildReport({
|
|
135
145
|
examined,
|
|
136
|
-
findings,
|
|
146
|
+
findings: [...refusal, ...findings],
|
|
137
147
|
data: {
|
|
138
148
|
bundles: bundles.map((report) => ({
|
|
139
149
|
bundle: report.bundle,
|
|
@@ -178,10 +188,9 @@ export async function okfValidateCommand(bundleArg, options) {
|
|
|
178
188
|
try {
|
|
179
189
|
const report = { ...(await okfValidateReport(bundleArg, options)), durationMs: Date.now() - startTime };
|
|
180
190
|
writeStructuredOutput(report, options.format);
|
|
181
|
-
//
|
|
182
|
-
//
|
|
183
|
-
|
|
184
|
-
process.exit(exitCodeForSeverityCounts(report.summary));
|
|
191
|
+
// Derived from the report it just PUBLISHED: an adopter who promotes or
|
|
192
|
+
// lowers a bundle's severity then gates on exactly the number a reader sees.
|
|
193
|
+
process.exit(exitCodeForReport(report));
|
|
185
194
|
}
|
|
186
195
|
catch (error) {
|
|
187
196
|
handleReportCommandError(error, logger, startTime, 'OKF validate', options.format);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/commands/okf/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAA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iBAAiB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC;QACxG,qBAAqB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9C,wEAAwE;QACxE,6EAA6E;QAC7E,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACrF,CAAC;AACH,CAAC"}
|
|
@@ -39,6 +39,12 @@
|
|
|
39
39
|
*/
|
|
40
40
|
import { z } from 'zod';
|
|
41
41
|
declare const ProgressEntrySchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
42
|
+
kind: z.ZodLiteral<"started">;
|
|
43
|
+
}, "strict", z.ZodTypeAny, {
|
|
44
|
+
kind: "started";
|
|
45
|
+
}, {
|
|
46
|
+
kind: "started";
|
|
47
|
+
}>, z.ZodObject<{
|
|
42
48
|
kind: z.ZodLiteral<"population">;
|
|
43
49
|
population: z.ZodUnion<[z.ZodLiteral<"derived">, z.ZodLiteral<"store">]>;
|
|
44
50
|
populationMs: z.ZodNumber;
|
|
@@ -110,6 +116,8 @@ export type ProgressEntry = z.infer<typeof ProgressEntrySchema>;
|
|
|
110
116
|
* forty rules.
|
|
111
117
|
*/
|
|
112
118
|
export type UnitInFlight = {
|
|
119
|
+
readonly kind: 'startup';
|
|
120
|
+
} | {
|
|
113
121
|
readonly kind: 'population';
|
|
114
122
|
} | {
|
|
115
123
|
readonly kind: 'check';
|
|
@@ -131,8 +139,13 @@ export declare function parseProgressLog(text: string): ProgressEntry[];
|
|
|
131
139
|
*
|
|
132
140
|
* 🔑 The population sentinel is keyed on the population line's ABSENCE rather
|
|
133
141
|
* than on there being no `start` lines. Those are different states: a run killed
|
|
134
|
-
* during population has no projection
|
|
135
|
-
*
|
|
142
|
+
* during population has no projection, while a run killed between the population
|
|
143
|
+
* and the first statement has one.
|
|
144
|
+
*
|
|
145
|
+
* 🔑 The startup sentinel is keyed the same way, on the `started` line's
|
|
146
|
+
* absence — never on an empty log. Before that line the child was still loading
|
|
147
|
+
* Node and the CLI, nothing had touched the tree, and advice about sizing the
|
|
148
|
+
* budget against a population would be advice about a unit that never began.
|
|
136
149
|
*
|
|
137
150
|
* @param entries - What {@link parseProgressLog} recovered
|
|
138
151
|
* @returns The unit in flight
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-progress.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"check-progress.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4GxB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMvB,CAAC;AAEH,oCAAoC;AACpC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAC/B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9B;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAQ9D;AA4BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,YAAY,CA2B5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAIjF"}
|
|
@@ -39,14 +39,33 @@
|
|
|
39
39
|
*/
|
|
40
40
|
import { appendFileSync } from 'node:fs';
|
|
41
41
|
import { z } from 'zod';
|
|
42
|
+
/**
|
|
43
|
+
* The child has booted — Node is up, the CLI is loaded, and no work has begun.
|
|
44
|
+
*
|
|
45
|
+
* 🚨 **The defect this closes: the population was charged the child's boot.**
|
|
46
|
+
* The watchdog's clock starts at the spawn, and the population line used to be
|
|
47
|
+
* the child's FIRST line — so Node's startup and the CLI's module graph were
|
|
48
|
+
* silently billed to the one unit the budget is already a total bound for. On a
|
|
49
|
+
* loaded runner the boot alone grows by seconds, and a run whose tree was fine
|
|
50
|
+
* was killed "during population" for its neighbours' load. This line closes the
|
|
51
|
+
* boot's window and opens the population's own, so the budget measures work.
|
|
52
|
+
*
|
|
53
|
+
* It carries no fields: the fact that it was written is the whole message. Its
|
|
54
|
+
* ABSENCE is what {@link unitInFlight} reads as `startup` — a run killed before
|
|
55
|
+
* it could say anything at all.
|
|
56
|
+
*/
|
|
57
|
+
const StartedEntrySchema = z.object({
|
|
58
|
+
kind: z.literal('started'),
|
|
59
|
+
}).strict();
|
|
42
60
|
/**
|
|
43
61
|
* The population finished — how it was obtained, what it cost, and how much of
|
|
44
62
|
* the tree it covered.
|
|
45
63
|
*
|
|
46
64
|
* Written the instant the projection is ready, because a kill BEFORE this line
|
|
47
|
-
* means there is no projection at all
|
|
48
|
-
*
|
|
49
|
-
*
|
|
65
|
+
* means there is no projection at all: the document the parent publishes then
|
|
66
|
+
* carries its population fields as `null`, not as a value nobody measured. The
|
|
67
|
+
* parent distinguishes those two endings by this line's presence and nothing
|
|
68
|
+
* else, so it must never be written early or optimistically.
|
|
50
69
|
*/
|
|
51
70
|
const PopulationEntrySchema = z.object({
|
|
52
71
|
kind: z.literal('population'),
|
|
@@ -122,6 +141,7 @@ const ChecksCompleteEntrySchema = z.object({
|
|
|
122
141
|
kind: z.literal('checks-complete'),
|
|
123
142
|
}).strict();
|
|
124
143
|
const ProgressEntrySchema = z.discriminatedUnion('kind', [
|
|
144
|
+
StartedEntrySchema,
|
|
125
145
|
PopulationEntrySchema,
|
|
126
146
|
StartEntrySchema,
|
|
127
147
|
CheckEntrySchema,
|
|
@@ -176,15 +196,23 @@ function readLine(line) {
|
|
|
176
196
|
*
|
|
177
197
|
* 🔑 The population sentinel is keyed on the population line's ABSENCE rather
|
|
178
198
|
* than on there being no `start` lines. Those are different states: a run killed
|
|
179
|
-
* during population has no projection
|
|
180
|
-
*
|
|
199
|
+
* during population has no projection, while a run killed between the population
|
|
200
|
+
* and the first statement has one.
|
|
201
|
+
*
|
|
202
|
+
* 🔑 The startup sentinel is keyed the same way, on the `started` line's
|
|
203
|
+
* absence — never on an empty log. Before that line the child was still loading
|
|
204
|
+
* Node and the CLI, nothing had touched the tree, and advice about sizing the
|
|
205
|
+
* budget against a population would be advice about a unit that never began.
|
|
181
206
|
*
|
|
182
207
|
* @param entries - What {@link parseProgressLog} recovered
|
|
183
208
|
* @returns The unit in flight
|
|
184
209
|
*/
|
|
185
210
|
export function unitInFlight(entries) {
|
|
186
|
-
if (!entries.some((entry) => entry.kind === 'population'))
|
|
187
|
-
return
|
|
211
|
+
if (!entries.some((entry) => entry.kind === 'population')) {
|
|
212
|
+
return entries.some((entry) => entry.kind === 'started')
|
|
213
|
+
? { kind: 'population' }
|
|
214
|
+
: { kind: 'startup' };
|
|
215
|
+
}
|
|
188
216
|
const completed = new Set(entries.filter((entry) => entry.kind === 'check').map((entry) => entry.name));
|
|
189
217
|
// 🪤 The `completed` set is what makes this unique, NOT the scan direction.
|
|
190
218
|
// The runner is serial — one statement at a time, its cost filed before the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-progress.js","sourceRoot":"","sources":["../../../src/commands/resources/check-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"check-progress.js","sourceRoot":"","sources":["../../../src/commands/resources/check-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;GAcG;AACH,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;CAC3B,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ;;;;;;;;;GASG;AACH,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;IAC7B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,2EAA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AAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -51,6 +51,20 @@
|
|
|
51
51
|
* check's budget. A gate that can hang forever is the thing being fixed, and
|
|
52
52
|
* that includes hanging before the first statement.
|
|
53
53
|
*
|
|
54
|
+
* 🔑 **The clock starts at the spawn, and the child's first line is `started`.**
|
|
55
|
+
* The spawn is the only instant this process can observe, so the child's own
|
|
56
|
+
* boot — Node's startup and the CLI's module graph — is a unit like any other:
|
|
57
|
+
* bounded by the budget, and closed by the `started` line the child writes
|
|
58
|
+
* before it touches the tree. Without that line the boot was charged to the
|
|
59
|
+
* population, and a loaded runner's slower boot killed a population that was
|
|
60
|
+
* fine. {@link WatchdogState}'s `quietSince` is therefore `startedAt`, and must
|
|
61
|
+
* stay so: starting the clock at the first line instead would leave a child
|
|
62
|
+
* that hangs while booting with no bound at all.
|
|
63
|
+
*
|
|
64
|
+
* Wherever a kill lands — startup, population, a check, the document — the
|
|
65
|
+
* parent publishes the same kind of document and exits 1. A kill is one outcome
|
|
66
|
+
* and gets one exit code; see `buildInterruptedCheckInput`.
|
|
67
|
+
*
|
|
54
68
|
* ⚠️ **That property holds for the CHECKS. It does NOT hold for the population,
|
|
55
69
|
* and the difference is not a detail.** The population emits exactly ONE line,
|
|
56
70
|
* at its end, so for the single longest unit in a cold run the budget degrades
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-supervisor.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check-supervisor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"check-supervisor.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check-supervisor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG;AA+CH,iDAAiD;AACjD,MAA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AU,EAAE,aAAa,EACzB,MAAM,EAAE,MAAM,GACb,aAAa,CAGf;AAED,kCAAkC;AAClC,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAChF;IACA,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,aAAa,CAAC,CA2EzB;AAsDD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAO1F"}
|
|
@@ -51,6 +51,20 @@
|
|
|
51
51
|
* check's budget. A gate that can hang forever is the thing being fixed, and
|
|
52
52
|
* that includes hanging before the first statement.
|
|
53
53
|
*
|
|
54
|
+
* 🔑 **The clock starts at the spawn, and the child's first line is `started`.**
|
|
55
|
+
* The spawn is the only instant this process can observe, so the child's own
|
|
56
|
+
* boot — Node's startup and the CLI's module graph — is a unit like any other:
|
|
57
|
+
* bounded by the budget, and closed by the `started` line the child writes
|
|
58
|
+
* before it touches the tree. Without that line the boot was charged to the
|
|
59
|
+
* population, and a loaded runner's slower boot killed a population that was
|
|
60
|
+
* fine. {@link WatchdogState}'s `quietSince` is therefore `startedAt`, and must
|
|
61
|
+
* stay so: starting the clock at the first line instead would leave a child
|
|
62
|
+
* that hangs while booting with no bound at all.
|
|
63
|
+
*
|
|
64
|
+
* Wherever a kill lands — startup, population, a check, the document — the
|
|
65
|
+
* parent publishes the same kind of document and exits 1. A kill is one outcome
|
|
66
|
+
* and gets one exit code; see `buildInterruptedCheckInput`.
|
|
67
|
+
*
|
|
54
68
|
* ⚠️ **That property holds for the CHECKS. It does NOT hold for the population,
|
|
55
69
|
* and the difference is not a detail.** The population emits exactly ONE line,
|
|
56
70
|
* at its end, so for the single longest unit in a cold run the budget degrades
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-supervisor.js","sourceRoot":"","sources":["../../../src/commands/resources/check-supervisor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"check-supervisor.js","sourceRoot":"","sources":["../../../src/commands/resources/check-supervisor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,MAAM,sBAA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,CAAC;QACf,IAAI,iBAAiB,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACxC,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAI,IAAqC;IAC5E,MAAM,GAAG,GAAG,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;IACzE,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC1D,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
|
|
@@ -88,24 +88,26 @@ export interface CheckCost {
|
|
|
88
88
|
*/
|
|
89
89
|
readonly builtin?: true;
|
|
90
90
|
}
|
|
91
|
-
/** What
|
|
92
|
-
|
|
91
|
+
/** What a completed population reported: where it came from, what it cost, what it covered. */
|
|
92
|
+
export type PopulatedRun = ProjectionProvenance & PopulationExtent;
|
|
93
|
+
export interface CheckPayloadInput {
|
|
94
|
+
root: string;
|
|
95
|
+
durationMs: number;
|
|
93
96
|
issues: readonly ValidationIssue[];
|
|
97
|
+
/** One record per check that EXECUTED — see {@link CheckOutcome.costs}. */
|
|
98
|
+
costs: readonly CheckCost[];
|
|
94
99
|
/**
|
|
95
|
-
*
|
|
96
|
-
* is read against, and what each of them cost.
|
|
100
|
+
* The population, or `null` when the run was interrupted before it completed.
|
|
97
101
|
*
|
|
98
|
-
* 🔑
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
102
|
+
* 🔑 Required, and ONE field rather than five nullable ones. A run either has
|
|
103
|
+
* a projection or it does not, so the population's origin, costs, lenses and
|
|
104
|
+
* extent are null together or present together — five independently nullable
|
|
105
|
+
* fields would make half a population representable. `null` is what an
|
|
106
|
+
* interrupted run publishes when its child never wrote the population line:
|
|
107
|
+
* every value here would otherwise have to be invented, and
|
|
108
|
+
* `membersEnumerated: 0` or `lensesEvaluated: []` already MEAN something else.
|
|
103
109
|
*/
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
export interface CheckPayloadInput extends CheckOutcome {
|
|
107
|
-
root: string;
|
|
108
|
-
durationMs: number;
|
|
110
|
+
populated: PopulatedRun | null;
|
|
109
111
|
}
|
|
110
112
|
/**
|
|
111
113
|
* What the check run reports beyond its findings.
|
|
@@ -117,20 +119,28 @@ export interface CheckPayloadInput extends CheckOutcome {
|
|
|
117
119
|
*/
|
|
118
120
|
export declare const CheckDataSchema: z.ZodObject<{
|
|
119
121
|
root: z.ZodString;
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Whether the projection was derived this run or read from the store.
|
|
124
|
+
*
|
|
125
|
+
* 🔑 `null` — together with `populationSecs`, `lensSecs` and
|
|
126
|
+
* `lensesEvaluated` — exactly when the run was interrupted before its
|
|
127
|
+
* population completed. There was no projection, so there is no origin, cost
|
|
128
|
+
* or lens set to report, and a `RESOURCE_CHECK_BROKEN` finding says why.
|
|
129
|
+
*/
|
|
130
|
+
population: z.ZodNullable<z.ZodEnum<["derived", "store"]>>;
|
|
131
|
+
/** What the population cost — charged to no check, see `CheckCost`. Null as `population` is. */
|
|
132
|
+
populationSecs: z.ZodNullable<z.ZodNumber>;
|
|
133
|
+
/** What evaluating the lenses cost, paid before the first statement ran. Null as `population` is. */
|
|
134
|
+
lensSecs: z.ZodNullable<z.ZodNumber>;
|
|
126
135
|
/**
|
|
127
136
|
* Which lenses that covers — the derived relations this run's checks could
|
|
128
137
|
* actually read. 🔑 An empty list says "no check asked for a derived relation"
|
|
129
138
|
* rather than "a lens stopped running"; without it `lensSecs: 0` is the same
|
|
130
139
|
* document either way, and a gate whose rules silently read empty relations is
|
|
131
|
-
* a gate that cannot fail.
|
|
140
|
+
* a gate that cannot fail. Null as `population` is — `[]` would claim "no
|
|
141
|
+
* check asked", about a run that never got far enough to ask.
|
|
132
142
|
*/
|
|
133
|
-
lensesEvaluated: z.ZodArray<z.ZodString, "many"
|
|
143
|
+
lensesEvaluated: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
134
144
|
/**
|
|
135
145
|
* The prose frame {@link CheckDataSchema.limits} is read under. Present
|
|
136
146
|
* exactly when a lens with stated bounds was evaluated.
|
|
@@ -182,10 +192,10 @@ export declare const CheckDataSchema: z.ZodObject<{
|
|
|
182
192
|
}>, "many">;
|
|
183
193
|
}, "strict", z.ZodTypeAny, {
|
|
184
194
|
root: string;
|
|
185
|
-
population: "derived" | "store";
|
|
186
|
-
lensesEvaluated: string[];
|
|
187
|
-
populationSecs: number;
|
|
188
|
-
lensSecs: number;
|
|
195
|
+
population: "derived" | "store" | null;
|
|
196
|
+
lensesEvaluated: string[] | null;
|
|
197
|
+
populationSecs: number | null;
|
|
198
|
+
lensSecs: number | null;
|
|
189
199
|
checksRun: number;
|
|
190
200
|
checks: {
|
|
191
201
|
name: string;
|
|
@@ -202,10 +212,10 @@ export declare const CheckDataSchema: z.ZodObject<{
|
|
|
202
212
|
}[] | undefined;
|
|
203
213
|
}, {
|
|
204
214
|
root: string;
|
|
205
|
-
population: "derived" | "store";
|
|
206
|
-
lensesEvaluated: string[];
|
|
207
|
-
populationSecs: number;
|
|
208
|
-
lensSecs: number;
|
|
215
|
+
population: "derived" | "store" | null;
|
|
216
|
+
lensesEvaluated: string[] | null;
|
|
217
|
+
populationSecs: number | null;
|
|
218
|
+
lensSecs: number | null;
|
|
209
219
|
checksRun: number;
|
|
210
220
|
checks: {
|
|
211
221
|
name: string;
|
|
@@ -225,20 +235,28 @@ export type CheckData = z.infer<typeof CheckDataSchema>;
|
|
|
225
235
|
/** The document this command publishes. */
|
|
226
236
|
export declare const CHECK_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").ReportZodSchema<z.ZodObject<{
|
|
227
237
|
root: z.ZodString;
|
|
228
|
-
/**
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
/**
|
|
239
|
+
* Whether the projection was derived this run or read from the store.
|
|
240
|
+
*
|
|
241
|
+
* 🔑 `null` — together with `populationSecs`, `lensSecs` and
|
|
242
|
+
* `lensesEvaluated` — exactly when the run was interrupted before its
|
|
243
|
+
* population completed. There was no projection, so there is no origin, cost
|
|
244
|
+
* or lens set to report, and a `RESOURCE_CHECK_BROKEN` finding says why.
|
|
245
|
+
*/
|
|
246
|
+
population: z.ZodNullable<z.ZodEnum<["derived", "store"]>>;
|
|
247
|
+
/** What the population cost — charged to no check, see `CheckCost`. Null as `population` is. */
|
|
248
|
+
populationSecs: z.ZodNullable<z.ZodNumber>;
|
|
249
|
+
/** What evaluating the lenses cost, paid before the first statement ran. Null as `population` is. */
|
|
250
|
+
lensSecs: z.ZodNullable<z.ZodNumber>;
|
|
234
251
|
/**
|
|
235
252
|
* Which lenses that covers — the derived relations this run's checks could
|
|
236
253
|
* actually read. 🔑 An empty list says "no check asked for a derived relation"
|
|
237
254
|
* rather than "a lens stopped running"; without it `lensSecs: 0` is the same
|
|
238
255
|
* document either way, and a gate whose rules silently read empty relations is
|
|
239
|
-
* a gate that cannot fail.
|
|
256
|
+
* a gate that cannot fail. Null as `population` is — `[]` would claim "no
|
|
257
|
+
* check asked", about a run that never got far enough to ask.
|
|
240
258
|
*/
|
|
241
|
-
lensesEvaluated: z.ZodArray<z.ZodString, "many"
|
|
259
|
+
lensesEvaluated: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
242
260
|
/**
|
|
243
261
|
* The prose frame {@link CheckDataSchema.limits} is read under. Present
|
|
244
262
|
* exactly when a lens with stated bounds was evaluated.
|
|
@@ -290,10 +308,10 @@ export declare const CHECK_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").R
|
|
|
290
308
|
}>, "many">;
|
|
291
309
|
}, "strict", z.ZodTypeAny, {
|
|
292
310
|
root: string;
|
|
293
|
-
population: "derived" | "store";
|
|
294
|
-
lensesEvaluated: string[];
|
|
295
|
-
populationSecs: number;
|
|
296
|
-
lensSecs: number;
|
|
311
|
+
population: "derived" | "store" | null;
|
|
312
|
+
lensesEvaluated: string[] | null;
|
|
313
|
+
populationSecs: number | null;
|
|
314
|
+
lensSecs: number | null;
|
|
297
315
|
checksRun: number;
|
|
298
316
|
checks: {
|
|
299
317
|
name: string;
|
|
@@ -310,10 +328,10 @@ export declare const CHECK_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").R
|
|
|
310
328
|
}[] | undefined;
|
|
311
329
|
}, {
|
|
312
330
|
root: string;
|
|
313
|
-
population: "derived" | "store";
|
|
314
|
-
lensesEvaluated: string[];
|
|
315
|
-
populationSecs: number;
|
|
316
|
-
lensSecs: number;
|
|
331
|
+
population: "derived" | "store" | null;
|
|
332
|
+
lensesEvaluated: string[] | null;
|
|
333
|
+
populationSecs: number | null;
|
|
334
|
+
lensSecs: number | null;
|
|
317
335
|
checksRun: number;
|
|
318
336
|
checks: {
|
|
319
337
|
name: string;
|
|
@@ -353,6 +371,13 @@ export type CheckReport = Report<CheckData>;
|
|
|
353
371
|
* passes through, so deriving the refusal in it is what makes "checked nothing,
|
|
354
372
|
* status clean" unrepresentable rather than merely unwritten.
|
|
355
373
|
*
|
|
374
|
+
* 🔑 **A run with no population is `status: error`, and that is decided HERE.**
|
|
375
|
+
* Nothing was examined, so it is not a gate that failed (exit 1) but a command
|
|
376
|
+
* that could not do its job (exit 2) — the exit code follows from the document
|
|
377
|
+
* through `exitCodeForReport`, so no caller can publish one and exit the other.
|
|
378
|
+
* The document is still published, with the population fields `null`, and the
|
|
379
|
+
* reason moves from `findings` to `error` as the envelope's error branch requires.
|
|
380
|
+
*
|
|
356
381
|
* 🪤 The findings are NOT run through `relativizePathEntries`. Every other
|
|
357
382
|
* payload builder re-bases here because its producer keeps absolute paths
|
|
358
383
|
* internally; these arrive project-relative instead, and re-basing an
|
|
@@ -481,12 +506,15 @@ export declare const NODE_FATAL_ABORT_EXIT_CODE = 134;
|
|
|
481
506
|
* keep in step with every future field — and the failure mode is silent, because
|
|
482
507
|
* nobody reads an interrupted run's document until the day they need it.
|
|
483
508
|
*
|
|
484
|
-
* 🚨 **
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
509
|
+
* 🚨 **The exit code follows the CAUSE, and the cause is what was in flight.**
|
|
510
|
+
* A run killed or dead while a check's statement ran examined the tree, and
|
|
511
|
+
* that check is broken: `status: findings`, `RESOURCE_CHECK_BROKEN`, exit 1. A
|
|
512
|
+
* run stopped during STARTUP or POPULATION examined nothing: it is a command
|
|
513
|
+
* that could not do its job — `status: error`, exit 2 — decided by
|
|
514
|
+
* {@link buildCheckOutputData} from `populated: null`, never by the caller. It
|
|
515
|
+
* used to THROW there, which lost the document; now the document is published,
|
|
516
|
+
* with the population's fields `null` rather than invented, and the reason in
|
|
517
|
+
* `error`.
|
|
490
518
|
*
|
|
491
519
|
* @param options - The wreckage
|
|
492
520
|
* @param options.entries - What `parseProgressLog` recovered
|
|
@@ -494,7 +522,6 @@ export declare const NODE_FATAL_ABORT_EXIT_CODE = 134;
|
|
|
494
522
|
* @param options.ending - Which way the run was interrupted
|
|
495
523
|
* @param options.durationMs - Wall time from spawn to ending
|
|
496
524
|
* @returns The input to {@link buildCheckOutputData}
|
|
497
|
-
* @throws When the child never reported a completed population
|
|
498
525
|
*/
|
|
499
526
|
export declare function buildInterruptedCheckInput(options: {
|
|
500
527
|
entries: readonly ProgressEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/commands/resources/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;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