@riddledc/riddle-proof 0.7.199 → 0.7.201

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
@@ -441,10 +441,12 @@ 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
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.
444
+ fast taps before the next predicate check, and `settle_ms` when the app needs a
445
+ short post-burst frame/update delay before the predicate is trustworthy. The
446
+ action stops early when the predicate matches and records one compact receipt
447
+ with `tap_count`, `condition_check_count`, `settle_ms`, `elapsed_ms`, final
448
+ `until_value`, and input dispatch details, so long canvas interaction loops do
449
+ not need dozens of repeated setup actions.
448
450
  Use `set_range_value` for HTML range inputs and React-controlled sliders. It
449
451
  accepts aliases such as `set-slider-value`, requires `selector` plus `value`,
450
452
  uses the native input value setter, dispatches bubbling `input` and `change`
@@ -542,10 +544,11 @@ and `click_count_value_total`. Repeated selector runs such as long gameplay
542
544
  button loops are also grouped as compact `same-selector` click-sequence
543
545
  receipts with click totals and ordinals. `tap_until` actions are summarized as
544
546
  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.
547
+ optional settle time, elapsed time, and the final predicate value, which is the
548
+ preferred shape for long canvas gameplay loops. Setup receipt sampling favors
549
+ both first and last per-viewport receipts before filling remaining space, so
550
+ late lifecycle phases such as terminal or restart remain visible in compact
551
+ summaries.
549
552
 
550
553
  `target.timeout_sec` is optional. Use it for known-heavy profile targets so the
551
554
  profile carries its own hosted Riddle worker budget; an explicit CLI `--timeout`
@@ -635,6 +635,8 @@ function profileSetupTapUntilReceipts(results) {
635
635
  max_taps: result.max_taps ?? result.max_calls ?? null,
636
636
  tap_burst_size: result.tap_burst_size ?? null,
637
637
  condition_check_count: result.condition_check_count ?? null,
638
+ settle_ms: result.settle_ms ?? null,
639
+ elapsed_ms: result.elapsed_ms ?? null,
638
640
  interval_ms: result.interval_ms ?? null,
639
641
  timeout_ms: result.timeout_ms ?? null,
640
642
  reason: result.reason ?? result.error ?? null
@@ -1279,6 +1281,10 @@ function normalizeSetupAction(input, index) {
1279
1281
  if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
1280
1282
  throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
1281
1283
  }
1284
+ const settleMs = type === "tap_until" ? numberValue(valueFromOwn(input, "settle_ms", "settleMs", "predicate_settle_ms", "predicateSettleMs", "post_burst_wait_ms", "postBurstWaitMs", "after_burst_ms", "afterBurstMs", "settle_after_tap_ms", "settleAfterTapMs")) : void 0;
1285
+ if (type === "tap_until" && settleMs !== void 0 && (!Number.isInteger(settleMs) || settleMs < 0 || settleMs > 1e4)) {
1286
+ throw new Error(`target.setup_actions[${index}].settle_ms must be an integer from 0 to 10000.`);
1287
+ }
1282
1288
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
1283
1289
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
1284
1290
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -1327,6 +1333,7 @@ function normalizeSetupAction(input, index) {
1327
1333
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
1328
1334
  max_calls: maxCalls,
1329
1335
  tap_burst_size: tapBurstSize,
1336
+ settle_ms: settleMs,
1330
1337
  interval_ms: intervalMs,
1331
1338
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
1332
1339
  min_value: minValue,
@@ -4568,6 +4575,8 @@ function profileSetupTapUntilReceipts(results) {
4568
4575
  max_taps: result.max_taps ?? result.max_calls ?? null,
4569
4576
  tap_burst_size: result.tap_burst_size ?? null,
4570
4577
  condition_check_count: result.condition_check_count ?? null,
4578
+ settle_ms: result.settle_ms ?? null,
4579
+ elapsed_ms: result.elapsed_ms ?? null,
4571
4580
  interval_ms: result.interval_ms ?? null,
4572
4581
  timeout_ms: result.timeout_ms ?? null,
4573
4582
  reason: result.reason || result.error || null,
@@ -6558,6 +6567,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6558
6567
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
6559
6568
  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
6569
  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))));
