@riddledc/riddle-proof 0.7.163 → 0.7.164

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.
@@ -579,8 +579,7 @@ function profileSetupCanvasSignatureStableHashGroups(results) {
579
579
  if (!hash) continue;
580
580
  const selector = stringValue(receipt.selector) || "canvas";
581
581
  const frameSelector = stringValue(receipt.frame_selector);
582
- const key = `${frameSelector || ""}
583
- ${selector}`;
582
+ const key = String(frameSelector || "") + "\n" + selector;
584
583
  const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
585
584
  const ordinal = numberValue(receipt.ordinal);
586
585
  const label = stringValue(receipt.label) || (ordinal === void 0 ? `capture-${group.receipts.length + 1}` : `#${ordinal}`);
@@ -4189,6 +4188,48 @@ function profileSetupCanvasSignatureReceipts(results) {
4189
4188
  reason: result.reason || result.error || null,
4190
4189
  }));
4191
4190
  }
4191
+ function profileSetupCanvasSignatureStableHashGroups(results) {
4192
+ const groups = new Map();
4193
+ for (const receipt of profileSetupCanvasSignatureReceipts(results)) {
4194
+ if (receipt.ok === false) continue;
4195
+ const hash = typeof receipt.hash === "string" && receipt.hash.trim() ? receipt.hash.trim() : undefined;
4196
+ if (!hash) continue;
4197
+ const selector = typeof receipt.selector === "string" && receipt.selector.trim() ? receipt.selector.trim() : "canvas";
4198
+ const frameSelector = typeof receipt.frame_selector === "string" && receipt.frame_selector.trim() ? receipt.frame_selector.trim() : undefined;
4199
+ const key = String(frameSelector || "") + "\\n" + selector;
4200
+ const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
4201
+ const ordinal = typeof receipt.ordinal === "number" && Number.isFinite(receipt.ordinal) ? receipt.ordinal : undefined;
4202
+ const label = typeof receipt.label === "string" && receipt.label.trim()
4203
+ ? receipt.label.trim()
4204
+ : ordinal === undefined
4205
+ ? "capture-" + (group.receipts.length + 1)
4206
+ : "#" + ordinal;
4207
+ group.receipts.push({ hash, label, ordinal });
4208
+ groups.set(key, group);
4209
+ }
4210
+ const warnings = [];
4211
+ for (const group of groups.values()) {
4212
+ const hashes = new Set(group.receipts.map((receipt) => receipt.hash));
4213
+ const labels = [...new Set(group.receipts.map((receipt) => receipt.label))];
4214
+ if (group.receipts.length < 2 || labels.length < 2 || hashes.size !== 1) continue;
4215
+ const visibleLabels = labels.slice(0, 8);
4216
+ warnings.push({
4217
+ selector: group.selector,
4218
+ frame_selector: group.frame_selector || null,
4219
+ hash: group.receipts[0].hash,
4220
+ count: group.receipts.length,
4221
+ label_count: labels.length,
4222
+ labels: visibleLabels,
4223
+ omitted_label_count: Math.max(0, labels.length - visibleLabels.length),
4224
+ ordinals: group.receipts
4225
+ .map((receipt) => receipt.ordinal)
4226
+ .filter((value) => value !== undefined)
4227
+ .slice(0, 12),
4228
+ reason: "stable_canvas_signature_hash",
4229
+ });
4230
+ }
4231
+ return warnings;
4232
+ }
4192
4233
  function sampleProfileSetupSummaryItems(items, limit) {
4193
4234
  if ((items || []).length <= limit) return items || [];
4194
4235
  const firstCount = Math.floor(limit / 2);
@@ -4313,6 +4354,7 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
4313
4354
  canvas_signature_total: canvasSignatureReceipts.length,
4314
4355
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
4315
4356
  canvas_signature: sampledCanvasSignatureReceipts,
4357
+ canvas_signature_stable_hash_groups: profileSetupCanvasSignatureStableHashGroups(results),
4316
4358
  clicked,
4317
4359
  text_samples: textSamples,
4318
4360
  failed: failed.map((result) => ({
package/dist/cli.cjs CHANGED
@@ -7536,8 +7536,7 @@ function profileSetupCanvasSignatureStableHashGroups(results) {
7536
7536
  if (!hash) continue;
7537
7537
  const selector = stringValue2(receipt.selector) || "canvas";
7538
7538
  const frameSelector = stringValue2(receipt.frame_selector);
7539
- const key = `${frameSelector || ""}
7540
- ${selector}`;
7539
+ const key = String(frameSelector || "") + "\n" + selector;
7541
7540
  const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
7542
7541
  const ordinal = numberValue(receipt.ordinal);
7543
7542
  const label = stringValue2(receipt.label) || (ordinal === void 0 ? `capture-${group.receipts.length + 1}` : `#${ordinal}`);
@@ -11130,6 +11129,48 @@ function profileSetupCanvasSignatureReceipts(results) {
11130
11129
  reason: result.reason || result.error || null,
11131
11130
  }));
11132
11131
  }
11132
+ function profileSetupCanvasSignatureStableHashGroups(results) {
11133
+ const groups = new Map();
11134
+ for (const receipt of profileSetupCanvasSignatureReceipts(results)) {
11135
+ if (receipt.ok === false) continue;
11136
+ const hash = typeof receipt.hash === "string" && receipt.hash.trim() ? receipt.hash.trim() : undefined;
11137
+ if (!hash) continue;
11138
+ const selector = typeof receipt.selector === "string" && receipt.selector.trim() ? receipt.selector.trim() : "canvas";
11139
+ const frameSelector = typeof receipt.frame_selector === "string" && receipt.frame_selector.trim() ? receipt.frame_selector.trim() : undefined;
11140
+ const key = String(frameSelector || "") + "\\n" + selector;
11141
+ const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
11142
+ const ordinal = typeof receipt.ordinal === "number" && Number.isFinite(receipt.ordinal) ? receipt.ordinal : undefined;
11143
+ const label = typeof receipt.label === "string" && receipt.label.trim()
11144
+ ? receipt.label.trim()
11145
+ : ordinal === undefined
11146
+ ? "capture-" + (group.receipts.length + 1)
11147
+ : "#" + ordinal;
11148
+ group.receipts.push({ hash, label, ordinal });
11149
+ groups.set(key, group);
11150
+ }
11151
+ const warnings = [];
11152
+ for (const group of groups.values()) {
11153
+ const hashes = new Set(group.receipts.map((receipt) => receipt.hash));
11154
+ const labels = [...new Set(group.receipts.map((receipt) => receipt.label))];
11155
+ if (group.receipts.length < 2 || labels.length < 2 || hashes.size !== 1) continue;
11156
+ const visibleLabels = labels.slice(0, 8);
11157
+ warnings.push({
11158
+ selector: group.selector,
11159
+ frame_selector: group.frame_selector || null,
11160
+ hash: group.receipts[0].hash,
11161
+ count: group.receipts.length,
11162
+ label_count: labels.length,
11163
+ labels: visibleLabels,
11164
+ omitted_label_count: Math.max(0, labels.length - visibleLabels.length),
11165
+ ordinals: group.receipts
11166
+ .map((receipt) => receipt.ordinal)
11167
+ .filter((value) => value !== undefined)
11168
+ .slice(0, 12),
11169
+ reason: "stable_canvas_signature_hash",
11170
+ });
11171
+ }
11172
+ return warnings;
11173
+ }
11133
11174
  function sampleProfileSetupSummaryItems(items, limit) {
11134
11175
  if ((items || []).length <= limit) return items || [];
11135
11176
  const firstCount = Math.floor(limit / 2);
@@ -11254,6 +11295,7 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
11254
11295
  canvas_signature_total: canvasSignatureReceipts.length,
11255
11296
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
11256
11297
  canvas_signature: sampledCanvasSignatureReceipts,
11298
+ canvas_signature_stable_hash_groups: profileSetupCanvasSignatureStableHashGroups(results),
11257
11299
  clicked,
11258
11300
  text_samples: textSamples,
11259
11301
  failed: failed.map((result) => ({
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-RXJ7YQBJ.js";
17
17
  import {
18
18
  createRiddleApiClient,
19
19
  isTerminalRiddleJobStatus,
package/dist/index.cjs CHANGED
@@ -9312,8 +9312,7 @@ function profileSetupCanvasSignatureStableHashGroups(results) {
9312
9312
  if (!hash) continue;
9313
9313
  const selector = stringValue5(receipt.selector) || "canvas";
9314
9314
  const frameSelector = stringValue5(receipt.frame_selector);
9315
- const key = `${frameSelector || ""}
9316
- ${selector}`;
9315
+ const key = String(frameSelector || "") + "\n" + selector;
9317
9316
  const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
9318
9317
  const ordinal = numberValue3(receipt.ordinal);
9319
9318
  const label = stringValue5(receipt.label) || (ordinal === void 0 ? `capture-${group.receipts.length + 1}` : `#${ordinal}`);
@@ -12922,6 +12921,48 @@ function profileSetupCanvasSignatureReceipts(results) {
12922
12921
  reason: result.reason || result.error || null,
12923
12922
  }));
12924
12923
  }
12924
+ function profileSetupCanvasSignatureStableHashGroups(results) {
12925
+ const groups = new Map();
12926
+ for (const receipt of profileSetupCanvasSignatureReceipts(results)) {
12927
+ if (receipt.ok === false) continue;
12928
+ const hash = typeof receipt.hash === "string" && receipt.hash.trim() ? receipt.hash.trim() : undefined;
12929
+ if (!hash) continue;
12930
+ const selector = typeof receipt.selector === "string" && receipt.selector.trim() ? receipt.selector.trim() : "canvas";
12931
+ const frameSelector = typeof receipt.frame_selector === "string" && receipt.frame_selector.trim() ? receipt.frame_selector.trim() : undefined;
12932
+ const key = String(frameSelector || "") + "\\n" + selector;
12933
+ const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
12934
+ const ordinal = typeof receipt.ordinal === "number" && Number.isFinite(receipt.ordinal) ? receipt.ordinal : undefined;
12935
+ const label = typeof receipt.label === "string" && receipt.label.trim()
12936
+ ? receipt.label.trim()
12937
+ : ordinal === undefined
12938
+ ? "capture-" + (group.receipts.length + 1)
12939
+ : "#" + ordinal;
12940
+ group.receipts.push({ hash, label, ordinal });
12941
+ groups.set(key, group);
12942
+ }
12943
+ const warnings = [];
12944
+ for (const group of groups.values()) {
12945
+ const hashes = new Set(group.receipts.map((receipt) => receipt.hash));
12946
+ const labels = [...new Set(group.receipts.map((receipt) => receipt.label))];
12947
+ if (group.receipts.length < 2 || labels.length < 2 || hashes.size !== 1) continue;
12948
+ const visibleLabels = labels.slice(0, 8);
12949
+ warnings.push({
12950
+ selector: group.selector,
12951
+ frame_selector: group.frame_selector || null,
12952
+ hash: group.receipts[0].hash,
12953
+ count: group.receipts.length,
12954
+ label_count: labels.length,
12955
+ labels: visibleLabels,
12956
+ omitted_label_count: Math.max(0, labels.length - visibleLabels.length),
12957
+ ordinals: group.receipts
12958
+ .map((receipt) => receipt.ordinal)
12959
+ .filter((value) => value !== undefined)
12960
+ .slice(0, 12),
12961
+ reason: "stable_canvas_signature_hash",
12962
+ });
12963
+ }
12964
+ return warnings;
12965
+ }
12925
12966
  function sampleProfileSetupSummaryItems(items, limit) {
12926
12967
  if ((items || []).length <= limit) return items || [];
12927
12968
  const firstCount = Math.floor(limit / 2);
@@ -13046,6 +13087,7 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
13046
13087
  canvas_signature_total: canvasSignatureReceipts.length,
13047
13088
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
13048
13089
  canvas_signature: sampledCanvasSignatureReceipts,
13090
+ canvas_signature_stable_hash_groups: profileSetupCanvasSignatureStableHashGroups(results),
13049
13091
  clicked,
13050
13092
  text_samples: textSamples,
13051
13093
  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-RXJ7YQBJ.js";
66
66
  import {
67
67
  DEFAULT_RIDDLE_API_BASE_URL,
68
68
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -626,8 +626,7 @@ function profileSetupCanvasSignatureStableHashGroups(results) {
626
626
  if (!hash) continue;
627
627
  const selector = stringValue(receipt.selector) || "canvas";
628
628
  const frameSelector = stringValue(receipt.frame_selector);
629
- const key = `${frameSelector || ""}
630
- ${selector}`;
629
+ const key = String(frameSelector || "") + "\n" + selector;
631
630
  const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
632
631
  const ordinal = numberValue(receipt.ordinal);
633
632
  const label = stringValue(receipt.label) || (ordinal === void 0 ? `capture-${group.receipts.length + 1}` : `#${ordinal}`);
@@ -4236,6 +4235,48 @@ function profileSetupCanvasSignatureReceipts(results) {
4236
4235
  reason: result.reason || result.error || null,
4237
4236
  }));
4238
4237
  }
4238
+ function profileSetupCanvasSignatureStableHashGroups(results) {
4239
+ const groups = new Map();
4240
+ for (const receipt of profileSetupCanvasSignatureReceipts(results)) {
4241
+ if (receipt.ok === false) continue;
4242
+ const hash = typeof receipt.hash === "string" && receipt.hash.trim() ? receipt.hash.trim() : undefined;
4243
+ if (!hash) continue;
4244
+ const selector = typeof receipt.selector === "string" && receipt.selector.trim() ? receipt.selector.trim() : "canvas";
4245
+ const frameSelector = typeof receipt.frame_selector === "string" && receipt.frame_selector.trim() ? receipt.frame_selector.trim() : undefined;
4246
+ const key = String(frameSelector || "") + "\\n" + selector;
4247
+ const group = groups.get(key) || { selector, frame_selector: frameSelector, receipts: [] };
4248
+ const ordinal = typeof receipt.ordinal === "number" && Number.isFinite(receipt.ordinal) ? receipt.ordinal : undefined;
4249
+ const label = typeof receipt.label === "string" && receipt.label.trim()
4250
+ ? receipt.label.trim()
4251
+ : ordinal === undefined
4252
+ ? "capture-" + (group.receipts.length + 1)
4253
+ : "#" + ordinal;
4254
+ group.receipts.push({ hash, label, ordinal });
4255
+ groups.set(key, group);
4256
+ }
4257
+ const warnings = [];
4258
+ for (const group of groups.values()) {
4259
+ const hashes = new Set(group.receipts.map((receipt) => receipt.hash));
4260
+ const labels = [...new Set(group.receipts.map((receipt) => receipt.label))];
4261
+ if (group.receipts.length < 2 || labels.length < 2 || hashes.size !== 1) continue;
4262
+ const visibleLabels = labels.slice(0, 8);
4263
+ warnings.push({
4264
+ selector: group.selector,
4265
+ frame_selector: group.frame_selector || null,
4266
+ hash: group.receipts[0].hash,
4267
+ count: group.receipts.length,
4268
+ label_count: labels.length,
4269
+ labels: visibleLabels,
4270
+ omitted_label_count: Math.max(0, labels.length - visibleLabels.length),
4271
+ ordinals: group.receipts
4272
+ .map((receipt) => receipt.ordinal)
4273
+ .filter((value) => value !== undefined)
4274
+ .slice(0, 12),
4275
+ reason: "stable_canvas_signature_hash",
4276
+ });
4277
+ }
4278
+ return warnings;
4279
+ }
4239
4280
  function sampleProfileSetupSummaryItems(items, limit) {
4240
4281
  if ((items || []).length <= limit) return items || [];
4241
4282
  const firstCount = Math.floor(limit / 2);
@@ -4360,6 +4401,7 @@ function profileSetupSummary(viewports, actionCount, expectedActionCountsByViewp
4360
4401
  canvas_signature_total: canvasSignatureReceipts.length,
4361
4402
  canvas_signature_truncated: canvasSignatureReceipts.length > sampledCanvasSignatureReceipts.length,
4362
4403
  canvas_signature: sampledCanvasSignatureReceipts,
4404
+ canvas_signature_stable_hash_groups: profileSetupCanvasSignatureStableHashGroups(results),
4363
4405
  clicked,
4364
4406
  text_samples: textSamples,
4365
4407
  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-RXJ7YQBJ.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.164",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",