@far-world-labs/verblets 0.7.4 → 0.8.1
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 +1 -1
- package/dist/index.browser.js +256 -223
- package/dist/index.js +472 -418
- package/dist/shared-Bdek4t_n.js +15550 -0
- package/package.json +2 -1
- package/dist/shared-BuJg0Ijm.js +0 -13465
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
1
|
+
import de from "dotenv";
|
|
2
|
+
import { i as pe, n as O, c as U, g as se, E as V, a as me, O as T, r as H, j as z, b as he, w as W, D as E, d as C, e as D, s as ae, f as ge, h as fe, k as be, l as ye, p as we } from "./shared-Bdek4t_n.js";
|
|
3
|
+
import { di as $t, Q as Mt, ce as Ft, M as Bt, S as Ot, cu as Ut, aY as zt, cs as _t, aU as jt, cf as qt, P as Vt, N as Wt, dg as Ht, cB as Gt, cw as Jt, cx as Xt, ax as Kt, df as Yt, cz as Qt, cA as Zt, R as es, cC as ts, bo as ss, cy as as, br as rs, cv as ns, cm as os, bI as is, cb as cs, bD as ls, bE as us, cl as ds, a8 as ps, a7 as ms, bG as hs, u as gs, aR as fs, bF as bs, ae as ys, L as ws, H as Ss, K as vs, ci as xs, aQ as ks, bB as Cs, aa as Is, ab as Ps, cZ as As, c7 as Es, x as Ts, m as Rs, cr as Ds, aS as Ls, c5 as Ns, aT as $s, c_ as Ms, bt as Fs, dk as Bs, t as Os, aV as Us, c$ as zs, ch as _s, T as js, _ as qs, v as Vs, cg as Ws, Y as Hs, ac as Gs, ad as Js, ay as Xs, aW as Ks, aZ as Ys, a$ as Qs, b3 as Zs, b2 as ea, bO as ta, c3 as sa, bP as aa, c1 as ra, bQ as na, bT as oa, bU as ia, c2 as ca, bX as la, c0 as ua, b$ as da, dd as pa, bW as ma, b_ as ha, c4 as ga, bY as fa, bZ as ba, bR as ya, aj as wa, af as Sa, ai as va, a5 as xa, a6 as ka, $ as Ca, bH as Ia, ak as Pa, cQ as Aa, b4 as Ea, al as Ta, b5 as Ra, cJ as Da, u as La, am as Na, an as $a, cK as Ma, u as Fa, ao as Ba, av as Oa, aX as Ua, W as za, X as _a, ap as ja, aq as qa, cM as Va, ar as Wa, as as Ha, c9 as Ga, dj as Ja, bJ as Xa, at as Ka, b6 as Ya, d0 as Qa, au as Za, aw as er, az as tr, bK as sr, bL as ar, aA as rr, I as nr, J as or, b1 as ir, cI as cr, ag as lr, ah as ur, aB as dr, b0 as pr, aC as mr, ba as hr, bb as gr, bd as fr, be as br, bh as yr, bi as wr, B as Sr, C as vr, aO as xr, ca as kr, b7 as Cr, b8 as Ir, co as Pr, cj as Ar, aJ as Er, y as Tr, z as Rr, U as Dr, V as Lr, d1 as Nr, cc as $r, cE as Mr, cF as Fr, cH as Br, cD as Or, cG as Ur, ck as zr, cY as _r, bk as jr, bl as qr, b9 as Vr, bL as Wr, d2 as Hr, d8 as Gr, bc as Jr, db as Xr, dc as Kr, d9 as Yr, bf as Qr, c6 as Zr, cL as en, aD as tn, bm as sn, bg as an, bj as rn, dh as nn, de as on, o as cn, ct as ln, G as un, A as dn, F as pn, bn as mn, da as hn, bA as gn, aE as fn, bV as bn, aH as yn, aG as wn, aI as Sn, aK as vn, aF as xn, c8 as kn, bM as Cn, bS as In, q as Pn, bN as An, d7 as En, a_ as Tn, cq as Rn, bp as Dn, bC as Ln, aL as Nn, d3 as $n, bq as Mn, cS as Fn, cR as Bn, a9 as On, aP as Un, aM as zn, aN as _n, bs as jn, a1 as qn, a2 as Vn, a0 as Wn, a4 as Hn, cp as Gn, cn as Jn, bu as Xn, bv as Kn, cT as Yn, cV as Qn, cW as Zn, cU as eo, cX as to, bw as so, bx as ao, cd as ro, d4 as no, a3 as oo, Z as io, d5 as co, bz as lo, by as uo, cN as po, cO as mo, cP as ho, d6 as go } from "./shared-Bdek4t_n.js";
|
|
4
|
+
import * as X from "playwright-core";
|
|
5
5
|
import k from "node:fs";
|
|
6
6
|
import "node:path";
|
|
7
7
|
import "glob";
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
low: { width: 300, quality:
|
|
11
|
-
med: { width: 100, quality:
|
|
12
|
-
high: { width: 50, quality:
|
|
8
|
+
import Se from "node:fs/promises";
|
|
9
|
+
const _ = 60, ve = (t) => ({
|
|
10
|
+
low: { width: 300, quality: _, format: "jpeg" },
|
|
11
|
+
med: { width: 100, quality: _, format: "jpeg" },
|
|
12
|
+
high: { width: 50, quality: _, format: "jpeg" }
|
|
13
13
|
})[t], G = (t) => () => {
|
|
14
14
|
throw new Error(`${t} is not available in browser environment`);
|
|
15
|
-
},
|
|
15
|
+
}, At = G("resizeImage"), Et = G("tileImages"), Tt = G("imageToBase64"), Rt = () => {
|
|
16
16
|
throw new Error("webScrape is not available in browser environment");
|
|
17
|
-
},
|
|
17
|
+
}, xe = async (t, a) => (await t.evaluate(() => {
|
|
18
18
|
const s = /* @__PURE__ */ new Set();
|
|
19
19
|
return [...document.querySelectorAll("a[href]")].map((r) => {
|
|
20
20
|
const i = r.href;
|
|
@@ -101,7 +101,7 @@ const U = 60, xe = (t) => ({
|
|
|
101
101
|
size: e.textContent?.length || 0,
|
|
102
102
|
// First 200 chars of inline scripts to identify patterns
|
|
103
103
|
preview: e.src ? "" : e.textContent?.trim()?.slice(0, 200)
|
|
104
|
-
}))),
|
|
104
|
+
}))), Pe = (t) => t.evaluate(() => {
|
|
105
105
|
const a = (e) => document.querySelector(`meta[name="${e}"], meta[property="${e}"]`)?.content || "";
|
|
106
106
|
return {
|
|
107
107
|
title: document.title || "",
|
|
@@ -128,7 +128,7 @@ const U = 60, xe = (t) => ({
|
|
|
128
128
|
content: e.content?.slice(0, 120)
|
|
129
129
|
}))
|
|
130
130
|
};
|
|
131
|
-
}),
|
|
131
|
+
}), Ae = (t) => t.evaluate(() => {
|
|
132
132
|
const a = [...document.querySelectorAll("h1, h2, h3, h4, h5, h6")].slice(0, 30).map((l) => ({
|
|
133
133
|
level: parseInt(l.tagName[1], 10),
|
|
134
134
|
text: l.textContent?.trim()?.slice(0, 100)
|
|
@@ -143,15 +143,15 @@ const U = 60, xe = (t) => ({
|
|
|
143
143
|
classes: (typeof l.className == "string" ? l.className : l.className?.baseVal || "").slice(0, 80)
|
|
144
144
|
})), s = /* @__PURE__ */ new Set();
|
|
145
145
|
document.querySelectorAll("*").forEach((l) => {
|
|
146
|
-
[...l.attributes].filter((
|
|
146
|
+
[...l.attributes].filter((d) => d.name.startsWith("data-")).forEach((d) => s.add(d.name));
|
|
147
147
|
});
|
|
148
148
|
const r = [...document.querySelectorAll('link[rel="stylesheet"]')].map((l) => l.href), i = /* @__PURE__ */ new Set(), o = (l) => {
|
|
149
|
-
const
|
|
150
|
-
return typeof
|
|
149
|
+
const d = l.className;
|
|
150
|
+
return typeof d == "string" ? d : d?.baseVal || "";
|
|
151
151
|
};
|
|
152
152
|
document.querySelectorAll("[class]").forEach((l) => {
|
|
153
|
-
o(l).split(/\s+/).slice(0, 5).forEach((
|
|
154
|
-
|
|
153
|
+
o(l).split(/\s+/).slice(0, 5).forEach((d) => {
|
|
154
|
+
d && i.add(d);
|
|
155
155
|
});
|
|
156
156
|
});
|
|
157
157
|
const n = [...i].slice(0, 200), c = {}, u = [
|
|
@@ -182,12 +182,12 @@ const U = 60, xe = (t) => ({
|
|
|
182
182
|
for (const l of u)
|
|
183
183
|
try {
|
|
184
184
|
if (window[l] !== void 0) {
|
|
185
|
-
const
|
|
186
|
-
c[l] = typeof
|
|
185
|
+
const d = window[l];
|
|
186
|
+
c[l] = typeof d == "function" ? d.fn?.jquery || d.version || "present" : typeof d == "object" ? "present" : String(d).slice(0, 40);
|
|
187
187
|
}
|
|
188
188
|
} catch {
|
|
189
189
|
}
|
|
190
|
-
const
|
|
190
|
+
const p = /* @__PURE__ */ new Set(), m = [
|
|
191
191
|
"onclick",
|
|
192
192
|
"onsubmit",
|
|
193
193
|
"onchange",
|
|
@@ -199,7 +199,7 @@ const U = 60, xe = (t) => ({
|
|
|
199
199
|
"onkeydown"
|
|
200
200
|
];
|
|
201
201
|
for (const l of m)
|
|
202
|
-
document.querySelectorAll(`[${l}]`).length > 0 &&
|
|
202
|
+
document.querySelectorAll(`[${l}]`).length > 0 && p.add(l);
|
|
203
203
|
return {
|
|
204
204
|
headings: a,
|
|
205
205
|
landmarks: e,
|
|
@@ -207,21 +207,21 @@ const U = 60, xe = (t) => ({
|
|
|
207
207
|
stylesheets: r.slice(0, 20),
|
|
208
208
|
sampleClasses: n,
|
|
209
209
|
globals: c,
|
|
210
|
-
inlineHandlers: [...
|
|
210
|
+
inlineHandlers: [...p],
|
|
211
211
|
iframeCount: document.querySelectorAll("iframe").length,
|
|
212
212
|
shadowRootCount: [...document.querySelectorAll("*")].filter((l) => l.shadowRoot).length
|
|
213
213
|
};
|
|
214
|
-
}),
|
|
214
|
+
}), Ee = async (t) => {
|
|
215
215
|
const a = t.url(), e = new URL(a).origin, [s, r, i, o, n, c] = await Promise.all([
|
|
216
|
-
|
|
216
|
+
xe(t, e),
|
|
217
217
|
ke(t),
|
|
218
218
|
Ce(t),
|
|
219
219
|
Ie(t),
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
Pe(t),
|
|
221
|
+
Ae(t)
|
|
222
222
|
]);
|
|
223
223
|
return { url: a, links: s, forms: r, buttons: i, scripts: o, meta: n, structure: c };
|
|
224
|
-
},
|
|
224
|
+
}, j = (t) => {
|
|
225
225
|
const a = new URL(t);
|
|
226
226
|
a.hash = "";
|
|
227
227
|
const e = Array.from(a.searchParams.entries()).toSorted(([r], [i]) => r.localeCompare(i));
|
|
@@ -229,31 +229,31 @@ const U = 60, xe = (t) => ({
|
|
|
229
229
|
const s = a.toString();
|
|
230
230
|
return s.endsWith("/") && a.pathname !== "/" ? s.slice(0, -1) : s;
|
|
231
231
|
}, Te = (t, a = 2) => `/${new URL(t).pathname.split("/").filter(Boolean).slice(0, a).join("/")}`, Re = (t, a = {}) => {
|
|
232
|
-
const e = new URL(t).origin, s = a.sameDomain !== !1, r = a.maxDepth ?? 10, i = [], o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), u =
|
|
232
|
+
const e = new URL(t).origin, s = a.sameDomain !== !1, r = a.maxDepth ?? 10, i = [], o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), u = j(t);
|
|
233
233
|
return i.push({ url: t, normalized: u, depth: 0, source: "(start)" }), c.add(u), {
|
|
234
234
|
addLinks: (b, w, h) => {
|
|
235
235
|
let y = 0;
|
|
236
236
|
for (const f of b) {
|
|
237
|
-
const
|
|
238
|
-
if (c.has(
|
|
239
|
-
if (c.add(
|
|
240
|
-
n.set(
|
|
237
|
+
const S = f.href || f, v = j(S);
|
|
238
|
+
if (c.has(v)) continue;
|
|
239
|
+
if (c.add(v), s && !S.startsWith(e)) {
|
|
240
|
+
n.set(v, "external");
|
|
241
241
|
continue;
|
|
242
242
|
}
|
|
243
243
|
if (w + 1 > r) {
|
|
244
|
-
n.set(
|
|
244
|
+
n.set(v, "max-depth");
|
|
245
245
|
continue;
|
|
246
246
|
}
|
|
247
|
-
const
|
|
248
|
-
if (/\.(png|jpg|jpeg|gif|svg|ico|css|js|woff2?|ttf|eot|pdf|zip|mp[34])$/i.test(
|
|
249
|
-
n.set(
|
|
247
|
+
const A = new URL(S).pathname;
|
|
248
|
+
if (/\.(png|jpg|jpeg|gif|svg|ico|css|js|woff2?|ttf|eot|pdf|zip|mp[34])$/i.test(A)) {
|
|
249
|
+
n.set(v, "resource");
|
|
250
250
|
continue;
|
|
251
251
|
}
|
|
252
|
-
if (/^(mailto|tel|javascript):/i.test(
|
|
253
|
-
n.set(
|
|
252
|
+
if (/^(mailto|tel|javascript):/i.test(S)) {
|
|
253
|
+
n.set(v, "scheme");
|
|
254
254
|
continue;
|
|
255
255
|
}
|
|
256
|
-
i.push({ url:
|
|
256
|
+
i.push({ url: S, normalized: v, depth: w + 1, source: h }), y++;
|
|
257
257
|
}
|
|
258
258
|
return y;
|
|
259
259
|
},
|
|
@@ -267,11 +267,11 @@ const U = 60, xe = (t) => ({
|
|
|
267
267
|
},
|
|
268
268
|
skip: (b, w) => {
|
|
269
269
|
const h = /* @__PURE__ */ new Set();
|
|
270
|
-
for (const
|
|
271
|
-
const
|
|
272
|
-
n.set(
|
|
270
|
+
for (const S of b) {
|
|
271
|
+
const v = j(S);
|
|
272
|
+
n.set(v, w), h.add(v);
|
|
273
273
|
}
|
|
274
|
-
const y = i.length, f = i.filter((
|
|
274
|
+
const y = i.length, f = i.filter((S) => !h.has(S.normalized));
|
|
275
275
|
return i.splice(0, i.length, ...f), y - f.length;
|
|
276
276
|
},
|
|
277
277
|
pendingByPrefix: (b = 2) => {
|
|
@@ -330,10 +330,10 @@ const U = 60, xe = (t) => ({
|
|
|
330
330
|
}, Le = (t, a) => {
|
|
331
331
|
const e = t * a;
|
|
332
332
|
return t + (Math.random() * 2 - 1) * e;
|
|
333
|
-
},
|
|
333
|
+
}, Ne = (t, a) => {
|
|
334
334
|
const e = a.baseDelay * Math.pow(a.backoffFactor, t), s = Math.min(e, a.maxDelay);
|
|
335
335
|
return Math.round(Le(s, a.jitter));
|
|
336
|
-
},
|
|
336
|
+
}, $e = async (t, a, e, s) => {
|
|
337
337
|
const r = Date.now(), i = r + t;
|
|
338
338
|
let o = 0;
|
|
339
339
|
for (; o < t; ) {
|
|
@@ -346,24 +346,24 @@ const U = 60, xe = (t) => ({
|
|
|
346
346
|
...s
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
|
-
},
|
|
349
|
+
}, Me = async (t, a, e, s, r, i, o) => {
|
|
350
350
|
const n = { ...re, ...r };
|
|
351
351
|
let c = 0;
|
|
352
352
|
for (let u = 0; u <= n.maxRetries; u++) {
|
|
353
|
-
let
|
|
353
|
+
let p;
|
|
354
354
|
try {
|
|
355
|
-
|
|
356
|
-
} catch (
|
|
357
|
-
throw s.emit({ event: I.visitError, url: e, attempt: u, error:
|
|
355
|
+
p = await t(a, e);
|
|
356
|
+
} catch (d) {
|
|
357
|
+
throw s.emit({ event: I.visitError, url: e, attempt: u, error: d.message }), d;
|
|
358
358
|
}
|
|
359
359
|
let m;
|
|
360
360
|
try {
|
|
361
361
|
m = await i(a);
|
|
362
|
-
} catch (
|
|
363
|
-
throw s.emit({ event: I.blockCheckError, url: e, attempt: u, error:
|
|
362
|
+
} catch (d) {
|
|
363
|
+
throw s.emit({ event: I.blockCheckError, url: e, attempt: u, error: d.message }), d;
|
|
364
364
|
}
|
|
365
365
|
if (!m)
|
|
366
|
-
return { pageData:
|
|
366
|
+
return { pageData: p, retries: u, totalCooldownMs: c };
|
|
367
367
|
if (u >= n.maxRetries)
|
|
368
368
|
return s.emit({
|
|
369
369
|
event: I.exhausted,
|
|
@@ -371,8 +371,8 @@ const U = 60, xe = (t) => ({
|
|
|
371
371
|
reason: m,
|
|
372
372
|
attempts: u + 1,
|
|
373
373
|
totalCooldownMs: c
|
|
374
|
-
}), { pageData:
|
|
375
|
-
const l =
|
|
374
|
+
}), { pageData: p, retries: u, totalCooldownMs: c, blocked: m };
|
|
375
|
+
const l = Ne(u, n);
|
|
376
376
|
c += l, s.emit({
|
|
377
377
|
event: I.start,
|
|
378
378
|
url: e,
|
|
@@ -381,7 +381,7 @@ const U = 60, xe = (t) => ({
|
|
|
381
381
|
maxRetries: n.maxRetries,
|
|
382
382
|
delayMs: l,
|
|
383
383
|
totalCooldownMs: c
|
|
384
|
-
}), await
|
|
384
|
+
}), await $e(l, s, o, {
|
|
385
385
|
url: e,
|
|
386
386
|
reason: m,
|
|
387
387
|
attempt: u + 1
|
|
@@ -391,7 +391,7 @@ const U = 60, xe = (t) => ({
|
|
|
391
391
|
attempt: u + 1
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
|
-
},
|
|
394
|
+
}, Fe = (t, a, e) => {
|
|
395
395
|
const s = setInterval(() => {
|
|
396
396
|
t.emit({
|
|
397
397
|
event: I.heartbeat,
|
|
@@ -401,7 +401,7 @@ const U = 60, xe = (t) => ({
|
|
|
401
401
|
return {
|
|
402
402
|
stop: () => clearInterval(s)
|
|
403
403
|
};
|
|
404
|
-
}, K = "site-crawl", Be = "Browser support is disabled. Call init({ browser: true }) to enable.",
|
|
404
|
+
}, K = "site-crawl", Be = "Browser support is disabled. Call init({ browser: true }) to enable.", Oe = (t, a) => {
|
|
405
405
|
const e = a.summary(), s = t.map((r) => `${new URL(r.url).pathname} — ${r.meta.title || "(no title)"} [${r.links.length} links, ${r.forms.length} forms, ${r.buttons.length} buttons]`);
|
|
406
406
|
return [
|
|
407
407
|
`Crawled ${e.visited} pages, ${e.pending} pending, ${e.skipped} skipped.`,
|
|
@@ -410,7 +410,7 @@ const U = 60, xe = (t) => ({
|
|
|
410
410
|
...s.map((r) => ` ${r}`)
|
|
411
411
|
].join(`
|
|
412
412
|
`);
|
|
413
|
-
},
|
|
413
|
+
}, Ue = (t, a, e) => {
|
|
414
414
|
const s = [];
|
|
415
415
|
for (const [r, i] of t) {
|
|
416
416
|
const o = i.slice(0, 5).map((c) => ` ${c.url}`), n = i.length > 5 ? ` ... and ${i.length - 5} more` : "";
|
|
@@ -432,7 +432,7 @@ const U = 60, xe = (t) => ({
|
|
|
432
432
|
"Skip groups that are clearly non-functional (help/support, legal, marketing pages)."
|
|
433
433
|
].join(`
|
|
434
434
|
`);
|
|
435
|
-
},
|
|
435
|
+
}, ze = z("crawl_gate", {
|
|
436
436
|
type: "object",
|
|
437
437
|
properties: {
|
|
438
438
|
decisions: {
|
|
@@ -462,27 +462,32 @@ const U = 60, xe = (t) => ({
|
|
|
462
462
|
}), _e = async (t, a, e, s) => {
|
|
463
463
|
const r = t.pendingByPrefix(2);
|
|
464
464
|
if (r.size === 0) return { explore: [], skip: [], decisions: [] };
|
|
465
|
-
const i =
|
|
465
|
+
const i = Oe(a, t), o = Ue(r, i, e), n = await H(o, {
|
|
466
466
|
...s,
|
|
467
|
-
responseFormat:
|
|
467
|
+
responseFormat: ze,
|
|
468
468
|
temperature: 0.2
|
|
469
|
-
})
|
|
469
|
+
});
|
|
470
|
+
if (!n || typeof n != "object" || !Array.isArray(n.decisions))
|
|
471
|
+
throw new Error(
|
|
472
|
+
`site-crawl: expected { decisions: [] } from gate LLM (got ${n === null ? "null" : typeof n})`
|
|
473
|
+
);
|
|
474
|
+
const { decisions: c } = n, u = [], p = [];
|
|
470
475
|
for (const m of c) {
|
|
471
476
|
const l = r.get(m.prefix);
|
|
472
477
|
if (l)
|
|
473
478
|
if (m.action === "skip")
|
|
474
|
-
|
|
479
|
+
p.push(...l.map((d) => d.url));
|
|
475
480
|
else {
|
|
476
|
-
const
|
|
477
|
-
u.push(...l.slice(0,
|
|
481
|
+
const d = Math.min(m.maxFromGroup || 3, 5, l.length);
|
|
482
|
+
u.push(...l.slice(0, d).map((g) => g.url)), l.length > d && p.push(...l.slice(d).map((g) => g.url));
|
|
478
483
|
}
|
|
479
484
|
}
|
|
480
485
|
for (const [m, l] of r)
|
|
481
|
-
c.some((g) => g.prefix === m) || (u.push(l[0].url), l.length > 1 &&
|
|
482
|
-
return { explore: u, skip:
|
|
486
|
+
c.some((g) => g.prefix === m) || (u.push(l[0].url), l.length > 1 && p.push(...l.slice(1).map((g) => g.url)));
|
|
487
|
+
return { explore: u, skip: p, decisions: c };
|
|
483
488
|
}, je = async (t, a, e, s, r, i) => {
|
|
484
489
|
await t.goto(a, { waitUntil: "domcontentloaded", timeout: 3e4 }), await t.waitForTimeout(1500);
|
|
485
|
-
const o = await
|
|
490
|
+
const o = await Ee(t);
|
|
486
491
|
if (r.screenshots) {
|
|
487
492
|
const c = `${s.dir}/crawl-${Date.now()}.png`;
|
|
488
493
|
if (await t.screenshot({ path: c, fullPage: !1 }), s.track(c), r.imageShrink) {
|
|
@@ -519,8 +524,8 @@ const U = 60, xe = (t) => ({
|
|
|
519
524
|
}
|
|
520
525
|
return [...a.values()];
|
|
521
526
|
}, We = async (t, a = {}) => {
|
|
522
|
-
if (!
|
|
523
|
-
const e =
|
|
527
|
+
if (!pe()) throw new Error(Be);
|
|
528
|
+
const e = O(K, a), s = U(K, e.onProgress, e);
|
|
524
529
|
s.start();
|
|
525
530
|
const r = await se(e, {
|
|
526
531
|
maxPages: 20,
|
|
@@ -529,24 +534,24 @@ const U = 60, xe = (t) => ({
|
|
|
529
534
|
gateInterval: 5,
|
|
530
535
|
headless: !0,
|
|
531
536
|
screenshots: !1,
|
|
532
|
-
errorPosture:
|
|
533
|
-
imageShrink:
|
|
537
|
+
errorPosture: V.resilient,
|
|
538
|
+
imageShrink: W(ve),
|
|
534
539
|
heartbeatInterval: 1e3
|
|
535
540
|
}), i = { ...re, ...e.cooldown }, o = e.isBlocked || De, n = Re(t, {
|
|
536
541
|
sameDomain: r.sameDomain,
|
|
537
542
|
maxDepth: r.maxDepth
|
|
538
|
-
}), c = await me("site-crawl", e.outputDir),
|
|
543
|
+
}), c = await me("site-crawl", e.outputDir), p = await (e.browserEngine ? X[e.browserEngine] : X.chromium).launch({
|
|
539
544
|
headless: r.headless,
|
|
540
545
|
...e.launchOptions
|
|
541
546
|
});
|
|
542
547
|
s.emit({ event: "browser", headless: r.headless });
|
|
543
548
|
try {
|
|
544
|
-
const m = await
|
|
549
|
+
const m = await p.newContext(e.contextOptions);
|
|
545
550
|
if (e.setup) {
|
|
546
551
|
const h = await m.newPage();
|
|
547
552
|
await e.setup(h), await h.close(), s.emit({ event: "setup" });
|
|
548
553
|
}
|
|
549
|
-
const l = await m.newPage(),
|
|
554
|
+
const l = await m.newPage(), d = (() => {
|
|
550
555
|
const h = [];
|
|
551
556
|
return l.on("response", (y) => h.push(y)), {
|
|
552
557
|
responses: () => [...h],
|
|
@@ -555,21 +560,21 @@ const U = 60, xe = (t) => ({
|
|
|
555
560
|
}
|
|
556
561
|
};
|
|
557
562
|
})(), g = [];
|
|
558
|
-
let
|
|
559
|
-
const
|
|
563
|
+
let x = 0, P = t;
|
|
564
|
+
const R = Fe(s, r.heartbeatInterval, () => ({
|
|
560
565
|
pagesVisited: g.length,
|
|
561
566
|
maxPages: r.maxPages,
|
|
562
567
|
pending: n.size(),
|
|
563
|
-
currentUrl:
|
|
568
|
+
currentUrl: P,
|
|
564
569
|
...n.summary()
|
|
565
|
-
})),
|
|
570
|
+
})), N = s.batch(r.maxPages);
|
|
566
571
|
try {
|
|
567
572
|
for (; !n.isEmpty() && g.length < r.maxPages; ) {
|
|
568
573
|
if (g.length > 0 && g.length % r.gateInterval === 0 && n.size() > 0) {
|
|
569
574
|
const y = r.maxPages - g.length;
|
|
570
575
|
s.emit({ event: "gate:start", pending: n.size(), budget: y });
|
|
571
576
|
const f = await _e(n, g, y, e);
|
|
572
|
-
|
|
577
|
+
x++, f.skip.length > 0 && n.skip(f.skip, "llm-gate"), s.emit({
|
|
573
578
|
event: "gate:complete",
|
|
574
579
|
explored: f.explore.length,
|
|
575
580
|
skipped: f.skip.length,
|
|
@@ -578,7 +583,7 @@ const U = 60, xe = (t) => ({
|
|
|
578
583
|
}
|
|
579
584
|
const h = n.next();
|
|
580
585
|
if (!h) break;
|
|
581
|
-
|
|
586
|
+
P = h.url, s.emit({
|
|
582
587
|
event: "page:start",
|
|
583
588
|
url: h.url,
|
|
584
589
|
depth: h.depth,
|
|
@@ -586,7 +591,7 @@ const U = 60, xe = (t) => ({
|
|
|
586
591
|
maxPages: r.maxPages
|
|
587
592
|
});
|
|
588
593
|
try {
|
|
589
|
-
const y = (
|
|
594
|
+
const y = (A, ue) => je(A, ue, d, c, r, s), { pageData: f, blocked: S } = await Me(
|
|
590
595
|
y,
|
|
591
596
|
l,
|
|
592
597
|
h.url,
|
|
@@ -595,9 +600,9 @@ const U = 60, xe = (t) => ({
|
|
|
595
600
|
o,
|
|
596
601
|
r.heartbeatInterval
|
|
597
602
|
);
|
|
598
|
-
f.depth = h.depth, f.source = h.source,
|
|
599
|
-
const
|
|
600
|
-
f.links.filter((
|
|
603
|
+
f.depth = h.depth, f.source = h.source, S && (f.blocked = S), g.push(f);
|
|
604
|
+
const v = S ? 0 : n.addLinks(
|
|
605
|
+
f.links.filter((A) => A.isSameDomain && !A.isAnchor),
|
|
601
606
|
h.depth,
|
|
602
607
|
h.url
|
|
603
608
|
);
|
|
@@ -606,16 +611,16 @@ const U = 60, xe = (t) => ({
|
|
|
606
611
|
url: h.url,
|
|
607
612
|
links: f.links.length,
|
|
608
613
|
forms: f.forms.length,
|
|
609
|
-
newUrls:
|
|
614
|
+
newUrls: v,
|
|
610
615
|
pending: n.size(),
|
|
611
|
-
blocked:
|
|
612
|
-
}),
|
|
616
|
+
blocked: S
|
|
617
|
+
}), N(1);
|
|
613
618
|
} catch (y) {
|
|
614
|
-
if (s.emit({ event: "page:error", url: h.url, error: y.message }), r.errorPosture ===
|
|
619
|
+
if (s.emit({ event: "page:error", url: h.url, error: y.message }), r.errorPosture === V.strict) throw y;
|
|
615
620
|
}
|
|
616
621
|
}
|
|
617
622
|
} finally {
|
|
618
|
-
|
|
623
|
+
R.stop();
|
|
619
624
|
}
|
|
620
625
|
if (await l.close(), e.teardown) {
|
|
621
626
|
try {
|
|
@@ -626,34 +631,34 @@ const U = 60, xe = (t) => ({
|
|
|
626
631
|
s.emit({ event: "teardown" });
|
|
627
632
|
}
|
|
628
633
|
await m.close();
|
|
629
|
-
const
|
|
634
|
+
const J = qe(g), b = Ve(g), w = {
|
|
630
635
|
pages: g,
|
|
631
|
-
graph:
|
|
636
|
+
graph: J,
|
|
632
637
|
apis: b,
|
|
633
638
|
frontier: n.summary(),
|
|
634
639
|
skipped: n.skippedUrls(),
|
|
635
|
-
gateCallCount:
|
|
640
|
+
gateCallCount: x,
|
|
636
641
|
cleanup: () => c.cleanup()
|
|
637
642
|
};
|
|
638
643
|
return s.complete({
|
|
639
|
-
outcome:
|
|
644
|
+
outcome: T.success,
|
|
640
645
|
pagesVisited: g.length,
|
|
641
646
|
apisFound: b.length,
|
|
642
|
-
gateCallCount:
|
|
647
|
+
gateCallCount: x,
|
|
643
648
|
...n.summary()
|
|
644
649
|
}), w;
|
|
645
650
|
} catch (m) {
|
|
646
651
|
throw s.error(m, { pagesVisited: 0 }), m;
|
|
647
652
|
} finally {
|
|
648
|
-
await
|
|
653
|
+
await p.close();
|
|
649
654
|
}
|
|
650
655
|
};
|
|
651
656
|
We.knownTexts = [];
|
|
652
|
-
const ne = 1, M = 20,
|
|
657
|
+
const ne = 1, M = 20, F = 5, He = 0.5, Ge = 5, Y = 8e3, q = 5, B = {
|
|
653
658
|
INDIVIDUAL: "individual",
|
|
654
659
|
BULK: "bulk"
|
|
655
|
-
}, Je = (t) => t === void 0 ? M : typeof t == "number" ? t : { small: 10, med: M, large: 40 }[t] ?? M,
|
|
656
|
-
function
|
|
660
|
+
}, Je = (t) => t === void 0 ? M : typeof t == "number" ? t : { small: 10, med: M, large: 40 }[t] ?? M, Xe = (t) => t === void 0 ? F : typeof t == "number" ? t : { low: 2, med: F, high: 10 }[t] ?? F;
|
|
661
|
+
function Ke(t, a) {
|
|
657
662
|
const e = [];
|
|
658
663
|
for (let s = 0; s < t.length; s += a)
|
|
659
664
|
e.push({
|
|
@@ -676,22 +681,22 @@ function Q(t, a, e, s, r, i) {
|
|
|
676
681
|
parallelMode: !0
|
|
677
682
|
};
|
|
678
683
|
}
|
|
679
|
-
async function
|
|
684
|
+
async function Ye(t, a, e, s, r, i = {}) {
|
|
680
685
|
try {
|
|
681
|
-
const o = e.map((
|
|
686
|
+
const o = e.map((p) => ce(p(t))).filter(Boolean).join(`
|
|
682
687
|
|
|
683
688
|
`), n = [a, o].filter(Boolean).join(`
|
|
684
689
|
|
|
685
|
-
`), c = ct(n, t, s, r === "files"), u = await
|
|
690
|
+
`), c = ct(n, t, s, r === "files"), u = await H(c, {
|
|
686
691
|
...i,
|
|
687
|
-
responseFormat:
|
|
692
|
+
responseFormat: z("arch_result", nt)
|
|
688
693
|
});
|
|
689
694
|
return { item: t, ...u, error: void 0 };
|
|
690
695
|
} catch (o) {
|
|
691
696
|
return { item: t, passed: !1, reason: `Analysis failed: ${o.message}`, error: o };
|
|
692
697
|
}
|
|
693
698
|
}
|
|
694
|
-
function
|
|
699
|
+
function Qe(t, a, e, s) {
|
|
695
700
|
const r = [], i = [];
|
|
696
701
|
let o = s;
|
|
697
702
|
for (const n of t)
|
|
@@ -704,47 +709,52 @@ function Ye(t, a, e, s) {
|
|
|
704
709
|
shouldStop: !a && o >= e
|
|
705
710
|
};
|
|
706
711
|
}
|
|
707
|
-
function
|
|
712
|
+
function L(t, a, e, s) {
|
|
708
713
|
t && t(a, e, s);
|
|
709
714
|
}
|
|
710
715
|
async function oe(t, a, e, s, r, i = {}) {
|
|
711
|
-
|
|
716
|
+
L(s, t, void 0, {
|
|
712
717
|
...r,
|
|
713
|
-
status:
|
|
718
|
+
status: D.start
|
|
714
719
|
});
|
|
715
720
|
try {
|
|
716
721
|
const o = lt(a, t, e), n = {
|
|
717
722
|
...i,
|
|
718
|
-
responseFormat:
|
|
723
|
+
responseFormat: z("arch_bulk_result", ot),
|
|
719
724
|
onProgress: ae(s, "reduce")
|
|
720
|
-
}, c = await ge(t, o, n), u = c
|
|
721
|
-
let
|
|
722
|
-
Array.isArray(u)
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
725
|
+
}, c = await ge(t, o, n), u = Array.isArray(c) ? c : c?.results;
|
|
726
|
+
let p = [];
|
|
727
|
+
if (Array.isArray(u))
|
|
728
|
+
p = u;
|
|
729
|
+
else {
|
|
730
|
+
const d = c === null ? "null" : typeof c;
|
|
731
|
+
p = t.map((g) => ({
|
|
732
|
+
path: g,
|
|
733
|
+
passed: !1,
|
|
734
|
+
reason: `Invalid bulk response shape (expected array or { results: [] }, got ${d})`
|
|
735
|
+
}));
|
|
736
|
+
}
|
|
737
|
+
const m = p.filter((d) => !d.passed).length, l = p.length - m;
|
|
738
|
+
return L(
|
|
729
739
|
s,
|
|
730
740
|
t,
|
|
731
741
|
m > 0 ? new Error(`${m} items failed`) : void 0,
|
|
732
742
|
{
|
|
733
743
|
...r,
|
|
734
|
-
status:
|
|
744
|
+
status: D.complete,
|
|
735
745
|
passed: l,
|
|
736
746
|
failed: m
|
|
737
747
|
}
|
|
738
|
-
),
|
|
748
|
+
), p;
|
|
739
749
|
} catch (o) {
|
|
740
750
|
const n = t.map((c) => ({
|
|
741
751
|
path: c,
|
|
742
752
|
passed: !1,
|
|
743
753
|
reason: `Processing error: ${o.message}`
|
|
744
754
|
}));
|
|
745
|
-
return
|
|
755
|
+
return L(s, t, o, {
|
|
746
756
|
...r,
|
|
747
|
-
status:
|
|
757
|
+
status: D.error
|
|
748
758
|
}), n;
|
|
749
759
|
}
|
|
750
760
|
}
|
|
@@ -763,9 +773,9 @@ function Ze(t, a) {
|
|
|
763
773
|
function et(t, a, e) {
|
|
764
774
|
if (t.allPassed)
|
|
765
775
|
return `All ${t.processed}/${t.total} items satisfy: ${a}`;
|
|
766
|
-
const s = t.failures.slice(0,
|
|
767
|
-
`), r = t.failures.length >
|
|
768
|
-
... and ${t.failures.length -
|
|
776
|
+
const s = t.failures.slice(0, q).map((i) => ` • ${i.item}: ${i.reason || "Failed"}`).join(`
|
|
777
|
+
`), r = t.failures.length > q ? `
|
|
778
|
+
... and ${t.failures.length - q} more failures` : "";
|
|
769
779
|
return `${t.failed}/${t.processed} items failed: ${a}${t.stoppedEarly && e !== ne ? ` (stopped after ${e} failures)` : ""}
|
|
770
780
|
|
|
771
781
|
Failures:
|
|
@@ -785,9 +795,9 @@ function tt(t, a) {
|
|
|
785
795
|
};
|
|
786
796
|
}
|
|
787
797
|
function st(t, a, e, s) {
|
|
788
|
-
const r = a || e.length > 0 || s <=
|
|
798
|
+
const r = a || e.length > 0 || s <= Ge;
|
|
789
799
|
return {
|
|
790
|
-
mode: r ?
|
|
800
|
+
mode: r ? B.INDIVIDUAL : B.BULK,
|
|
791
801
|
batchSize: r ? t.maxConcurrency : t.bulkSize,
|
|
792
802
|
processor: r ? (i, o, n) => ie(i, o, n) : (i, o, n) => oe(
|
|
793
803
|
i.items,
|
|
@@ -800,7 +810,7 @@ function st(t, a, e, s) {
|
|
|
800
810
|
}
|
|
801
811
|
function ie(t, a, e) {
|
|
802
812
|
const s = t.items.map(
|
|
803
|
-
(r) =>
|
|
813
|
+
(r) => Ye(
|
|
804
814
|
r,
|
|
805
815
|
a,
|
|
806
816
|
e.itemContextFns,
|
|
@@ -812,8 +822,8 @@ function ie(t, a, e) {
|
|
|
812
822
|
return Promise.all(s);
|
|
813
823
|
}
|
|
814
824
|
function at(t, a, e) {
|
|
815
|
-
if (a ===
|
|
816
|
-
const { results: s, errors: r, failures: i, shouldStop: o } =
|
|
825
|
+
if (a === B.INDIVIDUAL) {
|
|
826
|
+
const { results: s, errors: r, failures: i, shouldStop: o } = Qe(
|
|
817
827
|
t,
|
|
818
828
|
e.isCoverageTest,
|
|
819
829
|
e.maxFailures,
|
|
@@ -848,7 +858,7 @@ function at(t, a, e) {
|
|
|
848
858
|
}
|
|
849
859
|
}
|
|
850
860
|
async function rt(t, a, e, s) {
|
|
851
|
-
const r =
|
|
861
|
+
const r = Ke(t, e.batchSize), i = [];
|
|
852
862
|
let o = 0;
|
|
853
863
|
for (const n of r) {
|
|
854
864
|
if (!s.isCoverageTest && o >= s.maxFailures)
|
|
@@ -857,13 +867,13 @@ async function rt(t, a, e, s) {
|
|
|
857
867
|
n,
|
|
858
868
|
r.length,
|
|
859
869
|
t.length,
|
|
860
|
-
|
|
870
|
+
D.start,
|
|
861
871
|
s,
|
|
862
872
|
e.mode
|
|
863
873
|
);
|
|
864
|
-
|
|
874
|
+
L(s.onChunkProcessed, n.items, void 0, c);
|
|
865
875
|
let u;
|
|
866
|
-
e.mode ===
|
|
876
|
+
e.mode === B.INDIVIDUAL ? u = await ie(n, a, {
|
|
867
877
|
itemContextFns: s.itemContextFns,
|
|
868
878
|
description: s.description,
|
|
869
879
|
targetType: s.targetType
|
|
@@ -875,26 +885,26 @@ async function rt(t, a, e, s) {
|
|
|
875
885
|
c,
|
|
876
886
|
s.runConfig
|
|
877
887
|
);
|
|
878
|
-
const
|
|
888
|
+
const p = at(u, e.mode, {
|
|
879
889
|
...s,
|
|
880
890
|
currentFailures: o
|
|
881
891
|
});
|
|
882
|
-
if (i.push(...
|
|
892
|
+
if (i.push(...p.results), o = p.failures, L(
|
|
883
893
|
s.onChunkProcessed,
|
|
884
894
|
n.items,
|
|
885
|
-
|
|
895
|
+
p.errors.length > 0 ? p.errors[0] : void 0,
|
|
886
896
|
{
|
|
887
897
|
...Q(
|
|
888
898
|
n,
|
|
889
899
|
r.length,
|
|
890
900
|
t.length,
|
|
891
|
-
|
|
901
|
+
D.complete,
|
|
892
902
|
s,
|
|
893
903
|
e.mode
|
|
894
904
|
),
|
|
895
|
-
...
|
|
905
|
+
...p.progressData
|
|
896
906
|
}
|
|
897
|
-
),
|
|
907
|
+
), p.shouldStop)
|
|
898
908
|
break;
|
|
899
909
|
}
|
|
900
910
|
return i;
|
|
@@ -947,7 +957,7 @@ function it(t) {
|
|
|
947
957
|
return k.readdirSync(t).join(", ");
|
|
948
958
|
{
|
|
949
959
|
const e = k.readFileSync(t, "utf8");
|
|
950
|
-
return e.length >
|
|
960
|
+
return e.length > Y ? `${e.substring(0, Y)}
|
|
951
961
|
... (truncated)` : e;
|
|
952
962
|
}
|
|
953
963
|
}
|
|
@@ -977,7 +987,7 @@ function lt(t, a, e) {
|
|
|
977
987
|
}
|
|
978
988
|
class ut {
|
|
979
989
|
constructor(a, e = {}) {
|
|
980
|
-
this.target = a, this.options = e, this.contexts = [], this.itemContextFns = [], this.maxFailures = e.maxFailures || ne, this.bulkSize = e.bulkSize || M, this.maxConcurrency = e.maxConcurrency ||
|
|
990
|
+
this.target = a, this.options = e, this.contexts = [], this.itemContextFns = [], this.maxFailures = e.maxFailures || ne, this.bulkSize = e.bulkSize || M, this.maxConcurrency = e.maxConcurrency || F, this.onChunkProcessed = void 0, this.description = void 0, this.threshold = void 0, this.isCoverageTest = !1;
|
|
981
991
|
}
|
|
982
992
|
withContext(a) {
|
|
983
993
|
return this.contexts.push(a), this;
|
|
@@ -990,13 +1000,13 @@ class ut {
|
|
|
990
1000
|
return this.description = a, this;
|
|
991
1001
|
}
|
|
992
1002
|
// Set up for a coverage test
|
|
993
|
-
coverage(a =
|
|
1003
|
+
coverage(a = He) {
|
|
994
1004
|
return this.threshold = a, this.isCoverageTest = !0, this;
|
|
995
1005
|
}
|
|
996
1006
|
// Start processing - this is the fluent terminator
|
|
997
1007
|
async start() {
|
|
998
|
-
const a =
|
|
999
|
-
e.start(), e.emit({ event:
|
|
1008
|
+
const a = O("ai-arch-expect", this.options), e = U("ai-arch-expect", a.onProgress, a);
|
|
1009
|
+
e.start(), e.emit({ event: E.input, value: this.description });
|
|
1000
1010
|
try {
|
|
1001
1011
|
if (!this.description)
|
|
1002
1012
|
throw new Error("Must call satisfies() before start()");
|
|
@@ -1008,8 +1018,8 @@ class ut {
|
|
|
1008
1018
|
this.itemContextFns,
|
|
1009
1019
|
s.length
|
|
1010
1020
|
), { bulkSize: o, maxConcurrency: n, maxFailures: c } = await se(a, {
|
|
1011
|
-
bulkSize:
|
|
1012
|
-
maxConcurrency:
|
|
1021
|
+
bulkSize: W(Je),
|
|
1022
|
+
maxConcurrency: W(Xe),
|
|
1013
1023
|
maxFailures: this.maxFailures
|
|
1014
1024
|
}), u = {
|
|
1015
1025
|
bulkSize: o,
|
|
@@ -1021,17 +1031,17 @@ class ut {
|
|
|
1021
1031
|
maxFailures: c,
|
|
1022
1032
|
isCoverageTest: this.isCoverageTest,
|
|
1023
1033
|
runConfig: a
|
|
1024
|
-
},
|
|
1025
|
-
if (
|
|
1026
|
-
const
|
|
1027
|
-
if (!
|
|
1028
|
-
throw new Error(
|
|
1029
|
-
const
|
|
1030
|
-
return e.emit({ event:
|
|
1034
|
+
}, p = e.batch(s.length), m = await rt(s, r, i, u);
|
|
1035
|
+
if (p(m.length), this.isCoverageTest) {
|
|
1036
|
+
const d = m.filter((N) => N.passed).length, g = s.length > 0 ? d / s.length : 0, x = g >= this.threshold, P = `Coverage: ${d}/${s.length} (${(g * 100).toFixed(1)}%) - ${x ? "meets" : "below"} ${(this.threshold * 100).toFixed(1)}% threshold`;
|
|
1037
|
+
if (!x)
|
|
1038
|
+
throw new Error(P);
|
|
1039
|
+
const R = { passed: x, coverage: g, message: P };
|
|
1040
|
+
return e.emit({ event: E.output, value: R }), e.complete({ outcome: T.success, coverage: g, total: s.length }), R;
|
|
1031
1041
|
}
|
|
1032
1042
|
const l = this.summarize(s, m);
|
|
1033
|
-
return e.emit({ event:
|
|
1034
|
-
outcome:
|
|
1043
|
+
return e.emit({ event: E.output, value: l }), e.complete({
|
|
1044
|
+
outcome: T.success,
|
|
1035
1045
|
total: s.length,
|
|
1036
1046
|
passed: l.details.passed
|
|
1037
1047
|
}), l;
|
|
@@ -1046,14 +1056,14 @@ class ut {
|
|
|
1046
1056
|
return tt(s, r);
|
|
1047
1057
|
}
|
|
1048
1058
|
}
|
|
1049
|
-
function
|
|
1059
|
+
function dt(t, a = {}) {
|
|
1050
1060
|
return new ut(t, a);
|
|
1051
1061
|
}
|
|
1052
|
-
|
|
1062
|
+
dt.knownTexts = [];
|
|
1053
1063
|
function Dt() {
|
|
1054
1064
|
return console.warn("scanJS is not available in browser environment"), Promise.resolve({});
|
|
1055
1065
|
}
|
|
1056
|
-
const
|
|
1066
|
+
const Z = {
|
|
1057
1067
|
name: "test_analysis_result",
|
|
1058
1068
|
schema: {
|
|
1059
1069
|
type: "object",
|
|
@@ -1074,14 +1084,14 @@ const Y = {
|
|
|
1074
1084
|
required: ["hasIssues", "issues"],
|
|
1075
1085
|
additionalProperties: !1
|
|
1076
1086
|
}
|
|
1077
|
-
},
|
|
1087
|
+
}, ee = "test";
|
|
1078
1088
|
async function le(t, a, e) {
|
|
1079
1089
|
[a, e] = fe(a, e);
|
|
1080
|
-
const { text: s, context: r } = be(a, []), i =
|
|
1090
|
+
const { text: s, context: r } = be(a, []), i = O(ee, e), o = U(ee, i.onProgress, i);
|
|
1081
1091
|
o.start();
|
|
1082
1092
|
try {
|
|
1083
|
-
const n = await
|
|
1084
|
-
o.emit({ event:
|
|
1093
|
+
const n = await Se.readFile(t, "utf-8");
|
|
1094
|
+
o.emit({ event: E.phase, phase: "file-read", path: t });
|
|
1085
1095
|
const c = r ? `
|
|
1086
1096
|
|
|
1087
1097
|
${r}` : "", u = `Analyze this code and ${s}:
|
|
@@ -1098,29 +1108,29 @@ GUIDELINES:
|
|
|
1098
1108
|
- Suggest concrete fixes for each issue identified
|
|
1099
1109
|
- Be concise but clear in your feedback
|
|
1100
1110
|
- If no issues are found, return {"hasIssues": false, "issues": []}${c}`;
|
|
1101
|
-
o.emit({ event:
|
|
1102
|
-
const
|
|
1103
|
-
() =>
|
|
1111
|
+
o.emit({ event: E.phase, phase: "analyzing" });
|
|
1112
|
+
const p = await ye(
|
|
1113
|
+
() => H(u, {
|
|
1104
1114
|
...i,
|
|
1105
|
-
responseFormat:
|
|
1115
|
+
responseFormat: z(Z.name, Z.schema)
|
|
1106
1116
|
}),
|
|
1107
1117
|
{
|
|
1108
1118
|
label: "test chain",
|
|
1109
1119
|
config: i
|
|
1110
1120
|
}
|
|
1111
|
-
), m =
|
|
1121
|
+
), m = p.hasIssues ? p.issues : [];
|
|
1112
1122
|
return o.emit({
|
|
1113
|
-
event:
|
|
1123
|
+
event: E.phase,
|
|
1114
1124
|
phase: "analysis-complete",
|
|
1115
1125
|
issueCount: m.length
|
|
1116
|
-
}), o.complete({ outcome:
|
|
1126
|
+
}), o.complete({ outcome: T.success }), m;
|
|
1117
1127
|
} catch (n) {
|
|
1118
1128
|
throw o.error(n), n;
|
|
1119
1129
|
}
|
|
1120
1130
|
}
|
|
1121
1131
|
le.knownTexts = [];
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1132
|
+
const te = "test-advice", pt = "Run the code with 5 boundary value test cases and report any that fail", mt = "Identify 5 passing scenarios and significant boundary conditions in this code. Provide minimal input examples for each scenario to demonstrate correctness.", ht = "Identify 5 failing scenarios and significant boundary conditions in this code. Provide minimal input examples for each scenario to demonstrate the failure. Assume DBC, and don't complain when types are specified in jsDoc.", gt = "Identify 5 defects in this code. Provide minimal input examples to demonstrate each defect.", ft = "Suggest 5 best practices improvements for this code.", bt = 'Suggest 5 "clean code" improvements for this code.', yt = "Identify 5 specific issues related to code quality, readability, and maintainability.", wt = "Suggest 5 refactors that would most improve the composibility of this code.", $ = [
|
|
1133
|
+
pt,
|
|
1124
1134
|
mt,
|
|
1125
1135
|
ht,
|
|
1126
1136
|
gt,
|
|
@@ -1129,282 +1139,326 @@ const ee = "test-advice", dt = "Run the code with 5 boundary value test cases an
|
|
|
1129
1139
|
yt,
|
|
1130
1140
|
wt
|
|
1131
1141
|
];
|
|
1132
|
-
async function
|
|
1133
|
-
|
|
1142
|
+
async function St(t, a = {}) {
|
|
1143
|
+
if (typeof t != "string" || t.length === 0)
|
|
1144
|
+
throw new Error(
|
|
1145
|
+
`test-advice: path must be a non-empty string (got ${t === null ? "null" : typeof t})`
|
|
1146
|
+
);
|
|
1147
|
+
const e = O(te, a), s = U(te, e.onProgress, e);
|
|
1134
1148
|
s.start();
|
|
1135
1149
|
try {
|
|
1136
|
-
const r = s.batch(
|
|
1137
|
-
|
|
1138
|
-
async (
|
|
1139
|
-
const
|
|
1150
|
+
const r = s.batch($.length), o = (await we(
|
|
1151
|
+
$,
|
|
1152
|
+
async (u) => {
|
|
1153
|
+
const p = await le(t, u, {
|
|
1140
1154
|
...e,
|
|
1141
1155
|
onProgress: ae(e.onProgress, "test-advice:test")
|
|
1142
1156
|
});
|
|
1143
|
-
return r(1),
|
|
1157
|
+
return r(1), p;
|
|
1144
1158
|
},
|
|
1145
1159
|
{
|
|
1146
1160
|
maxParallel: 3,
|
|
1147
|
-
errorPosture:
|
|
1161
|
+
errorPosture: V.resilient,
|
|
1148
1162
|
abortSignal: e.abortSignal,
|
|
1149
1163
|
label: "test-advice:instructions"
|
|
1150
1164
|
}
|
|
1151
|
-
)).filter(Array.isArray).
|
|
1152
|
-
|
|
1165
|
+
)).filter(Array.isArray), n = $.length - o.length;
|
|
1166
|
+
if (o.length === 0)
|
|
1167
|
+
throw new Error(`test-advice: all ${$.length} instructions failed`);
|
|
1168
|
+
const c = o.flat();
|
|
1169
|
+
return s.complete({
|
|
1170
|
+
outcome: n > 0 ? T.partial : T.success,
|
|
1171
|
+
totalIssues: c.length,
|
|
1172
|
+
failedInstructions: n
|
|
1173
|
+
}), c;
|
|
1153
1174
|
} catch (r) {
|
|
1154
1175
|
throw s.error(r), r;
|
|
1155
1176
|
}
|
|
1156
1177
|
}
|
|
1157
|
-
|
|
1158
|
-
|
|
1178
|
+
St.knownTexts = [];
|
|
1179
|
+
de.config();
|
|
1159
1180
|
export {
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
Bt as
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
_t as
|
|
1168
|
-
jt as
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
Wt as
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
Jt as
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
Qt as
|
|
1180
|
-
|
|
1181
|
-
Zt as
|
|
1182
|
-
es as
|
|
1183
|
-
ts as
|
|
1184
|
-
ss as
|
|
1185
|
-
as as
|
|
1186
|
-
rs as
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
is as
|
|
1191
|
-
cs as
|
|
1192
|
-
ls as
|
|
1193
|
-
us as
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
ms as
|
|
1197
|
-
hs as
|
|
1198
|
-
gs as
|
|
1199
|
-
fs as
|
|
1200
|
-
bs as
|
|
1201
|
-
ys as
|
|
1202
|
-
ws as
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
ks as
|
|
1207
|
-
Cs as
|
|
1208
|
-
Is as
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
Ts as
|
|
1213
|
-
Rs as
|
|
1214
|
-
Ds as
|
|
1215
|
-
Ls as
|
|
1181
|
+
$t as CAPABILITY_KEYS,
|
|
1182
|
+
Mt as COMPLIANCE,
|
|
1183
|
+
Ft as CONTENT_TYPES,
|
|
1184
|
+
Bt as CONTEXT_KINDS,
|
|
1185
|
+
Ot as COST_POSTURE,
|
|
1186
|
+
Ut as ChainEvent,
|
|
1187
|
+
zt as ChainTree,
|
|
1188
|
+
_t as ContextBudget,
|
|
1189
|
+
jt as Conversation,
|
|
1190
|
+
qt as DEFAULT_HEADING_DETECTORS,
|
|
1191
|
+
Vt as DOMAIN,
|
|
1192
|
+
E as DomainEvent,
|
|
1193
|
+
Wt as ENVIRONMENT,
|
|
1194
|
+
Ht as EmbeddingService,
|
|
1195
|
+
Gt as ErrorCategory,
|
|
1196
|
+
Jt as Kind,
|
|
1197
|
+
Xt as Level,
|
|
1198
|
+
Kt as ListStyle,
|
|
1199
|
+
Yt as ModelService,
|
|
1200
|
+
Qt as ModelSource,
|
|
1201
|
+
D as OpEvent,
|
|
1202
|
+
Zt as OptionSource,
|
|
1203
|
+
es as QUALITY_INTENT,
|
|
1204
|
+
ts as RetryMode,
|
|
1205
|
+
ss as SocraticMethod,
|
|
1206
|
+
as as StatusCode,
|
|
1207
|
+
rs as SummaryMap,
|
|
1208
|
+
ns as TelemetryEvent,
|
|
1209
|
+
os as TimedAbortController,
|
|
1210
|
+
dt as aiArchExpect,
|
|
1211
|
+
is as aiExpect,
|
|
1212
|
+
cs as allCapsHeading,
|
|
1213
|
+
ls as analyzeImage,
|
|
1214
|
+
us as analyzeImageMapDetail,
|
|
1215
|
+
ds as anySignal,
|
|
1216
|
+
ps as applyAllTargetingRules,
|
|
1217
|
+
ms as applyFirstTargetingRule,
|
|
1218
|
+
hs as auto,
|
|
1219
|
+
gs as bool,
|
|
1220
|
+
fs as buildSeedGenerationPrompt,
|
|
1221
|
+
bs as buildVisionPrompt,
|
|
1222
|
+
ys as calculateStatistics,
|
|
1223
|
+
ws as calibrateInstructions,
|
|
1224
|
+
Ss as calibrateItem,
|
|
1225
|
+
vs as calibrateSpec,
|
|
1226
|
+
xs as callAgent,
|
|
1227
|
+
ks as categorySamples,
|
|
1228
|
+
Cs as causalFramePrompt,
|
|
1229
|
+
Is as centralTendency,
|
|
1230
|
+
Ps as centralTendencyLines,
|
|
1231
|
+
As as chunk,
|
|
1232
|
+
Es as chunkSentences,
|
|
1233
|
+
Ts as classify,
|
|
1234
|
+
Rs as cleanupPaths,
|
|
1235
|
+
Ds as collectEventsWith,
|
|
1236
|
+
Ls as collectTerms,
|
|
1237
|
+
Ns as combinations,
|
|
1238
|
+
$s as commonalities,
|
|
1239
|
+
Ms as compact,
|
|
1216
1240
|
Fs as computeTagStatistics,
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1241
|
+
Bs as config,
|
|
1242
|
+
Os as constants,
|
|
1243
|
+
Us as conversationTurnReduce,
|
|
1244
|
+
zs as cosineSimilarity,
|
|
1245
|
+
_s as createBatches,
|
|
1246
|
+
js as createContextBuilder,
|
|
1247
|
+
U as createProgressEmitter,
|
|
1224
1248
|
me as createTempDir,
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1249
|
+
qs as createTraceCollector,
|
|
1250
|
+
Vs as date,
|
|
1251
|
+
Ws as debug,
|
|
1252
|
+
H as default,
|
|
1253
|
+
Hs as descriptorToSchema,
|
|
1254
|
+
Gs as detectPatterns,
|
|
1255
|
+
Js as detectThreshold,
|
|
1256
|
+
Xs as determineStyle,
|
|
1257
|
+
Ks as disambiguate,
|
|
1258
|
+
Ys as dismantle,
|
|
1259
|
+
Qs as documentShrink,
|
|
1260
|
+
Zs as documentShrinkPrompts,
|
|
1261
|
+
ea as documentShrinkTuning,
|
|
1262
|
+
ta as embed,
|
|
1263
|
+
sa as embedAssembleSpan,
|
|
1264
|
+
aa as embedBatch,
|
|
1265
|
+
ra as embedBuildIndex,
|
|
1266
|
+
na as embedChunked,
|
|
1267
|
+
oa as embedImage,
|
|
1268
|
+
ia as embedImageBatch,
|
|
1269
|
+
ca as embedMergeRanges,
|
|
1270
|
+
la as embedMultiQuery,
|
|
1271
|
+
ua as embedNeighborChunks,
|
|
1272
|
+
da as embedNormalizeText,
|
|
1273
|
+
pa as embedObject,
|
|
1274
|
+
ma as embedRewriteQuery,
|
|
1275
|
+
ha as embedRewriteToOutputDoc,
|
|
1276
|
+
ga as embedStandaloneSpan,
|
|
1277
|
+
fa as embedStepBack,
|
|
1278
|
+
ba as embedSubquestions,
|
|
1279
|
+
ya as embedWarmup,
|
|
1280
|
+
wa as entityInstructions,
|
|
1281
|
+
Sa as entityItem,
|
|
1282
|
+
va as entitySpec,
|
|
1283
|
+
xa as evaluateTargetingClause,
|
|
1284
|
+
ka as evaluateTargetingRule,
|
|
1285
|
+
Ca as eventToTrace,
|
|
1286
|
+
Ia as expect,
|
|
1287
|
+
Pa as extractBlocks,
|
|
1261
1288
|
Ce as extractButtons,
|
|
1262
|
-
xa as extractEntities,
|
|
1263
1289
|
ke as extractForms,
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
ka as extractRelations,
|
|
1290
|
+
Aa as extractJson,
|
|
1291
|
+
xe as extractLinks,
|
|
1292
|
+
Pe as extractMeta,
|
|
1293
|
+
Ee as extractPage,
|
|
1269
1294
|
Ie as extractScripts,
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1295
|
+
Ae as extractStructure,
|
|
1296
|
+
Ea as fillMissing,
|
|
1297
|
+
Ta as filter,
|
|
1298
|
+
Ra as filterAmbiguous,
|
|
1299
|
+
Da as filterEach,
|
|
1300
|
+
La as filterItem,
|
|
1301
|
+
Na as filterParallel,
|
|
1302
|
+
$a as find,
|
|
1303
|
+
Ma as findEach,
|
|
1304
|
+
Fa as findItem,
|
|
1305
|
+
Ba as findParallel,
|
|
1306
|
+
Oa as generateList,
|
|
1307
|
+
Ua as getMeanings,
|
|
1308
|
+
za as getOption,
|
|
1309
|
+
_a as getOptionDetail,
|
|
1281
1310
|
se as getOptions,
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1311
|
+
ja as glossary,
|
|
1312
|
+
qa as group,
|
|
1313
|
+
Va as groupEach,
|
|
1314
|
+
Wa as groupItem,
|
|
1315
|
+
Ha as groupParallel,
|
|
1316
|
+
Ga as hashHeading,
|
|
1285
1317
|
Tt as imageToBase64,
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
+
Ja as init,
|
|
1319
|
+
Xa as intent,
|
|
1320
|
+
Ka as intersections,
|
|
1321
|
+
Ya as join,
|
|
1322
|
+
z as jsonSchema,
|
|
1323
|
+
Qa as last,
|
|
1324
|
+
Za as list,
|
|
1325
|
+
er as listBatch,
|
|
1326
|
+
tr as listExpand,
|
|
1327
|
+
H as llm,
|
|
1328
|
+
sr as llmLogger,
|
|
1329
|
+
ar as makePrompt,
|
|
1330
|
+
rr as map,
|
|
1331
|
+
nr as mapCalibrate,
|
|
1332
|
+
or as mapCalibrateParallel,
|
|
1333
|
+
ir as mapDetail,
|
|
1334
|
+
cr as mapEach,
|
|
1335
|
+
lr as mapEntities,
|
|
1336
|
+
ur as mapEntitiesParallel,
|
|
1337
|
+
ve as mapImageShrink,
|
|
1338
|
+
dr as mapItem,
|
|
1339
|
+
pr as mapMode,
|
|
1340
|
+
mr as mapParallel,
|
|
1341
|
+
hr as mapPeopleSet,
|
|
1342
|
+
gr as mapPeopleSetParallel,
|
|
1343
|
+
fr as mapPopReference,
|
|
1344
|
+
br as mapPopReferenceParallel,
|
|
1345
|
+
yr as mapRelations,
|
|
1346
|
+
wr as mapRelationsParallel,
|
|
1347
|
+
Sr as mapScale,
|
|
1348
|
+
vr as mapScaleParallel,
|
|
1349
|
+
xr as mapTags,
|
|
1350
|
+
kr as multiHashHeading,
|
|
1351
|
+
Cr as name,
|
|
1352
|
+
Ir as nameSimilarTo,
|
|
1353
|
+
O as nameStep,
|
|
1354
|
+
Pr as normalizeInstruction,
|
|
1355
|
+
Ar as normalizeLlm,
|
|
1356
|
+
Er as normalizeRubric,
|
|
1357
|
+
Tr as number,
|
|
1358
|
+
Rr as numberWithUnits,
|
|
1359
|
+
Dr as observeApplication,
|
|
1360
|
+
Lr as observeProviders,
|
|
1361
|
+
Nr as omit,
|
|
1362
|
+
$r as orgStarHeading,
|
|
1363
|
+
Mr as pFilter,
|
|
1364
|
+
Fr as pFind,
|
|
1365
|
+
Br as pGroup,
|
|
1366
|
+
Or as pMap,
|
|
1367
|
+
Ur as pReduce,
|
|
1318
1368
|
we as parallel,
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1369
|
+
zr as parallelMap,
|
|
1370
|
+
_r as parseLLMList,
|
|
1371
|
+
jr as parseRDFLiteral,
|
|
1372
|
+
qr as parseRelations,
|
|
1373
|
+
Vr as peopleSet,
|
|
1374
|
+
Wr as phailForge,
|
|
1375
|
+
Hr as pick,
|
|
1376
|
+
Gr as pipe,
|
|
1377
|
+
Jr as popReferenceItem,
|
|
1378
|
+
Xr as promptCache,
|
|
1379
|
+
Kr as promptPiece,
|
|
1380
|
+
Yr as prompts,
|
|
1381
|
+
Qr as questions,
|
|
1382
|
+
Zr as rangeCombinations,
|
|
1333
1383
|
ge as reduce,
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1384
|
+
en as reduceEach,
|
|
1385
|
+
tn as reduceItem,
|
|
1386
|
+
sn as relationInstructions,
|
|
1387
|
+
an as relationItem,
|
|
1388
|
+
rn as relationSpec,
|
|
1389
|
+
At as resizeImage,
|
|
1338
1390
|
fe as resolveArgs,
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1391
|
+
nn as resolveEmbedding,
|
|
1392
|
+
on as resolveModel,
|
|
1393
|
+
cn as resolveOutputDir,
|
|
1342
1394
|
be as resolveTexts,
|
|
1343
1395
|
ye as retry,
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1396
|
+
ln as ringBuffer,
|
|
1397
|
+
un as scaleInstructions,
|
|
1398
|
+
dn as scaleItem,
|
|
1399
|
+
pn as scaleSpec,
|
|
1348
1400
|
Dt as scanJS,
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1401
|
+
mn as schemaOrg,
|
|
1402
|
+
hn as schemas,
|
|
1403
|
+
gn as scientificFramingPrompt,
|
|
1352
1404
|
ae as scopePhase,
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1405
|
+
fn as score,
|
|
1406
|
+
bn as scoreChunksByProbes,
|
|
1407
|
+
yn as scoreInstructions,
|
|
1408
|
+
wn as scoreItem,
|
|
1409
|
+
Sn as scoreMatrix,
|
|
1410
|
+
vn as scoreMatrixInstructions,
|
|
1411
|
+
xn as scoreSpec,
|
|
1412
|
+
kn as segment,
|
|
1413
|
+
Cn as sentiment,
|
|
1414
|
+
In as setEmbedEnabled,
|
|
1415
|
+
Pn as setImageProcessingEnabled,
|
|
1416
|
+
An as setInterval,
|
|
1417
|
+
En as shuffle,
|
|
1418
|
+
Tn as simplifyTree,
|
|
1366
1419
|
We as siteCrawl,
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1420
|
+
Rn as slot,
|
|
1421
|
+
Dn as socratic,
|
|
1422
|
+
Ln as softCoverPrompt,
|
|
1423
|
+
Nn as sort,
|
|
1424
|
+
$n as sortBy,
|
|
1425
|
+
Mn as split,
|
|
1426
|
+
Fn as stripNumeric,
|
|
1427
|
+
Bn as stripResponse,
|
|
1428
|
+
On as suggestTargetingRules,
|
|
1429
|
+
Un as tagInstructions,
|
|
1430
|
+
zn as tagItem,
|
|
1431
|
+
_n as tagSpec,
|
|
1432
|
+
jn as tagVocabulary,
|
|
1433
|
+
qn as targetingClause,
|
|
1434
|
+
Vn as targetingRule,
|
|
1435
|
+
Wn as targetingRuleOps,
|
|
1436
|
+
Hn as targetingRuleSchema,
|
|
1437
|
+
Gn as templateBuilder,
|
|
1438
|
+
Jn as templateReplace,
|
|
1386
1439
|
le as test,
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1440
|
+
St as testAdvice,
|
|
1441
|
+
Xn as themes,
|
|
1442
|
+
Et as tileImages,
|
|
1443
|
+
Kn as timeline,
|
|
1444
|
+
Yn as toBool,
|
|
1445
|
+
Qn as toDate,
|
|
1446
|
+
Zn as toEnum,
|
|
1447
|
+
eo as toNumber,
|
|
1448
|
+
to as toNumberWithUnits,
|
|
1449
|
+
so as toObject,
|
|
1450
|
+
ao as truncate,
|
|
1451
|
+
ro as underlineHeading,
|
|
1452
|
+
no as unionBy,
|
|
1453
|
+
oo as validateTargetingRules,
|
|
1454
|
+
io as valueArbitrate,
|
|
1455
|
+
co as vectorSearch,
|
|
1456
|
+
lo as veiledVariantStrategies,
|
|
1457
|
+
uo as veiledVariants,
|
|
1458
|
+
po as version,
|
|
1405
1459
|
Rt as webScrape,
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1460
|
+
mo as windowFor,
|
|
1461
|
+
ho as withInactivityTimeout,
|
|
1462
|
+
W as withPolicy,
|
|
1463
|
+
go as zipWith
|
|
1410
1464
|
};
|