Skip to content

[codex] Desktop local-first Rust daemon MVP#7400

Draft
Git-on-my-level wants to merge 58 commits into
BasedHardware:mainfrom
Git-on-my-level:codex/ticket-003-local-backend-apis
Draft

[codex] Desktop local-first Rust daemon MVP#7400
Git-on-my-level wants to merge 58 commits into
BasedHardware:mainfrom
Git-on-my-level:codex/ticket-003-local-backend-apis

Conversation

@Git-on-my-level
Copy link
Copy Markdown

Summary

Adds a desktop-first local/hybrid MVP path for Omi Desktop built around a new lightweight Rust local daemon under desktop/local-backend.

Major pieces:

  • local Axum + SQLite/WAL daemon for profile/settings, conversations, transcript segments, search, memories, action items, and processing jobs
  • deterministic fallback conversation processing plus direct OpenAI-compatible provider support when explicitly configured
  • desktop local-daemon routing via OMI_DESKTOP_BACKEND_MODE=local and OMI_LOCAL_DAEMON_URL
  • local-mode guards for cloud-only or hosted surfaces including public sharing, folders/merge, managed agent VM, payments/quota, Crisp, Persona, AI profile sync, proactive/staged task paths, API-key fetches, and provider proxy helpers
  • local memory import/listing support including local batch memory import and pagination/filter routing
  • local MVP runbook, architecture docs, smoke tests, and expanded Swift routing tests

Why

This is intended to let developers run a useful Omi Desktop local-first profile without requiring Omi-hosted backend services for core MVP flows. Explicit user-configured provider egress remains allowed for hybrid LLM/STT usage, but Omi backend/Firebase/Firestore/Redis/GCS/pusher/agent-proxy are not prerequisites for local core flows.

Manual run

Start the local daemon:

cd desktop/local-backend
cargo run -- --bind 127.0.0.1:8765

Run the desktop dev app against it:

export OMI_DESKTOP_BACKEND_MODE=local
export OMI_LOCAL_DAEMON_URL=http://127.0.0.1:8765
cd desktop
./run.sh

Validation

Passed locally:

python3 .codex-autorunner/bin/lint_tickets.py
desktop/local-backend/tools/local_only_self_test.sh
cd desktop/local-backend && cargo fmt --check && cargo test
cd desktop && xcrun swift test --package-path Desktop --filter APIClientRoutingTests

Latest focused results:

  • local backend Rust tests: 25 passed
  • Swift APIClientRoutingTests: 82 passed
  • local-only MVP self-test: passed daemon smoke and desktop local-mode routing boundary

Notes

This is opened as a draft because the diff is large and should get manual developer testing on another machine before review-ready status.

David Zhang and others added 30 commits May 18, 2026 20:55
…tion retry

- Major APIClient.swift refactor: structured routing layer (+609/-1)
- Add DesktopBackendEnvironment with configurable endpoint resolution (+62)
- Harden TranscriptionRetryService with exponential backoff (+35/-19)
- Add APIClientRoutingTests with comprehensive route coverage (+91)
- Update .env.example with new backend environment variables
Map completed to status for PATCH v1/action-items in local mode, and add
GET v1/conversations/count in the local Rust backend so the desktop client
avoids loading full conversation rows just to count them.
…l-mode UI

- Major ConversationDetailView.swift refactor (+2,378 lines changed)
- Add local-mode toggle to SettingsPage
- Update ConversationsPage with local-first indicators
- Expand .env.example with local backend config
- Update local-backend README and MVP runbook
Desktop routes chat, embeddings, vision, and Apple Speech STT through configurable local providers; the daemon gains folders, merge, chat sessions, and provider test/seed tooling for end-to-end hybrid dev.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route hybrid chat and proactive LLM through a localhost Codex proxy using ~/.codex auth, add Settings enrollment UX, local memory wiki + FTS for search, backend tier activation, and bundle the proxy in run.sh.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reuse a healthy loopback proxy instead of respawning, surface proxy stderr on failure, skip cloud enrollment in local daemon mode, and refresh Settings immediately via CodexAuthStore.

Co-authored-by: Cursor <cursoragent@cursor.com>
David Zhang and others added 28 commits May 20, 2026 13:13
Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 65bfaa6)
(cherry picked from commit a18d2bb)
(cherry picked from commit c1e5d0d)
(cherry picked from commit 5e7bc7b)
(cherry picked from commit 938c01c)
Require X-ChatGPT-Fingerprint on requests for quota and subscription bypass,
refresh enrollment heartbeat from desktop launch and throttled server updates,
resolve Codex transport at call time in GeminiClient, label wiki search hits
distinctly from tasks, and include memory id in wiki slugs to avoid collisions.

(cherry picked from commit 63fde7b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants