@slkiser/opencode-quota 3.5.0 → 3.6.1

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.
Files changed (129) hide show
  1. package/README.md +234 -130
  2. package/dist/lib/anthropic.d.ts +1 -0
  3. package/dist/lib/anthropic.d.ts.map +1 -1
  4. package/dist/lib/anthropic.js +12 -4
  5. package/dist/lib/anthropic.js.map +1 -1
  6. package/dist/lib/chutes.d.ts +3 -1
  7. package/dist/lib/chutes.d.ts.map +1 -1
  8. package/dist/lib/chutes.js +2 -2
  9. package/dist/lib/chutes.js.map +1 -1
  10. package/dist/lib/cli-show.d.ts.map +1 -1
  11. package/dist/lib/cli-show.js +4 -2
  12. package/dist/lib/cli-show.js.map +1 -1
  13. package/dist/lib/config-file-utils.d.ts +11 -0
  14. package/dist/lib/config-file-utils.d.ts.map +1 -1
  15. package/dist/lib/config-file-utils.js +24 -3
  16. package/dist/lib/config-file-utils.js.map +1 -1
  17. package/dist/lib/config.d.ts +1 -1
  18. package/dist/lib/config.d.ts.map +1 -1
  19. package/dist/lib/config.js +12 -1
  20. package/dist/lib/config.js.map +1 -1
  21. package/dist/lib/copilot.d.ts +4 -1
  22. package/dist/lib/copilot.d.ts.map +1 -1
  23. package/dist/lib/copilot.js +15 -10
  24. package/dist/lib/copilot.js.map +1 -1
  25. package/dist/lib/crof-config.d.ts +21 -0
  26. package/dist/lib/crof-config.d.ts.map +1 -0
  27. package/dist/lib/crof-config.js +35 -0
  28. package/dist/lib/crof-config.js.map +1 -0
  29. package/dist/lib/crof.d.ts +13 -0
  30. package/dist/lib/crof.d.ts.map +1 -0
  31. package/dist/lib/crof.js +70 -0
  32. package/dist/lib/crof.js.map +1 -0
  33. package/dist/lib/entries.d.ts +3 -0
  34. package/dist/lib/entries.d.ts.map +1 -1
  35. package/dist/lib/google-gemini-cli-companion.d.ts.map +1 -1
  36. package/dist/lib/google-gemini-cli-companion.js +46 -18
  37. package/dist/lib/google-gemini-cli-companion.js.map +1 -1
  38. package/dist/lib/google-gemini-cli.d.ts +3 -1
  39. package/dist/lib/google-gemini-cli.d.ts.map +1 -1
  40. package/dist/lib/google-gemini-cli.js +9 -6
  41. package/dist/lib/google-gemini-cli.js.map +1 -1
  42. package/dist/lib/google.d.ts +3 -1
  43. package/dist/lib/google.d.ts.map +1 -1
  44. package/dist/lib/google.js +12 -4
  45. package/dist/lib/google.js.map +1 -1
  46. package/dist/lib/kimi.d.ts +3 -1
  47. package/dist/lib/kimi.d.ts.map +1 -1
  48. package/dist/lib/kimi.js +4 -4
  49. package/dist/lib/kimi.js.map +1 -1
  50. package/dist/lib/nanogpt.d.ts +3 -1
  51. package/dist/lib/nanogpt.d.ts.map +1 -1
  52. package/dist/lib/nanogpt.js +7 -7
  53. package/dist/lib/nanogpt.js.map +1 -1
  54. package/dist/lib/openai.d.ts +3 -1
  55. package/dist/lib/openai.d.ts.map +1 -1
  56. package/dist/lib/openai.js +2 -2
  57. package/dist/lib/openai.js.map +1 -1
  58. package/dist/lib/opencode-go.d.ts +3 -1
  59. package/dist/lib/opencode-go.d.ts.map +1 -1
  60. package/dist/lib/opencode-go.js +2 -2
  61. package/dist/lib/opencode-go.js.map +1 -1
  62. package/dist/lib/provider-metadata.d.ts +3 -3
  63. package/dist/lib/provider-metadata.d.ts.map +1 -1
  64. package/dist/lib/provider-metadata.js +10 -0
  65. package/dist/lib/provider-metadata.js.map +1 -1
  66. package/dist/lib/quota-render-data.d.ts +4 -0
  67. package/dist/lib/quota-render-data.d.ts.map +1 -1
  68. package/dist/lib/quota-render-data.js +5 -1
  69. package/dist/lib/quota-render-data.js.map +1 -1
  70. package/dist/lib/quota-status.d.ts.map +1 -1
  71. package/dist/lib/quota-status.js +17 -0
  72. package/dist/lib/quota-status.js.map +1 -1
  73. package/dist/lib/synthetic.d.ts +3 -1
  74. package/dist/lib/synthetic.d.ts.map +1 -1
  75. package/dist/lib/synthetic.js +2 -2
  76. package/dist/lib/synthetic.js.map +1 -1
  77. package/dist/lib/tui-runtime.d.ts.map +1 -1
  78. package/dist/lib/tui-runtime.js +1 -0
  79. package/dist/lib/tui-runtime.js.map +1 -1
  80. package/dist/lib/types.d.ts +11 -2
  81. package/dist/lib/types.d.ts.map +1 -1
  82. package/dist/lib/types.js +3 -2
  83. package/dist/lib/types.js.map +1 -1
  84. package/dist/lib/zai.d.ts +3 -1
  85. package/dist/lib/zai.d.ts.map +1 -1
  86. package/dist/lib/zai.js +2 -2
  87. package/dist/lib/zai.js.map +1 -1
  88. package/dist/plugin.d.ts.map +1 -1
  89. package/dist/plugin.js +8 -2
  90. package/dist/plugin.js.map +1 -1
  91. package/dist/providers/anthropic.d.ts.map +1 -1
  92. package/dist/providers/anthropic.js +1 -0
  93. package/dist/providers/anthropic.js.map +1 -1
  94. package/dist/providers/chutes.js +2 -2
  95. package/dist/providers/chutes.js.map +1 -1
  96. package/dist/providers/copilot.d.ts.map +1 -1
  97. package/dist/providers/copilot.js +13 -4
  98. package/dist/providers/copilot.js.map +1 -1
  99. package/dist/providers/crof.d.ts +6 -0
  100. package/dist/providers/crof.d.ts.map +1 -0
  101. package/dist/providers/crof.js +57 -0
  102. package/dist/providers/crof.js.map +1 -0
  103. package/dist/providers/google-antigravity.d.ts.map +1 -1
  104. package/dist/providers/google-antigravity.js +3 -1
  105. package/dist/providers/google-antigravity.js.map +1 -1
  106. package/dist/providers/google-gemini-cli.d.ts.map +1 -1
  107. package/dist/providers/google-gemini-cli.js +5 -1
  108. package/dist/providers/google-gemini-cli.js.map +1 -1
  109. package/dist/providers/kimi-code.js +1 -1
  110. package/dist/providers/kimi-code.js.map +1 -1
  111. package/dist/providers/minimax-coding-plan.d.ts +3 -1
  112. package/dist/providers/minimax-coding-plan.d.ts.map +1 -1
  113. package/dist/providers/minimax-coding-plan.js +6 -4
  114. package/dist/providers/minimax-coding-plan.js.map +1 -1
  115. package/dist/providers/nanogpt.js +1 -1
  116. package/dist/providers/nanogpt.js.map +1 -1
  117. package/dist/providers/openai.js +2 -2
  118. package/dist/providers/openai.js.map +1 -1
  119. package/dist/providers/opencode-go.d.ts.map +1 -1
  120. package/dist/providers/opencode-go.js +7 -3
  121. package/dist/providers/opencode-go.js.map +1 -1
  122. package/dist/providers/registry.d.ts.map +1 -1
  123. package/dist/providers/registry.js +2 -0
  124. package/dist/providers/registry.js.map +1 -1
  125. package/dist/providers/synthetic.js +1 -1
  126. package/dist/providers/synthetic.js.map +1 -1
  127. package/dist/providers/zai.js +1 -1
  128. package/dist/providers/zai.js.map +1 -1
  129. package/package.json +1 -1