6570
+ const settleMs = Math.min(10000, Math.max(0, Math.floor(setupNumber(action.settle_ms ?? action.settleMs ?? action.predicate_settle_ms ?? action.predicateSettleMs ?? action.post_burst_wait_ms ?? action.postBurstWaitMs ?? action.after_burst_ms ?? action.afterBurstMs ?? action.settle_after_tap_ms ?? action.settleAfterTapMs, 0) || 0)));
6561
6571
  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)));
6562
6572
  const scope = await setupActionScope(action, timeout);
6563
6573
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -6569,6 +6579,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6569
6579
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6570
6580
  const targetEvidence = setupTapTargetEvidence(prepared.target);
6571
6581
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6582
+ const elapsedMs = Date.now() - startedAt;
6572
6583
  return {
6573
6584
  ...base,
6574
6585
  ...setupScopeEvidence(scope),
@@ -6582,6 +6593,8 @@ async function executeSetupAction(action, ordinal, viewport) {
6582
6593
  max_calls: maxTaps,
6583
6594
  tap_burst_size: tapBurstSize,
6584
6595
  condition_check_count: conditionCheckCount,
6596
+ settle_ms: settleMs,
6597
+ elapsed_ms: elapsedMs,
6585
6598
  interval_ms: intervalMs,
6586
6599
  timeout_ms: timeout,
6587
6600
  };
@@ -6593,9 +6606,11 @@ async function executeSetupAction(action, ordinal, viewport) {
6593
6606
  tapCount += 1;
6594
6607
  if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
6595
6608
  }
6609
+ if (settleMs) await page.waitForTimeout(settleMs);
6596
6610
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6597
6611
  conditionCheckCount += 1;
6598
6612
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6613
+ const elapsedMs = Date.now() - startedAt;
6599
6614
  return {
6600
6615
  ...base,
6601
6616
  ...setupScopeEvidence(scope),
@@ -6609,12 +6624,15 @@ async function executeSetupAction(action, ordinal, viewport) {
6609
6624
  max_calls: maxTaps,
6610
6625
  tap_burst_size: tapBurstSize,
6611
6626
  condition_check_count: conditionCheckCount,
6627
+ settle_ms: settleMs,
6628
+ elapsed_ms: elapsedMs,
6612
6629
  interval_ms: intervalMs,
6613
6630
  timeout_ms: timeout,
6614
6631
  };
6615
6632
  }
6616
6633
  if (tapCount < maxTaps && intervalMs) await page.waitForTimeout(intervalMs);
6617
6634
  }
6635
+ const elapsedMs = Date.now() - startedAt;
6618
6636
  return {
6619
6637
  ...base,
6620
6638
  ...setupScopeEvidence(scope),
@@ -6627,9 +6645,11 @@ async function executeSetupAction(action, ordinal, viewport) {
6627
6645
  max_calls: maxTaps,
6628
6646
  tap_burst_size: tapBurstSize,
6629
6647
  condition_check_count: conditionCheckCount,
6648
+ settle_ms: settleMs,
6649
+ elapsed_ms: elapsedMs,
6630
6650
  interval_ms: intervalMs,
6631
6651
  timeout_ms: timeout,
6632
- reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
6652
+ reason: elapsedMs > timeout ? "timeout" : "until_condition_not_met",
6633
6653
  missing_part: lastPredicateResult?.missing_part || undefined,
6634
6654
  };
6635
6655
  }
