browser-cookie-bridge 1.4.7 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  <strong>Move signed-in sessions locally—or explicitly upload one to Browserless Cloud.</strong>
8
8
 
9
- <p>Brave, Chrome, Edge, Arc, Vivaldi, Opera, and Comet · ChatGPT Codex import · optional Browserless authenticated profiles.</p>
9
+ <p>Brave, Chrome, Edge, Arc, Vivaldi, Opera, and Comet · ChatGPT Codex and experimental Cursor browser import · encrypted Grok Bot <code>.bcbx</code> export · optional Browserless authenticated profiles.</p>
10
10
 
11
11
  <p>
12
12
  <img src="https://img.shields.io/badge/macOS-13.5%2B-111111?logo=apple&logoColor=white" alt="macOS 13.5+" />
@@ -46,13 +46,13 @@
46
46
 
47
47
  ---
48
48
 
49
- > **Version 1.4.0 adds an optional one-click Codex restart flow.** When enabled for a manual sync, Browser Cookie Bridge force quits Codex, waits for its database to close, performs the verified local transfer, preserves the imported/skipped/failed counts, and reopens Codex only after success. The option is off by default.
49
+ > **Version 1.5.0 adds experimental Cursor browser import and encrypted Grok Bot `.bcbx` export.** Cursor is destination-only and currently imports cookie sessions into its dedicated browser partition. Grok Bot writes a one-time encrypted transfer file with a bundled importer and a one-time key: attach the `.bcbx` file to any Grok Bot, paste the prompt, and enter the key privately when asked. Cookie values must never be logged or pasted into chat. The optional Codex restart flow from 1.4.0 is unchanged and remains off by default.
50
50
 
51
51
  ## Why Browser Cookie Bridge
52
52
 
53
- Signing into the same sites across several browsers is repetitive. Export files are awkward, password managers do not move active sessions, and ChatGPT Codex does not currently offer a Brave import button.
53
+ Signing into the same sites across several browsers is repetitive. Export files are awkward, password managers do not move active sessions, and embedded app browsers do not always offer an import button.
54
54
 
55
- Browser Cookie Bridge gives those browser profiles a small, native control panel. Local browser and Codex transfers stay on the Mac. If you explicitly select Browserless Cloud and click Upload, the app can instead send authenticated profile state to your own Browserless account.
55
+ Browser Cookie Bridge gives those browser profiles a small, native control panel. Local browser, Codex, and Cursor transfers stay on the Mac. Grok Bot uses a one-time encrypted transfer file that you attach yourself. If you explicitly select Browserless Cloud and click Upload, the app can instead send authenticated profile state to your own Browserless account.
56
56
 
57
57
  ## Windows waitlist
58
58
 
@@ -63,15 +63,16 @@ Browser Cookie Bridge currently ships for macOS. A separate Windows app is being
63
63
  - 🍪 **Cookie and session transfer** — cookies are enabled by default, including supported domain, path, expiry, security, `SameSite`, and partition attributes.
64
64
  - 🗃️ **Optional full site data for Codex** — replace Codex's compatible Local Storage, IndexedDB, Session Storage, service-worker, and related origin stores from a closed source profile, with backup and rollback. Off by default.
65
65
  - 🌐 **Seven Chromium browsers** — Brave, Chrome, Edge, Arc, Vivaldi, Opera, and Perplexity Comet can be sources or destinations.
66
- - ✨ **ChatGPT Codex import** — merge selected local browser data into Codex's built-in browser; Codex is destination-only.
66
+ - ✨ **ChatGPT Codex and experimental Cursor import** — merge cookie sessions into either app's built-in browser; Codex also supports optional history and full site data. Both are destination-only. Cursor import is experimental: it writes only to Cursor's dedicated `Partitions/cursor-browser` profile and refuses unknown schemas.
67
+ - 🤖 **Encrypted Grok Bot transfer (`.bcbx`)** — export cookie sessions into a local encrypted bundle with a one-time key and bundled importer. The destination tile uses the official Grok Bot app icon. Attach the file to any Grok Bot; the importer runs on the cloud computer only. Manual only.
67
68
  - 🔁 **Optional Codex restart** — manual Sync can force quit a running Codex instance and reopen it only after a successful local transfer; off by default.
68
69
  - 🔄 **Optional two-app restart** — Full site data can force quit the selected source browser and Codex, then reopen only the apps that were running after a successful transfer; off by default.
69
70
  - ☁️ **Optional Browserless upload** — create or refresh a Browserless authenticated profile with cookies, local storage, and IndexedDB; see a local size preflight, live progress, cancellation, and post-upload verification.
70
71
  - 🕘 **Background automation** — sync when you sign in, at a fixed daily time, or whenever you choose.
