vibecode-anything 0.3.0 → 0.4.0
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 +239 -67
- package/dist/cli.js +2140 -73
- package/dist/core/adapters.d.ts +26 -3
- package/dist/core/adapters.js +411 -25
- package/dist/core/agent-adapter.d.ts +67 -0
- package/dist/core/agent-adapter.js +312 -0
- package/dist/core/anti-cheat.d.ts +6 -0
- package/dist/core/anti-cheat.js +372 -0
- package/dist/core/badge.d.ts +18 -0
- package/dist/core/badge.js +360 -0
- package/dist/core/cache.d.ts +47 -0
- package/dist/core/cache.js +403 -0
- package/dist/core/ci-export.d.ts +35 -0
- package/dist/core/ci-export.js +796 -0
- package/dist/core/ci-formats.d.ts +21 -0
- package/dist/core/ci-formats.js +388 -0
- package/dist/core/client-codegen.d.ts +36 -0
- package/dist/core/client-codegen.js +2538 -0
- package/dist/core/compose.d.ts +71 -0
- package/dist/core/compose.js +1088 -0
- package/dist/core/docs-export.d.ts +37 -0
- package/dist/core/docs-export.js +2706 -0
- package/dist/core/doctor.d.ts +21 -1
- package/dist/core/doctor.js +234 -21
- package/dist/core/exec.d.ts +26 -2
- package/dist/core/exec.js +235 -8
- package/dist/core/fixtures.d.ts +153 -0
- package/dist/core/fixtures.js +2245 -0
- package/dist/core/format.d.ts +77 -0
- package/dist/core/format.js +632 -0
- package/dist/core/fs-snapshot.d.ts +37 -0
- package/dist/core/fs-snapshot.js +216 -0
- package/dist/core/graphql-export.d.ts +34 -0
- package/dist/core/graphql-export.js +2482 -0
- package/dist/core/har-export.d.ts +29 -0
- package/dist/core/har-export.js +988 -0
- package/dist/core/html-report.d.ts +27 -0
- package/dist/core/html-report.js +1535 -0
- package/dist/core/http-export.d.ts +31 -0
- package/dist/core/http-export.js +726 -0
- package/dist/core/impact.d.ts +80 -0
- package/dist/core/impact.js +1412 -0
- package/dist/core/lint.d.ts +38 -0
- package/dist/core/lint.js +1111 -0
- package/dist/core/load-export.d.ts +37 -0
- package/dist/core/load-export.js +1813 -0
- package/dist/core/mcp-export.d.ts +35 -0
- package/dist/core/mcp-export.js +1736 -0
- package/dist/core/mock-server.d.ts +47 -0
- package/dist/core/mock-server.js +1722 -0
- package/dist/core/openapi-export.d.ts +44 -0
- package/dist/core/openapi-export.js +1074 -0
- package/dist/core/parity.d.ts +6 -1
- package/dist/core/parity.js +36 -1
- package/dist/core/playwright-exporter.d.ts +23 -0
- package/dist/core/playwright-exporter.js +1343 -0
- package/dist/core/png.js +45 -9
- package/dist/core/regression.d.ts +54 -0
- package/dist/core/regression.js +529 -0
- package/dist/core/responsive.d.ts +86 -0
- package/dist/core/responsive.js +606 -0
- package/dist/core/run.d.ts +74 -0
- package/dist/core/run.js +696 -0
- package/dist/core/scheduler.d.ts +24 -0
- package/dist/core/scheduler.js +162 -0
- package/dist/core/schema-export.d.ts +29 -0
- package/dist/core/schema-export.js +2215 -0
- package/dist/core/schema.d.ts +3 -2
- package/dist/core/schema.js +460 -17
- package/dist/core/security.d.ts +233 -0
- package/dist/core/security.js +1839 -0
- package/dist/core/server-export.d.ts +38 -0
- package/dist/core/server-export.js +3198 -0
- package/dist/core/spec-writer.d.ts +9 -0
- package/dist/core/spec-writer.js +1202 -0
- package/dist/core/store.d.ts +11 -2
- package/dist/core/store.js +128 -8
- package/dist/core/target-map.d.ts +34 -0
- package/dist/core/target-map.js +262 -0
- package/dist/core/test-exporter.d.ts +25 -0
- package/dist/core/test-exporter.js +1918 -0
- package/dist/core/types.d.ts +182 -14
- package/dist/core/visual-semantic.d.ts +67 -0
- package/dist/core/visual-semantic.js +673 -0
- package/dist/core/visual.js +65 -16
- package/dist/core/watch.d.ts +28 -3
- package/dist/core/watch.js +222 -12
- package/dist/core/yaml.d.ts +5 -0
- package/dist/core/yaml.js +1009 -0
- package/dist/diagnostics/diagnose.d.ts +53 -0
- package/dist/diagnostics/diagnose.js +1083 -0
- package/dist/diagnostics/flake.d.ts +71 -0
- package/dist/diagnostics/flake.js +608 -0
- package/dist/diagnostics/mutation-audit.d.ts +69 -0
- package/dist/diagnostics/mutation-audit.js +769 -0
- package/dist/diagnostics/spatial.d.ts +42 -0
- package/dist/diagnostics/spatial.js +346 -0
- package/dist/diagnostics/trends.d.ts +122 -0
- package/dist/diagnostics/trends.js +1190 -0
- package/dist/discovery/discover.d.ts +111 -0
- package/dist/discovery/discover.js +2017 -0
- package/dist/discovery/lock.d.ts +116 -0
- package/dist/discovery/lock.js +1505 -0
- package/dist/discovery/routes.d.ts +36 -0
- package/dist/discovery/routes.js +1494 -0
- package/dist/discovery/test-importer.d.ts +92 -0
- package/dist/discovery/test-importer.js +4952 -0
- package/dist/index.d.ts +123 -0
- package/dist/index.js +99 -0
- package/dist/ingestors/api-collections.d.ts +28 -0
- package/dist/ingestors/api-collections.js +2335 -0
- package/dist/ingestors/api-repo.d.ts +2 -1
- package/dist/ingestors/api-repo.js +483 -85
- package/dist/ingestors/asyncapi.d.ts +26 -0
- package/dist/ingestors/asyncapi.js +2105 -0
- package/dist/ingestors/bridges.d.ts +2 -0
- package/dist/ingestors/bridges.js +702 -0
- package/dist/ingestors/cli.d.ts +2 -1
- package/dist/ingestors/cli.js +234 -46
- package/dist/ingestors/curl.d.ts +14 -0
- package/dist/ingestors/curl.js +1024 -0
- package/dist/ingestors/graphql.d.ts +56 -0
- package/dist/ingestors/graphql.js +1852 -0
- package/dist/ingestors/http-file.d.ts +20 -0
- package/dist/ingestors/http-file.js +923 -0
- package/dist/ingestors/index.js +486 -6
- package/dist/ingestors/openrpc.d.ts +29 -0
- package/dist/ingestors/openrpc.js +1807 -0
- package/dist/ingestors/proto.d.ts +47 -0
- package/dist/ingestors/proto.js +2690 -0
- package/dist/ingestors/trace.d.ts +10 -0
- package/dist/ingestors/trace.js +599 -0
- package/dist/ingestors/video.d.ts +4 -1
- package/dist/ingestors/video.js +86 -36
- package/dist/ingestors/web.d.ts +16 -1
- package/dist/ingestors/web.js +474 -32
- package/dist/mcp/server.js +3532 -67
- package/dist/oracles/api-repo.js +102 -30
- package/dist/oracles/cli.js +65 -17
- package/dist/oracles/http-workflow.d.ts +68 -0
- package/dist/oracles/http-workflow.js +828 -0
- package/dist/oracles/image.js +178 -28
- package/dist/oracles/index.d.ts +3 -1
- package/dist/oracles/index.js +243 -14
- package/dist/oracles/perf-budget.d.ts +90 -0
- package/dist/oracles/perf-budget.js +1329 -0
- package/dist/oracles/stream.d.ts +94 -0
- package/dist/oracles/stream.js +1268 -0
- package/dist/oracles/ui-states.d.ts +49 -0
- package/dist/oracles/ui-states.js +894 -0
- package/dist/oracles/video.d.ts +1 -1
- package/dist/oracles/video.js +232 -16
- package/dist/oracles/web.js +464 -73
- package/dist/plugins/builtins.d.ts +12 -0
- package/dist/plugins/builtins.js +1052 -0
- package/dist/plugins/registry.d.ts +86 -0
- package/dist/plugins/registry.js +554 -0
- package/dist/setup/index.js +145 -33
- package/package.json +56 -47
- package/skills/vibecode-anything/SKILL.md +75 -52
package/dist/ingestors/video.js
CHANGED
|
@@ -2,6 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
4
|
import { VibecodeError } from "../core/errors.js";
|
|
5
|
+
import { buildWindowsCmdSpawn, isWindowsCmdShim } from "../core/exec.js";
|
|
5
6
|
import { findFfmpeg } from "../core/adapters.js";
|
|
6
7
|
import { decodeImage, computeSSIM, computeDHash, hammingDistanceHex, computePixelDiff, extractPalette, extractLayoutRegions } from "../core/visual.js";
|
|
7
8
|
import { ensureDir, saveArtifact, resolveWorkspace } from "../core/store.js";
|
|
@@ -86,14 +87,6 @@ export function cueAt(cues, timestampMs) {
|
|
|
86
87
|
/* ------------------------------------------------------------------ *
|
|
87
88
|
* ffmpeg adapter (optional, injectable for tests)
|
|
88
89
|
* ------------------------------------------------------------------ */
|
|
89
|
-
function quoteWindowsCmdArg(arg) {
|
|
90
|
-
if (arg.length === 0)
|
|
91
|
-
return '""';
|
|
92
|
-
if (!/[\s"&|<>^(),;=%!]/.test(arg))
|
|
93
|
-
return arg;
|
|
94
|
-
const escaped = arg.replace(/(\\*)"/g, '$1$1\\"').replace(/(\\+)$/, "$1$1");
|
|
95
|
-
return `"${escaped}"`;
|
|
96
|
-
}
|
|
97
90
|
function tailDiagnostic(text, maxLen = 600) {
|
|
98
91
|
if (text == null)
|
|
99
92
|
return "";
|
|
@@ -118,12 +111,18 @@ function spawnCapture(cmd, args) {
|
|
|
118
111
|
encoding: "utf8",
|
|
119
112
|
timeout: 120000,
|
|
120
113
|
maxBuffer: 16 * 1024 * 1024,
|
|
121
|
-
windowsHide: true
|
|
114
|
+
windowsHide: true,
|
|
115
|
+
shell: false
|
|
122
116
|
};
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
117
|
+
const res = isWindowsCmdShim(cmd)
|
|
118
|
+
? (() => {
|
|
119
|
+
const spec = buildWindowsCmdSpawn(cmd, args);
|
|
120
|
+
return spawnSync(spec.command, spec.args, {
|
|
121
|
+
...opts,
|
|
122
|
+
windowsVerbatimArguments: spec.windowsVerbatimArguments
|
|
123
|
+
});
|
|
124
|
+
})()
|
|
125
|
+
: spawnSync(cmd, args, opts);
|
|
127
126
|
if (res.error) {
|
|
128
127
|
const errCode = res.error.code;
|
|
129
128
|
const stderr = tailDiagnostic(res.stderr);
|
|
@@ -216,6 +215,34 @@ function periodicTimestamps(durationMs, maxFrames) {
|
|
|
216
215
|
const raw = Array.from({ length: count }, (_, i) => (i === count - 1 ? Math.round(endMs) : Math.round(i * step)));
|
|
217
216
|
return [...new Set(raw)].sort((a, b) => a - b);
|
|
218
217
|
}
|
|
218
|
+
const INVALID_CROP_MESSAGE = "Invalid --crop value; expected w:h:x:y with positive width/height and non-negative offsets.";
|
|
219
|
+
/** Validate and normalize an ffmpeg `w:h:x:y` crop specification. */
|
|
220
|
+
export function parseCropFilter(crop) {
|
|
221
|
+
if (crop === undefined || crop === null || crop === "")
|
|
222
|
+
return undefined;
|
|
223
|
+
if (typeof crop !== "string") {
|
|
224
|
+
throw new VibecodeError("CONTRACT_INVALID", INVALID_CROP_MESSAGE);
|
|
225
|
+
}
|
|
226
|
+
const match = crop.match(/^\s*(\d+):(\d+):(\d+):(\d+)\s*$/);
|
|
227
|
+
if (!match) {
|
|
228
|
+
throw new VibecodeError("CONTRACT_INVALID", INVALID_CROP_MESSAGE);
|
|
229
|
+
}
|
|
230
|
+
const w = Number(match[1]);
|
|
231
|
+
const h = Number(match[2]);
|
|
232
|
+
const x = Number(match[3]);
|
|
233
|
+
const y = Number(match[4]);
|
|
234
|
+
if (!Number.isSafeInteger(w) ||
|
|
235
|
+
!Number.isSafeInteger(h) ||
|
|
236
|
+
!Number.isSafeInteger(x) ||
|
|
237
|
+
!Number.isSafeInteger(y) ||
|
|
238
|
+
w <= 0 ||
|
|
239
|
+
h <= 0 ||
|
|
240
|
+
x < 0 ||
|
|
241
|
+
y < 0) {
|
|
242
|
+
throw new VibecodeError("CONTRACT_INVALID", INVALID_CROP_MESSAGE);
|
|
243
|
+
}
|
|
244
|
+
return `${w}:${h}:${x}:${y}`;
|
|
245
|
+
}
|
|
219
246
|
/**
|
|
220
247
|
* Resolve the ffmpeg adapter.
|
|
221
248
|
* - `deps.ffmpegAdapter` explicitly set (object or `null`) wins — `null` models "absent" in tests.
|
|
@@ -241,10 +268,14 @@ export function resolveFfmpegAdapter(deps = {}) {
|
|
|
241
268
|
]);
|
|
242
269
|
return res.status === 0 ? parseFfprobeDurationMs(res.stdout) : null;
|
|
243
270
|
},
|
|
244
|
-
probeScenes: (src, sceneThreshold, maxFrames) => {
|
|
271
|
+
probeScenes: (src, sceneThreshold, maxFrames, options) => {
|
|
272
|
+
const crop = parseCropFilter(options?.crop);
|
|
273
|
+
const vf = crop
|
|
274
|
+
? `crop=${crop},select='gt(scene\\,${sceneThreshold})',showinfo`
|
|
275
|
+
: `select='gt(scene\\,${sceneThreshold})',showinfo`;
|
|
245
276
|
const res = spawnCapture(ffmpegBin, [
|
|
246
277
|
"-hide_banner", "-i", src,
|
|
247
|
-
"-vf",
|
|
278
|
+
"-vf", vf,
|
|
248
279
|
"-f", "null", "-"
|
|
249
280
|
]);
|
|
250
281
|
const times = parseSceneTimestamps(`${res.stderr || ""}\n${res.stdout || ""}`);
|
|
@@ -263,7 +294,9 @@ export function resolveFfmpegAdapter(deps = {}) {
|
|
|
263
294
|
}
|
|
264
295
|
return times.length ? times.slice(0, maxFrames) : null;
|
|
265
296
|
},
|
|
266
|
-
extractFrames: (src, timestampsMs, outDir) => {
|
|
297
|
+
extractFrames: (src, timestampsMs, outDir, options) => {
|
|
298
|
+
const crop = parseCropFilter(options?.crop);
|
|
299
|
+
const cropArgs = crop ? ["-vf", `crop=${crop}`] : [];
|
|
267
300
|
cleanStaleFrames(outDir);
|
|
268
301
|
const out = [];
|
|
269
302
|
let lastExitCode = null;
|
|
@@ -274,7 +307,7 @@ export function resolveFfmpegAdapter(deps = {}) {
|
|
|
274
307
|
const res = spawnCapture(ffmpegBin, [
|
|
275
308
|
"-hide_banner", "-loglevel", "error", "-y",
|
|
276
309
|
"-ss", String(tsMs / 1000),
|
|
277
|
-
"-i", src, "-frames:v", "1", file
|
|
310
|
+
"-i", src, ...cropArgs, "-frames:v", "1", file
|
|
278
311
|
]);
|
|
279
312
|
if (res.status !== 0) {
|
|
280
313
|
lastExitCode = res.status;
|
|
@@ -288,7 +321,7 @@ export function resolveFfmpegAdapter(deps = {}) {
|
|
|
288
321
|
const retryRes = spawnCapture(ffmpegBin, [
|
|
289
322
|
"-hide_banner", "-loglevel", "error", "-y",
|
|
290
323
|
"-ss", String(retryMs / 1000),
|
|
291
|
-
"-i", src, "-frames:v", "1", file
|
|
324
|
+
"-i", src, ...cropArgs, "-frames:v", "1", file
|
|
292
325
|
]);
|
|
293
326
|
if (retryRes.status !== 0) {
|
|
294
327
|
lastExitCode = retryRes.status;
|
|
@@ -329,30 +362,45 @@ export function ffmpegMissingError() {
|
|
|
329
362
|
});
|
|
330
363
|
}
|
|
331
364
|
/** Extract ordered keyframe files + duration from a video file via the adapter. */
|
|
332
|
-
export function extractVideoFrames(absSource, { cwd, sceneThreshold = 0.18, maxFrames = 12, cacheKey = "ingest" }, adapter) {
|
|
365
|
+
export function extractVideoFrames(absSource, { cwd, sceneThreshold = 0.18, maxFrames = 12, cacheKey = "ingest", crop }, adapter) {
|
|
366
|
+
const normalizedCrop = parseCropFilter(crop);
|
|
333
367
|
if (!adapter)
|
|
334
368
|
throw ffmpegMissingError();
|
|
369
|
+
const effectiveMaxFrames = Math.max(1, Math.floor(maxFrames));
|
|
335
370
|
const rawDuration = adapter.probeDuration(absSource);
|
|
336
371
|
const durationMs = typeof rawDuration === "number" && Number.isFinite(rawDuration) && rawDuration > 0 ? rawDuration : 0;
|
|
337
|
-
let timestamps = adapter.probeScenes(absSource, sceneThreshold, maxFrames);
|
|
338
|
-
if (!Array.isArray(timestamps) || timestamps.length === 0) {
|
|
339
|
-
timestamps = periodicTimestamps(durationMs, Math.min(maxFrames, 4));
|
|
340
|
-
}
|
|
341
|
-
if (!timestamps.includes(0))
|
|
342
|
-
timestamps = [0, ...timestamps];
|
|
343
372
|
const maxTs = durationMs > 20 ? Math.max(0, durationMs - 20) : null;
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
]
|
|
350
|
-
|
|
351
|
-
.
|
|
373
|
+
const normalizeTs = (t) => {
|
|
374
|
+
const nonNeg = Number.isFinite(t) ? Math.max(0, Math.round(t)) : 0;
|
|
375
|
+
return maxTs !== null ? Math.min(maxTs, nonNeg) : nonNeg;
|
|
376
|
+
};
|
|
377
|
+
const rawScenes = adapter.probeScenes(absSource, sceneThreshold, effectiveMaxFrames, { crop: normalizedCrop });
|
|
378
|
+
const sceneTs = Array.isArray(rawScenes) ? rawScenes : [];
|
|
379
|
+
const normalizedSceneTs = [
|
|
380
|
+
...new Set((sceneTs.length > 0 ? [0, ...sceneTs] : []).map(normalizeTs))
|
|
381
|
+
].sort((a, b) => a - b);
|
|
382
|
+
let timestamps;
|
|
383
|
+
if (sceneTs.length === 0 || normalizedSceneTs.length < effectiveMaxFrames) {
|
|
384
|
+
const uniform = periodicTimestamps(durationMs, effectiveMaxFrames);
|
|
385
|
+
const minGapMs = Math.min(100, Math.max(10, Math.floor((durationMs || effectiveMaxFrames * 1000) / (effectiveMaxFrames * 4))));
|
|
386
|
+
const kept = normalizedSceneTs.length > 0 ? [...normalizedSceneTs] : [normalizeTs(0)];
|
|
387
|
+
for (const u of uniform) {
|
|
388
|
+
if (kept.length >= effectiveMaxFrames)
|
|
389
|
+
break;
|
|
390
|
+
const nu = normalizeTs(u);
|
|
391
|
+
if (kept.some((k) => Math.abs(k - nu) <= minGapMs))
|
|
392
|
+
continue;
|
|
393
|
+
kept.push(nu);
|
|
394
|
+
}
|
|
395
|
+
timestamps = kept.sort((a, b) => a - b).slice(0, effectiveMaxFrames);
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
timestamps = normalizedSceneTs.slice(0, effectiveMaxFrames);
|
|
399
|
+
}
|
|
352
400
|
const { cacheDir } = resolveWorkspace(cwd);
|
|
353
401
|
const outDir = path.join(cacheDir, "video-frames", String(cacheKey).replace(/[^A-Za-z0-9_.-]+/g, "-"));
|
|
354
402
|
cleanStaleFrames(outDir);
|
|
355
|
-
const frames = adapter.extractFrames(absSource, timestamps, outDir) || [];
|
|
403
|
+
const frames = adapter.extractFrames(absSource, timestamps, outDir, { crop: normalizedCrop }) || [];
|
|
356
404
|
if (frames.length === 0) {
|
|
357
405
|
throw new VibecodeError("EXEC_ERROR", "ffmpeg did not produce any keyframe images.", {
|
|
358
406
|
adapter: "ffmpeg",
|
|
@@ -463,6 +511,7 @@ export async function ingest(options = {}, deps = {}) {
|
|
|
463
511
|
if (!fs.existsSync(absSource)) {
|
|
464
512
|
throw new VibecodeError("TARGET_MISSING", `Video source not found: ${source}`);
|
|
465
513
|
}
|
|
514
|
+
const crop = parseCropFilter(options.crop);
|
|
466
515
|
const sceneThreshold = typeof options.sceneThreshold === "number" ? options.sceneThreshold : 0.18;
|
|
467
516
|
const maxFrames = typeof options.maxFrames === "number" && Number.isFinite(options.maxFrames) && options.maxFrames > 0
|
|
468
517
|
? Math.floor(options.maxFrames)
|
|
@@ -501,7 +550,7 @@ export async function ingest(options = {}, deps = {}) {
|
|
|
501
550
|
const adapter = resolveFfmpegAdapter(deps);
|
|
502
551
|
if (!adapter)
|
|
503
552
|
throw ffmpegMissingError();
|
|
504
|
-
const extracted = extractVideoFrames(absSource, { cwd, sceneThreshold, maxFrames }, adapter);
|
|
553
|
+
const extracted = extractVideoFrames(absSource, { cwd, sceneThreshold, maxFrames, crop }, adapter);
|
|
505
554
|
frames = extracted.frames;
|
|
506
555
|
durationMs = extracted.durationMs;
|
|
507
556
|
const sidecar = findSidecarSubtitles(absSource);
|
|
@@ -594,7 +643,8 @@ export async function ingest(options = {}, deps = {}) {
|
|
|
594
643
|
frameCount: frames.length,
|
|
595
644
|
stateCount: publicStates.length,
|
|
596
645
|
durationMs,
|
|
597
|
-
hasSubtitles: cues.length > 0
|
|
646
|
+
hasSubtitles: cues.length > 0,
|
|
647
|
+
...(crop ? { crop } : {})
|
|
598
648
|
}
|
|
599
649
|
}
|
|
600
650
|
],
|
package/dist/ingestors/web.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { IngestDeps, IngestOptions, IngestResult, JsonSchema, WebLandmark, WebNetworkExpectation, WebRouteOption } from "../core/types.js";
|
|
1
|
+
import type { IngestDeps, IngestOptions, IngestResult, JsonSchema, PlaywrightBrowserLike, PlaywrightPageLike, PlaywrightResponseLike, Viewport, WebInteractiveLandmark, WebLandmark, WebNetworkExpectation, WebRouteOption } from "../core/types.js";
|
|
2
|
+
export declare const INTERACTIVE_LANDMARK_SELECTOR = "button, a[href], input, select, textarea, [role=\"button\"], [role=\"link\"], [role=\"navigation\"], [role=\"main\"], [role=\"dialog\"], [role=\"tablist\"]";
|
|
2
3
|
type WebRouteInput = WebRouteOption & {
|
|
3
4
|
timeoutMs?: number;
|
|
4
5
|
};
|
|
@@ -13,6 +14,20 @@ declare function extractAllLandmarks(html: string): Array<{
|
|
|
13
14
|
text: string;
|
|
14
15
|
}>;
|
|
15
16
|
declare function extractLandmarks(html: string): WebLandmark[];
|
|
17
|
+
export declare function normalizeSameOriginHref(href: string, baseUrl: string): string | null;
|
|
18
|
+
export declare function extractHtmlHrefs(html: string): string[];
|
|
19
|
+
export interface OpenBrowserPageOptions {
|
|
20
|
+
viewport?: Viewport;
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
storageState?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface OpenedBrowserPage {
|
|
25
|
+
page: PlaywrightPageLike;
|
|
26
|
+
close(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export declare function openBrowserPage(browser: PlaywrightBrowserLike, options?: OpenBrowserPageOptions): Promise<OpenedBrowserPage>;
|
|
29
|
+
export declare function gotoWithSpaFallback(page: PlaywrightPageLike, url: string, waitUntil: string, timeoutMs: number): Promise<PlaywrightResponseLike | null>;
|
|
30
|
+
export declare function extractInteractiveLandmarks(page: PlaywrightPageLike): Promise<WebInteractiveLandmark[]>;
|
|
16
31
|
declare function normalizeNetworkEntry(entry: {
|
|
17
32
|
method?: string;
|
|
18
33
|
pathPattern?: string;
|