@riddledc/riddle-proof 0.8.71 → 0.8.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/{chunk-EX7TO4I5.js → chunk-GG2D3MFZ.js} +57 -3
- package/dist/{chunk-RJVA5KKM.js → chunk-ICIJTEHD.js} +114 -6
- package/dist/{chunk-5Y4V2IXI.js → chunk-UE4I7RTI.js} +1 -1
- package/dist/cli/index.js +3 -3
- package/dist/cli.cjs +178 -4
- package/dist/cli.js +3 -3
- package/dist/index.cjs +59 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -2
- package/dist/profile/index.cjs +59 -3
- package/dist/profile/index.d.cts +1 -1
- package/dist/profile/index.d.ts +1 -1
- package/dist/profile/index.js +5 -1
- package/dist/profile-suggestions.js +2 -2
- package/dist/profile.cjs +59 -3
- package/dist/profile.d.cts +16 -2
- package/dist/profile.d.ts +16 -2
- package/dist/profile.js +5 -1
- package/examples/neutral-fixture-site/README.md +8 -0
- package/examples/neutral-fixture-site/auth.html +45 -0
- package/examples/neutral-fixture-site/index.html +1 -0
- package/examples/neutral-fixture-site/styles.css +32 -0
- package/examples/profiles/neutral-fixture-auth-session.json +44 -0
- package/examples/story-matrices/riddle-proof-bounded-loop.json +19 -0
- package/examples/story-matrices/riddle-proof-ux-coverage.csv +5 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3420,6 +3420,7 @@ __export(index_exports, {
|
|
|
3420
3420
|
RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION: () => RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION,
|
|
3421
3421
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION: () => RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
3422
3422
|
RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION: () => RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
|
|
3423
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: () => RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
3423
3424
|
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION: () => RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
3424
3425
|
RIDDLE_PROOF_PLAYABILITY_VERSION: () => RIDDLE_PROOF_PLAYABILITY_VERSION,
|
|
3425
3426
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES: () => RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
@@ -3511,6 +3512,7 @@ __export(index_exports, {
|
|
|
3511
3512
|
parseVisualProofSession: () => parseVisualProofSession,
|
|
3512
3513
|
pollRiddleJob: () => pollRiddleJob,
|
|
3513
3514
|
preflightRiddleProofProfileHttpStatusChecks: () => preflightRiddleProofProfileHttpStatusChecks,
|
|
3515
|
+
preflightRiddleProofProfileRunnerArtifacts: () => preflightRiddleProofProfileRunnerArtifacts,
|
|
3514
3516
|
profileStatusExitCode: () => profileStatusExitCode,
|
|
3515
3517
|
proofContractFromAuthorCheckpointResponse: () => proofContractFromAuthorCheckpointResponse,
|
|
3516
3518
|
publicMergeRecommendationForRunState: () => publicMergeRecommendationForRunState,
|
|
@@ -13643,6 +13645,35 @@ function profileStatusFromEvidence(profile, evidence, checks) {
|
|
|
13643
13645
|
if (checks.some((check) => check.status === "failed")) return "product_regression";
|
|
13644
13646
|
return "passed";
|
|
13645
13647
|
}
|
|
13648
|
+
var RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS = [
|
|
13649
|
+
"screenshot",
|
|
13650
|
+
"console",
|
|
13651
|
+
"dom_summary",
|
|
13652
|
+
"proof_json"
|
|
13653
|
+
];
|
|
13654
|
+
function preflightRiddleProofProfileRunnerArtifacts(profile, runner) {
|
|
13655
|
+
const requested = uniqueNonEmptyStrings(profile.artifacts || []);
|
|
13656
|
+
if (runner !== "riddle") {
|
|
13657
|
+
return {
|
|
13658
|
+
ok: true,
|
|
13659
|
+
runner,
|
|
13660
|
+
requested,
|
|
13661
|
+
local_only: [],
|
|
13662
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS]
|
|
13663
|
+
};
|
|
13664
|
+
}
|
|
13665
|
+
const localOnly = requested.filter(profileArtifactIsHostedLocalOnly);
|
|
13666
|
+
const subject = localOnly.join(", ");
|
|
13667
|
+
const message = localOnly.length ? `${subject} ${localOnly.length === 1 ? "is" : "are"} local-runner output; hosted runs produce proof_json, console, dom_summary, and screenshots. Remove ${localOnly.length === 1 ? "it" : "them"} from profile.artifacts for --runner riddle.` : void 0;
|
|
13668
|
+
return {
|
|
13669
|
+
ok: localOnly.length === 0,
|
|
13670
|
+
runner,
|
|
13671
|
+
requested,
|
|
13672
|
+
local_only: localOnly,
|
|
13673
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS],
|
|
13674
|
+
message
|
|
13675
|
+
};
|
|
13676
|
+
}
|
|
13646
13677
|
function assessRiddleProofProfileArtifactCompleteness(profile, result, artifacts) {
|
|
13647
13678
|
const required = profileRequiredArtifactKeys(profile, result);
|
|
13648
13679
|
const missing = required.filter((key) => !profileArtifactKeyPresent(key, artifacts));
|
|
@@ -13707,6 +13738,16 @@ function normalizeProfileArtifactRole(input) {
|
|
|
13707
13738
|
if (normalized === "proof" || normalized === "proof_json" || normalized === "proof.json") return "proof.json";
|
|
13708
13739
|
return normalizeRiddleProfileArtifactName(input.trim()).toLowerCase();
|
|
13709
13740
|
}
|
|
13741
|
+
function profileArtifactIsHostedLocalOnly(input) {
|
|
13742
|
+
const raw = input.trim().toLowerCase();
|
|
13743
|
+
const normalized = raw.replace(/[\s-]+/g, "_");
|
|
13744
|
+
const role = normalizeProfileArtifactRole(input);
|
|
13745
|
+
return [
|
|
13746
|
+
raw,
|
|
13747
|
+
normalized,
|
|
13748
|
+
role
|
|
13749
|
+
].some((value) => value === "artifact_manifest" || value === "artifact_manifest.json" || value === "artifact-manifest" || value === "artifact-manifest.json");
|
|
13750
|
+
}
|
|
13710
13751
|
function profileArtifactKeyPresent(key, artifacts) {
|
|
13711
13752
|
if (key.startsWith("screenshot:")) {
|
|
13712
13753
|
const label = key.slice("screenshot:".length);
|
|
@@ -13798,19 +13839,32 @@ function profileStatusExitCode(profile, status) {
|
|
|
13798
13839
|
if (status === "passed") return 0;
|
|
13799
13840
|
return profile.failure_policy[status] === "neutral" ? 0 : 1;
|
|
13800
13841
|
}
|
|
13801
|
-
function createRiddleProofProfileConfigurationError(
|
|
13842
|
+
function createRiddleProofProfileConfigurationError(profileOrName, error, runner = "riddle", options = {}) {
|
|
13843
|
+
const profile = typeof profileOrName === "string" ? void 0 : profileOrName;
|
|
13844
|
+
const name = profile ? profile.name : String(profileOrName);
|
|
13802
13845
|
const message = error instanceof Error ? error.message : String(error);
|
|
13846
|
+
let requested = "";
|
|
13847
|
+
if (profile) {
|
|
13848
|
+
try {
|
|
13849
|
+
requested = resolveRiddleProofProfileTargetUrl(profile);
|
|
13850
|
+
} catch {
|
|
13851
|
+
requested = "";
|
|
13852
|
+
}
|
|
13853
|
+
}
|
|
13803
13854
|
return {
|
|
13804
13855
|
version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
|
|
13805
13856
|
profile_name: name,
|
|
13806
13857
|
runner,
|
|
13807
13858
|
status: "configuration_error",
|
|
13808
|
-
baseline_policy: "invariant_only",
|
|
13809
|
-
route: { requested
|
|
13859
|
+
baseline_policy: profile?.baseline_policy || "invariant_only",
|
|
13860
|
+
route: { requested, observed: "", matched: false, error: message },
|
|
13810
13861
|
artifacts: { screenshots: [], proof_json: "proof.json" },
|
|
13811
13862
|
checks: [],
|
|
13812
13863
|
summary: `${name} has a profile configuration error.`,
|
|
13813
13864
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
13865
|
+
metadata: profile?.metadata,
|
|
13866
|
+
warnings: options.warnings?.length ? options.warnings : void 0,
|
|
13867
|
+
configuration_blocker: options.configurationBlocker,
|
|
13814
13868
|
error: message
|
|
13815
13869
|
};
|
|
13816
13870
|
}
|
|
@@ -20851,6 +20905,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
20851
20905
|
RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION,
|
|
20852
20906
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
20853
20907
|
RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
|
|
20908
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
20854
20909
|
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
20855
20910
|
RIDDLE_PROOF_PLAYABILITY_VERSION,
|
|
20856
20911
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
@@ -20942,6 +20997,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
20942
20997
|
parseVisualProofSession,
|
|
20943
20998
|
pollRiddleJob,
|
|
20944
20999
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
21000
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
20945
21001
|
profileStatusExitCode,
|
|
20946
21002
|
proofContractFromAuthorCheckpointResponse,
|
|
20947
21003
|
publicMergeRecommendationForRunState,
|
package/dist/index.d.cts
CHANGED
|
@@ -11,7 +11,7 @@ export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_D
|
|
|
11
11
|
export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.cjs';
|
|
12
12
|
export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.cjs';
|
|
13
13
|
export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, BasicGameplayActionResult, BasicGameplayActionType, BasicGameplayArtifactResolution, BasicGameplayAssessmentSummary, BasicGameplayBoundsOffender, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, BasicGameplayResponsiveViewportEvidence, BasicGameplayRouteReference, BasicGameplaySnapshot, BasicGameplaySuiteFailure, BasicGameplayWarningCode, CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, RiddleProofBasicGameplayAssessment, RiddleProofBasicGameplayCatchSummary, RiddleProofBasicGameplayEvidence, RiddleProofBasicGameplayRouteAssessment, RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString } from './basic-gameplay.cjs';
|
|
14
|
-
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';
|
|
14
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, 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, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
|
|
15
15
|
export { RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION, RiddleProofProfileChangedTextInput, RiddleProofProfileSuggestion, RiddleProofProfileSuggestionInput, RiddleProofProfileSuggestionsResult, suggestRiddleProofProfileChecks } from './profile-suggestions.cjs';
|
|
16
16
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RIDDLE_UNSUBMITTED_WAKE_HINT, RiddleApiError, RiddleApiKeySource, RiddleBalanceResult, RiddleClientConfig, RiddleFetch, RiddlePollJobOptions, RiddlePollJobResult, RiddlePollProgressSnapshot, RiddlePollSummary, RiddlePreviewDeployProgressSnapshot, RiddlePreviewDeployResult, RiddlePreviewDeployStage, RiddlePreviewFramework, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, collectRiddlePreviewDeployWarnings, createRiddleApiClient, deployRiddlePreview, deployRiddleStaticPreview, getRiddleBalance, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, resolveRiddleApiKeySource, riddleRequestJson, runRiddleScript, runRiddleServerPreview } from './riddle-client.cjs';
|
|
17
17
|
export { RIDDLE_PROOF_PR_COMMENT_MARKER, RiddleProofPrCommentArtifact, RiddleProofPrCommentArtifactKind, RiddleProofPrCommentCheckpointSummary, RiddleProofPrCommentInput, RiddleProofPrCommentPageSummary, RiddleProofPrCommentSummary, buildRiddleProofPrCommentMarkdown, summarizeRiddleProofPrComment } from './pr-comment.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_D
|
|
|
11
11
|
export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.js';
|
|
12
12
|
export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.js';
|
|
13
13
|
export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, BasicGameplayActionResult, BasicGameplayActionType, BasicGameplayArtifactResolution, BasicGameplayAssessmentSummary, BasicGameplayBoundsOffender, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, BasicGameplayResponsiveViewportEvidence, BasicGameplayRouteReference, BasicGameplaySnapshot, BasicGameplaySuiteFailure, BasicGameplayWarningCode, CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, RiddleProofBasicGameplayAssessment, RiddleProofBasicGameplayCatchSummary, RiddleProofBasicGameplayEvidence, RiddleProofBasicGameplayRouteAssessment, RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString } from './basic-gameplay.js';
|
|
14
|
-
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';
|
|
14
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, 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, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
|
|
15
15
|
export { RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION, RiddleProofProfileChangedTextInput, RiddleProofProfileSuggestion, RiddleProofProfileSuggestionInput, RiddleProofProfileSuggestionsResult, suggestRiddleProofProfileChecks } from './profile-suggestions.js';
|
|
16
16
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RIDDLE_UNSUBMITTED_WAKE_HINT, RiddleApiError, RiddleApiKeySource, RiddleBalanceResult, RiddleClientConfig, RiddleFetch, RiddlePollJobOptions, RiddlePollJobResult, RiddlePollProgressSnapshot, RiddlePollSummary, RiddlePreviewDeployProgressSnapshot, RiddlePreviewDeployResult, RiddlePreviewDeployStage, RiddlePreviewFramework, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, collectRiddlePreviewDeployWarnings, createRiddleApiClient, deployRiddlePreview, deployRiddleStaticPreview, getRiddleBalance, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, resolveRiddleApiKeySource, riddleRequestJson, runRiddleScript, runRiddleServerPreview } from './riddle-client.js';
|
|
17
17
|
export { RIDDLE_PROOF_PR_COMMENT_MARKER, RiddleProofPrCommentArtifact, RiddleProofPrCommentArtifactKind, RiddleProofPrCommentCheckpointSummary, RiddleProofPrCommentInput, RiddleProofPrCommentPageSummary, RiddleProofPrCommentSummary, buildRiddleProofPrCommentMarkdown, summarizeRiddleProofPrComment } from './pr-comment.js';
|
package/dist/index.js
CHANGED
|
@@ -64,8 +64,9 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION,
|
|
66
66
|
suggestRiddleProofProfileChecks
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-UE4I7RTI.js";
|
|
68
68
|
import {
|
|
69
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
69
70
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
70
71
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
71
72
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -86,13 +87,14 @@ import {
|
|
|
86
87
|
extractRiddleProofProfileResult,
|
|
87
88
|
normalizeRiddleProofProfile,
|
|
88
89
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
90
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
89
91
|
profileStatusExitCode,
|
|
90
92
|
resolveRiddleProofProfileRouteUrl,
|
|
91
93
|
resolveRiddleProofProfileTargetUrl,
|
|
92
94
|
resolveRiddleProofProfileTimeoutSec,
|
|
93
95
|
slugifyRiddleProofProfileName,
|
|
94
96
|
summarizeRiddleProofProfileResult
|
|
95
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-GG2D3MFZ.js";
|
|
96
98
|
import {
|
|
97
99
|
DEFAULT_DIAGNOSTIC_ARRAY_LIMIT,
|
|
98
100
|
DEFAULT_DIAGNOSTIC_HISTORY_LIMIT,
|
|
@@ -187,6 +189,7 @@ export {
|
|
|
187
189
|
RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION,
|
|
188
190
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
189
191
|
RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
|
|
192
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
190
193
|
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
191
194
|
RIDDLE_PROOF_PLAYABILITY_VERSION,
|
|
192
195
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
@@ -278,6 +281,7 @@ export {
|
|
|
278
281
|
parseVisualProofSession,
|
|
279
282
|
pollRiddleJob,
|
|
280
283
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
284
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
281
285
|
profileStatusExitCode,
|
|
282
286
|
proofContractFromAuthorCheckpointResponse,
|
|
283
287
|
publicMergeRecommendationForRunState,
|
package/dist/profile/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/profile/index.ts
|
|
21
21
|
var profile_exports = {};
|
|
22
22
|
__export(profile_exports, {
|
|
23
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: () => RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
23
24
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES: () => RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
24
25
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION: () => RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
25
26
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES: () => RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -40,6 +41,7 @@ __export(profile_exports, {
|
|
|
40
41
|
extractRiddleProofProfileResult: () => extractRiddleProofProfileResult,
|
|
41
42
|
normalizeRiddleProofProfile: () => normalizeRiddleProofProfile,
|
|
42
43
|
preflightRiddleProofProfileHttpStatusChecks: () => preflightRiddleProofProfileHttpStatusChecks,
|
|
44
|
+
preflightRiddleProofProfileRunnerArtifacts: () => preflightRiddleProofProfileRunnerArtifacts,
|
|
43
45
|
profileStatusExitCode: () => profileStatusExitCode,
|
|
44
46
|
resolveRiddleProofProfileRouteUrl: () => resolveRiddleProofProfileRouteUrl,
|
|
45
47
|
resolveRiddleProofProfileTargetUrl: () => resolveRiddleProofProfileTargetUrl,
|
|
@@ -3537,6 +3539,35 @@ function profileStatusFromEvidence(profile, evidence, checks) {
|
|
|
3537
3539
|
if (checks.some((check) => check.status === "failed")) return "product_regression";
|
|
3538
3540
|
return "passed";
|
|
3539
3541
|
}
|
|
3542
|
+
var RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS = [
|
|
3543
|
+
"screenshot",
|
|
3544
|
+
"console",
|
|
3545
|
+
"dom_summary",
|
|
3546
|
+
"proof_json"
|
|
3547
|
+
];
|
|
3548
|
+
function preflightRiddleProofProfileRunnerArtifacts(profile, runner) {
|
|
3549
|
+
const requested = uniqueNonEmptyStrings(profile.artifacts || []);
|
|
3550
|
+
if (runner !== "riddle") {
|
|
3551
|
+
return {
|
|
3552
|
+
ok: true,
|
|
3553
|
+
runner,
|
|
3554
|
+
requested,
|
|
3555
|
+
local_only: [],
|
|
3556
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS]
|
|
3557
|
+
};
|
|
3558
|
+
}
|
|
3559
|
+
const localOnly = requested.filter(profileArtifactIsHostedLocalOnly);
|
|
3560
|
+
const subject = localOnly.join(", ");
|
|
3561
|
+
const message = localOnly.length ? `${subject} ${localOnly.length === 1 ? "is" : "are"} local-runner output; hosted runs produce proof_json, console, dom_summary, and screenshots. Remove ${localOnly.length === 1 ? "it" : "them"} from profile.artifacts for --runner riddle.` : void 0;
|
|
3562
|
+
return {
|
|
3563
|
+
ok: localOnly.length === 0,
|
|
3564
|
+
runner,
|
|
3565
|
+
requested,
|
|
3566
|
+
local_only: localOnly,
|
|
3567
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS],
|
|
3568
|
+
message
|
|
3569
|
+
};
|
|
3570
|
+
}
|
|
3540
3571
|
function assessRiddleProofProfileArtifactCompleteness(profile, result, artifacts) {
|
|
3541
3572
|
const required = profileRequiredArtifactKeys(profile, result);
|
|
3542
3573
|
const missing = required.filter((key) => !profileArtifactKeyPresent(key, artifacts));
|
|
@@ -3601,6 +3632,16 @@ function normalizeProfileArtifactRole(input) {
|
|
|
3601
3632
|
if (normalized === "proof" || normalized === "proof_json" || normalized === "proof.json") return "proof.json";
|
|
3602
3633
|
return normalizeRiddleProfileArtifactName(input.trim()).toLowerCase();
|
|
3603
3634
|
}
|
|
3635
|
+
function profileArtifactIsHostedLocalOnly(input) {
|
|
3636
|
+
const raw = input.trim().toLowerCase();
|
|
3637
|
+
const normalized = raw.replace(/[\s-]+/g, "_");
|
|
3638
|
+
const role = normalizeProfileArtifactRole(input);
|
|
3639
|
+
return [
|
|
3640
|
+
raw,
|
|
3641
|
+
normalized,
|
|
3642
|
+
role
|
|
3643
|
+
].some((value) => value === "artifact_manifest" || value === "artifact_manifest.json" || value === "artifact-manifest" || value === "artifact-manifest.json");
|
|
3644
|
+
}
|
|
3604
3645
|
function profileArtifactKeyPresent(key, artifacts) {
|
|
3605
3646
|
if (key.startsWith("screenshot:")) {
|
|
3606
3647
|
const label = key.slice("screenshot:".length);
|
|
@@ -3692,19 +3733,32 @@ function profileStatusExitCode(profile, status) {
|
|
|
3692
3733
|
if (status === "passed") return 0;
|
|
3693
3734
|
return profile.failure_policy[status] === "neutral" ? 0 : 1;
|
|
3694
3735
|
}
|
|
3695
|
-
function createRiddleProofProfileConfigurationError(
|
|
3736
|
+
function createRiddleProofProfileConfigurationError(profileOrName, error, runner = "riddle", options = {}) {
|
|
3737
|
+
const profile = typeof profileOrName === "string" ? void 0 : profileOrName;
|
|
3738
|
+
const name = profile ? profile.name : String(profileOrName);
|
|
3696
3739
|
const message = error instanceof Error ? error.message : String(error);
|
|
3740
|
+
let requested = "";
|
|
3741
|
+
if (profile) {
|
|
3742
|
+
try {
|
|
3743
|
+
requested = resolveRiddleProofProfileTargetUrl(profile);
|
|
3744
|
+
} catch {
|
|
3745
|
+
requested = "";
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3697
3748
|
return {
|
|
3698
3749
|
version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
|
|
3699
3750
|
profile_name: name,
|
|
3700
3751
|
runner,
|
|
3701
3752
|
status: "configuration_error",
|
|
3702
|
-
baseline_policy: "invariant_only",
|
|
3703
|
-
route: { requested
|
|
3753
|
+
baseline_policy: profile?.baseline_policy || "invariant_only",
|
|
3754
|
+
route: { requested, observed: "", matched: false, error: message },
|
|
3704
3755
|
artifacts: { screenshots: [], proof_json: "proof.json" },
|
|
3705
3756
|
checks: [],
|
|
3706
3757
|
summary: `${name} has a profile configuration error.`,
|
|
3707
3758
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3759
|
+
metadata: profile?.metadata,
|
|
3760
|
+
warnings: options.warnings?.length ? options.warnings : void 0,
|
|
3761
|
+
configuration_blocker: options.configurationBlocker,
|
|
3708
3762
|
error: message
|
|
3709
3763
|
};
|
|
3710
3764
|
}
|
|
@@ -9600,6 +9654,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
9600
9654
|
}
|
|
9601
9655
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9602
9656
|
0 && (module.exports = {
|
|
9657
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
9603
9658
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
9604
9659
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
9605
9660
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -9620,6 +9675,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
9620
9675
|
extractRiddleProofProfileResult,
|
|
9621
9676
|
normalizeRiddleProofProfile,
|
|
9622
9677
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
9678
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
9623
9679
|
profileStatusExitCode,
|
|
9624
9680
|
resolveRiddleProofProfileRouteUrl,
|
|
9625
9681
|
resolveRiddleProofProfileTargetUrl,
|
package/dist/profile/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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';
|
|
1
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, 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, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.cjs';
|
|
2
2
|
import '../types.cjs';
|
|
3
3
|
import '../public-state.cjs';
|
package/dist/profile/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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';
|
|
1
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, 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, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.js';
|
|
2
2
|
import '../types.js';
|
|
3
3
|
import '../public-state.js';
|
package/dist/profile/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
2
3
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
3
4
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
4
5
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -19,15 +20,17 @@ import {
|
|
|
19
20
|
extractRiddleProofProfileResult,
|
|
20
21
|
normalizeRiddleProofProfile,
|
|
21
22
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
23
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
22
24
|
profileStatusExitCode,
|
|
23
25
|
resolveRiddleProofProfileRouteUrl,
|
|
24
26
|
resolveRiddleProofProfileTargetUrl,
|
|
25
27
|
resolveRiddleProofProfileTimeoutSec,
|
|
26
28
|
slugifyRiddleProofProfileName,
|
|
27
29
|
summarizeRiddleProofProfileResult
|
|
28
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-GG2D3MFZ.js";
|
|
29
31
|
import "../chunk-MLKGABMK.js";
|
|
30
32
|
export {
|
|
33
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
31
34
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
32
35
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
33
36
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -48,6 +51,7 @@ export {
|
|
|
48
51
|
extractRiddleProofProfileResult,
|
|
49
52
|
normalizeRiddleProofProfile,
|
|
50
53
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
54
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
51
55
|
profileStatusExitCode,
|
|
52
56
|
resolveRiddleProofProfileRouteUrl,
|
|
53
57
|
resolveRiddleProofProfileTargetUrl,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION,
|
|
3
3
|
suggestRiddleProofProfileChecks
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-UE4I7RTI.js";
|
|
5
|
+
import "./chunk-GG2D3MFZ.js";
|
|
6
6
|
import "./chunk-MLKGABMK.js";
|
|
7
7
|
export {
|
|
8
8
|
RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION,
|
package/dist/profile.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/profile.ts
|
|
21
21
|
var profile_exports = {};
|
|
22
22
|
__export(profile_exports, {
|
|
23
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: () => RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
23
24
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES: () => RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
24
25
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION: () => RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
25
26
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES: () => RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -40,6 +41,7 @@ __export(profile_exports, {
|
|
|
40
41
|
extractRiddleProofProfileResult: () => extractRiddleProofProfileResult,
|
|
41
42
|
normalizeRiddleProofProfile: () => normalizeRiddleProofProfile,
|
|
42
43
|
preflightRiddleProofProfileHttpStatusChecks: () => preflightRiddleProofProfileHttpStatusChecks,
|
|
44
|
+
preflightRiddleProofProfileRunnerArtifacts: () => preflightRiddleProofProfileRunnerArtifacts,
|
|
43
45
|
profileStatusExitCode: () => profileStatusExitCode,
|
|
44
46
|
resolveRiddleProofProfileRouteUrl: () => resolveRiddleProofProfileRouteUrl,
|
|
45
47
|
resolveRiddleProofProfileTargetUrl: () => resolveRiddleProofProfileTargetUrl,
|
|
@@ -3535,6 +3537,35 @@ function profileStatusFromEvidence(profile, evidence, checks) {
|
|
|
3535
3537
|
if (checks.some((check) => check.status === "failed")) return "product_regression";
|
|
3536
3538
|
return "passed";
|
|
3537
3539
|
}
|
|
3540
|
+
var RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS = [
|
|
3541
|
+
"screenshot",
|
|
3542
|
+
"console",
|
|
3543
|
+
"dom_summary",
|
|
3544
|
+
"proof_json"
|
|
3545
|
+
];
|
|
3546
|
+
function preflightRiddleProofProfileRunnerArtifacts(profile, runner) {
|
|
3547
|
+
const requested = uniqueNonEmptyStrings(profile.artifacts || []);
|
|
3548
|
+
if (runner !== "riddle") {
|
|
3549
|
+
return {
|
|
3550
|
+
ok: true,
|
|
3551
|
+
runner,
|
|
3552
|
+
requested,
|
|
3553
|
+
local_only: [],
|
|
3554
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS]
|
|
3555
|
+
};
|
|
3556
|
+
}
|
|
3557
|
+
const localOnly = requested.filter(profileArtifactIsHostedLocalOnly);
|
|
3558
|
+
const subject = localOnly.join(", ");
|
|
3559
|
+
const message = localOnly.length ? `${subject} ${localOnly.length === 1 ? "is" : "are"} local-runner output; hosted runs produce proof_json, console, dom_summary, and screenshots. Remove ${localOnly.length === 1 ? "it" : "them"} from profile.artifacts for --runner riddle.` : void 0;
|
|
3560
|
+
return {
|
|
3561
|
+
ok: localOnly.length === 0,
|
|
3562
|
+
runner,
|
|
3563
|
+
requested,
|
|
3564
|
+
local_only: localOnly,
|
|
3565
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS],
|
|
3566
|
+
message
|
|
3567
|
+
};
|
|
3568
|
+
}
|
|
3538
3569
|
function assessRiddleProofProfileArtifactCompleteness(profile, result, artifacts) {
|
|
3539
3570
|
const required = profileRequiredArtifactKeys(profile, result);
|
|
3540
3571
|
const missing = required.filter((key) => !profileArtifactKeyPresent(key, artifacts));
|
|
@@ -3599,6 +3630,16 @@ function normalizeProfileArtifactRole(input) {
|
|
|
3599
3630
|
if (normalized === "proof" || normalized === "proof_json" || normalized === "proof.json") return "proof.json";
|
|
3600
3631
|
return normalizeRiddleProfileArtifactName(input.trim()).toLowerCase();
|
|
3601
3632
|
}
|
|
3633
|
+
function profileArtifactIsHostedLocalOnly(input) {
|
|
3634
|
+
const raw = input.trim().toLowerCase();
|
|
3635
|
+
const normalized = raw.replace(/[\s-]+/g, "_");
|
|
3636
|
+
const role = normalizeProfileArtifactRole(input);
|
|
3637
|
+
return [
|
|
3638
|
+
raw,
|
|
3639
|
+
normalized,
|
|
3640
|
+
role
|
|
3641
|
+
].some((value) => value === "artifact_manifest" || value === "artifact_manifest.json" || value === "artifact-manifest" || value === "artifact-manifest.json");
|
|
3642
|
+
}
|
|
3602
3643
|
function profileArtifactKeyPresent(key, artifacts) {
|
|
3603
3644
|
if (key.startsWith("screenshot:")) {
|
|
3604
3645
|
const label = key.slice("screenshot:".length);
|
|
@@ -3690,19 +3731,32 @@ function profileStatusExitCode(profile, status) {
|
|
|
3690
3731
|
if (status === "passed") return 0;
|
|
3691
3732
|
return profile.failure_policy[status] === "neutral" ? 0 : 1;
|
|
3692
3733
|
}
|
|
3693
|
-
function createRiddleProofProfileConfigurationError(
|
|
3734
|
+
function createRiddleProofProfileConfigurationError(profileOrName, error, runner = "riddle", options = {}) {
|
|
3735
|
+
const profile = typeof profileOrName === "string" ? void 0 : profileOrName;
|
|
3736
|
+
const name = profile ? profile.name : String(profileOrName);
|
|
3694
3737
|
const message = error instanceof Error ? error.message : String(error);
|
|
3738
|
+
let requested = "";
|
|
3739
|
+
if (profile) {
|
|
3740
|
+
try {
|
|
3741
|
+
requested = resolveRiddleProofProfileTargetUrl(profile);
|
|
3742
|
+
} catch {
|
|
3743
|
+
requested = "";
|
|
3744
|
+
}
|
|
3745
|
+
}
|
|
3695
3746
|
return {
|
|
3696
3747
|
version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
|
|
3697
3748
|
profile_name: name,
|
|
3698
3749
|
runner,
|
|
3699
3750
|
status: "configuration_error",
|
|
3700
|
-
baseline_policy: "invariant_only",
|
|
3701
|
-
route: { requested
|
|
3751
|
+
baseline_policy: profile?.baseline_policy || "invariant_only",
|
|
3752
|
+
route: { requested, observed: "", matched: false, error: message },
|
|
3702
3753
|
artifacts: { screenshots: [], proof_json: "proof.json" },
|
|
3703
3754
|
checks: [],
|
|
3704
3755
|
summary: `${name} has a profile configuration error.`,
|
|
3705
3756
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3757
|
+
metadata: profile?.metadata,
|
|
3758
|
+
warnings: options.warnings?.length ? options.warnings : void 0,
|
|
3759
|
+
configuration_blocker: options.configurationBlocker,
|
|
3706
3760
|
error: message
|
|
3707
3761
|
};
|
|
3708
3762
|
}
|
|
@@ -9598,6 +9652,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
9598
9652
|
}
|
|
9599
9653
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9600
9654
|
0 && (module.exports = {
|
|
9655
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
9601
9656
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
9602
9657
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
9603
9658
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -9618,6 +9673,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
9618
9673
|
extractRiddleProofProfileResult,
|
|
9619
9674
|
normalizeRiddleProofProfile,
|
|
9620
9675
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
9676
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
9621
9677
|
profileStatusExitCode,
|
|
9622
9678
|
resolveRiddleProofProfileRouteUrl,
|
|
9623
9679
|
resolveRiddleProofProfileTargetUrl,
|
package/dist/profile.d.cts
CHANGED
|
@@ -431,6 +431,7 @@ interface RiddleProofProfileResult {
|
|
|
431
431
|
}>;
|
|
432
432
|
};
|
|
433
433
|
environment_blocker?: Record<string, JsonValue>;
|
|
434
|
+
configuration_blocker?: Record<string, JsonValue>;
|
|
434
435
|
error?: string;
|
|
435
436
|
}
|
|
436
437
|
interface RiddleProofProfileArtifactRef {
|
|
@@ -459,6 +460,16 @@ interface RiddleProofProfileArtifactCompleteness {
|
|
|
459
460
|
observed: string[];
|
|
460
461
|
missing: string[];
|
|
461
462
|
}
|
|
463
|
+
declare const RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: readonly ["screenshot", "console", "dom_summary", "proof_json"];
|
|
464
|
+
interface RiddleProofProfileRunnerArtifactPreflight {
|
|
465
|
+
ok: boolean;
|
|
466
|
+
runner: RiddleProofProfileRunner;
|
|
467
|
+
requested: string[];
|
|
468
|
+
local_only: string[];
|
|
469
|
+
hosted_artifacts: string[];
|
|
470
|
+
message?: string;
|
|
471
|
+
}
|
|
472
|
+
declare function preflightRiddleProofProfileRunnerArtifacts(profile: RiddleProofProfile, runner: RiddleProofProfileRunner): RiddleProofProfileRunnerArtifactPreflight;
|
|
462
473
|
declare function assessRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[]): RiddleProofProfileArtifactCompleteness;
|
|
463
474
|
declare function applyRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[] | undefined): RiddleProofProfileResult;
|
|
464
475
|
declare function assessRiddleProofProfileEvidence(profile: RiddleProofProfile, evidence: RiddleProofProfileEvidence | undefined, options?: {
|
|
@@ -473,7 +484,10 @@ declare function summarizeRiddleProofProfileResult(input: {
|
|
|
473
484
|
viewports: RiddleProofProfileViewportEvidence[];
|
|
474
485
|
}): string;
|
|
475
486
|
declare function profileStatusExitCode(profile: RiddleProofProfile, status: RiddleProofProfileStatus): 0 | 1;
|
|
476
|
-
declare function createRiddleProofProfileConfigurationError(
|
|
487
|
+
declare function createRiddleProofProfileConfigurationError(profileOrName: RiddleProofProfile | string, error: unknown, runner?: RiddleProofProfileRunner, options?: {
|
|
488
|
+
warnings?: string[];
|
|
489
|
+
configurationBlocker?: Record<string, JsonValue>;
|
|
490
|
+
}): RiddleProofProfileResult;
|
|
477
491
|
declare function createRiddleProofProfileEnvironmentBlockedResult(input: {
|
|
478
492
|
profile: RiddleProofProfile;
|
|
479
493
|
runner?: RiddleProofProfileRunner;
|
|
@@ -493,4 +507,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
|
|
|
493
507
|
declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
|
|
494
508
|
declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
|
|
495
509
|
|
|
496
|
-
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 };
|
|
510
|
+
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, 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 RiddleProofProfileRunnerArtifactPreflight, 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, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
package/dist/profile.d.ts
CHANGED
|
@@ -431,6 +431,7 @@ interface RiddleProofProfileResult {
|
|
|
431
431
|
}>;
|
|
432
432
|
};
|
|
433
433
|
environment_blocker?: Record<string, JsonValue>;
|
|
434
|
+
configuration_blocker?: Record<string, JsonValue>;
|
|
434
435
|
error?: string;
|
|
435
436
|
}
|
|
436
437
|
interface RiddleProofProfileArtifactRef {
|
|
@@ -459,6 +460,16 @@ interface RiddleProofProfileArtifactCompleteness {
|
|
|
459
460
|
observed: string[];
|
|
460
461
|
missing: string[];
|
|
461
462
|
}
|
|
463
|
+
declare const RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: readonly ["screenshot", "console", "dom_summary", "proof_json"];
|
|
464
|
+
interface RiddleProofProfileRunnerArtifactPreflight {
|
|
465
|
+
ok: boolean;
|
|
466
|
+
runner: RiddleProofProfileRunner;
|
|
467
|
+
requested: string[];
|
|
468
|
+
local_only: string[];
|
|
469
|
+
hosted_artifacts: string[];
|
|
470
|
+
message?: string;
|
|
471
|
+
}
|
|
472
|
+
declare function preflightRiddleProofProfileRunnerArtifacts(profile: RiddleProofProfile, runner: RiddleProofProfileRunner): RiddleProofProfileRunnerArtifactPreflight;
|
|
462
473
|
declare function assessRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[]): RiddleProofProfileArtifactCompleteness;
|
|
463
474
|
declare function applyRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[] | undefined): RiddleProofProfileResult;
|
|
464
475
|
declare function assessRiddleProofProfileEvidence(profile: RiddleProofProfile, evidence: RiddleProofProfileEvidence | undefined, options?: {
|
|
@@ -473,7 +484,10 @@ declare function summarizeRiddleProofProfileResult(input: {
|
|
|
473
484
|
viewports: RiddleProofProfileViewportEvidence[];
|
|
474
485
|
}): string;
|
|
475
486
|
declare function profileStatusExitCode(profile: RiddleProofProfile, status: RiddleProofProfileStatus): 0 | 1;
|
|
476
|
-
declare function createRiddleProofProfileConfigurationError(
|
|
487
|
+
declare function createRiddleProofProfileConfigurationError(profileOrName: RiddleProofProfile | string, error: unknown, runner?: RiddleProofProfileRunner, options?: {
|
|
488
|
+
warnings?: string[];
|
|
489
|
+
configurationBlocker?: Record<string, JsonValue>;
|
|
490
|
+
}): RiddleProofProfileResult;
|
|
477
491
|
declare function createRiddleProofProfileEnvironmentBlockedResult(input: {
|
|
478
492
|
profile: RiddleProofProfile;
|
|
479
493
|
runner?: RiddleProofProfileRunner;
|
|
@@ -493,4 +507,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
|
|
|
493
507
|
declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
|
|
494
508
|
declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
|
|
495
509
|
|
|
496
|
-
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 };
|
|
510
|
+
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, 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 RiddleProofProfileRunnerArtifactPreflight, 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, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|