@riddledc/riddle-proof 0.8.42 → 0.8.44

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.
Files changed (33) hide show
  1. package/dist/advanced/index.d.cts +2 -2
  2. package/dist/advanced/index.d.ts +2 -2
  3. package/dist/advanced/proof-run-core.d.cts +1 -1
  4. package/dist/advanced/proof-run-core.d.ts +1 -1
  5. package/dist/advanced/proof-run-engine.d.cts +2 -2
  6. package/dist/advanced/proof-run-engine.d.ts +2 -2
  7. package/dist/{chunk-Z2LCVROU.js → chunk-EX7TO4I5.js} +99 -1
  8. package/dist/{chunk-MVJBPCZ4.js → chunk-OTLNAGTU.js} +25 -4
  9. package/dist/cli/index.js +2 -2
  10. package/dist/cli.cjs +120 -4
  11. package/dist/cli.js +2 -2
  12. package/dist/index.cjs +101 -1
  13. package/dist/index.d.cts +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +5 -1
  16. package/dist/profile/index.cjs +101 -1
  17. package/dist/profile/index.d.cts +1 -1
  18. package/dist/profile/index.d.ts +1 -1
  19. package/dist/profile/index.js +5 -1
  20. package/dist/profile.cjs +101 -1
  21. package/dist/profile.d.cts +9 -1
  22. package/dist/profile.d.ts +9 -1
  23. package/dist/profile.js +5 -1
  24. package/dist/{proof-run-core-B1GeqkR8.d.cts → proof-run-core-CcN0Eson.d.cts} +1 -1
  25. package/dist/{proof-run-core-B1GeqkR8.d.ts → proof-run-core-CcN0Eson.d.ts} +1 -1
  26. package/dist/proof-run-core.d.cts +1 -1
  27. package/dist/proof-run-core.d.ts +1 -1
  28. package/dist/{proof-run-engine-4dM37pEx.d.cts → proof-run-engine-C3Hoalg8.d.cts} +4 -4
  29. package/dist/{proof-run-engine-BqaeqAze.d.ts → proof-run-engine-DFrhOLYy.d.ts} +4 -4
  30. package/dist/proof-run-engine.d.cts +2 -2
  31. package/dist/proof-run-engine.d.ts +2 -2
  32. package/examples/regression-packs/oc-flow-regression.json +19 -10
  33. package/package.json +1 -1
