@eddyskywalker/dsh-chatgpt-subscription 0.24.6 → 0.25.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 +25 -0
- package/lib/client.js +13 -0
- package/lib/client.js.map +1 -1
- package/lib/index.js +142 -13
- package/lib/types/host/antigravity/adapter.d.ts +11 -0
- package/lib/types/host/antigravity/adapter.d.ts.map +1 -1
- package/lib/types/host/antigravity/mapper.d.ts +1 -0
- package/lib/types/host/antigravity/mapper.d.ts.map +1 -1
- package/lib/types/host/claude/account-pool.d.ts.map +1 -1
- package/lib/types/host/claude/oauth.d.ts +23 -1
- package/lib/types/host/claude/oauth.d.ts.map +1 -1
- package/lib/types/host/claude/types.d.ts +13 -0
- package/lib/types/host/claude/types.d.ts.map +1 -1
- package/lib/types/host/common/idle-watchdog.d.ts.map +1 -1
- package/lib/types/host/common/llm-compat.d.ts +19 -4
- package/lib/types/host/common/llm-compat.d.ts.map +1 -1
- package/lib/types/host/common/reasoning-efforts.d.ts +2 -0
- package/lib/types/host/common/reasoning-efforts.d.ts.map +1 -0
- package/lib/types/host/common/request-images.d.ts +6 -0
- package/lib/types/host/common/request-images.d.ts.map +1 -1
- package/lib/types/host/common/webserver-compat.d.ts +7 -0
- package/lib/types/host/common/webserver-compat.d.ts.map +1 -0
- package/lib/types/host/kimi-code/adapter.d.ts +6 -0
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
- package/lib/types/host/minimax-code/adapter.d.ts +6 -0
- package/lib/types/host/minimax-code/adapter.d.ts.map +1 -1
- package/lib/types/host/minimax-code/mapper.d.ts.map +1 -1
- package/lib/types/host/model-catalog.d.ts.map +1 -1
- package/lib/types/host/step-code/adapter.d.ts +7 -1
- package/lib/types/host/step-code/adapter.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +37 -37
package/lib/index.js
CHANGED
|
@@ -34,6 +34,13 @@ function outputReservation(contextWindow, maxTokens) {
|
|
|
34
34
|
return Number.isSafeInteger(maxTokens) && maxTokens > 0 && threshold > 0 && retain < threshold ? { defaultMaxTokens: maxTokens } : {};
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
|
+
//#region src/host/common/reasoning-efforts.ts
|
|
38
|
+
function orderReasoningEfforts(efforts, strengthOrder) {
|
|
39
|
+
const rank = new Map(strengthOrder.map((effort, index) => [effort, index]));
|
|
40
|
+
if (efforts.some((effort) => !rank.has(effort))) return [...efforts];
|
|
41
|
+
return [...efforts].sort((left, right) => rank.get(left) - rank.get(right));
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
37
44
|
//#region src/shared/minimax-code-contracts.ts
|
|
38
45
|
const MINIMAX_CODE_PROVIDER_ID = "minimax-code";
|
|
39
46
|
const MINIMAX_CODE_PROVIDER_NAME = "MiniMax Code(编程订阅)";
|
|
@@ -416,7 +423,7 @@ function resolveCodexModel(model, preferences, live) {
|
|
|
416
423
|
context: { contextWindow: configuredContextWindow ?? liveEntry?.contextWindow ?? entry.contextWindow },
|
|
417
424
|
...outputReservation(configuredContextWindow ?? liveEntry?.contextWindow ?? entry.contextWindow, codexModelMaxTokens(model)),
|
|
418
425
|
reasoning: {
|
|
419
|
-
efforts: efforts.map((effort) => ({
|
|
426
|
+
efforts: orderReasoningEfforts(efforts, GPT_56_REASONING_EFFORTS).map((effort) => ({
|
|
420
427
|
id: ReasoningEffortId(effort),
|
|
421
428
|
name: effort
|
|
422
429
|
})),
|
|
@@ -4137,13 +4144,18 @@ async function* wrapStreamWithWatchdog(source, upstreamSignal, timeoutMs = DEFAU
|
|
|
4137
4144
|
throw error;
|
|
4138
4145
|
} finally {
|
|
4139
4146
|
consumer.abort(`${providerTag} stream consumer stopped`);
|
|
4140
|
-
if (!exhausted)
|
|
4141
|
-
await iterator.return?.(void 0);
|
|
4142
|
-
} catch {}
|
|
4147
|
+
if (!exhausted) iterator.return?.(void 0).catch(() => {});
|
|
4143
4148
|
watchdog[Symbol.dispose]();
|
|
4144
4149
|
}
|
|
4145
4150
|
}
|
|
4146
4151
|
//#endregion
|
|
4152
|
+
//#region src/host/common/webserver-compat.ts
|
|
4153
|
+
function webServerOrigin(server) {
|
|
4154
|
+
if (typeof server.getOrigin === "function") return server.getOrigin();
|
|
4155
|
+
if (server.port === void 0) throw new Error("dsh-chatgpt-subscription: web server origin requested before the listener bound a port");
|
|
4156
|
+
return `http://${server.host === "0.0.0.0" ? "127.0.0.1" : server.host}:${server.port}`;
|
|
4157
|
+
}
|
|
4158
|
+
//#endregion
|
|
4147
4159
|
//#region src/host/common/llm-compat.ts
|
|
4148
4160
|
/** This package's kind in the harness message-source map. */
|
|
4149
4161
|
const PLUGIN_MESSAGE_SOURCE_KIND = "dsh-chatgpt-subscription";
|
|
@@ -6238,13 +6250,16 @@ function requestImageTarget$1(ref, edge = REQUEST_IMAGE_MAX_EDGE$1) {
|
|
|
6238
6250
|
const { width, height } = ref;
|
|
6239
6251
|
if (!Number.isSafeInteger(width) || !Number.isSafeInteger(height) || width <= 0 || height <= 0) return void 0;
|
|
6240
6252
|
if (Math.max(width, height) <= edge) return void 0;
|
|
6253
|
+
const maxPixels = Math.max(1, Math.floor(edge * edge * (Math.min(width, height) / Math.max(width, height))));
|
|
6241
6254
|
return width >= height ? {
|
|
6242
6255
|
width: edge,
|
|
6243
6256
|
height: Math.max(1, Math.round(edge * height / width)),
|
|
6257
|
+
maxPixels,
|
|
6244
6258
|
maxBytes: REQUEST_IMAGE_VERSION_MAX_BYTES$2
|
|
6245
6259
|
} : {
|
|
6246
6260
|
width: Math.max(1, Math.round(edge * width / height)),
|
|
6247
6261
|
height: edge,
|
|
6262
|
+
maxPixels,
|
|
6248
6263
|
maxBytes: REQUEST_IMAGE_VERSION_MAX_BYTES$2
|
|
6249
6264
|
};
|
|
6250
6265
|
}
|
|
@@ -7747,6 +7762,13 @@ var AntigravityAdapter = class extends LlmAdapter {
|
|
|
7747
7762
|
}
|
|
7748
7763
|
providerRetryPolicy() {}
|
|
7749
7764
|
imageRequestPricing(_provider, _model) {}
|
|
7765
|
+
imageRequestTarget(_provider, _model, image) {
|
|
7766
|
+
return requestImageTarget$1(image) ?? {
|
|
7767
|
+
width: image.width,
|
|
7768
|
+
height: image.height,
|
|
7769
|
+
maxBytes: image.bytes
|
|
7770
|
+
};
|
|
7771
|
+
}
|
|
7750
7772
|
async listModels(provider) {
|
|
7751
7773
|
const prov = provider || "antigravity";
|
|
7752
7774
|
const settings = this.preferences ? this.preferences.status() : await this.modelSettings.read();
|
|
@@ -20786,16 +20808,26 @@ function requestImageTarget(ref, edge = REQUEST_IMAGE_MAX_EDGE) {
|
|
|
20786
20808
|
const { width, height } = ref;
|
|
20787
20809
|
if (!Number.isSafeInteger(width) || !Number.isSafeInteger(height) || width <= 0 || height <= 0) return void 0;
|
|
20788
20810
|
if (Math.max(width, height) <= edge) return void 0;
|
|
20811
|
+
const maxPixels = Math.max(1, Math.floor(edge * edge * (Math.min(width, height) / Math.max(width, height))));
|
|
20789
20812
|
return width >= height ? {
|
|
20790
20813
|
width: edge,
|
|
20791
20814
|
height: Math.max(1, Math.round(edge * height / width)),
|
|
20815
|
+
maxPixels,
|
|
20792
20816
|
maxBytes: REQUEST_IMAGE_VERSION_MAX_BYTES$1
|
|
20793
20817
|
} : {
|
|
20794
20818
|
width: Math.max(1, Math.round(edge * width / height)),
|
|
20795
20819
|
height: edge,
|
|
20820
|
+
maxPixels,
|
|
20796
20821
|
maxBytes: REQUEST_IMAGE_VERSION_MAX_BYTES$1
|
|
20797
20822
|
};
|
|
20798
20823
|
}
|
|
20824
|
+
function requestImageTargetOrOriginal(ref) {
|
|
20825
|
+
return requestImageTarget(ref) ?? {
|
|
20826
|
+
width: ref.width,
|
|
20827
|
+
height: ref.height,
|
|
20828
|
+
maxBytes: ref.bytes
|
|
20829
|
+
};
|
|
20830
|
+
}
|
|
20799
20831
|
/**
|
|
20800
20832
|
* Replace the oldest inline images with a text placeholder once one request
|
|
20801
20833
|
* would carry more than `maxBytes` of base64 image data.
|
|
@@ -25372,6 +25404,9 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
25372
25404
|
return RETRY_POLICY$5;
|
|
25373
25405
|
}
|
|
25374
25406
|
imageRequestPricing() {}
|
|
25407
|
+
imageRequestTarget(_provider, _model, image) {
|
|
25408
|
+
return requestImageTargetOrOriginal(image);
|
|
25409
|
+
}
|
|
25375
25410
|
settings() {
|
|
25376
25411
|
return this.preferences ? Promise.resolve(this.preferences.status()) : this.modelSettings.read();
|
|
25377
25412
|
}
|
|
@@ -25419,7 +25454,12 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
25419
25454
|
const settings = await this.settings();
|
|
25420
25455
|
const catalog = await this.catalog();
|
|
25421
25456
|
const entry = catalog.find((model) => model.id === modelId);
|
|
25422
|
-
const efforts = reasoningEffortsForEntry(modelId, catalog)
|
|
25457
|
+
const efforts = orderReasoningEfforts(reasoningEffortsForEntry(modelId, catalog), [
|
|
25458
|
+
"none",
|
|
25459
|
+
"low",
|
|
25460
|
+
"high",
|
|
25461
|
+
"max"
|
|
25462
|
+
]);
|
|
25423
25463
|
const entryDefault = defaultReasoningEffortForEntry(modelId, catalog);
|
|
25424
25464
|
const defaultEffortId = resolveDefaultReasoningEffort$2(efforts, settings.defaultReasoningEffort) ?? (entryDefault === void 0 ? void 0 : resolveDefaultReasoningEffort$2(efforts, entryDefault));
|
|
25425
25465
|
return {
|
|
@@ -27922,10 +27962,45 @@ function tokenUsage$4(state) {
|
|
|
27922
27962
|
...state.cacheWriteTokens > 0 ? { cacheWriteTokens: state.cacheWriteTokens } : {}
|
|
27923
27963
|
};
|
|
27924
27964
|
}
|
|
27965
|
+
/**
|
|
27966
|
+
* Which event ended the stream.
|
|
27967
|
+
*
|
|
27968
|
+
* `message_stop` is the terminal event the protocol promises. `stop-reason` means
|
|
27969
|
+
* the body simply ended after a `message_delta` carried one - the shape the
|
|
27970
|
+
* completeness check accepts on purpose ("treats a stop_reason without
|
|
27971
|
+
* message_stop as complete"). `stream-end` is a body that carried neither, which
|
|
27972
|
+
* `assertStreamComplete` rejects before this is ever reached.
|
|
27973
|
+
*
|
|
27974
|
+
* Not exported: the failure message below is its only reader, and a path with no
|
|
27975
|
+
* logger does not earn a public accessor for a single call site.
|
|
27976
|
+
*/
|
|
27977
|
+
function streamCompletion(state) {
|
|
27978
|
+
if (state.done) return "message_stop";
|
|
27979
|
+
return state.finishReason === null ? "stream-end" : "stop-reason";
|
|
27980
|
+
}
|
|
27981
|
+
/**
|
|
27982
|
+
* Whether the answer left the caller anything to act on: visible text or a tool
|
|
27983
|
+
* call. Reasoning alone does not count - a thought cannot drive a tool, and the
|
|
27984
|
+
* harness reads a tool-call-free stop as a finished turn.
|
|
27985
|
+
*
|
|
27986
|
+
* `hasContent` cannot answer this: that flag is set by `thinking_delta` too, so an
|
|
27987
|
+
* answer made of nothing but reasoning still reads as content.
|
|
27988
|
+
*/
|
|
27989
|
+
function hasVisibleOutput(state) {
|
|
27990
|
+
if (state.hasToolCall) return true;
|
|
27991
|
+
return state.blocks.some((block) => block.type === "text" && block.text.trim() !== "");
|
|
27992
|
+
}
|
|
27925
27993
|
function finishReasonFor$5(state) {
|
|
27926
27994
|
const reason = state.finishReason ?? "";
|
|
27927
27995
|
if (reason === "length" || reason === "max_tokens") return { kind: "max-tokens" };
|
|
27928
27996
|
if (state.hasToolCall || reason === "tool_use" || reason === "tool_calls") return { kind: "tool-calls" };
|
|
27997
|
+
if (!hasVisibleOutput(state)) return {
|
|
27998
|
+
kind: "error",
|
|
27999
|
+
failure: {
|
|
28000
|
+
message: `MiniMax Code(编程订阅) ended the turn without an answer or a tool call — the response stopped before it did anything (finishReason: ${reason === "" ? "(none)" : reason}, stream ended by: ${streamCompletion(state)})`,
|
|
28001
|
+
code: "PROVIDER_ERROR"
|
|
28002
|
+
}
|
|
28003
|
+
};
|
|
27929
28004
|
return { kind: "stop" };
|
|
27930
28005
|
}
|
|
27931
28006
|
/** Flush every open block, then emit usage and the terminal finish. */
|
|
@@ -30901,6 +30976,9 @@ var MinimaxCodeAdapter = class extends LlmAdapter {
|
|
|
30901
30976
|
return RETRY_POLICY$4;
|
|
30902
30977
|
}
|
|
30903
30978
|
imageRequestPricing() {}
|
|
30979
|
+
imageRequestTarget(_provider, _model, image) {
|
|
30980
|
+
return requestImageTargetOrOriginal(image);
|
|
30981
|
+
}
|
|
30904
30982
|
/**
|
|
30905
30983
|
* The hardcoded directory, narrowed to what the user enabled it to serve.
|
|
30906
30984
|
*
|
|
@@ -30935,7 +31013,14 @@ var MinimaxCodeAdapter = class extends LlmAdapter {
|
|
|
30935
31013
|
if (signal?.aborted === true) throw new LlmError("MiniMax Code model resolution aborted", "ABORTED");
|
|
30936
31014
|
const settings = await this.settings();
|
|
30937
31015
|
const entry = minimaxCodeModelDef(modelId);
|
|
30938
|
-
const efforts = effortsForModel(modelId)
|
|
31016
|
+
const efforts = orderReasoningEfforts(effortsForModel(modelId), [
|
|
31017
|
+
"low",
|
|
31018
|
+
"medium",
|
|
31019
|
+
"high",
|
|
31020
|
+
"xhigh",
|
|
31021
|
+
"max",
|
|
31022
|
+
"default"
|
|
31023
|
+
]);
|
|
30939
31024
|
const contextWindow = contextWindowForModel(modelId, settings.contextWindowOverrides);
|
|
30940
31025
|
const defaultEffort = entry === void 0 ? void 0 : resolveDefaultEffort(entry, settings.defaultReasoningEffort);
|
|
30941
31026
|
return {
|
|
@@ -37314,6 +37399,19 @@ const OAUTH_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
|
|
|
37314
37399
|
*/
|
|
37315
37400
|
const OAUTH_SCOPES = "org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload";
|
|
37316
37401
|
/**
|
|
37402
|
+
* Scopes a refresh asks for when the credential being refreshed records none.
|
|
37403
|
+
*
|
|
37404
|
+
* The claude.ai subset of {@link OAUTH_SCOPES} - everything but
|
|
37405
|
+
* `org:create_api_key` - which is the set the official client sends on every
|
|
37406
|
+
* refresh. The authorization host strips `org:create_api_key` from a
|
|
37407
|
+
* subscription grant without failing the sign-in, and a refresh may not ask for
|
|
37408
|
+
* a scope the grant does not hold (RFC 6749 section 6), so re-asking for the
|
|
37409
|
+
* full authorize set is answered with `invalid_scope`. A credential that does
|
|
37410
|
+
* record its scopes is refreshed with exactly those; see oauth.ts's
|
|
37411
|
+
* refreshScopeFor.
|
|
37412
|
+
*/
|
|
37413
|
+
const OAUTH_REFRESH_FALLBACK_SCOPES = "user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload";
|
|
37414
|
+
/**
|
|
37317
37415
|
* Required on any request authenticated with a subscription OAuth token.
|
|
37318
37416
|
*
|
|
37319
37417
|
* The `anthropic-beta` header is cumulative: one request carries every marker
|
|
@@ -42105,6 +42203,30 @@ async function exchangeAuthorizationCode(params, options = {}) {
|
|
|
42105
42203
|
]);
|
|
42106
42204
|
}
|
|
42107
42205
|
/**
|
|
42206
|
+
* The 'scope' a refresh sends: never more than the grant holds.
|
|
42207
|
+
*
|
|
42208
|
+
* RFC 6749 section 6 forbids a refresh from asking for a scope the resource
|
|
42209
|
+
* owner did not originally grant. The authorize request asks for OAUTH_SCOPES,
|
|
42210
|
+
* but the authorization host strips 'org:create_api_key' from a subscription
|
|
42211
|
+
* grant without failing the sign-in. Re-asking for the full authorize set
|
|
42212
|
+
* therefore made EVERY refresh an 'invalid_scope' - a final verdict that took
|
|
42213
|
+
* the account out of rotation each time the access token aged out, so the line
|
|
42214
|
+
* demanded a new sign-in roughly once per token lifetime.
|
|
42215
|
+
*
|
|
42216
|
+
* The scopes the credential records are the ones the token endpoint reported
|
|
42217
|
+
* for this grant, so they are sent back as they are (trimmed, de-duplicated,
|
|
42218
|
+
* order kept). A credential that records none falls back to the claude.ai set
|
|
42219
|
+
* the official client sends, which also leaves 'org:create_api_key' out.
|
|
42220
|
+
*/
|
|
42221
|
+
function refreshScopeFor(grantedScopes) {
|
|
42222
|
+
const scopes = [];
|
|
42223
|
+
for (const entry of grantedScopes ?? []) {
|
|
42224
|
+
const scope = entry.trim();
|
|
42225
|
+
if (scope !== "" && !scopes.includes(scope)) scopes.push(scope);
|
|
42226
|
+
}
|
|
42227
|
+
return scopes.length > 0 ? scopes.join(" ") : OAUTH_REFRESH_FALLBACK_SCOPES;
|
|
42228
|
+
}
|
|
42229
|
+
/**
|
|
42108
42230
|
* Refresh an access token, with a bounded retry over transient failures.
|
|
42109
42231
|
*
|
|
42110
42232
|
* Only a transient status or a transport failure is retried. A final verdict —
|
|
@@ -42112,6 +42234,9 @@ async function exchangeAuthorizationCode(params, options = {}) {
|
|
|
42112
42234
|
* further attempt would be a guaranteed rejection and, on a rotation endpoint,
|
|
42113
42235
|
* one more chance to spend the refresh token.
|
|
42114
42236
|
*
|
|
42237
|
+
* 'grantedScopes' is the scope list stored with the credential being refreshed;
|
|
42238
|
+
* see {@link refreshScopeFor} for why the request must not ask for more.
|
|
42239
|
+
*
|
|
42115
42240
|
* The returned 'refreshToken' is empty when the endpoint named none; the caller
|
|
42116
42241
|
* merges that case by keeping the stored value (A3).
|
|
42117
42242
|
*/
|
|
@@ -42120,7 +42245,7 @@ async function refreshAccessToken(refreshToken, options = {}) {
|
|
|
42120
42245
|
grant_type: "refresh_token",
|
|
42121
42246
|
client_id: OAUTH_CLIENT_ID,
|
|
42122
42247
|
refresh_token: refreshToken,
|
|
42123
|
-
scope:
|
|
42248
|
+
scope: refreshScopeFor(options.grantedScopes)
|
|
42124
42249
|
};
|
|
42125
42250
|
let lastError;
|
|
42126
42251
|
for (let attempt = 0; attempt < REFRESH_MAX_ATTEMPTS; attempt += 1) {
|
|
@@ -42181,7 +42306,8 @@ async function ensureAccessToken(store, options = {}) {
|
|
|
42181
42306
|
try {
|
|
42182
42307
|
const token = await refreshAccessToken(credentials.refreshToken, {
|
|
42183
42308
|
...options.fetchFn === void 0 ? {} : { fetchFn: options.fetchFn },
|
|
42184
|
-
...options.signal === void 0 ? {} : { signal: options.signal }
|
|
42309
|
+
...options.signal === void 0 ? {} : { signal: options.signal },
|
|
42310
|
+
...credentials.scopes === void 0 ? {} : { grantedScopes: credentials.scopes }
|
|
42185
42311
|
});
|
|
42186
42312
|
const account = mergeAccount(token.account, credentials.account);
|
|
42187
42313
|
const next = {
|
|
@@ -44301,7 +44427,10 @@ var ClaudeAdoptedCredentialError = class extends ClaudeUnauthorizedError {
|
|
|
44301
44427
|
* after a successful refresh.
|
|
44302
44428
|
*/
|
|
44303
44429
|
async function refreshClaudeCredential(credentials, fetchFn) {
|
|
44304
|
-
const token = await refreshAccessToken(credentials.refreshToken, {
|
|
44430
|
+
const token = await refreshAccessToken(credentials.refreshToken, {
|
|
44431
|
+
fetchFn,
|
|
44432
|
+
...credentials.scopes === void 0 ? {} : { grantedScopes: credentials.scopes }
|
|
44433
|
+
});
|
|
44305
44434
|
const next = token.account;
|
|
44306
44435
|
const current = credentials.account;
|
|
44307
44436
|
const uuid = next.uuid ?? current?.uuid;
|
|
@@ -54555,6 +54684,9 @@ var StepCodeAdapter = class extends LlmAdapter {
|
|
|
54555
54684
|
return RETRY_POLICY;
|
|
54556
54685
|
}
|
|
54557
54686
|
imageRequestPricing() {}
|
|
54687
|
+
imageRequestTarget(_provider, _model, image) {
|
|
54688
|
+
return requestImageTargetOrOriginal(image);
|
|
54689
|
+
}
|
|
54558
54690
|
settings() {
|
|
54559
54691
|
return this.preferences === void 0 ? this.modelSettings.read() : Promise.resolve(this.preferences.status());
|
|
54560
54692
|
}
|
|
@@ -60497,7 +60629,7 @@ function apply(ctx, pluginConfig = {}) {
|
|
|
60497
60629
|
const adapter = new CodexChatGptAdapter(new ResponsesClient(oauth, ctx.attachments, {
|
|
60498
60630
|
fetchFn: modelFetch["codex-chatgpt"],
|
|
60499
60631
|
accountPool: codexAccountPool,
|
|
60500
|
-
localRawImages: { baseUrl:
|
|
60632
|
+
localRawImages: { baseUrl: webServerOrigin(ctx.webServer) },
|
|
60501
60633
|
onGenerationFinished: () => usage.invalidate(),
|
|
60502
60634
|
outputVerbosity: () => preferences.status().outputVerbosity,
|
|
60503
60635
|
fastMode: () => preferences.status().fastMode,
|
|
@@ -60780,8 +60912,5 @@ function apply(ctx, pluginConfig = {}) {
|
|
|
60780
60912
|
};
|
|
60781
60913
|
}, "dsh-chatgpt-subscription: adapter, routes, and lifecycle");
|
|
60782
60914
|
}
|
|
60783
|
-
function localWebServerBaseUrl(host, port) {
|
|
60784
|
-
return `http://${host === "0.0.0.0" ? "127.0.0.1" : host}:${port}`;
|
|
60785
|
-
}
|
|
60786
60915
|
//#endregion
|
|
60787
60916
|
export { AccountPoolCore, AccountPoolStore, AntigravityAdapter, ADOPTED_CREDENTIAL_EXPIRED_HINT as CLAUDE_ADOPTED_CREDENTIAL_EXPIRED_HINT, API_BASE as CLAUDE_API_BASE, DEFAULT_VISIBLE_MODEL_IDS as CLAUDE_DEFAULT_VISIBLE_MODELS, FALLBACK_MODELS as CLAUDE_FALLBACK_MODELS, MESSAGES_PATH as CLAUDE_MESSAGES_PATH, CLAUDE_MODELS, CLAUDE_MODEL_IDS, PROVIDER_ID as CLAUDE_PROVIDER_ID, PROVIDER_NAME as CLAUDE_PROVIDER_NAME, QUOTA_CACHE_TTL_MS as CLAUDE_QUOTA_CACHE_TTL_MS, CLAUDE_REASONING_EFFORTS, ROUTE_PREFIX as CLAUDE_ROUTE_PREFIX, ClaudeAccountPool, ClaudeAdapter, FileCredentialStore as ClaudeCredentialStore, FileModelSettingsStore as ClaudeModelSettingsStore, CodexAccountPool, CodexChatGptAdapter, CommandCodeAccountPool, CommandCodeAdapter, FileCredentialStore$1 as CommandCodeCredentialStore, FileModelSettingsStore$1 as CommandCodeModelSettingsStore, Config, DEFAULT_GUARD_OPTIONS, DEFAULT_SUBAGENT_INHERIT_TOOLS, FileCredentialStore$2 as FileCredentialStore, FileModelSettingsStore$2 as FileModelSettingsStore, GLM_CODING_PLAN_PREFERENCES_NAMESPACE, QUOTA_WINDOW_MINUTES as GLM_CODING_PLAN_QUOTA_WINDOW_MINUTES, GLM_CODING_PLAN_RETRY_POLICY_CONFIG, PROVIDER_ID$1 as GLM_CODING_PLAN_ROUTE_PROVIDER_ID, PROVIDER_NAME$1 as GLM_CODING_PLAN_ROUTE_PROVIDER_NAME, GLM_MODEL_CATALOG, GLM_MODEL_IDS, GLM_POOL_COOLDOWN_MS, GlmAdoptedCredentialRefreshError, GlmCodingPlanAccountPool, GlmCodingPlanAdapter, GlmCodingPlanCredentialStore, GlmCodingPlanModelSettingsStore, KIMI_CODE_MODELS, KIMI_CODE_RETRY_POLICY_CONFIG, KimiCodeAccountPool, KimiCodeAdapter, FileCredentialStore$3 as KimiCodeCredentialStore, FileModelSettingsStore$3 as KimiCodeModelSettingsStore, LinuxFileTokenStore, AGENT_LLM_PREFIX as MINIMAX_CODE_AGENT_LLM_PREFIX, DEFAULT_MAX_MESSAGE_BODY_BYTES as MINIMAX_CODE_MAX_MESSAGE_BODY_BYTES, MESSAGES_PATH$1 as MINIMAX_CODE_MESSAGES_PATH, MINIMAX_CODE_MODELS, PROBE_MODEL as MINIMAX_CODE_PROBE_MODEL, MINIMAX_CODE_PROVIDER_ID, MINIMAX_CODE_PROVIDER_NAME, MINIMAX_CODE_REASONING_EFFORTS, REGION_HOSTS as MINIMAX_CODE_REGION_HOSTS, MINIMAX_CODE_RETRY_POLICY_CONFIG, MINIMAX_CODE_ROUTE_PREFIX, MacKeychainTokenStore, MinimaxCodeAccountPool, MinimaxCodeAdapter, MinimaxCodeCheckinService, MinimaxCodeCredentialStore, MinimaxCodeModelSettingsStore, OAuthService, ProxyManager, RELAY_PROBE_ENV, RELAY_PROBE_FILE_ENV, RELAY_PROBE_FILE_NAME, RELAY_PROBE_MAX_BYTES, RELAY_SOURCE_KINDS, RESUME_HINT, RESUME_HINT_STRICT, RelayProbe, ResponsesClient, STEP_CODE_POOL_COOLDOWN_MS, STEP_CODE_PROFILES, STEP_CODE_PROVIDER_ID, STEP_CODE_PROVIDER_NAME, STEP_CODE_RETRY_POLICY_CONFIG, STEP_CODE_ROUTE_PREFIX, SUBAGENT_MODEL_SELECTION_NAMESPACE, SUBAGENT_POLICY_EVENT, SearchProviderSwitcher, StepCodeAccountPool, StepCodeAdapter, StepCodeCredentialRefreshError, StepCodeCredentialStore, StepCodeModelSettingsStore, StepCodeQuotaCredentialStore, UsageService, FALLBACK_MODELS$1 as WORKBUDDY_MODELS, WORKBUDDY_MODEL_IDS, WindowsDpapiTokenStore, WorkBuddyAdapter, WorkBuddyCheckinService, FileCredentialStore$4 as WorkBuddyCredentialStore, FileModelSettingsStore$4 as WorkBuddyModelSettingsStore, adoptZcodeSignIn as adoptGlmZcodeSignIn, adoptedPoolAccountKey, apply, assertRequestBodyFits as assertMinimaxCodeBodyFits, assertStreamComplete as assertMinimaxCodeStreamComplete, auditChildRoutes, auditedRoutesOf, authorizedRoutesFor, beginLogin as beginClaudeLogin, beginWebLogin as beginKimiCodeLogin, beginWebLogin$1 as beginMinimaxCodeLogin, beginWebLogin$2 as beginWebLogin, buildClaudeModelOptions, buildGlmRequestPlan, buildMinimaxCodeModelOptions, buildMinimaxRequest, cachedStepCodeModelCatalog, cancelLogin as cancelClaudeLogin, cancelWebLogin as cancelMinimaxCodeLogin, catalogModelOptions, childRoutesOf, clampOutputToContext as clampMinimaxCodeOutputToContext, classifyFailure as classifyClaudeFailure, classifyKimiFailure, classifyMinimaxFailure, classifyFailure$1 as classifyWorkBuddyFailure, claudeCliVersion, claudeCodeCredentialPaths, claudeCodeCredentialPresence, codeForFailure as claudeCodeForFailure, credentialPath as claudeCredentialPath, defaultContextWindowFor as claudeDefaultContextWindow, maxOutputTokensFor as claudeMaxOutputTokens, claudeModelCanDisableThinking, modelSettingsPath as claudeModelSettingsPath, claudeModelSupportsImage, claudeModelSupportsTemperature, claudePoolPath, claudeReasoningEfforts, claudeThinkingMode, toLlmError as claudeToLlmError, clearCachedQuota, clearCachedCatalog as clearClaudeCatalog, clearCachedQuota$1 as clearClaudeQuota, clearCachedQuota$2 as clearCommandCodeQuota, clearCachedQuota$3 as clearKimiCodeQuota, clearCachedQuota$4 as clearMinimaxCodeQuota, clearCachedCatalog$1 as clearWorkBuddyCatalog, clearCachedQuota$5 as clearWorkBuddyQuota, closeMinimaxStream, codeBuddyAuthDir, codexPoolPath, collapseScore, commandCodeAccountKey, credentialPath$1 as commandCodeCredentialPath, modelSettingsPath$1 as commandCodeModelSettingsPath, commandCodePoolPath, contextWindowForModel, convergeGlmEffort, createAntigravityImageTool, createCodexFetchProvider, createCodexImageTool, createCodexSearchProvider, createFileRelayProbeSink, createMinimaxCodeAccountsHandler, createMessage as createMinimaxCodeMessage, createPkcePair as createMinimaxCodePkcePair, createStreamState as createMinimaxCodeStreamState, createPlatformTokenStore, createSubagentAuthorization, credentialPath$2 as credentialPath, credentialsFromAdopt, credentialsFromCliLogin, delegationDenialReason, delegationModeOf, describeCredentials as describeMinimaxCodeCredentials, detectSystemProxy, dshHomeDir, effectiveRouteOf, ensureAccessToken as ensureClaudeAccessToken, ensureAccessToken$1 as ensureKimiCodeAccessToken, ensureAccessToken$2 as ensureMinimaxCodeAccessToken, fetchAccountQuota, fetchAccountQuota$1 as fetchClaudeQuota, fetchAccountQuota$2 as fetchCommandCodeQuota, fetchGlmQuota, fetchAccountQuota$3 as fetchKimiCodeQuota, fetchUserInfo as fetchKimiCodeUserInfo, fetchTokenPlanQuota as fetchMinimaxCodeQuota, fetchAccountQuota$4 as fetchWorkBuddyQuota, getCachedQuota as getCachedGlmCodingPlanQuota, getCachedQuota$1 as getCachedQuota, getLoginStatus as getClaudeLoginStatus, getCachedQuota$2 as getClaudeQuota, getClaudeWebStatus, getWebLoginStatus as getCommandCodeLoginStatus, getCachedQuota$3 as getCommandCodeQuota, getCommandCodeWebStatus, getGlmCodingPlanStatus, getWebLoginStatus$1 as getKimiCodeLoginStatus, getCachedQuota$4 as getKimiCodeQuota, getKimiCodeWebStatus, getWebLogin as getMinimaxCodeLogin, getCachedQuota$5 as getMinimaxCodeQuota, getMinimaxCodeWebStatus, getStepCodeStatus, getCachedQuota$6 as getWorkBuddyQuota, getWorkBuddyWebStatus, glmCatalogSize, authorizeUrl as glmCodingPlanAuthorizeUrl, catalogSize as glmCodingPlanCatalogCount, credentialPath$3 as glmCodingPlanCredentialPath, modelSettingsPath$2 as glmCodingPlanModelSettingsPath, modelsForRegion as glmCodingPlanModelsForRegion, glmCodingPlanPoolIdentity, glmCodingPlanPoolPath, glmCodingPlanPoolQuota, glmCodingPlanPoolStatus, glmCodingPlanSettingsSource, glmCooldownDecision, glmSubPathOf, inheritOverrideReason, inheritRouteDenialReason, inheritedRouteOf, inject, installReasoningCollapseGuard, installRelayProbe, installSubagentModelAuthorization, isAdoptedClaudeCredential, isAdoptedCredentialExpired, isAdoptedCredential as isAdoptedGlmCodingPlanCredential, isAdoptedZcodeCredential as isAdoptedGlmZcodeCredential, isAdoptedPoolCredential, isClaudeReasoningEffort, isGlmReasoningEffort, isMinimaxCodeReasoningEffort, isRefreshTokenRejected as isMinimaxCodeRefreshTokenRejected, isThinkingDisabledEffort, credentialPath$4 as kimiCodeCredentialPath, kimiCodeModelDef, modelSettingsPath$3 as kimiCodeModelSettingsPath, kimiCodePoolPath, listModelIds as listMinimaxCodeModelIds, loadCatalog as loadClaudeCatalog, loadProviderModels as loadCommandCodeModels, loadCatalog$1 as loadGlmCodingPlanCatalog, loadProviderModels$1 as loadKimiCodeModels, loadConfigCatalog as loadWorkBuddyModels, loginAndSave, mapCodexUsage, mergeGlmCodingPlanSettings, accountFromCredentials as minimaxCodeAccountFromCredentials, accountHost as minimaxCodeAccountHost, agentBaseUrl as minimaxCodeAgentBaseUrl, authJsonPath as minimaxCodeAuthJsonPath, authStateJsonPath as minimaxCodeAuthStateJsonPath, catalogSize$1 as minimaxCodeCatalogSize, credentialIsFresh as minimaxCodeCredentialIsFresh, effortForModel as minimaxCodeEffortForModel, minimaxHomeDir as minimaxCodeHomeDir, maxMessageBodyBytes as minimaxCodeMaxMessageBodyBytes, maxOutputTokensFor$1 as minimaxCodeMaxOutputTokens, messagesUrl as minimaxCodeMessagesUrl, minimaxCodeModelDef, minimaxCodeModelIds, minimaxCodeModelName, modelRequestHeaders as minimaxCodeModelRequestHeaders, modelSettingsPath$4 as minimaxCodeModelSettingsPath, outputConfigFor as minimaxCodeOutputConfig, pluginCredentialPath as minimaxCodePluginCredentialPath, minimaxCodePoolIdentity, minimaxCodePoolPath, minimaxCodePoolStatus, quotaHostCandidates as minimaxCodeQuotaHostCandidates, quotaRequestHeaders as minimaxCodeQuotaRequestHeaders, subPathOf as minimaxCodeSubPathOf, tokenPlanRemainsUrl as minimaxCodeTokenPlanRemainsUrl, modelSettingsPath$5 as modelSettingsPath, normalizeDelegationToolNames, normalizeRegion as normalizeGlmCodingPlanRegion, normalizeInheritToolNames, normalizeRotationStrategy, parseAllowedRoutes, parseClaudeCredentialDocument, parseClaudeCredentials, parseClaudePoolData, parseUsagePayload as parseClaudeUsagePayload, parseCodexPoolData, parseCodexUsage, parseCommandCodePoolData, parseGlmCodingPlanCredentials, parseGlmCodingPlanPoolData, parseKimiCodePoolData, parseMinimaxCodeCredentials, parseMinimaxCodePoolData, parseTokenPlanQuota as parseMinimaxCodeQuota, parseAnthropicUsage as parseMinimaxCodeUsage, parseResponsesStream, parseBilling as parseWorkBuddyBilling, parseConfigModels as parseWorkBuddyConfigModels, parseCredentialFile as parseWorkBuddyCredential, policyRoutesOf, pollWebLogin as pollMinimaxCodeLogin, probeConnection as probeClaudeConnection, processMinimaxStreamLine, readChildDescriptor, readClaudeCodeCredentials, readGlmResetAt, readStepCodeCacheStats, redactToken as redactMinimaxCodeToken, refreshAntigravityToken, refreshAccessToken as refreshClaudeToken, refreshAccessToken$1 as refreshKimiCodeToken, refreshAccessToken$2 as refreshMinimaxCodeToken, refreshCredentials as refreshWorkBuddyCredentials, registerClaudePreferenceStore, registerClaudeRoutes, registerCommandCodePreferenceStore, registerCommandCodeRoutes, registerGlmCodingPlanPreferenceStore, registerGlmCodingPlanRoutes, registerKimiCodePreferenceStore, registerKimiCodeRoutes, registerMinimaxCodePreferenceStore, registerMinimaxCodeRoutes, registerStepCodePreferenceStore, registerStepCodeRoutes, registerWorkBuddyPreferenceStore, registerWorkBuddyRoutes, relayProbeEnabled, relayProbeEnvFile, relayProbeEnvValue, relayProbeLogPath, rememberStepCodeCacheUsage, requestDeviceAuthorization as requestKimiCodeDeviceAuthorization, requestDeviceAuthorization$1 as requestMinimaxCodeDeviceAuthorization, resetWebLogins as resetMinimaxCodeLogins, resolveEnabledModelIds as resolveClaudeEnabledModelIds, resolveLoginInput as resolveClaudeLoginInput, resolveClaudeModel, resolveGlmModel, resolveGuardOptions, resolveRegion as resolveKimiCodeRegion, resolveMinimaxCodeEnabledModelIds, resolveQuotaCounts as resolveMinimaxCodeQuotaCounts, resolveWorkBuddyModel, revokeToken as revokeMinimaxCodeToken, saveApiKey as saveCommandCodeApiKey, scanCredentials as scanWorkBuddyCredentials, setClaudeCliVersion, beginWebLogin$3 as startCommandCodeLogin, stepCodeCatalogSize, credentialPath$5 as stepCodeCredentialPath, stepCodeModelCatalogFrom, modelSettingsPath$6 as stepCodeModelSettingsPath, stepCodePoolIdentity, stepCodePoolPath, stepCodePoolQuota, stepCodePoolStatus, stepCodePoolStatusSlice, quotaCredentialPath as stepCodeQuotaCredentialPath, stepCodeSettingsSource, stepCodeSubPathOf, subagentModelSelectionPreference, submitLoginInput as submitClaudeLoginInput, summarizeFailureBody as summarizeMinimaxCodeFailureBody, testConnection as testMinimaxCodeConnection, unauthorizedRouteReason, validateAuthorizationScope, validateDelegationToolNames, validateInheritToolNames, verifyCodingPlanKey as verifyGlmCodingPlanKey, violationText, modelSettingsPath$7 as workBuddyModelSettingsPath, modelsForRegion$1 as workBuddyModelsForRegion, zcodeCredentialsPath };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LlmAdapter, ReasoningEffortId, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
|
|
2
3
|
import { FileCredentialStore, FileModelSettingsStore, type AntigravityPreferenceStore } from './token-store.ts';
|
|
3
4
|
import { type AttachmentImageReader } from './mapper.ts';
|
|
4
5
|
export declare function resolveDefaultReasoningEffort(efforts: readonly string[], configuredEffort?: string | null): ReasoningEffortId | undefined;
|
|
@@ -44,6 +45,16 @@ export declare class AntigravityAdapter extends LlmAdapter {
|
|
|
44
45
|
providerInfo(provider: string): LlmProviderInfo;
|
|
45
46
|
providerRetryPolicy(): undefined;
|
|
46
47
|
imageRequestPricing(_provider?: string, _model?: string): undefined;
|
|
48
|
+
imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): {
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
maxPixels: number;
|
|
52
|
+
maxBytes: number;
|
|
53
|
+
} | {
|
|
54
|
+
width: number;
|
|
55
|
+
height: number;
|
|
56
|
+
maxBytes: number;
|
|
57
|
+
};
|
|
47
58
|
listModels(provider?: string): Promise<readonly LlmModelInfo[]>;
|
|
48
59
|
resolveModel(provider: string, modelId: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
49
60
|
prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EAEV,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EA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;IACH,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAIvD;;;;;;OAMG;cACsB,YAAY,IAAI,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAM7E;;;;;;;OAOG;IACY,UAAU,CAAC,WAAW,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;YAgBvF,iBAAiB;IA4D/B;;;;;;;;;;;;;;;;;;;;OAoBG;YACW,iBAAiB;IAoD/B;;;;;;;;;;;;;;;;;;OAkBG;IACG,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;YA0B/E,mBAAmB;IA6EjC;;;;;;;OAOG;YACW,uBAAuB;IAiCrC;;;;;;;;OAQG;IACG,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe7D;;;;;;;;;OASG;IACY,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAc9D;;;;;;;;OAQG;YACW,WAAW;IAazB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,UAAU;IAYlB;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,YAAY;IAapB;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;CAoB3B"}
|
|
@@ -199,6 +199,23 @@ export declare function exchangeAuthorizationCode(params: {
|
|
|
199
199
|
verifier: string;
|
|
200
200
|
redirectUri: string;
|
|
201
201
|
}, options?: TokenRequestOptions): Promise<OAuthTokenResult>;
|
|
202
|
+
/**
|
|
203
|
+
* The 'scope' a refresh sends: never more than the grant holds.
|
|
204
|
+
*
|
|
205
|
+
* RFC 6749 section 6 forbids a refresh from asking for a scope the resource
|
|
206
|
+
* owner did not originally grant. The authorize request asks for OAUTH_SCOPES,
|
|
207
|
+
* but the authorization host strips 'org:create_api_key' from a subscription
|
|
208
|
+
* grant without failing the sign-in. Re-asking for the full authorize set
|
|
209
|
+
* therefore made EVERY refresh an 'invalid_scope' - a final verdict that took
|
|
210
|
+
* the account out of rotation each time the access token aged out, so the line
|
|
211
|
+
* demanded a new sign-in roughly once per token lifetime.
|
|
212
|
+
*
|
|
213
|
+
* The scopes the credential records are the ones the token endpoint reported
|
|
214
|
+
* for this grant, so they are sent back as they are (trimmed, de-duplicated,
|
|
215
|
+
* order kept). A credential that records none falls back to the claude.ai set
|
|
216
|
+
* the official client sends, which also leaves 'org:create_api_key' out.
|
|
217
|
+
*/
|
|
218
|
+
export declare function refreshScopeFor(grantedScopes: readonly string[] | undefined): string;
|
|
202
219
|
/**
|
|
203
220
|
* Refresh an access token, with a bounded retry over transient failures.
|
|
204
221
|
*
|
|
@@ -207,10 +224,15 @@ export declare function exchangeAuthorizationCode(params: {
|
|
|
207
224
|
* further attempt would be a guaranteed rejection and, on a rotation endpoint,
|
|
208
225
|
* one more chance to spend the refresh token.
|
|
209
226
|
*
|
|
227
|
+
* 'grantedScopes' is the scope list stored with the credential being refreshed;
|
|
228
|
+
* see {@link refreshScopeFor} for why the request must not ask for more.
|
|
229
|
+
*
|
|
210
230
|
* The returned 'refreshToken' is empty when the endpoint named none; the caller
|
|
211
231
|
* merges that case by keeping the stored value (A3).
|
|
212
232
|
*/
|
|
213
|
-
export declare function refreshAccessToken(refreshToken: string, options?: TokenRequestOptions
|
|
233
|
+
export declare function refreshAccessToken(refreshToken: string, options?: TokenRequestOptions & {
|
|
234
|
+
grantedScopes?: readonly string[];
|
|
235
|
+
}): Promise<OAuthTokenResult>;
|
|
214
236
|
export interface EnsureTokenOptions {
|
|
215
237
|
fetchFn?: typeof fetch;
|
|
216
238
|
signal?: AbortSignal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../src/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,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;CAAO,GACvC,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAwB1E;AAMD,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAY3G;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,eAAe,CAAC,CAsH1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC"}
|
|
@@ -78,6 +78,19 @@ export declare const OAUTH_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
|
|
|
78
78
|
* this provider exists to serve, so the full set is requested.
|
|
79
79
|
*/
|
|
80
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
|
+
* Scopes a refresh asks for when the credential being refreshed records none.
|
|
83
|
+
*
|
|
84
|
+
* The claude.ai subset of {@link OAUTH_SCOPES} - everything but
|
|
85
|
+
* `org:create_api_key` - which is the set the official client sends on every
|
|
86
|
+
* refresh. The authorization host strips `org:create_api_key` from a
|
|
87
|
+
* subscription grant without failing the sign-in, and a refresh may not ask for
|
|
88
|
+
* a scope the grant does not hold (RFC 6749 section 6), so re-asking for the
|
|
89
|
+
* full authorize set is answered with `invalid_scope`. A credential that does
|
|
90
|
+
* record its scopes is refreshed with exactly those; see oauth.ts's
|
|
91
|
+
* refreshScopeFor.
|
|
92
|
+
*/
|
|
93
|
+
export declare const OAUTH_REFRESH_FALLBACK_SCOPES = "user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload";
|
|
81
94
|
/**
|
|
82
95
|
* Required on any request authenticated with a subscription OAuth token.
|
|
83
96
|
*
|
|
@@ -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;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;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,sCAAsC,CAAA;AACtE,wEAAwE;AACxE,eAAO,MAAM,eAAe,+CAA+C,CAAA;AAE3E;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,oDAAoD,CAAA;AAE1F;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,yCAAyC,CAAA;AAErE;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,+GAA+G,CAAA;AAExI;;;;;GAKG;AACH,eAAO,MAAM,UAAU,qBAAqB,CAAA;AAC5C,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,yBAAyB,CAAA;AACtD,8EAA8E;AAC9E,eAAO,MAAM,yBAAyB,oCAAoC,CAAA;AAC1E;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,kCAAkC,CAAA;AACtE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAA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 -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @module dsh-chatgpt-subscription/llm-compat
|
|
17
17
|
*/
|
|
18
|
-
import type { ContentBlock as HarnessContentBlock, GenerateOptions as HarnessGenerateOptions } from '@deepseek-ai/dsh-llm';
|
|
18
|
+
import type { ContentBlock as HarnessContentBlock, GenerateOptions as HarnessGenerateOptions, ToolSchema as HarnessToolSchema } from '@deepseek-ai/dsh-llm';
|
|
19
19
|
import type { ContextFormed } from '@deepseek-ai/dsh-llm/message';
|
|
20
20
|
export { LlmError, type FinishReason, type StreamChunk, type TokenUsage, } from '@deepseek-ai/dsh-llm';
|
|
21
21
|
declare module '@deepseek-ai/dsh-llm' {
|
|
@@ -35,6 +35,14 @@ export interface ToolResultBlock {
|
|
|
35
35
|
content: ContentBlock[];
|
|
36
36
|
isError?: boolean;
|
|
37
37
|
}
|
|
38
|
+
export interface ToolAdditionBlock {
|
|
39
|
+
type: 'tool-addition';
|
|
40
|
+
toolName: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ToolRemovalBlock {
|
|
43
|
+
type: 'tool-removal';
|
|
44
|
+
toolName: string;
|
|
45
|
+
}
|
|
38
46
|
/**
|
|
39
47
|
* Every content block the mappers read.
|
|
40
48
|
*
|
|
@@ -45,7 +53,7 @@ export interface ToolResultBlock {
|
|
|
45
53
|
*/
|
|
46
54
|
export type ContentBlock = Exclude<HarnessContentBlock, {
|
|
47
55
|
type: 'tool-result';
|
|
48
|
-
}> | ToolResultBlock;
|
|
56
|
+
}> | ToolResultBlock | ToolAdditionBlock | ToolRemovalBlock;
|
|
49
57
|
/**
|
|
50
58
|
* Blocks this package hands back to the harness.
|
|
51
59
|
*
|
|
@@ -53,7 +61,7 @@ export type ContentBlock = Exclude<HarnessContentBlock, {
|
|
|
53
61
|
* harness has no `tool-result` block to accept one, so outbound values are the
|
|
54
62
|
* shared harness blocks without it.
|
|
55
63
|
*/
|
|
56
|
-
export type OutboundContentBlock = Exclude<ContentBlock, ToolResultBlock>;
|
|
64
|
+
export type OutboundContentBlock = Exclude<ContentBlock, ToolResultBlock | ToolAdditionBlock | ToolRemovalBlock>;
|
|
57
65
|
/** Producer-declared provenance, read for `kind` and the model replay envelope. */
|
|
58
66
|
export interface MessageSource {
|
|
59
67
|
readonly kind: string;
|
|
@@ -68,9 +76,16 @@ export interface Message {
|
|
|
68
76
|
readonly content: ContentBlock[];
|
|
69
77
|
readonly source?: MessageSource;
|
|
70
78
|
}
|
|
79
|
+
type HarnessToolHistory = HarnessGenerateOptions extends {
|
|
80
|
+
toolHistory?: infer History;
|
|
81
|
+
} ? History : unknown;
|
|
71
82
|
/** Request options carrying the normalized conversation. */
|
|
72
|
-
export type GenerateOptions = Omit<HarnessGenerateOptions, 'messages'> & {
|
|
83
|
+
export type GenerateOptions = Omit<HarnessGenerateOptions, 'messages' | 'tools'> & {
|
|
73
84
|
messages: Message[];
|
|
85
|
+
tools?: Array<HarnessToolSchema & {
|
|
86
|
+
deferLoading?: true;
|
|
87
|
+
}>;
|
|
88
|
+
toolHistory?: HarnessToolHistory;
|
|
74
89
|
};
|
|
75
90
|
/**
|
|
76
91
|
* Normalize one harness message list into {@link Message}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/llm-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,YAAY,IAAI,mBAAmB,EACnC,eAAe,IAAI,sBAAsB,
|
|
1
|
+
{"version":3,"file":"llm-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/llm-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,YAAY,IAAI,mBAAmB,EACnC,eAAe,IAAI,sBAAsB,EACzC,UAAU,IAAI,iBAAiB,EAChC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8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ED,mEAAmE;AACnE,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,CAAA;IAC5D,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,CAAA;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;CAChC;AAED,KAAK,kBAAkB,GAAG,sBAAsB,SAAS;IAAE,WAAW,CAAC,EAAE,MAAM,OAAO,CAAA;CAAE,GAAG,OAAO,GAAG,OAAO,CAAA;AAE5G,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IACjF,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,iBAAiB,GAAG;QAAE,YAAY,CAAC,EAAE,IAAI,CAAA;KAAE,CAAC,CAAA;IAC1D,WAAW,CAAC,EAAE,kBAAkB,CAAA;CACjC,CAAA;AAYD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,CA6BrF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAEzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-efforts.d.ts","sourceRoot":"","sources":["../../../../src/host/common/reasoning-efforts.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAI5G"}
|
|
@@ -105,8 +105,14 @@ export declare const REQUEST_IMAGE_MAX_EDGE = 1024;
|
|
|
105
105
|
export declare function requestImageTarget(ref: ImageAttachmentRef, edge?: number): {
|
|
106
106
|
width: number;
|
|
107
107
|
height: number;
|
|
108
|
+
maxPixels: number;
|
|
108
109
|
maxBytes: number;
|
|
109
110
|
} | undefined;
|
|
111
|
+
export declare function requestImageTargetOrOriginal(ref: ImageAttachmentRef): {
|
|
112
|
+
width: number;
|
|
113
|
+
height: number;
|
|
114
|
+
maxBytes: number;
|
|
115
|
+
};
|
|
110
116
|
/**
|
|
111
117
|
* Replace the oldest inline images with a text placeholder once one request
|
|
112
118
|
* would carry more than `maxBytes` of base64 image data.
|