@riddledc/riddle-proof 0.8.19 → 0.8.21

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.
@@ -2623,9 +2623,10 @@ ${implementRes.stderr || ""}`;
2623
2623
  verifyContinueWithStage,
2624
2624
  convergenceSignals
2625
2625
  };
2626
+ const structuredInteractionFailureSummary = stringValue(verifyDecisionRequest?.structured_interaction_capture_failure_summary) || stringValue(verifyDecisionRequest?.structured_interaction_failure_summary) || stringValue(state?.structured_interaction_capture_failure_summary) || stringValue(state?.structured_interaction_failure_summary);
2626
2627
  if (verifyStatus !== "evidence_captured") {
2627
2628
  const captureQuality = verifyDecisionRequest?.capture_quality || {};
2628
- const captureTerminalBlocker = captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
+ const captureTerminalBlocker = Boolean(structuredInteractionFailureSummary) || captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
2630
  if (!captureTerminalBlocker && (verifyContinueWithStage || verifyRecommendedStage || "author") === "author") {
2630
2631
  updateState(config.statePath, (currentState) => {
2631
2632
  currentState.author_status = "needs_authoring";
@@ -2635,7 +2636,7 @@ ${implementRes.stderr || ""}`;
2635
2636
  state = readState(config.statePath);
2636
2637
  }
2637
2638
  const checkpointName = captureTerminalBlocker ? "verify_capture_blocked" : "verify_capture_retry";
