dsh-connect-trae 2.0.0 → 2.0.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 +11 -0
- package/lib/index.d.ts +32 -1
- package/lib/index.js +93 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.1 (2026-09-15)
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- **修复纯 CLI 环境(WSL2 等)下「账号已识别但模型目录拉不出来、聊天也全部失败」**(issue #5 后续反馈)——1.4.2 让凭据层认得了 `traecli` 的裸 JWT,但**身份层只认桌面版 `storage.json`**:只装 CLI 的机器上没有任何桌面安装,`x-machine-id` / `x-device-id` 的来源解析直接抛「Trae storage was not found」,而目录查询与聊天请求的构造都需要它,于是模型目录永远停在兜底列表、选中模型也无法对话。现在身份解析在「桌面安装全部不存在」时降级到 **CLI 家目录自身的持久化标识**:
|
|
8
|
+
- `~/.trae-cn/argv.json` 的 `crash-reporter-id`(CLI 首次运行时写入的稳定 UUID)作为设备 ID;
|
|
9
|
+
- `~/.trae-cn/builtin/ide_version.json` 的 `version` 作为 `x-app-version`;
|
|
10
|
+
- 由设备 ID + 主机名 + 用户名做 SHA-256 得到 64 字符 `x-machine-id`(与官方客户端形态一致)。
|
|
11
|
+
全部取自 CLI 自己写下的稳定值,**不是每次请求随机生成**(延续本项目既有红线);有桌面安装时仍优先使用桌面 `machineid` / `telemetry.machineId`。文件存在但内容损坏时依旧暴露真实解析错误,不被降级掩盖。
|
|
12
|
+
- 修复 CI 在 ubuntu-latest 上的测试失败:`auth.spec.ts` 的 edition 收窄用例断言了候选数量为 1,而 Linux 会对每个 edition 并列探测多个目录拼写(`trae-solo` / `TRAE SOLO`),候选数为 2 —— 该多候选是 1.4.2 为 Linux 特意加的设计。测试改为断言收窄语义本身(候选数 > 0 且全部属于该 edition 的桌面安装),并已对 darwin / linux / win32 三平台逐一验证。
|
|
13
|
+
|
|
3
14
|
## 2.0.0 (2026-09-15)
|
|
4
15
|
|
|
5
16
|
### Breaking Changes
|
package/lib/index.d.ts
CHANGED
|
@@ -477,6 +477,37 @@ declare function readTraeIdentity(candidate: TraeStorageCandidate, options?: Tra
|
|
|
477
477
|
* a candidate that exists but fails to parse still surfaces its own error.
|
|
478
478
|
*/
|
|
479
479
|
declare function pickTraeStorageIdentity(candidates: readonly TraeStorageCandidate[], options?: TraeIdentityReadOptions): Promise<TraeIdentity>;
|
|
480
|
+
/**
|
|
481
|
+
* Deterministic identity for a machine that only has the Trae CLI (`traecli`).
|
|
482
|
+
*
|
|
483
|
+
* A CLI-only machine has no desktop `storage.json`, so the desktop identity
|
|
484
|
+
* reader has nothing to read — yet the request headers still need stable
|
|
485
|
+
* machine/device ids. Everything here comes from identifiers the CLI itself
|
|
486
|
+
* persists (never a per-request random value):
|
|
487
|
+
*
|
|
488
|
+
* - `argv.json`'s `crash-reporter-id` — a stable per-install UUID the CLI
|
|
489
|
+
* writes on first run; used directly as the device id.
|
|
490
|
+
* - `builtin/ide_version.json`'s `version` — the CLI build, sent as
|
|
491
|
+
* `x-app-version` (the desktop reader gets this from `product.json`).
|
|
492
|
+
* - a SHA-256 over the device id, host name and user name for `machineId`,
|
|
493
|
+
* matching the 64-char hex shape the official clients send.
|
|
494
|
+
*
|
|
495
|
+
* When `crash-reporter-id` is absent the device id falls back to the same
|
|
496
|
+
* hash (still deterministic). A machine with no CLI home at all keeps failing
|
|
497
|
+
* loudly — a fabricated identity is worse than a visible "not signed in".
|
|
498
|
+
*/
|
|
499
|
+
declare function readTraeCliIdentity(edition: TraeEdition, options?: TraeIdentityReadOptions): Promise<TraeIdentity>;
|
|
500
|
+
/**
|
|
501
|
+
* Resolve the request identity for one region: the desktop storage identity
|
|
502
|
+
* when any desktop install exists, otherwise the CLI home's deterministic
|
|
503
|
+
* identity (see {@link readTraeCliIdentity}).
|
|
504
|
+
*
|
|
505
|
+
* This is the seam the WSL2 / CLI-only case needs: `traecli` writes its token
|
|
506
|
+
* to `~/.trae-cn/trae-jwt-token` and no `storage.json` exists anywhere, so
|
|
507
|
+
* desktop-only resolution used to fail every directory refresh and chat
|
|
508
|
+
* request even though the account itself was found.
|
|
509
|
+
*/
|
|
510
|
+
declare function resolveTraeIdentity(candidates: readonly TraeStorageCandidate[], edition: TraeEdition, options?: TraeIdentityReadOptions): Promise<TraeIdentity>;
|
|
480
511
|
/** Headers derived from actual persisted identity, never a new random identity per request. */
|
|
481
512
|
declare function identityHeaders(identity: TraeIdentity): Record<string, string>;
|
|
482
513
|
//#endregion
|
|
@@ -1390,4 +1421,4 @@ declare function regionStateOf(config: Config, region: TraeRegion): TraeRegionSt
|
|
|
1390
1421
|
declare const Config: z<Config>;
|
|
1391
1422
|
declare function apply(ctx: Context, config: Config): void;
|
|
1392
1423
|
//#endregion
|
|
1393
|
-
export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, REGION_GATEWAYS, type RawChatDelta, type RawChatMessage, type RawChatTool, SseDecoder, type SseEvent, TRAE_AI_PROVIDER, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROVIDER, TRAE_PROVIDERS, TRAE_PROVIDER_DISPLAY_NAMES, TRAE_RAW_CHAT_V1_PATH, TRAE_RAW_CHAT_V2_PATH, TRAE_REASONING_EFFORTS, TRAE_REGIONS, TRAE_REGION_PARAM, 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 TraeAdapter, 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 TraeRefreshDevice, type TraeRegion, type TraeRegionGateways, TraeRegionState, 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, fallbackModelsFor, hashTraeRawChatArg, identityHeaders, inject, legacyTraeOwnAuthPath, mergeTraeModelSources, name, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, pickTraeStorageIdentity, prepareSoloBody, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeIdentity, refreshTraeCredential, regionOfCredential, regionOfEdition, regionOfHost, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeRawRuntime, sanitizeCatalog, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStorageCandidates, traeWebUsage, withTraeRegion };
|
|
1424
|
+
export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, REGION_GATEWAYS, type RawChatDelta, type RawChatMessage, type RawChatTool, SseDecoder, type SseEvent, TRAE_AI_PROVIDER, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROVIDER, TRAE_PROVIDERS, TRAE_PROVIDER_DISPLAY_NAMES, TRAE_RAW_CHAT_V1_PATH, TRAE_RAW_CHAT_V2_PATH, TRAE_REASONING_EFFORTS, TRAE_REGIONS, TRAE_REGION_PARAM, 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 TraeAdapter, 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 TraeRefreshDevice, type TraeRegion, type TraeRegionGateways, TraeRegionState, 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, fallbackModelsFor, hashTraeRawChatArg, identityHeaders, inject, legacyTraeOwnAuthPath, mergeTraeModelSources, name, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, pickTraeStorageIdentity, prepareSoloBody, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeCliIdentity, readTraeIdentity, refreshTraeCredential, regionOfCredential, regionOfEdition, regionOfHost, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeIdentity, resolveTraeRawRuntime, sanitizeCatalog, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStorageCandidates, traeWebUsage, withTraeRegion };
|
package/lib/index.js
CHANGED
|
@@ -1381,6 +1381,8 @@ async function readTraeIdentity(candidate, options = {}) {
|
|
|
1381
1381
|
function isFileMissing(error) {
|
|
1382
1382
|
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
1383
1383
|
}
|
|
1384
|
+
/** Prefix of the "no candidate exists on disk" error; see {@link resolveTraeIdentity}. */
|
|
1385
|
+
const STORAGE_MISSING_PREFIX = "Trae storage was not found";
|
|
1384
1386
|
/**
|
|
1385
1387
|
* Try candidates in order and return the first that yields a valid identity;
|
|
1386
1388
|
* fail hard only when none do. Mirrors the credential store's skip-missing
|
|
@@ -1399,9 +1401,96 @@ async function pickTraeStorageIdentity(candidates, options = {}) {
|
|
|
1399
1401
|
if (!isFileMissing(error)) anyPresent = true;
|
|
1400
1402
|
}
|
|
1401
1403
|
const tried = candidates.map((item) => item.path).join(" or ");
|
|
1402
|
-
if (!anyPresent) throw new Error(
|
|
1404
|
+
if (!anyPresent) throw new Error(`${STORAGE_MISSING_PREFIX} (${tried})`);
|
|
1403
1405
|
throw lastError instanceof Error ? lastError : /* @__PURE__ */ new Error(`Trae identity could not be resolved (${tried})`);
|
|
1404
1406
|
}
|
|
1407
|
+
/** CLI dotfile home per edition; the CLI keeps its own home, not an Application Support entry. */
|
|
1408
|
+
const CLI_HOME_BY_EDITION = {
|
|
1409
|
+
cn: ".trae-cn",
|
|
1410
|
+
solo: ".trae-cn",
|
|
1411
|
+
sg: ".trae",
|
|
1412
|
+
"solo-sg": ".trae"
|
|
1413
|
+
};
|
|
1414
|
+
/**
|
|
1415
|
+
* Deterministic identity for a machine that only has the Trae CLI (`traecli`).
|
|
1416
|
+
*
|
|
1417
|
+
* A CLI-only machine has no desktop `storage.json`, so the desktop identity
|
|
1418
|
+
* reader has nothing to read — yet the request headers still need stable
|
|
1419
|
+
* machine/device ids. Everything here comes from identifiers the CLI itself
|
|
1420
|
+
* persists (never a per-request random value):
|
|
1421
|
+
*
|
|
1422
|
+
* - `argv.json`'s `crash-reporter-id` — a stable per-install UUID the CLI
|
|
1423
|
+
* writes on first run; used directly as the device id.
|
|
1424
|
+
* - `builtin/ide_version.json`'s `version` — the CLI build, sent as
|
|
1425
|
+
* `x-app-version` (the desktop reader gets this from `product.json`).
|
|
1426
|
+
* - a SHA-256 over the device id, host name and user name for `machineId`,
|
|
1427
|
+
* matching the 64-char hex shape the official clients send.
|
|
1428
|
+
*
|
|
1429
|
+
* When `crash-reporter-id` is absent the device id falls back to the same
|
|
1430
|
+
* hash (still deterministic). A machine with no CLI home at all keeps failing
|
|
1431
|
+
* loudly — a fabricated identity is worse than a visible "not signed in".
|
|
1432
|
+
*/
|
|
1433
|
+
async function readTraeCliIdentity(edition, options = {}) {
|
|
1434
|
+
const platform = options.platform ?? process.platform;
|
|
1435
|
+
const home = options.home ?? homedir();
|
|
1436
|
+
const env = options.env ?? process.env;
|
|
1437
|
+
const cliHome = join(home, CLI_HOME_BY_EDITION[edition]);
|
|
1438
|
+
const argv = await readJsonFile(join(cliHome, "argv.json"));
|
|
1439
|
+
const version = await readJsonFile(join(cliHome, "builtin", "ide_version.json"));
|
|
1440
|
+
const crashReporterId = nonEmpty(argv?.["crash-reporter-id"]);
|
|
1441
|
+
const host = nonEmpty(env["HOSTNAME"]) ?? await readHostname() ?? "unknown-host";
|
|
1442
|
+
const user = nonEmpty(env["USER"]) ?? nonEmpty(env["USERNAME"]) ?? "unknown-user";
|
|
1443
|
+
const deviceId = crashReporterId ?? createHash("sha256").update(`trae-cli\0${host}\0${user}`).digest("hex").slice(0, 32);
|
|
1444
|
+
const machineId = createHash("sha256").update(`trae-cli-machine\0${deviceId}\0${host}`).digest("hex");
|
|
1445
|
+
const appVersion = nonEmpty(version?.["version"]);
|
|
1446
|
+
const deviceCpu = cpus()[0]?.model.split(" ")[0];
|
|
1447
|
+
const osVersion = `${platform === "darwin" ? "macOS" : platform === "win32" ? "Windows" : platform} ${release()}`;
|
|
1448
|
+
return {
|
|
1449
|
+
edition,
|
|
1450
|
+
machineId,
|
|
1451
|
+
deviceId,
|
|
1452
|
+
...appVersion === void 0 ? {} : { appVersion },
|
|
1453
|
+
...deviceCpu === void 0 ? {} : { deviceCpu },
|
|
1454
|
+
osVersion,
|
|
1455
|
+
platform
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1458
|
+
/** Read and parse a JSON file, tolerating absence and malformed content. */
|
|
1459
|
+
async function readJsonFile(path) {
|
|
1460
|
+
try {
|
|
1461
|
+
const parsed = JSON.parse(await readFile(path, "utf8"));
|
|
1462
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : void 0;
|
|
1463
|
+
} catch {
|
|
1464
|
+
return;
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
/** OS host name, or undefined when unavailable. */
|
|
1468
|
+
async function readHostname() {
|
|
1469
|
+
try {
|
|
1470
|
+
const { hostname } = await import("node:os");
|
|
1471
|
+
return nonEmpty(hostname());
|
|
1472
|
+
} catch {
|
|
1473
|
+
return;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Resolve the request identity for one region: the desktop storage identity
|
|
1478
|
+
* when any desktop install exists, otherwise the CLI home's deterministic
|
|
1479
|
+
* identity (see {@link readTraeCliIdentity}).
|
|
1480
|
+
*
|
|
1481
|
+
* This is the seam the WSL2 / CLI-only case needs: `traecli` writes its token
|
|
1482
|
+
* to `~/.trae-cn/trae-jwt-token` and no `storage.json` exists anywhere, so
|
|
1483
|
+
* desktop-only resolution used to fail every directory refresh and chat
|
|
1484
|
+
* request even though the account itself was found.
|
|
1485
|
+
*/
|
|
1486
|
+
async function resolveTraeIdentity(candidates, edition, options = {}) {
|
|
1487
|
+
try {
|
|
1488
|
+
return await pickTraeStorageIdentity(candidates, options);
|
|
1489
|
+
} catch (error) {
|
|
1490
|
+
if (!(error instanceof Error) || !error.message.startsWith(STORAGE_MISSING_PREFIX)) throw error;
|
|
1491
|
+
return readTraeCliIdentity(edition, options);
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1405
1494
|
/** Headers derived from actual persisted identity, never a new random identity per request. */
|
|
1406
1495
|
function identityHeaders(identity) {
|
|
1407
1496
|
return {
|
|
@@ -3483,13 +3572,11 @@ function apply(ctx, config) {
|
|
|
3483
3572
|
preferred = (await store.current())?.edition;
|
|
3484
3573
|
} catch {}
|
|
3485
3574
|
const hint = (config.edition !== void 0 && config.edition !== "auto" ? config.edition : void 0) ?? preferred;
|
|
3486
|
-
|
|
3575
|
+
return resolveTraeIdentity(config.authFile === void 0 ? traeStorageCandidates().filter((item) => item.source === "desktop" && (hint !== void 0 ? item.edition === hint : regionOfEdition(item.edition) === region)) : [{
|
|
3487
3576
|
edition: hint ?? (region === "ai" ? "sg" : "solo"),
|
|
3488
3577
|
path: config.authFile,
|
|
3489
3578
|
source: "desktop"
|
|
3490
|
-
}];
|
|
3491
|
-
if (candidates.length === 0) throw new Error("Trae storage was not found");
|
|
3492
|
-
return pickTraeStorageIdentity(candidates);
|
|
3579
|
+
}], hint ?? (region === "ai" ? "solo-sg" : "cn"));
|
|
3493
3580
|
};
|
|
3494
3581
|
/**
|
|
3495
3582
|
* Resolution failures degrade to omitting DeviceInfo (its being required
|
|
@@ -3709,4 +3796,4 @@ function apply(ctx, config) {
|
|
|
3709
3796
|
});
|
|
3710
3797
|
}
|
|
3711
3798
|
//#endregion
|
|
3712
|
-
export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, REGION_GATEWAYS, SseDecoder, TRAE_AI_PROVIDER, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROVIDER, TRAE_PROVIDERS, TRAE_PROVIDER_DISPLAY_NAMES, TRAE_RAW_CHAT_V1_PATH, TRAE_RAW_CHAT_V2_PATH, TRAE_REASONING_EFFORTS, TRAE_REGIONS, TRAE_REGION_PARAM, 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, fallbackModelsFor, hashTraeRawChatArg, identityHeaders, inject, legacyTraeOwnAuthPath, mergeTraeModelSources, name, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, pickTraeStorageIdentity, prepareSoloBody, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeIdentity, refreshTraeCredential, regionOfCredential, regionOfEdition, regionOfHost, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeRawRuntime, sanitizeCatalog, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStorageCandidates, traeWebUsage, withTraeRegion };
|
|
3799
|
+
export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, REGION_GATEWAYS, SseDecoder, TRAE_AI_PROVIDER, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROVIDER, TRAE_PROVIDERS, TRAE_PROVIDER_DISPLAY_NAMES, TRAE_RAW_CHAT_V1_PATH, TRAE_RAW_CHAT_V2_PATH, TRAE_REASONING_EFFORTS, TRAE_REGIONS, TRAE_REGION_PARAM, 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, fallbackModelsFor, hashTraeRawChatArg, identityHeaders, inject, legacyTraeOwnAuthPath, mergeTraeModelSources, name, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, pickTraeStorageIdentity, prepareSoloBody, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeCliIdentity, readTraeIdentity, refreshTraeCredential, regionOfCredential, regionOfEdition, regionOfHost, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeIdentity, resolveTraeRawRuntime, sanitizeCatalog, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStorageCandidates, traeWebUsage, withTraeRegion };
|
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": "2.0.
|
|
5
|
+
"version": "2.0.1",
|
|
6
6
|
"author": "dingminhua",
|
|
7
7
|
"copyright": "Copyright (c) 2026 LaoDing",
|
|
8
8
|
"license": "MIT",
|