@riddledc/riddle-proof 0.7.20 → 0.7.22
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/basic-gameplay.cjs +157 -12
- package/dist/basic-gameplay.d.cts +35 -5
- package/dist/basic-gameplay.d.ts +35 -5
- package/dist/basic-gameplay.js +1 -1
- package/dist/{chunk-6H742VFJ.js → chunk-ELZSPOWV.js} +157 -12
- package/dist/{chunk-TPUR67H5.js → chunk-WTHSVHG5.js} +206 -7
- package/dist/cli.cjs +206 -7
- package/dist/cli.js +1 -1
- package/dist/index.cjs +363 -19
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/profile.cjs +206 -7
- package/dist/profile.d.cts +19 -1
- package/dist/profile.d.ts +19 -1
- package/dist/profile.js +1 -1
- package/package.json +1 -1
package/dist/basic-gameplay.cjs
CHANGED
|
@@ -119,11 +119,13 @@ function assessBasicGameplayEvidence(evidence, options = {}) {
|
|
|
119
119
|
}
|
|
120
120
|
const routeResults = (run.results || []).map((route) => augmentRouteAssessmentWithProgressionChecks(
|
|
121
121
|
assessBasicGameplayRoute(route, options),
|
|
122
|
-
route
|
|
122
|
+
route,
|
|
123
|
+
options
|
|
123
124
|
));
|
|
124
125
|
const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
|
|
125
126
|
name: result.name,
|
|
126
127
|
path: result.path,
|
|
128
|
+
assessment_mode: result.assessment_mode,
|
|
127
129
|
failures: result.failures,
|
|
128
130
|
warnings: result.warnings,
|
|
129
131
|
suite_failures: result.suite_failures
|
|
@@ -150,6 +152,8 @@ function assessBasicGameplayRoute(route, options = {}) {
|
|
|
150
152
|
const failOnConsoleError = options.failOnConsoleError ?? false;
|
|
151
153
|
const failures = [];
|
|
152
154
|
const warnings = [];
|
|
155
|
+
const assessmentMode = routeAssessmentMode(route);
|
|
156
|
+
const auditAssessment = isAuditAssessmentRoute(route);
|
|
153
157
|
const initial = route.initial || {};
|
|
154
158
|
const timed = route.timed || {};
|
|
155
159
|
const afterAction = route.after_action || route.afterAction || {};
|
|
@@ -161,7 +165,9 @@ function assessBasicGameplayRoute(route, options = {}) {
|
|
|
161
165
|
const continuedActionChange = changed(afterAction, afterContinue);
|
|
162
166
|
const cleanupBase = route.after_continue || route.afterContinue ? afterContinue : afterAction;
|
|
163
167
|
const cleanupActionChange = changed(cleanupBase, afterCleanup);
|
|
164
|
-
const
|
|
168
|
+
const interactiveSurfaceVisible = numberValue(initial.visible_canvas_count) > 0 || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_large_node_count) >= minSurfaceLargeNodes;
|
|
169
|
+
const auditSurfaceVisible = numberValue(initial.body_text_length) >= minBodyTextLength || numberValue(initial.visible_large_node_count) >= minVisibleLargeNodes || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_canvas_count) > 0;
|
|
170
|
+
const surfaceVisible = auditAssessment ? auditSurfaceVisible : interactiveSurfaceVisible;
|
|
165
171
|
const actionResults = listValue(route.action_results || route.actionResults);
|
|
166
172
|
const continuedActionResults = listValue(route.continued_action_results || route.continuedActionResults);
|
|
167
173
|
const continuedCleanupActionResults = listValue(route.continued_cleanup_action_results || route.continuedCleanupActionResults);
|
|
@@ -175,7 +181,7 @@ function assessBasicGameplayRoute(route, options = {}) {
|
|
|
175
181
|
const responseStatus = firstNumber(route.http_status, route.response_status, route.status);
|
|
176
182
|
const pageErrorCount = numberValue(route.page_error_count);
|
|
177
183
|
const consoleErrorCount = numberValue(route.console_error_count);
|
|
178
|
-
const mobileOverflowPx =
|
|
184
|
+
const mobileOverflowPx = horizontalBoundsOverflowPx(mobile);
|
|
179
185
|
if (responseStatus !== null && responseStatus >= 400) failures.push("route_http_error");
|
|
180
186
|
if (pageErrorCount > 0) failures.push("fatal_page_error");
|
|
181
187
|
if (numberValue(initial.body_text_length) < minBodyTextLength && numberValue(initial.visible_large_node_count) < minVisibleLargeNodes) {
|
|
@@ -183,20 +189,21 @@ function assessBasicGameplayRoute(route, options = {}) {
|
|
|
183
189
|
}
|
|
184
190
|
if (!surfaceVisible) failures.push("no_game_surface");
|
|
185
191
|
if (mobileOverflowPx > maxMobileOverflowPx) failures.push("mobile_horizontal_overflow");
|
|
186
|
-
if (!actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
|
|
187
|
-
if (actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
|
|
192
|
+
if (!auditAssessment && !actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
|
|
193
|
+
if (!auditAssessment && actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
|
|
188
194
|
if (failOnConsoleError && consoleErrorCount > 0) failures.push("fatal_page_error");
|
|
189
195
|
if (numberValue(initial.visible_canvas_count) > 0 && actionAttempted && !timedChange.canvas_changed && !actionChange.canvas_changed && !actionChange.screenshot_changed) {
|
|
190
196
|
warnings.push("canvas_inert");
|
|
191
197
|
}
|
|
192
198
|
if (actionFailed) warnings.push("some_actions_failed");
|
|
193
|
-
if (warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
|
|
199
|
+
if (!auditAssessment && warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
|
|
194
200
|
warnings.push("missing_reset_path");
|
|
195
201
|
}
|
|
196
202
|
if (warnOnConsoleError && consoleErrorCount > 0) warnings.push("critical_console_error");
|
|
197
203
|
return {
|
|
198
204
|
name: route.name,
|
|
199
205
|
path: route.path,
|
|
206
|
+
assessment_mode: assessmentMode,
|
|
200
207
|
ok: failures.length === 0,
|
|
201
208
|
failures,
|
|
202
209
|
warnings,
|
|
@@ -317,15 +324,16 @@ function assessBasicGameplayProgressionCheck(check) {
|
|
|
317
324
|
function assessBasicGameplayProgressionChecks(route) {
|
|
318
325
|
return progressionChecksForRoute(route).map((check) => assessBasicGameplayProgressionCheck(check));
|
|
319
326
|
}
|
|
320
|
-
function augmentBasicGameplayAssessmentWithProgressionChecks(assessment, evidence) {
|
|
327
|
+
function augmentBasicGameplayAssessmentWithProgressionChecks(assessment, evidence, options = {}) {
|
|
321
328
|
const run = extractBasicGameplayEvidence(evidence);
|
|
322
329
|
if (!run?.results?.length) return assessment;
|
|
323
330
|
const routeResults = assessment.route_results.map(
|
|
324
|
-
(result, index) => augmentRouteAssessmentWithProgressionChecks(result, run.results?.[index] || {})
|
|
331
|
+
(result, index) => augmentRouteAssessmentWithProgressionChecks(result, run.results?.[index] || {}, options)
|
|
325
332
|
);
|
|
326
333
|
const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
|
|
327
334
|
name: result.name,
|
|
328
335
|
path: result.path,
|
|
336
|
+
assessment_mode: result.assessment_mode,
|
|
329
337
|
failures: result.failures,
|
|
330
338
|
warnings: result.warnings,
|
|
331
339
|
suite_failures: result.suite_failures
|
|
@@ -382,7 +390,7 @@ function attachBasicGameplayArtifactScreenshotHashes(evidence, routesOrOptions =
|
|
|
382
390
|
}
|
|
383
391
|
return evidence;
|
|
384
392
|
}
|
|
385
|
-
function createBasicGameplayCatchRecords(assessment, evidence) {
|
|
393
|
+
function createBasicGameplayCatchRecords(assessment, evidence, options = {}) {
|
|
386
394
|
const run = extractBasicGameplayEvidence(evidence);
|
|
387
395
|
if (!run?.results?.length) return [];
|
|
388
396
|
const catches = [];
|
|
@@ -456,6 +464,24 @@ function createBasicGameplayCatchRecords(assessment, evidence) {
|
|
|
456
464
|
summary: `${route.name || route.path || "Route"}: responsive setup failed on ${failure.viewport?.label || "viewport"} (${failure.reason || "responsive_setup_failed"})`
|
|
457
465
|
});
|
|
458
466
|
}
|
|
467
|
+
for (const failure of responsiveBoundsFailures(route, options.maxMobileOverflowPx ?? 4)) {
|
|
468
|
+
catches.push({
|
|
469
|
+
site: run.site || null,
|
|
470
|
+
route: route.name,
|
|
471
|
+
path: route.path,
|
|
472
|
+
code: failure.code,
|
|
473
|
+
label: failure.label,
|
|
474
|
+
type: "responsive_bounds",
|
|
475
|
+
selector: null,
|
|
476
|
+
reason: failure.reason || "responsive_bounds_clipped",
|
|
477
|
+
phase: failure.viewport?.phase || void 0,
|
|
478
|
+
viewport: failure.viewport,
|
|
479
|
+
overflow_px: failure.overflow_px,
|
|
480
|
+
max_allowed_px: failure.max_allowed_px,
|
|
481
|
+
offenders: failure.offenders,
|
|
482
|
+
summary: `${route.name || route.path || "Route"}: responsive bounds exceeded ${failure.max_allowed_px}px on ${failure.viewport?.label || "viewport"} (${failure.overflow_px}px)`
|
|
483
|
+
});
|
|
484
|
+
}
|
|
459
485
|
for (const check of assessBasicGameplayProgressionChecks(route).filter((item) => item.ok === false)) {
|
|
460
486
|
catches.push({
|
|
461
487
|
site: run.site || null,
|
|
@@ -610,13 +636,15 @@ function changed(before, after) {
|
|
|
610
636
|
function canvasHashes(canvases) {
|
|
611
637
|
return (canvases || []).map((canvas) => canvas.hash).filter(Boolean).join("|");
|
|
612
638
|
}
|
|
613
|
-
function augmentRouteAssessmentWithProgressionChecks(result, route) {
|
|
639
|
+
function augmentRouteAssessmentWithProgressionChecks(result, route, options = {}) {
|
|
614
640
|
const progressionFailures = assessBasicGameplayProgressionChecks(route).filter((check) => check.ok === false);
|
|
615
641
|
const responsiveFailures = responsiveSetupFailures(route);
|
|
616
|
-
|
|
642
|
+
const responsiveBounds = responsiveBoundsFailures(route, options.maxMobileOverflowPx ?? 4);
|
|
643
|
+
if (!progressionFailures.length && !responsiveFailures.length && !responsiveBounds.length) return result;
|
|
617
644
|
const failures = new Set(result.failures);
|
|
618
645
|
if (progressionFailures.length) failures.add("progression_assertion_failed");
|
|
619
646
|
for (const failure of responsiveFailures) failures.add(failure.code);
|
|
647
|
+
for (const failure of responsiveBounds) failures.add(failure.code);
|
|
620
648
|
return {
|
|
621
649
|
...result,
|
|
622
650
|
ok: false,
|
|
@@ -632,7 +660,8 @@ function augmentRouteAssessmentWithProgressionChecks(result, route) {
|
|
|
632
660
|
state_call: check.state_call || null,
|
|
633
661
|
property_path: check.property_path || null
|
|
634
662
|
})),
|
|
635
|
-
...responsiveFailures
|
|
663
|
+
...responsiveFailures,
|
|
664
|
+
...responsiveBounds
|
|
636
665
|
]
|
|
637
666
|
};
|
|
638
667
|
}
|
|
@@ -658,6 +687,28 @@ function responsiveSetupFailures(route) {
|
|
|
658
687
|
}
|
|
659
688
|
return failures;
|
|
660
689
|
}
|
|
690
|
+
function responsiveBoundsFailures(route, maxOverflowPx) {
|
|
691
|
+
const failures = [];
|
|
692
|
+
for (const viewport of responsiveViewportsForRoute(route)) {
|
|
693
|
+
const overflowPx = horizontalBoundsOverflowPx(viewport);
|
|
694
|
+
if (overflowPx <= maxOverflowPx) continue;
|
|
695
|
+
failures.push({
|
|
696
|
+
code: "responsive_bounds_clipped",
|
|
697
|
+
label: `${viewport.label || "responsive"} horizontal bounds`,
|
|
698
|
+
reason: `horizontal bounds overflow ${overflowPx}px exceeded ${maxOverflowPx}px`,
|
|
699
|
+
overflow_px: overflowPx,
|
|
700
|
+
max_allowed_px: maxOverflowPx,
|
|
701
|
+
offenders: boundsOffendersForEvidence(viewport).slice(0, 10),
|
|
702
|
+
viewport: {
|
|
703
|
+
label: viewport.label || null,
|
|
704
|
+
width: numberValue(viewport.width) || null,
|
|
705
|
+
height: numberValue(viewport.height) || null,
|
|
706
|
+
phase: viewport.phase || null
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
return failures;
|
|
711
|
+
}
|
|
661
712
|
function responsiveViewportsForRoute(route) {
|
|
662
713
|
return listValue(route.responsive_viewports || route.responsiveViewports).filter((item) => Boolean(recordValue(item)));
|
|
663
714
|
}
|
|
@@ -667,6 +718,82 @@ function progressionChecksForRoute(route) {
|
|
|
667
718
|
function metricValue(value) {
|
|
668
719
|
return recordValue(value);
|
|
669
720
|
}
|
|
721
|
+
function horizontalBoundsOverflowPx(value) {
|
|
722
|
+
const record = recordValue(value);
|
|
723
|
+
if (!record) return 0;
|
|
724
|
+
let max = maxPositiveNumber(
|
|
725
|
+
record.overflow_px,
|
|
726
|
+
record.overflow,
|
|
727
|
+
record.bounds_overflow_px,
|
|
728
|
+
record.horizontal_overflow_px,
|
|
729
|
+
record.left_overflow_px,
|
|
730
|
+
record.right_overflow_px
|
|
731
|
+
);
|
|
732
|
+
for (const offender of boundsOffendersForEvidence(record)) {
|
|
733
|
+
max = Math.max(max, horizontalOffenderOverflowPx(offender));
|
|
734
|
+
}
|
|
735
|
+
return roundPixels(max);
|
|
736
|
+
}
|
|
737
|
+
function horizontalOffenderOverflowPx(value) {
|
|
738
|
+
const record = recordValue(value);
|
|
739
|
+
if (!record) return 0;
|
|
740
|
+
let max = maxPositiveNumber(
|
|
741
|
+
record.overflow,
|
|
742
|
+
record.overflow_px,
|
|
743
|
+
record.bounds_overflow_px,
|
|
744
|
+
record.horizontal_overflow_px,
|
|
745
|
+
record.left_overflow_px,
|
|
746
|
+
record.right_overflow_px,
|
|
747
|
+
record.leftOverflowPx,
|
|
748
|
+
record.rightOverflowPx
|
|
749
|
+
);
|
|
750
|
+
const clipped = recordValue(record.clipped || record.clip || record.clipping);
|
|
751
|
+
if (clipped) {
|
|
752
|
+
max = Math.max(max, maxPositiveNumber(
|
|
753
|
+
clipped.left,
|
|
754
|
+
clipped.right,
|
|
755
|
+
clipped.left_px,
|
|
756
|
+
clipped.right_px,
|
|
757
|
+
clipped.leftPx,
|
|
758
|
+
clipped.rightPx
|
|
759
|
+
));
|
|
760
|
+
}
|
|
761
|
+
const rect = recordValue(record.rect || record.bounds || record.bounding_rect || record.boundingRect);
|
|
762
|
+
const viewportWidth = numericValue(record.viewport_width ?? record.viewportWidth);
|
|
763
|
+
if (rect && viewportWidth !== null) {
|
|
764
|
+
const left = numericValue(rect.left);
|
|
765
|
+
const right = numericValue(rect.right);
|
|
766
|
+
if (left !== null && left < 0) max = Math.max(max, Math.abs(left));
|
|
767
|
+
if (right !== null && right > viewportWidth) max = Math.max(max, right - viewportWidth);
|
|
768
|
+
}
|
|
769
|
+
return roundPixels(max);
|
|
770
|
+
}
|
|
771
|
+
function boundsOffendersForEvidence(value) {
|
|
772
|
+
const record = recordValue(value);
|
|
773
|
+
if (!record) return [];
|
|
774
|
+
const offenders = [
|
|
775
|
+
...listValue(record.overflow_offenders),
|
|
776
|
+
...listValue(record.overflowOffenders),
|
|
777
|
+
...listValue(record.bounds_offenders),
|
|
778
|
+
...listValue(record.boundsOffenders),
|
|
779
|
+
...listValue(record.clipped_elements),
|
|
780
|
+
...listValue(record.clippedElements),
|
|
781
|
+
...listValue(record.clipping_offenders),
|
|
782
|
+
...listValue(record.clippingOffenders)
|
|
783
|
+
];
|
|
784
|
+
return offenders.filter((item) => Boolean(recordValue(item))).sort((a, b) => horizontalOffenderOverflowPx(b) - horizontalOffenderOverflowPx(a));
|
|
785
|
+
}
|
|
786
|
+
function maxPositiveNumber(...values) {
|
|
787
|
+
let max = 0;
|
|
788
|
+
for (const value of values) {
|
|
789
|
+
const number = numericValue(value);
|
|
790
|
+
if (number !== null && number > max) max = number;
|
|
791
|
+
}
|
|
792
|
+
return max;
|
|
793
|
+
}
|
|
794
|
+
function roundPixels(value) {
|
|
795
|
+
return Math.round(value * 100) / 100;
|
|
796
|
+
}
|
|
670
797
|
function textMatches(text, pattern, flags) {
|
|
671
798
|
if (!pattern) return Boolean(text);
|
|
672
799
|
try {
|
|
@@ -760,6 +887,24 @@ function countCodes(codes) {
|
|
|
760
887
|
for (const code of codes) counts[code] = (counts[code] || 0) + 1;
|
|
761
888
|
return counts;
|
|
762
889
|
}
|
|
890
|
+
function routeAssessmentMode(route) {
|
|
891
|
+
const raw = route.assessment_mode ?? route.assessmentMode ?? route.proof_mode ?? route.proofMode ?? null;
|
|
892
|
+
if (raw === null || raw === void 0) return route.audit === true ? "audit" : null;
|
|
893
|
+
const mode = String(raw).trim().toLowerCase().replace(/_/g, "-");
|
|
894
|
+
return mode || (route.audit === true ? "audit" : null);
|
|
895
|
+
}
|
|
896
|
+
function isAuditAssessmentRoute(route) {
|
|
897
|
+
const mode = routeAssessmentMode(route);
|
|
898
|
+
return route.audit === true || [
|
|
899
|
+
"audit",
|
|
900
|
+
"audit-only",
|
|
901
|
+
"no-diff",
|
|
902
|
+
"not-required",
|
|
903
|
+
"profile",
|
|
904
|
+
"report-only",
|
|
905
|
+
"static"
|
|
906
|
+
].includes(String(mode || ""));
|
|
907
|
+
}
|
|
763
908
|
function firstNumber(...values) {
|
|
764
909
|
for (const value of values) {
|
|
765
910
|
const number = numericValue(value);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION = "riddle-proof.basic-gameplay.v1";
|
|
2
2
|
declare const RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION = "riddle-proof.basic-gameplay.assessment.v1";
|
|
3
3
|
declare const RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION = "riddle-proof.basic-gameplay.catch.v1";
|
|
4
|
-
type BasicGameplayFailureCode = "route_http_error" | "fatal_page_error" | "route_blank_or_thin" | "no_game_surface" | "mobile_horizontal_overflow" | "primary_control_missing" | "primary_control_inert" | "progression_assertion_failed" | "responsive_setup_failed";
|
|
4
|
+
type BasicGameplayFailureCode = "route_http_error" | "fatal_page_error" | "route_blank_or_thin" | "no_game_surface" | "mobile_horizontal_overflow" | "responsive_bounds_clipped" | "primary_control_missing" | "primary_control_inert" | "progression_assertion_failed" | "responsive_setup_failed";
|
|
5
5
|
type BasicGameplayWarningCode = "canvas_inert" | "some_actions_failed" | "missing_reset_path" | "critical_console_error";
|
|
6
6
|
interface BasicGameplayCanvasState {
|
|
7
7
|
index?: number;
|
|
@@ -95,13 +95,16 @@ interface BasicGameplayProgressionCheck {
|
|
|
95
95
|
[key: string]: unknown;
|
|
96
96
|
}
|
|
97
97
|
interface BasicGameplaySuiteFailure {
|
|
98
|
-
code: "progression_assertion_failed" | "responsive_setup_failed";
|
|
98
|
+
code: "progression_assertion_failed" | "responsive_setup_failed" | "responsive_bounds_clipped";
|
|
99
99
|
label?: string;
|
|
100
100
|
reason?: string | null;
|
|
101
101
|
selector?: string | null;
|
|
102
102
|
state_path?: string | null;
|
|
103
103
|
state_call?: string | null;
|
|
104
104
|
property_path?: string | null;
|
|
105
|
+
overflow_px?: number | null;
|
|
106
|
+
max_allowed_px?: number | null;
|
|
107
|
+
offenders?: BasicGameplayBoundsOffender[];
|
|
105
108
|
viewport?: {
|
|
106
109
|
label?: string | null;
|
|
107
110
|
width?: number | null;
|
|
@@ -110,22 +113,47 @@ interface BasicGameplaySuiteFailure {
|
|
|
110
113
|
};
|
|
111
114
|
action_result?: BasicGameplayActionResult;
|
|
112
115
|
}
|
|
116
|
+
interface BasicGameplayBoundsOffender {
|
|
117
|
+
selector?: string | null;
|
|
118
|
+
tag?: string | null;
|
|
119
|
+
overflow?: number;
|
|
120
|
+
overflow_px?: number;
|
|
121
|
+
left_overflow_px?: number;
|
|
122
|
+
right_overflow_px?: number;
|
|
123
|
+
bounds_overflow_px?: number;
|
|
124
|
+
clipped?: Record<string, unknown>;
|
|
125
|
+
rect?: Record<string, unknown>;
|
|
126
|
+
bounds?: Record<string, unknown>;
|
|
127
|
+
viewport_width?: number;
|
|
128
|
+
viewportWidth?: number;
|
|
129
|
+
[key: string]: unknown;
|
|
130
|
+
}
|
|
113
131
|
interface BasicGameplayResponsiveViewportEvidence {
|
|
114
132
|
label?: string;
|
|
115
133
|
width?: number;
|
|
116
134
|
height?: number;
|
|
117
135
|
phase?: string;
|
|
136
|
+
overflow_px?: number;
|
|
137
|
+
bounds_overflow_px?: number;
|
|
138
|
+
overflow_offenders?: BasicGameplayBoundsOffender[];
|
|
118
139
|
setup_action_results?: BasicGameplayActionResult[];
|
|
119
140
|
setupActionResults?: BasicGameplayActionResult[];
|
|
120
141
|
[key: string]: unknown;
|
|
121
142
|
}
|
|
122
143
|
interface BasicGameplayMobileEvidence {
|
|
123
144
|
overflow_px?: number;
|
|
145
|
+
bounds_overflow_px?: number;
|
|
146
|
+
overflow_offenders?: BasicGameplayBoundsOffender[];
|
|
124
147
|
[key: string]: unknown;
|
|
125
148
|
}
|
|
126
149
|
interface RiddleProofBasicGameplayRouteEvidence {
|
|
127
150
|
name?: string;
|
|
128
151
|
path?: string;
|
|
152
|
+
assessment_mode?: string | null;
|
|
153
|
+
assessmentMode?: string | null;
|
|
154
|
+
proof_mode?: string | null;
|
|
155
|
+
proofMode?: string | null;
|
|
156
|
+
audit?: boolean;
|
|
129
157
|
http_status?: number | null;
|
|
130
158
|
response_status?: number | null;
|
|
131
159
|
status?: number | null;
|
|
@@ -180,6 +208,7 @@ interface BasicGameplayChangeSummary {
|
|
|
180
208
|
interface RiddleProofBasicGameplayRouteAssessment {
|
|
181
209
|
name?: string;
|
|
182
210
|
path?: string;
|
|
211
|
+
assessment_mode?: string | null;
|
|
183
212
|
ok: boolean;
|
|
184
213
|
failures: BasicGameplayFailureCode[];
|
|
185
214
|
warnings: BasicGameplayWarningCode[];
|
|
@@ -211,6 +240,7 @@ interface RiddleProofBasicGameplayAssessment {
|
|
|
211
240
|
failing_routes: Array<{
|
|
212
241
|
name?: string;
|
|
213
242
|
path?: string;
|
|
243
|
+
assessment_mode?: string | null;
|
|
214
244
|
failures: BasicGameplayFailureCode[];
|
|
215
245
|
warnings: BasicGameplayWarningCode[];
|
|
216
246
|
suite_failures?: BasicGameplaySuiteFailure[];
|
|
@@ -307,11 +337,11 @@ declare function sanitizeBasicGameplayJsonString(value: unknown): string;
|
|
|
307
337
|
declare function compactBasicGameplayText(value: unknown, max?: number): string;
|
|
308
338
|
declare function assessBasicGameplayProgressionCheck(check: BasicGameplayProgressionCheck): BasicGameplayProgressionCheck;
|
|
309
339
|
declare function assessBasicGameplayProgressionChecks(route: RiddleProofBasicGameplayRouteEvidence): BasicGameplayProgressionCheck[];
|
|
310
|
-
declare function augmentBasicGameplayAssessmentWithProgressionChecks(assessment: RiddleProofBasicGameplayAssessment, evidence: unknown): RiddleProofBasicGameplayAssessment;
|
|
340
|
+
declare function augmentBasicGameplayAssessmentWithProgressionChecks(assessment: RiddleProofBasicGameplayAssessment, evidence: unknown, options?: AssessBasicGameplayOptions): RiddleProofBasicGameplayAssessment;
|
|
311
341
|
declare function resolveBasicGameplayProgressionCheckWithArtifactScreenshots(check: BasicGameplayProgressionCheck): BasicGameplayProgressionCheck;
|
|
312
342
|
declare function attachBasicGameplayArtifactScreenshotHashes(evidence: RiddleProofBasicGameplayEvidence, routesOrOptions?: BasicGameplayRouteReference[] | AttachBasicGameplayArtifactOptions, maybeArtifacts?: BasicGameplayProofArtifact[]): RiddleProofBasicGameplayEvidence;
|
|
313
|
-
declare function createBasicGameplayCatchRecords(assessment: RiddleProofBasicGameplayAssessment, evidence: unknown): BasicGameplayCatchRecord[];
|
|
343
|
+
declare function createBasicGameplayCatchRecords(assessment: RiddleProofBasicGameplayAssessment, evidence: unknown, options?: AssessBasicGameplayOptions): BasicGameplayCatchRecord[];
|
|
314
344
|
declare function createBasicGameplayCatchSummary(input: CreateBasicGameplayCatchSummaryInput, options?: AssessBasicGameplayOptions): RiddleProofBasicGameplayCatchSummary;
|
|
315
345
|
declare function extractBasicGameplayEvidence(...sources: unknown[]): RiddleProofBasicGameplayEvidence | null;
|
|
316
346
|
|
|
317
|
-
export { type AssessBasicGameplayOptions, type AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, type BasicGameplayActionResult, type BasicGameplayActionType, type BasicGameplayArtifactResolution, type BasicGameplayAssessmentSummary, type BasicGameplayCanvasState, type BasicGameplayCatchRecord, type BasicGameplayChangeSummary, type BasicGameplayFailureCode, type BasicGameplayFixReference, type BasicGameplayMetric, type BasicGameplayMobileEvidence, type BasicGameplayProgressCheckType, type BasicGameplayProgressionCheck, type BasicGameplayProofArtifact, type BasicGameplayResponsiveViewportEvidence, type BasicGameplayRouteReference, type BasicGameplaySnapshot, type BasicGameplaySuiteFailure, type BasicGameplayWarningCode, type CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, type RiddleProofBasicGameplayAssessment, type RiddleProofBasicGameplayCatchSummary, type RiddleProofBasicGameplayEvidence, type RiddleProofBasicGameplayRouteAssessment, type RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString };
|
|
347
|
+
export { type AssessBasicGameplayOptions, type AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, type BasicGameplayActionResult, type BasicGameplayActionType, type BasicGameplayArtifactResolution, type BasicGameplayAssessmentSummary, type BasicGameplayBoundsOffender, type BasicGameplayCanvasState, type BasicGameplayCatchRecord, type BasicGameplayChangeSummary, type BasicGameplayFailureCode, type BasicGameplayFixReference, type BasicGameplayMetric, type BasicGameplayMobileEvidence, type BasicGameplayProgressCheckType, type BasicGameplayProgressionCheck, type BasicGameplayProofArtifact, type BasicGameplayResponsiveViewportEvidence, type BasicGameplayRouteReference, type BasicGameplaySnapshot, type BasicGameplaySuiteFailure, type BasicGameplayWarningCode, type CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, type RiddleProofBasicGameplayAssessment, type RiddleProofBasicGameplayCatchSummary, type RiddleProofBasicGameplayEvidence, type RiddleProofBasicGameplayRouteAssessment, type RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString };
|
package/dist/basic-gameplay.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION = "riddle-proof.basic-gameplay.v1";
|
|
2
2
|
declare const RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION = "riddle-proof.basic-gameplay.assessment.v1";
|
|
3
3
|
declare const RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION = "riddle-proof.basic-gameplay.catch.v1";
|
|
4
|
-
type BasicGameplayFailureCode = "route_http_error" | "fatal_page_error" | "route_blank_or_thin" | "no_game_surface" | "mobile_horizontal_overflow" | "primary_control_missing" | "primary_control_inert" | "progression_assertion_failed" | "responsive_setup_failed";
|
|
4
|
+
type BasicGameplayFailureCode = "route_http_error" | "fatal_page_error" | "route_blank_or_thin" | "no_game_surface" | "mobile_horizontal_overflow" | "responsive_bounds_clipped" | "primary_control_missing" | "primary_control_inert" | "progression_assertion_failed" | "responsive_setup_failed";
|
|
5
5
|
type BasicGameplayWarningCode = "canvas_inert" | "some_actions_failed" | "missing_reset_path" | "critical_console_error";
|
|
6
6
|
interface BasicGameplayCanvasState {
|
|
7
7
|
index?: number;
|
|
@@ -95,13 +95,16 @@ interface BasicGameplayProgressionCheck {
|
|
|
95
95
|
[key: string]: unknown;
|
|
96
96
|
}
|
|
97
97
|
interface BasicGameplaySuiteFailure {
|
|
98
|
-
code: "progression_assertion_failed" | "responsive_setup_failed";
|
|
98
|
+
code: "progression_assertion_failed" | "responsive_setup_failed" | "responsive_bounds_clipped";
|
|
99
99
|
label?: string;
|
|
100
100
|
reason?: string | null;
|
|
101
101
|
selector?: string | null;
|
|
102
102
|
state_path?: string | null;
|
|
103
103
|
state_call?: string | null;
|
|
104
104
|
property_path?: string | null;
|
|
105
|
+
overflow_px?: number | null;
|
|
106
|
+
max_allowed_px?: number | null;
|
|
107
|
+
offenders?: BasicGameplayBoundsOffender[];
|
|
105
108
|
viewport?: {
|
|
106
109
|
label?: string | null;
|
|
107
110
|
width?: number | null;
|
|
@@ -110,22 +113,47 @@ interface BasicGameplaySuiteFailure {
|
|
|
110
113
|
};
|
|
111
114
|
action_result?: BasicGameplayActionResult;
|
|
112
115
|
}
|
|
116
|
+
interface BasicGameplayBoundsOffender {
|
|
117
|
+
selector?: string | null;
|
|
118
|
+
tag?: string | null;
|
|
119
|
+
overflow?: number;
|
|
120
|
+
overflow_px?: number;
|
|
121
|
+
left_overflow_px?: number;
|
|
122
|
+
right_overflow_px?: number;
|
|
123
|
+
bounds_overflow_px?: number;
|
|
124
|
+
clipped?: Record<string, unknown>;
|
|
125
|
+
rect?: Record<string, unknown>;
|
|
126
|
+
bounds?: Record<string, unknown>;
|
|
127
|
+
viewport_width?: number;
|
|
128
|
+
viewportWidth?: number;
|
|
129
|
+
[key: string]: unknown;
|
|
130
|
+
}
|
|
113
131
|
interface BasicGameplayResponsiveViewportEvidence {
|
|
114
132
|
label?: string;
|
|
115
133
|
width?: number;
|
|
116
134
|
height?: number;
|
|
117
135
|
phase?: string;
|
|
136
|
+
overflow_px?: number;
|
|
137
|
+
bounds_overflow_px?: number;
|
|
138
|
+
overflow_offenders?: BasicGameplayBoundsOffender[];
|
|
118
139
|
setup_action_results?: BasicGameplayActionResult[];
|
|
119
140
|
setupActionResults?: BasicGameplayActionResult[];
|
|
120
141
|
[key: string]: unknown;
|
|
121
142
|
}
|
|
122
143
|
interface BasicGameplayMobileEvidence {
|
|
123
144
|
overflow_px?: number;
|
|
145
|
+
bounds_overflow_px?: number;
|
|
146
|
+
overflow_offenders?: BasicGameplayBoundsOffender[];
|
|
124
147
|
[key: string]: unknown;
|
|
125
148
|
}
|
|
126
149
|
interface RiddleProofBasicGameplayRouteEvidence {
|
|
127
150
|
name?: string;
|
|
128
151
|
path?: string;
|
|
152
|
+
assessment_mode?: string | null;
|
|
153
|
+
assessmentMode?: string | null;
|
|
154
|
+
proof_mode?: string | null;
|
|
155
|
+
proofMode?: string | null;
|
|
156
|
+
audit?: boolean;
|
|
129
157
|
http_status?: number | null;
|
|
130
158
|
response_status?: number | null;
|
|
131
159
|
status?: number | null;
|
|
@@ -180,6 +208,7 @@ interface BasicGameplayChangeSummary {
|
|
|
180
208
|
interface RiddleProofBasicGameplayRouteAssessment {
|
|
181
209
|
name?: string;
|
|
182
210
|
path?: string;
|
|
211
|
+
assessment_mode?: string | null;
|
|
183
212
|
ok: boolean;
|
|
184
213
|
failures: BasicGameplayFailureCode[];
|
|
185
214
|
warnings: BasicGameplayWarningCode[];
|
|
@@ -211,6 +240,7 @@ interface RiddleProofBasicGameplayAssessment {
|
|
|
211
240
|
failing_routes: Array<{
|
|
212
241
|
name?: string;
|
|
213
242
|
path?: string;
|
|
243
|
+
assessment_mode?: string | null;
|
|
214
244
|
failures: BasicGameplayFailureCode[];
|
|
215
245
|
warnings: BasicGameplayWarningCode[];
|
|
216
246
|
suite_failures?: BasicGameplaySuiteFailure[];
|
|
@@ -307,11 +337,11 @@ declare function sanitizeBasicGameplayJsonString(value: unknown): string;
|
|
|
307
337
|
declare function compactBasicGameplayText(value: unknown, max?: number): string;
|
|
308
338
|
declare function assessBasicGameplayProgressionCheck(check: BasicGameplayProgressionCheck): BasicGameplayProgressionCheck;
|
|
309
339
|
declare function assessBasicGameplayProgressionChecks(route: RiddleProofBasicGameplayRouteEvidence): BasicGameplayProgressionCheck[];
|
|
310
|
-
declare function augmentBasicGameplayAssessmentWithProgressionChecks(assessment: RiddleProofBasicGameplayAssessment, evidence: unknown): RiddleProofBasicGameplayAssessment;
|
|
340
|
+
declare function augmentBasicGameplayAssessmentWithProgressionChecks(assessment: RiddleProofBasicGameplayAssessment, evidence: unknown, options?: AssessBasicGameplayOptions): RiddleProofBasicGameplayAssessment;
|
|
311
341
|
declare function resolveBasicGameplayProgressionCheckWithArtifactScreenshots(check: BasicGameplayProgressionCheck): BasicGameplayProgressionCheck;
|
|
312
342
|
declare function attachBasicGameplayArtifactScreenshotHashes(evidence: RiddleProofBasicGameplayEvidence, routesOrOptions?: BasicGameplayRouteReference[] | AttachBasicGameplayArtifactOptions, maybeArtifacts?: BasicGameplayProofArtifact[]): RiddleProofBasicGameplayEvidence;
|
|
313
|
-
declare function createBasicGameplayCatchRecords(assessment: RiddleProofBasicGameplayAssessment, evidence: unknown): BasicGameplayCatchRecord[];
|
|
343
|
+
declare function createBasicGameplayCatchRecords(assessment: RiddleProofBasicGameplayAssessment, evidence: unknown, options?: AssessBasicGameplayOptions): BasicGameplayCatchRecord[];
|
|
314
344
|
declare function createBasicGameplayCatchSummary(input: CreateBasicGameplayCatchSummaryInput, options?: AssessBasicGameplayOptions): RiddleProofBasicGameplayCatchSummary;
|
|
315
345
|
declare function extractBasicGameplayEvidence(...sources: unknown[]): RiddleProofBasicGameplayEvidence | null;
|
|
316
346
|
|
|
317
|
-
export { type AssessBasicGameplayOptions, type AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, type BasicGameplayActionResult, type BasicGameplayActionType, type BasicGameplayArtifactResolution, type BasicGameplayAssessmentSummary, type BasicGameplayCanvasState, type BasicGameplayCatchRecord, type BasicGameplayChangeSummary, type BasicGameplayFailureCode, type BasicGameplayFixReference, type BasicGameplayMetric, type BasicGameplayMobileEvidence, type BasicGameplayProgressCheckType, type BasicGameplayProgressionCheck, type BasicGameplayProofArtifact, type BasicGameplayResponsiveViewportEvidence, type BasicGameplayRouteReference, type BasicGameplaySnapshot, type BasicGameplaySuiteFailure, type BasicGameplayWarningCode, type CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, type RiddleProofBasicGameplayAssessment, type RiddleProofBasicGameplayCatchSummary, type RiddleProofBasicGameplayEvidence, type RiddleProofBasicGameplayRouteAssessment, type RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString };
|
|
347
|
+
export { type AssessBasicGameplayOptions, type AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, type BasicGameplayActionResult, type BasicGameplayActionType, type BasicGameplayArtifactResolution, type BasicGameplayAssessmentSummary, type BasicGameplayBoundsOffender, type BasicGameplayCanvasState, type BasicGameplayCatchRecord, type BasicGameplayChangeSummary, type BasicGameplayFailureCode, type BasicGameplayFixReference, type BasicGameplayMetric, type BasicGameplayMobileEvidence, type BasicGameplayProgressCheckType, type BasicGameplayProgressionCheck, type BasicGameplayProofArtifact, type BasicGameplayResponsiveViewportEvidence, type BasicGameplayRouteReference, type BasicGameplaySnapshot, type BasicGameplaySuiteFailure, type BasicGameplayWarningCode, type CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, type RiddleProofBasicGameplayAssessment, type RiddleProofBasicGameplayCatchSummary, type RiddleProofBasicGameplayEvidence, type RiddleProofBasicGameplayRouteAssessment, type RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString };
|
package/dist/basic-gameplay.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
extractBasicGameplayEvidence,
|
|
17
17
|
resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
|
|
18
18
|
sanitizeBasicGameplayJsonString
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ELZSPOWV.js";
|
|
20
20
|
export {
|
|
21
21
|
BASIC_GAMEPLAY_ACTION_TYPES,
|
|
22
22
|
BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES,
|