package/README.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  ---
21
21
 
22
- ### Installation (automatic setup)
22
+ ### Quick start
23
23
 
24
24
  ```bash
25
25
  npx @slkiser/opencode-quota init
@@ -28,24 +28,28 @@ npx @slkiser/opencode-quota init
28
28
  > [!IMPORTANT]
29
29
  > OpenCode `>= 1.4.3` and Node.js `>= 18` are required.
30
30
 
31
- The installer is append-only and preserves existing config values. It asks where to install, which quota UI to enable, whether providers should be auto-detected, which quota display style to use, how percentages should be labeled, and whether session input/output tokens should appear in quota displays. By default it writes quota settings to `opencode-quota/quota-toast.json` only; if you also need the legacy OpenCode `experimental.quotaToast` block, run `npx @slkiser/opencode-quota init --sync-legacy-config`.
31
+ The installer is append-only: it adds the plugin, asks a few display/provider questions, and leaves existing values alone.
32
32
 
33
33
  After install:
34
34
 
35
35
  1. Restart OpenCode.
36
- 2. Run `/quota_status`.
37
- 3. Run `/quota`.
38
- 4. If you enabled the sidebar, open the session sidebar and confirm the `Quota` panel appears.
36
+ 2. Run `/quota`.
37
+ 3. If something looks wrong, run `/quota_status`.
38
+ 4. If you enabled the sidebar, open the session sidebar and look for the `Quota` panel.
39
39
 
40
- For a terminal-only quota glance:
40
+ Terminal-only check:
41
+
42
+ Use `npx` when you want to run the published package without installing the binary first:
41
43
 
42
44
  ```bash
43
45
  npx @slkiser/opencode-quota show
44
- # or, if installed/on PATH:
45
- opencode-quota show --provider copilot
46
46
  ```
47
47
 
48
- `show` is quota-only: no token/cost reports or `models.dev` refresh. Installer `None (commands and terminal only)` disables toast/sidebar but keeps `/quota`, `/tokens_*`, and terminal `show`.
48
+ Use `opencode-quota` directly when the package binary is already installed or on your `PATH`. Add `--provider` to show only one provider:
49
+
50
+ ```bash
51
+ opencode-quota show --provider copilot
52
+ ```
49
53
 
50
54
  ### Manual setup
51
55
 
@@ -67,9 +71,68 @@ If you also want the sidebar, add the same package to the `tui.json` or `tui.jso
67
71
  }
