Agent Harness
Публичная копия обвязки агентной разработки: гейты, journeys, скиллы и шаблоны. Без ключей и личных данных.
Публичная копия обвязки агентной разработки: гейты, journeys, скиллы и шаблоны. Без ключей и личных данных.
const { chromium } = require("playwright-core");
(async () => {
const b = await chromium.launch({ channel: "chrome" });
const p = await b.newPage({ viewport: { width: 1280, height: 720 } });
await p.goto("http://localhost:5173/arena/library.html", { waitUntil: "networkidle" });
await p.waitForTimeout(1200);
const r = await p.evaluate(async () => {
const core = await import("/src/core/index.js");
const ids = ["weather/fog", "weather/blizzard", "transitions/burn-away", "weather/storm", "weather/rain", "impacts/impact-frame"];
const out = [];
for (const id of ids) {
const mod = await import("/src/fx/" + id + ".js");
const meta = { fps: 30, bg: "dark", loop: false, duration: 1, tags: [], options: {}, ...mod.meta };
const [w, h] = meta.size;
const ts = [];
for (let pass = 0; pass < 3; pass++) {
const t0 = performance.now();
const f = core.createFrame(w, h);
core.backdrop(meta.bg, w, h, h);
const inst = (mod.act ? core.createAct : core.createFx)({ ...mod, meta }, { x: meta.origin[0], y: meta.origin[1] });
inst.update(meta.duration * 0.42);
inst.draw(f);
ts.push(+(performance.now() - t0).toFixed(1));
}
out.push([id, ts]);
}
return out;
});
console.log(JSON.stringify(r, null, 0));
await b.close();
})();