71
72
  - ◉ **Native menu-bar app** — closing the window removes the Dock icon while the helper continues running.
72
- - 🧯 **Backup and rollback** — Codex's database is backed up, modified on a separate copy, integrity-checked, and restored if replacement fails.
73
+ - 🧯 **Backup and rollback** — the destination app browser's database is backed up, modified on a separate copy, integrity-checked, and restored if replacement fails.
73
74
  - ⬆️ **Built-in updates** — checks for GitHub releases, verifies the DMG checksum, installs in place, and relaunches the app.
74
- - 🔒 **Local-first** — local paths use no account, analytics, cookie logs, or remote relay; the separate Browserless path runs only after explicit selection and confirmation.
75
+ - 🔒 **Local-first** — local paths use no account, analytics, cookie logs, or remote relay; Grok Bot writes an encrypted file you attach yourself; the separate Browserless path runs only after explicit selection and confirmation.
75
76
 
76
77
  ## What it transfers
77
78
 
@@ -79,7 +80,8 @@ Browser Cookie Bridge currently ships for macOS. A separate Windows app is being
79
80
  |---|---:|---|
80
81
  | **Cookies and sessions** | ✅ Default | Transfers supported cookie values and attributes |
81
82
  | **Full site data → Codex** | Optional | Replaces compatible origin storage from a closed Chromium profile; backs up Codex first |
82
- | **History URLs** | Optional | Original visit times and page titles cannot be preserved |
83
+ | **Encrypted Grok Bot export** | Manual | Cookie sessions only, written to a local `.bcbx` file; history and full site data are excluded |
84
+ | **History URLs** | ◐ Optional | Supported for browser and Codex targets; excluded for Cursor and Grok Bot. Original visit times and page titles cannot be preserved |
83
85
  | **Local storage and IndexedDB** | ◐ Optional | Full site data into Codex, or an explicit Browserless authenticated-profile upload |
84
86
  | **Passwords** | — Never | Chromium extensions cannot read the browser password store |
85
87
  | **Bookmarks, autofill, payments** | — Never | Not requested or accessed |
@@ -90,7 +92,7 @@ Some websites bind sessions to a specific device or browser and may ask you to s
90
92
  ## Requirements
91
93
 
92
94
  - **macOS 13.5+**
93
- - A supported Chromium browser, or ChatGPT Codex as the destination
95
+ - A supported Chromium browser as the source, plus ChatGPT Codex, Cursor, Grok Bot, another supported browser, or optional Browserless Cloud as the destination
94
96
 
95
97
  The DMG is self-contained. Node.js 24+ and Xcode Command Line Tools are required only for npm or source installation.
96
98
 
@@ -143,16 +145,40 @@ The final command compiles the native SwiftUI app, enables **Open at login**, **
143
145
 
144
146
  ## Setup
145
147
 
146
- ### Browser → ChatGPT Codex
148
+ ### Browser → ChatGPT Codex or Cursor
147
149
 
148
150
  No browser extension is needed for this path.
149
151
 
150
- 1. Select a source browser and **ChatGPT Codex** as the destination.
151
- 2. Quit Codex completely, or enable **Restart Codex automatically**. Closing only its browser panel is not enough.
152
- 3. Choose **Cookies** and, optionally, **History URLs**.
153
- 4. Press **Sync now** and reopen Codex after the success message if automatic restart is off.
152
+ Cursor support is experimental and currently limited to cookie sessions in its dedicated browser partition. The importer validates the audited Cursor schema and fails closed if Cursor changes it.
154
153
 
