@riddledc/riddle-proof 0.7.197 → 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/dist/cli.cjs CHANGED
@@ -7002,6 +7002,7 @@ var RIDDLE_PROOF_PROFILE_CHECK_TYPES = [
7002
7002
  var RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES = [
7003
7003
  "click",
7004
7004
  "tap",
7005
+ "tap_until",
7005
7006
  "drag",
7006
7007
  "press",
7007
7008
  "key_down",
@@ -7572,6 +7573,30 @@ function profileSetupTapReceipts(results) {
7572
7573
  reason: result.reason ?? result.error ?? null
7573
7574
  }));
7574
7575
  }
7576
+ function profileSetupTapUntilReceipts(results) {
7577
+ return results.filter((result) => profileSetupResultAction(result) === "tap_until").map((result) => ({
7578
+ ordinal: result.ordinal ?? null,
7579
+ ok: result.ok !== false,
7580
+ selector: result.selector ?? null,
7581
+ frame_selector: result.frame_selector ?? null,
7582
+ pointer_type: result.pointer_type ?? null,
7583
+ input_dispatch: result.input_dispatch ?? null,
7584
+ coordinate_mode: result.coordinate_mode ?? null,
7585
+ x: result.x ?? null,
7586
+ y: result.y ?? null,
7587
+ duration_ms: result.duration_ms ?? null,
7588
+ until_path: result.until_path ?? null,
7589
+ until_value: result.until_value ?? null,
7590
+ until_expected_value: result.until_expected_value ?? null,
7591
+ tap_count: result.tap_count ?? null,
7592
+ max_taps: result.max_taps ?? result.max_calls ?? null,
7593
+ tap_burst_size: result.tap_burst_size ?? null,
7594
+ condition_check_count: result.condition_check_count ?? null,
7595
+ interval_ms: result.interval_ms ?? null,
7596
+ timeout_ms: result.timeout_ms ?? null,
7597
+ reason: result.reason ?? result.error ?? null
7598
+ }));
7599
+ }
7575
7600
  function profileSetupKeyboardReceipts(results) {
7576
7601
  return results.filter((result) => ["press", "key_down", "key_up"].includes(profileSetupResultAction(result))).map((result) => ({
7577
7602
  action: profileSetupResultAction(result),
@@ -7747,6 +7772,9 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
7747
7772
  const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
7748
7773
  const tapReceipts = profileSetupTapReceipts(results);
7749
7774
  const sampledTapReceipts = sampleProfileSetupSummaryItems(tapReceipts, 8);
7775
+ const tapUntilReceipts = profileSetupTapUntilReceipts(results);
7776
+ const tapUntilTapCounts = tapUntilReceipts.map((result) => typeof result.tap_count === "number" && Number.isFinite(result.tap_count) ? result.tap_count : void 0).filter((value) => value !== void 0);
7777
+ const sampledTapUntilReceipts = sampleProfileSetupSummaryItems(tapUntilReceipts, 8);
7750
7778
  const keyboardReceipts = profileSetupKeyboardReceipts(results);
7751
7779
  const sampledKeyboardReceipts = sampleProfileSetupSummaryItems(keyboardReceipts, 8);
7752
7780
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
@@ -7819,6 +7847,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
7819
7847
  tap_total: tapReceipts.length,
7820
7848
  tap_truncated: tapReceipts.length > sampledTapReceipts.length,
7821
7849
  tap: sampledTapReceipts,
7850
+ tap_until_total: tapUntilReceipts.length,
7851
+ tap_until_tap_total: tapUntilTapCounts.reduce((sum, value) => sum + value, 0),
7852
+ tap_until_truncated: tapUntilReceipts.length > sampledTapUntilReceipts.length,
7853
+ tap_until: sampledTapUntilReceipts,
7822
7854
  keyboard_total: keyboardReceipts.length,
7823
7855
  keyboard_truncated: keyboardReceipts.length > sampledKeyboardReceipts.length,
7824
7856
  keyboard: sampledKeyboardReceipts,
@@ -7880,7 +7912,7 @@ function isSupportedCheckType(value) {
7880
7912
  }
7881
7913
  function normalizeSetupActionType(value, index) {
7882
7914
  const normalizedInput = String(value || "").trim().replace(/-/g, "_");
7883
- const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "reset_console" || normalizedInput === "clear_browser_console" || normalizedInput === "reset_browser_console" ? "clear_console" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "pointer_tap" || normalizedInput === "touch_tap" || normalizedInput === "canvas_tap" ? "tap" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput === "keyboard_down" || normalizedInput === "key_down" || normalizedInput === "keydown" || normalizedInput === "press_down" ? "key_down" : normalizedInput === "keyboard_up" || normalizedInput === "key_up" || normalizedInput === "keyup" || normalizedInput === "press_up" || normalizedInput === "release_key" || normalizedInput === "key_release" ? "key_up" : normalizedInput === "set_slider_value" || normalizedInput === "slider_value" || normalizedInput === "set_slider" || normalizedInput === "set_range" || normalizedInput === "range_value" || normalizedInput === "range_input" || normalizedInput === "set_range_input" ? "set_range_value" : normalizedInput === "deterministic_runtime" || normalizedInput === "mock_runtime" || normalizedInput === "mock_random" || normalizedInput === "mock_random_queue" || normalizedInput === "seed_random_queue" || normalizedInput === "set_random_queue" || normalizedInput === "mock_clock" || normalizedInput === "set_mock_clock" || normalizedInput === "set_runtime_determinism" || normalizedInput === "runtime_determinism" ? "deterministic_runtime" : normalizedInput === "canvas_hash" || normalizedInput === "capture_canvas_hash" || normalizedInput === "capture_canvas_signature" || normalizedInput === "canvas_state_signature" ? "canvas_signature" : normalizedInput === "capture_screenshot" || normalizedInput === "save_screenshot" || normalizedInput === "setup_screenshot" ? "screenshot" : normalizedInput === "accept_dialog" || normalizedInput === "accept_dialogs" || normalizedInput === "confirm_dialog" || normalizedInput === "set_dialog_response" ? "dialog_response" : normalizedInput === "dismiss_dialog" || normalizedInput === "dismiss_dialogs" || normalizedInput === "cancel_dialog" ? "dialog_response" : normalizedInput === "window_call_until" || normalizedInput === "call_until" || normalizedInput === "window_call_repeat_until" || normalizedInput === "repeat_window_call_until" ? "window_call_until" : normalizedInput === "window_evaluate" || normalizedInput === "browser_eval" || normalizedInput === "browser_evaluate" || normalizedInput === "evaluate_script" || normalizedInput === "profile_script" ? "window_eval" : normalizedInput;
7915
+ const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "reset_console" || normalizedInput === "clear_browser_console" || normalizedInput === "reset_browser_console" ? "clear_console" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "pointer_tap" || normalizedInput === "touch_tap" || normalizedInput === "canvas_tap" ? "tap" : normalizedInput === "tap_until" || normalizedInput === "pointer_tap_until" || normalizedInput === "touch_tap_until" || normalizedInput === "canvas_tap_until" || normalizedInput === "tap_repeat_until" || normalizedInput === "repeat_tap_until" ? "tap_until" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput === "keyboard_down" || normalizedInput === "key_down" || normalizedInput === "keydown" || normalizedInput === "press_down" ? "key_down" : normalizedInput === "keyboard_up" || normalizedInput === "key_up" || normalizedInput === "keyup" || normalizedInput === "press_up" || normalizedInput === "release_key" || normalizedInput === "key_release" ? "key_up" : normalizedInput === "set_slider_value" || normalizedInput === "slider_value" || normalizedInput === "set_slider" || normalizedInput === "set_range" || normalizedInput === "range_value" || normalizedInput === "range_input" || normalizedInput === "set_range_input" ? "set_range_value" : normalizedInput === "deterministic_runtime" || normalizedInput === "mock_runtime" || normalizedInput === "mock_random" || normalizedInput === "mock_random_queue" || normalizedInput === "seed_random_queue" || normalizedInput === "set_random_queue" || normalizedInput === "mock_clock" || normalizedInput === "set_mock_clock" || normalizedInput === "set_runtime_determinism" || normalizedInput === "runtime_determinism" ? "deterministic_runtime" : normalizedInput === "canvas_hash" || normalizedInput === "capture_canvas_hash" || normalizedInput === "capture_canvas_signature" || normalizedInput === "canvas_state_signature" ? "canvas_signature" : normalizedInput === "capture_screenshot" || normalizedInput === "save_screenshot" || normalizedInput === "setup_screenshot" ? "screenshot" : normalizedInput === "accept_dialog" || normalizedInput === "accept_dialogs" || normalizedInput === "confirm_dialog" || normalizedInput === "set_dialog_response" ? "dialog_response" : normalizedInput === "dismiss_dialog" || normalizedInput === "dismiss_dialogs" || normalizedInput === "cancel_dialog" ? "dialog_response" : normalizedInput === "window_call_until" || normalizedInput === "call_until" || normalizedInput === "window_call_repeat_until" || normalizedInput === "repeat_window_call_until" ? "window_call_until" : normalizedInput === "window_evaluate" || normalizedInput === "browser_eval" || normalizedInput === "browser_evaluate" || normalizedInput === "evaluate_script" || normalizedInput === "profile_script" ? "window_eval" : normalizedInput;
7884
7916
  if (RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES.includes(normalized)) {
7885
7917
  return normalized;
7886
7918
  }
@@ -7962,8 +7994,8 @@ function normalizeSetupActionCoordinateMode(value, index) {
7962
7994
  }
7963
7995
  function normalizeSetupActionPointerType(value, type, index) {
7964
7996
  if (value === void 0 || value === null || value === "") return void 0;
7965
- if (type !== "drag" && type !== "tap") {
7966
- throw new Error(`target.setup_actions[${index}].pointer_type is only supported for drag/tap actions.`);
7997
+ if (type !== "drag" && type !== "tap" && type !== "tap_until") {
7998
+ throw new Error(`target.setup_actions[${index}].pointer_type is only supported for drag/tap/tap_until actions.`);
7967
7999
  }
7968
8000
  const normalized = String(value).trim().replace(/-/g, "_").toLowerCase();
7969
8001
  if (normalized === "mouse") return "mouse";
@@ -8042,11 +8074,11 @@ function normalizeSetupAction(input, index) {
8042
8074
  if (frameIndex !== void 0 && (!Number.isInteger(frameIndex) || frameIndex < 0)) {
8043
8075
  throw new Error(`target.setup_actions[${index}].frame_index must be a non-negative integer.`);
8044
8076
  }
8045
- if ((type === "click" || type === "tap" || type === "drag" || type === "fill" || type === "set_input_value" || type === "set_range_value" || type === "canvas_signature" || type === "wait_for_selector" || type === "wait_for_text" || type === "assert_text_visible" || type === "assert_text_absent" || type === "assert_selector_count") && !selector) {
8077
+ if ((type === "click" || type === "tap" || type === "tap_until" || type === "drag" || type === "fill" || type === "set_input_value" || type === "set_range_value" || type === "canvas_signature" || type === "wait_for_selector" || type === "wait_for_text" || type === "assert_text_visible" || type === "assert_text_absent" || type === "assert_selector_count") && !selector) {
8046
8078
  throw new Error(`target.setup_actions[${index}] ${type} requires selector.`);
8047
8079
  }
8048
- const fromX = type === "click" || type === "tap" ? numberValue(valueFromOwn(input, "from_x", "fromX", "x", "click_x", "clickX", "start_x", "startX", "x1")) : numberValue(valueFromOwn(input, "from_x", "fromX", "start_x", "startX", "x1"));
8049
- const fromY = type === "click" || type === "tap" ? numberValue(valueFromOwn(input, "from_y", "fromY", "y", "click_y", "clickY", "start_y", "startY", "y1")) : numberValue(valueFromOwn(input, "from_y", "fromY", "start_y", "startY", "y1"));
8080
+ const fromX = type === "click" || type === "tap" || type === "tap_until" ? numberValue(valueFromOwn(input, "from_x", "fromX", "x", "click_x", "clickX", "start_x", "startX", "x1")) : numberValue(valueFromOwn(input, "from_x", "fromX", "start_x", "startX", "x1"));
8081
+ const fromY = type === "click" || type === "tap" || type === "tap_until" ? numberValue(valueFromOwn(input, "from_y", "fromY", "y", "click_y", "clickY", "start_y", "startY", "y1")) : numberValue(valueFromOwn(input, "from_y", "fromY", "start_y", "startY", "y1"));
8050
8082
  const toX = numberValue(valueFromOwn(input, "to_x", "toX", "end_x", "endX", "x2"));
8051
8083
  const toY = numberValue(valueFromOwn(input, "to_y", "toY", "end_y", "endY", "y2"));
8052
8084
  const coordinateMode = normalizeSetupActionCoordinateMode(valueFromOwn(input, "coordinate_mode", "coordinateMode", "coords", "units"), index);
@@ -8071,18 +8103,18 @@ function normalizeSetupAction(input, index) {
8071
8103
  }
8072
8104
  }
8073
8105
  }
8074
- if (type === "tap") {
8106
+ if (type === "tap" || type === "tap_until") {
8075
8107
  const hasTapCoordinate = fromX !== void 0 || fromY !== void 0;
8076
8108
  if (hasTapCoordinate && (fromX === void 0 || fromY === void 0)) {
8077
- throw new Error(`target.setup_actions[${index}] tap coordinates require both x and y.`);
8109
+ throw new Error(`target.setup_actions[${index}] ${type} coordinates require both x and y.`);
8078
8110
  }
8079
8111
  if (hasTapCoordinate && fromX !== void 0 && fromY !== void 0) {
8080
8112
  const tapCoordinates = [fromX, fromY];
8081
8113
  if (coordinateMode === "ratio" && tapCoordinates.some((value2) => value2 < 0 || value2 > 1)) {
8082
- throw new Error(`target.setup_actions[${index}] tap ratio coordinates must be between 0 and 1.`);
8114
+ throw new Error(`target.setup_actions[${index}] ${type} ratio coordinates must be between 0 and 1.`);
8083
8115
  }
8084
8116
  if ((coordinateMode === void 0 || coordinateMode === "pixels") && tapCoordinates.some((value2) => value2 < 0)) {
8085
- throw new Error(`target.setup_actions[${index}] tap pixel coordinates must be non-negative.`);
8117
+ throw new Error(`target.setup_actions[${index}] ${type} pixel coordinates must be non-negative.`);
8086
8118
  }
8087
8119
  }
8088
8120
  }
@@ -8188,7 +8220,7 @@ function normalizeSetupAction(input, index) {
8188
8220
  const captureReturn = input.capture_return === false || input.captureReturn === false || input.include_return === false || input.includeReturn === false || input.omit_return === true || input.omitReturn === true ? false : void 0;
8189
8221
  const untilPath = stringFromOwn(input, "until_path", "untilPath", "until_state_path", "untilStatePath", "until_window_path", "untilWindowPath", "until");
8190
8222
  const hasUntilExpectedValue = hasOwn(input, "until_expected_value") || hasOwn(input, "untilExpectedValue") || hasOwn(input, "until_expected") || hasOwn(input, "untilExpected") || hasOwn(input, "until_value") || hasOwn(input, "untilValue") || hasOwn(input, "expected_value") || hasOwn(input, "expectedValue") || hasOwn(input, "expected");
8191
- if (type === "window_call_until") {
8223
+ if (type === "window_call_until" || type === "tap_until") {
8192
8224
  if (!untilPath) {
8193
8225
  throw new Error(`target.setup_actions[${index}] ${type} requires until_path.`);
8194
8226
  }
@@ -8196,12 +8228,16 @@ function normalizeSetupAction(input, index) {
8196
8228
  throw new Error(`target.setup_actions[${index}] ${type} requires until_expected_value.`);
8197
8229
  }
8198
8230
  }
8199
- const maxCalls = numberValue(valueFromOwn(input, "max_calls", "maxCalls", "max_attempts", "maxAttempts", "attempts"));
8200
- if (type === "window_call_until" && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
8231
+ const maxCalls = numberValue(valueFromOwn(input, "max_calls", "maxCalls", "max_attempts", "maxAttempts", "attempts", "max_taps", "maxTaps", "tap_limit", "tapLimit"));
8232
+ if ((type === "window_call_until" || type === "tap_until") && (maxCalls === void 0 || !Number.isInteger(maxCalls) || maxCalls < 1 || maxCalls > 100)) {
8201
8233
  throw new Error(`target.setup_actions[${index}].max_calls must be an integer from 1 to 100.`);
8202
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
+ }
8203
8239
  const intervalMs = numberValue(valueFromOwn(input, "interval_ms", "intervalMs", "poll_ms", "pollMs", "call_interval_ms", "callIntervalMs"));
8204
- if (type === "window_call_until" && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
8240
+ if ((type === "window_call_until" || type === "tap_until") && intervalMs !== void 0 && (!Number.isInteger(intervalMs) || intervalMs < 0 || intervalMs > 5e3)) {
8205
8241
  throw new Error(`target.setup_actions[${index}].interval_ms must be an integer from 0 to 5000.`);
8206
8242
  }
8207
8243
  const steps = numberValue(input.steps);
@@ -8247,6 +8283,7 @@ function normalizeSetupAction(input, index) {
8247
8283
  until_path: untilPath,
8248
8284
  until_expected_value: hasUntilExpectedValue ? toJsonValue(valueFromOwn(input, "until_expected_value", "untilExpectedValue", "until_expected", "untilExpected", "until_value", "untilValue", "expected_value", "expectedValue", "expected")) : void 0,
8249
8285
  max_calls: maxCalls,
8286
+ tap_burst_size: tapBurstSize,
8250
8287
  interval_ms: intervalMs,
8251
8288
  expected_value: hasExpectedValue ? toJsonValue(rawExpectedValue) : void 0,
8252
8289
  min_value: minValue,
@@ -11451,6 +11488,32 @@ function profileSetupTapReceipts(results) {
11451
11488
  reason: result.reason || result.error || null,
11452
11489
  }));
11453
11490
  }
11491
+ function profileSetupTapUntilReceipts(results) {
11492
+ return (results || [])
11493
+ .filter((result) => result && profileSetupResultAction(result) === "tap_until")
11494
+ .map((result) => ({
11495
+ ordinal: result.ordinal ?? null,
11496
+ ok: result.ok !== false,
11497
+ selector: result.selector ?? null,
11498
+ frame_selector: result.frame_selector ?? null,
11499
+ pointer_type: result.pointer_type ?? null,
11500
+ input_dispatch: result.input_dispatch ?? null,
11501
+ coordinate_mode: result.coordinate_mode ?? null,
11502
+ x: result.x ?? null,
11503
+ y: result.y ?? null,
11504
+ duration_ms: result.duration_ms ?? null,
11505
+ until_path: result.until_path ?? null,
11506
+ until_value: result.until_value ?? null,
11507
+ until_expected_value: result.until_expected_value ?? null,
11508
+ tap_count: result.tap_count ?? null,
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,
11512
+ interval_ms: result.interval_ms ?? null,
11513
+ timeout_ms: result.timeout_ms ?? null,
11514
+ reason: result.reason || result.error || null,
11515
+ }));
11516
+ }
11454
11517
  function profileSetupKeyboardReceipts(results) {
11455
11518
  return (results || [])
11456
11519
  .filter((result) => result && ["press", "key_down", "key_up"].includes(profileSetupResultAction(result)))
@@ -11653,6 +11716,11 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
11653
11716
  const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
11654
11717
  const tapReceipts = profileSetupTapReceipts(results);
11655
11718
  const sampledTapReceipts = sampleProfileSetupSummaryItems(tapReceipts, 8);
11719
+ const tapUntilReceipts = profileSetupTapUntilReceipts(results);
11720
+ const tapUntilTapCounts = tapUntilReceipts
11721
+ .map((result) => typeof result.tap_count === "number" && Number.isFinite(result.tap_count) ? result.tap_count : undefined)
11722
+ .filter((value) => value !== undefined);
11723
+ const sampledTapUntilReceipts = sampleProfileSetupSummaryItems(tapUntilReceipts, 8);
11656
11724
  const keyboardReceipts = profileSetupKeyboardReceipts(results);
11657
11725
  const sampledKeyboardReceipts = sampleProfileSetupSummaryItems(keyboardReceipts, 8);
11658
11726
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
@@ -11735,6 +11803,10 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
11735
11803
  tap_total: tapReceipts.length,
11736
11804
  tap_truncated: tapReceipts.length > sampledTapReceipts.length,
11737
11805
  tap: sampledTapReceipts,
11806
+ tap_until_total: tapUntilReceipts.length,
11807
+ tap_until_tap_total: tapUntilTapCounts.reduce((sum, value) => sum + value, 0),
11808
+ tap_until_truncated: tapUntilReceipts.length > sampledTapUntilReceipts.length,
11809
+ tap_until: sampledTapUntilReceipts,
11738
11810
  keyboard_total: keyboardReceipts.length,
11739
11811
  keyboard_truncated: keyboardReceipts.length > sampledKeyboardReceipts.length,
11740
11812
  keyboard: sampledKeyboardReceipts,
@@ -12681,6 +12753,108 @@ async function waitForAnyVisibleSelector(context, selector, timeout) {
12681
12753
  }
12682
12754
  throw new Error("No visible match for selector " + selector + ": " + lastReason);
12683
12755
  }
12756
+ async function dispatchSetupTapPoint(point, pointerType, durationMs) {
12757
+ if (pointerType === "touch" || pointerType === "pen") {
12758
+ const client = await page.context().newCDPSession(page);
12759
+ try {
12760
+ if (pointerType === "touch") {
12761
+ const touchPoint = {
12762
+ x: point.x,
12763
+ y: point.y,
12764
+ radiusX: 1,
12765
+ radiusY: 1,
12766
+ force: 1,
12767
+ id: 11,
12768
+ };
12769
+ await client.send("Input.dispatchTouchEvent", {
12770
+ type: "touchStart",
12771
+ touchPoints: [touchPoint],
12772
+ });
12773
+ if (durationMs) await page.waitForTimeout(durationMs);
12774
+ await client.send("Input.dispatchTouchEvent", {
12775
+ type: "touchEnd",
12776
+ touchPoints: [],
12777
+ });
12778
+ } else {
12779
+ await client.send("Input.dispatchMouseEvent", {
12780
+ type: "mousePressed",
12781
+ x: point.x,
12782
+ y: point.y,
12783
+ button: "left",
12784
+ buttons: 1,
12785
+ clickCount: 1,
12786
+ pointerType: "pen",
12787
+ });
12788
+ if (durationMs) await page.waitForTimeout(durationMs);
12789
+ await client.send("Input.dispatchMouseEvent", {
12790
+ type: "mouseReleased",
12791
+ x: point.x,
12792
+ y: point.y,
12793
+ button: "left",
12794
+ buttons: 0,
12795
+ clickCount: 1,
12796
+ pointerType: "pen",
12797
+ });
12798
+ }
12799
+ } finally {
12800
+ await client.detach().catch(() => {});
12801
+ }
12802
+ } else {
12803
+ await page.mouse.click(point.x, point.y);
12804
+ }
12805
+ }
12806
+ async function resolveSetupTapTarget(action, base, scope, timeout) {
12807
+ const locator = scope.context.locator(action.selector);
12808
+ const count = await locator.count();
12809
+ if (!count) return { result: { ...base, ...setupScopeEvidence(scope), reason: "selector_not_found", count } };
12810
+ const targetIndex = Number.isInteger(action.index) ? action.index : 0;
12811
+ if (targetIndex < 0 || targetIndex >= count) return { result: { ...base, ...setupScopeEvidence(scope), reason: "index_out_of_range", count, target_index: targetIndex } };
12812
+ const target = locator.nth(targetIndex);
12813
+ await target.waitFor({ state: "visible", timeout });
12814
+ const box = await target.boundingBox();
12815
+ if (!box) return { result: { ...base, ...setupScopeEvidence(scope), reason: "bounding_box_unavailable", count, target_index: targetIndex } };
12816
+ const fromX = setupFiniteNumber(action.from_x ?? action.fromX ?? action.x ?? action.click_x ?? action.clickX);
12817
+ const fromY = setupFiniteNumber(action.from_y ?? action.fromY ?? action.y ?? action.click_y ?? action.clickY);
12818
+ const hasTapPosition = fromX !== undefined || fromY !== undefined;
12819
+ if (hasTapPosition && (fromX === undefined || fromY === undefined)) return { result: { ...base, ...setupScopeEvidence(scope), reason: "missing_tap_coordinates", count, target_index: targetIndex } };
12820
+ const mode = String(action.coordinate_mode || action.coordinateMode || (hasTapPosition ? "pixels" : "ratio")).trim();
12821
+ if (hasTapPosition && mode === "ratio" && [fromX, fromY].some((value) => value < 0 || value > 1)) return { result: { ...base, ...setupScopeEvidence(scope), reason: "invalid_ratio_coordinates", count, target_index: targetIndex } };
12822
+ if (hasTapPosition && mode !== "ratio" && [fromX, fromY].some((value) => value < 0)) return { result: { ...base, ...setupScopeEvidence(scope), reason: "invalid_pixel_coordinates", count, target_index: targetIndex } };
12823
+ const coordinate = (value, size) => mode === "ratio" ? value * size : value;
12824
+ const localX = hasTapPosition && fromX !== undefined ? fromX : 0.5;
12825
+ const localY = hasTapPosition && fromY !== undefined ? fromY : 0.5;
12826
+ const point = {
12827
+ x: box.x + coordinate(localX, box.width),
12828
+ y: box.y + coordinate(localY, box.height),
12829
+ };
12830
+ const durationMs = setupNumber(action.duration_ms ?? action.durationMs, 0);
12831
+ const pointerType = String(action.pointer_type || action.pointerType || "touch").trim().toLowerCase();
12832
+ return {
12833
+ target: {
12834
+ count,
12835
+ targetIndex,
12836
+ point,
12837
+ mode,
12838
+ fromX,
12839
+ fromY,
12840
+ hasTapPosition,
12841
+ pointerType,
12842
+ durationMs,
12843
+ },
12844
+ };
12845
+ }
12846
+ function setupTapTargetEvidence(tapTarget) {
12847
+ return {
12848
+ count: tapTarget.count,
12849
+ target_index: tapTarget.targetIndex,
12850
+ coordinate_mode: tapTarget.hasTapPosition ? tapTarget.mode : undefined,
12851
+ x: tapTarget.hasTapPosition ? tapTarget.fromX : undefined,
12852
+ y: tapTarget.hasTapPosition ? tapTarget.fromY : undefined,
12853
+ pointer_type: tapTarget.pointerType,
12854
+ input_dispatch: tapTarget.pointerType === "touch" || tapTarget.pointerType === "pen" ? "cdp" : "playwright_mouse",
12855
+ duration_ms: tapTarget.durationMs || undefined,
12856
+ };
12857
+ }
12684
12858
  function setupHasOwn(action, key) {
12685
12859
  return Boolean(action) && Object.keys(action).includes(key);
12686
12860
  }
@@ -13283,91 +13457,121 @@ async function executeSetupAction(action, ordinal, viewport) {
13283
13457
  if (type === "tap") {
13284
13458
  const scope = await setupActionScope(action, timeout);
13285
13459
  if (!scope.ok) return setupScopeFailure(base, scope);
13286
- const locator = scope.context.locator(action.selector);
13287
- const count = await locator.count();
13288
- if (!count) return { ...base, ...setupScopeEvidence(scope), reason: "selector_not_found", count };
13289
- const targetIndex = Number.isInteger(action.index) ? action.index : 0;
13290
- if (targetIndex < 0 || targetIndex >= count) return { ...base, ...setupScopeEvidence(scope), reason: "index_out_of_range", count, target_index: targetIndex };
13291
- const target = locator.nth(targetIndex);
13292
- await target.waitFor({ state: "visible", timeout });
13293
- const box = await target.boundingBox();
13294
- if (!box) return { ...base, ...setupScopeEvidence(scope), reason: "bounding_box_unavailable", count, target_index: targetIndex };
13295
- const fromX = setupFiniteNumber(action.from_x ?? action.fromX ?? action.x ?? action.click_x ?? action.clickX);
13296
- const fromY = setupFiniteNumber(action.from_y ?? action.fromY ?? action.y ?? action.click_y ?? action.clickY);
13297
- const hasTapPosition = fromX !== undefined || fromY !== undefined;
13298
- if (hasTapPosition && (fromX === undefined || fromY === undefined)) return { ...base, ...setupScopeEvidence(scope), reason: "missing_tap_coordinates", count, target_index: targetIndex };
13299
- const mode = String(action.coordinate_mode || action.coordinateMode || (hasTapPosition ? "pixels" : "ratio")).trim();
13300
- if (hasTapPosition && mode === "ratio" && [fromX, fromY].some((value) => value < 0 || value > 1)) return { ...base, ...setupScopeEvidence(scope), reason: "invalid_ratio_coordinates", count, target_index: targetIndex };
13301
- if (hasTapPosition && mode !== "ratio" && [fromX, fromY].some((value) => value < 0)) return { ...base, ...setupScopeEvidence(scope), reason: "invalid_pixel_coordinates", count, target_index: targetIndex };
13302
- const coordinate = (value, size) => mode === "ratio" ? value * size : value;
13303
- const localX = hasTapPosition && fromX !== undefined ? fromX : 0.5;
13304
- const localY = hasTapPosition && fromY !== undefined ? fromY : 0.5;
13305
- const point = {
13306
- x: box.x + coordinate(localX, box.width),
13307
- y: box.y + coordinate(localY, box.height),
13460
+ const prepared = await resolveSetupTapTarget(action, base, scope, timeout);
13461
+ if (prepared.result) return prepared.result;
13462
+ await dispatchSetupTapPoint(prepared.target.point, prepared.target.pointerType, prepared.target.durationMs);
13463
+ return {
13464
+ ...base,
13465
+ ...setupScopeEvidence(scope),
13466
+ ok: true,
13467
+ ...setupTapTargetEvidence(prepared.target),
13308
13468
  };
13309
- const durationMs = setupNumber(action.duration_ms ?? action.durationMs, 0);
13310
- const pointerType = String(action.pointer_type || action.pointerType || "touch").trim().toLowerCase();
13311
- if (pointerType === "touch" || pointerType === "pen") {
13312
- const client = await page.context().newCDPSession(page);
13313
- try {
13314
- if (pointerType === "touch") {
13315
- const touchPoint = {
13316
- x: point.x,
13317
- y: point.y,
13318
- radiusX: 1,
13319
- radiusY: 1,
13320
- force: 1,
13321
- id: 11,
13322
- };
13323
- await client.send("Input.dispatchTouchEvent", {
13324
- type: "touchStart",
13325
- touchPoints: [touchPoint],
13326
- });
13327
- if (durationMs) await page.waitForTimeout(durationMs);
13328
- await client.send("Input.dispatchTouchEvent", {
13329
- type: "touchEnd",
13330
- touchPoints: [],
13331
- });
13332
- } else {
13333
- await client.send("Input.dispatchMouseEvent", {
13334
- type: "mousePressed",
13335
- x: point.x,
13336
- y: point.y,
13337
- button: "left",
13338
- buttons: 1,
13339
- clickCount: 1,
13340
- pointerType: "pen",
13341
- });
13342
- if (durationMs) await page.waitForTimeout(durationMs);
13343
- await client.send("Input.dispatchMouseEvent", {
13344
- type: "mouseReleased",
13345
- x: point.x,
13346
- y: point.y,
13347
- button: "left",
13348
- buttons: 0,
13349
- clickCount: 1,
13350
- pointerType: "pen",
13351
- });
13352
- }
13353
- } finally {
13354
- await client.detach().catch(() => {});
13469
+ }
13470
+ if (type === "tap_until") {
13471
+ const untilPath = String(action.until_path || action.untilPath || action.until_state_path || action.untilStatePath || action.until_window_path || action.untilWindowPath || action.until || "");
13472
+ const hasUntilExpected = setupHasOwn(action, "until_expected_value")
13473
+ || setupHasOwn(action, "untilExpectedValue")
13474
+ || setupHasOwn(action, "until_expected")
13475
+ || setupHasOwn(action, "untilExpected")
13476
+ || setupHasOwn(action, "until_value")
13477
+ || setupHasOwn(action, "untilValue")
13478
+ || setupHasOwn(action, "expected_value")
13479
+ || setupHasOwn(action, "expectedValue")
13480
+ || setupHasOwn(action, "expected");
13481
+ const untilExpected = setupHasOwn(action, "until_expected_value")
13482
+ ? action.until_expected_value
13483
+ : setupHasOwn(action, "untilExpectedValue")
13484
+ ? action.untilExpectedValue
13485
+ : setupHasOwn(action, "until_expected")
13486
+ ? action.until_expected
13487
+ : setupHasOwn(action, "untilExpected")
13488
+ ? action.untilExpected
13489
+ : setupHasOwn(action, "until_value")
13490
+ ? action.until_value
13491
+ : setupHasOwn(action, "untilValue")
13492
+ ? action.untilValue
13493
+ : setupHasOwn(action, "expected_value")
13494
+ ? action.expected_value
13495
+ : setupHasOwn(action, "expectedValue")
13496
+ ? action.expectedValue
13497
+ : action.expected;
13498
+ if (!untilPath) return { ...base, reason: "missing_until_path" };
13499
+ if (!hasUntilExpected) return { ...base, until_path: untilPath, reason: "missing_until_expected_value" };
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))));
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)));
13503
+ const scope = await setupActionScope(action, timeout);
13504
+ if (!scope.ok) return setupScopeFailure(base, scope);
13505
+ const prepared = await resolveSetupTapTarget(action, base, scope, timeout);
13506
+ if (prepared.result) return prepared.result;
13507
+ const startedAt = Date.now();
13508
+ let tapCount = 0;
13509
+ let conditionCheckCount = 1;
13510
+ let lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
13511
+ const targetEvidence = setupTapTargetEvidence(prepared.target);
13512
+ if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
13513
+ return {
13514
+ ...base,
13515
+ ...setupScopeEvidence(scope),
13516
+ ok: true,
13517
+ ...targetEvidence,
13518
+ until_path: untilPath,
13519
+ until_value: setupJsonValue(lastPredicateResult.value),
13520
+ until_expected_value: setupJsonValue(untilExpected),
13521
+ tap_count: tapCount,
13522
+ max_taps: maxTaps,
13523
+ max_calls: maxTaps,
13524
+ tap_burst_size: tapBurstSize,
13525
+ condition_check_count: conditionCheckCount,
13526
+ interval_ms: intervalMs,
13527
+ timeout_ms: timeout,
13528
+ };
13529
+ }
13530
+ while (tapCount < maxTaps && Date.now() - startedAt <= timeout) {
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);
13355
13536
  }
13356
- } else {
13357
- await page.mouse.click(point.x, point.y);
13537
+ lastPredicateResult = await setupReadWindowValue(scope.context, untilPath);
13538
+ conditionCheckCount += 1;
13539
+ if (lastPredicateResult.ok && setupValuesEqual(lastPredicateResult.value, untilExpected)) {
13540
+ return {
13541
+ ...base,
13542
+ ...setupScopeEvidence(scope),
13543
+ ok: true,
13544
+ ...targetEvidence,
13545
+ until_path: untilPath,
13546
+ until_value: setupJsonValue(lastPredicateResult.value),
13547
+ until_expected_value: setupJsonValue(untilExpected),
13548
+ tap_count: tapCount,
13549
+ max_taps: maxTaps,
13550
+ max_calls: maxTaps,
13551
+ tap_burst_size: tapBurstSize,
13552
+ condition_check_count: conditionCheckCount,
13553
+ interval_ms: intervalMs,
13554
+ timeout_ms: timeout,
13555
+ };
13556
+ }
13557
+ if (tapCount < maxTaps && intervalMs) await page.waitForTimeout(intervalMs);
13358
13558
  }
13359
13559
  return {
13360
13560
  ...base,
13361
13561
  ...setupScopeEvidence(scope),
13362
- ok: true,
13363
- count,
13364
- target_index: targetIndex,
13365
- coordinate_mode: hasTapPosition ? mode : undefined,
13366
- x: hasTapPosition ? fromX : undefined,
13367
- y: hasTapPosition ? fromY : undefined,
13368
- pointer_type: pointerType,
13369
- input_dispatch: pointerType === "touch" || pointerType === "pen" ? "cdp" : "playwright_mouse",
13370
- duration_ms: durationMs || undefined,
13562
+ ...targetEvidence,
13563
+ until_path: untilPath,
13564
+ until_value: setupJsonValue(lastPredicateResult?.value),
13565
+ until_expected_value: setupJsonValue(untilExpected),
13566
+ tap_count: tapCount,
13567
+ max_taps: maxTaps,
13568
+ max_calls: maxTaps,
13569
+ tap_burst_size: tapBurstSize,
13570
+ condition_check_count: conditionCheckCount,
13571
+ interval_ms: intervalMs,
13572
+ timeout_ms: timeout,
13573
+ reason: Date.now() - startedAt > timeout ? "timeout" : "until_condition_not_met",
13574
+ missing_part: lastPredicateResult?.missing_part || undefined,
13371
13575
  };
13372
13576
  }
13373
13577
  if (type === "drag") {
@@ -16799,10 +17003,11 @@ function profilePackReceiptStatus(result, metadata, receipt) {
16799
17003
  clickFallbackTapKeys.add(`${ordinal === void 0 ? `idx:${index}` : `ord:${ordinal}`}:${frameSelector}:${selector}`);
16800
17004
  });
16801
17005
  const clickFallbackTapCount = clickFallbackTapKeys.size;
16802
- const visibleUiActionCount = clickCount + profileSetupReceiptTotal(setupViewports, "tap");
17006
+ const tapUntilCount = profileSetupReceiptTotal(setupViewports, "tap_until");
17007
+ const visibleUiActionCount = clickCount + profileSetupReceiptTotal(setupViewports, "tap") + tapUntilCount;
16803
17008
  const setupFailureCount = profileSetupFailureCount(setupViewports);
16804
17009
  const setupObstructionCount = profileSetupObstructionCount(setupViewports);
16805
- const inputDispatchCount = profileSetupReceiptTotal(setupViewports, "drag") + profileSetupReceiptTotal(setupViewports, "tap") + profileSetupReceiptTotal(setupViewports, "press") + profileSetupReceiptTotal(setupViewports, "keyboard_sequence");
17010
+ const inputDispatchCount = profileSetupReceiptTotal(setupViewports, "drag") + profileSetupReceiptTotal(setupViewports, "tap") + tapUntilCount + profileSetupReceiptTotal(setupViewports, "press") + profileSetupReceiptTotal(setupViewports, "keyboard_sequence");
16806
17011
  const canvasReceipts = setupViewports.flatMap((viewport) => setupReceiptArray(viewport, "canvas_signature"));
16807
17012
  const hasCanvasChange = canvasReceipts.some((item) => item.ok !== false && item.changed === true);
16808
17013
  const canvasSignatureHashes = canvasReceipts.filter((item) => item.ok !== false).map((item) => cliString(item.hash)).filter(Boolean);
@@ -16869,6 +17074,13 @@ function profilePackReceiptStatus(result, metadata, receipt) {
16869
17074
  "click fallback tap evidence missing"
16870
17075
  );
16871
17076
  }
17077
+ if (text.includes("tap_until") || text.includes("tap until") || text.includes("tap-until")) {
17078
+ return profileReceiptSignalStatus(
17079
+ tapUntilCount > 0,
17080
+ `tap_until receipt present (${tapUntilCount})`,
17081
+ "tap_until receipt missing"
17082
+ );
17083
+ }
16872
17084
  if (text.includes("active") && (text.includes("route-local") || text.includes("route local")) && (text.includes("proof helper") || text.includes("proof api") || text.includes("proof state"))) {
16873
17085
  return profileReceiptSignalStatus(
16874
17086
  hasActiveRouteLocalProofReceipt,
@@ -17304,6 +17516,7 @@ function setupNaturalInputSummaryMarkdown(viewports) {
17304
17516
  const inputReceipts = [
17305
17517
  ...setupReceiptArray(viewport, "drag").map((receipt) => ({ kind: "drag", receipt })),
17306
17518
  ...setupReceiptArray(viewport, "tap").map((receipt) => ({ kind: "tap", receipt })),
17519
+ ...setupReceiptArray(viewport, "tap_until").map((receipt) => ({ kind: "tap_until", receipt })),
17307
17520
  ...setupReceiptArray(viewport, "press").map((receipt) => ({ kind: "press", receipt }))
17308
17521
  ].filter(({ receipt }) => receipt.ok !== false);
17309
17522
  if (!inputReceipts.length) continue;
@@ -17698,6 +17911,8 @@ function profileSetupSummaryMarkdown(result) {
17698
17911
  const rangeValueTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.set_range_value_total) || 0), 0);
17699
17912
  const dragTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.drag_total) || 0), 0);
17700
17913
  const tapTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.tap_total) || 0), 0);
