@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.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  profileStatusExitCode,
14
14
  resolveRiddleProofProfileTargetUrl,
15
15
  resolveRiddleProofProfileTimeoutSec
16
- } from "./chunk-EYLIXKE2.js";
16
+ } from "./chunk-EXFYPLP2.js";
17
17
  import {
18
18
  createRiddleApiClient,
19
19
  isTerminalRiddleJobStatus,
@@ -848,10 +848,11 @@ function profilePackReceiptStatus(result, metadata, receipt) {
848
848
  clickFallbackTapKeys.add(`${ordinal === void 0 ? `idx:${index}` : `ord:${ordinal}`}:${frameSelector}:${selector}`);
849
849
  });
850
850
  const clickFallbackTapCount = clickFallbackTapKeys.size;
851
- const visibleUiActionCount = clickCount + profileSetupReceiptTotal(setupViewports, "tap");
851
+ const tapUntilCount = profileSetupReceiptTotal(setupViewports, "tap_until");
852
+ const visibleUiActionCount = clickCount + profileSetupReceiptTotal(setupViewports, "tap") + tapUntilCount;
852
853
  const setupFailureCount = profileSetupFailureCount(setupViewports);
853
854
  const setupObstructionCount = profileSetupObstructionCount(setupViewports);
854
- const inputDispatchCount = profileSetupReceiptTotal(setupViewports, "drag") + profileSetupReceiptTotal(setupViewports, "tap") + profileSetupReceiptTotal(setupViewports, "press") + profileSetupReceiptTotal(setupViewports, "keyboard_sequence");
855
+ const inputDispatchCount = profileSetupReceiptTotal(setupViewports, "drag") + profileSetupReceiptTotal(setupViewports, "tap") + tapUntilCount + profileSetupReceiptTotal(setupViewports, "press") + profileSetupReceiptTotal(setupViewports, "keyboard_sequence");
855
856
  const canvasReceipts = setupViewports.flatMap((viewport) => setupReceiptArray(viewport, "canvas_signature"));
856
857
  const hasCanvasChange = canvasReceipts.some((item) => item.ok !== false && item.changed === true);
857
858
  const canvasSignatureHashes = canvasReceipts.filter((item) => item.ok !== false).map((item) => cliString(item.hash)).filter(Boolean);
@@ -918,6 +919,13 @@ function profilePackReceiptStatus(result, metadata, receipt) {
918
919
  "click fallback tap evidence missing"
919
920
  );
920
921
  }
922
+ if (text.includes("tap_until") || text.includes("tap until") || text.includes("tap-until")) {
923
+ return profileReceiptSignalStatus(
924
+ tapUntilCount > 0,
925
+ `tap_until receipt present (${tapUntilCount})`,
926
+ "tap_until receipt missing"
927
+ );
928
+ }
921
929
  if (text.includes("active") && (text.includes("route-local") || text.includes("route local")) && (text.includes("proof helper") || text.includes("proof api") || text.includes("proof state"))) {
922
930
  return profileReceiptSignalStatus(
923
931
  hasActiveRouteLocalProofReceipt,
@@ -1353,6 +1361,7 @@ function setupNaturalInputSummaryMarkdown(viewports) {
1353
1361
  const inputReceipts = [
1354
1362
  ...setupReceiptArray(viewport, "drag").map((receipt) => ({ kind: "drag", receipt })),
1355
1363
  ...setupReceiptArray(viewport, "tap").map((receipt) => ({ kind: "tap", receipt })),
1364
+ ...setupReceiptArray(viewport, "tap_until").map((receipt) => ({ kind: "tap_until", receipt })),
1356
1365
  ...setupReceiptArray(viewport, "press").map((receipt) => ({ kind: "press", receipt }))
1357
1366
  ].filter(({ receipt }) => receipt.ok !== false);
1358
1367
  if (!inputReceipts.length) continue;
@@ -1747,6 +1756,8 @@ function profileSetupSummaryMarkdown(result) {
1747
1756
  const rangeValueTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.set_range_value_total) || 0), 0);
1748
1757
  const dragTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.drag_total) || 0), 0);
1749
1758
  const tapTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.tap_total) || 0), 0);
