dsh-connect-trae 2.0.5 → 2.1.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/lib/index.d.ts CHANGED
@@ -1156,6 +1156,21 @@ declare class TraeDelegatingUpstreamClient implements TraeUpstreamClient {
1156
1156
  declare const TRAE_PAY_BASE = "https://api.trae.cn";
1157
1157
  interface TraeUsageOptions {
1158
1158
  credential(): Promise<TraeCredential | undefined>;
1159
+ /**
1160
+ * Device identity of the credential's own installation, sent as
1161
+ * `x-device-id` on the check-in routes.
1162
+ *
1163
+ * The claim endpoint is the one WRITE in this client, and it is guarded
1164
+ * server-side by that header: with the same Authorization but no
1165
+ * `x-device-id`, the upstream answers HTTP 200 with business code `9004`
1166
+ * ("The submitted order parameters are incorrect") and grants nothing —
1167
+ * verified 2026-09-24 against a live CN account, where adding the header
1168
+ * flipped the same request to `code: 0` and the daily reward landed. The
1169
+ * official client sends it on every check-in call
1170
+ * (`main.js`'s `fb(headers)` sets `x-device-id` from `guaranteedDeviceId`).
1171
+ * Absent, the client still reads status; only the claim refuses.
1172
+ */
1173
+ deviceId?(): Promise<string | undefined>;
1159
1174
  fetchImpl?: typeof fetch;
1160
1175
  baseUrl?: string;
1161
1176
  timeoutMs?: number;
@@ -1209,8 +1224,27 @@ interface TraeUsageSnapshot {
1209
1224
  }
1210
1225
  interface TraeCheckinStatus {
1211
1226
  checkedIn: boolean;
1227
+ /** Reward for one check-in, as reported by the upstream (`credits`). */
1212
1228
  credits: number;
1213
1229
  enabled: boolean;
1230
+ /**
1231
+ * Whether today's reward was claimed in a previous session. The upstream
1232
+ * reports `did_checked_in` separately from `checked_in`: the app uses the
1233
+ * former to keep the claim button disabled for the rest of the Beijing day
1234
+ * even when the status read happens to report `checked_in: false`.
1235
+ */
1236
+ didCheckedIn: boolean;
1237
+ /** Bonus credit granted on top of the base reward, when the upstream reports one. */
1238
+ extraCredits?: number;
1239
+ }
1240
+ /** Result of claiming today's check-in reward. */
1241
+ interface TraeCheckinClaim {
1242
+ /** Whether the upstream accepted the claim (`code === 0`). */
1243
+ claimed: boolean;
1244
+ /** Business code from the answer; `0` on success. */
1245
+ code: number;
1246
+ /** Upstream message, verbatim but truncated — never token material. */
1247
+ message: string;
1214
1248
  }
1215
1249
  interface TraeActivityRule {
1216
1250
  activityId: string;
@@ -1226,8 +1260,11 @@ interface TraeUsageView {
1226
1260
  activities: TraeActivityRule[];
1227
1261
  }
1228
1262
  /**
1229
- * A read-only client for the verified Trae usage/credits endpoints.
1230
- * All methods are safe to call from a plugin and never mutate account state.
1263
+ * A client for the verified Trae usage/credits endpoints.
1264
+ *
1265
+ * Every method is read-only except {@link TraeUsageClient.claimCheckin}, which
1266
+ * claims the daily check-in reward — the one deliberate mutation, requested by
1267
+ * the user from the card and guarded before it is sent.
1231
1268
  */
1232
1269
  declare class TraeUsageClient {
1233
1270
  private readonly options;
@@ -1243,6 +1280,13 @@ declare class TraeUsageClient {
1243
1280
  * international region its own verified pay gateway.
1244
1281
  */
1245
1282
  private payBase;
1283
+ /**
1284
+ * Device id for the check-in routes, or undefined when the machine's
1285
+ * installation identity cannot be read. Best-effort on purpose: a missing
1286
+ * identity must not break the read-only status query, which the upstream
1287
+ * answers with or without the header.
1288
+ */
1289
+ private deviceIdHeader;
1246
1290
  private authedHeaders;
1247
1291
  private post;
1248
1292
  /**
@@ -1260,8 +1304,26 @@ declare class TraeUsageClient {
1260
1304
  private requireCnRegion;
1261
1305
  /** Total entitlements / credits and per-pack breakdown. */
1262
1306
  snapshot(signal?: AbortSignal): Promise<TraeUsageSnapshot>;
1263
- /** Daily check-in status. */
1307
+ /**
1308
+ * Daily check-in status. Read-only, and answered with or without the device
1309
+ * header — the claim is what needs it.
1310
+ */
1264
1311
  checkinStatus(signal?: AbortSignal): Promise<TraeCheckinStatus>;
1312
+ /**
1313
+ * Claim today's check-in reward. The ONLY state-changing call in this client.
1314
+ *
1315
+ * The upstream is idempotent per Beijing day (verified 2026-09-24: repeating
1316
+ * the call on an already-claimed day answers `code: 0` while the entitlement
1317
+ * total stays byte-identical), so a double click cannot double-grant. The
1318
+ * card and its route still guard, because "cannot double-grant" is a property
1319
+ * of the upstream we verify rather than one we rely on.
1320
+ *
1321
+ * A business refusal arrives as HTTP 200 with a non-zero `code` — most often
1322
+ * `9004` when the request carries no `x-device-id`. That is reported as
1323
+ * `claimed: false` rather than thrown, so the caller can tell "the upstream
1324
+ * refused this" apart from "the request never arrived".
1325
+ */
1326
+ claimCheckin(signal?: AbortSignal): Promise<TraeCheckinClaim>;
1265
1327
  /** Rewards / activity rules. */
1266
1328
  activities(signal?: AbortSignal): Promise<TraeActivityRule[]>;
1267
1329
  /** Convenience: snapshot + check-in + activities in one call (best-effort, non-fatal on missing). */
@@ -1271,6 +1333,11 @@ declare class TraeUsageClient {
1271
1333
  //#region src/status-paths.d.ts
1272
1334
  /** Plugin-owned usage endpoint consumed by its browser half. */
1273
1335
  declare const TRAE_USAGE_PATH = "/plugins/dsh-connect-trae/usage";
1336
+ /**
1337
+ * Plugin-owned daily check-in claim endpoint. POST, loopback-only, and the only
1338
+ * route in this plugin that changes upstream account state.
1339
+ */
1340
+ declare const TRAE_CHECKIN_PATH = "/plugins/dsh-connect-trae/checkin";
1274
1341
  /** Query parameter naming the region a card request addresses. */
1275
1342
  declare const TRAE_REGION_PARAM = "region";
1276
1343
  /** Every region, in card tab order. */
@@ -1316,10 +1383,32 @@ interface TraeWebModel {
1316
1383
  };
1317
1384
  maxContextWindow?: number;
1318
1385
  }
1319
- /** Daily check-in status rendered by the card. */
1386
+ /**
1387
+ * Daily check-in state rendered below the credit stats.
1388
+ *
1389
+ * `didCheckedIn` is not redundant with `checkedIn`: the upstream reports them
1390
+ * separately, and the official client keeps the claim button disabled for the
1391
+ * rest of the Beijing day off `did_checked_in` even when a status read comes
1392
+ * back `checked_in: false`. The card mirrors that rule so a stale-looking
1393
+ * status cannot invite a pointless second claim.
1394
+ */
1320
1395
  interface TraeWebCheckin {
1321
1396
  checkedIn: boolean;
1397
+ didCheckedIn: boolean;
1322
1398
  credits: number;
1399
+ enabled: boolean;
1400
+ extraCredits?: number;
1401
+ }
1402
+ /** The claim route's answer, so the card can report a business refusal verbatim. */
1403
+ interface TraeWebCheckinClaim {
1404
+ /** False when the upstream answered a non-zero business code (e.g. 9004). */
1405
+ claimed: boolean;
1406
+ /** True when today was already claimed, so nothing was sent upstream. */
1407
+ alreadyCheckedIn: boolean;
1408
+ code?: number;
1409
+ message?: string;
1410
+ /** The refreshed check-in state, present whenever the claim path ran. */
1411
+ checkin?: TraeWebCheckin;
1323
1412
  }
1324
1413
  /** One reward activity rule (name + work/general credits when present). */
1325
1414
  interface TraeWebActivity {
@@ -1346,6 +1435,42 @@ interface TraeWebSearchPath {
1346
1435
  reason: 'missing' | 'unreadable' | 'invalid';
1347
1436
  message?: string;
1348
1437
  }
1438
+ /**
1439
+ * Build the next `regions` settings value for the card's save. The write
1440
+ * targets ONLY the signed-in account's region slot; every other region's slot
1441
+ * is carried over untouched, so switching accounts never clobbers the other
1442
+ * region's picks. Tolerates any stored shape (absent, non-object) by starting
1443
+ * from an empty document.
1444
+ */
1445
+ declare function nextRegionSlots<Slot extends object>(regions: unknown, region: TraeRegion, slot: Slot): Record<string, unknown>;
1446
+ /**
1447
+ * Whether one region's provider is switched on. Opt-out semantics: only an
1448
+ * explicit `false` disables it, so a config written before this switch existed
1449
+ * (and the pre-region-split flat fields, which never carry `enabled`) keep both
1450
+ * providers running exactly as before. The Host reads the same rule through
1451
+ * `regionStateOf`, so card and Host can never disagree about a region's state.
1452
+ *
1453
+ * `value` may be the whole settings section or the `regions` map (see
1454
+ * {@link regionsMapOf}).
1455
+ */
1456
+ declare function regionEnabledOf(value: unknown, region: TraeRegion): boolean;
1457
+ /**
1458
+ * Build the next `regions` settings value for a provider on/off toggle. ONLY
1459
+ * the target region's `enabled` flag changes: every other field of that slot
1460
+ * (its directory, selection, image opt-ins, context budgets) and every other
1461
+ * region's slot are carried over verbatim, so switching a provider off never
1462
+ * discards the user's model picks and switching it back on restores them.
1463
+ *
1464
+ * This is deliberately separate from {@link nextRegionSlots}: that helper
1465
+ * writes a whole slot from a signed-in tab's draft, while this one must work
1466
+ * for a region that is signed OUT — which is precisely the region a user wants
1467
+ * to switch off (no international install, no international account).
1468
+ *
1469
+ * `value` may be the whole settings section or the `regions` map; the RETURN
1470
+ * value is always the `regions` map, i.e. exactly what `settingsScope.set(
1471
+ * 'regions', ...)` needs.
1472
+ */
1473
+ declare function nextRegionEnabled(value: unknown, region: TraeRegion, enabled: boolean): Record<string, unknown>;
1349
1474
  /** Subscription status of an international (ai) account, rendered instead of the CN credit packs. */
1350
1475
  interface TraeWebPayStatus {
1351
1476
  isDollarUsageBilling: boolean;
@@ -1369,6 +1494,7 @@ type TraeWebUsage = {
1369
1494
  accounts: readonly TraeWebAccount[];
1370
1495
  message?: string;
1371
1496
  searched?: readonly TraeWebSearchPath[];
1497
+ enabled?: boolean;
1372
1498
  } | {
1373
1499
  status: 'signed-in';
1374
1500
  accountId: string;
@@ -1376,6 +1502,8 @@ type TraeWebUsage = {
1376
1502
  tokenExpiresAtMs: number;
1377
1503
  /** Which per-region model directory and selection this account owns. */
1378
1504
  region: TraeRegion;
1505
+ /** Whether this region's provider is currently offered to DSH. */
1506
+ enabled?: boolean;
1379
1507
  accounts: readonly TraeWebAccount[];
1380
1508
  models: readonly TraeWebModel[];
1381
1509
  enabledModelIds: readonly string[];
@@ -1386,6 +1514,14 @@ type TraeWebUsage = {
1386
1514
  };
1387
1515
  credits?: TraeWebCredits;
1388
1516
  creditsError?: string;
1517
+ /**
1518
+ * Daily check-in state (CN only). Absent on the international region,
1519
+ * whose check-in surface does not exist — probed 2026-09-24: the
1520
+ * `/trae/api/v2/ug/*` family answers 404 on every ai gateway, so the card
1521
+ * shows no claim button there rather than a button that cannot work.
1522
+ */
1523
+ checkin?: TraeWebCheckin;
1524
+ checkinError?: string;
1389
1525
  /** Subscription status of an international account (region ai only). */
1390
1526
  payStatus?: TraeWebPayStatus;
1391
1527
  payStatusError?: string;
@@ -1410,6 +1546,12 @@ interface TraeUsageRouteOptions {
1410
1546
  displayModels(region: TraeRegion): readonly TraeModelInfo[];
1411
1547
  /** The user's model selection in the requested region, stored as model id (= Trae name). */
1412
1548
  enabledModelIds(region: TraeRegion): readonly string[];
1549
+ /**
1550
+ * Whether the requested region's provider is currently offered to DSH. The
1551
+ * card renders this as the tab's on/off checkbox, so the switch reflects the
1552
+ * committed settings value rather than a local guess.
1553
+ */
1554
+ regionEnabled(region: TraeRegion): boolean;
1413
1555
  /** Re-read one region's live directory from the upstream. */
1414
1556
  discoverModels?(region: TraeRegion, signal?: AbortSignal): Promise<readonly TraeModelInfo[]>;
1415
1557
  /** Raw-Chat capability state of the requested region. */
@@ -1440,6 +1582,15 @@ declare const inject: string[];
1440
1582
  declare const TRAE_SETTINGS_NS = "trae";
1441
1583
  /** One region's saved model state: its own directory and the user's selection within it. */
1442
1584
  interface TraeRegionState {
1585
+ /**
1586
+ * Whether this region's provider is switched on. Opt-out: only an explicit
1587
+ * `false` disables it, so a config predating this switch keeps both providers
1588
+ * running. A disabled region is fully withdrawn from the harness — its
1589
+ * adapter route and its configurable-provider entry both hold zero routes, so
1590
+ * it disappears from DSH's model picker instead of lingering as an
1591
+ * unselectable row (see `syncRegionRegistration`).
1592
+ */
1593
+ enabled?: boolean;
1443
1594
  /** The last-refreshed raw directory for this region; what the card displays. */
1444
1595
  lastCatalog?: TraeModelInfo[];
1445
1596
  /** The user's selection in this region, as model ids (= Trae name). */
@@ -1495,7 +1646,16 @@ interface Config {
1495
1646
  * picks (the same failure workbuddy fixed with its region split).
1496
1647
  */
1497
1648
  declare function regionStateOf(config: Config, region: TraeRegion): TraeRegionState;
1649
+ /**
1650
+ * Whether one region's provider is switched on (issue #11). Opt-out semantics:
1651
+ * only an explicit `false` disables it, so every config written before this
1652
+ * switch existed — including the pre-region-split flat fields, which never
1653
+ * carry `enabled` — keeps both providers running exactly as before. The card
1654
+ * reads the same rule through `regionEnabledOf`, so the two halves can never
1655
+ * disagree about a region's state.
1656
+ */
1657
+ declare function regionEnabled(config: Config, region: TraeRegion): boolean;
1498
1658
  declare const Config: z<Config>;
1499
1659
  declare function apply(ctx: Context, config: Config): void;
1500
1660
  //#endregion
1501
- 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 };
1661
+ export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, REGION_GATEWAYS, type RawChatDelta, type RawChatMessage, type RawChatTool, SseDecoder, type SseEvent, TRAE_AI_PROVIDER, TRAE_CHECKIN_PATH, 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 TraeCheckinClaim, 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 TraeWebCheckinClaim, 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, nextRegionEnabled, nextRegionSlots, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, pickTraeStorageIdentity, prepareSoloBody, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeCliIdentity, readTraeIdentity, refreshTraeCredential, regionEnabled, regionEnabledOf, regionOfCredential, regionOfEdition, regionOfHost, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeIdentity, resolveTraeRawRuntime, sanitizeCatalog, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStorageCandidates, traeWebUsage, withTraeRegion };