Skip to content

Open-source AI coworkers that each get a computer of their own: a browser, files and tools, with every action decided before it happens and recorded after. Bring any AG-UI agent.

509 B
Raw Blame
import { mkdir } from "node:fs/promises";
import { lockProviderCredentials } from "../../src/provider-oauth-lock";

const file = process.argv[2];
if (!file) throw new Error("A credential path is required.");
if (process.argv[3] === "legacy") {
  await mkdir(`${file}.lock`, { mode: 0o700 });
  console.log("locked");
  await Bun.stdin.text();
} else {
  const unlock = await lockProviderCredentials(file);
  try {
    console.log("locked");
    await Bun.stdin.text();
  } finally {
    await unlock();
  }
}