@validate.qa/runner 1.0.100 → 1.0.101
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-2OKZY3WN.mjs +291 -0
- package/dist/{chunk-5P4ANVDY.mjs → chunk-4SZC5ZX3.mjs} +5092 -760
- package/dist/{chunk-2XD63NU5.mjs → chunk-BBTK6OX6.mjs} +567 -84
- package/dist/{chunk-WDXLAZ2J.mjs → chunk-CO5KHIVX.mjs} +3 -2
- package/dist/{chunk-HMUC3DKS.mjs → chunk-CYWHPXNZ.mjs} +2281 -2
- package/dist/{chunk-MAO6ADAO.mjs → chunk-FQUH2PU2.mjs} +1 -1
- package/dist/{chunk-MBKGTELT.mjs → chunk-IGXGSDE3.mjs} +701 -283
- package/dist/{chunk-II7QW7MZ.mjs → chunk-M3VZGHZQ.mjs} +14 -11
- package/dist/{chunk-GIIIVO2W.mjs → chunk-SN3PN4G4.mjs} +151 -11
- package/dist/{chunk-6NIT2CCH.mjs → chunk-TPU42VH2.mjs} +10 -9
- package/dist/{chunk-MHFP3QXU.mjs → chunk-XZUUBMP3.mjs} +1 -1
- package/dist/cli.js +8994 -1015
- package/dist/cli.mjs +211 -170
- package/dist/credential-mcp-server.js +503 -79
- package/dist/credential-mcp-server.mjs +3 -3
- package/dist/discovery-mcp-server.js +654 -87
- package/dist/discovery-mcp-server.mjs +4 -4
- package/dist/dist-VTPBY2C4.mjs +17 -0
- package/dist/inbox-mcp-server.js +496 -73
- package/dist/inbox-mcp-server.mjs +3 -3
- package/dist/route-seed-worker.js +2780 -74
- package/dist/route-seed-worker.mjs +14 -7
- package/dist/run-write-guard-preload.js +1206 -160
- package/dist/run-write-guard-preload.mjs +5 -285
- package/dist/run-write-guard.js +1206 -160
- package/dist/run-write-guard.mjs +3 -3
- package/package.json +3 -3
- package/dist/dist-DFNLMH6L.mjs +0 -16
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_route_manifest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CO5KHIVX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
require_survey_network_guard
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SN3PN4G4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
dist_exports,
|
|
9
9
|
init_dist
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IGXGSDE3.mjs";
|
|
11
11
|
import {
|
|
12
12
|
__commonJS,
|
|
13
13
|
__toCommonJS
|
|
@@ -31,6 +31,7 @@ var require_exploration_parser = __commonJS({
|
|
|
31
31
|
exports.normalizeRouteForFocusScope = normalizeRouteForFocusScope;
|
|
32
32
|
exports.routeIsWithinFocusAreas = routeIsWithinFocusAreas;
|
|
33
33
|
exports.detectRouteFromResponse = detectRouteFromResponse;
|
|
34
|
+
var shared_1 = (init_dist(), __toCommonJS(dist_exports));
|
|
34
35
|
function extractCodeLines(toolResultContent) {
|
|
35
36
|
const isPlaywrightLine = (l) => l.startsWith("await page.") || l.startsWith("await expect(");
|
|
36
37
|
const codeSection = toolResultContent.match(/###\s*Ran Playwright code\s*\n([\s\S]*?)(?=\n###|\n$|$)/);
|
|
@@ -324,7 +325,7 @@ var require_exploration_parser = __commonJS({
|
|
|
324
325
|
const decoded = raw.replace(/&/g, "&").replace(/&#(\d+);/g, (_m, code) => String.fromCharCode(Number(code)));
|
|
325
326
|
try {
|
|
326
327
|
const url = new URL(decoded, "http://canonical.invalid");
|
|
327
|
-
url.pathname = url.pathname
|
|
328
|
+
url.pathname = (0, shared_1.stripTrailingSlashes)(url.pathname) || "/";
|
|
328
329
|
return normalizeRoute(url);
|
|
329
330
|
} catch {
|
|
330
331
|
return decoded;
|
|
@@ -356,9 +357,9 @@ var require_exploration_parser = __commonJS({
|
|
|
356
357
|
const text = String(route ?? "").trim();
|
|
357
358
|
const at = text.indexOf("#/");
|
|
358
359
|
if (at < 0)
|
|
359
|
-
return text.startsWith("#") ? text.split("?")[0].toLowerCase()
|
|
360
|
+
return text.startsWith("#") ? (0, shared_1.stripTrailingSlashes)(text.split("?")[0].toLowerCase()) : null;
|
|
360
361
|
const hashPath = text.slice(at).split("?")[0].toLowerCase();
|
|
361
|
-
return hashPath.length > 2 ?
|
|
362
|
+
return hashPath.length > 2 ? (0, shared_1.stripTrailingSlashes)(hashPath) || "#/" : hashPath;
|
|
362
363
|
}
|
|
363
364
|
function routeIsWithinFocusAreas(route, focusAreas, otherRoutes) {
|
|
364
365
|
if (!focusAreas || focusAreas.length === 0)
|
|
@@ -839,6 +840,7 @@ var require_survey_repo_route_frontier = __commonJS({
|
|
|
839
840
|
exports.buildRepoRouteCandidates = buildRepoRouteCandidates;
|
|
840
841
|
exports.routeIdsHiddenFromChecklist = routeIdsHiddenFromChecklist;
|
|
841
842
|
exports.parseRepoRouteCoverage = parseRepoRouteCoverage;
|
|
843
|
+
var shared_1 = (init_dist(), __toCommonJS(dist_exports));
|
|
842
844
|
var route_manifest_js_1 = require_route_manifest();
|
|
843
845
|
var survey_scope_js_1 = require_survey_scope();
|
|
844
846
|
var repo_route_safety_js_1 = require_repo_route_safety();
|
|
@@ -900,7 +902,7 @@ var require_survey_repo_route_frontier = __commonJS({
|
|
|
900
902
|
return route;
|
|
901
903
|
try {
|
|
902
904
|
const base = new URL(baseUrl);
|
|
903
|
-
return `${base.pathname
|
|
905
|
+
return `${(0, shared_1.stripTrailingSlashes)(base.pathname) || "/"}${route}`;
|
|
904
906
|
} catch {
|
|
905
907
|
return `/${route}`;
|
|
906
908
|
}
|
|
@@ -1131,7 +1133,7 @@ var require_survey_repo_route_frontier = __commonJS({
|
|
|
1131
1133
|
try {
|
|
1132
1134
|
const base = new URL(input.baseUrl);
|
|
1133
1135
|
origin = base.origin;
|
|
1134
|
-
basePathname = base.pathname
|
|
1136
|
+
basePathname = (0, shared_1.stripTrailingSlashes)(base.pathname) || "/";
|
|
1135
1137
|
} catch {
|
|
1136
1138
|
origin = null;
|
|
1137
1139
|
}
|
|
@@ -1164,7 +1166,7 @@ var require_survey_repo_route_frontier = __commonJS({
|
|
|
1164
1166
|
return null;
|
|
1165
1167
|
if (parsed.origin !== this.appOrigin)
|
|
1166
1168
|
return null;
|
|
1167
|
-
const pathname = parsed.pathname
|
|
1169
|
+
const pathname = (0, shared_1.stripTrailingSlashes)(parsed.pathname) || "/";
|
|
1168
1170
|
const key = manifestRouteKey(`${parsed.pathname}${parsed.search}${parsed.hash}`);
|
|
1169
1171
|
if (!key)
|
|
1170
1172
|
return null;
|
|
@@ -1629,6 +1631,7 @@ var require_repo_feature_verification = __commonJS({
|
|
|
1629
1631
|
exports.parseBrowserVerificationRequirement = parseBrowserVerificationRequirement;
|
|
1630
1632
|
exports.parseBrowserVerificationResult = parseBrowserVerificationResult;
|
|
1631
1633
|
exports.renderBrowserVerificationForPrompt = renderBrowserVerificationForPrompt;
|
|
1634
|
+
var shared_1 = (init_dist(), __toCommonJS(dist_exports));
|
|
1632
1635
|
var survey_repo_route_frontier_js_1 = require_survey_repo_route_frontier();
|
|
1633
1636
|
var ABSOLUTE_URL = /^[a-z][a-z0-9+.-]*:\/\//i;
|
|
1634
1637
|
function originOf(url) {
|
|
@@ -1685,7 +1688,7 @@ var require_repo_feature_verification = __commonJS({
|
|
|
1685
1688
|
before = before.split("?")[0];
|
|
1686
1689
|
if (!before.startsWith("/"))
|
|
1687
1690
|
return null;
|
|
1688
|
-
return
|
|
1691
|
+
return (0, shared_1.stripTrailingSlashes)(before);
|
|
1689
1692
|
}
|
|
1690
1693
|
function sameHashMount(route, entry) {
|
|
1691
1694
|
const entryMount = hashMount(entry);
|
|
@@ -1741,7 +1744,7 @@ var require_repo_feature_verification = __commonJS({
|
|
|
1741
1744
|
function compileEntryPattern(pattern) {
|
|
1742
1745
|
const trimmed = String(pattern ?? "").trim();
|
|
1743
1746
|
const hashAt = trimmed.indexOf("#/");
|
|
1744
|
-
const raw = (hashAt >= 0 || trimmed.startsWith("#") ? trimmed.slice(Math.max(hashAt, 0)).split("?")[0] : trimmed.split(/[?#]/)[0])
|
|
1747
|
+
const raw = (0, shared_1.stripTrailingSlashes)(hashAt >= 0 || trimmed.startsWith("#") ? trimmed.slice(Math.max(hashAt, 0)).split("?")[0] : trimmed.split(/[?#]/)[0]);
|
|
1745
1748
|
if (!isEntrySpelling(raw) || raw.length > 500)
|
|
1746
1749
|
return null;
|
|
1747
1750
|
let out = "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dist_exports,
|
|
3
3
|
init_dist
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IGXGSDE3.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require,
|
|
@@ -21,8 +21,11 @@ var require_survey_network_guard = __commonJS({
|
|
|
21
21
|
exports.maskedPath = maskedPath;
|
|
22
22
|
exports.bodyKeysOf = bodyKeysOf;
|
|
23
23
|
exports.graphqlDocumentIsQueryOnly = graphqlDocumentIsQueryOnly;
|
|
24
|
+
exports.graphqlOperationRoots = graphqlOperationRoots;
|
|
24
25
|
exports.isTokenRefreshWrite = isTokenRefreshWrite;
|
|
25
26
|
exports.isSignInPathWrite = isSignInPathWrite;
|
|
27
|
+
exports.graphqlUrlCarriesQuery = graphqlUrlCarriesQuery;
|
|
28
|
+
exports.graphqlGetMayWrite = graphqlGetMayWrite;
|
|
26
29
|
exports.writeShapedGet = writeShapedGet;
|
|
27
30
|
exports.decideSurveyRequest = decideSurveyRequest;
|
|
28
31
|
exports.installSurveyNetworkGuard = installSurveyNetworkGuard;
|
|
@@ -299,6 +302,100 @@ var require_survey_network_guard = __commonJS({
|
|
|
299
302
|
}
|
|
300
303
|
return depth === 0 && parens === 0 && objects === 0 && sawOperation;
|
|
301
304
|
}
|
|
305
|
+
function graphqlOperationRoots(text) {
|
|
306
|
+
const tokens = lexGraphql(text);
|
|
307
|
+
if (!tokens)
|
|
308
|
+
return null;
|
|
309
|
+
const ops = [];
|
|
310
|
+
let depth = 0;
|
|
311
|
+
let parens = 0;
|
|
312
|
+
let objects = 0;
|
|
313
|
+
let defStart = true;
|
|
314
|
+
let kind = null;
|
|
315
|
+
let current = null;
|
|
316
|
+
let prev = "";
|
|
317
|
+
for (const tok of tokens) {
|
|
318
|
+
const last = prev;
|
|
319
|
+
prev = tok;
|
|
320
|
+
if (tok === "(") {
|
|
321
|
+
parens++;
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
if (tok === ")") {
|
|
325
|
+
parens--;
|
|
326
|
+
if (parens < 0 || objects !== 0)
|
|
327
|
+
return null;
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
if (parens > 0) {
|
|
331
|
+
if (tok === "{")
|
|
332
|
+
objects++;
|
|
333
|
+
else if (tok === "}") {
|
|
334
|
+
objects--;
|
|
335
|
+
if (objects < 0)
|
|
336
|
+
return null;
|
|
337
|
+
}
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
if (tok === "{") {
|
|
341
|
+
if (depth === 0) {
|
|
342
|
+
if (defStart)
|
|
343
|
+
kind = "query";
|
|
344
|
+
else if (kind === null)
|
|
345
|
+
return null;
|
|
346
|
+
current = kind === "fragment" ? null : { kind, roots: [] };
|
|
347
|
+
if (current)
|
|
348
|
+
ops.push(current);
|
|
349
|
+
defStart = false;
|
|
350
|
+
}
|
|
351
|
+
depth++;
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
if (tok === "}") {
|
|
355
|
+
depth--;
|
|
356
|
+
if (depth < 0)
|
|
357
|
+
return null;
|
|
358
|
+
if (depth === 0) {
|
|
359
|
+
defStart = true;
|
|
360
|
+
kind = null;
|
|
361
|
+
current = null;
|
|
362
|
+
}
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
if (depth === 0) {
|
|
366
|
+
if (!/^[_A-Za-z]/.test(tok)) {
|
|
367
|
+
if (tok === "@")
|
|
368
|
+
continue;
|
|
369
|
+
return null;
|
|
370
|
+
}
|
|
371
|
+
if (defStart) {
|
|
372
|
+
if (tok !== "query" && tok !== "mutation" && tok !== "fragment")
|
|
373
|
+
return null;
|
|
374
|
+
kind = tok;
|
|
375
|
+
defStart = false;
|
|
376
|
+
}
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
if (depth > 1 || !current)
|
|
380
|
+
continue;
|
|
381
|
+
if (/^[_A-Za-z]/.test(tok)) {
|
|
382
|
+
if (last === "@")
|
|
383
|
+
continue;
|
|
384
|
+
if (last === ":") {
|
|
385
|
+
if (current.roots.length === 0)
|
|
386
|
+
return null;
|
|
387
|
+
current.roots[current.roots.length - 1] = tok;
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
current.roots.push(tok);
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
if (tok === ":" || tok === "@")
|
|
394
|
+
continue;
|
|
395
|
+
return null;
|
|
396
|
+
}
|
|
397
|
+
return depth === 0 && parens === 0 && objects === 0 ? ops : null;
|
|
398
|
+
}
|
|
302
399
|
function isGraphqlQueryOnly(postData) {
|
|
303
400
|
if (!postData || postData.length > MAX_BODY_CHARS)
|
|
304
401
|
return false;
|
|
@@ -336,6 +433,34 @@ var require_survey_network_guard = __commonJS({
|
|
|
336
433
|
"remove"
|
|
337
434
|
]);
|
|
338
435
|
var NOT_A_SESSION_END = (segs) => !segs.some((seg) => SESSION_END_SEGMENTS.has(seg));
|
|
436
|
+
var DESTRUCTIVE_WORDS = /* @__PURE__ */ new Set([
|
|
437
|
+
"delete",
|
|
438
|
+
"remove",
|
|
439
|
+
"destroy",
|
|
440
|
+
"deactivate",
|
|
441
|
+
"terminate",
|
|
442
|
+
"purge",
|
|
443
|
+
"wipe",
|
|
444
|
+
"erase",
|
|
445
|
+
"cancel",
|
|
446
|
+
"close",
|
|
447
|
+
"revoke",
|
|
448
|
+
"unlink",
|
|
449
|
+
"disconnect"
|
|
450
|
+
]);
|
|
451
|
+
var DESTRUCTIVE_PREFIXES = ["delete", "remove", "destroy", "deactivate", "terminate", "purge"];
|
|
452
|
+
function hasDestructiveSegment(rawSegs) {
|
|
453
|
+
return rawSegs.some((raw) => {
|
|
454
|
+
let seg = raw;
|
|
455
|
+
try {
|
|
456
|
+
seg = decodeURIComponent(raw);
|
|
457
|
+
} catch {
|
|
458
|
+
}
|
|
459
|
+
const words = seg.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/);
|
|
460
|
+
return words.some((word) => DESTRUCTIVE_WORDS.has(word) || DESTRUCTIVE_PREFIXES.some((p) => word.startsWith(p)));
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
var rawPathSegments = (pathname) => pathname.split("/").map((seg) => seg.split(";")[0]).filter(Boolean);
|
|
339
464
|
var pathSegments = (pathname) => pathname.toLowerCase().split("/").map((seg) => seg.split(";")[0]).filter(Boolean);
|
|
340
465
|
function isTokenRefreshWrite(method, pathname, recentAction = false) {
|
|
341
466
|
if (method.toUpperCase() !== "POST")
|
|
@@ -352,6 +477,8 @@ var require_survey_network_guard = __commonJS({
|
|
|
352
477
|
var AUTH_PAGE_PATH_RE = /(?:^|\/)(?:log-?in|sign-?in|sign_in|auth|oauth2?|sso|callback)(?:\/|$)/;
|
|
353
478
|
var SIGN_IN_SEGMENT_RE = /^(?:log-?in|sign-?in|sign_in)$/;
|
|
354
479
|
var CALLBACK_ROOT_SEGMENTS = /* @__PURE__ */ new Set(["auth", "oauth", "oauth2", "sso"]);
|
|
480
|
+
var CALLBACK_PROTOCOL_SEGMENTS = /* @__PURE__ */ new Set(["oidc", "openid", "openid-connect", "openidconnect", "saml", "saml2", "oauth", "oauth2"]);
|
|
481
|
+
var API_VERSION_SEGMENT_RE = /^v[0-9]{1,3}$/;
|
|
355
482
|
var PROVIDER_SEGMENT_RE = /^[a-z][a-z0-9_-]{0,39}$/;
|
|
356
483
|
var NOT_A_PROVIDER_SEGMENTS = /* @__PURE__ */ new Set([
|
|
357
484
|
"link",
|
|
@@ -390,14 +517,21 @@ var require_survey_network_guard = __commonJS({
|
|
|
390
517
|
if (!NOT_A_SESSION_END(segs))
|
|
391
518
|
return false;
|
|
392
519
|
if (AUTH_END_PATH_RE.test(`/${segs.join("/")}`))
|
|
393
|
-
return
|
|
520
|
+
return !hasDestructiveSegment(rawPathSegments(pathname).slice(0, -1));
|
|
521
|
+
let top = segs[0] === "api" ? 1 : 0;
|
|
522
|
+
if (top < segs.length && API_VERSION_SEGMENT_RE.test(segs[top]))
|
|
523
|
+
top += 1;
|
|
524
|
+
const below = segs.length - top;
|
|
525
|
+
const isProvider = (seg) => PROVIDER_SEGMENT_RE.test(seg) && !NOT_A_PROVIDER_SEGMENTS.has(seg);
|
|
394
526
|
const provider = segs[segs.length - 1];
|
|
395
|
-
const authRootAtTop =
|
|
396
|
-
if (segs.length >= 3 && authRootAtTop && CALLBACK_ROOT_SEGMENTS.has(segs[segs.length - 3]) &&
|
|
527
|
+
const authRootAtTop = below === 3 || segs[segs.length - 4] === "api" && segs[segs.length - 3] === "auth";
|
|
528
|
+
if (segs.length >= 3 && authRootAtTop && CALLBACK_ROOT_SEGMENTS.has(segs[segs.length - 3]) && isProvider(provider)) {
|
|
397
529
|
const step = segs[segs.length - 2];
|
|
398
530
|
if (step === "callback" || step === "signin")
|
|
399
531
|
return true;
|
|
400
532
|
}
|
|
533
|
+
if (below === 4 && CALLBACK_ROOT_SEGMENTS.has(segs[top]) && CALLBACK_PROTOCOL_SEGMENTS.has(segs[top + 1]) && isProvider(segs[top + 2]) && segs[top + 3] === "callback")
|
|
534
|
+
return true;
|
|
401
535
|
if (segs.length < 2 || segs[segs.length - 1] !== "callback")
|
|
402
536
|
return false;
|
|
403
537
|
const parent = segs[segs.length - 2];
|
|
@@ -424,7 +558,7 @@ var require_survey_network_guard = __commonJS({
|
|
|
424
558
|
try {
|
|
425
559
|
const a = new URL(url);
|
|
426
560
|
const b = new URL(appBaseUrl);
|
|
427
|
-
const path = (u) => u.pathname
|
|
561
|
+
const path = (u) => (0, shared_1.stripTrailingSlashes)(u.pathname);
|
|
428
562
|
return a.origin === b.origin && path(a) === path(b);
|
|
429
563
|
} catch {
|
|
430
564
|
return false;
|
|
@@ -446,9 +580,15 @@ var require_survey_network_guard = __commonJS({
|
|
|
446
580
|
const bodyHash = (0, node_crypto_1.createHash)("sha256").update(req.postData ?? "").digest("hex").slice(0, 16);
|
|
447
581
|
return `${record.method} ${url.hostname.toLowerCase()}${url.pathname} ${bodyHash}`;
|
|
448
582
|
}
|
|
449
|
-
function
|
|
450
|
-
|
|
451
|
-
|
|
583
|
+
function graphqlUrlCarriesQuery(params) {
|
|
584
|
+
return params.has("query");
|
|
585
|
+
}
|
|
586
|
+
function graphqlGetMayWrite(url, body) {
|
|
587
|
+
const docs = url.searchParams.getAll("query");
|
|
588
|
+
return docs.length > 0 && (typeof body === "string" && body.length > 0 || docs.some((doc) => !graphqlDocumentIsQueryOnly(doc)));
|
|
589
|
+
}
|
|
590
|
+
function isGraphqlGetWrite(url, s, body) {
|
|
591
|
+
return isGraphqlEndpoint(url, s) && graphqlGetMayWrite(url, body);
|
|
452
592
|
}
|
|
453
593
|
exports.WRITE_VERBS = /* @__PURE__ */ new Set([
|
|
454
594
|
"cancel",
|
|
@@ -652,7 +792,7 @@ var require_survey_network_guard = __commonJS({
|
|
|
652
792
|
if (url.protocol !== "http:" && url.protocol !== "https:")
|
|
653
793
|
return { action: "allow", rule: readMethod ? "read" : "non-http" };
|
|
654
794
|
const appSite = isAppSite(url.hostname, s.appBaseUrl);
|
|
655
|
-
const graphqlGet = method === "GET" && isGraphqlGetWrite(url, s);
|
|
795
|
+
const graphqlGet = method === "GET" && isGraphqlGetWrite(url, s, req.postData);
|
|
656
796
|
const inActionWindow = s.lastActionAt > 0 && s.now - s.lastActionAt <= ACTION_NAVIGATION_WINDOW_MS;
|
|
657
797
|
const typedLoad = s.agentLoad === true && req.resourceType === "document";
|
|
658
798
|
const writeShaped = method === "GET" && appSite && !graphqlGet && (inActionWindow || typedLoad) ? writeShapedGet(req.url, {
|
|
@@ -686,7 +826,7 @@ var require_survey_network_guard = __commonJS({
|
|
|
686
826
|
return { action: "allow", rule: "extra-pattern", reason: extra.reason, record };
|
|
687
827
|
if (graphqlGet)
|
|
688
828
|
return { action: "block", rule: "app-write", record };
|
|
689
|
-
if (method === "POST" && isGraphqlEndpoint(url, s) && isGraphqlQueryOnly(req.postData))
|
|
829
|
+
if (method === "POST" && isGraphqlEndpoint(url, s) && !graphqlUrlCarriesQuery(url.searchParams) && isGraphqlQueryOnly(req.postData))
|
|
690
830
|
return { action: "allow", rule: "graphql-query", record };
|
|
691
831
|
const passive = s.lastNavigationAt > 0 && (s.lastActionAt === 0 || s.lastNavigationAt >= s.lastActionAt) && s.now - s.lastNavigationAt <= s.passiveWindowMs;
|
|
692
832
|
const signature = learnableSignature(req, url, record, s);
|
|
@@ -718,7 +858,7 @@ var require_survey_network_guard = __commonJS({
|
|
|
718
858
|
const re = new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, ""));
|
|
719
859
|
return { reason, test: (hostPath) => re.test(hostPath) };
|
|
720
860
|
}
|
|
721
|
-
const p = pattern.trim().toLowerCase()
|
|
861
|
+
const p = (0, shared_1.stripTrailingSlashes)(pattern.trim().toLowerCase());
|
|
722
862
|
if (p.includes("/"))
|
|
723
863
|
return { reason, test: (hostPath) => hostPath.toLowerCase() === p || hostPath.toLowerCase().startsWith(`${p}/`) };
|
|
724
864
|
return { reason, test: (hostPath) => {
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
require_google_signin,
|
|
3
3
|
require_harness_init_script,
|
|
4
4
|
require_test_inbox_broker
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FQUH2PU2.mjs";
|
|
6
6
|
import {
|
|
7
7
|
dist_exports,
|
|
8
8
|
init_dist
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IGXGSDE3.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__commonJS,
|
|
12
12
|
__require,
|
|
@@ -553,11 +553,13 @@ var require_proc_table = __commonJS({
|
|
|
553
553
|
"../runner-core/dist/utils/proc-table.js"(exports) {
|
|
554
554
|
"use strict";
|
|
555
555
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
556
|
+
exports.PS_MAX_BUFFER = void 0;
|
|
556
557
|
exports.isMissingBinaryError = isMissingBinaryError;
|
|
557
558
|
exports.parseProcStat = parseProcStat;
|
|
558
559
|
exports.readProcRssKb = readProcRssKb;
|
|
559
560
|
exports.readProcTable = readProcTable;
|
|
560
561
|
var node_fs_1 = __require("fs");
|
|
562
|
+
exports.PS_MAX_BUFFER = 32 * 1024 * 1024;
|
|
561
563
|
var CLOCK_TICKS_PER_SECOND = 100;
|
|
562
564
|
function isMissingBinaryError(error) {
|
|
563
565
|
return error?.code === "ENOENT";
|
|
@@ -643,14 +645,13 @@ var require_kill_tree = __commonJS({
|
|
|
643
645
|
var proc_table_js_1 = require_proc_table();
|
|
644
646
|
var execFileAsync = (0, node_util_1.promisify)(node_child_process_1.execFile);
|
|
645
647
|
var PS_TIMEOUT_MS = 2e3;
|
|
646
|
-
var PS_BUFFER = 1024 * 1024;
|
|
647
648
|
async function listProcessRows(timeoutMs = PS_TIMEOUT_MS) {
|
|
648
649
|
const controller = new AbortController();
|
|
649
650
|
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
650
651
|
timer.unref?.();
|
|
651
652
|
try {
|
|
652
653
|
const { stdout } = await execFileAsync("ps", ["-A", "-o", "pid=,ppid=,command="], {
|
|
653
|
-
maxBuffer:
|
|
654
|
+
maxBuffer: proc_table_js_1.PS_MAX_BUFFER,
|
|
654
655
|
signal: controller.signal
|
|
655
656
|
});
|
|
656
657
|
const rows = [];
|
|
@@ -687,7 +688,7 @@ var require_kill_tree = __commonJS({
|
|
|
687
688
|
timer.unref?.();
|
|
688
689
|
try {
|
|
689
690
|
const { stdout } = await execFileAsync("ps", ["-A", "-o", "pid=,ppid=,pgid=,stat="], {
|
|
690
|
-
maxBuffer:
|
|
691
|
+
maxBuffer: proc_table_js_1.PS_MAX_BUFFER,
|
|
691
692
|
signal: controller.signal
|
|
692
693
|
});
|
|
693
694
|
const tree = /* @__PURE__ */ new Map();
|
|
@@ -797,15 +798,15 @@ var require_kill_tree = __commonJS({
|
|
|
797
798
|
const rows = await listProcessRows(timeoutMs);
|
|
798
799
|
return new Set(rows.filter((row) => row.ppid === parentPid && commandRegex.test(row.command)).map((row) => row.pid));
|
|
799
800
|
} catch {
|
|
800
|
-
return
|
|
801
|
+
return null;
|
|
801
802
|
}
|
|
802
803
|
}
|
|
803
804
|
var chromiumLaunchTail = Promise.resolve();
|
|
804
805
|
async function launchWithChromiumRootPid(launch, options = {}) {
|
|
805
806
|
const run = async () => {
|
|
806
|
-
const prior = await snapshotMatchingChildren(process.pid, options.commandRegex, options.timeoutMs).catch(() =>
|
|
807
|
+
const prior = await snapshotMatchingChildren(process.pid, options.commandRegex, options.timeoutMs).catch(() => null);
|
|
807
808
|
const value = await launch();
|
|
808
|
-
const rootPid = await findNewChromiumChildPid(process.pid, prior, options).catch(() => null);
|
|
809
|
+
const rootPid = prior ? await findNewChromiumChildPid(process.pid, prior, options).catch(() => null) : null;
|
|
809
810
|
return { value, rootPid };
|
|
810
811
|
};
|
|
811
812
|
const turn = chromiumLaunchTail.then(run);
|
|
@@ -5736,9 +5737,9 @@ export {
|
|
|
5736
5737
|
require_survey_door_harvester,
|
|
5737
5738
|
require_self_account_guard,
|
|
5738
5739
|
require_test_user_identity_guard,
|
|
5740
|
+
require_mcp_redaction_secrets,
|
|
5739
5741
|
require_playwright_mcp_server,
|
|
5740
5742
|
require_mcp_rooted_client,
|
|
5741
|
-
require_mcp_redaction_secrets,
|
|
5742
5743
|
require_proc_table,
|
|
5743
5744
|
require_kill_tree,
|
|
5744
5745
|
require_playwright_mcp_config,
|