@riddledc/riddle-proof 0.7.163 → 0.7.165

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.
@@ -551,6 +551,24 @@ function profileSetupRangeValueReceipts(results) {
551
551
  reason: result.reason ?? result.error ?? null
552
552
  }));
553
553
  }
554
+ function profileSetupDragReceipts(results) {
555
+ return results.filter((result) => profileSetupResultAction(result) === "drag").map((result) => ({
556
+ ordinal: result.ordinal ?? null,
557
+ ok: result.ok !== false,
558
+ selector: result.selector ?? null,
559
+ frame_selector: result.frame_selector ?? null,
560
+ pointer_type: result.pointer_type ?? null,
561
+ input_dispatch: result.input_dispatch ?? null,
562
+ coordinate_mode: result.coordinate_mode ?? null,
563
+ from_x: result.from_x ?? null,
564
+ from_y: result.from_y ?? null,
565
+ to_x: result.to_x ?? null,
566
+ to_y: result.to_y ?? null,
567
+ steps: result.steps ?? null,
568
+ duration_ms: result.duration_ms ?? null,
569
+ reason: result.reason ?? result.error ?? null
570
+ }));
571
+ }
554
572
  function profileSetupCanvasSignatureReceipts(results) {
555
573
  return results.filter((result) => profileSetupResultAction(result) === "canvas_signature").map((result) => ({
556
574
  ordinal: result.ordinal ?? null,
@@ -579,8 +597,7 @@ function profileSetupCanvasSignatureStableHashGroups(results) {
579
597
  if (!hash) continue;
580
598
  const selector = stringValue(receipt.selector) || "canvas";
581
599
  const frameSelector = stringValue(receipt.frame_selector);
582
- const key = `${frameSelector || ""}
583
- ${selector}`;
600
+ const key = String(frameSelector || "") + "\n" + selector;
584
601
  const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
585
602
  const ordinal = numberValue(receipt.ordinal);
586
603
  const label = stringValue(receipt.label) || (ordinal === void 0 ? `capture-${group.receipts.length + 1}` : `#${ordinal}`);
@@ -651,6 +668,8 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
651
668
  const sampledWindowEvalReceipts = sampleProfileSetupSummaryItems(windowEvalReceipts, 8);
652
669
  const rangeValueReceipts = profileSetupRangeValueReceipts(results);
653
670
  const sampledRangeValueReceipts = sampleProfileSetupSummaryItems(rangeValueReceipts, 8);
671
+ const dragReceipts = profileSetupDragReceipts(results);
672
+ const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
654
673
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
655
674
  const sampledCanvasSignatureReceipts = sampleProfileSetupSummaryItems(canvasSignatureReceipts, 8);
656
675
  const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
@@ -704,6 +723,9 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
704
723
  set_range_value_total: rangeValueReceipts.length,
705
724
  set_range_value_truncated: rangeValueReceipts.length > sampledRangeValueReceipts.length,
706
725
  set_range_value: sampledRangeValueReceipts,
726
+ drag_total: dragReceipts.length,
727
+ drag_truncated: dragReceipts.length > sampledDragReceipts.length,
728
+ drag: sampledDragReceipts,
707
729
  canvas_signature_total: canvasSignatureReceipts.length,
708
730
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
709
731
  canvas_signature: sampledCanvasSignatureReceipts,
@@ -4167,6 +4189,26 @@ function profileSetupRangeValueReceipts(results) {
4167
4189
  reason: result.reason || result.error || null,
4168
4190
  }));
4169
4191
  }
4192
+ function profileSetupDragReceipts(results) {
4193
+ return (results || [])
4194
+ .filter((result) => result && profileSetupResultAction(result) === "drag")
4195
+ .map((result) => ({
4196
+ ordinal: result.ordinal ?? null,
4197
+ ok: result.ok !== false,
4198
+ selector: result.selector ?? null,
4199
+ frame_selector: result.frame_selector ?? null,
4200
+ pointer_type: result.pointer_type ?? null,
4201
+ input_dispatch: result.input_dispatch ?? null,
4202
+ coordinate_mode: result.coordinate_mode ?? null,
4203
+ from_x: result.from_x ?? null,
4204
+ from_y: result.from_y ?? null,
4205
+ to_x: result.to_x ?? null,
4206
+ to_y: result.to_y ?? null,
4207
+ steps: result.steps ?? null,
4208
+ duration_ms: result.duration_ms ?? null,
4209
+ reason: result.reason || result.error || null,
4210
+ }));
4211
+ }
4170
4212
  function profileSetupCanvasSignatureReceipts(results) {
4171
4213
  return (results || [])
4172
4214
  .filter((result) => result && profileSetupResultAction(result) === "canvas_signature")
@@ -4189,6 +4231,48 @@ function profileSetupCanvasSignatureReceipts(results) {
4189
4231
  reason: result.reason || result.error || null,
4190
4232
  }));
4191
4233
  }
