@eddyskywalker/dsh-chatgpt-subscription 0.8.5 → 0.9.0

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 (69) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +93 -38
  3. package/lib/client.js +2126 -1693
  4. package/lib/client.js.map +1 -1
  5. package/lib/index.js +7588 -2772
  6. package/lib/types/client/claude/ClaudeComposerQuota.d.ts +33 -0
  7. package/lib/types/client/claude/ClaudeComposerQuota.d.ts.map +1 -0
  8. package/lib/types/client/{zhipu/ZhipuSection.d.ts → claude/ClaudeSection.d.ts} +2 -2
  9. package/lib/types/client/claude/ClaudeSection.d.ts.map +1 -0
  10. package/lib/types/client/claude/locales.d.ts +444 -0
  11. package/lib/types/client/claude/locales.d.ts.map +1 -0
  12. package/lib/types/client/claude/styles.d.ts +15 -0
  13. package/lib/types/client/claude/styles.d.ts.map +1 -0
  14. package/lib/types/client/index.d.ts +1 -1
  15. package/lib/types/client/index.d.ts.map +1 -1
  16. package/lib/types/host/claude/__probe-assert.d.ts +2 -0
  17. package/lib/types/host/claude/__probe-assert.d.ts.map +1 -0
  18. package/lib/types/host/claude/account-pool.d.ts +580 -0
  19. package/lib/types/host/claude/account-pool.d.ts.map +1 -0
  20. package/lib/types/host/claude/adapter.d.ts +267 -0
  21. package/lib/types/host/claude/adapter.d.ts.map +1 -0
  22. package/lib/types/host/claude/adopt.d.ts +292 -0
  23. package/lib/types/host/claude/adopt.d.ts.map +1 -0
  24. package/lib/types/host/claude/client.d.ts +513 -0
  25. package/lib/types/host/claude/client.d.ts.map +1 -0
  26. package/lib/types/host/claude/mapper.d.ts +510 -0
  27. package/lib/types/host/claude/mapper.d.ts.map +1 -0
  28. package/lib/types/host/claude/model-catalog.d.ts +365 -0
  29. package/lib/types/host/claude/model-catalog.d.ts.map +1 -0
  30. package/lib/types/host/claude/oauth.d.ts +393 -0
  31. package/lib/types/host/claude/oauth.d.ts.map +1 -0
  32. package/lib/types/host/claude/routes.d.ts +128 -0
  33. package/lib/types/host/claude/routes.d.ts.map +1 -0
  34. package/lib/types/host/claude/token-store.d.ts +312 -0
  35. package/lib/types/host/claude/token-store.d.ts.map +1 -0
  36. package/lib/types/host/claude/types.d.ts +237 -0
  37. package/lib/types/host/claude/types.d.ts.map +1 -0
  38. package/lib/types/index.d.ts +10 -7
  39. package/lib/types/index.d.ts.map +1 -1
  40. package/lib/types/shared/__probe-claude-import.d.ts +2 -0
  41. package/lib/types/shared/__probe-claude-import.d.ts.map +1 -0
  42. package/lib/types/shared/claude-contracts.d.ts +337 -0
  43. package/lib/types/shared/claude-contracts.d.ts.map +1 -0
  44. package/package.json +1 -1
  45. package/lib/types/client/zhipu/ZhipuComposerQuota.d.ts +0 -26
  46. package/lib/types/client/zhipu/ZhipuComposerQuota.d.ts.map +0 -1
  47. package/lib/types/client/zhipu/ZhipuSection.d.ts.map +0 -1
  48. package/lib/types/client/zhipu/locales.d.ts +0 -275
  49. package/lib/types/client/zhipu/locales.d.ts.map +0 -1
  50. package/lib/types/client/zhipu/styles.d.ts +0 -12
  51. package/lib/types/client/zhipu/styles.d.ts.map +0 -1
  52. package/lib/types/host/zhipu/account-pool.d.ts +0 -43
  53. package/lib/types/host/zhipu/account-pool.d.ts.map +0 -1
  54. package/lib/types/host/zhipu/adapter.d.ts +0 -93
  55. package/lib/types/host/zhipu/adapter.d.ts.map +0 -1
  56. package/lib/types/host/zhipu/client.d.ts +0 -153
  57. package/lib/types/host/zhipu/client.d.ts.map +0 -1
  58. package/lib/types/host/zhipu/mapper.d.ts +0 -111
  59. package/lib/types/host/zhipu/mapper.d.ts.map +0 -1
  60. package/lib/types/host/zhipu/model-catalog.d.ts +0 -73
  61. package/lib/types/host/zhipu/model-catalog.d.ts.map +0 -1
  62. package/lib/types/host/zhipu/routes.d.ts +0 -33
  63. package/lib/types/host/zhipu/routes.d.ts.map +0 -1
  64. package/lib/types/host/zhipu/token-store.d.ts +0 -112
  65. package/lib/types/host/zhipu/token-store.d.ts.map +0 -1
  66. package/lib/types/host/zhipu/types.d.ts +0 -125
  67. package/lib/types/host/zhipu/types.d.ts.map +0 -1
  68. package/lib/types/shared/zhipu-contracts.d.ts +0 -164
  69. package/lib/types/shared/zhipu-contracts.d.ts.map +0 -1
