@eddyskywalker/dsh-chatgpt-subscription 0.24.7 → 0.25.1
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 +19 -0
- package/lib/client.js +13 -0
- package/lib/client.js.map +1 -1
- package/lib/index.js +119 -33
- package/lib/types/host/agent-preset.d.ts +20 -0
- package/lib/types/host/agent-preset.d.ts.map +1 -1
- 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/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/model-catalog.d.ts.map +1 -1
- package/lib/types/host/search-provider-switcher.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/presets/dispatch/agent.cordis.yml +3 -2
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();
|
|
@@ -12167,7 +12189,7 @@ var SearchProviderSwitcher = class {
|
|
|
12167
12189
|
const nextSearch = codexSelected ? CODEX_SEARCH_PROVIDER_ID : this.originalSearchProvider;
|
|
12168
12190
|
const nextFetch = options.fetchProvider === "plugin" || options.fetchProvider !== "dsh" && (codexSelected || options.pluginFetch === true) ? CODEX_FETCH_PROVIDER_ID : this.originalFetchProvider;
|
|
12169
12191
|
const configured = config.searchProvider === nextSearch && config.fetchProvider === nextFetch;
|
|
12170
|
-
const applied = running === void 0 || running.searchProvider === nextSearch && running.fetchProvider === nextFetch;
|
|
12192
|
+
const applied = running === void 0 || runningProviderValue(running.searchProvider) === nextSearch && runningProviderValue(running.fetchProvider) === nextFetch;
|
|
12171
12193
|
if (configured && applied) {
|
|
12172
12194
|
this.state = "applied";
|
|
12173
12195
|
return;
|
|
@@ -12222,6 +12244,14 @@ function currentConfig(entry) {
|
|
|
12222
12244
|
const config = entry.options.config;
|
|
12223
12245
|
return typeof config === "object" && config !== null && !Array.isArray(config) ? config : {};
|
|
12224
12246
|
}
|
|
12247
|
+
/**
|
|
12248
|
+
* Unwrap a Cordis `Volatile<string | undefined>` config reference (`@deepseek-ai/dsh-web`
|
|
12249
|
+
* >=0.2.1-rc.2) or return a plain runtime config value (`<=0.2.1-rc.1`).
|
|
12250
|
+
*/
|
|
12251
|
+
function runningProviderValue(value) {
|
|
12252
|
+
if (typeof value === "object" && value !== null && "get" in value && typeof value.get === "function") return value.get();
|
|
12253
|
+
return value;
|
|
12254
|
+
}
|
|
12225
12255
|
/** Never include paths, credentials, or arbitrary configuration in public diagnostics. */
|
|
12226
12256
|
function providerId(value) {
|
|
12227
12257
|
return typeof value === "string" && /^[a-zA-Z0-9_-]{1,80}$/.test(value) ? value : null;
|
|
@@ -20786,16 +20816,26 @@ function requestImageTarget(ref, edge = REQUEST_IMAGE_MAX_EDGE) {
|
|
|
20786
20816
|
const { width, height } = ref;
|
|
20787
20817
|
if (!Number.isSafeInteger(width) || !Number.isSafeInteger(height) || width <= 0 || height <= 0) return void 0;
|
|
20788
20818
|
if (Math.max(width, height) <= edge) return void 0;
|
|
20819
|
+
const maxPixels = Math.max(1, Math.floor(edge * edge * (Math.min(width, height) / Math.max(width, height))));
|
|
20789
20820
|
return width >= height ? {
|
|
20790
20821
|
width: edge,
|
|
20791
20822
|
height: Math.max(1, Math.round(edge * height / width)),
|
|
20823
|
+
maxPixels,
|
|
20792
20824
|
maxBytes: REQUEST_IMAGE_VERSION_MAX_BYTES$1
|
|
20793
20825
|
} : {
|
|
20794
20826
|
width: Math.max(1, Math.round(edge * width / height)),
|
|
20795
20827
|
height: edge,
|
|
20828
|
+
maxPixels,
|
|
20796
20829
|
maxBytes: REQUEST_IMAGE_VERSION_MAX_BYTES$1
|
|
20797
20830
|
};
|
|
20798
20831
|
}
|
|
20832
|
+
function requestImageTargetOrOriginal(ref) {
|
|
20833
|
+
return requestImageTarget(ref) ?? {
|
|
20834
|
+
width: ref.width,
|
|
20835
|
+
height: ref.height,
|
|
20836
|
+
maxBytes: ref.bytes
|
|
20837
|
+
};
|
|
20838
|
+
}
|
|
20799
20839
|
/**
|
|
20800
20840
|
* Replace the oldest inline images with a text placeholder once one request
|
|
20801
20841
|
* would carry more than `maxBytes` of base64 image data.
|
|
@@ -25372,6 +25412,9 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
25372
25412
|
return RETRY_POLICY$5;
|
|
25373
25413
|
}
|
|
25374
25414
|
imageRequestPricing() {}
|
|
25415
|
+
imageRequestTarget(_provider, _model, image) {
|
|
25416
|
+
return requestImageTargetOrOriginal(image);
|
|
25417
|
+
}
|
|
25375
25418
|
settings() {
|
|
25376
25419
|
return this.preferences ? Promise.resolve(this.preferences.status()) : this.modelSettings.read();
|
|
25377
25420
|
}
|
|
@@ -25419,7 +25462,12 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
25419
25462
|
const settings = await this.settings();
|
|
25420
25463
|
const catalog = await this.catalog();
|
|
25421
25464
|
const entry = catalog.find((model) => model.id === modelId);
|
|
25422
|
-
const efforts = reasoningEffortsForEntry(modelId, catalog)
|
|
25465
|
+
const efforts = orderReasoningEfforts(reasoningEffortsForEntry(modelId, catalog), [
|
|
25466
|
+
"none",
|
|
25467
|
+
"low",
|
|
25468
|
+
"high",
|
|
25469
|
+
"max"
|
|
25470
|
+
]);
|
|
25423
25471
|
const entryDefault = defaultReasoningEffortForEntry(modelId, catalog);
|
|
25424
25472
|
const defaultEffortId = resolveDefaultReasoningEffort$2(efforts, settings.defaultReasoningEffort) ?? (entryDefault === void 0 ? void 0 : resolveDefaultReasoningEffort$2(efforts, entryDefault));
|
|
25425
25473
|
return {
|
|
@@ -30936,6 +30984,9 @@ var MinimaxCodeAdapter = class extends LlmAdapter {
|
|
|
30936
30984
|
return RETRY_POLICY$4;
|
|
30937
30985
|
}
|
|
30938
30986
|
imageRequestPricing() {}
|
|
30987
|
+
imageRequestTarget(_provider, _model, image) {
|
|
30988
|
+
return requestImageTargetOrOriginal(image);
|
|
30989
|
+
}
|
|
30939
30990
|
/**
|
|
30940
30991
|
* The hardcoded directory, narrowed to what the user enabled it to serve.
|
|
30941
30992
|
*
|
|
@@ -30970,7 +31021,14 @@ var MinimaxCodeAdapter = class extends LlmAdapter {
|
|
|
30970
31021
|
if (signal?.aborted === true) throw new LlmError("MiniMax Code model resolution aborted", "ABORTED");
|
|
30971
31022
|
const settings = await this.settings();
|
|
30972
31023
|
const entry = minimaxCodeModelDef(modelId);
|
|
30973
|
-
const efforts = effortsForModel(modelId)
|
|
31024
|
+
const efforts = orderReasoningEfforts(effortsForModel(modelId), [
|
|
31025
|
+
"low",
|
|
31026
|
+
"medium",
|
|
31027
|
+
"high",
|
|
31028
|
+
"xhigh",
|
|
31029
|
+
"max",
|
|
31030
|
+
"default"
|
|
31031
|
+
]);
|
|
30974
31032
|
const contextWindow = contextWindowForModel(modelId, settings.contextWindowOverrides);
|
|
30975
31033
|
const defaultEffort = entry === void 0 ? void 0 : resolveDefaultEffort(entry, settings.defaultReasoningEffort);
|
|
30976
31034
|
return {
|
|
@@ -38008,6 +38066,24 @@ const CLAUDE_MODELS = Object.freeze([
|
|
|
38008
38066
|
],
|
|
38009
38067
|
canDisableThinking: true
|
|
38010
38068
|
},
|
|
38069
|
+
{
|
|
38070
|
+
id: "claude-haiku-5-5",
|
|
38071
|
+
name: "Claude Haiku 5.5",
|
|
38072
|
+
contextWindow: 1e6,
|
|
38073
|
+
maxTokens: 128e3,
|
|
38074
|
+
supportsImage: true,
|
|
38075
|
+
supportsTemperature: false,
|
|
38076
|
+
thinkingMode: "adaptive",
|
|
38077
|
+
reasoningEfforts: [
|
|
38078
|
+
"low",
|
|
38079
|
+
"medium",
|
|
38080
|
+
"high",
|
|
38081
|
+
"xhigh",
|
|
38082
|
+
"max"
|
|
38083
|
+
],
|
|
38084
|
+
canDisableThinking: true,
|
|
38085
|
+
bindsThinkingToPrefix: true
|
|
38086
|
+
},
|
|
38011
38087
|
{
|
|
38012
38088
|
id: "claude-opus-4-5",
|
|
38013
38089
|
name: "Claude Opus 4.5 (latest)",
|
|
@@ -38204,24 +38280,6 @@ const CLAUDE_MODELS = Object.freeze([
|
|
|
38204
38280
|
],
|
|
38205
38281
|
canDisableThinking: false,
|
|
38206
38282
|
bindsThinkingToPrefix: true
|
|
38207
|
-
},
|
|
38208
|
-
{
|
|
38209
|
-
id: "claude-haiku-5-5",
|
|
38210
|
-
name: "Claude Haiku 5.5",
|
|
38211
|
-
contextWindow: 1e6,
|
|
38212
|
-
maxTokens: 128e3,
|
|
38213
|
-
supportsImage: true,
|
|
38214
|
-
supportsTemperature: false,
|
|
38215
|
-
thinkingMode: "adaptive",
|
|
38216
|
-
reasoningEfforts: [
|
|
38217
|
-
"low",
|
|
38218
|
-
"medium",
|
|
38219
|
-
"high",
|
|
38220
|
-
"xhigh",
|
|
38221
|
-
"max"
|
|
38222
|
-
],
|
|
38223
|
-
canDisableThinking: true,
|
|
38224
|
-
bindsThinkingToPrefix: true
|
|
38225
38283
|
}
|
|
38226
38284
|
]);
|
|
38227
38285
|
/** Every id the fallback table knows, in declaration order. */
|
|
@@ -54634,6 +54692,9 @@ var StepCodeAdapter = class extends LlmAdapter {
|
|
|
54634
54692
|
return RETRY_POLICY;
|
|
54635
54693
|
}
|
|
54636
54694
|
imageRequestPricing() {}
|
|
54695
|
+
imageRequestTarget(_provider, _model, image) {
|
|
54696
|
+
return requestImageTargetOrOriginal(image);
|
|
54697
|
+
}
|
|
54637
54698
|
settings() {
|
|
54638
54699
|
return this.preferences === void 0 ? this.modelSettings.read() : Promise.resolve(this.preferences.status());
|
|
54639
54700
|
}
|
|
@@ -58767,7 +58828,7 @@ const DISPATCH_PRESET = {
|
|
|
58767
58828
|
name: "@deepseek-ai/dsh-persona",
|
|
58768
58829
|
config: {
|
|
58769
58830
|
suffix: "Your working directory is {{cwd}}.",
|
|
58770
|
-
prefix: `You are powered by {{model}}.
|
|
58831
|
+
prefix: `You are powered by {{model}}.
|
|
58771
58832
|
|
|
58772
58833
|
[Role Identification] If your first user message is a task brief (rather than a direct request from the human user), you are a subagent: the coordinator-facing rules in R0, R0.5, R-G, R1, R2, R4, R5, and R-W do not apply to you. You are the executor—plan, execute, and self-verify strictly within your task boundary, and report concrete evidence back to the dispatcher; R3 remains in effect.
|
|
58773
58834
|
|
|
@@ -59083,6 +59144,33 @@ Reset: fallback applies only to the current task. When the next task begins, alw
|
|
|
59083
59144
|
}
|
|
59084
59145
|
]
|
|
59085
59146
|
};
|
|
59147
|
+
/**
|
|
59148
|
+
* Reconcile {@link DISPATCH_PRESET} with the running harness generation.
|
|
59149
|
+
*
|
|
59150
|
+
* Harnesses shipping `@deepseek-ai/dsh-working-directory` (>= 0.2.1) provide the
|
|
59151
|
+
* session working directory through the `WORKING_DIRECTORY` dynamic context and
|
|
59152
|
+
* no longer register `{{cwd}}` on `ctx.systemPrompt`, so keeping `persona.config.suffix`
|
|
59153
|
+
* (`Your working directory is {{cwd}}.`) makes `SystemPrompt` throw
|
|
59154
|
+
* `unknown prompt variable "{{cwd}}"` at render time. On 0.1.7–0.2.0 that package
|
|
59155
|
+
* is absent and `{{cwd}}` is still the only way the persona states the workspace,
|
|
59156
|
+
* so the unmodified {@link DISPATCH_PRESET} is returned unchanged.
|
|
59157
|
+
* @param resolves - whether a bare specifier resolves in this installation.
|
|
59158
|
+
* @returns the preset definition for the running harness generation.
|
|
59159
|
+
*/
|
|
59160
|
+
function resolveDispatchPreset(resolves = resolvesFromHere) {
|
|
59161
|
+
if (!resolves("@deepseek-ai/dsh-working-directory")) return DISPATCH_PRESET;
|
|
59162
|
+
return {
|
|
59163
|
+
...DISPATCH_PRESET,
|
|
59164
|
+
plugins: DISPATCH_PRESET.plugins.map((row) => {
|
|
59165
|
+
if (row.id !== "persona" || typeof row.config !== "object" || row.config === null) return row;
|
|
59166
|
+
const { suffix: _omitted, ...rest } = row.config;
|
|
59167
|
+
return {
|
|
59168
|
+
...row,
|
|
59169
|
+
config: rest
|
|
59170
|
+
};
|
|
59171
|
+
})
|
|
59172
|
+
};
|
|
59173
|
+
}
|
|
59086
59174
|
/** The `agentPresets` service, when the host exposes one that can register. */
|
|
59087
59175
|
function presetRegistry(host) {
|
|
59088
59176
|
if (typeof host.get !== "function") return void 0;
|
|
@@ -59115,7 +59203,7 @@ function installDispatchPreset(host, resolves = resolvesFromHere) {
|
|
|
59115
59203
|
host.logger.warn(`[dsh-chatgpt-subscription] agent preset "${DISPATCH_PRESET_ID}" fell back to the preset root: ${PRESET_REGISTRY_PACKAGE} is installed but no agentPresets service is available`);
|
|
59116
59204
|
return "legacy";
|
|
59117
59205
|
}
|
|
59118
|
-
host.effect(() => registerDispatchPreset(host, registry), "dsh-chatgpt-subscription: dispatch agent preset");
|
|
59206
|
+
host.effect(() => registerDispatchPreset(host, registry, resolves), "dsh-chatgpt-subscription: dispatch agent preset");
|
|
59119
59207
|
return "registered";
|
|
59120
59208
|
} catch (error) {
|
|
59121
59209
|
host.logger.warn(`[dsh-chatgpt-subscription] agent preset "${DISPATCH_PRESET_ID}" could not be registered: ${messageOf(error)}`);
|
|
@@ -59127,11 +59215,12 @@ function installDispatchPreset(host, resolves = resolvesFromHere) {
|
|
|
59127
59215
|
* it.
|
|
59128
59216
|
* @param host - plugin context, for the logger.
|
|
59129
59217
|
* @param registry - the service the definition is submitted to.
|
|
59218
|
+
* @param resolves - whether a bare specifier resolves in this installation.
|
|
59130
59219
|
* @returns the harness's own unregister function, or a no-op after a failure.
|
|
59131
59220
|
*/
|
|
59132
|
-
async function registerDispatchPreset(host, registry) {
|
|
59221
|
+
async function registerDispatchPreset(host, registry, resolves) {
|
|
59133
59222
|
try {
|
|
59134
|
-
const unregister = await registry.register(
|
|
59223
|
+
const unregister = await registry.register(resolveDispatchPreset(resolves));
|
|
59135
59224
|
host.logger.info(`[dsh-chatgpt-subscription] agent preset "${DISPATCH_PRESET_ID}" registered with the running harness`);
|
|
59136
59225
|
return unregister;
|
|
59137
59226
|
} catch (error) {
|
|
@@ -60576,7 +60665,7 @@ function apply(ctx, pluginConfig = {}) {
|
|
|
60576
60665
|
const adapter = new CodexChatGptAdapter(new ResponsesClient(oauth, ctx.attachments, {
|
|
60577
60666
|
fetchFn: modelFetch["codex-chatgpt"],
|
|
60578
60667
|
accountPool: codexAccountPool,
|
|
60579
|
-
localRawImages: { baseUrl:
|
|
60668
|
+
localRawImages: { baseUrl: webServerOrigin(ctx.webServer) },
|
|
60580
60669
|
onGenerationFinished: () => usage.invalidate(),
|
|
60581
60670
|
outputVerbosity: () => preferences.status().outputVerbosity,
|
|
60582
60671
|
fastMode: () => preferences.status().fastMode,
|
|
@@ -60859,8 +60948,5 @@ function apply(ctx, pluginConfig = {}) {
|
|
|
60859
60948
|
};
|
|
60860
60949
|
}, "dsh-chatgpt-subscription: adapter, routes, and lifecycle");
|
|
60861
60950
|
}
|
|
60862
|
-
function localWebServerBaseUrl(host, port) {
|
|
60863
|
-
return `http://${host === "0.0.0.0" ? "127.0.0.1" : host}:${port}`;
|
|
60864
|
-
}
|
|
60865
60951
|
//#endregion
|
|
60866
60952
|
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 };
|
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
*/
|
|
26
26
|
/** The row package whose presence marks a harness that takes presets from a row. */
|
|
27
27
|
export declare const PRESET_REGISTRY_PACKAGE = "@deepseek-ai/dsh-agent-preset";
|
|
28
|
+
/**
|
|
29
|
+
* The package whose presence marks a harness (>= 0.2.1) that injects the
|
|
30
|
+
* session working directory via `WORKING_DIRECTORY` user context and no longer
|
|
31
|
+
* registers `{{cwd}}` as a `systemPrompt` variable.
|
|
32
|
+
*/
|
|
33
|
+
export declare const WORKING_DIRECTORY_PACKAGE = "@deepseek-ai/dsh-working-directory";
|
|
28
34
|
/** The id the `dispatch` preset is selectable under. */
|
|
29
35
|
export declare const DISPATCH_PRESET_ID = "dispatch";
|
|
30
36
|
/**
|
|
@@ -92,6 +98,20 @@ export type PresetInstall = 'registered' | 'legacy';
|
|
|
92
98
|
* for text the Loader evaluates, and nothing evaluates this.
|
|
93
99
|
*/
|
|
94
100
|
export declare const DISPATCH_PRESET: PresetDefinition;
|
|
101
|
+
/**
|
|
102
|
+
* Reconcile {@link DISPATCH_PRESET} with the running harness generation.
|
|
103
|
+
*
|
|
104
|
+
* Harnesses shipping `@deepseek-ai/dsh-working-directory` (>= 0.2.1) provide the
|
|
105
|
+
* session working directory through the `WORKING_DIRECTORY` dynamic context and
|
|
106
|
+
* no longer register `{{cwd}}` on `ctx.systemPrompt`, so keeping `persona.config.suffix`
|
|
107
|
+
* (`Your working directory is {{cwd}}.`) makes `SystemPrompt` throw
|
|
108
|
+
* `unknown prompt variable "{{cwd}}"` at render time. On 0.1.7–0.2.0 that package
|
|
109
|
+
* is absent and `{{cwd}}` is still the only way the persona states the workspace,
|
|
110
|
+
* so the unmodified {@link DISPATCH_PRESET} is returned unchanged.
|
|
111
|
+
* @param resolves - whether a bare specifier resolves in this installation.
|
|
112
|
+
* @returns the preset definition for the running harness generation.
|
|
113
|
+
*/
|
|
114
|
+
export declare function resolveDispatchPreset(resolves?: SpecifierResolver): PresetDefinition;
|
|
95
115
|
/**
|
|
96
116
|
* Declare `dispatch` to the running harness, when the harness has the mechanism.
|
|
97
117
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-preset.d.ts","sourceRoot":"","sources":["../../../src/host/agent-preset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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C,GAC7C,aAAa,CAuBf"}
|
|
@@ -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,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,EAAE,WAAW,GAAG,WAAW,EAAE,CAyGjF;AA4CD,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,EAAE,CAc7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idle-watchdog.d.ts","sourceRoot":"","sources":["../../../../src/host/common/idle-watchdog.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,8BAA8B,SAAU,CAAA;AACrD,eAAO,MAAM,wBAAwB,4BAA4B,CAAA;AAEjE;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,SAAiC,CAAA;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,KAAK,IAAI,IAAI,CAAA;CACd;AAED,qCAAqC;AACrC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,KAAK,aAAa,CAAC,CAAC,CAAC,CAAA;AAEnG;;;GAGG;AACH,wBAAuB,sBAAsB,CAAC,CAAC,EAC7C,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,EACzB,cAAc,EAAE,WAAW,GAAG,SAAS,EACvC,SAAS,GAAE,MAAuC,EAClD,WAAW,GAAE,MAAiC,EAC9C,WAAW,GAAE,MAAc,GAC1B,aAAa,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"idle-watchdog.d.ts","sourceRoot":"","sources":["../../../../src/host/common/idle-watchdog.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,8BAA8B,SAAU,CAAA;AACrD,eAAO,MAAM,wBAAwB,4BAA4B,CAAA;AAEjE;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,SAAiC,CAAA;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,KAAK,IAAI,IAAI,CAAA;CACd;AAED,qCAAqC;AACrC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,KAAK,aAAa,CAAC,CAAC,CAAC,CAAA;AAEnG;;;GAGG;AACH,wBAAuB,sBAAsB,CAAC,CAAC,EAC7C,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,EACzB,cAAc,EAAE,WAAW,GAAG,SAAS,EACvC,SAAS,GAAE,MAAuC,EAClD,WAAW,GAAE,MAAiC,EAC9C,WAAW,GAAE,MAAc,GAC1B,aAAa,CAAC,CAAC,CAAC,CAyClB"}
|
|
@@ -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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@@
|
|
|
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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-images.d.ts","sourceRoot":"","sources":["../../../../src/host/common/request-images.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAuBtF;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,kBAAkB,CAAC,CAAA;AAE3F,sFAAsF;AACtF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,QA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,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAI3E;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,qBAAqB,GAAG,WAAW,GAAG,SAAS,CAuBzH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webserver-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/webserver-compat.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,IAAI,MAAM,CAAA;CACrB;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAOrE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LlmAdapter, ReasoningEffortId, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type ResolvedRetryPolicy, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
|
|
2
3
|
import { PROVIDER_ID, reasoningEffortsFor } from './types.ts';
|
|
3
4
|
import { FileCredentialStore, FileModelSettingsStore, type KimiCodeCatalogModel, type KimiCodePreferenceStore } from './token-store.ts';
|
|
4
5
|
import { buildModelOptions, clearCachedCatalog } from './client.ts';
|
|
@@ -156,6 +157,11 @@ export declare class KimiCodeAdapter extends LlmAdapter {
|
|
|
156
157
|
providerInfo(provider: string): LlmProviderInfo;
|
|
157
158
|
providerRetryPolicy(): ResolvedRetryPolicy;
|
|
158
159
|
imageRequestPricing(): undefined;
|
|
160
|
+
imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): {
|
|
161
|
+
width: number;
|
|
162
|
+
height: number;
|
|
163
|
+
maxBytes: number;
|
|
164
|
+
};
|
|
159
165
|
private settings;
|
|
160
166
|
/**
|
|
161
167
|
* Catalog for the picker: the live managed listing when reachable, the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EAEV,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EAEV,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAGL,WAAW,EASX,mBAAmB,EACpB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAEtB,KAAK,oBAAoB,EAEzB,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAUnB,MAAM,aAAa,CAAA;AACpB,OAAO,EAcL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAI3B,MAAM,aAAa,CAAA;AAiFpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAKv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W,mBAAmB;IA6DjC;;;;;;;;OAQG;YACW,mBAAmB;CASlC;AAQD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* racing that application for a rotation neither of them needs.
|
|
14
14
|
*/
|
|
15
15
|
import { LlmAdapter, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type ResolvedRetryPolicy, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
16
|
+
import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
|
|
16
17
|
import { PROVIDER_ID } from './types.ts';
|
|
17
18
|
import { MinimaxCodeCredentialStore, MinimaxCodeModelSettingsStore, type MinimaxCodePreferenceStore } from './token-store.ts';
|
|
18
19
|
import { clampOutputToContext, maxOutputTokensFor, type AttachmentVideoReader, type AttachmentImageReader } from './mapper.ts';
|
|
@@ -146,6 +147,11 @@ export declare class MinimaxCodeAdapter extends LlmAdapter {
|
|
|
146
147
|
providerInfo(provider: string): LlmProviderInfo;
|
|
147
148
|
providerRetryPolicy(): ResolvedRetryPolicy;
|
|
148
149
|
imageRequestPricing(): undefined;
|
|
150
|
+
imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): {
|
|
151
|
+
width: number;
|
|
152
|
+
height: number;
|
|
153
|
+
maxBytes: number;
|
|
154
|
+
};
|
|
149
155
|
/**
|
|
150
156
|
* The hardcoded directory, narrowed to what the user enabled it to serve.
|
|
151
157
|
*
|