import { execFile } from "child_process";
import { fileURLToPath } from "url";
import { dirname, join } from "path";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const target = join(__dirname, "..", "..", "auto-agents-system", "scripts", "list_prs_needs_review_not_stale.ts");
execFile("npx", ["--yes", "tsx", target, "--url", "https://git.cleverthis.com", "--pat", "060faa5ff13338d510ef808027b6314a2e895c3d", "--owner", "cleveragents", "--repo", "cleveragents-core"], { timeout: 120000 }, (err, stdout, stderr) => {
  if (err) { console.error(err.message); process.exit(1); }
  console.log(stdout);
});
