@riddledc/riddle-proof 0.7.198 → 0.7.200

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/README.md CHANGED
@@ -440,8 +440,10 @@ Use `tap_until` for gameplay loops where the proof should tap a visible target
440
440
  until a browser-state predicate is satisfied. It accepts the same selector,
441
441
  coordinate, and pointer options as `tap`, plus `until_path`,
442
442
  `until_expected_value`, `max_taps` / `max_calls` from 1 to 100, and optional
443
- `interval_ms`. The action stops early when the predicate matches and records one
444
- compact receipt with `tap_count`, final `until_value`, and input dispatch
443
+ `interval_ms`. Set `tap_burst_size` from 1 to 100 when gameplay needs several
444
+ fast taps before the next predicate check. The action stops early when the
445
+ predicate matches and records one compact receipt with `tap_count`,
446
+ `condition_check_count`, `elapsed_ms`, final `until_value`, and input dispatch
445
447
  details, so long canvas interaction loops do not need dozens of repeated setup
446
448
  actions.
447
449
  Use `set_range_value` for HTML range inputs and React-controlled sliders. It
@@ -540,11 +542,11 @@ included in clicked-target evidence and rolled up as `click_count_action_total`
540
542
  and `click_count_value_total`. Repeated selector runs such as long gameplay
541
543
  button loops are also grouped as compact `same-selector` click-sequence
542
544
  receipts with click totals and ordinals. `tap_until` actions are summarized as
543
- one compact receipt with total taps and the final predicate value, which is the
544
- preferred shape for long canvas gameplay loops. Setup receipt sampling favors both
545
- first and last per-viewport receipts before filling remaining space, so late
546
- lifecycle phases such as terminal or restart remain visible in compact
547
- summaries.
545
+ one compact receipt with total taps, optional burst size, predicate-check count,
546
+ elapsed time, and the final predicate value, which is the preferred shape for
547
+ long canvas gameplay loops. Setup receipt sampling favors both first and last
548
+ per-viewport receipts before filling remaining space, so late lifecycle phases
549
+ such as terminal or restart remain visible in compact summaries.
548
550
 
549
551
  `target.timeout_sec` is optional. Use it for known-heavy profile targets so the
550
552
  profile carries its own hosted Riddle worker budget; an explicit CLI `--timeout`
@@ -633,6 +633,9 @@ function profileSetupTapUntilReceipts(results) {
633
633
  until_expected_value: result.until_expected_value ?? null,
634
634
  tap_count: result.tap_count ?? null,
635
635
  max_taps: result.max_taps ?? result.max_calls ?? null,
636
+ tap_burst_size: result.tap_burst_size ?? null,
637
+ condition_check_count: result.condition_check_count ?? null,
638
+ elapsed_ms: result.elapsed_ms ?? null,
636
639
  interval_ms: result.interval_ms ?? null,
637
640
  timeout_ms: result.timeout_ms ?? null,
638
641
  reason: result.reason ?? result.error ?? null
@@ -1273,6 +1276,10 @@ function normalizeSetupAction(input, index) {
1273
1276
  if ((type === "window_call_until" || type === "tap_until") && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
1274
1277
  throw new Error(`target.setup_actions[${index}].max_calls must be an integer from 1 to 100.`);
1275
1278
  }
1279
+ const tapBurstSize = type === "tap_until" ? numberValue(valueFromOwn(input, "tap_burst_size", "tapBurstSize", "burst_size", "burstSize", "check_every_taps", "checkEveryTaps", "predicate_interval_taps", "predicateIntervalTaps")) : void 0;
1280
+ if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
1281
+ throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
1282
+ }
1276
1283
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
1277
1284
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
1278
1285
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -1320,6 +1327,7 @@ function normalizeSetupAction(input, index) {
1320
1327
  until_path: untilPath,
1321
1328
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
1322
1329
  max_calls: maxCalls,
1330
+ tap_burst_size: tapBurstSize,
1323
1331
  interval_ms: intervalMs,
1324
1332
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
1325
1333
  min_value: minValue,
@@ -4559,6 +4567,9 @@ function profileSetupTapUntilReceipts(results) {
4559
4567
  until_expected_value: result.until_expected_value ?? null,
4560
4568
  tap_count: result.tap_count ?? null,
4561
4569
  max_taps: result.max_taps ?? result.max_calls ?? null,
4570
+ tap_burst_size: result.tap_burst_size ?? null,
4571
+ condition_check_count: result.condition_check_count ?? null,
4572
+ elapsed_ms: result.elapsed_ms ?? null,
4562
4573
  interval_ms: result.interval_ms ?? null,
4563
4574
  timeout_ms: result.timeout_ms ?? null,
4564
4575
  reason: result.reason || result.error || null,
@@ -6548,6 +6559,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6548
6559
  if (!untilPath) return { ...base, reason: "missing_until_path" };
6549
6560
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
6550
6561
  const maxTaps = Math.min(100, Math.max(1, Math.floor(setupNumber(action.max_taps ?? action.maxTaps ?? action.tap_limit ?? action.tapLimit ?? action.max_calls ?? action.maxCalls ?? action.max_attempts ?? action.maxAttempts ?? action.attempts, 1) || 1)));
6562
+ const tapBurstSize = Math.min(maxTaps, Math.min(100, Math.max(1, Math.floor(setupNumber(action.tap_burst_size ?? action.tapBurstSize ?? action.burst_size ?? action.burstSize ?? action.check_every_taps ?? action.checkEveryTaps ?? action.predicate_interval_taps ?? action.predicateIntervalTaps, 1) || 1))));
6551
6563
  const intervalMs = Math.min(5000, Math.max(0, Math.floor(setupNumber(action.interval_ms ?? action.intervalMs ?? action.poll_ms ?? action.pollMs ?? action.tap_interval_ms ?? action.tapIntervalMs, 100) || 0)));
6552
6564
  const scope = await setupActionScope(action, timeout);
6553
6565
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -6555,9 +6567,11 @@ async function executeSetupAction(action, ordinal, viewport) {
6555
6567
  if (prepared.result) return prepared.result;
6556
6568
  const startedAt = Date.now();
6557
6569
  let tapCount = 0;
6570
+ let conditionCheckCount = 1;
6558
6571
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6559
6572
  const targetEvidence = setupTapTargetEvidence(prepared.target);
6560
6573
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6574
+ const elapsedMs = Date.now() - startedAt;
6561
6575
  return {
6562
6576
  ...base,
6563
6577
  ...setupScopeEvidence(scope),
@@ -6569,15 +6583,24 @@ async function executeSetupAction(action, ordinal, viewport) {
6569
6583
  tap_count: tapCount,
6570
6584
  max_taps: maxTaps,
6571
6585
  max_calls: maxTaps,
6586
+ tap_burst_size: tapBurstSize,
6587
+ condition_check_count: conditionCheckCount,
6588
+ elapsed_ms: elapsedMs,
6572
6589
  interval_ms: intervalMs,
6573
6590
  timeout_ms: timeout,
6574
6591
  };
6575
6592
  }
6576
6593
  while (tapCount < maxTaps && Date.now() - startedAt <= timeout) {
6577
- await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
6578
- tapCount += 1;
6594
+ const burstCount = Math.min(tapBurstSize, maxTaps - tapCount);
6595
+ for (let burstIndex = 0; burstIndex < burstCount && Date.now() - startedAt <= timeout; burstIndex += 1) {
6596
+ await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
6597
+ tapCount += 1;
6598
+ if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
6599
+ }
6579
6600
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6601
+ conditionCheckCount += 1;
6580
6602
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6603
+ const elapsedMs = Date.now() - startedAt;
6581
6604
  return {
6582
6605
  ...base,
6583
6606
  ...setupScopeEvidence(scope),
@@ -6589,12 +6612,16 @@ async function executeSetupAction(action, ordinal, viewport) {
6589
6612
  tap_count: tapCount,
6590
6613
  max_taps: maxTaps,
6591
6614
  max_calls: maxTaps,
6615
+ tap_burst_size: tapBurstSize,
6616
+ condition_check_count: conditionCheckCount,
6617
+ elapsed_ms: elapsedMs,
6592
6618
  interval_ms: intervalMs,
6593
6619
  timeout_ms: timeout,
6594
6620
  };
6595
6621
  }
6596
6622
  if (tapCount < maxTaps && intervalMs) await page.waitForTimeout(intervalMs);
6597
6623
  }
6624
+ const elapsedMs = Date.now() - startedAt;
6598
6625
  return {
6599
6626
  ...base,
6600
6627
  ...setupScopeEvidence(scope),
@@ -6605,9 +6632,12 @@ async function executeSetupAction(action, ordinal, viewport) {
6605
6632
  tap_count: tapCount,
6606
6633
  max_taps: maxTaps,
6607
6634
  max_calls: maxTaps,
6635
+ tap_burst_size: tapBurstSize,
6636
+ condition_check_count: conditionCheckCount,
6637
+ elapsed_ms: elapsedMs,
6608
6638
  interval_ms: intervalMs,
6609
6639
  timeout_ms: timeout,
6610
- reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
6640
+ reason: elapsedMs > timeout ? "timeout" : "until_condition_not_met",
6611
6641
  missing_part: lastPredicateResult?.missing_part || undefined,
6612
6642
  };
6613
6643
  }
package/dist/cli.cjs CHANGED
@@ -7590,6 +7590,9 @@ function profileSetupTapUntilReceipts(results) {
7590
7590
  until_expected_value: result.until_expected_value ?? null,
7591
7591
  tap_count: result.tap_count ?? null,
7592
7592
  max_taps: result.max_taps ?? result.max_calls ?? null,
7593
+ tap_burst_size: result.tap_burst_size ?? null,
7594
+ condition_check_count: result.condition_check_count ?? null,
7595
+ elapsed_ms: result.elapsed_ms ?? null,
7593
7596
  interval_ms: result.interval_ms ?? null,
7594
7597
  timeout_ms: result.timeout_ms ?? null,
7595
7598
  reason: result.reason ?? result.error ?? null
@@ -8230,6 +8233,10 @@ function normalizeSetupAction(input, index) {
8230
8233
  if ((type === "window_call_until" || type === "tap_until") && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
8231
8234
  throw new Error(`target.setup_actions[${index}].max_calls must be an integer from 1 to 100.`);
8232
8235
  }
8236
+ const tapBurstSize = type === "tap_until" ? numberValue(valueFromOwn(input, "tap_burst_size", "tapBurstSize", "burst_size", "burstSize", "check_every_taps", "checkEveryTaps", "predicate_interval_taps", "predicateIntervalTaps")) : void 0;
8237
+ if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
8238
+ throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
8239
+ }
8233
8240
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
8234
8241
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
8235
8242
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -8277,6 +8284,7 @@ function normalizeSetupAction(input, index) {
8277
8284
  until_path: untilPath,
8278
8285
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
8279
8286
  max_calls: maxCalls,
8287
+ tap_burst_size: tapBurstSize,
8280
8288
  interval_ms: intervalMs,
8281
8289
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
8282
8290
  min_value: minValue,
@@ -11500,6 +11508,9 @@ function profileSetupTapUntilReceipts(results) {
11500
11508
  until_expected_value: result.until_expected_value ?? null,
11501
11509
  tap_count: result.tap_count ?? null,
11502
11510
  max_taps: result.max_taps ?? result.max_calls ?? null,
11511
+ tap_burst_size: result.tap_burst_size ?? null,
11512
+ condition_check_count: result.condition_check_count ?? null,
11513
+ elapsed_ms: result.elapsed_ms ?? null,
11503
11514
  interval_ms: result.interval_ms ?? null,
11504
11515
  timeout_ms: result.timeout_ms ?? null,
11505
11516
  reason: result.reason || result.error || null,
@@ -13489,6 +13500,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13489
13500
  if (!untilPath) return { ...base, reason: "missing_until_path" };
13490
13501
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
13491
13502
  const maxTaps = Math.min(100, Math.max(1, Math.floor(setupNumber(action.max_taps ?? action.maxTaps ?? action.tap_limit ?? action.tapLimit ?? action.max_calls ?? action.maxCalls ?? action.max_attempts ?? action.maxAttempts ?? action.attempts, 1) || 1)));
13503
+ const tapBurstSize = Math.min(maxTaps, Math.min(100, Math.max(1, Math.floor(setupNumber(action.tap_burst_size ?? action.tapBurstSize ?? action.burst_size ?? action.burstSize ?? action.check_every_taps ?? action.checkEveryTaps ?? action.predicate_interval_taps ?? action.predicateIntervalTaps, 1) || 1))));
13492
13504
  const intervalMs = Math.min(5000, Math.max(0, Math.floor(setupNumber(action.interval_ms ?? action.intervalMs ?? action.poll_ms ?? action.pollMs ?? action.tap_interval_ms ?? action.tapIntervalMs, 100) || 0)));
13493
13505
  const scope = await setupActionScope(action, timeout);
13494
13506
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -13496,9 +13508,11 @@ async function executeSetupAction(action, ordinal, viewport) {
13496
13508
  if (prepared.result) return prepared.result;
13497
13509
  const startedAt = Date.now();
13498
13510
  let tapCount = 0;
13511
+ let conditionCheckCount = 1;
13499
13512
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
13500
13513
  const targetEvidence = setupTapTargetEvidence(prepared.target);
13501
13514
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
13515
+ const elapsedMs = Date.now() - startedAt;
13502
13516
  return {
13503
13517
  ...base,
13504
13518
  ...setupScopeEvidence(scope),
@@ -13510,15 +13524,24 @@ async function executeSetupAction(action, ordinal, viewport) {
13510
13524
  tap_count: tapCount,
13511
13525
  max_taps: maxTaps,
13512
13526
  max_calls: maxTaps,
13527
+ tap_burst_size: tapBurstSize,
13528
+ condition_check_count: conditionCheckCount,
13529
+ elapsed_ms: elapsedMs,
13513
13530
  interval_ms: intervalMs,
13514
13531
  timeout_ms: timeout,
13515
13532
  };
13516
13533
  }
13517
13534
  while (tapCount < maxTaps && Date.now() - startedAt <= timeout) {
13518
- await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
13519
- tapCount += 1;
13535
+ const burstCount = Math.min(tapBurstSize, maxTaps - tapCount);
13536
+ for (let burstIndex = 0; burstIndex < burstCount && Date.now() - startedAt <= timeout; burstIndex += 1) {
13537
+ await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
13538
+ tapCount += 1;
13539
+ if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
13540
+ }
13520
13541
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
13542
+ conditionCheckCount += 1;
13521
13543
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
13544
+ const elapsedMs = Date.now() - startedAt;
13522
13545
  return {
13523
13546
  ...base,
13524
13547
  ...setupScopeEvidence(scope),
@@ -13530,12 +13553,16 @@ async function executeSetupAction(action, ordinal, viewport) {
13530
13553
  tap_count: tapCount,
13531
13554
  max_taps: maxTaps,
13532
13555
  max_calls: maxTaps,
13556
+ tap_burst_size: tapBurstSize,
13557
+ condition_check_count: conditionCheckCount,
13558
+ elapsed_ms: elapsedMs,
13533
13559
  interval_ms: intervalMs,
13534
13560
  timeout_ms: timeout,
13535
13561
  };
13536
13562
  }
13537
13563
  if (tapCount < maxTaps && intervalMs) await page.waitForTimeout(intervalMs);
13538
13564
  }
13565
+ const elapsedMs = Date.now() - startedAt;
13539
13566
  return {
13540
13567
  ...base,
13541
13568
  ...setupScopeEvidence(scope),
@@ -13546,9 +13573,12 @@ async function executeSetupAction(action, ordinal, viewport) {
13546
13573
  tap_count: tapCount,
13547
13574
  max_taps: maxTaps,
13548
13575
  max_calls: maxTaps,
13576
+ tap_burst_size: tapBurstSize,
13577
+ condition_check_count: conditionCheckCount,
13578
+ elapsed_ms: elapsedMs,
13549
13579
  interval_ms: intervalMs,
13550
13580
  timeout_ms: timeout,
13551
- reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
13581
+ reason: elapsedMs > timeout ? "timeout" : "until_condition_not_met",
13552
13582
  missing_part: lastPredicateResult?.missing_part || undefined,
13553
13583
  };
13554
13584
  }
@@ -18052,11 +18082,17 @@ function profileSetupSummaryMarkdown(result) {
18052
18082
  const actual = cliValueLabel(receipt.until_value);
18053
18083
  const tapCount = cliFiniteNumber(receipt.tap_count);
18054
18084
  const maxTaps = cliFiniteNumber(receipt.max_taps) ?? cliFiniteNumber(receipt.max_calls);
18085
+ const tapBurstSize = cliFiniteNumber(receipt.tap_burst_size);
18086
+ const conditionCheckCount = cliFiniteNumber(receipt.condition_check_count);
18087
+ const elapsedMs3 = cliFiniteNumber(receipt.elapsed_ms);
18055
18088
  const ok = receipt.ok === false ? "failed" : "ok";
18056
18089
  const reason = cliString(receipt.reason);
18057
18090
  const coordinateText = x && y ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${x},${y}`)}` : "";
18058
18091
  const tapText = tapCount === void 0 ? "" : ` in ${tapCount}${maxTaps === void 0 ? "" : `/${maxTaps}`} tap(s)`;
18059
- lines.push(`- ${name} tap_until: ${ok}, ${markdownInlineCode(selector)}${pointerType ? ` ${markdownInlineCode(pointerType)}` : ""}${inputDispatch ? ` via ${markdownInlineCode(inputDispatch)}` : ""}${coordinateText}${durationMs === void 0 ? "" : `, duration ${durationMs}ms`} until ${markdownInlineCode(untilPath)}${expected === void 0 ? "" : ` == ${markdownInlineCode(expected, 80)}`}${tapText}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
18092
+ const burstText = tapBurstSize === void 0 || tapBurstSize <= 1 ? "" : `, burst ${tapBurstSize}`;
18093
+ const conditionCheckText = conditionCheckCount === void 0 ? "" : `, ${conditionCheckCount} check(s)`;
18094
+ const elapsedText = elapsedMs3 === void 0 ? "" : `, elapsed ${elapsedMs3}ms`;
18095
+ lines.push(`- ${name} tap_until: ${ok}, ${markdownInlineCode(selector)}${pointerType ? ` ${markdownInlineCode(pointerType)}` : ""}${inputDispatch ? ` via ${markdownInlineCode(inputDispatch)}` : ""}${coordinateText}${durationMs === void 0 ? "" : `, duration ${durationMs}ms`} until ${markdownInlineCode(untilPath)}${expected === void 0 ? "" : ` == ${markdownInlineCode(expected, 80)}`}${tapText}${burstText}${conditionCheckText}${elapsedText}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
18060
18096
  }
18061
18097
  if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
18062
18098
  const keyboardGroups = viewports.map((viewport) => {
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  profileStatusExitCode,
14
14
  resolveRiddleProofProfileTargetUrl,
15
15
  resolveRiddleProofProfileTimeoutSec
16
- } from "./chunk-DL6UB4N6.js";
16
+ } from "./chunk-FNVDZCVZ.js";
17
17
  import {
18
18
  createRiddleApiClient,
19
19
  isTerminalRiddleJobStatus,
@@ -1919,11 +1919,17 @@ function profileSetupSummaryMarkdown(result) {
1919
1919
  const actual = cliValueLabel(receipt.until_value);
1920
1920
  const tapCount = cliFiniteNumber(receipt.tap_count);
1921
1921
  const maxTaps = cliFiniteNumber(receipt.max_taps) ?? cliFiniteNumber(receipt.max_calls);
1922
+ const tapBurstSize = cliFiniteNumber(receipt.tap_burst_size);
1923
+ const conditionCheckCount = cliFiniteNumber(receipt.condition_check_count);
1924
+ const elapsedMs = cliFiniteNumber(receipt.elapsed_ms);
1922
1925
  const ok = receipt.ok === false ? "failed" : "ok";
1923
1926
  const reason = cliString(receipt.reason);
1924
1927
  const coordinateText = x && y ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${x},${y}`)}` : "";
1925
1928
  const tapText = tapCount === void 0 ? "" : ` in ${tapCount}${maxTaps === void 0 ? "" : `/${maxTaps}`} tap(s)`;
1926
- lines.push(`- ${name} tap_until: ${ok}, ${markdownInlineCode(selector)}${pointerType ? ` ${markdownInlineCode(pointerType)}` : ""}${inputDispatch ? ` via ${markdownInlineCode(inputDispatch)}` : ""}${coordinateText}${durationMs === void 0 ? "" : `, duration ${durationMs}ms`} until ${markdownInlineCode(untilPath)}${expected === void 0 ? "" : ` == ${markdownInlineCode(expected, 80)}`}${tapText}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
1929
+ const burstText = tapBurstSize === void 0 || tapBurstSize <= 1 ? "" : `, burst ${tapBurstSize}`;
1930
+ const conditionCheckText = conditionCheckCount === void 0 ? "" : `, ${conditionCheckCount} check(s)`;
1931
+ const elapsedText = elapsedMs === void 0 ? "" : `, elapsed ${elapsedMs}ms`;
1932
+ lines.push(`- ${name} tap_until: ${ok}, ${markdownInlineCode(selector)}${pointerType ? ` ${markdownInlineCode(pointerType)}` : ""}${inputDispatch ? ` via ${markdownInlineCode(inputDispatch)}` : ""}${coordinateText}${durationMs === void 0 ? "" : `, duration ${durationMs}ms`} until ${markdownInlineCode(untilPath)}${expected === void 0 ? "" : ` == ${markdownInlineCode(expected, 80)}`}${tapText}${burstText}${conditionCheckText}${elapsedText}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
1927
1933
  }
1928
1934
  if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
1929
1935
  const keyboardGroups = viewports.map((viewport) => {
package/dist/index.cjs CHANGED
@@ -9366,6 +9366,9 @@ function profileSetupTapUntilReceipts(results) {
9366
9366
  until_expected_value: result.until_expected_value ?? null,
9367
9367
  tap_count: result.tap_count ?? null,
9368
9368
  max_taps: result.max_taps ?? result.max_calls ?? null,
9369
+ tap_burst_size: result.tap_burst_size ?? null,
9370
+ condition_check_count: result.condition_check_count ?? null,
9371
+ elapsed_ms: result.elapsed_ms ?? null,
9369
9372
  interval_ms: result.interval_ms ?? null,
9370
9373
  timeout_ms: result.timeout_ms ?? null,
9371
9374
  reason: result.reason ?? result.error ?? null
@@ -10006,6 +10009,10 @@ function normalizeSetupAction(input, index) {
10006
10009
  if ((type === "window_call_until" || type === "tap_until") && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
10007
10010
  throw new Error(`target.setup_actions[${index}].max_calls must be an integer from 1 to 100.`);
10008
10011
  }
10012
+ const tapBurstSize = type === "tap_until" ? numberValue3(valueFromOwn(input, "tap_burst_size", "tapBurstSize", "burst_size", "burstSize", "check_every_taps", "checkEveryTaps", "predicate_interval_taps", "predicateIntervalTaps")) : void 0;
10013
+ if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
10014
+ throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
10015
+ }
10009
10016
  const intervalMs = numberValue3(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
10010
10017
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
10011
10018
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -10053,6 +10060,7 @@ function normalizeSetupAction(input, index) {
10053
10060
  until_path: untilPath,
10054
10061
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
10055
10062
  max_calls: maxCalls,
10063
+ tap_burst_size: tapBurstSize,
10056
10064
  interval_ms: intervalMs,
10057
10065
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
10058
10066
  min_value: minValue,
@@ -13292,6 +13300,9 @@ function profileSetupTapUntilReceipts(results) {
13292
13300
  until_expected_value: result.until_expected_value ?? null,
13293
13301
  tap_count: result.tap_count ?? null,
13294
13302
  max_taps: result.max_taps ?? result.max_calls ?? null,
13303
+ tap_burst_size: result.tap_burst_size ?? null,
13304
+ condition_check_count: result.condition_check_count ?? null,
13305
+ elapsed_ms: result.elapsed_ms ?? null,
13295
13306
  interval_ms: result.interval_ms ?? null,
13296
13307
  timeout_ms: result.timeout_ms ?? null,
13297
13308
  reason: result.reason || result.error || null,
@@ -15281,6 +15292,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15281
15292
  if (!untilPath) return { ...base, reason: "missing_until_path" };
15282
15293
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
15283
15294
  const maxTaps = Math.min(100, Math.max(1, Math.floor(setupNumber(action.max_taps ?? action.maxTaps ?? action.tap_limit ?? action.tapLimit ?? action.max_calls ?? action.maxCalls ?? action.max_attempts ?? action.maxAttempts ?? action.attempts, 1) || 1)));
15295
+ const tapBurstSize = Math.min(maxTaps, Math.min(100, Math.max(1, Math.floor(setupNumber(action.tap_burst_size ?? action.tapBurstSize ?? action.burst_size ?? action.burstSize ?? action.check_every_taps ?? action.checkEveryTaps ?? action.predicate_interval_taps ?? action.predicateIntervalTaps, 1) || 1))));
15284
15296
  const intervalMs = Math.min(5000, Math.max(0, Math.floor(setupNumber(action.interval_ms ?? action.intervalMs ?? action.poll_ms ?? action.pollMs ?? action.tap_interval_ms ?? action.tapIntervalMs, 100) || 0)));
15285
15297
  const scope = await setupActionScope(action, timeout);
15286
15298
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -15288,9 +15300,11 @@ async function executeSetupAction(action, ordinal, viewport) {
15288
15300
  if (prepared.result) return prepared.result;
15289
15301
  const startedAt = Date.now();
15290
15302
  let tapCount = 0;
15303
+ let conditionCheckCount = 1;
15291
15304
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
15292
15305
  const targetEvidence = setupTapTargetEvidence(prepared.target);
15293
15306
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
15307
+ const elapsedMs = Date.now() - startedAt;
15294
15308
  return {
15295
15309
  ...base,
15296
15310
  ...setupScopeEvidence(scope),
@@ -15302,15 +15316,24 @@ async function executeSetupAction(action, ordinal, viewport) {
15302
15316
  tap_count: tapCount,
15303
15317
  max_taps: maxTaps,
15304
15318
  max_calls: maxTaps,
15319
+ tap_burst_size: tapBurstSize,
15320
+ condition_check_count: conditionCheckCount,
15321
+ elapsed_ms: elapsedMs,
15305
15322
  interval_ms: intervalMs,
15306
15323
  timeout_ms: timeout,
15307
15324
  };
15308
15325
  }
15309
15326
  while (tapCount < maxTaps && Date.now() - startedAt <= timeout) {
15310
- await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
15311
- tapCount += 1;
15327
+ const burstCount = Math.min(tapBurstSize, maxTaps - tapCount);
15328
+ for (let burstIndex = 0; burstIndex < burstCount && Date.now() - startedAt <= timeout; burstIndex += 1) {
15329
+ await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
15330
+ tapCount += 1;
15331
+ if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
15332
+ }
15312
15333
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
15334
+ conditionCheckCount += 1;
15313
15335
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
15336
+ const elapsedMs = Date.now() - startedAt;
15314
15337
  return {
15315
15338
  ...base,
15316
15339
  ...setupScopeEvidence(scope),
@@ -15322,12 +15345,16 @@ async function executeSetupAction(action, ordinal, viewport) {
15322
15345
  tap_count: tapCount,
15323
15346
  max_taps: maxTaps,
15324
15347
  max_calls: maxTaps,
15348
+ tap_burst_size: tapBurstSize,
15349
+ condition_check_count: conditionCheckCount,
15350
+ elapsed_ms: elapsedMs,
15325
15351
  interval_ms: intervalMs,
15326
15352
  timeout_ms: timeout,
15327
15353
  };
15328
15354
  }
15329
15355
  if (tapCount < maxTaps && intervalMs) await page.waitForTimeout(intervalMs);
15330
15356
  }
15357
+ const elapsedMs = Date.now() - startedAt;
15331
15358
  return {
15332
15359
  ...base,
15333
15360
  ...setupScopeEvidence(scope),
@@ -15338,9 +15365,12 @@ async function executeSetupAction(action, ordinal, viewport) {
15338
15365
  tap_count: tapCount,
15339
15366
  max_taps: maxTaps,
15340
15367
  max_calls: maxTaps,
15368
+ tap_burst_size: tapBurstSize,
15369
+ condition_check_count: conditionCheckCount,
15370
+ elapsed_ms: elapsedMs,
15341
15371
  interval_ms: intervalMs,
15342
15372
  timeout_ms: timeout,
15343
- reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
15373
+ reason: elapsedMs > timeout ? "timeout" : "until_condition_not_met",
15344
15374
  missing_part: lastPredicateResult?.missing_part || undefined,
15345
15375
  };
15346
15376
  }
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  resolveRiddleProofProfileTimeoutSec,
63
63
  slugifyRiddleProofProfileName,
64
64
  summarizeRiddleProofProfileResult
65
- } from "./chunk-DL6UB4N6.js";
65
+ } from "./chunk-FNVDZCVZ.js";
66
66
  import {
67
67
  DEFAULT_RIDDLE_API_BASE_URL,
68
68
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -680,6 +680,9 @@ function profileSetupTapUntilReceipts(results) {
680
680
  until_expected_value: result.until_expected_value ?? null,
681
681
  tap_count: result.tap_count ?? null,
682
682
  max_taps: result.max_taps ?? result.max_calls ?? null,
683
+ tap_burst_size: result.tap_burst_size ?? null,
684
+ condition_check_count: result.condition_check_count ?? null,
685
+ elapsed_ms: result.elapsed_ms ?? null,
683
686
  interval_ms: result.interval_ms ?? null,
684
687
  timeout_ms: result.timeout_ms ?? null,
685
688
  reason: result.reason ?? result.error ?? null
@@ -1320,6 +1323,10 @@ function normalizeSetupAction(input, index) {
1320
1323
  if ((type === "window_call_until" || type === "tap_until") && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
1321
1324
  throw new Error(`target.setup_actions[${index}].max_calls must be an integer from 1 to 100.`);
1322
1325
  }
1326
+ const tapBurstSize = type === "tap_until" ? numberValue(valueFromOwn(input, "tap_burst_size", "tapBurstSize", "burst_size", "burstSize", "check_every_taps", "checkEveryTaps", "predicate_interval_taps", "predicateIntervalTaps")) : void 0;
1327
+ if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
1328
+ throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
1329
+ }
1323
1330
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
1324
1331
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
1325
1332
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -1367,6 +1374,7 @@ function normalizeSetupAction(input, index) {
1367
1374
  until_path: untilPath,
1368
1375
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
1369
1376
  max_calls: maxCalls,
1377
+ tap_burst_size: tapBurstSize,
1370
1378
  interval_ms: intervalMs,
1371
1379
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
1372
1380
  min_value: minValue,
@@ -4606,6 +4614,9 @@ function profileSetupTapUntilReceipts(results) {
4606
4614
  until_expected_value: result.until_expected_value ?? null,
4607
4615
  tap_count: result.tap_count ?? null,
4608
4616
  max_taps: result.max_taps ?? result.max_calls ?? null,
4617
+ tap_burst_size: result.tap_burst_size ?? null,
4618
+ condition_check_count: result.condition_check_count ?? null,
4619
+ elapsed_ms: result.elapsed_ms ?? null,
4609
4620
  interval_ms: result.interval_ms ?? null,
4610
4621
  timeout_ms: result.timeout_ms ?? null,
4611
4622
  reason: result.reason || result.error || null,
@@ -6595,6 +6606,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6595
6606
  if (!untilPath) return { ...base, reason: "missing_until_path" };
6596
6607
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
6597
6608
  const maxTaps = Math.min(100, Math.max(1, Math.floor(setupNumber(action.max_taps ?? action.maxTaps ?? action.tap_limit ?? action.tapLimit ?? action.max_calls ?? action.maxCalls ?? action.max_attempts ?? action.maxAttempts ?? action.attempts, 1) || 1)));
6609
+ const tapBurstSize = Math.min(maxTaps, Math.min(100, Math.max(1, Math.floor(setupNumber(action.tap_burst_size ?? action.tapBurstSize ?? action.burst_size ?? action.burstSize ?? action.check_every_taps ?? action.checkEveryTaps ?? action.predicate_interval_taps ?? action.predicateIntervalTaps, 1) || 1))));
6598
6610
  const intervalMs = Math.min(5000, Math.max(0, Math.floor(setupNumber(action.interval_ms ?? action.intervalMs ?? action.poll_ms ?? action.pollMs ?? action.tap_interval_ms ?? action.tapIntervalMs, 100) || 0)));
6599
6611
  const scope = await setupActionScope(action, timeout);
6600
6612
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -6602,9 +6614,11 @@ async function executeSetupAction(action, ordinal, viewport) {
6602
6614
  if (prepared.result) return prepared.result;
6603
6615
  const startedAt = Date.now();
6604
6616
  let tapCount = 0;
6617
+ let conditionCheckCount = 1;
6605
6618
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6606
6619
  const targetEvidence = setupTapTargetEvidence(prepared.target);
6607
6620
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6621
+ const elapsedMs = Date.now() - startedAt;
6608
6622
  return {
6609
6623
  ...base,
6610
6624
  ...setupScopeEvidence(scope),
@@ -6616,15 +6630,24 @@ async function executeSetupAction(action, ordinal, viewport) {
6616
6630
  tap_count: tapCount,
6617
6631
  max_taps: maxTaps,
6618
6632
  max_calls: maxTaps,
6633
+ tap_burst_size: tapBurstSize,
6634
+ condition_check_count: conditionCheckCount,
6635
+ elapsed_ms: elapsedMs,
6619
6636
  interval_ms: intervalMs,
6620
6637
  timeout_ms: timeout,
6621
6638
  };
6622
6639
  }
6623
6640
  while (tapCount < maxTaps && Date.now() - startedAt <= timeout) {
6624
- await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
6625
- tapCount += 1;
6641
+ const burstCount = Math.min(tapBurstSize, maxTaps - tapCount);
6642
+ for (let burstIndex = 0; burstIndex < burstCount && Date.now() - startedAt <= timeout; burstIndex += 1) {
6643
+ await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
6644
+ tapCount += 1;
6645
+ if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
6646
+ }
6626
6647
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6648
+ conditionCheckCount += 1;
6627
6649
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6650
+ const elapsedMs = Date.now() - startedAt;
6628
6651
  return {
6629
6652
  ...base,
6630
6653
  ...setupScopeEvidence(scope),
@@ -6636,12 +6659,16 @@ async function executeSetupAction(action, ordinal, viewport) {
6636
6659
  tap_count: tapCount,
6637
6660
  max_taps: maxTaps,
6638
6661
  max_calls: maxTaps,
6662
+ tap_burst_size: tapBurstSize,
6663
+ condition_check_count: conditionCheckCount,
6664
+ elapsed_ms: elapsedMs,
6639
6665
  interval_ms: intervalMs,
6640
6666
  timeout_ms: timeout,
6641
6667
  };
6642
6668
  }
6643
6669
  if (tapCount < maxTaps && intervalMs) await page.waitForTimeout(intervalMs);
6644
6670
  }
6671
+ const elapsedMs = Date.now() - startedAt;
6645
6672
  return {
6646
6673
  ...base,
6647
6674
  ...setupScopeEvidence(scope),
@@ -6652,9 +6679,12 @@ async function executeSetupAction(action, ordinal, viewport) {
6652
6679
  tap_count: tapCount,
6653
6680
  max_taps: maxTaps,
6654
6681
  max_calls: maxTaps,
6682
+ tap_burst_size: tapBurstSize,
6683
+ condition_check_count: conditionCheckCount,
6684
+ elapsed_ms: elapsedMs,
6655
6685
  interval_ms: intervalMs,
6656
6686
  timeout_ms: timeout,
6657
- reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
6687
+ reason: elapsedMs > timeout ? "timeout" : "until_condition_not_met",
6658
6688
  missing_part: lastPredicateResult?.missing_part || undefined,
6659
6689
  };
6660
6690
  }
@@ -146,6 +146,7 @@ interface RiddleProofProfileSetupAction {
146
146
  until_path?: string;
147
147
  until_expected_value?: JsonValue;
148
148
  max_calls?: number;
149
+ tap_burst_size?: number;
149
150
  interval_ms?: number;
150
151
  expected_value?: JsonValue;
151
152
  min_value?: number;
package/dist/profile.d.ts CHANGED
@@ -146,6 +146,7 @@ interface RiddleProofProfileSetupAction {
146
146
  until_path?: string;
147
147
  until_expected_value?: JsonValue;
148
148
  max_calls?: number;
149
+ tap_burst_size?: number;
149
150
  interval_ms?: number;
150
151
  expected_value?: JsonValue;
151
152
  min_value?: number;
package/dist/profile.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  resolveRiddleProofProfileTimeoutSec,
24
24
  slugifyRiddleProofProfileName,
25
25
  summarizeRiddleProofProfileResult
26
- } from "./chunk-DL6UB4N6.js";
26
+ } from "./chunk-FNVDZCVZ.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.198",
3
+ "version": "0.7.200",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",