package/dist/cli.cjs CHANGED
@@ -7592,6 +7592,8 @@ function profileSetupTapUntilReceipts(results) {
7592
7592
  max_taps: result.max_taps ?? result.max_calls ?? null,
7593
7593
  tap_burst_size: result.tap_burst_size ?? null,
7594
7594
  condition_check_count: result.condition_check_count ?? null,
7595
+ settle_ms: result.settle_ms ?? null,
7596
+ elapsed_ms: result.elapsed_ms ?? null,
7595
7597
  interval_ms: result.interval_ms ?? null,
7596
7598
  timeout_ms: result.timeout_ms ?? null,
7597
7599
  reason: result.reason ?? result.error ?? null
@@ -8236,6 +8238,10 @@ function normalizeSetupAction(input, index) {
8236
8238
  if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
8237
8239
  throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
8238
8240
  }
8241
+ const settleMs = type === "tap_until" ? numberValue(valueFromOwn(input, "settle_ms", "settleMs", "predicate_settle_ms", "predicateSettleMs", "post_burst_wait_ms", "postBurstWaitMs", "after_burst_ms", "afterBurstMs", "settle_after_tap_ms", "settleAfterTapMs")) : void 0;
8242
+ if (type === "tap_until" && settleMs !== void 0 && (!Number.isInteger(settleMs) || settleMs < 0 || settleMs > 1e4)) {
8243
+ throw new Error(`target.setup_actions[${index}].settle_ms must be an integer from 0 to 10000.`);
8244
+ }
8239
8245
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
8240
8246
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
8241
8247
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -8284,6 +8290,7 @@ function normalizeSetupAction(input, index) {
8284
8290
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
8285
8291
  max_calls: maxCalls,
8286
8292
  tap_burst_size: tapBurstSize,
8293
+ settle_ms: settleMs,
8287
8294
  interval_ms: intervalMs,
8288
8295
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
8289
8296
  min_value: minValue,
@@ -11509,6 +11516,8 @@ function profileSetupTapUntilReceipts(results) {
11509
11516
  max_taps: result.max_taps ?? result.max_calls ?? null,
11510
11517
  tap_burst_size: result.tap_burst_size ?? null,
11511
11518
  condition_check_count: result.condition_check_count ?? null,
11519
+ settle_ms: result.settle_ms ?? null,
11520
+ elapsed_ms: result.elapsed_ms ?? null,
11512
11521
  interval_ms: result.interval_ms ?? null,
11513
11522
  timeout_ms: result.timeout_ms ?? null,
11514
11523
  reason: result.reason || result.error || null,
@@ -13499,6 +13508,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13499
13508
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
13500
13509
  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
13510
  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))));
13511
+ const settleMs = Math.min(10000, Math.max(0, Math.floor(setupNumber(action.settle_ms ?? action.settleMs ?? action.predicate_settle_ms ?? action.predicateSettleMs ?? action.post_burst_wait_ms ?? action.postBurstWaitMs ?? action.after_burst_ms ?? action.afterBurstMs ?? action.settle_after_tap_ms ?? action.settleAfterTapMs, 0) || 0)));
13502
13512
  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)));
13503
13513
  const scope = await setupActionScope(action, timeout);
13504
13514
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -13510,6 +13520,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13510
13520
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
13511
13521
  const targetEvidence = setupTapTargetEvidence(prepared.target);
13512
13522
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
13523
+ const elapsedMs = Date.now() - startedAt;
13513
13524
  return {
13514
13525
  ...base,
13515
13526
  ...setupScopeEvidence(scope),
@@ -13523,6 +13534,8 @@ async function executeSetupAction(action, ordinal, viewport) {
13523
13534
  max_calls: maxTaps,
13524
13535
  tap_burst_size: tapBurstSize,
13525
13536
  condition_check_count: conditionCheckCount,
13537
+ settle_ms: settleMs,
13538
+ elapsed_ms: elapsedMs,
13526
13539
  interval_ms: intervalMs,
13527
13540
  timeout_ms: timeout,
13528
13541
  };
@@ -13534,9 +13547,11 @@ async function executeSetupAction(action, ordinal, viewport) {
13534
13547
  tapCount += 1;
13535
13548
  if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
13536
13549
  }
13550
+ if (settleMs) await page.waitForTimeout(settleMs);
13537
13551
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
13538
13552
  conditionCheckCount += 1;
13539
13553
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
13554
+ const elapsedMs = Date.now() - startedAt;
13540
13555
  return {
13541
13556
  ...base,
13542
13557
  ...setupScopeEvidence(scope),
@@ -13550,12 +13565,15 @@ async function executeSetupAction(action, ordinal, viewport) {
13550
13565
  max_calls: maxTaps,
13551
13566
  tap_burst_size: tapBurstSize,
13552
13567
  condition_check_count: conditionCheckCount,
13568
+ settle_ms: settleMs,
13569
+ elapsed_ms: elapsedMs,
13553
13570
  interval_ms: intervalMs,
13554
13571
  timeout_ms: timeout,
13555
13572
  };
13556
13573
  }
13557
13574
  if (tapCount < maxTaps && intervalMs) await page.waitForTimeout(intervalMs);
13558
13575
  }
