@eddyskywalker/dsh-chatgpt-subscription 0.10.1 → 0.10.6
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 +13 -0
- package/lib/client.js +109 -0
- package/lib/client.js.map +1 -1
- package/lib/index.js +1185 -357
- package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts.map +1 -1
- package/lib/types/client/minimax-code/locales.d.ts +38 -2
- package/lib/types/client/minimax-code/locales.d.ts.map +1 -1
- package/lib/types/host/minimax-code/adapter.d.ts.map +1 -1
- package/lib/types/host/minimax-code/checkin-gateway.d.ts +109 -0
- package/lib/types/host/minimax-code/checkin-gateway.d.ts.map +1 -0
- package/lib/types/host/minimax-code/checkin.d.ts +150 -0
- package/lib/types/host/minimax-code/checkin.d.ts.map +1 -0
- package/lib/types/host/minimax-code/mapper.d.ts +52 -23
- package/lib/types/host/minimax-code/mapper.d.ts.map +1 -1
- package/lib/types/host/minimax-code/routes.d.ts +3 -0
- package/lib/types/host/minimax-code/routes.d.ts.map +1 -1
- package/lib/types/host/minimax-code/token-store.d.ts +15 -0
- package/lib/types/host/minimax-code/token-store.d.ts.map +1 -1
- package/lib/types/host/minimax-code/types.d.ts +25 -9
- package/lib/types/host/minimax-code/types.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/minimax-code-contracts.d.ts +43 -0
- package/lib/types/shared/minimax-code-contracts.d.ts.map +1 -1
- package/package.json +31 -31
- package/lib/types/host/claude/__probe-assert.d.ts +0 -2
- package/lib/types/host/claude/__probe-assert.d.ts.map +0 -1
- package/lib/types/shared/__probe-claude-import.d.ts +0 -2
- package/lib/types/shared/__probe-claude-import.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinimaxCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/MinimaxCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AACvE,OAAO,EAIL,KAAK,4BAA4B,EAGlC,MAAM,wCAAwC,CAAA;AAa/C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"MinimaxCodeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/MinimaxCodeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AACvE,OAAO,EAIL,KAAK,4BAA4B,EAGlC,MAAM,wCAAwC,CAAA;AAa/C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAiDjC;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOlE;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AA0CD;;;;;;;GAOG;AACH,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;CAC3B;AAED;;;;;;;;;;GAUG;AACH,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,OAAO,EAAE,KAAK,MAAM,CAAA;AAKjD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAK7E;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,4BAA4B,GAAG,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAOpG;AAWD,wBAAgB,kBAAkB,CAAC,EAAE,aAAa,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA22B9E"}
|
|
@@ -53,6 +53,18 @@ export declare const zh: {
|
|
|
53
53
|
readonly modelsHint: "模型目录由本线路硬编码(MiniMax Code 未开放 /v1/models 接口),当前共 {count} 个可用模型。勾选后模型才会出现在对话页的模型选择列表中;未勾选或关闭下方「启用此供应商」可在列表中隐藏该线路。";
|
|
54
54
|
readonly modelsUnavailable: "暂无可显示的模型。";
|
|
55
55
|
readonly quotaSection: "用量与配额";
|
|
56
|
+
readonly dailyCheckin: "每日签到";
|
|
57
|
+
readonly checkinHint: "用本线路自己的登录态签到(与官方 MiniMax Code 客户端同一条接口)。DSH 启动时自动签到一次,运行期间每 10 分钟补检,进程关闭的当天不会签到。";
|
|
58
|
+
readonly checkinAuto: "自动签到";
|
|
59
|
+
readonly checkinToday: "今日已签 {done}/{total}";
|
|
60
|
+
readonly checkinSkipped: "{count} 个暂不可签";
|
|
61
|
+
readonly checkinFailed: "{count} 个失败";
|
|
62
|
+
readonly checkinStreak: "连续 {days} 天";
|
|
63
|
+
readonly checkinClaimed: "本轮 +{points} 积分";
|
|
64
|
+
readonly checkinLastRun: "上次运行:{time}";
|
|
65
|
+
readonly checkinNever: "尚未运行";
|
|
66
|
+
readonly checkinNow: "立即签到";
|
|
67
|
+
readonly checkinRunning: "签到中…";
|
|
56
68
|
readonly quotaUnavailable: "暂时没有用量数据。";
|
|
57
69
|
readonly quotaNeedsApiKey: "上游拒绝了这个登录态读取用量(官方客户端的用量端点要求带官方客户端标识头,本插件默认不伪造)。请在 MiniMax 控制台的用量条里查看 Token Plan 用量;如果你接受该取舍,可设 DSH_MINIMAX_CODE_QUOTA_ATTRIBUTION=1 后重试。";
|
|
58
70
|
readonly quotaUnreachable: "暂时读不到用量(用量端点未应答),稍后会自动重试。";
|
|
@@ -166,6 +178,18 @@ export declare const dictionaries: {
|
|
|
166
178
|
readonly modelsHint: "模型目录由本线路硬编码(MiniMax Code 未开放 /v1/models 接口),当前共 {count} 个可用模型。勾选后模型才会出现在对话页的模型选择列表中;未勾选或关闭下方「启用此供应商」可在列表中隐藏该线路。";
|
|
167
179
|
readonly modelsUnavailable: "暂无可显示的模型。";
|
|
168
180
|
readonly quotaSection: "用量与配额";
|
|
181
|
+
readonly dailyCheckin: "每日签到";
|
|
182
|
+
readonly checkinHint: "用本线路自己的登录态签到(与官方 MiniMax Code 客户端同一条接口)。DSH 启动时自动签到一次,运行期间每 10 分钟补检,进程关闭的当天不会签到。";
|
|
183
|
+
readonly checkinAuto: "自动签到";
|
|
184
|
+
readonly checkinToday: "今日已签 {done}/{total}";
|
|
185
|
+
readonly checkinSkipped: "{count} 个暂不可签";
|
|
186
|
+
readonly checkinFailed: "{count} 个失败";
|
|
187
|
+
readonly checkinStreak: "连续 {days} 天";
|
|
188
|
+
readonly checkinClaimed: "本轮 +{points} 积分";
|
|
189
|
+
readonly checkinLastRun: "上次运行:{time}";
|
|
190
|
+
readonly checkinNever: "尚未运行";
|
|
191
|
+
readonly checkinNow: "立即签到";
|
|
192
|
+
readonly checkinRunning: "签到中…";
|
|
169
193
|
readonly quotaUnavailable: "暂时没有用量数据。";
|
|
170
194
|
readonly quotaNeedsApiKey: "上游拒绝了这个登录态读取用量(官方客户端的用量端点要求带官方客户端标识头,本插件默认不伪造)。请在 MiniMax 控制台的用量条里查看 Token Plan 用量;如果你接受该取舍,可设 DSH_MINIMAX_CODE_QUOTA_ATTRIBUTION=1 后重试。";
|
|
171
195
|
readonly quotaUnreachable: "暂时读不到用量(用量端点未应答),稍后会自动重试。";
|
|
@@ -277,6 +301,18 @@ export declare const dictionaries: {
|
|
|
277
301
|
readonly modelsHint: "模型目录由本线路硬编码(MiniMax Code 未开放 /v1/models 接口),当前共 {count} 个可用模型。勾选后模型才会出现在对话页的模型选择列表中;未勾选或关闭下方「启用此供应商」可在列表中隐藏该线路。";
|
|
278
302
|
readonly modelsUnavailable: "暂无可显示的模型。";
|
|
279
303
|
readonly quotaSection: "用量与配额";
|
|
304
|
+
readonly dailyCheckin: "每日签到";
|
|
305
|
+
readonly checkinHint: "用本线路自己的登录态签到(与官方 MiniMax Code 客户端同一条接口)。DSH 启动时自动签到一次,运行期间每 10 分钟补检,进程关闭的当天不会签到。";
|
|
306
|
+
readonly checkinAuto: "自动签到";
|
|
307
|
+
readonly checkinToday: "今日已签 {done}/{total}";
|
|
308
|
+
readonly checkinSkipped: "{count} 个暂不可签";
|
|
309
|
+
readonly checkinFailed: "{count} 个失败";
|
|
310
|
+
readonly checkinStreak: "连续 {days} 天";
|
|
311
|
+
readonly checkinClaimed: "本轮 +{points} 积分";
|
|
312
|
+
readonly checkinLastRun: "上次运行:{time}";
|
|
313
|
+
readonly checkinNever: "尚未运行";
|
|
314
|
+
readonly checkinNow: "立即签到";
|
|
315
|
+
readonly checkinRunning: "签到中…";
|
|
280
316
|
readonly quotaUnavailable: "暂时没有用量数据。";
|
|
281
317
|
readonly quotaNeedsApiKey: "上游拒绝了这个登录态读取用量(官方客户端的用量端点要求带官方客户端标识头,本插件默认不伪造)。请在 MiniMax 控制台的用量条里查看 Token Plan 用量;如果你接受该取舍,可设 DSH_MINIMAX_CODE_QUOTA_ATTRIBUTION=1 后重试。";
|
|
282
318
|
readonly quotaUnreachable: "暂时读不到用量(用量端点未应答),稍后会自动重试。";
|
|
@@ -334,8 +370,8 @@ export declare const dictionaries: {
|
|
|
334
370
|
readonly expires: string;
|
|
335
371
|
readonly lastUsed: string;
|
|
336
372
|
};
|
|
337
|
-
en: Record<"
|
|
338
|
-
'en-US': Record<"
|
|
373
|
+
en: Record<"account" | "storage" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "expires" | "signIn" | "signOut" | "loading" | "connection" | "provider" | "connectionState" | "connected" | "untested" | "testConnection" | "enableProvider" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "unknown" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "storageNotice" | "email" | "lastUsed" | "pageDesc" | "signingIn" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "loginFailed" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "modelsSection" | "capImage" | "copied" | "openSignInPage" | "quotaUnlimited" | "region" | "regionGlobal" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "accountLabel" | "regionCn" | "storageNative" | "storageDpapi" | "storageFile" | "storagePath" | "expiresAt" | "expiresRemaining" | "expiresExpired" | "expiresHint" | "codeMinutes" | "loginExpired" | "loginDenied" | "logoutOwnedByApp" | "testSuccessModel" | "modelsUnavailable" | "dailyCheckin" | "checkinHint" | "checkinAuto" | "checkinToday" | "checkinSkipped" | "checkinFailed" | "checkinStreak" | "checkinClaimed" | "checkinLastRun" | "checkinNever" | "checkinNow" | "checkinRunning" | "quotaUnavailable" | "quotaNeedsApiKey" | "quotaUnreachable" | "quotaUsed" | "quotaRemaining" | "quotaReset" | "quotaRefresh" | "quotaWindowInterval" | "quotaWindowWeekly" | "quotaCounts" | "composerLabel" | "invalidCapacity" | "thinkingAlwaysOn" | "thinkingToggle" | "thinkingForced" | "capText", string>;
|
|
374
|
+
'en-US': Record<"account" | "storage" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "expires" | "signIn" | "signOut" | "loading" | "connection" | "provider" | "connectionState" | "connected" | "untested" | "testConnection" | "enableProvider" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "unknown" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "storageNotice" | "email" | "lastUsed" | "pageDesc" | "signingIn" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "loginFailed" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "modelsSection" | "capImage" | "copied" | "openSignInPage" | "quotaUnlimited" | "region" | "regionGlobal" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "accountLabel" | "regionCn" | "storageNative" | "storageDpapi" | "storageFile" | "storagePath" | "expiresAt" | "expiresRemaining" | "expiresExpired" | "expiresHint" | "codeMinutes" | "loginExpired" | "loginDenied" | "logoutOwnedByApp" | "testSuccessModel" | "modelsUnavailable" | "dailyCheckin" | "checkinHint" | "checkinAuto" | "checkinToday" | "checkinSkipped" | "checkinFailed" | "checkinStreak" | "checkinClaimed" | "checkinLastRun" | "checkinNever" | "checkinNow" | "checkinRunning" | "quotaUnavailable" | "quotaNeedsApiKey" | "quotaUnreachable" | "quotaUsed" | "quotaRemaining" | "quotaReset" | "quotaRefresh" | "quotaWindowInterval" | "quotaWindowWeekly" | "quotaCounts" | "composerLabel" | "invalidCapacity" | "thinkingAlwaysOn" | "thinkingToggle" | "thinkingForced" | "capText", string>;
|
|
339
375
|
};
|
|
340
376
|
export type MinimaxCodeLocaleKey = keyof typeof zh;
|
|
341
377
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,qBAAqB,CAAA;AAEjD,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/minimax-code/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,qBAAqB,CAAA;AAEjD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;IAI/C,mBAAmB,IAAI,mBAAmB;IAI1C,mBAAmB,IAAI,SAAS;IAIhC;;;;;;;;;;OAUG;IACG,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAerE;;;;;;;OAOG;IACG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA2BpG,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAOtG;;;;;;;;;OASG;IACI,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC;YAiBpD,aAAa;CAoK7B;AAED,OAAO,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAA"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire half of the MiniMax Code daily check-in.
|
|
3
|
+
*
|
|
4
|
+
* Everything in this file is measured against, or ported from, the official
|
|
5
|
+
* client's own open source (`MiniMax-AI/minimax-code`, MIT):
|
|
6
|
+
* `packages/tui/src/checkin/http-gateway.ts` does the two check-in calls and
|
|
7
|
+
* `packages/tui/src/runtime/public-gateway.ts` builds the request. The wire
|
|
8
|
+
* shape was additionally verified live against the CN deployment with this
|
|
9
|
+
* machine's own credential (see the 0.2.0-rc.1-era probe notes in the
|
|
10
|
+
* changelog): `GET signin/status` and `POST signin/claim` answer exactly the
|
|
11
|
+
* shapes validated below, and a duplicate claim answers
|
|
12
|
+
* `claim_result: 2` (AlreadyClaimed) rather than an error.
|
|
13
|
+
*
|
|
14
|
+
* The `yy` / `x-timestamp` / `x-signature` headers are the same first-party
|
|
15
|
+
* attribution literals this package's `types.ts` product-token note discusses.
|
|
16
|
+
* The official source's own comment calls them wire-protocol constants that
|
|
17
|
+
* are "not credentials or a security boundary" — authorization is the Bearer
|
|
18
|
+
* token. Unlike the quota read (where they are optional and stay off by
|
|
19
|
+
* default), the check-in gateway refuses requests without them, so this
|
|
20
|
+
* feature cannot exist without sending them; that trade is recorded in the
|
|
21
|
+
* changelog and was made explicitly, not by default. The User-Agent stays the
|
|
22
|
+
* plugin's own honest one — it is NOT part of the signed surface.
|
|
23
|
+
*/
|
|
24
|
+
import type { MinimaxCodeRegion } from '../../shared/minimax-code-contracts.ts';
|
|
25
|
+
/** Activity status surface; answers whether today is claimable or claimed. */
|
|
26
|
+
export declare const SIGNIN_STATUS_PATH = "/minimax-cloud/api/v1/signin/status";
|
|
27
|
+
/** Check-in surface; credits are granted by posting here once a day. */
|
|
28
|
+
export declare const SIGNIN_CLAIM_PATH = "/minimax-cloud/api/v1/signin/claim";
|
|
29
|
+
/** Account identity surface; resolves the realUserID the query string needs. */
|
|
30
|
+
export declare const USER_INFO_PATH = "/v1/api/user/info";
|
|
31
|
+
/** Day status values the panel reports. Mirrors the official SigninDayStatus. */
|
|
32
|
+
export declare const SIGNIN_DAY_UPCOMING = 1;
|
|
33
|
+
export declare const SIGNIN_DAY_CLAIMABLE = 2;
|
|
34
|
+
export declare const SIGNIN_DAY_CLAIMED = 3;
|
|
35
|
+
export declare const SIGNIN_DAY_DISABLED = 4;
|
|
36
|
+
/** Claim outcomes the service reports. Mirrors the official SigninClaimResult. */
|
|
37
|
+
export declare const SIGNIN_CLAIM_FRESH = 1;
|
|
38
|
+
export declare const SIGNIN_CLAIM_ALREADY = 2;
|
|
39
|
+
export declare const CHECKIN_TIMEOUT_MS = 30000;
|
|
40
|
+
/** Origin the official client uses for this surface, per region. */
|
|
41
|
+
export declare function checkinGatewayOrigin(region: MinimaxCodeRegion): string;
|
|
42
|
+
export interface SigninDayItem {
|
|
43
|
+
day_no: number;
|
|
44
|
+
points: number;
|
|
45
|
+
bonus_points?: number;
|
|
46
|
+
status: number;
|
|
47
|
+
is_today: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface SigninPanel {
|
|
50
|
+
scene: number;
|
|
51
|
+
days: SigninDayItem[];
|
|
52
|
+
}
|
|
53
|
+
export interface ClaimSigninData {
|
|
54
|
+
claim_id: string;
|
|
55
|
+
claim_result: number;
|
|
56
|
+
day_no: number;
|
|
57
|
+
points: number;
|
|
58
|
+
expire_at_ms: number;
|
|
59
|
+
panel: SigninPanel;
|
|
60
|
+
}
|
|
61
|
+
/** Identity the check-in needs beyond the access token. */
|
|
62
|
+
export interface MinimaxCodeAccountIdentity {
|
|
63
|
+
realUserID: string;
|
|
64
|
+
userName?: string;
|
|
65
|
+
subUserName?: string;
|
|
66
|
+
userEmail?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Validate one panel response. Ported from the official
|
|
70
|
+
* `validateSigninPanel`: exactly seven days, day numbers 1..7 without
|
|
71
|
+
* repeats, at most one claimable and at most one "today". A panel that fails
|
|
72
|
+
* this is a wire surprise, and treating it as "nothing to do" would silently
|
|
73
|
+
* skip the day, so validation throws.
|
|
74
|
+
*/
|
|
75
|
+
export declare function validateSigninPanel(value: unknown): SigninPanel;
|
|
76
|
+
/** Validate one claim response. Ported from the official `validateClaimSigninData`. */
|
|
77
|
+
export declare function validateClaimSigninData(value: unknown): ClaimSigninData;
|
|
78
|
+
/**
|
|
79
|
+
* The consecutive-claimed count ending today, from one panel.
|
|
80
|
+
*
|
|
81
|
+
* Ported from the official `getCurrentSigninStreak`: when today is claimed it
|
|
82
|
+
* counts; when today is still claimable the streak up to yesterday is what a
|
|
83
|
+
* claim would extend, so that is what the card shows.
|
|
84
|
+
*/
|
|
85
|
+
export declare function currentSigninStreak(days: readonly SigninDayItem[]): number;
|
|
86
|
+
export interface CheckinHttpOptions {
|
|
87
|
+
fetchFn?: typeof fetch;
|
|
88
|
+
/** Clock injection for tests. */
|
|
89
|
+
nowMs?: () => number;
|
|
90
|
+
/** `desktop_version` the request reports; the plugin version in production. */
|
|
91
|
+
appVersion?: string;
|
|
92
|
+
signal?: AbortSignal;
|
|
93
|
+
}
|
|
94
|
+
export declare class MinimaxCodeCheckinHttpError extends Error {
|
|
95
|
+
readonly status: number | null;
|
|
96
|
+
constructor(message: string, status: number | null);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Resolve the account's realUserID (and display fields) through the identity
|
|
100
|
+
* surface. The check-in query string needs realUserID and the OAuth document
|
|
101
|
+
* does not carry it, so it is resolved once per scheduler pass and cached in
|
|
102
|
+
* the check-in state afterwards.
|
|
103
|
+
*/
|
|
104
|
+
export declare function fetchAccountIdentity(accessToken: string, region: MinimaxCodeRegion, options?: CheckinHttpOptions): Promise<MinimaxCodeAccountIdentity>;
|
|
105
|
+
/** Read the seven-day panel; throws on transport, HTTP, or shape failures. */
|
|
106
|
+
export declare function fetchSigninPanel(accessToken: string, realUserID: string, region: MinimaxCodeRegion, options?: CheckinHttpOptions): Promise<SigninPanel>;
|
|
107
|
+
/** Claim today's credit; the response carries the fresh panel. */
|
|
108
|
+
export declare function claimSignin(accessToken: string, realUserID: string, region: MinimaxCodeRegion, options?: CheckinHttpOptions): Promise<ClaimSigninData>;
|
|
109
|
+
//# sourceMappingURL=checkin-gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkin-gateway.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/checkin-gateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAG/E,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,wCAAwC,CAAA;AACvE,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,uCAAuC,CAAA;AACrE,gFAAgF;AAChF,eAAO,MAAM,cAAc,sBAAsB,CAAA;AAEjD,iFAAiF;AACjF,eAAO,M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CAAC,IAAI,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,CAa1E;AAuHD,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;IACtB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,MAAM,CAAA;IACpB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED,qBAAa,2BAA4B,SAAQ,KAAK;IAGlD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;gBAD9B,OAAO,EAAE,MAAM,EACN,MAAM,EAAE,MAAM,GAAG,IAAI;CAKjC;AAMD;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,0BAA0B,CAAC,CAuCrC;AA0DD,8EAA8E;AAC9E,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,WAAW,CAAC,CAEtB;AAED,kEAAkE;AAClE,wBAAsB,WAAW,CAC/B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,eAAe,CAAC,CAE1B"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daily check-in scheduler for the MiniMax Code line.
|
|
3
|
+
*
|
|
4
|
+
* Modeled on the sibling WorkBuddy scheduler and kept semantically identical
|
|
5
|
+
* where the two services face the same problem; the wire half lives in
|
|
6
|
+
* ./checkin-gateway.ts (official-client recipe, verified live).
|
|
7
|
+
*
|
|
8
|
+
* - **Both regions.** The official client's public gateway has an origin per
|
|
9
|
+
* region, so an account signs in against its own region's origin. There is
|
|
10
|
+
* no CN-only carve-out like WorkBuddy's: the CLI ships the same surface
|
|
11
|
+
* worldwide.
|
|
12
|
+
* - **Idempotent.** The panel is read first; an account whose today is already
|
|
13
|
+
* claimed (by anyone) is only recorded. A duplicate claim answers
|
|
14
|
+
* `claim_result: 2` (AlreadyClaimed), which is a success, never a retry.
|
|
15
|
+
* - **Patient with the day.** A today that is neither claimable nor claimed
|
|
16
|
+
* (upcoming/disabled) is parked and re-checked on an hourly cadence rather
|
|
17
|
+
* than abandoned: the activity flips on its own schedule, and the host
|
|
18
|
+
* usually boots before it does.
|
|
19
|
+
* - **Bounded.** A failing account is retried at most {@link CHECKIN_ATTEMPT_CAP}
|
|
20
|
+
* times a day, so a broken account cannot turn the ten-minute tick into a
|
|
21
|
+
* request loop. A manual run ignores the cap and the toggle, like the
|
|
22
|
+
* workbuddy card's "check in now", and is queued behind an in-flight run.
|
|
23
|
+
*
|
|
24
|
+
* Credentials stay host-side: the only write beyond the state file is the
|
|
25
|
+
* account pool's own refresh write-back, reused here unchanged through
|
|
26
|
+
* `getFreshCredential` / `renewCredential`.
|
|
27
|
+
*/
|
|
28
|
+
import type { MinimaxCodeCheckinSummary } from '../../shared/minimax-code-contracts.ts';
|
|
29
|
+
import type { MinimaxCodeAccountPool } from './account-pool.ts';
|
|
30
|
+
/**
|
|
31
|
+
* Scheduler cadence. The first tick at host startup is the daily run; the
|
|
32
|
+
* interval keeps a long-lived process signing in on later days without a
|
|
33
|
+
* restart. Idle ticks cost no requests — the day state short-circuits them.
|
|
34
|
+
*/
|
|
35
|
+
export declare const CHECKIN_TICK_MS: number;
|
|
36
|
+
/** Daily retry ceiling for one account after a failed attempt. */
|
|
37
|
+
export declare const CHECKIN_ATTEMPT_CAP = 3;
|
|
38
|
+
/**
|
|
39
|
+
* How long a not-yet-claimable today waits before the panel is polled again.
|
|
40
|
+
* Same reasoning as the workbuddy scheduler: the activity opens on its own
|
|
41
|
+
* schedule, and the first answer of the day is frequently "not open yet".
|
|
42
|
+
*/
|
|
43
|
+
export declare const CHECKIN_INACTIVE_RECHECK_MS: number;
|
|
44
|
+
/** State document the scheduler keeps beside the other plugin stores. */
|
|
45
|
+
export declare function checkinStatePath(): string;
|
|
46
|
+
/** Local calendar day an instant belongs to; state entries are keyed by it. */
|
|
47
|
+
export declare function localDateString(nowMs: number): string;
|
|
48
|
+
/** The slice of the account pool the scheduler uses. */
|
|
49
|
+
export type MinimaxCodeCheckinPool = Pick<MinimaxCodeAccountPool, 'listAccounts' | 'getFreshCredential' | 'renewCredential'>;
|
|
50
|
+
export interface MinimaxCodeCheckinServiceOptions {
|
|
51
|
+
fetchFn?: typeof fetch;
|
|
52
|
+
/** State document path; tests redirect it, production uses {@link checkinStatePath}. */
|
|
53
|
+
statePath?: string;
|
|
54
|
+
/** Live preference, re-read on every tick so the toggle applies at once. */
|
|
55
|
+
settings: () => {
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Resolves once the preference store has read its stored document, so the
|
|
60
|
+
* startup pass cannot act on a default the stored document is about to
|
|
61
|
+
* overwrite. Optional for callers whose settings are already in memory.
|
|
62
|
+
*/
|
|
63
|
+
ready?: () => Promise<void>;
|
|
64
|
+
/** Clock injection for tests. */
|
|
65
|
+
now?: () => number;
|
|
66
|
+
/** `desktop_version` the wire request reports; the plugin version in production. */
|
|
67
|
+
appVersion?: string;
|
|
68
|
+
logger?: {
|
|
69
|
+
info(message: string): void;
|
|
70
|
+
warn(message: string): void;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The check-in scheduler. One instance per plugin load; the host owns the
|
|
75
|
+
* interval and clears it from the same `ctx.effect` that created it.
|
|
76
|
+
*/
|
|
77
|
+
export declare class MinimaxCodeCheckinService {
|
|
78
|
+
private readonly pool;
|
|
79
|
+
private readonly options;
|
|
80
|
+
private readonly fetchFn;
|
|
81
|
+
private readonly statePath;
|
|
82
|
+
private readonly now;
|
|
83
|
+
private readonly logger;
|
|
84
|
+
private readonly appVersion;
|
|
85
|
+
private state;
|
|
86
|
+
private identities;
|
|
87
|
+
private loaded;
|
|
88
|
+
/** Passes waiting to run, in order; `true` marks a manual pass. */
|
|
89
|
+
private readonly queue;
|
|
90
|
+
/** The drain loop currently working the queue, if any. */
|
|
91
|
+
private draining;
|
|
92
|
+
private lastRunAt;
|
|
93
|
+
/** Memoized preference warmup, so it is awaited once however many passes run. */
|
|
94
|
+
private readyWait;
|
|
95
|
+
constructor(pool: MinimaxCodeCheckinPool, options: MinimaxCodeCheckinServiceOptions);
|
|
96
|
+
/**
|
|
97
|
+
* One scheduler pass. Automatic passes honour the toggle and the retry cap;
|
|
98
|
+
* a manual pass (`manual: true`, the card's "check in now") ignores both
|
|
99
|
+
* but still respects an account already signed in today.
|
|
100
|
+
*
|
|
101
|
+
* A manual pass that lands while a run is already in flight is *queued*, not
|
|
102
|
+
* absorbed: joining the running pass would silently discard the one thing the
|
|
103
|
+
* button promises, that the retry cap and the toggle are bypassed now.
|
|
104
|
+
*/
|
|
105
|
+
tick(manual?: boolean): Promise<void>;
|
|
106
|
+
private drain;
|
|
107
|
+
private runQueue;
|
|
108
|
+
private run;
|
|
109
|
+
/** Wait for the preference store's warmup read, once. */
|
|
110
|
+
private ready;
|
|
111
|
+
/**
|
|
112
|
+
* Resolve the account's realUserID, cached across days.
|
|
113
|
+
*
|
|
114
|
+
* The OAuth document does not carry it and the check-in query string needs
|
|
115
|
+
* it, so it is fetched from the identity surface once and kept in the state
|
|
116
|
+
* document. The region is cached alongside because the identity call's
|
|
117
|
+
* origin depends on it.
|
|
118
|
+
*/
|
|
119
|
+
private identityFor;
|
|
120
|
+
/** Check one account in, recording the outcome in its today's entry. */
|
|
121
|
+
private checkinOne;
|
|
122
|
+
/**
|
|
123
|
+
* One full try for one account: identity, panel, and — when today is
|
|
124
|
+
* claimable — the claim. Settles the entry on every outcome; throws for the
|
|
125
|
+
* caller's renew-and-retry or attempt bookkeeping.
|
|
126
|
+
*/
|
|
127
|
+
private attemptOnce;
|
|
128
|
+
/** The status call, against the current credential. */
|
|
129
|
+
private panel;
|
|
130
|
+
/** The claim call, against the current credential. */
|
|
131
|
+
private claim;
|
|
132
|
+
/**
|
|
133
|
+
* Fold one panel into the day's entry.
|
|
134
|
+
*
|
|
135
|
+
* Returns true when the entry is settled for the day (claimed already, or
|
|
136
|
+
* parked inactive): the caller then skips the claim. Today claimable is the
|
|
137
|
+
* one answer that returns false.
|
|
138
|
+
*/
|
|
139
|
+
private recordPanelOutcome;
|
|
140
|
+
/** Record a confirmed sign-in, clearing the transient failure bookkeeping. */
|
|
141
|
+
private markSignedIn;
|
|
142
|
+
/**
|
|
143
|
+
* The aggregate the settings card renders. Reads only local state and the
|
|
144
|
+
* account list; it never spends a network request.
|
|
145
|
+
*/
|
|
146
|
+
summary(): Promise<MinimaxCodeCheckinSummary>;
|
|
147
|
+
private load;
|
|
148
|
+
private save;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=checkin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkin.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/checkin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAgC,MAAM,mBAAmB,CAAA;AAY7F;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAiB,CAAA;AAC7C,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,IAAI,CAAA;AACpC;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,QAAiB,CAAA;AAEzD,yEAAyE;AACzE,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKrD;AA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FAAiF;IACjF,OAAO,CAAC,SAAS,CAA6B;gBAG3B,IAAI,EAAE,sBAAsB,EAC5B,OAAO,EAAE,gCAAgC;IAS5D;;;;;;;;OAQG;IACG,IAAI,CAAC,MAAM,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzC,OAAO,CAAC,KAAK;YAQC,QAAQ;YAoBR,GAAG;IAmCjB,yDAAyD;YAC3C,KAAK;IAOnB;;;;;;;OAOG;YACW,WAAW;IAgBzB,wEAAwE;YAC1D,UAAU;IAkCxB;;;;OAIG;YACW,WAAW;IAgBzB,uDAAuD;YACzC,KAAK;IAWnB,sDAAsD;YACxC,KAAK;IAWnB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAsB1B,8EAA8E;IAC9E,OAAO,CAAC,YAAY;IAQpB;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,yBAAyB,CAAC;YAwCrC,IAAI;YA+BJ,IAAI;CAYnB"}
|
|
@@ -35,33 +35,30 @@
|
|
|
35
35
|
* \`effort\` level, so the field is emitted in that vocabulary and nowhere else. No
|
|
36
36
|
* other undocumented field is ever sent.
|
|
37
37
|
*
|
|
38
|
-
*
|
|
38
|
+
* PROMPT CACHING IS ON BY DEFAULT, AND IT IS THE REQUEST THAT TURNS IT ON
|
|
39
39
|
*
|
|
40
|
-
*
|
|
41
|
-
* counters out of `usage` (see the message_start branch) - so the route is
|
|
42
|
-
* prepared to report cache hits it never asks for. MiniMax documents two
|
|
43
|
-
* different mechanisms, and they are not interchangeable:
|
|
40
|
+
* MiniMax documents two caching mechanisms, and they are not interchangeable:
|
|
44
41
|
*
|
|
45
42
|
* - an AUTOMATIC cache on its native API, which needs no marker at all; and
|
|
46
43
|
* - an EXPLICIT cache on its Anthropic-compatible API, where the
|
|
47
44
|
* `cache_control` breakpoints are what create the cache at all
|
|
48
|
-
* (`tools` -> `system` -> `messages`,
|
|
49
|
-
* (Anthropic API)" page of the
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
45
|
+
* (`tools` -> `system` -> `messages`, at most MAX_CACHE_BREAKPOINTS per
|
|
46
|
+
* request, per the "Explicit Prompt Caching (Anthropic API)" page of the
|
|
47
|
+
* MiniMax docs).
|
|
48
|
+
*
|
|
49
|
+
* This line speaks the Anthropic dialect, so the explicit mechanism is the one
|
|
50
|
+
* that applies: a request with no breakpoint gets no `cache_read_input_tokens`
|
|
51
|
+
* back no matter how identical its bytes are turn over turn, which is exactly
|
|
52
|
+
* why this route showed no cache hits before the markers went in.
|
|
53
|
+
*
|
|
54
|
+
* The shape is the Claude line's (claude/mapper.ts, section 7), because the
|
|
55
|
+
* wire vocabulary is the same and that shape is the one MiniMax's
|
|
56
|
+
* explicit-caching page documents: breakpoints on the LAST system block, the
|
|
57
|
+
* last block of the LAST user message, and the last tool. The first requires
|
|
58
|
+
* `system` to go out as a block array rather than the plain string this line
|
|
59
|
+
* was first measured with, so the array form is used only while caching is on -
|
|
60
|
+
* a caller that opts out (MinimaxRequestOptions.cacheControl === false) gets
|
|
61
|
+
* the original string body byte-for-byte.
|
|
65
62
|
*/
|
|
66
63
|
import { type ContentBlock, type OutboundContentBlock, type GenerateOptions, type StreamChunk } from '../common/llm-compat.ts';
|
|
67
64
|
import { MAX_MESSAGE_BODY_BYTES, estimatedInputTokens, offloadOldestRequestImages, resolveRequestImages, type AttachmentImageReader, type ResolvedRequestImages } from '../kimi-code/mapper.ts';
|
|
@@ -91,8 +88,40 @@ export declare function thinkingFieldFor(modelId: string, requestedEffort: strin
|
|
|
91
88
|
export declare function maxOutputTokensFor(modelId: string, contextWindow?: number): number;
|
|
92
89
|
/** Reduce a requested cap so prompt plus output still fit the window. */
|
|
93
90
|
export declare function clampOutputToContext(requested: number, contextWindow: number, estimatedInputTokens?: number): number;
|
|
91
|
+
/**
|
|
92
|
+
* Breakpoint budget the wire enforces.
|
|
93
|
+
*
|
|
94
|
+
* MiniMax's explicit-caching page caps a request at four `cache_control`
|
|
95
|
+
* markers, the same number Anthropic allows (claude/mapper.ts). This module
|
|
96
|
+
* marks at most three (see the module doc), so the budget is never the binding
|
|
97
|
+
* constraint - the constant exists so a test can assert that against the REAL
|
|
98
|
+
* number rather than a magic three.
|
|
99
|
+
*/
|
|
100
|
+
export declare const MAX_CACHE_BREAKPOINTS = 4;
|
|
101
|
+
/**
|
|
102
|
+
* How many cache_control markers one built body carries.
|
|
103
|
+
*
|
|
104
|
+
* Walks the finished body rather than counting calls to the marker: the number
|
|
105
|
+
* the wire enforces is the number of markers IN THE BYTES, so a test that
|
|
106
|
+
* counts its own marking calls could pass while the body carried a fourth
|
|
107
|
+
* breakpoint from somewhere else. Used by the tests only.
|
|
108
|
+
*/
|
|
109
|
+
export declare function countMinimaxCacheBreakpoints(body: unknown): number;
|
|
110
|
+
/** Options for one built request that are not part of the conversation itself. */
|
|
111
|
+
export interface MinimaxRequestOptions {
|
|
112
|
+
/**
|
|
113
|
+
* Emit prompt-cache breakpoints. Default TRUE: caching is what a caller that
|
|
114
|
+
* states nothing gets (see the module doc). Pass false only to opt out.
|
|
115
|
+
*
|
|
116
|
+
* When on, breakpoints go on the last system block, the last block of the
|
|
117
|
+
* last user message, and the last tool - at most
|
|
118
|
+
* {@link MAX_CACHE_BREAKPOINTS} in total, and `system` goes out as a block
|
|
119
|
+
* array because a plain string cannot carry a marker.
|
|
120
|
+
*/
|
|
121
|
+
cacheControl?: boolean;
|
|
122
|
+
}
|
|
94
123
|
/** Build one Anthropic Messages body for this subscription. */
|
|
95
|
-
export declare function buildMinimaxRequest(options: GenerateOptions, images?: ResolvedRequestImages): Record<string, unknown>;
|
|
124
|
+
export declare function buildMinimaxRequest(options: GenerateOptions, images?: ResolvedRequestImages, request?: MinimaxRequestOptions): Record<string, unknown>;
|
|
96
125
|
/**
|
|
97
126
|
* Reject a request the service would refuse, before sending it.
|
|
98
127
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/mapper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAEzB,KAAK,eAAe,EAEpB,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EAEpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,wBAAwB,CAAA;AAO/B,OAAO,EACL,iBAAiB,EAKlB,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,CAAA;AACzG,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA;AA6Q5D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GACzC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAqBrC;AAED,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAKlF;AAED,yEAAyE;AACzE,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,oBAAoB,CAAC,EA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OAAO,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,iBAAiB,IAAI,kBAAkB,CAiBtD;AAoDD,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,WAAW,EAAE,CAO3E;AAED,kFAAkF;AAClF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAIpE;AAED,oDAAoD;AACpD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,GAAG,WAAW,EAAE,CAwJ/F;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAEnE;AAED,OAAO,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,CAAA"}
|
|
@@ -29,6 +29,7 @@ import { MINIMAX_CODE_PROVIDER_ID, type MinimaxCodeWebStatus } from '../../share
|
|
|
29
29
|
import { type MinimaxCodeAccountPool } from './account-pool.ts';
|
|
30
30
|
import { MinimaxCodeCredentialStore, MinimaxCodeModelSettingsStore, type MinimaxCodeModelSettings, type MinimaxCodePreferenceStore, type MinimaxCodeSettingsPatch } from './token-store.ts';
|
|
31
31
|
import { ensureAccessToken, getWebLogin } from './oauth.ts';
|
|
32
|
+
import type { MinimaxCodeCheckinService } from './checkin.ts';
|
|
32
33
|
/** The sub-path one request addresses, whichever prefix it arrived under. */
|
|
33
34
|
export declare function subPathOf(requestUrl: string): string;
|
|
34
35
|
/**
|
|
@@ -69,6 +70,8 @@ export interface MinimaxCodeStatusOptions {
|
|
|
69
70
|
* empty account list that looks like a bug.
|
|
70
71
|
*/
|
|
71
72
|
accountPool?: MinimaxCodeAccountPool;
|
|
73
|
+
/** Daily check-in scheduler; absent leaves the card's check-in row empty. */
|
|
74
|
+
checkin?: Pick<MinimaxCodeCheckinService, 'tick' | 'summary'>;
|
|
72
75
|
}
|
|
73
76
|
/** Everything the settings card renders. */
|
|
74
77
|
export declare function getMinimaxCodeWebStatus(store: MinimaxCodeCredentialStore, options?: MinimaxCodeStatusOptions, settingsSource?: MinimaxCodeSettingsSource): Promise<MinimaxCodeWebStatus>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EACL,wBAAwB,EAMxB,KAAK,oBAAoB,EAC1B,MAAM,wCAAwC,CAAA;AAG/C,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAE7B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC9B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAIL,iBAAiB,EACjB,WAAW,EAKZ,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EACL,wBAAwB,EAMxB,KAAK,oBAAoB,EAC1B,MAAM,wCAAwC,CAAA;AAG/C,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAE7B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC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,GACvC,MAAM,IAAI,CA0RZ;AAED,gEAAgE;AAChE,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -164,6 +164,10 @@ export interface MinimaxCodeModelSettings {
|
|
|
164
164
|
contextWindowOverrides: Record<string, number>;
|
|
165
165
|
/** Level used when a conversation picks none; null means the model's own. */
|
|
166
166
|
defaultReasoningEffort: MinimaxCodeReasoningEffort | null;
|
|
167
|
+
/** Daily check-in scheduler switch. Absent means enabled. */
|
|
168
|
+
checkin?: {
|
|
169
|
+
enabled: boolean;
|
|
170
|
+
};
|
|
167
171
|
}
|
|
168
172
|
/**
|
|
169
173
|
* One settings patch.
|
|
@@ -178,6 +182,9 @@ export interface MinimaxCodeSettingsPatch {
|
|
|
178
182
|
enabledModelIds?: string[];
|
|
179
183
|
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
180
184
|
defaultReasoningEffort?: MinimaxCodeReasoningEffort | null;
|
|
185
|
+
checkin?: {
|
|
186
|
+
enabled: boolean;
|
|
187
|
+
};
|
|
181
188
|
}
|
|
182
189
|
/**
|
|
183
190
|
* The seam the routes and the adapter share.
|
|
@@ -188,6 +195,14 @@ export interface MinimaxCodeSettingsPatch {
|
|
|
188
195
|
* path for a value that changes at human speed.
|
|
189
196
|
*/
|
|
190
197
|
export interface MinimaxCodePreferenceStore {
|
|
198
|
+
/**
|
|
199
|
+
* The file-backed store warms up asynchronously, so `status()` answers from
|
|
200
|
+
* shipped defaults until that read settles. A caller that acts on a
|
|
201
|
+
* preference at startup — the check-in scheduler signing in on boot — must
|
|
202
|
+
* await this first, or it acts on the default instead of the user's choice.
|
|
203
|
+
* A register-backed store reads synchronously and resolves immediately.
|
|
204
|
+
*/
|
|
205
|
+
ready(): Promise<void>;
|
|
191
206
|
status(): MinimaxCodeModelSettings;
|
|
192
207
|
update(patch: MinimaxCodeSettingsPatch): Promise<MinimaxCodeModelSettings>;
|
|
193
208
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/minimax-code/token-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAUH,OAAO,EAA+B,KAAK,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AAEpH,OAAO,KAAK,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAG3G,oDAAoD;AACpD,MAAM,MAAM,2BAA2B,GAAG,gBAAgB,GAAG,MAAM,CAAA;AAEnE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAA;IACnB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAA;IACjB,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAA;IAChB,uCAAuC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAA;IAChB,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAA;IACnB,+EAA+E;IAC/E,UAAU,EAAE,MAAM,CAAA;IAClB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAA;IAChB,2CAA2C;IAC3C,MAAM,EAAE,iBAAiB,CAAA;IACzB,mFAAmF;IACnF,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,6EAA6E;IAC7E,MAAM,EAAE,2BAA2B,CAAA;IACnC,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAI3E;AAED,iDAAiD;AACjD,wBAAgB,UAAU,C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