Commit fd810dd
committed
feat(runtime): retire the Claude subscription OAuth provider
Maka could sign in with a Claude Pro/Max subscription and send inference
through it. Anthropic's Consumer Terms permit programmatic access to the
consumer Claude services only through an API key or explicit permission,
and this path had neither: it presented itself as Claude Code — borrowing
that client_id, its User-Agent, its beta header set and an `x-app: cli`
marker — to get requests accepted. The account carrying that risk is the
user's, not Maka's.
Remove the capability rather than gate it. `claude-subscription` keeps its
registry entry so a stored connection still decodes and renders, and is
marked `retired`, which is distinct from a provider that was never wired:
both have no Runtime adapter, but only one used to work.
Retirement is refused at each authority that could otherwise admit the
connection, so no single revert makes it sendable again:
- the auth contract hides every action, which is what makes the storage
layer refuse a model fetch or a connection test
- the readiness gate reports `provider_retired` before the send is
admitted, instead of letting it fail inside model construction
- the model catalog resolves every model to `provider_removed`, so the
pickers stop offering them
- the interactive-login allow list and the Host wire enum no longer name it
- `getAIModel` and `resolveModelRuntime` throw as the last backstop
Settings explains the state instead of pointing at a sign-in that no longer
exists, and stops offering "set as default" and "test connection" for a
connection that cannot perform either. Deleting the connection is what
clears the credential this machine still holds.
The impersonation code goes with it: the cloaked request builder, the
Claude token endpoint and its client identity, the cloaked model-fetch
headers, and the subscription usage/quota path that needed that same
identity to read.
`RUNTIME_HOST_COMPATIBILITY_EPOCH` moves to 23: the OAuth login provider
enum and the account-usage operation both changed.
Generated-by: Claude Code1 parent 32e3cbb commit fd810dd
73 files changed
Lines changed: 745 additions & 2346 deletions
File tree
- apps/desktop
- src
- main
- __tests__
- preload
- renderer
- locales
- settings
- stories/settings
- docs
- packages
- core/src
- __tests__
- runtime-host/src
- __tests__
- protocol
- server
- runtime
- src
- __tests__
- storage/src
- __tests__
- runtime-policy
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
74 | 90 | | |
75 | 91 | | |
76 | 92 | | |
| |||
Lines changed: 70 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
Lines changed: 12 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | 139 | | |
148 | 140 | | |
149 | 141 | | |
| |||
188 | 180 | | |
189 | 181 | | |
190 | 182 | | |
191 | | - | |
| 183 | + | |
192 | 184 | | |
193 | 185 | | |
194 | 186 | | |
195 | 187 | | |
196 | 188 | | |
197 | | - | |
| 189 | + | |
198 | 190 | | |
199 | | - | |
| 191 | + | |
200 | 192 | | |
201 | 193 | | |
202 | 194 | | |
203 | | - | |
| 195 | + | |
204 | 196 | | |
205 | 197 | | |
206 | 198 | | |
| |||
211 | 203 | | |
212 | 204 | | |
213 | 205 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
218 | 209 | | |
219 | 210 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | 211 | | |
225 | 212 | | |
226 | 213 | | |
| |||
285 | 272 | | |
286 | 273 | | |
287 | 274 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | 275 | | |
293 | 276 | | |
294 | 277 | | |
| |||
327 | 310 | | |
328 | 311 | | |
329 | 312 | | |
330 | | - | |
| 313 | + | |
331 | 314 | | |
332 | 315 | | |
333 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | 403 | | |
410 | 404 | | |
411 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
70 | | - | |
71 | 67 | | |
72 | 68 | | |
73 | 69 | | |
| |||
168 | 164 | | |
169 | 165 | | |
170 | 166 | | |
171 | | - | |
| 167 | + | |
172 | 168 | | |
173 | 169 | | |
174 | 170 | | |
| |||
192 | 188 | | |
193 | 189 | | |
194 | 190 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | 191 | | |
211 | 192 | | |
212 | 193 | | |
213 | 194 | | |
214 | 195 | | |
215 | 196 | | |
216 | 197 | | |
217 | | - | |
218 | 198 | | |
219 | 199 | | |
220 | 200 | | |
| |||
304 | 284 | | |
305 | 285 | | |
306 | 286 | | |
307 | | - | |
308 | 287 | | |
309 | | - | |
| 288 | + | |
310 | 289 | | |
311 | 290 | | |
312 | 291 | | |
| |||
0 commit comments