4234
+ function profileSetupCanvasSignatureStableHashGroups(results) {
4235
+ const groups = new Map();
4236
+ for (const receipt of profileSetupCanvasSignatureReceipts(results)) {
4237
+ if (receipt.ok === false) continue;
4238
+ const hash = typeof receipt.hash === "string" && receipt.hash.trim() ? receipt.hash.trim() : undefined;
4239
+ if (!hash) continue;
4240
+ const selector = typeof receipt.selector === "string" && receipt.selector.trim() ? receipt.selector.trim() : "canvas";
4241
+ const frameSelector = typeof receipt.frame_selector === "string" && receipt.frame_selector.trim() ? receipt.frame_selector.trim() : undefined;
4242
+ const key = String(frameSelector || "") + "\\n" + selector;
4243
+ const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
4244
+ const ordinal = typeof receipt.ordinal === "number" && Number.isFinite(receipt.ordinal) ? receipt.ordinal : undefined;
4245
+ const label = typeof receipt.label === "string" && receipt.label.trim()
4246
+ ? receipt.label.trim()
4247
+ : ordinal === undefined
4248
+ ? "capture-" + (group.receipts.length + 1)
4249
+ : "#" + ordinal;
4250
+ group.receipts.push({ hash, label, ordinal });
4251
+ groups.set(key, group);
4252
+ }
4253
+ const warnings = [];
4254
+ for (const group of groups.values()) {
4255
+ const hashes = new Set(group.receipts.map((receipt) => receipt.hash));
4256
+ const labels = [...new Set(group.receipts.map((receipt) => receipt.label))];
4257
+ if (group.receipts.length < 2 || labels.length < 2 || hashes.size !== 1) continue;
4258
+ const visibleLabels = labels.slice(0, 8);
4259
+ warnings.push({
4260
+ selector: group.selector,
4261
+ frame_selector: group.frame_selector || null,
4262
+ hash: group.receipts[0].hash,
4263
+ count: group.receipts.length,
4264
+ label_count: labels.length,
4265
+ labels: visibleLabels,
4266
+ omitted_label_count: Math.max(0, labels.length - visibleLabels.length),
4267
+ ordinals: group.receipts
4268
+ .map((receipt) => receipt.ordinal)
4269
+ .filter((value) => value !== undefined)
4270
+ .slice(0, 12),
4271
+ reason: "stable_canvas_signature_hash",
4272
+ });
4273
+ }
4274
+ return warnings;
4275
+ }
4192
4276
  function sampleProfileSetupSummaryItems(items, limit) {
4193
4277
  if ((items || []).length <= limit) return items || [];
4194
4278
  const firstCount = Math.floor(limit / 2);
@@ -4247,6 +4331,8 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
4247
4331
  const sampledWindowEvalReceipts = sampleProfileSetupSummaryItems(windowEvalReceipts, 8);
4248
4332
  const rangeValueReceipts = profileSetupRangeValueReceipts(results);
4249
4333
  const sampledRangeValueReceipts = sampleProfileSetupSummaryItems(rangeValueReceipts, 8);
4334
+ const dragReceipts = profileSetupDragReceipts(results);
4335
+ const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
4250
4336
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
4251
4337
  const sampledCanvasSignatureReceipts = sampleProfileSetupSummaryItems(canvasSignatureReceipts, 8);
4252
4338
  const clickedItems = results
@@ -4310,9 +4396,13 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
4310
4396
  set_range_value_total: rangeValueReceipts.length,
4311
4397
  set_range_value_truncated: rangeValueReceipts.length > sampledRangeValueReceipts.length,
4312
4398
  set_range_value: sampledRangeValueReceipts,
4399
+ drag_total: dragReceipts.length,
4400
+ drag_truncated: dragReceipts.length > sampledDragReceipts.length,
4401
+ drag: sampledDragReceipts,
4313
4402
  canvas_signature_total: canvasSignatureReceipts.length,
4314
4403
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
4315
4404
  canvas_signature: sampledCanvasSignatureReceipts,
4405
+ canvas_signature_stable_hash_groups: profileSetupCanvasSignatureStableHashGroups(results),
4316
4406
  clicked,
4317
4407
  text_samples: textSamples,
4318
4408
  failed: failed.map((result) => ({
package/dist/cli.cjs CHANGED
@@ -7508,6 +7508,24 @@ function profileSetupRangeValueReceipts(results) {
7508
7508
  reason: result.reason ?? result.error ?? null
7509
7509
  }));
7510
7510
  }
7511
+ function profileSetupDragReceipts(results) {
7512
+ return results.filter((result) => profileSetupResultAction(result) === "drag").map((result) => ({
7513
+ ordinal: result.ordinal ?? null,
7514
+ ok: result.ok !== false,
7515
+ selector: result.selector ?? null,
7516
+ frame_selector: result.frame_selector ?? null,
7517
+ pointer_type: result.pointer_type ?? null,
7518
+ input_dispatch: result.input_dispatch ?? null,
7519
+ coordinate_mode: result.coordinate_mode ?? null,
7520
+ from_x: result.from_x ?? null,
7521
+ from_y: result.from_y ?? null,
7522
+ to_x: result.to_x ?? null,
7523
+ to_y: result.to_y ?? null,
7524
+ steps: result.steps ?? null,
7525
+ duration_ms: result.duration_ms ?? null,
7526
+ reason: result.reason ?? result.error ?? null
7527
+ }));
7528
+ }
7511
7529
  function profileSetupCanvasSignatureReceipts(results) {
7512
7530
  return results.filter((result) => profileSetupResultAction(result) === "canvas_signature").map((result) => ({
7513
7531
  ordinal: result.ordinal ?? null,
@@ -7536,8 +7554,7 @@ function profileSetupCanvasSignatureStableHashGroups(results) {
7536
7554
  if (!hash) continue;
7537
7555
  const selector = stringValue2(receipt.selector) || "canvas";
7538
7556
  const frameSelector = stringValue2(receipt.frame_selector);
7539
- const key = `${frameSelector || ""}
7540
- ${selector}`;
7557
+ const key = String(frameSelector || "") + "\n" + selector;
7541
7558
  const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
7542
7559
  const ordinal = numberValue(receipt.ordinal);
7543
7560
  const label = stringValue2(receipt.label) || (ordinal === void 0 ? `capture-${group.receipts.length + 1}` : `#${ordinal}`);
@@ -7608,6 +7625,8 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
7608
7625
  const sampledWindowEvalReceipts = sampleProfileSetupSummaryItems(windowEvalReceipts, 8);
7609
7626
  const rangeValueReceipts = profileSetupRangeValueReceipts(results);
7610
7627
  const sampledRangeValueReceipts = sampleProfileSetupSummaryItems(rangeValueReceipts, 8);
7628
+ const dragReceipts = profileSetupDragReceipts(results);
7629
+ const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
7611
7630
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
7612
7631
  const sampledCanvasSignatureReceipts = sampleProfileSetupSummaryItems(canvasSignatureReceipts, 8);
7613
7632
  const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
@@ -7661,6 +7680,9 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
7661
7680
  set_range_value_total: rangeValueReceipts.length,
7662
7681
  set_range_value_truncated: rangeValueReceipts.length > sampledRangeValueReceipts.length,
7663
7682
  set_range_value: sampledRangeValueReceipts,
7683
+ drag_total: dragReceipts.length,
7684
+ drag_truncated: dragReceipts.length > sampledDragReceipts.length,
7685
+ drag: sampledDragReceipts,
7664
7686
  canvas_signature_total: canvasSignatureReceipts.length,
7665
7687
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
7666
7688
  canvas_signature: sampledCanvasSignatureReceipts,
@@ -11108,6 +11130,26 @@ function profileSetupRangeValueReceipts(results) {
11108
11130
  reason: result.reason || result.error || null,
11109
11131
  }));
11110
11132
  }
11133
+ function profileSetupDragReceipts(results) {
11134
+ return (results || [])
11135
+ .filter((result) => result && profileSetupResultAction(result) === "drag")
11136
+ .map((result) => ({
11137
+ ordinal: result.ordinal ?? null,
11138
+ ok: result.ok !== false,
11139
+ selector: result.selector ?? null,
11140
+ frame_selector: result.frame_selector ?? null,
11141
+ pointer_type: result.pointer_type ?? null,
11142
+ input_dispatch: result.input_dispatch ?? null,
11143
+ coordinate_mode: result.coordinate_mode ?? null,
11144
+ from_x: result.from_x ?? null,
11145
+ from_y: result.from_y ?? null,
11146
+ to_x: result.to_x ?? null,
11147
+ to_y: result.to_y ?? null,
11148
+ steps: result.steps ?? null,
11149
+ duration_ms: result.duration_ms ?? null,
11150
+ reason: result.reason || result.error || null,
11151
+ }));
11152
+ }
11111
11153
  function profileSetupCanvasSignatureReceipts(results) {
11112
11154
  return (results || [])
11113
11155
  .filter((result) => result && profileSetupResultAction(result) === "canvas_signature")
@@ -11130,6 +11172,48 @@ function profileSetupCanvasSignatureReceipts(results) {
11130
11172
  reason: result.reason || result.error || null,
11131
11173
  }));
11132
11174
  }
11175
+ function profileSetupCanvasSignatureStableHashGroups(results) {
11176
+ const groups = new Map();
11177
+ for (const receipt of profileSetupCanvasSignatureReceipts(results)) {
11178
+ if (receipt.ok === false) continue;
11179
+ const hash = typeof receipt.hash === "string" && receipt.hash.trim() ? receipt.hash.trim() : undefined;
11180
+ if (!hash) continue;
11181
+ const selector = typeof receipt.selector === "string" && receipt.selector.trim() ? receipt.selector.trim() : "canvas";
11182
+ const frameSelector = typeof receipt.frame_selector === "string" && receipt.frame_selector.trim() ? receipt.frame_selector.trim() : undefined;
11183
+ const key = String(frameSelector || "") + "\\n" + selector;
11184
+ const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
11185
+ const ordinal = typeof receipt.ordinal === "number" && Number.isFinite(receipt.ordinal) ? receipt.ordinal : undefined;
11186
+ const label = typeof receipt.label === "string" && receipt.label.trim()
11187
+ ? receipt.label.trim()
11188
+ : ordinal === undefined
11189
+ ? "capture-" + (group.receipts.length + 1)
11190
+ : "#" + ordinal;
11191
+ group.receipts.push({ hash, label, ordinal });
11192
+ groups.set(key, group);
11193
+ }
11194
+ const warnings = [];
11195
+ for (const group of groups.values()) {
11196
+ const hashes = new Set(group.receipts.map((receipt) => receipt.hash));
11197
+ const labels = [...new Set(group.receipts.map((receipt) => receipt.label))];
11198
+ if (group.receipts.length < 2 || labels.length < 2 || hashes.size !== 1) continue;
11199
+ const visibleLabels = labels.slice(0, 8);
11200
+ warnings.push({
11201
+ selector: group.selector,
11202
+ frame_selector: group.frame_selector || null,
11203
+ hash: group.receipts[0].hash,
11204
+ count: group.receipts.length,
11205
+ label_count: labels.length,
11206
+ labels: visibleLabels,
11207
+ omitted_label_count: Math.max(0, labels.length - visibleLabels.length),
11208
+ ordinals: group.receipts
11209
+ .map((receipt) => receipt.ordinal)
11210
+ .filter((value) => value !== undefined)
11211
+ .slice(0, 12),
11212
+ reason: "stable_canvas_signature_hash",
11213
+ });
11214
+ }
11215
+ return warnings;
11216
+ }
11133
11217
  function sampleProfileSetupSummaryItems(items, limit) {
11134
11218
  if ((items || []).length <= limit) return items || [];
11135
11219
  const firstCount = Math.floor(limit / 2);
@@ -11188,6 +11272,8 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
11188
11272
  const sampledWindowEvalReceipts = sampleProfileSetupSummaryItems(windowEvalReceipts, 8);
11189
11273
  const rangeValueReceipts = profileSetupRangeValueReceipts(results);
11190
11274
  const sampledRangeValueReceipts = sampleProfileSetupSummaryItems(rangeValueReceipts, 8);
11275
+ const dragReceipts = profileSetupDragReceipts(results);
11276
+ const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
11191
11277
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
11192
11278
  const sampledCanvasSignatureReceipts = sampleProfileSetupSummaryItems(canvasSignatureReceipts, 8);
11193
11279
  const clickedItems = results
@@ -11251,9 +11337,13 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
11251
11337
  set_range_value_total: rangeValueReceipts.length,
11252
11338
  set_range_value_truncated: rangeValueReceipts.length > sampledRangeValueReceipts.length,
11253
11339
  set_range_value: sampledRangeValueReceipts,
11340
+ drag_total: dragReceipts.length,
11341
+ drag_truncated: dragReceipts.length > sampledDragReceipts.length,
11342
+ drag: sampledDragReceipts,
11254
11343
  canvas_signature_total: canvasSignatureReceipts.length,
11255
11344
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
11256
11345
  canvas_signature: sampledCanvasSignatureReceipts,
11346
+ canvas_signature_stable_hash_groups: profileSetupCanvasSignatureStableHashGroups(results),
11257
11347
  clicked,
11258
11348
  text_samples: textSamples,
11259
11349
  failed: failed.map((result) => ({
@@ -15822,6 +15912,7 @@ function profileSetupSummaryMarkdown(result) {
15822
15912
  const windowCallUntilTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_total) || 0), 0);
15823
15913
  const windowCallUntilCallTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_call_total) || 0), 0);