2638
- const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
+ const summary = structuredInteractionFailureSummary || stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
2640
  recordAttempt("verify", "checkpoint", summary, {
2640
2641
  autoApproved: verifyRes.autoApproved || false,
2641
2642
  checkpoint: checkpointName,
@@ -2663,6 +2664,36 @@ ${implementRes.stderr || ""}`;
2663
2664
  }
2664
2665
  );
2665
2666
  }
2667
+ if (structuredInteractionFailureSummary) {
2668
+ const summary = structuredInteractionFailureSummary;
2669
+ recordAttempt("verify", "checkpoint", summary, {
2670
+ autoApproved: verifyRes.autoApproved || false,
2671
+ checkpoint: "verify_capture_blocked",
2672
+ details: verifyDetails
2673
+ });
2674
+ return checkpoint(
2675
+ "verify",
2676
+ "verify_capture_blocked",
2677
+ summary,
2678
+ {
2679
+ ok: true,
2680
+ nextActions: ["inspect_after_capture", "report_specific_browser_evidence_blocker", "start_a_new_run_after_the_product_or_script_is_fixed"],
2681
+ advanceOptions: verifyLoopAdvanceOptions,
2682
+ recommendedAdvanceStage: null,
2683
+ continueWithStage: null,
2684
+ blocking: true,
2685
+ details: verifyDetails,
2686
+ verifyStatus,
2687
+ verifySummary,
2688
+ afterCdn: state?.after_cdn || null,
2689
+ mergeRecommendation: state?.merge_recommendation || null,
2690
+ verifyDecisionRequest,
2691
+ proofAssessment: proofAssessment.raw,
2692
+ proofAssessmentRequest: state?.proof_assessment_request || null,
2693
+ executed
2694
+ }
2695
+ );
2696
+ }
2666
2697
  if (!hasSupervisorProofAssessment(state)) {
2667
2698
  const summary = "Verify captured usable evidence. The supervising agent should now assess whether the proof supports ship or more internal iteration, then resume the workflow with proof_assessment_json.";
2668
2699
  recordAttempt("verify", "checkpoint", summary, {
@@ -2,7 +2,7 @@ import {
2
2
  createDisabledRiddleProofAgentAdapter,
3
3
  readRiddleProofRunStatus,
4
4
  runRiddleProofEngineHarness
5
- } from "../chunk-P6YV63YF.js";
5
+ } from "../chunk-FQA3XMZM.js";
6
6
  import "../chunk-YZUVEJ5B.js";
7
7
  import "../chunk-FMOYUYH2.js";
8
8
  import "../chunk-FU73I4V3.js";
@@ -2654,9 +2654,10 @@ ${implementRes.stderr || ""}`;
2654
2654
  verifyContinueWithStage,
2655
2655
  convergenceSignals
2656
2656
  };
2657
+ const structuredInteractionFailureSummary = stringValue(verifyDecisionRequest?.structured_interaction_capture_failure_summary) || stringValue(verifyDecisionRequest?.structured_interaction_failure_summary) || stringValue(state?.structured_interaction_capture_failure_summary) || stringValue(state?.structured_interaction_failure_summary);
2657
2658
  if (verifyStatus !== "evidence_captured") {
2658
2659
  const captureQuality = verifyDecisionRequest?.capture_quality || {};
2659
- const captureTerminalBlocker = captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2660
+ const captureTerminalBlocker = Boolean(structuredInteractionFailureSummary) || captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2660
2661
  if (!captureTerminalBlocker && (verifyContinueWithStage || verifyRecommendedStage || "author") === "author") {
2661
2662
  updateState(config.statePath, (currentState) => {
2662
2663
  currentState.author_status = "needs_authoring";
@@ -2666,7 +2667,7 @@ ${implementRes.stderr || ""}`;
2666
2667
  state = readState(config.statePath);
2667
2668
  }
2668
2669
  const checkpointName = captureTerminalBlocker ? "verify_capture_blocked" : "verify_capture_retry";
2669
- const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2670
+ const summary = structuredInteractionFailureSummary || stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2670
2671
  recordAttempt("verify", "checkpoint", summary, {
2671
2672
  autoApproved: verifyRes.autoApproved || false,
2672
2673
  checkpoint: checkpointName,
@@ -2694,6 +2695,36 @@ ${implementRes.stderr || ""}`;
2694
2695
  }
2695
2696
  );
2696
2697
  }
2698
+ if (structuredInteractionFailureSummary) {
2699
+ const summary = structuredInteractionFailureSummary;
2700
+ recordAttempt("verify", "checkpoint", summary, {
2701
+ autoApproved: verifyRes.autoApproved || false,
2702
+ checkpoint: "verify_capture_blocked",
2703
+ details: verifyDetails
2704
+ });
2705
+ return checkpoint(
2706
+ "verify",
2707
+ "verify_capture_blocked",
2708
+ summary,
2709
+ {
2710
+ ok: true,
2711
+ nextActions: ["inspect_after_capture", "report_specific_browser_evidence_blocker", "start_a_new_run_after_the_product_or_script_is_fixed"],
2712
+ advanceOptions: verifyLoopAdvanceOptions,
2713
+ recommendedAdvanceStage: null,
2714
+ continueWithStage: null,
2715
+ blocking: true,
2716
+ details: verifyDetails,
2717
+ verifyStatus,
2718
+ verifySummary,
2719
+ afterCdn: state?.after_cdn || null,
2720
+ mergeRecommendation: state?.merge_recommendation || null,
2721
+ verifyDecisionRequest,
2722
+ proofAssessment: proofAssessment.raw,
2723
+ proofAssessmentRequest: state?.proof_assessment_request || null,
2724
+ executed
2725
+ }
2726
+ );
2727
+ }
2697
2728
  if (!hasSupervisorProofAssessment(state)) {
2698
2729
  const summary = "Verify captured usable evidence. The supervising agent should now assess whether the proof supports ship or more internal iteration, then resume the workflow with proof_assessment_json.";
2699
2730
  recordAttempt("verify", "checkpoint", summary, {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  proof_run_engine_exports
3
- } from "../chunk-2JWFSLZ5.js";
3
+ } from "../chunk-X4T3LNP2.js";
4
4
  import {
5
5
  runner_exports
6
6
  } from "../chunk-P2RN2NYR.js";
7
7
  import {
8
8
  engine_harness_exports
9
- } from "../chunk-P6YV63YF.js";
9
+ } from "../chunk-FQA3XMZM.js";
10
10
  import "../chunk-YZUVEJ5B.js";
11
11
  import "../chunk-FMOYUYH2.js";
12
12
  import {
@@ -2623,9 +2623,10 @@ ${implementRes.stderr || ""}`;
2623
2623
  verifyContinueWithStage,
2624
2624
  convergenceSignals
2625
2625
  };
2626
+ const structuredInteractionFailureSummary = stringValue(verifyDecisionRequest?.structured_interaction_capture_failure_summary) || stringValue(verifyDecisionRequest?.structured_interaction_failure_summary) || stringValue(state?.structured_interaction_capture_failure_summary) || stringValue(state?.structured_interaction_failure_summary);
2626
2627
  if (verifyStatus !== "evidence_captured") {
2627
2628
  const captureQuality = verifyDecisionRequest?.capture_quality || {};
2628
- const captureTerminalBlocker = captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
+ const captureTerminalBlocker = Boolean(structuredInteractionFailureSummary) || captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
2630
  if (!captureTerminalBlocker && (verifyContinueWithStage || verifyRecommendedStage || "author") === "author") {
2630
2631
  updateState(config.statePath, (currentState) => {
2631
2632
  currentState.author_status = "needs_authoring";
@@ -2635,7 +2636,7 @@ ${implementRes.stderr || ""}`;
2635
2636
  state = readState(config.statePath);
2636
2637
  }
2637
2638
  const checkpointName = captureTerminalBlocker ? "verify_capture_blocked" : "verify_capture_retry";
2638
- const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
+ const summary = structuredInteractionFailureSummary || stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
2640
  recordAttempt("verify", "checkpoint", summary, {
2640
2641
  autoApproved: verifyRes.autoApproved || false,
2641
2642
  checkpoint: checkpointName,
@@ -2663,6 +2664,36 @@ ${implementRes.stderr || ""}`;
2663
2664
  }
2664
2665
  );
2665
2666
  }
2667
+ if (structuredInteractionFailureSummary) {
2668
+ const summary = structuredInteractionFailureSummary;
2669
+ recordAttempt("verify", "checkpoint", summary, {
2670
+ autoApproved: verifyRes.autoApproved || false,
2671
+ checkpoint: "verify_capture_blocked",
2672
+ details: verifyDetails
2673
+ });
2674
+ return checkpoint(
2675
+ "verify",
2676
+ "verify_capture_blocked",
2677
+ summary,
2678
+ {
2679
+ ok: true,
2680
+ nextActions: ["inspect_after_capture", "report_specific_browser_evidence_blocker", "start_a_new_run_after_the_product_or_script_is_fixed"],
2681
+ advanceOptions: verifyLoopAdvanceOptions,
2682
+ recommendedAdvanceStage: null,
2683
+ continueWithStage: null,
2684
+ blocking: true,
2685
+ details: verifyDetails,
2686
+ verifyStatus,
2687
+ verifySummary,
2688
+ afterCdn: state?.after_cdn || null,
2689
+ mergeRecommendation: state?.merge_recommendation || null,
2690
+ verifyDecisionRequest,
2691
+ proofAssessment: proofAssessment.raw,
2692
+ proofAssessmentRequest: state?.proof_assessment_request || null,
2693
+ executed
2694
+ }
2695
+ );
2696
+ }
2666
2697
  if (!hasSupervisorProofAssessment(state)) {
2667
2698
  const summary = "Verify captured usable evidence. The supervising agent should now assess whether the proof supports ship or more internal iteration, then resume the workflow with proof_assessment_json.";
2668
2699
  recordAttempt("verify", "checkpoint", summary, {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRiddleProofEngine,
3
3
  executeWorkflow
4
- } from "../chunk-2JWFSLZ5.js";
4
+ } from "../chunk-X4T3LNP2.js";
5
5
  import "../chunk-FU73I4V3.js";
6
6
  import "../chunk-MLKGABMK.js";
7
7
  export {
@@ -22,7 +22,7 @@ import {
22
22
  createDisabledRiddleProofAgentAdapter,
23
23
  readRiddleProofRunStatus,
24
24
  runRiddleProofEngineHarness
25
- } from "./chunk-P6YV63YF.js";
25
+ } from "./chunk-FQA3XMZM.js";
26
26
  import {
27
27
  createCheckpointResponseTemplate
28
28
  } from "./chunk-4FOHZ7JG.js";
@@ -1511,9 +1511,10 @@ ${implementRes.stderr || ""}`;
1511
1511
  verifyContinueWithStage,
1512
1512
  convergenceSignals
1513
1513
  };
1514
+ const structuredInteractionFailureSummary = stringValue(verifyDecisionRequest?.structured_interaction_capture_failure_summary) || stringValue(verifyDecisionRequest?.structured_interaction_failure_summary) || stringValue(state?.structured_interaction_capture_failure_summary) || stringValue(state?.structured_interaction_failure_summary);
1514
1515
  if (verifyStatus !== "evidence_captured") {
1515
1516
  const captureQuality = verifyDecisionRequest?.capture_quality || {};
1516
- const captureTerminalBlocker = captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
1517
+ const captureTerminalBlocker = Boolean(structuredInteractionFailureSummary) || captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
1517
1518
  if (!captureTerminalBlocker && (verifyContinueWithStage || verifyRecommendedStage || "author") === "author") {
1518
1519
  updateState(config.statePath, (currentState) => {
1519
1520
  currentState.author_status = "needs_authoring";
@@ -1523,7 +1524,7 @@ ${implementRes.stderr || ""}`;
1523
1524
  state = readState(config.statePath);
1524
1525
  }
1525
1526
  const checkpointName = captureTerminalBlocker ? "verify_capture_blocked" : "verify_capture_retry";
1526
- const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
1527
+ const summary = structuredInteractionFailureSummary || stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
1527
1528
  recordAttempt("verify", "checkpoint", summary, {
1528
1529
  autoApproved: verifyRes.autoApproved || false,
1529
1530
  checkpoint: checkpointName,
@@ -1551,6 +1552,36 @@ ${implementRes.stderr || ""}`;
1551
1552
  }
1552
1553
  );
1553
1554
  }
1555
+ if (structuredInteractionFailureSummary) {
1556
+ const summary = structuredInteractionFailureSummary;
1557
+ recordAttempt("verify", "checkpoint", summary, {
1558
+ autoApproved: verifyRes.autoApproved || false,
1559
+ checkpoint: "verify_capture_blocked",
1560
+ details: verifyDetails
1561
+ });
1562
+ return checkpoint(
1563
+ "verify",
1564
+ "verify_capture_blocked",
1565
+ summary,
1566
+ {
1567
+ ok: true,
1568
+ nextActions: ["inspect_after_capture", "report_specific_browser_evidence_blocker", "start_a_new_run_after_the_product_or_script_is_fixed"],
1569
+ advanceOptions: verifyLoopAdvanceOptions,
1570
+ recommendedAdvanceStage: null,
1571
+ continueWithStage: null,
1572
+ blocking: true,
1573
+ details: verifyDetails,
1574
+ verifyStatus,
1575
+ verifySummary,
1576
+ afterCdn: state?.after_cdn || null,
1577
+ mergeRecommendation: state?.merge_recommendation || null,
1578
+ verifyDecisionRequest,
1579
+ proofAssessment: proofAssessment.raw,
1580
+ proofAssessmentRequest: state?.proof_assessment_request || null,
1581
+ executed
1582
+ }
1583
+ );
1584
+ }
1554
1585
  if (!hasSupervisorProofAssessment(state)) {
1555
1586
  const summary = "Verify captured usable evidence. The supervising agent should now assess whether the proof supports ship or more internal iteration, then resume the workflow with proof_assessment_json.";
1556
1587
  recordAttempt("verify", "checkpoint", summary, {
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import "../chunk-WE6U7EEH.js";
1
+ import "../chunk-DAF4EX6A.js";
2
2
  import "../chunk-PEWAIEER.js";
3
3
  import "../chunk-TWTEUS7R.js";
4
- import "../chunk-P6YV63YF.js";
4
+ import "../chunk-FQA3XMZM.js";
5
5
  import "../chunk-YZUVEJ5B.js";
6
6
  import "../chunk-FMOYUYH2.js";
7
7
  import "../chunk-FU73I4V3.js";
package/dist/cli.cjs CHANGED
@@ -2623,9 +2623,10 @@ ${implementRes.stderr || ""}`;
2623
2623
  verifyContinueWithStage,
2624
2624
  convergenceSignals
2625
2625
  };
2626
+ const structuredInteractionFailureSummary = stringValue(verifyDecisionRequest?.structured_interaction_capture_failure_summary) || stringValue(verifyDecisionRequest?.structured_interaction_failure_summary) || stringValue(state?.structured_interaction_capture_failure_summary) || stringValue(state?.structured_interaction_failure_summary);
2626
2627
  if (verifyStatus !== "evidence_captured") {
2627
2628
  const captureQuality = verifyDecisionRequest?.capture_quality || {};
2628
- const captureTerminalBlocker = captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
+ const captureTerminalBlocker = Boolean(structuredInteractionFailureSummary) || captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
2630
  if (!captureTerminalBlocker && (verifyContinueWithStage || verifyRecommendedStage || "author") === "author") {
2630
2631
  updateState(config.statePath, (currentState) => {
2631
2632
  currentState.author_status = "needs_authoring";
@@ -2635,7 +2636,7 @@ ${implementRes.stderr || ""}`;
2635
2636
  state = readState(config.statePath);
2636
2637
  }
2637
2638
  const checkpointName = captureTerminalBlocker ? "verify_capture_blocked" : "verify_capture_retry";
2638
- const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
+ const summary = structuredInteractionFailureSummary || stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
2640
  recordAttempt("verify", "checkpoint", summary, {
2640
2641
  autoApproved: verifyRes.autoApproved || false,
2641
2642
  checkpoint: checkpointName,
@@ -2663,6 +2664,36 @@ ${implementRes.stderr || ""}`;
2663
2664
  }
2664
2665
  );
2665
2666
  }
2667
+ if (structuredInteractionFailureSummary) {
2668
+ const summary = structuredInteractionFailureSummary;
2669
+ recordAttempt("verify", "checkpoint", summary, {
2670
+ autoApproved: verifyRes.autoApproved || false,
2671
+ checkpoint: "verify_capture_blocked",
2672
+ details: verifyDetails
2673
+ });
2674
+ return checkpoint(
2675
+ "verify",
2676
+ "verify_capture_blocked",
2677
+ summary,
2678
+ {
2679
+ ok: true,
2680
+ nextActions: ["inspect_after_capture", "report_specific_browser_evidence_blocker", "start_a_new_run_after_the_product_or_script_is_fixed"],
2681
+ advanceOptions: verifyLoopAdvanceOptions,
2682
+ recommendedAdvanceStage: null,
2683
+ continueWithStage: null,
2684
+ blocking: true,
2685
+ details: verifyDetails,
2686
+ verifyStatus,
2687
+ verifySummary,
2688
+ afterCdn: state?.after_cdn || null,
2689
+ mergeRecommendation: state?.merge_recommendation || null,
2690
+ verifyDecisionRequest,
2691
+ proofAssessment: proofAssessment.raw,
2692
+ proofAssessmentRequest: state?.proof_assessment_request || null,
2693
+ executed
2694
+ }
2695
+ );
2696
+ }
2666
2697
  if (!hasSupervisorProofAssessment(state)) {
2667
2698
  const summary = "Verify captured usable evidence. The supervising agent should now assess whether the proof supports ship or more internal iteration, then resume the workflow with proof_assessment_json.";
2668
2699
  recordAttempt("verify", "checkpoint", summary, {
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-WE6U7EEH.js";
2
+ import "./chunk-DAF4EX6A.js";
3
3
  import "./chunk-PEWAIEER.js";
4
4
  import "./chunk-TWTEUS7R.js";
5
- import "./chunk-P6YV63YF.js";
5
+ import "./chunk-FQA3XMZM.js";
6
6
  import "./chunk-YZUVEJ5B.js";
7
7
  import "./chunk-FMOYUYH2.js";
8
8
  import "./chunk-FU73I4V3.js";
@@ -2623,9 +2623,10 @@ ${implementRes.stderr || ""}`;
2623
2623
  verifyContinueWithStage,
2624
2624
  convergenceSignals
2625
2625
  };
2626
+ const structuredInteractionFailureSummary = stringValue(verifyDecisionRequest?.structured_interaction_capture_failure_summary) || stringValue(verifyDecisionRequest?.structured_interaction_failure_summary) || stringValue(state?.structured_interaction_capture_failure_summary) || stringValue(state?.structured_interaction_failure_summary);
2626
2627
  if (verifyStatus !== "evidence_captured") {
2627
2628
  const captureQuality = verifyDecisionRequest?.capture_quality || {};
2628
- const captureTerminalBlocker = captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
+ const captureTerminalBlocker = Boolean(structuredInteractionFailureSummary) || captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
2630
  if (!captureTerminalBlocker && (verifyContinueWithStage || verifyRecommendedStage || "author") === "author") {
2630
2631
  updateState(config.statePath, (currentState) => {
2631
2632
  currentState.author_status = "needs_authoring";
@@ -2635,7 +2636,7 @@ ${implementRes.stderr || ""}`;
2635
2636
  state = readState(config.statePath);
2636
2637
  }
2637
2638
  const checkpointName = captureTerminalBlocker ? "verify_capture_blocked" : "verify_capture_retry";
2638
- const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
+ const summary = structuredInteractionFailureSummary || stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
2640
  recordAttempt("verify", "checkpoint", summary, {
2640
2641
  autoApproved: verifyRes.autoApproved || false,
2641
2642
  checkpoint: checkpointName,
@@ -2663,6 +2664,36 @@ ${implementRes.stderr || ""}`;
2663
2664
  }
2664
2665
  );
2665
2666
  }
2667
+ if (structuredInteractionFailureSummary) {
2668
+ const summary = structuredInteractionFailureSummary;
2669
+ recordAttempt("verify", "checkpoint", summary, {
2670
+ autoApproved: verifyRes.autoApproved || false,
2671
+ checkpoint: "verify_capture_blocked",
2672
+ details: verifyDetails
2673
+ });
2674
+ return checkpoint(
2675
+ "verify",
2676
+ "verify_capture_blocked",
2677
+ summary,
2678
+ {
2679
+ ok: true,
2680
+ nextActions: ["inspect_after_capture", "report_specific_browser_evidence_blocker", "start_a_new_run_after_the_product_or_script_is_fixed"],
2681
+ advanceOptions: verifyLoopAdvanceOptions,
2682
+ recommendedAdvanceStage: null,
2683
+ continueWithStage: null,
2684
+ blocking: true,
2685
+ details: verifyDetails,
2686
+ verifyStatus,
2687
+ verifySummary,
2688
+ afterCdn: state?.after_cdn || null,
2689
+ mergeRecommendation: state?.merge_recommendation || null,
2690
+ verifyDecisionRequest,
2691
+ proofAssessment: proofAssessment.raw,
2692
+ proofAssessmentRequest: state?.proof_assessment_request || null,
2693
+ executed
2694
+ }
2695
+ );
2696
+ }
2666
2697
  if (!hasSupervisorProofAssessment(state)) {
2667
2698
  const summary = "Verify captured usable evidence. The supervising agent should now assess whether the proof supports ship or more internal iteration, then resume the workflow with proof_assessment_json.";
2668
2699
  recordAttempt("verify", "checkpoint", summary, {
@@ -2,7 +2,7 @@ import {
2
2
  createDisabledRiddleProofAgentAdapter,
3
3
  readRiddleProofRunStatus,
4
4
  runRiddleProofEngineHarness
5
- } from "./chunk-P6YV63YF.js";
5
+ } from "./chunk-FQA3XMZM.js";
6
6
  import "./chunk-YZUVEJ5B.js";
7
7
  import "./chunk-FMOYUYH2.js";
8
8
  import "./chunk-FU73I4V3.js";
package/dist/index.cjs CHANGED
@@ -2623,9 +2623,10 @@ ${implementRes.stderr || ""}`;
2623
2623
  verifyContinueWithStage,
2624
2624
  convergenceSignals
2625
2625
  };
2626
+ const structuredInteractionFailureSummary = stringValue(verifyDecisionRequest?.structured_interaction_capture_failure_summary) || stringValue(verifyDecisionRequest?.structured_interaction_failure_summary) || stringValue(state?.structured_interaction_capture_failure_summary) || stringValue(state?.structured_interaction_failure_summary);
2626
2627
  if (verifyStatus !== "evidence_captured") {
2627
2628
  const captureQuality = verifyDecisionRequest?.capture_quality || {};
2628
- const captureTerminalBlocker = captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
+ const captureTerminalBlocker = Boolean(structuredInteractionFailureSummary) || captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2629
2630
  if (!captureTerminalBlocker && (verifyContinueWithStage || verifyRecommendedStage || "author") === "author") {
2630
2631
  updateState(config.statePath, (currentState) => {
2631
2632
  currentState.author_status = "needs_authoring";
@@ -2635,7 +2636,7 @@ ${implementRes.stderr || ""}`;
2635
2636
  state = readState(config.statePath);
2636
2637
  }
2637
2638
  const checkpointName = captureTerminalBlocker ? "verify_capture_blocked" : "verify_capture_retry";
2638
- const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
+ const summary = structuredInteractionFailureSummary || stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2639
2640
  recordAttempt("verify", "checkpoint", summary, {
2640
2641
  autoApproved: verifyRes.autoApproved || false,
2641
2642
  checkpoint: checkpointName,
@@ -2663,6 +2664,36 @@ ${implementRes.stderr || ""}`;
2663
2664
  }
2664
2665
  );
2665
2666
  }
2667
+ if (structuredInteractionFailureSummary) {
2668
+ const summary = structuredInteractionFailureSummary;
2669
+ recordAttempt("verify", "checkpoint", summary, {
2670
+ autoApproved: verifyRes.autoApproved || false,
2671
+ checkpoint: "verify_capture_blocked",
2672
+ details: verifyDetails
2673
+ });
2674
+ return checkpoint(
2675
+ "verify",
2676
+ "verify_capture_blocked",
2677
+ summary,
2678
+ {
2679
+ ok: true,
2680
+ nextActions: ["inspect_after_capture", "report_specific_browser_evidence_blocker", "start_a_new_run_after_the_product_or_script_is_fixed"],
2681
+ advanceOptions: verifyLoopAdvanceOptions,
2682
+ recommendedAdvanceStage: null,
2683
+ continueWithStage: null,
2684
+ blocking: true,
2685
+ details: verifyDetails,
2686
+ verifyStatus,
2687
+ verifySummary,
2688
+ afterCdn: state?.after_cdn || null,
2689
+ mergeRecommendation: state?.merge_recommendation || null,
2690
+ verifyDecisionRequest,
2691
+ proofAssessment: proofAssessment.raw,
2692
+ proofAssessmentRequest: state?.proof_assessment_request || null,
2693
+ executed
2694
+ }
2695
+ );
2696
+ }
2666
2697
  if (!hasSupervisorProofAssessment(state)) {
2667
2698
  const summary = "Verify captured usable evidence. The supervising agent should now assess whether the proof supports ship or more internal iteration, then resume the workflow with proof_assessment_json.";
2668
2699
  recordAttempt("verify", "checkpoint", summary, {
package/dist/index.js CHANGED
@@ -95,7 +95,7 @@ import {
95
95
  createDisabledRiddleProofAgentAdapter,
96
96
  readRiddleProofRunStatus,
97
97
  runRiddleProofEngineHarness
98
- } from "./chunk-P6YV63YF.js";
98
+ } from "./chunk-FQA3XMZM.js";
99
99
  import {
100
100
  RIDDLE_PROOF_RUN_STATE_VERSION,
101
101
  appendRunEvent,
@@ -2621,9 +2621,10 @@ ${implementRes.stderr || ""}`;
2621
2621
  verifyContinueWithStage,
2622
2622
  convergenceSignals
2623
2623
  };
2624
+ const structuredInteractionFailureSummary = stringValue(verifyDecisionRequest?.structured_interaction_capture_failure_summary) || stringValue(verifyDecisionRequest?.structured_interaction_failure_summary) || stringValue(state?.structured_interaction_capture_failure_summary) || stringValue(state?.structured_interaction_failure_summary);
2624
2625
  if (verifyStatus !== "evidence_captured") {
2625
2626
  const captureQuality = verifyDecisionRequest?.capture_quality || {};
2626
- const captureTerminalBlocker = captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2627
+ const captureTerminalBlocker = Boolean(structuredInteractionFailureSummary) || captureQuality?.terminal_blocker === true || captureQuality?.blocking === true;
2627
2628
  if (!captureTerminalBlocker && (verifyContinueWithStage || verifyRecommendedStage || "author") === "author") {
2628
2629
  updateState(config.statePath, (currentState) => {
2629
2630
  currentState.author_status = "needs_authoring";
@@ -2633,7 +2634,7 @@ ${implementRes.stderr || ""}`;
2633
2634
  state = readState(config.statePath);
2634
2635
  }
2635
2636
  const checkpointName = captureTerminalBlocker ? "verify_capture_blocked" : "verify_capture_retry";
2636
- const summary = stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2637
+ const summary = structuredInteractionFailureSummary || stringValue(proofAssessment.summary) || "Verify ran, but the proof packet still needs internal capture-plan work before it should ship.";
2637
2638
  recordAttempt("verify", "checkpoint", summary, {
2638
2639
  autoApproved: verifyRes.autoApproved || false,
2639
2640
  checkpoint: checkpointName,
@@ -2661,6 +2662,36 @@ ${implementRes.stderr || ""}`;
2661
2662
  }
2662
2663
  );
2663
2664
  }
2665
+ if (structuredInteractionFailureSummary) {
2666
+ const summary = structuredInteractionFailureSummary;
2667
+ recordAttempt("verify", "checkpoint", summary, {
2668
+ autoApproved: verifyRes.autoApproved || false,
2669
+ checkpoint: "verify_capture_blocked",
2670
+ details: verifyDetails
2671
+ });
2672
+ return checkpoint(
2673
+ "verify",
2674
+ "verify_capture_blocked",
2675
+ summary,
2676
+ {
2677
+ ok: true,
2678
+ nextActions: ["inspect_after_capture", "report_specific_browser_evidence_blocker", "start_a_new_run_after_the_product_or_script_is_fixed"],
2679
+ advanceOptions: verifyLoopAdvanceOptions,
2680
+ recommendedAdvanceStage: null,
2681
+ continueWithStage: null,
2682
+ blocking: true,
2683
+ details: verifyDetails,
2684
+ verifyStatus,
2685
+ verifySummary,
2686
+ afterCdn: state?.after_cdn || null,
2687
+ mergeRecommendation: state?.merge_recommendation || null,
2688
+ verifyDecisionRequest,
2689
+ proofAssessment: proofAssessment.raw,
2690
+ proofAssessmentRequest: state?.proof_assessment_request || null,
2691
+ executed
2692
+ }
2693
+ );
2694
+ }
2664
2695
  if (!hasSupervisorProofAssessment(state)) {
2665
2696
  const summary = "Verify captured usable evidence. The supervising agent should now assess whether the proof supports ship or more internal iteration, then resume the workflow with proof_assessment_json.";
2666
2697
  recordAttempt("verify", "checkpoint", summary, {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRiddleProofEngine,
3
3
  executeWorkflow
4
- } from "./chunk-2JWFSLZ5.js";
4
+ } from "./chunk-X4T3LNP2.js";
5
5
  import "./chunk-FU73I4V3.js";
6
6
  import "./chunk-MLKGABMK.js";
7
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.8.19",
3
+ "version": "0.8.21",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",
@@ -2112,15 +2112,40 @@ EXPECTED_TERMINAL_PATH_KEYS = (
2112
2112
  'expected_final_route', 'expectedFinalRoute',
2113
2113
  )
2114
2114
  OBSERVED_TERMINAL_PATH_KEYS = (
2115
- 'terminal_path', 'terminalPath',
2116
2115
  'terminal_url', 'terminalUrl',
2117
2116
  'terminal_href', 'terminalHref',
2118
2117
  'terminal_route', 'terminalRoute',
2119
- 'after_path', 'afterPath',
2118
+ 'terminal_path', 'terminalPath',
2120
2119
  'after_url', 'afterUrl',
2121
2120
  'after_href', 'afterHref',
2122
2121
  'after_route', 'afterRoute',
2122
+ 'after_path', 'afterPath',
2123
+ 'final_url', 'finalUrl',
2124
+ 'final_href', 'finalHref',
2125
+ 'final_route', 'finalRoute',
2123
2126
  'final_path', 'finalPath',
2127
+ )
2128
+ EXPECTED_TERMINAL_FULL_PATH_KEYS = (
2129
+ 'expected_url', 'expectedUrl',
2130
+ 'expected_href', 'expectedHref',
2131
+ 'expected_route', 'expectedRoute',
2132
+ 'expected_terminal_url', 'expectedTerminalUrl',
2133
+ 'expected_terminal_href', 'expectedTerminalHref',
2134
+ 'expected_terminal_route', 'expectedTerminalRoute',
2135
+ 'expected_after_url', 'expectedAfterUrl',
2136
+ 'expected_after_href', 'expectedAfterHref',
2137
+ 'expected_after_route', 'expectedAfterRoute',
2138
+ 'expected_final_url', 'expectedFinalUrl',
2139
+ 'expected_final_href', 'expectedFinalHref',
2140
+ 'expected_final_route', 'expectedFinalRoute',
2141
+ )
2142
+ OBSERVED_TERMINAL_FULL_PATH_KEYS = (
2143
+ 'terminal_url', 'terminalUrl',
2144
+ 'terminal_href', 'terminalHref',
2145
+ 'terminal_route', 'terminalRoute',
2146
+ 'after_url', 'afterUrl',
2147
+ 'after_href', 'afterHref',
2148
+ 'after_route', 'afterRoute',
2124
2149
  'final_url', 'finalUrl',
2125
2150
  'final_href', 'finalHref',
2126
2151
  'final_route', 'finalRoute',
@@ -2211,6 +2236,103 @@ def record_path_candidate(record, allow_location_keys=False):
2211
2236
  return record_path_candidate_for_keys(record, EXPLICIT_TERMINAL_PATH_KEYS, allow_location_keys)
2212
2237
 
2213
2238
 
2239
+ def first_string_for_keys(record, keys):
2240
+ if not isinstance(record, dict):
2241
+ return ''
2242
+ for key in keys:
2243
+ value = record.get(key)
2244
+ if isinstance(value, str) and value.strip():
2245
+ return value.strip()
2246
+ return ''
2247
+
2248
+
2249
+ def route_component_candidate(record, path_keys, query_keys, hash_keys):
2250
+ path_value = first_string_for_keys(record, path_keys)
2251
+ if not path_value:
2252
+ return ''
2253
+ base = path_candidate(path_value)
2254
+ if not base:
2255
+ return ''
2256
+ parsed = urlparse(base)
2257
+ query = parsed.query or ''
2258
+ fragment = parsed.fragment or ''
2259
+ query_value = first_string_for_keys(record, query_keys)
2260
+ hash_value = first_string_for_keys(record, hash_keys)
2261
+ if query_value:
2262
+ query = query_value[1:] if query_value.startswith('?') else query_value
2263
+ if hash_value:
2264
+ fragment = hash_value[1:] if hash_value.startswith('#') else hash_value
2265
+ pathname = parsed.path or '/'
2266
+ return normalize_observed_path(
2267
+ pathname
2268
+ + (('?' + query) if query else '')
2269
+ + (('#' + fragment) if fragment else '')
2270
+ )
2271
+
2272
+
2273
+ EXPECTED_COMPONENT_PATH_KEYS = (
2274
+ 'expected_path', 'expectedPath',
2275
+ 'expected_terminal_path', 'expectedTerminalPath',
2276
+ 'expected_after_path', 'expectedAfterPath',
2277
+ 'expected_final_path', 'expectedFinalPath',
2278
+ )
2279
+ EXPECTED_COMPONENT_QUERY_KEYS = (
2280
+ 'expected_query', 'expectedQuery',
2281
+ 'expected_search', 'expectedSearch',
2282
+ 'expected_terminal_query', 'expectedTerminalQuery',
2283
+ 'expected_terminal_search', 'expectedTerminalSearch',
2284
+ 'expected_after_query', 'expectedAfterQuery',
2285
+ 'expected_after_search', 'expectedAfterSearch',
2286
+ 'expected_final_query', 'expectedFinalQuery',
2287
+ 'expected_final_search', 'expectedFinalSearch',
2288
+ )
2289
+ EXPECTED_COMPONENT_HASH_KEYS = (
2290
+ 'expected_hash', 'expectedHash',
2291
+ 'expected_fragment', 'expectedFragment',
2292
+ 'expected_terminal_hash', 'expectedTerminalHash',
2293
+ 'expected_terminal_fragment', 'expectedTerminalFragment',
2294
+ 'expected_after_hash', 'expectedAfterHash',
2295
+ 'expected_after_fragment', 'expectedAfterFragment',
2296
+ 'expected_final_hash', 'expectedFinalHash',
2297
+ 'expected_final_fragment', 'expectedFinalFragment',
2298
+ )
2299
+ OBSERVED_COMPONENT_PATH_KEYS = (
2300
+ 'terminal_path', 'terminalPath',
2301
+ 'after_path', 'afterPath',
2302
+ 'final_path', 'finalPath',
2303
+ 'observed_path', 'observedPath',
2304
+ 'actual_path', 'actualPath',
2305
+ 'pathname',
2306
+ )
2307
+ OBSERVED_COMPONENT_QUERY_KEYS = (
2308
+ 'terminal_query', 'terminalQuery',
2309
+ 'terminal_search', 'terminalSearch',
2310
+ 'after_query', 'afterQuery',
2311
+ 'after_search', 'afterSearch',
2312
+ 'final_query', 'finalQuery',
2313
+ 'final_search', 'finalSearch',
2314
+ 'observed_query', 'observedQuery',
2315
+ 'observed_search', 'observedSearch',
2316
+ 'actual_query', 'actualQuery',
2317
+ 'actual_search', 'actualSearch',
2318
+ 'search',
2319
+ )
2320
+ OBSERVED_COMPONENT_HASH_KEYS = (
2321
+ 'terminal_hash', 'terminalHash',
2322
+ 'terminal_fragment', 'terminalFragment',
2323
+ 'after_hash', 'afterHash',
2324
+ 'after_fragment', 'afterFragment',
2325
+ 'final_hash', 'finalHash',
2326
+ 'final_fragment', 'finalFragment',
2327
+ 'observed_hash', 'observedHash',
2328
+ 'observed_fragment', 'observedFragment',
2329
+ 'actual_hash', 'actualHash',
2330
+ 'actual_fragment', 'actualFragment',
2331
+ 'hash',
2332
+ 'fragment',
2333
+ )
2334
+
2335
+
2214
2336
  def terminal_path_from_record(record, depth=0):
2215
2337
  if not isinstance(record, dict) or depth > 4:
2216
2338
  return ''
@@ -2256,6 +2378,17 @@ def terminal_path_from_record(record, depth=0):
2256
2378
  def expected_terminal_path_from_record(record, depth=0):
2257
2379
  if not isinstance(record, dict) or depth > 4:
2258
2380
  return ''
2381
+ candidate = record_path_candidate_for_keys(record, EXPECTED_TERMINAL_FULL_PATH_KEYS)
2382
+ if candidate:
2383
+ return candidate
2384
+ candidate = route_component_candidate(
2385
+ record,
2386
+ EXPECTED_COMPONENT_PATH_KEYS,
2387
+ EXPECTED_COMPONENT_QUERY_KEYS,
2388
+ EXPECTED_COMPONENT_HASH_KEYS,
2389
+ )
2390
+ if candidate:
2391
+ return candidate
2259
2392
  candidate = record_path_candidate_for_keys(record, EXPECTED_TERMINAL_PATH_KEYS)
2260
2393
  if candidate:
2261
2394
  return candidate
@@ -2304,6 +2437,17 @@ def expected_terminal_path_from_record(record, depth=0):
2304
2437
  def observed_terminal_path_from_record(record, depth=0):
2305
2438
  if not isinstance(record, dict) or depth > 4:
2306
2439
  return ''
2440
+ candidate = record_path_candidate_for_keys(record, OBSERVED_TERMINAL_FULL_PATH_KEYS)
2441
+ if candidate:
2442
+ return candidate
2443
+ candidate = route_component_candidate(
2444
+ record,
2445
+ OBSERVED_COMPONENT_PATH_KEYS,
2446
+ OBSERVED_COMPONENT_QUERY_KEYS,
2447
+ OBSERVED_COMPONENT_HASH_KEYS,
2448
+ )
2449
+ if candidate:
2450
+ return candidate
2307
2451
  candidate = record_path_candidate_for_keys(record, OBSERVED_TERMINAL_PATH_KEYS)
2308
2452
  if candidate:
2309
2453
  return candidate
@@ -412,6 +412,12 @@ class FakeRiddle:
412
412
  }
413
413
  proof_evidence = {
414
414
  'version': 'riddle-proof.interaction.v1',
415
+ 'routeExpectationSource': 'capture_script.expectedUrl',
416
+ 'expectedUrl': 'https://riddledc.com/pricing/?rp_probe=1#pricing-probe',
417
+ 'terminalPath': '/pricing/',
418
+ 'terminalSearch': '?rp_probe=1',
419
+ 'terminalHash': '#pricing-probe',
420
+ 'terminalUrl': 'https://riddledc.com/pricing/?rp_probe=1#pricing-probe',
415
421
  'start': {'href': 'https://riddledc.com/'},
416
422
  'action': {'type': 'click', 'target': 'Pricing'},
417
423
  'terminal': {
File without changes