13576
+ const elapsedMs = Date.now() - startedAt;
13559
13577
  return {
13560
13578
  ...base,
13561
13579
  ...setupScopeEvidence(scope),
@@ -13568,9 +13586,11 @@ async function executeSetupAction(action, ordinal, viewport) {
13568
13586
  max_calls: maxTaps,
13569
13587
  tap_burst_size: tapBurstSize,
13570
13588
  condition_check_count: conditionCheckCount,
13589
+ settle_ms: settleMs,
13590
+ elapsed_ms: elapsedMs,
13571
13591
  interval_ms: intervalMs,
13572
13592
  timeout_ms: timeout,
13573
- reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
13593
+ reason: elapsedMs > timeout ? "timeout" : "until_condition_not_met",
13574
13594
  missing_part: lastPredicateResult?.missing_part || undefined,
13575
13595
  };
13576
13596
  }
@@ -18076,13 +18096,17 @@ function profileSetupSummaryMarkdown(result) {
18076
18096
  const maxTaps = cliFiniteNumber(receipt.max_taps) ?? cliFiniteNumber(receipt.max_calls);
18077
18097
  const tapBurstSize = cliFiniteNumber(receipt.tap_burst_size);
18078
18098
  const conditionCheckCount = cliFiniteNumber(receipt.condition_check_count);
18099
+ const settleMs = cliFiniteNumber(receipt.settle_ms);
18100
+ const elapsedMs3 = cliFiniteNumber(receipt.elapsed_ms);
18079
18101
  const ok = receipt.ok === false ? "failed" : "ok";
18080
18102
  const reason = cliString(receipt.reason);
18081
18103
  const coordinateText = x && y ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${x},${y}`)}` : "";
18082
18104
  const tapText = tapCount === void 0 ? "" : ` in ${tapCount}${maxTaps === void 0 ? "" : `/${maxTaps}`} tap(s)`;
18083
18105
  const burstText = tapBurstSize === void 0 || tapBurstSize <= 1 ? "" : `, burst ${tapBurstSize}`;
18084
18106
  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)}` : ""}`);
18107
+ const settleText = settleMs === void 0 || settleMs <= 0 ? "" : `, settle ${settleMs}ms`;
18108
+ const elapsedText = elapsedMs3 === void 0 ? "" : `, elapsed ${elapsedMs3}ms`;
18109
+ 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}${settleText}${elapsedText}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
18086
18110
  }
18087
18111
  if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
18088
18112
  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-EXFYPLP2.js";
16
+ } from "./chunk-OUZKZ5U4.js";
17
17
  import {
18
18
  createRiddleApiClient,
19
19
  isTerminalRiddleJobStatus,
@@ -1921,13 +1921,17 @@ function profileSetupSummaryMarkdown(result) {
1921
1921
  const maxTaps = cliFiniteNumber(receipt.max_taps) ?? cliFiniteNumber(receipt.max_calls);
1922
1922
  const tapBurstSize = cliFiniteNumber(receipt.tap_burst_size);
1923
1923
  const conditionCheckCount = cliFiniteNumber(receipt.condition_check_count);
1924
+ const settleMs = cliFiniteNumber(receipt.settle_ms);
1925
+ const elapsedMs = cliFiniteNumber(receipt.elapsed_ms);
1924
1926
  const ok = receipt.ok === false ? "failed" : "ok";
1925
1927
  const reason = cliString(receipt.reason);
1926
1928
  const coordinateText = x && y ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${x},${y}`)}` : "";
1927
1929
  const tapText = tapCount === void 0 ? "" : ` in ${tapCount}${maxTaps === void 0 ? "" : `/${maxTaps}`} tap(s)`;
1928
1930
  const burstText = tapBurstSize === void 0 || tapBurstSize <= 1 ? "" : `, burst ${tapBurstSize}`;
1929
1931
  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)}` : ""}`);
1932
+ const settleText = settleMs === void 0 || settleMs <= 0 ? "" : `, settle ${settleMs}ms`;
1933
+ const elapsedText = elapsedMs === void 0 ? "" : `, elapsed ${elapsedMs}ms`;
1934
+ 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}${settleText}${elapsedText}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
1931
1935
  }
1932
1936
  if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
