ef852af986
- Replaced monolithic desktop native bindings and action batching with a modular cross-platform backend structure supporting Wayland, X11, macOS, and Win32. - Updated the computer tool schema and supervisor to execute persistent JavaScript script runs with timeout clamping and asynchronous tool calling. - Integrated accessibility (AX) tree snapshotting, node querying, and bounds-based hit testing across platform desktop layers. - Added native clipboard bindings and updated coding-agent prompts, renderers, and tests to validate script-based computer workflows.
16 lines
623 B
TypeScript
16 lines
623 B
TypeScript
const worker = new Worker(new URL("../../src/cli.ts", import.meta.url).href, {
|
|
type: "module",
|
|
argv: ["__omp_worker_computer"],
|
|
});
|
|
const response = Promise.withResolvers<unknown>();
|
|
worker.addEventListener("message", event => {
|
|
if (event.data?.type === "pong" && event.data.id === "computer-cli-selector") response.resolve(event.data);
|
|
});
|
|
worker.addEventListener("error", event => response.reject(event.error ?? new Error(event.message)));
|
|
worker.postMessage({ type: "ping", id: "computer-cli-selector" });
|
|
try {
|
|
process.stdout.write(`${JSON.stringify(await response.promise)}\n`);
|
|
} finally {
|
|
worker.terminate();
|
|
}
|