68
72
  ```
69
73
 
70
- Quota settings live in `opencode-quota/quota-toast.json` next to the OpenCode config file chosen by the installer (project or global). On load, OpenCode Quota reads that sidecar first and falls back to existing `experimental.quotaToast` settings in `opencode.json` / `opencode.jsonc` only when the sidecar is absent. Normal runtime/load does not create, re-add, or migrate `experimental.quotaToast`; use `init --sync-legacy-config` when you explicitly want the installer to also write/sync that legacy block. Quota settings do not live in `tui.json`.
74
+ Quota settings go in `opencode-quota/quota-toast.json` next to the OpenCode config file you chose during install. Existing `experimental.quotaToast` settings still work when no sidecar file exists. Quota settings do not live in `tui.json`.
75
+
76
+ <details>
77
+ <summary><strong>Full configuration reference</strong></summary>
78
+
79
+ #### Core/shared settings
80
+
81
+ | Option | Default | Meaning |
82
+ | ----------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
83
+ | `enabled` | `true` | Master switch for quota collection and handled slash commands. When `false`, `/quota`, `/quota_status`, `/pricing_refresh`, and `/tokens_*` are handled as no-ops. |
84
+ | `enabledProviders` | `"auto"` | Auto-detect providers, or set an explicit provider list. Unknown provider ids are reported under `config_errors` in `/quota_status`; an explicit list with no valid providers resolves to none instead of falling back to auto-detect. |
85
+ | `minIntervalMs` | `300000` | Minimum fetch interval between provider updates. |
86
+ | `requestTimeoutMs` | `5000` | Remote provider request timeout in milliseconds. Providers with custom defaults, such as Gemini CLI and OpenCode Go, keep their provider default unless this is explicitly configured. |
87
+ | `formatStyle` | `singleWindow` | Shared quota-row style for popup toasts and the TUI sidebar: `singleWindow` or `allWindows`. Legacy `classic`/`grouped` aliases still work, and legacy `toastStyle` is still accepted on read for backward compatibility. |
88
+ | `percentDisplayMode` | `remaining` | Shared percent meaning for popup toasts and the TUI sidebar: `remaining` renders labels like `81% left`; `used` renders labels like `19% used` or `125% used` when over quota. |
89
+ | `onlyCurrentModel` | `false` | Filter quota rows to the current model/provider when that session selection can be resolved. |
90
+ | `showSessionTokens` | `true` | Show the `Session input/output tokens` section in quota displays when session token data is available. |
91
+ | `pricingSnapshot.source` | `"auto"` | Token pricing snapshot selection for `/tokens_*`: `auto`, `bundled`, or `runtime`. |
92
+ | `pricingSnapshot.autoRefresh` | `7` | Refresh stale local pricing data after this many days. |
93
+
94
+ `percentDisplayMode` affects popup toasts and the TUI sidebar only. `/quota` keeps its existing remaining-oriented percentage output.
95
+
96
+ #### Toast settings
97
+
98
+ | Option | Default | Meaning |
99
+ | ----------------- | ------- | ------------------------------------------------------------------------------- |
100
+ | `enableToast` | `true` | Show popup toasts. Disabling this does not disable `/quota` or the TUI sidebar. |
101
+ | `toastDurationMs` | `9000` | Toast duration in milliseconds. |
102
+ | `showOnIdle` | `true` | Show a toast on the idle trigger. |
103
+ | `showOnQuestion` | `true` | Show a toast after a question/assistant response. |
104
+ | `showOnCompact` | `true` | Show a toast after session compaction. |
105
+ | `showOnBothFail` | `true` | Show a fallback toast when providers attempted quota reads and all failed. |
106
+ | `layout.maxWidth` | `50` | Toast formatting width target. Ignored by the TUI sidebar. |
107
+ | `layout.narrowAt` | `42` | Toast compact-layout breakpoint. Ignored by the TUI sidebar. |
108
+ | `layout.tinyAt` | `32` | Toast tiny-layout breakpoint. Ignored by the TUI sidebar. |
109
+ | `debug` | `false` | Append toast debug context when troubleshooting. |
110
+
111
+ #### TUI sidebar setup
112
+
113
+ If you want the `Quota` sidebar panel, you need the plugin in both OpenCode config surfaces:
114
+
115
+ | File | What goes there | Needed for sidebar? |
116
+ | ---------------------------------- | ------------------------------------- | ------------------------------- |
117
+ | `tui.json` / `tui.jsonc` | `plugin: ["@slkiser/opencode-quota"]` | Yes |
118
+ | `opencode.json` / `opencode.jsonc` | Server plugin entry | Yes |
119
+ | `opencode-quota/quota-toast.json` | Quota settings | No, but controls quota behavior |
120
+
121
+ #### Provider-specific settings
122
+
123
+ | Option | Default | Meaning |
124
+ | ---------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------- |
125
+ | `anthropicBinaryPath` | `"claude"` | Command/path used for local Claude CLI probing; override this for custom installs or shim locations. |
126
+ | `googleModels` | `["CLAUDE"]` | Google model keys to query: `CLAUDE`, `G3PRO`, `G3FLASH`, `G3IMAGE`. |
127
+ | `opencodeGoWindows` | `["rolling", "weekly", "monthly"]` | OpenCode Go usage windows to display. |
128
+ | `alibabaCodingPlanTier` | `"lite"` | Fallback Alibaba Coding Plan tier when auth does not include `tier`. |
129
+ | `cursorPlan` | `"none"` | Cursor included API budget preset: `none`, `pro`, `pro-plus`, `ultra`. |
130
+ | `cursorIncludedApiUsd` | unset | Override Cursor monthly included API budget in USD. |
131
+ | `cursorBillingCycleStartDay` | unset | Local billing-cycle anchor day `1..28`; when unset, Cursor usage resets on the local calendar month. |
132
+
133
+ </details>
71
134
 
72
- ### What plugin adds
135
+ ### What opencode-quota adds
73
136
 
74
137
  - TUI sidebar panel with quota rows
75
138
  - Popup quota toasts after assistant responses
@@ -95,73 +158,115 @@ Quota settings live in `opencode-quota/quota-toast.json` next to the OpenCode co
95
158
 
96
159
  ### Providers
97
160
 
98
- | Provider | Auto setup? | Setup / plugin order | Quota source |
99
- | ----------------------- | ------------------ | --------------------------------------------------------- | ------------------------ |
100
- | Anthropic (Claude) | [Needs quick setup](#anthropic-claude-quick-setup) | Install and authenticate Claude CLI | Local CLI or OAuth usage |
101
- | GitHub Copilot | Usually automatic | Existing OpenCode auth, or optional PAT config | Remote API |
102
- | OpenAI | Automatic | Existing OpenCode auth | Remote API |
103
- | Cursor | [Needs quick setup](#cursor-quick-setup) | `["@playwo/opencode-cursor-oauth", "@slkiser/opencode-quota"]` | Local estimation |
104
- | Qwen Code | [Needs quick setup](#qwen-code-quick-setup) | `["opencode-qwencode-auth", "@slkiser/opencode-quota"]` | Local estimation |
105
- | Alibaba Coding Plan | Automatic | Existing OpenCode auth, global config, or env | Local estimation |
106
- | MiniMax Coding Plan | Automatic | Existing OpenCode auth, global config, or env | Remote API |
107
- | Kimi Code | Automatic | Existing OpenCode auth, global config, or env | Remote API |
108
- | Chutes AI | Usually automatic | Existing OpenCode auth, global config, or env | Remote API |
109
- | Synthetic | Automatic | Existing OpenCode auth, global config, or env | Remote API |
110
- | Google Antigravity | [Needs quick setup](#google-antigravity-quick-setup) | `["opencode-antigravity-auth", "@slkiser/opencode-quota"]` | Remote API |
111
- | Gemini CLI | [Needs quick setup](#gemini-cli-quick-setup) | `["opencode-gemini-auth", "@slkiser/opencode-quota"]` | Remote API |
112
- | Z.ai Coding Plan | Automatic | Existing OpenCode auth, global config, or env | Remote API |
113
- | NanoGPT | Usually automatic | Existing OpenCode auth, global config, or env | Remote API |
114
- | OpenCode Go | [Needs quick setup](#opencode-go-quick-setup) | Set workspace ID and `auth` cookie | Dashboard scraping |
115
-
116
- For companion auth providers, put the companion plugin first and `@slkiser/opencode-quota` second. The companion plugin handles login or token storage; OpenCode Quota reads that auth state and renders quota.
117
-
118
- Providers are auto-detected by default. To choose providers explicitly:
161
+ | Provider | Auto setup? | Setup / plugin order | Quota source |
162
+ | ------------------- | ---------------------------------------------------- | -------------------------------------------------------------- | ------------------------ |
163
+ | Anthropic (Claude) | [Needs quick setup](#anthropic-claude-quick-setup) | Install and authenticate Claude CLI | Local CLI or OAuth usage |
164
+ | GitHub Copilot | Usually automatic | Existing OpenCode auth, or optional PAT config | Remote API |
165
+ | OpenAI | Automatic | Existing OpenCode OAuth | Remote API |
166
+ | Cursor | [Needs quick setup](#cursor-quick-setup) | `["@playwo/opencode-cursor-oauth", "@slkiser/opencode-quota"]` | Local estimation |
167
+ | Qwen Code | [Needs quick setup](#qwen-code-quick-setup) | `["opencode-qwencode-auth", "@slkiser/opencode-quota"]` | Local estimation |
168
+ | Alibaba Coding Plan | Automatic | Existing OpenCode auth, global config, or env | Local estimation |
169
+ | MiniMax Coding Plan | Automatic | Existing OpenCode auth, global config, or env | Remote API |
170
+ | Kimi Code | Automatic | Existing OpenCode auth, global config, or env | Remote API |
171
+ | Chutes AI | Usually automatic | Existing OpenCode auth, global config, or env | Remote API |
172
+ | Crof.ai | Manual env/config | `CROF_API_KEY` or trusted user/global config | Remote API |
173
+ | Synthetic | Automatic | Existing OpenCode auth, global config, or env | Remote API |
174
+ | Google Antigravity | [Needs quick setup](#google-antigravity-quick-setup) | `["opencode-antigravity-auth", "@slkiser/opencode-quota"]` | Remote API |
175
+ | Gemini CLI | [Needs quick setup](#gemini-cli-quick-setup) | `["opencode-gemini-auth", "@slkiser/opencode-quota"]` | Remote API |
176
+ | Z.ai Coding Plan | Automatic | Existing OpenCode auth, global config, or env | Remote API |
177
+ | NanoGPT | Usually automatic | Existing OpenCode auth, global config, or env | Remote API |
178
+ | OpenCode Go | [Needs quick setup](#opencode-go-quick-setup) | Set workspace ID and `auth` cookie | Dashboard scraping |
179
+
180
+ Providers are auto-detected by default. To choose providers explicitly, set `enabledProviders` in `opencode-quota/quota-toast.json`:
119
181
 
120
182
  ```jsonc
