@riddledc/riddle-proof 0.7.136 → 0.7.137
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-DNSJMFK6.js → chunk-2WWSWSYA.js} +50 -0
- package/dist/cli.cjs +76 -1
- package/dist/cli.js +27 -2
- package/dist/index.cjs +50 -0
- package/dist/index.js +1 -1
- package/dist/profile.cjs +50 -0
- package/dist/profile.js +1 -1
- package/package.json +1 -1
|
@@ -465,6 +465,21 @@ function profileSetupWindowCallUntilReceipts(results) {
|
|
|
465
465
|
reason: result.reason ?? result.error ?? null
|
|
466
466
|
}));
|
|
467
467
|
}
|
|
468
|
+
function profileSetupWindowCallReceipts(results) {
|
|
469
|
+
return results.filter((result) => profileSetupResultAction(result) === "window_call").map((result) => {
|
|
470
|
+
const receipt = {
|
|
471
|
+
ordinal: result.ordinal ?? null,
|
|
472
|
+
ok: result.ok !== false,
|
|
473
|
+
path: result.path ?? null,
|
|
474
|
+
return_captured: result.return_captured ?? null,
|
|
475
|
+
return_stored_to: result.return_stored_to ?? null,
|
|
476
|
+
reason: result.reason ?? result.error ?? result.store_reason ?? null
|
|
477
|
+
};
|
|
478
|
+
if (result.returned !== void 0) receipt.returned = result.returned;
|
|
479
|
+
if (result.expected_return !== void 0) receipt.expected_return = result.expected_return;
|
|
480
|
+
return receipt;
|
|
481
|
+
});
|
|
482
|
+
}
|
|
468
483
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
469
484
|
if (items.length <= limit) return items;
|
|
470
485
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -493,6 +508,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
493
508
|
const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
|
|
494
509
|
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
510
|
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
511
|
+
const windowCallReceipts = profileSetupWindowCallReceipts(results);
|
|
512
|
+
const windowCallStoredTotal = windowCallReceipts.filter((result) => typeof result.return_stored_to === "string" && result.return_stored_to.trim()).length;
|
|
513
|
+
const windowCallCapturedTotal = windowCallReceipts.filter((result) => result.return_captured === true).length;
|
|
514
|
+
const sampledWindowCallReceipts = sampleProfileSetupSummaryItems(windowCallReceipts, 8);
|
|
496
515
|
const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
|
|
497
516
|
const clickCount = typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0;
|
|
498
517
|
return {
|
|
@@ -529,6 +548,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
529
548
|
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
530
549
|
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
531
550
|
window_call_until: sampledWindowCallUntilReceipts,
|
|
551
|
+
window_call_total: windowCallReceipts.length,
|
|
552
|
+
window_call_stored_total: windowCallStoredTotal,
|
|
553
|
+
window_call_captured_total: windowCallCapturedTotal,
|
|
554
|
+
window_call_truncated: windowCallReceipts.length > sampledWindowCallReceipts.length,
|
|
555
|
+
window_call: sampledWindowCallReceipts,
|
|
532
556
|
clicked,
|
|
533
557
|
text_samples,
|
|
534
558
|
failed: failed.map((result) => ({
|
|
@@ -3682,6 +3706,23 @@ function profileSetupWindowCallUntilReceipts(results) {
|
|
|
3682
3706
|
reason: result.reason || result.error || null,
|
|
3683
3707
|
}));
|
|
3684
3708
|
}
|
|
3709
|
+
function profileSetupWindowCallReceipts(results) {
|
|
3710
|
+
return (results || [])
|
|
3711
|
+
.filter((result) => result && profileSetupResultAction(result) === "window_call")
|
|
3712
|
+
.map((result) => {
|
|
3713
|
+
const receipt = {
|
|
3714
|
+
ordinal: result.ordinal ?? null,
|
|
3715
|
+
ok: result.ok !== false,
|
|
3716
|
+
path: result.path ?? null,
|
|
3717
|
+
return_captured: result.return_captured ?? null,
|
|
3718
|
+
return_stored_to: result.return_stored_to ?? null,
|
|
3719
|
+
reason: result.reason || result.error || result.store_reason || null,
|
|
3720
|
+
};
|
|
3721
|
+
if (result.returned !== undefined) receipt.returned = result.returned;
|
|
3722
|
+
if (result.expected_return !== undefined) receipt.expected_return = result.expected_return;
|
|
3723
|
+
return receipt;
|
|
3724
|
+
});
|
|
3725
|
+
}
|
|
3685
3726
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
3686
3727
|
if ((items || []).length <= limit) return items || [];
|
|
3687
3728
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -3716,6 +3757,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
|
|
|
3716
3757
|
.map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : undefined)
|
|
3717
3758
|
.filter((value) => value !== undefined);
|
|
3718
3759
|
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
3760
|
+
const windowCallReceipts = profileSetupWindowCallReceipts(results);
|
|
3761
|
+
const windowCallStoredTotal = windowCallReceipts.filter((result) => typeof result.return_stored_to === "string" && result.return_stored_to.trim()).length;
|
|
3762
|
+
const windowCallCapturedTotal = windowCallReceipts.filter((result) => result.return_captured === true).length;
|
|
3763
|
+
const sampledWindowCallReceipts = sampleProfileSetupSummaryItems(windowCallReceipts, 8);
|
|
3719
3764
|
const clickedItems = results
|
|
3720
3765
|
.filter((result) => result && profileSetupResultAction(result) === "click" && result.ok !== false)
|
|
3721
3766
|
.map((result) => {
|
|
@@ -3762,6 +3807,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
|
|
|
3762
3807
|
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
3763
3808
|
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
3764
3809
|
window_call_until: sampledWindowCallUntilReceipts,
|
|
3810
|
+
window_call_total: windowCallReceipts.length,
|
|
3811
|
+
window_call_stored_total: windowCallStoredTotal,
|
|
3812
|
+
window_call_captured_total: windowCallCapturedTotal,
|
|
3813
|
+
window_call_truncated: windowCallReceipts.length > sampledWindowCallReceipts.length,
|
|
3814
|
+
window_call: sampledWindowCallReceipts,
|
|
3765
3815
|
clicked,
|
|
3766
3816
|
text_samples: textSamples,
|
|
3767
3817
|
failed: failed.map((result) => ({
|
package/dist/cli.cjs
CHANGED
|
@@ -7402,6 +7402,21 @@ function profileSetupWindowCallUntilReceipts(results) {
|
|
|
7402
7402
|
reason: result.reason ?? result.error ?? null
|
|
7403
7403
|
}));
|
|
7404
7404
|
}
|
|
7405
|
+
function profileSetupWindowCallReceipts(results) {
|
|
7406
|
+
return results.filter((result) => profileSetupResultAction(result) === "window_call").map((result) => {
|
|
7407
|
+
const receipt = {
|
|
7408
|
+
ordinal: result.ordinal ?? null,
|
|
7409
|
+
ok: result.ok !== false,
|
|
7410
|
+
path: result.path ?? null,
|
|
7411
|
+
return_captured: result.return_captured ?? null,
|
|
7412
|
+
return_stored_to: result.return_stored_to ?? null,
|
|
7413
|
+
reason: result.reason ?? result.error ?? result.store_reason ?? null
|
|
7414
|
+
};
|
|
7415
|
+
if (result.returned !== void 0) receipt.returned = result.returned;
|
|
7416
|
+
if (result.expected_return !== void 0) receipt.expected_return = result.expected_return;
|
|
7417
|
+
return receipt;
|
|
7418
|
+
});
|
|
7419
|
+
}
|
|
7405
7420
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
7406
7421
|
if (items.length <= limit) return items;
|
|
7407
7422
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -7430,6 +7445,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
7430
7445
|
const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
|
|
7431
7446
|
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
7447
|
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
7448
|
+
const windowCallReceipts = profileSetupWindowCallReceipts(results);
|
|
7449
|
+
const windowCallStoredTotal = windowCallReceipts.filter((result) => typeof result.return_stored_to === "string" && result.return_stored_to.trim()).length;
|
|
7450
|
+
const windowCallCapturedTotal = windowCallReceipts.filter((result) => result.return_captured === true).length;
|
|
7451
|
+
const sampledWindowCallReceipts = sampleProfileSetupSummaryItems(windowCallReceipts, 8);
|
|
7433
7452
|
const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
|
|
7434
7453
|
const clickCount = typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0;
|
|
7435
7454
|
return {
|
|
@@ -7466,6 +7485,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
7466
7485
|
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
7467
7486
|
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
7468
7487
|
window_call_until: sampledWindowCallUntilReceipts,
|
|
7488
|
+
window_call_total: windowCallReceipts.length,
|
|
7489
|
+
window_call_stored_total: windowCallStoredTotal,
|
|
7490
|
+
window_call_captured_total: windowCallCapturedTotal,
|
|
7491
|
+
window_call_truncated: windowCallReceipts.length > sampledWindowCallReceipts.length,
|
|
7492
|
+
window_call: sampledWindowCallReceipts,
|
|
7469
7493
|
clicked,
|
|
7470
7494
|
text_samples,
|
|
7471
7495
|
failed: failed.map((result) => ({
|
|
@@ -10603,6 +10627,23 @@ function profileSetupWindowCallUntilReceipts(results) {
|
|
|
10603
10627
|
reason: result.reason || result.error || null,
|
|
10604
10628
|
}));
|
|
10605
10629
|
}
|
|
10630
|
+
function profileSetupWindowCallReceipts(results) {
|
|
10631
|
+
return (results || [])
|
|
10632
|
+
.filter((result) => result && profileSetupResultAction(result) === "window_call")
|
|
10633
|
+
.map((result) => {
|
|
10634
|
+
const receipt = {
|
|
10635
|
+
ordinal: result.ordinal ?? null,
|
|
10636
|
+
ok: result.ok !== false,
|
|
10637
|
+
path: result.path ?? null,
|
|
10638
|
+
return_captured: result.return_captured ?? null,
|
|
10639
|
+
return_stored_to: result.return_stored_to ?? null,
|
|
10640
|
+
reason: result.reason || result.error || result.store_reason || null,
|
|
10641
|
+
};
|
|
10642
|
+
if (result.returned !== undefined) receipt.returned = result.returned;
|
|
10643
|
+
if (result.expected_return !== undefined) receipt.expected_return = result.expected_return;
|
|
10644
|
+
return receipt;
|
|
10645
|
+
});
|
|
10646
|
+
}
|
|
10606
10647
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
10607
10648
|
if ((items || []).length <= limit) return items || [];
|
|
10608
10649
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -10637,6 +10678,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
|
|
|
10637
10678
|
.map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : undefined)
|
|
10638
10679
|
.filter((value) => value !== undefined);
|
|
10639
10680
|
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
10681
|
+
const windowCallReceipts = profileSetupWindowCallReceipts(results);
|
|
10682
|
+
const windowCallStoredTotal = windowCallReceipts.filter((result) => typeof result.return_stored_to === "string" && result.return_stored_to.trim()).length;
|
|
10683
|
+
const windowCallCapturedTotal = windowCallReceipts.filter((result) => result.return_captured === true).length;
|
|
10684
|
+
const sampledWindowCallReceipts = sampleProfileSetupSummaryItems(windowCallReceipts, 8);
|
|
10640
10685
|
const clickedItems = results
|
|
10641
10686
|
.filter((result) => result && profileSetupResultAction(result) === "click" && result.ok !== false)
|
|
10642
10687
|
.map((result) => {
|
|
@@ -10683,6 +10728,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
|
|
|
10683
10728
|
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
10684
10729
|
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
10685
10730
|
window_call_until: sampledWindowCallUntilReceipts,
|
|
10731
|
+
window_call_total: windowCallReceipts.length,
|
|
10732
|
+
window_call_stored_total: windowCallStoredTotal,
|
|
10733
|
+
window_call_captured_total: windowCallCapturedTotal,
|
|
10734
|
+
window_call_truncated: windowCallReceipts.length > sampledWindowCallReceipts.length,
|
|
10735
|
+
window_call: sampledWindowCallReceipts,
|
|
10686
10736
|
clicked,
|
|
10687
10737
|
text_samples: textSamples,
|
|
10688
10738
|
failed: failed.map((result) => ({
|
|
@@ -14560,6 +14610,9 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
14560
14610
|
const clickedTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.clicked_total) || 0), 0);
|
|
14561
14611
|
const clickCountActionTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_action_total) || 0), 0);
|
|
14562
14612
|
const clickCountValueTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_value_total) || 0), 0);
|
|
14613
|
+
const windowCallTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_total) || 0), 0);
|
|
14614
|
+
const windowCallStoredTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_stored_total) || 0), 0);
|
|
14615
|
+
const windowCallCapturedTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_captured_total) || 0), 0);
|
|
14563
14616
|
const windowCallUntilTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_total) || 0), 0);
|
|
14564
14617
|
const windowCallUntilCallTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_call_total) || 0), 0);
|
|
14565
14618
|
const failedTotal = viewports.reduce((sum, viewport) => sum + (Array.isArray(viewport.failed) ? viewport.failed.length : 0), 0);
|
|
@@ -14571,6 +14624,9 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
14571
14624
|
if (clickCountActionTotal) {
|
|
14572
14625
|
lines.push(`- click counts: ${clickCountActionTotal} action(s), click_count total ${clickCountValueTotal}`);
|
|
14573
14626
|
}
|
|
14627
|
+
if (windowCallTotal) {
|
|
14628
|
+
lines.push(`- window_call: ${windowCallTotal} action(s), stored returns ${windowCallStoredTotal}, captured returns ${windowCallCapturedTotal}`);
|
|
14629
|
+
}
|
|
14574
14630
|
if (windowCallUntilTotal) {
|
|
14575
14631
|
lines.push(`- window_call_until: ${windowCallUntilTotal} action(s), call_count total ${windowCallUntilCallTotal}`);
|
|
14576
14632
|
}
|
|
@@ -14581,11 +14637,30 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
14581
14637
|
const screenshotCount = Array.isArray(viewport.setup_screenshots) ? viewport.setup_screenshots.filter((label) => typeof label === "string" && label.trim()).length : 0;
|
|
14582
14638
|
const clicked = cliFiniteNumber(viewport.clicked_total) || 0;
|
|
14583
14639
|
const clickCountActions = cliFiniteNumber(viewport.click_count_action_total) || 0;
|
|
14640
|
+
const windowCallActions = cliFiniteNumber(viewport.window_call_total) || 0;
|
|
14641
|
+
const windowCallStored = cliFiniteNumber(viewport.window_call_stored_total) || 0;
|
|
14642
|
+
const windowCallCaptured = cliFiniteNumber(viewport.window_call_captured_total) || 0;
|
|
14584
14643
|
const windowCallUntilActions = cliFiniteNumber(viewport.window_call_until_total) || 0;
|
|
14585
14644
|
const windowCallUntilCalls = cliFiniteNumber(viewport.window_call_until_call_total) || 0;
|
|
14586
14645
|
const observedPath = cliString(viewport.observed_path);
|
|
14587
|
-
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}` : ""}`);
|
|
14646
|
+
lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${windowCallActions ? `, ${windowCallActions} window_call action(s), ${windowCallStored} stored return(s), ${windowCallCaptured} captured return(s)` : ""}${windowCallUntilActions ? `, ${windowCallUntilActions} window_call_until action(s), ${windowCallUntilCalls} call(s)` : ""}${observedPath ? `, path ${observedPath}` : ""}`);
|
|
14647
|
+
}
|
|
14648
|
+
const windowCallDetails = viewports.flatMap((viewport) => {
|
|
14649
|
+
const name = cliString(viewport.name) || "viewport";
|
|
14650
|
+
const receipts = Array.isArray(viewport.window_call) ? viewport.window_call.map(cliRecord).filter((item) => Boolean(item)) : [];
|
|
14651
|
+
return receipts.map((receipt) => ({ name, receipt }));
|
|
14652
|
+
});
|
|
14653
|
+
for (const { name, receipt } of windowCallDetails.slice(0, 12)) {
|
|
14654
|
+
const path7 = cliString(receipt.path) || "window_function";
|
|
14655
|
+
const storedTo = cliString(receipt.return_stored_to);
|
|
14656
|
+
const returned = cliValueLabel(receipt.returned);
|
|
14657
|
+
const expected = cliValueLabel(receipt.expected_return);
|
|
14658
|
+
const captured = receipt.return_captured === true ? "captured" : receipt.return_captured === false ? "not captured" : "capture unknown";
|
|
14659
|
+
const ok = receipt.ok === false ? "failed" : "ok";
|
|
14660
|
+
const reason = cliString(receipt.reason);
|
|
14661
|
+
lines.push(`- ${name} window_call: ${ok}, ${markdownInlineCode(path7)}${storedTo ? `, stored ${markdownInlineCode(storedTo)}` : ""}, return ${captured}${expected === void 0 ? "" : `, expected ${markdownInlineCode(expected, 80)}`}${returned === void 0 ? "" : `, returned ${markdownInlineCode(returned, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
|
|
14588
14662
|
}
|
|
14663
|
+
if (windowCallDetails.length > 12) lines.push(`- ${windowCallDetails.length - 12} additional window_call receipt(s) omitted.`);
|
|
14589
14664
|
const windowCallUntilDetails = viewports.flatMap((viewport) => {
|
|
14590
14665
|
const name = cliString(viewport.name) || "viewport";
|
|
14591
14666
|
const receipts = Array.isArray(viewport.window_call_until) ? viewport.window_call_until.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-2WWSWSYA.js";
|
|
16
16
|
import {
|
|
17
17
|
createRiddleApiClient,
|
|
18
18
|
parseRiddleViewport
|
|
@@ -596,6 +596,9 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
596
596
|
const clickedTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.clicked_total) || 0), 0);
|
|
597
597
|
const clickCountActionTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_action_total) || 0), 0);
|
|
598
598
|
const clickCountValueTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_value_total) || 0), 0);
|
|
599
|
+
const windowCallTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_total) || 0), 0);
|
|
600
|
+
const windowCallStoredTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_stored_total) || 0), 0);
|
|
601
|
+
const windowCallCapturedTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_captured_total) || 0), 0);
|
|
599
602
|
const windowCallUntilTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_total) || 0), 0);
|
|
600
603
|
const windowCallUntilCallTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_call_total) || 0), 0);
|
|
601
604
|
const failedTotal = viewports.reduce((sum, viewport) => sum + (Array.isArray(viewport.failed) ? viewport.failed.length : 0), 0);
|
|
@@ -607,6 +610,9 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
607
610
|
if (clickCountActionTotal) {
|
|
608
611
|
lines.push(`- click counts: ${clickCountActionTotal} action(s), click_count total ${clickCountValueTotal}`);
|
|
609
612
|
}
|
|
613
|
+
if (windowCallTotal) {
|
|
614
|
+
lines.push(`- window_call: ${windowCallTotal} action(s), stored returns ${windowCallStoredTotal}, captured returns ${windowCallCapturedTotal}`);
|
|
615
|
+
}
|
|
610
616
|
if (windowCallUntilTotal) {
|
|
611
617
|
lines.push(`- window_call_until: ${windowCallUntilTotal} action(s), call_count total ${windowCallUntilCallTotal}`);
|
|
612
618
|
}
|
|
@@ -617,11 +623,30 @@ function profileSetupSummaryMarkdown(result) {
|
|
|
617
623
|
const screenshotCount = Array.isArray(viewport.setup_screenshots) ? viewport.setup_screenshots.filter((label) => typeof label === "string" && label.trim()).length : 0;
|
|
618
624
|
const clicked = cliFiniteNumber(viewport.clicked_total) || 0;
|
|
619
625
|
const clickCountActions = cliFiniteNumber(viewport.click_count_action_total) || 0;
|
|
626
|
+
const windowCallActions = cliFiniteNumber(viewport.window_call_total) || 0;
|
|
627
|
+
const windowCallStored = cliFiniteNumber(viewport.window_call_stored_total) || 0;
|
|
628
|
+
const windowCallCaptured = cliFiniteNumber(viewport.window_call_captured_total) || 0;
|
|
620
629
|
const windowCallUntilActions = cliFiniteNumber(viewport.window_call_until_total) || 0;
|
|
621
630
|
const windowCallUntilCalls = cliFiniteNumber(viewport.window_call_until_call_total) || 0;
|
|
622
631
|
const observedPath = cliString(viewport.observed_path);
|
|
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}` : ""}`);
|
|
632
|
+
lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${windowCallActions ? `, ${windowCallActions} window_call action(s), ${windowCallStored} stored return(s), ${windowCallCaptured} captured return(s)` : ""}${windowCallUntilActions ? `, ${windowCallUntilActions} window_call_until action(s), ${windowCallUntilCalls} call(s)` : ""}${observedPath ? `, path ${observedPath}` : ""}`);
|
|
633
|
+
}
|
|
634
|
+
const windowCallDetails = viewports.flatMap((viewport) => {
|
|
635
|
+
const name = cliString(viewport.name) || "viewport";
|
|
636
|
+
const receipts = Array.isArray(viewport.window_call) ? viewport.window_call.map(cliRecord).filter((item) => Boolean(item)) : [];
|
|
637
|
+
return receipts.map((receipt) => ({ name, receipt }));
|
|
638
|
+
});
|
|
639
|
+
for (const { name, receipt } of windowCallDetails.slice(0, 12)) {
|
|
640
|
+
const path2 = cliString(receipt.path) || "window_function";
|
|
641
|
+
const storedTo = cliString(receipt.return_stored_to);
|
|
642
|
+
const returned = cliValueLabel(receipt.returned);
|
|
643
|
+
const expected = cliValueLabel(receipt.expected_return);
|
|
644
|
+
const captured = receipt.return_captured === true ? "captured" : receipt.return_captured === false ? "not captured" : "capture unknown";
|
|
645
|
+
const ok = receipt.ok === false ? "failed" : "ok";
|
|
646
|
+
const reason = cliString(receipt.reason);
|
|
647
|
+
lines.push(`- ${name} window_call: ${ok}, ${markdownInlineCode(path2)}${storedTo ? `, stored ${markdownInlineCode(storedTo)}` : ""}, return ${captured}${expected === void 0 ? "" : `, expected ${markdownInlineCode(expected, 80)}`}${returned === void 0 ? "" : `, returned ${markdownInlineCode(returned, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
|
|
624
648
|
}
|
|
649
|
+
if (windowCallDetails.length > 12) lines.push(`- ${windowCallDetails.length - 12} additional window_call receipt(s) omitted.`);
|
|
625
650
|
const windowCallUntilDetails = viewports.flatMap((viewport) => {
|
|
626
651
|
const name = cliString(viewport.name) || "viewport";
|
|
627
652
|
const receipts = Array.isArray(viewport.window_call_until) ? viewport.window_call_until.map(cliRecord).filter((item) => Boolean(item)) : [];
|
package/dist/index.cjs
CHANGED
|
@@ -9198,6 +9198,21 @@ function profileSetupWindowCallUntilReceipts(results) {
|
|
|
9198
9198
|
reason: result.reason ?? result.error ?? null
|
|
9199
9199
|
}));
|
|
9200
9200
|
}
|
|
9201
|
+
function profileSetupWindowCallReceipts(results) {
|
|
9202
|
+
return results.filter((result) => profileSetupResultAction(result) === "window_call").map((result) => {
|
|
9203
|
+
const receipt = {
|
|
9204
|
+
ordinal: result.ordinal ?? null,
|
|
9205
|
+
ok: result.ok !== false,
|
|
9206
|
+
path: result.path ?? null,
|
|
9207
|
+
return_captured: result.return_captured ?? null,
|
|
9208
|
+
return_stored_to: result.return_stored_to ?? null,
|
|
9209
|
+
reason: result.reason ?? result.error ?? result.store_reason ?? null
|
|
9210
|
+
};
|
|
9211
|
+
if (result.returned !== void 0) receipt.returned = result.returned;
|
|
9212
|
+
if (result.expected_return !== void 0) receipt.expected_return = result.expected_return;
|
|
9213
|
+
return receipt;
|
|
9214
|
+
});
|
|
9215
|
+
}
|
|
9201
9216
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
9202
9217
|
if (items.length <= limit) return items;
|
|
9203
9218
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -9226,6 +9241,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
9226
9241
|
const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
|
|
9227
9242
|
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
9243
|
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
9244
|
+
const windowCallReceipts = profileSetupWindowCallReceipts(results);
|
|
9245
|
+
const windowCallStoredTotal = windowCallReceipts.filter((result) => typeof result.return_stored_to === "string" && result.return_stored_to.trim()).length;
|
|
9246
|
+
const windowCallCapturedTotal = windowCallReceipts.filter((result) => result.return_captured === true).length;
|
|
9247
|
+
const sampledWindowCallReceipts = sampleProfileSetupSummaryItems(windowCallReceipts, 8);
|
|
9229
9248
|
const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
|
|
9230
9249
|
const clickCount = typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0;
|
|
9231
9250
|
return {
|
|
@@ -9262,6 +9281,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
9262
9281
|
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
9263
9282
|
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
9264
9283
|
window_call_until: sampledWindowCallUntilReceipts,
|
|
9284
|
+
window_call_total: windowCallReceipts.length,
|
|
9285
|
+
window_call_stored_total: windowCallStoredTotal,
|
|
9286
|
+
window_call_captured_total: windowCallCapturedTotal,
|
|
9287
|
+
window_call_truncated: windowCallReceipts.length > sampledWindowCallReceipts.length,
|
|
9288
|
+
window_call: sampledWindowCallReceipts,
|
|
9265
9289
|
clicked,
|
|
9266
9290
|
text_samples,
|
|
9267
9291
|
failed: failed.map((result) => ({
|
|
@@ -12415,6 +12439,23 @@ function profileSetupWindowCallUntilReceipts(results) {
|
|
|
12415
12439
|
reason: result.reason || result.error || null,
|
|
12416
12440
|
}));
|
|
12417
12441
|
}
|
|
12442
|
+
function profileSetupWindowCallReceipts(results) {
|
|
12443
|
+
return (results || [])
|
|
12444
|
+
.filter((result) => result && profileSetupResultAction(result) === "window_call")
|
|
12445
|
+
.map((result) => {
|
|
12446
|
+
const receipt = {
|
|
12447
|
+
ordinal: result.ordinal ?? null,
|
|
12448
|
+
ok: result.ok !== false,
|
|
12449
|
+
path: result.path ?? null,
|
|
12450
|
+
return_captured: result.return_captured ?? null,
|
|
12451
|
+
return_stored_to: result.return_stored_to ?? null,
|
|
12452
|
+
reason: result.reason || result.error || result.store_reason || null,
|
|
12453
|
+
};
|
|
12454
|
+
if (result.returned !== undefined) receipt.returned = result.returned;
|
|
12455
|
+
if (result.expected_return !== undefined) receipt.expected_return = result.expected_return;
|
|
12456
|
+
return receipt;
|
|
12457
|
+
});
|
|
12458
|
+
}
|
|
12418
12459
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
12419
12460
|
if ((items || []).length <= limit) return items || [];
|
|
12420
12461
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -12449,6 +12490,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
|
|
|
12449
12490
|
.map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : undefined)
|
|
12450
12491
|
.filter((value) => value !== undefined);
|
|
12451
12492
|
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
12493
|
+
const windowCallReceipts = profileSetupWindowCallReceipts(results);
|
|
12494
|
+
const windowCallStoredTotal = windowCallReceipts.filter((result) => typeof result.return_stored_to === "string" && result.return_stored_to.trim()).length;
|
|
12495
|
+
const windowCallCapturedTotal = windowCallReceipts.filter((result) => result.return_captured === true).length;
|
|
12496
|
+
const sampledWindowCallReceipts = sampleProfileSetupSummaryItems(windowCallReceipts, 8);
|
|
12452
12497
|
const clickedItems = results
|
|
12453
12498
|
.filter((result) => result && profileSetupResultAction(result) === "click" && result.ok !== false)
|
|
12454
12499
|
.map((result) => {
|
|
@@ -12495,6 +12540,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
|
|
|
12495
12540
|
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
12496
12541
|
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
12497
12542
|
window_call_until: sampledWindowCallUntilReceipts,
|
|
12543
|
+
window_call_total: windowCallReceipts.length,
|
|
12544
|
+
window_call_stored_total: windowCallStoredTotal,
|
|
12545
|
+
window_call_captured_total: windowCallCapturedTotal,
|
|
12546
|
+
window_call_truncated: windowCallReceipts.length > sampledWindowCallReceipts.length,
|
|
12547
|
+
window_call: sampledWindowCallReceipts,
|
|
12498
12548
|
clicked,
|
|
12499
12549
|
text_samples: textSamples,
|
|
12500
12550
|
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-2WWSWSYA.js";
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
68
68
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -512,6 +512,21 @@ function profileSetupWindowCallUntilReceipts(results) {
|
|
|
512
512
|
reason: result.reason ?? result.error ?? null
|
|
513
513
|
}));
|
|
514
514
|
}
|
|
515
|
+
function profileSetupWindowCallReceipts(results) {
|
|
516
|
+
return results.filter((result) => profileSetupResultAction(result) === "window_call").map((result) => {
|
|
517
|
+
const receipt = {
|
|
518
|
+
ordinal: result.ordinal ?? null,
|
|
519
|
+
ok: result.ok !== false,
|
|
520
|
+
path: result.path ?? null,
|
|
521
|
+
return_captured: result.return_captured ?? null,
|
|
522
|
+
return_stored_to: result.return_stored_to ?? null,
|
|
523
|
+
reason: result.reason ?? result.error ?? result.store_reason ?? null
|
|
524
|
+
};
|
|
525
|
+
if (result.returned !== void 0) receipt.returned = result.returned;
|
|
526
|
+
if (result.expected_return !== void 0) receipt.expected_return = result.expected_return;
|
|
527
|
+
return receipt;
|
|
528
|
+
});
|
|
529
|
+
}
|
|
515
530
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
516
531
|
if (items.length <= limit) return items;
|
|
517
532
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -540,6 +555,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
540
555
|
const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
|
|
541
556
|
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
557
|
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
558
|
+
const windowCallReceipts = profileSetupWindowCallReceipts(results);
|
|
559
|
+
const windowCallStoredTotal = windowCallReceipts.filter((result) => typeof result.return_stored_to === "string" && result.return_stored_to.trim()).length;
|
|
560
|
+
const windowCallCapturedTotal = windowCallReceipts.filter((result) => result.return_captured === true).length;
|
|
561
|
+
const sampledWindowCallReceipts = sampleProfileSetupSummaryItems(windowCallReceipts, 8);
|
|
543
562
|
const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
|
|
544
563
|
const clickCount = typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : void 0;
|
|
545
564
|
return {
|
|
@@ -576,6 +595,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
|
|
|
576
595
|
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
577
596
|
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
578
597
|
window_call_until: sampledWindowCallUntilReceipts,
|
|
598
|
+
window_call_total: windowCallReceipts.length,
|
|
599
|
+
window_call_stored_total: windowCallStoredTotal,
|
|
600
|
+
window_call_captured_total: windowCallCapturedTotal,
|
|
601
|
+
window_call_truncated: windowCallReceipts.length > sampledWindowCallReceipts.length,
|
|
602
|
+
window_call: sampledWindowCallReceipts,
|
|
579
603
|
clicked,
|
|
580
604
|
text_samples,
|
|
581
605
|
failed: failed.map((result) => ({
|
|
@@ -3729,6 +3753,23 @@ function profileSetupWindowCallUntilReceipts(results) {
|
|
|
3729
3753
|
reason: result.reason || result.error || null,
|
|
3730
3754
|
}));
|
|
3731
3755
|
}
|
|
3756
|
+
function profileSetupWindowCallReceipts(results) {
|
|
3757
|
+
return (results || [])
|
|
3758
|
+
.filter((result) => result && profileSetupResultAction(result) === "window_call")
|
|
3759
|
+
.map((result) => {
|
|
3760
|
+
const receipt = {
|
|
3761
|
+
ordinal: result.ordinal ?? null,
|
|
3762
|
+
ok: result.ok !== false,
|
|
3763
|
+
path: result.path ?? null,
|
|
3764
|
+
return_captured: result.return_captured ?? null,
|
|
3765
|
+
return_stored_to: result.return_stored_to ?? null,
|
|
3766
|
+
reason: result.reason || result.error || result.store_reason || null,
|
|
3767
|
+
};
|
|
3768
|
+
if (result.returned !== undefined) receipt.returned = result.returned;
|
|
3769
|
+
if (result.expected_return !== undefined) receipt.expected_return = result.expected_return;
|
|
3770
|
+
return receipt;
|
|
3771
|
+
});
|
|
3772
|
+
}
|
|
3732
3773
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
3733
3774
|
if ((items || []).length <= limit) return items || [];
|
|
3734
3775
|
const firstCount = Math.floor(limit / 2);
|
|
@@ -3763,6 +3804,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
|
|
|
3763
3804
|
.map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : undefined)
|
|
3764
3805
|
.filter((value) => value !== undefined);
|
|
3765
3806
|
const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
|
|
3807
|
+
const windowCallReceipts = profileSetupWindowCallReceipts(results);
|
|
3808
|
+
const windowCallStoredTotal = windowCallReceipts.filter((result) => typeof result.return_stored_to === "string" && result.return_stored_to.trim()).length;
|
|
3809
|
+
const windowCallCapturedTotal = windowCallReceipts.filter((result) => result.return_captured === true).length;
|
|
3810
|
+
const sampledWindowCallReceipts = sampleProfileSetupSummaryItems(windowCallReceipts, 8);
|
|
3766
3811
|
const clickedItems = results
|
|
3767
3812
|
.filter((result) => result && profileSetupResultAction(result) === "click" && result.ok !== false)
|
|
3768
3813
|
.map((result) => {
|
|
@@ -3809,6 +3854,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
|
|
|
3809
3854
|
window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
|
|
3810
3855
|
window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
|
|
3811
3856
|
window_call_until: sampledWindowCallUntilReceipts,
|
|
3857
|
+
window_call_total: windowCallReceipts.length,
|
|
3858
|
+
window_call_stored_total: windowCallStoredTotal,
|
|
3859
|
+
window_call_captured_total: windowCallCapturedTotal,
|
|
3860
|
+
window_call_truncated: windowCallReceipts.length > sampledWindowCallReceipts.length,
|
|
3861
|
+
window_call: sampledWindowCallReceipts,
|
|
3812
3862
|
clicked,
|
|
3813
3863
|
text_samples: textSamples,
|
|
3814
3864
|
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-2WWSWSYA.js";
|
|
27
27
|
export {
|
|
28
28
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
29
29
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|