155
- By default, an open Codex blocks the transfer. The optional **Restart Codex automatically** setting applies only to a manual Sync: it force quits Codex, waits for its database to close, and reopens Codex only after the transfer succeeds. Scheduled and login syncs never force quit it.
154
+ 1. Select a source browser and **ChatGPT Codex** or **Cursor browser** as the destination.
155
+ 2. Quit the destination app completely. For Codex, you can instead enable **Restart Codex automatically**. Closing only the app's browser panel is not enough.
156
+ 3. Choose **Cookies**. For Codex, you can also choose **History URLs** and **Full site data**. Both are excluded for Cursor until its other browser stores can be validated safely.
157
+ 4. Press **Sync now**, then reopen the destination app after the success message.
158
+
159
+ An open destination app blocks the transfer. The optional **Restart Codex automatically** setting applies only to a manual Codex sync: it force quits Codex, waits for its database to close, and reopens Codex only after the transfer succeeds. Cursor must be quit manually. Scheduled and login syncs never force quit either app.
160
+
161
+ ### Browser → Grok Bot (encrypted `.bcbx`)
162
+
163
+ No browser extension is needed for this path.
164
+
165
+ Grok Bot cannot receive a local database merge. The app writes a one-time encrypted transfer file that you attach to any Grok Bot.
166
+
167
+ 1. Select a source browser and **Grok Bot** as the destination. The tile uses the official Grok Bot app icon.
168
+ 2. Keep **Cookies** on. History URLs and Full site data are excluded from Grok Bot transfer files.
169
+ 3. Optionally limit the export with **Only these domains**. Leave it blank to include every readable cookie.
170
+ 4. Press **Create transfer file** and choose where to save `GrokBot-Import.bcbx`.
171
+ 5. The result sheet shows the one-time decryption key and the prompt to paste. Use **Reveal file** or **Copy prompt**. Keep the key off chat logs; do not paste cookie values into chat.
172
+ 6. Attach the `.bcbx` file to any Grok Bot, paste the prompt, then enter the one-time key privately through Agent Computer when asked.
173
+
174
+ The bundle is a zip-compatible `.bcbx` file containing `manifest.json`, encrypted `payload.enc`, `import.mjs`, and `PROMPT.txt`. Cookies are encrypted with AES-256-GCM using a scrypt-derived key. The file is written with user-only permissions (`0600`). Daily sync and Sync at login never create Grok Bot bundles.
175
+
176
+ On the Grok Bot cloud computer the bundled importer:
177
+
178
+ 1. Expects you to unzip `GrokBot-Import.bcbx` and run `node import.mjs`.
179
+ 2. Prompts for the one-time decryption key. Do not print cookie names or values.
180
+ 3. Injects cookies into the cloud browser and reports only how many cookies were imported.
181
+ 4. Deletes the unzipped files and the bundle copy.
156
182
 
157
183
  ### Browser → browser
158
184
 
@@ -187,7 +213,7 @@ The official CLI records the Browserless upload-disclaimer acceptance timestamp
187
213
  | Control | What it does |
188
214
  |---|---|
189
215
  | **Export from** | Selects the browser whose data will be read |
190
- | **Import into** | Selects a different browser, ChatGPT Codex, or optional Browserless Cloud |
216
+ | **Import into** | Selects a different browser, ChatGPT Codex, experimental Cursor browser, Grok Bot, or optional Browserless Cloud |
191
217
  | **Cookies** | Moves cookies and supported session attributes; on by default |
192
218
  | **History URLs** | Adds visited URLs without their original timestamps or titles |
193
219
  | **Daily sync** | Runs at one fixed local time; off by default |
@@ -197,15 +223,15 @@ The official CLI records the Browserless upload-disclaimer acceptance timestamp
197
223
  | **Restart Codex automatically** | Force quits Codex for a manual sync and reopens it only after success; off by default |
198
224
  | **Check for updates** | Finds a newer GitHub release, verifies its DMG, and offers install + relaunch |
199
225
 
200
- Automation uses the saved source, destination, and data choices for local transfers. A scheduled Codex sync safely exits without making changes when Codex is open. Browserless cloud uploads are always manual and require an explicit upload action.
226
+ Automation uses the saved source, destination, and data choices for local transfers. A scheduled embedded-browser sync safely exits without making changes when its destination app is open. Browserless cloud uploads and Grok Bot `.bcbx` exports are always manual.
201
227
 
202
228
  ## CLI
203
229
 
204
230
  ```bash
205
231
  browser-cookie-bridge install-app [--no-open] [--replace-system-from-source]
206
232
  browser-cookie-bridge setup [--hour 9] [--minute 0] [--no-schedule]
207
- browser-cookie-bridge preferences --source brave --target codex --cookies on --history off --site-storage off --auto-restart-codex off --auto-restart-both off
208
- browser-cookie-bridge sync [--timeout 300] [--allow-cloud-upload]
233
+ browser-cookie-bridge preferences --source brave --target codex --cookies on --history off --site-storage off --auto-restart-codex off --auto-restart-both off [--grok-bot-domains example.com]
234
+ browser-cookie-bridge sync [--timeout 300] [--allow-cloud-upload] [--output /path/GrokBot-Import.bcbx]
209
235
  browser-cookie-bridge browserless-preflight
210
236
  browser-cookie-bridge doctor
211
237
  browser-cookie-bridge enable-login-sync
@@ -215,26 +241,28 @@ browser-cookie-bridge disable-app-login
215
241
  browser-cookie-bridge remove-schedule
216
242
  ```
217
243
 