121
- // opencode-quota/quota-toast.json
122
183
  {
123
184
  "enabledProviders": ["copilot", "openai", "google-gemini-cli"],
124
185
  }
125
186
  ```
126
187
 
127
- ### Display options
188
+ ### Common Options
128
189
 
129
- Show every quota window instead of the default most-constrained window:
190
+ Customize these settings in `opencode-quota/quota-toast.json`.
191
+
192
+ <details>
193
+ <summary><strong>Show every quota window</strong></summary>
194
+
195
+ Instead of the default most-constrained window:
130
196
 
131
197
  ```jsonc
132
- // opencode-quota/quota-toast.json
133
198
  {
134
199
  "formatStyle": "allWindows",
135
200
  }
136
201
  ```
137
202
 
138
- Choose which OpenCode Go usage windows to display (default is all three; `rolling` displays as `5h`):
203
+ </details>
204
+
205
+ <details>
206
+ <summary><strong>Choose OpenCode Go windows</strong></summary>
207
+
208
+ Choose which OpenCode Go windows to display:
139
209
 
140
210
  ```jsonc
141
- // opencode-quota/quota-toast.json
142
211
  {
143
212
  "opencodeGoWindows": ["rolling", "weekly", "monthly"],
144
213
  }
145
214
  ```
146
215
 
216
+ </details>
217
+
218
+ <details>
219
+ <summary><strong>Show used percentages</strong></summary>
220
+
147
221
  Show percentages as used instead of remaining in toasts and the sidebar:
148
222
 
149
223
  ```jsonc
150
- // opencode-quota/quota-toast.json
151
224
  {
152
225
  "percentDisplayMode": "used",
153
226
  }
154
227
  ```
155
228
 
156
- Turn off popup toasts while keeping `/quota` and the sidebar:
229
+ </details>
230
+
231
+ <details>
232
+ <summary><strong>Turn off popup toasts</strong></summary>
233
+
234
+ Keep `/quota` and the sidebar enabled:
157
235
 
158
236
  ```jsonc
159
- // opencode-quota/quota-toast.json
160
237
  {
161
238
  "enableToast": false,
162
239
  }