1933
1937
  const keyboardGroups = viewports.map((viewport) => {
package/dist/index.cjs CHANGED
@@ -9368,6 +9368,8 @@ function profileSetupTapUntilReceipts(results) {
9368
9368
  max_taps: result.max_taps ?? result.max_calls ?? null,
9369
9369
  tap_burst_size: result.tap_burst_size ?? null,
9370
9370
  condition_check_count: result.condition_check_count ?? null,
9371
+ settle_ms: result.settle_ms ?? null,
9372
+ elapsed_ms: result.elapsed_ms ?? null,
9371
9373
  interval_ms: result.interval_ms ?? null,
9372
9374
  timeout_ms: result.timeout_ms ?? null,
9373
9375
  reason: result.reason ?? result.error ?? null
@@ -10012,6 +10014,10 @@ function normalizeSetupAction(input, index) {
10012
10014
  if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
10013
10015
  throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
10014
10016
  }
10017
+ const settleMs = type === "tap_until" ? numberValue3(valueFromOwn(input, "settle_ms", "settleMs", "predicate_settle_ms", "predicateSettleMs", "post_burst_wait_ms", "postBurstWaitMs", "after_burst_ms", "afterBurstMs", "settle_after_tap_ms", "settleAfterTapMs")) : void 0;
10018
+ if (type === "tap_until" && settleMs !== void 0 && (!Number.isInteger(settleMs) || settleMs < 0 || settleMs > 1e4)) {
10019
+ throw new Error(`target.setup_actions[${index}].settle_ms must be an integer from 0 to 10000.`);
10020
+ }
10015
10021
  const intervalMs = numberValue3(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
10016
10022
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
10017
10023
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -10060,6 +10066,7 @@ function normalizeSetupAction(input, index) {
10060
10066
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
10061
10067
  max_calls: maxCalls,
10062
10068
  tap_burst_size: tapBurstSize,
10069
+ settle_ms: settleMs,
10063
10070
  interval_ms: intervalMs,
10064
10071
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
10065
10072
  min_value: minValue,
@@ -13301,6 +13308,8 @@ function profileSetupTapUntilReceipts(results) {
13301
13308
  max_taps: result.max_taps ?? result.max_calls ?? null,
13302
13309
  tap_burst_size: result.tap_burst_size ?? null,
13303
13310
  condition_check_count: result.condition_check_count ?? null,
13311
+ settle_ms: result.settle_ms ?? null,
13312
+ elapsed_ms: result.elapsed_ms ?? null,
13304
13313
  interval_ms: result.interval_ms ?? null,
13305
13314
  timeout_ms: result.timeout_ms ?? null,
13306
13315
  reason: result.reason || result.error || null,
@@ -15291,6 +15300,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15291
15300
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
15292
15301
  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
15302
  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))));
15303
+ const settleMs = Math.min(10000, Math.max(0, Math.floor(setupNumber(action.settle_ms ?? action.settleMs ?? action.predicate_settle_ms ?? action.predicateSettleMs ?? action.post_burst_wait_ms ?? action.postBurstWaitMs ?? action.after_burst_ms ?? action.afterBurstMs ?? action.settle_after_tap_ms ?? action.settleAfterTapMs, 0) || 0)));
15294
15304
  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)));
15295
15305
  const scope = await setupActionScope(action, timeout);
15296
15306
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -15302,6 +15312,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15302
15312
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
15303
15313
  const targetEvidence = setupTapTargetEvidence(prepared.target);
15304
15314
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
15315
+ const elapsedMs = Date.now() - startedAt;
15305
15316
  return {
15306
15317
  ...base,
15307
15318
  ...setupScopeEvidence(scope),
@@ -15315,6 +15326,8 @@ async function executeSetupAction(action, ordinal, viewport) {
15315
15326
  max_calls: maxTaps,
15316
15327
  tap_burst_size: tapBurstSize,
15317
15328
  condition_check_count: conditionCheckCount,
15329
+ settle_ms: settleMs,
15330
+ elapsed_ms: elapsedMs,
15318
15331
  interval_ms: intervalMs,
15319
15332
  timeout_ms: timeout,
15320
15333
  };
@@ -15326,9 +15339,11 @@ async function executeSetupAction(action, ordinal, viewport) {
15326
15339
  tapCount += 1;
15327
15340
  if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
15328
15341
  }
15342
+ if (settleMs) await page.waitForTimeout(settleMs);
15329
15343
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
15330
15344
  conditionCheckCount += 1;
15331
15345
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
15346
+ const elapsedMs = Date.now() - startedAt;
15332
15347
  return {
15333
15348
  ...base,
15334
15349
  ...setupScopeEvidence(scope),
@@ -15342,12 +15357,15 @@ async function executeSetupAction(action, ordinal, viewport) {
15342
15357
  max_calls: maxTaps,
15343
15358
  tap_burst_size: tapBurstSize,
15344
15359
  condition_check_count: conditionCheckCount,
15360
+ settle_ms: settleMs,
15361
+ elapsed_ms: elapsedMs,
15345
15362
  interval_ms: intervalMs,
15346
15363
  timeout_ms: timeout,
15347
15364
  };
15348
15365
  }
15349
15366
  if (tapCount < maxTaps && intervalMs) await page.waitForTimeout(intervalMs);
15350
15367
  }
