Lines 9-49javascript
9// then the runner reports what changed (diffstat + files + summary).
10// Runs in SYNCEFFORTS_REPO with write permissions. You review + commit.
13// SYNCEFFORTS_API_KEY (required) org-scoped key from the app → API & Agents
14// SYNCEFFORTS_PROJECT_ID (required) which project to serve
15// SYNCEFFORTS_API_URL (optional) se-api base (defaults to the deployed one)
16// SYNCEFFORTS_CLAUDE_CMD (optional) the Claude CLI (default: "claude"); reads prompt on stdin (-p)
17// SYNCEFFORTS_AGENT (optional) which agent CLI to run: "claude" (default) | "antigravity" | "custom".
18// Decided ONCE at startup — a running runner never switches agents.
19// SYNCEFFORTS_ANTIGRAVITY_CMD (opt) Antigravity CLI (default: "agy"); prompt via --prompt-file, --yes.
20// SYNCEFFORTS_AGENT_CMD / _ARGS / _APPROVE_ARGS / _PROMPT (stdin|arg|file) — the "custom" adapter.
21// SYNCEFFORTS_REPO (optional) repo dir for `implement` jobs (default: current dir)
22// SYNCEFFORTS_PERMISSION (optional) Claude permission mode for implement jobs
23// (default: "bypassPermissions" — required so a headless run
24// never hangs on an approval prompt; it's your machine)
25// SYNCEFFORTS_POLL_MS (optional) poll interval (default 5000)
26// SYNCEFFORTS_WATCH (optional) "0" to disable auto-Radar. When SYNCEFFORTS_REPO is a git repo,
27// the runner watches HEAD and auto-queues a `radar` drift check on
28// each new commit (credit-free — the check runs on your local Claude).
29// SYNCEFFORTS_DRY (optional) "1" = don't call Claude; post a stub (for testing the loop)
30import { spawn } from 'node:child_process'
31import fs from 'node:fs'
32import os from 'node:os'
33import path from 'node:path'
34import { printPdf, findBrowser } from './pdf.mjs'
36const API = process.env.SYNCEFFORTS_API_URL || 'https://fpsiszputyiacbvjzytx.supabase.co/functions/v1/se-api'
37const KEY = process.env.SYNCEFFORTS_API_KEY
38const PID = process.env.SYNCEFFORTS_PROJECT_ID
39const CLAUDE = process.env.SYNCEFFORTS_CLAUDE_CMD || 'claude'
40const REPO = process.env.SYNCEFFORTS_REPO || process.cwd()
41const PERMISSION = process.env.SYNCEFFORTS_PERMISSION || 'bypassPermissions'
42const POLL = Number(process.env.SYNCEFFORTS_POLL_MS || 5000)
43const WATCH = process.env.SYNCEFFORTS_WATCH !== '0'
44const DRY = process.env.SYNCEFFORTS_DRY === '1'
45const WIN = process.platform === 'win32'
46if (!KEY || !PID) { console.error('Set SYNCEFFORTS_API_KEY and SYNCEFFORTS_PROJECT_ID.'); process.exit(1) }
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
runner.mjsView on unpkg · L29 48// ── Agent adapters (pluggable headless CLI). FOOLPROOF: the agent is decided ONCE here from
49// SYNCEFFORTS_AGENT (default 'claude'); nothing switches it at runtime, so existing Claude runners