@riddledc/riddle-proof 0.7.133 → 0.7.134
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/{chunk-TA2KLHMX.js → chunk-TALHK3NV.js} +20 -0
- package/dist/cli.cjs +56 -1
- package/dist/cli.js +37 -2
- package/dist/index.cjs +20 -0
- package/dist/index.js +1 -1
- package/dist/profile.cjs +20 -0
- package/dist/profile.js +1 -1
- package/package.json +1 -1
|
@@ -452,6 +452,19 @@ function profileSetupActionCounts(results) {
|
|
|
452
452
|
function profileSetupScreenshotLabels(results) {
|
|
453
453
|
return results.filter((result) => profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string").map((result) => result.screenshot_label).filter(Boolean);
|
|
454
454
|
}
|
|
455
|
+
function profileSetupWindowCallUntilReceipts(results) {
|
|
456
|
+
return results.filter((result) => profileSetupResultAction(result) === "window_call_until").map((result) => ({
|
|
457
|
+
ordinal: result.ordinal ?? null,
|
|
458
|
+
ok: result.ok !== false,
|
|
459
|
+
path: result.path ?? null,
|
|
460
|
+
until_path: result.until_path ?? null,
|
|
461
|
+
until_value: result.until_value ?? null,
|
|
462
|
+
until_expected_value: result.until_expected_value ?? null,
|
|
463
|
+
call_count: result.call_count ?? null,
|
|
464
|
+
max_calls: result.max_calls ?? null,
|
|
465
|
+
reason: result.reason ?? result.error ?? null
|
|
466
|
+
}));
|
|
467
|
+
}
|
|
455
468
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
456
469
|
if (items.length <= limit) return items;
|
|
457
470
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -477,6 +490,9 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
477
490
|
const optionalFailed = results.filter((result) => result.ok === false && result.optional === true);
|
|
478
491
|
const successfulClicks = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false);
|
|
479
492
|
const clickCountValues = successfulClicks.map((result) => typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0).filter((value) => value !== void 0);
|
|
493
|
+
const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
|
|
494
|
+
const windowCallUntilCallCounts = windowCallUntilReceipts.map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : void 0).filter((value) => value !== void 0);
|
|
495
|
+
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
480
496
|
const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
|
|
481
497
|
const clickCount = typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0;
|
|
482
498
|
return {
|
|
@@ -509,6 +525,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
509
525
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
510
526
|
click_count_action_total: clickCountValues.length,
|
|
511
527
|
click_count_value_total: clickCountValues.reduce((sum, value) => sum + value, 0),
|
|
528
|
+
window_call_until_total: windowCallUntilReceipts.length,
|
|
529
|
+
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
530
|
+
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
531
|
+
window_call_until: sampledWindowCallUntilReceipts,
|
|
512
532
|
clicked,
|
|
513
533
|
text_samples,
|
|
514
534
|
failed: failed.map((result) => ({
|
package/dist/cli.cjs
CHANGED
|
@@ -7389,6 +7389,19 @@ function profileSetupActionCounts(results) {
|
|
|
7389
7389
|
function profileSetupScreenshotLabels(results) {
|
|
7390
7390
|
return results.filter((result) => profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string").map((result) => result.screenshot_label).filter(Boolean);
|
|
7391
7391
|
}
|
|
7392
|
+
function profileSetupWindowCallUntilReceipts(results) {
|
|
7393
|
+
return results.filter((result) => profileSetupResultAction(result) === "window_call_until").map((result) => ({
|
|
7394
|
+
ordinal: result.ordinal ?? null,
|
|
7395
|
+
ok: result.ok !== false,
|
|
7396
|
+
path: result.path ?? null,
|
|
7397
|
+
until_path: result.until_path ?? null,
|
|
7398
|
+
until_value: result.until_value ?? null,
|
|
7399
|
+
until_expected_value: result.until_expected_value ?? null,
|
|
7400
|
+
call_count: result.call_count ?? null,
|
|
7401
|
+
max_calls: result.max_calls ?? null,
|
|
7402
|
+
reason: result.reason ?? result.error ?? null
|
|
7403
|
+
}));
|
|
7404
|
+
}
|
|
7392
7405
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
7393
7406
|
if (items.length <= limit) return items;
|
|
7394
7407
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -7414,6 +7427,9 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
7414
7427
|
const optionalFailed = results.filter((result) => result.ok === false && result.optional === true);
|
|
7415
7428
|
const successfulClicks = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false);
|
|
7416
7429
|
const clickCountValues = successfulClicks.map((result) => typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0).filter((value) => value !== void 0);
|
|
7430
|
+
const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
|
|
7431
|
+
const windowCallUntilCallCounts = windowCallUntilReceipts.map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : void 0).filter((value) => value !== void 0);
|
|
7432
|
+
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
7417
7433
|
const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
|
|
7418
7434
|
const clickCount = typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0;
|
|
7419
7435
|
return {
|
|
@@ -7446,6 +7462,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
7446
7462
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
7447
7463
|
click_count_action_total: clickCountValues.length,
|
|
7448
7464
|
click_count_value_total: clickCountValues.reduce((sum, value) => sum + value, 0),
|
|
7465
|
+
window_call_until_total: windowCallUntilReceipts.length,
|
|
7466
|
+
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
7467
|
+
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
7468
|
+
window_call_until: sampledWindowCallUntilReceipts,
|
|
7449
7469
|
clicked,
|
|
7450
7470
|
text_samples,
|
|
7451
7471
|
failed: failed.map((result) => ({
|
|
@@ -14392,6 +14412,16 @@ function cliFiniteNumber(value) {
|
|
|
14392
14412
|
function cliString(value) {
|
|
14393
14413
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
14394
14414
|
}
|
|
14415
|
+
function cliValueLabel(value) {
|
|
14416
|
+
if (value === void 0) return void 0;
|
|
14417
|
+
if (typeof value === "string") return value.trim() || void 0;
|
|
14418
|
+
try {
|
|
14419
|
+
const serialized = JSON.stringify(value);
|
|
14420
|
+
return typeof serialized === "string" && serialized ? serialized : String(value);
|
|
14421
|
+
} catch {
|
|
14422
|
+
return String(value);
|
|
14423
|
+
}
|
|
14424
|
+
}
|
|
14395
14425
|
function cliStringArray(value) {
|
|
14396
14426
|
return Array.isArray(value) ? value.filter((entry) => typeof entry === "string" && Boolean(entry.trim())) : [];
|
|
14397
14427
|
}
|
|
@@ -14456,6 +14486,8 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
14456
14486
|
const clickedTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.clicked_total) || 0), 0);
|
|
14457
14487
|
const clickCountActionTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_action_total) || 0), 0);
|
|
14458
14488
|
const clickCountValueTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_value_total) || 0), 0);
|
|
14489
|
+
const windowCallUntilTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_total) || 0), 0);
|
|
14490
|
+
const windowCallUntilCallTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_call_total) || 0), 0);
|
|
14459
14491
|
const failedTotal = viewports.reduce((sum, viewport) => sum + (Array.isArray(viewport.failed) ? viewport.failed.length : 0), 0);
|
|
14460
14492
|
const lines = [
|
|
14461
14493
|
`- setup actions: ${declaredActions === void 0 ? "unknown" : declaredActions} declared, ${totalResults} recorded result(s) across ${viewports.length} viewport(s)`,
|
|
@@ -14465,6 +14497,9 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
14465
14497
|
if (clickCountActionTotal) {
|
|
14466
14498
|
lines.push(`- click counts: ${clickCountActionTotal} action(s), click_count total ${clickCountValueTotal}`);
|
|
14467
14499
|
}
|
|
14500
|
+
if (windowCallUntilTotal) {
|
|
14501
|
+
lines.push(`- window_call_until: ${windowCallUntilTotal} action(s), call_count total ${windowCallUntilCallTotal}`);
|
|
14502
|
+
}
|
|
14468
14503
|
for (const viewport of viewports.slice(0, 8)) {
|
|
14469
14504
|
const name = cliString(viewport.name) || "viewport";
|
|
14470
14505
|
const ok = viewport.ok === false ? "failed" : "ok";
|
|
@@ -14472,9 +14507,29 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
14472
14507
|
const screenshotCount = Array.isArray(viewport.setup_screenshots) ? viewport.setup_screenshots.filter((label) => typeof label === "string" && label.trim()).length : 0;
|
|
14473
14508
|
const clicked = cliFiniteNumber(viewport.clicked_total) || 0;
|
|
14474
14509
|
const clickCountActions = cliFiniteNumber(viewport.click_count_action_total) || 0;
|
|
14510
|
+
const windowCallUntilActions = cliFiniteNumber(viewport.window_call_until_total) || 0;
|
|
14511
|
+
const windowCallUntilCalls = cliFiniteNumber(viewport.window_call_until_call_total) || 0;
|
|
14475
14512
|
const observedPath = cliString(viewport.observed_path);
|
|
14476
|
-
lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${observedPath ? `, path ${observedPath}` : ""}`);
|
|
14513
|
+
lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${windowCallUntilActions ? `, ${windowCallUntilActions} window_call_until action(s), ${windowCallUntilCalls} call(s)` : ""}${observedPath ? `, path ${observedPath}` : ""}`);
|
|
14477
14514
|
}
|
|
14515
|
+
const windowCallUntilDetails = viewports.flatMap((viewport) => {
|
|
14516
|
+
const name = cliString(viewport.name) || "viewport";
|
|
14517
|
+
const receipts = Array.isArray(viewport.window_call_until) ? viewport.window_call_until.map(cliRecord).filter((item) => Boolean(item)) : [];
|
|
14518
|
+
return receipts.map((receipt) => ({ name, receipt }));
|
|
14519
|
+
});
|
|
14520
|
+
for (const { name, receipt } of windowCallUntilDetails.slice(0, 12)) {
|
|
14521
|
+
const path7 = cliString(receipt.path) || "window_function";
|
|
14522
|
+
const untilPath = cliString(receipt.until_path) || "until_path";
|
|
14523
|
+
const expected = cliValueLabel(receipt.until_expected_value);
|
|
14524
|
+
const actual = cliValueLabel(receipt.until_value);
|
|
14525
|
+
const callCount = cliFiniteNumber(receipt.call_count);
|
|
14526
|
+
const maxCalls = cliFiniteNumber(receipt.max_calls);
|
|
14527
|
+
const ok = receipt.ok === false ? "failed" : "ok";
|
|
14528
|
+
const reason = cliString(receipt.reason);
|
|
14529
|
+
const callText = callCount === void 0 ? "" : ` in ${callCount}${maxCalls === void 0 ? "" : `/${maxCalls}`} call(s)`;
|
|
14530
|
+
lines.push(`- ${name} window_call_until: ${ok}, ${markdownInlineCode(path7)} until ${markdownInlineCode(untilPath)}${expected === void 0 ? "" : ` == ${markdownInlineCode(expected, 80)}`}${callText}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
|
|
14531
|
+
}
|
|
14532
|
+
if (windowCallUntilDetails.length > 12) lines.push(`- ${windowCallUntilDetails.length - 12} additional window_call_until receipt(s) omitted.`);
|
|
14478
14533
|
const failedDetails = viewports.flatMap((viewport) => {
|
|
14479
14534
|
const name = cliString(viewport.name) || "viewport";
|
|
14480
14535
|
const failed = Array.isArray(viewport.failed) ? viewport.failed.map(cliRecord).filter((item) => Boolean(item)) : [];
|
package/dist/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
profileStatusExitCode,
|
|
13
13
|
resolveRiddleProofProfileTargetUrl,
|
|
14
14
|
resolveRiddleProofProfileTimeoutSec
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TALHK3NV.js";
|
|
16
16
|
import {
|
|
17
17
|
createRiddleApiClient,
|
|
18
18
|
parseRiddleViewport
|
|
@@ -522,6 +522,16 @@ function cliFiniteNumber(value) {
|
|
|
522
522
|
function cliString(value) {
|
|
523
523
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
524
524
|
}
|
|
525
|
+
function cliValueLabel(value) {
|
|
526
|
+
if (value === void 0) return void 0;
|
|
527
|
+
if (typeof value === "string") return value.trim() || void 0;
|
|
528
|
+
try {
|
|
529
|
+
const serialized = JSON.stringify(value);
|
|
530
|
+
return typeof serialized === "string" && serialized ? serialized : String(value);
|
|
531
|
+
} catch {
|
|
532
|
+
return String(value);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
525
535
|
function cliStringArray(value) {
|
|
526
536
|
return Array.isArray(value) ? value.filter((entry) => typeof entry === "string" && Boolean(entry.trim())) : [];
|
|
527
537
|
}
|
|
@@ -586,6 +596,8 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
586
596
|
const clickedTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.clicked_total) || 0), 0);
|
|
587
597
|
const clickCountActionTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_action_total) || 0), 0);
|
|
588
598
|
const clickCountValueTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_value_total) || 0), 0);
|
|
599
|
+
const windowCallUntilTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_total) || 0), 0);
|
|
600
|
+
const windowCallUntilCallTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_call_total) || 0), 0);
|
|
589
601
|
const failedTotal = viewports.reduce((sum, viewport) => sum + (Array.isArray(viewport.failed) ? viewport.failed.length : 0), 0);
|
|
590
602
|
const lines = [
|
|
591
603
|
`- setup actions: ${declaredActions === void 0 ? "unknown" : declaredActions} declared, ${totalResults} recorded result(s) across ${viewports.length} viewport(s)`,
|
|
@@ -595,6 +607,9 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
595
607
|
if (clickCountActionTotal) {
|
|
596
608
|
lines.push(`- click counts: ${clickCountActionTotal} action(s), click_count total ${clickCountValueTotal}`);
|
|
597
609
|
}
|
|
610
|
+
if (windowCallUntilTotal) {
|
|
611
|
+
lines.push(`- window_call_until: ${windowCallUntilTotal} action(s), call_count total ${windowCallUntilCallTotal}`);
|
|
612
|
+
}
|
|
598
613
|
for (const viewport of viewports.slice(0, 8)) {
|
|
599
614
|
const name = cliString(viewport.name) || "viewport";
|
|
600
615
|
const ok = viewport.ok === false ? "failed" : "ok";
|
|
@@ -602,9 +617,29 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
602
617
|
const screenshotCount = Array.isArray(viewport.setup_screenshots) ? viewport.setup_screenshots.filter((label) => typeof label === "string" && label.trim()).length : 0;
|
|
603
618
|
const clicked = cliFiniteNumber(viewport.clicked_total) || 0;
|
|
604
619
|
const clickCountActions = cliFiniteNumber(viewport.click_count_action_total) || 0;
|
|
620
|
+
const windowCallUntilActions = cliFiniteNumber(viewport.window_call_until_total) || 0;
|
|
621
|
+
const windowCallUntilCalls = cliFiniteNumber(viewport.window_call_until_call_total) || 0;
|
|
605
622
|
const observedPath = cliString(viewport.observed_path);
|
|
606
|
-
lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${observedPath ? `, path ${observedPath}` : ""}`);
|
|
623
|
+
lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${windowCallUntilActions ? `, ${windowCallUntilActions} window_call_until action(s), ${windowCallUntilCalls} call(s)` : ""}${observedPath ? `, path ${observedPath}` : ""}`);
|
|
607
624
|
}
|
|
625
|
+
const windowCallUntilDetails = viewports.flatMap((viewport) => {
|
|
626
|
+
const name = cliString(viewport.name) || "viewport";
|
|
627
|
+
const receipts = Array.isArray(viewport.window_call_until) ? viewport.window_call_until.map(cliRecord).filter((item) => Boolean(item)) : [];
|
|
628
|
+
return receipts.map((receipt) => ({ name, receipt }));
|
|
629
|
+
});
|
|
630
|
+
for (const { name, receipt } of windowCallUntilDetails.slice(0, 12)) {
|
|
631
|
+
const path2 = cliString(receipt.path) || "window_function";
|
|
632
|
+
const untilPath = cliString(receipt.until_path) || "until_path";
|
|
633
|
+
const expected = cliValueLabel(receipt.until_expected_value);
|
|
634
|
+
const actual = cliValueLabel(receipt.until_value);
|
|
635
|
+
const callCount = cliFiniteNumber(receipt.call_count);
|
|
636
|
+
const maxCalls = cliFiniteNumber(receipt.max_calls);
|
|
637
|
+
const ok = receipt.ok === false ? "failed" : "ok";
|
|
638
|
+
const reason = cliString(receipt.reason);
|
|
639
|
+
const callText = callCount === void 0 ? "" : ` in ${callCount}${maxCalls === void 0 ? "" : `/${maxCalls}`} call(s)`;
|
|
640
|
+
lines.push(`- ${name} window_call_until: ${ok}, ${markdownInlineCode(path2)} until ${markdownInlineCode(untilPath)}${expected === void 0 ? "" : ` == ${markdownInlineCode(expected, 80)}`}${callText}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
|
|
641
|
+
}
|
|
642
|
+
if (windowCallUntilDetails.length > 12) lines.push(`- ${windowCallUntilDetails.length - 12} additional window_call_until receipt(s) omitted.`);
|
|
608
643
|
const failedDetails = viewports.flatMap((viewport) => {
|
|
609
644
|
const name = cliString(viewport.name) || "viewport";
|
|
610
645
|
const failed = Array.isArray(viewport.failed) ? viewport.failed.map(cliRecord).filter((item) => Boolean(item)) : [];
|
package/dist/index.cjs
CHANGED
|
@@ -9185,6 +9185,19 @@ function profileSetupActionCounts(results) {
|
|
|
9185
9185
|
function profileSetupScreenshotLabels(results) {
|
|
9186
9186
|
return results.filter((result) => profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string").map((result) => result.screenshot_label).filter(Boolean);
|
|
9187
9187
|
}
|
|
9188
|
+
function profileSetupWindowCallUntilReceipts(results) {
|
|
9189
|
+
return results.filter((result) => profileSetupResultAction(result) === "window_call_until").map((result) => ({
|
|
9190
|
+
ordinal: result.ordinal ?? null,
|
|
9191
|
+
ok: result.ok !== false,
|
|
9192
|
+
path: result.path ?? null,
|
|
9193
|
+
until_path: result.until_path ?? null,
|
|
9194
|
+
until_value: result.until_value ?? null,
|
|
9195
|
+
until_expected_value: result.until_expected_value ?? null,
|
|
9196
|
+
call_count: result.call_count ?? null,
|
|
9197
|
+
max_calls: result.max_calls ?? null,
|
|
9198
|
+
reason: result.reason ?? result.error ?? null
|
|
9199
|
+
}));
|
|
9200
|
+
}
|
|
9188
9201
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
9189
9202
|
if (items.length <= limit) return items;
|
|
9190
9203
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -9210,6 +9223,9 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
9210
9223
|
const optionalFailed = results.filter((result) => result.ok === false && result.optional === true);
|
|
9211
9224
|
const successfulClicks = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false);
|
|
9212
9225
|
const clickCountValues = successfulClicks.map((result) => typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0).filter((value) => value !== void 0);
|
|
9226
|
+
const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
|
|
9227
|
+
const windowCallUntilCallCounts = windowCallUntilReceipts.map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : void 0).filter((value) => value !== void 0);
|
|
9228
|
+
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
9213
9229
|
const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
|
|
9214
9230
|
const clickCount = typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0;
|
|
9215
9231
|
return {
|
|
@@ -9242,6 +9258,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
9242
9258
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
9243
9259
|
click_count_action_total: clickCountValues.length,
|
|
9244
9260
|
click_count_value_total: clickCountValues.reduce((sum, value) => sum + value, 0),
|
|
9261
|
+
window_call_until_total: windowCallUntilReceipts.length,
|
|
9262
|
+
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
9263
|
+
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
9264
|
+
window_call_until: sampledWindowCallUntilReceipts,
|
|
9245
9265
|
clicked,
|
|
9246
9266
|
text_samples,
|
|
9247
9267
|
failed: failed.map((result) => ({
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
resolveRiddleProofProfileTimeoutSec,
|
|
63
63
|
slugifyRiddleProofProfileName,
|
|
64
64
|
summarizeRiddleProofProfileResult
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-TALHK3NV.js";
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
68
68
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -499,6 +499,19 @@ function profileSetupActionCounts(results) {
|
|
|
499
499
|
function profileSetupScreenshotLabels(results) {
|
|
500
500
|
return results.filter((result) => profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string").map((result) => result.screenshot_label).filter(Boolean);
|
|
501
501
|
}
|
|
502
|
+
function profileSetupWindowCallUntilReceipts(results) {
|
|
503
|
+
return results.filter((result) => profileSetupResultAction(result) === "window_call_until").map((result) => ({
|
|
504
|
+
ordinal: result.ordinal ?? null,
|
|
505
|
+
ok: result.ok !== false,
|
|
506
|
+
path: result.path ?? null,
|
|
507
|
+
until_path: result.until_path ?? null,
|
|
508
|
+
until_value: result.until_value ?? null,
|
|
509
|
+
until_expected_value: result.until_expected_value ?? null,
|
|
510
|
+
call_count: result.call_count ?? null,
|
|
511
|
+
max_calls: result.max_calls ?? null,
|
|
512
|
+
reason: result.reason ?? result.error ?? null
|
|
513
|
+
}));
|
|
514
|
+
}
|
|
502
515
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
503
516
|
if (items.length <= limit) return items;
|
|
504
517
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -524,6 +537,9 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
524
537
|
const optionalFailed = results.filter((result) => result.ok === false && result.optional === true);
|
|
525
538
|
const successfulClicks = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false);
|
|
526
539
|
const clickCountValues = successfulClicks.map((result) => typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0).filter((value) => value !== void 0);
|
|
540
|
+
const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
|
|
541
|
+
const windowCallUntilCallCounts = windowCallUntilReceipts.map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : void 0).filter((value) => value !== void 0);
|
|
542
|
+
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
527
543
|
const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
|
|
528
544
|
const clickCount = typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0;
|
|
529
545
|
return {
|
|
@@ -556,6 +572,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
556
572
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
557
573
|
click_count_action_total: clickCountValues.length,
|
|
558
574
|
click_count_value_total: clickCountValues.reduce((sum, value) => sum + value, 0),
|
|
575
|
+
window_call_until_total: windowCallUntilReceipts.length,
|
|
576
|
+
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
577
|
+
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
578
|
+
window_call_until: sampledWindowCallUntilReceipts,
|
|
559
579
|
clicked,
|
|
560
580
|
text_samples,
|
|
561
581
|
failed: failed.map((result) => ({
|
package/dist/profile.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolveRiddleProofProfileTimeoutSec,
|
|
24
24
|
slugifyRiddleProofProfileName,
|
|
25
25
|
summarizeRiddleProofProfileResult
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TALHK3NV.js";
|
|
27
27
|
export {
|
|
28
28
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
29
29
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|