dsh-connect-trae 1.2.0 → 1.4.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 +20 -0
- package/README.en.md +1 -0
- package/README.md +1 -0
- package/lib/client.js +1 -5
- package/lib/index.d.ts +10 -1
- package/lib/index.js +24 -8
- package/package.json +24 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.0 (2026-09-10)
|
|
4
|
+
|
|
5
|
+
### Changes
|
|
6
|
+
|
|
7
|
+
- 对齐 DSH 内核 `0.1.2-rc.1` → `0.1.5-rc.2`(桌面 `dsh-plugin-desktop` 2.0.9 所捆绑通道;`0.1.5-rc.1` 为 npm `latest`,`rc.2` 在 `next`):
|
|
8
|
+
- `ResolvedPiAiProviderProfile` 在 0.1.5 新增**必填**字段 `modelErrors`:`PiAiAdapter` 现在按模型查此表,命中即以 `INVALID_CONFIG` 拒绝请求;`piProvider` 同时由必填改为可选。本插件是手工构造 profile(不走内核目录解析,故该表不会被子系统填充),补 `modelErrors: new Map()` 表达「所服务的模型全部可用」这一事实。不补则本插件在 0.1.5 宿主上**无法通过类型检查**(`TS2741`)。
|
|
9
|
+
- devDependencies 升级至 `@deepseek-ai/dsh-*@0.1.5-rc.2`,`@earendil-works/pi-ai` 由 `0.84.2` 升至 `^0.85.1`:`dsh-llm-pi-ai@0.1.5-rc.2` 要求 `pi-ai@^0.85.1`,版本不一致会在 `node_modules` 里留下两份互不兼容的 `pi-ai`,导致 `Provider<Api>` 结构不匹配的编译错误。
|
|
10
|
+
- `peerDependencies` 的 `@deepseek-ai/dsh-*` 由 `>=0.1.2-0` 抬到 `>=0.1.5-0`(`modelErrors` 为编译期硬依赖,0.1.2 宿主无法满足),`@earendil-works/pi-ai` 抬到 `>=0.85.1`。仍按范围声明、不锁死补丁版本,与内核 `next` 通道继续前进保持一致。
|
|
11
|
+
- 经核实本次不受文档列出的其余破坏项影响:未使用 `dsh-session` / `dsh-session-persistence` / `dsh-persona` / `dsh-system-prompt` / `dsh-message-feedback` / `dsh-subagent`;未读取 `DSH_SESSION_JSONL`、未调用已移除的 `locate()` / `readRaw()`;`AttachmentStore` 仅作类型引用,`IconChevronDownOutline14` 与客户端 `dsh.client.inject` 六个包在 0.1.5 均仍存在。会话格式 v3 与 persona 段改名对本插件不适用。
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- 修复内置回退模型表被实时线路映射过滤、导致真实安装上模型几乎全部消失的问题:`FALLBACK_TRAE_MODELS` 是本插件自带的静态兜底表,其中每个 id 都**从未**由 Trae Remote 目录公布,因此永远不会出现在 `callableKeys` 里。此前 `configuredModels` / `derive` 把这张表也交给 `dropDeadModels` 过滤,只要实时目录只返回一部分模型(账号权限、版本或网络给出的子集),过滤就会把「这次没被提到的」回退模型一并删掉——本机实测在无凭据环境下只剩 `glm-5.2` / `kimi-k2.6` 两个模型可用。现在回退表不再参与线路过滤,并以 `wireResolved` 标志取代「`callableKeys` 非空」作为「线路目录已解析」的判据,避免空目录被误读为「没有模型可用」。新增回归测试覆盖该路径;该缺陷在本仓库 1.3.0 上本来就会失败(与内核升级无关),修复后 `pnpm run test` 首次达到 157/157 全绿(此前 154/156)。
|
|
16
|
+
|
|
17
|
+
## 1.3.0 (2026-09-08)
|
|
18
|
+
|
|
19
|
+
### Changes
|
|
20
|
+
|
|
21
|
+
- 模型名称内嵌积分倍率,与 Trae 自身模型菜单的显示格式一致(如 `GLM-5.2 · x0.79`):DSH 模型选择器中由本插件注册的模型名在 Trae 公布 `consumption_rate` 时带上 `· x倍率` 后缀,倍率随目录刷新更新,未公布倍率的模型保持原名;模型 id 与内部目录仍用原始名称(不影响 wire 解析与已保存的选择)。插件设置卡片模型行的倍率同步改为 `· x0.79` 内联显示;`lastCatalog` 设置模式新增 `creditMultiplier` 字段声明,保证倍率跨重启持久化。
|
|
22
|
+
|
|
3
23
|
## 1.2.0 (2026-09-04)
|
|
4
24
|
|
|
5
25
|
### Changes
|
package/README.en.md
CHANGED
|
@@ -28,6 +28,7 @@ A [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness) bund
|
|
|
28
28
|
## Features
|
|
29
29
|
|
|
30
30
|
- **Trae model provider** — registers locally signed-in Trae models as the `trae` provider (e.g. `DeepSeek-V4-Flash`, `DeepSeek-V4-Pro`).
|
|
31
|
+
- **Multiplier in the model name** — model names show the credit multiplier in Trae's own menu format (e.g. `GLM-5.2 · x0.79`), updated with each directory refresh.
|
|
31
32
|
- **DSH local tool loop** — gets pending structured `tool_calls` from Trae `llm_utils_chat`, lets DSH execute its own local tools, then returns tool results to the model.
|
|
32
33
|
- **Trae CN account switching** — detects local Trae CN and TRAE SOLO CN sign-ins, refreshes the token list, and lets users select an account without storing tokens in DSH settings.
|
|
33
34
|
- **Read-only credits and model management** — shows Work credits separately from the general credits usable by DSH, and manages which Trae models are enabled. Read-only queries do not consume credits.
|
package/README.md
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
## 功能特性
|
|
29
29
|
|
|
30
30
|
- **Trae 模型接入** —— 把本机登录的 Trae 模型注册为 DSH 的 `trae` provider,模型选择器出现 `DeepSeek-V4-Flash`、`DeepSeek-V4-Pro` 等。
|
|
31
|
+
- **倍率内嵌模型名** —— 模型名称按 Trae 自身菜单的格式显示积分倍率(如 `GLM-5.2 · x0.79`),倍率随目录刷新更新。
|
|
31
32
|
- **DSH 本地工具循环** —— 通过 Trae `llm_utils_chat` 获取待执行的结构化 `tool_calls`,交由 DSH 自带的本地工具执行,再将工具结果回传模型。
|
|
32
33
|
- **中国区多账号切换** —— 自动发现 Trae CN 与 TRAE SOLO CN 本地登录账号,支持重新读取 Token 列表并选择账号;Token 不写入 DSH 设置。
|
|
33
34
|
- **只读积分与模型管理** —— 插件设置面板可分别查看 Work 积分与 DSH 可使用的通用积分,并刷新/启用 Trae 模型;只读查询不消耗积分。
|
package/lib/client.js
CHANGED
|
@@ -532,11 +532,7 @@ window.__ModuleLoader__.load({
|
|
|
532
532
|
className: "dsm-trae-model-name",
|
|
533
533
|
children: [model.name, model.creditMultiplier === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
534
534
|
className: "dsm-trae-model-name-rate",
|
|
535
|
-
children: [
|
|
536
|
-
"(",
|
|
537
|
-
model.creditMultiplier.toFixed(2),
|
|
538
|
-
"x)"
|
|
539
|
-
]
|
|
535
|
+
children: ["· x", model.creditMultiplier.toFixed(2)]
|
|
540
536
|
})]
|
|
541
537
|
})
|
|
542
538
|
})]
|
package/lib/index.d.ts
CHANGED
|
@@ -58,6 +58,15 @@ interface TraeModelInfo {
|
|
|
58
58
|
declare const FALLBACK_TRAE_MODELS: readonly TraeModelInfo[];
|
|
59
59
|
/** Exact DSH modalities for one catalog entry; absent metadata is text-only. */
|
|
60
60
|
declare function traeInputModalities(model: Pick<TraeModelInfo, 'input'>): TraeInputModality[];
|
|
61
|
+
/**
|
|
62
|
+
* Compose the DSH-facing model name: Trae's own model picker renders each
|
|
63
|
+
* entry as `Name · x<rate>`, so the credit multiplier is shown inside the
|
|
64
|
+
* name. `TraeModelInfo.name` keeps the pure Trae display name — every join
|
|
65
|
+
* (wire resolution, callable-key filtering) must keep matching the
|
|
66
|
+
* undecorated name; only the model rows handed to DSH (adapter catalog and
|
|
67
|
+
* model discovery) use this decorated name.
|
|
68
|
+
*/
|
|
69
|
+
declare function traeModelDisplayName(model: Pick<TraeModelInfo, 'name' | 'creditMultiplier'>): string;
|
|
61
70
|
/** Apply the user's explicit image opt-ins; upstream and saved row hints are ignored. */
|
|
62
71
|
declare function applyImageSelection(models: readonly TraeModelInfo[], selected: ReadonlySet<string>): TraeModelInfo[];
|
|
63
72
|
/** One row from `get_detail_param`: the authoritative llm_utils_chat wire id + display name. */
|
|
@@ -1048,4 +1057,4 @@ interface Config {
|
|
|
1048
1057
|
declare const Config: z<Config>;
|
|
1049
1058
|
declare function apply(ctx: Context, config: Config): void;
|
|
1050
1059
|
//#endregion
|
|
1051
|
-
export { Config, FALLBACK_TRAE_MODELS, type RawChatDelta, type RawChatMessage, type RawChatTool, SseDecoder, type SseEvent, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROVIDER, TRAE_RAW_CHAT_V1_PATH, TRAE_RAW_CHAT_V2_PATH, TRAE_REASONING_EFFORTS, TRAE_SETTINGS_NS, TRAE_SOLO_CHAT_PATH, TRAE_SOLO_FUNCTION, TRAE_SOLO_MODELS_PATH, TRAE_SOLO_REMOTE_BASE, TRAE_STREAM_IDLE_TIMEOUT_MS, TRAE_USAGE_PATH, TRAE_VERSION_CODE_FALLBACK, type TraeActivityRule, type TraeCachedModelConfig, TraeCatalog, type TraeChatResult, type TraeCheckinStatus, type TraeContextBudget, type TraeCredential, TraeCredentialStore, TraeDelegatingUpstreamClient, type TraeDiscoveredModel, type TraeDiscoveredReasoning, type TraeEdition, TraeFallbackUpstreamClient, type TraeFallbackUpstreamOptions, type TraeFusionRawChatEnvelope, TraeGatedUpstreamClient, type TraeGatedUpstreamOptions, type TraeIdentity, type TraeInputModality, type TraeModelDetailRequest, type TraeModelInfo, type TraeObservedModelConfig, TraeRawCapabilityController, type TraeRawCapabilityControllerOptions, type TraeRawCapabilitySnapshot, TraeRawCapabilityState, type TraeRawChatBehaviorConfig, type TraeRawChatCapability, type TraeRawChatClientOptions, type TraeRawChatConfig, type TraeRawChatFailureReason, type TraeRawChatRuntimeConfig, TraeRawChatUpstreamClient, type TraeRawDiagnostic, type TraeRawDiagnosticState, type TraeRawGateway, type TraeRawGatewayOptions, type TraeRawResolverResult, type TraeReasoningCapability, type TraeReasoningEffort, type TraeShim, TraeSoloBridge, type TraeSoloClientOptions, TraeSoloRemoteCatalogClient, type TraeSoloRemoteCatalogOptions, TraeSoloUpstreamClient, type TraeStorageCandidate, type TraeStreamEvent, type TraeUpstreamClient, TraeUsageClient, type TraeUsageOptions, type TraeUsagePack, type TraeUsageRouteOptions, type TraeUsageSnapshot, type TraeUsageSummary, type TraeUsageView, type TraeWebActivity, type TraeWebCheckin, type TraeWebCredits, type TraeWebUsage, type TraeWireModel, UnconfiguredTraeUpstreamClient, apply, applyContextBudgets, applyImageSelection, applyReasoningEffort, bridgeTraeSoloStream, buildTraeAgentTaskBody, buildTraeCnHeaders, buildTraeFusionRawChatEnvelope, buildTraeModelDetailRequest, buildTraeRawChatDraft, buildTraeRawChatRuntimeConfig, classifyTraeRawChatFailure, createTraeAdapter, createTraeRawGateway, createTraeShim, decodeRawChatChunk, decodeTraeEvent, decryptTraeStorageValue, deriveCatalog, discoveredCatalog, hashTraeRawChatArg, identityHeaders, inject, mergeTraeModelSources, name, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, pickTraeStorageIdentity, prepareSoloBody, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeIdentity, refreshTraeCredential, registerTraeUsageRoute, resolveTraeRawRuntime, sanitizeCatalog, traeEndpoint, traeInputModalities, traeOwnAuthPath, traeRawChatExtraInfo, traeStorageCandidates, traeWebUsage };
|
|
1060
|
+
export { Config, FALLBACK_TRAE_MODELS, type RawChatDelta, type RawChatMessage, type RawChatTool, SseDecoder, type SseEvent, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROVIDER, TRAE_RAW_CHAT_V1_PATH, TRAE_RAW_CHAT_V2_PATH, TRAE_REASONING_EFFORTS, TRAE_SETTINGS_NS, TRAE_SOLO_CHAT_PATH, TRAE_SOLO_FUNCTION, TRAE_SOLO_MODELS_PATH, TRAE_SOLO_REMOTE_BASE, TRAE_STREAM_IDLE_TIMEOUT_MS, TRAE_USAGE_PATH, TRAE_VERSION_CODE_FALLBACK, type TraeActivityRule, type TraeCachedModelConfig, TraeCatalog, type TraeChatResult, type TraeCheckinStatus, type TraeContextBudget, type TraeCredential, TraeCredentialStore, TraeDelegatingUpstreamClient, type TraeDiscoveredModel, type TraeDiscoveredReasoning, type TraeEdition, TraeFallbackUpstreamClient, type TraeFallbackUpstreamOptions, type TraeFusionRawChatEnvelope, TraeGatedUpstreamClient, type TraeGatedUpstreamOptions, type TraeIdentity, type TraeInputModality, type TraeModelDetailRequest, type TraeModelInfo, type TraeObservedModelConfig, TraeRawCapabilityController, type TraeRawCapabilityControllerOptions, type TraeRawCapabilitySnapshot, TraeRawCapabilityState, type TraeRawChatBehaviorConfig, type TraeRawChatCapability, type TraeRawChatClientOptions, type TraeRawChatConfig, type TraeRawChatFailureReason, type TraeRawChatRuntimeConfig, TraeRawChatUpstreamClient, type TraeRawDiagnostic, type TraeRawDiagnosticState, type TraeRawGateway, type TraeRawGatewayOptions, type TraeRawResolverResult, type TraeReasoningCapability, type TraeReasoningEffort, type TraeShim, TraeSoloBridge, type TraeSoloClientOptions, TraeSoloRemoteCatalogClient, type TraeSoloRemoteCatalogOptions, TraeSoloUpstreamClient, type TraeStorageCandidate, type TraeStreamEvent, type TraeUpstreamClient, TraeUsageClient, type TraeUsageOptions, type TraeUsagePack, type TraeUsageRouteOptions, type TraeUsageSnapshot, type TraeUsageSummary, type TraeUsageView, type TraeWebActivity, type TraeWebCheckin, type TraeWebCredits, type TraeWebUsage, type TraeWireModel, UnconfiguredTraeUpstreamClient, apply, applyContextBudgets, applyImageSelection, applyReasoningEffort, bridgeTraeSoloStream, buildTraeAgentTaskBody, buildTraeCnHeaders, buildTraeFusionRawChatEnvelope, buildTraeModelDetailRequest, buildTraeRawChatDraft, buildTraeRawChatRuntimeConfig, classifyTraeRawChatFailure, createTraeAdapter, createTraeRawGateway, createTraeShim, decodeRawChatChunk, decodeTraeEvent, decryptTraeStorageValue, deriveCatalog, discoveredCatalog, hashTraeRawChatArg, identityHeaders, inject, mergeTraeModelSources, name, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, pickTraeStorageIdentity, prepareSoloBody, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeIdentity, refreshTraeCredential, registerTraeUsageRoute, resolveTraeRawRuntime, sanitizeCatalog, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStorageCandidates, traeWebUsage };
|
package/lib/index.js
CHANGED
|
@@ -42,6 +42,17 @@ const FALLBACK_TRAE_MODELS = [
|
|
|
42
42
|
function traeInputModalities(model) {
|
|
43
43
|
return [...model.input ?? ["text"]];
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Compose the DSH-facing model name: Trae's own model picker renders each
|
|
47
|
+
* entry as `Name · x<rate>`, so the credit multiplier is shown inside the
|
|
48
|
+
* name. `TraeModelInfo.name` keeps the pure Trae display name — every join
|
|
49
|
+
* (wire resolution, callable-key filtering) must keep matching the
|
|
50
|
+
* undecorated name; only the model rows handed to DSH (adapter catalog and
|
|
51
|
+
* model discovery) use this decorated name.
|
|
52
|
+
*/
|
|
53
|
+
function traeModelDisplayName(model) {
|
|
54
|
+
return model.creditMultiplier === void 0 ? model.name : `${model.name} · x${model.creditMultiplier.toFixed(2)}`;
|
|
55
|
+
}
|
|
45
56
|
/** Apply the user's explicit image opt-ins; upstream and saved row hints are ignored. */
|
|
46
57
|
function applyImageSelection(models, selected) {
|
|
47
58
|
return models.map((model) => ({
|
|
@@ -198,7 +209,7 @@ const REQUEST_IMAGE_BUDGETS = {
|
|
|
198
209
|
function toPiModel(info, baseUrl) {
|
|
199
210
|
return {
|
|
200
211
|
id: info.id,
|
|
201
|
-
name: info
|
|
212
|
+
name: traeModelDisplayName(info),
|
|
202
213
|
api: "openai-completions",
|
|
203
214
|
provider: TRAE_PROVIDER,
|
|
204
215
|
baseUrl,
|
|
@@ -251,6 +262,7 @@ function createTraeAdapter(options) {
|
|
|
251
262
|
streamIdleTimeoutMs: TRAE_STREAM_IDLE_TIMEOUT_MS,
|
|
252
263
|
retryPolicy: resolveRetryPolicy(void 0, "dsh-connect-trae retryPolicy"),
|
|
253
264
|
configuredMaxTokens: /* @__PURE__ */ new Map(),
|
|
265
|
+
modelErrors: /* @__PURE__ */ new Map(),
|
|
254
266
|
...REQUEST_IMAGE_BUDGETS,
|
|
255
267
|
piProvider: provider
|
|
256
268
|
};
|
|
@@ -2748,7 +2760,8 @@ const modelConfig = z.object({
|
|
|
2748
2760
|
name: z.string().required(),
|
|
2749
2761
|
contextWindow: z.number().step(1).min(1),
|
|
2750
2762
|
maxTokens: z.number().step(1).min(1),
|
|
2751
|
-
input: z.array(z.union(["text", "image"]))
|
|
2763
|
+
input: z.array(z.union(["text", "image"])),
|
|
2764
|
+
creditMultiplier: z.number()
|
|
2752
2765
|
});
|
|
2753
2766
|
const Config = z.object({
|
|
2754
2767
|
authFile: z.string().description("Optional Trae storage.json path override"),
|
|
@@ -2771,17 +2784,19 @@ function apply(ctx, config) {
|
|
|
2771
2784
|
const enabledSet = (value) => new Set(value.enabledModelIds ?? []);
|
|
2772
2785
|
const imageSet = (value) => new Set(value.imageModelIds ?? []);
|
|
2773
2786
|
const callableKeys = /* @__PURE__ */ new Set();
|
|
2787
|
+
let wireResolved = false;
|
|
2774
2788
|
const dropDeadModels = (rows) => {
|
|
2775
|
-
if (
|
|
2789
|
+
if (!wireResolved) return rows;
|
|
2776
2790
|
return rows.filter((model) => callableKeys.has(model.id.trim().toLowerCase()) || callableKeys.has(model.name.trim().toLowerCase()));
|
|
2777
2791
|
};
|
|
2792
|
+
const fallbackModels = (value) => applyImageSelection(FALLBACK_TRAE_MODELS, imageSet(value));
|
|
2778
2793
|
const derive = (value, raw) => {
|
|
2779
2794
|
const selectedImages = imageSet(value);
|
|
2780
2795
|
const derived = deriveCatalog(applyImageSelection(sanitizeCatalog(dropDeadModels(raw)), selectedImages), enabledSet(value), value.contextBudgets ?? {});
|
|
2781
|
-
return derived.length > 0 ? derived :
|
|
2796
|
+
return derived.length > 0 ? derived : fallbackModels(value);
|
|
2782
2797
|
};
|
|
2783
|
-
const configuredModels = (value) => value.lastCatalog?.length ? derive(value, value.lastCatalog) : value.models?.length ? derive(value, value.models) :
|
|
2784
|
-
const displayModels = (value) => value.lastCatalog?.length ? dropDeadModels(sanitizeCatalog(value.lastCatalog)) : value.models?.length ? dropDeadModels(sanitizeCatalog(value.models)) :
|
|
2798
|
+
const configuredModels = (value) => value.lastCatalog?.length ? derive(value, value.lastCatalog) : value.models?.length ? derive(value, value.models) : fallbackModels(value);
|
|
2799
|
+
const displayModels = (value) => value.lastCatalog?.length ? dropDeadModels(sanitizeCatalog(value.lastCatalog)) : value.models?.length ? dropDeadModels(sanitizeCatalog(value.models)) : FALLBACK_TRAE_MODELS;
|
|
2785
2800
|
const store = new TraeCredentialStore({
|
|
2786
2801
|
...config.authFile === void 0 ? {} : { storagePath: config.authFile },
|
|
2787
2802
|
edition: config.edition ?? "auto",
|
|
@@ -2857,6 +2872,7 @@ function apply(ctx, config) {
|
|
|
2857
2872
|
callableKeys.add(model.id.trim().toLowerCase());
|
|
2858
2873
|
callableKeys.add(model.name.trim().toLowerCase());
|
|
2859
2874
|
}
|
|
2875
|
+
wireResolved = merged.length > 0;
|
|
2860
2876
|
wireById.clear();
|
|
2861
2877
|
wireByName.clear();
|
|
2862
2878
|
for (const model of merged) if (model.wireConfigName !== void 0) {
|
|
@@ -2921,7 +2937,7 @@ function apply(ctx, config) {
|
|
|
2921
2937
|
const cancellation = signal ?? request.signal;
|
|
2922
2938
|
return applyImageSelection(await discoverModels(cancellation), imageSet(current())).map((model) => ({
|
|
2923
2939
|
id: model.id,
|
|
2924
|
-
name: model
|
|
2940
|
+
name: traeModelDisplayName(model),
|
|
2925
2941
|
...model.contextWindow === void 0 ? {} : { contextWindow: model.contextWindow },
|
|
2926
2942
|
...model.maxTokens === void 0 ? {} : { maxTokens: model.maxTokens },
|
|
2927
2943
|
inputModalities: traeInputModalities(model)
|
|
@@ -2954,4 +2970,4 @@ function apply(ctx, config) {
|
|
|
2954
2970
|
});
|
|
2955
2971
|
}
|
|
2956
2972
|
//#endregion
|
|
2957
|
-
export { Config, FALLBACK_TRAE_MODELS, SseDecoder, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROVIDER, TRAE_RAW_CHAT_V1_PATH, TRAE_RAW_CHAT_V2_PATH, TRAE_REASONING_EFFORTS, TRAE_SETTINGS_NS, TRAE_SOLO_CHAT_PATH, TRAE_SOLO_FUNCTION, TRAE_SOLO_MODELS_PATH, TRAE_SOLO_REMOTE_BASE, TRAE_STREAM_IDLE_TIMEOUT_MS, TRAE_USAGE_PATH, TRAE_VERSION_CODE_FALLBACK, TraeCatalog, TraeCredentialStore, TraeDelegatingUpstreamClient, TraeFallbackUpstreamClient, TraeGatedUpstreamClient, TraeRawCapabilityController, TraeRawCapabilityState, TraeRawChatUpstreamClient, TraeSoloBridge, TraeSoloRemoteCatalogClient, TraeSoloUpstreamClient, TraeUsageClient, UnconfiguredTraeUpstreamClient, apply, applyContextBudgets, applyImageSelection, applyReasoningEffort, bridgeTraeSoloStream, buildTraeAgentTaskBody, buildTraeCnHeaders, buildTraeFusionRawChatEnvelope, buildTraeModelDetailRequest, buildTraeRawChatDraft, buildTraeRawChatRuntimeConfig, classifyTraeRawChatFailure, createTraeAdapter, createTraeRawGateway, createTraeShim, decodeRawChatChunk, decodeTraeEvent, decryptTraeStorageValue, deriveCatalog, discoveredCatalog, hashTraeRawChatArg, identityHeaders, inject, mergeTraeModelSources, name, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, pickTraeStorageIdentity, prepareSoloBody, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeIdentity, refreshTraeCredential, registerTraeUsageRoute, resolveTraeRawRuntime, sanitizeCatalog, traeEndpoint, traeInputModalities, traeOwnAuthPath, traeRawChatExtraInfo, traeStorageCandidates, traeWebUsage };
|
|
2973
|
+
export { Config, FALLBACK_TRAE_MODELS, SseDecoder, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROVIDER, TRAE_RAW_CHAT_V1_PATH, TRAE_RAW_CHAT_V2_PATH, TRAE_REASONING_EFFORTS, TRAE_SETTINGS_NS, TRAE_SOLO_CHAT_PATH, TRAE_SOLO_FUNCTION, TRAE_SOLO_MODELS_PATH, TRAE_SOLO_REMOTE_BASE, TRAE_STREAM_IDLE_TIMEOUT_MS, TRAE_USAGE_PATH, TRAE_VERSION_CODE_FALLBACK, TraeCatalog, TraeCredentialStore, TraeDelegatingUpstreamClient, TraeFallbackUpstreamClient, TraeGatedUpstreamClient, TraeRawCapabilityController, TraeRawCapabilityState, TraeRawChatUpstreamClient, TraeSoloBridge, TraeSoloRemoteCatalogClient, TraeSoloUpstreamClient, TraeUsageClient, UnconfiguredTraeUpstreamClient, apply, applyContextBudgets, applyImageSelection, applyReasoningEffort, bridgeTraeSoloStream, buildTraeAgentTaskBody, buildTraeCnHeaders, buildTraeFusionRawChatEnvelope, buildTraeModelDetailRequest, buildTraeRawChatDraft, buildTraeRawChatRuntimeConfig, classifyTraeRawChatFailure, createTraeAdapter, createTraeRawGateway, createTraeShim, decodeRawChatChunk, decodeTraeEvent, decryptTraeStorageValue, deriveCatalog, discoveredCatalog, hashTraeRawChatArg, identityHeaders, inject, mergeTraeModelSources, name, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, pickTraeStorageIdentity, prepareSoloBody, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeIdentity, refreshTraeCredential, registerTraeUsageRoute, resolveTraeRawRuntime, sanitizeCatalog, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStorageCandidates, traeWebUsage };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-connect-trae",
|
|
3
3
|
"displayName": "DSH Connect Trae",
|
|
4
4
|
"description": "Connect locally signed-in Trae models to DeepSeek Harness, plus a read-only usage/credits summary.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.4.0",
|
|
6
6
|
"author": "dingminhua",
|
|
7
7
|
"copyright": "Copyright (c) 2026 LaoDing",
|
|
8
8
|
"license": "MIT",
|
|
@@ -73,35 +73,35 @@
|
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@deepseek-ai/cordis": "^4.0.1-rc.1",
|
|
76
|
-
"@deepseek-ai/dsh-atomic-write": ">=0.1.
|
|
77
|
-
"@deepseek-ai/dsh-attachment": ">=0.1.
|
|
78
|
-
"@deepseek-ai/dsh-home-paths": ">=0.1.
|
|
79
|
-
"@deepseek-ai/dsh-host-webserver": ">=0.1.
|
|
80
|
-
"@deepseek-ai/dsh-llm": ">=0.1.
|
|
81
|
-
"@deepseek-ai/dsh-llm-pi-ai": ">=0.1.
|
|
82
|
-
"@deepseek-ai/dsh-settings": ">=0.1.
|
|
83
|
-
"@deepseek-ai/dsh-client-ui-primitives": ">=0.1.
|
|
76
|
+
"@deepseek-ai/dsh-atomic-write": ">=0.1.5-0 <0.2.0-0",
|
|
77
|
+
"@deepseek-ai/dsh-attachment": ">=0.1.5-0 <0.2.0-0",
|
|
78
|
+
"@deepseek-ai/dsh-home-paths": ">=0.1.5-0 <0.2.0-0",
|
|
79
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.1.5-0 <0.2.0-0",
|
|
80
|
+
"@deepseek-ai/dsh-llm": ">=0.1.5-0 <0.2.0-0",
|
|
81
|
+
"@deepseek-ai/dsh-llm-pi-ai": ">=0.1.5-0 <0.2.0-0",
|
|
82
|
+
"@deepseek-ai/dsh-settings": ">=0.1.5-0 <0.2.0-0",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.1.5-0 <0.2.0-0",
|
|
84
84
|
"@deepseek-ai/schemastery": "^3.18.1-rc.1",
|
|
85
|
-
"@earendil-works/pi-ai": ">=0.
|
|
85
|
+
"@earendil-works/pi-ai": ">=0.85.1",
|
|
86
86
|
"react": "^18.2.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
90
|
-
"@deepseek-ai/dsh-atomic-write": "
|
|
91
|
-
"@deepseek-ai/dsh-attachment": "
|
|
92
|
-
"@deepseek-ai/dsh-client-locale": "0.1.
|
|
93
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.1.
|
|
94
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.
|
|
95
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.
|
|
96
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.1.
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.
|
|
98
|
-
"@deepseek-ai/dsh-home-paths": "
|
|
99
|
-
"@deepseek-ai/dsh-host-webserver": "0.1.
|
|
100
|
-
"@deepseek-ai/dsh-llm": "
|
|
101
|
-
"@deepseek-ai/dsh-llm-pi-ai": "
|
|
102
|
-
"@deepseek-ai/dsh-settings": "
|
|
90
|
+
"@deepseek-ai/dsh-atomic-write": "0.1.5-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-attachment": "0.1.5-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-client-locale": "0.1.5-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.5-rc.2",
|
|
94
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.5-rc.2",
|
|
95
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.5-rc.2",
|
|
96
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.5-rc.2",
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.5-rc.2",
|
|
98
|
+
"@deepseek-ai/dsh-home-paths": "0.1.5-rc.2",
|
|
99
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.5-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-llm": "0.1.5-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-llm-pi-ai": "0.1.5-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-settings": "0.1.5-rc.2",
|
|
103
103
|
"@deepseek-ai/schemastery": "3.18.2",
|
|
104
|
-
"@earendil-works/pi-ai": "0.
|
|
104
|
+
"@earendil-works/pi-ai": "^0.85.1",
|
|
105
105
|
"@types/node": "^22.20.0",
|
|
106
106
|
"@types/react": "~18.3.31",
|
|
107
107
|
"react": "^18.3.1",
|