@eddyskywalker/dsh-chatgpt-subscription 0.13.2 → 0.14.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.
- package/CHANGELOG.md +30 -0
- package/README.md +75 -8
- package/lib/client.js +183 -115
- package/lib/client.js.map +1 -1
- package/lib/index.js +648 -58
- package/lib/types/client/CodexSubscriptionSection.d.ts +1 -1
- package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
- package/lib/types/client/ProviderHubSection.d.ts.map +1 -1
- package/lib/types/client/api.d.ts +12 -0
- package/lib/types/client/api.d.ts.map +1 -1
- package/lib/types/client/claude/ClaudeSection.d.ts.map +1 -1
- package/lib/types/client/claude/locales.d.ts +2 -11
- package/lib/types/client/claude/locales.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +13 -1
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/host/claude/model-catalog.d.ts +42 -20
- package/lib/types/host/claude/model-catalog.d.ts.map +1 -1
- package/lib/types/host/claude/types.d.ts +7 -2
- package/lib/types/host/claude/types.d.ts.map +1 -1
- package/lib/types/host/codex-account-pool.d.ts +129 -1
- package/lib/types/host/codex-account-pool.d.ts.map +1 -1
- package/lib/types/host/codex-adopt.d.ts +255 -0
- package/lib/types/host/codex-adopt.d.ts.map +1 -0
- package/lib/types/host/routes.d.ts +11 -1
- package/lib/types/host/routes.d.ts.map +1 -1
- package/lib/types/host/token-store.d.ts +26 -1
- package/lib/types/host/token-store.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +22 -0
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots
|
|
|
2
2
|
import type { PluginStatusDto, QuotaWindowDto } from '../shared/contracts.ts';
|
|
3
3
|
import { NS } from './locales.ts';
|
|
4
4
|
type Props = PropsRuntime<'settings.section'> & PropsLocale<typeof NS>;
|
|
5
|
-
type BusyAction = 'login' | 'token' | 'quota' | 'reset-credit' | 'test' | 'logout' | 'preferences' | 'set-primary' | 'delete' | 'clear-cooldown' | 'strategy' | null;
|
|
5
|
+
type BusyAction = 'login' | 'token' | 'quota' | 'reset-credit' | 'test' | 'logout' | 'preferences' | 'set-primary' | 'delete' | 'clear-cooldown' | 'strategy' | 'adopt' | 'adopt-disable' | null;
|
|
6
6
|
type Translate = Props['t'];
|
|
7
7
|
export declare function CodexSubscriptionSection({ t }: Props): React.JSX.Element;
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodexSubscriptionSection.d.ts","sourceRoot":"","sources":["../../../src/client/CodexSubscriptionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAyB,eAAe,EAAkB,cAAc,EAA8D,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"CodexSubscriptionSection.d.ts","sourceRoot":"","sources":["../../../src/client/CodexSubscriptionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAyB,eAAe,EAAkB,cAAc,EAA8D,MAAM,wBAAwB,CAAA;AAShL,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAGjC,KAAK,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,CAAA;AACtE,KAAK,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,GAC9F,aAAa,GAAG,QAAQ,GAAG,gBAAgB,GAAG,UAAU,GAAG,OAAO,GAAG,eAAe,GAAG,IAAI,CAAA;AAC/F,KAAK,S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gB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAgBtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderHubSection.d.ts","sourceRoot":"","sources":["../../../src/client/ProviderHubSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAKjC,KAAK,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG;IACvE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;CAC3B,CAAA;AAoCD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"ProviderHubSection.d.ts","sourceRoot":"","sources":["../../../src/client/ProviderHubSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAKjC,KAAK,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG;IACvE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;CAC3B,CAAA;AAoCD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA0C7F"}
|
|
@@ -20,6 +20,18 @@ export declare class SubscriptionApi {
|
|
|
20
20
|
alias?: string;
|
|
21
21
|
strategy?: string;
|
|
22
22
|
}): Promise<PluginStatusDto>;
|
|
23
|
+
/**
|
|
24
|
+
* Import this machine's Codex CLI sign-in, answering with the refreshed status.
|
|
25
|
+
*
|
|
26
|
+
* The body names the source rather than the URL carrying it, so the host can
|
|
27
|
+
* refuse a sign-in it does not import with a sentence instead of a silent
|
|
28
|
+
* no-op. The type is 'codex' alone on purpose: Claude Code and MiniMax Code are
|
|
29
|
+
* imported from their own provider settings, and a union here would invite a
|
|
30
|
+
* call the host always answers with a 400.
|
|
31
|
+
*/
|
|
32
|
+
adoptLocalLogin(source: 'codex'): Promise<PluginStatusDto>;
|
|
33
|
+
/** Forget every imported snapshot. The CLIs' own files are never touched. */
|
|
34
|
+
disableAdoptedLocalLogins(): Promise<PluginStatusDto>;
|
|
23
35
|
refresh(): Promise<PluginStatusDto>;
|
|
24
36
|
refreshQuota(): Promise<QuotaStatusDto>;
|
|
25
37
|
useResetCredit(): Promise<QuotaStatusDto>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/client/api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,0BAA0B,EAC1B,gCAAgC,EACjC,MAAM,wBAAwB,CAAA;AAE/B,qBAAa,eAAe;IAC1B,MAAM,IAAI,OAAO,CAAC,eAAe,CAAC;IAIlC,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAIpC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IAI7D,kEAAkE;IAClE,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,KAAK,CAAA;KAAE,CAAC;IAI7D;;;;;OAKG;IACH,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,gBAAgB,GAAG,UAAU,GAAG,SAAS,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QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,eAAe,CAAC;IAIzM;;;;;;;;OAQG;IACH,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC;IAI1D,6EAA6E;IAC7E,yBAAyB,IAAI,OAAO,CAAC,eAAe,CAAC;IAIrD,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC;IAInC,YAAY,IAAI,OAAO,CAAC,cAAc,CAAC;IAIvC,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC;IAIzC,cAAc,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAI5C,iBAAiB,CAAC,KAAK,EAAE,gCAAgC,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAI/F,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;CAGrC;AAmBD,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,aAAa,GAAG,IAAI,CAOjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClaudeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/ClaudeSection.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAmCjF,wBAAgB,aAAa,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"ClaudeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/ClaudeSection.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAmCjF,wBAAgB,aAAa,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CA6Z3G"}
|
|
@@ -43,9 +43,6 @@ export declare const zh: {
|
|
|
43
43
|
readonly importClaudeCode: "导入本机 Claude Code 登录态";
|
|
44
44
|
readonly importing: "导入中...";
|
|
45
45
|
readonly stopImporting: "停止导入";
|
|
46
|
-
readonly importHint: "读取本机 Claude Code 的登录凭据,作为只读快照加入账号池。不会修改、移动或删除 Claude Code 自己的文件,停止导入只是让本插件忘记这份快照。";
|
|
47
|
-
readonly importUnavailable: "未找到可导入的本机 Claude Code 登录态。";
|
|
48
|
-
readonly importSearched: "查找位置:{paths}";
|
|
49
46
|
readonly connection: "连接";
|
|
50
47
|
readonly testConnection: "测试连接";
|
|
51
48
|
readonly testingConnection: "测试中...";
|
|
@@ -193,9 +190,6 @@ export declare const dictionaries: {
|
|
|
193
190
|
readonly importClaudeCode: "导入本机 Claude Code 登录态";
|
|
194
191
|
readonly importing: "导入中...";
|
|
195
192
|
readonly stopImporting: "停止导入";
|
|
196
|
-
readonly importHint: "读取本机 Claude Code 的登录凭据,作为只读快照加入账号池。不会修改、移动或删除 Claude Code 自己的文件,停止导入只是让本插件忘记这份快照。";
|
|
197
|
-
readonly importUnavailable: "未找到可导入的本机 Claude Code 登录态。";
|
|
198
|
-
readonly importSearched: "查找位置:{paths}";
|
|
199
193
|
readonly connection: "连接";
|
|
200
194
|
readonly testConnection: "测试连接";
|
|
201
195
|
readonly testingConnection: "测试中...";
|
|
@@ -341,9 +335,6 @@ export declare const dictionaries: {
|
|
|
341
335
|
readonly importClaudeCode: "导入本机 Claude Code 登录态";
|
|
342
336
|
readonly importing: "导入中...";
|
|
343
337
|
readonly stopImporting: "停止导入";
|
|
344
|
-
readonly importHint: "读取本机 Claude Code 的登录凭据,作为只读快照加入账号池。不会修改、移动或删除 Claude Code 自己的文件,停止导入只是让本插件忘记这份快照。";
|
|
345
|
-
readonly importUnavailable: "未找到可导入的本机 Claude Code 登录态。";
|
|
346
|
-
readonly importSearched: "查找位置:{paths}";
|
|
347
338
|
readonly connection: "连接";
|
|
348
339
|
readonly testConnection: "测试连接";
|
|
349
340
|
readonly testingConnection: "测试中...";
|
|
@@ -452,8 +443,8 @@ export declare const dictionaries: {
|
|
|
452
443
|
readonly quotaFactsScope: string;
|
|
453
444
|
readonly composerLabel: string;
|
|
454
445
|
};
|
|
455
|
-
en: Record<"account" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "
|
|
456
|
-
'en-US': Record<"account" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "
|
|
446
|
+
en: Record<"account" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "source" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "stopImporting" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "now" | "planUnknown" | "subscriptionType" | "sourceManaged" | "sourceClaudeCode" | "adoptedBadge" | "signInSection" | "cancelSignIn" | "openAuthorizeUrl" | "authorizeUrl" | "redirectUri" | "loginModeManual" | "loginModeLoopback" | "loginFallbackReason" | "loginWaiting" | "loginExchanging" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "importClaudeCode" | "importing" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "testRetryable" | "testNotRetryable" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "capImage" | "capNoImage" | "capThinkingOff" | "thinkingModeMidConvo" | "thinkingModeAdaptive" | "thinkingModeBudget" | "thinkingModeNone" | "cacheTtl" | "cacheTtlHint" | "cacheTtlSubscription" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "modelLadders" | "modelLadderNone" | "quotaUnknown" | "quotaUnknownHint" | "usedLabel" | "remainingLabel" | "left" | "resetAt" | "resetUnknown" | "observedAt" | "quotaError" | "extraUsage" | "extraUsageEnabled" | "extraUsageDisabled" | "extraUsageLimit" | "sourceUsage" | "sourceHeaders" | "quotaStatus" | "quotaRepresentative" | "copy" | "copied", string>;
|
|
447
|
+
'en-US': Record<"account" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "source" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "stopImporting" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "now" | "planUnknown" | "subscriptionType" | "sourceManaged" | "sourceClaudeCode" | "adoptedBadge" | "signInSection" | "cancelSignIn" | "openAuthorizeUrl" | "authorizeUrl" | "redirectUri" | "loginModeManual" | "loginModeLoopback" | "loginFallbackReason" | "loginWaiting" | "loginExchanging" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "importClaudeCode" | "importing" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "testRetryable" | "testNotRetryable" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "capImage" | "capNoImage" | "capThinkingOff" | "thinkingModeMidConvo" | "thinkingModeAdaptive" | "thinkingModeBudget" | "thinkingModeNone" | "cacheTtl" | "cacheTtlHint" | "cacheTtlSubscription" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "modelLadders" | "modelLadderNone" | "quotaUnknown" | "quotaUnknownHint" | "usedLabel" | "remainingLabel" | "left" | "resetAt" | "resetUnknown" | "observedAt" | "quotaError" | "extraUsage" | "extraUsageEnabled" | "extraUsageDisabled" | "extraUsageLimit" | "sourceUsage" | "sourceHeaders" | "quotaStatus" | "quotaRepresentative" | "copy" | "copied", string>;
|
|
457
448
|
};
|
|
458
449
|
export type ClaudeLocaleKey = keyof typeof zh;
|
|
459
450
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/locales.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,eAAe,CAAA;AAErC,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/locales.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,eAAe,CAAA;AAErC,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2IL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAiIrC,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,EAAE,CAAA"}
|
|
@@ -146,6 +146,12 @@ export declare const zh: {
|
|
|
146
146
|
readonly hubSwitchOn: "启用 {name}";
|
|
147
147
|
readonly hubSwitchOff: "停用 {name}";
|
|
148
148
|
readonly hubCardLabel: "{name},{annotation}";
|
|
149
|
+
readonly localCodexLoginImport: "导入本机 Codex CLI 登录";
|
|
150
|
+
readonly localCodexLoginImporting: "导入中…";
|
|
151
|
+
readonly stopImporting: "停止导入全部本机登录";
|
|
152
|
+
readonly stopImportingLabel: "停止导入全部本机登录(当前 {count} 个)";
|
|
153
|
+
readonly stopImportingBusy: "停止导入中…";
|
|
154
|
+
readonly stopImportingHint: "停止导入只会让本插件忘记本机 CLI 登录的副本;Codex CLI 自己的登录文件不会被删除或修改。账号池不允许逐条删除借来的凭据,所以这里一次会停止全部导入。";
|
|
149
155
|
readonly modelChecklistCount: "已启用 {count}/{total}";
|
|
150
156
|
readonly accountPool: string;
|
|
151
157
|
readonly addAccount: string;
|
|
@@ -326,6 +332,12 @@ export declare const dictionaries: {
|
|
|
326
332
|
readonly hubSwitchOn: "启用 {name}";
|
|
327
333
|
readonly hubSwitchOff: "停用 {name}";
|
|
328
334
|
readonly hubCardLabel: "{name},{annotation}";
|
|
335
|
+
readonly localCodexLoginImport: "导入本机 Codex CLI 登录";
|
|
336
|
+
readonly localCodexLoginImporting: "导入中…";
|
|
337
|
+
readonly stopImporting: "停止导入全部本机登录";
|
|
338
|
+
readonly stopImportingLabel: "停止导入全部本机登录(当前 {count} 个)";
|
|
339
|
+
readonly stopImportingBusy: "停止导入中…";
|
|
340
|
+
readonly stopImportingHint: "停止导入只会让本插件忘记本机 CLI 登录的副本;Codex CLI 自己的登录文件不会被删除或修改。账号池不允许逐条删除借来的凭据,所以这里一次会停止全部导入。";
|
|
329
341
|
readonly modelChecklistCount: "已启用 {count}/{total}";
|
|
330
342
|
readonly accountPool: string;
|
|
331
343
|
readonly addAccount: string;
|
|
@@ -356,6 +368,6 @@ export declare const dictionaries: {
|
|
|
356
368
|
readonly quotaFactsScope: string;
|
|
357
369
|
readonly composerLabel: string;
|
|
358
370
|
};
|
|
359
|
-
en: Record<"stale" | "quota" | "account" | "rotationStrategy" | "pending" | "accountId" | "relogin" | "used" | "tokens" | "title" | "hubTitle" | "intro" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "cancel" | "signOut" | "refreshToken" | "popupBlocked" | "continueLogin" | "loading" | "connection" | "testConnection" | "testing" | "latency" | "selectAll" | "unselectAll" | "models" | "modelsHint" | "proxySettings" | "proxyMode" | "proxyModeHint" | "proxyModeAuto" | "proxyModeCustom" | "proxyModeDirect" | "customProxyUrl" | "customProxyUrlHint" | "customProxyUrlPlaceholder" | "saveProxyUrl" | "proxyDetected" | "proxyDetectedEffective" | "proxyNoneDetected" | "proxyDirectHint" | "enhancements" | "fastMode" | "fastModeHint" | "outputVerbosity" | "outputVerbosityHint" | "verbosityLow" | "verbosityMedium" | "verbosityHigh" | "reasoningSummary" | "reasoningSummaryHint" | "summaryAuto" | "summaryConcise" | "summaryDetailed" | "summaryNone" | "searchProvider" | "searchProviderHint" | "searchProviderDsh" | "searchProviderCodex" | "fetchStatus" | "fetchStatusHint" | "fetchConfiguredProvider" | "fetchProviderDshDefault" | "switcherState" | "switcherStateIdle" | "switcherStateApplying" | "switcherStateApplied" | "switcherStateMissing" | "switcherStateFailed" | "fetchMode" | "fetchModeAuto" | "fetchModePlugin" | "fetchModeDsh" | "fetchMaxBodyChars" | "fetchMaxResponseBytes" | "characters" | "bytes" | "fetchLimitsInactive" | "fetchConfigSource" | "providerDefault" | "contextWindows" | "contextWindowsHint" | "contextWindow" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "contextWindowsNoneEnabled" | "saveContextWindow" | "save" | "quickQuota" | "quickQuotaHint" | "quotaIntro" | "refreshQuota" | "refreshing" | "noQuota" | "quotaSignedOut" | "updated" | "primary" | "secondary" | "limitWindow" | "remaining" | "available" | "unavailable" | "unlimited" | "credits" | "monthlySpend" | "resetCredits" | "resetCreditExpires" | "useResetCredit" | "usingResetCredit" | "useResetCreditConfirm" | "resetCreditUsed" | "spendControlReached" | "limit" | "exhausted" | "resets" | "quickQuotaLabel" | "quickQuotaLoading" | "imageToolRunning" | "imageToolDone" | "imageToolFailed" | "image" | "openImage" | "openNamedImage" | "imageLoading" | "imageLoadFailed" | "imagePreviewClose" | "imagePreviewOpenOriginal" | "retry" | "unknown" | "hubBack" | "hubOverviewHint" | "hubAccountCount" | "hubNoAccounts" | "hubStateEnabled" | "hubStateDisabled" | "hubModelsEnabled" | "hubModelsEnabledOfTotal" | "hubStatusFailed" | "hubSwitchOn" | "hubSwitchOff" | "hubCardLabel" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel", string>;
|
|
371
|
+
en: Record<"stale" | "quota" | "account" | "rotationStrategy" | "pending" | "accountId" | "relogin" | "used" | "tokens" | "title" | "hubTitle" | "intro" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "cancel" | "signOut" | "refreshToken" | "popupBlocked" | "continueLogin" | "loading" | "connection" | "testConnection" | "testing" | "latency" | "selectAll" | "unselectAll" | "models" | "modelsHint" | "proxySettings" | "proxyMode" | "proxyModeHint" | "proxyModeAuto" | "proxyModeCustom" | "proxyModeDirect" | "customProxyUrl" | "customProxyUrlHint" | "customProxyUrlPlaceholder" | "saveProxyUrl" | "proxyDetected" | "proxyDetectedEffective" | "proxyNoneDetected" | "proxyDirectHint" | "enhancements" | "fastMode" | "fastModeHint" | "outputVerbosity" | "outputVerbosityHint" | "verbosityLow" | "verbosityMedium" | "verbosityHigh" | "reasoningSummary" | "reasoningSummaryHint" | "summaryAuto" | "summaryConcise" | "summaryDetailed" | "summaryNone" | "searchProvider" | "searchProviderHint" | "searchProviderDsh" | "searchProviderCodex" | "fetchStatus" | "fetchStatusHint" | "fetchConfiguredProvider" | "fetchProviderDshDefault" | "switcherState" | "switcherStateIdle" | "switcherStateApplying" | "switcherStateApplied" | "switcherStateMissing" | "switcherStateFailed" | "fetchMode" | "fetchModeAuto" | "fetchModePlugin" | "fetchModeDsh" | "fetchMaxBodyChars" | "fetchMaxResponseBytes" | "characters" | "bytes" | "fetchLimitsInactive" | "fetchConfigSource" | "providerDefault" | "contextWindows" | "contextWindowsHint" | "contextWindow" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "contextWindowsNoneEnabled" | "saveContextWindow" | "save" | "quickQuota" | "quickQuotaHint" | "quotaIntro" | "refreshQuota" | "refreshing" | "noQuota" | "quotaSignedOut" | "updated" | "primary" | "secondary" | "limitWindow" | "remaining" | "available" | "unavailable" | "unlimited" | "credits" | "monthlySpend" | "resetCredits" | "resetCreditExpires" | "useResetCredit" | "usingResetCredit" | "useResetCreditConfirm" | "resetCreditUsed" | "spendControlReached" | "limit" | "exhausted" | "resets" | "quickQuotaLabel" | "quickQuotaLoading" | "imageToolRunning" | "imageToolDone" | "imageToolFailed" | "image" | "openImage" | "openNamedImage" | "imageLoading" | "imageLoadFailed" | "imagePreviewClose" | "imagePreviewOpenOriginal" | "retry" | "unknown" | "hubBack" | "hubOverviewHint" | "hubAccountCount" | "hubNoAccounts" | "hubStateEnabled" | "hubStateDisabled" | "hubModelsEnabled" | "hubModelsEnabledOfTotal" | "hubStatusFailed" | "hubSwitchOn" | "hubSwitchOff" | "hubCardLabel" | "localCodexLoginImport" | "localCodexLoginImporting" | "stopImporting" | "stopImportingLabel" | "stopImportingBusy" | "stopImportingHint" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel", string>;
|
|
360
372
|
};
|
|
361
373
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE,EAAG,0BAAmC,CAAA;AAIrD,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE,EAAG,0BAAmC,CAAA;AAIrD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqKL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAmK9C,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAA;AACvC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAA"}
|
|
@@ -179,10 +179,11 @@
|
|
|
179
179
|
* TWO KINDS OF ROW ARE NOT FULLY TRANSCRIBED, and they are different things.
|
|
180
180
|
* Do not collapse them.
|
|
181
181
|
*
|
|
182
|
-
* 1. `claude-sonnet-5-5` — the snapshot this table
|
|
183
|
-
* entry for
|
|
184
|
-
* the vendor's own documentation and no
|
|
185
|
-
* mirror list in the test is
|
|
182
|
+
* 1. `claude-sonnet-5-5` and `claude-haiku-5-5` — the snapshot this table
|
|
183
|
+
* was copied from has no entry for either, so each whole row is CURATED:
|
|
184
|
+
* every value below comes from the vendor's own documentation and no
|
|
185
|
+
* snapshot field can check it. The mirror list in the test is
|
|
186
|
+
* `LOCALLY_CURATED_MODEL_IDS`.
|
|
186
187
|
*
|
|
187
188
|
* 2. `claude-opus-5-5` — a NEWER snapshot (pi-ai >= 0.87.1) does carry it, so
|
|
188
189
|
* the row sits in the snapshot's own position and EVERY field is checked
|
|
@@ -195,22 +196,35 @@
|
|
|
195
196
|
* stands. The test asserts the row still disagrees with the snapshot, so a
|
|
196
197
|
* future snapshot that agrees fails loudly and retires the entry.
|
|
197
198
|
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* is
|
|
201
|
-
*
|
|
199
|
+
* 3. `claude-haiku-5-5` (released 2026-10-07) is the second fully curated
|
|
200
|
+
* row, and the first one whose documented `canDisableThinking` is TRUE. That
|
|
201
|
+
* flag is not a free choice here and the row's own comment records why the
|
|
202
|
+
* documented answer is safe to send: `thinking: { type: 'disabled' }` is
|
|
203
|
+
* accepted at `low`/`medium`/`high` and is a 400 at `xhigh`/`max`, and this
|
|
204
|
+
* line only sends that form when the caller asked for thinking OFF, in which
|
|
205
|
+
* case it names no effort at all and the server's own default (`medium`) is
|
|
206
|
+
* what the request runs at. Its documented default effort is MEDIUM, so it is
|
|
207
|
+
* 'adaptive' rather than 'mid-convo' for exactly the reason Opus 5.5 is —
|
|
208
|
+
* 'mid-convo' would force `high` — and it runs the preserved-thinking prefix
|
|
209
|
+
* check, so `bindsThinkingToPrefix` is set even though the form is adaptive.
|
|
210
|
+
*
|
|
211
|
+
* All three must be changed together with the mirror list in the test. An
|
|
212
|
+
* invented row that mimics the format of a checked one is worse than a missing
|
|
213
|
+
* row: it is unverifiable and it looks verified. So each row is marked at the
|
|
214
|
+
* row itself, the test asserts the id is on the curated list, and the test
|
|
202
215
|
* asserts the curated list is exactly the ids the snapshot lacks — which keeps
|
|
203
216
|
* the lock narrow instead of merely weaker.
|
|
204
217
|
*
|
|
205
|
-
*
|
|
206
|
-
* (the model overview page plus the extended-thinking
|
|
207
|
-
* snapshot, and they are the values a person read off
|
|
218
|
+
* `claude-sonnet-5-5`'s fields come from the vendor's own published
|
|
219
|
+
* documentation for the model (the model overview page plus the extended-thinking
|
|
220
|
+
* effort page), NOT from the snapshot, and they are the values a person read off
|
|
221
|
+
* those pages. That is a
|
|
208
222
|
* weaker source than the snapshot and it is labelled as such: nothing here
|
|
209
223
|
* proves the account is entitled to the model, and the server's own
|
|
210
224
|
* `GET /v1/models` still outranks it.
|
|
211
225
|
*
|
|
212
|
-
* Two of
|
|
213
|
-
* like mistakes against their neighbours:
|
|
226
|
+
* Two of that row's fields are the ones worth recording a WHY for, because both
|
|
227
|
+
* look like mistakes against their neighbours:
|
|
214
228
|
*
|
|
215
229
|
* 1. `canDisableThinking: false`. The vendor documents that thinking cannot be
|
|
216
230
|
* turned off on this model at all: sending `thinking: { type: 'disabled' }`
|
|
@@ -236,9 +250,10 @@
|
|
|
236
250
|
* A future reader who notices the shared `supportsTemperature: false` and
|
|
237
251
|
* "fixes" item 2 to 'mid-convo' has reintroduced exactly that bug.
|
|
238
252
|
*
|
|
239
|
-
* One more field on
|
|
240
|
-
* floor is the number upstream itself states when it refuses
|
|
241
|
-
* (`claude_code_version_too_old`, "version 2.1.280 or newer is
|
|
253
|
+
* One more field on `claude-opus-5-5` comes from neither source: its
|
|
254
|
+
* `minCliVersion` floor is the number upstream itself states when it refuses
|
|
255
|
+
* the model (`claude_code_version_too_old`, "version 2.1.280 or newer is
|
|
256
|
+
* required"). That
|
|
242
257
|
* is a stronger witness than a documentation page — the server said it — and it
|
|
243
258
|
* is recorded here so a claim below it is refused locally, before the request is
|
|
244
259
|
* sent, instead of as an upstream 400 that names neither the model nor the number
|
|
@@ -310,8 +325,8 @@ export interface ClaudeModelEntry {
|
|
|
310
325
|
minCliVersion?: string;
|
|
311
326
|
/**
|
|
312
327
|
* Whether the vendor documents this model as running the preserved-thinking
|
|
313
|
-
* PREFIX CHECK (today: Fable 5.1, Opus 5.5, Sonnet 5.5). On accounts
|
|
314
|
-
* or after 2026-08-31 a replayed thinking block whose prefix (system, tools,
|
|
328
|
+
* PREFIX CHECK (today: Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5). On accounts
|
|
329
|
+
* created on or after 2026-08-31 a replayed thinking block whose prefix (system, tools,
|
|
315
330
|
* earlier messages) changed is then a 400 on every retry, unless the request
|
|
316
331
|
* sets `block_binding.prefix_mismatch_behavior: 'drop_block'`. DSH edits that
|
|
317
332
|
* prefix in normal use (compaction, a changed tool list, image offload), so
|
|
@@ -321,8 +336,8 @@ export interface ClaudeModelEntry {
|
|
|
321
336
|
bindsThinkingToPrefix?: boolean;
|
|
322
337
|
}
|
|
323
338
|
/**
|
|
324
|
-
*
|
|
325
|
-
* followed by the
|
|
339
|
+
* Seventeen rows: the snapshot's own 15, in the snapshot's own declaration order,
|
|
340
|
+
* followed by the two rows the snapshot still predates (see LOCAL ADDITIONS above).
|
|
326
341
|
*
|
|
327
342
|
* The order matters and is not cosmetic. The test asserts the snapshot's ids
|
|
328
343
|
* appear in the table as a SUBSEQUENCE, so a curated row may be appended or
|
|
@@ -372,6 +387,13 @@ export declare const FALLBACK_MODELS: readonly ClaudeModelEntry[];
|
|
|
372
387
|
* than one that leads with the general-purpose ids. The rest stay selectable
|
|
373
388
|
* from the model card and are one click away.
|
|
374
389
|
*
|
|
390
|
+
* The list tracks ONE current model per family rather than the newest of each,
|
|
391
|
+
* so a slot follows its family's newest release in place instead of growing: the
|
|
392
|
+
* Haiku slot is `claude-haiku-5-5`, which replaced `claude-haiku-4-5` when that
|
|
393
|
+
* model shipped. That is a deliberate swap and not a silent append — a list that
|
|
394
|
+
* offered both generations of every family would be longer than the picker it
|
|
395
|
+
* feeds, and the older Haiku stays one click away in the card.
|
|
396
|
+
*
|
|
375
397
|
* This list is the SHIPPED DEFAULT, and edits to it are a deliberate onboarding
|
|
376
398
|
* decision rather than a no-op: a stored list that still equals the shipped
|
|
377
399
|
* default counts as "never edited", and the routes and adapter read it that way
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/model-catalog.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/claude/model-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;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7G;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,gBAAgB,EAAE,GAAG,MAAM,GAAG,SAAS,CAGjH"}
|
|
@@ -168,14 +168,19 @@ export declare const ANTHROPIC_VERSION = "2023-06-01";
|
|
|
168
168
|
* table, whether or not a floor for that model has been observed: upstream has
|
|
169
169
|
* so far gated a new model on the release that added it (Opus 5.5 arrived in
|
|
170
170
|
* 2.1.280 and is refused below 2.1.280). Claude Sonnet 5.5 arrived in 2.1.284,
|
|
171
|
-
* so 2.1.283 could not be relied on to reach it
|
|
171
|
+
* so 2.1.283 could not be relied on to reach it. Claude Haiku 5.5 arrived in
|
|
172
|
+
* 2.1.293, so 2.1.292 could not be relied on to reach it either — and that is
|
|
173
|
+
* not hypothetical: when this row was added, npm's `stable` dist-tag was STILL
|
|
174
|
+
* sitting at 2.1.285, five releases below the one that ships the model, while
|
|
175
|
+
* `latest` was already 2.1.293. The warning above about reading `stable` is
|
|
176
|
+
* therefore about this table's own newest model, not a hypothetical.
|
|
172
177
|
*
|
|
173
178
|
* It is still not a literal that only moves when this package is republished: a
|
|
174
179
|
* user whose installed baseline has aged past the server's floor has to be able
|
|
175
180
|
* to raise it without waiting for a release. Read the effective value with
|
|
176
181
|
* {@link claudeCliVersion}, pin one with {@link setClaudeCliVersion}.
|
|
177
182
|
*/
|
|
178
|
-
export declare const CLAUDE_CLI_VERSION = "2.1.
|
|
183
|
+
export declare const CLAUDE_CLI_VERSION = "2.1.293";
|
|
179
184
|
/**
|
|
180
185
|
* Loopback callback port the subscription flow defaults to.
|
|
181
186
|
*
|
|
@@ -1 +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;AACh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
5
|
+
*
|
|
6
|
+
* - managed — signed in through this plugin. Its credential lives in the pool's
|
|
7
|
+
* encrypted storage AND in the pre-pool credential document beside it, it is
|
|
8
|
+
* refreshable, and deleting it is this plugin's business.
|
|
9
|
+
* - adopted — a SNAPSHOT read out of a local Codex CLI sign-in by 'codex-adopt.ts'
|
|
10
|
+
* (marker 'adopted: true', source 'codex'). It is used only while its own access
|
|
11
|
+
* token is still valid.
|
|
12
|
+
*
|
|
13
|
+
* An adopted snapshot is NEVER refreshed, and the reason is not an optimisation:
|
|
14
|
+
* the ChatGPT refresh token the CLI stores rotates, and the CLI refreshes its own
|
|
15
|
+
* file in place. Two processes spending one grant invalidate each other, and
|
|
16
|
+
* whoever loses the race holds a token the server has already retired — which
|
|
17
|
+
* leaves the user signed OUT of the Codex CLI by this plugin's good intentions. An
|
|
18
|
+
* in-process single-flight cannot fix that, because the race is across PROCESSES
|
|
19
|
+
* and the only state they share is a file 'codex-adopt.ts' must never write. Once
|
|
20
|
+
* such a snapshot has expired the pool takes it out of rotation and surfaces
|
|
21
|
+
* ADOPTED_CODEX_CREDENTIAL_EXPIRED_HINT — sign in again in the CODEX CLI and
|
|
22
|
+
* re-import, not here.
|
|
23
|
+
*
|
|
24
|
+
* The rule is enforced twice on purpose: the needsRefresh hook answers false for
|
|
25
|
+
* an adopted credential no matter what its expiry says, and the refresh hook
|
|
26
|
+
* itself refuses one, so a future caller that forgets the first fails loudly
|
|
27
|
+
* instead of silently spending a grant that is not ours to spend.
|
|
28
|
+
*
|
|
29
|
+
* MANAGED BEATS ADOPTED on a conflict, and the marker is therefore written on
|
|
30
|
+
* EVERY account this file creates, including the explicit false case: the core
|
|
31
|
+
* merges a re-authorization as { ...existing, ...created }, so an omitted key
|
|
32
|
+
* would leave a stored 'adopted: true' — and its never-refresh consequence — on a
|
|
33
|
+
* record that is now plugin-owned.
|
|
34
|
+
*/
|
|
1
35
|
import { AccountPoolCore, type PoolAccountShape, type PoolData } from './common/account-pool.ts';
|
|
2
36
|
import { type CredentialStore, type StoredOAuthCredentials, type TokenStore } from './token-store.ts';
|
|
3
37
|
import { ConcurrencyGate } from './common/concurrency-gate.ts';
|
|
4
38
|
import type { AccountRotationStrategy, PoolAccountQuotaDto, PoolAccountSummaryDto } from '../shared/account-pool-contracts.ts';
|
|
5
39
|
import type { QuotaUsageDto } from '../shared/contracts.ts';
|
|
40
|
+
import { CODEX_CLI_CREDENTIAL_SOURCE } from './codex-adopt.ts';
|
|
41
|
+
/** Where a pooled account's credential came from. */
|
|
42
|
+
export type CodexPoolAccountSource = 'managed' | typeof CODEX_CLI_CREDENTIAL_SOURCE;
|
|
6
43
|
/** One pooled ChatGPT account: the credential plus the facts the card renders. */
|
|
7
44
|
export interface CodexPoolAccount extends PoolAccountShape<StoredOAuthCredentials> {
|
|
45
|
+
/**
|
|
46
|
+
* Which store owns the credential. Only managed rows may be refreshed.
|
|
47
|
+
*
|
|
48
|
+
* Derived from the credential rather than trusted from the row, so the two
|
|
49
|
+
* spellings of the marker can never disagree about one account.
|
|
50
|
+
*/
|
|
51
|
+
source: CodexPoolAccountSource;
|
|
52
|
+
/**
|
|
53
|
+
* Whether this row is a borrowed snapshot.
|
|
54
|
+
*
|
|
55
|
+
* Required rather than optional: every construction site has to state it, which
|
|
56
|
+
* is what keeps a stale true from surviving an in-place re-authorization.
|
|
57
|
+
*/
|
|
58
|
+
adopted: boolean;
|
|
59
|
+
/** The Codex CLI file an adopted snapshot was read from; absent for managed rows. */
|
|
60
|
+
sourcePath?: string;
|
|
8
61
|
email?: string;
|
|
9
62
|
planType?: string;
|
|
10
63
|
accountId?: string;
|
|
11
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Whether a pooled credential is an adopted snapshot.
|
|
67
|
+
*
|
|
68
|
+
* The two fields, and only those two: a plain credential carries no 'adopted'
|
|
69
|
+
* field and must never be mistaken for a snapshot, because treating a
|
|
70
|
+
* plugin-owned account as a disposable one would freeze it out of refreshing and
|
|
71
|
+
* make deleteAccount refuse to remove an account the user signed in here.
|
|
72
|
+
*/
|
|
73
|
+
export declare function isAdoptedCodexPoolCredential(credentials: StoredOAuthCredentials): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Whether a credential must be refreshed before the next request.
|
|
76
|
+
*
|
|
77
|
+
* FALSE for every adopted snapshot, valid or expired. That is this pool's core
|
|
78
|
+
* rule: an adopted credential is borrowed for exactly as long as the Codex CLI
|
|
79
|
+
* vouched for it, and this pool has no business rotating a token another process
|
|
80
|
+
* is rotating too. See the module comment.
|
|
81
|
+
*/
|
|
82
|
+
export declare function codexNeedsRefresh(credentials: StoredOAuthCredentials, now: number): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Why a stored credential is already known to be unusable, or nothing.
|
|
85
|
+
*
|
|
86
|
+
* Reported purely — nothing is written here — and consulted by the core for both
|
|
87
|
+
* routing eligibility and credential usability, which is what makes an expired
|
|
88
|
+
* snapshot non-routable WITHOUT a write on every read. The hint names the remedy
|
|
89
|
+
* in the Codex CLI, because that is where the user has to go: re-adopting here is
|
|
90
|
+
* only possible after the CLI itself signed in again.
|
|
91
|
+
*/
|
|
92
|
+
export declare function codexAuthRejectedReason(credentials: StoredOAuthCredentials): string | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Message raised if a refresh of a still-valid adopted snapshot were attempted.
|
|
95
|
+
*
|
|
96
|
+
* Unreachable through this pool's own paths (see the module comment); it exists
|
|
97
|
+
* because 'unreachable' is a claim the guard has to be able to make good on.
|
|
98
|
+
*/
|
|
99
|
+
export declare const ADOPTED_NEVER_REFRESHED_MESSAGE: string;
|
|
100
|
+
/** Raised when a refresh of an adopted snapshot is attempted. Never a 401. */
|
|
101
|
+
export declare class CodexAdoptedCredentialError extends Error {
|
|
102
|
+
constructor(message: string);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* One account as the ChatGPT settings card renders it.
|
|
106
|
+
*
|
|
107
|
+
* Declared here rather than under 'src/shared/', for the same reason the Claude
|
|
108
|
+
* line declares its own: source and provenance are this pool's vocabulary, and a
|
|
109
|
+
* second copy in the shared contracts module is one that can drift. The base is
|
|
110
|
+
* the shared summary, so every existing consumer of listAccounts() keeps working
|
|
111
|
+
* unchanged — the extra fields are additive.
|
|
112
|
+
*/
|
|
113
|
+
export interface CodexAccountSummaryDto extends PoolAccountSummaryDto {
|
|
114
|
+
/** Where the credential came from; a card offers different actions per source. */
|
|
115
|
+
source?: CodexPoolAccountSource;
|
|
116
|
+
/** Whether this row is a snapshot borrowed from a local Codex CLI sign-in. */
|
|
117
|
+
adopted?: boolean;
|
|
118
|
+
/** The Codex CLI file an adopted snapshot was read from. */
|
|
119
|
+
sourcePath?: string;
|
|
120
|
+
}
|
|
12
121
|
/** Encrypted pool file the ChatGPT line owns; the single-credential store stays the mirror. */
|
|
13
122
|
export declare function codexPoolPath(): string;
|
|
14
123
|
/** Validate and normalize one whole pool document. */
|
|
@@ -40,7 +149,7 @@ export declare function codexAccountQuota(snapshot: {
|
|
|
40
149
|
usage: QuotaUsageDto;
|
|
41
150
|
fetchedAt: number;
|
|
42
151
|
}): PoolAccountQuotaDto | undefined;
|
|
43
|
-
export declare class CodexAccountPool extends AccountPoolCore<StoredOAuthCredentials, CodexPoolAccount,
|
|
152
|
+
export declare class CodexAccountPool extends AccountPoolCore<StoredOAuthCredentials, CodexPoolAccount, CodexAccountSummaryDto> {
|
|
44
153
|
private readonly refresherRef;
|
|
45
154
|
private readonly store;
|
|
46
155
|
private readonly quotaSnapshotRef;
|
|
@@ -75,6 +184,25 @@ export declare class CodexAccountPool extends AccountPoolCore<StoredOAuthCredent
|
|
|
75
184
|
* expiry, but a server-side revocation is only discovered by the request.
|
|
76
185
|
*/
|
|
77
186
|
refreshAccountNow(accountId: string): Promise<StoredOAuthCredentials>;
|
|
187
|
+
/**
|
|
188
|
+
* Remove one account inside a transaction, refusing a borrowed snapshot.
|
|
189
|
+
*
|
|
190
|
+
* The check lives HERE rather than in the public delete method so it cannot be
|
|
191
|
+
* separated from the removal by a concurrent change, and so every caller of the
|
|
192
|
+
* core's own deletion inherits it. The remedy is a separate action
|
|
193
|
+
* ({@link removeImportedAccount}): a card must not destroy an account this plugin
|
|
194
|
+
* did not create with the same button that deletes its own.
|
|
195
|
+
*/
|
|
196
|
+
protected deleteAccountFromPool(data: PoolData<CodexPoolAccount>, accountId: string): void;
|
|
197
|
+
/**
|
|
198
|
+
* Drop an imported snapshot from the pool — the card's 'remove import' action.
|
|
199
|
+
*
|
|
200
|
+
* Separate from {@link deleteAccount} because that refuses one, and because the
|
|
201
|
+
* user is asking to stop borrowing a sign-in, not to sign out of an account. The
|
|
202
|
+
* Codex CLI's own file is touched by neither path: not deleted, not rewritten,
|
|
203
|
+
* not moved. This only forgets the copy.
|
|
204
|
+
*/
|
|
205
|
+
removeImportedAccount(accountId: string): Promise<void>;
|
|
78
206
|
/** The single-credential store this pool mirrors its primary account into. */
|
|
79
207
|
mirrorStore(): TokenStore;
|
|
80
208
|
/** Rotation strategy currently configured. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-account-pool.d.ts","sourceRoot":"","sources":["../../../src/host/codex-account-pool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codex-account-pool.d.ts","sourceRoot":"","sources":["../../../src/host/codex-account-pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAKH,OAAO,EACL,eAAe,EAGf,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAE9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAC9H,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,w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