15824
15914
  const rangeValueTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.set_range_value_total) || 0), 0);
15915
+ const dragTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.drag_total) || 0), 0);
15825
15916
  const canvasSignatureTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.canvas_signature_total) || 0), 0);
15826
15917
  const failedTotal = viewports.reduce((sum, viewport) => sum + (Array.isArray(viewport.failed) ? viewport.failed.length : 0), 0);
15827
15918
  const lines = [
@@ -15845,6 +15936,9 @@ function profileSetupSummaryMarkdown(result) {
15845
15936
  if (rangeValueTotal) {
15846
15937
  lines.push(`- set_range_value: ${rangeValueTotal} action(s)`);
15847
15938
  }
15939
+ if (dragTotal) {
15940
+ lines.push(`- drag: ${dragTotal} action(s)`);
15941
+ }
15848
15942
  if (canvasSignatureTotal) {
15849
15943
  lines.push(`- canvas_signature: ${canvasSignatureTotal} action(s)`);
15850
15944
  }
@@ -15864,10 +15958,35 @@ function profileSetupSummaryMarkdown(result) {
15864
15958
  const windowCallUntilActions = cliFiniteNumber(viewport.window_call_until_total) || 0;
15865
15959
  const windowCallUntilCalls = cliFiniteNumber(viewport.window_call_until_call_total) || 0;
15866
15960
  const rangeValueActions = cliFiniteNumber(viewport.set_range_value_total) || 0;
15961
+ const dragActions = cliFiniteNumber(viewport.drag_total) || 0;
15867
15962
  const canvasSignatureActions = cliFiniteNumber(viewport.canvas_signature_total) || 0;
15868
15963
  const observedPath = cliString(viewport.observed_path);
15869
- lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${rangeValueActions ? `, ${rangeValueActions} set_range_value action(s)` : ""}${canvasSignatureActions ? `, ${canvasSignatureActions} canvas_signature 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}` : ""}`);
15964
+ lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${rangeValueActions ? `, ${rangeValueActions} set_range_value action(s)` : ""}${dragActions ? `, ${dragActions} drag action(s)` : ""}${canvasSignatureActions ? `, ${canvasSignatureActions} canvas_signature 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}` : ""}`);
15965
+ }
15966
+ const dragGroups = viewports.map((viewport) => {
15967
+ const name = cliString(viewport.name) || "viewport";
15968
+ const receipts = Array.isArray(viewport.drag) ? viewport.drag.map(cliRecord).filter((item) => Boolean(item)) : [];
15969
+ return receipts.map((receipt) => ({ name, receipt }));
15970
+ });
15971
+ const dragDetails = dragGroups.flat();
15972
+ const sampledDragDetails = balancedSetupReceiptDetails(dragGroups, 12);
15973
+ for (const { name, receipt } of sampledDragDetails) {
15974
+ const selector = cliString(receipt.selector) || "target";
15975
+ const pointerType = cliString(receipt.pointer_type);
15976
+ const inputDispatch = cliString(receipt.input_dispatch);
15977
+ const coordinateMode = cliString(receipt.coordinate_mode);
15978
+ const fromX = cliValueLabel(receipt.from_x);
15979
+ const fromY = cliValueLabel(receipt.from_y);
15980
+ const toX = cliValueLabel(receipt.to_x);
15981
+ const toY = cliValueLabel(receipt.to_y);
15982
+ const steps = cliFiniteNumber(receipt.steps);
15983
+ const durationMs = cliFiniteNumber(receipt.duration_ms);
15984
+ const ok = receipt.ok === false ? "failed" : "ok";
15985
+ const reason = cliString(receipt.reason);
15986
+ const coordinateText = fromX && fromY && toX && toY ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${fromX},${fromY}`)} -> ${markdownInlineCode(`${toX},${toY}`)}` : "";
15987
+ lines.push(`- ${name} drag: ${ok}, ${markdownInlineCode(selector)}${pointerType ? ` ${markdownInlineCode(pointerType)}` : ""}${inputDispatch ? ` via ${markdownInlineCode(inputDispatch)}` : ""}${coordinateText}${steps === void 0 ? "" : `, steps ${steps}`}${durationMs === void 0 ? "" : `, duration ${durationMs}ms`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
15870
15988
  }
15989
+ if (dragDetails.length > sampledDragDetails.length) lines.push(`- ${dragDetails.length - sampledDragDetails.length} additional drag receipt(s) omitted.`);
15871
15990
  const canvasSignatureGroups = viewports.map((viewport) => {
15872
15991
  const name = cliString(viewport.name) || "viewport";
15873
15992
  const receipts = Array.isArray(viewport.canvas_signature) ? viewport.canvas_signature.map(cliRecord).filter((item) => Boolean(item)) : [];
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  profileStatusExitCode,
14
14
  resolveRiddleProofProfileTargetUrl,
15
15
  resolveRiddleProofProfileTimeoutSec
16
- } from "./chunk-RWBG7256.js";
16
+ } from "./chunk-ZNPSDMJX.js";
17
17
  import {
18
18
  createRiddleApiClient,
19
19
  isTerminalRiddleJobStatus,
@@ -787,6 +787,7 @@ function profileSetupSummaryMarkdown(result) {
787
787
  const windowCallUntilTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_total) || 0), 0);
788
788
  const windowCallUntilCallTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.window_call_until_call_total) || 0), 0);
789
789
  const rangeValueTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.set_range_value_total) || 0), 0);
790
+ const dragTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.drag_total) || 0), 0);
790
791
  const canvasSignatureTotal = viewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.canvas_signature_total) || 0), 0);
791
792
  const failedTotal = viewports.reduce((sum, viewport) => sum + (Array.isArray(viewport.failed) ? viewport.failed.length : 0), 0);
792
793
  const lines = [
@@ -810,6 +811,9 @@ function profileSetupSummaryMarkdown(result) {
810
811
  if (rangeValueTotal) {
811
812
  lines.push(`- set_range_value: ${rangeValueTotal} action(s)`);
812
813
  }
814
+ if (dragTotal) {
815
+ lines.push(`- drag: ${dragTotal} action(s)`);
816
+ }
813
817
  if (canvasSignatureTotal) {
814
818
  lines.push(`- canvas_signature: ${canvasSignatureTotal} action(s)`);
815
819
  }
@@ -829,10 +833,35 @@ function profileSetupSummaryMarkdown(result) {
829
833
  const windowCallUntilActions = cliFiniteNumber(viewport.window_call_until_total) || 0;
830
834
  const windowCallUntilCalls = cliFiniteNumber(viewport.window_call_until_call_total) || 0;
831
835
  const rangeValueActions = cliFiniteNumber(viewport.set_range_value_total) || 0;
836
+ const dragActions = cliFiniteNumber(viewport.drag_total) || 0;
832
837
  const canvasSignatureActions = cliFiniteNumber(viewport.canvas_signature_total) || 0;
833
838
  const observedPath = cliString(viewport.observed_path);
834
- lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${rangeValueActions ? `, ${rangeValueActions} set_range_value action(s)` : ""}${canvasSignatureActions ? `, ${canvasSignatureActions} canvas_signature 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}` : ""}`);
839
+ lines.push(`- ${name}: ${ok}, ${resultCount} result(s), ${screenshotCount} setup screenshot(s), ${clicked} click(s)${clickCountActions ? `, ${clickCountActions} click_count action(s)` : ""}${rangeValueActions ? `, ${rangeValueActions} set_range_value action(s)` : ""}${dragActions ? `, ${dragActions} drag action(s)` : ""}${canvasSignatureActions ? `, ${canvasSignatureActions} canvas_signature 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}` : ""}`);
840
+ }
841
+ const dragGroups = viewports.map((viewport) => {
842
+ const name = cliString(viewport.name) || "viewport";
843
+ const receipts = Array.isArray(viewport.drag) ? viewport.drag.map(cliRecord).filter((item) => Boolean(item)) : [];
844
+ return receipts.map((receipt) => ({ name, receipt }));
845
+ });
846
+ const dragDetails = dragGroups.flat();
847
+ const sampledDragDetails = balancedSetupReceiptDetails(dragGroups, 12);
848
+ for (const { name, receipt } of sampledDragDetails) {
849
+ const selector = cliString(receipt.selector) || "target";
850
+ const pointerType = cliString(receipt.pointer_type);
851
+ const inputDispatch = cliString(receipt.input_dispatch);
852
+ const coordinateMode = cliString(receipt.coordinate_mode);
853
+ const fromX = cliValueLabel(receipt.from_x);
854
+ const fromY = cliValueLabel(receipt.from_y);
855
+ const toX = cliValueLabel(receipt.to_x);
856
+ const toY = cliValueLabel(receipt.to_y);
857
+ const steps = cliFiniteNumber(receipt.steps);
858
+ const durationMs = cliFiniteNumber(receipt.duration_ms);
859
+ const ok = receipt.ok === false ? "failed" : "ok";
860
+ const reason = cliString(receipt.reason);
861
+ const coordinateText = fromX && fromY && toX && toY ? `, ${coordinateMode ? `${coordinateMode} ` : ""}${markdownInlineCode(`${fromX},${fromY}`)} -> ${markdownInlineCode(`${toX},${toY}`)}` : "";
862
+ lines.push(`- ${name} drag: ${ok}, ${markdownInlineCode(selector)}${pointerType ? ` ${markdownInlineCode(pointerType)}` : ""}${inputDispatch ? ` via ${markdownInlineCode(inputDispatch)}` : ""}${coordinateText}${steps === void 0 ? "" : `, steps ${steps}`}${durationMs === void 0 ? "" : `, duration ${durationMs}ms`}${reason ? `, reason ${markdownInlineCode(reason, 100)}` : ""}`);
835
863
  }