218
- Supported source IDs are `brave`, `chrome`, `edge`, `arc`, `vivaldi`, `opera`, and `comet`. Target IDs are the same plus `codex` and `browserless`. The same browser cannot be both endpoints. Browserless requires `BROWSERLESS_TOKEN` and the explicit `--allow-cloud-upload` flag; the native app supplies the token from Keychain without placing it in the OS command line or app configuration.
244
+ Supported source IDs are `brave`, `chrome`, `edge`, `arc`, `vivaldi`, `opera`, and `comet`. Target IDs are the same plus `codex`, `cursor`, `browserless`, and `grok-bot`. The same browser cannot be both endpoints. Cursor import currently supports cookies only. Grok Bot export requires `--output /path/GrokBot-Import.bcbx` and writes cookies only; `--grok-bot-domains` optionally limits the bundle. The CLI prints a one-time decryption key after export—keep it private and never paste cookie values into chat. Browserless requires `BROWSERLESS_TOKEN` and the explicit `--allow-cloud-upload` flag; the native app supplies the token from Keychain without placing it in the OS command line or app configuration.
219
245
 
220
246
  ## How it works
221
247
 
222
248
  | Path | Transfer method |
223
249
  |---|---|
224
250
  | **Browser → browser** | Unpacked extensions connect to a short-lived broker on IPv4 loopback. Selected data stays in memory and is never written to logs. |
225
- | **Browser → Codex** | The app reads the selected local Chromium profile, creates a consistent Codex SQLite backup, merges into a working copy, validates it, then replaces the destination atomically. |
251
+ | **Browser → Codex / Cursor** | The app reads the selected local Chromium profile, creates a consistent destination SQLite backup, merges cookies into a working copy, validates it, then replaces only the embedded browser's cookie database atomically. Codex also supports optional history and full site data. Cursor import is experimental and limited to the dedicated browser-partition cookie store. |
252
+ | **Browser → Grok Bot** | The app reads the selected local Chromium profile, encrypts cookie sessions into a `.bcbx` bundle with a one-time key, and writes that file locally. You attach it to a Grok Bot; the bundled importer decrypts and injects cookies on the cloud computer only. |
226
253
  | **Browser → Browserless** | The bundled official Browserless CLI copies a closed local profile, captures cookies/local storage/IndexedDB, and uploads it directly to the selected Browserless region. |
227
254
 
228
255
  The broker validates a random token and extension origin, limits payload size, and normally exits after five minutes. Only the endpoints selected in the app respond to a transfer.
229
256
 
230
257
  ## Security & privacy
231
258
 
232
- - Cookie values and history URLs are never logged.
259
+ - Cookie values and history URLs are never logged. Never paste cookie values or Grok Bot decryption keys into chat.
233
260
  - Browser-to-browser data is held only in broker memory.
234
- - Codex backups are stored with user-only permissions under `~/Library/Application Support/BraveCodexCookieSync/backups/codex`; the newest 14 are retained.
235
- - Full site-data import is opt-in and requires both Codex and the source browser to be closed. It replaces compatible Codex origin-storage directories rather than attempting an unsafe LevelDB merge; the previous directories are included in the same backup.
236
- - The app refuses unknown Codex database schemas instead of guessing.
237
- - Imported Codex rows use an empty `encrypted_value` because OpenAI's Safe Storage key is protected by a private macOS Keychain access group. Those imported rows can therefore remain readable to software running as your macOS user until the website refreshes them.
261
+ - Grok Bot `.bcbx` files are encrypted locally with AES-256-GCM. Treat the bundle and its one-time key as credentials. Enter the key privately through Agent Computer when the importer asks; do not ask Grok Bot to print cookie names or values. The bundled importer reports only import counts, then deletes the unzipped files and the bundle copy.
262
+ - Direct-import backups are stored with user-only permissions under `~/Library/Application Support/BraveCodexCookieSync/backups/codex` or `backups/cursor`; the newest 14 per destination are retained.
263
+ - Full site-data import is opt-in for Codex and requires both Codex and the source browser to be closed. It replaces compatible origin-storage directories rather than attempting an unsafe LevelDB merge; the previous directories are included in the same backup.
264
+ - The app refuses unknown destination database schemas instead of guessing and writes only to Cursor's dedicated `Partitions/cursor-browser` profile, never Cursor's main application cookie store.
265
+ - Direct imports currently store imported cookie values in SQLite's plaintext `value` column with an empty `encrypted_value`. Those imported rows can therefore remain readable to software running as your macOS user until the website refreshes them.
238
266
  - Anyone who can use your logged-in macOS account or modify a generated extension may be able to access transferred browser sessions.
239
267
  - The optional Browserless destination sends authenticated state to Browserless under their terms and privacy practices. Its API token is stored in macOS Keychain, uploads are manual, and Browserless CLI telemetry is disabled by the app.
240
268
 
@@ -294,4 +322,4 @@ npm run web
294
322
 