15368
+ const elapsedMs = Date.now() - startedAt;
15351
15369
  return {
15352
15370
  ...base,
15353
15371
  ...setupScopeEvidence(scope),
@@ -15360,9 +15378,11 @@ async function executeSetupAction(action, ordinal, viewport) {
15360
15378
  max_calls: maxTaps,
15361
15379
  tap_burst_size: tapBurstSize,
15362
15380
  condition_check_count: conditionCheckCount,
15381
+ settle_ms: settleMs,
15382
+ elapsed_ms: elapsedMs,
15363
15383
  interval_ms: intervalMs,
15364
15384
  timeout_ms: timeout,
15365
- reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
15385
+ reason: elapsedMs > timeout ? "timeout" : "until_condition_not_met",
15366
15386
  missing_part: lastPredicateResult?.missing_part || undefined,
15367
15387
  };
15368
15388
  }
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  resolveRiddleProofProfileTimeoutSec,
63
63
  slugifyRiddleProofProfileName,
64
64
  summarizeRiddleProofProfileResult
65
- } from "./chunk-EXFYPLP2.js";
65
+ } from "./chunk-OUZKZ5U4.js";
66
66
  import {
67
67
  DEFAULT_RIDDLE_API_BASE_URL,
68
68
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -682,6 +682,8 @@ function profileSetupTapUntilReceipts(results) {
682
682
  max_taps: result.max_taps ?? result.max_calls ?? null,
683
683
  tap_burst_size: result.tap_burst_size ?? null,
684
684
  condition_check_count: result.condition_check_count ?? null,
685
+ settle_ms: result.settle_ms ?? null,
686
+ elapsed_ms: result.elapsed_ms ?? null,
685
687
  interval_ms: result.interval_ms ?? null,
686
688
  timeout_ms: result.timeout_ms ?? null,
687
689
  reason: result.reason ?? result.error ?? null
@@ -1326,6 +1328,10 @@ function normalizeSetupAction(input, index) {
1326
1328
  if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
1327
1329
  throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
1328
1330
  }
1331
+ const settleMs = type === "tap_until" ? numberValue(valueFromOwn(input, "settle_ms", "settleMs", "predicate_settle_ms", "predicateSettleMs", "post_burst_wait_ms", "postBurstWaitMs", "after_burst_ms", "afterBurstMs", "settle_after_tap_ms", "settleAfterTapMs")) : void 0;
1332
+ if (type === "tap_until" && settleMs !== void 0 && (!Number.isInteger(settleMs) || settleMs < 0 || settleMs > 1e4)) {
1333
+ throw new Error(`target.setup_actions[${index}].settle_ms must be an integer from 0 to 10000.`);
1334
+ }
1329
1335
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
1330
1336
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
1331
1337
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -1374,6 +1380,7 @@ function normalizeSetupAction(input, index) {
1374
1380
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
1375
1381
  max_calls: maxCalls,
1376
1382
  tap_burst_size: tapBurstSize,
1383
+ settle_ms: settleMs,
1377
1384
  interval_ms: intervalMs,
1378
1385
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
1379
1386
  min_value: minValue,
@@ -4615,6 +4622,8 @@ function profileSetupTapUntilReceipts(results) {
4615
4622
  max_taps: result.max_taps ?? result.max_calls ?? null,
4616
4623
  tap_burst_size: result.tap_burst_size ?? null,
4617
4624
  condition_check_count: result.condition_check_count ?? null,
4625
+ settle_ms: result.settle_ms ?? null,
4626
+ elapsed_ms: result.elapsed_ms ?? null,
4618
4627
  interval_ms: result.interval_ms ?? null,
4619
4628
  timeout_ms: result.timeout_ms ?? null,
4620
4629
  reason: result.reason || result.error || null,
@@ -6605,6 +6614,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6605
6614
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
6606
6615
  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
6616
  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))));