163
240
  ```
164
241
 
242
+ </details>
243
+
244
+ <details>
245
+ <summary><strong>Increase request timeout</strong></summary>
246
+
247
+ Increase the remote provider request timeout from the default 5000ms. Providers with custom defaults, such as Gemini CLI and OpenCode Go, keep their provider default unless you set this.
248
+
249
+ ```jsonc
250
+ {
251
+ "requestTimeoutMs": 12000,
252
+ }
253
+ ```
254
+
255
+ </details>
256
+
257
+ <details>
258
+ <summary><strong>Advanced: legacy config sync</strong></summary>
259
+
260
+ By default, the installer writes quota settings only to `opencode-quota/quota-toast.json`. If you also want it to write the legacy OpenCode block, run:
261
+
262
+ ```bash
263
+ npx @slkiser/opencode-quota init --sync-legacy-config
264
+ ```
265
+
266
+ This is only for users who intentionally want `experimental.quotaToast` mirrored into `opencode.json` / `opencode.jsonc`.
267
+
268
+ </details>
269
+
165
270
  ### Commands
166
271
 
167
272
  | Command | What it shows |
@@ -183,7 +288,7 @@ Turn off popup toasts while keeping `/quota` and the sidebar:
183
288
 
184
289
  ### Anthropic quick setup
185
290
 
186
- Anthropic does not use a companion OpenCode plugin. Install Claude Code, authenticate it, and make sure `claude` is available on your `PATH`:
291
+ Install Claude Code, authenticate it, and make sure `claude` is on your `PATH`:
187
292
 
188
293
  ```bash
189
294
  claude auth login
@@ -194,7 +299,7 @@ If Claude lives at a custom path, set `anthropicBinaryPath` in `opencode-quota/q
194
299
 
195
300
  ### Companion providers
196
301
 
197
- Some providers need an auth companion plugin installed separately. Add the companion plugin first and `@slkiser/opencode-quota` second in `opencode.json` or `opencode.jsonc`.
302
+ Some providers need an auth companion plugin. Add the companion plugin first and `@slkiser/opencode-quota` second.
198
303
 
199
304
  <a id="cursor-quick-setup"></a>
200
305
 
@@ -210,9 +315,9 @@ Add both plugins to `opencode.json`, with the Cursor auth plugin first:
210
315
  "plugin": ["@playwo/opencode-cursor-oauth", "@slkiser/opencode-quota"],
211
316
  "provider": {
212
317
  "cursor": {
213
- "name": "Cursor"
214
- }
215
- }
318
+ "name": "Cursor",
319
+ },
320
+ },
216
321
  }
217
322
  ```
218
323
 
@@ -233,7 +338,7 @@ Add both plugins to `opencode.json`, with the Qwen auth plugin first:
233
338
  ```jsonc
234
339
  {
235
340
  "$schema": "https://opencode.ai/config.json",
236
- "plugin": ["opencode-qwencode-auth", "@slkiser/opencode-quota"]
341
+ "plugin": ["opencode-qwencode-auth", "@slkiser/opencode-quota"],
237
342
  }
238
343
  ```
239
344
 
@@ -248,7 +353,7 @@ Add both plugins to `opencode.json`, with the Antigravity auth plugin first:
248
353
  ```jsonc
249
354
  {
250
355
  "$schema": "https://opencode.ai/config.json",
251
- "plugin": ["opencode-antigravity-auth", "@slkiser/opencode-quota"]
356
+ "plugin": ["opencode-antigravity-auth", "@slkiser/opencode-quota"],
252
357
  }
253
358
  ```
254
359
 
@@ -258,20 +363,12 @@ Add both plugins to `opencode.json`, with the Antigravity auth plugin first:
258
363
 
