-
-
Notifications
You must be signed in to change notification settings - Fork 38
Privacy and Safety Model
Cotabby is designed so that user data never leaves the device. This page explains what Cotabby accesses, what it doesn't, and the invariants contributors must preserve.
Both suggestion engines run in-process:
-
Apple Intelligence uses the on-device
FoundationModelsframework -
Open Source runs llama.cpp in-process via
CotabbyInference
There are no network calls in the suggestion pipeline. No telemetry, no analytics, no cloud API.
Via macOS Accessibility APIs (requires Accessibility permission):
- Text value of the focused field (preceding text, trailing text)
- Selection range and caret position
- Application name and bundle identifier
- Field role/subrole for capability checks (e.g., is it a text field? is it secure?)
Cotabby refuses to operate on secure fields - the isSecure flag from the AX tree gates this in FocusSnapshotResolver.
These require explicit user opt-in:
| Feature | Permission | Gate | Sanitizer |
|---|---|---|---|
| Clipboard context | None (reads pasteboard) |
isClipboardContextEnabled setting |
PromptContextSanitizer |
| Visual context (OCR) | Screen Recording | Screen Recording system permission |
OCRTextHygiene + PromptContextSanitizer
|
Both are off by default until the user enables them.
Visual context never leaves the device or passes through a model: the screenshot is OCR'd on-device, then the recognized text is cleaned by OCRTextHygiene (pure heuristics that drop low-confidence, symbol-noise, and field-echo lines) and sanitized before being folded into the prompt as context. There is no model-summarization step.
- Never transmits data off-device. No network calls in the suggestion pipeline.
- Never persists prompt content to disk. Model input/output and field text exist only in memory during generation.
-
Never logs user content in production. Debug logging is gated behind the
-cotabby-debuglaunch argument andCotabbyDebugOptions.isEnabled. The gate's doc comment explicitly warns about sensitivity. -
Never operates in terminals. Automatic blocklist in
TerminalAppDetector.
When adding features, follow these rules:
-
New context sources must be opt-in. Add a setting toggle and gate the collection behind it. Route through
PromptContextSanitizerbefore injecting into prompts. -
No network calls in the suggestion pipeline. If a future feature needs network access, it must be a separate, opt-in subsystem - not wired into the generation path.
-
Debug logging of user content must be gated. Use
CotabbyDebugOptions.log(_:)or checkCotabbyDebugOptions.isEnabledbefore printing anything that could contain user text. -
New app/field exclusions go in the evaluator. Use
SuggestionAvailabilityEvaluatororTerminalAppDetectorfor blocklist rules - don't scatter checks through coordinator logic.