@orkestrel/probe 0.0.25 → 0.0.27
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/main.js +1 -2
- package/dist/src/core/index.cjs +62 -60
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +74 -75
- package/dist/src/core/index.d.ts +74 -75
- package/dist/src/core/index.js +62 -60
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +189 -242
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +34 -27
- package/dist/src/server/index.d.ts +34 -27
- package/dist/src/server/index.js +192 -245
- package/dist/src/server/index.js.map +1 -1
- package/package.json +19 -18
|
@@ -60,27 +60,6 @@ text: StringShape;
|
|
|
60
60
|
}, false>;
|
|
61
61
|
}, false>;
|
|
62
62
|
|
|
63
|
-
/**
|
|
64
|
-
* Carries one stage's outcome: what it cost and what it reported.
|
|
65
|
-
*
|
|
66
|
-
* @remarks
|
|
67
|
-
* An empty `issues` list is the clean result. There is no separate pass flag, because passing is
|
|
68
|
-
* exactly the absence of issues and a stored flag could disagree with the list beside it.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```ts
|
|
72
|
-
* const check: Check = { stage: 'lint', elapsed: 17, issues: [] }
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export declare interface Check {
|
|
76
|
-
/** Names the stage that produced this outcome. */
|
|
77
|
-
readonly stage: Stage;
|
|
78
|
-
/** Holds the milliseconds the stage took. */
|
|
79
|
-
readonly elapsed: number;
|
|
80
|
-
/** Holds every message the stage's tool reported, in the tool's own order. */
|
|
81
|
-
readonly issues: readonly Issue[];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
63
|
/**
|
|
85
64
|
* Carries everything the service needs to produce one verdict.
|
|
86
65
|
*
|
|
@@ -172,8 +151,6 @@ text: StringShape;
|
|
|
172
151
|
}, false>;
|
|
173
152
|
}, false>;
|
|
174
153
|
control: ObjectShape< {
|
|
175
|
-
stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
|
|
176
|
-
reason: StringShape;
|
|
177
154
|
files: ArrayShape<ObjectShape< {
|
|
178
155
|
path: StringShape;
|
|
179
156
|
text: StringShape;
|
|
@@ -182,6 +159,8 @@ test: ObjectShape< {
|
|
|
182
159
|
path: StringShape;
|
|
183
160
|
text: StringShape;
|
|
184
161
|
}, false>;
|
|
162
|
+
stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
|
|
163
|
+
reason: StringShape;
|
|
185
164
|
}, false>;
|
|
186
165
|
}, false>;
|
|
187
166
|
|
|
@@ -189,8 +168,8 @@ text: StringShape;
|
|
|
189
168
|
* Computes the proof token a verdict carries, or returns nothing when the claim was not proven.
|
|
190
169
|
*
|
|
191
170
|
* @remarks
|
|
192
|
-
* A receipt is minted on these conditions together: both phases report one
|
|
193
|
-
* case carries no issue, the control carries at least one `origin: 'claimant'` issue
|
|
171
|
+
* A receipt is minted on these conditions together: both phases report one stage result per stage,
|
|
172
|
+
* the case carries no issue, the control carries at least one `origin: 'claimant'` issue
|
|
194
173
|
* at the stage it declared, and every other control stage carries no claimant issue. A control
|
|
195
174
|
* that fails somewhere else has falsified the instrument rather than the claim, so no receipt is
|
|
196
175
|
* minted for it.
|
|
@@ -216,7 +195,7 @@ text: StringShape;
|
|
|
216
195
|
* refuses the receipt. A workspace issue in the control does not decide whether the claimant's
|
|
217
196
|
* candidate broke, while one in the case still means that the case did not run clean.
|
|
218
197
|
*
|
|
219
|
-
* @param verdict - The verdict whose case and control
|
|
198
|
+
* @param verdict - The verdict whose case and control stage results decide the outcome
|
|
220
199
|
* @param stage - The stage the claim's control declared it must fail at
|
|
221
200
|
* @returns The receipt token, or `undefined` when any condition fails
|
|
222
201
|
*
|
|
@@ -276,8 +255,6 @@ export declare interface Control extends Case {
|
|
|
276
255
|
* ```
|
|
277
256
|
*/
|
|
278
257
|
export declare const CONTROL_SHAPE: ObjectShape< {
|
|
279
|
-
stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
|
|
280
|
-
reason: StringShape;
|
|
281
258
|
files: ArrayShape<ObjectShape< {
|
|
282
259
|
path: StringShape;
|
|
283
260
|
text: StringShape;
|
|
@@ -286,6 +263,8 @@ test: ObjectShape< {
|
|
|
286
263
|
path: StringShape;
|
|
287
264
|
text: StringShape;
|
|
288
265
|
}, false>;
|
|
266
|
+
stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
|
|
267
|
+
reason: StringShape;
|
|
289
268
|
}, false>;
|
|
290
269
|
|
|
291
270
|
/**
|
|
@@ -351,24 +330,6 @@ path: StringShape;
|
|
|
351
330
|
text: StringShape;
|
|
352
331
|
}, false>;
|
|
353
332
|
|
|
354
|
-
/**
|
|
355
|
-
* Renders one stage's outcome as its summary line followed by every message it reported.
|
|
356
|
-
*
|
|
357
|
-
* @remarks
|
|
358
|
-
* A clean stage renders one line. The count appears even when it is zero, because that line is
|
|
359
|
-
* what shows a reader the stage ran; a silent stage and a skipped stage read the same.
|
|
360
|
-
*
|
|
361
|
-
* @param check - The stage outcome to render
|
|
362
|
-
* @returns The summary line, then one indented line per issue
|
|
363
|
-
*
|
|
364
|
-
* @example
|
|
365
|
-
* ```ts
|
|
366
|
-
* formatCheck({ stage: 'lint', elapsed: 17, issues: [] })
|
|
367
|
-
* // 'lint: 0 issues (17 ms)'
|
|
368
|
-
* ```
|
|
369
|
-
*/
|
|
370
|
-
export declare function formatCheck(check: Check): string;
|
|
371
|
-
|
|
372
333
|
/**
|
|
373
334
|
* Renders one tool message as a single line an agent can classify and locate.
|
|
374
335
|
*
|
|
@@ -463,6 +424,24 @@ export declare function formatReceipt(verdict: Verdict): string;
|
|
|
463
424
|
*/
|
|
464
425
|
export declare function formatSpecification(text: string, revision: string): string;
|
|
465
426
|
|
|
427
|
+
/**
|
|
428
|
+
* Renders one stage's outcome as its summary line followed by every message it reported.
|
|
429
|
+
*
|
|
430
|
+
* @remarks
|
|
431
|
+
* A clean stage renders one line. The count appears even when it is zero, because that line is
|
|
432
|
+
* what shows a reader the stage ran; a silent stage and a skipped stage read the same.
|
|
433
|
+
*
|
|
434
|
+
* @param result - The stage outcome to render
|
|
435
|
+
* @returns The summary line, then one indented line per issue
|
|
436
|
+
*
|
|
437
|
+
* @example
|
|
438
|
+
* ```ts
|
|
439
|
+
* formatStageResult({ stage: 'lint', elapsed: 17, issues: [] })
|
|
440
|
+
* // 'lint: 0 issues (17 ms)'
|
|
441
|
+
* ```
|
|
442
|
+
*/
|
|
443
|
+
export declare function formatStageResult(result: StageResult): string;
|
|
444
|
+
|
|
466
445
|
/**
|
|
467
446
|
* Renders a whole verdict as the text an agent reads.
|
|
468
447
|
*
|
|
@@ -474,8 +453,8 @@ export declare function formatSpecification(text: string, revision: string): str
|
|
|
474
453
|
* The heading lines carry everything the receipt binds, each in the name-then-value form the
|
|
475
454
|
* toolchain line established: the call's identity, the claim it answered, the tools that ran, and
|
|
476
455
|
* the project that judged the candidates. A verdict carrying the control's reason renders it next,
|
|
477
|
-
* before either phase's
|
|
478
|
-
* without recomputing anything.
|
|
456
|
+
* before either phase's stage results. A reader comparing two verdicts therefore reads what
|
|
457
|
+
* differed without recomputing anything.
|
|
479
458
|
*
|
|
480
459
|
* @param verdict - The verdict to render
|
|
481
460
|
* @returns The identity, claim, toolchain, project, and reason when present, then every case and
|
|
@@ -502,19 +481,6 @@ export declare function formatVerdict(verdict: Verdict): string;
|
|
|
502
481
|
*/
|
|
503
482
|
export declare const isCase: Guard<Case>;
|
|
504
483
|
|
|
505
|
-
/**
|
|
506
|
-
* Checks whether a value carries one stage's outcome.
|
|
507
|
-
*
|
|
508
|
-
* @param value - The value to check
|
|
509
|
-
* @returns True if the value is a check; false otherwise
|
|
510
|
-
*
|
|
511
|
-
* @example
|
|
512
|
-
* ```ts
|
|
513
|
-
* isCheck({ stage: 'lint', elapsed: 17, issues: [] }) // true
|
|
514
|
-
* ```
|
|
515
|
-
*/
|
|
516
|
-
export declare const isCheck: Guard<Check>;
|
|
517
|
-
|
|
518
484
|
/**
|
|
519
485
|
* Checks whether a value carries a project, a case, and a control.
|
|
520
486
|
*
|
|
@@ -617,12 +583,11 @@ export declare const isParty: Guard<Party>;
|
|
|
617
583
|
* Checks whether an unknown value is a {@link ProbeError}.
|
|
618
584
|
*
|
|
619
585
|
* @remarks
|
|
620
|
-
* Recognition
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
* condition all stay outside the type.
|
|
586
|
+
* Recognition requires the native `Error` base, a non-base prototype, an own global brand holding
|
|
587
|
+
* the error itself, a declared party and condition, and context members of their declared types.
|
|
588
|
+
* The brand carries recognition across duplicate installations and module formats. A subclass may
|
|
589
|
+
* replace `name`. A transparent proxy, a plain `Error`, a property-only lookalike, and an error with
|
|
590
|
+
* invalid members stay outside the type.
|
|
626
591
|
*
|
|
627
592
|
* @param value - The value to inspect
|
|
628
593
|
* @returns True if the value is a `ProbeError` instance; false otherwise
|
|
@@ -667,11 +632,24 @@ export declare const isProject: Guard<Project>;
|
|
|
667
632
|
*/
|
|
668
633
|
export declare const isStage: Guard<Stage>;
|
|
669
634
|
|
|
635
|
+
/**
|
|
636
|
+
* Checks whether a value carries one stage's outcome.
|
|
637
|
+
*
|
|
638
|
+
* @param value - The value to check
|
|
639
|
+
* @returns True if the value is a stage result; false otherwise
|
|
640
|
+
*
|
|
641
|
+
* @example
|
|
642
|
+
* ```ts
|
|
643
|
+
* isStageResult({ stage: 'lint', elapsed: 17, issues: [] }) // true
|
|
644
|
+
* ```
|
|
645
|
+
*/
|
|
646
|
+
export declare const isStageResult: Guard<StageResult>;
|
|
647
|
+
|
|
670
648
|
/**
|
|
671
649
|
* Carries one message a stage reported, where it reported it, and whose fault it names.
|
|
672
650
|
*
|
|
673
651
|
* @remarks
|
|
674
|
-
* The stage is not repeated here. An issue always arrives inside the `
|
|
652
|
+
* The stage is not repeated here. An issue always arrives inside the `StageResult` that names its
|
|
675
653
|
* stage, so a second copy could only drift from the first.
|
|
676
654
|
*
|
|
677
655
|
* A `claimant` issue is a tool's diagnostic about a candidate draft, and nothing else. Every
|
|
@@ -738,9 +716,9 @@ export declare const isToolchain: Guard<Toolchain>;
|
|
|
738
716
|
* Checks whether a value carries a complete verdict.
|
|
739
717
|
*
|
|
740
718
|
* @remarks
|
|
741
|
-
* Accepts any
|
|
742
|
-
* a stage that could not start throws before a verdict is built, so a short list can only
|
|
743
|
-
* from a caller that assembled one by hand.
|
|
719
|
+
* Accepts any stage result count, because arity is the coordinator's obligation rather than this
|
|
720
|
+
* guard's: a stage that could not start throws before a verdict is built, so a short list can only
|
|
721
|
+
* arrive from a caller that assembled one by hand.
|
|
744
722
|
*
|
|
745
723
|
* @param value - The value to check
|
|
746
724
|
* @returns True if the value is a verdict; false otherwise
|
|
@@ -1146,7 +1124,7 @@ export declare interface ProbeInterface {
|
|
|
1146
1124
|
*
|
|
1147
1125
|
* @param claim - The case, its control, and the project the candidate drafts in both cases
|
|
1148
1126
|
* are checked against
|
|
1149
|
-
* @returns The verdict, carrying one
|
|
1127
|
+
* @returns The verdict, carrying one stage result per stage for both the case and the control
|
|
1150
1128
|
* @throws When the control repeats the case byte for byte, or when a stage cannot start, so no
|
|
1151
1129
|
* verdict ever reports a stage that did not run
|
|
1152
1130
|
*/
|
|
@@ -1285,6 +1263,27 @@ export declare const RUNTIME_PLUGIN = "orkestrel-runtime-overlay";
|
|
|
1285
1263
|
*/
|
|
1286
1264
|
export declare type Stage = (typeof PROBE_STAGES)[number];
|
|
1287
1265
|
|
|
1266
|
+
/**
|
|
1267
|
+
* Carries one stage's outcome: what it cost and what it reported.
|
|
1268
|
+
*
|
|
1269
|
+
* @remarks
|
|
1270
|
+
* An empty `issues` list is the clean result. There is no separate pass flag, because passing is
|
|
1271
|
+
* exactly the absence of issues and a stored flag could disagree with the list beside it.
|
|
1272
|
+
*
|
|
1273
|
+
* @example
|
|
1274
|
+
* ```ts
|
|
1275
|
+
* const result: StageResult = { stage: 'lint', elapsed: 17, issues: [] }
|
|
1276
|
+
* ```
|
|
1277
|
+
*/
|
|
1278
|
+
export declare interface StageResult {
|
|
1279
|
+
/** Names the stage that produced this outcome. */
|
|
1280
|
+
readonly stage: Stage;
|
|
1281
|
+
/** Holds the milliseconds the stage took. */
|
|
1282
|
+
readonly elapsed: number;
|
|
1283
|
+
/** Holds every message the stage's tool reported, in the tool's own order. */
|
|
1284
|
+
readonly issues: readonly Issue[];
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1288
1287
|
/**
|
|
1289
1288
|
* Names the tool versions a verdict was produced with.
|
|
1290
1289
|
*
|
|
@@ -1342,7 +1341,7 @@ export declare const TYPE_MIRROR = "tmp/type";
|
|
|
1342
1341
|
* the type stage always runs and a claim always names a project, so no verdict exists without
|
|
1343
1342
|
* either value. A verdict returned by `Probe` also carries the control's claimant-authored
|
|
1344
1343
|
* `reason` unchanged. A hand-built verdict may omit it because the receipt helper needs only the
|
|
1345
|
-
* recorded
|
|
1344
|
+
* recorded stage results and declared stage.
|
|
1346
1345
|
*
|
|
1347
1346
|
* `digest` covers these things: the case bytes, the control bytes including this `reason`, and the
|
|
1348
1347
|
* workspace they were read against. The reason is part of the control, so two claims differing only
|
|
@@ -1401,9 +1400,9 @@ export declare interface Verdict {
|
|
|
1401
1400
|
*/
|
|
1402
1401
|
readonly reason?: string;
|
|
1403
1402
|
/** Holds one outcome per stage for the claim's case. */
|
|
1404
|
-
readonly case: readonly
|
|
1403
|
+
readonly case: readonly StageResult[];
|
|
1405
1404
|
/** Holds one outcome per stage for the claim's control. */
|
|
1406
|
-
readonly control: readonly
|
|
1405
|
+
readonly control: readonly StageResult[];
|
|
1407
1406
|
/** Holds the milliseconds the whole call took, including both the case and the control. */
|
|
1408
1407
|
readonly elapsed: number;
|
|
1409
1408
|
/** Holds the proof token, absent when either phase reports an instrument failure. */
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -60,27 +60,6 @@ text: StringShape;
|
|
|
60
60
|
}, false>;
|
|
61
61
|
}, false>;
|
|
62
62
|
|
|
63
|
-
/**
|
|
64
|
-
* Carries one stage's outcome: what it cost and what it reported.
|
|
65
|
-
*
|
|
66
|
-
* @remarks
|
|
67
|
-
* An empty `issues` list is the clean result. There is no separate pass flag, because passing is
|
|
68
|
-
* exactly the absence of issues and a stored flag could disagree with the list beside it.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```ts
|
|
72
|
-
* const check: Check = { stage: 'lint', elapsed: 17, issues: [] }
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export declare interface Check {
|
|
76
|
-
/** Names the stage that produced this outcome. */
|
|
77
|
-
readonly stage: Stage;
|
|
78
|
-
/** Holds the milliseconds the stage took. */
|
|
79
|
-
readonly elapsed: number;
|
|
80
|
-
/** Holds every message the stage's tool reported, in the tool's own order. */
|
|
81
|
-
readonly issues: readonly Issue[];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
63
|
/**
|
|
85
64
|
* Carries everything the service needs to produce one verdict.
|
|
86
65
|
*
|
|
@@ -172,8 +151,6 @@ text: StringShape;
|
|
|
172
151
|
}, false>;
|
|
173
152
|
}, false>;
|
|
174
153
|
control: ObjectShape< {
|
|
175
|
-
stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
|
|
176
|
-
reason: StringShape;
|
|
177
154
|
files: ArrayShape<ObjectShape< {
|
|
178
155
|
path: StringShape;
|
|
179
156
|
text: StringShape;
|
|
@@ -182,6 +159,8 @@ test: ObjectShape< {
|
|
|
182
159
|
path: StringShape;
|
|
183
160
|
text: StringShape;
|
|
184
161
|
}, false>;
|
|
162
|
+
stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
|
|
163
|
+
reason: StringShape;
|
|
185
164
|
}, false>;
|
|
186
165
|
}, false>;
|
|
187
166
|
|
|
@@ -189,8 +168,8 @@ text: StringShape;
|
|
|
189
168
|
* Computes the proof token a verdict carries, or returns nothing when the claim was not proven.
|
|
190
169
|
*
|
|
191
170
|
* @remarks
|
|
192
|
-
* A receipt is minted on these conditions together: both phases report one
|
|
193
|
-
* case carries no issue, the control carries at least one `origin: 'claimant'` issue
|
|
171
|
+
* A receipt is minted on these conditions together: both phases report one stage result per stage,
|
|
172
|
+
* the case carries no issue, the control carries at least one `origin: 'claimant'` issue
|
|
194
173
|
* at the stage it declared, and every other control stage carries no claimant issue. A control
|
|
195
174
|
* that fails somewhere else has falsified the instrument rather than the claim, so no receipt is
|
|
196
175
|
* minted for it.
|
|
@@ -216,7 +195,7 @@ text: StringShape;
|
|
|
216
195
|
* refuses the receipt. A workspace issue in the control does not decide whether the claimant's
|
|
217
196
|
* candidate broke, while one in the case still means that the case did not run clean.
|
|
218
197
|
*
|
|
219
|
-
* @param verdict - The verdict whose case and control
|
|
198
|
+
* @param verdict - The verdict whose case and control stage results decide the outcome
|
|
220
199
|
* @param stage - The stage the claim's control declared it must fail at
|
|
221
200
|
* @returns The receipt token, or `undefined` when any condition fails
|
|
222
201
|
*
|
|
@@ -276,8 +255,6 @@ export declare interface Control extends Case {
|
|
|
276
255
|
* ```
|
|
277
256
|
*/
|
|
278
257
|
export declare const CONTROL_SHAPE: ObjectShape< {
|
|
279
|
-
stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
|
|
280
|
-
reason: StringShape;
|
|
281
258
|
files: ArrayShape<ObjectShape< {
|
|
282
259
|
path: StringShape;
|
|
283
260
|
text: StringShape;
|
|
@@ -286,6 +263,8 @@ test: ObjectShape< {
|
|
|
286
263
|
path: StringShape;
|
|
287
264
|
text: StringShape;
|
|
288
265
|
}, false>;
|
|
266
|
+
stage: LiteralShape<readonly ["type", "lint", "runtime"]>;
|
|
267
|
+
reason: StringShape;
|
|
289
268
|
}, false>;
|
|
290
269
|
|
|
291
270
|
/**
|
|
@@ -351,24 +330,6 @@ path: StringShape;
|
|
|
351
330
|
text: StringShape;
|
|
352
331
|
}, false>;
|
|
353
332
|
|
|
354
|
-
/**
|
|
355
|
-
* Renders one stage's outcome as its summary line followed by every message it reported.
|
|
356
|
-
*
|
|
357
|
-
* @remarks
|
|
358
|
-
* A clean stage renders one line. The count appears even when it is zero, because that line is
|
|
359
|
-
* what shows a reader the stage ran; a silent stage and a skipped stage read the same.
|
|
360
|
-
*
|
|
361
|
-
* @param check - The stage outcome to render
|
|
362
|
-
* @returns The summary line, then one indented line per issue
|
|
363
|
-
*
|
|
364
|
-
* @example
|
|
365
|
-
* ```ts
|
|
366
|
-
* formatCheck({ stage: 'lint', elapsed: 17, issues: [] })
|
|
367
|
-
* // 'lint: 0 issues (17 ms)'
|
|
368
|
-
* ```
|
|
369
|
-
*/
|
|
370
|
-
export declare function formatCheck(check: Check): string;
|
|
371
|
-
|
|
372
333
|
/**
|
|
373
334
|
* Renders one tool message as a single line an agent can classify and locate.
|
|
374
335
|
*
|
|
@@ -463,6 +424,24 @@ export declare function formatReceipt(verdict: Verdict): string;
|
|
|
463
424
|
*/
|
|
464
425
|
export declare function formatSpecification(text: string, revision: string): string;
|
|
465
426
|
|
|
427
|
+
/**
|
|
428
|
+
* Renders one stage's outcome as its summary line followed by every message it reported.
|
|
429
|
+
*
|
|
430
|
+
* @remarks
|
|
431
|
+
* A clean stage renders one line. The count appears even when it is zero, because that line is
|
|
432
|
+
* what shows a reader the stage ran; a silent stage and a skipped stage read the same.
|
|
433
|
+
*
|
|
434
|
+
* @param result - The stage outcome to render
|
|
435
|
+
* @returns The summary line, then one indented line per issue
|
|
436
|
+
*
|
|
437
|
+
* @example
|
|
438
|
+
* ```ts
|
|
439
|
+
* formatStageResult({ stage: 'lint', elapsed: 17, issues: [] })
|
|
440
|
+
* // 'lint: 0 issues (17 ms)'
|
|
441
|
+
* ```
|
|
442
|
+
*/
|
|
443
|
+
export declare function formatStageResult(result: StageResult): string;
|
|
444
|
+
|
|
466
445
|
/**
|
|
467
446
|
* Renders a whole verdict as the text an agent reads.
|
|
468
447
|
*
|
|
@@ -474,8 +453,8 @@ export declare function formatSpecification(text: string, revision: string): str
|
|
|
474
453
|
* The heading lines carry everything the receipt binds, each in the name-then-value form the
|
|
475
454
|
* toolchain line established: the call's identity, the claim it answered, the tools that ran, and
|
|
476
455
|
* the project that judged the candidates. A verdict carrying the control's reason renders it next,
|
|
477
|
-
* before either phase's
|
|
478
|
-
* without recomputing anything.
|
|
456
|
+
* before either phase's stage results. A reader comparing two verdicts therefore reads what
|
|
457
|
+
* differed without recomputing anything.
|
|
479
458
|
*
|
|
480
459
|
* @param verdict - The verdict to render
|
|
481
460
|
* @returns The identity, claim, toolchain, project, and reason when present, then every case and
|
|
@@ -502,19 +481,6 @@ export declare function formatVerdict(verdict: Verdict): string;
|
|
|
502
481
|
*/
|
|
503
482
|
export declare const isCase: Guard<Case>;
|
|
504
483
|
|
|
505
|
-
/**
|
|
506
|
-
* Checks whether a value carries one stage's outcome.
|
|
507
|
-
*
|
|
508
|
-
* @param value - The value to check
|
|
509
|
-
* @returns True if the value is a check; false otherwise
|
|
510
|
-
*
|
|
511
|
-
* @example
|
|
512
|
-
* ```ts
|
|
513
|
-
* isCheck({ stage: 'lint', elapsed: 17, issues: [] }) // true
|
|
514
|
-
* ```
|
|
515
|
-
*/
|
|
516
|
-
export declare const isCheck: Guard<Check>;
|
|
517
|
-
|
|
518
484
|
/**
|
|
519
485
|
* Checks whether a value carries a project, a case, and a control.
|
|
520
486
|
*
|
|
@@ -617,12 +583,11 @@ export declare const isParty: Guard<Party>;
|
|
|
617
583
|
* Checks whether an unknown value is a {@link ProbeError}.
|
|
618
584
|
*
|
|
619
585
|
* @remarks
|
|
620
|
-
* Recognition
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
* condition all stay outside the type.
|
|
586
|
+
* Recognition requires the native `Error` base, a non-base prototype, an own global brand holding
|
|
587
|
+
* the error itself, a declared party and condition, and context members of their declared types.
|
|
588
|
+
* The brand carries recognition across duplicate installations and module formats. A subclass may
|
|
589
|
+
* replace `name`. A transparent proxy, a plain `Error`, a property-only lookalike, and an error with
|
|
590
|
+
* invalid members stay outside the type.
|
|
626
591
|
*
|
|
627
592
|
* @param value - The value to inspect
|
|
628
593
|
* @returns True if the value is a `ProbeError` instance; false otherwise
|
|
@@ -667,11 +632,24 @@ export declare const isProject: Guard<Project>;
|
|
|
667
632
|
*/
|
|
668
633
|
export declare const isStage: Guard<Stage>;
|
|
669
634
|
|
|
635
|
+
/**
|
|
636
|
+
* Checks whether a value carries one stage's outcome.
|
|
637
|
+
*
|
|
638
|
+
* @param value - The value to check
|
|
639
|
+
* @returns True if the value is a stage result; false otherwise
|
|
640
|
+
*
|
|
641
|
+
* @example
|
|
642
|
+
* ```ts
|
|
643
|
+
* isStageResult({ stage: 'lint', elapsed: 17, issues: [] }) // true
|
|
644
|
+
* ```
|
|
645
|
+
*/
|
|
646
|
+
export declare const isStageResult: Guard<StageResult>;
|
|
647
|
+
|
|
670
648
|
/**
|
|
671
649
|
* Carries one message a stage reported, where it reported it, and whose fault it names.
|
|
672
650
|
*
|
|
673
651
|
* @remarks
|
|
674
|
-
* The stage is not repeated here. An issue always arrives inside the `
|
|
652
|
+
* The stage is not repeated here. An issue always arrives inside the `StageResult` that names its
|
|
675
653
|
* stage, so a second copy could only drift from the first.
|
|
676
654
|
*
|
|
677
655
|
* A `claimant` issue is a tool's diagnostic about a candidate draft, and nothing else. Every
|
|
@@ -738,9 +716,9 @@ export declare const isToolchain: Guard<Toolchain>;
|
|
|
738
716
|
* Checks whether a value carries a complete verdict.
|
|
739
717
|
*
|
|
740
718
|
* @remarks
|
|
741
|
-
* Accepts any
|
|
742
|
-
* a stage that could not start throws before a verdict is built, so a short list can only
|
|
743
|
-
* from a caller that assembled one by hand.
|
|
719
|
+
* Accepts any stage result count, because arity is the coordinator's obligation rather than this
|
|
720
|
+
* guard's: a stage that could not start throws before a verdict is built, so a short list can only
|
|
721
|
+
* arrive from a caller that assembled one by hand.
|
|
744
722
|
*
|
|
745
723
|
* @param value - The value to check
|
|
746
724
|
* @returns True if the value is a verdict; false otherwise
|
|
@@ -1146,7 +1124,7 @@ export declare interface ProbeInterface {
|
|
|
1146
1124
|
*
|
|
1147
1125
|
* @param claim - The case, its control, and the project the candidate drafts in both cases
|
|
1148
1126
|
* are checked against
|
|
1149
|
-
* @returns The verdict, carrying one
|
|
1127
|
+
* @returns The verdict, carrying one stage result per stage for both the case and the control
|
|
1150
1128
|
* @throws When the control repeats the case byte for byte, or when a stage cannot start, so no
|
|
1151
1129
|
* verdict ever reports a stage that did not run
|
|
1152
1130
|
*/
|
|
@@ -1285,6 +1263,27 @@ export declare const RUNTIME_PLUGIN = "orkestrel-runtime-overlay";
|
|
|
1285
1263
|
*/
|
|
1286
1264
|
export declare type Stage = (typeof PROBE_STAGES)[number];
|
|
1287
1265
|
|
|
1266
|
+
/**
|
|
1267
|
+
* Carries one stage's outcome: what it cost and what it reported.
|
|
1268
|
+
*
|
|
1269
|
+
* @remarks
|
|
1270
|
+
* An empty `issues` list is the clean result. There is no separate pass flag, because passing is
|
|
1271
|
+
* exactly the absence of issues and a stored flag could disagree with the list beside it.
|
|
1272
|
+
*
|
|
1273
|
+
* @example
|
|
1274
|
+
* ```ts
|
|
1275
|
+
* const result: StageResult = { stage: 'lint', elapsed: 17, issues: [] }
|
|
1276
|
+
* ```
|
|
1277
|
+
*/
|
|
1278
|
+
export declare interface StageResult {
|
|
1279
|
+
/** Names the stage that produced this outcome. */
|
|
1280
|
+
readonly stage: Stage;
|
|
1281
|
+
/** Holds the milliseconds the stage took. */
|
|
1282
|
+
readonly elapsed: number;
|
|
1283
|
+
/** Holds every message the stage's tool reported, in the tool's own order. */
|
|
1284
|
+
readonly issues: readonly Issue[];
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1288
1287
|
/**
|
|
1289
1288
|
* Names the tool versions a verdict was produced with.
|
|
1290
1289
|
*
|
|
@@ -1342,7 +1341,7 @@ export declare const TYPE_MIRROR = "tmp/type";
|
|
|
1342
1341
|
* the type stage always runs and a claim always names a project, so no verdict exists without
|
|
1343
1342
|
* either value. A verdict returned by `Probe` also carries the control's claimant-authored
|
|
1344
1343
|
* `reason` unchanged. A hand-built verdict may omit it because the receipt helper needs only the
|
|
1345
|
-
* recorded
|
|
1344
|
+
* recorded stage results and declared stage.
|
|
1346
1345
|
*
|
|
1347
1346
|
* `digest` covers these things: the case bytes, the control bytes including this `reason`, and the
|
|
1348
1347
|
* workspace they were read against. The reason is part of the control, so two claims differing only
|
|
@@ -1401,9 +1400,9 @@ export declare interface Verdict {
|
|
|
1401
1400
|
*/
|
|
1402
1401
|
readonly reason?: string;
|
|
1403
1402
|
/** Holds one outcome per stage for the claim's case. */
|
|
1404
|
-
readonly case: readonly
|
|
1403
|
+
readonly case: readonly StageResult[];
|
|
1405
1404
|
/** Holds one outcome per stage for the claim's control. */
|
|
1406
|
-
readonly control: readonly
|
|
1405
|
+
readonly control: readonly StageResult[];
|
|
1407
1406
|
/** Holds the milliseconds the whole call took, including both the case and the control. */
|
|
1408
1407
|
readonly elapsed: number;
|
|
1409
1408
|
/** Holds the proof token, absent when either phase reports an instrument failure. */
|