@crvouga/atlas 1.12.0 → 1.14.0
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/CHANGELOG.md +13 -1
- package/dist/critics/src/contract.d.ts +113 -0
- package/dist/critics/src/contract.js +48 -0
- package/dist/critics/src/credentials.d.ts +72 -0
- package/dist/critics/src/credentials.js +136 -0
- package/dist/critics/src/critique.d.ts +128 -0
- package/dist/critics/src/critique.js +163 -0
- package/dist/critics/src/index.d.ts +21 -0
- package/dist/critics/src/index.js +21 -0
- package/dist/critics/src/judging.d.ts +153 -0
- package/dist/critics/src/judging.js +145 -0
- package/dist/critics/src/publish.d.ts +23 -0
- package/dist/critics/src/publish.js +21 -0
- package/dist/critics/src/runner.d.ts +104 -0
- package/dist/critics/src/runner.js +202 -0
- package/dist/critics/src/scope.d.ts +8 -0
- package/dist/critics/src/scope.js +26 -0
- package/dist/playwright/src/index.d.ts +4 -0
- package/dist/playwright/src/index.js +4 -0
- package/dist/playwright/src/ui-catalog.d.ts +51 -0
- package/dist/playwright/src/ui-catalog.js +44 -0
- package/dist/reports/src/compose.d.ts +2 -2
- package/dist/reports/src/compose.js +6 -5
- package/dist/reports/src/evidence-types.d.ts +3 -0
- package/dist/reports/src/evidence-view.d.ts +2 -1
- package/dist/reports/src/evidence-view.js +5 -2
- package/dist/reports/src/layer-merge.d.ts +16 -4
- package/dist/reports/src/layer-merge.js +23 -5
- package/dist/reports/src/report-index.js +9 -5
- package/dist/reports/src/report-status.d.ts +1 -1
- package/dist/reports/src/report-status.js +6 -4
- package/dist/reports/src/ui-catalog-publish.d.ts +92 -0
- package/dist/reports/src/ui-catalog-publish.js +68 -0
- package/dist/reports/src/ui-catalog.d.ts +229 -0
- package/dist/reports/src/ui-catalog.js +273 -0
- package/dist/reports/src/ui-state.d.ts +70 -0
- package/dist/reports/src/ui-state.js +66 -0
- package/dist/schema/src/api.d.ts +351 -0
- package/dist/schema/src/api.js +72 -1
- package/dist/schema/src/critique.d.ts +144 -0
- package/dist/schema/src/critique.js +96 -0
- package/dist/schema/src/index.d.ts +2 -1
- package/dist/schema/src/index.js +2 -1
- package/dist/schema/src/server-config.d.ts +7 -1
- package/dist/schema/src/server-config.js +6 -3
- package/dist/server/src/app.js +15 -0
- package/dist/server/src/auth.d.ts +1 -1
- package/dist/server/src/auth.js +2 -2
- package/dist/server/src/config.js +2 -2
- package/dist/server/src/openapi.d.ts +3 -3
- package/dist/server/src/openapi.js +29 -6
- package/dist/server/src/store-api.js +39 -1
- package/docs/agents.md +1 -0
- package/docs/critics.md +190 -0
- package/docs/extending.md +1 -0
- package/docs/reference/critics.md +840 -0
- package/docs/reference/http-api.md +52 -2
- package/docs/reference/playwright.md +63 -0
- package/docs/reference/reports.md +608 -8
- package/docs/reference/schema.md +152 -2
- package/docs/reference/server.md +3 -3
- package/docs/report-contract.md +6 -2
- package/docs/rich-evidence.md +5 -0
- package/docs/server.md +8 -4
- package/docs/ui-catalog.md +173 -0
- package/docs/ui.md +15 -0
- package/llms-full.txt +457 -8
- package/llms.txt +3 -0
- package/package.json +8 -2
- package/packages/critics/README.md +18 -0
- package/packages/schema/schemas/critique.schema.json +254 -0
- package/packages/schema/schemas/effective-delta.schema.json +73 -0
- package/packages/schema/schemas/effective-evidence.schema.json +73 -0
- package/packages/schema/schemas/layer-rows.schema.json +73 -0
- package/packages/schema/schemas/server-config.schema.json +2 -1
- package/packages/schema/schemas/server-info.schema.json +1 -0
- package/packages/server/openapi.json +1443 -80
- package/packages/visualizer/src/app/AppShell.tsx +36 -30
- package/packages/visualizer/src/app/router.tsx +10 -1
- package/packages/visualizer/src/catalog/UiCatalogFilters.tsx +65 -0
- package/packages/visualizer/src/catalog/UiCatalogPage.tsx +342 -0
- package/packages/visualizer/src/catalog/provider.tsx +25 -0
- package/packages/visualizer/src/catalog/search.ts +68 -0
- package/packages/visualizer/src/catalog/words.ts +26 -0
- package/packages/visualizer/src/components/Header.tsx +17 -4
package/dist/schema/src/api.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export declare const ServerInfoSchema: z.ZodObject<{
|
|
|
55
55
|
version: z.ZodNullable<z.ZodString>;
|
|
56
56
|
role: z.ZodEnum<{
|
|
57
57
|
read: "read";
|
|
58
|
+
critic: "critic";
|
|
58
59
|
publish: "publish";
|
|
59
60
|
admin: "admin";
|
|
60
61
|
}>;
|
|
@@ -324,6 +325,26 @@ export declare const LayerRowSchema: z.ZodObject<{
|
|
|
324
325
|
}, z.core.$loose>>;
|
|
325
326
|
}, z.core.$loose>>>;
|
|
326
327
|
}, z.core.$loose>>;
|
|
328
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
329
|
+
route: z.ZodOptional<z.ZodString>;
|
|
330
|
+
fixture: z.ZodOptional<z.ZodString>;
|
|
331
|
+
cohort: z.ZodOptional<z.ZodString>;
|
|
332
|
+
area: z.ZodOptional<z.ZodString>;
|
|
333
|
+
flags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
334
|
+
covers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
335
|
+
inventory: z.ZodOptional<z.ZodBoolean>;
|
|
336
|
+
screenshot: z.ZodOptional<z.ZodObject<{
|
|
337
|
+
name: z.ZodString;
|
|
338
|
+
bundleKey: z.ZodOptional<z.ZodString>;
|
|
339
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
340
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
341
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
342
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
345
|
+
omitted: z.ZodOptional<z.ZodString>;
|
|
346
|
+
}, z.core.$loose>>;
|
|
347
|
+
}, z.core.$loose>>;
|
|
327
348
|
recording: z.ZodOptional<z.ZodObject<{
|
|
328
349
|
state: z.ZodString;
|
|
329
350
|
reason: z.ZodOptional<z.ZodString>;
|
|
@@ -409,6 +430,26 @@ export declare const LayerRowsSchema: z.ZodObject<{
|
|
|
409
430
|
}, z.core.$loose>>;
|
|
410
431
|
}, z.core.$loose>>>;
|
|
411
432
|
}, z.core.$loose>>;
|
|
433
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
434
|
+
route: z.ZodOptional<z.ZodString>;
|
|
435
|
+
fixture: z.ZodOptional<z.ZodString>;
|
|
436
|
+
cohort: z.ZodOptional<z.ZodString>;
|
|
437
|
+
area: z.ZodOptional<z.ZodString>;
|
|
438
|
+
flags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
439
|
+
covers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
440
|
+
inventory: z.ZodOptional<z.ZodBoolean>;
|
|
441
|
+
screenshot: z.ZodOptional<z.ZodObject<{
|
|
442
|
+
name: z.ZodString;
|
|
443
|
+
bundleKey: z.ZodOptional<z.ZodString>;
|
|
444
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
445
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
446
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
447
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
448
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
449
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
450
|
+
omitted: z.ZodOptional<z.ZodString>;
|
|
451
|
+
}, z.core.$loose>>;
|
|
452
|
+
}, z.core.$loose>>;
|
|
412
453
|
recording: z.ZodOptional<z.ZodObject<{
|
|
413
454
|
state: z.ZodString;
|
|
414
455
|
reason: z.ZodOptional<z.ZodString>;
|
|
@@ -496,6 +537,26 @@ export declare const LayerEvidenceSchema: z.ZodObject<{
|
|
|
496
537
|
}, z.core.$loose>>;
|
|
497
538
|
}, z.core.$loose>>>;
|
|
498
539
|
}, z.core.$loose>>;
|
|
540
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
541
|
+
route: z.ZodOptional<z.ZodString>;
|
|
542
|
+
fixture: z.ZodOptional<z.ZodString>;
|
|
543
|
+
cohort: z.ZodOptional<z.ZodString>;
|
|
544
|
+
area: z.ZodOptional<z.ZodString>;
|
|
545
|
+
flags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
546
|
+
covers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
547
|
+
inventory: z.ZodOptional<z.ZodBoolean>;
|
|
548
|
+
screenshot: z.ZodOptional<z.ZodObject<{
|
|
549
|
+
name: z.ZodString;
|
|
550
|
+
bundleKey: z.ZodOptional<z.ZodString>;
|
|
551
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
552
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
553
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
554
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
555
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
556
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
557
|
+
omitted: z.ZodOptional<z.ZodString>;
|
|
558
|
+
}, z.core.$loose>>;
|
|
559
|
+
}, z.core.$loose>>;
|
|
499
560
|
recording: z.ZodOptional<z.ZodObject<{
|
|
500
561
|
state: z.ZodString;
|
|
501
562
|
reason: z.ZodOptional<z.ZodString>;
|
|
@@ -673,6 +734,26 @@ export declare const EffectiveEvidenceSchema: z.ZodObject<{
|
|
|
673
734
|
}, z.core.$loose>>;
|
|
674
735
|
}, z.core.$loose>>>;
|
|
675
736
|
}, z.core.$loose>>;
|
|
737
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
738
|
+
route: z.ZodOptional<z.ZodString>;
|
|
739
|
+
fixture: z.ZodOptional<z.ZodString>;
|
|
740
|
+
cohort: z.ZodOptional<z.ZodString>;
|
|
741
|
+
area: z.ZodOptional<z.ZodString>;
|
|
742
|
+
flags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
743
|
+
covers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
744
|
+
inventory: z.ZodOptional<z.ZodBoolean>;
|
|
745
|
+
screenshot: z.ZodOptional<z.ZodObject<{
|
|
746
|
+
name: z.ZodString;
|
|
747
|
+
bundleKey: z.ZodOptional<z.ZodString>;
|
|
748
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
749
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
750
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
751
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
752
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
753
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
754
|
+
omitted: z.ZodOptional<z.ZodString>;
|
|
755
|
+
}, z.core.$loose>>;
|
|
756
|
+
}, z.core.$loose>>;
|
|
676
757
|
recording: z.ZodOptional<z.ZodObject<{
|
|
677
758
|
state: z.ZodString;
|
|
678
759
|
reason: z.ZodOptional<z.ZodString>;
|
|
@@ -871,6 +952,26 @@ export declare const EffectiveDeltaSchema: z.ZodObject<{
|
|
|
871
952
|
}, z.core.$loose>>;
|
|
872
953
|
}, z.core.$loose>>>;
|
|
873
954
|
}, z.core.$loose>>;
|
|
955
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
956
|
+
route: z.ZodOptional<z.ZodString>;
|
|
957
|
+
fixture: z.ZodOptional<z.ZodString>;
|
|
958
|
+
cohort: z.ZodOptional<z.ZodString>;
|
|
959
|
+
area: z.ZodOptional<z.ZodString>;
|
|
960
|
+
flags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
961
|
+
covers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
962
|
+
inventory: z.ZodOptional<z.ZodBoolean>;
|
|
963
|
+
screenshot: z.ZodOptional<z.ZodObject<{
|
|
964
|
+
name: z.ZodString;
|
|
965
|
+
bundleKey: z.ZodOptional<z.ZodString>;
|
|
966
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
967
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
968
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
969
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
970
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
971
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
972
|
+
omitted: z.ZodOptional<z.ZodString>;
|
|
973
|
+
}, z.core.$loose>>;
|
|
974
|
+
}, z.core.$loose>>;
|
|
874
975
|
recording: z.ZodOptional<z.ZodObject<{
|
|
875
976
|
state: z.ZodString;
|
|
876
977
|
reason: z.ZodOptional<z.ZodString>;
|
|
@@ -3539,3 +3640,253 @@ export declare const RunDetailSchema: z.ZodObject<{
|
|
|
3539
3640
|
}, z.core.$loose>>;
|
|
3540
3641
|
}, z.core.$loose>>>;
|
|
3541
3642
|
}, z.core.$loose>;
|
|
3643
|
+
/** A state's profile: the client and the choices it was captured under. */
|
|
3644
|
+
export declare const UiProfileSchema: z.ZodObject<{
|
|
3645
|
+
key: z.ZodString;
|
|
3646
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
3647
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3648
|
+
label: z.ZodString;
|
|
3649
|
+
}, z.core.$loose>;
|
|
3650
|
+
/** The picture of a capture. */
|
|
3651
|
+
export declare const UiImageSchema: z.ZodObject<{
|
|
3652
|
+
name: z.ZodString;
|
|
3653
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
3654
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
3655
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
3656
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
3657
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
3658
|
+
bundleKey: z.ZodOptional<z.ZodString>;
|
|
3659
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
3660
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3661
|
+
omitted: z.ZodOptional<z.ZodString>;
|
|
3662
|
+
}, z.core.$loose>;
|
|
3663
|
+
/** One state in one profile. */
|
|
3664
|
+
export declare const UiCellSchema: z.ZodObject<{
|
|
3665
|
+
profile: z.ZodObject<{
|
|
3666
|
+
key: z.ZodString;
|
|
3667
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
3668
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3669
|
+
label: z.ZodString;
|
|
3670
|
+
}, z.core.$loose>;
|
|
3671
|
+
coverage: z.ZodEnum<{
|
|
3672
|
+
failed: "failed";
|
|
3673
|
+
skipped: "skipped";
|
|
3674
|
+
missing: "missing";
|
|
3675
|
+
captured: "captured";
|
|
3676
|
+
capturing: "capturing";
|
|
3677
|
+
}>;
|
|
3678
|
+
expected: z.ZodEnum<{
|
|
3679
|
+
unknown: "unknown";
|
|
3680
|
+
declared: "declared";
|
|
3681
|
+
undeclared: "undeclared";
|
|
3682
|
+
}>;
|
|
3683
|
+
capture: z.ZodNullable<z.ZodObject<{
|
|
3684
|
+
status: z.ZodEnum<{
|
|
3685
|
+
passed: "passed";
|
|
3686
|
+
failed: "failed";
|
|
3687
|
+
running: "running";
|
|
3688
|
+
"not-run": "not-run";
|
|
3689
|
+
}>;
|
|
3690
|
+
detail: z.ZodString;
|
|
3691
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
3692
|
+
image: z.ZodNullable<z.ZodObject<{
|
|
3693
|
+
name: z.ZodString;
|
|
3694
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
3695
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
3696
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
3697
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
3698
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
3699
|
+
bundleKey: z.ZodOptional<z.ZodString>;
|
|
3700
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
3701
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3702
|
+
omitted: z.ZodOptional<z.ZodString>;
|
|
3703
|
+
}, z.core.$loose>>;
|
|
3704
|
+
labels: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3705
|
+
origin: z.ZodObject<{
|
|
3706
|
+
layer: z.ZodString;
|
|
3707
|
+
backend: z.ZodString;
|
|
3708
|
+
producer: z.ZodString;
|
|
3709
|
+
recordedAtMs: z.ZodNumber;
|
|
3710
|
+
sha: z.ZodNullable<z.ZodString>;
|
|
3711
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
3712
|
+
runUrl: z.ZodNullable<z.ZodString>;
|
|
3713
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
3714
|
+
unknown: "unknown";
|
|
3715
|
+
modified: "modified";
|
|
3716
|
+
}>>;
|
|
3717
|
+
}, z.core.$loose>;
|
|
3718
|
+
alternatives: z.ZodNumber;
|
|
3719
|
+
}, z.core.$loose>>;
|
|
3720
|
+
planned: z.ZodNullable<z.ZodObject<{
|
|
3721
|
+
layer: z.ZodString;
|
|
3722
|
+
backend: z.ZodString;
|
|
3723
|
+
}, z.core.$loose>>;
|
|
3724
|
+
}, z.core.$loose>;
|
|
3725
|
+
/**
|
|
3726
|
+
* `GET /api/reports/ui-catalog`: the UI catalog, computed from the winning results of the `ui-state` and `ui-plan` parts
|
|
3727
|
+
* of every layer. States are in id order and cells in profile order, so the same layers always give the same document.
|
|
3728
|
+
*/
|
|
3729
|
+
export declare const UiCatalogSchema: z.ZodObject<{
|
|
3730
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
3731
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3732
|
+
summary: z.ZodObject<{
|
|
3733
|
+
states: z.ZodNumber;
|
|
3734
|
+
profiles: z.ZodNumber;
|
|
3735
|
+
cells: z.ZodNumber;
|
|
3736
|
+
coverage: z.ZodObject<{
|
|
3737
|
+
captured: z.ZodNumber;
|
|
3738
|
+
failed: z.ZodNumber;
|
|
3739
|
+
capturing: z.ZodNumber;
|
|
3740
|
+
skipped: z.ZodNumber;
|
|
3741
|
+
missing: z.ZodNumber;
|
|
3742
|
+
}, z.core.$loose>;
|
|
3743
|
+
undeclared: z.ZodNumber;
|
|
3744
|
+
planned: z.ZodBoolean;
|
|
3745
|
+
surfaces: z.ZodNumber;
|
|
3746
|
+
uncoveredSurfaces: z.ZodNumber;
|
|
3747
|
+
}, z.core.$loose>;
|
|
3748
|
+
profiles: z.ZodArray<z.ZodObject<{
|
|
3749
|
+
key: z.ZodString;
|
|
3750
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
3751
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3752
|
+
label: z.ZodString;
|
|
3753
|
+
}, z.core.$loose>>;
|
|
3754
|
+
states: z.ZodArray<z.ZodObject<{
|
|
3755
|
+
id: z.ZodString;
|
|
3756
|
+
title: z.ZodString;
|
|
3757
|
+
route: z.ZodNullable<z.ZodString>;
|
|
3758
|
+
fixture: z.ZodNullable<z.ZodString>;
|
|
3759
|
+
cohort: z.ZodNullable<z.ZodString>;
|
|
3760
|
+
area: z.ZodNullable<z.ZodString>;
|
|
3761
|
+
flags: z.ZodArray<z.ZodString>;
|
|
3762
|
+
covers: z.ZodArray<z.ZodString>;
|
|
3763
|
+
producers: z.ZodArray<z.ZodString>;
|
|
3764
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
3765
|
+
profile: z.ZodObject<{
|
|
3766
|
+
key: z.ZodString;
|
|
3767
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
3768
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3769
|
+
label: z.ZodString;
|
|
3770
|
+
}, z.core.$loose>;
|
|
3771
|
+
coverage: z.ZodEnum<{
|
|
3772
|
+
failed: "failed";
|
|
3773
|
+
skipped: "skipped";
|
|
3774
|
+
missing: "missing";
|
|
3775
|
+
captured: "captured";
|
|
3776
|
+
capturing: "capturing";
|
|
3777
|
+
}>;
|
|
3778
|
+
expected: z.ZodEnum<{
|
|
3779
|
+
unknown: "unknown";
|
|
3780
|
+
declared: "declared";
|
|
3781
|
+
undeclared: "undeclared";
|
|
3782
|
+
}>;
|
|
3783
|
+
capture: z.ZodNullable<z.ZodObject<{
|
|
3784
|
+
status: z.ZodEnum<{
|
|
3785
|
+
passed: "passed";
|
|
3786
|
+
failed: "failed";
|
|
3787
|
+
running: "running";
|
|
3788
|
+
"not-run": "not-run";
|
|
3789
|
+
}>;
|
|
3790
|
+
detail: z.ZodString;
|
|
3791
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
3792
|
+
image: z.ZodNullable<z.ZodObject<{
|
|
3793
|
+
name: z.ZodString;
|
|
3794
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
3795
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
3796
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
3797
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
3798
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
3799
|
+
bundleKey: z.ZodOptional<z.ZodString>;
|
|
3800
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
3801
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3802
|
+
omitted: z.ZodOptional<z.ZodString>;
|
|
3803
|
+
}, z.core.$loose>>;
|
|
3804
|
+
labels: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3805
|
+
origin: z.ZodObject<{
|
|
3806
|
+
layer: z.ZodString;
|
|
3807
|
+
backend: z.ZodString;
|
|
3808
|
+
producer: z.ZodString;
|
|
3809
|
+
recordedAtMs: z.ZodNumber;
|
|
3810
|
+
sha: z.ZodNullable<z.ZodString>;
|
|
3811
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
3812
|
+
runUrl: z.ZodNullable<z.ZodString>;
|
|
3813
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
3814
|
+
unknown: "unknown";
|
|
3815
|
+
modified: "modified";
|
|
3816
|
+
}>>;
|
|
3817
|
+
}, z.core.$loose>;
|
|
3818
|
+
alternatives: z.ZodNumber;
|
|
3819
|
+
}, z.core.$loose>>;
|
|
3820
|
+
planned: z.ZodNullable<z.ZodObject<{
|
|
3821
|
+
layer: z.ZodString;
|
|
3822
|
+
backend: z.ZodString;
|
|
3823
|
+
}, z.core.$loose>>;
|
|
3824
|
+
}, z.core.$loose>>;
|
|
3825
|
+
}, z.core.$loose>>;
|
|
3826
|
+
surfaces: z.ZodArray<z.ZodObject<{
|
|
3827
|
+
id: z.ZodString;
|
|
3828
|
+
inventoried: z.ZodBoolean;
|
|
3829
|
+
states: z.ZodNumber;
|
|
3830
|
+
captured: z.ZodNumber;
|
|
3831
|
+
status: z.ZodEnum<{
|
|
3832
|
+
covered: "covered";
|
|
3833
|
+
uncaptured: "uncaptured";
|
|
3834
|
+
uncovered: "uncovered";
|
|
3835
|
+
}>;
|
|
3836
|
+
}, z.core.$loose>>;
|
|
3837
|
+
facets: z.ZodObject<{
|
|
3838
|
+
profiles: z.ZodArray<z.ZodObject<{
|
|
3839
|
+
value: z.ZodString;
|
|
3840
|
+
count: z.ZodNumber;
|
|
3841
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3842
|
+
}, z.core.$loose>>;
|
|
3843
|
+
coverage: z.ZodArray<z.ZodObject<{
|
|
3844
|
+
value: z.ZodString;
|
|
3845
|
+
count: z.ZodNumber;
|
|
3846
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3847
|
+
}, z.core.$loose>>;
|
|
3848
|
+
areas: z.ZodArray<z.ZodObject<{
|
|
3849
|
+
value: z.ZodString;
|
|
3850
|
+
count: z.ZodNumber;
|
|
3851
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3852
|
+
}, z.core.$loose>>;
|
|
3853
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
3854
|
+
value: z.ZodString;
|
|
3855
|
+
count: z.ZodNumber;
|
|
3856
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3857
|
+
}, z.core.$loose>>;
|
|
3858
|
+
cohorts: z.ZodArray<z.ZodObject<{
|
|
3859
|
+
value: z.ZodString;
|
|
3860
|
+
count: z.ZodNumber;
|
|
3861
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3862
|
+
}, z.core.$loose>>;
|
|
3863
|
+
flags: z.ZodArray<z.ZodObject<{
|
|
3864
|
+
value: z.ZodString;
|
|
3865
|
+
count: z.ZodNumber;
|
|
3866
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3867
|
+
}, z.core.$loose>>;
|
|
3868
|
+
surfaces: z.ZodArray<z.ZodObject<{
|
|
3869
|
+
value: z.ZodString;
|
|
3870
|
+
count: z.ZodNumber;
|
|
3871
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3872
|
+
}, z.core.$loose>>;
|
|
3873
|
+
producers: z.ZodArray<z.ZodObject<{
|
|
3874
|
+
value: z.ZodString;
|
|
3875
|
+
count: z.ZodNumber;
|
|
3876
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3877
|
+
}, z.core.$loose>>;
|
|
3878
|
+
}, z.core.$loose>;
|
|
3879
|
+
sources: z.ZodObject<{
|
|
3880
|
+
layers: z.ZodNumber;
|
|
3881
|
+
backends: z.ZodArray<z.ZodObject<{
|
|
3882
|
+
id: z.ZodString;
|
|
3883
|
+
label: z.ZodString;
|
|
3884
|
+
live: z.ZodBoolean;
|
|
3885
|
+
available: z.ZodBoolean;
|
|
3886
|
+
}, z.core.$loose>>;
|
|
3887
|
+
notices: z.ZodArray<z.ZodString>;
|
|
3888
|
+
}, z.core.$loose>;
|
|
3889
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
3890
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
3891
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
3892
|
+
}, z.core.$loose>;
|
package/dist/schema/src/api.js
CHANGED
|
@@ -44,7 +44,7 @@ export const ReadySchema = z.looseObject({
|
|
|
44
44
|
export const ServerInfoSchema = z.looseObject({
|
|
45
45
|
name: z.literal('atlas'),
|
|
46
46
|
version: z.string().nullable().describe('The @crvouga/atlas version the server runs, or null when it does not know'),
|
|
47
|
-
role: z.enum(['read', 'publish', 'admin']).describe('What the token of this request may do. A server with no tokens treats everyone as admin'),
|
|
47
|
+
role: z.enum(['read', 'critic', 'publish', 'admin']).describe('What the token of this request may do. A server with no tokens treats everyone as admin'),
|
|
48
48
|
open: z.boolean().describe('True when the server has no tokens at all'),
|
|
49
49
|
write: z.string().describe('The id of the backend uploads go to'),
|
|
50
50
|
ready: z.boolean(),
|
|
@@ -130,6 +130,16 @@ export const LayerRowSchema = z.looseObject({
|
|
|
130
130
|
variant: z.record(z.string(), z.string()),
|
|
131
131
|
durationMs: z.number().nullable(),
|
|
132
132
|
evidence: EvidenceSummarySchema.optional(),
|
|
133
|
+
state: z.looseObject({
|
|
134
|
+
route: z.string().optional(), fixture: z.string().optional(), cohort: z.string().optional(), area: z.string().optional(),
|
|
135
|
+
flags: z.array(z.string()).optional(), covers: z.array(z.string()).optional(),
|
|
136
|
+
inventory: z.boolean().optional().describe('A `ui-plan` entry that names a surface of the product\'s inventory, not a state'),
|
|
137
|
+
screenshot: z.looseObject({
|
|
138
|
+
name: z.string(), bundleKey: z.string().optional(), uri: z.string().optional(), contentType: z.string().optional(),
|
|
139
|
+
width: z.number().optional(), height: z.number().optional(), bytes: z.number().optional(), sha256: z.string().optional(),
|
|
140
|
+
omitted: z.string().optional().describe('Why the producer left the bytes out')
|
|
141
|
+
}).optional().describe('The check\'s picture: its `screenshot` attachment, else its first image')
|
|
142
|
+
}).optional().describe('Only for a check of a `ui-state` or `ui-plan` part: its picture and the facts its producer declared under the `atlas.ui-state` extension. See the UI catalog guide. Never decides a result'),
|
|
133
143
|
recording: z.looseObject({ state: z.string(), reason: z.string().optional() }).optional().describe('What became of the check\'s expected recording: uploaded, referenced, skipped, unresolved or not-applicable. Independent of `status`')
|
|
134
144
|
});
|
|
135
145
|
/** A layer with its checks: the rows of one layer, read apart from its header. */
|
|
@@ -671,3 +681,64 @@ export const RunDetailSchema = z.looseObject({
|
|
|
671
681
|
videos: VideoCountsSchema.optional()
|
|
672
682
|
})).optional().describe('Every layer of the run, oldest first. Absent from an older server')
|
|
673
683
|
});
|
|
684
|
+
/** A state's profile: the client and the choices it was captured under. */
|
|
685
|
+
export const UiProfileSchema = z.looseObject({
|
|
686
|
+
key: z.string().describe('Identifies the profile across layers: the environment and the sorted parameters'),
|
|
687
|
+
environment: z.string().nullable(), parameters: z.record(z.string(), z.string()),
|
|
688
|
+
label: z.string().describe('For a person: the client and each parameter\'s value')
|
|
689
|
+
});
|
|
690
|
+
/** The picture of a capture. */
|
|
691
|
+
export const UiImageSchema = z.looseObject({
|
|
692
|
+
name: z.string(), contentType: z.string().optional(), width: z.number().optional(), height: z.number().optional(), bytes: z.number().optional(), sha256: z.string().optional(),
|
|
693
|
+
bundleKey: z.string().optional(), uri: z.string().optional().describe('An http(s) address, when the picture lives elsewhere'),
|
|
694
|
+
path: z.string().optional().describe('Where the stored bytes are, relative to the reports API root (`/api/reports` on a server): `/layers/<layer>/blobs/attachments/<sha256>`'),
|
|
695
|
+
omitted: z.string().optional().describe('Why the producer left the bytes out. A picture that is left out is not a picture that was never taken')
|
|
696
|
+
});
|
|
697
|
+
/** One state in one profile. */
|
|
698
|
+
export const UiCellSchema = z.looseObject({
|
|
699
|
+
profile: UiProfileSchema,
|
|
700
|
+
coverage: z.enum(['captured', 'failed', 'capturing', 'skipped', 'missing']).describe('`captured` only when the winning capture passed. Every other value means there is no picture to trust'),
|
|
701
|
+
expected: z.enum(['declared', 'undeclared', 'unknown']).describe('`declared`: a plan expects it. `undeclared`: plans exist and none names it. `unknown`: no plan was published, so nothing is known to be unexpected'),
|
|
702
|
+
capture: z.looseObject({
|
|
703
|
+
status: EvidenceStatusSchema, detail: z.string(), durationMs: z.number().nullable(), image: UiImageSchema.nullable(),
|
|
704
|
+
labels: z.record(z.string(), z.string()).describe('What describes the capture without splitting it: a `shard`, a `browser`'),
|
|
705
|
+
origin: z.looseObject({
|
|
706
|
+
layer: z.string(), backend: z.string(), producer: z.string(), recordedAtMs: z.number(), sha: z.string().nullable(), branch: z.string().nullable(), runUrl: z.string().nullable(),
|
|
707
|
+
freshness: z.enum(['unknown', 'modified']).optional()
|
|
708
|
+
}),
|
|
709
|
+
alternatives: z.number().int().nonnegative().describe('Other captures of this cell from other producers; the winner is the one the report contract picks')
|
|
710
|
+
}).nullable(),
|
|
711
|
+
planned: z.looseObject({ layer: z.string(), backend: z.string() }).nullable().describe('The plan layer that expects this cell')
|
|
712
|
+
});
|
|
713
|
+
const UiFacetSchema = z.array(z.looseObject({ value: z.string(), count: z.number().int().nonnegative(), label: z.string().optional() }));
|
|
714
|
+
/**
|
|
715
|
+
* `GET /api/reports/ui-catalog`: the UI catalog, computed from the winning results of the `ui-state` and `ui-plan` parts
|
|
716
|
+
* of every layer. States are in id order and cells in profile order, so the same layers always give the same document.
|
|
717
|
+
*/
|
|
718
|
+
export const UiCatalogSchema = z.looseObject({
|
|
719
|
+
schemaVersion: z.literal(1),
|
|
720
|
+
version: z.string().optional().describe('The report version this was computed from; equal exactly when the report is'),
|
|
721
|
+
summary: z.looseObject({
|
|
722
|
+
states: z.number().int().nonnegative(), profiles: z.number().int().nonnegative(), cells: z.number().int().nonnegative(),
|
|
723
|
+
coverage: z.looseObject({ captured: z.number(), failed: z.number(), capturing: z.number(), skipped: z.number(), missing: z.number() }),
|
|
724
|
+
undeclared: z.number().int().nonnegative().describe('Cells captured or failed that no plan expects. Zero when no plan was published'),
|
|
725
|
+
planned: z.boolean().describe('Whether any plan was published. Without one `missing` is always zero: what should exist is unknown'),
|
|
726
|
+
surfaces: z.number().int().nonnegative(), uncoveredSurfaces: z.number().int().nonnegative()
|
|
727
|
+
}),
|
|
728
|
+
profiles: z.array(UiProfileSchema),
|
|
729
|
+
states: z.array(z.looseObject({
|
|
730
|
+
id: z.string(), title: z.string(),
|
|
731
|
+
route: z.string().nullable(), fixture: z.string().nullable(), cohort: z.string().nullable(), area: z.string().nullable(),
|
|
732
|
+
flags: z.array(z.string()), covers: z.array(z.string()).describe('The surfaces it covers'), producers: z.array(z.string()),
|
|
733
|
+
cells: z.array(UiCellSchema)
|
|
734
|
+
})),
|
|
735
|
+
surfaces: z.array(z.looseObject({
|
|
736
|
+
id: z.string(), inventoried: z.boolean().describe('A `ui-plan` inventory entry names it: the product is known to have it'),
|
|
737
|
+
states: z.number().int().nonnegative(), captured: z.number().int().nonnegative(),
|
|
738
|
+
status: z.enum(['covered', 'uncaptured', 'uncovered'])
|
|
739
|
+
})),
|
|
740
|
+
facets: z.looseObject({ profiles: UiFacetSchema, coverage: UiFacetSchema, areas: UiFacetSchema, routes: UiFacetSchema, cohorts: UiFacetSchema, flags: UiFacetSchema, surfaces: UiFacetSchema, producers: UiFacetSchema }),
|
|
741
|
+
sources: z.looseObject({ layers: z.number().int().nonnegative(), backends: z.array(BackendInfoSchema), notices: z.array(z.string()) }).describe('What was read. A backend that is unavailable, or a layer that could not be read, is named here; what depended on it is not shown as captured'),
|
|
742
|
+
total: z.number().int().nonnegative().optional().describe('States that matched, before `offset` and `limit`'),
|
|
743
|
+
offset: z.number().int().nonnegative().optional(), limit: z.number().int().nonnegative().optional()
|
|
744
|
+
});
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module The `atlas.critique` evidence schema
|
|
3
|
+
*
|
|
4
|
+
* What an automated reviewer (a critic) says about one captured UI. It is not a new layer format: a critique is a
|
|
5
|
+
* check inside a part of kind `critique`, and the opinion rides in the check's `extensions["atlas.critique"]`, so by the
|
|
6
|
+
* rules of docs/extending.md it can never decide a result. The check's `status` says only whether the critic ran
|
|
7
|
+
* (`passed` a verdict was produced, `failed` the critic could not produce one, `running`, `not-run`).
|
|
8
|
+
*
|
|
9
|
+
* Everything except `schema`, `subject` and `critic` is optional, so a single score (a model-based critic) and rich
|
|
10
|
+
* findings (an LLM critic) are one shape. Every object is open, and `kind`, `category`, `severity`, `label` and `reason`
|
|
11
|
+
* are open strings: a value nobody has heard of is kept and shown generically, never rejected. A reader that cannot read
|
|
12
|
+
* the whole extension drops it and keeps the check and its status (`readCritique` in `@crvouga/atlas/critics`).
|
|
13
|
+
*
|
|
14
|
+
* @see docs/critics.md
|
|
15
|
+
* @see docs/extending.md
|
|
16
|
+
*/
|
|
17
|
+
import { z } from 'zod/v4';
|
|
18
|
+
/** The key under which a critique is stored in a check's `extensions`. */
|
|
19
|
+
export declare const CRITIQUE_EXTENSION = "atlas.critique";
|
|
20
|
+
/** The version of the `atlas.critique` extension a reader of this release understands. A critique of another version is unknown, not wrong. */
|
|
21
|
+
export declare const CRITIQUE_SCHEMA_VERSION = 1;
|
|
22
|
+
/** The `kind` of the report part that holds critiques. Parts of this kind are opinions: never counted, never part of the gate. */
|
|
23
|
+
export declare const CRITIQUE_PART_KIND = "critique";
|
|
24
|
+
/** The prefix of the `producer` of a layer of critiques: `critic.<critic name>`. */
|
|
25
|
+
export declare const CRITIC_PRODUCER_PREFIX = "critic.";
|
|
26
|
+
/** The region of the image a finding is about, in the stated unit (`px` of the stored image, or `normalized` 0..1). */
|
|
27
|
+
export declare const CritiqueRegionSchema: z.ZodObject<{
|
|
28
|
+
unit: z.ZodString;
|
|
29
|
+
x: z.ZodNumber;
|
|
30
|
+
y: z.ZodNumber;
|
|
31
|
+
w: z.ZodNumber;
|
|
32
|
+
h: z.ZodNumber;
|
|
33
|
+
}, z.core.$loose>;
|
|
34
|
+
/** One thing a critic found: where, what kind, how bad, why, and what to do. Nothing is required. */
|
|
35
|
+
export declare const CritiqueFindingSchema: z.ZodObject<{
|
|
36
|
+
id: z.ZodOptional<z.ZodString>;
|
|
37
|
+
category: z.ZodOptional<z.ZodString>;
|
|
38
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
39
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
region: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
unit: z.ZodString;
|
|
42
|
+
x: z.ZodNumber;
|
|
43
|
+
y: z.ZodNumber;
|
|
44
|
+
w: z.ZodNumber;
|
|
45
|
+
h: z.ZodNumber;
|
|
46
|
+
}, z.core.$loose>>;
|
|
47
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
48
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$loose>;
|
|
50
|
+
/**
|
|
51
|
+
* How a score reads in context. A raw score is not absolute: a loading overlay is compared with other loading overlays,
|
|
52
|
+
* not with full screens, and a change against the same entry's previous image is more telling than the level.
|
|
53
|
+
*/
|
|
54
|
+
export declare const CritiqueRelativeSchema: z.ZodObject<{
|
|
55
|
+
stateKind: z.ZodString;
|
|
56
|
+
percentile: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
sampleSize: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
previousScore: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
delta: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
}, z.core.$loose>;
|
|
61
|
+
/** The judgement: a score and how to read it, a label, a confidence. A critic that cannot score may give only a label. */
|
|
62
|
+
export declare const CritiqueVerdictSchema: z.ZodObject<{
|
|
63
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
scale: z.ZodOptional<z.ZodString>;
|
|
65
|
+
label: z.ZodOptional<z.ZodString>;
|
|
66
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
relative: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
stateKind: z.ZodString;
|
|
69
|
+
percentile: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
sampleSize: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
previousScore: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
delta: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
}, z.core.$loose>>;
|
|
74
|
+
}, z.core.$loose>;
|
|
75
|
+
/** Why a critic produced no verdict: a reason code in an open vocabulary (`error`, `timeout`, `rate-limited`, `invalid-output`) and a message that holds no credential. */
|
|
76
|
+
export declare const CritiqueFailureSchema: z.ZodObject<{
|
|
77
|
+
reason: z.ZodString;
|
|
78
|
+
message: z.ZodOptional<z.ZodString>;
|
|
79
|
+
}, z.core.$loose>;
|
|
80
|
+
/**
|
|
81
|
+
* The `atlas.critique` extension, version 1: the image judged (`subject`), who judged (`critic`, `model`,
|
|
82
|
+
* `parameters`), the opinion (`verdict`, `findings`) or why there is none (`failure`), and what it cost (`usage`).
|
|
83
|
+
* The prompt is recorded only as a hash (`parameters.rubric`). Emitted as `critique.schema.json`.
|
|
84
|
+
*/
|
|
85
|
+
export declare const CritiqueSchema: z.ZodObject<{
|
|
86
|
+
schema: z.ZodNumber;
|
|
87
|
+
subject: z.ZodObject<{
|
|
88
|
+
entryKey: z.ZodString;
|
|
89
|
+
imageSha256: z.ZodString;
|
|
90
|
+
state: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$loose>;
|
|
92
|
+
critic: z.ZodObject<{
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
version: z.ZodString;
|
|
95
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$loose>;
|
|
97
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$loose>>;
|
|
101
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
102
|
+
verdict: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
scale: z.ZodOptional<z.ZodString>;
|
|
105
|
+
label: z.ZodOptional<z.ZodString>;
|
|
106
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
relative: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
stateKind: z.ZodString;
|
|
109
|
+
percentile: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
sampleSize: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
previousScore: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
delta: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
}, z.core.$loose>>;
|
|
114
|
+
}, z.core.$loose>>;
|
|
115
|
+
findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
116
|
+
id: z.ZodOptional<z.ZodString>;
|
|
117
|
+
category: z.ZodOptional<z.ZodString>;
|
|
118
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
119
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
region: z.ZodOptional<z.ZodObject<{
|
|
121
|
+
unit: z.ZodString;
|
|
122
|
+
x: z.ZodNumber;
|
|
123
|
+
y: z.ZodNumber;
|
|
124
|
+
w: z.ZodNumber;
|
|
125
|
+
h: z.ZodNumber;
|
|
126
|
+
}, z.core.$loose>>;
|
|
127
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
128
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, z.core.$loose>>>;
|
|
130
|
+
failure: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
reason: z.ZodString;
|
|
132
|
+
message: z.ZodOptional<z.ZodString>;
|
|
133
|
+
}, z.core.$loose>>;
|
|
134
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
}, z.core.$loose>>;
|
|
140
|
+
}, z.core.$loose>;
|
|
141
|
+
/** A critique as stored in a check's `extensions["atlas.critique"]`. */
|
|
142
|
+
export type Critique = z.output<typeof CritiqueSchema>;
|
|
143
|
+
/** One finding of a critique. */
|
|
144
|
+
export type CritiqueFinding = z.output<typeof CritiqueFindingSchema>;
|