864
+ if (dragDetails.length > sampledDragDetails.length) lines.push(`- ${dragDetails.length - sampledDragDetails.length} additional drag receipt(s) omitted.`);
836
865
  const canvasSignatureGroups = viewports.map((viewport) => {
837
866
  const name = cliString(viewport.name) || "viewport";
838
867
  const receipts = Array.isArray(viewport.canvas_signature) ? viewport.canvas_signature.map(cliRecord).filter((item) => Boolean(item)) : [];
package/dist/index.cjs CHANGED
@@ -9284,6 +9284,24 @@ function profileSetupRangeValueReceipts(results) {
9284
9284
  reason: result.reason ?? result.error ?? null
9285
9285
  }));
9286
9286
  }
9287
+ function profileSetupDragReceipts(results) {
9288
+ return results.filter((result) => profileSetupResultAction(result) === "drag").map((result) => ({
9289
+ ordinal: result.ordinal ?? null,
9290
+ ok: result.ok !== false,
9291
+ selector: result.selector ?? null,
9292
+ frame_selector: result.frame_selector ?? null,
9293
+ pointer_type: result.pointer_type ?? null,
9294
+ input_dispatch: result.input_dispatch ?? null,
9295
+ coordinate_mode: result.coordinate_mode ?? null,
9296
+ from_x: result.from_x ?? null,
9297
+ from_y: result.from_y ?? null,
9298
+ to_x: result.to_x ?? null,
9299
+ to_y: result.to_y ?? null,
9300
+ steps: result.steps ?? null,
9301
+ duration_ms: result.duration_ms ?? null,
9302
+ reason: result.reason ?? result.error ?? null
9303
+ }));
9304
+ }
9287
9305
  function profileSetupCanvasSignatureReceipts(results) {
9288
9306
  return results.filter((result) => profileSetupResultAction(result) === "canvas_signature").map((result) => ({
9289
9307
  ordinal: result.ordinal ?? null,
@@ -9312,8 +9330,7 @@ function profileSetupCanvasSignatureStableHashGroups(results) {
9312
9330
  if (!hash) continue;
9313
9331
  const selector = stringValue5(receipt.selector) || "canvas";
9314
9332
  const frameSelector = stringValue5(receipt.frame_selector);
9315
- const key = `${frameSelector || ""}
9316
- ${selector}`;
9333
+ const key = String(frameSelector || "") + "\n" + selector;
9317
9334
  const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
9318
9335
  const ordinal = numberValue3(receipt.ordinal);
9319
9336
  const label = stringValue5(receipt.label) || (ordinal === void 0 ? `capture-${group.receipts.length + 1}` : `#${ordinal}`);
@@ -9384,6 +9401,8 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
9384
9401
  const sampledWindowEvalReceipts = sampleProfileSetupSummaryItems(windowEvalReceipts, 8);
9385
9402
  const rangeValueReceipts = profileSetupRangeValueReceipts(results);
9386
9403
  const sampledRangeValueReceipts = sampleProfileSetupSummaryItems(rangeValueReceipts, 8);
9404
+ const dragReceipts = profileSetupDragReceipts(results);
9405
+ const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
9387
9406
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
9388
9407
  const sampledCanvasSignatureReceipts = sampleProfileSetupSummaryItems(canvasSignatureReceipts, 8);
9389
9408
  const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
@@ -9437,6 +9456,9 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
9437
9456
  set_range_value_total: rangeValueReceipts.length,
9438
9457
  set_range_value_truncated: rangeValueReceipts.length > sampledRangeValueReceipts.length,
9439
9458
  set_range_value: sampledRangeValueReceipts,
9459
+ drag_total: dragReceipts.length,
9460
+ drag_truncated: dragReceipts.length > sampledDragReceipts.length,
9461
+ drag: sampledDragReceipts,
9440
9462
  canvas_signature_total: canvasSignatureReceipts.length,
9441
9463
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
9442
9464
  canvas_signature: sampledCanvasSignatureReceipts,
@@ -12900,6 +12922,26 @@ function profileSetupRangeValueReceipts(results) {
12900
12922
  reason: result.reason || result.error || null,
12901
12923
  }));
12902
12924
  }
12925
+ function profileSetupDragReceipts(results) {
12926
+ return (results || [])
12927
+ .filter((result) => result && profileSetupResultAction(result) === "drag")
12928
+ .map((result) => ({
12929
+ ordinal: result.ordinal ?? null,
12930
+ ok: result.ok !== false,
12931
+ selector: result.selector ?? null,
12932
+ frame_selector: result.frame_selector ?? null,
12933
+ pointer_type: result.pointer_type ?? null,
12934
+ input_dispatch: result.input_dispatch ?? null,
12935
+ coordinate_mode: result.coordinate_mode ?? null,
12936
+ from_x: result.from_x ?? null,
12937
+ from_y: result.from_y ?? null,
12938
+ to_x: result.to_x ?? null,
12939
+ to_y: result.to_y ?? null,
12940
+ steps: result.steps ?? null,
12941
+ duration_ms: result.duration_ms ?? null,
12942
+ reason: result.reason || result.error || null,
12943
+ }));
12944
+ }
12903
12945
  function profileSetupCanvasSignatureReceipts(results) {
12904
12946
  return (results || [])
12905
12947
  .filter((result) => result && profileSetupResultAction(result) === "canvas_signature")
@@ -12922,6 +12964,48 @@ function profileSetupCanvasSignatureReceipts(results) {
12922
12964
  reason: result.reason || result.error || null,
12923
12965
  }));
12924
12966
  }
