[T3-OMB] P0: Research T3 mobile extensibility for an OMB personas UI (plugin vs fork) #17

Open
opened 2026-11-01 21:07:41 +01:00 by Grok · 1 comment
Contributor

DECISION LOCKED (2026-11-01, D.H.): path B. T3 mobile gets a first-party/fork Personas route. It is a carried fork patch until upstream accepts it. There is no runtime plugin (none exists on mobile upstream), and the MausBot companion stays fallback only (C). A′ (MCP App) is an optional later spike. The research below is kept as the evidence. Closes next: #17 closes once the ADR note is on #15 and #26/#27 carry path B (done in this change set). After that, the P0 engineering gate is spikes S1 (fork build smoke), S2 (voice reuse proof) and S3 (OMB companion reachability over Tailscale), plus the new S6 (Android STT, Orca-style; see below).

Voice: iOS uses T3 native STT (iOS 26+). Android: study and reuse Orca's offline STT approach: phone mic → host-side sherpa-onnx, Parakeet TDT v3 int8. Details are in the #15 ADR note.

D.H. direction (2026-11-01, voice): Voice is locked: the OMB personas chat reuses T3 Code mobile's native voice input (useVoiceInputController / VoiceInputProvider, on-device Apple transcription). Do not build a separate OMB voice stack. Caveat from research: native T3 STT is iOS 26+ only. Android has none today. Research first, final plan after: findings are in the research comment.

Plan correction (2026-11-01, phone shell): The phone shell is T3 Code mobile (kept as-is, user likes it), extended with an OMB personas chat — NOT a native OMB/MausBot companion app as primary. P0 research gate #17 decides how (A upstream plugin on mobile / B first-party or fork Personas tab / C MausBot companion = fallback only). #26 ships OMB personas inside T3 mobile after #17 decides; #27 = same surface on T3 desktop/web. Still holds: T3 replaces Orca; Mattermost off critical path. Where text below says "phone OMB voice-first app", read "OMB personas chat inside T3 mobile". Spec Page: https://cursor.com/canvas/store-4873b256-5720-4e4c-a921-b29ba11d3e02/4a1423dc-1cd5-4ce2-b54f-2c0fd46574be

Plan correction (UX + min surface, 2026-11-01): Phone = OpenMausBot, voice-first, to manage projects/agents; desktop = T3 Code as the primary session UI. Goal: unify Hermes-like simple chat with direct access to the same T3 work (fixes the Hermes clunk of chatting with no access to real work). Minimum services: OMB + T3 + Forgejo + Tailscale; Mattermost and similar are off the critical path (tokens may stay parked). T3 still replaces Orca on orchestra/braiinschestra. #26 = phone voice-first OMB path (product); #27 = optional T3 omb-chat plugin (secondary). See the revised spec Page and milestone 18.

Spec Page: https://cursor.com/canvas/store-4873b256-5720-4e4c-a921-b29ba11d3e02/4a1423dc-1cd5-4ce2-b54f-2c0fd46574be · Milestone: https://git.bitp.cz/donach/openmausbot/milestone/18

Context

Two directions need OMB endpoints: (a) OMB personas call out to T3 (outbound creds), (b) the optional T3 plugin calls into OMB for persona chat (inbound). Harness binds 127.0.0.1:8799 (full API + event stream), webhooks 127.0.0.1:8800, companion sidecar :8810 (paired-device, token allowlist), companion control 127.0.0.1:8811. Docs: https://docs.openmausbot.com/docs/self-hosting/networking

Architecture (normative): Persona plane = OMB (Grok Bot–style persona chats, routines, forgejo-mcp, approvals/widgets; primary user surface = OMB mobile, voice-first; Mattermost-class chat is optional/off critical path). Session plane = T3 Code (projects, worktrees, coding threads, diffs, commit/PR) running as the primary agent runtime on hosts orchestra and braiinschestra — T3 replaces Orca as the main runtime driving agents (Orca WSS / orca CLI is not the agent path after cutover). Engine plane = CLIs under T3 (OpenCode/Claude/Codex/…). OMB controls T3 over T3's own API/RPC/MCP; the user opens the same sessions directly in the T3 desktop UI (primary on desktop). OMB bots are never registered as T3 provider drivers.

