@riddledc/riddle-proof 0.7.200 → 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,11 +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`, `elapsed_ms`, final `until_value`, and input dispatch
447
- details, so long canvas interaction loops do not need dozens of repeated setup
448
- 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.
449
450
  Use `set_range_value` for HTML range inputs and React-controlled sliders. It
450
451
  accepts aliases such as `set-slider-value`, requires `selector` plus `value`,
451
452
  uses the native input value setter, dispatches bubbling `input` and `change`
@@ -543,10 +544,11 @@ and `click_count_value_total`. Repeated selector runs such as long gameplay
543
544
  button loops are also grouped as compact `same-selector` click-sequence
544
545
  receipts with click totals and ordinals. `tap_until` actions are summarized as
545
546
  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.
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.
550
552
 
551
553
  `target.timeout_sec` is optional. Use it for known-heavy profile targets so the
552
554
  profile carries its own hosted Riddle worker budget; an explicit CLI `--timeout`
@@ -635,6 +635,7 @@ 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,
638
639
  elapsed_ms: result.elapsed_ms ?? null,
639
640
  interval_ms: result.interval_ms ?? null,
640
641
  timeout_ms: result.timeout_ms ?? null,
@@ -1280,6 +1281,10 @@ function normalizeSetupAction(input, index) {
1280
1281
  if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
1281
1282
  throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
1282
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
+ }
1283
1288
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
1284
1289
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
1285
1290
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -1328,6 +1333,7 @@ function normalizeSetupAction(input, index) {
1328
1333
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
1329
1334
  max_calls: maxCalls,
1330
1335
  tap_burst_size: tapBurstSize,
1336
+ settle_ms: settleMs,
1331
1337
  interval_ms: intervalMs,
1332
1338
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
1333
1339
  min_value: minValue,
@@ -4569,6 +4575,7 @@ function profileSetupTapUntilReceipts(results) {
4569
4575
  max_taps: result.max_taps ?? result.max_calls ?? null,
4570
4576
  tap_burst_size: result.tap_burst_size ?? null,
4571
4577
  condition_check_count: result.condition_check_count ?? null,
4578
+ settle_ms: result.settle_ms ?? null,
4572
4579
  elapsed_ms: result.elapsed_ms ?? null,
4573
4580
  interval_ms: result.interval_ms ?? null,
4574
4581
  timeout_ms: result.timeout_ms ?? null,
@@ -6560,6 +6567,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6560
6567
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
6561
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)));
6562
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)));
6563
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)));
6564
6572
  const scope = await setupActionScope(action, timeout);
6565
6573
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -6585,6 +6593,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6585
6593
  max_calls: maxTaps,
6586
6594
  tap_burst_size: tapBurstSize,
6587
6595
  condition_check_count: conditionCheckCount,
6596
+ settle_ms: settleMs,
6588
6597
  elapsed_ms: elapsedMs,
6589
6598
  interval_ms: intervalMs,
6590
6599
  timeout_ms: timeout,
@@ -6597,6 +6606,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6597
6606
  tapCount += 1;
6598
6607
  if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
6599
6608
  }
6609
+ if (settleMs) await page.waitForTimeout(settleMs);
6600
6610
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6601
6611
  conditionCheckCount += 1;
6602
6612
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
@@ -6614,6 +6624,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6614
6624
  max_calls: maxTaps,
6615
6625
  tap_burst_size: tapBurstSize,
6616
6626
  condition_check_count: conditionCheckCount,
6627
+ settle_ms: settleMs,
6617
6628
  elapsed_ms: elapsedMs,
6618
6629
  interval_ms: intervalMs,
6619
6630
  timeout_ms: timeout,
@@ -6634,6 +6645,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6634
6645
  max_calls: maxTaps,
6635
6646
  tap_burst_size: tapBurstSize,
6636
6647
  condition_check_count: conditionCheckCount,
6648
+ settle_ms: settleMs,
6637
6649
  elapsed_ms: elapsedMs,
6638
6650
  interval_ms: intervalMs,
6639
6651
  timeout_ms: timeout,
package/dist/cli.cjs CHANGED
@@ -7592,6 +7592,7 @@ 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,
7595
7596
  elapsed_ms: result.elapsed_ms ?? null,
7596
7597
  interval_ms: result.interval_ms ?? null,
7597
7598
  timeout_ms: result.timeout_ms ?? null,
@@ -8237,6 +8238,10 @@ function normalizeSetupAction(input, index) {
8237
8238
  if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
8238
8239
  throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
8239
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
+ }
8240
8245
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
8241
8246
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
8242
8247
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -8285,6 +8290,7 @@ function normalizeSetupAction(input, index) {
8285
8290
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
8286
8291
  max_calls: maxCalls,
8287
8292
  tap_burst_size: tapBurstSize,
8293
+ settle_ms: settleMs,
8288
8294
  interval_ms: intervalMs,
8289
8295
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
8290
8296
  min_value: minValue,
@@ -11510,6 +11516,7 @@ function profileSetupTapUntilReceipts(results) {
11510
11516
  max_taps: result.max_taps ?? result.max_calls ?? null,
11511
11517
  tap_burst_size: result.tap_burst_size ?? null,
11512
11518
  condition_check_count: result.condition_check_count ?? null,
11519
+ settle_ms: result.settle_ms ?? null,
11513
11520
  elapsed_ms: result.elapsed_ms ?? null,
11514
11521
  interval_ms: result.interval_ms ?? null,
11515
11522
  timeout_ms: result.timeout_ms ?? null,
@@ -13501,6 +13508,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13501
13508
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
13502
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)));
13503
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)));
13504
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)));
13505
13513
  const scope = await setupActionScope(action, timeout);
13506
13514
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -13526,6 +13534,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13526
13534
  max_calls: maxTaps,
13527
13535
  tap_burst_size: tapBurstSize,
13528
13536
  condition_check_count: conditionCheckCount,
13537
+ settle_ms: settleMs,
13529
13538
  elapsed_ms: elapsedMs,
13530
13539
  interval_ms: intervalMs,
13531
13540
  timeout_ms: timeout,
@@ -13538,6 +13547,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13538
13547
  tapCount += 1;
13539
13548
  if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
13540
13549
  }
13550
+ if (settleMs) await page.waitForTimeout(settleMs);
13541
13551
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
13542
13552
  conditionCheckCount += 1;
13543
13553
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
@@ -13555,6 +13565,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13555
13565
  max_calls: maxTaps,
13556
13566
  tap_burst_size: tapBurstSize,
13557
13567
  condition_check_count: conditionCheckCount,
13568
+ settle_ms: settleMs,
13558
13569
  elapsed_ms: elapsedMs,
13559
13570
  interval_ms: intervalMs,
13560
13571
  timeout_ms: timeout,
@@ -13575,6 +13586,7 @@ async function executeSetupAction(action, ordinal, viewport) {
13575
13586
  max_calls: maxTaps,
13576
13587
  tap_burst_size: tapBurstSize,
13577
13588
  condition_check_count: conditionCheckCount,
13589
+ settle_ms: settleMs,
13578
13590
  elapsed_ms: elapsedMs,
13579
13591
  interval_ms: intervalMs,
13580
13592
  timeout_ms: timeout,
@@ -18084,6 +18096,7 @@ function profileSetupSummaryMarkdown(result) {
18084
18096
  const maxTaps = cliFiniteNumber(receipt.max_taps) ?? cliFiniteNumber(receipt.max_calls);
18085
18097
  const tapBurstSize = cliFiniteNumber(receipt.tap_burst_size);
18086
18098
  const conditionCheckCount = cliFiniteNumber(receipt.condition_check_count);
18099
+ const settleMs = cliFiniteNumber(receipt.settle_ms);
18087
18100
  const elapsedMs3 = cliFiniteNumber(receipt.elapsed_ms);
18088
18101
  const ok = receipt.ok === false ? "failed" : "ok";
18089
18102
  const reason = cliString(receipt.reason);
@@ -18091,8 +18104,9 @@ function profileSetupSummaryMarkdown(result) {
18091
18104
  const tapText = tapCount === void 0 ? "" : ` in ${tapCount}${maxTaps === void 0 ? "" : `/${maxTaps}`} tap(s)`;
18092
18105
  const burstText = tapBurstSize === void 0 || tapBurstSize <= 1 ? "" : `, burst ${tapBurstSize}`;
18093
18106
  const conditionCheckText = conditionCheckCount === void 0 ? "" : `, ${conditionCheckCount} check(s)`;
18107
+ const settleText = settleMs === void 0 || settleMs <= 0 ? "" : `, settle ${settleMs}ms`;
18094
18108
  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)}` : ""}`);
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)}` : ""}`);
18096
18110
  }
18097
18111
  if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
18098
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-FNVDZCVZ.js";
16
+ } from "./chunk-OUZKZ5U4.js";
17
17
  import {
18
18
  createRiddleApiClient,
19
19
  isTerminalRiddleJobStatus,
@@ -1921,6 +1921,7 @@ 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);
1924
1925
  const elapsedMs = cliFiniteNumber(receipt.elapsed_ms);
1925
1926
  const ok = receipt.ok === false ? "failed" : "ok";
1926
1927
  const reason = cliString(receipt.reason);
@@ -1928,8 +1929,9 @@ function profileSetupSummaryMarkdown(result) {
1928
1929
  const tapText = tapCount === void 0 ? "" : ` in ${tapCount}${maxTaps === void 0 ? "" : `/${maxTaps}`} tap(s)`;
1929
1930
  const burstText = tapBurstSize === void 0 || tapBurstSize <= 1 ? "" : `, burst ${tapBurstSize}`;
1930
1931
  const conditionCheckText = conditionCheckCount === void 0 ? "" : `, ${conditionCheckCount} check(s)`;
1932
+ const settleText = settleMs === void 0 || settleMs <= 0 ? "" : `, settle ${settleMs}ms`;
1931
1933
  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)}` : ""}`);
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)}` : ""}`);
1933
1935
  }
1934
1936
  if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
1935
1937
  const keyboardGroups = viewports.map((viewport) => {
package/dist/index.cjs CHANGED
@@ -9368,6 +9368,7 @@ 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,
9371
9372
  elapsed_ms: result.elapsed_ms ?? null,
9372
9373
  interval_ms: result.interval_ms ?? null,
9373
9374
  timeout_ms: result.timeout_ms ?? null,
@@ -10013,6 +10014,10 @@ function normalizeSetupAction(input, index) {
10013
10014
  if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
10014
10015
  throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
10015
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
+ }
10016
10021
  const intervalMs = numberValue3(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
10017
10022
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
10018
10023
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -10061,6 +10066,7 @@ function normalizeSetupAction(input, index) {
10061
10066
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
10062
10067
  max_calls: maxCalls,
10063
10068
  tap_burst_size: tapBurstSize,
10069
+ settle_ms: settleMs,
10064
10070
  interval_ms: intervalMs,
10065
10071
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
10066
10072
  min_value: minValue,
@@ -13302,6 +13308,7 @@ function profileSetupTapUntilReceipts(results) {
13302
13308
  max_taps: result.max_taps ?? result.max_calls ?? null,
13303
13309
  tap_burst_size: result.tap_burst_size ?? null,
13304
13310
  condition_check_count: result.condition_check_count ?? null,
13311
+ settle_ms: result.settle_ms ?? null,
13305
13312
  elapsed_ms: result.elapsed_ms ?? null,
13306
13313
  interval_ms: result.interval_ms ?? null,
13307
13314
  timeout_ms: result.timeout_ms ?? null,
@@ -15293,6 +15300,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15293
15300
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
15294
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)));
15295
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)));
15296
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)));
15297
15305
  const scope = await setupActionScope(action, timeout);
15298
15306
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -15318,6 +15326,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15318
15326
  max_calls: maxTaps,
15319
15327
  tap_burst_size: tapBurstSize,
15320
15328
  condition_check_count: conditionCheckCount,
15329
+ settle_ms: settleMs,
15321
15330
  elapsed_ms: elapsedMs,
15322
15331
  interval_ms: intervalMs,
15323
15332
  timeout_ms: timeout,
@@ -15330,6 +15339,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15330
15339
  tapCount += 1;
15331
15340
  if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
15332
15341
  }
15342
+ if (settleMs) await page.waitForTimeout(settleMs);
15333
15343
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
15334
15344
  conditionCheckCount += 1;
15335
15345
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
@@ -15347,6 +15357,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15347
15357
  max_calls: maxTaps,
15348
15358
  tap_burst_size: tapBurstSize,
15349
15359
  condition_check_count: conditionCheckCount,
15360
+ settle_ms: settleMs,
15350
15361
  elapsed_ms: elapsedMs,
15351
15362
  interval_ms: intervalMs,
15352
15363
  timeout_ms: timeout,
@@ -15367,6 +15378,7 @@ async function executeSetupAction(action, ordinal, viewport) {
15367
15378
  max_calls: maxTaps,
15368
15379
  tap_burst_size: tapBurstSize,
15369
15380
  condition_check_count: conditionCheckCount,
15381
+ settle_ms: settleMs,
15370
15382
  elapsed_ms: elapsedMs,
15371
15383
  interval_ms: intervalMs,
15372
15384
  timeout_ms: timeout,
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  resolveRiddleProofProfileTimeoutSec,
63
63
  slugifyRiddleProofProfileName,
64
64
  summarizeRiddleProofProfileResult
65
- } from "./chunk-FNVDZCVZ.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,7 @@ 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,
685
686
  elapsed_ms: result.elapsed_ms ?? null,
686
687
  interval_ms: result.interval_ms ?? null,
687
688
  timeout_ms: result.timeout_ms ?? null,
@@ -1327,6 +1328,10 @@ function normalizeSetupAction(input, index) {
1327
1328
  if (type === "tap_until" && tapBurstSize !== void 0 && (!Number.isInteger(tapBurstSize) || tapBurstSize < 1 || tapBurstSize > 100)) {
1328
1329
  throw new Error(`target.setup_actions[${index}].tap_burst_size must be an integer from 1 to 100.`);
1329
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
+ }
1330
1335
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
1331
1336
  if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
1332
1337
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
@@ -1375,6 +1380,7 @@ function normalizeSetupAction(input, index) {
1375
1380
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
1376
1381
  max_calls: maxCalls,
1377
1382
  tap_burst_size: tapBurstSize,
1383
+ settle_ms: settleMs,
1378
1384
  interval_ms: intervalMs,
1379
1385
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
1380
1386
  min_value: minValue,
@@ -4616,6 +4622,7 @@ function profileSetupTapUntilReceipts(results) {
4616
4622
  max_taps: result.max_taps ?? result.max_calls ?? null,
4617
4623
  tap_burst_size: result.tap_burst_size ?? null,
4618
4624
  condition_check_count: result.condition_check_count ?? null,
4625
+ settle_ms: result.settle_ms ?? null,
4619
4626
  elapsed_ms: result.elapsed_ms ?? null,
4620
4627
  interval_ms: result.interval_ms ?? null,
4621
4628
  timeout_ms: result.timeout_ms ?? null,
@@ -6607,6 +6614,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6607
6614
  if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
6608
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)));
6609
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)));
6610
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)));
6611
6619
  const scope = await setupActionScope(action, timeout);
6612
6620
  if (!scope.ok) return setupScopeFailure(base, scope);
@@ -6632,6 +6640,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6632
6640
  max_calls: maxTaps,
6633
6641
  tap_burst_size: tapBurstSize,
6634
6642
  condition_check_count: conditionCheckCount,
6643
+ settle_ms: settleMs,
6635
6644
  elapsed_ms: elapsedMs,
6636
6645
  interval_ms: intervalMs,
6637
6646
  timeout_ms: timeout,
@@ -6644,6 +6653,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6644
6653
  tapCount += 1;
6645
6654
  if (tapCount < maxTaps && burstIndex < burstCount - 1 && intervalMs) await page.waitForTimeout(intervalMs);
6646
6655
  }
6656
+ if (settleMs) await page.waitForTimeout(settleMs);
6647
6657
  lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
6648
6658
  conditionCheckCount += 1;
6649
6659
  if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
@@ -6661,6 +6671,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6661
6671
  max_calls: maxTaps,
6662
6672
  tap_burst_size: tapBurstSize,
6663
6673
  condition_check_count: conditionCheckCount,
6674
+ settle_ms: settleMs,
6664
6675
  elapsed_ms: elapsedMs,
6665
6676
  interval_ms: intervalMs,
6666
6677
  timeout_ms: timeout,
@@ -6681,6 +6692,7 @@ async function executeSetupAction(action, ordinal, viewport) {
6681
6692
  max_calls: maxTaps,
6682
6693
  tap_burst_size: tapBurstSize,
6683
6694
  condition_check_count: conditionCheckCount,
6695
+ settle_ms: settleMs,
6684
6696
  elapsed_ms: elapsedMs,
6685
6697
  interval_ms: intervalMs,
6686
6698
  timeout_ms: timeout,
@@ -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-FNVDZCVZ.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.200",
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",