@@ -0,0 +1,312 @@
1
+ /**
2
+ * Credential and model-settings persistence for the Claude subscription line.
3
+ *
4
+ * ---------------------------------------------------------------------------
5
+ * WHY ACCOUNT IDENTITY HAS TWO LAYERS
6
+ * ---------------------------------------------------------------------------
7
+ *
8
+ * A subscription credential is not stable text. Every refresh returns a NEW
9
+ * refresh token, and signing in to the same account a second time mints yet
10
+ * another one. The obvious key — a hash of the refresh token — therefore says
11
+ * "new account" for what is the same account, and one ghost row appears per
12
+ * refresh and per re-login. That is the defect this module exists to prevent.
13
+ *
14
+ * A stored account therefore carries two distinct things:
15
+ *
16
+ * 1. `internalId` — minted exactly once, at the first save of an account, as
17
+ * `cl_` + ten random bytes in hex. It never changes for the lifetime of the
18
+ * record, and it is the ONLY key routing may use: set-primary, delete and
19
+ * re-login all address a record by this id.
20
+ * 2. `identityKeys` — an append-only set of ALIASES derived from the credential
21
+ * itself: `uuid:<account.uuid>`, `email:<address>`, and — only when neither
22
+ * of those is available — `seed:<sha256(refreshToken).slice(0,16)>`. Every save
23
+ * MERGES the freshly derived keys into the stored set: a key is never
24
+ * replaced, never dropped, and never re-derived from a token that rotated.
25
+ *
26
+ * Both spellings of the account's address (`email_address`, the wire's own, and
27
+ * `emailAddress`) and both of the account's uuid spellings are read, because a
28
+ * silently missed field here is precisely the ghost-account failure above. Keys
29
+ * are lower-cased on the way in for the same reason: an address that differs only
30
+ * in case is one account.
31
+ *
32
+ * ---------------------------------------------------------------------------
33
+ * THE KNOWN, ACCEPTED LIMITATION: `seed:` CANNOT RECOGNISE A RE-LOGIN
34
+ * ---------------------------------------------------------------------------
35
+ *
36
+ * `seed:` is a digest of the refresh token, so the SAME account signing in again
37
+ * produces a DIFFERENT seed and is stored as a SECOND record. Nothing can tell
38
+ * those two records apart from two genuinely different accounts: neither states
39
+ * a uuid or an address, and the tokens they hold have nothing in common.
40
+ *
41
+ * This is a real limitation, and it is deliberately NOT papered over with an id
42
+ * that pretends to be stable — an id derived from a rotating token is exactly
43
+ * the bug this design removes. The remedy is the one the settings card must
44
+ * offer: a MANUAL MERGE, where the user marks two rows as one account and the
45
+ * surviving record merges the other's keys. Nothing in this module guesses it.
46
+ * A provider whose exchange always returns a uuid or an address never reaches
47
+ * this case; only a credential stating neither does.
48
+ *
49
+ * A second, narrower case follows from the same rule and is worth stating
50
+ * outright: matching requires a SHARED alias, so a sign-in that states only a
51
+ * uuid and a later one that states only an address for the very same account are
52
+ * two records. They become one the moment any single save states both — which is
53
+ * why {@link identityKeysFor} collects everything a credential offers rather
54
+ * than stopping at the first field it finds — and otherwise the same manual
55
+ * merge applies.
56
+ *
57
+ * ---------------------------------------------------------------------------
58
+ * STORAGE
59
+ * ---------------------------------------------------------------------------
60
+ *
61
+ * Encryption is the platform's own and identical to the sibling provider lines:
62
+ * Windows CurrentUser DPAPI (`<file>.dpapi`), the macOS login Keychain, and the
63
+ * Linux Secret Service through `secret-tool`. There is no plaintext fallback — a
64
+ * platform with none of the three throws rather than writing bearer tokens in
65
+ * the clear. The plaintext JSON beside the encrypted file is only ever a
66
+ * MIGRATION SOURCE: it is read once, written back encrypted, verified by
67
+ * reading the ciphertext back, and only then deleted. A failed verification
68
+ * throws and leaves the previous good data untouched.
69
+ *
70
+ * Mutations are serialised per absolute path, so a token refresh, a settings
71
+ * save and a re-login cannot interleave into a read-modify-write that loses an
72
+ * account.
73
+ */
74
+ import type { CredentialStore } from '../token-store.ts';
75
+ import { type ContextWindowOverridePatch } from '../common/context-window-overrides.ts';
76
+ /** Namespace the model settings live in when the harness still registers one. */
77
+ export declare const CLAUDE_PREFERENCES_NAMESPACE = "dsh-claude";
78
+ /** Prefix of every internal account id. */
79
+ export declare const INTERNAL_ID_PREFIX = "cl_";
80
+ /** The OAuth scope that makes a credential a *subscription* credential. */
81
+ export declare const SUBSCRIPTION_INFERENCE_SCOPE = "user:inference";
82
+ /** Revision of the on-disk credential document. */
83
+ export declare const CREDENTIAL_DOCUMENT_VERSION = 1;
84
+ /** Account facts the exchange states about the signed-in user. */
85
+ export interface ClaudeAccountInfo {
86
+ /** Stable account uuid the exchange reports, when it reports one. */
87
+ uuid?: string;
88
+ /** Account address, as the wire spells it. */
89
+ email_address?: string;
90
+ /** The same address, as a hand-written credential spells it. */
91
+ emailAddress?: string;
92
+ }
93
+ /**
94
+ * One stored subscription credential.
95
+ *
96
+ * `scopes` is not decoration: `user:inference` is what makes the token usable
97
+ * against /v1/messages at all, so its absence means this is not a subscription
98
+ * credential and is refused rather than tried. See
99
+ * {@link isSubscriptionCredential}.
100
+ */
101
+ export interface ClaudeCredentials {
102
+ /** Bearer access token. Host-only; never sent to a browser. */
103
+ accessToken: string;
104
+ /** Rotating refresh token. Host-only. */
105
+ refreshToken: string;
106
+ /** Unix milliseconds the access token stops being valid. */
107
+ expiresAt: number;
108
+ /** OAuth scopes the exchange granted. */
109
+ scopes?: string[];
110
+ /** Subscription tier the exchange reported, when it reported one. */
111
+ subscriptionType?: string;
112
+ /** Account facts the exchange reported, when it reported any. */
113
+ account?: ClaudeAccountInfo;
114
+ }
115
+ /**
116
+ * One account record in the credential document.
117
+ *
118
+ * The index signature is deliberate: a later chunk may hang its own fields on a
119
+ * record (an alias, an added-at stamp, a primary flag), and a save from this
120
+ * module must carry them through instead of silently dropping them. Nothing
121
+ * here reads them.
122
+ */
123
+ export interface ClaudeAccountRecord {
124
+ /** Immutable routing key. See the module comment. */
125
+ internalId: string;
126
+ /** Append-only alias set. Never empty in practice; see {@link mergeIdentityKeys}. */
127
+ identityKeys: string[];
128
+ credentials: ClaudeCredentials;
129
+ [key: string]: unknown;
130
+ }
131
+ /** Whole credential file: every signed-in account, in insertion order. */
132
+ export interface ClaudeCredentialDocument {
133
+ /** Format revision, so a later chunk can migrate without guessing. */
134
+ version: number;
135
+ accounts: ClaudeAccountRecord[];
136
+ [key: string]: unknown;
137
+ }
138
+ /** Persisted model settings for this line. */
139
+ export interface ClaudeModelSettings {
140
+ enabled?: boolean;
141
+ enabledModelIds: string[];
142
+ contextWindowOverrides: Record<string, number>;
143
+ defaultReasoningEffort: string | null;
144
+ /** Account pinned in the card, by {@link ClaudeAccountRecord.internalId}. */
145
+ selectedAccountId: string | null;
146
+ }
147
+ /**
148
+ * One settings patch. `null` in an override map drops that override, and a
149
+ * field left out keeps its stored value.
150
+ */
151
+ export interface ClaudeSettingsPatch {
152
+ enabled?: boolean;
153
+ enabledModelIds?: string[];
154
+ /** `null` deletes one override and falls back to the catalog default. */
155
+ contextWindowOverrides?: ContextWindowOverridePatch;
156
+ defaultReasoningEffort?: string | null;
157
+ selectedAccountId?: string | null;
158
+ }
159
+ /** The preference surface the routes and the settings card talk to. */
160
+ export interface ClaudePreferenceStore {
161
+ status(): ClaudeModelSettings;
162
+ update(patch: ClaudeSettingsPatch): Promise<ClaudeModelSettings>;
163
+ }
164
+ /** A fresh settings document, with a copy of the default model list. */
165
+ export declare function defaultClaudeSettings(): ClaudeModelSettings;
166
+ /** Mint an internal id. Called once per record; never derived from a token. */
167
+ export declare function createInternalId(): string;
168
+ /**
169
+ * Whether a value has the shape of an internal id this module minted.
170
+ *
171
+ * A shape test for the settings card and for tests — NOT a gate on the stored
172
+ * document, which keeps a foreign id verbatim rather than discarding the account
173
+ * it names.
174
+ */
175
+ export declare function isClaudeAccountId(value: unknown): value is string;
176
+ /**
177
+ * Whether a credential is a *subscription* credential.
178
+ *
179
+ * The exchange can hand back a token that authenticates but is not entitled to
180
+ * the routes this provider exists to serve; `user:inference` is the scope that
181
+ * separates the two, so its absence is a refusal rather than a retry.
182
+ */
183
+ export declare function isSubscriptionCredential(credentials: Pick<ClaudeCredentials, 'scopes'>): boolean;
184
+ /**
185
+ * Aliases one credential states about its account.
186
+ *
187
+ * Order is deliberate — uuid, then address — because {@link mergeIdentityKeys}
188
+ * appends in this order and a stable order keeps the stored file diffable. The
189
+ * `seed:` fallback is emitted ONLY when neither of the other two exists: a
190
+ * seed is not identity, it is a fingerprint of a token that rotates, and mixing
191
+ * it into a set that already has real identity would add noise that changes on
192
+ * every refresh.
193
+ */
194
+ export declare function identityKeysFor(credentials: Pick<ClaudeCredentials, 'refreshToken' | 'account'>): string[];
195
+ /**
196
+ * Union of two alias sets, existing first.
197
+ *
198
+ * Append-only in both directions: a key already present is kept where it is, a
199
+ * new key is appended, and an exact duplicate is not repeated. Nothing is ever
200
+ * removed — including a `seed:` a credential has since outgrown, because a user
201
+ * who signs in with the same token again would otherwise get a ghost row.
202
+ */
203
+ export declare function mergeIdentityKeys(existing: readonly string[], incoming: readonly string[]): string[];
204
+ /**
205
+ * Validate and normalize one credential, strictly.
206
+ *
207
+ * Every field is rebuilt from a validated value rather than carried over from
208
+ * the input, so nothing a caller happens to attach — an `undefined`-valued key
209
+ * among it — can make the encrypted write fail its own read-back comparison.
210
+ * A wrong shape throws; nothing is guessed, and in particular a credential with
211
+ * no `user:inference` scope is refused here (see {@link isSubscriptionCredential}).
212
+ */
213
+ export declare function parseClaudeCredentials(value: unknown): ClaudeCredentials;
214
+ /**
215
+ * Validate one whole credential document, migrating the pre-two-layer shape.
216
+ *
217
+ * A bare credential object — one token pair, no account envelope — is what an
218
+ * earlier build wrote, and it is accepted as a one-account document so an
219
+ * existing sign-in survives the upgrade instead of forcing a re-login. The
220
+ * record it becomes is minted an internal id right here, at the moment it is
221
+ * first read.
222
+ */
223
+ export declare function parseClaudeCredentialDocument(value: unknown): ClaudeCredentialDocument;
224
+ /**
225
+ * Validate one settings document.
226
+ *
227
+ * Unlike the credential parse this one is lenient by design: settings are
228
+ * preferences, and a hand-edited or half-written value must degrade to the
229
+ * shipped default for that one field instead of unlinking the user's model
230
+ * choice entirely. Being lenient is also what lets a document written by an
231
+ * EARLIER build keep working: this reader picks the fields it knows and ignores
232
+ * every other key rather than rejecting the document for stating one, so a file
233
+ * still carrying a key this build no longer has is read successfully and every
234
+ * field it does have survives. Rejecting unknown keys here would answer "not
235
+ * signed in" for a user whose model selection is sitting intact on disk.
236
+ * The settings route's zod schema has the same property for its own store:
237
+ * schemastery strips undeclared keys instead of failing on them.
238
+ */
239
+ export declare function parseClaudeModelSettings(value: unknown): ClaudeModelSettings;
240
+ export declare function credentialPath(): string;
241
+ export declare function modelSettingsPath(): string;
242
+ /**
243
+ * Encrypted credential store; the plaintext JSON is only a migration source.
244
+ *
245
+ * Every mutation goes through {@link saveVerified}: encrypt, read the ciphertext
246
+ * back, compare, and only then remove the plaintext. A verification failure
247
+ * throws and leaves both the ciphertext and the plaintext as they were, so the
248
+ * previous good data is never destroyed by a failed write.
249
+ */
250
+ export declare class FileCredentialStore {
251
+ private readonly filePath;
252
+ private readonly backend;
253
+ constructor(filePath?: string, backend?: CredentialStore<ClaudeCredentialDocument>);
254
+ /** Human-readable location, in the form the settings card reports it. */
255
+ path(): string;
256
+ /**
257
+ * Test seam and extension point: the one place an id is minted.
258
+ *
259
+ * Overridable so a test can make the id deterministic without reaching into
260
+ * the randomness, and so a later chunk can mint ids through the same path.
261
+ */
262
+ protected createAccountId(): string;
263
+ private serialize;
264
+ private removeLegacy;
265
+ private saveVerified;
266
+ /** Unserialized body shared by {@link read} and the mutations above it. */
267
+ private readDocument;
268
+ read(): Promise<ClaudeCredentialDocument | null>;
269
+ listAccounts(): Promise<ClaudeAccountRecord[]>;
270
+ /**
271
+ * Store one credential, merging it into the account it belongs to.
272
+ *
273
+ * The merge is the whole point of the two-layer design: the same account
274
+ * saving a SECOND, rotated refresh token is matched by the uuid or address
275
+ * alias it still carries, so it updates the existing record — same
276
+ * `internalId`, union of aliases — instead of adding a ghost row. Pass
277
+ * `options.internalId` to address a record directly; that is what a re-login
278
+ * whose token states no identity uses, and it is the only way to fold such a
279
+ * credential onto a record the user picked by hand.
280
+ */
281
+ saveAccount(credentials: ClaudeCredentials, options?: {
282
+ internalId?: string;
283
+ }): Promise<ClaudeAccountRecord>;
284
+ write(document: ClaudeCredentialDocument): Promise<void>;
285
+ delete(): Promise<void>;
286
+ /** Drop exactly one account, by its immutable id. Returns whether it existed. */
287
+ deleteAccount(internalId: string): Promise<boolean>;
288
+ }
289
+ /** Plain-JSON model settings used when the settings service is unavailable. */
290
+ export declare class FileModelSettingsStore {
291
+ private readonly filePath;
292
+ constructor(filePath?: string);
293
+ path(): string;
294
+ read(): Promise<ClaudeModelSettings>;
295
+ write(settings: ClaudeModelSettings): Promise<void>;
296
+ /**
297
+ * Read-modify-write under the same per-path lock the credentials use.
298
+ *
299
+ * Without it two patches landing together each read the same document and the
300
+ * second write silently discards the first — a lost model selection, with no
301
+ * error anywhere.
302
+ */
303
+ updateSettings(patch: ClaudeSettingsPatch): Promise<ClaudeModelSettings>;
304
+ }
305
+ /**
306
+ * Bind the model selection to the DSH settings document when the harness still
307
+ * offers one, and to the JSON file beside the credentials otherwise: a harness
308
+ * without the register seam (0.1.7, and a headless test) reads that file back on
309
+ * boot.
310
+ */
311
+ export declare function registerClaudePreferenceStore(settings?: unknown, fallbackStore?: FileModelSettingsStore): ClaudePreferenceStore;
312
+ //# sourceMappingURL=token-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/token-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AASH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAA+B,KAAK,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AAMpH,iFAAiF;AACjF,eAAO,MAAM,4BAA4B,eAAe,CAAA;AAExD,2CAA2C;AAC3C,eAAO,MAAM,kBAAkB,QAAQ,CAAA;AAKvC,2EAA2E;AAC3E,eAAO,MAAM,4BAA4B,mBAAmB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KAAK,CAAC,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IASzD;;;;;;OAMG;IACH,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAOzE;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,CAAC,EAAE,OAAO,EAClB,aAAa,yBAA+B,GAC3C,qBAAqB,CAsDvB"}
@@ -0,0 +1,237 @@
1
+ /**
2
+ * Static facts about Anthropic's Claude subscription surface.
3
+ *
4
+ * The subscription (Claude Pro/Max, the credential Claude Code uses) is a
5
+ * distinct product from the pay-as-you-go Console API. It is served by the same
6
+ * host — https://api.anthropic.com — but a subscription credential is a Bearer
7
+ * **OAuth access token**, not an `x-api-key`, and the subscription routes are
8
+ * gated behind betas the API-key line never sends.
9
+ *
10
+ * Every constant below was read out of a locally installed reference
11
+ * implementation, not recalled: the Anthropic wire layer and OAuth module of
12
+ * `@earendil-works/pi-ai` (dist/api/anthropic-messages.js,
13
+ * dist/auth/oauth/anthropic.js) and its `data/anthropic.json` model snapshot.
14
+ * Each constant names the source that establishes it, so a later reviewer can
15
+ * re-check the claim instead of trusting this file.
16
+ *
17
+ * The one fact this module cannot assert is which models the *server* will
18
+ * serve, or at what entitlement: that answer is the server's own
19
+ * GET /v1/models plus the account's plan, and the sibling model table says so
20
+ * at length.
21
+ */
22
+ /** Provider id registered with DSH. */
23
+ export declare const PROVIDER_ID = "claude-subscription";
24
+ /** Display name for the settings surface and the model picker. */
25
+ export declare const PROVIDER_NAME = "Claude\uFF08\u8BA2\u9605\uFF09";
26
+ /** Host serving both the Messages API and the subscription's own OAuth routes. */
27
+ export declare const API_BASE = "https://api.anthropic.com";
28
+ /**
29
+ * Path the Messages API is posted to.
30
+ *
31
+ * The `?beta=true` query is part of the subscription contract rather than a
32
+ * cache buster: it is the beta route, not an alias of the plain one, so dropping
33
+ * it changes which endpoint answers rather than how the same endpoint is cached.
34
+ */
35
+ export declare const MESSAGES_PATH = "/v1/messages?beta=true";
36
+ /** Model listing. The authority on what this account can actually call. */
37
+ export declare const MODELS_PATH = "/v1/models";
38
+ /** Subscription usage meters (the 5-hour and 7-day windows). */
39
+ export declare const USAGE_PATH = "/api/oauth/usage";
40
+ /**
41
+ * Browser authorization endpoint of the subscription flow.
42
+ *
43
+ * This is the claude.ai property, which is what makes the resulting token a
44
+ * subscription credential. The Console's own authorization host mints
45
+ * API-key-scoped grants instead and is deliberately not used here.
46
+ *
47
+ * Overridable: see {@link oauthAuthorizeUrl}.
48
+ */
49
+ export declare const OAUTH_AUTHORIZE_URL = "https://claude.ai/oauth/authorize";
50
+ /** Token endpoint for both the authorization-code grant and refresh. */
51
+ export declare const OAUTH_TOKEN_URL = "https://platform.claude.com/v1/oauth/token";
52
+ /**
53
+ * Redirect URI for the manual paste flow.
54
+ *
55
+ * The loopback flow ({@link loopbackRedirectUri}) is the primary one, but the
56
+ * authorization host only accepts a redirect URI the client is registered for.
57
+ * When no browser on this machine can complete the callback — a headless box, a
58
+ * remote shell, a browser in another profile — the user opens the authorize URL,
59
+ * lets the page fail to load, and pastes the resulting code back. Recognising
60
+ * this URI is what lets the flow tell the two apart.
61
+ */
62
+ export declare const OAUTH_MANUAL_REDIRECT_URI = "https://platform.claude.com/oauth/code/callback";
63
+ /**
64
+ * Public OAuth client id of the subscription flow.
65
+ *
66
+ * A public client id is not a secret — it identifies the client, and PKCE is
67
+ * what actually protects the exchange. It is still a fixed upstream fact: the
68
+ * authorization host rejects an unknown client id before any user is asked to
69
+ * authorize anything.
70
+ */
71
+ export declare const OAUTH_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
72
+ /**
73
+ * Scopes the subscription flow requests, space-separated as the endpoint wants.
74
+ *
75
+ * `user:inference` is the one that makes the token usable against
76
+ * /v1/messages; `user:profile` is what the usage endpoint answers against.
77
+ * A narrower set yields a token that authenticates but is refused on the routes
78
+ * this provider exists to serve, so the full set is requested.
79
+ */
80
+ export declare const OAUTH_SCOPES = "org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload";
81
+ /**
82
+ * Required on any request authenticated with a subscription OAuth token.
83
+ *
84
+ * The `anthropic-beta` header is cumulative: one request carries every marker
85
+ * that applies, and the values below are the wire tokens, not capability names.
86
+ */
87
+ export declare const OAUTH_BETA = "oauth-2025-04-20";
88
+ /** Identity beta pairing with the Claude Code system prompt and version headers. */
89
+ export declare const CLAUDE_CODE_BETA = "claude-code-20250219";
90
+ /** Lets thinking blocks interleave with tool use across a multi-turn loop. */
91
+ export declare const INTERLEAVED_THINKING_BETA = "interleaved-thinking-2025-05-14";
92
+ /** Anthropic protocol revision sent as `anthropic-version`. */
93
+ export declare const ANTHROPIC_VERSION = "2023-06-01";
94
+ /**
95
+ * Baseline client version this route reports to the subscription gateway.
96
+ *
97
+ * Upstream enforces a *minimum reported client version* on the subscription
98
+ * path: a value below the floor is refused with HTTP 400 and an error body whose
99
+ * code is `claude_code_version_too_old`. That is a hard stop for every request
100
+ * rather than a per-request failure, so it cannot be a compile-time literal that
101
+ * only moves when this package is republished — a user whose installed baseline
102
+ * has aged past the server's floor has to be able to raise it without waiting
103
+ * for a release.
104
+ *
105
+ * Read the effective value with {@link claudeCliVersion}, pin one with
106
+ * {@link setClaudeCliVersion}.
107
+ */
108
+ export declare const CLAUDE_CLI_VERSION = "2.1.251";
109
+ /**
110
+ * Loopback callback port the subscription flow defaults to.
111
+ *
112
+ * The port is not free-form: it is part of the redirect URI, and the
113
+ * authorization host only accepts a redirect URI registered for the client, so
114
+ * this default is the one known to be accepted. It is still only a *default* —
115
+ * see {@link CALLBACK_PORT_ATTEMPTS}.
116
+ */
117
+ export declare const DEFAULT_CALLBACK_PORT = 53692;
118
+ /**
119
+ * How many consecutive ports one probe covers, starting at the default.
120
+ *
121
+ * Windows (Hyper-V/WinNAT) dynamically reserves TCP port ranges that change on
122
+ * every reboot. A fixed callback port can land inside one and `listen` fails
123
+ * with `EACCES`, so browser authorization never completes. Excluded ranges are
124
+ * reserved in blocks of up to 100 ports, which is why a probe narrower than that
125
+ * can stop inside a block and still fail; 128 covers any single block the
126
+ * default port can start in. Mirrors the Antigravity line's own probe.
127
+ */
128
+ export declare const CALLBACK_PORT_ATTEMPTS = 128;
129
+ /** Path of the loopback callback the browser is redirected to. */
130
+ export declare const CALLBACK_PATH = "/callback";
131
+ /** Idle ceiling for one streaming response before it is declared stalled. */
132
+ export declare const STREAM_IDLE_TIMEOUT_MS = 300000;
133
+ /** Failure code the adapter reports for that stall. */
134
+ export declare const STREAM_IDLE_TIMEOUT_CODE = "LLM_STREAM_IDLE_TIMEOUT";
135
+ /** Ceiling for a model-listing or usage fetch. */
136
+ export declare const DISCOVERY_TIMEOUT_MS = 20000;
137
+ /** Whole-request ceiling for one non-streaming chat call. */
138
+ export declare const CHAT_TIMEOUT_MS = 300000;
139
+ /** How long a usage reading is served from cache before it is refetched. */
140
+ export declare const QUOTA_CACHE_TTL_MS = 120000;
141
+ /** How long a usage reading keeps answering while refreshes fail behind it. */
142
+ export declare const QUOTA_FULL_REFRESH_MS = 300000;
143
+ /** How long a model listing is served from cache. */
144
+ export declare const CATALOG_CACHE_TTL_MS = 1800000;
145
+ /** How long a sign-in may stay open before it is abandoned. */
146
+ export declare const LOGIN_TIMEOUT_MS = 600000;
147
+ /** Output cap requested when the caller states none. */
148
+ export declare const DEFAULT_MAX_TOKENS = 32768;
149
+ /**
150
+ * Context window assumed for a model the catalog does not describe.
151
+ *
152
+ * 200K is the window every non-1M Claude model ships, so it is the value that is
153
+ * wrong for the fewest ids. The dangerous direction is a window that is too
154
+ * large — the request is rejected outright — while one that is too small only
155
+ * compacts earlier than it had to.
156
+ */
157
+ export declare const DEFAULT_CONTEXT_WINDOW = 200000;
158
+ /**
159
+ * Product identity for the `User-Agent`.
160
+ *
161
+ * The endpoint and the header vocabulary are Anthropic's own public contract, so
162
+ * this route identifies itself honestly as this plugin rather than
163
+ * impersonating a client it is not.
164
+ */
165
+ export declare const PLUGIN_USER_AGENT = "dsh-chatgpt-subscription (+https://github.com/Aa728848/dsh-chatgpt-subscription)";
166
+ /**
167
+ * Anthropic error types this line classifies.
168
+ *
169
+ * Anthropic reports the real condition in the response body's `error.type`
170
+ * while the HTTP status stays coarse — several unrelated conditions share a
171
+ * status — so classification reads the body and only falls back to the status
172
+ * line when the body is unreadable.
173
+ *
174
+ * The keys are what this route calls each condition; the values are the wire
175
+ * strings, so an unknown string is never silently mapped onto a neighbour.
176
+ */
177
+ export declare const ERROR_TYPE: {
178
+ /** 401 — the credential is absent, malformed, or expired. Re-signing in fixes it. */
179
+ readonly AUTHENTICATION: "authentication_error";
180
+ /** 403 — the credential is valid but the account may not use this resource. */
181
+ readonly PERMISSION: "permission_error";
182
+ /** 400 — the request itself is malformed or carries an unsupported parameter. */
183
+ readonly INVALID_REQUEST: "invalid_request_error";
184
+ /** 429 — request-rate or usage-window limit. The body may name a reset instant. */
185
+ readonly RATE_LIMIT: "rate_limit_error";
186
+ /** 529 — transient capacity shortage; retrying is the whole remedy. */
187
+ readonly OVERLOADED: "overloaded_error";
188
+ /** 404 — unknown model id or unknown resource. */
189
+ readonly NOT_FOUND: "not_found_error";
190
+ /** 500 — an unexpected server-side failure. */
191
+ readonly API: "api_error";
192
+ /** 413 — the request body exceeds the maximum size, independent of token count. */
193
+ readonly REQUEST_TOO_LARGE: "request_too_large";
194
+ };
195
+ /** One error type this line classifies. */
196
+ export type ClaudeErrorType = (typeof ERROR_TYPE)[keyof typeof ERROR_TYPE];
197
+ /**
198
+ * Error code the server reports when the client version it was told is too old.
199
+ *
200
+ * Distinct from {@link ERROR_TYPE}: the failure arrives as an ordinary
201
+ * `invalid_request_error` whose *details* carry this code, which is why it needs
202
+ * its own constant rather than a slot in the table above.
203
+ */
204
+ export declare const ERROR_CODE_CLIENT_VERSION_TOO_OLD = "claude_code_version_too_old";
205
+ /** Every error type this line recognizes, for validation and tests. */
206
+ export declare const CLAUDE_ERROR_TYPES: readonly ClaudeErrorType[];
207
+ /** Whether a wire string is one of the error types this line classifies. */
208
+ export declare function isClaudeErrorType(value: unknown): value is ClaudeErrorType;
209
+ /**
210
+ * Effective client version to report.
211
+ *
212
+ * Resolution order is deliberate: an explicit {@link setClaudeCliVersion} pin
213
+ * wins, then the `DSH_CLAUDE_CLI_VERSION` environment variable, then the shipped
214
+ * baseline. The pin lets a running host react to
215
+ * `claude_code_version_too_old` without a restart; the environment variable lets a
216
+ * user do it without any code path at all.
217
+ */
218
+ export declare function claudeCliVersion(): string;
219
+ /**
220
+ * Pin the reported client version.
221
+ *
222
+ * Pass `null` (or a blank string) to clear the pin and fall back to the
223
+ * environment and then the shipped baseline.
224
+ */
225
+ export declare function setClaudeCliVersion(value: string | null): void;
226
+ /**
227
+ * Resolve the browser authorization endpoint.
228
+ *
229
+ * The subscription flow has answered on more than one host, while its Console
230
+ * counterpart has always been a different product, so a user hitting an
231
+ * authorization failure needs a way to point this route elsewhere without a
232
+ * republish — the same escape hatch the sibling Kimi line gives its OAuth host.
233
+ */
234
+ export declare function oauthAuthorizeUrl(): string;
235
+ /** Loopback redirect URI the authorization host is told to return to. */
236
+ export declare function loopbackRedirectUri(port?: number): string;
237
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,uCAAuC;AACvC,eAAO,MAAM,WAAW,wBAAwB,CAAA;AAChD,kEAAkE;AAClE,eAAO,MAAM,aAAa,mCAAe,CAAA;AAEzC,kFAAkF;AAClF,eAAO,MAAM,QAAQ,8BAA8B,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,2BAA2B,CAAA;AACrD,2EAA2E;AAC3E,eAAO,MAAM,WAAW,eAAe,CAAA;AACvC,gEAAgE;AAChE,eAAO,MAAM,UAAU,qBAAqB,CAAA;AAE5C;;;;;;;;GA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AOG;AACH,eAAO,MAAM,sBAAsB,SAAU,CAAA;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,qFAAqF,CAAA;AAEnH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;IACrB,qFAAqF;;IAErF,+EAA+E;;IAE/E,iFAAiF;;IAEjF,mFAAmF;;IAEnF,uEAAuE;;IAEvE,kDAAkD;;IAElD,+CAA+C;;IAE/C,mFAAmF;;CAE3E,CAAA;AAEV,2CAA2C;AAC3C,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,gCAAgC,CAAA;AAE9E,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAA8B,CAAA;AAEvF,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAKD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAGzC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAG9D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAG1C;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,MAA8B,GAAG,MAAM,CAEhF"}
@@ -76,13 +76,16 @@ export { fetchAccountQuota as fetchWorkBuddyQuota, clearCachedQuota as clearWork
76
76
  export { getWorkBuddyWebStatus, registerWorkBuddyRoutes } from './host/workbuddy/routes.ts';
77
77
  export { WorkBuddyCheckinService } from './host/workbuddy/checkin.ts';
78
78
  export { FALLBACK_MODELS as WORKBUDDY_MODELS, WORKBUDDY_MODEL_IDS, resolveWorkBuddyModel, modelsForRegion as workBuddyModelsForRegion, } from './host/workbuddy/model-catalog.ts';
79
- export { ZhipuAdapter, classifyFailure as classifyZhipuFailure, resolveDefaultReasoningEffort as resolveZhipuDefaultEffort } from './host/zhipu/adapter.ts';
80
- export { ZhipuAccountPool, zhipuPoolPath, parseZhipuPoolData, type ZhipuPoolAccount, } from './host/zhipu/account-pool.ts';
81
- export { FileCredentialStore as ZhipuCredentialStore, FileModelSettingsStore as ZhipuModelSettingsStore, credentialPath as zhipuCredentialPath, modelSettingsPath as zhipuModelSettingsPath, parseZhipuCredentials, registerZhipuPreferenceStore, zhipuAccountKey, zhipuKeyHint, type ZhipuCredentials, type ZhipuModelSettings, type ZhipuPreferenceStore, } from './host/zhipu/token-store.ts';
82
- export { accountFromCredentials as zhipuAccountFromCredentials, clearCachedCatalog as clearZhipuCatalog, clearCachedQuota as clearZhipuQuota, fetchAccountQuota as fetchZhipuQuota, getCachedQuota as getZhipuQuota, loadCatalog as loadZhipuCatalog, parseCatalogModels as parseZhipuCatalogModels, parsePlan as parseZhipuPlan, parseQuotaLimits as parseZhipuQuotaLimits, quotaMeters as zhipuQuotaMeters, quotaWindows as zhipuQuotaWindows, verifyApiKey as verifyZhipuApiKey, windowLabel as zhipuWindowLabel, windowMinutesOf as zhipuWindowMinutes, } from './host/zhipu/client.ts';
83
- export { getZhipuWebStatus, registerZhipuRoutes, resolveEnabledModelIds as resolveZhipuEnabledModelIds, buildModelOptions as buildZhipuModelOptions, } from './host/zhipu/routes.ts';
84
- export { FALLBACK_MODELS as ZHIPU_MODELS, ZHIPU_MODELS as ZHIPU_MODEL_TABLE, DEFAULT_VISIBLE_MODEL_IDS as ZHIPU_DEFAULT_VISIBLE_MODELS, defaultContextWindowFor as zhipuDefaultContextWindow, maxOutputTokensFor as zhipuMaxOutputTokens, modelsForRegion as zhipuModelsForRegion, resolveZhipuModel, zhipuModelSupportsImage, zhipuReasoningEfforts, type ZhipuModelEntry, } from './host/zhipu/model-catalog.ts';
85
- export { CHAT_PATH as ZHIPU_CHAT_PATH, MODELS_PATH as ZHIPU_MODELS_PATH, PROVIDER_ID as ZHIPU_PROVIDER_ID, PROVIDER_NAME as ZHIPU_PROVIDER_NAME, QUOTA_PATH as ZHIPU_QUOTA_PATH, REGION_BASE_URLS as ZHIPU_REGION_BASE_URLS, SUBSCRIPTION_PATH as ZHIPU_SUBSCRIPTION_PATH, apiBaseForRegion as zhipuApiBaseForRegion, normalizeRegion as normalizeZhipuRegion, regionForBaseUrl as zhipuRegionForBaseUrl, } from './host/zhipu/types.ts';
79
+ export { ClaudeAdapter, codeForFailure as claudeCodeForFailure, toLlmError as claudeToLlmError, } from './host/claude/adapter.ts';
80
+ export { ClaudeAccountPool, claudePoolPath, parseClaudePoolData, adoptedPoolAccountKey, isAdoptedPoolCredential, type ClaudePoolAccount, type ClaudeAccountSummaryDto, } from './host/claude/account-pool.ts';
81
+ export { FileCredentialStore as ClaudeCredentialStore, FileModelSettingsStore as ClaudeModelSettingsStore, credentialPath as claudeCredentialPath, modelSettingsPath as claudeModelSettingsPath, parseClaudeCredentials, parseClaudeCredentialDocument, registerClaudePreferenceStore, type ClaudeCredentials, type ClaudeModelSettings, type ClaudePreferenceStore, } from './host/claude/token-store.ts';
82
+ export { beginLogin as beginClaudeLogin, cancelLogin as cancelClaudeLogin, ensureAccessToken as ensureClaudeAccessToken, getLoginStatus as getClaudeLoginStatus, refreshAccessToken as refreshClaudeToken, resolveLoginInput as resolveClaudeLoginInput, submitLoginInput as submitClaudeLoginInput, } from './host/claude/oauth.ts';
83
+ export { claudeCodeCredentialPaths, claudeCodeCredentialPresence, isAdoptedClaudeCredential, isAdoptedCredentialExpired, readClaudeCodeCredentials, ADOPTED_CREDENTIAL_EXPIRED_HINT as CLAUDE_ADOPTED_CREDENTIAL_EXPIRED_HINT, } from './host/claude/adopt.ts';
84
+ export { clearCachedCatalog as clearClaudeCatalog, clearCachedQuota as clearClaudeQuota, classifyFailure as classifyClaudeFailure, fetchAccountQuota as fetchClaudeQuota, getCachedQuota as getClaudeQuota, loadCatalog as loadClaudeCatalog, parseUsagePayload as parseClaudeUsagePayload, probeConnection as probeClaudeConnection, } from './host/claude/client.ts';
85
+ export { getClaudeWebStatus, registerClaudeRoutes, ROUTE_PREFIX as CLAUDE_ROUTE_PREFIX, buildClaudeModelOptions as buildClaudeModelOptions, resolveEnabledModelIds as resolveClaudeEnabledModelIds, } from './host/claude/routes.ts';
86
+ export { CLAUDE_MODELS, CLAUDE_MODEL_IDS, DEFAULT_VISIBLE_MODEL_IDS as CLAUDE_DEFAULT_VISIBLE_MODELS, FALLBACK_MODELS as CLAUDE_FALLBACK_MODELS, claudeModelCanDisableThinking, claudeModelSupportsImage, claudeModelSupportsTemperature, claudeReasoningEfforts, claudeThinkingMode, defaultContextWindowFor as claudeDefaultContextWindow, maxOutputTokensFor as claudeMaxOutputTokens, resolveClaudeModel, type ClaudeModelEntry, } from './host/claude/model-catalog.ts';
87
+ export { API_BASE as CLAUDE_API_BASE, MESSAGES_PATH as CLAUDE_MESSAGES_PATH, PROVIDER_ID as CLAUDE_PROVIDER_ID, PROVIDER_NAME as CLAUDE_PROVIDER_NAME, QUOTA_CACHE_TTL_MS as CLAUDE_QUOTA_CACHE_TTL_MS, claudeCliVersion, setClaudeCliVersion, } from './host/claude/types.ts';
88
+ export { CLAUDE_REASONING_EFFORTS, isClaudeReasoningEffort, type ClaudeAccountQuota, type ClaudeConnectionDto, type ClaudeLoginFlowDto, type ClaudeModelOption, type ClaudeQuotaWindow, type ClaudeReasoningEffort, type ClaudeSettingsUpdateDto, type ClaudeWebStatus, } from './shared/claude-contracts.ts';
86
89
  export { KimiCodeAccountPool, kimiCodePoolPath, parseKimiCodePoolData, type KimiCodePoolAccount, } from './host/kimi-code/account-pool.ts';
87
90
  export { KIMI_CODE_MODELS, kimiCodeModelDef, } from './host/kimi-code/model-catalog.ts';
88
91
  export { FileCredentialStore, FileModelSettingsStore, credentialPath, modelSettingsPath, } from './host/antigravity/token-store.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.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AA;AAC/B,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,eAAe,GACrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,mBAAmB,GACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,GAClB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAClG,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export type { ClaudeAccountSummaryDto } from '../host/claude/account-pool.ts';
2
+ //# sourceMappingURL=__probe-claude-import.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__probe-claude-import.d.ts","sourceRoot":"","sources":["../../../src/shared/__probe-claude-import.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA"}