1759
+ const tapUntilTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.tap_until_total) || 0), 0);
1760
+ const tapUntilTapTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.tap_until_tap_total) || 0), 0);
1750
1761
  const keyboardTotal = viewports.reduce((sum, viewport) => {
1751
1762
  const total = cliFiniteNumber(viewport.keyboard_total);
1752
1763
  return sum + (total === void 0 ? cliFiniteNumber(viewport.press_total) || 0 : total);
@@ -1786,6 +1797,9 @@ function profileSetupSummaryMarkdown(result) {
1786
1797
  if (tapTotal) {
1787
1798
  lines.push(`- tap: ${tapTotal} action(s)`);
1788
1799
  }
1800
+ if (tapUntilTotal) {
1801
+ lines.push(`- tap_until: ${tapUntilTotal} action(s), tap_count total ${tapUntilTapTotal}`);
1802
+ }
1789
1803
  if (keyboardTotal) {
1790
1804
  lines.push(`- keyboard: ${keyboardTotal} action(s)`);
1791
1805
  }
@@ -1813,10 +1827,12 @@ function profileSetupSummaryMarkdown(result) {
1813
1827
  const rangeValueActions = cliFiniteNumber(viewport.set_range_value_total) || 0;
1814
1828
  const dragActions = cliFiniteNumber(viewport.drag_total) || 0;
1815
1829
  const tapActions = cliFiniteNumber(viewport.tap_total) || 0;
1830
+ const tapUntilActions = cliFiniteNumber(viewport.tap_until_total) || 0;
1831
+ const tapUntilTaps = cliFiniteNumber(viewport.tap_until_tap_total) || 0;
1816
1832
  const keyboardActions = cliFiniteNumber(viewport.keyboard_total) ?? cliFiniteNumber(viewport.press_total) ?? 0;
1817
1833
  const canvasSignatureActions = cliFiniteNumber(viewport.canvas_signature_total) || 0;
1818
1834
  const observedPath = cliString(viewport.observed_path);
1819
- 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}` : ""}`);
1835
+ 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}` : ""}`);
1820
1836
  }
1821
1837
  const clickSequenceGroups = viewports.map((viewport) => {
1822
1838
  const name = cliString(viewport.name) || "viewport";
@@ -1883,6 +1899,37 @@ function profileSetupSummaryMarkdown(result) {
1883
1899
  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)}` : ""}`);
1884
1900
  }
1885
1901
  if (tapDetails.length > sampledTapDetails.length) lines.push(`- ${tapDetails.length - sampledTapDetails.length} additional tap receipt(s) omitted.`);
1902
+ const tapUntilGroups = viewports.map((viewport) => {
1903
+ const name = cliString(viewport.name) || "viewport";
1904
+ const receipts = Array.isArray(viewport.tap_until) ? viewport.tap_until.map(cliRecord).filter((item) => Boolean(item)) : [];
1905
+ return receipts.map((receipt) => ({ name, receipt }));
1906
+ });
1907
+ const tapUntilDetails = tapUntilGroups.flat();
1908
+ const sampledTapUntilDetails = balancedSetupReceiptDetails(tapUntilGroups, 12);
1909
+ for (const { name, receipt } of sampledTapUntilDetails) {
1910
+ const selector = cliString(receipt.selector) || "target";
1911
+ const pointerType = cliString(receipt.pointer_type);
1912
+ const inputDispatch = cliString(receipt.input_dispatch);
1913
+ const coordinateMode = cliString(receipt.coordinate_mode);
1914
+ const x = cliValueLabel(receipt.x);
1915
+ const y = cliValueLabel(receipt.y);
1916
+ const durationMs = cliFiniteNumber(receipt.duration_ms);
1917
+ const untilPath = cliString(receipt.until_path) || "until_path";
1918
+ const expected = cliValueLabel(receipt.until_expected_value);
1919
+ const actual = cliValueLabel(receipt.until_value);
1920
+ const tapCount = cliFiniteNumber(receipt.tap_count);
1921
+ const maxTaps = cliFiniteNumber(receipt.max_taps) ?? cliFiniteNumber(receipt.max_calls);
1922
+ const tapBurstSize = cliFiniteNumber(receipt.tap_burst_size);
1923
+ const conditionCheckCount = cliFiniteNumber(receipt.condition_check_count);
1924
+ const ok = receipt.ok === false ? "failed" : "ok";
1925
+ const reason = cliString(receipt.reason);
1926
+ const coordinateText = x && y ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${x},${y}`)}` : "";
1927
+ const tapText = tapCount === void 0 ? "" : ` in ${tapCount}${maxTaps === void 0 ? "" : `/${maxTaps}`} tap(s)`;
1928
+ const burstText = tapBurstSize === void 0 || tapBurstSize <= 1 ? "" : `, burst ${tapBurstSize}`;
1929
+ const conditionCheckText = conditionCheckCount === void 0 ? "" : `, ${conditionCheckCount} check(s)`;
1930
+ lines.push(`- ${name} tap_until: ${ok}, ${markdownInlineCode(selector)}${pointerType ? ` ${markdownInlineCode(pointerType)}` : ""}${inputDispatch ? ` via ${markdownInlineCode(inputDispatch)}` : ""}${coordinateText}${durationMs === void 0 ? "" : `, duration ${durationMs}ms`} until ${markdownInlineCode(untilPath)}${expected === void 0 ? "" : ` == ${markdownInlineCode(expected, 80)}`}${tapText}${burstText}${conditionCheckText}${actual === void 0 ? "" : `, observed ${markdownInlineCode(actual, 80)}`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
1931
+ }
1932
+ if (tapUntilDetails.length > sampledTapUntilDetails.length) lines.push(`- ${tapUntilDetails.length - sampledTapUntilDetails.length} additional tap_until receipt(s) omitted.`);
1886
1933
  const keyboardGroups = viewports.map((viewport) => {
1887
1934
  const name = cliString(viewport.name) || "viewport";
1888
1935
  const rawReceipts = Array.isArray(viewport.keyboard) ? viewport.keyboard : viewport.press;