@riddledc/riddle-proof 0.7.120 → 0.7.121
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 +18 -0
- package/dist/{chunk-DVMBXDIF.js → chunk-TBEVHMU3.js} +31 -0
- package/dist/cli.cjs +68 -0
- package/dist/cli.js +40 -1
- package/dist/index.cjs +32 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/profile.cjs +32 -0
- package/dist/profile.d.cts +16 -1
- package/dist/profile.d.ts +16 -1
- package/dist/profile.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -198,6 +198,24 @@ generic inline-script warning threshold. Use `--strict=true` when you
|
|
|
198
198
|
deliberately want Riddle's non-critical script-safety warnings to block the run.
|
|
199
199
|
Critical script-safety violations remain blocked by Riddle either way.
|
|
200
200
|
|
|
201
|
+
When promoting proof artifacts into a durable public profile, avoid guessing
|
|
202
|
+
which backend or runner tokens are preserved inside `proof.json`. Derive the
|
|
203
|
+
`body_contains` fragments from the artifact body first:
|
|
204
|
+
|
|
205
|
+
```sh
|
|
206
|
+
riddle-proof-loop profile-body-assertions \
|
|
207
|
+
--artifact artifacts/job_abc123/proof.json.json \
|
|
208
|
+
--candidates-json '["product_regression","completed_timeout","Timed Out","partial results available"]' \
|
|
209
|
+
--required-json '["product_regression"]' \
|
|
210
|
+
--format body-contains
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The command prints only snippets that are actually present in the artifact.
|
|
214
|
+
Missing optional candidates are reported in JSON mode as warnings, while missing
|
|
215
|
+
required snippets make the command exit non-zero. This keeps Good Catch and
|
|
216
|
+
audit-profile promotions tied to real artifacts instead of hand-authored token
|
|
217
|
+
guesses.
|
|
218
|
+
|
|
201
219
|
The package includes generic starter profiles:
|
|
202
220
|
|
|
203
221
|
- `examples/profiles/page-content-basic.json` for route/content/layout smoke profiles.
|
|
@@ -79,6 +79,36 @@ var RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES = [
|
|
|
79
79
|
"timedout",
|
|
80
80
|
"failed"
|
|
81
81
|
];
|
|
82
|
+
function uniqueNonEmptyStrings(values) {
|
|
83
|
+
const seen = /* @__PURE__ */ new Set();
|
|
84
|
+
const result = [];
|
|
85
|
+
for (const value of values ?? []) {
|
|
86
|
+
const normalized = typeof value === "string" ? value.trim() : "";
|
|
87
|
+
if (!normalized || seen.has(normalized)) continue;
|
|
88
|
+
seen.add(normalized);
|
|
89
|
+
result.push(normalized);
|
|
90
|
+
}
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
function deriveRiddleProofArtifactBodyAssertions(input) {
|
|
94
|
+
const artifactText = typeof input.artifact_text === "string" ? input.artifact_text : "";
|
|
95
|
+
const candidates = uniqueNonEmptyStrings(input.candidates);
|
|
96
|
+
const required = uniqueNonEmptyStrings(input.required);
|
|
97
|
+
const mergedCandidates = uniqueNonEmptyStrings([...required, ...candidates]);
|
|
98
|
+
const presentCandidates = mergedCandidates.filter((snippet) => artifactText.includes(snippet));
|
|
99
|
+
const missingCandidates = mergedCandidates.filter((snippet) => !artifactText.includes(snippet));
|
|
100
|
+
const missingRequired = required.filter((snippet) => !artifactText.includes(snippet));
|
|
101
|
+
const warnings = missingCandidates.map((snippet) => `candidate snippet is not present in artifact body: ${snippet}`);
|
|
102
|
+
return {
|
|
103
|
+
version: "riddle-proof.artifact-body-assertions.v1",
|
|
104
|
+
ok: missingRequired.length === 0,
|
|
105
|
+
body_contains: presentCandidates,
|
|
106
|
+
present_candidates: presentCandidates,
|
|
107
|
+
missing_candidates: missingCandidates,
|
|
108
|
+
missing_required: missingRequired,
|
|
109
|
+
warnings
|
|
110
|
+
};
|
|
111
|
+
}
|
|
82
112
|
var DEFAULT_VIEWPORTS = [
|
|
83
113
|
{ name: "desktop", width: 1280, height: 800 }
|
|
84
114
|
];
|
|
@@ -5884,6 +5914,7 @@ export {
|
|
|
5884
5914
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
5885
5915
|
RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES,
|
|
5886
5916
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
5917
|
+
deriveRiddleProofArtifactBodyAssertions,
|
|
5887
5918
|
slugifyRiddleProofProfileName,
|
|
5888
5919
|
collectRiddleProofProfileWarnings,
|
|
5889
5920
|
normalizeRiddleProofProfile,
|
package/dist/cli.cjs
CHANGED
|
@@ -7016,6 +7016,36 @@ var RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES = [
|
|
|
7016
7016
|
"timedout",
|
|
7017
7017
|
"failed"
|
|
7018
7018
|
];
|
|
7019
|
+
function uniqueNonEmptyStrings(values) {
|
|
7020
|
+
const seen = /* @__PURE__ */ new Set();
|
|
7021
|
+
const result = [];
|
|
7022
|
+
for (const value of values ?? []) {
|
|
7023
|
+
const normalized = typeof value === "string" ? value.trim() : "";
|
|
7024
|
+
if (!normalized || seen.has(normalized)) continue;
|
|
7025
|
+
seen.add(normalized);
|
|
7026
|
+
result.push(normalized);
|
|
7027
|
+
}
|
|
7028
|
+
return result;
|
|
7029
|
+
}
|
|
7030
|
+
function deriveRiddleProofArtifactBodyAssertions(input) {
|
|
7031
|
+
const artifactText = typeof input.artifact_text === "string" ? input.artifact_text : "";
|
|
7032
|
+
const candidates = uniqueNonEmptyStrings(input.candidates);
|
|
7033
|
+
const required = uniqueNonEmptyStrings(input.required);
|
|
7034
|
+
const mergedCandidates = uniqueNonEmptyStrings([...required, ...candidates]);
|
|
7035
|
+
const presentCandidates = mergedCandidates.filter((snippet) => artifactText.includes(snippet));
|
|
7036
|
+
const missingCandidates = mergedCandidates.filter((snippet) => !artifactText.includes(snippet));
|
|
7037
|
+
const missingRequired = required.filter((snippet) => !artifactText.includes(snippet));
|
|
7038
|
+
const warnings = missingCandidates.map((snippet) => `candidate snippet is not present in artifact body: ${snippet}`);
|
|
7039
|
+
return {
|
|
7040
|
+
version: "riddle-proof.artifact-body-assertions.v1",
|
|
7041
|
+
ok: missingRequired.length === 0,
|
|
7042
|
+
body_contains: presentCandidates,
|
|
7043
|
+
present_candidates: presentCandidates,
|
|
7044
|
+
missing_candidates: missingCandidates,
|
|
7045
|
+
missing_required: missingRequired,
|
|
7046
|
+
warnings
|
|
7047
|
+
};
|
|
7048
|
+
}
|
|
7019
7049
|
var DEFAULT_VIEWPORTS = [
|
|
7020
7050
|
{ name: "desktop", width: 1280, height: 800 }
|
|
7021
7051
|
];
|
|
@@ -12807,6 +12837,7 @@ function usage() {
|
|
|
12807
12837
|
" riddle-proof-loop respond --state-path <path> --decision <decision> --summary <text> [--payload-json <file|json|->]",
|
|
12808
12838
|
" riddle-proof-loop status --state-path <path>",
|
|
12809
12839
|
" riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false; default false] [--poll-attempts n] [--output <dir>|--output-dir <dir>] [--quiet]",
|
|
12840
|
+
" riddle-proof-loop profile-body-assertions --artifact <file|url|-> --candidates-json <file|json|-> [--required-json <file|json|->] [--format json|body-contains]",
|
|
12810
12841
|
" riddle-proof-loop riddle-preview-deploy <build-dir> <label> [--framework spa|static]",
|
|
12811
12842
|
" riddle-proof-loop riddle-server-preview <directory> --script-file <file> [--path /route] [--wait-for-selector selector]",
|
|
12812
12843
|
" riddle-proof-loop riddle-run-script --url <url> --script-file <file> [--viewport 1280x720] [--strict true|false]",
|
|
@@ -12879,6 +12910,18 @@ function previewFrameworkOption(options) {
|
|
|
12879
12910
|
function readStdin() {
|
|
12880
12911
|
return (0, import_node_fs6.readFileSync)(0, "utf-8");
|
|
12881
12912
|
}
|
|
12913
|
+
async function readTextValue(value, label) {
|
|
12914
|
+
if (!value) throw new Error(`${label} is required.`);
|
|
12915
|
+
if (value === "-") return readStdin();
|
|
12916
|
+
if (/^https?:\/\//i.test(value)) {
|
|
12917
|
+
const response = await fetch(value);
|
|
12918
|
+
const text = await response.text();
|
|
12919
|
+
if (!response.ok) throw new Error(`${label} URL failed HTTP ${response.status}: ${text.slice(0, 500)}`);
|
|
12920
|
+
return text;
|
|
12921
|
+
}
|
|
12922
|
+
if ((0, import_node_fs6.existsSync)(value)) return (0, import_node_fs6.readFileSync)(value, "utf-8");
|
|
12923
|
+
throw new Error(`${label} must be a readable file path, URL, or -.`);
|
|
12924
|
+
}
|
|
12882
12925
|
function formatPollDuration(ms) {
|
|
12883
12926
|
if (typeof ms !== "number" || !Number.isFinite(ms)) return "n/a";
|
|
12884
12927
|
const seconds = Math.max(0, Math.round(ms / 1e3));
|
|
@@ -13648,6 +13691,31 @@ async function main() {
|
|
|
13648
13691
|
process.exitCode = profileStatusExitCode(profile, result.status);
|
|
13649
13692
|
return;
|
|
13650
13693
|
}
|
|
13694
|
+
if (command === "profile-body-assertions") {
|
|
13695
|
+
const artifactText = await readTextValue(optionString(options, "artifact") ?? optionString(options, "input"), "--artifact");
|
|
13696
|
+
const candidates = readOptionalJsonStringArray(optionString(options, "candidatesJson") ?? optionString(options, "candidateJson"), "--candidates-json") ?? [];
|
|
13697
|
+
const required = readOptionalJsonStringArray(optionString(options, "requiredJson"), "--required-json");
|
|
13698
|
+
if (!candidates.length && !required?.length) {
|
|
13699
|
+
throw new Error("--candidates-json or --required-json must provide at least one snippet.");
|
|
13700
|
+
}
|
|
13701
|
+
const result = deriveRiddleProofArtifactBodyAssertions({
|
|
13702
|
+
artifact_text: artifactText,
|
|
13703
|
+
candidates,
|
|
13704
|
+
required
|
|
13705
|
+
});
|
|
13706
|
+
const format = optionString(options, "format") || "json";
|
|
13707
|
+
if (format === "body-contains") {
|
|
13708
|
+
process.stdout.write(`${JSON.stringify(result.body_contains, null, 2)}
|
|
13709
|
+
`);
|
|
13710
|
+
} else if (format === "json") {
|
|
13711
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}
|
|
13712
|
+
`);
|
|
13713
|
+
} else {
|
|
13714
|
+
throw new Error("--format must be json or body-contains.");
|
|
13715
|
+
}
|
|
13716
|
+
process.exitCode = result.ok ? 0 : 1;
|
|
13717
|
+
return;
|
|
13718
|
+
}
|
|
13651
13719
|
if (command === "riddle-preview-deploy") {
|
|
13652
13720
|
const buildDir = positional[1];
|
|
13653
13721
|
const label = positional[2];
|
package/dist/cli.js
CHANGED
|
@@ -5,12 +5,13 @@ import {
|
|
|
5
5
|
collectRiddleProfileArtifactRefs,
|
|
6
6
|
createRiddleProofProfileEnvironmentBlockedResult,
|
|
7
7
|
createRiddleProofProfileInsufficientResult,
|
|
8
|
+
deriveRiddleProofArtifactBodyAssertions,
|
|
8
9
|
extractRiddleProofProfileResult,
|
|
9
10
|
normalizeRiddleProofProfile,
|
|
10
11
|
profileStatusExitCode,
|
|
11
12
|
resolveRiddleProofProfileTargetUrl,
|
|
12
13
|
resolveRiddleProofProfileTimeoutSec
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TBEVHMU3.js";
|
|
14
15
|
import {
|
|
15
16
|
createRiddleApiClient,
|
|
16
17
|
parseRiddleViewport
|
|
@@ -45,6 +46,7 @@ function usage() {
|
|
|
45
46
|
" riddle-proof-loop respond --state-path <path> --decision <decision> --summary <text> [--payload-json <file|json|->]",
|
|
46
47
|
" riddle-proof-loop status --state-path <path>",
|
|
47
48
|
" riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false; default false] [--poll-attempts n] [--output <dir>|--output-dir <dir>] [--quiet]",
|
|
49
|
+
" riddle-proof-loop profile-body-assertions --artifact <file|url|-> --candidates-json <file|json|-> [--required-json <file|json|->] [--format json|body-contains]",
|
|
48
50
|
" riddle-proof-loop riddle-preview-deploy <build-dir> <label> [--framework spa|static]",
|
|
49
51
|
" riddle-proof-loop riddle-server-preview <directory> --script-file <file> [--path /route] [--wait-for-selector selector]",
|
|
50
52
|
" riddle-proof-loop riddle-run-script --url <url> --script-file <file> [--viewport 1280x720] [--strict true|false]",
|
|
@@ -117,6 +119,18 @@ function previewFrameworkOption(options) {
|
|
|
117
119
|
function readStdin() {
|
|
118
120
|
return readFileSync(0, "utf-8");
|
|
119
121
|
}
|
|
122
|
+
async function readTextValue(value, label) {
|
|
123
|
+
if (!value) throw new Error(`${label} is required.`);
|
|
124
|
+
if (value === "-") return readStdin();
|
|
125
|
+
if (/^https?:\/\//i.test(value)) {
|
|
126
|
+
const response = await fetch(value);
|
|
127
|
+
const text = await response.text();
|
|
128
|
+
if (!response.ok) throw new Error(`${label} URL failed HTTP ${response.status}: ${text.slice(0, 500)}`);
|
|
129
|
+
return text;
|
|
130
|
+
}
|
|
131
|
+
if (existsSync(value)) return readFileSync(value, "utf-8");
|
|
132
|
+
throw new Error(`${label} must be a readable file path, URL, or -.`);
|
|
133
|
+
}
|
|
120
134
|
function formatPollDuration(ms) {
|
|
121
135
|
if (typeof ms !== "number" || !Number.isFinite(ms)) return "n/a";
|
|
122
136
|
const seconds = Math.max(0, Math.round(ms / 1e3));
|
|
@@ -886,6 +900,31 @@ async function main() {
|
|
|
886
900
|
process.exitCode = profileStatusExitCode(profile, result.status);
|
|
887
901
|
return;
|
|
888
902
|
}
|
|
903
|
+
if (command === "profile-body-assertions") {
|
|
904
|
+
const artifactText = await readTextValue(optionString(options, "artifact") ?? optionString(options, "input"), "--artifact");
|
|
905
|
+
const candidates = readOptionalJsonStringArray(optionString(options, "candidatesJson") ?? optionString(options, "candidateJson"), "--candidates-json") ?? [];
|
|
906
|
+
const required = readOptionalJsonStringArray(optionString(options, "requiredJson"), "--required-json");
|
|
907
|
+
if (!candidates.length && !required?.length) {
|
|
908
|
+
throw new Error("--candidates-json or --required-json must provide at least one snippet.");
|
|
909
|
+
}
|
|
910
|
+
const result = deriveRiddleProofArtifactBodyAssertions({
|
|
911
|
+
artifact_text: artifactText,
|
|
912
|
+
candidates,
|
|
913
|
+
required
|
|
914
|
+
});
|
|
915
|
+
const format = optionString(options, "format") || "json";
|
|
916
|
+
if (format === "body-contains") {
|
|
917
|
+
process.stdout.write(`${JSON.stringify(result.body_contains, null, 2)}
|
|
918
|
+
`);
|
|
919
|
+
} else if (format === "json") {
|
|
920
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}
|
|
921
|
+
`);
|
|
922
|
+
} else {
|
|
923
|
+
throw new Error("--format must be json or body-contains.");
|
|
924
|
+
}
|
|
925
|
+
process.exitCode = result.ok ? 0 : 1;
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
889
928
|
if (command === "riddle-preview-deploy") {
|
|
890
929
|
const buildDir = positional[1];
|
|
891
930
|
const label = positional[2];
|
package/dist/index.cjs
CHANGED
|
@@ -2972,6 +2972,7 @@ __export(index_exports, {
|
|
|
2972
2972
|
createRunStatusSnapshot: () => createRunStatusSnapshot,
|
|
2973
2973
|
deployRiddlePreview: () => deployRiddlePreview,
|
|
2974
2974
|
deployRiddleStaticPreview: () => deployRiddleStaticPreview,
|
|
2975
|
+
deriveRiddleProofArtifactBodyAssertions: () => deriveRiddleProofArtifactBodyAssertions,
|
|
2975
2976
|
extractBasicGameplayEvidence: () => extractBasicGameplayEvidence,
|
|
2976
2977
|
extractPlayabilityEvidence: () => extractPlayabilityEvidence,
|
|
2977
2978
|
extractRiddleProofProfileResult: () => extractRiddleProofProfileResult,
|
|
@@ -8810,6 +8811,36 @@ var RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES = [
|
|
|
8810
8811
|
"timedout",
|
|
8811
8812
|
"failed"
|
|
8812
8813
|
];
|
|
8814
|
+
function uniqueNonEmptyStrings(values) {
|
|
8815
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8816
|
+
const result = [];
|
|
8817
|
+
for (const value of values ?? []) {
|
|
8818
|
+
const normalized = typeof value === "string" ? value.trim() : "";
|
|
8819
|
+
if (!normalized || seen.has(normalized)) continue;
|
|
8820
|
+
seen.add(normalized);
|
|
8821
|
+
result.push(normalized);
|
|
8822
|
+
}
|
|
8823
|
+
return result;
|
|
8824
|
+
}
|
|
8825
|
+
function deriveRiddleProofArtifactBodyAssertions(input) {
|
|
8826
|
+
const artifactText = typeof input.artifact_text === "string" ? input.artifact_text : "";
|
|
8827
|
+
const candidates = uniqueNonEmptyStrings(input.candidates);
|
|
8828
|
+
const required = uniqueNonEmptyStrings(input.required);
|
|
8829
|
+
const mergedCandidates = uniqueNonEmptyStrings([...required, ...candidates]);
|
|
8830
|
+
const presentCandidates = mergedCandidates.filter((snippet) => artifactText.includes(snippet));
|
|
8831
|
+
const missingCandidates = mergedCandidates.filter((snippet) => !artifactText.includes(snippet));
|
|
8832
|
+
const missingRequired = required.filter((snippet) => !artifactText.includes(snippet));
|
|
8833
|
+
const warnings = missingCandidates.map((snippet) => `candidate snippet is not present in artifact body: ${snippet}`);
|
|
8834
|
+
return {
|
|
8835
|
+
version: "riddle-proof.artifact-body-assertions.v1",
|
|
8836
|
+
ok: missingRequired.length === 0,
|
|
8837
|
+
body_contains: presentCandidates,
|
|
8838
|
+
present_candidates: presentCandidates,
|
|
8839
|
+
missing_candidates: missingCandidates,
|
|
8840
|
+
missing_required: missingRequired,
|
|
8841
|
+
warnings
|
|
8842
|
+
};
|
|
8843
|
+
}
|
|
8813
8844
|
var DEFAULT_VIEWPORTS = [
|
|
8814
8845
|
{ name: "desktop", width: 1280, height: 800 }
|
|
8815
8846
|
];
|
|
@@ -15058,6 +15089,7 @@ function createRiddleApiClient(config = {}) {
|
|
|
15058
15089
|
createRunStatusSnapshot,
|
|
15059
15090
|
deployRiddlePreview,
|
|
15060
15091
|
deployRiddleStaticPreview,
|
|
15092
|
+
deriveRiddleProofArtifactBodyAssertions,
|
|
15061
15093
|
extractBasicGameplayEvidence,
|
|
15062
15094
|
extractPlayabilityEvidence,
|
|
15063
15095
|
extractRiddleProofProfileResult,
|
package/dist/index.d.cts
CHANGED
|
@@ -10,5 +10,5 @@ export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_D
|
|
|
10
10
|
export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.cjs';
|
|
11
11
|
export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.cjs';
|
|
12
12
|
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';
|
|
13
|
-
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, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
|
|
13
|
+
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, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
|
|
14
14
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RiddleApiError, RiddleClientConfig, RiddleFetch, RiddlePollJobOptions, RiddlePollJobResult, RiddlePollProgressSnapshot, RiddlePollSummary, RiddlePreviewDeployResult, RiddlePreviewFramework, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, createRiddleApiClient, deployRiddlePreview, deployRiddleStaticPreview, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, riddleRequestJson, runRiddleScript, runRiddleServerPreview } from './riddle-client.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_D
|
|
|
10
10
|
export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.js';
|
|
11
11
|
export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.js';
|
|
12
12
|
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';
|
|
13
|
-
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, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
|
|
13
|
+
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, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
|
|
14
14
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RiddleApiError, RiddleClientConfig, RiddleFetch, RiddlePollJobOptions, RiddlePollJobResult, RiddlePollProgressSnapshot, RiddlePollSummary, RiddlePreviewDeployResult, RiddlePreviewFramework, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, createRiddleApiClient, deployRiddlePreview, deployRiddleStaticPreview, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, riddleRequestJson, runRiddleScript, runRiddleServerPreview } from './riddle-client.js';
|
package/dist/index.js
CHANGED
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
createRiddleProofProfileConfigurationError,
|
|
53
53
|
createRiddleProofProfileEnvironmentBlockedResult,
|
|
54
54
|
createRiddleProofProfileInsufficientResult,
|
|
55
|
+
deriveRiddleProofArtifactBodyAssertions,
|
|
55
56
|
extractRiddleProofProfileResult,
|
|
56
57
|
normalizeRiddleProofProfile,
|
|
57
58
|
profileStatusExitCode,
|
|
@@ -60,7 +61,7 @@ import {
|
|
|
60
61
|
resolveRiddleProofProfileTimeoutSec,
|
|
61
62
|
slugifyRiddleProofProfileName,
|
|
62
63
|
summarizeRiddleProofProfileResult
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-TBEVHMU3.js";
|
|
64
65
|
import {
|
|
65
66
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
66
67
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
|
@@ -214,6 +215,7 @@ export {
|
|
|
214
215
|
createRunStatusSnapshot,
|
|
215
216
|
deployRiddlePreview,
|
|
216
217
|
deployRiddleStaticPreview,
|
|
218
|
+
deriveRiddleProofArtifactBodyAssertions,
|
|
217
219
|
extractBasicGameplayEvidence,
|
|
218
220
|
extractPlayabilityEvidence,
|
|
219
221
|
extractRiddleProofProfileResult,
|
package/dist/profile.cjs
CHANGED
|
@@ -34,6 +34,7 @@ __export(profile_exports, {
|
|
|
34
34
|
createRiddleProofProfileConfigurationError: () => createRiddleProofProfileConfigurationError,
|
|
35
35
|
createRiddleProofProfileEnvironmentBlockedResult: () => createRiddleProofProfileEnvironmentBlockedResult,
|
|
36
36
|
createRiddleProofProfileInsufficientResult: () => createRiddleProofProfileInsufficientResult,
|
|
37
|
+
deriveRiddleProofArtifactBodyAssertions: () => deriveRiddleProofArtifactBodyAssertions,
|
|
37
38
|
extractRiddleProofProfileResult: () => extractRiddleProofProfileResult,
|
|
38
39
|
normalizeRiddleProofProfile: () => normalizeRiddleProofProfile,
|
|
39
40
|
profileStatusExitCode: () => profileStatusExitCode,
|
|
@@ -124,6 +125,36 @@ var RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES = [
|
|
|
124
125
|
"timedout",
|
|
125
126
|
"failed"
|
|
126
127
|
];
|
|
128
|
+
function uniqueNonEmptyStrings(values) {
|
|
129
|
+
const seen = /* @__PURE__ */ new Set();
|
|
130
|
+
const result = [];
|
|
131
|
+
for (const value of values ?? []) {
|
|
132
|
+
const normalized = typeof value === "string" ? value.trim() : "";
|
|
133
|
+
if (!normalized || seen.has(normalized)) continue;
|
|
134
|
+
seen.add(normalized);
|
|
135
|
+
result.push(normalized);
|
|
136
|
+
}
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
function deriveRiddleProofArtifactBodyAssertions(input) {
|
|
140
|
+
const artifactText = typeof input.artifact_text === "string" ? input.artifact_text : "";
|
|
141
|
+
const candidates = uniqueNonEmptyStrings(input.candidates);
|
|
142
|
+
const required = uniqueNonEmptyStrings(input.required);
|
|
143
|
+
const mergedCandidates = uniqueNonEmptyStrings([...required, ...candidates]);
|
|
144
|
+
const presentCandidates = mergedCandidates.filter((snippet) => artifactText.includes(snippet));
|
|
145
|
+
const missingCandidates = mergedCandidates.filter((snippet) => !artifactText.includes(snippet));
|
|
146
|
+
const missingRequired = required.filter((snippet) => !artifactText.includes(snippet));
|
|
147
|
+
const warnings = missingCandidates.map((snippet) => `candidate snippet is not present in artifact body: ${snippet}`);
|
|
148
|
+
return {
|
|
149
|
+
version: "riddle-proof.artifact-body-assertions.v1",
|
|
150
|
+
ok: missingRequired.length === 0,
|
|
151
|
+
body_contains: presentCandidates,
|
|
152
|
+
present_candidates: presentCandidates,
|
|
153
|
+
missing_candidates: missingCandidates,
|
|
154
|
+
missing_required: missingRequired,
|
|
155
|
+
warnings
|
|
156
|
+
};
|
|
157
|
+
}
|
|
127
158
|
var DEFAULT_VIEWPORTS = [
|
|
128
159
|
{ name: "desktop", width: 1280, height: 800 }
|
|
129
160
|
];
|
|
@@ -5936,6 +5967,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
5936
5967
|
createRiddleProofProfileConfigurationError,
|
|
5937
5968
|
createRiddleProofProfileEnvironmentBlockedResult,
|
|
5938
5969
|
createRiddleProofProfileInsufficientResult,
|
|
5970
|
+
deriveRiddleProofArtifactBodyAssertions,
|
|
5939
5971
|
extractRiddleProofProfileResult,
|
|
5940
5972
|
normalizeRiddleProofProfile,
|
|
5941
5973
|
profileStatusExitCode,
|
package/dist/profile.d.cts
CHANGED
|
@@ -14,6 +14,21 @@ type RiddleProofProfileNetworkAbortErrorCode = typeof RIDDLE_PROOF_PROFILE_NETWO
|
|
|
14
14
|
type RiddleProofProfileRunner = "riddle" | "local-playwright" | "browserless" | "github-actions" | (string & {});
|
|
15
15
|
type RiddleProofProfileFailureAction = "fail" | "neutral" | "review";
|
|
16
16
|
type RiddleProofProfileBaselinePolicy = "invariant_only" | "production_comparison" | "last_accepted_artifact" | "golden_reference_artifact" | (string & {});
|
|
17
|
+
interface RiddleProofArtifactBodyAssertionInput {
|
|
18
|
+
artifact_text: string;
|
|
19
|
+
candidates: string[];
|
|
20
|
+
required?: string[];
|
|
21
|
+
}
|
|
22
|
+
interface RiddleProofArtifactBodyAssertionResult {
|
|
23
|
+
version: "riddle-proof.artifact-body-assertions.v1";
|
|
24
|
+
ok: boolean;
|
|
25
|
+
body_contains: string[];
|
|
26
|
+
present_candidates: string[];
|
|
27
|
+
missing_candidates: string[];
|
|
28
|
+
missing_required: string[];
|
|
29
|
+
warnings: string[];
|
|
30
|
+
}
|
|
31
|
+
declare function deriveRiddleProofArtifactBodyAssertions(input: RiddleProofArtifactBodyAssertionInput): RiddleProofArtifactBodyAssertionResult;
|
|
17
32
|
interface RiddleProofProfileViewport {
|
|
18
33
|
name: string;
|
|
19
34
|
width: number;
|
|
@@ -330,4 +345,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
|
|
|
330
345
|
declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
|
|
331
346
|
declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
|
|
332
347
|
|
|
333
|
-
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 RiddleProofProfile, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, 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, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
|
348
|
+
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 RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, 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, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
package/dist/profile.d.ts
CHANGED
|
@@ -14,6 +14,21 @@ type RiddleProofProfileNetworkAbortErrorCode = typeof RIDDLE_PROOF_PROFILE_NETWO
|
|
|
14
14
|
type RiddleProofProfileRunner = "riddle" | "local-playwright" | "browserless" | "github-actions" | (string & {});
|
|
15
15
|
type RiddleProofProfileFailureAction = "fail" | "neutral" | "review";
|
|
16
16
|
type RiddleProofProfileBaselinePolicy = "invariant_only" | "production_comparison" | "last_accepted_artifact" | "golden_reference_artifact" | (string & {});
|
|
17
|
+
interface RiddleProofArtifactBodyAssertionInput {
|
|
18
|
+
artifact_text: string;
|
|
19
|
+
candidates: string[];
|
|
20
|
+
required?: string[];
|
|
21
|
+
}
|
|
22
|
+
interface RiddleProofArtifactBodyAssertionResult {
|
|
23
|
+
version: "riddle-proof.artifact-body-assertions.v1";
|
|
24
|
+
ok: boolean;
|
|
25
|
+
body_contains: string[];
|
|
26
|
+
present_candidates: string[];
|
|
27
|
+
missing_candidates: string[];
|
|
28
|
+
missing_required: string[];
|
|
29
|
+
warnings: string[];
|
|
30
|
+
}
|
|
31
|
+
declare function deriveRiddleProofArtifactBodyAssertions(input: RiddleProofArtifactBodyAssertionInput): RiddleProofArtifactBodyAssertionResult;
|
|
17
32
|
interface RiddleProofProfileViewport {
|
|
18
33
|
name: string;
|
|
19
34
|
width: number;
|
|
@@ -330,4 +345,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
|
|
|
330
345
|
declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
|
|
331
346
|
declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
|
|
332
347
|
|
|
333
|
-
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 RiddleProofProfile, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, 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, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
|
348
|
+
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 RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, 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, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
package/dist/profile.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
createRiddleProofProfileConfigurationError,
|
|
14
14
|
createRiddleProofProfileEnvironmentBlockedResult,
|
|
15
15
|
createRiddleProofProfileInsufficientResult,
|
|
16
|
+
deriveRiddleProofArtifactBodyAssertions,
|
|
16
17
|
extractRiddleProofProfileResult,
|
|
17
18
|
normalizeRiddleProofProfile,
|
|
18
19
|
profileStatusExitCode,
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
resolveRiddleProofProfileTimeoutSec,
|
|
22
23
|
slugifyRiddleProofProfileName,
|
|
23
24
|
summarizeRiddleProofProfileResult
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TBEVHMU3.js";
|
|
25
26
|
export {
|
|
26
27
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
27
28
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
@@ -37,6 +38,7 @@ export {
|
|
|
37
38
|
createRiddleProofProfileConfigurationError,
|
|
38
39
|
createRiddleProofProfileEnvironmentBlockedResult,
|
|
39
40
|
createRiddleProofProfileInsufficientResult,
|
|
41
|
+
deriveRiddleProofArtifactBodyAssertions,
|
|
40
42
|
extractRiddleProofProfileResult,
|
|
41
43
|
normalizeRiddleProofProfile,
|
|
42
44
|
profileStatusExitCode,
|