@riddledc/riddle-proof 0.7.10 → 0.7.12
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/dist/{chunk-3CVGVQTQ.js → chunk-5KOHSE4V.js} +1 -0
- package/dist/{chunk-A7RJZD4I.js → chunk-PZYQGRQ5.js} +76 -17
- package/dist/cli.cjs +77 -18
- package/dist/cli.js +2 -2
- package/dist/index.cjs +79 -18
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/dist/profile.cjs +77 -17
- package/dist/profile.d.cts +2 -1
- package/dist/profile.d.ts +2 -1
- package/dist/profile.js +3 -1
- package/dist/proof-run-engine.d.cts +3 -3
- package/dist/proof-run-engine.d.ts +3 -3
- package/dist/riddle-client.cjs +1 -0
- package/dist/riddle-client.d.cts +1 -0
- package/dist/riddle-client.d.ts +1 -0
- package/dist/riddle-client.js +1 -1
- package/package.json +1 -1
|
@@ -186,6 +186,7 @@ async function runRiddleScript(config, input) {
|
|
|
186
186
|
};
|
|
187
187
|
if (input.viewport) payload.viewport = input.viewport;
|
|
188
188
|
if (input.include) payload.include = input.include;
|
|
189
|
+
if (typeof input.strict === "boolean") payload.strict = input.strict;
|
|
189
190
|
if (input.options) payload.options = input.options;
|
|
190
191
|
return riddleRequestJson(config, "/v1/run", {
|
|
191
192
|
method: "POST",
|
|
@@ -193,16 +193,16 @@ function normalizeRiddleProofProfile(input, options = {}) {
|
|
|
193
193
|
function resolveRiddleProofProfileTargetUrl(profile) {
|
|
194
194
|
const route = profile.target.route || "";
|
|
195
195
|
const targetUrl = profile.target.url || "";
|
|
196
|
+
if (targetUrl && route) return resolveRiddleProofProfileRouteUrl(targetUrl, route);
|
|
196
197
|
if (/^https?:\/\//i.test(route)) return route;
|
|
197
|
-
if (targetUrl && route) return new URL(route, targetUrl).href;
|
|
198
198
|
if (targetUrl) return targetUrl;
|
|
199
199
|
throw new Error("profile target URL could not be resolved.");
|
|
200
200
|
}
|
|
201
|
-
function routeForViewport(viewport) {
|
|
201
|
+
function routeForViewport(viewport, targetUrl) {
|
|
202
202
|
if (viewport?.route) {
|
|
203
203
|
return {
|
|
204
204
|
...viewport.route,
|
|
205
|
-
matched: viewport.route.matched || routePathMatches(viewport.route.observed, viewport.route.expected_path)
|
|
205
|
+
matched: viewport.route.matched || routePathMatches(viewport.route.observed, viewport.route.expected_path, targetUrl)
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
208
|
return {
|
|
@@ -236,11 +236,48 @@ function normalizeRoutePath(path) {
|
|
|
236
236
|
if (value === "/") return "/";
|
|
237
237
|
return value.replace(/\/+$/, "") || "/";
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
|
|
239
|
+
function previewMountPrefix(pathname) {
|
|
240
|
+
const value = pathname || "/";
|
|
241
|
+
const apiPreview = value.match(/^(\/s\/[^/]+)(?:\/|$)/);
|
|
242
|
+
if (apiPreview) return apiPreview[1];
|
|
243
|
+
const internalPreview = value.match(/^(\/preview\/[^/]+\/[^/]+)(?:\/|$)/);
|
|
244
|
+
return internalPreview ? internalPreview[1] : "";
|
|
241
245
|
}
|
|
242
|
-
function
|
|
243
|
-
const
|
|
246
|
+
function joinMountedRoutePath(mountPrefix, routePath) {
|
|
247
|
+
const route = routePath.startsWith("/") ? routePath : `/${routePath}`;
|
|
248
|
+
if (!mountPrefix) return route;
|
|
249
|
+
if (route === mountPrefix || route.startsWith(`${mountPrefix}/`)) return route;
|
|
250
|
+
return `${mountPrefix}${route}`;
|
|
251
|
+
}
|
|
252
|
+
function resolveRiddleProofProfileRouteUrl(targetUrl, route) {
|
|
253
|
+
if (/^https?:\/\//i.test(route)) return route;
|
|
254
|
+
if (!targetUrl) return route;
|
|
255
|
+
if (route.startsWith("/")) {
|
|
256
|
+
const base = new URL(targetUrl);
|
|
257
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
258
|
+
if (mountPrefix) {
|
|
259
|
+
const routeParts = new URL(route, base.origin);
|
|
260
|
+
base.pathname = joinMountedRoutePath(mountPrefix, routeParts.pathname);
|
|
261
|
+
base.search = routeParts.search;
|
|
262
|
+
base.hash = routeParts.hash;
|
|
263
|
+
return base.href;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return new URL(route, targetUrl).href;
|
|
267
|
+
}
|
|
268
|
+
function mountedExpectedRoutePath(targetUrl, expected) {
|
|
269
|
+
if (!targetUrl || !expected || !expected.startsWith("/")) return expected;
|
|
270
|
+
const mountPrefix = previewMountPrefix(new URL(targetUrl).pathname);
|
|
271
|
+
return mountPrefix ? joinMountedRoutePath(mountPrefix, expected) : expected;
|
|
272
|
+
}
|
|
273
|
+
function routePathMatches(observed, expected, targetUrl) {
|
|
274
|
+
const normalizedObserved = normalizeRoutePath(observed);
|
|
275
|
+
const normalizedExpected = normalizeRoutePath(expected);
|
|
276
|
+
if (normalizedObserved === normalizedExpected) return true;
|
|
277
|
+
return normalizedObserved === normalizeRoutePath(mountedExpectedRoutePath(targetUrl, expected));
|
|
278
|
+
}
|
|
279
|
+
function successfulRoute(route, targetUrl) {
|
|
280
|
+
const matched = route.matched || routePathMatches(route.observed, route.expected_path, targetUrl);
|
|
244
281
|
return matched && !route.error && (route.http_status === null || route.http_status === void 0 || route.http_status < 400);
|
|
245
282
|
}
|
|
246
283
|
function assessCheckFromEvidence(check, evidence) {
|
|
@@ -259,8 +296,8 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
259
296
|
const failed = viewports.filter((viewport) => !successfulRoute({
|
|
260
297
|
...viewport.route,
|
|
261
298
|
expected_path: expectedPath,
|
|
262
|
-
matched: routePathMatches(viewport.route.observed, expectedPath) || viewport.route.matched
|
|
263
|
-
}));
|
|
299
|
+
matched: routePathMatches(viewport.route.observed, expectedPath, evidence.target_url) || viewport.route.matched
|
|
300
|
+
}, evidence.target_url));
|
|
264
301
|
return {
|
|
265
302
|
type: check.type,
|
|
266
303
|
label: checkLabel(check),
|
|
@@ -435,7 +472,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
|
|
|
435
472
|
runner: options.runner || "riddle",
|
|
436
473
|
status,
|
|
437
474
|
baseline_policy: profile.baseline_policy,
|
|
438
|
-
route: routeForViewport(firstViewport),
|
|
475
|
+
route: routeForViewport(firstViewport, evidence?.target_url),
|
|
439
476
|
artifacts: {
|
|
440
477
|
screenshots,
|
|
441
478
|
console: "console.json",
|
|
@@ -532,11 +569,32 @@ function normalizeRoutePath(path) {
|
|
|
532
569
|
if (value === "/") return "/";
|
|
533
570
|
return value.replace(/\/+$/, "") || "/";
|
|
534
571
|
}
|
|
535
|
-
function
|
|
536
|
-
|
|
572
|
+
function previewMountPrefix(pathname) {
|
|
573
|
+
const value = pathname || "/";
|
|
574
|
+
const apiPreview = value.match(/^(\/s\/[^/]+)(?:\/|$)/);
|
|
575
|
+
if (apiPreview) return apiPreview[1];
|
|
576
|
+
const internalPreview = value.match(/^(\/preview\/[^/]+\/[^/]+)(?:\/|$)/);
|
|
577
|
+
return internalPreview ? internalPreview[1] : "";
|
|
578
|
+
}
|
|
579
|
+
function joinMountedRoutePath(mountPrefix, routePath) {
|
|
580
|
+
const route = routePath.startsWith("/") ? routePath : "/" + routePath;
|
|
581
|
+
if (!mountPrefix) return route;
|
|
582
|
+
if (route === mountPrefix || route.startsWith(mountPrefix + "/")) return route;
|
|
583
|
+
return mountPrefix + route;
|
|
584
|
+
}
|
|
585
|
+
function mountedExpectedRoutePath(targetUrl, expected) {
|
|
586
|
+
if (!targetUrl || !expected || !expected.startsWith("/")) return expected;
|
|
587
|
+
const mountPrefix = previewMountPrefix(new URL(targetUrl).pathname);
|
|
588
|
+
return mountPrefix ? joinMountedRoutePath(mountPrefix, expected) : expected;
|
|
589
|
+
}
|
|
590
|
+
function routePathMatches(observed, expected, targetUrl) {
|
|
591
|
+
const normalizedObserved = normalizeRoutePath(observed);
|
|
592
|
+
const normalizedExpected = normalizeRoutePath(expected);
|
|
593
|
+
if (normalizedObserved === normalizedExpected) return true;
|
|
594
|
+
return normalizedObserved === normalizeRoutePath(mountedExpectedRoutePath(targetUrl, expected));
|
|
537
595
|
}
|
|
538
|
-
function routeOk(route) {
|
|
539
|
-
return Boolean(route && (route.matched || routePathMatches(route.observed, route.expected_path)) && !route.error && (route.http_status == null || route.http_status < 400));
|
|
596
|
+
function routeOk(route, targetUrl) {
|
|
597
|
+
return Boolean(route && (route.matched || routePathMatches(route.observed, route.expected_path, targetUrl)) && !route.error && (route.http_status == null || route.http_status < 400));
|
|
540
598
|
}
|
|
541
599
|
function textMatches(sample, check) {
|
|
542
600
|
if (check.pattern) {
|
|
@@ -593,8 +651,8 @@ function assessProfile(profile, evidence) {
|
|
|
593
651
|
const expectedPath = check.expected_path || new URL(evidence.target_url).pathname || "/";
|
|
594
652
|
const failed = viewports.filter((viewport) => {
|
|
595
653
|
const route = { ...(viewport.route || {}), expected_path: expectedPath };
|
|
596
|
-
route.matched = routePathMatches(route.observed, expectedPath) || route.matched;
|
|
597
|
-
return !routeOk(route);
|
|
654
|
+
route.matched = routePathMatches(route.observed, expectedPath, evidence.target_url) || route.matched;
|
|
655
|
+
return !routeOk(route, evidence.target_url);
|
|
598
656
|
});
|
|
599
657
|
checks.push({
|
|
600
658
|
type: check.type,
|
|
@@ -935,7 +993,7 @@ async function captureViewport(viewport) {
|
|
|
935
993
|
requested: targetUrl,
|
|
936
994
|
observed: dom.pathname,
|
|
937
995
|
expected_path: expectedPath,
|
|
938
|
-
matched: routePathMatches(dom.pathname, expectedPath),
|
|
996
|
+
matched: routePathMatches(dom.pathname, expectedPath, targetUrl),
|
|
939
997
|
http_status: httpStatus,
|
|
940
998
|
error: navigationError || waitError || undefined,
|
|
941
999
|
},
|
|
@@ -1051,6 +1109,7 @@ export {
|
|
|
1051
1109
|
slugifyRiddleProofProfileName,
|
|
1052
1110
|
normalizeRiddleProofProfile,
|
|
1053
1111
|
resolveRiddleProofProfileTargetUrl,
|
|
1112
|
+
resolveRiddleProofProfileRouteUrl,
|
|
1054
1113
|
assessRiddleProofProfileEvidence,
|
|
1055
1114
|
summarizeRiddleProofProfileResult,
|
|
1056
1115
|
profileStatusExitCode,
|
package/dist/cli.cjs
CHANGED
|
@@ -6733,6 +6733,7 @@ async function runRiddleScript(config, input) {
|
|
|
6733
6733
|
};
|
|
6734
6734
|
if (input.viewport) payload.viewport = input.viewport;
|
|
6735
6735
|
if (input.include) payload.include = input.include;
|
|
6736
|
+
if (typeof input.strict === "boolean") payload.strict = input.strict;
|
|
6736
6737
|
if (input.options) payload.options = input.options;
|
|
6737
6738
|
return riddleRequestJson(config, "/v1/run", {
|
|
6738
6739
|
method: "POST",
|
|
@@ -6972,16 +6973,16 @@ function normalizeRiddleProofProfile(input, options = {}) {
|
|
|
6972
6973
|
function resolveRiddleProofProfileTargetUrl(profile) {
|
|
6973
6974
|
const route = profile.target.route || "";
|
|
6974
6975
|
const targetUrl = profile.target.url || "";
|
|
6976
|
+
if (targetUrl && route) return resolveRiddleProofProfileRouteUrl(targetUrl, route);
|
|
6975
6977
|
if (/^https?:\/\//i.test(route)) return route;
|
|
6976
|
-
if (targetUrl && route) return new URL(route, targetUrl).href;
|
|
6977
6978
|
if (targetUrl) return targetUrl;
|
|
6978
6979
|
throw new Error("profile target URL could not be resolved.");
|
|
6979
6980
|
}
|
|
6980
|
-
function routeForViewport(viewport) {
|
|
6981
|
+
function routeForViewport(viewport, targetUrl) {
|
|
6981
6982
|
if (viewport?.route) {
|
|
6982
6983
|
return {
|
|
6983
6984
|
...viewport.route,
|
|
6984
|
-
matched: viewport.route.matched || routePathMatches(viewport.route.observed, viewport.route.expected_path)
|
|
6985
|
+
matched: viewport.route.matched || routePathMatches(viewport.route.observed, viewport.route.expected_path, targetUrl)
|
|
6985
6986
|
};
|
|
6986
6987
|
}
|
|
6987
6988
|
return {
|
|
@@ -7015,11 +7016,48 @@ function normalizeRoutePath(path7) {
|
|
|
7015
7016
|
if (value === "/") return "/";
|
|
7016
7017
|
return value.replace(/\/+$/, "") || "/";
|
|
7017
7018
|
}
|
|
7018
|
-
function
|
|
7019
|
-
|
|
7019
|
+
function previewMountPrefix(pathname) {
|
|
7020
|
+
const value = pathname || "/";
|
|
7021
|
+
const apiPreview = value.match(/^(\/s\/[^/]+)(?:\/|$)/);
|
|
7022
|
+
if (apiPreview) return apiPreview[1];
|
|
7023
|
+
const internalPreview = value.match(/^(\/preview\/[^/]+\/[^/]+)(?:\/|$)/);
|
|
7024
|
+
return internalPreview ? internalPreview[1] : "";
|
|
7020
7025
|
}
|
|
7021
|
-
function
|
|
7022
|
-
const
|
|
7026
|
+
function joinMountedRoutePath(mountPrefix, routePath) {
|
|
7027
|
+
const route = routePath.startsWith("/") ? routePath : `/${routePath}`;
|
|
7028
|
+
if (!mountPrefix) return route;
|
|
7029
|
+
if (route === mountPrefix || route.startsWith(`${mountPrefix}/`)) return route;
|
|
7030
|
+
return `${mountPrefix}${route}`;
|
|
7031
|
+
}
|
|
7032
|
+
function resolveRiddleProofProfileRouteUrl(targetUrl, route) {
|
|
7033
|
+
if (/^https?:\/\//i.test(route)) return route;
|
|
7034
|
+
if (!targetUrl) return route;
|
|
7035
|
+
if (route.startsWith("/")) {
|
|
7036
|
+
const base = new URL(targetUrl);
|
|
7037
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
7038
|
+
if (mountPrefix) {
|
|
7039
|
+
const routeParts = new URL(route, base.origin);
|
|
7040
|
+
base.pathname = joinMountedRoutePath(mountPrefix, routeParts.pathname);
|
|
7041
|
+
base.search = routeParts.search;
|
|
7042
|
+
base.hash = routeParts.hash;
|
|
7043
|
+
return base.href;
|
|
7044
|
+
}
|
|
7045
|
+
}
|
|
7046
|
+
return new URL(route, targetUrl).href;
|
|
7047
|
+
}
|
|
7048
|
+
function mountedExpectedRoutePath(targetUrl, expected) {
|
|
7049
|
+
if (!targetUrl || !expected || !expected.startsWith("/")) return expected;
|
|
7050
|
+
const mountPrefix = previewMountPrefix(new URL(targetUrl).pathname);
|
|
7051
|
+
return mountPrefix ? joinMountedRoutePath(mountPrefix, expected) : expected;
|
|
7052
|
+
}
|
|
7053
|
+
function routePathMatches(observed, expected, targetUrl) {
|
|
7054
|
+
const normalizedObserved = normalizeRoutePath(observed);
|
|
7055
|
+
const normalizedExpected = normalizeRoutePath(expected);
|
|
7056
|
+
if (normalizedObserved === normalizedExpected) return true;
|
|
7057
|
+
return normalizedObserved === normalizeRoutePath(mountedExpectedRoutePath(targetUrl, expected));
|
|
7058
|
+
}
|
|
7059
|
+
function successfulRoute(route, targetUrl) {
|
|
7060
|
+
const matched = route.matched || routePathMatches(route.observed, route.expected_path, targetUrl);
|
|
7023
7061
|
return matched && !route.error && (route.http_status === null || route.http_status === void 0 || route.http_status < 400);
|
|
7024
7062
|
}
|
|
7025
7063
|
function assessCheckFromEvidence(check, evidence) {
|
|
@@ -7038,8 +7076,8 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
7038
7076
|
const failed = viewports.filter((viewport) => !successfulRoute({
|
|
7039
7077
|
...viewport.route,
|
|
7040
7078
|
expected_path: expectedPath,
|
|
7041
|
-
matched: routePathMatches(viewport.route.observed, expectedPath) || viewport.route.matched
|
|
7042
|
-
}));
|
|
7079
|
+
matched: routePathMatches(viewport.route.observed, expectedPath, evidence.target_url) || viewport.route.matched
|
|
7080
|
+
}, evidence.target_url));
|
|
7043
7081
|
return {
|
|
7044
7082
|
type: check.type,
|
|
7045
7083
|
label: checkLabel(check),
|
|
@@ -7214,7 +7252,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
|
|
|
7214
7252
|
runner: options.runner || "riddle",
|
|
7215
7253
|
status,
|
|
7216
7254
|
baseline_policy: profile.baseline_policy,
|
|
7217
|
-
route: routeForViewport(firstViewport),
|
|
7255
|
+
route: routeForViewport(firstViewport, evidence?.target_url),
|
|
7218
7256
|
artifacts: {
|
|
7219
7257
|
screenshots,
|
|
7220
7258
|
console: "console.json",
|
|
@@ -7295,11 +7333,32 @@ function normalizeRoutePath(path) {
|
|
|
7295
7333
|
if (value === "/") return "/";
|
|
7296
7334
|
return value.replace(/\/+$/, "") || "/";
|
|
7297
7335
|
}
|
|
7298
|
-
function
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7336
|
+
function previewMountPrefix(pathname) {
|
|
7337
|
+
const value = pathname || "/";
|
|
7338
|
+
const apiPreview = value.match(/^(\/s\/[^/]+)(?:\/|$)/);
|
|
7339
|
+
if (apiPreview) return apiPreview[1];
|
|
7340
|
+
const internalPreview = value.match(/^(\/preview\/[^/]+\/[^/]+)(?:\/|$)/);
|
|
7341
|
+
return internalPreview ? internalPreview[1] : "";
|
|
7342
|
+
}
|
|
7343
|
+
function joinMountedRoutePath(mountPrefix, routePath) {
|
|
7344
|
+
const route = routePath.startsWith("/") ? routePath : "/" + routePath;
|
|
7345
|
+
if (!mountPrefix) return route;
|
|
7346
|
+
if (route === mountPrefix || route.startsWith(mountPrefix + "/")) return route;
|
|
7347
|
+
return mountPrefix + route;
|
|
7348
|
+
}
|
|
7349
|
+
function mountedExpectedRoutePath(targetUrl, expected) {
|
|
7350
|
+
if (!targetUrl || !expected || !expected.startsWith("/")) return expected;
|
|
7351
|
+
const mountPrefix = previewMountPrefix(new URL(targetUrl).pathname);
|
|
7352
|
+
return mountPrefix ? joinMountedRoutePath(mountPrefix, expected) : expected;
|
|
7353
|
+
}
|
|
7354
|
+
function routePathMatches(observed, expected, targetUrl) {
|
|
7355
|
+
const normalizedObserved = normalizeRoutePath(observed);
|
|
7356
|
+
const normalizedExpected = normalizeRoutePath(expected);
|
|
7357
|
+
if (normalizedObserved === normalizedExpected) return true;
|
|
7358
|
+
return normalizedObserved === normalizeRoutePath(mountedExpectedRoutePath(targetUrl, expected));
|
|
7359
|
+
}
|
|
7360
|
+
function routeOk(route, targetUrl) {
|
|
7361
|
+
return Boolean(route && (route.matched || routePathMatches(route.observed, route.expected_path, targetUrl)) && !route.error && (route.http_status == null || route.http_status < 400));
|
|
7303
7362
|
}
|
|
7304
7363
|
function textMatches(sample, check) {
|
|
7305
7364
|
if (check.pattern) {
|
|
@@ -7356,8 +7415,8 @@ function assessProfile(profile, evidence) {
|
|
|
7356
7415
|
const expectedPath = check.expected_path || new URL(evidence.target_url).pathname || "/";
|
|
7357
7416
|
const failed = viewports.filter((viewport) => {
|
|
7358
7417
|
const route = { ...(viewport.route || {}), expected_path: expectedPath };
|
|
7359
|
-
route.matched = routePathMatches(route.observed, expectedPath) || route.matched;
|
|
7360
|
-
return !routeOk(route);
|
|
7418
|
+
route.matched = routePathMatches(route.observed, expectedPath, evidence.target_url) || route.matched;
|
|
7419
|
+
return !routeOk(route, evidence.target_url);
|
|
7361
7420
|
});
|
|
7362
7421
|
checks.push({
|
|
7363
7422
|
type: check.type,
|
|
@@ -7698,7 +7757,7 @@ async function captureViewport(viewport) {
|
|
|
7698
7757
|
requested: targetUrl,
|
|
7699
7758
|
observed: dom.pathname,
|
|
7700
7759
|
expected_path: expectedPath,
|
|
7701
|
-
matched: routePathMatches(dom.pathname, expectedPath),
|
|
7760
|
+
matched: routePathMatches(dom.pathname, expectedPath, targetUrl),
|
|
7702
7761
|
http_status: httpStatus,
|
|
7703
7762
|
error: navigationError || waitError || undefined,
|
|
7704
7763
|
},
|
package/dist/cli.js
CHANGED
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
normalizeRiddleProofProfile,
|
|
10
10
|
profileStatusExitCode,
|
|
11
11
|
resolveRiddleProofProfileTargetUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PZYQGRQ5.js";
|
|
13
13
|
import {
|
|
14
14
|
createRiddleApiClient,
|
|
15
15
|
parseRiddleViewport
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5KOHSE4V.js";
|
|
17
17
|
import {
|
|
18
18
|
createDisabledRiddleProofAgentAdapter,
|
|
19
19
|
readRiddleProofRunStatus,
|
package/dist/index.cjs
CHANGED
|
@@ -2994,6 +2994,7 @@ __export(index_exports, {
|
|
|
2994
2994
|
redactForProofDiagnostics: () => redactForProofDiagnostics,
|
|
2995
2995
|
resolveBasicGameplayProgressionCheckWithArtifactScreenshots: () => resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
|
|
2996
2996
|
resolveRiddleApiKey: () => resolveRiddleApiKey,
|
|
2997
|
+
resolveRiddleProofProfileRouteUrl: () => resolveRiddleProofProfileRouteUrl,
|
|
2997
2998
|
resolveRiddleProofProfileTargetUrl: () => resolveRiddleProofProfileTargetUrl,
|
|
2998
2999
|
riddleRequestJson: () => riddleRequestJson,
|
|
2999
3000
|
runCodexExecAgentDoctor: () => runCodexExecAgentDoctor,
|
|
@@ -8699,16 +8700,16 @@ function normalizeRiddleProofProfile(input, options = {}) {
|
|
|
8699
8700
|
function resolveRiddleProofProfileTargetUrl(profile) {
|
|
8700
8701
|
const route = profile.target.route || "";
|
|
8701
8702
|
const targetUrl = profile.target.url || "";
|
|
8703
|
+
if (targetUrl && route) return resolveRiddleProofProfileRouteUrl(targetUrl, route);
|
|
8702
8704
|
if (/^https?:\/\//i.test(route)) return route;
|
|
8703
|
-
if (targetUrl && route) return new URL(route, targetUrl).href;
|
|
8704
8705
|
if (targetUrl) return targetUrl;
|
|
8705
8706
|
throw new Error("profile target URL could not be resolved.");
|
|
8706
8707
|
}
|
|
8707
|
-
function routeForViewport(viewport) {
|
|
8708
|
+
function routeForViewport(viewport, targetUrl) {
|
|
8708
8709
|
if (viewport?.route) {
|
|
8709
8710
|
return {
|
|
8710
8711
|
...viewport.route,
|
|
8711
|
-
matched: viewport.route.matched || routePathMatches(viewport.route.observed, viewport.route.expected_path)
|
|
8712
|
+
matched: viewport.route.matched || routePathMatches(viewport.route.observed, viewport.route.expected_path, targetUrl)
|
|
8712
8713
|
};
|
|
8713
8714
|
}
|
|
8714
8715
|
return {
|
|
@@ -8742,11 +8743,48 @@ function normalizeRoutePath(path6) {
|
|
|
8742
8743
|
if (value === "/") return "/";
|
|
8743
8744
|
return value.replace(/\/+$/, "") || "/";
|
|
8744
8745
|
}
|
|
8745
|
-
function
|
|
8746
|
-
|
|
8746
|
+
function previewMountPrefix(pathname) {
|
|
8747
|
+
const value = pathname || "/";
|
|
8748
|
+
const apiPreview = value.match(/^(\/s\/[^/]+)(?:\/|$)/);
|
|
8749
|
+
if (apiPreview) return apiPreview[1];
|
|
8750
|
+
const internalPreview = value.match(/^(\/preview\/[^/]+\/[^/]+)(?:\/|$)/);
|
|
8751
|
+
return internalPreview ? internalPreview[1] : "";
|
|
8747
8752
|
}
|
|
8748
|
-
function
|
|
8749
|
-
const
|
|
8753
|
+
function joinMountedRoutePath(mountPrefix, routePath) {
|
|
8754
|
+
const route = routePath.startsWith("/") ? routePath : `/${routePath}`;
|
|
8755
|
+
if (!mountPrefix) return route;
|
|
8756
|
+
if (route === mountPrefix || route.startsWith(`${mountPrefix}/`)) return route;
|
|
8757
|
+
return `${mountPrefix}${route}`;
|
|
8758
|
+
}
|
|
8759
|
+
function resolveRiddleProofProfileRouteUrl(targetUrl, route) {
|
|
8760
|
+
if (/^https?:\/\//i.test(route)) return route;
|
|
8761
|
+
if (!targetUrl) return route;
|
|
8762
|
+
if (route.startsWith("/")) {
|
|
8763
|
+
const base = new URL(targetUrl);
|
|
8764
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
8765
|
+
if (mountPrefix) {
|
|
8766
|
+
const routeParts = new URL(route, base.origin);
|
|
8767
|
+
base.pathname = joinMountedRoutePath(mountPrefix, routeParts.pathname);
|
|
8768
|
+
base.search = routeParts.search;
|
|
8769
|
+
base.hash = routeParts.hash;
|
|
8770
|
+
return base.href;
|
|
8771
|
+
}
|
|
8772
|
+
}
|
|
8773
|
+
return new URL(route, targetUrl).href;
|
|
8774
|
+
}
|
|
8775
|
+
function mountedExpectedRoutePath(targetUrl, expected) {
|
|
8776
|
+
if (!targetUrl || !expected || !expected.startsWith("/")) return expected;
|
|
8777
|
+
const mountPrefix = previewMountPrefix(new URL(targetUrl).pathname);
|
|
8778
|
+
return mountPrefix ? joinMountedRoutePath(mountPrefix, expected) : expected;
|
|
8779
|
+
}
|
|
8780
|
+
function routePathMatches(observed, expected, targetUrl) {
|
|
8781
|
+
const normalizedObserved = normalizeRoutePath(observed);
|
|
8782
|
+
const normalizedExpected = normalizeRoutePath(expected);
|
|
8783
|
+
if (normalizedObserved === normalizedExpected) return true;
|
|
8784
|
+
return normalizedObserved === normalizeRoutePath(mountedExpectedRoutePath(targetUrl, expected));
|
|
8785
|
+
}
|
|
8786
|
+
function successfulRoute(route, targetUrl) {
|
|
8787
|
+
const matched = route.matched || routePathMatches(route.observed, route.expected_path, targetUrl);
|
|
8750
8788
|
return matched && !route.error && (route.http_status === null || route.http_status === void 0 || route.http_status < 400);
|
|
8751
8789
|
}
|
|
8752
8790
|
function assessCheckFromEvidence(check, evidence) {
|
|
@@ -8765,8 +8803,8 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
8765
8803
|
const failed = viewports.filter((viewport) => !successfulRoute({
|
|
8766
8804
|
...viewport.route,
|
|
8767
8805
|
expected_path: expectedPath,
|
|
8768
|
-
matched: routePathMatches(viewport.route.observed, expectedPath) || viewport.route.matched
|
|
8769
|
-
}));
|
|
8806
|
+
matched: routePathMatches(viewport.route.observed, expectedPath, evidence.target_url) || viewport.route.matched
|
|
8807
|
+
}, evidence.target_url));
|
|
8770
8808
|
return {
|
|
8771
8809
|
type: check.type,
|
|
8772
8810
|
label: checkLabel(check),
|
|
@@ -8941,7 +8979,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
|
|
|
8941
8979
|
runner: options.runner || "riddle",
|
|
8942
8980
|
status,
|
|
8943
8981
|
baseline_policy: profile.baseline_policy,
|
|
8944
|
-
route: routeForViewport(firstViewport),
|
|
8982
|
+
route: routeForViewport(firstViewport, evidence?.target_url),
|
|
8945
8983
|
artifacts: {
|
|
8946
8984
|
screenshots,
|
|
8947
8985
|
console: "console.json",
|
|
@@ -9038,11 +9076,32 @@ function normalizeRoutePath(path) {
|
|
|
9038
9076
|
if (value === "/") return "/";
|
|
9039
9077
|
return value.replace(/\/+$/, "") || "/";
|
|
9040
9078
|
}
|
|
9041
|
-
function
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9079
|
+
function previewMountPrefix(pathname) {
|
|
9080
|
+
const value = pathname || "/";
|
|
9081
|
+
const apiPreview = value.match(/^(\/s\/[^/]+)(?:\/|$)/);
|
|
9082
|
+
if (apiPreview) return apiPreview[1];
|
|
9083
|
+
const internalPreview = value.match(/^(\/preview\/[^/]+\/[^/]+)(?:\/|$)/);
|
|
9084
|
+
return internalPreview ? internalPreview[1] : "";
|
|
9085
|
+
}
|
|
9086
|
+
function joinMountedRoutePath(mountPrefix, routePath) {
|
|
9087
|
+
const route = routePath.startsWith("/") ? routePath : "/" + routePath;
|
|
9088
|
+
if (!mountPrefix) return route;
|
|
9089
|
+
if (route === mountPrefix || route.startsWith(mountPrefix + "/")) return route;
|
|
9090
|
+
return mountPrefix + route;
|
|
9091
|
+
}
|
|
9092
|
+
function mountedExpectedRoutePath(targetUrl, expected) {
|
|
9093
|
+
if (!targetUrl || !expected || !expected.startsWith("/")) return expected;
|
|
9094
|
+
const mountPrefix = previewMountPrefix(new URL(targetUrl).pathname);
|
|
9095
|
+
return mountPrefix ? joinMountedRoutePath(mountPrefix, expected) : expected;
|
|
9096
|
+
}
|
|
9097
|
+
function routePathMatches(observed, expected, targetUrl) {
|
|
9098
|
+
const normalizedObserved = normalizeRoutePath(observed);
|
|
9099
|
+
const normalizedExpected = normalizeRoutePath(expected);
|
|
9100
|
+
if (normalizedObserved === normalizedExpected) return true;
|
|
9101
|
+
return normalizedObserved === normalizeRoutePath(mountedExpectedRoutePath(targetUrl, expected));
|
|
9102
|
+
}
|
|
9103
|
+
function routeOk(route, targetUrl) {
|
|
9104
|
+
return Boolean(route && (route.matched || routePathMatches(route.observed, route.expected_path, targetUrl)) && !route.error && (route.http_status == null || route.http_status < 400));
|
|
9046
9105
|
}
|
|
9047
9106
|
function textMatches(sample, check) {
|
|
9048
9107
|
if (check.pattern) {
|
|
@@ -9099,8 +9158,8 @@ function assessProfile(profile, evidence) {
|
|
|
9099
9158
|
const expectedPath = check.expected_path || new URL(evidence.target_url).pathname || "/";
|
|
9100
9159
|
const failed = viewports.filter((viewport) => {
|
|
9101
9160
|
const route = { ...(viewport.route || {}), expected_path: expectedPath };
|
|
9102
|
-
route.matched = routePathMatches(route.observed, expectedPath) || route.matched;
|
|
9103
|
-
return !routeOk(route);
|
|
9161
|
+
route.matched = routePathMatches(route.observed, expectedPath, evidence.target_url) || route.matched;
|
|
9162
|
+
return !routeOk(route, evidence.target_url);
|
|
9104
9163
|
});
|
|
9105
9164
|
checks.push({
|
|
9106
9165
|
type: check.type,
|
|
@@ -9441,7 +9500,7 @@ async function captureViewport(viewport) {
|
|
|
9441
9500
|
requested: targetUrl,
|
|
9442
9501
|
observed: dom.pathname,
|
|
9443
9502
|
expected_path: expectedPath,
|
|
9444
|
-
matched: routePathMatches(dom.pathname, expectedPath),
|
|
9503
|
+
matched: routePathMatches(dom.pathname, expectedPath, targetUrl),
|
|
9445
9504
|
http_status: httpStatus,
|
|
9446
9505
|
error: navigationError || waitError || undefined,
|
|
9447
9506
|
},
|
|
@@ -9735,6 +9794,7 @@ async function runRiddleScript(config, input) {
|
|
|
9735
9794
|
};
|
|
9736
9795
|
if (input.viewport) payload.viewport = input.viewport;
|
|
9737
9796
|
if (input.include) payload.include = input.include;
|
|
9797
|
+
if (typeof input.strict === "boolean") payload.strict = input.strict;
|
|
9738
9798
|
if (input.options) payload.options = input.options;
|
|
9739
9799
|
return riddleRequestJson(config, "/v1/run", {
|
|
9740
9800
|
method: "POST",
|
|
@@ -9876,6 +9936,7 @@ function createRiddleApiClient(config = {}) {
|
|
|
9876
9936
|
redactForProofDiagnostics,
|
|
9877
9937
|
resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
|
|
9878
9938
|
resolveRiddleApiKey,
|
|
9939
|
+
resolveRiddleProofProfileRouteUrl,
|
|
9879
9940
|
resolveRiddleProofProfileTargetUrl,
|
|
9880
9941
|
riddleRequestJson,
|
|
9881
9942
|
runCodexExecAgentDoctor,
|
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, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, 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_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileTargetUrl, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
|
|
13
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
|
|
14
14
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RiddleApiError, RiddleClientConfig, RiddleFetch, RiddlePollJobResult, RiddlePreviewDeployResult, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, createRiddleApiClient, 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, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, 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_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileTargetUrl, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
|
|
13
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofProfile, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileResult, RiddleProofProfileRouteEvidence, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
|
|
14
14
|
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RiddleApiError, RiddleClientConfig, RiddleFetch, RiddlePollJobResult, RiddlePreviewDeployResult, RiddleRunScriptInput, RiddleServerPreviewInput, RiddleServerPreviewResult, createRiddleApiClient, deployRiddleStaticPreview, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, riddleRequestJson, runRiddleScript, runRiddleServerPreview } from './riddle-client.js';
|
package/dist/index.js
CHANGED
|
@@ -53,10 +53,11 @@ import {
|
|
|
53
53
|
extractRiddleProofProfileResult,
|
|
54
54
|
normalizeRiddleProofProfile,
|
|
55
55
|
profileStatusExitCode,
|
|
56
|
+
resolveRiddleProofProfileRouteUrl,
|
|
56
57
|
resolveRiddleProofProfileTargetUrl,
|
|
57
58
|
slugifyRiddleProofProfileName,
|
|
58
59
|
summarizeRiddleProofProfileResult
|
|
59
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-PZYQGRQ5.js";
|
|
60
61
|
import {
|
|
61
62
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
62
63
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
|
@@ -70,7 +71,7 @@ import {
|
|
|
70
71
|
riddleRequestJson,
|
|
71
72
|
runRiddleScript,
|
|
72
73
|
runRiddleServerPreview
|
|
73
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-5KOHSE4V.js";
|
|
74
75
|
import {
|
|
75
76
|
DEFAULT_DIAGNOSTIC_ARRAY_LIMIT,
|
|
76
77
|
DEFAULT_DIAGNOSTIC_HISTORY_LIMIT,
|
|
@@ -231,6 +232,7 @@ export {
|
|
|
231
232
|
redactForProofDiagnostics,
|
|
232
233
|
resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
|
|
233
234
|
resolveRiddleApiKey,
|
|
235
|
+
resolveRiddleProofProfileRouteUrl,
|
|
234
236
|
resolveRiddleProofProfileTargetUrl,
|
|
235
237
|
riddleRequestJson,
|
|
236
238
|
runCodexExecAgentDoctor,
|
package/dist/profile.cjs
CHANGED
|
@@ -35,6 +35,7 @@ __export(profile_exports, {
|
|
|
35
35
|
extractRiddleProofProfileResult: () => extractRiddleProofProfileResult,
|
|
36
36
|
normalizeRiddleProofProfile: () => normalizeRiddleProofProfile,
|
|
37
37
|
profileStatusExitCode: () => profileStatusExitCode,
|
|
38
|
+
resolveRiddleProofProfileRouteUrl: () => resolveRiddleProofProfileRouteUrl,
|
|
38
39
|
resolveRiddleProofProfileTargetUrl: () => resolveRiddleProofProfileTargetUrl,
|
|
39
40
|
slugifyRiddleProofProfileName: () => slugifyRiddleProofProfileName,
|
|
40
41
|
summarizeRiddleProofProfileResult: () => summarizeRiddleProofProfileResult
|
|
@@ -234,16 +235,16 @@ function normalizeRiddleProofProfile(input, options = {}) {
|
|
|
234
235
|
function resolveRiddleProofProfileTargetUrl(profile) {
|
|
235
236
|
const route = profile.target.route || "";
|
|
236
237
|
const targetUrl = profile.target.url || "";
|
|
238
|
+
if (targetUrl && route) return resolveRiddleProofProfileRouteUrl(targetUrl, route);
|
|
237
239
|
if (/^https?:\/\//i.test(route)) return route;
|
|
238
|
-
if (targetUrl && route) return new URL(route, targetUrl).href;
|
|
239
240
|
if (targetUrl) return targetUrl;
|
|
240
241
|
throw new Error("profile target URL could not be resolved.");
|
|
241
242
|
}
|
|
242
|
-
function routeForViewport(viewport) {
|
|
243
|
+
function routeForViewport(viewport, targetUrl) {
|
|
243
244
|
if (viewport?.route) {
|
|
244
245
|
return {
|
|
245
246
|
...viewport.route,
|
|
246
|
-
matched: viewport.route.matched || routePathMatches(viewport.route.observed, viewport.route.expected_path)
|
|
247
|
+
matched: viewport.route.matched || routePathMatches(viewport.route.observed, viewport.route.expected_path, targetUrl)
|
|
247
248
|
};
|
|
248
249
|
}
|
|
249
250
|
return {
|
|
@@ -277,11 +278,48 @@ function normalizeRoutePath(path) {
|
|
|
277
278
|
if (value === "/") return "/";
|
|
278
279
|
return value.replace(/\/+$/, "") || "/";
|
|
279
280
|
}
|
|
280
|
-
function
|
|
281
|
-
|
|
281
|
+
function previewMountPrefix(pathname) {
|
|
282
|
+
const value = pathname || "/";
|
|
283
|
+
const apiPreview = value.match(/^(\/s\/[^/]+)(?:\/|$)/);
|
|
284
|
+
if (apiPreview) return apiPreview[1];
|
|
285
|
+
const internalPreview = value.match(/^(\/preview\/[^/]+\/[^/]+)(?:\/|$)/);
|
|
286
|
+
return internalPreview ? internalPreview[1] : "";
|
|
282
287
|
}
|
|
283
|
-
function
|
|
284
|
-
const
|
|
288
|
+
function joinMountedRoutePath(mountPrefix, routePath) {
|
|
289
|
+
const route = routePath.startsWith("/") ? routePath : `/${routePath}`;
|
|
290
|
+
if (!mountPrefix) return route;
|
|
291
|
+
if (route === mountPrefix || route.startsWith(`${mountPrefix}/`)) return route;
|
|
292
|
+
return `${mountPrefix}${route}`;
|
|
293
|
+
}
|
|
294
|
+
function resolveRiddleProofProfileRouteUrl(targetUrl, route) {
|
|
295
|
+
if (/^https?:\/\//i.test(route)) return route;
|
|
296
|
+
if (!targetUrl) return route;
|
|
297
|
+
if (route.startsWith("/")) {
|
|
298
|
+
const base = new URL(targetUrl);
|
|
299
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
300
|
+
if (mountPrefix) {
|
|
301
|
+
const routeParts = new URL(route, base.origin);
|
|
302
|
+
base.pathname = joinMountedRoutePath(mountPrefix, routeParts.pathname);
|
|
303
|
+
base.search = routeParts.search;
|
|
304
|
+
base.hash = routeParts.hash;
|
|
305
|
+
return base.href;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return new URL(route, targetUrl).href;
|
|
309
|
+
}
|
|
310
|
+
function mountedExpectedRoutePath(targetUrl, expected) {
|
|
311
|
+
if (!targetUrl || !expected || !expected.startsWith("/")) return expected;
|
|
312
|
+
const mountPrefix = previewMountPrefix(new URL(targetUrl).pathname);
|
|
313
|
+
return mountPrefix ? joinMountedRoutePath(mountPrefix, expected) : expected;
|
|
314
|
+
}
|
|
315
|
+
function routePathMatches(observed, expected, targetUrl) {
|
|
316
|
+
const normalizedObserved = normalizeRoutePath(observed);
|
|
317
|
+
const normalizedExpected = normalizeRoutePath(expected);
|
|
318
|
+
if (normalizedObserved === normalizedExpected) return true;
|
|
319
|
+
return normalizedObserved === normalizeRoutePath(mountedExpectedRoutePath(targetUrl, expected));
|
|
320
|
+
}
|
|
321
|
+
function successfulRoute(route, targetUrl) {
|
|
322
|
+
const matched = route.matched || routePathMatches(route.observed, route.expected_path, targetUrl);
|
|
285
323
|
return matched && !route.error && (route.http_status === null || route.http_status === void 0 || route.http_status < 400);
|
|
286
324
|
}
|
|
287
325
|
function assessCheckFromEvidence(check, evidence) {
|
|
@@ -300,8 +338,8 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
300
338
|
const failed = viewports.filter((viewport) => !successfulRoute({
|
|
301
339
|
...viewport.route,
|
|
302
340
|
expected_path: expectedPath,
|
|
303
|
-
matched: routePathMatches(viewport.route.observed, expectedPath) || viewport.route.matched
|
|
304
|
-
}));
|
|
341
|
+
matched: routePathMatches(viewport.route.observed, expectedPath, evidence.target_url) || viewport.route.matched
|
|
342
|
+
}, evidence.target_url));
|
|
305
343
|
return {
|
|
306
344
|
type: check.type,
|
|
307
345
|
label: checkLabel(check),
|
|
@@ -476,7 +514,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
|
|
|
476
514
|
runner: options.runner || "riddle",
|
|
477
515
|
status,
|
|
478
516
|
baseline_policy: profile.baseline_policy,
|
|
479
|
-
route: routeForViewport(firstViewport),
|
|
517
|
+
route: routeForViewport(firstViewport, evidence?.target_url),
|
|
480
518
|
artifacts: {
|
|
481
519
|
screenshots,
|
|
482
520
|
console: "console.json",
|
|
@@ -573,11 +611,32 @@ function normalizeRoutePath(path) {
|
|
|
573
611
|
if (value === "/") return "/";
|
|
574
612
|
return value.replace(/\/+$/, "") || "/";
|
|
575
613
|
}
|
|
576
|
-
function
|
|
577
|
-
|
|
614
|
+
function previewMountPrefix(pathname) {
|
|
615
|
+
const value = pathname || "/";
|
|
616
|
+
const apiPreview = value.match(/^(\/s\/[^/]+)(?:\/|$)/);
|
|
617
|
+
if (apiPreview) return apiPreview[1];
|
|
618
|
+
const internalPreview = value.match(/^(\/preview\/[^/]+\/[^/]+)(?:\/|$)/);
|
|
619
|
+
return internalPreview ? internalPreview[1] : "";
|
|
620
|
+
}
|
|
621
|
+
function joinMountedRoutePath(mountPrefix, routePath) {
|
|
622
|
+
const route = routePath.startsWith("/") ? routePath : "/" + routePath;
|
|
623
|
+
if (!mountPrefix) return route;
|
|
624
|
+
if (route === mountPrefix || route.startsWith(mountPrefix + "/")) return route;
|
|
625
|
+
return mountPrefix + route;
|
|
626
|
+
}
|
|
627
|
+
function mountedExpectedRoutePath(targetUrl, expected) {
|
|
628
|
+
if (!targetUrl || !expected || !expected.startsWith("/")) return expected;
|
|
629
|
+
const mountPrefix = previewMountPrefix(new URL(targetUrl).pathname);
|
|
630
|
+
return mountPrefix ? joinMountedRoutePath(mountPrefix, expected) : expected;
|
|
631
|
+
}
|
|
632
|
+
function routePathMatches(observed, expected, targetUrl) {
|
|
633
|
+
const normalizedObserved = normalizeRoutePath(observed);
|
|
634
|
+
const normalizedExpected = normalizeRoutePath(expected);
|
|
635
|
+
if (normalizedObserved === normalizedExpected) return true;
|
|
636
|
+
return normalizedObserved === normalizeRoutePath(mountedExpectedRoutePath(targetUrl, expected));
|
|
578
637
|
}
|
|
579
|
-
function routeOk(route) {
|
|
580
|
-
return Boolean(route && (route.matched || routePathMatches(route.observed, route.expected_path)) && !route.error && (route.http_status == null || route.http_status < 400));
|
|
638
|
+
function routeOk(route, targetUrl) {
|
|
639
|
+
return Boolean(route && (route.matched || routePathMatches(route.observed, route.expected_path, targetUrl)) && !route.error && (route.http_status == null || route.http_status < 400));
|
|
581
640
|
}
|
|
582
641
|
function textMatches(sample, check) {
|
|
583
642
|
if (check.pattern) {
|
|
@@ -634,8 +693,8 @@ function assessProfile(profile, evidence) {
|
|
|
634
693
|
const expectedPath = check.expected_path || new URL(evidence.target_url).pathname || "/";
|
|
635
694
|
const failed = viewports.filter((viewport) => {
|
|
636
695
|
const route = { ...(viewport.route || {}), expected_path: expectedPath };
|
|
637
|
-
route.matched = routePathMatches(route.observed, expectedPath) || route.matched;
|
|
638
|
-
return !routeOk(route);
|
|
696
|
+
route.matched = routePathMatches(route.observed, expectedPath, evidence.target_url) || route.matched;
|
|
697
|
+
return !routeOk(route, evidence.target_url);
|
|
639
698
|
});
|
|
640
699
|
checks.push({
|
|
641
700
|
type: check.type,
|
|
@@ -976,7 +1035,7 @@ async function captureViewport(viewport) {
|
|
|
976
1035
|
requested: targetUrl,
|
|
977
1036
|
observed: dom.pathname,
|
|
978
1037
|
expected_path: expectedPath,
|
|
979
|
-
matched: routePathMatches(dom.pathname, expectedPath),
|
|
1038
|
+
matched: routePathMatches(dom.pathname, expectedPath, targetUrl),
|
|
980
1039
|
http_status: httpStatus,
|
|
981
1040
|
error: navigationError || waitError || undefined,
|
|
982
1041
|
},
|
|
@@ -1098,6 +1157,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
1098
1157
|
extractRiddleProofProfileResult,
|
|
1099
1158
|
normalizeRiddleProofProfile,
|
|
1100
1159
|
profileStatusExitCode,
|
|
1160
|
+
resolveRiddleProofProfileRouteUrl,
|
|
1101
1161
|
resolveRiddleProofProfileTargetUrl,
|
|
1102
1162
|
slugifyRiddleProofProfileName,
|
|
1103
1163
|
summarizeRiddleProofProfileResult
|
package/dist/profile.d.cts
CHANGED
|
@@ -157,6 +157,7 @@ interface NormalizeRiddleProofProfileOptions {
|
|
|
157
157
|
declare function slugifyRiddleProofProfileName(value: string): string;
|
|
158
158
|
declare function normalizeRiddleProofProfile(input: unknown, options?: NormalizeRiddleProofProfileOptions): RiddleProofProfile;
|
|
159
159
|
declare function resolveRiddleProofProfileTargetUrl(profile: RiddleProofProfile): string;
|
|
160
|
+
declare function resolveRiddleProofProfileRouteUrl(targetUrl: string, route: string): string;
|
|
160
161
|
declare function assessRiddleProofProfileEvidence(profile: RiddleProofProfile, evidence: RiddleProofProfileEvidence | undefined, options?: {
|
|
161
162
|
runner?: RiddleProofProfileRunner;
|
|
162
163
|
riddle?: RiddleProofProfileResult["riddle"];
|
|
@@ -188,4 +189,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
|
|
|
188
189
|
declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
|
|
189
190
|
declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
|
|
190
191
|
|
|
191
|
-
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, 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 RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileResult, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileTargetUrl, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
|
192
|
+
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, 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 RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileResult, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
package/dist/profile.d.ts
CHANGED
|
@@ -157,6 +157,7 @@ interface NormalizeRiddleProofProfileOptions {
|
|
|
157
157
|
declare function slugifyRiddleProofProfileName(value: string): string;
|
|
158
158
|
declare function normalizeRiddleProofProfile(input: unknown, options?: NormalizeRiddleProofProfileOptions): RiddleProofProfile;
|
|
159
159
|
declare function resolveRiddleProofProfileTargetUrl(profile: RiddleProofProfile): string;
|
|
160
|
+
declare function resolveRiddleProofProfileRouteUrl(targetUrl: string, route: string): string;
|
|
160
161
|
declare function assessRiddleProofProfileEvidence(profile: RiddleProofProfile, evidence: RiddleProofProfileEvidence | undefined, options?: {
|
|
161
162
|
runner?: RiddleProofProfileRunner;
|
|
162
163
|
riddle?: RiddleProofProfileResult["riddle"];
|
|
@@ -188,4 +189,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
|
|
|
188
189
|
declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
|
|
189
190
|
declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
|
|
190
191
|
|
|
191
|
-
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, 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 RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileResult, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileTargetUrl, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
|
192
|
+
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, 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 RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileResult, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
package/dist/profile.js
CHANGED
|
@@ -14,10 +14,11 @@ import {
|
|
|
14
14
|
extractRiddleProofProfileResult,
|
|
15
15
|
normalizeRiddleProofProfile,
|
|
16
16
|
profileStatusExitCode,
|
|
17
|
+
resolveRiddleProofProfileRouteUrl,
|
|
17
18
|
resolveRiddleProofProfileTargetUrl,
|
|
18
19
|
slugifyRiddleProofProfileName,
|
|
19
20
|
summarizeRiddleProofProfileResult
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PZYQGRQ5.js";
|
|
21
22
|
export {
|
|
22
23
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
23
24
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
@@ -34,6 +35,7 @@ export {
|
|
|
34
35
|
extractRiddleProofProfileResult,
|
|
35
36
|
normalizeRiddleProofProfile,
|
|
36
37
|
profileStatusExitCode,
|
|
38
|
+
resolveRiddleProofProfileRouteUrl,
|
|
37
39
|
resolveRiddleProofProfileTargetUrl,
|
|
38
40
|
slugifyRiddleProofProfileName,
|
|
39
41
|
summarizeRiddleProofProfileResult
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
package/dist/riddle-client.cjs
CHANGED
|
@@ -231,6 +231,7 @@ async function runRiddleScript(config, input) {
|
|
|
231
231
|
};
|
|
232
232
|
if (input.viewport) payload.viewport = input.viewport;
|
|
233
233
|
if (input.include) payload.include = input.include;
|
|
234
|
+
if (typeof input.strict === "boolean") payload.strict = input.strict;
|
|
234
235
|
if (input.options) payload.options = input.options;
|
|
235
236
|
return riddleRequestJson(config, "/v1/run", {
|
|
236
237
|
method: "POST",
|
package/dist/riddle-client.d.cts
CHANGED
package/dist/riddle-client.d.ts
CHANGED
package/dist/riddle-client.js
CHANGED