Scope

  • Inventory OMB mobile/voice path (speech in/out, push, approvals on phone) as the primary user surface for steering T3 work.
  • Document in docs/t3-omb/omb-surface.md: endpoints needed to list bots/personas, list/create conversations, send a message, stream replies/events, resolve approvals — as exposed by the harness and by the companion sidecar allowlist.
  • Decide auth for inbound T3→OMB: companion pairing token scoped to chat endpoints (preferred) vs new service-account token. Harness port is never exposed.
  • Decide auth for outbound OMB→T3: per-bot T3 credential stored in OMB secret store (no shared Grok token).
  • Record decision in the ADR (#15).

Out of scope

  • Implementing new endpoints (see #26).

Acceptance criteria

  • omb-surface.md merged with endpoint table and companion allowlist delta needed for P4.
  • Auth decision recorded with threat notes (token scope, rotation, revocation).
  • Confirms no path requires binding :8799 beyond loopback.

Suggested approach

Start from server/harness, server/cli-pair.ts, companion/, server/mcp-*.ts, server/peer-approval*.ts.

Dependencies

Test plan

  • Pair a test device against a dev OMB, call the chat endpoints through the companion, capture redacted transcript.

Handoff for Claude

Keep the companion allowlist approach; do not add a bypass.

  • Do not register OMB bots as T3 providers. Do not expose harness :8799 publicly. No secrets in commits, logs, or PR text.
  • Open PRs against main with label t3-omb, reference this issue (Closes #N), and tick acceptance criteria in the PR description for dual review.

Research gate (P0) — can T3 mobile host an OMB personas UI?

Current evidence: apps/mobile/plugins = Expo config plugins only (build-time), not runtime add-ons. PluginHost / dynamic bundles appear web/desktop only. Mobile uses the shared client-runtime RPC + WebViews for previews.

Questions:

  1. Does T3 mobile load any runtime extension/plugin (PluginHost, dynamic bundle, remote module)? Where in apps/mobile would it mount?
  2. Could a WebView-hosted panel (like previews) render an OMB personas chat with auth to OMB over Tailscale?
  3. Can the shared client-runtime RPC be extended with OMB persona endpoints without forking the server?
  4. What does upstream accept (plugin API roadmap, PR appetite) vs. what we must carry as a fork patch? Rebase cost?
  5. Voice: mic/STT available in T3 mobile, or needs native module?
  6. Distribution: EAS/TestFlight/APK builds of a fork — feasible for one user?

Decision table:

Option What Pros Cons When
A Prove upstream plugin works on mobile (PluginHost/WebView panel) No fork; upstream-aligned May not exist on mobile today Preferred if Q1/Q2 yes
B First-party/fork Personas tab in T3 mobile (upstream PR or carried patch) Full control, native UX Fork maintenance, own builds If A not possible
C MausBot companion app Independent Second app; not what user wants Fallback only

Exit: ADR note in #15 with chosen option + evidence links; #26/#27 updated with the path.

Research findings (2026-11-01) — summary

Full write-up with paths and links: #17 (comment)

  • Voice (Q5): reuse T3 native dictation. apps/mobile/src/features/voice-input/useVoiceInputController.ts is composer-agnostic (already used by the thread composer and the scheduled-tasks screen). STT = apps/mobile/src/native/voiceTranscription.ios.ts (on-device Apple, iOS 26+). Non-iOS returns null (native/voiceTranscription.ts). No TTS in T3.
  • Q1 runtime extensions on mobile: none. apps/mobile/plugins = Expo config plugins. apps/mobile/modules/t3-* = built-in native modules. No PluginHost on upstream main (@d897d3f3). Plugin-platform PRs: #2979 closed unmerged. Host #16047 closed 2026-10-27, with maintainer t3dotgg saying "let us handle this". Plugin views in #16053 are web/desktop right-panel tabs only.
  • Q2 WebView panel: the closest upstream mechanism is MCP Apps (ui://), rendered on mobile in features/threads/McpAppWebView.tsx (inline/fullscreen). They are turn-bound (they only appear when an agent calls the tool in a thread), and interactive callTool works only with the Codex adapter. Good for an optional spike (A′), not a persona panel.
  • Q3 RPC: OMB→T3 control is already supported via the environment MCP server https://<env>/mcp (OAuth, scoped, revocable; docs/user/outside-agents.md). T3 RPC has no hook to proxy OMB persona calls. The OMB panel talks to the OMB companion (:8810) directly.
  • Q4 upstream appetite: features need prior maintainer approval (CONTRIBUTING#prior-approval). The plugin platform is being kept in-house by the maintainers, so any mobile Personas route is a carried patch for now.
  • Q6 distribution: EAS profiles exist, and Personal Team iOS builds are documented (apps/mobile/README.md).
  • Recommendation: B (thin first-party/fork Personas route in apps/mobile/src/Stack.tsx reusing ComposerEditor + native voice), confidence ~70%. A is not possible today. A′ (MCP App) is an optional no-fork spike. C stays fallback. Spikes S1–S5 are listed in the comment. Final plan to be sketched after D.H. review.

Android voice (added 2026-11-01)

Android voice: study and reuse Orca's offline approach (D.H., 2026-11-01). Upstream stablyai/orca was checked on 2026-11-01. Orca's phone app does not run the model on the phone. It records audio on the phone and sends it to the paired Orca host, which transcribes it offline with a local model.

  • Phone side: mobile/src/hooks/use-mobile-dictation.ts calls startMobileDictationDesktopSession, and audio is captured by @orca/expo-two-way-audio (mobile/packages/expo-two-way-audio, which uses Android AudioRecord). The model picker and download controls live in mobile/app/voice-settings.tsx and mobile/src/dictation/mobile-dictation-setup.ts, using the RPCs speech.models.list, speech.models.download and speech.dictation.setup.
  • Host side: src/main/speech/ (stt-worker.ts, stt-service.ts, model-manager.ts, model-catalog.ts) runs a sherpa-onnx worker. The recommended model is parakeet-tdt-0.6b-v3-int8, which covers 25 European languages including Czech and adds punctuation. Others include streaming Zipformer, Whisper Tiny and SenseVoice. Models are downloaded with a SHA-256 check.
  • For B: iOS keeps T3 native STT (iOS 26+). On Android, the Personas screen captures 16 kHz PCM and streams it over Tailscale to a host-side sherpa-onnx STT, either next to the OMB companion (:8810) or on orchestra. Transcribing on the phone itself with sherpa-onnx's Android build is the alternative. This is spike S6 (Android STT). There is no cloud STT and no separate OMB voice stack on iOS.
> **DECISION LOCKED (2026-11-01, D.H.): path B.** T3 mobile gets a first-party/fork **Personas route**. It is a carried fork patch until upstream accepts it. There is no runtime plugin (none exists on mobile upstream), and the MausBot companion stays fallback only (C). A′ (MCP App) is an optional later spike. The research below is kept as the evidence. **Closes next:** #17 closes once the ADR note is on #15 and #26/#27 carry path B (done in this change set). After that, the P0 engineering gate is spikes **S1** (fork build smoke), **S2** (voice reuse proof) and **S3** (OMB companion reachability over Tailscale), plus the new **S6** (Android STT, Orca-style; see below). > > Voice: iOS uses T3 native STT (iOS 26+). **Android: study and reuse Orca's offline STT approach**: phone mic → host-side sherpa-onnx, Parakeet TDT v3 int8. Details are in the [#15 ADR note](https://git.bitp.cz/donach/openmausbot/issues/15). > **D.H. direction (2026-11-01, voice):** Voice is **locked**: the OMB personas chat **reuses T3 Code mobile's native voice input** (`useVoiceInputController` / `VoiceInputProvider`, on-device Apple transcription). **Do not build a separate OMB voice stack.** Caveat from research: native T3 STT is iOS 26+ only. Android has none today. Research first, final plan after: findings are in [the research comment](https://git.bitp.cz/donach/openmausbot/issues/17#issuecomment-21708). > **Plan correction (2026-11-01, phone shell):** The phone shell is **T3 Code mobile** (kept as-is, user likes it), **extended with an OMB personas chat** — NOT a native OMB/MausBot companion app as primary. P0 research gate **#17** decides how (A upstream plugin on mobile / B first-party or fork Personas tab / C MausBot companion = fallback only). **#26** ships OMB personas inside T3 mobile after #17 decides; **#27** = same surface on T3 desktop/web. Still holds: **T3 replaces Orca**; **Mattermost off critical path**. Where text below says "phone OMB voice-first app", read "OMB personas chat inside T3 mobile". Spec Page: https://cursor.com/canvas/store-4873b256-5720-4e4c-a921-b29ba11d3e02/4a1423dc-1cd5-4ce2-b54f-2c0fd46574be > **Plan correction (UX + min surface, 2026-11-01):** **Phone** = OpenMausBot, voice-first, to manage projects/agents; **desktop** = T3 Code as the primary session UI. Goal: unify Hermes-like simple chat with **direct** access to the same T3 work (fixes the Hermes clunk of chatting with no access to real work). **Minimum services:** OMB + T3 + Forgejo + Tailscale; Mattermost and similar are **off the critical path** (tokens may stay parked). T3 still **replaces Orca** on orchestra/braiinschestra. #26 = phone voice-first OMB path (product); #27 = optional T3 `omb-chat` plugin (secondary). See the [revised spec Page](https://cursor.com/canvas/store-4873b256-5720-4e4c-a921-b29ba11d3e02/4a1423dc-1cd5-4ce2-b54f-2c0fd46574be) and [milestone 18](https://git.bitp.cz/donach/openmausbot/milestone/18). > Spec Page: https://cursor.com/canvas/store-4873b256-5720-4e4c-a921-b29ba11d3e02/4a1423dc-1cd5-4ce2-b54f-2c0fd46574be · Milestone: https://git.bitp.cz/donach/openmausbot/milestone/18 ## Context Two directions need OMB endpoints: (a) OMB personas call out to T3 (outbound creds), (b) the optional T3 plugin calls into OMB for persona chat (inbound). Harness binds `127.0.0.1:8799` (full API + event stream), webhooks `127.0.0.1:8800`, companion sidecar `:8810` (paired-device, token allowlist), companion control `127.0.0.1:8811`. Docs: https://docs.openmausbot.com/docs/self-hosting/networking Architecture (normative): **Persona plane = OMB** (Grok Bot–style persona chats, routines, forgejo-mcp, approvals/widgets; primary user surface = OMB mobile, voice-first; Mattermost-class chat is optional/off critical path). **Session plane = T3 Code** (projects, worktrees, coding threads, diffs, commit/PR) running as the **primary agent runtime** on hosts **orchestra** and **braiinschestra** — T3 **replaces Orca** as the main runtime driving agents (Orca WSS / `orca` CLI is not the agent path after cutover). **Engine plane** = CLIs under T3 (OpenCode/Claude/Codex/…). OMB controls T3 over T3's own API/RPC/MCP; the user opens the same sessions directly in the T3 desktop UI (primary on desktop). OMB bots are **never** registered as T3 provider drivers. ## Scope - Inventory OMB mobile/voice path (speech in/out, push, approvals on phone) as the primary user surface for steering T3 work. - Document in `docs/t3-omb/omb-surface.md`: endpoints needed to list bots/personas, list/create conversations, send a message, stream replies/events, resolve approvals — as exposed by the harness and by the companion sidecar allowlist. - Decide auth for inbound T3→OMB: companion pairing token scoped to chat endpoints (preferred) vs new service-account token. Harness port is never exposed. - Decide auth for outbound OMB→T3: per-bot T3 credential stored in OMB secret store (no shared Grok token). - Record decision in the ADR (#15). ## Out of scope - Implementing new endpoints (see #26). ## Acceptance criteria - [ ] `omb-surface.md` merged with endpoint table and companion allowlist delta needed for P4. - [ ] Auth decision recorded with threat notes (token scope, rotation, revocation). - [ ] Confirms no path requires binding :8799 beyond loopback. ## Suggested approach Start from `server/harness`, `server/cli-pair.ts`, `companion/`, `server/mcp-*.ts`, `server/peer-approval*.ts`. ## Dependencies - #15 ## Test plan - Pair a test device against a dev OMB, call the chat endpoints through the companion, capture redacted transcript. ## Handoff for Claude Keep the companion allowlist approach; do not add a bypass. - Do not register OMB bots as T3 providers. Do not expose harness :8799 publicly. No secrets in commits, logs, or PR text. - Open PRs against `main` with label `t3-omb`, reference this issue (`Closes #N`), and tick acceptance criteria in the PR description for dual review. ## Research gate (P0) — can T3 mobile host an OMB personas UI? **Current evidence:** `apps/mobile/plugins` = Expo *config* plugins only (build-time), not runtime add-ons. PluginHost / dynamic bundles appear web/desktop only. Mobile uses the shared client-runtime RPC + WebViews for previews. **Questions:** 1. Does T3 mobile load any runtime extension/plugin (PluginHost, dynamic bundle, remote module)? Where in `apps/mobile` would it mount? 2. Could a WebView-hosted panel (like previews) render an OMB personas chat with auth to OMB over Tailscale? 3. Can the shared client-runtime RPC be extended with OMB persona endpoints without forking the server? 4. What does upstream accept (plugin API roadmap, PR appetite) vs. what we must carry as a fork patch? Rebase cost? 5. Voice: mic/STT available in T3 mobile, or needs native module? 6. Distribution: EAS/TestFlight/APK builds of a fork — feasible for one user? **Decision table:** | Option | What | Pros | Cons | When | |---|---|---|---|---| | **A** | Prove upstream plugin works on mobile (PluginHost/WebView panel) | No fork; upstream-aligned | May not exist on mobile today | Preferred if Q1/Q2 yes | | **B** | First-party/fork **Personas tab** in T3 mobile (upstream PR or carried patch) | Full control, native UX | Fork maintenance, own builds | If A not possible | | **C** | MausBot companion app | Independent | Second app; not what user wants | **Fallback only** | **Exit:** ADR note in #15 with chosen option + evidence links; #26/#27 updated with the path. ## Research findings (2026-11-01) — summary Full write-up with paths and links: https://git.bitp.cz/donach/openmausbot/issues/17#issuecomment-21708 - **Voice (Q5):** reuse T3 native dictation. `apps/mobile/src/features/voice-input/useVoiceInputController.ts` is composer-agnostic (already used by the thread composer and the scheduled-tasks screen). STT = `apps/mobile/src/native/voiceTranscription.ios.ts` (on-device Apple, iOS 26+). Non-iOS returns `null` (`native/voiceTranscription.ts`). No TTS in T3. - **Q1 runtime extensions on mobile:** **none.** `apps/mobile/plugins` = Expo config plugins. `apps/mobile/modules/t3-*` = built-in native modules. No PluginHost on upstream `main` (@`d897d3f3`). Plugin-platform PRs: #2979 closed unmerged. Host #16047 closed 2026-10-27, with maintainer t3dotgg saying "let us handle this". Plugin views in #16053 are web/desktop right-panel tabs only. - **Q2 WebView panel:** the closest upstream mechanism is **MCP Apps** (`ui://`), rendered on mobile in `features/threads/McpAppWebView.tsx` (inline/fullscreen). They are turn-bound (they only appear when an agent calls the tool in a thread), and interactive `callTool` works only with the Codex adapter. Good for an optional spike (A′), not a persona panel. - **Q3 RPC:** OMB→T3 control is already supported via the environment MCP server `https://<env>/mcp` (OAuth, scoped, revocable; `docs/user/outside-agents.md`). T3 RPC has no hook to proxy OMB persona calls. The OMB panel talks to the OMB companion (:8810) directly. - **Q4 upstream appetite:** features need prior maintainer approval (CONTRIBUTING#prior-approval). The plugin platform is being kept in-house by the maintainers, so any mobile Personas route is a carried patch for now. - **Q6 distribution:** EAS profiles exist, and Personal Team iOS builds are documented (`apps/mobile/README.md`). - **Recommendation:** **B** (thin first-party/fork Personas route in `apps/mobile/src/Stack.tsx` reusing `ComposerEditor` + native voice), confidence ~70%. **A** is not possible today. **A′** (MCP App) is an optional no-fork spike. **C** stays fallback. Spikes S1–S5 are listed in the comment. **Final plan to be sketched after D.H. review.** ## Android voice (added 2026-11-01) **Android voice: study and reuse Orca's offline approach (D.H., 2026-11-01).** Upstream stablyai/orca was checked on 2026-11-01. Orca's phone app does **not** run the model on the phone. It records audio on the phone and sends it to the paired Orca host, which transcribes it offline with a local model. - **Phone side:** `mobile/src/hooks/use-mobile-dictation.ts` calls `startMobileDictationDesktopSession`, and audio is captured by `@orca/expo-two-way-audio` (`mobile/packages/expo-two-way-audio`, which uses Android AudioRecord). The model picker and download controls live in `mobile/app/voice-settings.tsx` and `mobile/src/dictation/mobile-dictation-setup.ts`, using the RPCs `speech.models.list`, `speech.models.download` and `speech.dictation.setup`. - **Host side:** `src/main/speech/` (`stt-worker.ts`, `stt-service.ts`, `model-manager.ts`, `model-catalog.ts`) runs a **sherpa-onnx** worker. The recommended model is **`parakeet-tdt-0.6b-v3-int8`**, which covers 25 European languages including Czech and adds punctuation. Others include streaming Zipformer, Whisper Tiny and SenseVoice. Models are downloaded with a SHA-256 check. - **For B:** iOS keeps T3 native STT (iOS 26+). On Android, the Personas screen captures 16 kHz PCM and streams it over Tailscale to a host-side sherpa-onnx STT, either next to the OMB companion (:8810) or on orchestra. Transcribing on the phone itself with sherpa-onnx's Android build is the alternative. This is spike **S6** (Android STT). There is no cloud STT and no separate OMB voice stack on iOS.
Grok changed title from [T3-OMB] P0: Inventory OMB harness API + pairing for external clients; decide auth model to [T3-OMB] P0: Inventory OMB harness + mobile/voice path; decide auth model 2026-11-01 21:18:39 +01:00
Grok changed title from [T3-OMB] P0: Inventory OMB harness + mobile/voice path; decide auth model to [T3-OMB] P0: Research T3 mobile extensibility for an OMB personas UI (plugin vs fork) 2026-11-01 21:27:15 +01:00
Author
Contributor

#17 research findings (2026-11-01, CoS) — reuse inventory + mobile extension support

Status: research complete for the A/B/C gate. Not the final implementation plan. That gets sketched after D.H. reviews this.
Upstream checked: pingdotgg/t3code main @ d897d3f3 (2026-11-01 21:10 CET). Also checked: GitHub PR/discussion state for the plugin work. donach/t3code-flake only packages the desktop/server release binaries, so it adds nothing for mobile.

0. Voice is locked (D.H. direction, 2026-11-01)

The OMB personas chat reuses T3 Code mobile's native voice input. No separate OMB voice stack. The code backs this up:

  • apps/mobile/src/features/voice-input/useVoiceInputController.ts is a generic hook. It takes {ownerKey, label, readDraftMessage, subscribeToDraftChanges, selection, onChangeDraftMessage, onChangeSelection}, so any composer can use it. Two composers already do: features/threads/ThreadComposer.tsx (~L564) and features/settings/SettingsScheduledTasksRouteScreen.tsx (~L527). A Personas composer would be the third.
  • Session/recorder: features/voice-input/VoiceInputProvider.tsx gives one app-wide mic session (expo-audio recorder, permission, audio session, keep-awake). The UI is in ComposerDictationControl.tsx and GlobalVoiceInputControl.tsx. The state machine is shared in packages/client-runtime/src/voice-input/{controller,transcription}.ts.
  • STT engine: apps/mobile/src/native/voiceTranscription.ios.ts runs on-device Apple transcription through @react-native-ai/apple (NativeAppleTranscription).
  • ⚠️ Caveat: this needs iOS 26+ on a supported device. native/voiceTranscription.ts (Android and everything else) returns null, so the mic control is hidden there (isAvailable in VoiceInputProvider.tsx ~L142). STT only, no TTS. Spoken replies are not part of T3 today. usePlaybackAudioPlayer.ts only plays audio files back.
  • Result: on iPhone (iOS 26) the voice requirement is met by reuse alone. On Android it is not met by any A/B/C option without new STT work. That would be a separate decision, not a parallel OMB stack.

1. What we can reuse as-is for an OMB personas chat panel

Need Reusable T3 piece Path / evidence
Voice dictation in the composer useVoiceInputController + VoiceInputProvider + ComposerDictationControl see §0
Composer UI ComposerEditor (native t3-composer-editor module) apps/mobile/src/components/ComposerEditor.tsx, src/native/T3ComposerEditor.*.tsx, modules/t3-composer-editor
Navigation / where a screen mounts Static native-stack config. Adding a route here is the fork/first-party insertion point apps/mobile/src/Stack.tsx (RootStack screens ~L600+, linking ~L1084)
Deep links back to T3 threads URL schemes t3code / t3code-preview / t3code-dev apps/mobile/app.config.ts ~L81–97
T3 RPC / orchestration state Shared client runtime (Effect atoms + WS RPC) packages/client-runtime/src/rpc/*, src/state/*, mobile src/state/orchestration.ts
Sandboxed web UI inside the app react-native-webview hosts (previews, HTML render, MCP Apps) features/threads/McpAppWebView.tsx, features/browser/PreviewStreamWebView.tsx, features/threads/HtmlRenderWebView.tsx
OMB → T3 control (persona plane drives the session plane) T3 environment MCP server at https://<env>/mcp with OAuth pairing and per-client scopes (Read only → Full access), revocable in Settings → Sharing & access. Also t3 thread start/send/show CLI on the host docs/user/outside-agents.md, apps/server/src/mcp/OrchestratorMcpService.ts
Builds for one user EAS profiles + local expo run:*. A Personal Team iOS build is supported (no widget/share ext/push) apps/mobile/eas.json, apps/mobile/README.md ~L82–98, plugins/withoutIosPersonalTeamCapabilities.cjs

Not reusable: T3 auth/session tokens for talking to OMB. The OMB side still needs its own companion-scoped token (#26). The T3 RPC also has no generic "proxy to an external service" endpoint we could hang OMB persona calls on without changing the server.

2. Does T3 mobile support extensions/add-ons today? No first-class runtime extension support on mobile.

  • apps/mobile/plugins/*.cjs are Expo config plugins (build-time native project edits, e.g. withAndroidNetworkSecurityConfig.cjs, withShareExtensionDisplayName.cjs). They are not runtime add-ons.
  • apps/mobile/modules/t3-* are first-party Expo native modules compiled into the app. They are not loadable extensions.
  • No PluginHost / plugin registry exists anywhere on upstream main (rg PluginHost|PluginRegistry|plugin-api finds nothing).
  • Upstream plugin-platform history:
    • #2979 (plugin host + @t3tools/plugin-api + web PluginHostBootstrap, web/desktop only): closed unmerged 2026-07-10.
    • saphid stack #16047–#16065: the host PR #16047 was closed 2026-10-27. Maintainer t3dotgg wrote "Cool - let us handle this tho :)". The rest of the stack is still open but is held under CONTRIBUTING prior-approval, with no maintainer sign-off on discussions #6714 and #6837. Even if it merged, plugin views are "isolated right-panel tabs on web and desktop" (#16053). The mobile layers only add plugin management in Settings, thread statuses, notifications and context transforms (#16055–#16063). None of them adds a mobile plugin view/tab.
  • The closest thing upstream has today is MCP Apps (io.modelcontextprotocol/ui, ui:// resources, protocol 2026-01-26). They are rendered on mobile as sandboxed WebViews in the thread feed, inline or fullscreen (apps/mobile/src/features/threads/McpAppWebView.tsx, McpAppFullscreenScreen.tsx, packages/client-runtime/src/mcpApps/host.ts, packages/shared/src/mcpApp.ts). The app gets callTool, sendMessage into the thread, updateModelContext, CSP connectDomains and opt-in microphone. Limits:
    • An MCP App only appears after an agent turn calls the tool in a T3 thread. It is turn-bound and cannot be a standalone tab.
    • App→server callTool is implemented only by the Codex adapter (apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts ~L6839). Other providers return provider-unsupported (apps/server/src/mcpApps/McpAppRequests.ts ~L104).
    • Voice inside the WebView would not use T3's native dictation. The native composer would still be the voice path.

3. Recommendation: B (first-party/fork Personas route in T3 mobile), confidence ~70%

  • A is not possible today. T3 mobile has no runtime plugin host or plugin view. Upstream's plugin platform is unmerged, the maintainers are taking it in-house, and the in-flight design puts views on web/desktop only. A has nothing to prove against yet.
  • A′ (MCP App inside a T3 thread, no fork) uses upstream code and is worth a short spike. It is turn-bound, Codex-only for interactivity, and not a persona panel, so it fits as an optional entry point, not the primary shell.
  • B is a small, isolated addition: one new route in Stack.tsx plus a Personas screen. It reuses ComposerEditor + useVoiceInputController (so voice reuse is guaranteed) and talks to OMB only through the companion (:8810, scoped token, Tailscale). Shape it as an upstreamable "external chat" feature, but carry it as a fork patch until upstream agrees. Rebase risk is moderate: upstream apps/mobile changes daily.
  • C stays fallback only.
  • What would change this:
    • (a) Upstream ships mobile plugin views/tabs, or a maintainer approves a mobile extension point → switch to A.
    • (b) The A′ spike shows a fullscreen MCP App persona chat is good enough for D.H. → A′ with no fork.
    • (c) Fork builds turn out impractical (Apple signing/EAS cost) → revisit C.
    • (d) D.H. needs Android voice → extra STT decision for any option.

4. Spikes to settle the remaining uncertainty (short, before the final plan)

  1. S1 Fork build smoke (½ day): build T3 mobile from main for D.H.'s phone (Personal Team or EAS preview) with a stub Personas route in Stack.tsx. This shows the build cost and rebase surface.
  2. S2 Voice reuse proof (½ day): in the stub screen, mount ComposerEditor + useVoiceInputController with a new ownerKey namespace. Confirm dictation works and does not collide with thread composers (single global mic session).
  3. S3 OMB reachability (½ day): from the stub screen, call the OMB companion (:8810) over Tailscale with a scoped token. Covers ATS/network-security config (withAndroidNetworkSecurityConfig.cjs) and streaming.
  4. S4 A′ MCP App probe (1 day, optional): a minimal OMB MCP server exposing one ui:// persona-chat tool, attached to a Codex thread. Check inline/fullscreen UX on mobile and callTool round-trip.
  5. S5 Upstream ask (async): comment on discussion #6837 / ask maintainers whether a mobile view/tab extension point is planned. A yes moves us toward A.

Closes #17 when: D.H. confirms B (or picks A′/C), the ADR note lands on #15, and #26/#27 are updated with the chosen path.

## #17 research findings (2026-11-01, CoS) — reuse inventory + mobile extension support **Status:** research complete for the A/B/C gate. **Not** the final implementation plan. That gets sketched after D.H. reviews this. **Upstream checked:** `pingdotgg/t3code` `main` @ [`d897d3f3`](https://github.com/pingdotgg/t3code/commit/d897d3f3f00f2cb534c813e637154d39c8d1cff6) (2026-11-01 21:10 CET). Also checked: GitHub PR/discussion state for the plugin work. `donach/t3code-flake` only packages the desktop/server release binaries, so it adds nothing for mobile. ### 0. Voice is locked (D.H. direction, 2026-11-01) The OMB personas chat **reuses T3 Code mobile's native voice input**. **No separate OMB voice stack.** The code backs this up: - `apps/mobile/src/features/voice-input/useVoiceInputController.ts` is a generic hook. It takes `{ownerKey, label, readDraftMessage, subscribeToDraftChanges, selection, onChangeDraftMessage, onChangeSelection}`, so any composer can use it. Two composers already do: `features/threads/ThreadComposer.tsx` (~L564) and `features/settings/SettingsScheduledTasksRouteScreen.tsx` (~L527). A Personas composer would be the third. - Session/recorder: `features/voice-input/VoiceInputProvider.tsx` gives one app-wide mic session (`expo-audio` recorder, permission, audio session, keep-awake). The UI is in `ComposerDictationControl.tsx` and `GlobalVoiceInputControl.tsx`. The state machine is shared in `packages/client-runtime/src/voice-input/{controller,transcription}.ts`. - STT engine: `apps/mobile/src/native/voiceTranscription.ios.ts` runs **on-device Apple transcription** through `@react-native-ai/apple` (`NativeAppleTranscription`). - ⚠️ **Caveat:** this needs **iOS 26+ on a supported device**. `native/voiceTranscription.ts` (Android and everything else) returns `null`, so the mic control is hidden there (`isAvailable` in `VoiceInputProvider.tsx` ~L142). STT only, no TTS. Spoken replies are not part of T3 today. `usePlaybackAudioPlayer.ts` only plays audio files back. - Result: on iPhone (iOS 26) the voice requirement is met by reuse alone. On Android it is not met by any A/B/C option without new STT work. That would be a separate decision, not a parallel OMB stack. ### 1. What we can reuse as-is for an OMB personas chat panel | Need | Reusable T3 piece | Path / evidence | |---|---|---| | Voice dictation in the composer | `useVoiceInputController` + `VoiceInputProvider` + `ComposerDictationControl` | see §0 | | Composer UI | `ComposerEditor` (native `t3-composer-editor` module) | `apps/mobile/src/components/ComposerEditor.tsx`, `src/native/T3ComposerEditor.*.tsx`, `modules/t3-composer-editor` | | Navigation / where a screen mounts | Static native-stack config. Adding a route here is the fork/first-party insertion point | `apps/mobile/src/Stack.tsx` (`RootStack` screens ~L600+, linking ~L1084) | | Deep links back to T3 threads | URL schemes `t3code` / `t3code-preview` / `t3code-dev` | `apps/mobile/app.config.ts` ~L81–97 | | T3 RPC / orchestration state | Shared client runtime (Effect atoms + WS RPC) | `packages/client-runtime/src/rpc/*`, `src/state/*`, mobile `src/state/orchestration.ts` | | Sandboxed web UI inside the app | `react-native-webview` hosts (previews, HTML render, **MCP Apps**) | `features/threads/McpAppWebView.tsx`, `features/browser/PreviewStreamWebView.tsx`, `features/threads/HtmlRenderWebView.tsx` | | OMB → T3 control (persona plane drives the session plane) | **T3 environment MCP server at `https://<env>/mcp`** with OAuth pairing and per-client scopes (Read only → Full access), revocable in Settings → Sharing & access. Also `t3 thread start/send/show` CLI on the host | `docs/user/outside-agents.md`, `apps/server/src/mcp/OrchestratorMcpService.ts` | | Builds for one user | EAS profiles + local `expo run:*`. A Personal Team iOS build is supported (no widget/share ext/push) | `apps/mobile/eas.json`, `apps/mobile/README.md` ~L82–98, `plugins/withoutIosPersonalTeamCapabilities.cjs` | **Not reusable:** T3 auth/session tokens for talking to OMB. The OMB side still needs its own companion-scoped token (#26). The T3 RPC also has no generic "proxy to an external service" endpoint we could hang OMB persona calls on without changing the server. ### 2. Does T3 mobile support extensions/add-ons today? **No first-class runtime extension support on mobile.** - `apps/mobile/plugins/*.cjs` are **Expo config plugins** (build-time native project edits, e.g. `withAndroidNetworkSecurityConfig.cjs`, `withShareExtensionDisplayName.cjs`). They are not runtime add-ons. - `apps/mobile/modules/t3-*` are first-party Expo native modules compiled into the app. They are not loadable extensions. - No `PluginHost` / plugin registry exists anywhere on upstream `main` (`rg PluginHost|PluginRegistry|plugin-api` finds nothing). - Upstream plugin-platform history: - [#2979](https://github.com/pingdotgg/t3code/pull/2979) (plugin host + `@t3tools/plugin-api` + web `PluginHostBootstrap`, web/desktop only): **closed unmerged** 2026-07-10. - saphid stack [#16047](https://github.com/pingdotgg/t3code/pull/16047)–[#16065](https://github.com/pingdotgg/t3code/pull/16065): the **host PR #16047 was closed** 2026-10-27. Maintainer t3dotgg wrote "Cool - let us handle this tho :)". The rest of the stack is still open but is held under CONTRIBUTING [prior-approval](https://github.com/pingdotgg/t3code/blob/main/CONTRIBUTING.md#prior-approval), with no maintainer sign-off on discussions [#6714](https://github.com/pingdotgg/t3code/discussions/6714) and [#6837](https://github.com/pingdotgg/t3code/discussions/6837). Even if it merged, **plugin views are "isolated right-panel tabs on web and desktop"** ([#16053](https://github.com/pingdotgg/t3code/pull/16053)). The mobile layers only add plugin management in Settings, thread statuses, notifications and context transforms (#16055–#16063). **None of them adds a mobile plugin view/tab.** - **The closest thing upstream has today is MCP Apps** (`io.modelcontextprotocol/ui`, `ui://` resources, protocol `2026-01-26`). They are rendered **on mobile** as sandboxed WebViews in the thread feed, inline or fullscreen (`apps/mobile/src/features/threads/McpAppWebView.tsx`, `McpAppFullscreenScreen.tsx`, `packages/client-runtime/src/mcpApps/host.ts`, `packages/shared/src/mcpApp.ts`). The app gets `callTool`, `sendMessage` into the thread, `updateModelContext`, CSP `connectDomains` and opt-in `microphone`. Limits: - An MCP App only appears **after an agent turn calls the tool** in a T3 thread. It is turn-bound and cannot be a standalone tab. - App→server `callTool` is **implemented only by the Codex adapter** (`apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts` ~L6839). Other providers return `provider-unsupported` (`apps/server/src/mcpApps/McpAppRequests.ts` ~L104). - Voice inside the WebView would **not** use T3's native dictation. The native composer would still be the voice path. ### 3. Recommendation: **B (first-party/fork Personas route in T3 mobile)**, confidence ~70% - **A is not possible today.** T3 mobile has no runtime plugin host or plugin view. Upstream's plugin platform is unmerged, the maintainers are taking it in-house, and the in-flight design puts views on web/desktop only. A has nothing to prove against yet. - **A′ (MCP App inside a T3 thread, no fork)** uses upstream code and is worth a short spike. It is turn-bound, Codex-only for interactivity, and not a persona panel, so it fits as an *optional* entry point, not the primary shell. - **B** is a small, isolated addition: one new route in `Stack.tsx` plus a Personas screen. It reuses `ComposerEditor` + `useVoiceInputController` (so voice reuse is guaranteed) and talks to OMB only through the companion (:8810, scoped token, Tailscale). Shape it as an upstreamable "external chat" feature, but carry it as a fork patch until upstream agrees. Rebase risk is moderate: upstream `apps/mobile` changes daily. - **C** stays fallback only. - **What would change this:** - (a) Upstream ships mobile plugin views/tabs, or a maintainer approves a mobile extension point → switch to **A**. - (b) The A′ spike shows a fullscreen MCP App persona chat is good enough for D.H. → **A′** with no fork. - (c) Fork builds turn out impractical (Apple signing/EAS cost) → revisit **C**. - (d) D.H. needs Android voice → extra STT decision for any option. ### 4. Spikes to settle the remaining uncertainty (short, before the final plan) 1. **S1 Fork build smoke (½ day):** build T3 mobile from `main` for D.H.'s phone (Personal Team or EAS preview) with a stub `Personas` route in `Stack.tsx`. This shows the build cost and rebase surface. 2. **S2 Voice reuse proof (½ day):** in the stub screen, mount `ComposerEditor` + `useVoiceInputController` with a new `ownerKey` namespace. Confirm dictation works and does not collide with thread composers (single global mic session). 3. **S3 OMB reachability (½ day):** from the stub screen, call the OMB companion (:8810) over Tailscale with a scoped token. Covers ATS/network-security config (`withAndroidNetworkSecurityConfig.cjs`) and streaming. 4. **S4 A′ MCP App probe (1 day, optional):** a minimal OMB MCP server exposing one `ui://` persona-chat tool, attached to a Codex thread. Check inline/fullscreen UX on mobile and `callTool` round-trip. 5. **S5 Upstream ask (async):** comment on discussion #6837 / ask maintainers whether a mobile view/tab extension point is planned. A yes moves us toward A. **Closes #17 when:** D.H. confirms B (or picks A′/C), the ADR note lands on #15, and #26/#27 are updated with the chosen path.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
donach/openmausbot#17
No description provided.