dsh-connect-trae 3.4.2 → 3.5.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
@@ -2134,6 +2134,51 @@ declare function regionEnabledOf(value: unknown, region: TraeRegion): boolean;
2134
2134
  * 'regions', ...)` needs.
2135
2135
  */
2136
2136
  declare function nextRegionEnabled(value: unknown, region: TraeRegion, enabled: boolean): Record<string, unknown>;
2137
+ /**
2138
+ * The two seats this region's credit readout can occupy.
2139
+ *
2140
+ * `composer` is the composer tool row (`conversation.input.left`); `stats` is
2141
+ * the ambient dock below the composer card (`conversation.composer.dock`),
2142
+ * beside the shell's own round/step/token pills.
2143
+ *
2144
+ * WHY THE SEAT IS A CHOICE AT ALL (learned from dsh-connect-workbuddy issue
2145
+ * #62): the composer tool row is a LIST seat, so it is shared not only with the
2146
+ * shell's own controls but with any other plugin that registers there — and a
2147
+ * list seat cannot promise that every occupant is visible. The report behind
2148
+ * that issue is exactly that: with a third-party plugin installed the readout
2149
+ * stopped appearing. A fixed seat therefore lets one plugin's presence decide
2150
+ * another's, so the seat belongs to the user.
2151
+ *
2152
+ * Named as a union rather than a boolean because a third seat is plausible and
2153
+ * a `showAtTop: boolean` would have to be MIGRATED rather than extended.
2154
+ */
2155
+ type TraeCreditPosition = 'composer' | 'stats';
2156
+ /**
2157
+ * Which seat one region's readout uses, defaulting to the composer row.
2158
+ *
2159
+ * Anything other than an explicit `'stats'` reads as `'composer'`, which covers
2160
+ * the two cases that matter: a profile written BEFORE this setting existed (the
2161
+ * composer row was the only seat, so an upgrade moves nothing on screen), and a
2162
+ * hand-edited value the schema does not know. Falling back rather than
2163
+ * rendering nowhere is deliberate — an unrecognized value must not make the
2164
+ * readout disappear, which is the very defect this setting exists to fix.
2165
+ *
2166
+ * `value` may be the whole settings section or the `regions` map (see
2167
+ * {@link regionsMapOf}).
2168
+ */
2169
+ declare function regionCreditPositionOf(value: unknown, region: TraeRegion): TraeCreditPosition;
2170
+ /**
2171
+ * Build the next `regions` settings value for one region's credit seat.
2172
+ *
2173
+ * Same merge rule as every sibling region write: only the target region's
2174
+ * `creditPosition` changes, so a seat change cannot drop that slot's model
2175
+ * directory, selection, budgets or enabled flag, nor touch the other region.
2176
+ *
2177
+ * `value` may be the whole settings section or the `regions` map; the RETURN
2178
+ * value is always the `regions` map, i.e. exactly what `settingsScope.set(
2179
+ * 'regions', ...)` needs.
2180
+ */
2181
+ declare function nextRegionCreditPosition(value: unknown, region: TraeRegion, position: TraeCreditPosition): Record<string, unknown>;
2137
2182
  /** Subscription status of an international (ai) account, rendered instead of the CN credit packs. */
2138
2183
  interface TraeWebPayStatus {
2139
2184
  isDollarUsageBilling: boolean;
@@ -2399,6 +2444,29 @@ interface TraeRegionState {
2399
2444
  imageModelIds?: string[];
2400
2445
  /** Local DSH context budget per model in this region. */
2401
2446
  contextBudgets?: Record<string, number>;
2447
+ /**
2448
+ * WHERE this region's credit readout sits (learned from dsh-connect-workbuddy
2449
+ * issue #62).
2450
+ *
2451
+ * Two seats, because the first one is not always available:
2452
+ *
2453
+ * - `composer` — the composer tool row (`conversation.input.left`), shared
2454
+ * with the shell's own controls. It is the closer, more glanceable seat,
2455
+ * and it is the default so nothing moves for anyone who does not choose.
2456
+ * - `stats` — the ambient dock below the composer card
2457
+ * (`conversation.composer.dock`), where the shell renders its own
2458
+ * round/step/token pills. That row is a LIST seat whose shipped occupant
2459
+ * registers separately, so a third-party plugin that ALSO parks something
2460
+ * in the composer row cannot crowd this readout out of existence.
2461
+ *
2462
+ * The report behind this (workbuddy #62) was exactly that: with another
2463
+ * plugin installed, the readout vanished from the composer row. Making the
2464
+ * seat a choice is what keeps one plugin's presence from deciding another's.
2465
+ * Trae already lost this readout once to a shared seat — see the sibling
2466
+ * plugin's note about the sidebar foot, where this line was clipped to "Tr"
2467
+ * beside dsh-connect-workbuddy's rows — so the setting applies here too.
2468
+ */
2469
+ creditPosition?: TraeCreditPosition;
2402
2470
  }
2403
2471
  interface Config {
2404
2472
  authFile?: string;
@@ -2492,6 +2560,18 @@ declare function regionStateOf(config: Config, region: TraeRegion): TraeRegionSt
2492
2560
  * disagree about a region's state.
2493
2561
  */
2494
2562
  declare function regionEnabled(config: Config, region: TraeRegion): boolean;
2563
+ /**
2564
+ * WHERE one region's credit readout sits (learned from workbuddy #62).
2565
+ *
2566
+ * A local reader rather than a bare schema default, so a config written before
2567
+ * the setting existed reads as `composer` — the seat that was the only one, so
2568
+ * an upgrade moves nothing on screen — and so a hand-edited value the schema
2569
+ * does not know falls back to a seat that renders rather than to nowhere.
2570
+ *
2571
+ * Shared with the browser half by construction: the card renders the Host's
2572
+ * answer for this field, so the control cannot disagree with the readout.
2573
+ */
2574
+ declare function creditPosition(config: Config, region: TraeRegion): TraeCreditPosition;
2495
2575
  /**
2496
2576
  * Mark a schema's field as volatile.
2497
2577
  *
@@ -2510,4 +2590,4 @@ declare function asVolatile<S>(schema: S): S;
2510
2590
  declare const Config: z<Config>;
2511
2591
  declare function apply(ctx: Context$1, config: Config): void;
2512
2592
  //#endregion
2513
- export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, type PiAiGeneration, type PiAiRuntimeInfo, REGION_GATEWAYS, type RawChatDelta, type RawChatMessage, type RawChatTool, SseDecoder, type SseEvent, TRAE_ACCOUNT_STATUS_PATH, TRAE_AI_PROVIDER, TRAE_CHECKIN_PATH, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODELS_TEST_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROBE_TIMEOUT_MS, 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_STATE_DB_FILENAME, 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 TraeModelProbeVerdict, type TraeModelsTestResponse, type TraeObservedModelConfig, type TraeProbeResult, type TraeProbeVerdict, 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 TraeWebAccountState, type TraeWebActivity, type TraeWebAppLogin, type TraeWebCheckin, type TraeWebCheckinClaim, type TraeWebCredits, type TraeWebUsage, type TraeWireModel, UnconfiguredTraeUpstreamClient, adaptLegacyPiAiContext, adaptModernPiAiContext, apply, applyContextBudgets, applyImageSelection, applyReasoningEffort, asVolatile, bridgeTraeSoloStream, buildTraeAgentTaskBody, buildTraeCnHeaders, buildTraeFusionRawChatEnvelope, buildTraeModelDetailRequest, buildTraeRawChatDraft, buildTraeRawChatRuntimeConfig, classifyProbeError, classifyProbeResult, classifyTraeRawChatFailure, configuredAccountsOf, createTraeAdapter, createTraeRawGateway, createTraeShim, decidePiAiGeneration, decodeRawChatChunk, decodeTraeEvent, decryptTraeStorageValue, deriveCatalog, describeIdShape, describeNameShape, discoveredCatalog, fallbackModelsFor, followAppLoginEnabled, generationOf, hashTraeRawChatArg, identityHeaders, inject, legacyTraeOwnAuthPath, maskUserPath, mergeTraeModelSources, name, nextRegionEnabled, nextRegionSlots, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, piAiRuntimeInfo, pickTraeStorageIdentity, prepareSoloBody, probeBody, probeModelsSequentially, probeOneModel, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeCliIdentity, readTraeIdentity, refreshTraeCredential, regionEnabled, regionEnabledOf, regionOfCredential, regionOfEdition, regionOfHost, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeIdentity, resolveTraeRawRuntime, sanitizeCatalog, settingsNamespaceOf, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStateDatabaseCandidates, traeStorageCandidates, traeWebUsage, traeWindowsAppNames, unwrapVolatile, unwrapVolatileDeep, withContextAdaptation, withTraeRegion };
2593
+ export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, type PiAiGeneration, type PiAiRuntimeInfo, REGION_GATEWAYS, type RawChatDelta, type RawChatMessage, type RawChatTool, SseDecoder, type SseEvent, TRAE_ACCOUNT_STATUS_PATH, TRAE_AI_PROVIDER, TRAE_CHECKIN_PATH, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODELS_TEST_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROBE_TIMEOUT_MS, 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_STATE_DB_FILENAME, 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 TraeModelProbeVerdict, type TraeModelsTestResponse, type TraeObservedModelConfig, type TraeProbeResult, type TraeProbeVerdict, 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 TraeWebAccountState, type TraeWebActivity, type TraeWebAppLogin, type TraeWebCheckin, type TraeWebCheckinClaim, type TraeWebCredits, type TraeWebUsage, type TraeWireModel, UnconfiguredTraeUpstreamClient, adaptLegacyPiAiContext, adaptModernPiAiContext, apply, applyContextBudgets, applyImageSelection, applyReasoningEffort, asVolatile, bridgeTraeSoloStream, buildTraeAgentTaskBody, buildTraeCnHeaders, buildTraeFusionRawChatEnvelope, buildTraeModelDetailRequest, buildTraeRawChatDraft, buildTraeRawChatRuntimeConfig, classifyProbeError, classifyProbeResult, classifyTraeRawChatFailure, configuredAccountsOf, createTraeAdapter, createTraeRawGateway, createTraeShim, creditPosition, decidePiAiGeneration, decodeRawChatChunk, decodeTraeEvent, decryptTraeStorageValue, deriveCatalog, describeIdShape, describeNameShape, discoveredCatalog, fallbackModelsFor, followAppLoginEnabled, generationOf, hashTraeRawChatArg, identityHeaders, inject, legacyTraeOwnAuthPath, maskUserPath, mergeTraeModelSources, name, nextRegionCreditPosition, nextRegionEnabled, nextRegionSlots, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, piAiRuntimeInfo, pickTraeStorageIdentity, prepareSoloBody, probeBody, probeModelsSequentially, probeOneModel, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeCliIdentity, readTraeIdentity, refreshTraeCredential, regionCreditPositionOf, regionEnabled, regionEnabledOf, regionOfCredential, regionOfEdition, regionOfHost, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeIdentity, resolveTraeRawRuntime, sanitizeCatalog, settingsNamespaceOf, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStateDatabaseCandidates, traeStorageCandidates, traeWebUsage, traeWindowsAppNames, unwrapVolatile, unwrapVolatileDeep, withContextAdaptation, withTraeRegion };
package/lib/index.js CHANGED
@@ -996,6 +996,39 @@ function nextRegionEnabled(value, region, enabled) {
996
996
  enabled
997
997
  });
998
998
  }
999
+ /**
1000
+ * Which seat one region's readout uses, defaulting to the composer row.
1001
+ *
1002
+ * Anything other than an explicit `'stats'` reads as `'composer'`, which covers
1003
+ * the two cases that matter: a profile written BEFORE this setting existed (the
1004
+ * composer row was the only seat, so an upgrade moves nothing on screen), and a
1005
+ * hand-edited value the schema does not know. Falling back rather than
1006
+ * rendering nowhere is deliberate — an unrecognized value must not make the
1007
+ * readout disappear, which is the very defect this setting exists to fix.
1008
+ *
1009
+ * `value` may be the whole settings section or the `regions` map (see
1010
+ * {@link regionsMapOf}).
1011
+ */
1012
+ function regionCreditPositionOf(value, region) {
1013
+ return regionSlotOf(value, region)["creditPosition"] === "stats" ? "stats" : "composer";
1014
+ }
1015
+ /**
1016
+ * Build the next `regions` settings value for one region's credit seat.
1017
+ *
1018
+ * Same merge rule as every sibling region write: only the target region's
1019
+ * `creditPosition` changes, so a seat change cannot drop that slot's model
1020
+ * directory, selection, budgets or enabled flag, nor touch the other region.
1021
+ *
1022
+ * `value` may be the whole settings section or the `regions` map; the RETURN
1023
+ * value is always the `regions` map, i.e. exactly what `settingsScope.set(
1024
+ * 'regions', ...)` needs.
1025
+ */
1026
+ function nextRegionCreditPosition(value, region, position) {
1027
+ return nextRegionSlots(regionsMapOf(value), region, {
1028
+ ...regionSlotOf(value, region),
1029
+ creditPosition: position
1030
+ });
1031
+ }
999
1032
  //#endregion
1000
1033
  //#region src/decrypt.ts
1001
1034
  const TRAE_AUTH_STORAGE_KEY = "iCubeAuthInfo://icube.cloudide";
@@ -5619,6 +5652,20 @@ function regionEnabled(config, region) {
5619
5652
  return regionStateOf(config, region).enabled !== false;
5620
5653
  }
5621
5654
  /**
5655
+ * WHERE one region's credit readout sits (learned from workbuddy #62).
5656
+ *
5657
+ * A local reader rather than a bare schema default, so a config written before
5658
+ * the setting existed reads as `composer` — the seat that was the only one, so
5659
+ * an upgrade moves nothing on screen — and so a hand-edited value the schema
5660
+ * does not know falls back to a seat that renders rather than to nowhere.
5661
+ *
5662
+ * Shared with the browser half by construction: the card renders the Host's
5663
+ * answer for this field, so the control cannot disagree with the readout.
5664
+ */
5665
+ function creditPosition(config, region) {
5666
+ return regionStateOf(config, region).creditPosition === "stats" ? "stats" : "composer";
5667
+ }
5668
+ /**
5622
5669
  * Mark a schema's field as volatile.
5623
5670
  *
5624
5671
  * `volatile()` exists from schemastery 3.18.3; since 2.3.0 the peer range
@@ -5651,7 +5698,8 @@ const regionStateConfig = z.object({
5651
5698
  lastCatalog: z.array(modelConfig).default([]),
5652
5699
  enabledModelIds: z.array(z.string()).default([]),
5653
5700
  imageModelIds: z.array(z.string()).default([]),
5654
- contextBudgets: z.dict(z.number().step(1).min(1)).default({})
5701
+ contextBudgets: z.dict(z.number().step(1).min(1)).default({}),
5702
+ creditPosition: z.union([z.const("composer"), z.const("stats")]).default("composer").description("积分读数显示位置:\"composer\" = 输入框工具栏(默认),\"stats\" = 输入框下方(与「轮次 / 步数 / token」统计同一行)。装了别的插件后读数不显示时改成 stats。")
5655
5703
  });
5656
5704
  const accountSelectionConfig = z.object({
5657
5705
  cn: z.string().description("Selected domestic (CN) account id (never a token)"),
@@ -6216,4 +6264,4 @@ function apply(ctx, config) {
6216
6264
  });
6217
6265
  }
6218
6266
  //#endregion
6219
- export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, REGION_GATEWAYS, SseDecoder, TRAE_ACCOUNT_STATUS_PATH, TRAE_AI_PROVIDER, TRAE_CHECKIN_PATH, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODELS_TEST_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROBE_TIMEOUT_MS, 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_STATE_DB_FILENAME, 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, adaptLegacyPiAiContext, adaptModernPiAiContext, apply, applyContextBudgets, applyImageSelection, applyReasoningEffort, asVolatile, bridgeTraeSoloStream, buildTraeAgentTaskBody, buildTraeCnHeaders, buildTraeFusionRawChatEnvelope, buildTraeModelDetailRequest, buildTraeRawChatDraft, buildTraeRawChatRuntimeConfig, classifyProbeError, classifyProbeResult, classifyTraeRawChatFailure, configuredAccountsOf, createTraeAdapter, createTraeRawGateway, createTraeShim, decidePiAiGeneration, decodeRawChatChunk, decodeTraeEvent, decryptTraeStorageValue, deriveCatalog, describeIdShape, describeNameShape, discoveredCatalog, fallbackModelsFor, followAppLoginEnabled, generationOf, hashTraeRawChatArg, identityHeaders, inject, legacyTraeOwnAuthPath, maskUserPath, mergeTraeModelSources, name, nextRegionEnabled, nextRegionSlots, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, piAiRuntimeInfo, pickTraeStorageIdentity, prepareSoloBody, probeBody, probeModelsSequentially, probeOneModel, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeCliIdentity, readTraeIdentity, refreshTraeCredential, regionEnabled, regionEnabledOf, regionOfCredential, regionOfEdition, regionOfHost, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeIdentity, resolveTraeRawRuntime, sanitizeCatalog, settingsNamespaceOf, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStateDatabaseCandidates, traeStorageCandidates, traeWebUsage, traeWindowsAppNames, unwrapVolatile, unwrapVolatileDeep, withContextAdaptation, withTraeRegion };
6267
+ export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, REGION_GATEWAYS, SseDecoder, TRAE_ACCOUNT_STATUS_PATH, TRAE_AI_PROVIDER, TRAE_CHECKIN_PATH, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_MODELS_TEST_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PAY_BASE, TRAE_PROBE_TIMEOUT_MS, 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_STATE_DB_FILENAME, 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, adaptLegacyPiAiContext, adaptModernPiAiContext, apply, applyContextBudgets, applyImageSelection, applyReasoningEffort, asVolatile, bridgeTraeSoloStream, buildTraeAgentTaskBody, buildTraeCnHeaders, buildTraeFusionRawChatEnvelope, buildTraeModelDetailRequest, buildTraeRawChatDraft, buildTraeRawChatRuntimeConfig, classifyProbeError, classifyProbeResult, classifyTraeRawChatFailure, configuredAccountsOf, createTraeAdapter, createTraeRawGateway, createTraeShim, creditPosition, decidePiAiGeneration, decodeRawChatChunk, decodeTraeEvent, decryptTraeStorageValue, deriveCatalog, describeIdShape, describeNameShape, discoveredCatalog, fallbackModelsFor, followAppLoginEnabled, generationOf, hashTraeRawChatArg, identityHeaders, inject, legacyTraeOwnAuthPath, maskUserPath, mergeTraeModelSources, name, nextRegionCreditPosition, nextRegionEnabled, nextRegionSlots, normalizeTraeCredential, normalizeTraeVersionCode, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, piAiRuntimeInfo, pickTraeStorageIdentity, prepareSoloBody, probeBody, probeModelsSequentially, probeOneModel, probeTraeRawChatCapability, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeCliIdentity, readTraeIdentity, refreshTraeCredential, regionCreditPositionOf, regionEnabled, regionEnabledOf, regionOfCredential, regionOfEdition, regionOfHost, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeIdentity, resolveTraeRawRuntime, sanitizeCatalog, settingsNamespaceOf, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStateDatabaseCandidates, traeStorageCandidates, traeWebUsage, traeWindowsAppNames, unwrapVolatile, unwrapVolatileDeep, withContextAdaptation, withTraeRegion };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dsh-connect-trae",
3
3
  "displayName": "DSH Connect Trae",
4
4
  "description": "把本机登录的 Trae 模型接入 DeepSeek Harness:国内版与国际版双供应商并行,提供用量/积分概览与每日签到领取。",
5
- "version": "3.4.2",
5
+ "version": "3.5.0",
6
6
  "author": "dingminhua",
7
7
  "copyright": "Copyright (c) 2026 LaoDing",
8
8
  "license": "MIT",