@riddledc/riddle-proof 0.7.183 → 0.7.184

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.
@@ -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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
295
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
385
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
662
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
295
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
385
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
662
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -0,0 +1,76 @@
1
+ {
2
+ "version": "riddle-proof.profile.v1",
3
+ "name": "spa-route-exit-state-hygiene",
4
+ "target": {
5
+ "route": "/games/example?proof=1",
6
+ "viewports": [
7
+ { "name": "phone", "width": 390, "height": 844 },
8
+ { "name": "ipad-mini", "width": 768, "height": 1024 },
9
+ { "name": "ipad", "width": 820, "height": 1180 },
10
+ { "name": "desktop", "width": 1440, "height": 1000 }
11
+ ],
12
+ "timeout_sec": 300,
13
+ "wait_for_selector": "#game-root",
14
+ "screenshot_mode": "viewport",
15
+ "setup_actions": [
16
+ { "type": "clear_storage", "storage": "both", "reload": true },
17
+ { "type": "wait_for_selector", "selector": "#game-root", "timeout_ms": 20000 },
18
+ { "type": "wait_for_selector", "selector": "#game-root canvas, #game-root [data-proof-ready='true']", "timeout_ms": 20000 },
19
+ {
20
+ "type": "window_eval",
21
+ "label": "capture-route-active-state",
22
+ "timeout_ms": 10000,
23
+ "store_return_to": "__rpRouteExit.active",
24
+ "script": "const proof=window.__exampleRouteProof?.read?.()||{};const watched=['__exampleRouteProof','__exampleProofLastReceipt','exampleTouchState'];const activeGlobals=watched.filter((name)=>Object.prototype.hasOwnProperty.call(window,name)&&window[name]!==undefined);const out={ready:proof.ready===true,route:location.pathname,activeGlobals,activeGlobalCount:activeGlobals.length,receiptId:String(proof.receiptId||''),mode:String(proof.mode||'')};out.ok=out.ready===true&&out.activeGlobalCount>0;window.__rpRouteExit={...(window.__rpRouteExit||{}),active:out};return out;",
25
+ "return_summary_fields": [
26
+ { "path": "ok" },
27
+ { "path": "ready" },
28
+ { "path": "route" },
29
+ { "path": "activeGlobalCount" },
30
+ { "path": "activeGlobals" }
31
+ ]
32
+ },
33
+ { "type": "assert_window_value", "path": "__rpRouteExit.active.ok", "expected_value": true, "timeout_ms": 10000 },
34
+ { "type": "screenshot", "label": "route-active-state", "mode": "viewport" },
35
+ { "type": "click", "selector": "[data-testid='nav-home'], .nav-logo, a[href='/']", "timeout_ms": 10000 },
36
+ { "type": "wait_for_selector", "selector": "[data-testid='home-page'], main, [data-route='home']", "timeout_ms": 20000 },
37
+ {
38
+ "type": "window_eval",
39
+ "label": "capture-route-exit-cleanup",
40
+ "timeout_ms": 10000,
41
+ "store_return_to": "__rpRouteExit.cleanup",
42
+ "script": "const watched=['__exampleRouteProof','__exampleProofLastReceipt','exampleTouchState'];const staleNames=watched.filter((name)=>Object.prototype.hasOwnProperty.call(window,name)&&window[name]!==undefined);const out={ok:location.pathname==='/'&&staleNames.length===0,route:location.pathname,staleNames,staleCount:staleNames.length};window.__rpRouteExit={...(window.__rpRouteExit||{}),cleanup:out};return out;",
43
+ "return_summary_fields": [
44
+ { "path": "ok" },
45
+ { "path": "route" },
46
+ { "path": "staleCount" },
47
+ { "path": "staleNames" }
48
+ ]
49
+ },
50
+ { "type": "assert_window_value", "path": "__rpRouteExit.cleanup.ok", "expected_value": true, "timeout_ms": 10000 },
51
+ { "type": "assert_window_number", "path": "__rpRouteExit.cleanup.staleCount", "expected_value": 0, "timeout_ms": 10000 },
52
+ { "type": "screenshot", "label": "home-after-route-exit-cleanup", "mode": "viewport" }
53
+ ]
54
+ },
55
+ "checks": [
56
+ { "type": "route_loaded", "expected_path": "/" },
57
+ { "type": "selector_visible", "selector": "[data-testid='home-page'], main, [data-route='home']" },
58
+ { "type": "text_absent", "pattern": "\\bNaN\\b" },
59
+ { "type": "text_absent", "pattern": "undefined", "flags": "i" },
60
+ { "type": "text_absent", "pattern": "\\[object Object\\]" },
61
+ { "type": "no_horizontal_overflow", "max_overflow_px": 1 },
62
+ { "type": "no_mobile_horizontal_overflow", "max_overflow_px": 1 },
63
+ { "type": "no_fatal_console_errors" },
64
+ { "type": "no_console_warnings" }
65
+ ],
66
+ "artifacts": ["screenshot", "console", "dom_summary", "proof_json"],
67
+ "baseline_policy": "invariant_only",
68
+ "failure_policy": {
69
+ "environment_blocked": "neutral",
70
+ "proof_insufficient": "fail",
71
+ "product_regression": "fail"
72
+ },
73
+ "metadata": {
74
+ "purpose": "Template for SPA route-exit hygiene profiles. Replace the example route, selectors, and watched globals with route-local proof helpers, receipts, timers, input state, or touch state that must exist while the feature route is active and must be removed after visible UI navigation returns home."
75
+ }
76
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.183",
3
+ "version": "0.7.184",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",