Agent Harness
Публичная копия обвязки агентной разработки: гейты, journeys, скиллы и шаблоны. Без ключей и личных данных.
Публичная копия обвязки агентной разработки: гейты, journeys, скиллы и шаблоны. Без ключей и личных данных.
const { chromium } = require("playwright-core");
(async () => {
const b = await chromium.launch({ args: ["--force-device-scale-factor=1", "--js-flags=--expose-gc"] });
const p = await b.newPage({ viewport: { width: 1280, height: 720 }, deviceScaleFactor: 1 });
await p.goto("http://localhost:5173/arena/", { waitUntil: "networkidle" });
await p.waitForTimeout(1200);
const r = await p.evaluate(async () => {
const a = window.__arena;
const samples = [];
let prev = performance.now(), t0 = prev;
const watch = () => {
const now = performance.now(), d = now - prev; prev = now;
samples.push([+(now - t0).toFixed(0), +d.toFixed(1), performance.memory ? performance.memory.usedJSHeapSize : 0]);
requestAnimationFrame(watch);
};
requestAnimationFrame(watch);
// frost nova three times in a row
for (let k = 0; k < 3; k++) {
a.reset();
await new Promise((r) => setTimeout(r, 200));
a.cast(2);
await new Promise((r) => setTimeout(r, 4000));
}
return samples.filter((s) => s[1] > 20).concat([["heapMax", 0, Math.max(...samples.map((s) => s[2]))]]);
});
console.log(JSON.stringify(r));
await b.close();
})();