Epic: macOS desktop backend

Aperta
#211 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, macos, rust, tauri
Ambito
desktop, devops

Direzione di ricerca

This is a tracking epic; start with crates/desktop-api/src/backend.rs and compare crates/desktop-linux/src/pure.rs with crates/desktop-windows/src/pure.rs. Comment first to agree on design and claim a sub-issue; a Mac is required for the backend work. Done means the sub-issues deliver macOS desktop control, permission handling, CI coverage, and updated crate map and install docs.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: daemon enhancement help wanted needs design platform: macos

size: L (epic) · first-timer: no

Please comment before starting so we can agree on the design and on who takes which piece. This is a tracking issue: most of the work happens in the linked sub-issues. You need access to a Mac.

Summary

Make Praxi's desktop control work on macOS: a bot can take a screenshot, read the accessibility tree and click/type in apps, with the OS permission prompts handled cleanly, and the macOS backend is built and tested in CI.

Why it matters

macOS is the second most requested platform. Today the daemon and UI are expected to build there, but desktop control, the part that makes Praxi an agent for your computer, does not exist. The pieces are small enough to be contributed separately, but they need one plan so they fit together.

Current state

  • crates/desktop-api defines the OS-agnostic DesktopBackend trait (backend.rs), snapshot/action types, the act guard (guard.rs) and the live-view contract (live_view.rs).
  • crates/desktop-windows (UI Automation, SendInput, capture, live view, guard glue) and crates/desktop-linux (X11/XTest, AT-SPI, live view) are complete references. Both keep OS-independent logic in a pure.rs that tests run without a display; do the same.
  • crates/desktop-macos is a stub: its lib.rs is a four-line doc comment ("Accessibility API, CGEvent input, and screenshot capture"). Its Cargo.toml sets unsafe_code = "warn", whereas the workspace default is deny and desktop-windows uses warn together with undocumented_unsafe_blocks.
  • The workspace is not built on macOS in CI (CONTRIBUTING.md). The bundler target is NSIS only (apps/desktop/tauri.conf.json).

Sub-issues

  • #172 macOS desktop backend: screenshots
  • #173 macOS desktop backend: accessibility tree
  • #174 macOS desktop backend: keyboard and mouse input
  • #175 Build and publish Linux and macOS desktop bundles
  • #179 Homebrew cask or formula

Work that has no issue yet (claim it here)

  1. Design note and crate scaffold. Choose the bindings (for example the objc2 family or the core-graphics/accessibility crates versus hand-written FFI), and the capture API (ScreenCaptureKit versus the older window-list capture, given the macOS versions you support). Keep all unsafe in one small, documented module with safe wrappers; the project denies unsafe elsewhere.
  2. Permissions. Detect missing Screen Recording and Accessibility permission, return a typed error with a human-readable hint, and add the matching cards to the desktop app (both locales).
  3. Capabilities and guard. Implement Capabilities, window/app listing and launch, and wire the act guard the way the Windows backend does.
  4. Live view. Implement the live_view contract for macOS after the basics work.
  5. CI. A macos-latest job that builds the crate and runs the pure tests; later, the daemon and UI build.

Acceptance criteria for the epic

  • On a supported macOS version a bot can: list windows, take a screenshot, read the accessibility tree of the frontmost app, click and type, and stop on the permission-denied path with a clear message.
  • cargo test -p desktop-macos and clippy pass on a macOS CI runner; the pure logic has fixture tests that run without a display or permissions.
  • The crate map in CONTRIBUTING.md and the install docs no longer call the backend a stub.

Out of scope

Notarization and signing (belongs to the bundles issue), Apple Silicon-specific performance work, iOS.

How to get started

Compare crates/desktop-linux/src/pure.rs with crates/desktop-windows/src/pure.rs, read the trait in crates/desktop-api/src/backend.rs, then comment here saying which sub-issue you take.

Lingua principale
Rust
Stelle
0
Fork
1
Merge medio
6h 54m
PR unite (30g)
152

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di emreocell/Praxi-Bot

Tutte le issue di emreocell/Praxi-Bot

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.