mmx-cli 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -4
- package/dist/index.d.ts +2 -0
- package/dist/mmx.mjs +268 -268
- package/dist/sdk.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -144,10 +144,17 @@ mmx auth logout
|
|
|
144
144
|
```
|
|
145
145
|
|
|
146
146
|
`mmx auth status` is the canonical way to verify active authentication.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
|
|
148
|
+
**OAuth** uses the [Device Authorization Grant (RFC 8628)](https://tools.ietf.org/html/rfc8628) with PKCE —
|
|
149
|
+
the CLI opens your browser, you enter a code, and `access_token` + `refresh_token`
|
|
150
|
+
are saved to `~/.mmx/config.json`. Tokens refresh automatically (5-min buffer);
|
|
151
|
+
manual refresh via `mmx auth refresh`.
|
|
152
|
+
|
|
153
|
+
**API key** auth auto-detects the correct region by probing both Global and CN.
|
|
154
|
+
Useful for CI/CD (`mmx auth login --api-key sk-xxxxx`), or pass per-command via `--api-key`.
|
|
155
|
+
|
|
156
|
+
OAuth and API key are mutually exclusive — logging in with one clears the other.
|
|
157
|
+
Credential priority: `--api-key` flag > OAuth (config) > `api_key` (config).
|
|
151
158
|
|
|
152
159
|
### `mmx config` · `mmx quota`
|
|
153
160
|
|
package/dist/index.d.ts
CHANGED
|
@@ -283,8 +283,10 @@ export interface QuotaModelRemain {
|
|
|
283
283
|
remains_time: number;
|
|
284
284
|
current_interval_total_count: number;
|
|
285
285
|
current_interval_usage_count: number;
|
|
286
|
+
current_interval_remaining_percent?: number;
|
|
286
287
|
current_weekly_total_count: number;
|
|
287
288
|
current_weekly_usage_count: number;
|
|
289
|
+
current_weekly_remaining_percent?: number;
|
|
288
290
|
weekly_start_time: number;
|
|
289
291
|
weekly_end_time: number;
|
|
290
292
|
weekly_remains_time: number;
|