Skip to content

feat(app): add Meta glasses capture integration - #9310

Closed
moni11811 wants to merge 4 commits into
BasedHardware:mainfrom
moni11811:agent/omi4meta-meta-glasses
Closed

moni11811 wants to merge 4 commits into
BasedHardware:mainfrom
moni11811:agent/omi4meta-meta-glasses

Conversation

@moni11811

@moni11811 moni11811 commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Theory
Meta glasses capture failed because the app lacked a checked-in DAT bridge plus app-level registration, queue, watchdog, and capture-cache contracts. #9084 mixed that with docs/examples/auth/device-list work, so this PR keeps only the runtime path.

Scope

  • Adds local Meta Wearables DAT Flutter bridge runtime only.
  • Adds Meta glasses page, provider, capture queue/watchdog/diagnostics, onboarding step, and photo cache handoff.
  • Adds iOS remote-command gesture bridge for glasses tap gestures.
  • Adds l10n keys needed by the UI.

Cut from #9084

  • Meta reference docs and plugin example app.
  • Auth env changes.
  • Unrelated multi-device saved-device work.
  • On-device transcription quality gate.
  • Generated iOS ephemeral files.

Tests

  • Red first: flutter test test/unit/meta_glasses_relay_queue_test.dart failed before DAT/runtime files existed.
  • Green: Meta focused batch passed, including relay queue, health, display, runtime regression, session pause, watchdog, continuous vision, background stream contract, contract behavior, sanitize, onboarding widget.

Notes

Review in cubic

@Git-on-my-level Git-on-my-level added needs-maintainer-review Needs a human maintainer to sign off before merge dependency-review Touches dependencies or lockfiles; needs dependency review security-review Touches auth, provider routing, secrets, or security-sensitive surfaces workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior needs-tests PR introduces logic that should be covered by tests labels Jul 9, 2026
@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks for carving the Meta glasses runtime work out of the larger branch. This is directionally interesting and the scope is more coherent than the earlier mixed PR, but I do not think this is ready for maintainer approval/merge yet.

Blocking / needs human maintainer review:

  1. Privacy/product behavior needs an explicit maintainer call. The provider defaults autoCaptureEnabled to true and, once a capture controller is attached, attempts to start capture automatically whenever registered glasses are present. For a camera wearable integration that can periodically cache images to the backend, I would want this to be explicit opt-in (or at least behind a clearly reviewed product setting/consent flow) before it can ship.

  2. The lockfile changes downgrade unrelated transitive packages and SDK constraints while adding the local plugin. That is high-risk for the whole Flutter app and not explained by the Meta integration. Please regenerate the lockfile against the repo’s intended Flutter/Dart toolchain and avoid unrelated dependency downgrades unless each one is intentional and justified.

  3. app/lib/backend/http/api/conversations.dart now changes several existing API parsers away from the generated wire models. At least TranscriptsResponse.fromJson regresses from tolerant parsing to hard casts on deepgram, soniox, whisperx, and speechmatics, so a response missing one provider key will throw instead of returning an empty list. This is unrelated to Meta glasses and could break existing transcript/compare flows.

  4. The vendored third_party/meta_wearables_dat_flutter package needs provenance/licensing review. Its podspec declares s.license = { :file => '../LICENSE' }, but I do not see that LICENSE file checked in under the vendored package path. Since this also adds native Android/iOS dependency resolution through Meta DAT SDKs and GitHub Packages, maintainers should review the license/source and build implications before accepting it.

  5. Please add/attach CI results for the focused Meta tests and, ideally, the affected app-level tests after fixing the above. The PR is draft and currently has no passing check summary available here.

I’ve labeled this for maintainer/security/dependency/workflow review plus tests. I’m intentionally not asking to split this only because it is large—the feature is cohesive—but the privacy defaults, vendored dependency surface, lockfile churn, and unrelated conversation parser changes should be addressed or explicitly accepted by maintainers before this moves out of draft.

@moni11811

Copy link
Copy Markdown
Contributor Author

Addressed review blockers in b1c34d3.

Changes:

  • Meta glasses auto-capture now defaults off. Registered glasses do not start capture without persisted opt-in.
  • Added privacy regression: registered visible glasses do not auto-start without explicit opt-in.
  • Restored transcript parser tolerance for missing provider keys and added conversation_transcripts_response_test.dart.
  • Cleaned lockfile so the worktree diff only adds the local meta_wearables_dat_flutter path package, with no SDK floor/package downgrades.
  • Added vendored package LICENSE and NOTICE so the podspec license file reference exists.

Local checks:

  • flutter test test/unit/meta_glasses_autostart_regression_test.dart --plain-name "registered visible glasses do not auto-start without explicit opt-in"
  • flutter test test/unit/conversation_transcripts_response_test.dart
  • focused Meta batch: health, display, runtime regression, session pause, watchdog, continuous vision, background stream contract, contract behavior, sanitize, onboarding widget, relay queue, transcript parser
  • dart analyze lib/providers/meta_wearables_provider.dart lib/backend/http/api/conversations.dart test/unit/meta_glasses_autostart_regression_test.dart test/unit/conversation_transcripts_response_test.dart

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks for putting this together — the Meta glasses capture flow is a coherent product surface and the direction looks potentially valuable for Omi.

I’m not approving this draft, and I think it needs human maintainer review before merge because it is a large device/privacy integration with a vendored native plugin, background camera/BLE streaming, wake-lock/foreground-service behavior, permission handling, and a new photo-ingestion path.

