@riddledc/riddle-proof 0.7.198 → 0.7.199

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,10 +440,11 @@ 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
445
- details, so long canvas interaction loops do not need dozens of repeated setup
446
- actions.
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`, final `until_value`, and input dispatch details, so
447
+ long canvas interaction loops do not need dozens of repeated setup actions.
447
448
  Use `set_range_value` for HTML range inputs and React-controlled sliders. It
448
449
  accepts aliases such as `set-slider-value`, requires `selector` plus `value`,
449
450
  uses the native input value setter, dispatches bubbling `input` and `change`
@@ -540,11 +541,11 @@ included in clicked-target evidence and rolled up as `click_count_action_total`
540
541
  and `click_count_value_total`. Repeated selector runs such as long gameplay
541
542
  button loops are also grouped as compact `same-selector` click-sequence
542
543
  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.
544
+ one compact receipt with total taps, optional burst size, predicate-check count,
545
+ and the final predicate value, which is the preferred shape for long canvas
546
+ gameplay loops. Setup receipt sampling favors both first and last per-viewport
547
+ receipts before filling remaining space, so late lifecycle phases such as
548
+ terminal or restart remain visible in compact summaries.
548
549
 
549
550
  `target.timeout_sec` is optional. Use it for known-heavy profile targets so the
550
551
  profile carries its own hosted Riddle worker budget; an explicit CLI `--timeout`
@@ -633,6 +633,8 @@ 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,
636
638
  interval_ms: result.interval_ms ?? null,
637
639
  timeout_ms: result.timeout_ms ?? null,
638
640
  reason: result.reason ?? result.error ?? null
@@ -1273,6 +1275,10 @@ function normalizeSetupAction(input, index) {
1273
1275
  if ((type === "window_call_until" || type === "tap_until") && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
1274
1276
  throw new Error(`target.setup_actions[${index}].max_calls must be an integer from 1 to 100.`);
1275
1277
  }
1278
+ 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;
1279
+ if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
1280
+ throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
1281
+ }
1276
1282
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
1277
1283
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
1278
1284
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -1320,6 +1326,7 @@ function normalizeSetupAction(input, index) {
1320
1326
  until_path: untilPath,
1321
1327
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
1322
1328
  max_calls: maxCalls,
1329
+ tap_burst_size: tapBurstSize,
1323
1330
  interval_ms: intervalMs,
1324
1331
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
1325
1332
  min_value: minValue,
@@ -4559,6 +4566,8 @@ function profileSetupTapUntilReceipts(results) {
4559
4566
  until_expected_value: result.until_expected_value ?? null,
4560
4567
  tap_count: result.tap_count ?? null,
4561
4568
  max_taps: result.max_taps ?? result.max_calls ?? null,
4569
+ tap_burst_size: result.tap_burst_size ?? null,
4570
+ condition_check_count: result.condition_check_count ?? null,
4562
4571
  interval_ms: result.interval_ms ?? null,
4563
4572
  timeout_ms: result.timeout_ms ?? null,
4564
4573
  reason: result.reason || result.error || null,
@@ -6548,6 +6557,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6548
6557
  if (!untilPath) return { ...base, reason: "missing_until_path" };
6549
6558
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
6550
6559
  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)));
6560
+ 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
6561
  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
6562
  const scope = await setupActionScope(action, timeout);
6553
6563
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -6555,6 +6565,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6555
6565
  if (prepared.result) return prepared.result;
6556
6566
  const startedAt = Date.now();
6557
6567
  let tapCount = 0;
6568
+ let conditionCheckCount = 1;
6558
6569
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6559
6570
  const targetEvidence = setupTapTargetEvidence(prepared.target);
6560
6571
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
@@ -6569,14 +6580,21 @@ async function executeSetupAction(action, ordinal, viewport) {
6569
6580
  tap_count: tapCount,
6570
6581
  max_taps: maxTaps,
6571
6582
  max_calls: maxTaps,
6583
+ tap_burst_size: tapBurstSize,
6584
+ condition_check_count: conditionCheckCount,
6572
6585
  interval_ms: intervalMs,
6573
6586
  timeout_ms: timeout,
6574
6587
  };
6575
6588
  }
6576
6589
  while (tapCount < maxTaps && Date.now() - startedAt <= timeout) {
6577
- await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
6578
- tapCount += 1;
6590
+ const burstCount = Math.min(tapBurstSize, maxTaps - tapCount);
6591
+ for (let burstIndex = 0; burstIndex < burstCount && Date.now() - startedAt <= timeout; burstIndex += 1) {
6592
+ await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
6593
+ tapCount += 1;
6594
+ if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
6595
+ }
6579
6596
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6597
+ conditionCheckCount += 1;
6580
6598
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6581
6599
  return {
6582
6600
  ...base,
@@ -6589,6 +6607,8 @@ async function executeSetupAction(action, ordinal, viewport) {
6589
6607
  tap_count: tapCount,
6590
6608
  max_taps: maxTaps,
6591
6609
  max_calls: maxTaps,
6610
+ tap_burst_size: tapBurstSize,
6611
+ condition_check_count: conditionCheckCount,
6592
6612
  interval_ms: intervalMs,
6593
6613
  timeout_ms: timeout,
6594
6614
  };
@@ -6605,6 +6625,8 @@ async function executeSetupAction(action, ordinal, viewport) {
6605
6625
  tap_count: tapCount,
6606
6626
  max_taps: maxTaps,
6607
6627
  max_calls: maxTaps,
6628
+ tap_burst_size: tapBurstSize,
6629
+ condition_check_count: conditionCheckCount,
6608
6630
  interval_ms: intervalMs,
6609
6631
  timeout_ms: timeout,
6610
6632
  reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
package/dist/cli.cjs CHANGED
@@ -7590,6 +7590,8 @@ 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,
7593
7595
  interval_ms: result.interval_ms ?? null,
7594
7596
  timeout_ms: result.timeout_ms ?? null,
7595
7597
  reason: result.reason ?? result.error ?? null
@@ -8230,6 +8232,10 @@ function normalizeSetupAction(input, index) {
8230
8232
  if ((type === "window_call_until" || type === "tap_until") && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
8231
8233
  throw new Error(`target.setup_actions[${index}].max_calls must be an integer from 1 to 100.`);
8232
8234
  }
8235
+ 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;
8236
+ if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
8237
+ throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
8238
+ }
8233
8239
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
8234
8240
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
8235
8241
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -8277,6 +8283,7 @@ function normalizeSetupAction(input, index) {
8277
8283
  until_path: untilPath,
8278
8284
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
8279
8285
  max_calls: maxCalls,
8286
+ tap_burst_size: tapBurstSize,
8280
8287
  interval_ms: intervalMs,
8281
8288
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
8282
8289
  min_value: minValue,
@@ -11500,6 +11507,8 @@ function profileSetupTapUntilReceipts(results) {
11500
11507
  until_expected_value: result.until_expected_value ?? null,
11501
11508
  tap_count: result.tap_count ?? null,
11502
11509
  max_taps: result.max_taps ?? result.max_calls ?? null,
11510
+ tap_burst_size: result.tap_burst_size ?? null,
11511
+ condition_check_count: result.condition_check_count ?? null,
11503
11512
  interval_ms: result.interval_ms ?? null,
11504
11513
  timeout_ms: result.timeout_ms ?? null,
11505
11514
  reason: result.reason || result.error || null,
@@ -13489,6 +13498,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13489
13498
  if (!untilPath) return { ...base, reason: "missing_until_path" };
13490
13499
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
13491
13500
  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)));
13501
+ 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
13502
  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
13503
  const scope = await setupActionScope(action, timeout);
13494
13504
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -13496,6 +13506,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13496
13506
  if (prepared.result) return prepared.result;
13497
13507
  const startedAt = Date.now();
13498
13508
  let tapCount = 0;
13509
+ let conditionCheckCount = 1;
13499
13510
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
13500
13511
  const targetEvidence = setupTapTargetEvidence(prepared.target);
13501
13512
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
@@ -13510,14 +13521,21 @@ async function executeSetupAction(action, ordinal, viewport) {
13510
13521
  tap_count: tapCount,
13511
13522
  max_taps: maxTaps,
13512
13523
  max_calls: maxTaps,
13524
+ tap_burst_size: tapBurstSize,
13525
+ condition_check_count: conditionCheckCount,
13513
13526
  interval_ms: intervalMs,
13514
13527
  timeout_ms: timeout,
13515
13528
  };
13516
13529
  }
13517
13530
  while (tapCount < maxTaps && Date.now() - startedAt <= timeout) {
13518
- await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
13519
- tapCount += 1;
13531
+ const burstCount = Math.min(tapBurstSize, maxTaps - tapCount);
13532
+ for (let burstIndex = 0; burstIndex < burstCount && Date.now() - startedAt <= timeout; burstIndex += 1) {
13533
+ await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
13534
+ tapCount += 1;
13535
+ if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
13536
+ }
13520
13537
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
13538
+ conditionCheckCount += 1;
13521
13539
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
13522
13540
  return {
13523
13541
  ...base,
@@ -13530,6 +13548,8 @@ async function executeSetupAction(action, ordinal, viewport) {
13530
13548
  tap_count: tapCount,
13531
13549
  max_taps: maxTaps,
13532
13550
  max_calls: maxTaps,
13551
+ tap_burst_size: tapBurstSize,
13552
+ condition_check_count: conditionCheckCount,
13533
13553
  interval_ms: intervalMs,
13534
13554
  timeout_ms: timeout,
13535
13555
  };
@@ -13546,6 +13566,8 @@ async function executeSetupAction(action, ordinal, viewport) {
13546
13566
  tap_count: tapCount,
13547
13567
  max_taps: maxTaps,
13548
13568
  max_calls: maxTaps,
13569
+ tap_burst_size: tapBurstSize,
13570
+ condition_check_count: conditionCheckCount,
13549
13571
  interval_ms: intervalMs,
13550
13572
  timeout_ms: timeout,
13551
13573
  reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
@@ -18052,11 +18074,15 @@ function profileSetupSummaryMarkdown(result) {
18052
18074
  const actual = cliValueLabel(receipt.until_value);
18053
18075
  const tapCount = cliFiniteNumber(receipt.tap_count);
18054
18076
  const maxTaps = cliFiniteNumber(receipt.max_taps) ?? cliFiniteNumber(receipt.max_calls);
18077
+ const tapBurstSize = cliFiniteNumber(receipt.tap_burst_size);
18078
+ const conditionCheckCount = cliFiniteNumber(receipt.condition_check_count);
18055
18079
  const ok = receipt.ok === false ? "failed" : "ok";
18056
18080
  const reason = cliString(receipt.reason);
18057
18081
  const coordinateText = x && y ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${x},${y}`)}` : "";
18058
18082
  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)}` : ""}`);
18083
+ const burstText = tapBurstSize === void 0 || tapBurstSize <= 1 ? "" : `, burst ${tapBurstSize}`;
18084
+ const conditionCheckText = conditionCheckCount === void 0 ? "" : `, ${conditionCheckCount} check(s)`;
18085
+ 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}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
18060
18086
  }
18061
18087
  if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
18062
18088
  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-EXFYPLP2.js";
17
17
  import {
18
18
  createRiddleApiClient,
19
19
  isTerminalRiddleJobStatus,
@@ -1919,11 +1919,15 @@ 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);
1922
1924
  const ok = receipt.ok === false ? "failed" : "ok";
1923
1925
  const reason = cliString(receipt.reason);
1924
1926
  const coordinateText = x && y ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${x},${y}`)}` : "";
1925
1927
  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)}` : ""}`);
1928
+ const burstText = tapBurstSize === void 0 || tapBurstSize <= 1 ? "" : `, burst ${tapBurstSize}`;
1929
+ const conditionCheckText = conditionCheckCount === void 0 ? "" : `, ${conditionCheckCount} check(s)`;
1930
+ 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}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
1927
1931
  }
1928
1932
  if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
1929
1933
  const keyboardGroups = viewports.map((viewport) => {
package/dist/index.cjs CHANGED
@@ -9366,6 +9366,8 @@ 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,
9369
9371
  interval_ms: result.interval_ms ?? null,
9370
9372
  timeout_ms: result.timeout_ms ?? null,
9371
9373
  reason: result.reason ?? result.error ?? null
@@ -10006,6 +10008,10 @@ function normalizeSetupAction(input, index) {
10006
10008
  if ((type === "window_call_until" || type === "tap_until") && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
10007
10009
  throw new Error(`target.setup_actions[${index}].max_calls must be an integer from 1 to 100.`);
10008
10010
  }
10011
+ 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;
10012
+ if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
10013
+ throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
10014
+ }
10009
10015
  const intervalMs = numberValue3(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
10010
10016
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
10011
10017
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -10053,6 +10059,7 @@ function normalizeSetupAction(input, index) {
10053
10059
  until_path: untilPath,
10054
10060
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
10055
10061
  max_calls: maxCalls,
10062
+ tap_burst_size: tapBurstSize,
10056
10063
  interval_ms: intervalMs,
10057
10064
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
10058
10065
  min_value: minValue,
@@ -13292,6 +13299,8 @@ function profileSetupTapUntilReceipts(results) {
13292
13299
  until_expected_value: result.until_expected_value ?? null,
13293
13300
  tap_count: result.tap_count ?? null,
13294
13301
  max_taps: result.max_taps ?? result.max_calls ?? null,
13302
+ tap_burst_size: result.tap_burst_size ?? null,
13303
+ condition_check_count: result.condition_check_count ?? null,
13295
13304
  interval_ms: result.interval_ms ?? null,
13296
13305
  timeout_ms: result.timeout_ms ?? null,
13297
13306
  reason: result.reason || result.error || null,
@@ -15281,6 +15290,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15281
15290
  if (!untilPath) return { ...base, reason: "missing_until_path" };
15282
15291
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
15283
15292
  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)));
15293
+ 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
15294
  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
15295
  const scope = await setupActionScope(action, timeout);
15286
15296
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -15288,6 +15298,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15288
15298
  if (prepared.result) return prepared.result;
15289
15299
  const startedAt = Date.now();
15290
15300
  let tapCount = 0;
15301
+ let conditionCheckCount = 1;
15291
15302
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
15292
15303
  const targetEvidence = setupTapTargetEvidence(prepared.target);
15293
15304
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
@@ -15302,14 +15313,21 @@ async function executeSetupAction(action, ordinal, viewport) {
15302
15313
  tap_count: tapCount,
15303
15314
  max_taps: maxTaps,
15304
15315
  max_calls: maxTaps,
15316
+ tap_burst_size: tapBurstSize,
15317
+ condition_check_count: conditionCheckCount,
15305
15318
  interval_ms: intervalMs,
15306
15319
  timeout_ms: timeout,
15307
15320
  };
15308
15321
  }
15309
15322
  while (tapCount < maxTaps && Date.now() - startedAt <= timeout) {
15310
- await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
15311
- tapCount += 1;
15323
+ const burstCount = Math.min(tapBurstSize, maxTaps - tapCount);
15324
+ for (let burstIndex = 0; burstIndex < burstCount && Date.now() - startedAt <= timeout; burstIndex += 1) {
15325
+ await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
15326
+ tapCount += 1;
15327
+ if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
15328
+ }
15312
15329
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
15330
+ conditionCheckCount += 1;
15313
15331
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
15314
15332
  return {
15315
15333
  ...base,
@@ -15322,6 +15340,8 @@ async function executeSetupAction(action, ordinal, viewport) {
15322
15340
  tap_count: tapCount,
15323
15341
  max_taps: maxTaps,
15324
15342
  max_calls: maxTaps,
15343
+ tap_burst_size: tapBurstSize,
15344
+ condition_check_count: conditionCheckCount,
15325
15345
  interval_ms: intervalMs,
15326
15346
  timeout_ms: timeout,
15327
15347
  };
@@ -15338,6 +15358,8 @@ async function executeSetupAction(action, ordinal, viewport) {
15338
15358
  tap_count: tapCount,
15339
15359
  max_taps: maxTaps,
15340
15360
  max_calls: maxTaps,
15361
+ tap_burst_size: tapBurstSize,
15362
+ condition_check_count: conditionCheckCount,
15341
15363
  interval_ms: intervalMs,
15342
15364
  timeout_ms: timeout,
15343
15365
  reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
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-EXFYPLP2.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,8 @@ 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,
683
685
  interval_ms: result.interval_ms ?? null,
684
686
  timeout_ms: result.timeout_ms ?? null,
685
687
  reason: result.reason ?? result.error ?? null
@@ -1320,6 +1322,10 @@ function normalizeSetupAction(input, index) {
1320
1322
  if ((type === "window_call_until" || type === "tap_until") && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
1321
1323
  throw new Error(`target.setup_actions[${index}].max_calls must be an integer from 1 to 100.`);
1322
1324
  }
1325
+ 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;
1326
+ if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
1327
+ throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
1328
+ }
1323
1329
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
1324
1330
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
1325
1331
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -1367,6 +1373,7 @@ function normalizeSetupAction(input, index) {
1367
1373
  until_path: untilPath,
1368
1374
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
1369
1375
  max_calls: maxCalls,
1376
+ tap_burst_size: tapBurstSize,
1370
1377
  interval_ms: intervalMs,
1371
1378
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
1372
1379
  min_value: minValue,
@@ -4606,6 +4613,8 @@ function profileSetupTapUntilReceipts(results) {
4606
4613
  until_expected_value: result.until_expected_value ?? null,
4607
4614
  tap_count: result.tap_count ?? null,
4608
4615
  max_taps: result.max_taps ?? result.max_calls ?? null,
4616
+ tap_burst_size: result.tap_burst_size ?? null,
4617
+ condition_check_count: result.condition_check_count ?? null,
4609
4618
  interval_ms: result.interval_ms ?? null,
4610
4619
  timeout_ms: result.timeout_ms ?? null,
4611
4620
  reason: result.reason || result.error || null,
@@ -6595,6 +6604,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6595
6604
  if (!untilPath) return { ...base, reason: "missing_until_path" };
6596
6605
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
6597
6606
  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)));
6607
+ 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
6608
  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
6609
  const scope = await setupActionScope(action, timeout);
6600
6610
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -6602,6 +6612,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6602
6612
  if (prepared.result) return prepared.result;
6603
6613
  const startedAt = Date.now();
6604
6614
  let tapCount = 0;
6615
+ let conditionCheckCount = 1;
6605
6616
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6606
6617
  const targetEvidence = setupTapTargetEvidence(prepared.target);
6607
6618
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
@@ -6616,14 +6627,21 @@ async function executeSetupAction(action, ordinal, viewport) {
6616
6627
  tap_count: tapCount,
6617
6628
  max_taps: maxTaps,
6618
6629
  max_calls: maxTaps,
6630
+ tap_burst_size: tapBurstSize,
6631
+ condition_check_count: conditionCheckCount,
6619
6632
  interval_ms: intervalMs,
6620
6633
  timeout_ms: timeout,
6621
6634
  };
6622
6635
  }
6623
6636
  while (tapCount < maxTaps && Date.now() - startedAt <= timeout) {
6624
- await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
6625
- tapCount += 1;
6637
+ const burstCount = Math.min(tapBurstSize, maxTaps - tapCount);
6638
+ for (let burstIndex = 0; burstIndex < burstCount && Date.now() - startedAt <= timeout; burstIndex += 1) {
6639
+ await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
6640
+ tapCount += 1;
6641
+ if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
6642
+ }
6626
6643
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6644
+ conditionCheckCount += 1;
6627
6645
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6628
6646
  return {
6629
6647
  ...base,
@@ -6636,6 +6654,8 @@ async function executeSetupAction(action, ordinal, viewport) {
6636
6654
  tap_count: tapCount,
6637
6655
  max_taps: maxTaps,
6638
6656
  max_calls: maxTaps,
6657
+ tap_burst_size: tapBurstSize,
6658
+ condition_check_count: conditionCheckCount,
6639
6659
  interval_ms: intervalMs,
6640
6660
  timeout_ms: timeout,
6641
6661
  };
@@ -6652,6 +6672,8 @@ async function executeSetupAction(action, ordinal, viewport) {
6652
6672
  tap_count: tapCount,
6653
6673
  max_taps: maxTaps,
6654
6674
  max_calls: maxTaps,
6675
+ tap_burst_size: tapBurstSize,
6676
+ condition_check_count: conditionCheckCount,
6655
6677
  interval_ms: intervalMs,
6656
6678
  timeout_ms: timeout,
6657
6679
  reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
@@ -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-EXFYPLP2.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.199",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",