@riddledc/riddle-proof 0.7.133 → 0.7.135

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.
@@ -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) => ({
@@ -3633,6 +3653,21 @@ function profileSetupScreenshotLabels(results) {
3633
3653
  .map((result) => result.screenshot_label)
3634
3654
  .filter(Boolean);
3635
3655
  }
3656
+ function profileSetupWindowCallUntilReceipts(results) {
3657
+ return (results || [])
3658
+ .filter((result) => result && profileSetupResultAction(result) === "window_call_until")
3659
+ .map((result) => ({
3660
+ ordinal: result.ordinal ?? null,
3661
+ ok: result.ok !== false,
3662
+ path: result.path ?? null,
3663
+ until_path: result.until_path ?? null,
3664
+ until_value: result.until_value ?? null,
3665
+ until_expected_value: result.until_expected_value ?? null,
3666
+ call_count: result.call_count ?? null,
3667
+ max_calls: result.max_calls ?? null,
3668
+ reason: result.reason || result.error || null,
3669
+ }));
3670
+ }
3636
3671
  function sampleProfileSetupSummaryItems(items, limit) {
3637
3672
  if ((items || []).length <= limit) return items || [];
3638
3673
  const firstCount = Math.floor(limit / 2);
@@ -3662,6 +3697,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
3662
3697
  const clickCountValues = successfulClicks
3663
3698
  .map((result) => typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : undefined)
3664
3699
  .filter((value) => value !== undefined);
3700
+ const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
3701
+ const windowCallUntilCallCounts = windowCallUntilReceipts
3702
+ .map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : undefined)
3703
+ .filter((value) => value !== undefined);
3704
+ const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
3665
3705
  const clickedItems = results
3666
3706
  .filter((result) => result && profileSetupResultAction(result) === "click" && result.ok !== false)
3667
3707
  .map((result) => {
@@ -3704,6 +3744,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
3704
3744
  clicked_truncated: clickedItems.length > clicked.length,
3705
3745
  click_count_action_total: clickCountValues.length,
3706
3746
  click_count_value_total: clickCountValues.reduce((sum, value) => sum + value, 0),
3747
+ window_call_until_total: windowCallUntilReceipts.length,
3748
+ window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
3749
+ window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
3750
+ window_call_until: sampledWindowCallUntilReceipts,
3707
3751
  clicked,
3708
3752
  text_samples: textSamples,
3709
3753
  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) => ({
@@ -10554,6 +10574,21 @@ function profileSetupScreenshotLabels(results) {
10554
10574
  .map((result) => result.screenshot_label)
10555
10575
  .filter(Boolean);
10556
10576
  }
10577
+ function profileSetupWindowCallUntilReceipts(results) {
10578
+ return (results || [])
10579
+ .filter((result) => result && profileSetupResultAction(result) === "window_call_until")
10580
+ .map((result) => ({
10581
+ ordinal: result.ordinal ?? null,
10582
+ ok: result.ok !== false,
10583
+ path: result.path ?? null,
10584
+ until_path: result.until_path ?? null,
10585
+ until_value: result.until_value ?? null,
10586
+ until_expected_value: result.until_expected_value ?? null,
10587
+ call_count: result.call_count ?? null,
10588
+ max_calls: result.max_calls ?? null,
10589
+ reason: result.reason || result.error || null,
10590
+ }));
10591
+ }
10557
10592
  function sampleProfileSetupSummaryItems(items, limit) {
10558
10593
  if ((items || []).length <= limit) return items || [];
10559
10594
  const firstCount = Math.floor(limit / 2);
@@ -10583,6 +10618,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
10583
10618
  const clickCountValues = successfulClicks
10584
10619
  .map((result) => typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : undefined)
10585
10620
  .filter((value) => value !== undefined);
10621
+ const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
10622
+ const windowCallUntilCallCounts = windowCallUntilReceipts
10623
+ .map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : undefined)
10624
+ .filter((value) => value !== undefined);
10625
+ const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
10586
10626
  const clickedItems = results
10587
10627
  .filter((result) => result && profileSetupResultAction(result) === "click" && result.ok !== false)
10588
10628
  .map((result) => {
@@ -10625,6 +10665,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
10625
10665
  clicked_truncated: clickedItems.length > clicked.length,
10626
10666
  click_count_action_total: clickCountValues.length,
10627
10667
  click_count_value_total: clickCountValues.reduce((sum, value) => sum + value, 0),
10668
+ window_call_until_total: windowCallUntilReceipts.length,
10669
+ window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
10670
+ window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
10671
+ window_call_until: sampledWindowCallUntilReceipts,
10628
10672
  clicked,
10629
10673
  text_samples: textSamples,
10630
10674
  failed: failed.map((result) => ({
@@ -14392,6 +14436,16 @@ function cliFiniteNumber(value) {
14392
14436
  function cliString(value) {
14393
14437
  return typeof value === "string" && value.trim() ? value.trim() : void 0;
14394
14438
  }
14439
+ function cliValueLabel(value) {
14440
+ if (value === void 0) return void 0;
14441
+ if (typeof value === "string") return value.trim() || void 0;
14442
+ try {
14443
+ const serialized = JSON.stringify(value);
14444
+ return typeof serialized === "string" && serialized ? serialized : String(value);
14445
+ } catch {
14446
+ return String(value);
14447
+ }
14448
+ }
14395
14449
  function cliStringArray(value) {
14396
14450
  return Array.isArray(value) ? value.filter((entry) => typeof entry === "string" && Boolean(entry.trim())) : [];
14397
14451
  }
@@ -14456,6 +14510,8 @@ function profileSetupSummaryMarkdown(result) {
14456
14510
  const clickedTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.clicked_total) || 0), 0);
14457
14511
  const clickCountActionTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_action_total) || 0), 0);
14458
14512
  const clickCountValueTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.click_count_value_total) || 0), 0);
14513
+ const windowCallUntilTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_total) || 0), 0);
14514
+ const windowCallUntilCallTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_call_total) || 0), 0);
14459
14515
  const failedTotal = viewports.reduce((sum, viewport) => sum + (Array.isArray(viewport.failed) ? viewport.failed.length : 0), 0);