@@ -27,6 +27,8 @@ __export(profile_exports, {
27
27
  RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES: () => RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES,
28
28
  RIDDLE_PROOF_PROFILE_STATUSES: () => RIDDLE_PROOF_PROFILE_STATUSES,
29
29
  RIDDLE_PROOF_PROFILE_VERSION: () => RIDDLE_PROOF_PROFILE_VERSION,
30
+ applyRiddleProofProfileArtifactCompleteness: () => applyRiddleProofProfileArtifactCompleteness,
31
+ assessRiddleProofProfileArtifactCompleteness: () => assessRiddleProofProfileArtifactCompleteness,
30
32
  assessRiddleProofProfileEvidence: () => assessRiddleProofProfileEvidence,
31
33
  buildRiddleProofProfileScript: () => buildRiddleProofProfileScript,
32
34
  collectRiddleProfileArtifactRefs: () => collectRiddleProfileArtifactRefs,
@@ -3535,6 +3537,101 @@ function profileStatusFromEvidence(profile, evidence, checks) {
3535
3537
  if (checks.some((check) => check.status === "failed")) return "product_regression";
3536
3538
  return "passed";
3537
3539
  }
3540
+ function assessRiddleProofProfileArtifactCompleteness(profile, result, artifacts) {
3541
+ const required = profileRequiredArtifactKeys(profile, result);
3542
+ const missing = required.filter((key) => !profileArtifactKeyPresent(key, artifacts));
3543
+ return {
3544
+ ok: missing.length === 0,
3545
+ required,
3546
+ observed: artifacts.map((artifact) => profileArtifactObservedLabel(artifact)).filter(Boolean),
3547
+ missing
3548
+ };
3549
+ }
3550
+ function applyRiddleProofProfileArtifactCompleteness(profile, result, artifacts) {
3551
+ if (artifacts === void 0) return result;
3552
+ const completeness = assessRiddleProofProfileArtifactCompleteness(profile, result, artifacts);
3553
+ if (result.status !== "passed" || completeness.ok) {
3554
+ return {
3555
+ ...result,
3556
+ artifacts: {
3557
+ ...result.artifacts,
3558
+ riddle_artifacts: artifacts
3559
+ }
3560
+ };
3561
+ }
3562
+ const missing = completeness.missing.join(", ");
3563
+ const message = `Missing required profile artifact(s): ${missing}`;
3564
+ const warnings = [...result.warnings || [], message];
3565
+ return {
3566
+ ...result,
3567
+ status: "proof_insufficient",
3568
+ artifacts: {
3569
+ ...result.artifacts,
3570
+ riddle_artifacts: artifacts
3571
+ },
3572
+ summary: `${profile.name} did not produce required profile artifact(s): ${missing}.`,
3573
+ warnings,
3574
+ error: message
3575
+ };
3576
+ }
3577
+ function profileRequiredArtifactKeys(profile, result) {
3578
+ const keys = [];
3579
+ for (const artifact of profile.artifacts || []) {
3580
+ const role = normalizeProfileArtifactRole(artifact);
3581
+ if (!role) continue;
3582
+ if (role === "screenshot") {
3583
+ const screenshots = result.artifacts.screenshots || [];
3584
+ if (screenshots.length) {
3585
+ keys.push(...screenshots.map((label) => `screenshot:${label}`));
3586
+ } else {
3587
+ keys.push("screenshot");
3588
+ }
3589
+ continue;
3590
+ }
3591
+ keys.push(role);
3592
+ }
3593
+ return uniqueNonEmptyStrings(keys);
3594
+ }
3595
+ function normalizeProfileArtifactRole(input) {
3596
+ const normalized = input.trim().toLowerCase().replace(/[\s-]+/g, "_");
3597
+ if (!normalized) return "";
3598
+ if (normalized === "screenshots") return "screenshot";
3599
+ if (normalized === "console" || normalized === "console_json" || normalized === "console.json") return "console.json";
3600
+ if (normalized === "dom_summary" || normalized === "dom_summary_json" || normalized === "dom-summary.json") return "dom-summary.json";
3601
+ if (normalized === "proof" || normalized === "proof_json" || normalized === "proof.json") return "proof.json";
3602
+ return normalizeRiddleProfileArtifactName(input.trim()).toLowerCase();
3603
+ }
3604
+ function profileArtifactKeyPresent(key, artifacts) {
3605
+ if (key.startsWith("screenshot:")) {
3606
+ const label = key.slice("screenshot:".length);
3607
+ return artifacts.some((artifact) => profileArtifactRefIsScreenshot(artifact) && profileArtifactRefText(artifact).includes(label.toLowerCase()));
3608
+ }
3609
+ if (key === "screenshot") {
3610
+ return artifacts.some((artifact) => profileArtifactRefIsScreenshot(artifact));
3611
+ }
3612
+ return artifacts.some((artifact) => {
3613
+ const name = normalizeRiddleProfileArtifactName(artifact.name || artifactNameFromPath(artifact.url || artifact.path) || "").toLowerCase();
3614
+ return name === key || profileArtifactRefText(artifact).includes(key);
3615
+ });
3616
+ }
3617
+ function profileArtifactRefIsScreenshot(artifact) {
3618
+ const kind = (artifact.kind || "").toLowerCase();
3619
+ const contentType = (artifact.content_type || "").toLowerCase();
3620
+ const text = profileArtifactRefText(artifact);
3621
+ return kind === "screenshot" || contentType.startsWith("image/") || /\.(png|jpe?g|webp)(?:$|[?#])/i.test(text) || /\.(png|jpe?g|webp)$/i.test(text);
3622
+ }
3623
+ function profileArtifactRefText(artifact) {
3624
+ return [
3625
+ artifact.name,
3626
+ artifact.url,
3627
+ artifact.path,
3628
+ artifact.kind,
3629
+ artifact.content_type
3630
+ ].filter(Boolean).join(" ").toLowerCase();
3631
+ }
3632
+ function profileArtifactObservedLabel(artifact) {
3633
+ return artifact.name || artifact.url || artifact.path || artifact.kind || "";
3634
+ }
3538
3635
  function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
3539
3636
  const capturedAt = evidence?.captured_at || (/* @__PURE__ */ new Date()).toISOString();
3540
3637
  const warnings = collectRiddleProofProfileWarnings(profile);
@@ -3546,7 +3643,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
3546
3643
  const status = profileStatusFromEvidence(profile, evidence, checks);
3547
3644
  const firstViewport = evidence?.viewports?.[0];
3548
3645
  const screenshots = profileScreenshotLabels(evidence?.viewports);
3549
- return {
3646
+ const result = {
3550
3647
  version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
3551
3648
  profile_name: profile.name,
3552
3649
  runner: options.runner || "riddle",
@@ -3568,6 +3665,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
3568
3665
  evidence,
3569
3666
  riddle: options.riddle
3570
3667
  };
3668
+ return applyRiddleProofProfileArtifactCompleteness(profile, result, options.artifacts);
3571
3669
  }
3572
3670
  function summarizeRiddleProofProfileResult(input) {
3573
3671
  const passedChecks = input.checks.filter((check) => check.status === "passed").length;
@@ -9509,6 +9607,8 @@ function extractRiddleProofProfileResult(input) {
9509
9607
  RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES,
9510
9608
  RIDDLE_PROOF_PROFILE_STATUSES,
9511
9609
  RIDDLE_PROOF_PROFILE_VERSION,
9610
+ applyRiddleProofProfileArtifactCompleteness,
9611
+ assessRiddleProofProfileArtifactCompleteness,
9512
9612
  assessRiddleProofProfileEvidence,
9513
9613
  buildRiddleProofProfileScript,
9514
9614
  collectRiddleProfileArtifactRefs,
@@ -1,2 +1,2 @@
1
- export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.cjs';
1
+ export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.cjs';
2
2
  import '../types.cjs';
@@ -1,2 +1,2 @@
1
- export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.js';
1
+ export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.js';
2
2
  import '../types.js';
@@ -6,6 +6,8 @@ import {
6
6
  RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES,
7
7
  RIDDLE_PROOF_PROFILE_STATUSES,
8
8
  RIDDLE_PROOF_PROFILE_VERSION,
9
+ applyRiddleProofProfileArtifactCompleteness,
10
+ assessRiddleProofProfileArtifactCompleteness,
9
11
  assessRiddleProofProfileEvidence,
10
12
  buildRiddleProofProfileScript,
11
13
  collectRiddleProfileArtifactRefs,
@@ -23,7 +25,7 @@ import {
23
25
  resolveRiddleProofProfileTimeoutSec,
24
26
  slugifyRiddleProofProfileName,
25
27
  summarizeRiddleProofProfileResult
26
- } from "../chunk-Z2LCVROU.js";
28
+ } from "../chunk-EX7TO4I5.js";
27
29
  import "../chunk-MLKGABMK.js";
28
30
  export {
29
31
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
@@ -33,6 +35,8 @@ export {
33
35
  RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES,
34
36
  RIDDLE_PROOF_PROFILE_STATUSES,
35
37
  RIDDLE_PROOF_PROFILE_VERSION,
38
+ applyRiddleProofProfileArtifactCompleteness,
39
+ assessRiddleProofProfileArtifactCompleteness,
36
40
  assessRiddleProofProfileEvidence,
37
41
  buildRiddleProofProfileScript,
38
42
  collectRiddleProfileArtifactRefs,
package/dist/profile.cjs CHANGED
@@ -27,6 +27,8 @@ __export(profile_exports, {
27
27
  RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES: () => RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES,
28
28
  RIDDLE_PROOF_PROFILE_STATUSES: () => RIDDLE_PROOF_PROFILE_STATUSES,
29
29
  RIDDLE_PROOF_PROFILE_VERSION: () => RIDDLE_PROOF_PROFILE_VERSION,
30
+ applyRiddleProofProfileArtifactCompleteness: () => applyRiddleProofProfileArtifactCompleteness,
31
+ assessRiddleProofProfileArtifactCompleteness: () => assessRiddleProofProfileArtifactCompleteness,
30
32
  assessRiddleProofProfileEvidence: () => assessRiddleProofProfileEvidence,
31
33
  buildRiddleProofProfileScript: () => buildRiddleProofProfileScript,
32
34
  collectRiddleProfileArtifactRefs: () => collectRiddleProfileArtifactRefs,
@@ -3533,6 +3535,101 @@ function profileStatusFromEvidence(profile, evidence, checks) {
3533
3535
  if (checks.some((check) => check.status === "failed")) return "product_regression";
3534
3536
  return "passed";
3535
3537
  }
3538
+ function assessRiddleProofProfileArtifactCompleteness(profile, result, artifacts) {
3539
+ const required = profileRequiredArtifactKeys(profile, result);
3540
+ const missing = required.filter((key) => !profileArtifactKeyPresent(key, artifacts));
3541
+ return {
3542
+ ok: missing.length === 0,
3543
+ required,
3544
+ observed: artifacts.map((artifact) => profileArtifactObservedLabel(artifact)).filter(Boolean),
3545
+ missing
3546
+ };
3547
+ }
3548
+ function applyRiddleProofProfileArtifactCompleteness(profile, result, artifacts) {
3549
+ if (artifacts === void 0) return result;
3550
+ const completeness = assessRiddleProofProfileArtifactCompleteness(profile, result, artifacts);
3551
+ if (result.status !== "passed" || completeness.ok) {
3552
+ return {
3553
+ ...result,
3554
+ artifacts: {
3555
+ ...result.artifacts,
3556
+ riddle_artifacts: artifacts
3557
+ }
3558
+ };
3559
+ }
3560
+ const missing = completeness.missing.join(", ");
3561
+ const message = `Missing required profile artifact(s): ${missing}`;
3562
+ const warnings = [...result.warnings || [], message];
3563
+ return {
3564
+ ...result,
3565
+ status: "proof_insufficient",
3566
+ artifacts: {
3567
+ ...result.artifacts,
3568
+ riddle_artifacts: artifacts
3569
+ },
3570
+ summary: `${profile.name} did not produce required profile artifact(s): ${missing}.`,
3571
+ warnings,
3572
+ error: message
3573
+ };
3574
+ }
3575
+ function profileRequiredArtifactKeys(profile, result) {
3576
+ const keys = [];
3577
+ for (const artifact of profile.artifacts || []) {
3578
+ const role = normalizeProfileArtifactRole(artifact);
3579
+ if (!role) continue;
3580
+ if (role === "screenshot") {
3581
+ const screenshots = result.artifacts.screenshots || [];
3582
+ if (screenshots.length) {
3583
+ keys.push(...screenshots.map((label) => `screenshot:${label}`));
3584
+ } else {
3585
+ keys.push("screenshot");
3586
+ }
3587
+ continue;
3588
+ }
3589
+ keys.push(role);
3590
+ }
3591
+ return uniqueNonEmptyStrings(keys);
3592
+ }
3593
+ function normalizeProfileArtifactRole(input) {
3594
+ const normalized = input.trim().toLowerCase().replace(/[\s-]+/g, "_");
3595
+ if (!normalized) return "";
3596
+ if (normalized === "screenshots") return "screenshot";
3597
+ if (normalized === "console" || normalized === "console_json" || normalized === "console.json") return "console.json";
3598
+ if (normalized === "dom_summary" || normalized === "dom_summary_json" || normalized === "dom-summary.json") return "dom-summary.json";
3599
+ if (normalized === "proof" || normalized === "proof_json" || normalized === "proof.json") return "proof.json";
3600
+ return normalizeRiddleProfileArtifactName(input.trim()).toLowerCase();
3601
+ }
3602
+ function profileArtifactKeyPresent(key, artifacts) {
3603
+ if (key.startsWith("screenshot:")) {
3604
+ const label = key.slice("screenshot:".length);
3605
+ return artifacts.some((artifact) => profileArtifactRefIsScreenshot(artifact) && profileArtifactRefText(artifact).includes(label.toLowerCase()));
3606
+ }
3607
+ if (key === "screenshot") {
3608
+ return artifacts.some((artifact) => profileArtifactRefIsScreenshot(artifact));
3609
+ }
3610
+ return artifacts.some((artifact) => {
3611
+ const name = normalizeRiddleProfileArtifactName(artifact.name || artifactNameFromPath(artifact.url || artifact.path) || "").toLowerCase();
3612
+ return name === key || profileArtifactRefText(artifact).includes(key);
3613
+ });
3614
+ }
3615
+ function profileArtifactRefIsScreenshot(artifact) {
3616
+ const kind = (artifact.kind || "").toLowerCase();
3617
+ const contentType = (artifact.content_type || "").toLowerCase();
3618
+ const text = profileArtifactRefText(artifact);
3619
+ return kind === "screenshot" || contentType.startsWith("image/") || /\.(png|jpe?g|webp)(?:$|[?#])/i.test(text) || /\.(png|jpe?g|webp)$/i.test(text);
3620
+ }
3621
+ function profileArtifactRefText(artifact) {
3622
+ return [
3623
+ artifact.name,
3624
+ artifact.url,
3625
+ artifact.path,
3626
+ artifact.kind,
3627
+ artifact.content_type
3628
+ ].filter(Boolean).join(" ").toLowerCase();
3629
+ }
3630
+ function profileArtifactObservedLabel(artifact) {
3631
+ return artifact.name || artifact.url || artifact.path || artifact.kind || "";
3632
+ }
3536
3633
  function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
3537
3634
  const capturedAt = evidence?.captured_at || (/* @__PURE__ */ new Date()).toISOString();
3538
3635
  const warnings = collectRiddleProofProfileWarnings(profile);
@@ -3544,7 +3641,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
3544
3641
  const status = profileStatusFromEvidence(profile, evidence, checks);
3545
3642
  const firstViewport = evidence?.viewports?.[0];
3546
3643
  const screenshots = profileScreenshotLabels(evidence?.viewports);
3547
- return {
3644
+ const result = {
3548
3645
  version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
3549
3646
  profile_name: profile.name,
3550
3647
  runner: options.runner || "riddle",
@@ -3566,6 +3663,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
3566
3663
  evidence,
3567
3664
  riddle: options.riddle
3568
3665
  };
3666
+ return applyRiddleProofProfileArtifactCompleteness(profile, result, options.artifacts);
3569
3667
  }
3570
3668
  function summarizeRiddleProofProfileResult(input) {
3571
3669
  const passedChecks = input.checks.filter((check) => check.status === "passed").length;
@@ -9507,6 +9605,8 @@ function extractRiddleProofProfileResult(input) {
9507
9605
  RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES,
9508
9606
  RIDDLE_PROOF_PROFILE_STATUSES,
9509
9607
  RIDDLE_PROOF_PROFILE_VERSION,
9608
+ applyRiddleProofProfileArtifactCompleteness,
9609
+ assessRiddleProofProfileArtifactCompleteness,
9510
9610
  assessRiddleProofProfileEvidence,
9511
9611
  buildRiddleProofProfileScript,
9512
9612
  collectRiddleProfileArtifactRefs,
@@ -452,6 +452,14 @@ declare function resolveRiddleProofProfileTargetUrl(profile: RiddleProofProfile)
452
452
  declare function resolveRiddleProofProfileTimeoutSec(profile: RiddleProofProfile, requestedTimeoutSec?: number): number | undefined;
453
453
  declare function preflightRiddleProofProfileHttpStatusChecks(profile: RiddleProofProfile, options?: RiddleProofProfileHttpStatusPreflightOptions): Promise<RiddleProofProfileHttpStatusPreflightResult>;
454
454
  declare function resolveRiddleProofProfileRouteUrl(targetUrl: string, route: string): string;
455
+ interface RiddleProofProfileArtifactCompleteness {
456
+ ok: boolean;
457
+ required: string[];
458
+ observed: string[];
459
+ missing: string[];
460
+ }
461
+ declare function assessRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[]): RiddleProofProfileArtifactCompleteness;
462
+ declare function applyRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[] | undefined): RiddleProofProfileResult;
455
463
  declare function assessRiddleProofProfileEvidence(profile: RiddleProofProfile, evidence: RiddleProofProfileEvidence | undefined, options?: {
456
464
  runner?: RiddleProofProfileRunner;
457
465
  riddle?: RiddleProofProfileResult["riddle"];
@@ -484,4 +492,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
484
492
  declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
485
493
  declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
486
494
 
487
- export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofProfile, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
495
+ export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofProfile, type RiddleProofProfileArtifactCompleteness, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
package/dist/profile.d.ts CHANGED
@@ -452,6 +452,14 @@ declare function resolveRiddleProofProfileTargetUrl(profile: RiddleProofProfile)
452
452
  declare function resolveRiddleProofProfileTimeoutSec(profile: RiddleProofProfile, requestedTimeoutSec?: number): number | undefined;
453
453
  declare function preflightRiddleProofProfileHttpStatusChecks(profile: RiddleProofProfile, options?: RiddleProofProfileHttpStatusPreflightOptions): Promise<RiddleProofProfileHttpStatusPreflightResult>;
454
454
  declare function resolveRiddleProofProfileRouteUrl(targetUrl: string, route: string): string;
455
+ interface RiddleProofProfileArtifactCompleteness {
456
+ ok: boolean;
457
+ required: string[];
458
+ observed: string[];
459
+ missing: string[];
460
+ }
461
+ declare function assessRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[]): RiddleProofProfileArtifactCompleteness;
462
+ declare function applyRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[] | undefined): RiddleProofProfileResult;
455
463
  declare function assessRiddleProofProfileEvidence(profile: RiddleProofProfile, evidence: RiddleProofProfileEvidence | undefined, options?: {
456
464
  runner?: RiddleProofProfileRunner;
457
465
  riddle?: RiddleProofProfileResult["riddle"];
@@ -484,4 +492,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
484
492
  declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
485
493
  declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
486
494
 
487
- export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofProfile, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
495
+ export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofProfile, type RiddleProofProfileArtifactCompleteness, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
package/dist/profile.js CHANGED
@@ -6,6 +6,8 @@ import {
6
6
  RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES,
7
7
  RIDDLE_PROOF_PROFILE_STATUSES,
8
8
  RIDDLE_PROOF_PROFILE_VERSION,
9
+ applyRiddleProofProfileArtifactCompleteness,
10
+ assessRiddleProofProfileArtifactCompleteness,
9
11
  assessRiddleProofProfileEvidence,
10
12
  buildRiddleProofProfileScript,
11
13
  collectRiddleProfileArtifactRefs,
@@ -23,7 +25,7 @@ import {
23
25
  resolveRiddleProofProfileTimeoutSec,
24
26
  slugifyRiddleProofProfileName,
25
27
  summarizeRiddleProofProfileResult
26
- } from "./chunk-Z2LCVROU.js";
28
+ } from "./chunk-EX7TO4I5.js";
27
29
  import "./chunk-MLKGABMK.js";
28
30
  export {
29
31
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
@@ -33,6 +35,8 @@ export {
33
35
  RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES,
34
36
  RIDDLE_PROOF_PROFILE_STATUSES,
35
37
  RIDDLE_PROOF_PROFILE_VERSION,
38
+ applyRiddleProofProfileArtifactCompleteness,
39
+ assessRiddleProofProfileArtifactCompleteness,
36
40
  assessRiddleProofProfileEvidence,
37
41
  buildRiddleProofProfileScript,
38
42
  collectRiddleProfileArtifactRefs,
@@ -122,7 +122,7 @@ declare function buildSetupArgs(params: WorkflowParams, config: ReturnType<typeo
122
122
  target_image_hash: string;
123
123
  viewport_matrix_json: string;
124
124
  deterministic_setup_json: string;
125
- reference: "before" | "prod" | "both";
125
+ reference: "prod" | "before" | "both";
126
126
  base_branch: string;
127
127
  before_ref: string;
128
128
  allow_static_preview_fallback: string;
@@ -122,7 +122,7 @@ declare function buildSetupArgs(params: WorkflowParams, config: ReturnType<typeo
122
122
  target_image_hash: string;
123
123
  viewport_matrix_json: string;
124
124
  deterministic_setup_json: string;
125
- reference: "before" | "prod" | "both";
125
+ reference: "prod" | "before" | "both";
126
126
  base_branch: string;
127
127
  before_ref: string;
128
128
  allow_static_preview_fallback: string;
@@ -1 +1 @@
1
- export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as proofAssessmentHardBlockersForState, q as readState, s as recordStageAttempt, t as requiredBaselineLabelsForState, r as resolveConfig, u as resolveRiddleProofDir, v as setStageDecisionRequest, w as summarizeState, x as validateShipGate, y as visualDeltaForState, z as visualDeltaRequiredForState, A as visualDeltaShipGateReason, D as workflowFile, E as writeState } from './proof-run-core-B1GeqkR8.cjs';
1
+ export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as proofAssessmentHardBlockersForState, q as readState, s as recordStageAttempt, t as requiredBaselineLabelsForState, r as resolveConfig, u as resolveRiddleProofDir, v as setStageDecisionRequest, w as summarizeState, x as validateShipGate, y as visualDeltaForState, z as visualDeltaRequiredForState, A as visualDeltaShipGateReason, D as workflowFile, E as writeState } from './proof-run-core-CcN0Eson.cjs';
@@ -1 +1 @@
1
- export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as proofAssessmentHardBlockersForState, q as readState, s as recordStageAttempt, t as requiredBaselineLabelsForState, r as resolveConfig, u as resolveRiddleProofDir, v as setStageDecisionRequest, w as summarizeState, x as validateShipGate, y as visualDeltaForState, z as visualDeltaRequiredForState, A as visualDeltaShipGateReason, D as workflowFile, E as writeState } from './proof-run-core-B1GeqkR8.js';
1
+ export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as checkpointContinueStage, h as clearStageDecisionRequest, i as ensureAction, j as ensureStageLoopState, k as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, l as previewModeFromWorkflowMode, o as proofAssessmentHardBlockersForState, q as readState, s as recordStageAttempt, t as requiredBaselineLabelsForState, r as resolveConfig, u as resolveRiddleProofDir, v as setStageDecisionRequest, w as summarizeState, x as validateShipGate, y as visualDeltaForState, z as visualDeltaRequiredForState, A as visualDeltaShipGateReason, D as workflowFile, E as writeState } from './proof-run-core-CcN0Eson.js';
@@ -1,4 +1,4 @@
1
- import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-B1GeqkR8.cjs';
1
+ import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-CcN0Eson.cjs';
2
2
 
3
3
  declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, resolvedConfig?: ReturnType<typeof resolveConfig>): Promise<{
4
4
  ok: boolean;
@@ -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";
662
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -1,4 +1,4 @@
1
- import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-B1GeqkR8.js';
1
+ import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-CcN0Eson.js';
2
2
 
3
3
  declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, resolvedConfig?: ReturnType<typeof resolveConfig>): Promise<{
4
4
  ok: boolean;
@@ -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";
662
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -1,2 +1,2 @@
1
- import './proof-run-core-B1GeqkR8.cjs';
2
- export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-4dM37pEx.cjs';
1
+ import './proof-run-core-CcN0Eson.cjs';
2
+ export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-C3Hoalg8.cjs';
@@ -1,2 +1,2 @@
1
- import './proof-run-core-B1GeqkR8.js';
2
- export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-BqaeqAze.js';
1
+ import './proof-run-core-CcN0Eson.js';
2
+ export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from './proof-run-engine-DFrhOLYy.js';
@@ -4,8 +4,8 @@
4
4
  "public_name": "Riddle Proof OC Flow Regression Pack",
5
5
  "description": "Reusable regression pack for the trust boundary between browser evidence, verifier judgment, retry policy, wrapper checkpoint handling, and terminal status.",
6
6
  "minimum_versions": {
7
- "@riddledc/openclaw-riddle-proof": "0.4.146",
8
- "@riddledc/riddle-proof": "0.8.18"
7
+ "@riddledc/openclaw-riddle-proof": "0.4.155",
8
+ "@riddledc/riddle-proof": "0.8.43"
9
9
  },
10
10
  "runtime_gate": {
11
11
  "tool": "riddle_proof_status",
@@ -287,7 +287,7 @@
287
287
  "wait for main#main-content",
288
288
  "click a visible Proof link whose href includes /proof",
289
289
  "wait for terminal URL https://riddledc.com/proof/",
290
- "return riddle-proof.interaction.v1 evidence with start, action, terminal, assertions, and routeExpectationSource=capture_script.expectedUrl",
290
+ "return riddle-proof.interaction.v1 evidence with start, action, terminal, assertions, and routeExpectationSource=expected_terminal_path",
291
291
  "save screenshot after-proof"
292
292
  ]
293
293
  },
@@ -295,7 +295,7 @@
295
295
  "terminal_status": "ready_to_ship",
296
296
  "terminal_path": "/proof/",
297
297
  "proof_evidence_present": true,
298
- "route_expectation_source": "capture_script.expectedUrl",
298
+ "route_expectation_source": "expected_terminal_path",
299
299
  "forbidden_terminal_markers": []
300
300
  }
301
301
  },
@@ -321,7 +321,7 @@
321
321
  "terminal_status": "ready_to_ship",
322
322
  "terminal_path": "/",
323
323
  "proof_evidence_present": true,
324
- "route_expectation_source": "capture_script.expectedUrl",
324
+ "route_expectation_source": "expected_terminal_path",
325
325
  "forbidden_terminal_markers": []
326
326
  }
327
327
  },
@@ -386,9 +386,9 @@
386
386
  {
387
387
  "id": "no-diff-prod-audit-pass",
388
388
  "tool": "riddle_proof_change",
389
- "intent": "Audit the live production home page without implementation or PR handoff, and prove the current target evidence directly.",
389
+ "intent": "Audit the live production home page without implementation or PR handoff, and prove the current target visually without any browser interaction.",
390
390
  "params": {
391
- "verification_mode": "interaction",
391
+ "verification_mode": "visual",
392
392
  "implementation_mode": "none",
393
393
  "require_diff": false,
394
394
  "allow_code_changes": false,
@@ -398,15 +398,18 @@
398
398
  "capture_script_contract": [
399
399
  "use the current production target only",
400
400
  "do not request implementation or git diff",
401
+ "do not click, type, submit, copy, navigate, or interact with any button or link",
401
402
  "prove main#main-content and expected home-page content are visible",
402
- "return structured evidence and save screenshot after-proof"
403
+ "save screenshot after-proof and treat this as a passive visual/no-diff audit, not an interaction proof"
403
404
  ]
404
405
  },
405
406
  "expect": {
406
407
  "terminal_status": "ready_to_ship",
407
408
  "ship_handoff": "none",
408
409
  "implementation_attempted": false,
409
- "proof_evidence_present": true,
410
+ "proof_evidence_required": false,
411
+ "screenshot_required": true,
412
+ "browser_interaction_performed": false,
410
413
  "forbidden_terminal_markers": []
411
414
  }
412
415
  },
@@ -473,16 +476,22 @@
473
476
  "verification_mode": "interaction",
474
477
  "server_path": "/",
475
478
  "wait_for_selector": "main#main-content",
479
+ "expected_terminal_url": "https://riddledc.com/proof/",
476
480
  "checkpoint_mode": "terminal_only",
477
481
  "report_mode": "terminal_only",
478
482
  "capture_script_contract": [
479
- "complete the Home -> Proof route proof",
483
+ "complete the Home -> Proof route proof by clicking the visible Proof nav link only",
484
+ "do not click Docs, Pricing, MCP, Blog, Playground, Copy, or any other link or button",
485
+ "terminal URL must be https://riddledc.com/proof/ and terminal path must be /proof",
480
486
  "terminalize as ready_to_ship before any manual checkpoint injection",
481
487
  "record state_path and run_id from riddle_proof_status"
482
488
  ]
483
489
  },
484
490
  "expect": {
485
491
  "terminal_status": "ready_to_ship",
492
+ "terminal_url": "https://riddledc.com/proof/",
493
+ "terminal_path": "/proof",
494
+ "route_expectation_source": "expected_terminal_path",
486
495
  "proof_evidence_present": true
487
496
  }
488
497
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.8.42",
3
+ "version": "0.8.44",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",