Skip to content

en Indexing Privacy and Volumes

Surfire edited this page Dec 6, 2026 · 2 revisions

← Back to Home · 简体中文

Indexing Scope, External Volumes & Privacy Boundaries

Lumen cleanly separates whole-disk filename indexing, opt-in document content & semantics, external/network volumes, and OS-enforced privacy boundaries.


1. Two-Layer Index Model: Filenames vs. Content & Semantics

Layer Default Scope Highlights
Filename Index Automatic coverage of user folders and installed apps (excluding dev/system noise) Compact in-memory Rust SoA: 70.1 MiB (macOS) / 42.6 MiB (Windows) for 500K files on the 8 GB tier, ~144.7 MiB for 1.67M real files; ~1 ms lookup, zero AI required
Content & Semantic Index Opt-in folders chosen explicitly in Settings → Index Extracts text from PDF, modern & legacy Office (.docx/.xlsx/.pptx/.doc/.xls/.ppt/.rtf), subtitles (.srt/.vtt), Markdown/plain text, plus optional source code and image OCR

Fine-Grained Content Filtering (Settings → Index)

  • Include Source Code (enable_code): Off by default so huge repositories don't drown out documents; toggle on anytime to index 30+ code & config extensions.
  • Format & Extension Controls: Independently toggle PDF, Office, plain text/Markdown, and image OCR, or add custom allow/deny extensions and excluded folders.
  • Smart Noise Detection: Pre-scan flags noisy subfolders (ai_runtime, sequential_frames, image_dump) while automatically protecting personal knowledge bases (Obsidian, Notes, Vault, Wiki, Knowledge under 5,000 items).
  • Live Watching & Battery-Quiet Power Architecture (v0.9.0):
    • macOS: Coalesced native FSEvents (0.6s latency, QOS_CLASS_UTILITY) + WatchStop 0 Hz idle wait + zero-polling PowerStateMonitor; unreadable TCC-protected directories use targeted exponential backoff (up to 30 min AC / 60 min battery) instead of full-catalog reconciliation—cutting idle watcher CPU by ~265× (0% steady), IDLEW by 97% (491 → 14), and cold status() by 2.27× (3.10s → 1.37s on a 20 GB live DB).
    • Windows: Parallel FindFirstFileExW + ReadDirectoryChangesW & USN catch-up paired with WM_POWERBROADCAST + EcoQoS for 0% steady idle CPU.

2. Smart Default Scope Policy (scope_policy_v6) & Hidden Folders

Automatic Noise Exclusions

Lumen skips churn and build junk out of the box:

  • Dev build artifacts & virtual environments: node_modules, target, Python venvs (detected via PEP 405 pyvenv.cfg and *venv* / site-packages), .git VCS metadata, and internal .app bundle internals.
  • OS system exclusions: /Users/Deleted Users on macOS; C:\Windows, $Recycle.Bin, System Volume Information on Windows.
  • Transient write files: -wal, -shm, -journal, .heartbeat, .part, .crdownload, ~$*.

Zero-Config Coverage: IM Downloads & Coding Harness Outputs

Need to find files received in chat apps or artifacts created by AI coding tools tucked inside hidden directories? scope_policy_v6 covers them selectively while blocking secrets:

  • IM Received Files: WeChat 4.x (xwechat_files) / 3.x, WeCom (WeWork), QQ, DingTalk, and Feishu / Lark received-file folders (internal db_storage databases remain strictly blocked).
  • 14 Coding Harness Artifact Directories: Curated non-sensitive subdirectories under ~/.codex, ~/.claude, ~/.gemini, ~/.cursor, ~/.windsurf (~/.codeium/windsurf), ~/.continue, ~/.roo, ~/.kiro, ~/.config/opencode, ~/.orca/bots, ~/.dsh, ~/.agents/skills, and ~/.openclaw/skills.
  • Manual Hidden Folders: Add any non-sensitive hidden directory or ~/Library subfolder manually under Settings → Index to trigger immediate incremental indexing.
  • Hard Secret Blocks: .ssh, .gnupg, .aws, .kube, .env, Keychains, Cookies, Caches, and credential files (auth.json, oauth_creds.json, mcp-oauth-tokens*) inside hidden/Library paths are permanently hard-blocked end-to-end.

3. External Drives, USB Sticks & NAS Shares

Managed separately under Settings → Index → External & Network Volumes:

  • USB & External Drives: Opt-in manual filename indexing, 1-click refresh, or Forget Volume.
  • Network Shares (SMB / NFS / AFP / WebDAV): Never auto-scanned by default; manual filename-only indexing when requested, and zero stored network credentials.
  • Windows Auto Zero-UAC NTFS MFT Acceleration (Enabled by Default in v0.9.0): Automatically probes fixed NTFS volumes via FSCTL_ENUM_USN_DATA without triggering a UAC elevation prompt, silently falling back to multi-threaded FindFirstFileExW (paired with x86_64 AVX2 SIMD) when unprivileged.

4. Four Kernel-Anchored Privacy & Safety Boundaries

Boundary macOS Implementation Windows Implementation
1. Zero Silent Cloud Downloads SF_DATALESS checks + IOPOL_VFS_MATERIALIZE_DATALESS_FILES_OFF thread policy Win32 FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS / RECALL_ON_OPEN / OFFLINE + cloud reparse tag checks (OneDrive / iCloud / Dropbox / Google Drive)
2. Symlink & TOCTOU Protection O_NOFOLLOW_ANY + pre/post lstat/fstat identity verification (1-level symlinked .app bundles allowed) symlink_metadata blocks unauthorized FILE_ATTRIBUTE_REPARSE_POINT + pre/post stamp checks
3. Password-Field & Clipboard Isolation Immediate abort on AXSecureTextField and 5 password-manager pasteboard markers; sequence-counter-only background check Immediate abort on UIA IsPassword and ExcludeClipboardContentFromMonitorProcessing markers
4. Zero Telemetry & Private Storage Zero analytics; 0700/0600 atomic files for snippets, keys, clipboard & index; SHA-256 hashed query affinity Zero analytics; current-user exclusive DACL under %LOCALAPPDATA%\Lumen (or portable data\); loopback-only local embedding servers

Permission Summary (Minimal & On-Demand)

  • Works with zero extra permissions: Whole-disk search, previews, Snippets, Dictionary, FX/unit math, browser bookmarks, and local AI/image search.
  • macOS Accessibility: Used strictly for Quick Switch, cross-app selection pass-through & in-place replace, Window Tiling (win), Snippet auto-paste, and Lock Screen.
  • macOS Full Disk Access (Conditional Guidance): Not required by default; only surfaced as a 1-click banner under Index and Status & About if Lumen encounters unreadable TCC-protected folders.
  • macOS Contacts / Calendar / Reminders: Off by default—macOS only prompts if you explicitly enable them in Settings.

Next Guide: Cross-Platform Shortcuts, Commands & Parity Reference →

Clone this wiki locally