Modern Apps git

← Modern-Apps.git

docs-agent-overviews-phase-B1

Commit
4d3fba8767060a263236af8db3df2cec2217663d
Author
vayun-mathur <[email protected]>
When
2026-10-16 03:51 UTC (1 month ago)
Parents
90ce2c3

Diff

camera/AGENTS.md
diff --git a/camera/AGENTS.md b/camera/AGENTS.mdindex c07d7d4ff8..3ee8a31d1b 100644--- a/camera/AGENTS.md+++ b/camera/AGENTS.md@@ -3,69 +3,96 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `camera/` + allowed shared modules. Do not root-scan.  _Install: ./install camera (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :camera / dir: camera/ - Package roots present: ui, domain, platform-- Entry files: MainActivity.kt+- Entry files: MainActivity.kt (no Route.kt — `Route` is inline, single-screen app) - Deps: :library:ml - Metadata: metadata_data/camera.md (present)-- Rust: yes / screenshotTest: no+- Rust: yes / screenshotTest: hand-committed -## Key files+## Overview+**Purpose:** The most featureful open-source camera app — usable as the system camera and from the lockscreen. 100% offline.+**Key features:**+- Photo + video capture (CameraX, works regardless of Camera2 extension support) with per-mode sessions: single, portrait, night, slo-mo, video+- Panorama stitching + night-burst alignment in the native Rust `camera_stitch` engine+- Portrait mode with on-device segmentation (MediaPipe selfie + MODNet matting on a Vulkan compute runtime, `.maml` assets)+- QR/barcode scanning (zxing) and optional GPS geotagging written into EXIF+**Architecture / data-flow:** Single-screen `ui/CameraScreen` + `util/CameraViewModel` over per-mode `util/` session objects; `domain/` holds pure lens-selection logic, `platform/` capability queries; heavy work (stitch, night align, bokeh) goes through Rust JNI (`StitchNative`) and lands in MediaStore via `MediaStoreSaver`. `onCreateBeforeContent` only honors the `ACTION_IMAGE_CAPTURE` capture-for-result intent; `Content()` sits behind a camera+mic permission gate.+**Entry points + reading order:** `MainActivity.kt` (`Route.Camera`/`Settings` inline) → `ui/CameraScreen.kt` → `util/CameraViewModel.kt` → `util/CameraSessions.kt` → `util/PanoramaEngine.kt` / `NightCaptureEngine.kt`.+**Gotchas:**+- `util/` is NOT a closed package root — the `util/`→closed-roots migration is pending; new platform/engine code still lands there, don't add more+- Screenshots are hand-captured (no metadata convention plugin — Layoutlib can't open a camera); committed listing images live under `metadata_data/photos/`+- Volume keys act as the shutter, gated on the camera route being foreground; Esc/space covers desktop keyboards+- `.maml` model assets ship uncompressed (`noCompress`) — never compress them +## Key files+### Root — entry (Route inline, no Route.kt) - com/vayunmathur/camera/MainActivity.kt+### domain/ — pure lens-selection logic - com/vayunmathur/camera/domain/LensModel.kt - com/vayunmathur/camera/domain/LensSelectionLogic.kt+### platform/ — capability queries - com/vayunmathur/camera/platform/CameraCapabilities.kt - com/vayunmathur/camera/platform/LensSelector.kt+### ui/ — single screen + settings + panes+- com/vayunmathur/camera/ui/CameraScreen.kt+- com/vayunmathur/camera/ui/CameraScreenState.kt+- com/vayunmathur/camera/ui/CameraScreenKit.kt+- com/vayunmathur/camera/ui/CameraScreenEffects.kt+- com/vayunmathur/camera/ui/CameraPreviewBox.kt+- com/vayunmathur/camera/ui/CameraPreviewOverlays.kt+- com/vayunmathur/camera/ui/CameraOverlays.kt+- com/vayunmathur/camera/ui/CameraPanoramaOverlay.kt+- com/vayunmathur/camera/ui/CameraTopBar.kt - com/vayunmathur/camera/ui/CameraBottomControls.kt+- com/vayunmathur/camera/ui/CameraShutterPane.kt+- com/vayunmathur/camera/ui/CameraShutterRow.kt - com/vayunmathur/camera/ui/CameraModeBars.kt - com/vayunmathur/camera/ui/CameraModesPane.kt-- com/vayunmathur/camera/ui/CameraOverlays.kt-- com/vayunmathur/camera/ui/CameraPanoramaOverlay.kt-- com/vayunmathur/camera/ui/CameraPreviewBox.kt-- com/vayunmathur/camera/ui/CameraPreviewOverlays.kt-- com/vayunmathur/camera/ui/CameraScreen.kt-- com/vayunmathur/camera/ui/CameraScreenEffects.kt-- com/vayunmathur/camera/ui/CameraScreenKit.kt-- com/vayunmathur/camera/ui/CameraScreenState.kt - com/vayunmathur/camera/ui/CameraSettingsBars.kt - com/vayunmathur/camera/ui/CameraSettingsColumn.kt-- com/vayunmathur/camera/ui/CameraShutterPane.kt-- com/vayunmathur/camera/ui/CameraShutterRow.kt - com/vayunmathur/camera/ui/CameraStatusIndicators.kt-- com/vayunmathur/camera/ui/CameraTopBar.kt - com/vayunmathur/camera/ui/CameraWideLayout.kt - com/vayunmathur/camera/ui/LensBar.kt - com/vayunmathur/camera/ui/SettingsPage.kt-- com/vayunmathur/camera/util/BokehAnalyzer.kt-- com/vayunmathur/camera/util/CameraCaptureProcessing.kt-- com/vayunmathur/camera/util/CameraControls.kt-- com/vayunmathur/camera/util/CameraManualControls.kt-- com/vayunmathur/camera/util/CameraNightCapture.kt-- com/vayunmathur/camera/util/CameraNightMode.kt-- com/vayunmathur/camera/util/CameraPhotoCapture.kt-- com/vayunmathur/camera/util/CameraPhotoSessions.kt+- com/vayunmathur/camera/ui/CameraPostProcessingSettings.kt+### util/ — ViewModel, sessions, engines, persistence (migration pending)+- com/vayunmathur/camera/util/CameraViewModel.kt+- com/vayunmathur/camera/util/CameraViewModelActions.kt+- com/vayunmathur/camera/util/CameraViewModelTypes.kt+- com/vayunmathur/camera/util/CameraStartup.kt - com/vayunmathur/camera/util/CameraSessions.kt-- com/vayunmathur/camera/util/CameraSettings.kt+- com/vayunmathur/camera/util/CameraPhotoSessions.kt+- com/vayunmathur/camera/util/CameraPhotoSessionSetup.kt+- com/vayunmathur/camera/util/CameraPhotoSessionShared.kt+- com/vayunmathur/camera/util/CameraPortraitSession.kt - com/vayunmathur/camera/util/CameraSingleCapture.kt-- com/vayunmathur/camera/util/CameraSloMoSession.kt-- com/vayunmathur/camera/util/CameraStartup.kt-- com/vayunmathur/camera/util/CameraVideoRecording.kt+- com/vayunmathur/camera/util/CameraPhotoCapture.kt+- com/vayunmathur/camera/util/CameraCaptureProcessing.kt - com/vayunmathur/camera/util/CameraVideoSession.kt-- com/vayunmathur/camera/util/CameraViewModel.kt-- com/vayunmathur/camera/util/CodecSupport.kt-- com/vayunmathur/camera/util/GpuStitcher.kt-- com/vayunmathur/camera/util/MediaStoreSaver.kt-- com/vayunmathur/camera/util/MotionPhotoEncoder.kt-- com/vayunmathur/camera/util/MotionPhotoWriter.kt+- com/vayunmathur/camera/util/CameraVideoRecording.kt+- com/vayunmathur/camera/util/CameraSloMoSession.kt+- com/vayunmathur/camera/util/CameraManualControls.kt+- com/vayunmathur/camera/util/CameraControls.kt+- com/vayunmathur/camera/util/CameraNightMode.kt+- com/vayunmathur/camera/util/CameraNightCapture.kt - com/vayunmathur/camera/util/NightCaptureEngine.kt - com/vayunmathur/camera/util/PanoramaEngine.kt+- com/vayunmathur/camera/util/GpuStitcher.kt+- com/vayunmathur/camera/util/StitchNative.kt — JNI bridge into `camera_stitch` - com/vayunmathur/camera/util/PanoXmp.kt-- com/vayunmathur/camera/util/PhotoAnalyzer.kt - com/vayunmathur/camera/util/PortraitBokeh.kt-- com/vayunmathur/camera/util/StitchNative.kt+- com/vayunmathur/camera/util/BokehAnalyzer.kt+- com/vayunmathur/camera/util/PhotoAnalyzer.kt+- com/vayunmathur/camera/util/MotionPhotoEncoder.kt+- com/vayunmathur/camera/util/MotionPhotoWriter.kt - com/vayunmathur/camera/util/VideoProcessor.kt+- com/vayunmathur/camera/util/CodecSupport.kt+- com/vayunmathur/camera/util/MediaStoreSaver.kt+- com/vayunmathur/camera/util/CameraSettings.kt+- com/vayunmathur/camera/util/CameraSaveLocation.kt+- com/vayunmathur/camera/util/CameraSaveRouting.kt  ## Verify (this module only) ```@@ -73,5 +100,3 @@ _Install: ./install camera (dev by default)._ ./gradlew :camera:lint ./gradlew :camera:checkMetadata ```--
email/AGENTS.md
diff --git a/email/AGENTS.md b/email/AGENTS.mdindex 18834bf343..ff1401861e 100644--- a/email/AGENTS.md+++ b/email/AGENTS.md@@ -3,7 +3,7 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `email/` + allowed shared modules. Do not root-scan.  _Install: ./install email (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :email / dir: email/ - Package roots present: ui, data, platform, network, intents, widget - Entry files: MainActivity.kt, Route.kt, Navigation.kt@@ -11,73 +11,109 @@ _Install: ./install email (dev by default)._ - Metadata: metadata_data/email.md (present) - Rust: no / screenshotTest: yes -## Key files+## Overview+**Purpose:** A modern open-source email client with a unified inbox across multiple accounts. Requires internet.+**Key features:**+- Unified inbox over any IMAP/SMTP provider, with presets + OAuth for Gmail/Outlook/Yahoo/iCloud/Fastmail+- Push mail over IMAP IDLE plus hourly poll for the rest; outbox retry, drafts, and snooze via WorkManager+- Composer with inline images (HTML editor + CID spans) and an EML file viewer+- Home-screen widget, rich notifications with actions, and assistant read/search intents+**Architecture / data-flow:** `ui/` Compose screens → `platform/EmailViewModel` (+ `EmailManager`, send/draft action helpers) → `data/` Room stores (`*Dao`/`*Store` pairs + `EmailRepository`) fed by workers (`EmailSyncWorker`, `ImapIdleService`, `OutboxSendWorker`, `SnoozeWorker`) → `network/` raw IMAP/SMTP clients. `MainActivity.onCreateBeforeContent`: `NetworkClient.init(SYSTEM)` first, then widget previews, intent handling, hourly-sync schedule, outbox flush, IDLE start, and two one-time backfills.+**Entry points + reading order:** `Route` (`MessageList` / `MessageThread` / `Composer` / `Outbox` / `Drafts` / `AddAccount` / `Settings` / `EmlViewer`) → `MainActivity.kt` → `Navigation.kt` → `ui/MainContent.kt` → `platform/EmailViewModel.kt` → `data/EmailRepository.kt`.+**Gotchas:**+- `NetworkClient.init(this, TrustBundle.SYSTEM)` must stay first in `onCreateBeforeContent` — mail servers need system CAs, not the first-party bundle+- `DateMillisBackfill`/`PeekContentBackfill` are one-time migrations gated on `runIfNeeded`; skipping them breaks sort order and snippet previews+- IDLE push is foreground-gated via `AppLifecycleTracker` — background delivery goes through the hourly worker + notifications, not the socket+- `network/imap/TrustAll.kt` exists for debug only; never widen its use +## Key files+### Root — entry + navigation - com/vayunmathur/email/MainActivity.kt - com/vayunmathur/email/Navigation.kt - com/vayunmathur/email/Route.kt-- com/vayunmathur/email/data/CredentialCrypto.kt-- com/vayunmathur/email/data/DateMillisBackfill.kt-- com/vayunmathur/email/data/EmailDao.kt-- com/vayunmathur/email/data/EmailDatabase.kt+### data/ — Room stores + sync workers - com/vayunmathur/email/data/EmailModels.kt+- com/vayunmathur/email/data/EmailDatabase.kt+- com/vayunmathur/email/data/EmailAccountDao.kt+- com/vayunmathur/email/data/EmailAccountStore.kt+- com/vayunmathur/email/data/EmailMessageDao.kt+- com/vayunmathur/email/data/EmailMessageStore.kt+- com/vayunmathur/email/data/EmailOutboxDao.kt+- com/vayunmathur/email/data/EmailOutboxStore.kt+- com/vayunmathur/email/data/EmailQueryDao.kt+- com/vayunmathur/email/data/EmailQueryStore.kt - com/vayunmathur/email/data/EmailRepository.kt - com/vayunmathur/email/data/EmailSettings.kt - com/vayunmathur/email/data/EmailSyncState.kt - com/vayunmathur/email/data/EmailSyncWorker.kt-- com/vayunmathur/email/data/ImapIdleRetryWorker.kt - com/vayunmathur/email/data/ImapIdleService.kt+- com/vayunmathur/email/data/ImapIdleRetryWorker.kt - com/vayunmathur/email/data/OutboxSendWorker.kt+- com/vayunmathur/email/data/SnoozeWorker.kt - com/vayunmathur/email/data/OutlookOAuth.kt-- com/vayunmathur/email/data/PeekContentBackfill.kt - com/vayunmathur/email/data/ProviderPresets.kt-- com/vayunmathur/email/data/SnoozeWorker.kt-- com/vayunmathur/email/intents/EmailDataMapper.kt-- com/vayunmathur/email/intents/GetRecentIntent.kt-- com/vayunmathur/email/intents/SearchIntent.kt-- com/vayunmathur/email/network/imap/ImapAuthException.kt+- com/vayunmathur/email/data/CredentialCrypto.kt+- com/vayunmathur/email/data/DateMillisBackfill.kt+- com/vayunmathur/email/data/PeekContentBackfill.kt+### network/ — raw IMAP + SMTP clients - com/vayunmathur/email/network/imap/ImapClient.kt+- com/vayunmathur/email/network/imap/RawImapConnection.kt+- com/vayunmathur/email/network/imap/ImapWireIo.kt - com/vayunmathur/email/network/imap/ImapParser.kt+- com/vayunmathur/email/network/imap/ImapFetchPipeline.kt - com/vayunmathur/email/network/imap/MimeParser.kt-- com/vayunmathur/email/network/imap/RawImapConnection.kt-- com/vayunmathur/email/network/imap/TrustAll.kt-- com/vayunmathur/email/network/smtp/MimeBuilder.kt-- com/vayunmathur/email/network/smtp/RawSmtpConnection.kt+- com/vayunmathur/email/network/imap/MimeParserParts.kt+- com/vayunmathur/email/network/imap/ImapAuthException.kt+- com/vayunmathur/email/network/imap/TrustAll.kt — debug only - com/vayunmathur/email/network/smtp/SmtpClient.kt-- com/vayunmathur/email/platform/AppLifecycleTracker.kt-- com/vayunmathur/email/platform/BootReceiver.kt-- com/vayunmathur/email/platform/EmailClientFlag.kt+- com/vayunmathur/email/network/smtp/RawSmtpConnection.kt+- com/vayunmathur/email/network/smtp/MimeBuilder.kt+### platform/ — ViewModel, actions, notifications, lifecycle+- com/vayunmathur/email/platform/EmailViewModel.kt - com/vayunmathur/email/platform/EmailManager.kt-- com/vayunmathur/email/platform/EmailNotificationActionReceiver.kt-- com/vayunmathur/email/platform/EmailNotifications.kt - com/vayunmathur/email/platform/EmailUiContract.kt-- com/vayunmathur/email/platform/EmailViewModel.kt+- com/vayunmathur/email/platform/EmailClientFlag.kt+- com/vayunmathur/email/platform/EmailSendActions.kt+- com/vayunmathur/email/platform/EmailDraftActions.kt+- com/vayunmathur/email/platform/AiSummaryHelper.kt+- com/vayunmathur/email/platform/EmailNotifications.kt+- com/vayunmathur/email/platform/EmailNotificationActionReceiver.kt+- com/vayunmathur/email/platform/AppLifecycleTracker.kt+- com/vayunmathur/email/platform/BootReceiver.kt - com/vayunmathur/email/platform/EmlUtils.kt - com/vayunmathur/email/platform/IntentState.kt-- com/vayunmathur/email/ui/AddAccountScreen.kt-- com/vayunmathur/email/ui/AddAccountSection.kt-- com/vayunmathur/email/ui/AttachmentItem.kt-- com/vayunmathur/email/ui/ComposerAttachments.kt-- com/vayunmathur/email/ui/ComposerHeader.kt-- com/vayunmathur/email/ui/ComposerHelpers.kt-- com/vayunmathur/email/ui/ComposerScreen.kt-- com/vayunmathur/email/ui/DetailItem.kt-- com/vayunmathur/email/ui/DraftsScreen.kt-- com/vayunmathur/email/ui/EmailUiHelpers.kt-- com/vayunmathur/email/ui/EmlViewerScreen.kt-- com/vayunmathur/email/ui/FolderList.kt+### ui/ — list, thread, composer, account flows - com/vayunmathur/email/ui/MainContent.kt - com/vayunmathur/email/ui/MessageListScreen.kt - com/vayunmathur/email/ui/MessageThreadScreen.kt-- com/vayunmathur/email/ui/OAuthActivity.kt-- com/vayunmathur/email/ui/OutboxScreen.kt-- com/vayunmathur/email/ui/SettingsScreen.kt-- com/vayunmathur/email/ui/composer/CidImageSpan.kt+- com/vayunmathur/email/ui/FolderList.kt+- com/vayunmathur/email/ui/DetailItem.kt+- com/vayunmathur/email/ui/ComposerScreen.kt+- com/vayunmathur/email/ui/ComposerHeader.kt+- com/vayunmathur/email/ui/ComposerAttachments.kt+- com/vayunmathur/email/ui/ComposerHelpers.kt+- com/vayunmathur/email/ui/AttachmentItem.kt - com/vayunmathur/email/ui/composer/EmailHtmlEditor.kt - com/vayunmathur/email/ui/composer/EmailHtmlEditorController.kt - com/vayunmathur/email/ui/composer/EmailHtmlSerializer.kt - com/vayunmathur/email/ui/composer/EmailHtmlTagHandler.kt+- com/vayunmathur/email/ui/composer/EmailHtmlInline.kt - com/vayunmathur/email/ui/composer/InlineImage.kt+- com/vayunmathur/email/ui/composer/CidImageSpan.kt+- com/vayunmathur/email/ui/DraftsScreen.kt+- com/vayunmathur/email/ui/OutboxScreen.kt+- com/vayunmathur/email/ui/EmlViewerScreen.kt+- com/vayunmathur/email/ui/AddAccountScreen.kt+- com/vayunmathur/email/ui/AddAccountSection.kt+- com/vayunmathur/email/ui/AddAccountInstructionsCard.kt+- com/vayunmathur/email/ui/OAuthActivity.kt+- com/vayunmathur/email/ui/SettingsScreen.kt+- com/vayunmathur/email/ui/EmailUiHelpers.kt+### intents/ — assistant IPC+- com/vayunmathur/email/intents/GetRecentIntent.kt+- com/vayunmathur/email/intents/SearchIntent.kt+- com/vayunmathur/email/intents/EmailDataMapper.kt+### widget/ — unified-inbox home widget - com/vayunmathur/email/widget/EmailWidget.kt - com/vayunmathur/email/widget/EmailWidgetReceiver.kt @@ -87,5 +123,3 @@ _Install: ./install email (dev by default)._ ./gradlew :email:lint ./gradlew :email:checkMetadata ```--
findfamily/AGENTS.md
diff --git a/findfamily/AGENTS.md b/findfamily/AGENTS.mdindex da07822020..eb599cdcd0 100644--- a/findfamily/AGENTS.md+++ b/findfamily/AGENTS.md@@ -3,98 +3,127 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `findfamily/` + allowed shared modules. Do not root-scan.  _Install: ./install findfamily (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :findfamily / dir: findfamily/ - Package roots present: ui, data, domain, platform, intents, service-- Entry files: MainActivity.kt+- Entry files: MainActivity.kt (no Route.kt — `Route` + `Navigation` are inline) - Deps: :library:network, :library:e2ee-p2p, :library:room, :library:work, :library:image, :library:map, :library:aosp-stubs - Metadata: metadata_data/findfamily.md (present) - Rust: no / screenshotTest: yes -## Key files+## Overview+**Purpose:** End-to-end encrypted location sharing for family and friends — no emails, phone numbers, or personal info required. Requires internet.+**Key features:**+- Temporary per-person sharing toggles, `findfamily://add/<base26>` invites with key-fingerprint check, and temporary links+- Saved places (waypoints) with enter/leave notifications plus no-show alerts driven by `domain/NoShowPolicy`+- Live battery, speed, and dwell-time per person; UWB precision ranging where hardware supports it+- Powered-off finding (BLE beacons) and a Quick Settings tile to stop sharing instantly+**Architecture / data-flow:** Single `MainPage` UI + `util/FindFamilyViewModel` over `data/FindFamilyRepository` (Room: users, waypoints, links, no-show alerts); live location flows through `util/LocationTracking*` foreground service + `tracker/` BLE protocol and `uwb/` ranging, relayed E2EE via `:library:e2ee-p2p` (`util/Networking*`). `onCreateBeforeContent`: parse the add-invite deep link, then `NetworkClient.init(FIRST_PARTY)`.+**Entry points + reading order:** `Route` (`MainPage` / `AddPersonDialog` / `AddLinkDialog` / `UwbRangingPage` + dialogs, all inline in `MainActivity.kt`) → `Navigation()` → `ui/MainPage.kt` → `util/FindFamilyViewModel.kt` → `data/FindFamilyRepository.kt`.+**Gotchas:**+- Location permission spec must request fine AND coarse together (Android 12+ Precise/Approximate choice; fine alone is ignored), plus background location and `BLUETOOTH_SCAN` — the powered-off-finder scanner starts then dies without it+- `singleTop` warm-start invites/UWB taps arrive via `onNewIntent`, not a fresh `onCreate`+- `AddTrackerDialog` is dev-only (`DEV_BUILD` custom UWB tracker binding); don't expose it in release flows+- Extra non-conforming dirs (`ipc/`, `tracker/`, `uwb/`, `util/`) hold real code — like camera's `util/`, a closed-roots migration is pending -- com/vayunmathur/findfamily/MainActivity.kt-- com/vayunmathur/findfamily/data/Coord.kt-- com/vayunmathur/findfamily/data/DirectBootStore.kt-- com/vayunmathur/findfamily/data/FFDatabase.kt+## Key files+### Root — entry + inline navigation+- com/vayunmathur/findfamily/MainActivity.kt — Route, Navigation, deep-link parsing, permission spec+### data/ — Room entities + repository - com/vayunmathur/findfamily/data/FindFamilyRepository.kt-- com/vayunmathur/findfamily/data/LocationValue.kt-- com/vayunmathur/findfamily/data/NoShowAlert.kt-- com/vayunmathur/findfamily/data/NoShowAlertDao.kt-- com/vayunmathur/findfamily/data/TemporaryLink.kt+- com/vayunmathur/findfamily/data/FFDatabase.kt - com/vayunmathur/findfamily/data/User.kt - com/vayunmathur/findfamily/data/Waypoint.kt+- com/vayunmathur/findfamily/data/TemporaryLink.kt+- com/vayunmathur/findfamily/data/NoShowAlert.kt+- com/vayunmathur/findfamily/data/NoShowAlertDao.kt+- com/vayunmathur/findfamily/data/Coord.kt+- com/vayunmathur/findfamily/data/LocationValue.kt+- com/vayunmathur/findfamily/data/DirectBootStore.kt+### domain/ — pairing auth + no-show policy (pure logic)+- com/vayunmathur/findfamily/domain/PairAuth.kt - com/vayunmathur/findfamily/domain/NoShowPolicy.kt-- com/vayunmathur/findfamily/intents/CreateLinkIntent.kt+### intents/ — assistant IPC - com/vayunmathur/findfamily/intents/GetIntent.kt+- com/vayunmathur/findfamily/intents/CreateLinkIntent.kt+### ipc/ — cross-app family-location protocol - com/vayunmathur/findfamily/ipc/FamilyLocationProtocol.kt - com/vayunmathur/findfamily/ipc/FamilyLocationService.kt+### platform/ — reporters + schedulers - com/vayunmathur/findfamily/platform/FinalLocationReporter.kt - com/vayunmathur/findfamily/platform/NoShowCheckScheduler.kt - com/vayunmathur/findfamily/platform/PoweredOffBeacon.kt+### service/ — Quick Settings tile - com/vayunmathur/findfamily/service/SharingTileService.kt-- com/vayunmathur/findfamily/tracker/PoweredOffBle.kt-- com/vayunmathur/findfamily/tracker/PoweredOffKeyStore.kt-- com/vayunmathur/findfamily/tracker/PoweredOffProtocol.kt-- com/vayunmathur/findfamily/tracker/PoweredOffRecovery.kt-- com/vayunmathur/findfamily/tracker/PoweredOffReporting.kt-- com/vayunmathur/findfamily/tracker/PoweredOffScanner.kt-- com/vayunmathur/findfamily/tracker/TrackerBeaconScanner.kt-- com/vayunmathur/findfamily/tracker/TrackerBinder.kt-- com/vayunmathur/findfamily/tracker/TrackerBle.kt-- com/vayunmathur/findfamily/tracker/TrackerFeature.kt+### tracker/ — BLE tracker protocol + powered-off finding - com/vayunmathur/findfamily/tracker/TrackerProtocol.kt+- com/vayunmathur/findfamily/tracker/TrackerBle.kt - com/vayunmathur/findfamily/tracker/TrackerProvisioner.kt-- com/vayunmathur/findfamily/tracker/TrackerReporting.kt - com/vayunmathur/findfamily/tracker/TrackerStore.kt+- com/vayunmathur/findfamily/tracker/TrackerReporting.kt+- com/vayunmathur/findfamily/tracker/TrackerFeature.kt+- com/vayunmathur/findfamily/tracker/TrackerBeaconScanner.kt+- com/vayunmathur/findfamily/tracker/TrackerBinder.kt - com/vayunmathur/findfamily/tracker/TrackerUwbGatt.kt - com/vayunmathur/findfamily/tracker/TrackerUwbKeys.kt-- com/vayunmathur/findfamily/ui/AutoToggleRow.kt-- com/vayunmathur/findfamily/ui/FamilyListSheet.kt-- com/vayunmathur/findfamily/ui/FindFamilyWideLayout.kt-- com/vayunmathur/findfamily/ui/MainFabOverlay.kt-- com/vayunmathur/findfamily/ui/MainMapSlot.kt+- com/vayunmathur/findfamily/tracker/PoweredOffProtocol.kt+- com/vayunmathur/findfamily/tracker/PoweredOffBle.kt+- com/vayunmathur/findfamily/tracker/PoweredOffScanner.kt+- com/vayunmathur/findfamily/tracker/PoweredOffReporting.kt+- com/vayunmathur/findfamily/tracker/PoweredOffRecovery.kt+- com/vayunmathur/findfamily/tracker/PoweredOffKeyStore.kt+### uwb/ — UWB ranging stack+- com/vayunmathur/findfamily/uwb/UwbController.kt+- com/vayunmathur/findfamily/uwb/UwbEnvelope.kt+- com/vayunmathur/findfamily/uwb/UwbInbox.kt+- com/vayunmathur/findfamily/uwb/UwbAccessoryProtocol.kt+### ui/ — main page + dialogs + UWB screen - com/vayunmathur/findfamily/ui/MainPage.kt+- com/vayunmathur/findfamily/ui/MainPageContent.kt - com/vayunmathur/findfamily/ui/MainPageActions.kt - com/vayunmathur/findfamily/ui/MainPageCards.kt-- com/vayunmathur/findfamily/ui/MainPageContent.kt - com/vayunmathur/findfamily/ui/MainPageEffects.kt - com/vayunmathur/findfamily/ui/MainPageOverlays.kt+- com/vayunmathur/findfamily/ui/MainMapSlot.kt - com/vayunmathur/findfamily/ui/MainSheetContent.kt - com/vayunmathur/findfamily/ui/MapView.kt+- com/vayunmathur/findfamily/ui/MainFabOverlay.kt+- com/vayunmathur/findfamily/ui/FamilyListSheet.kt - com/vayunmathur/findfamily/ui/PersonDetailSheet.kt - com/vayunmathur/findfamily/ui/UserCard.kt+- com/vayunmathur/findfamily/ui/AutoToggleRow.kt+- com/vayunmathur/findfamily/ui/FindFamilyWideLayout.kt - com/vayunmathur/findfamily/ui/UwbRangingScreen.kt+- com/vayunmathur/findfamily/ui/dialogs/AddPersonDialog.kt — also hosts `decodeBase26` - com/vayunmathur/findfamily/ui/dialogs/AddLinkDialog.kt-- com/vayunmathur/findfamily/ui/dialogs/AddPersonDialog.kt-- com/vayunmathur/findfamily/ui/dialogs/AddTrackerDialog.kt+- com/vayunmathur/findfamily/ui/dialogs/AddTrackerDialog.kt — dev-only+- com/vayunmathur/findfamily/ui/dialogs/NoShowAlertDialog.kt - com/vayunmathur/findfamily/ui/dialogs/GpsFallbackWarningDialog.kt - com/vayunmathur/findfamily/ui/dialogs/KeyMismatchDialog.kt-- com/vayunmathur/findfamily/ui/dialogs/NoShowAlertDialog.kt - com/vayunmathur/findfamily/ui/dialogs/OutdatedPeerDialog.kt - com/vayunmathur/findfamily/ui/dialogs/SecurityCodeDialog.kt-- com/vayunmathur/findfamily/util/AppBackupAgent.kt-- com/vayunmathur/findfamily/util/BootReceiver.kt-- com/vayunmathur/findfamily/util/FindFamilyNotificationChannels.kt-- com/vayunmathur/findfamily/util/FindFamilyUiContract.kt+### util/ — ViewModel, tracking service, networking (migration pending) - com/vayunmathur/findfamily/util/FindFamilyViewModel.kt-- com/vayunmathur/findfamily/util/LocationProviderStatus.kt-- com/vayunmathur/findfamily/util/LocationTrackingCrowdFinding.kt-- com/vayunmathur/findfamily/util/LocationTrackingDirectBoot.kt+- com/vayunmathur/findfamily/util/FindFamilyUiContract.kt+- com/vayunmathur/findfamily/util/MapPageState.kt+- com/vayunmathur/findfamily/util/LocationTrackingService.kt+- com/vayunmathur/findfamily/util/LocationServiceController.kt - com/vayunmathur/findfamily/util/LocationTrackingHeartbeat.kt - com/vayunmathur/findfamily/util/LocationTrackingInbound.kt+- com/vayunmathur/findfamily/util/LocationTrackingDirectBoot.kt+- com/vayunmathur/findfamily/util/LocationTrackingCrowdFinding.kt - com/vayunmathur/findfamily/util/LocationTrackingNotifications.kt-- com/vayunmathur/findfamily/util/LocationTrackingService.kt+- com/vayunmathur/findfamily/util/LocationProviderStatus.kt - com/vayunmathur/findfamily/util/Networking.kt+- com/vayunmathur/findfamily/util/NetworkingLive.kt - com/vayunmathur/findfamily/util/NetworkingHelper.kt - com/vayunmathur/findfamily/util/NetworkingTracker.kt+- com/vayunmathur/findfamily/util/UwbSessionManager.kt - com/vayunmathur/findfamily/util/Platform.kt+- com/vayunmathur/findfamily/util/FindFamilyNotificationChannels.kt - com/vayunmathur/findfamily/util/TrackingTileService.kt-- com/vayunmathur/findfamily/util/UwbSessionManager.kt-- com/vayunmathur/findfamily/uwb/UwbAccessoryProtocol.kt-- com/vayunmathur/findfamily/uwb/UwbController.kt-- com/vayunmathur/findfamily/uwb/UwbEnvelope.kt-- com/vayunmathur/findfamily/uwb/UwbInbox.kt+- com/vayunmathur/findfamily/util/BootReceiver.kt+- com/vayunmathur/findfamily/util/AppBackupAgent.kt  ## Verify (this module only) ```@@ -102,5 +131,3 @@ _Install: ./install findfamily (dev by default)._ ./gradlew :findfamily:lint ./gradlew :findfamily:checkMetadata ```--
maps/AGENTS.md
diff --git a/maps/AGENTS.md b/maps/AGENTS.mdindex 250be9ec04..48d42c6e55 100644--- a/maps/AGENTS.md+++ b/maps/AGENTS.md@@ -3,158 +3,183 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `maps/` + allowed shared modules. Do not root-scan.  _Install: ./install maps (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :maps / dir: maps/ - Package roots present: ui, data, intents-- Entry files: MainActivity.kt+- Entry files: MainActivity.kt (no Route.kt — `Route` + `Navigation` are inline) - Deps: :library:map, :library:image, :library:network, :library:downloadservice - Metadata: metadata_data/maps.md (present) - Rust: yes / screenshotTest: yes -## Key files+## Overview+**Purpose:** A fast open-source map + navigation app on OpenStreetMap, with all routing on device. Internet only for new tiles, search, traffic, and transit delays.+**Key features:**+- On-device routing (drive/walk/bike/transit) over a single packed `.mamaps` archive, downloaded once on first launch; viewed areas keep working offline+- Turn-by-turn navigation with voice (TTS), lane guidance, speed-limit widget, and elevation; Android Auto via `car/`+- Place details, saved places, transit departure boards, Street View, parking, and POI search (Google + offline index)+- Handles external `geo:` / `google.navigation:` / Google-Maps links from other apps+**Architecture / data-flow:** `ui/` map surface + sheets over per-concern `util/` ViewModels (`SelectedFeatureViewModel`, `MapsSearchViewModel`, `SavedPlacesViewModel`, …) → `data/` stores/parsers + `util/OfflineRouter*` routing against the memory-mapped archive; guidance runs in the `util/NavigationService` foreground service via `NavigationSessionManager`. `onCreateBeforeContent`: `NetworkClient.init(FIRST_PARTY)` → delete the legacy `world_z0-6.pmtiles` → route the cold-start deep link; `Content()` gates on the `.mamaps` download before the map renders.+**Entry points + reading order:** `Route` (`MapPage` / `SavedPlacesPage` / `SettingsPage`, inline) → `MainActivity.kt` (`handleIntent`, `navigateTo`) → `ui/MapPage.kt` → `util/SelectedFeatureViewModel.kt` → `util/OfflineRouterRoadRoutes.kt`.+**Gotchas:**+- The `.mamaps` gate hosts app start — the archive URL must be live before a version ships; `adb push` the file to sideload a locally built archive+- `singleTop` warm-start geo/navigation links arrive via `onNewIntent`, not a fresh `onCreate`+- The map itself never splits panes (list/detail metadata only for settings/saved); its expanded side panel is separate inside `MapPage`+- Extra non-conforming dirs (`car/`, `ipc/`, `util/`) hold real code — closed-roots migration pending -- com/vayunmathur/maps/MainActivity.kt-- com/vayunmathur/maps/car/CarManeuvers.kt-- com/vayunmathur/maps/car/CarMapRenderer.kt-- com/vayunmathur/maps/car/CarSearchScreen.kt+## Key files+### Root — entry + inline navigation+- com/vayunmathur/maps/MainActivity.kt — Route, Navigation, geo-link handling, archive gate+### car/ — Android Auto surface - com/vayunmathur/maps/car/MapsCarAppService.kt - com/vayunmathur/maps/car/MapsSession.kt - com/vayunmathur/maps/car/NavMapScreen.kt-- com/vayunmathur/maps/data/GeoJson.kt-- com/vayunmathur/maps/data/MapLinkParser.kt+- com/vayunmathur/maps/car/CarMapRenderer.kt+- com/vayunmathur/maps/car/CarManeuvers.kt+- com/vayunmathur/maps/car/CarSearchScreen.kt+### data/ — prefs, places, POI + transit sources - com/vayunmathur/maps/data/MapPreferences.kt+- com/vayunmathur/maps/data/MapLinkParser.kt — external geo/maps URL parsing+- com/vayunmathur/maps/data/GeoJson.kt+- com/vayunmathur/maps/data/SpecificFeature.kt - com/vayunmathur/maps/data/OpeningHours.kt - com/vayunmathur/maps/data/OsmMaxspeed.kt-- com/vayunmathur/maps/data/ParkingStore.kt-- com/vayunmathur/maps/data/RecentSearchStore.kt - com/vayunmathur/maps/data/SavedPlace.kt - com/vayunmathur/maps/data/SavedPlaceStore.kt-- com/vayunmathur/maps/data/SpecificFeature.kt+- com/vayunmathur/maps/data/RecentSearchStore.kt+- com/vayunmathur/maps/data/ParkingStore.kt+- com/vayunmathur/maps/data/google/GoogleSearchDataSource.kt - com/vayunmathur/maps/data/google/GooglePoiDataSource.kt - com/vayunmathur/maps/data/google/GooglePoiDiscovery.kt-- com/vayunmathur/maps/data/google/GooglePoiMapModels.kt - com/vayunmathur/maps/data/google/GooglePoiModels.kt+- com/vayunmathur/maps/data/google/GooglePoiMapModels.kt - com/vayunmathur/maps/data/google/GoogleResponse.kt-- com/vayunmathur/maps/data/google/GoogleSearchDataSource.kt - com/vayunmathur/maps/data/google/GoogleTrafficSource.kt-- com/vayunmathur/maps/data/google/ReviewsWebParser.kt - com/vayunmathur/maps/data/google/StreetViewDataSource.kt - com/vayunmathur/maps/data/google/StreetViewModels.kt+- com/vayunmathur/maps/data/google/ReviewsWebParser.kt - com/vayunmathur/maps/data/google/WebReviewsFetcher.kt - com/vayunmathur/maps/data/transit/TransitousDataSource.kt - com/vayunmathur/maps/data/transit/TransitousModels.kt+### intents/ — assistant IPC - com/vayunmathur/maps/intents/DirectionsIntent.kt+### ipc/ — cross-app estimate/lookup clients+- com/vayunmathur/maps/ipc/RideEstimateClient.kt — launches taxi intents+- com/vayunmathur/maps/ipc/OrderLookupClient.kt — launches fooddelivery intents - com/vayunmathur/maps/ipc/FamilyLocationClient.kt - com/vayunmathur/maps/ipc/FamilyLocationProtocol.kt - com/vayunmathur/maps/ipc/IntentLaunch.kt-- com/vayunmathur/maps/ipc/OrderLookupClient.kt-- com/vayunmathur/maps/ipc/RideEstimateClient.kt-- com/vayunmathur/maps/ui/BottomSheetContent.kt-- com/vayunmathur/maps/ui/BottomSheetHeader.kt-- com/vayunmathur/maps/ui/CategoryChips.kt-- com/vayunmathur/maps/ui/CompassButton.kt-- com/vayunmathur/maps/ui/ContactAddressButton.kt-- com/vayunmathur/maps/ui/DeparturesSheet.kt-- com/vayunmathur/maps/ui/DepartureTime.kt-- com/vayunmathur/maps/ui/FamilyLocationLayer.kt-- com/vayunmathur/maps/ui/LayersButton.kt-- com/vayunmathur/maps/ui/LayersSheet.kt-- com/vayunmathur/maps/ui/LineBadge.kt-- com/vayunmathur/maps/ui/ManeuverIcon.kt-- com/vayunmathur/maps/ui/MapContentBox.kt+### ui/ — pages, sheets, layers - com/vayunmathur/maps/ui/MapPage.kt - com/vayunmathur/maps/ui/MapPageScope.kt-- com/vayunmathur/maps/ui/MapScaleBar.kt+- com/vayunmathur/maps/ui/MapContentBox.kt - com/vayunmathur/maps/ui/MapSearchActions.kt-- com/vayunmathur/maps/ui/MapSheetEffects.kt - com/vayunmathur/maps/ui/MapSheets.kt+- com/vayunmathur/maps/ui/MapSheetEffects.kt - com/vayunmathur/maps/ui/MapSidePanel.kt - com/vayunmathur/maps/ui/MapWideHost.kt - com/vayunmathur/maps/ui/MapWideLayout.kt-- com/vayunmathur/maps/ui/NavigationOverlay.kt-- com/vayunmathur/maps/ui/ParkingLayer.kt-- com/vayunmathur/maps/ui/ParkingSheet.kt-- com/vayunmathur/maps/ui/PlaceActionRow.kt+- com/vayunmathur/maps/ui/BottomSheetContent.kt+- com/vayunmathur/maps/ui/BottomSheetHeader.kt+- com/vayunmathur/maps/ui/SearchSheet.kt - com/vayunmathur/maps/ui/PlaceSheet.kt - com/vayunmathur/maps/ui/PlaceSheetHeader.kt - com/vayunmathur/maps/ui/PlaceSheetHours.kt-- com/vayunmathur/maps/ui/PoiEnrichment.kt-- com/vayunmathur/maps/ui/RestaurantItem.kt-- com/vayunmathur/maps/ui/RoadsLayer.kt+- com/vayunmathur/maps/ui/PlaceActionRow.kt+- com/vayunmathur/maps/ui/ContactAddressButton.kt+- com/vayunmathur/maps/ui/SearchResultLayer.kt - com/vayunmathur/maps/ui/RouteSheet.kt - com/vayunmathur/maps/ui/RouteSheetTabs.kt+- com/vayunmathur/maps/ui/TripSheet.kt+- com/vayunmathur/maps/ui/NavigationOverlay.kt+- com/vayunmathur/maps/ui/DeparturesSheet.kt+- com/vayunmathur/maps/ui/DepartureTime.kt+- com/vayunmathur/maps/ui/CategoryChips.kt+- com/vayunmathur/maps/ui/LayersButton.kt+- com/vayunmathur/maps/ui/LayersSheet.kt+- com/vayunmathur/maps/ui/CompassButton.kt+- com/vayunmathur/maps/ui/MapScaleBar.kt+- com/vayunmathur/maps/ui/VoiceSearchButton.kt+- com/vayunmathur/maps/ui/SavedPlacesPage.kt+- com/vayunmathur/maps/ui/SavedPlacesLayer.kt+- com/vayunmathur/maps/ui/FamilyLocationLayer.kt+- com/vayunmathur/maps/ui/ParkingLayer.kt+- com/vayunmathur/maps/ui/ParkingSheet.kt+- com/vayunmathur/maps/ui/RoadsLayer.kt - com/vayunmathur/maps/ui/SafetyLayer.kt - com/vayunmathur/maps/ui/SatelliteLayer.kt-- com/vayunmathur/maps/ui/SavedPlacesLayer.kt-- com/vayunmathur/maps/ui/SavedPlacesPage.kt-- com/vayunmathur/maps/ui/SearchResultLayer.kt-- com/vayunmathur/maps/ui/SearchSheet.kt - com/vayunmathur/maps/ui/TransitStopsLayer.kt-- com/vayunmathur/maps/ui/TripSheet.kt-- com/vayunmathur/maps/ui/VoiceSearchButton.kt+- com/vayunmathur/maps/ui/PoiEnrichment.kt+- com/vayunmathur/maps/ui/RestaurantItem.kt+- com/vayunmathur/maps/ui/LineBadge.kt+- com/vayunmathur/maps/ui/ManeuverIcon.kt+### ui/map/ — surface, camera, overlays+- com/vayunmathur/maps/ui/map/MapSurface.kt+- com/vayunmathur/maps/ui/map/MapSurfaceHelpers.kt - com/vayunmathur/maps/ui/map/MapCamera.kt - com/vayunmathur/maps/ui/map/MapChrome.kt - com/vayunmathur/maps/ui/map/MapChromeState.kt - com/vayunmathur/maps/ui/map/MapFabStack.kt-- com/vayunmathur/maps/ui/map/MapFeaturePicker.kt - com/vayunmathur/maps/ui/map/MapLayers.kt - com/vayunmathur/maps/ui/map/MapOverlays.kt+- com/vayunmathur/maps/ui/map/MapFeaturePicker.kt - com/vayunmathur/maps/ui/map/MapPinFeatures.kt-- com/vayunmathur/maps/ui/map/MapSurface.kt-- com/vayunmathur/maps/ui/map/MapSurfaceHelpers.kt-- com/vayunmathur/maps/ui/map/RailLines.kt - com/vayunmathur/maps/ui/map/RouteOverlayBuilder.kt-- com/vayunmathur/maps/ui/map/TrafficPrefetchEffect.kt+- com/vayunmathur/maps/ui/map/RailLines.kt - com/vayunmathur/maps/ui/map/TransitVehicles.kt+- com/vayunmathur/maps/ui/map/TrafficPrefetchEffect.kt - com/vayunmathur/maps/ui/map/WaypointList.kt-- com/vayunmathur/maps/ui/nav/ArrivalSummary.kt-- com/vayunmathur/maps/ui/nav/ElevationChart.kt-- com/vayunmathur/maps/ui/nav/LaneGuidance.kt+### ui/nav/ — guidance widgets - com/vayunmathur/maps/ui/nav/ManeuverBanner.kt-- com/vayunmathur/maps/ui/nav/RouteShield.kt+- com/vayunmathur/maps/ui/nav/LaneGuidance.kt - com/vayunmathur/maps/ui/nav/SpeedWidget.kt+- com/vayunmathur/maps/ui/nav/RouteShield.kt+- com/vayunmathur/maps/ui/nav/ArrivalSummary.kt - com/vayunmathur/maps/ui/nav/StepsSheet.kt-- com/vayunmathur/maps/ui/settings/MapSettingsPage.kt-- com/vayunmathur/maps/ui/streetview/StreetViewArrows.kt-- com/vayunmathur/maps/ui/streetview/StreetViewPegman.kt+- com/vayunmathur/maps/ui/nav/ElevationChart.kt+### ui/streetview/ + ui/settings/ + ui/theme/ - com/vayunmathur/maps/ui/streetview/StreetViewScreen.kt+- com/vayunmathur/maps/ui/streetview/StreetViewPegman.kt+- com/vayunmathur/maps/ui/streetview/StreetViewArrows.kt+- com/vayunmathur/maps/ui/settings/MapSettingsPage.kt+- com/vayunmathur/maps/ui/theme/MapTokens.kt - com/vayunmathur/maps/ui/theme/BasemapPalette.kt - com/vayunmathur/maps/ui/theme/MapChromeMetrics.kt-- com/vayunmathur/maps/ui/theme/MapTokens.kt-- com/vayunmathur/maps/util/CameraBounds.kt-- com/vayunmathur/maps/util/ContactLookup.kt-- com/vayunmathur/maps/util/FrameworkLocationManager.kt-- com/vayunmathur/maps/util/GooglePoiMapViewModel.kt-- com/vayunmathur/maps/util/GTFSProvider.kt-- com/vayunmathur/maps/util/ItineraryWording.kt-- com/vayunmathur/maps/util/MapSettingsViewModel.kt+### util/ — ViewModels, offline router, navigation service (migration pending)+- com/vayunmathur/maps/util/SelectedFeatureViewModel.kt - com/vayunmathur/maps/util/MapsSearchViewModel.kt - com/vayunmathur/maps/util/MapsUiContract.kt-- com/vayunmathur/maps/util/MapTileCache.kt-- com/vayunmathur/maps/util/NavigationService.kt-- com/vayunmathur/maps/util/NavigationSessionManager.kt-- com/vayunmathur/maps/util/NavigationTts.kt+- com/vayunmathur/maps/util/SavedPlacesViewModel.kt+- com/vayunmathur/maps/util/MapSettingsViewModel.kt+- com/vayunmathur/maps/util/PlacePanelState.kt+- com/vayunmathur/maps/util/GooglePoiMapViewModel.kt+- com/vayunmathur/maps/util/TransitStopsViewModel.kt+- com/vayunmathur/maps/util/TransitClock.kt+- com/vayunmathur/maps/util/ParkingViewModel.kt+- com/vayunmathur/maps/util/MapTileCache.kt — `.mamaps` archive access - com/vayunmathur/maps/util/OfflineRouter.kt+- com/vayunmathur/maps/util/OfflineRouterRoadRoutes.kt - com/vayunmathur/maps/util/OfflineRouterRouteBuilder.kt - com/vayunmathur/maps/util/OfflineRouterTraffic.kt - com/vayunmathur/maps/util/OfflineRouterTransit.kt-- com/vayunmathur/maps/util/ParkingViewModel.kt-- com/vayunmathur/maps/util/PlacePanelState.kt+- com/vayunmathur/maps/util/RouteService.kt+- com/vayunmathur/maps/util/NavigationService.kt — foreground guidance service+- com/vayunmathur/maps/util/NavigationSessionManager.kt+- com/vayunmathur/maps/util/NavigationTts.kt+- com/vayunmathur/maps/util/PolylineProgress.kt+- com/vayunmathur/maps/util/GTFSProvider.kt - com/vayunmathur/maps/util/PoiArchive.kt-- com/vayunmathur/maps/util/PoiCategories.kt - com/vayunmathur/maps/util/PoiIndex.kt - com/vayunmathur/maps/util/PoiIndexAttrs.kt - com/vayunmathur/maps/util/PoiIndexSpatial.kt - com/vayunmathur/maps/util/PoiIndexWords.kt-- com/vayunmathur/maps/util/PolylineProgress.kt-- com/vayunmathur/maps/util/RegionalUnits.kt-- com/vayunmathur/maps/util/RouteService.kt-- com/vayunmathur/maps/util/SavedPlacesViewModel.kt-- com/vayunmathur/maps/util/SelectedFeatureViewModel.kt+- com/vayunmathur/maps/util/PoiCategories.kt - com/vayunmathur/maps/util/SpatialKey.kt-- com/vayunmathur/maps/util/TransitClock.kt-- com/vayunmathur/maps/util/TransitStopsViewModel.kt+- com/vayunmathur/maps/util/RegionalUnits.kt+- com/vayunmathur/maps/util/ItineraryWording.kt - com/vayunmathur/maps/util/Wikidata.kt+- com/vayunmathur/maps/util/CameraBounds.kt+- com/vayunmathur/maps/util/ContactLookup.kt+- com/vayunmathur/maps/util/FrameworkLocationManager.kt  ## Verify (this module only) ```@@ -162,5 +187,3 @@ _Install: ./install maps (dev by default)._ ./gradlew :maps:lint ./gradlew :maps:checkMetadata ```--
office/AGENTS.md
diff --git a/office/AGENTS.md b/office/AGENTS.mdindex 42217b0b7d..5aa78dbca4 100644--- a/office/AGENTS.md+++ b/office/AGENTS.md@@ -3,94 +3,124 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `office/` + allowed shared modules. Do not root-scan.  _Install: ./install office (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :office / dir: office/ - Package roots present: ui-- Entry files: MainActivity.kt+- Entry files: MainActivity.kt (no Route.kt — `OfficeRoute` is inline) - Deps: :library:network, :library:e2ee-p2p - Metadata: metadata_data/office.md (present) - Rust: yes / screenshotTest: yes -## Key files+## Overview+**Purpose:** Document viewer/editor for ODF (odt/ods/odp) and Microsoft (docx/xlsx/pptx) files, with E2EE collaboration over a dumb relay. Internet only for collaboration.+**Key features:**+- Full ODF + OOXML importers (`odf/`), incl. Excel formulas, number formats, charts, diagrams, themes, and math (ODF/OMML→MathML)+- Editing across text, spreadsheets, and presentations with comments, change tracking, footnotes, headers/footers, and export/print menus+- Native Rust formula engine + document CRDT (`OfficeNative`); online collaboration is E2EE with no accounts — the relay only forwards ciphertext+- Opens files shared from other apps or `office://join` collaboration links+**Architecture / data-flow:** Root-level document chrome + `ui/` type-specific views over the `util/OfficeViewModel*` family (split per surface: documents, text, sheet, slides, tables, sync A/B/C, export) backed by `:library:ui`'s `OdfDocument` model; sync goes through `util/OfficeSync` + `util/DocumentTreeCrdt` to the E2EE relay. `onCreateBeforeContent`: `NetworkClient.init(FIRST_PARTY)` → load settings → split join-links from document URIs; `Content()` roots the `OfficeRoute` (`Main` / `OfflineEditor` / `OnlineEditor`) graph and fires `initSync`.+**Entry points + reading order:** `OfficeRoute` (`Main` / `OfflineEditor(uri)` / `OnlineEditor(docId)`, inline) → `MainActivity.kt` (`OfficeRoot`, `OfficeNavGraph`) → `OfficeDocumentPane.kt` → `util/OfficeViewModel.kt` → `odf/DocumentImporter.kt`.+**Gotchas:**+- Display names must come from `OpenableColumns.DISPLAY_NAME`, not the URI path — `DocumentImporter` routes by extension and content URIs often have extensionless ids+- The document "paper" stays light in dark mode by design (`OfficeLightTheme`); dark mode inverts luminance via a color matrix, never the model colors+- `OfficeLightTheme` is public for `screenshotTest` — don't privatize it+- `office://join` links never enter the document-loading path (different scheme); handle them via `parseJoinLink`/`handleJoinLink` only -- com/vayunmathur/office/MainActivity.kt-- com/vayunmathur/office/OfficeDocumentFindBars.kt-- com/vayunmathur/office/OfficeDocumentLaunchers.kt-- com/vayunmathur/office/OfficeDocumentMenuBar.kt-- com/vayunmathur/office/OfficeDocumentOverlays.kt+## Key files+### Root — entry, chrome, and document shell+- com/vayunmathur/office/MainActivity.kt — OfficeRoute, OfficeRoot, join-link handling+- com/vayunmathur/office/DocumentScreenShell.kt+- com/vayunmathur/office/DocumentScreenChrome.kt+- com/vayunmathur/office/OfficeBottomBarHost.kt - com/vayunmathur/office/OfficeDocumentPane.kt - com/vayunmathur/office/OfficeDocumentState.kt - com/vayunmathur/office/OfficeDocumentUtils.kt-- com/vayunmathur/office/OfficeEnableOnlineDialog.kt+- com/vayunmathur/office/OfficeDocumentMenuBar.kt+- com/vayunmathur/office/OfficeDocumentOverlays.kt+- com/vayunmathur/office/OfficeDocumentLaunchers.kt+- com/vayunmathur/office/OfficeDocumentFindBars.kt - com/vayunmathur/office/OfficeHomeScreens.kt - com/vayunmathur/office/OfficeOnlineScreens.kt+- com/vayunmathur/office/OfficeEnableOnlineDialog.kt - com/vayunmathur/office/OfficeOutlinePane.kt-- com/vayunmathur/office/odf/DocumentImporter.kt-- com/vayunmathur/office/odf/ExcelFormula.kt-- com/vayunmathur/office/odf/ExcelNumFmt.kt-- com/vayunmathur/office/odf/OdfMath.kt+- com/vayunmathur/office/OfficeExportMenu.kt+- com/vayunmathur/office/OfficeInsertMenu.kt+- com/vayunmathur/office/OfficeShareMembers.kt+- com/vayunmathur/office/OfficeCellOverlays.kt+- com/vayunmathur/office/OfficeChangesOverlays.kt+- com/vayunmathur/office/OfficeCommentsOverlays.kt+- com/vayunmathur/office/OfficePageSetupOverlays.kt+- com/vayunmathur/office/OfficeSlideElementOverlays.kt+- com/vayunmathur/office/OfficeSlideOverlays.kt+### odf/ — ODF + OOXML import/export+- com/vayunmathur/office/odf/DocumentImporter.kt — extension-routed entry - com/vayunmathur/office/odf/OdfParser.kt-- com/vayunmathur/office/odf/OdfParserChart.kt-- com/vayunmathur/office/odf/OdfParserInline.kt+- com/vayunmathur/office/odf/OdfParserText.kt - com/vayunmathur/office/odf/OdfParserSheet.kt - com/vayunmathur/office/odf/OdfParserSlides.kt+- com/vayunmathur/office/odf/OdfParserInline.kt+- com/vayunmathur/office/odf/OdfParserChart.kt - com/vayunmathur/office/odf/OdfParserStyles.kt-- com/vayunmathur/office/odf/OdfParserText.kt-- com/vayunmathur/office/odf/OdfWriter.kt+- com/vayunmathur/office/odf/OdfMath.kt - com/vayunmathur/office/odf/OmmlToMathml.kt-- com/vayunmathur/office/odf/OoxmlChart.kt-- com/vayunmathur/office/odf/OoxmlColor.kt-- com/vayunmathur/office/odf/OoxmlDiagram.kt+- com/vayunmathur/office/odf/OdfWriter.kt+- com/vayunmathur/office/odf/ExcelFormula.kt+- com/vayunmathur/office/odf/ExcelNumFmt.kt+- com/vayunmathur/office/odf/OoxmlImporter.kt - com/vayunmathur/office/odf/OoxmlDocx.kt - com/vayunmathur/office/odf/OoxmlDocxStyles.kt-- com/vayunmathur/office/odf/OoxmlImporter.kt-- com/vayunmathur/office/odf/OoxmlMetadata.kt-- com/vayunmathur/office/odf/OoxmlPackage.kt+- com/vayunmathur/office/odf/OoxmlXlsx.kt+- com/vayunmathur/office/odf/OoxmlXlsxHelper.kt - com/vayunmathur/office/odf/OoxmlPptx.kt+- com/vayunmathur/office/odf/OoxmlChart.kt+- com/vayunmathur/office/odf/OoxmlDiagram.kt - com/vayunmathur/office/odf/OoxmlTheme.kt+- com/vayunmathur/office/odf/OoxmlColor.kt+- com/vayunmathur/office/odf/OoxmlMetadata.kt+- com/vayunmathur/office/odf/OoxmlPackage.kt - com/vayunmathur/office/odf/OoxmlUnits.kt-- com/vayunmathur/office/odf/OoxmlXlsx.kt-- com/vayunmathur/office/odf/OoxmlXlsxHelper.kt - com/vayunmathur/office/odf/OoxmlXml.kt-- com/vayunmathur/office/ui/AddBookmarkDialog.kt-- com/vayunmathur/office/ui/ChartEditorDialog.kt-- com/vayunmathur/office/ui/ColorPickerDialog.kt-- com/vayunmathur/office/ui/CommentDialog.kt+### ui/ — type views + editor dialogs - com/vayunmathur/office/ui/DocumentViews.kt+- com/vayunmathur/office/ui/TextDocumentView.kt+- com/vayunmathur/office/ui/ParagraphViews.kt+- com/vayunmathur/office/ui/SpreadsheetViews.kt+- com/vayunmathur/office/ui/PresentationViews.kt - com/vayunmathur/office/ui/FloatingElementViews.kt+- com/vayunmathur/office/ui/OdfChartViews.kt+- com/vayunmathur/office/ui/OdfImageViews.kt+- com/vayunmathur/office/ui/MathViews.kt+- com/vayunmathur/office/ui/OfficeTextFormat.kt+- com/vayunmathur/office/ui/OfficeCellFormat.kt+- com/vayunmathur/office/ui/OfficeEditorWideLayout.kt+- com/vayunmathur/office/ui/OfficeBottomBar.kt+- com/vayunmathur/office/ui/CommentDialog.kt+- com/vayunmathur/office/ui/ChartEditorDialog.kt+- com/vayunmathur/office/ui/AddBookmarkDialog.kt+- com/vayunmathur/office/ui/ColorPickerDialog.kt - com/vayunmathur/office/ui/FontSizePickerDialog.kt - com/vayunmathur/office/ui/FootnoteDialog.kt - com/vayunmathur/office/ui/GoToSlideDialog.kt - com/vayunmathur/office/ui/HeaderFooterDialog.kt - com/vayunmathur/office/ui/InsertHyperlinkDialog.kt - com/vayunmathur/office/ui/InsertTableDialog.kt-- com/vayunmathur/office/ui/MathViews.kt-- com/vayunmathur/office/ui/OdfChartViews.kt-- com/vayunmathur/office/ui/OdfImageViews.kt-- com/vayunmathur/office/ui/OfficeBottomBar.kt-- com/vayunmathur/office/ui/OfficeCellFormat.kt-- com/vayunmathur/office/ui/OfficeEditorWideLayout.kt-- com/vayunmathur/office/ui/OfficeTextFormat.kt-- com/vayunmathur/office/ui/ParagraphViews.kt-- com/vayunmathur/office/ui/PresentationViews.kt-- com/vayunmathur/office/ui/SettingsDialog.kt - com/vayunmathur/office/ui/SortDialog.kt - com/vayunmathur/office/ui/SpecialCharsDialog.kt-- com/vayunmathur/office/ui/SpreadsheetViews.kt-- com/vayunmathur/office/ui/TextDocumentView.kt-- com/vayunmathur/office/util/DocumentTreeCrdt.kt-- com/vayunmathur/office/util/OfficeNative.kt-- com/vayunmathur/office/util/OfficeSync.kt+- com/vayunmathur/office/ui/SettingsDialog.kt+### util/ — ViewModels, sync, CRDT, native bridge - com/vayunmathur/office/util/OfficeViewModel.kt - com/vayunmathur/office/util/OfficeViewModelDocuments.kt-- com/vayunmathur/office/util/OfficeViewModelExport.kt+- com/vayunmathur/office/util/OfficeViewModelText.kt - com/vayunmathur/office/util/OfficeViewModelSheet.kt - com/vayunmathur/office/util/OfficeViewModelSlides.kt+- com/vayunmathur/office/util/OfficeViewModelTables.kt - com/vayunmathur/office/util/OfficeViewModelSyncA.kt - com/vayunmathur/office/util/OfficeViewModelSyncB.kt - com/vayunmathur/office/util/OfficeViewModelSyncC.kt-- com/vayunmathur/office/util/OfficeViewModelTables.kt-- com/vayunmathur/office/util/OfficeViewModelText.kt+- com/vayunmathur/office/util/OfficeViewModelExport.kt+- com/vayunmathur/office/util/OfficeSync.kt+- com/vayunmathur/office/util/DocumentTreeCrdt.kt+- com/vayunmathur/office/util/OfficeNative.kt — Rust formula/CRDT bridge  ## Verify (this module only) ```@@ -98,5 +128,3 @@ _Install: ./install office (dev by default)._ ./gradlew :office:lint ./gradlew :office:checkMetadata ```--
openassistant/AGENTS.md
diff --git a/openassistant/AGENTS.md b/openassistant/AGENTS.mdindex f9a6ec1eb1..a9780d0630 100644--- a/openassistant/AGENTS.md+++ b/openassistant/AGENTS.md@@ -3,35 +3,59 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `openassistant/` + allowed shared modules. Do not root-scan.  _Install: ./install openassistant (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :openassistant / dir: openassistant/ - Package roots present: ui, data-- Entry files: MainActivity.kt+- Entry files: MainActivity.kt (no Route.kt — `Route` + `Navigation` are inline) - Deps: :library:room, :library:image, :library:ml, :library:downloadservice - Metadata: metadata_data/openassistant.md (present) - Rust: no / screenshotTest: yes -## Key files+## Overview+**Purpose:** A simple open-source local AI app — Gemma 4 E2B runs fully on device (~3.5GB RAM when active). Internet only for initial asset downloads.+**Key features:**+- Multiple chats with streaming responses and markdown rendering, persisted in Room+- Multimodal input: photo upload (SigLIP embeddings) and audio recording+- Tool calling into other Modern Apps over local IPC, with JSON-schema validation+- A model-managed memory plus an editable system prompt; can be set as the device's default digital assistant (Assist API + voice interaction service)+**Architecture / data-flow:** `ui/LiteRTChatUi` → `util/AssistantViewModel` → `data/OpenAssistantRepository` (Room) + `util/InferenceService` (LiteRT/Gemma engine) with `util/AssistantToolSet` dispatching IPC tool calls. `onCreateBeforeContent` only wires the `IntentLauncher` and picks up Assist-API screen context; `Content()` gates on the initial model download before the chat renders.+**Entry points + reading order:** `Route` (`ConversationPage(id)` / `SettingsPage`, inline) → `MainActivity.kt` → `ui/LiteRTChatUi.kt` → `util/AssistantViewModel.kt` → `util/InferenceService.kt` → `data/OpenAssistantRepository.kt`.+**Gotchas:**+- Card drift fixed: `ui/` files were renamed `Assistant*` → `LiteRT*` and `util/` gained `AssistantDeviceTools`, `AssistantToolIntents`, `InferenceEmbeddingHandler`, `JsonSchemaValidator`, `SentencePieceTokenizer`, `SiglipEmbedder`; `Gemma4Engine`/`Gemma4EtEngine` no longer exist+- `MainActivity.intentLauncher` is a shared static other apps mirror (maps/taxi pattern) — keep it initialized in `onCreateBeforeContent`+- `StubRecognitionService` is a placeholder voice-recognition hook, not a real recognizer+- Extra non-conforming dirs (`assist/`, `util/`) hold real code — closed-roots migration pending -- com/vayunmathur/openassistant/MainActivity.kt-- com/vayunmathur/openassistant/assist/OpenAssistantSession.kt+## Key files+### Root — entry + inline navigation+- com/vayunmathur/openassistant/MainActivity.kt — Route, Navigation, assist screen-context+### assist/ — system assistant surfaces+- com/vayunmathur/openassistant/assist/OpenAssistantSession.kt — Assist API screen-text capture - com/vayunmathur/openassistant/assist/OpenAssistantSessionService.kt - com/vayunmathur/openassistant/assist/OpenAssistantVoiceInteractionService.kt-- com/vayunmathur/openassistant/assist/StubRecognitionService.kt+- com/vayunmathur/openassistant/assist/StubRecognitionService.kt — placeholder recognizer hook+### data/ — chats + repository - com/vayunmathur/openassistant/data/Database.kt - com/vayunmathur/openassistant/data/OpenAssistantRepository.kt-- com/vayunmathur/openassistant/ui/AssistantChatBubble.kt-- com/vayunmathur/openassistant/ui/AssistantChatInput.kt-- com/vayunmathur/openassistant/ui/AssistantChatUi.kt+### ui/ — chat + settings+- com/vayunmathur/openassistant/ui/LiteRTChatUi.kt+- com/vayunmathur/openassistant/ui/LiteRTChatScreen.kt+- com/vayunmathur/openassistant/ui/LiteRTChatBubble.kt+- com/vayunmathur/openassistant/ui/LiteRTChatInput.kt - com/vayunmathur/openassistant/ui/SettingsPage.kt-- com/vayunmathur/openassistant/util/AppBackupAgent.kt-- com/vayunmathur/openassistant/util/AssistantToolSet.kt-- com/vayunmathur/openassistant/util/AssistantUiContract.kt+### util/ — ViewModel, inference, tools, audio (migration pending) - com/vayunmathur/openassistant/util/AssistantViewModel.kt-- com/vayunmathur/openassistant/util/AudioRecorder.kt-- com/vayunmathur/openassistant/util/Gemma4Engine.kt-- com/vayunmathur/openassistant/util/Gemma4EtEngine.kt+- com/vayunmathur/openassistant/util/AssistantUiContract.kt - com/vayunmathur/openassistant/util/InferenceService.kt+- com/vayunmathur/openassistant/util/InferenceEmbeddingHandler.kt+- com/vayunmathur/openassistant/util/SentencePieceTokenizer.kt+- com/vayunmathur/openassistant/util/SiglipEmbedder.kt+- com/vayunmathur/openassistant/util/AssistantToolSet.kt+- com/vayunmathur/openassistant/util/AssistantToolIntents.kt+- com/vayunmathur/openassistant/util/AssistantDeviceTools.kt+- com/vayunmathur/openassistant/util/JsonSchemaValidator.kt+- com/vayunmathur/openassistant/util/AudioRecorder.kt+- com/vayunmathur/openassistant/util/AppBackupAgent.kt  ## Verify (this module only) ```@@ -39,5 +63,3 @@ _Install: ./install openassistant (dev by default)._ ./gradlew :openassistant:lint ./gradlew :openassistant:checkMetadata ```--
pdf/AGENTS.md
diff --git a/pdf/AGENTS.md b/pdf/AGENTS.mdindex 2c4fa786db..ead0c5f42e 100644--- a/pdf/AGENTS.md+++ b/pdf/AGENTS.md@@ -3,64 +3,88 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `pdf/` + allowed shared modules. Do not root-scan.  _Install: ./install pdf (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :pdf / dir: pdf/ - Package roots present: ui-- Entry files: MainActivity.kt+- Entry files: MainActivity.kt (no Route.kt — mode flags, not nav destinations) - Deps: :library:image, :library:ocr - Metadata: metadata_data/pdf.md (present) - Rust: yes / screenshotTest: yes -## Key files+## Overview+**Purpose:** A simple open-source PDF viewer with capture and cut-and-glue assembly. No network permission at all — 100% offline.+**Key features:**+- Full viewer: text search, text selection, form fields, outlines, zoom state, print via share menu; several documents open as separate Recents entries+- Capture mode: photograph pages with auto-framing, crop, and compose them into a PDF; cut-and-glue screen for assembling pages+- Native Rust PDF engine (`PdfNative`) for parsing, rendering, and export+**Architecture / data-flow:** `MainActivity` mode-flags (`data` / `isCapturing` / `isCutGlue`) over a single `util/PdfViewModel` + `util/PdfStateStore`, with `SafePdf*` utils wrapping the Rust engine for document access, page rendering, and edits; capture flows through `model/CapturedImage` → `AutoFrameDetector` → `ComposePdfDocument` → `PdfExporter`. `onCreateBeforeContent` only captures the launch intent's data URI; `Content()` picks viewer vs capture vs cut-glue vs picker.+**Entry points + reading order:** `MainActivity.kt` (`InitialScreen` → viewer/capture/cut-glue) → `ui/SafePdfViewerScreen.kt` → `util/PdfViewModel.kt` → `util/SafePdfDocument.kt` → `util/SafePdfParser.kt`.+**Gotchas:**+- No navigation graph at all — the three modes are `rememberSaveable` flags in `Content()`, so don't add a `Route.kt` here+- Started-with-intent launches `finish()` on back instead of returning to the picker; in-app launches reset to the picker+- Card drift fixed: `util/` gained `FrameGeometry`, `FrameImageOps`, `SafePdfDocumentEdits`, `SafePdfPrimitives`; `ui/` is `SafePdf*` + capture/crop/cut-glue screens (no separate `domain/` or `platform/`)+- Extra non-conforming dirs (`model/`, `util/`) hold real code — closed-roots migration pending -- com/vayunmathur/pdf/MainActivity.kt+## Key files+### Root — entry (mode flags, no Route.kt)+- com/vayunmathur/pdf/MainActivity.kt — InitialScreen, viewer/capture/cut-glue switch+### model/ — capture model - com/vayunmathur/pdf/model/CapturedImage.kt-- com/vayunmathur/pdf/ui/CapturePdfScreen.kt-- com/vayunmathur/pdf/ui/CropScreen.kt-- com/vayunmathur/pdf/ui/CropScreenSection.kt-- com/vayunmathur/pdf/ui/CutGlueScreen.kt-- com/vayunmathur/pdf/ui/PdfOutlineDrawer.kt+### ui/ — viewer chrome + state+- com/vayunmathur/pdf/ui/SafePdfViewerScreen.kt+- com/vayunmathur/pdf/ui/SafePdfViewerState.kt+- com/vayunmathur/pdf/ui/SafePdfViewerModels.kt+- com/vayunmathur/pdf/ui/SafePdfViewerChrome.kt+- com/vayunmathur/pdf/ui/SafePdfViewerLoad.kt+- com/vayunmathur/pdf/ui/SafePdfViewerDialogs.kt+- com/vayunmathur/pdf/ui/SafePdfPageViewer.kt+- com/vayunmathur/pdf/ui/SafePdfPageCanvas.kt+- com/vayunmathur/pdf/ui/SafePdfPageItem.kt - com/vayunmathur/pdf/ui/PdfViewerWideLayout.kt-- com/vayunmathur/pdf/ui/SafePdfBlendModes.kt+- com/vayunmathur/pdf/ui/PdfOutlineDrawer.kt+- com/vayunmathur/pdf/ui/SafePdfTextSelection.kt+- com/vayunmathur/pdf/ui/SafePdfFormFields.kt+### ui/ — safe-draw rendering kit - com/vayunmathur/pdf/ui/SafePdfDrawContext.kt-- com/vayunmathur/pdf/ui/SafePdfDrawFills.kt-- com/vayunmathur/pdf/ui/SafePdfDrawImages.kt - com/vayunmathur/pdf/ui/SafePdfDrawState.kt - com/vayunmathur/pdf/ui/SafePdfDrawStrokes.kt+- com/vayunmathur/pdf/ui/SafePdfDrawFills.kt - com/vayunmathur/pdf/ui/SafePdfDrawText.kt+- com/vayunmathur/pdf/ui/SafePdfDrawImages.kt+- com/vayunmathur/pdf/ui/SafePdfBlendModes.kt+- com/vayunmathur/pdf/ui/SafePdfSelectionGlyphs.kt+- com/vayunmathur/pdf/ui/SafePdfZoomState.kt+### ui/ — edit overlays + tooling - com/vayunmathur/pdf/ui/SafePdfEditOverlay.kt - com/vayunmathur/pdf/ui/SafePdfEditPreview.kt - com/vayunmathur/pdf/ui/SafePdfEditToolbar.kt-- com/vayunmathur/pdf/ui/SafePdfFormFields.kt-- com/vayunmathur/pdf/ui/SafePdfLaunchers.kt - com/vayunmathur/pdf/ui/SafePdfNonEditOverlay.kt-- com/vayunmathur/pdf/ui/SafePdfPageCanvas.kt-- com/vayunmathur/pdf/ui/SafePdfPageItem.kt-- com/vayunmathur/pdf/ui/SafePdfPageViewer.kt-- com/vayunmathur/pdf/ui/SafePdfSelectionGlyphs.kt-- com/vayunmathur/pdf/ui/SafePdfStyleDialog.kt-- com/vayunmathur/pdf/ui/SafePdfTextSelection.kt - com/vayunmathur/pdf/ui/SafePdfToolMenus.kt-- com/vayunmathur/pdf/ui/SafePdfViewerChrome.kt-- com/vayunmathur/pdf/ui/SafePdfViewerDialogs.kt-- com/vayunmathur/pdf/ui/SafePdfViewerLoad.kt-- com/vayunmathur/pdf/ui/SafePdfViewerModels.kt-- com/vayunmathur/pdf/ui/SafePdfViewerScreen.kt-- com/vayunmathur/pdf/ui/SafePdfViewerState.kt-- com/vayunmathur/pdf/ui/SafePdfZoomState.kt+- com/vayunmathur/pdf/ui/SafePdfStyleDialog.kt+- com/vayunmathur/pdf/ui/SafePdfLaunchers.kt+### ui/ — capture + assembly screens+- com/vayunmathur/pdf/ui/CapturePdfScreen.kt+- com/vayunmathur/pdf/ui/CropScreen.kt+- com/vayunmathur/pdf/ui/CropScreenSection.kt+- com/vayunmathur/pdf/ui/CutGlueScreen.kt - com/vayunmathur/pdf/ui/components/CameraPreview.kt - com/vayunmathur/pdf/ui/components/SubcroppedImage.kt-- com/vayunmathur/pdf/util/AutoFrameDetector.kt-- com/vayunmathur/pdf/util/ComposePdfDocument.kt-- com/vayunmathur/pdf/util/PdfExporter.kt-- com/vayunmathur/pdf/util/PdfNative.kt-- com/vayunmathur/pdf/util/PdfStateStore.kt+### util/ — ViewModel, engine bridge, capture pipeline (migration pending) - com/vayunmathur/pdf/util/PdfViewModel.kt+- com/vayunmathur/pdf/util/PdfStateStore.kt+- com/vayunmathur/pdf/util/PdfNative.kt — Rust engine bridge - com/vayunmathur/pdf/util/SafePdfDocument.kt+- com/vayunmathur/pdf/util/SafePdfDocumentEdits.kt+- com/vayunmathur/pdf/util/SafePdfParser.kt+- com/vayunmathur/pdf/util/SafePdfModels.kt+- com/vayunmathur/pdf/util/SafePdfPrimitives.kt - com/vayunmathur/pdf/util/SafePdfImages.kt - com/vayunmathur/pdf/util/SafePdfListings.kt-- com/vayunmathur/pdf/util/SafePdfModels.kt-- com/vayunmathur/pdf/util/SafePdfParser.kt+- com/vayunmathur/pdf/util/AutoFrameDetector.kt+- com/vayunmathur/pdf/util/FrameGeometry.kt+- com/vayunmathur/pdf/util/FrameImageOps.kt+- com/vayunmathur/pdf/util/ComposePdfDocument.kt+- com/vayunmathur/pdf/util/PdfExporter.kt  ## Verify (this module only) ```@@ -68,5 +92,3 @@ _Install: ./install pdf (dev by default)._ ./gradlew :pdf:lint ./gradlew :pdf:checkMetadata ```--
photos/AGENTS.md
diff --git a/photos/AGENTS.md b/photos/AGENTS.mdindex f1fa9de91c..9651f1e93c 100644--- a/photos/AGENTS.md+++ b/photos/AGENTS.md@@ -3,153 +3,178 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `photos/` + allowed shared modules. Do not root-scan.  _Install: ./install photos (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :photos / dir: photos/ - Package roots present: ui, data, domain, platform, service-- Entry files: MainActivity.kt+- Entry files: MainActivity.kt (no Route.kt — `Route` + `Navigation` are inline) - Deps: :library:map, :library:image, :library:ml, :library:room, :library:ink, :library:widgets, :library:biometric, :library:ocr, :library:downloadservice - Metadata: metadata_data/photos.md (present) - Rust: yes / screenshotTest: yes -## Key files+## Overview+**Purpose:** A photos app with a full non-destructive editor and on-device AI search — faces, text, and content all indexed locally. Internet only for basemap tiles behind the map view.+**Key features:**+- Gallery with adjustable grid, albums, people (on-device face grouping), map view, trash, and separate photo/video editors (`EditActivity`/`VideoEditActivity`)+- Non-destructive editor: curves, HSL, levels, healing, liquify, layers, selective edits, undo/redo — edits stored as `data/*Data` docs, composited by `LayerCompositor`+- On-device search by content (CLIP), by text (OCR layout), and by person (face recognition + segmentation); biometric-locked secure folder with optional relock-on-exit+- Wallpaper/live-wallpaper, Glance home widget, motion-photo support, and background sync worker+**Architecture / data-flow:** `ui/` pages over `util/` ViewModels (`GalleryViewModel`, `PhotoEditViewModel`, `VideoEditViewModel`, `PhotoMapViewModel`, `SecureFolderViewModel`) → `data/` Room (`PhotoDatabase`, `VaultDatabase`, `PhotosRepository`/`VaultRepository`) plus MediaStore indexing (`AlbumMediaStore`); ML (faces, CLIP, OCR, segmentation) runs on `:library:ml` with a Rust native bridge (`PhotosNative`). `onCreateBeforeContent`: widget previews + `ImageLoader.init`; `Content()` provides the column-count state behind a media-permissions gate into inline `Navigation()`.+**Entry points + reading order:** `Route` (`Gallery` / `PhotoPage` / `Map` / `People` / `Albums` / `Trash` / `SecureFolder` / `VaultViewer` / `Wallpaper`, inline) → `MainActivity.kt` → `ui/GalleryPage.kt` → `util/GalleryViewModel.kt` → `data/PhotosRepository.kt`.+**Gotchas:**+- Re-tapping a photo replaces the viewer (`pushPhoto`/`setLast`) instead of stacking — don't `add()` photo routes or back steps through stale viewers+- `ACTION_VIEW` from another app (e.g. the camera) makes that one photo the stack root with no gallery beneath; in-app back handling must not swallow the system predictive-back gesture there+- `MaFragmentActivity` (not `MaActivity`) — biometric + fragment-hosting requirement+- Extra non-conforming dirs (`glance/`, `util/`) hold real code — closed-roots migration pending -- com/vayunmathur/photos/MainActivity.kt-- com/vayunmathur/photos/data/BitmapExtensions.kt-- com/vayunmathur/photos/data/BlackAndWhiteData.kt-- com/vayunmathur/photos/data/BlurData.kt-- com/vayunmathur/photos/data/ChannelMixerData.kt-- com/vayunmathur/photos/data/ColorBalanceData.kt-- com/vayunmathur/photos/data/ContentAwareData.kt-- com/vayunmathur/photos/data/CurvesData.kt-- com/vayunmathur/photos/data/DodgeBurnData.kt-- com/vayunmathur/photos/data/Drawing.kt+## Key files+### Root — entry + inline navigation+- com/vayunmathur/photos/MainActivity.kt — Route, Navigation, pushPhoto, relock logic+### data/ — Room + edit-document model+- com/vayunmathur/photos/data/PhotosRepository.kt+- com/vayunmathur/photos/data/PhotoDatabase.kt+- com/vayunmathur/photos/data/Photo.kt+- com/vayunmathur/photos/data/VaultRepository.kt+- com/vayunmathur/photos/data/VaultDatabase.kt - com/vayunmathur/photos/data/EditDocument.kt-- com/vayunmathur/photos/data/FaceData.kt-- com/vayunmathur/photos/data/FxAdjustments.kt-- com/vayunmathur/photos/data/GradientMapData.kt-- com/vayunmathur/photos/data/HealingData.kt-- com/vayunmathur/photos/data/HslData.kt - com/vayunmathur/photos/data/ImageAdjustments.kt-- com/vayunmathur/photos/data/LayerBlendMode.kt+- com/vayunmathur/photos/data/FxAdjustments.kt+- com/vayunmathur/photos/data/MoreAdjustmentsData.kt - com/vayunmathur/photos/data/LayerData.kt+- com/vayunmathur/photos/data/LayerBlendMode.kt+- com/vayunmathur/photos/data/CurvesData.kt - com/vayunmathur/photos/data/LevelsData.kt-- com/vayunmathur/photos/data/LiquifyData.kt-- com/vayunmathur/photos/data/MoreAdjustmentsData.kt+- com/vayunmathur/photos/data/HslData.kt+- com/vayunmathur/photos/data/ColorBalanceData.kt+- com/vayunmathur/photos/data/ChannelMixerData.kt+- com/vayunmathur/photos/data/BlackAndWhiteData.kt+- com/vayunmathur/photos/data/BlurData.kt+- com/vayunmathur/photos/data/SharpenData.kt - com/vayunmathur/photos/data/NoiseData.kt-- com/vayunmathur/photos/data/OcrLayout.kt-- com/vayunmathur/photos/data/PaintOpsData.kt+- com/vayunmathur/photos/data/HealingData.kt+- com/vayunmathur/photos/data/ContentAwareData.kt+- com/vayunmathur/photos/data/LiquifyData.kt+- com/vayunmathur/photos/data/DodgeBurnData.kt+- com/vayunmathur/photos/data/GradientMapData.kt+- com/vayunmathur/photos/data/StylizeData.kt - com/vayunmathur/photos/data/PerspectiveData.kt-- com/vayunmathur/photos/data/Photo.kt-- com/vayunmathur/photos/data/PhotoDatabase.kt-- com/vayunmathur/photos/data/PhotosRepository.kt-- com/vayunmathur/photos/data/RedEyeData.kt - com/vayunmathur/photos/data/SelectionData.kt - com/vayunmathur/photos/data/SelectiveEditData.kt-- com/vayunmathur/photos/data/SharpenData.kt+- com/vayunmathur/photos/data/Drawing.kt+- com/vayunmathur/photos/data/PaintOpsData.kt - com/vayunmathur/photos/data/SmudgeData.kt-- com/vayunmathur/photos/data/StylizeData.kt-- com/vayunmathur/photos/data/VaultDatabase.kt-- com/vayunmathur/photos/data/VaultRepository.kt+- com/vayunmathur/photos/data/OcrLayout.kt+- com/vayunmathur/photos/data/FaceData.kt+- com/vayunmathur/photos/data/RedEyeData.kt - com/vayunmathur/photos/data/VideoEditState.kt-- com/vayunmathur/photos/domain/MotionPhotoXmp.kt+- com/vayunmathur/photos/data/BitmapExtensions.kt+### domain/ — OCR + motion-photo helpers (pure logic) - com/vayunmathur/photos/domain/PhotoOcr.kt+- com/vayunmathur/photos/domain/MotionPhotoXmp.kt+### glance/ — home widget - com/vayunmathur/photos/glance/PhotoGlanceWidget.kt - com/vayunmathur/photos/glance/PhotoGlanceWidgetReceiver.kt+### platform/ — motion-photo + ET models - com/vayunmathur/photos/platform/MotionPhotoVideo.kt - com/vayunmathur/photos/platform/PhotosEtModels.kt+### service/ — live wallpaper - com/vayunmathur/photos/service/LiveWallpaperService.kt-- com/vayunmathur/photos/ui/AdvancedPanels.kt+### ui/ — gallery, albums, people, map+- com/vayunmathur/photos/ui/GalleryPage.kt+- com/vayunmathur/photos/ui/GalleryScreen.kt+- com/vayunmathur/photos/ui/GalleryGrouping.kt+- com/vayunmathur/photos/ui/AlbumsPage.kt+- com/vayunmathur/photos/ui/AlbumsScreen.kt - com/vayunmathur/photos/ui/AlbumDetailPage.kt - com/vayunmathur/photos/ui/AlbumDetailScreen.kt - com/vayunmathur/photos/ui/AlbumPickerDialog.kt-- com/vayunmathur/photos/ui/AlbumsPage.kt-- com/vayunmathur/photos/ui/AlbumsScreen.kt-- com/vayunmathur/photos/ui/BlurOverlay.kt-- com/vayunmathur/photos/ui/BlurPanel.kt-- com/vayunmathur/photos/ui/CurvesPanel.kt-- com/vayunmathur/photos/ui/DrawingSettingsPage.kt+- com/vayunmathur/photos/ui/PeoplePage.kt+- com/vayunmathur/photos/ui/MapPage.kt+- com/vayunmathur/photos/ui/TrashPage.kt+- com/vayunmathur/photos/ui/ImageFit.kt+### ui/ — viewer + metadata+- com/vayunmathur/photos/ui/PhotoPage.kt+- com/vayunmathur/photos/ui/PhotoDetailView.kt+- com/vayunmathur/photos/ui/PhotoDetailSection.kt+- com/vayunmathur/photos/ui/PhotoDetailMedia.kt+- com/vayunmathur/photos/ui/PhotoMetadataCard.kt+- com/vayunmathur/photos/ui/PhotoFilmstrip.kt+- com/vayunmathur/photos/ui/PhotoViewerActions.kt+- com/vayunmathur/photos/ui/PhotoViewerWideLayout.kt+- com/vayunmathur/photos/ui/PhotoZoomGestures.kt+- com/vayunmathur/photos/ui/EditRoute.kt - com/vayunmathur/photos/ui/EditActivity.kt+- com/vayunmathur/photos/ui/FaceBoxLayer.kt+- com/vayunmathur/photos/ui/OcrTextLayer.kt+- com/vayunmathur/photos/ui/PanoramaFlatView.kt+- com/vayunmathur/photos/ui/PanoramaSphereView.kt+### ui/ — editor panels + canvas+- com/vayunmathur/photos/ui/EditPhotoPage.kt+- com/vayunmathur/photos/ui/EditPhotoEditorState.kt+- com/vayunmathur/photos/ui/EditPhotoModels.kt+- com/vayunmathur/photos/ui/EditPhotoModelHelpers.kt+- com/vayunmathur/photos/ui/EditPhotoCanvas.kt+- com/vayunmathur/photos/ui/EditPhotoPanels.kt - com/vayunmathur/photos/ui/EditPhotoActivePanel.kt - com/vayunmathur/photos/ui/EditPhotoAdjustPanels.kt-- com/vayunmathur/photos/ui/EditPhotoBottomControls.kt - com/vayunmathur/photos/ui/EditPhotoBrushPanels.kt-- com/vayunmathur/photos/ui/EditPhotoCanvas.kt+- com/vayunmathur/photos/ui/EditPhotoSelectionPanels.kt+- com/vayunmathur/photos/ui/EditPhotoBottomControls.kt - com/vayunmathur/photos/ui/EditPhotoCropOverlay.kt-- com/vayunmathur/photos/ui/EditPhotoEditorState.kt+- com/vayunmathur/photos/ui/EditPhotoToolOverlays.kt - com/vayunmathur/photos/ui/EditPhotoModeEffect.kt-- com/vayunmathur/photos/ui/EditPhotoModelHelpers.kt-- com/vayunmathur/photos/ui/EditPhotoModels.kt-- com/vayunmathur/photos/ui/EditPhotoPage.kt-- com/vayunmathur/photos/ui/EditPhotoPanels.kt-- com/vayunmathur/photos/ui/EditPhotoSelectionPanels.kt - com/vayunmathur/photos/ui/EditPhotoTextDialog.kt-- com/vayunmathur/photos/ui/EditPhotoToolOverlays.kt-- com/vayunmathur/photos/ui/EditRoute.kt-- com/vayunmathur/photos/ui/FaceBoxLayer.kt-- com/vayunmathur/photos/ui/GalleryGrouping.kt-- com/vayunmathur/photos/ui/GalleryPage.kt-- com/vayunmathur/photos/ui/GalleryScreen.kt-- com/vayunmathur/photos/ui/HealingOverlay.kt-- com/vayunmathur/photos/ui/HealingPanel.kt+- com/vayunmathur/photos/ui/AdvancedPanels.kt+- com/vayunmathur/photos/ui/BlurPanel.kt+- com/vayunmathur/photos/ui/BlurOverlay.kt+- com/vayunmathur/photos/ui/CurvesPanel.kt - com/vayunmathur/photos/ui/HslPanel.kt-- com/vayunmathur/photos/ui/ImageFit.kt-- com/vayunmathur/photos/ui/LayerRows.kt+- com/vayunmathur/photos/ui/HealingPanel.kt+- com/vayunmathur/photos/ui/HealingOverlay.kt - com/vayunmathur/photos/ui/LayersPanel.kt-- com/vayunmathur/photos/ui/MapPage.kt+- com/vayunmathur/photos/ui/LayerRows.kt - com/vayunmathur/photos/ui/MaskOverlay.kt-- com/vayunmathur/photos/ui/OcrTextLayer.kt-- com/vayunmathur/photos/ui/PanoramaFlatView.kt-- com/vayunmathur/photos/ui/PanoramaSphereView.kt-- com/vayunmathur/photos/ui/PeoplePage.kt-- com/vayunmathur/photos/ui/PhotoDetailMedia.kt-- com/vayunmathur/photos/ui/PhotoDetailSection.kt-- com/vayunmathur/photos/ui/PhotoDetailView.kt-- com/vayunmathur/photos/ui/PhotoFilmstrip.kt-- com/vayunmathur/photos/ui/PhotoMetadataCard.kt-- com/vayunmathur/photos/ui/PhotoPage.kt-- com/vayunmathur/photos/ui/PhotoViewerActions.kt-- com/vayunmathur/photos/ui/PhotoViewerWideLayout.kt-- com/vayunmathur/photos/ui/PhotoZoomGestures.kt-- com/vayunmathur/photos/ui/SecureFolderPage.kt - com/vayunmathur/photos/ui/SelectiveEditPanel.kt-- com/vayunmathur/photos/ui/TrashPage.kt-- com/vayunmathur/photos/ui/VaultViewerPage.kt-- com/vayunmathur/photos/ui/VaultViewerScreen.kt+- com/vayunmathur/photos/ui/DrawingSettingsPage.kt+### ui/ — video editor + wallpaper + vault+- com/vayunmathur/photos/ui/VideoEditRoute.kt - com/vayunmathur/photos/ui/VideoEditActivity.kt-- com/vayunmathur/photos/ui/VideoEditCropOverlay.kt-- com/vayunmathur/photos/ui/VideoEditDialogs.kt - com/vayunmathur/photos/ui/VideoEditPage.kt - com/vayunmathur/photos/ui/VideoEditPanels.kt - com/vayunmathur/photos/ui/VideoEditPreview.kt-- com/vayunmathur/photos/ui/VideoEditRoute.kt+- com/vayunmathur/photos/ui/VideoEditCropOverlay.kt+- com/vayunmathur/photos/ui/VideoEditDialogs.kt - com/vayunmathur/photos/ui/VideoPlayer.kt-- com/vayunmathur/photos/ui/WallpaperControls.kt - com/vayunmathur/photos/ui/WallpaperPage.kt - com/vayunmathur/photos/ui/WallpaperPreview.kt-- com/vayunmathur/photos/util/AlbumMediaStore.kt-- com/vayunmathur/photos/util/AppBackupAgent.kt-- com/vayunmathur/photos/util/ClipEmbedder.kt-- com/vayunmathur/photos/util/ClipTokenizer.kt-- com/vayunmathur/photos/util/FaceCropTransformation.kt-- com/vayunmathur/photos/util/FaceRecognizer.kt-- com/vayunmathur/photos/util/GalleryUiContract.kt+- com/vayunmathur/photos/ui/WallpaperControls.kt+- com/vayunmathur/photos/ui/SecureFolderPage.kt+- com/vayunmathur/photos/ui/VaultViewerPage.kt+- com/vayunmathur/photos/ui/VaultViewerScreen.kt+### util/ — ViewModels, ML, compositing, sync (migration pending) - com/vayunmathur/photos/util/GalleryViewModel.kt-- com/vayunmathur/photos/util/ImageLoader.kt-- com/vayunmathur/photos/util/LayerCompositor.kt-- com/vayunmathur/photos/util/LiveWallpaperLauncher.kt-- com/vayunmathur/photos/util/MlSegmentation.kt-- com/vayunmathur/photos/util/OverlayRendering.kt-- com/vayunmathur/photos/util/PanoXmpParser.kt+- com/vayunmathur/photos/util/GalleryUiContract.kt - com/vayunmathur/photos/util/PhotoEditViewModel.kt+- com/vayunmathur/photos/util/VideoEditViewModel.kt - com/vayunmathur/photos/util/PhotoMapViewModel.kt-- com/vayunmathur/photos/util/PhotosNative.kt-- com/vayunmathur/photos/util/SecureFolderManager.kt - com/vayunmathur/photos/util/SecureFolderViewModel.kt+- com/vayunmathur/photos/util/SecureFolderManager.kt+- com/vayunmathur/photos/util/LayerCompositor.kt+- com/vayunmathur/photos/util/UndoRedoManager.kt+- com/vayunmathur/photos/util/OverlayRendering.kt+- com/vayunmathur/photos/util/FaceRecognizer.kt+- com/vayunmathur/photos/util/FaceCropTransformation.kt+- com/vayunmathur/photos/util/MlSegmentation.kt+- com/vayunmathur/photos/util/ClipEmbedder.kt+- com/vayunmathur/photos/util/ClipTokenizer.kt+- com/vayunmathur/photos/util/ImageLoader.kt+- com/vayunmathur/photos/util/PanoXmpParser.kt+- com/vayunmathur/photos/util/PhotosNative.kt — Rust bridge+- com/vayunmathur/photos/util/AlbumMediaStore.kt - com/vayunmathur/photos/util/SyncWorker.kt - com/vayunmathur/photos/util/SyncWorkerHelper.kt-- com/vayunmathur/photos/util/UndoRedoManager.kt-- com/vayunmathur/photos/util/VideoEditViewModel.kt+- com/vayunmathur/photos/util/LiveWallpaperLauncher.kt - com/vayunmathur/photos/util/WallpaperHelper.kt+- com/vayunmathur/photos/util/AppBackupAgent.kt  ## Verify (this module only) ```@@ -157,5 +182,3 @@ _Install: ./install photos (dev by default)._ ./gradlew :photos:lint ./gradlew :photos:checkMetadata ```--
youpipe/AGENTS.md
diff --git a/youpipe/AGENTS.md b/youpipe/AGENTS.mdindex 5b3f030bfd..ffc4e3ca30 100644--- a/youpipe/AGENTS.md+++ b/youpipe/AGENTS.md@@ -3,93 +3,120 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `youpipe/` + allowed shared modules. Do not root-scan.  _Install: ./install youpipe (dev by default)._-+<!-- last-reviewed: 2026-10-16 --> - Gradle: :youpipe / dir: youpipe/ - Package roots present: ui, data, platform-- Entry files: MainActivity.kt, YouPipeApplication.kt+- Entry files: MainActivity.kt (no YouPipeApplication.kt — listed file does not exist; Route inline) - Deps: :library:image, :youpipe:extractor, :sdk:cast, :library:room, :library:work, :library:network - Metadata: metadata_data/youpipe.md (present) - Rust: yes / screenshotTest: yes -## Key files+## Overview+**Purpose:** An ad-free Material 3 YouTube client (NewPipe extractor lineage) with subscriptions, history, downloads, and recommendations. Requires internet.+**Key features:**+- Subscription feed with categories, auto-refresh (`SubscriptionFetchTask`), watch history + resume, playlists, and Watch Later+- Video playback via Media3/ExoPlayer with SABR streaming, SponsorBlock, chapters, background audio, and Picture-in-Picture+- Offline downloads (`DownloadManager`/`DownloadWorker`) with import/export, plus Cast-to-TV via `:sdk:cast`+- Local recommendations engine with tunable interests/keywords and impression tracking+**Architecture / data-flow:** Tabbed-pager `ui/` (`Main` tabs + `VideoPage`/`ChannelPage`/dialog routes) over `util/YouPipeViewModel` → `data/` Room (`SubscriptionDatabase`, repository + per-entity stores) fed by `SubscriptionFetchTask` and the Rust InnerTube extractor (`rustNativeLib youpipe_extractor`) bridged via `nativeext/` + `util/Extractor.kt`; playback runs through `util/PlaybackService` + the `util/sabr/` session stack. `onCreateBeforeContent` touches the VM so its hourly task arms, then resolves the launch backstack (share-target → watch link → persisted default page).+**Entry points + reading order:** `Route` (`Main(tab)` / `VideoPage` / `ChannelPage` / `SubscriptionVideosPage` / `PlaylistDetail` / `Downloads` + dialogs, inline) → `MainActivity.kt` (`resolveInitialBackStack`) → `ui/VideoPage.kt` → `util/YouPipeViewModel.kt` → `util/Extractor.kt` → `data/SubscriptionRepository.kt`.+**Gotchas:**+- Card drift fixed: `YouPipeApplication.kt` never existed — deleted from Entry files; card also gains `data/PlaylistStore`, `RecommendationStore`, `SubscriptionCategoryStore`, `util/YouPipePlaylistOps`, `util/YouPipeRecommendationSettings`, `ui/VideoPlayerNotificationProgressBar`+- `resolveInitialBackStack` runs synchronously in `onCreate` (before `setContent`) — keep it side-effect free+- PiP close and activity destroy deliberately do NOT stop `PlaybackService`; audio keeps playing and switches to audio-only+- SABR attestation goes through the `sabr/` WebView/token stack — changes there break playback long before the player UI does -- com/vayunmathur/youpipe/MainActivity.kt-- com/vayunmathur/youpipe/YouPipeApplication.kt+## Key files+### Root — entry + inline navigation+- com/vayunmathur/youpipe/MainActivity.kt — Route, share/deep-link backstack, default page+### data/ — subscriptions, playlists, recommendations (Room)+- com/vayunmathur/youpipe/data/SubscriptionDatabase.kt+- com/vayunmathur/youpipe/data/SubscriptionRepository.kt+- com/vayunmathur/youpipe/data/Subscription.kt+- com/vayunmathur/youpipe/data/SubscriptionVideo.kt+- com/vayunmathur/youpipe/data/SubscriptionCategory.kt+- com/vayunmathur/youpipe/data/SubscriptionCategoryStore.kt+- com/vayunmathur/youpipe/data/Playlist.kt+- com/vayunmathur/youpipe/data/PlaylistStore.kt+- com/vayunmathur/youpipe/data/HistoryVideo.kt+- com/vayunmathur/youpipe/data/DownloadedVideo.kt - com/vayunmathur/youpipe/data/CachedRelatedVideo.kt - com/vayunmathur/youpipe/data/ChannelPreference.kt-- com/vayunmathur/youpipe/data/DownloadedVideo.kt-- com/vayunmathur/youpipe/data/HistoryVideo.kt - com/vayunmathur/youpipe/data/KeywordPreference.kt-- com/vayunmathur/youpipe/data/Playlist.kt-- com/vayunmathur/youpipe/data/RecommendationImpression.kt - com/vayunmathur/youpipe/data/RecommendationPreferences.kt-- com/vayunmathur/youpipe/data/Subscription.kt-- com/vayunmathur/youpipe/data/SubscriptionCategory.kt-- com/vayunmathur/youpipe/data/SubscriptionDatabase.kt-- com/vayunmathur/youpipe/data/SubscriptionRepository.kt-- com/vayunmathur/youpipe/data/SubscriptionVideo.kt-- com/vayunmathur/youpipe/nativeext/NativeExtractor.kt+- com/vayunmathur/youpipe/data/RecommendationImpression.kt+- com/vayunmathur/youpipe/data/RecommendationStore.kt+### nativeext/ — Rust extractor bridge - com/vayunmathur/youpipe/nativeext/YouPipeNative.kt+- com/vayunmathur/youpipe/nativeext/NativeExtractor.kt+### platform/ — cast playback - com/vayunmathur/youpipe/platform/CastPlayback.kt-- com/vayunmathur/youpipe/ui/ChannelPage.kt-- com/vayunmathur/youpipe/ui/DataSettingsPage.kt-- com/vayunmathur/youpipe/ui/DownloadedVideosPage.kt-- com/vayunmathur/youpipe/ui/FeedGrid.kt-- com/vayunmathur/youpipe/ui/GeneralSettingsPage.kt-- com/vayunmathur/youpipe/ui/HistoryPage.kt-- com/vayunmathur/youpipe/ui/LinkifiedText.kt-- com/vayunmathur/youpipe/ui/ManageInterestsPage.kt-- com/vayunmathur/youpipe/ui/PlaylistDetailPage.kt-- com/vayunmathur/youpipe/ui/RecommendationsSettingsPage.kt-- com/vayunmathur/youpipe/ui/SavedPage.kt-- com/vayunmathur/youpipe/ui/SearchPage.kt-- com/vayunmathur/youpipe/ui/SettingsPage.kt-- com/vayunmathur/youpipe/ui/SponsorBlockSettingsPage.kt-- com/vayunmathur/youpipe/ui/SubscriptionsPage.kt-- com/vayunmathur/youpipe/ui/SubscriptionVideosPage.kt-- com/vayunmathur/youpipe/ui/VideoDetails.kt-- com/vayunmathur/youpipe/ui/VideoDetailScreen.kt-- com/vayunmathur/youpipe/ui/VideoFormatting.kt+### ui/ — tabs, feed, search, library - com/vayunmathur/youpipe/ui/VideoPage.kt - com/vayunmathur/youpipe/ui/VideoPlayer.kt-- com/vayunmathur/youpipe/ui/VideoPlayerCasting.kt-- com/vayunmathur/youpipe/ui/VideoPlayerChapterSheet.kt-- com/vayunmathur/youpipe/ui/VideoPlayerPlaybackEffects.kt+- com/vayunmathur/youpipe/ui/VideoPlayerViewState.kt - com/vayunmathur/youpipe/ui/VideoPlayerPlaybackState.kt+- com/vayunmathur/youpipe/ui/VideoPlayerPlaybackEffects.kt - com/vayunmathur/youpipe/ui/VideoPlayerSeekRow.kt - com/vayunmathur/youpipe/ui/VideoPlayerTopControls.kt-- com/vayunmathur/youpipe/ui/VideoPlayerViewState.kt-- com/vayunmathur/youpipe/ui/VideoRow.kt+- com/vayunmathur/youpipe/ui/VideoPlayerChapterSheet.kt+- com/vayunmathur/youpipe/ui/VideoPlayerCasting.kt+- com/vayunmathur/youpipe/ui/VideoPlayerNotificationProgressBar.kt+- com/vayunmathur/youpipe/ui/VideoDetails.kt+- com/vayunmathur/youpipe/ui/VideoDetailScreen.kt+- com/vayunmathur/youpipe/ui/VideoFormatting.kt - com/vayunmathur/youpipe/ui/VideoSections.kt+- com/vayunmathur/youpipe/ui/VideoRow.kt+- com/vayunmathur/youpipe/ui/FeedGrid.kt+- com/vayunmathur/youpipe/ui/SearchPage.kt+- com/vayunmathur/youpipe/ui/ChannelPage.kt+- com/vayunmathur/youpipe/ui/SubscriptionsPage.kt+- com/vayunmathur/youpipe/ui/SubscriptionVideosPage.kt+- com/vayunmathur/youpipe/ui/HistoryPage.kt+- com/vayunmathur/youpipe/ui/SavedPage.kt+- com/vayunmathur/youpipe/ui/PlaylistDetailPage.kt+- com/vayunmathur/youpipe/ui/DownloadedVideosPage.kt+- com/vayunmathur/youpipe/ui/LinkifiedText.kt - com/vayunmathur/youpipe/ui/dialogs/AddToPlaylist.kt - com/vayunmathur/youpipe/ui/dialogs/AddToWatchLater.kt - com/vayunmathur/youpipe/ui/dialogs/CreatePlaylist.kt - com/vayunmathur/youpipe/ui/dialogs/CreateSubscriptionCategory.kt-- com/vayunmathur/youpipe/util/DownloadManager.kt-- com/vayunmathur/youpipe/util/DownloadWorker.kt+### ui/ — settings+- com/vayunmathur/youpipe/ui/SettingsPage.kt+- com/vayunmathur/youpipe/ui/GeneralSettingsPage.kt+- com/vayunmathur/youpipe/ui/SponsorBlockSettingsPage.kt+- com/vayunmathur/youpipe/ui/RecommendationsSettingsPage.kt+- com/vayunmathur/youpipe/ui/ManageInterestsPage.kt+- com/vayunmathur/youpipe/ui/DataSettingsPage.kt+### util/ — ViewModel, extraction, playback, sync (migration pending)+- com/vayunmathur/youpipe/util/YouPipeViewModel.kt+- com/vayunmathur/youpipe/util/YouPipeUiContract.kt+- com/vayunmathur/youpipe/util/YouPipeVideoLoading.kt - com/vayunmathur/youpipe/util/Extractor.kt - com/vayunmathur/youpipe/util/MyDownloader.kt - com/vayunmathur/youpipe/util/PlaybackService.kt-- com/vayunmathur/youpipe/util/Recommender.kt+- com/vayunmathur/youpipe/util/DownloadManager.kt+- com/vayunmathur/youpipe/util/DownloadWorker.kt - com/vayunmathur/youpipe/util/SubscriptionFetchTask.kt-- com/vayunmathur/youpipe/util/YouPipeImportExport.kt+- com/vayunmathur/youpipe/util/Recommender.kt - com/vayunmathur/youpipe/util/YouPipeRecommendations.kt-- com/vayunmathur/youpipe/util/YouPipeUiContract.kt-- com/vayunmathur/youpipe/util/YouPipeVideoLoading.kt-- com/vayunmathur/youpipe/util/YouPipeViewModel.kt-- com/vayunmathur/youpipe/util/sabr/LocalDomPoTokenGenerator.kt-- com/vayunmathur/youpipe/util/sabr/LocalDomPoTokenProvider.kt-- com/vayunmathur/youpipe/util/sabr/SabrAttestationRetryHandler.kt-- com/vayunmathur/youpipe/util/sabr/SabrDownloadException.kt-- com/vayunmathur/youpipe/util/sabr/SabrFfmpegMuxer.kt-- com/vayunmathur/youpipe/util/sabr/SabrLocalDomPoTokenUtil.kt-- com/vayunmathur/youpipe/util/sabr/SabrNgDashMediaSource.kt-- com/vayunmathur/youpipe/util/sabr/SabrNgDownloadHelper.kt-- com/vayunmathur/youpipe/util/sabr/SabrNgSegmentDataSource.kt+- com/vayunmathur/youpipe/util/YouPipeRecommendationSettings.kt+- com/vayunmathur/youpipe/util/YouPipePlaylistOps.kt+- com/vayunmathur/youpipe/util/YouPipeImportExport.kt+### util/sabr/ — SABR session + attestation stack - com/vayunmathur/youpipe/util/sabr/SabrNgSession.kt - com/vayunmathur/youpipe/util/sabr/SabrNgSessionStore.kt - com/vayunmathur/youpipe/util/sabr/SabrNgSourceSpec.kt+- com/vayunmathur/youpipe/util/sabr/SabrNgDashMediaSource.kt+- com/vayunmathur/youpipe/util/sabr/SabrNgDownloadHelper.kt+- com/vayunmathur/youpipe/util/sabr/SabrNgSegmentDataSource.kt - com/vayunmathur/youpipe/util/sabr/SabrRequestCoordinator.kt+- com/vayunmathur/youpipe/util/sabr/SabrFfmpegMuxer.kt+- com/vayunmathur/youpipe/util/sabr/SabrAttestationRetryHandler.kt+- com/vayunmathur/youpipe/util/sabr/SabrDownloadException.kt+- com/vayunmathur/youpipe/util/sabr/LocalDomPoTokenProvider.kt+- com/vayunmathur/youpipe/util/sabr/LocalDomPoTokenGenerator.kt+- com/vayunmathur/youpipe/util/sabr/SabrLocalDomPoTokenUtil.kt - com/vayunmathur/youpipe/util/sabr/SharedWebViewRuntime.kt - com/vayunmathur/youpipe/util/sabr/YoutubePageAttestationBootstrap.kt @@ -99,5 +126,3 @@ _Install: ./install youpipe (dev by default)._ ./gradlew :youpipe:lint ./gradlew :youpipe:checkMetadata ```--
youpipe/extractor/AGENTS.md
diff --git a/youpipe/extractor/AGENTS.md b/youpipe/extractor/AGENTS.mdindex 2e6ae8851e..98c8c2d0ac 100644--- a/youpipe/extractor/AGENTS.md+++ b/youpipe/extractor/AGENTS.md@@ -2,19 +2,66 @@  > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `youpipe/extractor/` + allowed shared modules. Do not root-scan. +_Install: ./install youpipe (dev by default)._+<!-- last-reviewed: 2026-10-16 --> - Gradle: :youpipe:extractor / dir: youpipe/extractor/-- Package roots present: -- Entry files: -- Deps: -- Metadata: metadata_data/youpipe-extractor.md (MISSING)+- Package roots present: org.schabi.newpipe.extractor (upstream NewPipe API, not the closed set — third-party fork)+- Entry files: NewPipe.kt (`init` + service registry)+- Deps: protobuf-javalite, brotli-dec, jsr305 (no Modern-Apps modules)+- Metadata: absent (libraries none by design) - Rust: no / screenshotTest: no +## Overview+**Purpose:** Pure-JVM YouTube/service extraction library — the NewPipe extractor fork that `:youpipe` uses to resolve streams, channels, playlists, search, and comments without the official API.+**Key features:**+- Per-service extractors (YouTube plus other services under `services/`) for streams, channels, playlists, search, suggestions, kiosks, and comments+- Localisation/time-ago parsing and pagination (`Page`, `ListExtractor`, `InfoItemsCollector`) for feed-style crawling+- Downloader abstraction — the host app injects its HTTP stack via `NewPipe.init(downloader)`+**Architecture / data-flow:** Host calls `NewPipe.init(downloader, localization)` once, resolves a `StreamingService` from `ServiceList`, then pulls typed `Info`/`ListInfo` objects through `Extractor` subclasses per entity; YouTube session PO-tokens plug in via `YoutubeSessionPoTokenProvider`. No Android, no Room, no network of its own — protobuf schemas under `src/main/proto` feed the YouTube player-response parsing.+**Entry points + reading order:** `NewPipe.kt` (`init`, `getService`) → `StreamingService.kt` → `Extractor.kt` / `ListExtractor.kt` → `services/youtube/` extractors → `downloader/Downloader.kt`.+**Gotchas:**+- This is a vendored upstream fork — prefer minimal surgical patches; large refactors will collide with upstream merges+- The old card was an empty stub (no roots, entries, or deps listed); all header fields are new from this rewrite+- Protobuf `lite` java builtin must stay `named("java")`, not `create` — the JVM path pre-registers it and a second create fails the build+ ## Key files+### Root — registry + base types+- org/schabi/newpipe/extractor/NewPipe.kt — init + service registry+- org/schabi/newpipe/extractor/ServiceList.kt+- org/schabi/newpipe/extractor/StreamingService.kt+- org/schabi/newpipe/extractor/Extractor.kt+- org/schabi/newpipe/extractor/ListExtractor.kt+- org/schabi/newpipe/extractor/Info.kt+- org/schabi/newpipe/extractor/ListInfo.kt+- org/schabi/newpipe/extractor/InfoItem.kt+- org/schabi/newpipe/extractor/InfoItemExtractor.kt+- org/schabi/newpipe/extractor/InfoItemsCollector.kt+- org/schabi/newpipe/extractor/MultiInfoItemsCollector.kt+- org/schabi/newpipe/extractor/Collector.kt+- org/schabi/newpipe/extractor/Page.kt+- org/schabi/newpipe/extractor/MediaFormat.kt+- org/schabi/newpipe/extractor/Image.kt+- org/schabi/newpipe/extractor/MetaInfo.kt+### services/ + stream/ + channel/ + playlist/ + search/ — per-entity extractors+- org/schabi/newpipe/extractor/services/ — per-service implementations (incl. youtube)+- org/schabi/newpipe/extractor/stream/ — stream info + items+- org/schabi/newpipe/extractor/channel/ — channel info + items+- org/schabi/newpipe/extractor/playlist/ — playlist info + items+- org/schabi/newpipe/extractor/search/ — searcher + results+- org/schabi/newpipe/extractor/suggestion/ — query suggestions+- org/schabi/newpipe/extractor/kiosk/ — trending-style feeds+- org/schabi/newpipe/extractor/comments/ — comment threads+- org/schabi/newpipe/extractor/subscription/ — subscription extractors+### linkhandler/ + localization/ + timeago/ + utils/ + downloader/ + exceptions/ — plumbing+- org/schabi/newpipe/extractor/linkhandler/ — URL ↔ id routing+- org/schabi/newpipe/extractor/localization/ — Localization + ContentCountry+- org/schabi/newpipe/extractor/timeago/ — locale-aware relative-time parsing+- org/schabi/newpipe/extractor/utils/ — shared parsing helpers+- org/schabi/newpipe/extractor/downloader/ — Downloader abstraction the host injects+- org/schabi/newpipe/extractor/exceptions/ — extraction error hierarchy  ## Verify (this module only) ``` ./gradlew :youpipe:extractor:compileDevKotlin ./gradlew :youpipe:extractor:lint ```--