295
323
  [MIT](LICENSE) © 2026 [Apoorv Darshan](https://github.com/apoorvdarshan)
296
324
 
297
- <sub>Not affiliated with Brave, Google, Microsoft, The Browser Company, Vivaldi, Opera, Perplexity, OpenAI, or Browserless. Their names and marks belong to their respective owners.</sub>
325
+ <sub>Not affiliated with Brave, Google, Microsoft, The Browser Company, Vivaldi, Opera, Perplexity, OpenAI, Cursor, xAI, or Browserless. Their names and marks belong to their respective owners.</sub>
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Browser Cookie Bridge",
4
- "version": "1.4.7",
5
- "description": "Transfers selected browser data locally between supported browsers and into ChatGPT Codex.",
4
+ "version": "1.5.0",
5
+ "description": "Transfers selected browser data locally between supported browsers and embedded app browsers.",
6
6
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5o6lDkXzU/23Jm2QRk4mfuxNnr3VlEIjRHcZr93Gdo7PI7asHJQhigaMGT6UOz0lkaTn1F+TGIPlsJo9GNBSsxbCfxWoBSXcFQFrPolY5LEfKaMtZQQ6eb4UAnp+bbUwb1den4On0piWU47Yzl6i0Jcdg4EG5H1kCSF/6nJsbKgF7OTaR/3drULu40yRvflzSXRhly3UDO7c5mgHJsaMwVV+VILsxbcPOoRINjuo3zDC737HFs67dpf38xF3tjSVL0HURAWKKobMvfABiDfVEm5O0Lvf+57d1Ib12QLT2qtVXNDy3iYwX+w2S0wH2vIMsfvoFPlRdmeqft70kZOqXwIDAQAB",
7
7
  "permissions": ["alarms", "cookies", "history"],
8
8
  "host_permissions": ["<all_urls>", "http://127.0.0.1/*"],
@@ -10,8 +10,8 @@
10
10
  <key>CFBundleInfoDictionaryVersion</key><string>6.0</string>
11
11
  <key>CFBundleName</key><string>Browser Cookie Bridge</string>
12
12
  <key>CFBundlePackageType</key><string>APPL</string>
13
- <key>CFBundleShortVersionString</key><string>1.4.7</string>
14
- <key>CFBundleVersion</key><string>35</string>
13
+ <key>CFBundleShortVersionString</key><string>1.5.0</string>
14
+ <key>CFBundleVersion</key><string>36</string>
15
15
  <key>LSMinimumSystemVersion</key><string>13.5</string>
16
16
  <key>NSHighResolutionCapable</key><true/>
17
17
  </dict>
@@ -239,6 +239,9 @@ struct ContentView: View {
239
239
  .sheet(isPresented: $model.showingBrowserlessSetup) {
240
240
  BrowserlessSetupSheet().environmentObject(model)
241
241
  }
242
+ .sheet(isPresented: $model.showingGrokBotResult) {
243
+ GrokBotResultSheet().environmentObject(model)
244
+ }
242
245
  }
243
246
 
244
247
  private var header: some View {
@@ -291,7 +294,7 @@ struct ContentView: View {
291
294
  .buttonStyle(.plain)
292
295
  .foregroundStyle(.secondary)
293
296
  .help("Refresh status")
294
- if model.selectedTargetID != "codex" && !model.isBrowserlessTarget {
297
+ if !model.isDirectTarget && !model.isBrowserlessTarget && !model.isGrokBotTarget {
295
298
  Button("Extension setup…") { showingSetup = true }
296
299
  .controlSize(.small)
297
300
  }
@@ -384,17 +387,18 @@ struct SyncPanel: View {
384
387
  if model.isBrowserlessTarget && model.uploadCanceling { return "Canceling…" }
385
388
  if model.isBrowserlessTarget && model.isSyncing { return "Cancel upload" }
386
389
  if model.isSyncing { return "Syncing…" }
387
- if model.codexBlocked { return "Close Codex first" }
390
+ if model.cursorHasNoDataSelected || model.grokBotHasNoDataSelected { return "Turn on Cookies" }
391
+ if model.directTargetBlocked { return "Close \(model.targetName) first" }
388
392
  if model.isBrowserlessTarget && !model.browserlessConfigured { return "Connect Browserless" }
389
393
  if model.isBrowserlessTarget && model.selectedSourceID == "comet" { return "Choose another browser" }
390
394
  if model.isBrowserlessTarget && model.sourceBrowserRunning { return "Close \(model.selectedBrowser.name) first" }
391
- return model.isBrowserlessTarget ? "Upload now" : "Sync now"
395
+ return model.isGrokBotTarget ? "Create transfer file" : model.isBrowserlessTarget ? "Upload now" : "Sync now"
392
396
  }
393
397
 
394
398
  private var syncButtonIcon: String {
395
399
  if model.isBrowserlessTarget && model.isSyncing { return "xmark.circle.fill" }
396
400
  if model.syncBlocked { return model.isBrowserlessTarget && !model.browserlessConfigured ? "key.fill" : "xmark.circle.fill" }
397
- return model.isBrowserlessTarget ? "icloud.and.arrow.up.fill" : "arrow.triangle.2.circlepath"
401
+ return model.isBrowserlessTarget ? "icloud.and.arrow.up.fill" : model.isGrokBotTarget ? "arrow.up.doc.fill" : "arrow.triangle.2.circlepath"
398
402
  }
399
403
 
400
404
  }
@@ -461,6 +465,14 @@ struct TargetPicker: View {
461
465
  }
462
466
  HStack(spacing: 5) {
463
467
  ForEach(Array(model.browsers.dropFirst(4))) { browser in targetButton(browser) }
468
+ }
469
+ HStack(spacing: 5) {
470
+ EndpointButton(
471
+ icon: model.cursorIcon,
472
+ name: "Cursor browser",
473
+ selected: model.selectedTargetID == "cursor",
474
+ disabled: model.isWorking || model.isSyncing
475
+ ) { model.selectTarget("cursor") }
464
476
  EndpointButton(
465
477
  icon: model.codexIcon,
466
478
  name: "ChatGPT Codex",
@@ -470,10 +482,16 @@ struct TargetPicker: View {
470
482
  iconWidth: 66,
471
483
  iconHeight: 38
472
484
  ) { model.selectTarget("codex") }
485
+ EndpointButton(
486
+ icon: model.grokBotIcon,
487
+ name: "Grok Bot",
488
+ selected: model.selectedTargetID == "grok-bot",
489
+ disabled: model.isWorking || model.isSyncing
490
+ ) { model.selectTarget("grok-bot") }
473
491
  }
474
492
  }
475
493
  }
476
- .frame(width: 199)
494
+ .frame(width: 220)
477
495
  }
478
496
 
479
497
  private func targetButton(_ browser: BrowserChoice) -> some View {
@@ -562,12 +580,56 @@ struct PreferencesPanel: View {
562
580
  .help("Rescan local profile size")
563
581
  }
564
582
  }
583
+ } else if model.isGrokBotTarget {
584
+ PreferenceRow(
585
+ icon: "network",
586
+ color: Theme.accent,
587
+ title: "Cookies",
588
+ detail: "Encrypted cookie sessions for Grok Bot's shared cloud browser"
589
+ ) {
590
+ Toggle("", isOn: Binding(get: { model.cookiesEnabled }, set: { model.setCookiesEnabled($0) }))
591
+ .labelsHidden().toggleStyle(.switch).tint(Theme.active).disabled(model.isWorking)
592
+ }
593
+ RowDivider()
594
+ PreferenceRow(icon: "externaldrive.badge.plus", color: .secondary, title: "Full site data", detail: "Not included in Grok Bot transfer files", muted: true) {
595
+ FixedBadge("Excluded")
596
+ }
597
+ RowDivider()
598
+ PreferenceRow(icon: "clock.arrow.circlepath", color: .secondary, title: "History URLs", detail: "Not included in Grok Bot transfer files", muted: true) {
599
+ FixedBadge("Excluded")
600
+ }
601
+ RowDivider()
602
+ PreferenceRow(icon: "line.3.horizontal.decrease.circle", color: Theme.accent, title: "Only these domains", detail: "Leave blank to export every readable cookie") {
603
+ TextField("example.com, app.example.com", text: Binding(
604
+ get: { model.grokBotOnlyDomains },
605
+ set: { model.setGrokBotOnlyDomains($0) }
606
+ ))
607
+ .textFieldStyle(.roundedBorder)
608
+ .frame(width: 220)
609
+ .disabled(model.isWorking || model.isSyncing)
610
+ }
565
611
  } else {
566
- PreferenceRow(icon: "network", color: Theme.accent, title: "Cookies", detail: "Site sessions and sign-ins") {
612
+ PreferenceRow(
613
+ icon: "network",
614
+ color: Theme.accent,
615
+ title: "Cookies",
616
+ detail: model.selectedTargetID == "cursor" ? "Experimental direct import into Cursor's browser partition" : "Site sessions and sign-ins"
617
+ ) {
567
618
  Toggle("", isOn: Binding(get: { model.cookiesEnabled }, set: { model.setCookiesEnabled($0) }))
568
619
  .labelsHidden().toggleStyle(.switch).tint(Theme.active).disabled(model.isWorking)
569
620
  }
570
- if model.selectedTargetID == "codex" {
621
+ if model.selectedTargetID == "cursor" {
622
+ RowDivider()
623
+ PreferenceRow(
624
+ icon: "externaldrive.badge.plus",
625
+ color: .secondary,
626
+ title: "Full site data",
627
+ detail: "Not enabled for Cursor browser yet",
628
+ muted: true
629
+ ) {
630
+ FixedBadge("Excluded")
631
+ }
632
+ } else if model.selectedTargetID == "codex" {
571
633
  RowDivider()
572
634
  PreferenceRow(
573
635
  icon: "externaldrive.badge.plus",
@@ -580,9 +642,15 @@ struct PreferencesPanel: View {
580
642
  }
581
643
  }
582
644
  RowDivider()
583
- PreferenceRow(icon: "clock.arrow.circlepath", color: Theme.accent, title: "History URLs", detail: "Original visit times are not preserved") {
584
- Toggle("", isOn: Binding(get: { model.historyEnabled }, set: { model.setHistoryEnabled($0) }))
585
- .labelsHidden().toggleStyle(.switch).tint(Theme.active).disabled(model.isWorking)
645
+ if model.selectedTargetID == "cursor" {
646
+ PreferenceRow(icon: "clock.arrow.circlepath", color: .secondary, title: "History URLs", detail: "Cursor browser does not expose a history store", muted: true) {
647
+ FixedBadge("Excluded")
648
+ }
649
+ } else {
650
+ PreferenceRow(icon: "clock.arrow.circlepath", color: Theme.accent, title: "History URLs", detail: "Original visit times are not preserved") {
651
+ Toggle("", isOn: Binding(get: { model.historyEnabled }, set: { model.setHistoryEnabled($0) }))
652
+ .labelsHidden().toggleStyle(.switch).tint(Theme.active).disabled(model.isWorking)
653
+ }
586
654
  }
587
655
  RowDivider()
588
656
  PreferenceRow(icon: "key.slash", color: .secondary, title: "Passwords", detail: "Browser extensions cannot access passwords", muted: true) {
@@ -615,8 +683,8 @@ struct PreferencesPanel: View {
615
683
  }
616
684
 
617
685
  SectionLabel(title: "Automation", detail: "Runs in the background", separated: true)
618
- PreferenceRow(icon: "clock.badge.checkmark", color: Theme.accent, title: "Daily sync", detail: model.isBrowserlessTarget ? "Unavailable for cloud uploads" : (model.dailyEnabled ? "At the selected local time" : "Off")) {
619
- if model.isBrowserlessTarget {
686
+ PreferenceRow(icon: "clock.badge.checkmark", color: Theme.accent, title: "Daily sync", detail: model.isBrowserlessTarget || model.isGrokBotTarget ? "Unavailable for this destination" : (model.dailyEnabled ? "At the selected local time" : "Off")) {
687
+ if model.isBrowserlessTarget || model.isGrokBotTarget {
620
688
  FixedBadge("Manual only")
621
689
  } else {
622
690
  HStack(spacing: 8) {
@@ -635,8 +703,8 @@ struct PreferencesPanel: View {
635
703
  }
636
704
  }
637
705
  RowDivider()
638
- PreferenceRow(icon: "sunrise.fill", color: Theme.accent, title: "Sync at login", detail: model.isBrowserlessTarget ? "Unavailable for cloud uploads" : (model.loginSyncEnabled ? "Once whenever you sign in" : "Off")) {
639
- if model.isBrowserlessTarget {
706
+ PreferenceRow(icon: "sunrise.fill", color: Theme.accent, title: "Sync at login", detail: model.isBrowserlessTarget || model.isGrokBotTarget ? "Unavailable for this destination" : (model.loginSyncEnabled ? "Once whenever you sign in" : "Off")) {
707
+ if model.isBrowserlessTarget || model.isGrokBotTarget {
640
708
  FixedBadge("Manual only")
641
709
  } else {
642
710
  Toggle("", isOn: Binding(get: { model.loginSyncEnabled }, set: { model.setLoginSyncEnabled($0) }))
@@ -863,7 +931,7 @@ struct ExtensionSetupSheet: View {
863
931
  Button("Open page") { model.openExtensions(for: model.selectedSourceID) }
864
932
  Button("Show folder") { model.revealExtension(model.selectedSourceID) }
865
933
  }
866
- if model.selectedTargetID != "codex" {
934
+ if !model.isDirectTarget && !model.isGrokBotTarget {
867
935
  Divider().padding(.leading, 58)
868
936
  SetupEndpointRow(icon: model.targetIcon, title: model.targetName, detail: "Load the destination extension") {
869
937
  Button("Open page") { model.openExtensions(for: model.selectedTargetID) }
@@ -874,8 +942,10 @@ struct ExtensionSetupSheet: View {
874
942
  .background(Color(nsColor: .controlBackgroundColor).opacity(0.65), in: RoundedRectangle(cornerRadius: 12, style: .continuous))
875
943
  .overlay(RoundedRectangle(cornerRadius: 12, style: .continuous).stroke(Color.primary.opacity(0.07)))
876
944
 
877
- Text(model.selectedTargetID == "codex"
878
- ? "Codex uses a direct local merge, so no extension is required. Quit Codex before syncing. Password access is never requested."
945
+ Text(model.isDirectTarget
946
+ ? "\(model.targetName) uses a direct local merge, so no extension is required. Quit \(model.targetName) before syncing. Password access is never requested."
947
+ : model.isGrokBotTarget
948
+ ? "Grok Bot uses a one-time encrypted transfer file, so no extension is required. Create the .bcbx bundle, attach it to any Grok Bot, and paste the prompt."
879
949
  : "In both endpoints, enable Developer mode and choose Load unpacked. Password access is never requested.")
880
950
  .font(.system(size: 10.5))
881
951
  .foregroundStyle(.secondary)
@@ -1089,3 +1159,73 @@ enum Theme {
1089
1159
  static let accent = Color(red: 0.46, green: 0.46, blue: 0.48)
1090
1160
  static let active = Color(red: 0.54, green: 0.12, blue: 0.18)
1091
1161
  }
1162
+
1163
+ struct GrokBotResultSheet: View {
1164
+ @EnvironmentObject private var model: SyncModel
1165
+ @Environment(\.dismiss) private var dismiss
1166
+
1167
+ var body: some View {
1168
+ VStack(alignment: .leading, spacing: 16) {
1169
+ HStack(alignment: .top, spacing: 12) {
1170
+ Image(nsImage: model.grokBotIcon)
1171
+ .resizable()
1172
+ .scaledToFit()
1173
+ .frame(width: 24, height: 24)
1174
+ .frame(width: 40, height: 40)
1175
+ .background(Theme.accent.opacity(0.11), in: RoundedRectangle(cornerRadius: 11, style: .continuous))
1176
+ VStack(alignment: .leading, spacing: 3) {
1177
+ Text("Grok Bot transfer ready")
1178
+ .font(.system(size: 18, weight: .bold, design: .rounded))
1179
+ Text(URL(fileURLWithPath: model.grokBotOutputPath).lastPathComponent)
1180
+ .font(.system(size: 11.5))
1181
+ .foregroundStyle(.secondary)
1182
+ }
1183
+ Spacer()
1184
+ }
1185
+
1186
+ VStack(alignment: .leading, spacing: 8) {
1187
+ Text("One-time decryption key")
1188
+ .font(.system(size: 11, weight: .semibold))
1189
+ .foregroundStyle(.secondary)
1190
+ Text(model.grokBotPassphrase)
1191
+ .font(.system(size: 15, weight: .semibold, design: .monospaced))
1192
+ .textSelection(.enabled)
1193
+ .padding(10)
1194
+ .frame(maxWidth: .infinity, alignment: .leading)
1195
+ .background(Color.primary.opacity(0.04), in: RoundedRectangle(cornerRadius: 10, style: .continuous))
1196
+ }
1197
+
1198
+ VStack(alignment: .leading, spacing: 8) {
1199
+ Text("Prompt for Grok Bot")
1200
+ .font(.system(size: 11, weight: .semibold))
1201
+ .foregroundStyle(.secondary)
1202
+ ScrollView {
1203
+ Text(model.grokBotPrompt)
1204
+ .font(.system(size: 11))
1205
+ .frame(maxWidth: .infinity, alignment: .leading)
1206
+ .textSelection(.enabled)
1207
+ }
1208
+ .frame(height: 180)
1209
+ .padding(10)
1210
+ .background(Color.primary.opacity(0.04), in: RoundedRectangle(cornerRadius: 10, style: .continuous))
1211
+ }
1212
+
1213
+ HStack {
1214
+ Button("Reveal file") {
1215
+ let url = URL(fileURLWithPath: model.grokBotOutputPath)
1216
+ NSWorkspace.shared.activateFileViewerSelecting([url])
1217
+ }
1218
+ Button("Copy prompt") {
1219
+ NSPasteboard.general.clearContents()
1220
+ NSPasteboard.general.setString(model.grokBotPrompt, forType: .string)
1221
+ }
1222
+ Spacer()
1223
+ Button("Done") { dismiss() }
1224
+ .keyboardShortcut(.defaultAction)
1225
+ }
1226
+ .controlSize(.regular)
1227
+ }
1228
+ .padding(20)
1229
+ .frame(width: 520)
1230
+ }
1231
+ }