Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
fix(desktop): reset onboarding on request and keep failed test accounts findable
leepokaid75dcbb02c51
diff --git a/apps/desktop/src/main/index.ts b/apps/desktop/src/main/index.tsindex ded3afcd..c04f3d34 100644--- a/apps/desktop/src/main/index.ts+++ b/apps/desktop/src/main/index.ts@@ -156,7 +156,10 @@ function registerIPC(tray: Tray) {ipcMain.on('app:version', (e) => (e.returnValue = app.getVersion()))ipcMain.on('app:computerName', (e) => (e.returnValue = computerName()))ipcMain.on('app:openedAtLogin', (e) => (e.returnValue = openedAtLogin()))- ipcMain.on('app:devSkipOnboarding', (e) => (e.returnValue = !app.isPackaged && identity.environment === 'dev' && process.env.CODYNC_DEV_SKIP_ONBOARDING === '1'))+ ipcMain.on('app:devOnboarding', (e) => {+ const mode = process.env.CODYNC_DEV_ONBOARDING+ e.returnValue = !app.isPackaged && identity.environment === 'dev' && (mode === 'skip' || mode === 'reset') ? mode : null+ })ipcMain.on('app:debugOpen', (e) => (e.returnValue = app.isPackaged ? null : (process.env.CODYNC_DEBUG_OPEN ?? null)))ipcMain.handle('host:snapshot', () => snapshot())ipcMain.on('host:install', () => void host.install())diff --git a/apps/desktop/src/preload/index.ts b/apps/desktop/src/preload/index.tsindex 1e798524..790f412d 100644--- a/apps/desktop/src/preload/index.ts+++ b/apps/desktop/src/preload/index.ts@@ -18,12 +18,22 @@ function listen<T>(channel: string, cb: (value: T) => void) {return () => void ipcRenderer.removeListener(channel, handler)}-// A dev sandbox can start past onboarding (tools/dev.mjs); only a window that never chose is seeded.-if (ipcRenderer.sendSync('app:devSkipOnboarding') as boolean) {+// A dev sandbox starts past onboarding (`skip`: only a window that never chose is seeded) or back at+// its welcome flow (`reset`); see tools/dev.mjs.+const devOnboarding = ipcRenderer.sendSync('app:devOnboarding') as 'skip' | 'reset' | null+if (devOnboarding) {try {- if (localStorage.getItem('macAccountOnboardingCompleted') === null) localStorage.setItem('macAccountOnboardingCompleted', 'true')- if (localStorage.getItem('computerAccessSetup') === null) localStorage.setItem('computerAccessSetup', '"later"')- } catch {}+ if (devOnboarding === 'reset') {+ localStorage.removeItem('macAccountOnboardingCompleted')+ localStorage.removeItem('computerAccessSetup')+ } else {+ if (localStorage.getItem('macAccountOnboardingCompleted') === null) localStorage.setItem('macAccountOnboardingCompleted', 'true')+ if (localStorage.getItem('computerAccessSetup') === null) localStorage.setItem('computerAccessSetup', '"later"')+ }+ } catch (error) {+ // Storage unavailable: the window just shows onboarding, which only costs a dev run a click.+ console.warn('Dev onboarding preset skipped:', error)+ }}const bridge: CodyncBridge = {diff --git a/apps/desktop/tools/dev.mjs b/apps/desktop/tools/dev.mjsindex 47e701f0..348a57d2 100644--- a/apps/desktop/tools/dev.mjs+++ b/apps/desktop/tools/dev.mjs@@ -92,7 +92,14 @@ async function listAndPrune() {const running = await answers(s.port)const gone = !existsSync(s.worktree)if (flags.prune && gone && !running) {- const account = await deleteTestAccount(s.name).catch((e) => console.error(`Test account of ${s.name} kept: ${e.message}`))+ let account = false+ try {+ account = await deleteTestAccount(s.name)+ } catch (e) {+ // The sandbox folder is how a later --prune finds the account again.+ console.error(`Kept the sandbox ${s.name}: its Clerk test account wasn't deleted (${e.message}). Run --prune again.`)+ continue+ }rmSync(s.home, { recursive: true, force: true })console.log(`Deleted the sandbox ${s.name} (${s.home})${account ? ' and its Clerk test account' : ''}`)} else if (flags.list) {@@ -153,7 +160,7 @@ async function sandbox() {const appEnv = {...process.env, CODYNC_HOME: home, CODYNC_PORT: String(port),...(cdp ? { CODYNC_REMOTE_DEBUG: String(cdp) } : {}),- ...(flags.onboarding ? {} : { CODYNC_DEV_SKIP_ONBOARDING: '1' }),+ CODYNC_DEV_ONBOARDING: flags.onboarding ? 'reset' : 'skip',}// The saved session lives in desktop/account.bin; a token is only needed while it is missing.if (!existsSync(join(home, 'desktop/account.bin'))) {diff --git a/docs/guides/dev-app.md b/docs/guides/dev-app.mdindex 29f90f79..58220942 100644--- a/docs/guides/dev-app.md+++ b/docs/guides/dev-app.md@@ -30,7 +30,7 @@ Xcode configurations separate environment from optimization: `Debug` and `ReleasFlags go after `npm run dev --`: `--shared` takes the default Codync Dev from a worktree (quit the main checkout's first); `--sandbox` runs a sandbox from the main checkout, for a second session on `dev`; `--name <name>` runs the sandbox of that name, for another copy of the same checkout; `--cloud` lets the sandbox host use the dev cloud (each sandbox then shows as another computer); `--cdp` opens the DevTools protocol on the sandbox port + 10000; `--list` shows every sandbox; `--prune` deletes the ones whose worktree is gone (and their Clerk test accounts), so run it after removing worktrees.-A sandbox starts past onboarding (welcome and computer-access setup, only where the window hasn't chosen yet); `--onboarding` brings the flow back. With `CLERK_SECRET_KEY` (the Clerk **development** instance's `sk_test_...` key) in the git-ignored `.env` at the main checkout's root (every worktree reads that one file) or the environment, it also signs in its own Clerk test account `sandbox-<name>[email protected]`: `tools/dev-account.mjs` finds or creates that user through the Backend API and mints a one-time sign-in token, which `account.ts` trades for a session (`ticket` strategy, unpackaged Dev runs only). The session stays in the sandbox's `desktop/`, so the token is minted only while `desktop/account.bin` is missing. Keys that aren't `sk_test_` are refused. Without a key a sandbox starts signed out; it never borrows Codync Dev's login.+A sandbox starts past onboarding (welcome and computer-access setup, only where the window hasn't chosen yet); `--onboarding` clears those two settings at each start, so the flow comes back (a signed-in sandbox passes the welcome screen by itself and lands on computer-access setup). With `CLERK_SECRET_KEY` (the Clerk **development** instance's `sk_test_...` key) in the git-ignored `.env` at the main checkout's root (every worktree reads that one file) or the environment, it also signs in its own Clerk test account `sandbox-<name>[email protected]`: `tools/dev-account.mjs` finds or creates that user through the Backend API and mints a one-time sign-in token, which `account.ts` trades for a session (`ticket` strategy, unpackaged Dev runs only). The session stays in the sandbox's `desktop/`, so the token is minted only while `desktop/account.bin` is missing. Keys that aren't `sk_test_` are refused. Without a key a sandbox starts signed out; it never borrows Codync Dev's login.Still shared: macOS sees every unpackaged run as the same Electron app, so permissions and notifications are shared and a `codync-dev://` sign-in callback may reach another copy (test sign-in on the default Codync Dev); Codync Screen and computer use need the packaged `Codync Dev.app`; a global shortcut (the approval island's) goes to whichever app registered it first.