259
364
  Companion plugin: [`opencode-gemini-auth`](https://github.com/jenslys/opencode-gemini-auth#readme)
260
365
 
261
- Add both plugins to `opencode.json`, with the Gemini auth plugin first. If you manually choose providers, include `google-gemini-cli` in `opencode-quota/quota-toast.json`:
366
+ Add both plugins to `opencode.json`, with the Gemini auth plugin first:
262
367
 
263
368
  ```jsonc
264
- // opencode.json
265
369
  {
266
370
  "$schema": "https://opencode.ai/config.json",
267
- "plugin": ["opencode-gemini-auth", "@slkiser/opencode-quota"]
268
- }
269
- ```
270
-
271
- ```jsonc
272
- // opencode-quota/quota-toast.json
273
- {
274
- "enabledProviders": ["google-gemini-cli"]
371
+ "plugin": ["opencode-gemini-auth", "@slkiser/opencode-quota"],
275
372
  }
276
373
  ```
277
374
 
@@ -281,6 +378,8 @@ Then authenticate Google once:
281
378
  opencode auth login --provider google
282
379
  ```
283
380
 
381
+ If you use manual provider selection, include `google-gemini-cli` in `enabledProviders`.
382
+
284
383
  ### OpenCode Go
285
384
 
286
385
  <a id="opencode-go-quick-setup"></a>
@@ -292,9 +391,9 @@ export OPENCODE_GO_WORKSPACE_ID="your-workspace-id"
292
391
  export OPENCODE_GO_AUTH_COOKIE="your-auth-cookie"
293
392
  ```
294
393
 
295
- The provider can report three usage windows — **5h** rolling, **Weekly**, and **Monthly** — and emits whichever dashboard windows are available in that order. Filter displayed windows with `opencodeGoWindows` in `opencode-quota/quota-toast.json` (`rolling`, `weekly`, `monthly`); non-default subsets report missing selected dashboard fields, while default/all-windows mode shows available windows and diagnostics indicate what was found.
394
+ OpenCode Go can show **5h**, **Weekly**, and **Monthly** windows. Use `opencodeGoWindows` in `opencode-quota/quota-toast.json` to choose a subset.
296
395
 
297
- Environment variables take precedence over the optional `opencode-go.json` config file. Run `/quota_status` to see the exact paths checked on your machine.
396
+ Environment variables take precedence over the optional `opencode-go.json` file. Run `/quota_status` to see the exact paths checked.
298
397
 
299
398
  ### Troubleshooting
300
399
 
@@ -308,18 +407,20 @@ If quota or token data looks wrong:
308
407
 
309
408
  ### Provider Troubleshooting
310
409
 
410
+ For companion providers, confirm the auth plugin appears before `@slkiser/opencode-quota` in `opencode.json`.
411
+
311
412
  <details>
312
413
  <summary><strong>Anthropic (Claude)</strong></summary>
313
414
 
314
415
  Run `/quota_status` and check the Anthropic section.
315
416
 
316
- | Symptom | Fix |
317
- | --- | --- |
318
- | `claude` not found | Install Claude Code and make sure `claude` is on your `PATH`. |
319
- | Claude is installed at a custom path | Set `anthropicBinaryPath` in `opencode-quota/quota-toast.json`. |
320
- | Not authenticated | Run `claude auth login`, then confirm `claude auth status` works. |
321
- | Auth works but no quota rows appear | Check `quota_source` and `message` in `/quota_status`; re-authenticate Claude if the OAuth credential fallback is missing or stale. |
322
- | Provider not detected | Confirm OpenCode is configured to use the `anthropic` provider. |
417
+ | Symptom | Fix |
418
+ | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
419
+ | `claude` not found | Install Claude Code and make sure `claude` is on your `PATH`. |
420
+ | Claude is installed at a custom path | Set `anthropicBinaryPath` in `opencode-quota/quota-toast.json`. |
421
+ | Not authenticated | Run `claude auth login`, then confirm `claude auth status` works. |
422
+ | Auth works but no quota rows appear | Check `quota_source` and `message` in `/quota_status`; re-authenticate Claude if the OAuth credential fallback is missing or stale. |
423
+ | Provider not detected | Confirm OpenCode is configured to use the `anthropic` provider. |
323
424
 
324
425
  </details>
325
426
 
@@ -328,14 +429,12 @@ Run `/quota_status` and check the Anthropic section.
328
429
 
329
430
  Run `/quota_status` and check `copilot_quota_auth`, `billing_mode`, `billing_scope`, and `quota_api`.
330
431
 
331
- For personal Copilot OAuth quota, the plugin uses GitHub's reported premium-interaction quota fields when available. If that specific quota payload marks premium interactions as unlimited, quota output renders `Unlimited` instead of a synthetic used/total ratio.
332
-
333
- | Symptom | Fix |
334
- | --- | --- |
335
- | Personal quota missing | Confirm OpenCode Copilot auth works. The plugin can read OpenCode's Copilot OAuth token. |
336
- | Business or Enterprise quota missing | Add `copilot-quota-token.json` in the OpenCode runtime config directory shown by `opencode debug paths`. |
337
- | PAT config exists but quota fails | Fix `copilot-quota-token.json`; when present, it takes precedence over OAuth and does not silently fall back. |
338
- | Enterprise usage missing | Use a classic PAT with the required billing access. Fine-grained PATs and GitHub App tokens are not supported for Enterprise premium usage. |
432
+ | Symptom | Fix |
433
+ | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
434
+ | Personal quota missing | Confirm OpenCode Copilot auth works. The plugin can read OpenCode's Copilot OAuth token. |
435
+ | Business or Enterprise quota missing | Add `copilot-quota-token.json` in the OpenCode runtime config directory shown by `opencode debug paths`. |
436
+ | PAT config exists but quota fails | Fix `copilot-quota-token.json`; when present, it takes precedence over OAuth and does not silently fall back. |
437
+ | Enterprise usage missing | Use a classic PAT with the required billing access. Fine-grained PATs and GitHub App tokens are not supported for Enterprise premium usage. |
339
438
 
340
439
  </details>
341
440
 
@@ -344,10 +443,10 @@ For personal Copilot OAuth quota, the plugin uses GitHub's reported premium-inte
344
443
 
345
444
  Run `/quota_status` and check the OpenAI auth source and token status.
346
445
 
347
- | Symptom | Fix |
348
- | --- | --- |
349
- | OpenAI quota missing | Confirm OpenCode native OpenAI auth is present in `auth.json`. |
350
- | Token expired | Re-run OpenCode's OpenAI auth flow. |
446
+ | Symptom | Fix |
447
+ | --------------------- | ------------------------------------------------------------------------------------------ |
448
+ | OpenAI quota missing | Confirm OpenCode native OpenAI OAuth is present in `auth.json`. |
449
+ | Token expired | Re-run OpenCode's OpenAI auth flow. |
351
450
  | Provider not detected | Confirm your OpenCode config uses the `openai` provider or a compatible OpenAI auth entry. |
352
451
 
353
452
  </details>
@@ -357,13 +456,13 @@ Run `/quota_status` and check the OpenAI auth source and token status.
357
456
 
358
457
  Run `/quota_status` and check the Cursor section.
359
458
 
360
- | Symptom | Fix |
361
- | --- | --- |
362
- | Cursor not detected | Put `@playwo/opencode-cursor-oauth` before `@slkiser/opencode-quota` in `opencode.json`. |
363
- | Cursor auth missing | Run `opencode auth login --provider cursor`. |
364
- | Quota appears but no remaining percentage | Set `cursorPlan` or `cursorIncludedApiUsd` in `opencode-quota/quota-toast.json`. |
365
- | Billing cycle looks wrong | Set `cursorBillingCycleStartDay` in `opencode-quota/quota-toast.json` to your local billing anchor day. |
366
- | Unknown Cursor pricing | Run `/pricing_refresh`; if still unknown, check `/quota_status` for unknown model ids. |
459
+ | Symptom | Fix |
460
+ | ----------------------------------------- | ------------------------------------------------------------------------------------------------------- |
461
+ | Cursor not detected | Put `@playwo/opencode-cursor-oauth` before `@slkiser/opencode-quota` in `opencode.json`. |
462
+ | Cursor auth missing | Run `opencode auth login --provider cursor`. |
463
+ | Quota appears but no remaining percentage | Set `cursorPlan` or `cursorIncludedApiUsd` in `opencode-quota/quota-toast.json`. |
464
+ | Billing cycle looks wrong | Set `cursorBillingCycleStartDay` in `opencode-quota/quota-toast.json` to your local billing anchor day. |
465
+ | Unknown Cursor pricing | Run `/pricing_refresh`; if still unknown, check `/quota_status` for unknown model ids. |
367
466
 
368
467
  </details>
369
468
 
@@ -372,12 +471,12 @@ Run `/quota_status` and check the Cursor section.
372
471
 
373
472
  Run `/quota_status` and check `qwen_oauth_source`, `qwen_local_plan`, and the `qwen_code` live probe section.
374
473
 
375
- | Symptom | Fix |
376
- | --- | --- |
377
- | Qwen not detected | Put `opencode-qwencode-auth` before `@slkiser/opencode-quota` in `opencode.json`. |
378
- | Auth missing | Complete the Qwen companion plugin auth flow. |
474
+ | Symptom | Fix |
475
+ | -------------------- | ------------------------------------------------------------------------------------------------------------ |
476
+ | Qwen not detected | Put `opencode-qwencode-auth` before `@slkiser/opencode-quota` in `opencode.json`. |
477
+ | Auth missing | Complete the Qwen companion plugin auth flow. |
379
478
  | Counters do not move | Confirm the current model is `qwen-code/*`; Qwen quota is local request estimation for matching model usage. |
380
- | Usage looks stale | Check the local state file path shown by `/quota_status`. |
479
+ | Usage looks stale | Check the local state file path shown by `/quota_status`. |
381
480
 
382
481
  </details>
383
482
 
@@ -386,28 +485,29 @@ Run `/quota_status` and check `qwen_oauth_source`, `qwen_local_plan`, and the `q
386
485
 
387
486
  Run `/quota_status` and check the Alibaba auth, resolved tier, state-file path, and `alibaba_coding_plan` live probe section.
388
487
 
389
- | Symptom | Fix |
390
- | --- | --- |
488
+ | Symptom | Fix |
489
+ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
391
490
  | API key not detected | Use `ALIBABA_CODING_PLAN_API_KEY`, `ALIBABA_API_KEY`, trusted user/global OpenCode config, or OpenCode auth. Repo-local provider secrets are ignored. |
392
- | Wrong tier | Set `alibabaCodingPlanTier` to `lite` or `pro` in `opencode-quota/quota-toast.json`. |
393
- | Counters do not move | Confirm the current model is `alibaba/*` or `alibaba-cn/*`. |
394
- | Quota seems stale | Check the state-file path shown in `/quota_status`. |
491
+ | Wrong tier | Set `alibabaCodingPlanTier` to `lite` or `pro` in `opencode-quota/quota-toast.json`. |
492
+ | Counters do not move | Confirm the current model is `alibaba/*` or `alibaba-cn/*`. |
493
+ | Quota seems stale | Check the state-file path shown in `/quota_status`. |
395
494
 
396
495
  </details>
397
496
 
398
497
  <details>
399
- <summary><strong>MiniMax, Kimi, Chutes AI, Synthetic, Z.ai, and NanoGPT</strong></summary>
498
+ <summary><strong>MiniMax, Kimi, Chutes AI, Crof.ai, Synthetic, Z.ai, and NanoGPT</strong></summary>
400
499
 
401
- These providers use trusted env vars, trusted user/global OpenCode config, or native OpenCode auth. Run `/quota_status` and check the provider-specific API-key diagnostics.
500
+ These providers use trusted env vars, trusted user/global OpenCode config, or native OpenCode auth. Run `/quota_status` and check the provider-specific API-key diagnostics (Crof.ai is env/config only).
402
501
 
403
- | Provider | Useful checks |
404
- | --- | --- |
405
- | MiniMax Coding Plan | Use `MINIMAX_CODING_PLAN_API_KEY` or `MINIMAX_API_KEY`; repo-local provider secrets are ignored. |
406
- | Kimi Code | Use `KIMI_API_KEY` or `KIMI_CODE_API_KEY`; repo-local provider secrets are ignored. |
407
- | Chutes AI | Use `CHUTES_API_KEY` or trusted user/global config. |
408
- | Synthetic | Use `SYNTHETIC_API_KEY`, trusted user/global config, or OpenCode auth. |
409
- | Z.ai Coding Plan | Use `ZAI_API_KEY` or `ZAI_CODING_PLAN_API_KEY`; malformed fallback auth is surfaced as an auth error. |
410
- | NanoGPT | Use `NANOGPT_API_KEY`, `NANO_GPT_API_KEY`, trusted user/global config, or OpenCode auth. |
502
+ | Provider | Useful checks |
503
+ | ------------------- | ----------------------------------------------------------------------------------------------------- |
504
+ | MiniMax Coding Plan | Use `MINIMAX_CODING_PLAN_API_KEY` or `MINIMAX_API_KEY`; repo-local provider secrets are ignored. |
505
+ | Kimi Code | Use `KIMI_API_KEY` or `KIMI_CODE_API_KEY`; repo-local provider secrets are ignored. |
506
+ | Chutes AI | Use `CHUTES_API_KEY` or trusted user/global config. |
507
+ | Crof.ai | Use `CROF_API_KEY` or trusted user/global config. |
508
+ | Synthetic | Use `SYNTHETIC_API_KEY`, trusted user/global config, or OpenCode auth. |
509
+ | Z.ai Coding Plan | Use `ZAI_API_KEY` or `ZAI_CODING_PLAN_API_KEY`; malformed fallback auth is surfaced as an auth error. |
510
+ | NanoGPT | Use `NANOGPT_API_KEY`, `NANO_GPT_API_KEY`, trusted user/global config, or OpenCode auth. |
411
511
 
412
512
  For security, repo-local `opencode.json` / `opencode.jsonc` is ignored for provider secrets in these integrations. Put secrets in environment variables or trusted user/global config.
413
513
 
@@ -418,12 +518,12 @@ For security, repo-local `opencode.json` / `opencode.jsonc` is ignored for provi
418
518
 
419
519
  Run `/quota_status` and check the `google_antigravity` section.
420
520
 
421
- | Symptom | Fix |
422
- | --- | --- |
423
- | Companion missing | Put `opencode-antigravity-auth` before `@slkiser/opencode-quota` in `opencode.json`. |
424
- | Accounts not found | Check the selected `antigravity-accounts.json` path shown by `/quota_status`. |
425
- | Refresh tokens invalid | Re-authenticate with the companion plugin. |
426
- | Provider returns no rows | Check `live_probe`, `live_entry_*`, and `live_error_*` in `/quota_status`. |
521
+ | Symptom | Fix |
522
+ | ------------------------ | ------------------------------------------------------------------------------------ |
523
+ | Companion missing | Put `opencode-antigravity-auth` before `@slkiser/opencode-quota` in `opencode.json`. |
524
+ | Accounts not found | Check the selected `antigravity-accounts.json` path shown by `/quota_status`. |
525
+ | Refresh tokens invalid | Re-authenticate with the companion plugin. |
526
+ | Provider returns no rows | Check `live_probe`, `live_entry_*`, and `live_error_*` in `/quota_status`. |
427
527
 
428
528
  </details>
429
529
 
@@ -432,12 +532,12 @@ Run `/quota_status` and check the `google_antigravity` section.
432
532
 
433
533
  Run `/quota_status` and check the Gemini CLI live probe rows.
434
534
 
435
- | Symptom | Fix |
436
- | --- | --- |
437
- | Companion missing | Put `opencode-gemini-auth` before `@slkiser/opencode-quota` in `opencode.json`. |
438
- | Provider not enabled in manual mode | Include `google-gemini-cli` in `enabledProviders` in `opencode-quota/quota-toast.json`. |
439
- | Auth missing | Run `opencode auth login --provider google`. |
440
- | Project missing | Set `provider.google.options.projectId`, `OPENCODE_GEMINI_PROJECT_ID`, `GOOGLE_CLOUD_PROJECT`, or `GOOGLE_CLOUD_PROJECT_ID`. |
535
+ | Symptom | Fix |
536
+ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
537
+ | Companion missing | Put `opencode-gemini-auth` before `@slkiser/opencode-quota` in `opencode.json`. |
538
+ | Provider not enabled in manual mode | Include `google-gemini-cli` in `enabledProviders` in `opencode-quota/quota-toast.json`. |
539
+ | Auth missing | Run `opencode auth login --provider google`. |
540
+ | Project missing | Set `provider.google.options.projectId`, `OPENCODE_GEMINI_PROJECT_ID`, `GOOGLE_CLOUD_PROJECT`, or `GOOGLE_CLOUD_PROJECT_ID`. |
441
541
 
442
542
  </details>
443
543
 
@@ -446,13 +546,13 @@ Run `/quota_status` and check the Gemini CLI live probe rows.
446
546
 
447
547
  Run `/quota_status` and check the `opencode_go` section.
448
548
 
449
- | Symptom | Fix |
450
- | --- | --- |
451
- | Config not detected | Set both `OPENCODE_GO_WORKSPACE_ID` and `OPENCODE_GO_AUTH_COOKIE`, then rerun `/quota_status`. |
452
- | Incomplete config | `workspaceId` and `authCookie` must come from the same source. |
453
- | Scrape returns no data | Refresh the browser `auth` cookie from `opencode.ai`. |
454
- | Selected window missing | Check `/quota_status` for `selected_windows` and `live_fetch_error`; remove unavailable windows from `opencodeGoWindows` in `opencode-quota/quota-toast.json` or refresh the dashboard cookie. |
455
- | Dashboard format changed | This integration scrapes the dashboard, so it can break if the dashboard markup changes. |
549
+ | Symptom | Fix |
550
+ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
551
+ | Config not detected | Set both `OPENCODE_GO_WORKSPACE_ID` and `OPENCODE_GO_AUTH_COOKIE`, then rerun `/quota_status`. |
552
+ | Incomplete config | `workspaceId` and `authCookie` must come from the same source. |
553
+ | Scrape returns no data | Refresh the browser `auth` cookie from `opencode.ai`. |
554
+ | Selected window missing | Check `/quota_status` for `selected_windows` and `live_fetch_error`; remove unavailable windows from `opencodeGoWindows` in `opencode-quota/quota-toast.json` or refresh the dashboard cookie. |
555
+ | Dashboard format changed | This integration scrapes the dashboard, so it can break if the dashboard markup changes. |
456
556
 
457
557
  </details>
458
558
 
@@ -461,15 +561,19 @@ Run `/quota_status` and check the `opencode_go` section.
461
561
 
462
562
  Run `/quota_status` and check pricing snapshot health plus OpenCode database paths.
463
563
 
464
- | Symptom | Fix |
465
- | --- | --- |
466
- | `/tokens_*` is empty | Start OpenCode once so it creates `opencode.db`, then run a session with model usage. |
467
- | Pricing looks stale | Run `/pricing_refresh`. |
564
+ | Symptom | Fix |
565
+ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
566
+ | `/tokens_*` is empty | Start OpenCode once so it creates `opencode.db`, then run a session with model usage. |
567
+ | Pricing looks stale | Run `/pricing_refresh`. |
468
568
  | Runtime pricing does not change output | Check `pricingSnapshot.source` in `opencode-quota/quota-toast.json`; `bundled` keeps packaged pricing active. |
469
- | Cursor model has unknown pricing | Run `/pricing_refresh`; Cursor `auto` and `composer*` use bundled deterministic pricing. |
569
+ | Cursor model has unknown pricing | Run `/pricing_refresh`; Cursor `auto` and `composer*` use bundled deterministic pricing. |
470
570
 
471
571
  </details>
472
572
 
573
+ ### Issues
574
+
575
+ Please use the Bug report or Feature request templates when opening issues. Freeform issues, or bug/feature issues missing the required template sections, may be automatically commented on and closed.
576
+
473
577
  ### License
474
578
 
475
579
  MIT
@@ -53,6 +53,7 @@ export interface AnthropicDiagnostics {
53
53
  }
54
54
  export interface AnthropicProbeOptions {
55
55
  binaryPath?: string;
56
+ requestTimeoutMs?: number;
56
57
  }
57
58
  export type ClaudeCommandInvocation = {
58
59
  file: string;
@@ -1 +1 @@
1
- {"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../src/lib/anthropic.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqBH,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,oBAAoB,CAAC;IAChC,SAAS,EAAE,oBAAoB,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,SAAS,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KA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