@far-world-labs/verblets 0.8.0 → 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 +257 -245
- package/dist/index.js +384 -372
- package/dist/{shared-XTpEaaip.js → shared-Bdek4t_n.js} +6757 -6340
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
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
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 _ = 60,
|
|
8
|
+
import Se from "node:fs/promises";
|
|
9
|
+
const _ = 60, ve = (t) => ({
|
|
10
10
|
low: { width: 300, quality: _, format: "jpeg" },
|
|
11
11
|
med: { width: 100, quality: _, format: "jpeg" },
|
|
12
12
|
high: { width: 50, quality: _, format: "jpeg" }
|
|
13
|
-
})[t],
|
|
13
|
+
})[t], G = (t) => () => {
|
|
14
14
|
throw new Error(`${t} is not available in browser environment`);
|
|
15
|
-
}, At =
|
|
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();
|
|
@@ -143,15 +143,15 @@ const _ = 60, Se = (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 _ = 60, Se = (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 _ = 60, Se = (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,7 +207,7 @@ const _ = 60, Se = (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
|
};
|
|
@@ -228,32 +228,32 @@ const _ = 60, Se = (t) => ({
|
|
|
228
228
|
a.search = new URLSearchParams(e).toString();
|
|
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
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 A = new URL(
|
|
247
|
+
const A = new URL(S).pathname;
|
|
248
248
|
if (/\.(png|jpg|jpeg|gif|svg|ico|css|js|woff2?|ttf|eot|pdf|zip|mp[34])$/i.test(A)) {
|
|
249
|
-
n.set(
|
|
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,17 +267,17 @@ const _ = 60, Se = (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) => {
|
|
278
278
|
const w = /* @__PURE__ */ new Map();
|
|
279
279
|
for (const h of i) {
|
|
280
|
-
const y =
|
|
280
|
+
const y = Te(h.url, b), f = w.get(y) || [];
|
|
281
281
|
f.push(h), w.set(y, f);
|
|
282
282
|
}
|
|
283
283
|
return w;
|
|
@@ -330,10 +330,10 @@ const _ = 60, Se = (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 _ = 60, Se = (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 _ = 60, Se = (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 _ = 60, Se = (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 _ = 60, Se = (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 _ = 60, Se = (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 _ = 60, Se = (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 _ = 60, Se = (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,29 +462,29 @@ const _ = 60, Se = (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
470
|
if (!n || typeof n != "object" || !Array.isArray(n.decisions))
|
|
471
471
|
throw new Error(
|
|
472
472
|
`site-crawl: expected { decisions: [] } from gate LLM (got ${n === null ? "null" : typeof n})`
|
|
473
473
|
);
|
|
474
|
-
const { decisions: c } = n, u = [],
|
|
474
|
+
const { decisions: c } = n, u = [], p = [];
|
|
475
475
|
for (const m of c) {
|
|
476
476
|
const l = r.get(m.prefix);
|
|
477
477
|
if (l)
|
|
478
478
|
if (m.action === "skip")
|
|
479
|
-
|
|
479
|
+
p.push(...l.map((d) => d.url));
|
|
480
480
|
else {
|
|
481
|
-
const
|
|
482
|
-
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));
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
for (const [m, l] of r)
|
|
486
|
-
c.some((g) => g.prefix === m) || (u.push(l[0].url), l.length > 1 &&
|
|
487
|
-
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 };
|
|
488
488
|
}, je = async (t, a, e, s, r, i) => {
|
|
489
489
|
await t.goto(a, { waitUntil: "domcontentloaded", timeout: 3e4 }), await t.waitForTimeout(1500);
|
|
490
490
|
const o = await Ee(t);
|
|
@@ -524,8 +524,8 @@ const _ = 60, Se = (t) => ({
|
|
|
524
524
|
}
|
|
525
525
|
return [...a.values()];
|
|
526
526
|
}, We = async (t, a = {}) => {
|
|
527
|
-
if (!
|
|
528
|
-
const e =
|
|
527
|
+
if (!pe()) throw new Error(Be);
|
|
528
|
+
const e = O(K, a), s = U(K, e.onProgress, e);
|
|
529
529
|
s.start();
|
|
530
530
|
const r = await se(e, {
|
|
531
531
|
maxPages: 20,
|
|
@@ -535,23 +535,23 @@ const _ = 60, Se = (t) => ({
|
|
|
535
535
|
headless: !0,
|
|
536
536
|
screenshots: !1,
|
|
537
537
|
errorPosture: V.resilient,
|
|
538
|
-
imageShrink: W(
|
|
538
|
+
imageShrink: W(ve),
|
|
539
539
|
heartbeatInterval: 1e3
|
|
540
|
-
}), i = { ...re, ...e.cooldown }, o = e.isBlocked || De, n =
|
|
540
|
+
}), i = { ...re, ...e.cooldown }, o = e.isBlocked || De, n = Re(t, {
|
|
541
541
|
sameDomain: r.sameDomain,
|
|
542
542
|
maxDepth: r.maxDepth
|
|
543
|
-
}), 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({
|
|
544
544
|
headless: r.headless,
|
|
545
545
|
...e.launchOptions
|
|
546
546
|
});
|
|
547
547
|
s.emit({ event: "browser", headless: r.headless });
|
|
548
548
|
try {
|
|
549
|
-
const m = await
|
|
549
|
+
const m = await p.newContext(e.contextOptions);
|
|
550
550
|
if (e.setup) {
|
|
551
551
|
const h = await m.newPage();
|
|
552
552
|
await e.setup(h), await h.close(), s.emit({ event: "setup" });
|
|
553
553
|
}
|
|
554
|
-
const l = await m.newPage(),
|
|
554
|
+
const l = await m.newPage(), d = (() => {
|
|
555
555
|
const h = [];
|
|
556
556
|
return l.on("response", (y) => h.push(y)), {
|
|
557
557
|
responses: () => [...h],
|
|
@@ -561,13 +561,13 @@ const _ = 60, Se = (t) => ({
|
|
|
561
561
|
};
|
|
562
562
|
})(), g = [];
|
|
563
563
|
let x = 0, P = t;
|
|
564
|
-
const
|
|
564
|
+
const R = Fe(s, r.heartbeatInterval, () => ({
|
|
565
565
|
pagesVisited: g.length,
|
|
566
566
|
maxPages: r.maxPages,
|
|
567
567
|
pending: n.size(),
|
|
568
568
|
currentUrl: P,
|
|
569
569
|
...n.summary()
|
|
570
|
-
})),
|
|
570
|
+
})), N = s.batch(r.maxPages);
|
|
571
571
|
try {
|
|
572
572
|
for (; !n.isEmpty() && g.length < r.maxPages; ) {
|
|
573
573
|
if (g.length > 0 && g.length % r.gateInterval === 0 && n.size() > 0) {
|
|
@@ -591,7 +591,7 @@ const _ = 60, Se = (t) => ({
|
|
|
591
591
|
maxPages: r.maxPages
|
|
592
592
|
});
|
|
593
593
|
try {
|
|
594
|
-
const y = (A, ue) => je(A, ue,
|
|
594
|
+
const y = (A, ue) => je(A, ue, d, c, r, s), { pageData: f, blocked: S } = await Me(
|
|
595
595
|
y,
|
|
596
596
|
l,
|
|
597
597
|
h.url,
|
|
@@ -600,8 +600,8 @@ const _ = 60, Se = (t) => ({
|
|
|
600
600
|
o,
|
|
601
601
|
r.heartbeatInterval
|
|
602
602
|
);
|
|
603
|
-
f.depth = h.depth, f.source = h.source,
|
|
604
|
-
const
|
|
603
|
+
f.depth = h.depth, f.source = h.source, S && (f.blocked = S), g.push(f);
|
|
604
|
+
const v = S ? 0 : n.addLinks(
|
|
605
605
|
f.links.filter((A) => A.isSameDomain && !A.isAnchor),
|
|
606
606
|
h.depth,
|
|
607
607
|
h.url
|
|
@@ -611,16 +611,16 @@ const _ = 60, Se = (t) => ({
|
|
|
611
611
|
url: h.url,
|
|
612
612
|
links: f.links.length,
|
|
613
613
|
forms: f.forms.length,
|
|
614
|
-
newUrls:
|
|
614
|
+
newUrls: v,
|
|
615
615
|
pending: n.size(),
|
|
616
|
-
blocked:
|
|
617
|
-
}),
|
|
616
|
+
blocked: S
|
|
617
|
+
}), N(1);
|
|
618
618
|
} catch (y) {
|
|
619
619
|
if (s.emit({ event: "page:error", url: h.url, error: y.message }), r.errorPosture === V.strict) throw y;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
} finally {
|
|
623
|
-
|
|
623
|
+
R.stop();
|
|
624
624
|
}
|
|
625
625
|
if (await l.close(), e.teardown) {
|
|
626
626
|
try {
|
|
@@ -641,7 +641,7 @@ const _ = 60, Se = (t) => ({
|
|
|
641
641
|
cleanup: () => c.cleanup()
|
|
642
642
|
};
|
|
643
643
|
return s.complete({
|
|
644
|
-
outcome:
|
|
644
|
+
outcome: T.success,
|
|
645
645
|
pagesVisited: g.length,
|
|
646
646
|
apisFound: b.length,
|
|
647
647
|
gateCallCount: x,
|
|
@@ -650,14 +650,14 @@ const _ = 60, Se = (t) => ({
|
|
|
650
650
|
} catch (m) {
|
|
651
651
|
throw s.error(m, { pagesVisited: 0 }), m;
|
|
652
652
|
} finally {
|
|
653
|
-
await
|
|
653
|
+
await p.close();
|
|
654
654
|
}
|
|
655
655
|
};
|
|
656
656
|
We.knownTexts = [];
|
|
657
|
-
const ne = 1,
|
|
657
|
+
const ne = 1, M = 20, F = 5, He = 0.5, Ge = 5, Y = 8e3, q = 5, B = {
|
|
658
658
|
INDIVIDUAL: "individual",
|
|
659
659
|
BULK: "bulk"
|
|
660
|
-
}, Je = (t) => t === void 0 ?
|
|
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
661
|
function Ke(t, a) {
|
|
662
662
|
const e = [];
|
|
663
663
|
for (let s = 0; s < t.length; s += a)
|
|
@@ -683,13 +683,13 @@ function Q(t, a, e, s, r, i) {
|
|
|
683
683
|
}
|
|
684
684
|
async function Ye(t, a, e, s, r, i = {}) {
|
|
685
685
|
try {
|
|
686
|
-
const o = e.map((
|
|
686
|
+
const o = e.map((p) => ce(p(t))).filter(Boolean).join(`
|
|
687
687
|
|
|
688
688
|
`), n = [a, o].filter(Boolean).join(`
|
|
689
689
|
|
|
690
|
-
`), c = ct(n, t, s, r === "files"), u = await
|
|
690
|
+
`), c = ct(n, t, s, r === "files"), u = await H(c, {
|
|
691
691
|
...i,
|
|
692
|
-
responseFormat:
|
|
692
|
+
responseFormat: z("arch_result", nt)
|
|
693
693
|
});
|
|
694
694
|
return { item: t, ...u, error: void 0 };
|
|
695
695
|
} catch (o) {
|
|
@@ -720,21 +720,21 @@ async function oe(t, a, e, s, r, i = {}) {
|
|
|
720
720
|
try {
|
|
721
721
|
const o = lt(a, t, e), n = {
|
|
722
722
|
...i,
|
|
723
|
-
responseFormat:
|
|
723
|
+
responseFormat: z("arch_bulk_result", ot),
|
|
724
724
|
onProgress: ae(s, "reduce")
|
|
725
725
|
}, c = await ge(t, o, n), u = Array.isArray(c) ? c : c?.results;
|
|
726
|
-
let
|
|
726
|
+
let p = [];
|
|
727
727
|
if (Array.isArray(u))
|
|
728
|
-
|
|
728
|
+
p = u;
|
|
729
729
|
else {
|
|
730
|
-
const
|
|
731
|
-
|
|
730
|
+
const d = c === null ? "null" : typeof c;
|
|
731
|
+
p = t.map((g) => ({
|
|
732
732
|
path: g,
|
|
733
733
|
passed: !1,
|
|
734
|
-
reason: `Invalid bulk response shape (expected array or { results: [] }, got ${
|
|
734
|
+
reason: `Invalid bulk response shape (expected array or { results: [] }, got ${d})`
|
|
735
735
|
}));
|
|
736
736
|
}
|
|
737
|
-
const m =
|
|
737
|
+
const m = p.filter((d) => !d.passed).length, l = p.length - m;
|
|
738
738
|
return L(
|
|
739
739
|
s,
|
|
740
740
|
t,
|
|
@@ -745,7 +745,7 @@ async function oe(t, a, e, s, r, i = {}) {
|
|
|
745
745
|
passed: l,
|
|
746
746
|
failed: m
|
|
747
747
|
}
|
|
748
|
-
),
|
|
748
|
+
), p;
|
|
749
749
|
} catch (o) {
|
|
750
750
|
const n = t.map((c) => ({
|
|
751
751
|
path: c,
|
|
@@ -795,7 +795,7 @@ function tt(t, a) {
|
|
|
795
795
|
};
|
|
796
796
|
}
|
|
797
797
|
function st(t, a, e, s) {
|
|
798
|
-
const r = a || e.length > 0 || s <=
|
|
798
|
+
const r = a || e.length > 0 || s <= Ge;
|
|
799
799
|
return {
|
|
800
800
|
mode: r ? B.INDIVIDUAL : B.BULK,
|
|
801
801
|
batchSize: r ? t.maxConcurrency : t.bulkSize,
|
|
@@ -885,14 +885,14 @@ async function rt(t, a, e, s) {
|
|
|
885
885
|
c,
|
|
886
886
|
s.runConfig
|
|
887
887
|
);
|
|
888
|
-
const
|
|
888
|
+
const p = at(u, e.mode, {
|
|
889
889
|
...s,
|
|
890
890
|
currentFailures: o
|
|
891
891
|
});
|
|
892
|
-
if (i.push(...
|
|
892
|
+
if (i.push(...p.results), o = p.failures, L(
|
|
893
893
|
s.onChunkProcessed,
|
|
894
894
|
n.items,
|
|
895
|
-
|
|
895
|
+
p.errors.length > 0 ? p.errors[0] : void 0,
|
|
896
896
|
{
|
|
897
897
|
...Q(
|
|
898
898
|
n,
|
|
@@ -902,9 +902,9 @@ async function rt(t, a, e, s) {
|
|
|
902
902
|
s,
|
|
903
903
|
e.mode
|
|
904
904
|
),
|
|
905
|
-
...
|
|
905
|
+
...p.progressData
|
|
906
906
|
}
|
|
907
|
-
),
|
|
907
|
+
), p.shouldStop)
|
|
908
908
|
break;
|
|
909
909
|
}
|
|
910
910
|
return i;
|
|
@@ -987,7 +987,7 @@ function lt(t, a, e) {
|
|
|
987
987
|
}
|
|
988
988
|
class ut {
|
|
989
989
|
constructor(a, e = {}) {
|
|
990
|
-
this.target = a, this.options = e, this.contexts = [], this.itemContextFns = [], this.maxFailures = e.maxFailures || ne, this.bulkSize = e.bulkSize ||
|
|
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;
|
|
991
991
|
}
|
|
992
992
|
withContext(a) {
|
|
993
993
|
return this.contexts.push(a), this;
|
|
@@ -1000,12 +1000,12 @@ class ut {
|
|
|
1000
1000
|
return this.description = a, this;
|
|
1001
1001
|
}
|
|
1002
1002
|
// Set up for a coverage test
|
|
1003
|
-
coverage(a =
|
|
1003
|
+
coverage(a = He) {
|
|
1004
1004
|
return this.threshold = a, this.isCoverageTest = !0, this;
|
|
1005
1005
|
}
|
|
1006
1006
|
// Start processing - this is the fluent terminator
|
|
1007
1007
|
async start() {
|
|
1008
|
-
const a =
|
|
1008
|
+
const a = O("ai-arch-expect", this.options), e = U("ai-arch-expect", a.onProgress, a);
|
|
1009
1009
|
e.start(), e.emit({ event: E.input, value: this.description });
|
|
1010
1010
|
try {
|
|
1011
1011
|
if (!this.description)
|
|
@@ -1031,17 +1031,17 @@ class ut {
|
|
|
1031
1031
|
maxFailures: c,
|
|
1032
1032
|
isCoverageTest: this.isCoverageTest,
|
|
1033
1033
|
runConfig: a
|
|
1034
|
-
},
|
|
1035
|
-
if (
|
|
1036
|
-
const
|
|
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
1037
|
if (!x)
|
|
1038
1038
|
throw new Error(P);
|
|
1039
|
-
const
|
|
1040
|
-
return e.emit({ event: E.output, value:
|
|
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;
|
|
1041
1041
|
}
|
|
1042
1042
|
const l = this.summarize(s, m);
|
|
1043
1043
|
return e.emit({ event: E.output, value: l }), e.complete({
|
|
1044
|
-
outcome:
|
|
1044
|
+
outcome: T.success,
|
|
1045
1045
|
total: s.length,
|
|
1046
1046
|
passed: l.details.passed
|
|
1047
1047
|
}), l;
|
|
@@ -1056,10 +1056,10 @@ class ut {
|
|
|
1056
1056
|
return tt(s, r);
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function dt(t, a = {}) {
|
|
1060
1060
|
return new ut(t, a);
|
|
1061
1061
|
}
|
|
1062
|
-
|
|
1062
|
+
dt.knownTexts = [];
|
|
1063
1063
|
function Dt() {
|
|
1064
1064
|
return console.warn("scanJS is not available in browser environment"), Promise.resolve({});
|
|
1065
1065
|
}
|
|
@@ -1087,10 +1087,10 @@ const Z = {
|
|
|
1087
1087
|
}, ee = "test";
|
|
1088
1088
|
async function le(t, a, e) {
|
|
1089
1089
|
[a, e] = fe(a, e);
|
|
1090
|
-
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);
|
|
1091
1091
|
o.start();
|
|
1092
1092
|
try {
|
|
1093
|
-
const n = await
|
|
1093
|
+
const n = await Se.readFile(t, "utf-8");
|
|
1094
1094
|
o.emit({ event: E.phase, phase: "file-read", path: t });
|
|
1095
1095
|
const c = r ? `
|
|
1096
1096
|
|
|
@@ -1109,28 +1109,28 @@ GUIDELINES:
|
|
|
1109
1109
|
- Be concise but clear in your feedback
|
|
1110
1110
|
- If no issues are found, return {"hasIssues": false, "issues": []}${c}`;
|
|
1111
1111
|
o.emit({ event: E.phase, phase: "analyzing" });
|
|
1112
|
-
const
|
|
1113
|
-
() =>
|
|
1112
|
+
const p = await ye(
|
|
1113
|
+
() => H(u, {
|
|
1114
1114
|
...i,
|
|
1115
|
-
responseFormat:
|
|
1115
|
+
responseFormat: z(Z.name, Z.schema)
|
|
1116
1116
|
}),
|
|
1117
1117
|
{
|
|
1118
1118
|
label: "test chain",
|
|
1119
1119
|
config: i
|
|
1120
1120
|
}
|
|
1121
|
-
), m =
|
|
1121
|
+
), m = p.hasIssues ? p.issues : [];
|
|
1122
1122
|
return o.emit({
|
|
1123
1123
|
event: E.phase,
|
|
1124
1124
|
phase: "analysis-complete",
|
|
1125
1125
|
issueCount: m.length
|
|
1126
|
-
}), o.complete({ outcome:
|
|
1126
|
+
}), o.complete({ outcome: T.success }), m;
|
|
1127
1127
|
} catch (n) {
|
|
1128
1128
|
throw o.error(n), n;
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
1131
|
le.knownTexts = [];
|
|
1132
|
-
const te = "test-advice",
|
|
1133
|
-
|
|
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,
|
|
1134
1134
|
mt,
|
|
1135
1135
|
ht,
|
|
1136
1136
|
gt,
|
|
@@ -1139,22 +1139,22 @@ const te = "test-advice", dt = "Run the code with 5 boundary value test cases an
|
|
|
1139
1139
|
yt,
|
|
1140
1140
|
wt
|
|
1141
1141
|
];
|
|
1142
|
-
async function
|
|
1142
|
+
async function St(t, a = {}) {
|
|
1143
1143
|
if (typeof t != "string" || t.length === 0)
|
|
1144
1144
|
throw new Error(
|
|
1145
1145
|
`test-advice: path must be a non-empty string (got ${t === null ? "null" : typeof t})`
|
|
1146
1146
|
);
|
|
1147
|
-
const e =
|
|
1147
|
+
const e = O(te, a), s = U(te, e.onProgress, e);
|
|
1148
1148
|
s.start();
|
|
1149
1149
|
try {
|
|
1150
|
-
const r = s.batch(
|
|
1151
|
-
|
|
1150
|
+
const r = s.batch($.length), o = (await we(
|
|
1151
|
+
$,
|
|
1152
1152
|
async (u) => {
|
|
1153
|
-
const
|
|
1153
|
+
const p = await le(t, u, {
|
|
1154
1154
|
...e,
|
|
1155
1155
|
onProgress: ae(e.onProgress, "test-advice:test")
|
|
1156
1156
|
});
|
|
1157
|
-
return r(1),
|
|
1157
|
+
return r(1), p;
|
|
1158
1158
|
},
|
|
1159
1159
|
{
|
|
1160
1160
|
maxParallel: 3,
|
|
@@ -1162,12 +1162,12 @@ async function vt(t, a = {}) {
|
|
|
1162
1162
|
abortSignal: e.abortSignal,
|
|
1163
1163
|
label: "test-advice:instructions"
|
|
1164
1164
|
}
|
|
1165
|
-
)).filter(Array.isArray), n =
|
|
1165
|
+
)).filter(Array.isArray), n = $.length - o.length;
|
|
1166
1166
|
if (o.length === 0)
|
|
1167
|
-
throw new Error(`test-advice: all ${
|
|
1167
|
+
throw new Error(`test-advice: all ${$.length} instructions failed`);
|
|
1168
1168
|
const c = o.flat();
|
|
1169
1169
|
return s.complete({
|
|
1170
|
-
outcome: n > 0 ?
|
|
1170
|
+
outcome: n > 0 ? T.partial : T.success,
|
|
1171
1171
|
totalIssues: c.length,
|
|
1172
1172
|
failedInstructions: n
|
|
1173
1173
|
}), c;
|
|
@@ -1175,278 +1175,290 @@ async function vt(t, a = {}) {
|
|
|
1175
1175
|
throw s.error(r), r;
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
|
-
|
|
1179
|
-
|
|
1178
|
+
St.knownTexts = [];
|
|
1179
|
+
de.config();
|
|
1180
1180
|
export {
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
Bt 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,
|
|
1185
1186
|
Ut as ChainEvent,
|
|
1186
1187
|
zt as ChainTree,
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1188
|
+
_t as ContextBudget,
|
|
1189
|
+
jt as Conversation,
|
|
1190
|
+
qt as DEFAULT_HEADING_DETECTORS,
|
|
1191
|
+
Vt as DOMAIN,
|
|
1190
1192
|
E as DomainEvent,
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
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,
|
|
1199
1201
|
D as OpEvent,
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
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,
|
|
1240
|
+
Fs as computeTagStatistics,
|
|
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,
|
|
1245
1248
|
me as createTempDir,
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
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,
|
|
1283
1288
|
Ce as extractButtons,
|
|
1284
1289
|
ke as extractForms,
|
|
1285
|
-
|
|
1290
|
+
Aa as extractJson,
|
|
1286
1291
|
xe as extractLinks,
|
|
1287
1292
|
Pe as extractMeta,
|
|
1288
1293
|
Ee as extractPage,
|
|
1289
1294
|
Ie as extractScripts,
|
|
1290
1295
|
Ae as extractStructure,
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
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,
|
|
1305
1310
|
se as getOptions,
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1311
|
+
ja as glossary,
|
|
1312
|
+
qa as group,
|
|
1313
|
+
Va as groupEach,
|
|
1314
|
+
Wa as groupItem,
|
|
1315
|
+
Ha as groupParallel,
|
|
1316
|
+
Ga as hashHeading,
|
|
1317
|
+
Tt as imageToBase64,
|
|
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,
|
|
1358
1368
|
we as parallel,
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
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,
|
|
1373
1383
|
ge as reduce,
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1384
|
+
en as reduceEach,
|
|
1385
|
+
tn as reduceItem,
|
|
1386
|
+
sn as relationInstructions,
|
|
1387
|
+
an as relationItem,
|
|
1388
|
+
rn as relationSpec,
|
|
1379
1389
|
At as resizeImage,
|
|
1380
1390
|
fe as resolveArgs,
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1391
|
+
nn as resolveEmbedding,
|
|
1392
|
+
on as resolveModel,
|
|
1393
|
+
cn as resolveOutputDir,
|
|
1384
1394
|
be as resolveTexts,
|
|
1385
1395
|
ye as retry,
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1396
|
+
ln as ringBuffer,
|
|
1397
|
+
un as scaleInstructions,
|
|
1398
|
+
dn as scaleItem,
|
|
1399
|
+
pn as scaleSpec,
|
|
1390
1400
|
Dt as scanJS,
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1401
|
+
mn as schemaOrg,
|
|
1402
|
+
hn as schemas,
|
|
1403
|
+
gn as scientificFramingPrompt,
|
|
1394
1404
|
ae as scopePhase,
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
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,
|
|
1408
1419
|
We as siteCrawl,
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
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,
|
|
1428
1439
|
le as test,
|
|
1429
|
-
|
|
1430
|
-
|
|
1440
|
+
St as testAdvice,
|
|
1441
|
+
Xn as themes,
|
|
1431
1442
|
Et as tileImages,
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
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,
|
|
1459
|
+
Rt as webScrape,
|
|
1460
|
+
mo as windowFor,
|
|
1461
|
+
ho as withInactivityTimeout,
|
|
1450
1462
|
W as withPolicy,
|
|
1451
|
-
|
|
1463
|
+
go as zipWith
|
|
1452
1464
|
};
|