@riddledc/riddle-proof 0.7.36 → 0.7.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -247,7 +247,9 @@ Set `run_direct_routes: false`, `run_clickthroughs: false`,
247
247
  `save_route_screenshots: true` when a profile needs a narrower or more
248
248
  artifact-heavy audit. `require_unique_routes: false` is useful when a navigation
249
249
  surface intentionally links to the same route from multiple cards or anchors,
250
- while still proving the unique expected route set.
250
+ while still proving the unique expected route set. When `run_all_viewports` and
251
+ `save_route_screenshots` are both enabled, route screenshot artifact labels
252
+ include the viewport name so desktop and mobile route artifacts remain distinct.
251
253
 
252
254
  The result uses `riddle-proof.profile-result.v1` and separates product failures
253
255
  from weak proof and environment blockers:
@@ -1666,6 +1666,13 @@ function inventoryRouteUrl(expectedPath) {
1666
1666
  function inventorySlugFromPath(path) {
1667
1667
  return String(path || "route").split("/").filter(Boolean).pop()?.replace(/[^a-z0-9]+/gi, "-").toLowerCase() || "route";
1668
1668
  }
1669
+ function inventorySlugFromViewport(viewport) {
1670
+ return String(viewport && viewport.name || "viewport").replace(/[^a-z0-9]+/gi, "-").replace(/^-+|-+$/g, "").toLowerCase() || "viewport";
1671
+ }
1672
+ function inventoryScreenshotLabel(check, viewport, phase, path) {
1673
+ const viewportPart = check.run_all_viewports ? "-" + inventorySlugFromViewport(viewport) : "";
1674
+ return profileSlug + viewportPart + "-" + phase + "-" + inventorySlugFromPath(path);
1675
+ }
1669
1676
  function inventoryCheckTimeout(check) {
1670
1677
  const timeout = Number(check && check.timeout_ms);
1671
1678
  return Number.isFinite(timeout) && timeout > 0 ? timeout : 45000;
@@ -1874,7 +1881,7 @@ async function collectRouteInventory(check, viewport) {
1874
1881
  const snapshot = await collectInventoryRouteSnapshot(expectedRoute, "direct", check, error);
1875
1882
  directRoutes.push(snapshot);
1876
1883
  if (check.save_route_screenshots) {
1877
- await saveScreenshot(profileSlug + "-direct-" + inventorySlugFromPath(expectedRoute.path)).catch(() => {});
1884
+ await saveScreenshot(inventoryScreenshotLabel(check, viewport, "direct", expectedRoute.path)).catch(() => {});
1878
1885
  }
1879
1886
  if (error) failures.push({ code: "direct_route_unhealthy", name: expectedRoute.name || null, path: expectedRoute.path, error });
1880
1887
  else if (snapshot.actual_app_path !== normalizeRoutePath(expectedRoute.path)) failures.push({ code: "direct_route_wrong_path", name: expectedRoute.name || null, path: expectedRoute.path, actual_app_path: snapshot.actual_app_path });
@@ -1908,7 +1915,7 @@ async function collectRouteInventory(check, viewport) {
1908
1915
  result.snapshot = await collectInventoryRouteSnapshot(expectedRoute, "clickthrough", check, result.error || "");
1909
1916
  clickthroughs.push(result);
1910
1917
  if (check.save_route_screenshots) {
1911
- await saveScreenshot(profileSlug + "-click-" + inventorySlugFromPath(expectedRoute.path)).catch(() => {});
1918
+ await saveScreenshot(inventoryScreenshotLabel(check, viewport, "click", expectedRoute.path)).catch(() => {});
1912
1919
  }
1913
1920
  if (result.error && result.error !== "source_link_not_found") failures.push({ code: "source_link_clickthrough_unhealthy", name: expectedRoute.name || null, path: expectedRoute.path, error: result.error });
1914
1921
  else if (result.snapshot.actual_app_path !== normalizeRoutePath(expectedRoute.path)) failures.push({ code: "source_link_clickthrough_wrong_path", name: expectedRoute.name || null, path: expectedRoute.path, actual_app_path: result.snapshot.actual_app_path });
package/dist/cli.cjs CHANGED
@@ -8523,6 +8523,13 @@ function inventoryRouteUrl(expectedPath) {
8523
8523
  function inventorySlugFromPath(path) {
8524
8524
  return String(path || "route").split("/").filter(Boolean).pop()?.replace(/[^a-z0-9]+/gi, "-").toLowerCase() || "route";
8525
8525
  }
8526
+ function inventorySlugFromViewport(viewport) {
8527
+ return String(viewport && viewport.name || "viewport").replace(/[^a-z0-9]+/gi, "-").replace(/^-+|-+$/g, "").toLowerCase() || "viewport";
8528
+ }
8529
+ function inventoryScreenshotLabel(check, viewport, phase, path) {
8530
+ const viewportPart = check.run_all_viewports ? "-" + inventorySlugFromViewport(viewport) : "";
8531
+ return profileSlug + viewportPart + "-" + phase + "-" + inventorySlugFromPath(path);
8532
+ }
8526
8533
  function inventoryCheckTimeout(check) {
8527
8534
  const timeout = Number(check && check.timeout_ms);
8528
8535
  return Number.isFinite(timeout) && timeout > 0 ? timeout : 45000;
@@ -8731,7 +8738,7 @@ async function collectRouteInventory(check, viewport) {
8731
8738
  const snapshot = await collectInventoryRouteSnapshot(expectedRoute, "direct", check, error);
8732
8739
  directRoutes.push(snapshot);
8733
8740
  if (check.save_route_screenshots) {
8734
- await saveScreenshot(profileSlug + "-direct-" + inventorySlugFromPath(expectedRoute.path)).catch(() => {});
8741
+ await saveScreenshot(inventoryScreenshotLabel(check, viewport, "direct", expectedRoute.path)).catch(() => {});
8735
8742
  }
8736
8743
  if (error) failures.push({ code: "direct_route_unhealthy", name: expectedRoute.name || null, path: expectedRoute.path, error });
8737
8744
  else if (snapshot.actual_app_path !== normalizeRoutePath(expectedRoute.path)) failures.push({ code: "direct_route_wrong_path", name: expectedRoute.name || null, path: expectedRoute.path, actual_app_path: snapshot.actual_app_path });
@@ -8765,7 +8772,7 @@ async function collectRouteInventory(check, viewport) {
8765
8772
  result.snapshot = await collectInventoryRouteSnapshot(expectedRoute, "clickthrough", check, result.error || "");
8766
8773
  clickthroughs.push(result);
8767
8774
  if (check.save_route_screenshots) {
8768
- await saveScreenshot(profileSlug + "-click-" + inventorySlugFromPath(expectedRoute.path)).catch(() => {});
8775
+ await saveScreenshot(inventoryScreenshotLabel(check, viewport, "click", expectedRoute.path)).catch(() => {});
8769
8776
  }
8770
8777
  if (result.error && result.error !== "source_link_not_found") failures.push({ code: "source_link_clickthrough_unhealthy", name: expectedRoute.name || null, path: expectedRoute.path, error: result.error });
8771
8778
  else if (result.snapshot.actual_app_path !== normalizeRoutePath(expectedRoute.path)) failures.push({ code: "source_link_clickthrough_wrong_path", name: expectedRoute.name || null, path: expectedRoute.path, actual_app_path: result.snapshot.actual_app_path });
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  profileStatusExitCode,
11
11
  resolveRiddleProofProfileTargetUrl,
12
12
  resolveRiddleProofProfileTimeoutSec
13
- } from "./chunk-VEK6QHPE.js";
13
+ } from "./chunk-KZRDAMI5.js";
14
14
  import {
15
15
  createRiddleApiClient,
16
16
  parseRiddleViewport
package/dist/index.cjs CHANGED
@@ -10380,6 +10380,13 @@ function inventoryRouteUrl(expectedPath) {
10380
10380
  function inventorySlugFromPath(path) {
10381
10381
  return String(path || "route").split("/").filter(Boolean).pop()?.replace(/[^a-z0-9]+/gi, "-").toLowerCase() || "route";
10382
10382
  }
10383
+ function inventorySlugFromViewport(viewport) {
10384
+ return String(viewport && viewport.name || "viewport").replace(/[^a-z0-9]+/gi, "-").replace(/^-+|-+$/g, "").toLowerCase() || "viewport";
10385
+ }
10386
+ function inventoryScreenshotLabel(check, viewport, phase, path) {
10387
+ const viewportPart = check.run_all_viewports ? "-" + inventorySlugFromViewport(viewport) : "";
10388
+ return profileSlug + viewportPart + "-" + phase + "-" + inventorySlugFromPath(path);
10389
+ }
10383
10390
  function inventoryCheckTimeout(check) {
10384
10391
  const timeout = Number(check && check.timeout_ms);
10385
10392
  return Number.isFinite(timeout) && timeout > 0 ? timeout : 45000;
@@ -10588,7 +10595,7 @@ async function collectRouteInventory(check, viewport) {
10588
10595
  const snapshot = await collectInventoryRouteSnapshot(expectedRoute, "direct", check, error);
10589
10596
  directRoutes.push(snapshot);
10590
10597
  if (check.save_route_screenshots) {
10591
- await saveScreenshot(profileSlug + "-direct-" + inventorySlugFromPath(expectedRoute.path)).catch(() => {});
10598
+ await saveScreenshot(inventoryScreenshotLabel(check, viewport, "direct", expectedRoute.path)).catch(() => {});
10592
10599
  }
10593
10600
  if (error) failures.push({ code: "direct_route_unhealthy", name: expectedRoute.name || null, path: expectedRoute.path, error });
10594
10601
  else if (snapshot.actual_app_path !== normalizeRoutePath(expectedRoute.path)) failures.push({ code: "direct_route_wrong_path", name: expectedRoute.name || null, path: expectedRoute.path, actual_app_path: snapshot.actual_app_path });
@@ -10622,7 +10629,7 @@ async function collectRouteInventory(check, viewport) {
10622
10629
  result.snapshot = await collectInventoryRouteSnapshot(expectedRoute, "clickthrough", check, result.error || "");
10623
10630
  clickthroughs.push(result);
10624
10631
  if (check.save_route_screenshots) {
10625
- await saveScreenshot(profileSlug + "-click-" + inventorySlugFromPath(expectedRoute.path)).catch(() => {});
10632
+ await saveScreenshot(inventoryScreenshotLabel(check, viewport, "click", expectedRoute.path)).catch(() => {});
10626
10633
  }
10627
10634
  if (result.error && result.error !== "source_link_not_found") failures.push({ code: "source_link_clickthrough_unhealthy", name: expectedRoute.name || null, path: expectedRoute.path, error: result.error });
10628
10635
  else if (result.snapshot.actual_app_path !== normalizeRoutePath(expectedRoute.path)) failures.push({ code: "source_link_clickthrough_wrong_path", name: expectedRoute.name || null, path: expectedRoute.path, actual_app_path: result.snapshot.actual_app_path });
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ import {
58
58
  resolveRiddleProofProfileTimeoutSec,
59
59
  slugifyRiddleProofProfileName,
60
60
  summarizeRiddleProofProfileResult
61
- } from "./chunk-VEK6QHPE.js";
61
+ } from "./chunk-KZRDAMI5.js";
62
62
  import {
63
63
  DEFAULT_RIDDLE_API_BASE_URL,
64
64
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -1709,6 +1709,13 @@ function inventoryRouteUrl(expectedPath) {
1709
1709
  function inventorySlugFromPath(path) {
1710
1710
  return String(path || "route").split("/").filter(Boolean).pop()?.replace(/[^a-z0-9]+/gi, "-").toLowerCase() || "route";
1711
1711
  }
1712
+ function inventorySlugFromViewport(viewport) {
1713
+ return String(viewport && viewport.name || "viewport").replace(/[^a-z0-9]+/gi, "-").replace(/^-+|-+$/g, "").toLowerCase() || "viewport";
1714
+ }
1715
+ function inventoryScreenshotLabel(check, viewport, phase, path) {
1716
+ const viewportPart = check.run_all_viewports ? "-" + inventorySlugFromViewport(viewport) : "";
1717
+ return profileSlug + viewportPart + "-" + phase + "-" + inventorySlugFromPath(path);
1718
+ }
1712
1719
  function inventoryCheckTimeout(check) {
1713
1720
  const timeout = Number(check && check.timeout_ms);
1714
1721
  return Number.isFinite(timeout) && timeout > 0 ? timeout : 45000;
@@ -1917,7 +1924,7 @@ async function collectRouteInventory(check, viewport) {
1917
1924
  const snapshot = await collectInventoryRouteSnapshot(expectedRoute, "direct", check, error);
1918
1925
  directRoutes.push(snapshot);
1919
1926
  if (check.save_route_screenshots) {
1920
- await saveScreenshot(profileSlug + "-direct-" + inventorySlugFromPath(expectedRoute.path)).catch(() => {});
1927
+ await saveScreenshot(inventoryScreenshotLabel(check, viewport, "direct", expectedRoute.path)).catch(() => {});
1921
1928
  }
1922
1929
  if (error) failures.push({ code: "direct_route_unhealthy", name: expectedRoute.name || null, path: expectedRoute.path, error });
1923
1930
  else if (snapshot.actual_app_path !== normalizeRoutePath(expectedRoute.path)) failures.push({ code: "direct_route_wrong_path", name: expectedRoute.name || null, path: expectedRoute.path, actual_app_path: snapshot.actual_app_path });
@@ -1951,7 +1958,7 @@ async function collectRouteInventory(check, viewport) {
1951
1958
  result.snapshot = await collectInventoryRouteSnapshot(expectedRoute, "clickthrough", check, result.error || "");
1952
1959
  clickthroughs.push(result);
1953
1960
  if (check.save_route_screenshots) {
1954
- await saveScreenshot(profileSlug + "-click-" + inventorySlugFromPath(expectedRoute.path)).catch(() => {});
1961
+ await saveScreenshot(inventoryScreenshotLabel(check, viewport, "click", expectedRoute.path)).catch(() => {});
1955
1962
  }
1956
1963
  if (result.error && result.error !== "source_link_not_found") failures.push({ code: "source_link_clickthrough_unhealthy", name: expectedRoute.name || null, path: expectedRoute.path, error: result.error });
1957
1964
  else if (result.snapshot.actual_app_path !== normalizeRoutePath(expectedRoute.path)) failures.push({ code: "source_link_clickthrough_wrong_path", name: expectedRoute.name || null, path: expectedRoute.path, actual_app_path: result.snapshot.actual_app_path });
package/dist/profile.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  resolveRiddleProofProfileTimeoutSec,
20
20
  slugifyRiddleProofProfileName,
21
21
  summarizeRiddleProofProfileResult
22
- } from "./chunk-VEK6QHPE.js";
22
+ } from "./chunk-KZRDAMI5.js";
23
23
  export {
24
24
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
25
25
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.36",
3
+ "version": "0.7.37",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",