17914
+ const tapUntilTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.tap_until_total) || 0), 0);
17915
+ const tapUntilTapTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.tap_until_tap_total) || 0), 0);
17701
17916
  const keyboardTotal = viewports.reduce((sum, viewport) => {
17702
17917
  const total = cliFiniteNumber(viewport.keyboard_total);
17703
17918
  return sum + (total === void 0 ? cliFiniteNumber(viewport.press_total) || 0 : total);
@@ -17737,6 +17952,9 @@ function profileSetupSummaryMarkdown(result) {
17737
17952
  if (tapTotal) {
17738
17953
  lines.push(`- tap: ${tapTotal} action(s)`);
17739
17954
  }
17955
+ if (tapUntilTotal) {
17956
+ lines.push(`- tap_until: ${tapUntilTotal} action(s), tap_count total ${tapUntilTapTotal}`);
17957
+ }
17740
17958
  if (keyboardTotal) {
17741
17959
  lines.push(`- keyboard: ${keyboardTotal} action(s)`);
17742
17960
  }
@@ -17764,10 +17982,12 @@ function profileSetupSummaryMarkdown(result) {
17764
17982
  const rangeValueActions = cliFiniteNumber(viewport.set_range_value_total) || 0;
17765
17983
  const dragActions = cliFiniteNumber(viewport.drag_total) || 0;
17766
17984
  const tapActions = cliFiniteNumber(viewport.tap_total) || 0;
17985
+ const tapUntilActions = cliFiniteNumber(viewport.tap_until_total) || 0;
17986
+ const tapUntilTaps = cliFiniteNumber(viewport.tap_until_tap_total) || 0;
17767
17987
  const keyboardActions = cliFiniteNumber(viewport.keyboard_total) ?? cliFiniteNumber(viewport.press_total) ?? 0;
17768
17988
  const canvasSignatureActions = cliFiniteNumber(viewport.canvas_signature_total) || 0;
17769
17989
  const observedPath = cliString(viewport.observed_path);
17770
- lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickSequenceCount ? `, ${clickSequenceCount} click sequence(s)` : ""}${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${rangeValueActions ? `, ${rangeValueActions} set_range_value action(s)` : ""}${dragActions ? `, ${dragActions} drag action(s)` : ""}${tapActions ? `, ${tapActions} tap action(s)` : ""}${keyboardActions ? `, ${keyboardActions} keyboard action(s)` : ""}${canvasSignatureActions ? `, ${canvasSignatureActions} canvas_signature action(s)` : ""}${deterministicRuntimeActions ? `, ${deterministicRuntimeActions} deterministic_runtime action(s)` : ""}${windowCallActions ? `, ${windowCallActions} window_call action(s), ${windowCallStored} stored return(s), ${windowCallCaptured} captured return(s)` : ""}${windowEvalActions ? `, ${windowEvalActions} window_eval action(s), ${windowEvalStored} stored return(s), ${windowEvalCaptured} captured return(s)` : ""}${windowCallUntilActions ? `, ${windowCallUntilActions} window_call_until action(s), ${windowCallUntilCalls} call(s)` : ""}${observedPath ? `, path ${observedPath}` : ""}`);
17990
+ lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickSequenceCount ? `, ${clickSequenceCount} click sequence(s)` : ""}${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${rangeValueActions ? `, ${rangeValueActions} set_range_value action(s)` : ""}${dragActions ? `, ${dragActions} drag action(s)` : ""}${tapActions ? `, ${tapActions} tap action(s)` : ""}${tapUntilActions ? `, ${tapUntilActions} tap_until action(s), ${tapUntilTaps} tap(s)` : ""}${keyboardActions ? `, ${keyboardActions} keyboard action(s)` : ""}${canvasSignatureActions ? `, ${canvasSignatureActions} canvas_signature action(s)` : ""}${deterministicRuntimeActions ? `, ${deterministicRuntimeActions} deterministic_runtime action(s)` : ""}${windowCallActions ? `, ${windowCallActions} window_call action(s), ${windowCallStored} stored return(s), ${windowCallCaptured} captured return(s)` : ""}${windowEvalActions ? `, ${windowEvalActions} window_eval action(s), ${windowEvalStored} stored return(s), ${windowEvalCaptured} captured return(s)` : ""}${windowCallUntilActions ? `, ${windowCallUntilActions} window_call_until action(s), ${windowCallUntilCalls} call(s)` : ""}${observedPath ? `, path ${observedPath}` : ""}`);
17771
17991
  }
17772
17992
  const clickSequenceGroups = viewports.map((viewport) => {
17773
17993
  const name = cliString(viewport.name) || "viewport";
@@ -17834,6 +18054,37 @@ function profileSetupSummaryMarkdown(result) {
17834
18054
  lines.push(`- ${name} tap: ${ok}, ${markdownInlineCode(selector)}${pointerType ? ` ${markdownInlineCode(pointerType)}` : ""}${inputDispatch ? ` via ${markdownInlineCode(inputDispatch)}` : ""}${coordinateText}${durationMs === void 0 ? "" : `, duration ${durationMs}ms`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
17835
18055
  }
17836
18056
  if (tapDetails.length > sampledTapDetails.length) lines.push(`- ${tapDetails.length - sampledTapDetails.length} additional tap receipt(s) omitted.`);
18057
+ const tapUntilGroups = viewports.map((viewport) => {
18058
+ const name = cliString(viewport.name) || "viewport";
18059
+ const receipts = Array.isArray(viewport.tap_until) ? viewport.tap_until.map(cliRecord).filter((item) => Boolean(item)) : [];
18060
+ return receipts.map((receipt) => ({ name, receipt }));
18061
+ });
18062
+ const tapUntilDetails = tapUntilGroups.flat();
18063
+ const sampledTapUntilDetails = balancedSetupReceiptDetails(tapUntilGroups, 12);
18064
+ for (const { name, receipt } of sampledTapUntilDetails) {
18065
+ const selector = cliString(receipt.selector) || "target";
18066
+ const pointerType = cliString(receipt.pointer_type);
18067
+ const inputDispatch = cliString(receipt.input_dispatch);
18068
+ const coordinateMode = cliString(receipt.coordinate_mode);
18069
+ const x = cliValueLabel(receipt.x);
18070
+ const y = cliValueLabel(receipt.y);
18071
+ const durationMs = cliFiniteNumber(receipt.duration_ms);
18072
+ const untilPath = cliString(receipt.until_path) || "until_path";
18073
+ const expected = cliValueLabel(receipt.until_expected_value);
18074
+ const actual = cliValueLabel(receipt.until_value);
18075
+ const tapCount = cliFiniteNumber(receipt.tap_count);
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);
18079
+ const ok = receipt.ok === false ? "failed" : "ok";
18080
+ const reason = cliString(receipt.reason);
18081
+ const coordinateText = x && y ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${x},${y}`)}` : "";
18082
+ const tapText = tapCount === void 0 ? "" : ` in ${tapCount}${maxTaps === void 0 ? "" : `/${maxTaps}`} tap(s)`;
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)}` : ""}`);
18086
+ }
18087
+ if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
17837
18088
  const keyboardGroups = viewports.map((viewport) => {
17838
18089
  const name = cliString(viewport.name) || "viewport";
17839
18090
  const rawReceipts = Array.isArray(viewport.keyboard) ? viewport.keyboard : viewport.press;