6617
+ const settleMs = Math.min(10000, Math.max(0, Math.floor(setupNumber(action.settle_ms ?? action.settleMs ?? action.predicate_settle_ms ?? action.predicateSettleMs ?? action.post_burst_wait_ms ?? action.postBurstWaitMs ?? action.after_burst_ms ?? action.afterBurstMs ?? action.settle_after_tap_ms ?? action.settleAfterTapMs, 0) || 0)));
6608
6618
  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)));
6609
6619
  const scope = await setupActionScope(action, timeout);
6610
6620
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -6616,6 +6626,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6616
6626
  let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6617
6627
  const targetEvidence = setupTapTargetEvidence(prepared.target);
6618
6628
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6629
+ const elapsedMs = Date.now() - startedAt;
6619
6630
  return {
6620
6631
  ...base,
6621
6632
  ...setupScopeEvidence(scope),
@@ -6629,6 +6640,8 @@ async function executeSetupAction(action, ordinal, viewport) {
6629
6640
  max_calls: maxTaps,
6630
6641
  tap_burst_size: tapBurstSize,
6631
6642
  condition_check_count: conditionCheckCount,
6643
+ settle_ms: settleMs,
6644
+ elapsed_ms: elapsedMs,
6632
6645
  interval_ms: intervalMs,
6633
6646
  timeout_ms: timeout,
6634
6647
  };
@@ -6640,9 +6653,11 @@ async function executeSetupAction(action, ordinal, viewport) {
6640
6653
  tapCount += 1;
6641
6654
  if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
6642
6655
  }
6656
+ if (settleMs) await page.waitForTimeout(settleMs);
6643
6657
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6644
6658
  conditionCheckCount += 1;
6645
6659
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
6660
+ const elapsedMs = Date.now() - startedAt;
6646
6661
  return {
6647
6662
  ...base,
6648
6663
  ...setupScopeEvidence(scope),
@@ -6656,12 +6671,15 @@ async function executeSetupAction(action, ordinal, viewport) {
6656
6671
  max_calls: maxTaps,
6657
6672
  tap_burst_size: tapBurstSize,
6658
6673
  condition_check_count: conditionCheckCount,
6674
+ settle_ms: settleMs,
6675
+ elapsed_ms: elapsedMs,
6659
6676
  interval_ms: intervalMs,
6660
6677
  timeout_ms: timeout,
6661
6678
  };
6662
6679
  }
6663
6680
  if (tapCount < maxTaps && intervalMs) await page.waitForTimeout(intervalMs);
6664
6681
  }
6682
+ const elapsedMs = Date.now() - startedAt;
6665
6683
  return {
6666
6684
  ...base,
6667
6685
  ...setupScopeEvidence(scope),
@@ -6674,9 +6692,11 @@ async function executeSetupAction(action, ordinal, viewport) {
6674
6692
  max_calls: maxTaps,
6675
6693
  tap_burst_size: tapBurstSize,
6676
6694
  condition_check_count: conditionCheckCount,
6695
+ settle_ms: settleMs,
6696
+ elapsed_ms: elapsedMs,
6677
6697
  interval_ms: intervalMs,
6678
6698
  timeout_ms: timeout,
6679
- reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
6699
+ reason: elapsedMs > timeout ? "timeout" : "until_condition_not_met",
6680
6700
  missing_part: lastPredicateResult?.missing_part || undefined,
6681
6701
  };
6682
6702
  }
@@ -147,6 +147,7 @@ interface RiddleProofProfileSetupAction {
147
147
  until_expected_value?: JsonValue;
148
148
  max_calls?: number;
149
149
  tap_burst_size?: number;
150
+ settle_ms?: number;
150
151
  interval_ms?: number;
151
152
  expected_value?: JsonValue;
152
153
  min_value?: number;
package/dist/profile.d.ts CHANGED
@@ -147,6 +147,7 @@ interface RiddleProofProfileSetupAction {
147
147
  until_expected_value?: JsonValue;
148
148
  max_calls?: number;
149
149
  tap_burst_size?: number;
150
+ settle_ms?: number;
150
151
  interval_ms?: number;
151
152
  expected_value?: JsonValue;
152
153
  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-EXFYPLP2.js";
26
+ } from "./chunk-OUZKZ5U4.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.199",
3
+ "version": "0.7.201",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",