12967
+ function profileSetupCanvasSignatureStableHashGroups(results) {
12968
+ const groups = new Map();
12969
+ for (const receipt of profileSetupCanvasSignatureReceipts(results)) {
12970
+ if (receipt.ok === false) continue;
12971
+ const hash = typeof receipt.hash === "string" && receipt.hash.trim() ? receipt.hash.trim() : undefined;
12972
+ if (!hash) continue;
12973
+ const selector = typeof receipt.selector === "string" && receipt.selector.trim() ? receipt.selector.trim() : "canvas";
12974
+ const frameSelector = typeof receipt.frame_selector === "string" && receipt.frame_selector.trim() ? receipt.frame_selector.trim() : undefined;
12975
+ const key = String(frameSelector || "") + "\\n" + selector;
12976
+ const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
12977
+ const ordinal = typeof receipt.ordinal === "number" && Number.isFinite(receipt.ordinal) ? receipt.ordinal : undefined;
12978
+ const label = typeof receipt.label === "string" && receipt.label.trim()
12979
+ ? receipt.label.trim()
12980
+ : ordinal === undefined
12981
+ ? "capture-" + (group.receipts.length + 1)
12982
+ : "#" + ordinal;
12983
+ group.receipts.push({ hash, label, ordinal });
12984
+ groups.set(key, group);
12985
+ }
12986
+ const warnings = [];
12987
+ for (const group of groups.values()) {
12988
+ const hashes = new Set(group.receipts.map((receipt) => receipt.hash));
12989
+ const labels = [...new Set(group.receipts.map((receipt) => receipt.label))];
12990
+ if (group.receipts.length < 2 || labels.length < 2 || hashes.size !== 1) continue;
12991
+ const visibleLabels = labels.slice(0, 8);
12992
+ warnings.push({
12993
+ selector: group.selector,
12994
+ frame_selector: group.frame_selector || null,
12995
+ hash: group.receipts[0].hash,
12996
+ count: group.receipts.length,
12997
+ label_count: labels.length,
12998
+ labels: visibleLabels,
12999
+ omitted_label_count: Math.max(0, labels.length - visibleLabels.length),
13000
+ ordinals: group.receipts
13001
+ .map((receipt) => receipt.ordinal)
13002
+ .filter((value) => value !== undefined)
13003
+ .slice(0, 12),
13004
+ reason: "stable_canvas_signature_hash",
13005
+ });
13006
+ }
13007
+ return warnings;
13008
+ }
12925
13009
  function sampleProfileSetupSummaryItems(items, limit) {
12926
13010
  if ((items || []).length <= limit) return items || [];
12927
13011
  const firstCount = Math.floor(limit / 2);
@@ -12980,6 +13064,8 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
12980
13064
  const sampledWindowEvalReceipts = sampleProfileSetupSummaryItems(windowEvalReceipts, 8);
12981
13065
  const rangeValueReceipts = profileSetupRangeValueReceipts(results);
12982
13066
  const sampledRangeValueReceipts = sampleProfileSetupSummaryItems(rangeValueReceipts, 8);
13067
+ const dragReceipts = profileSetupDragReceipts(results);
13068
+ const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
12983
13069
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
12984
13070
  const sampledCanvasSignatureReceipts = sampleProfileSetupSummaryItems(canvasSignatureReceipts, 8);
12985
13071
  const clickedItems = results
@@ -13043,9 +13129,13 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
13043
13129
  set_range_value_total: rangeValueReceipts.length,
13044
13130
  set_range_value_truncated: rangeValueReceipts.length > sampledRangeValueReceipts.length,
13045
13131
  set_range_value: sampledRangeValueReceipts,
13132
+ drag_total: dragReceipts.length,
13133
+ drag_truncated: dragReceipts.length > sampledDragReceipts.length,
13134
+ drag: sampledDragReceipts,
13046
13135
  canvas_signature_total: canvasSignatureReceipts.length,
13047
13136
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
13048
13137
  canvas_signature: sampledCanvasSignatureReceipts,
13138
+ canvas_signature_stable_hash_groups: profileSetupCanvasSignatureStableHashGroups(results),
13049
13139
  clicked,
13050
13140
  text_samples: textSamples,
13051
13141
  failed: failed.map((result) => ({
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  resolveRiddleProofProfileTimeoutSec,
63
63
  slugifyRiddleProofProfileName,
64
64
  summarizeRiddleProofProfileResult
65
- } from "./chunk-RWBG7256.js";
65
+ } from "./chunk-ZNPSDMJX.js";
66
66
  import {
67
67
  DEFAULT_RIDDLE_API_BASE_URL,
68
68
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -598,6 +598,24 @@ function profileSetupRangeValueReceipts(results) {
598
598
  reason: result.reason ?? result.error ?? null
599
599
  }));
600
600
  }
