[Feature Request] Native Meta Muse app subscription support
Summary
Please consider first-class support for subscriptions to Meta's newly launched Muse personal-agent app at muse.ai, following Sub2API's native Grok provider pattern.
The goal is to authenticate a Muse app account, use its subscribed workspace/allowance, and expose the capabilities that can be faithfully supported through Sub2API's existing account management, scheduling, groups, Composite routing, protocol conversion, and usage accounting.
This proposal concerns the consumer Muse app subscription. Muse Code, Meta Model API, and Muse models supplied through OpenCode Zen/GO are separate access paths; support for those does not establish support for the Muse app subscription.
Current state and references
- Sub2API already integrates Grok as a native provider with provider-specific authentication, account scheduling, protocol handling, quota observations, and admin UI.
- Merged #6747 supports Muse model IDs through OpenCode. #7309 reports an OpenCode Muse Responses error; closed #5886 concerns Composite routing with a Muse alias. These are related compatibility work, rather than direct Muse app subscription access.
- www222fff/muse2api is useful implementation research. Its current inference path drives Chromium/CDP, submits prompts through the web UI, and polls rendered output. Its direct HTTP driver and Responses endpoint are placeholders; model selection and client tool semantics are not qualified.
- czg86389-hub/muse2api is another consumer-app reference. Its warm-page reuse and DOM polling should not be mistaken for a documented native chat wire protocol.
- Meta's engineering article describes clients connecting to an account-owned VM. Its design article describes persistent memory and proactive messages across conversations. The actual account's VM mode and session requirements need observation; Confidential VM should not be assumed mandatory for every account.
Source review used Sub2API main a3eb7ef302961cba716dc78b39b93b60c467db0e. Authenticated consumer-app bootstrap, inference, cancellation, and entitlement consumption remain to be verified. This is a design proposal, not a claim that a native transport already works.
Proposed approach
Recreate the provider inside Sub2API rather than deploy muse2api as a second gateway. Keep one account scheduler, credential store, permission system, and customer ledger.
- Qualify the app protocol first. Observe an authorized session's authentication/renewal, workspace bootstrap, actual subscription/usage signals, submitted-turn identifiers, events, completion, cancellation, and reconnect behavior. Preserve sanitized fixtures; do not infer an OAuth flow or fixed cookie lifetimes from reference code.
- Add a native
museprovider. Implement provider mechanics in a Go package such asinternal/pkg/muse, with session/credential, workspace, gateway, model/capability, and usage services. Choose a truthful account authentication type after the observed contract is known. Reuse Sub2API's proxy, credential redaction, conditional persistence, scheduler invalidation, and protocol serialization conventions. - Deliver a small text milestone. Start with one non-streaming public protocol, explicit model/capability reporting, canonical workspace ownership, durable accepted-turn state, and explicit pricing. Prefer direct Go HTTP/WebSocket; if authorized bootstrap requires browser-resident state, evaluate a bounded provider-managed browser runtime as a separate design decision.
- Expand only after qualification. Add streaming, other supported public protocols and Composite routing, then tools/vision/media where the app contract supports their semantics. Accepting an OpenAI-shaped request alone must not be presented as Codex/Claude Code compatibility.
Correctness requirements
- Ownership: initially dedicate each Muse workspace to one Sub2API user. Side chats alone do not prove cross-customer memory isolation. Duplicate local imports of the same remote workspace must share one concurrency/ownership boundary, including in Simple mode.
- Credentials and renewal: redact the complete session document, preserve omitted secrets during edits, and condition credential rotation on the expected identity/version/proxy. Stale renewal must not overwrite reconnects or reactivate disabled accounts. Session authentication, workspace availability, and subscription entitlement are distinct states.
- Accepted work: an HTTP timeout/disconnect does not prove the VM stopped. Persist submission/acceptance ambiguity, retain workspace occupancy until remote cancellation/completion is established, and reconcile after restart. Do not resubmit accepted or ambiguous work merely because a local lease expired.
- Output: correlate replies to the submitted task; exclude unrelated proactive messages and handle replay/revisions. Stable DOM text is not an authoritative terminal event. Reject unsupported roles, tools, limits, and continuations before submission instead of silently discarding them.
- Usage: distinguish app allowance from Sub2API customer charges. Use authoritative usage when available; otherwise explicit flat per-request pricing or a non-billable test policy. Freeze settlement attribution/rates and use stable deduplication. Debit deduplication and idempotent usage-log persistence need separate verification.
- Isolation: preserve the existing behavior of Grok/OpenAI/OpenCode and other providers. Avoid global changes to retry, refresh-lock fallback, credential scrubbing, or pricing defaults to accommodate Muse.
Acceptance criteria
- [ ] A controlled subscribed Muse app account completes a native Sub2API text request using the intended consumer-app entitlement, with an observed terminal result.
- [ ] Account import/reconnect, redaction, renewal races, disable/delete, proxy/identity changes, and duplicate remote identities are covered.
- [ ] Two replicas, client disconnect, process loss after submission, ambiguous acceptance, and cancellation failure cannot produce an unsafe second submission.
- [ ] Turn correlation, unrelated background messages, revised/replayed output, and unsupported client capabilities have deterministic tests.
- [ ] Direct and Composite routing preserve requested/mapped/observed model attribution and enforce ownership/permissions.
- [ ] Settlement replay applies one charge and persists one usage projection; missing pricing and ledger/log failures are tested independently.
- [ ] Relevant backend/frontend checks pass; authenticated provider qualification is reported separately from fixture tests and CI.
Maintainer feedback
Before starting the implementation, feedback would help on the preferred native provider/authentication extension point and whether an optional browser runtime would be acceptable if direct transport cannot reproduce the supported app bootstrap. The first deliverable would be the verified consumer-app protocol/capability report, followed by a focused native account/session and text-turn implementation.