mirror of
https://github.com/andrewyng/openworker.git
synced 2026-11-20 20:37:44 +00:00
Allow developers to easily build AI apps without worrying about the harness part. Bundles the Rust agent runtime as a SDK (Rust and TypeScript) for building desktop and web applications. Applications can manage a local harness or connect to an authenticated harness service on k8s with separately scaled workers and sandbox execution. The implementation is primarily contained in harness/, with deployment tooling in deploy/, Markdown guides in docs/harness/guides/, and the static documentation site in docs-site/. It does not replace the existing Python harness or migrate OpenWorker Desktop. Co-authored-by: Devika Verma <devikaverma11@gmail.com>
37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
// Read-only capture of the existing live result after the final UI-only update.
|
|
import { readFile } from "node:fs/promises";
|
|
import { join } from "node:path";
|
|
import { repo } from "../helm/local.mjs";
|
|
const { chromium } = await import(
|
|
process.env.OW_PLAYWRIGHT_MODULE || "playwright"
|
|
);
|
|
const root = join(repo, ".ow-aws"),
|
|
origin = "http://127.0.0.1:54350";
|
|
for (let i = 0; i < 30; i++) {
|
|
try {
|
|
if ((await fetch(origin, { signal: AbortSignal.timeout(1000) })).ok) break;
|
|
} catch {}
|
|
await new Promise((r) => setTimeout(r, 1000));
|
|
}
|
|
const proof = JSON.parse(
|
|
await readFile(join(root, "taskdesk-test/live-qualification.json"), "utf8"),
|
|
);
|
|
const browser = await chromium.launch({ headless: true }),
|
|
page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
|
|
try {
|
|
await page.goto(origin + "/#" + proof.session);
|
|
await page.locator("#key").waitFor();
|
|
await page
|
|
.locator("#key")
|
|
.fill((await readFile(join(root, "access"), "utf8")).trim());
|
|
await page.locator("#login-form button").click();
|
|
await page.locator(".artifact").first().waitFor();
|
|
await page.screenshot({
|
|
path: join(root, "taskdesk-test/live.png"),
|
|
fullPage: true,
|
|
});
|
|
console.log("Saved final live-result screenshot; no new model task.");
|
|
} finally {
|
|
await browser.close();
|
|
}
|