601
+ function profileSetupDragReceipts(results) {
602
+ return results.filter((result) => profileSetupResultAction(result) === "drag").map((result) => ({
603
+ ordinal: result.ordinal ?? null,
604
+ ok: result.ok !== false,
605
+ selector: result.selector ?? null,
606
+ frame_selector: result.frame_selector ?? null,
607
+ pointer_type: result.pointer_type ?? null,
608
+ input_dispatch: result.input_dispatch ?? null,
609
+ coordinate_mode: result.coordinate_mode ?? null,
610
+ from_x: result.from_x ?? null,
611
+ from_y: result.from_y ?? null,
612
+ to_x: result.to_x ?? null,
613
+ to_y: result.to_y ?? null,
614
+ steps: result.steps ?? null,
615
+ duration_ms: result.duration_ms ?? null,
616
+ reason: result.reason ?? result.error ?? null
617
+ }));
618
+ }
601
619
  function profileSetupCanvasSignatureReceipts(results) {
602
620
  return results.filter((result) => profileSetupResultAction(result) === "canvas_signature").map((result) => ({
603
621
  ordinal: result.ordinal ?? null,
@@ -626,8 +644,7 @@ function profileSetupCanvasSignatureStableHashGroups(results) {
626
644
  if (!hash) continue;
627
645
  const selector = stringValue(receipt.selector) || "canvas";
628
646
  const frameSelector = stringValue(receipt.frame_selector);
629
- const key = `${frameSelector || ""}
630
- ${selector}`;
647
+ const key = String(frameSelector || "") + "\n" + selector;
631
648
  const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
632
649
  const ordinal = numberValue(receipt.ordinal);
633
650
  const label = stringValue(receipt.label) || (ordinal === void 0 ? `capture-${group.receipts.length + 1}` : `#${ordinal}`);
@@ -698,6 +715,8 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
698
715
  const sampledWindowEvalReceipts = sampleProfileSetupSummaryItems(windowEvalReceipts, 8);
699
716
  const rangeValueReceipts = profileSetupRangeValueReceipts(results);
700
717
  const sampledRangeValueReceipts = sampleProfileSetupSummaryItems(rangeValueReceipts, 8);
718
+ const dragReceipts = profileSetupDragReceipts(results);
719
+ const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
701
720
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
702
721
  const sampledCanvasSignatureReceipts = sampleProfileSetupSummaryItems(canvasSignatureReceipts, 8);
703
722
  const clickedItems = results.filter((result) => profileSetupResultAction(result) === "click" && result.ok !== false).map((result) => {
@@ -751,6 +770,9 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountByViewpo
751
770
  set_range_value_total: rangeValueReceipts.length,
752
771
  set_range_value_truncated: rangeValueReceipts.length > sampledRangeValueReceipts.length,
753
772
  set_range_value: sampledRangeValueReceipts,
773
+ drag_total: dragReceipts.length,
774
+ drag_truncated: dragReceipts.length > sampledDragReceipts.length,
775
+ drag: sampledDragReceipts,
754
776
  canvas_signature_total: canvasSignatureReceipts.length,
755
777
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
756
778
  canvas_signature: sampledCanvasSignatureReceipts,
@@ -4214,6 +4236,26 @@ function profileSetupRangeValueReceipts(results) {
4214
4236
  reason: result.reason || result.error || null,
4215
4237
  }));
4216
4238
  }
4239
+ function profileSetupDragReceipts(results) {
4240
+ return (results || [])
4241
+ .filter((result) => result && profileSetupResultAction(result) === "drag")
4242
+ .map((result) => ({
4243
+ ordinal: result.ordinal ?? null,
4244
+ ok: result.ok !== false,
4245
+ selector: result.selector ?? null,
4246
+ frame_selector: result.frame_selector ?? null,
4247
+ pointer_type: result.pointer_type ?? null,
4248
+ input_dispatch: result.input_dispatch ?? null,
4249
+ coordinate_mode: result.coordinate_mode ?? null,
4250
+ from_x: result.from_x ?? null,
4251
+ from_y: result.from_y ?? null,
4252
+ to_x: result.to_x ?? null,
4253
+ to_y: result.to_y ?? null,
4254
+ steps: result.steps ?? null,
4255
+ duration_ms: result.duration_ms ?? null,
4256
+ reason: result.reason || result.error || null,
4257
+ }));
4258
+ }
4217
4259
  function profileSetupCanvasSignatureReceipts(results) {
4218
4260
  return (results || [])
4219
4261
  .filter((result) => result && profileSetupResultAction(result) === "canvas_signature")
@@ -4236,6 +4278,48 @@ function profileSetupCanvasSignatureReceipts(results) {
4236
4278
  reason: result.reason || result.error || null,
4237
4279
  }));
4238
4280
  }
4281
+ function profileSetupCanvasSignatureStableHashGroups(results) {
4282
+ const groups = new Map();
4283
+ for (const receipt of profileSetupCanvasSignatureReceipts(results)) {
4284
+ if (receipt.ok === false) continue;
4285
+ const hash = typeof receipt.hash === "string" && receipt.hash.trim() ? receipt.hash.trim() : undefined;
4286
+ if (!hash) continue;
4287
+ const selector = typeof receipt.selector === "string" && receipt.selector.trim() ? receipt.selector.trim() : "canvas";
4288
+ const frameSelector = typeof receipt.frame_selector === "string" && receipt.frame_selector.trim() ? receipt.frame_selector.trim() : undefined;
4289
+ const key = String(frameSelector || "") + "\\n" + selector;
4290
+ const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
4291
+ const ordinal = typeof receipt.ordinal === "number" && Number.isFinite(receipt.ordinal) ? receipt.ordinal : undefined;
4292
+ const label = typeof receipt.label === "string" && receipt.label.trim()
4293
+ ? receipt.label.trim()
4294
+ : ordinal === undefined
4295
+ ? "capture-" + (group.receipts.length + 1)
4296
+ : "#" + ordinal;
4297
+ group.receipts.push({ hash, label, ordinal });
4298
+ groups.set(key, group);
4299
+ }
4300
+ const warnings = [];
4301
+ for (const group of groups.values()) {
4302
+ const hashes = new Set(group.receipts.map((receipt) => receipt.hash));
4303
+ const labels = [...new Set(group.receipts.map((receipt) => receipt.label))];
4304
+ if (group.receipts.length < 2 || labels.length < 2 || hashes.size !== 1) continue;
4305
+ const visibleLabels = labels.slice(0, 8);
4306
+ warnings.push({
4307
+ selector: group.selector,
4308
+ frame_selector: group.frame_selector || null,
4309
+ hash: group.receipts[0].hash,
4310
+ count: group.receipts.length,
4311
+ label_count: labels.length,
4312
+ labels: visibleLabels,
4313
+ omitted_label_count: Math.max(0, labels.length - visibleLabels.length),
4314
+ ordinals: group.receipts
4315
+ .map((receipt) => receipt.ordinal)
4316
+ .filter((value) => value !== undefined)
4317
+ .slice(0, 12),
4318
+ reason: "stable_canvas_signature_hash",
4319
+ });
4320
+ }
4321
+ return warnings;
4322
+ }
4239
4323
  function sampleProfileSetupSummaryItems(items, limit) {
4240
4324
  if ((items || []).length <= limit) return items || [];
4241
4325
  const firstCount = Math.floor(limit / 2);
@@ -4294,6 +4378,8 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
4294
4378
  const sampledWindowEvalReceipts = sampleProfileSetupSummaryItems(windowEvalReceipts, 8);
4295
4379
  const rangeValueReceipts = profileSetupRangeValueReceipts(results);
4296
4380
  const sampledRangeValueReceipts = sampleProfileSetupSummaryItems(rangeValueReceipts, 8);
4381
+ const dragReceipts = profileSetupDragReceipts(results);
4382
+ const sampledDragReceipts = sampleProfileSetupSummaryItems(dragReceipts, 8);
4297
4383
  const canvasSignatureReceipts = profileSetupCanvasSignatureReceipts(results);
4298
4384
  const sampledCanvasSignatureReceipts = sampleProfileSetupSummaryItems(canvasSignatureReceipts, 8);
4299
4385
  const clickedItems = results
@@ -4357,9 +4443,13 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
4357
4443
  set_range_value_total: rangeValueReceipts.length,
4358
4444
  set_range_value_truncated: rangeValueReceipts.length > sampledRangeValueReceipts.length,
4359
4445
  set_range_value: sampledRangeValueReceipts,
4446
+ drag_total: dragReceipts.length,
4447
+ drag_truncated: dragReceipts.length > sampledDragReceipts.length,
4448
+ drag: sampledDragReceipts,
4360
4449
  canvas_signature_total: canvasSignatureReceipts.length,
4361
4450
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
4362
4451
  canvas_signature: sampledCanvasSignatureReceipts,
4452
+ canvas_signature_stable_hash_groups: profileSetupCanvasSignatureStableHashGroups(results),
4363
4453
  clicked,
4364
4454
  text_samples: textSamples,
4365
4455
  failed: failed.map((result) => ({
package/dist/profile.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  resolveRiddleProofProfileTimeoutSec,
24
24
  slugifyRiddleProofProfileName,
25
25
  summarizeRiddleProofProfileResult
26
- } from "./chunk-RWBG7256.js";
26
+ } from "./chunk-ZNPSDMJX.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.163",
3
+ "version": "0.7.165",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",