@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/index.cjs
CHANGED
|
@@ -7889,11 +7889,13 @@ function assessBasicGameplayEvidence(evidence, options = {}) {
|
|
|
7889
7889
|
}
|
|
7890
7890
|
const routeResults = (run.results || []).map((route) => augmentRouteAssessmentWithProgressionChecks(
|
|
7891
7891
|
assessBasicGameplayRoute(route, options),
|
|
7892
|
-
route
|
|
7892
|
+
route,
|
|
7893
|
+
options
|
|
7893
7894
|
));
|
|
7894
7895
|
const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
|
|
7895
7896
|
name: result.name,
|
|
7896
7897
|
path: result.path,
|
|
7898
|
+
assessment_mode: result.assessment_mode,
|
|
7897
7899
|
failures: result.failures,
|
|
7898
7900
|
warnings: result.warnings,
|
|
7899
7901
|
suite_failures: result.suite_failures
|
|
@@ -7920,6 +7922,8 @@ function assessBasicGameplayRoute(route, options = {}) {
|
|
|
7920
7922
|
const failOnConsoleError = options.failOnConsoleError ?? false;
|
|
7921
7923
|
const failures = [];
|
|
7922
7924
|
const warnings = [];
|
|
7925
|
+
const assessmentMode = routeAssessmentMode(route);
|
|
7926
|
+
const auditAssessment = isAuditAssessmentRoute(route);
|
|
7923
7927
|
const initial = route.initial || {};
|
|
7924
7928
|
const timed = route.timed || {};
|
|
7925
7929
|
const afterAction = route.after_action || route.afterAction || {};
|
|
@@ -7931,7 +7935,9 @@ function assessBasicGameplayRoute(route, options = {}) {
|
|
|
7931
7935
|
const continuedActionChange = changed(afterAction, afterContinue);
|
|
7932
7936
|
const cleanupBase = route.after_continue || route.afterContinue ? afterContinue : afterAction;
|
|
7933
7937
|
const cleanupActionChange = changed(cleanupBase, afterCleanup);
|
|
7934
|
-
const
|
|
7938
|
+
const interactiveSurfaceVisible = numberValue2(initial.visible_canvas_count) > 0 || numberValue2(initial.enabled_clickable_count) > 0 || numberValue2(initial.visible_large_node_count) >= minSurfaceLargeNodes;
|
|
7939
|
+
const auditSurfaceVisible = numberValue2(initial.body_text_length) >= minBodyTextLength || numberValue2(initial.visible_large_node_count) >= minVisibleLargeNodes || numberValue2(initial.enabled_clickable_count) > 0 || numberValue2(initial.visible_canvas_count) > 0;
|
|
7940
|
+
const surfaceVisible = auditAssessment ? auditSurfaceVisible : interactiveSurfaceVisible;
|
|
7935
7941
|
const actionResults = listValue2(route.action_results || route.actionResults);
|
|
7936
7942
|
const continuedActionResults = listValue2(route.continued_action_results || route.continuedActionResults);
|
|
7937
7943
|
const continuedCleanupActionResults = listValue2(route.continued_cleanup_action_results || route.continuedCleanupActionResults);
|
|
@@ -7945,7 +7951,7 @@ function assessBasicGameplayRoute(route, options = {}) {
|
|
|
7945
7951
|
const responseStatus = firstNumber(route.http_status, route.response_status, route.status);
|
|
7946
7952
|
const pageErrorCount = numberValue2(route.page_error_count);
|
|
7947
7953
|
const consoleErrorCount = numberValue2(route.console_error_count);
|
|
7948
|
-
const mobileOverflowPx =
|
|
7954
|
+
const mobileOverflowPx = horizontalBoundsOverflowPx(mobile);
|
|
7949
7955
|
if (responseStatus !== null && responseStatus >= 400) failures.push("route_http_error");
|
|
7950
7956
|
if (pageErrorCount > 0) failures.push("fatal_page_error");
|
|
7951
7957
|
if (numberValue2(initial.body_text_length) < minBodyTextLength && numberValue2(initial.visible_large_node_count) < minVisibleLargeNodes) {
|
|
@@ -7953,20 +7959,21 @@ function assessBasicGameplayRoute(route, options = {}) {
|
|
|
7953
7959
|
}
|
|
7954
7960
|
if (!surfaceVisible) failures.push("no_game_surface");
|
|
7955
7961
|
if (mobileOverflowPx > maxMobileOverflowPx) failures.push("mobile_horizontal_overflow");
|
|
7956
|
-
if (!actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
|
|
7957
|
-
if (actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
|
|
7962
|
+
if (!auditAssessment && !actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
|
|
7963
|
+
if (!auditAssessment && actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
|
|
7958
7964
|
if (failOnConsoleError && consoleErrorCount > 0) failures.push("fatal_page_error");
|
|
7959
7965
|
if (numberValue2(initial.visible_canvas_count) > 0 && actionAttempted && !timedChange.canvas_changed && !actionChange.canvas_changed && !actionChange.screenshot_changed) {
|
|
7960
7966
|
warnings.push("canvas_inert");
|
|
7961
7967
|
}
|
|
7962
7968
|
if (actionFailed) warnings.push("some_actions_failed");
|
|
7963
|
-
if (warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
|
|
7969
|
+
if (!auditAssessment && warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
|
|
7964
7970
|
warnings.push("missing_reset_path");
|
|
7965
7971
|
}
|
|
7966
7972
|
if (warnOnConsoleError && consoleErrorCount > 0) warnings.push("critical_console_error");
|
|
7967
7973
|
return {
|
|
7968
7974
|
name: route.name,
|
|
7969
7975
|
path: route.path,
|
|
7976
|
+
assessment_mode: assessmentMode,
|
|
7970
7977
|
ok: failures.length === 0,
|
|
7971
7978
|
failures,
|
|
7972
7979
|
warnings,
|
|
@@ -8087,15 +8094,16 @@ function assessBasicGameplayProgressionCheck(check) {
|
|
|
8087
8094
|
function assessBasicGameplayProgressionChecks(route) {
|
|
8088
8095
|
return progressionChecksForRoute(route).map((check) => assessBasicGameplayProgressionCheck(check));
|
|
8089
8096
|
}
|
|
8090
|
-
function augmentBasicGameplayAssessmentWithProgressionChecks(assessment, evidence) {
|
|
8097
|
+
function augmentBasicGameplayAssessmentWithProgressionChecks(assessment, evidence, options = {}) {
|
|
8091
8098
|
const run = extractBasicGameplayEvidence(evidence);
|
|
8092
8099
|
if (!run?.results?.length) return assessment;
|
|
8093
8100
|
const routeResults = assessment.route_results.map(
|
|
8094
|
-
(result, index) => augmentRouteAssessmentWithProgressionChecks(result, run.results?.[index] || {})
|
|
8101
|
+
(result, index) => augmentRouteAssessmentWithProgressionChecks(result, run.results?.[index] || {}, options)
|
|
8095
8102
|
);
|
|
8096
8103
|
const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
|
|
8097
8104
|
name: result.name,
|
|
8098
8105
|
path: result.path,
|
|
8106
|
+
assessment_mode: result.assessment_mode,
|
|
8099
8107
|
failures: result.failures,
|
|
8100
8108
|
warnings: result.warnings,
|
|
8101
8109
|
suite_failures: result.suite_failures
|
|
@@ -8152,7 +8160,7 @@ function attachBasicGameplayArtifactScreenshotHashes(evidence, routesOrOptions =
|
|
|
8152
8160
|
}
|
|
8153
8161
|
return evidence;
|
|
8154
8162
|
}
|
|
8155
|
-
function createBasicGameplayCatchRecords(assessment, evidence) {
|
|
8163
|
+
function createBasicGameplayCatchRecords(assessment, evidence, options = {}) {
|
|
8156
8164
|
const run = extractBasicGameplayEvidence(evidence);
|
|
8157
8165
|
if (!run?.results?.length) return [];
|
|
8158
8166
|
const catches = [];
|
|
@@ -8226,6 +8234,24 @@ function createBasicGameplayCatchRecords(assessment, evidence) {
|
|
|
8226
8234
|
summary: `${route.name || route.path || "Route"}: responsive setup failed on ${failure.viewport?.label || "viewport"} (${failure.reason || "responsive_setup_failed"})`
|
|
8227
8235
|
});
|
|
8228
8236
|
}
|
|
8237
|
+
for (const failure of responsiveBoundsFailures(route, options.maxMobileOverflowPx ?? 4)) {
|
|
8238
|
+
catches.push({
|
|
8239
|
+
site: run.site || null,
|
|
8240
|
+
route: route.name,
|
|
8241
|
+
path: route.path,
|
|
8242
|
+
code: failure.code,
|
|
8243
|
+
label: failure.label,
|
|
8244
|
+
type: "responsive_bounds",
|
|
8245
|
+
selector: null,
|
|
8246
|
+
reason: failure.reason || "responsive_bounds_clipped",
|
|
8247
|
+
phase: failure.viewport?.phase || void 0,
|
|
8248
|
+
viewport: failure.viewport,
|
|
8249
|
+
overflow_px: failure.overflow_px,
|
|
8250
|
+
max_allowed_px: failure.max_allowed_px,
|
|
8251
|
+
offenders: failure.offenders,
|
|
8252
|
+
summary: `${route.name || route.path || "Route"}: responsive bounds exceeded ${failure.max_allowed_px}px on ${failure.viewport?.label || "viewport"} (${failure.overflow_px}px)`
|
|
8253
|
+
});
|
|
8254
|
+
}
|
|
8229
8255
|
for (const check of assessBasicGameplayProgressionChecks(route).filter((item) => item.ok === false)) {
|
|
8230
8256
|
catches.push({
|
|
8231
8257
|
site: run.site || null,
|
|
@@ -8380,13 +8406,15 @@ function changed(before, after) {
|
|
|
8380
8406
|
function canvasHashes(canvases) {
|
|
8381
8407
|
return (canvases || []).map((canvas) => canvas.hash).filter(Boolean).join("|");
|
|
8382
8408
|
}
|
|
8383
|
-
function augmentRouteAssessmentWithProgressionChecks(result, route) {
|
|
8409
|
+
function augmentRouteAssessmentWithProgressionChecks(result, route, options = {}) {
|
|
8384
8410
|
const progressionFailures = assessBasicGameplayProgressionChecks(route).filter((check) => check.ok === false);
|
|
8385
8411
|
const responsiveFailures = responsiveSetupFailures(route);
|
|
8386
|
-
|
|
8412
|
+
const responsiveBounds = responsiveBoundsFailures(route, options.maxMobileOverflowPx ?? 4);
|
|
8413
|
+
if (!progressionFailures.length && !responsiveFailures.length && !responsiveBounds.length) return result;
|
|
8387
8414
|
const failures = new Set(result.failures);
|
|
8388
8415
|
if (progressionFailures.length) failures.add("progression_assertion_failed");
|
|
8389
8416
|
for (const failure of responsiveFailures) failures.add(failure.code);
|
|
8417
|
+
for (const failure of responsiveBounds) failures.add(failure.code);
|
|
8390
8418
|
return {
|
|
8391
8419
|
...result,
|
|
8392
8420
|
ok: false,
|
|
@@ -8402,7 +8430,8 @@ function augmentRouteAssessmentWithProgressionChecks(result, route) {
|
|
|
8402
8430
|
state_call: check.state_call || null,
|
|
8403
8431
|
property_path: check.property_path || null
|
|
8404
8432
|
})),
|
|
8405
|
-
...responsiveFailures
|
|
8433
|
+
...responsiveFailures,
|
|
8434
|
+
...responsiveBounds
|
|
8406
8435
|
]
|
|
8407
8436
|
};
|
|
8408
8437
|
}
|
|
@@ -8428,6 +8457,28 @@ function responsiveSetupFailures(route) {
|
|
|
8428
8457
|
}
|
|
8429
8458
|
return failures;
|
|
8430
8459
|
}
|
|
8460
|
+
function responsiveBoundsFailures(route, maxOverflowPx) {
|
|
8461
|
+
const failures = [];
|
|
8462
|
+
for (const viewport of responsiveViewportsForRoute(route)) {
|
|
8463
|
+
const overflowPx = horizontalBoundsOverflowPx(viewport);
|
|
8464
|
+
if (overflowPx <= maxOverflowPx) continue;
|
|
8465
|
+
failures.push({
|
|
8466
|
+
code: "responsive_bounds_clipped",
|
|
8467
|
+
label: `${viewport.label || "responsive"} horizontal bounds`,
|
|
8468
|
+
reason: `horizontal bounds overflow ${overflowPx}px exceeded ${maxOverflowPx}px`,
|
|
8469
|
+
overflow_px: overflowPx,
|
|
8470
|
+
max_allowed_px: maxOverflowPx,
|
|
8471
|
+
offenders: boundsOffendersForEvidence(viewport).slice(0, 10),
|
|
8472
|
+
viewport: {
|
|
8473
|
+
label: viewport.label || null,
|
|
8474
|
+
width: numberValue2(viewport.width) || null,
|
|
8475
|
+
height: numberValue2(viewport.height) || null,
|
|
8476
|
+
phase: viewport.phase || null
|
|
8477
|
+
}
|
|
8478
|
+
});
|
|
8479
|
+
}
|
|
8480
|
+
return failures;
|
|
8481
|
+
}
|
|
8431
8482
|
function responsiveViewportsForRoute(route) {
|
|
8432
8483
|
return listValue2(route.responsive_viewports || route.responsiveViewports).filter((item) => Boolean(recordValue3(item)));
|
|
8433
8484
|
}
|
|
@@ -8437,6 +8488,82 @@ function progressionChecksForRoute(route) {
|
|
|
8437
8488
|
function metricValue(value) {
|
|
8438
8489
|
return recordValue3(value);
|
|
8439
8490
|
}
|
|
8491
|
+
function horizontalBoundsOverflowPx(value) {
|
|
8492
|
+
const record = recordValue3(value);
|
|
8493
|
+
if (!record) return 0;
|
|
8494
|
+
let max = maxPositiveNumber(
|
|
8495
|
+
record.overflow_px,
|
|
8496
|
+
record.overflow,
|
|
8497
|
+
record.bounds_overflow_px,
|
|
8498
|
+
record.horizontal_overflow_px,
|
|
8499
|
+
record.left_overflow_px,
|
|
8500
|
+
record.right_overflow_px
|
|
8501
|
+
);
|
|
8502
|
+
for (const offender of boundsOffendersForEvidence(record)) {
|
|
8503
|
+
max = Math.max(max, horizontalOffenderOverflowPx(offender));
|
|
8504
|
+
}
|
|
8505
|
+
return roundPixels(max);
|
|
8506
|
+
}
|
|
8507
|
+
function horizontalOffenderOverflowPx(value) {
|
|
8508
|
+
const record = recordValue3(value);
|
|
8509
|
+
if (!record) return 0;
|
|
8510
|
+
let max = maxPositiveNumber(
|
|
8511
|
+
record.overflow,
|
|
8512
|
+
record.overflow_px,
|
|
8513
|
+
record.bounds_overflow_px,
|
|
8514
|
+
record.horizontal_overflow_px,
|
|
8515
|
+
record.left_overflow_px,
|
|
8516
|
+
record.right_overflow_px,
|
|
8517
|
+
record.leftOverflowPx,
|
|
8518
|
+
record.rightOverflowPx
|
|
8519
|
+
);
|
|
8520
|
+
const clipped = recordValue3(record.clipped || record.clip || record.clipping);
|
|
8521
|
+
if (clipped) {
|
|
8522
|
+
max = Math.max(max, maxPositiveNumber(
|
|
8523
|
+
clipped.left,
|
|
8524
|
+
clipped.right,
|
|
8525
|
+
clipped.left_px,
|
|
8526
|
+
clipped.right_px,
|
|
8527
|
+
clipped.leftPx,
|
|
8528
|
+
clipped.rightPx
|
|
8529
|
+
));
|
|
8530
|
+
}
|
|
8531
|
+
const rect = recordValue3(record.rect || record.bounds || record.bounding_rect || record.boundingRect);
|
|
8532
|
+
const viewportWidth = numericValue3(record.viewport_width ?? record.viewportWidth);
|
|
8533
|
+
if (rect && viewportWidth !== null) {
|
|
8534
|
+
const left = numericValue3(rect.left);
|
|
8535
|
+
const right = numericValue3(rect.right);
|
|
8536
|
+
if (left !== null && left < 0) max = Math.max(max, Math.abs(left));
|
|
8537
|
+
if (right !== null && right > viewportWidth) max = Math.max(max, right - viewportWidth);
|
|
8538
|
+
}
|
|
8539
|
+
return roundPixels(max);
|
|
8540
|
+
}
|
|
8541
|
+
function boundsOffendersForEvidence(value) {
|
|
8542
|
+
const record = recordValue3(value);
|
|
8543
|
+
if (!record) return [];
|
|
8544
|
+
const offenders = [
|
|
8545
|
+
...listValue2(record.overflow_offenders),
|
|
8546
|
+
...listValue2(record.overflowOffenders),
|
|
8547
|
+
...listValue2(record.bounds_offenders),
|
|
8548
|
+
...listValue2(record.boundsOffenders),
|
|
8549
|
+
...listValue2(record.clipped_elements),
|
|
8550
|
+
...listValue2(record.clippedElements),
|
|
8551
|
+
...listValue2(record.clipping_offenders),
|
|
8552
|
+
...listValue2(record.clippingOffenders)
|
|
8553
|
+
];
|
|
8554
|
+
return offenders.filter((item) => Boolean(recordValue3(item))).sort((a, b) => horizontalOffenderOverflowPx(b) - horizontalOffenderOverflowPx(a));
|
|
8555
|
+
}
|
|
8556
|
+
function maxPositiveNumber(...values) {
|
|
8557
|
+
let max = 0;
|
|
8558
|
+
for (const value of values) {
|
|
8559
|
+
const number = numericValue3(value);
|
|
8560
|
+
if (number !== null && number > max) max = number;
|
|
8561
|
+
}
|
|
8562
|
+
return max;
|
|
8563
|
+
}
|
|
8564
|
+
function roundPixels(value) {
|
|
8565
|
+
return Math.round(value * 100) / 100;
|
|
8566
|
+
}
|
|
8440
8567
|
function textMatches(text, pattern, flags) {
|
|
8441
8568
|
if (!pattern) return Boolean(text);
|
|
8442
8569
|
try {
|
|
@@ -8530,6 +8657,24 @@ function countCodes(codes) {
|
|
|
8530
8657
|
for (const code of codes) counts[code] = (counts[code] || 0) + 1;
|
|
8531
8658
|
return counts;
|
|
8532
8659
|
}
|
|
8660
|
+
function routeAssessmentMode(route) {
|
|
8661
|
+
const raw = route.assessment_mode ?? route.assessmentMode ?? route.proof_mode ?? route.proofMode ?? null;
|
|
8662
|
+
if (raw === null || raw === void 0) return route.audit === true ? "audit" : null;
|
|
8663
|
+
const mode = String(raw).trim().toLowerCase().replace(/_/g, "-");
|
|
8664
|
+
return mode || (route.audit === true ? "audit" : null);
|
|
8665
|
+
}
|
|
8666
|
+
function isAuditAssessmentRoute(route) {
|
|
8667
|
+
const mode = routeAssessmentMode(route);
|
|
8668
|
+
return route.audit === true || [
|
|
8669
|
+
"audit",
|
|
8670
|
+
"audit-only",
|
|
8671
|
+
"no-diff",
|
|
8672
|
+
"not-required",
|
|
8673
|
+
"profile",
|
|
8674
|
+
"report-only",
|
|
8675
|
+
"static"
|
|
8676
|
+
].includes(String(mode || ""));
|
|
8677
|
+
}
|
|
8533
8678
|
function firstNumber(...values) {
|
|
8534
8679
|
for (const value of values) {
|
|
8535
8680
|
const number = numericValue3(value);
|
|
@@ -8607,6 +8752,79 @@ function stringValue5(value) {
|
|
|
8607
8752
|
function numberValue3(value) {
|
|
8608
8753
|
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
8609
8754
|
}
|
|
8755
|
+
function horizontalBoundsOverflowPx2(value) {
|
|
8756
|
+
if (!isRecord2(value)) return 0;
|
|
8757
|
+
let max = maxPositiveNumber2(
|
|
8758
|
+
value.overflow_px,
|
|
8759
|
+
value.overflow,
|
|
8760
|
+
value.bounds_overflow_px,
|
|
8761
|
+
value.horizontal_overflow_px,
|
|
8762
|
+
value.left_overflow_px,
|
|
8763
|
+
value.right_overflow_px
|
|
8764
|
+
);
|
|
8765
|
+
for (const offender of boundsOffendersForEvidence2(value)) {
|
|
8766
|
+
max = Math.max(max, horizontalOffenderOverflowPx2(offender));
|
|
8767
|
+
}
|
|
8768
|
+
return roundPixels2(max);
|
|
8769
|
+
}
|
|
8770
|
+
function horizontalOffenderOverflowPx2(value) {
|
|
8771
|
+
if (!isRecord2(value)) return 0;
|
|
8772
|
+
let max = maxPositiveNumber2(
|
|
8773
|
+
value.overflow,
|
|
8774
|
+
value.overflow_px,
|
|
8775
|
+
value.bounds_overflow_px,
|
|
8776
|
+
value.horizontal_overflow_px,
|
|
8777
|
+
value.left_overflow_px,
|
|
8778
|
+
value.right_overflow_px,
|
|
8779
|
+
value.leftOverflowPx,
|
|
8780
|
+
value.rightOverflowPx
|
|
8781
|
+
);
|
|
8782
|
+
const clipped = isRecord2(value.clipped || value.clip || value.clipping) ? value.clipped || value.clip || value.clipping : void 0;
|
|
8783
|
+
if (isRecord2(clipped)) {
|
|
8784
|
+
max = Math.max(max, maxPositiveNumber2(
|
|
8785
|
+
clipped.left,
|
|
8786
|
+
clipped.right,
|
|
8787
|
+
clipped.left_px,
|
|
8788
|
+
clipped.right_px,
|
|
8789
|
+
clipped.leftPx,
|
|
8790
|
+
clipped.rightPx
|
|
8791
|
+
));
|
|
8792
|
+
}
|
|
8793
|
+
const rect = isRecord2(value.rect || value.bounds || value.bounding_rect || value.boundingRect) ? value.rect || value.bounds || value.bounding_rect || value.boundingRect : void 0;
|
|
8794
|
+
const viewportWidth = numberValue3(value.viewport_width ?? value.viewportWidth);
|
|
8795
|
+
if (isRecord2(rect) && viewportWidth !== void 0) {
|
|
8796
|
+
const left = numberValue3(rect.left);
|
|
8797
|
+
const right = numberValue3(rect.right);
|
|
8798
|
+
if (left !== void 0 && left < 0) max = Math.max(max, Math.abs(left));
|
|
8799
|
+
if (right !== void 0 && right > viewportWidth) max = Math.max(max, right - viewportWidth);
|
|
8800
|
+
}
|
|
8801
|
+
return roundPixels2(max);
|
|
8802
|
+
}
|
|
8803
|
+
function boundsOffendersForEvidence2(value) {
|
|
8804
|
+
if (!isRecord2(value)) return [];
|
|
8805
|
+
const offenders = [
|
|
8806
|
+
...Array.isArray(value.overflow_offenders) ? value.overflow_offenders : [],
|
|
8807
|
+
...Array.isArray(value.overflowOffenders) ? value.overflowOffenders : [],
|
|
8808
|
+
...Array.isArray(value.bounds_offenders) ? value.bounds_offenders : [],
|
|
8809
|
+
...Array.isArray(value.boundsOffenders) ? value.boundsOffenders : [],
|
|
8810
|
+
...Array.isArray(value.clipped_elements) ? value.clipped_elements : [],
|
|
8811
|
+
...Array.isArray(value.clippedElements) ? value.clippedElements : [],
|
|
8812
|
+
...Array.isArray(value.clipping_offenders) ? value.clipping_offenders : [],
|
|
8813
|
+
...Array.isArray(value.clippingOffenders) ? value.clippingOffenders : []
|
|
8814
|
+
];
|
|
8815
|
+
return offenders.filter((item) => isRecord2(item)).sort((a, b) => horizontalOffenderOverflowPx2(b) - horizontalOffenderOverflowPx2(a));
|
|
8816
|
+
}
|
|
8817
|
+
function maxPositiveNumber2(...values) {
|
|
8818
|
+
let max = 0;
|
|
8819
|
+
for (const value of values) {
|
|
8820
|
+
const number = numberValue3(value);
|
|
8821
|
+
if (number !== void 0 && number > max) max = number;
|
|
8822
|
+
}
|
|
8823
|
+
return max;
|
|
8824
|
+
}
|
|
8825
|
+
function roundPixels2(value) {
|
|
8826
|
+
return Math.round(value * 100) / 100;
|
|
8827
|
+
}
|
|
8610
8828
|
function timeoutSecValue(value) {
|
|
8611
8829
|
const number = numberValue3(value);
|
|
8612
8830
|
return number && number > 0 ? Math.ceil(number) : void 0;
|
|
@@ -8949,7 +9167,7 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
8949
9167
|
message: "No applicable viewport evidence was captured for overflow check."
|
|
8950
9168
|
};
|
|
8951
9169
|
}
|
|
8952
|
-
const failed = applicable.filter((viewport) => (viewport
|
|
9170
|
+
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx2(viewport) > maxOverflow);
|
|
8953
9171
|
return {
|
|
8954
9172
|
type: check.type,
|
|
8955
9173
|
label: checkLabel(check),
|
|
@@ -8957,9 +9175,11 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
8957
9175
|
evidence: {
|
|
8958
9176
|
max_overflow_px: maxOverflow,
|
|
8959
9177
|
overflow_px: applicable.map((viewport) => viewport.overflow_px ?? null),
|
|
9178
|
+
bounds_overflow_px: applicable.map((viewport) => horizontalBoundsOverflowPx2(viewport)),
|
|
9179
|
+
overflow_offender_counts: applicable.map((viewport) => boundsOffendersForEvidence2(viewport).length),
|
|
8960
9180
|
viewports: applicable.map((viewport) => viewport.name)
|
|
8961
9181
|
},
|
|
8962
|
-
message: failed.length ? `Horizontal overflow exceeded ${maxOverflow}px in ${failed.length} viewport(s).` : void 0
|
|
9182
|
+
message: failed.length ? `Horizontal bounds overflow exceeded ${maxOverflow}px in ${failed.length} viewport(s).` : void 0
|
|
8963
9183
|
};
|
|
8964
9184
|
}
|
|
8965
9185
|
if (check.type === "no_fatal_console_errors") {
|
|
@@ -9181,6 +9401,77 @@ function textMatches(sample, check) {
|
|
|
9181
9401
|
}
|
|
9182
9402
|
return String(sample || "").includes(check.text || "");
|
|
9183
9403
|
}
|
|
9404
|
+
function numberValue(value) {
|
|
9405
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
9406
|
+
}
|
|
9407
|
+
function maxPositiveNumber() {
|
|
9408
|
+
let max = 0;
|
|
9409
|
+
for (const value of arguments) {
|
|
9410
|
+
const number = numberValue(value);
|
|
9411
|
+
if (number !== undefined && number > max) max = number;
|
|
9412
|
+
}
|
|
9413
|
+
return max;
|
|
9414
|
+
}
|
|
9415
|
+
function roundPixels(value) {
|
|
9416
|
+
return Math.round(value * 100) / 100;
|
|
9417
|
+
}
|
|
9418
|
+
function isRecord(value) {
|
|
9419
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
9420
|
+
}
|
|
9421
|
+
function boundsOffendersForEvidence(value) {
|
|
9422
|
+
if (!isRecord(value)) return [];
|
|
9423
|
+
const offenders = []
|
|
9424
|
+
.concat(Array.isArray(value.overflow_offenders) ? value.overflow_offenders : [])
|
|
9425
|
+
.concat(Array.isArray(value.overflowOffenders) ? value.overflowOffenders : [])
|
|
9426
|
+
.concat(Array.isArray(value.bounds_offenders) ? value.bounds_offenders : [])
|
|
9427
|
+
.concat(Array.isArray(value.boundsOffenders) ? value.boundsOffenders : [])
|
|
9428
|
+
.concat(Array.isArray(value.clipped_elements) ? value.clipped_elements : [])
|
|
9429
|
+
.concat(Array.isArray(value.clippedElements) ? value.clippedElements : [])
|
|
9430
|
+
.concat(Array.isArray(value.clipping_offenders) ? value.clipping_offenders : [])
|
|
9431
|
+
.concat(Array.isArray(value.clippingOffenders) ? value.clippingOffenders : []);
|
|
9432
|
+
return offenders.filter(isRecord).sort((a, b) => horizontalOffenderOverflowPx(b) - horizontalOffenderOverflowPx(a));
|
|
9433
|
+
}
|
|
9434
|
+
function horizontalOffenderOverflowPx(value) {
|
|
9435
|
+
if (!isRecord(value)) return 0;
|
|
9436
|
+
let max = maxPositiveNumber(
|
|
9437
|
+
value.overflow,
|
|
9438
|
+
value.overflow_px,
|
|
9439
|
+
value.bounds_overflow_px,
|
|
9440
|
+
value.horizontal_overflow_px,
|
|
9441
|
+
value.left_overflow_px,
|
|
9442
|
+
value.right_overflow_px,
|
|
9443
|
+
value.leftOverflowPx,
|
|
9444
|
+
value.rightOverflowPx
|
|
9445
|
+
);
|
|
9446
|
+
const clipped = value.clipped || value.clip || value.clipping;
|
|
9447
|
+
if (isRecord(clipped)) {
|
|
9448
|
+
max = Math.max(max, maxPositiveNumber(clipped.left, clipped.right, clipped.left_px, clipped.right_px, clipped.leftPx, clipped.rightPx));
|
|
9449
|
+
}
|
|
9450
|
+
const rect = value.rect || value.bounds || value.bounding_rect || value.boundingRect;
|
|
9451
|
+
const viewportWidth = numberValue(value.viewport_width != null ? value.viewport_width : value.viewportWidth);
|
|
9452
|
+
if (isRecord(rect) && viewportWidth !== undefined) {
|
|
9453
|
+
const left = numberValue(rect.left);
|
|
9454
|
+
const right = numberValue(rect.right);
|
|
9455
|
+
if (left !== undefined && left < 0) max = Math.max(max, Math.abs(left));
|
|
9456
|
+
if (right !== undefined && right > viewportWidth) max = Math.max(max, right - viewportWidth);
|
|
9457
|
+
}
|
|
9458
|
+
return roundPixels(max);
|
|
9459
|
+
}
|
|
9460
|
+
function horizontalBoundsOverflowPx(value) {
|
|
9461
|
+
if (!isRecord(value)) return 0;
|
|
9462
|
+
let max = maxPositiveNumber(
|
|
9463
|
+
value.overflow_px,
|
|
9464
|
+
value.overflow,
|
|
9465
|
+
value.bounds_overflow_px,
|
|
9466
|
+
value.horizontal_overflow_px,
|
|
9467
|
+
value.left_overflow_px,
|
|
9468
|
+
value.right_overflow_px
|
|
9469
|
+
);
|
|
9470
|
+
for (const offender of boundsOffendersForEvidence(value)) {
|
|
9471
|
+
max = Math.max(max, horizontalOffenderOverflowPx(offender));
|
|
9472
|
+
}
|
|
9473
|
+
return roundPixels(max);
|
|
9474
|
+
}
|
|
9184
9475
|
function assessProfile(profile, evidence) {
|
|
9185
9476
|
const checks = [];
|
|
9186
9477
|
const viewports = evidence.viewports || [];
|
|
@@ -9298,13 +9589,19 @@ function assessProfile(profile, evidence) {
|
|
|
9298
9589
|
});
|
|
9299
9590
|
continue;
|
|
9300
9591
|
}
|
|
9301
|
-
const failed = applicable.filter((viewport) => (viewport
|
|
9592
|
+
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
|
|
9302
9593
|
checks.push({
|
|
9303
9594
|
type: check.type,
|
|
9304
9595
|
label: check.label || check.type,
|
|
9305
9596
|
status: failed.length ? "failed" : "passed",
|
|
9306
|
-
evidence: {
|
|
9307
|
-
|
|
9597
|
+
evidence: {
|
|
9598
|
+
max_overflow_px: maxOverflow,
|
|
9599
|
+
overflow_px: applicable.map((viewport) => viewport.overflow_px ?? null),
|
|
9600
|
+
bounds_overflow_px: applicable.map((viewport) => horizontalBoundsOverflowPx(viewport)),
|
|
9601
|
+
overflow_offender_counts: applicable.map((viewport) => boundsOffendersForEvidence(viewport).length),
|
|
9602
|
+
viewports: applicable.map((viewport) => viewport.name)
|
|
9603
|
+
},
|
|
9604
|
+
message: failed.length ? "Horizontal bounds overflow exceeded " + maxOverflow + "px in " + failed.length + " viewport(s)." : undefined,
|
|
9308
9605
|
});
|
|
9309
9606
|
continue;
|
|
9310
9607
|
}
|
|
@@ -9534,14 +9831,55 @@ async function captureViewport(viewport) {
|
|
|
9534
9831
|
const body = document.body;
|
|
9535
9832
|
const documentElement = document.documentElement;
|
|
9536
9833
|
const text = (body ? body.innerText : "").replace(/\s+/g, " ").trim();
|
|
9834
|
+
const clientWidth = documentElement ? documentElement.clientWidth : window.innerWidth;
|
|
9835
|
+
const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
|
|
9836
|
+
const viewportWidth = clientWidth || window.innerWidth;
|
|
9837
|
+
const overflowOffenders = [];
|
|
9838
|
+
for (const element of Array.from(body ? body.querySelectorAll("*") : [])) {
|
|
9839
|
+
const rect = element.getBoundingClientRect();
|
|
9840
|
+
if (!rect || rect.width < 1 || rect.height < 1) continue;
|
|
9841
|
+
const style = window.getComputedStyle(element);
|
|
9842
|
+
if (style.display === "none" || style.visibility === "hidden" || style.opacity === "0") continue;
|
|
9843
|
+
const leftOverflow = Math.max(0, -rect.left);
|
|
9844
|
+
const rightOverflow = Math.max(0, rect.right - viewportWidth);
|
|
9845
|
+
const overflow = Math.max(leftOverflow, rightOverflow);
|
|
9846
|
+
if (overflow <= 0.5) continue;
|
|
9847
|
+
const tag = element.tagName ? element.tagName.toLowerCase() : "element";
|
|
9848
|
+
const id = element.id ? "#" + element.id : "";
|
|
9849
|
+
const className = typeof element.className === "string"
|
|
9850
|
+
? element.className.trim().split(/\s+/).filter(Boolean).slice(0, 2).join(".")
|
|
9851
|
+
: "";
|
|
9852
|
+
overflowOffenders.push({
|
|
9853
|
+
selector: tag + id + (className ? "." + className : ""),
|
|
9854
|
+
tag,
|
|
9855
|
+
text: (element.textContent || "").replace(/\s+/g, " ").trim().slice(0, 120),
|
|
9856
|
+
overflow,
|
|
9857
|
+
left_overflow_px: leftOverflow,
|
|
9858
|
+
right_overflow_px: rightOverflow,
|
|
9859
|
+
viewport_width: viewportWidth,
|
|
9860
|
+
rect: {
|
|
9861
|
+
left: rect.left,
|
|
9862
|
+
right: rect.right,
|
|
9863
|
+
width: rect.width,
|
|
9864
|
+
},
|
|
9865
|
+
});
|
|
9866
|
+
}
|
|
9867
|
+
overflowOffenders.sort((a, b) => b.overflow - a.overflow);
|
|
9868
|
+
const boundsOverflowPx = Math.max(
|
|
9869
|
+
0,
|
|
9870
|
+
scrollWidth - (clientWidth || viewportWidth),
|
|
9871
|
+
...overflowOffenders.map((offender) => offender.overflow),
|
|
9872
|
+
);
|
|
9537
9873
|
return {
|
|
9538
9874
|
url: location.href,
|
|
9539
9875
|
pathname: location.pathname,
|
|
9540
9876
|
title: document.title,
|
|
9541
9877
|
body_text_length: text.length,
|
|
9542
9878
|
body_text_sample: text.slice(0, 8000),
|
|
9543
|
-
scroll_width:
|
|
9544
|
-
client_width:
|
|
9879
|
+
scroll_width: scrollWidth,
|
|
9880
|
+
client_width: clientWidth,
|
|
9881
|
+
bounds_overflow_px: Math.round(boundsOverflowPx * 100) / 100,
|
|
9882
|
+
overflow_offenders: overflowOffenders.slice(0, 10),
|
|
9545
9883
|
};
|
|
9546
9884
|
}).catch((error) => ({
|
|
9547
9885
|
url: page.url(),
|
|
@@ -9551,6 +9889,8 @@ async function captureViewport(viewport) {
|
|
|
9551
9889
|
body_text_sample: "",
|
|
9552
9890
|
scroll_width: 0,
|
|
9553
9891
|
client_width: viewport.width,
|
|
9892
|
+
bounds_overflow_px: 0,
|
|
9893
|
+
overflow_offenders: [],
|
|
9554
9894
|
evaluation_error: String(error && error.message ? error.message : error).slice(0, 1000),
|
|
9555
9895
|
}));
|
|
9556
9896
|
const selectors = {};
|
|
@@ -9589,6 +9929,8 @@ async function captureViewport(viewport) {
|
|
|
9589
9929
|
scroll_width: dom.scroll_width,
|
|
9590
9930
|
client_width: dom.client_width,
|
|
9591
9931
|
overflow_px: Math.max(0, (dom.scroll_width || 0) - (dom.client_width || viewport.width)),
|
|
9932
|
+
bounds_overflow_px: dom.bounds_overflow_px,
|
|
9933
|
+
overflow_offenders: dom.overflow_offenders || [],
|
|
9592
9934
|
selectors,
|
|
9593
9935
|
text_matches,
|
|
9594
9936
|
setup_action_results: setupActionResults,
|
|
@@ -9620,6 +9962,8 @@ function buildProfileEvidence(currentViewports) {
|
|
|
9620
9962
|
routes: currentViewports.map((viewport) => viewport.route),
|
|
9621
9963
|
titles: currentViewports.map((viewport) => viewport.title),
|
|
9622
9964
|
overflow_px: currentViewports.map((viewport) => viewport.overflow_px),
|
|
9965
|
+
bounds_overflow_px: currentViewports.map((viewport) => viewport.bounds_overflow_px),
|
|
9966
|
+
overflow_offender_counts: currentViewports.map((viewport) => (viewport.overflow_offenders || []).length),
|
|
9623
9967
|
},
|
|
9624
9968
|
};
|
|
9625
9969
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -9,6 +9,6 @@ export { CodexExecAgentConfig, CodexJsonRequest, CodexJsonResult, CodexJsonRunne
|
|
|
9
9
|
export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_DIAGNOSTIC_HISTORY_LIMIT, DEFAULT_DIAGNOSTIC_STRING_LIMIT, RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION, RiddleProofArtifactSummary, RiddleProofCaptureArtifactSummary, RiddleProofCaptureDiagnostic, RiddleProofDiagnosticRedactionOptions, appendCaptureDiagnostic, createCaptureDiagnostic, redactForProofDiagnostics, summarizeCaptureArtifacts } from './diagnostics.cjs';
|
|
10
10
|
export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.cjs';
|
|
11
11
|
export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.cjs';
|
|
12
|
-
export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, BasicGameplayActionResult, BasicGameplayActionType, BasicGameplayArtifactResolution, BasicGameplayAssessmentSummary, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, BasicGameplayResponsiveViewportEvidence, BasicGameplayRouteReference, BasicGameplaySnapshot, BasicGameplaySuiteFailure, BasicGameplayWarningCode, CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, RiddleProofBasicGameplayAssessment, RiddleProofBasicGameplayCatchSummary, RiddleProofBasicGameplayEvidence, RiddleProofBasicGameplayRouteAssessment, RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString } from './basic-gameplay.cjs';
|
|
13
|
-
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
|
|
12
|
+
export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, BasicGameplayActionResult, BasicGameplayActionType, BasicGameplayArtifactResolution, BasicGameplayAssessmentSummary, BasicGameplayBoundsOffender, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, BasicGameplayResponsiveViewportEvidence, BasicGameplayRouteReference, BasicGameplaySnapshot, BasicGameplaySuiteFailure, BasicGameplayWarningCode, CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, RiddleProofBasicGameplayAssessment, RiddleProofBasicGameplayCatchSummary, RiddleProofBasicGameplayEvidence, RiddleProofBasicGameplayRouteAssessment, RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString } from './basic-gameplay.cjs';
|
|
13
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
|
|
14
14
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RiddleApiError, RiddleClientConfig, RiddleFetch, RiddlePollJobResult, RiddlePreviewDeployResult, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, createRiddleApiClient, deployRiddleStaticPreview, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, riddleRequestJson, runRiddleScript, runRiddleServerPreview } from './riddle-client.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export { CodexExecAgentConfig, CodexJsonRequest, CodexJsonResult, CodexJsonRunne
|
|
|
9
9
|
export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_DIAGNOSTIC_HISTORY_LIMIT, DEFAULT_DIAGNOSTIC_STRING_LIMIT, RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION, RiddleProofArtifactSummary, RiddleProofCaptureArtifactSummary, RiddleProofCaptureDiagnostic, RiddleProofDiagnosticRedactionOptions, appendCaptureDiagnostic, createCaptureDiagnostic, redactForProofDiagnostics, summarizeCaptureArtifacts } from './diagnostics.js';
|
|
10
10
|
export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.js';
|
|
11
11
|
export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.js';
|
|
12
|
-
export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, BasicGameplayActionResult, BasicGameplayActionType, BasicGameplayArtifactResolution, BasicGameplayAssessmentSummary, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, BasicGameplayResponsiveViewportEvidence, BasicGameplayRouteReference, BasicGameplaySnapshot, BasicGameplaySuiteFailure, BasicGameplayWarningCode, CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, RiddleProofBasicGameplayAssessment, RiddleProofBasicGameplayCatchSummary, RiddleProofBasicGameplayEvidence, RiddleProofBasicGameplayRouteAssessment, RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString } from './basic-gameplay.js';
|
|
13
|
-
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
|
|
12
|
+
export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, BasicGameplayActionResult, BasicGameplayActionType, BasicGameplayArtifactResolution, BasicGameplayAssessmentSummary, BasicGameplayBoundsOffender, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, BasicGameplayResponsiveViewportEvidence, BasicGameplayRouteReference, BasicGameplaySnapshot, BasicGameplaySuiteFailure, BasicGameplayWarningCode, CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, RiddleProofBasicGameplayAssessment, RiddleProofBasicGameplayCatchSummary, RiddleProofBasicGameplayEvidence, RiddleProofBasicGameplayRouteAssessment, RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString } from './basic-gameplay.js';
|
|
13
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
|
|
14
14
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RiddleApiError, RiddleClientConfig, RiddleFetch, RiddlePollJobResult, RiddlePreviewDeployResult, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, createRiddleApiClient, deployRiddleStaticPreview, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, riddleRequestJson, runRiddleScript, runRiddleServerPreview } from './riddle-client.js';
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
extractBasicGameplayEvidence,
|
|
37
37
|
resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
|
|
38
38
|
sanitizeBasicGameplayJsonString
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ELZSPOWV.js";
|
|
40
40
|
import {
|
|
41
41
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
42
42
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
resolveRiddleProofProfileTimeoutSec,
|
|
59
59
|
slugifyRiddleProofProfileName,
|
|
60
60
|
summarizeRiddleProofProfileResult
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-WTHSVHG5.js";
|
|
62
62
|
import {
|
|
63
63
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
64
64
|
DEFAULT_RIDDLE_API_KEY_FILE,
|