A few things I’d want validated before this is considered merge-ready:

  • Provenance/dependency review for app/third_party/meta_wearables_dat_flutter: please make it easy to verify which upstream commit/tag this vendored copy came from, what Omi-specific changes were made, and why vendoring is preferred over a pinned package/git dependency.
  • Privacy/security review for the capture behavior: the flow can continuously capture frames from glasses and buffer them locally before upload. The user-facing consent, foreground/background notification behavior, retention/cleanup of queued frames, and failure modes should be reviewed explicitly.
  • Backend/API contract validation: the production ingestion path appears to rely on websocket image_chunk uploads, while cacheMetaWearablesPhoto() references v1/meta-wearables/photos/cache. Please confirm there is no dead or environment-only path left that could silently strand frames in production.
  • Device/runtime validation on both iOS and Android hardware: this touches Meta DAT registration callbacks, camera permission, background streaming, display status, media-remote gestures, and watchdog recovery. The added tests are helpful, but this needs maintainer/device testing evidence before merge.

I did not see an obvious malicious/supply-chain attack in the static review, but the size and native/device surfaces mean this should stay under needs-maintainer-review, security-review, dependency-review, workflow-review, and needs-tests until a maintainer has verified the above.

@moni11811

Copy link
Copy Markdown
Contributor Author

Addressed review follow-up in 8ff553db2:

  • Added UPSTREAM.md with source, exact base commit f13cf7e2bfbbc25bdbd42ca4972be1834c724624, license, 30 unchanged / 15 modified file accounting, Omi delta, vendoring rationale, and reproduction commands.
  • Removed the undeployed v1/meta-wearables/photos/cache client, dead controller method/state, and obsolete REST-only tests. Meta photo ingestion now has one app path: websocket image_chunk plus upload acknowledgement.
  • Added red-first provenance and transport contracts.
  • Verified 17 runtime tests, 6 durable-queue tests, HFP autostart behavior, OpenAPI generation, formatting, and pre-push guards.

Privacy/product and physical iOS/Android device review remain human blockers. PR stays draft.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up — the new UPSTREAM.md and removal of the dead REST photo-cache path are useful improvements. I’m still not comfortable with this as merge-ready, and I’m requesting changes rather than approving because there are a couple of concrete blockers in addition to the existing human privacy/device review requirement.

Blocking concerns:

  • app/lib/backend/http/api/conversations.dart now replaces generated-wire parsing across many existing conversation APIs (processInProgressConversation, calendar links, file upload/sync job status, search, action items, suggested apps, merge, etc.). That is a broad production backend contract change outside the Meta glasses runtime path, and the added transcript-focused test does not cover most of the replaced endpoints. Please either keep this PR scoped to the Meta photo-ingestion/transcript contract it needs, or add focused compatibility tests/fixtures for each response shape that stopped using the generated wire adapters.
  • The vendored DAT bridge still needs dependency/reproducibility hardening before merge. Android uses a fixed mwdat_version, but the iOS Package.swift declares the Meta DAT SDK with from: "0.7.0"; please make sure the app build is actually locked to the reviewed 0.7.0 revision (not just locally resolved) or document the exact lock mechanism maintainers should rely on. The GitHub Packages/Maven token requirement for Android should also be validated in CI/build docs so this does not silently break contributor or release builds.

Still requires human maintainer validation before merge:

  • Product/privacy review for continuous glasses camera capture, local buffering, user consent, foreground/background behavior, and retention/cleanup.
  • Physical iOS and Android device testing for DAT registration, camera permission, background streaming, HFP/gesture behavior, watchdog recovery, and upload acknowledgement.

I don’t see an obvious malicious supply-chain attempt in the static review. The PR is cohesive around Meta glasses capture, but because it vendors native device code and touches privacy/security/dependency/workflow-sensitive surfaces, it should remain under needs-maintainer-review, security-review, dependency-review, workflow-review, and needs-tests until the above is resolved and maintainers have validated it on hardware.

@undivisible undivisible added human Human-authored pull request app flutter flutter work mobile privacy-review Touches user-data persistence, permissions, or privacy-sensitive surfaces labels Aug 10, 2026
@aryanorastar

Copy link
Copy Markdown
Collaborator

Closing as a maintainer.

Git-on-my-level requested changes on 8ff553d (Jul 13): conversations.dart still replaces generated-wire parsing across many non-Meta endpoints, and the vendored DAT iOS pin is from: "0.7.0" rather than a locked revision. That is still the head. There was no follow-up.

This is still a draft, CONFLICTING against current main (AppDelegate.swift, conversations.dart, l10n), with 0 repository checks. It vendors a native Meta DAT bridge, continuous glasses camera capture, and GitHub Packages native resolution. That needs hardware proof and a privacy/consent review. There is no kit here, so I will not merge it.

#9084 stays a separate draft. A new PR on current main can take another run after Meta-only scope, a locked DAT revision, and on-device smoke — not this branch.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @moni11811 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app dependency-review Touches dependencies or lockfiles; needs dependency review flutter flutter work human Human-authored pull request mobile needs-maintainer-review Needs a human maintainer to sign off before merge needs-tests PR introduces logic that should be covered by tests privacy-review Touches user-data persistence, permissions, or privacy-sensitive surfaces security-review Touches auth, provider routing, secrets, or security-sensitive surfaces workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants