The four Muse Code plugins implement the same Meta device-code flow. Change this file and the pinned constants/tests together in all four repositories:
opencode-muse-authhermes-muse-codeopenclaw-muse-codedsh-muse-code
| Item | Value |
|---|---|
CLIENT_ID |
1031625952748946 |
| Device authorization | https://auth.meta.com/oidc/device/authorization/ |
| Device token | https://auth.meta.com/oidc/device/token/ |
| Key mint | https://api.meta.ai/muse-code/key |
| API version header | x-api-version: 1.0.0 |
| Cache fields | apiKey, accountId, email (never the OAuth access token) |
| Inference base URL | https://api.meta.ai/v1 |
| Inference wire adapter | see ADAPTER_CONTRACT.md (v3) |
- Device flow: request a device code, poll the token endpoint, accept
authorization_pending, increase the interval onslow_down, stop on a terminal error or atexpires_in. - Key mint: exchange the OAuth access token for the account-bound inference key; reject an inactive subscription or a pending payment.
- Persistence: only the inference key and account identity are stored; the OAuth access token stays in memory.
- Inference traffic on the V2 plugin API goes through the loopback adapter
described in
ADAPTER_CONTRACT.md(tool-name aliasing, parameter normalization, response name restoration). The adapter is part of the wire contract: a change to those rules bumpsADAPTER_VERSIONand the pinned tests in every repository that vendors the adapter. The V1 code path keeps sending directly tohttps://api.meta.ai/v1. - Any change to this contract bumps
AUTH_CONTRACT_VERSIONin the code and requires updating the pinned tests in all four repositories.