14460
14516
  const lines = [
14461
14517
  `- setup actions: ${declaredActions === void 0 ? "unknown" : declaredActions} declared, ${totalResults} recorded result(s) across ${viewports.length} viewport(s)`,
@@ -14465,6 +14521,9 @@ function profileSetupSummaryMarkdown(result) {
14465
14521
  if (clickCountActionTotal) {
14466
14522
  lines.push(`- click counts: ${clickCountActionTotal} action(s), click_count total ${clickCountValueTotal}`);
14467
14523
  }
14524
+ if (windowCallUntilTotal) {
14525
+ lines.push(`- window_call_until: ${windowCallUntilTotal} action(s), call_count total ${windowCallUntilCallTotal}`);
14526
+ }
14468
14527
  for (const viewport of viewports.slice(0, 8)) {
14469
14528
  const name = cliString(viewport.name) || "viewport";
14470
14529
  const ok = viewport.ok === false ? "failed" : "ok";
@@ -14472,9 +14531,29 @@ function profileSetupSummaryMarkdown(result) {
14472
14531
  const screenshotCount = Array.isArray(viewport.setup_screenshots) ? viewport.setup_screenshots.filter((label) => typeof label === "string" && label.trim()).length : 0;
14473
14532
  const clicked = cliFiniteNumber(viewport.clicked_total) || 0;
14474
14533
  const clickCountActions = cliFiniteNumber(viewport.click_count_action_total) || 0;
14534
+ const windowCallUntilActions = cliFiniteNumber(viewport.window_call_until_total) || 0;
14535
+ const windowCallUntilCalls = cliFiniteNumber(viewport.window_call_until_call_total) || 0;
14475
14536
  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}` : ""}`);
14537
+ 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
14538
  }
14539
+ const windowCallUntilDetails = viewports.flatMap((viewport) => {
14540
+ const name = cliString(viewport.name) || "viewport";
14541
+ const receipts = Array.isArray(viewport.window_call_until) ? viewport.window_call_until.map(cliRecord).filter((item) => Boolean(item)) : [];
14542
+ return receipts.map((receipt) => ({ name, receipt }));
14543
+ });
14544
+ for (const { name, receipt } of windowCallUntilDetails.slice(0, 12)) {
14545
+ const path7 = cliString(receipt.path) || "window_function";
14546
+ const untilPath = cliString(receipt.until_path) || "until_path";
14547
+ const expected = cliValueLabel(receipt.until_expected_value);
14548
+ const actual = cliValueLabel(receipt.until_value);
14549
+ const callCount = cliFiniteNumber(receipt.call_count);
14550
+ const maxCalls = cliFiniteNumber(receipt.max_calls);
14551
+ const ok = receipt.ok === false ? "failed" : "ok";
14552
+ const reason = cliString(receipt.reason);
14553
+ const callText = callCount === void 0 ? "" : ` in ${callCount}${maxCalls === void 0 ? "" : `/${maxCalls}`} call(s)`;
14554
+ 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)}` : ""}`);
14555
+ }
14556
+ if (windowCallUntilDetails.length > 12) lines.push(`- ${windowCallUntilDetails.length - 12} additional window_call_until receipt(s) omitted.`);
14478
14557
  const failedDetails = viewports.flatMap((viewport) => {
14479
14558
  const name = cliString(viewport.name) || "viewport";
14480
14559
  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-TA2KLHMX.js";
15
+ } from "./chunk-4IAUK6C6.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) => ({
@@ -12366,6 +12386,21 @@ function profileSetupScreenshotLabels(results) {
12366
12386
  .map((result) => result.screenshot_label)
12367
12387
  .filter(Boolean);
12368
12388
  }
12389
+ function profileSetupWindowCallUntilReceipts(results) {
12390
+ return (results || [])
12391
+ .filter((result) => result && profileSetupResultAction(result) === "window_call_until")
12392
+ .map((result) => ({
12393
+ ordinal: result.ordinal ?? null,
12394
+ ok: result.ok !== false,
12395
+ path: result.path ?? null,
12396
+ until_path: result.until_path ?? null,
12397
+ until_value: result.until_value ?? null,
12398
+ until_expected_value: result.until_expected_value ?? null,
12399
+ call_count: result.call_count ?? null,
12400
+ max_calls: result.max_calls ?? null,
12401
+ reason: result.reason || result.error || null,
12402
+ }));
12403
+ }
12369
12404
  function sampleProfileSetupSummaryItems(items, limit) {
12370
12405
  if ((items || []).length <= limit) return items || [];
12371
12406
  const firstCount = Math.floor(limit / 2);
@@ -12395,6 +12430,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
12395
12430
  const clickCountValues = successfulClicks
12396
12431
  .map((result) => typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : undefined)
12397
12432
  .filter((value) => value !== undefined);
12433
+ const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
12434
+ const windowCallUntilCallCounts = windowCallUntilReceipts
12435
+ .map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : undefined)
12436
+ .filter((value) => value !== undefined);
12437
+ const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
12398
12438
  const clickedItems = results
12399
12439
  .filter((result) => result && profileSetupResultAction(result) === "click" && result.ok !== false)
12400
12440
  .map((result) => {
@@ -12437,6 +12477,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
12437
12477
  clicked_truncated: clickedItems.length > clicked.length,
12438
12478
  click_count_action_total: clickCountValues.length,
12439
12479
  click_count_value_total: clickCountValues.reduce((sum, value) => sum + value, 0),
12480
+ window_call_until_total: windowCallUntilReceipts.length,
12481
+ window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
12482
+ window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
12483
+ window_call_until: sampledWindowCallUntilReceipts,
12440
12484
  clicked,
12441
12485
  text_samples: textSamples,
12442
12486
  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-TA2KLHMX.js";
65
+ } from "./chunk-4IAUK6C6.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) => ({
@@ -3680,6 +3700,21 @@ function profileSetupScreenshotLabels(results) {
3680
3700
  .map((result) => result.screenshot_label)
3681
3701
  .filter(Boolean);
3682
3702
  }
3703
+ function profileSetupWindowCallUntilReceipts(results) {
3704
+ return (results || [])
3705
+ .filter((result) => result && profileSetupResultAction(result) === "window_call_until")
3706
+ .map((result) => ({
3707
+ ordinal: result.ordinal ?? null,
3708
+ ok: result.ok !== false,
3709
+ path: result.path ?? null,
3710
+ until_path: result.until_path ?? null,
3711
+ until_value: result.until_value ?? null,
3712
+ until_expected_value: result.until_expected_value ?? null,
3713
+ call_count: result.call_count ?? null,
3714
+ max_calls: result.max_calls ?? null,
3715
+ reason: result.reason || result.error || null,
3716
+ }));
3717
+ }
3683
3718
  function sampleProfileSetupSummaryItems(items, limit) {
3684
3719
  if ((items || []).length <= limit) return items || [];
3685
3720
  const firstCount = Math.floor(limit / 2);
@@ -3709,6 +3744,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
3709
3744
  const clickCountValues = successfulClicks
3710
3745
  .map((result) => typeof result.click_count === "number" && Number.isFinite(result.click_count) && result.click_count > 1 ? result.click_count : undefined)
3711
3746
  .filter((value) => value !== undefined);
3747
+ const windowCallUntilReceipts = profileSetupWindowCallUntilReceipts(results);
3748
+ const windowCallUntilCallCounts = windowCallUntilReceipts
3749
+ .map((result) => typeof result.call_count === "number" && Number.isFinite(result.call_count) ? result.call_count : undefined)
3750
+ .filter((value) => value !== undefined);
3751
+ const sampledWindowCallUntilReceipts = sampleProfileSetupSummaryItems(windowCallUntilReceipts, 8);
3712
3752
  const clickedItems = results
3713
3753
  .filter((result) => result && profileSetupResultAction(result) === "click" && result.ok !== false)
3714
3754
  .map((result) => {
@@ -3751,6 +3791,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
3751
3791
  clicked_truncated: clickedItems.length > clicked.length,
3752
3792
  click_count_action_total: clickCountValues.length,
3753
3793
  click_count_value_total: clickCountValues.reduce((sum, value) => sum + value, 0),
3794
+ window_call_until_total: windowCallUntilReceipts.length,
3795
+ window_call_until_call_total: windowCallUntilCallCounts.reduce((sum, value) => sum + value, 0),
3796
+ window_call_until_truncated: windowCallUntilReceipts.length > sampledWindowCallUntilReceipts.length,
3797
+ window_call_until: sampledWindowCallUntilReceipts,
3754
3798
  clicked,
3755
3799
  text_samples: textSamples,
3756
3800
  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-TA2KLHMX.js";
26
+ } from "./chunk-4IAUK6C6.js";
27
27
  export {
28
28
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
29
29
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.133",
3
+ "version": "0.7.135",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",