dsh-connect-trae 4.4.4 → 4.4.6

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
@@ -451,6 +451,33 @@ declare function isPromotableWireModel(model: TraeWireModel): boolean;
451
451
  * promotion every snapshot the IDE offers is unreachable from the plugin.
452
452
  */
453
453
  declare function mergeTraeModelSources(remote: readonly TraeDiscoveredModel[], wire: readonly TraeWireModel[]): TraeModelInfo[];
454
+ /**
455
+ * Demote a NON-chat `wireFunction` to "no function", keeping the row.
456
+ *
457
+ * A row pinned to an IDE/Remote-agent roster — `solo_agent`, `builder_v3` — is
458
+ * not callable through `llm_utils_chat` by THAT function: asking answers
459
+ * 4011/4001 (measured 2026-10-01, issue #19). Dropping the row is not the fix,
460
+ * though, and was a regression: a model can carry a non-chat function for a
461
+ * reason that says nothing about its chat availability. The directory lists
462
+ * `gpt-5.5`, `gpt-5.6-*`, `gpt-6-astra`, `glm-5.2`, `kimi-k2.7-code`,
463
+ * `Dola-Seed-2.0-Code` and `deepseek-v4-flash-0731` under `solo_agent` ALONE
464
+ * (docs/ISSUE19_DIAGNOSIS.md), yet the same models answer normally under
465
+ * `solo_work_remote` / `solo_work_lite` / `solo_agent_remote` — they are
466
+ * exactly the models issue #19's fix was opened to expose. Dropping them
467
+ * re-hid the whole set on the restricted networks this fallback targets, where
468
+ * the wire roster is empty and the directory group is the only attribution.
469
+ *
470
+ * Keeping the row with the function CLEARED preserves both facts: the model
471
+ * stays visible (issue #19), and the bridge sends the region's DEFAULT chat
472
+ * function instead of one that is guaranteed to refuse. That is the pre-change
473
+ * behaviour for these rows — a genuinely unreachable model still fails with a
474
+ * readable upstream message rather than a silent absence.
475
+ *
476
+ * `chatFunctions` must be the region's own `TRAE_DIRECTORY_FUNCTIONS` list —
477
+ * the functions `llm_utils_chat` accepts. Callers should log the demoted rows:
478
+ * "which function did it lose, and why" deserves an answer.
479
+ */
480
+ declare function withChatCallableFunctions(rows: readonly TraeModelInfo[], chatFunctions: readonly string[]): TraeModelInfo[];
454
481
  /** Local DSH context budget per model; a value may only select an advertised window. */
455
482
  type TraeContextBudget = number;
456
483
  /**
@@ -873,6 +900,19 @@ interface TraeWebModel {
873
900
  defaultEffort?: string;
874
901
  };
875
902
  maxContextWindow?: number;
903
+ /**
904
+ * The directory function this row is called through, and the `config_name`
905
+ * that function accepts (issue #52).
906
+ *
907
+ * Carried on the wire document because it is the ONLY thing that explains the
908
+ * catalog's shape to the person looking at it: the plugin serves the union of
909
+ * a dozen Trae channels, so 34 rows are 34 rows only until they are grouped by
910
+ * the channel each one will actually run on. Absent on rows the merge could
911
+ * not attribute (those fall back to the default chat function) and on catalogs
912
+ * saved before these fields existed.
913
+ */
914
+ wireFunction?: string;
915
+ wireConfigName?: string;
876
916
  /**
877
917
  * Trae's own image-capability flag, as the runtime catalog carries it. The
878
918
  * card renders these rows with their image checkbox already ticked so the
@@ -1849,7 +1889,40 @@ declare class TraeCredentialStore {
1849
1889
  * account, it never locks the user out.
1850
1890
  */
1851
1891
  private readTombstones;
1852
- private writeTombstones;
1892
+ /**
1893
+ * Read, mutate, and write the tombstone list under ONE lock.
1894
+ *
1895
+ * The tombstone file is read-modify-write state shared by two flows that run
1896
+ * concurrently: `mirrorLocalLogins` (drops tombstones whose logins are gone)
1897
+ * and `deleteAccount` (adds the id just deleted). A read OUTSIDE the write's
1898
+ * lock loses updates in both directions — a dropped-add resurrects a deleted
1899
+ * account on the next mirror, a dropped-drop keeps a tombstone forever and
1900
+ * hides every future sign-in of that account. The mutator therefore runs on
1901
+ * the freshly-read set INSIDE the lock, and what it returns is what gets
1902
+ * written, with no window in between.
1903
+ *
1904
+ * Fire-and-forget safe: a failed update only delays a tombstone change until
1905
+ * the next mirror or delete, so errors are swallowed like the readers'.
1906
+ */
1907
+ private updateTombstones;
1908
+ /**
1909
+ * Read the plugin-owned file as the merge base for a read-modify-write.
1910
+ *
1911
+ * This is the fail-safe that keeps one unreadable file from erasing every
1912
+ * account: `parseOwn` now distinguishes a VALID empty file (`[]`) from one
1913
+ * this build cannot parse (`undefined`), and only the former may serve as a
1914
+ * merge base. For the latter the file is quarantined — renamed aside with
1915
+ * its bytes intact — and the merge then starts from nothing, so the action
1916
+ * the user pressed still succeeds and the lost entries are recoverable from
1917
+ * the quarantine copy instead of being overwritten silently. A quarantine
1918
+ * that fails (an exotic filesystem, a name collision) aborts the write
1919
+ * instead: losing one refresh is recoverable by pressing it again, losing
1920
+ * every account is not.
1921
+ *
1922
+ * Every caller must hold the {@link withFileLock} of `path` across BOTH the
1923
+ * read and the subsequent write — this does not lock by itself.
1924
+ */
1925
+ private readOwnForMerge;
1853
1926
  /**
1854
1927
  * Copy every local Trae sign-in into this store's own file, once.
1855
1928
  *
@@ -2350,6 +2423,306 @@ interface TraeModelDetailRequest {
2350
2423
  /** Build the exact request shape observed in successful current Trae CN logs. */
2351
2424
  declare function buildTraeModelDetailRequest(configName?: string, custom?: boolean): TraeModelDetailRequest;
2352
2425
  //#endregion
2426
+ //#region src/official-roster.d.ts
2427
+ /**
2428
+ * The IDE's own roster: what the Trae picker is WILLING TO SHOW, per function.
2429
+ *
2430
+ * Issue #52. The plugin lists the UNION of every directory function (46 rows on
2431
+ * a live CN credential, 2026-10-23) while the Trae client renders ONE function's
2432
+ * list at a time (14–24 rows). Two different questions were being answered by
2433
+ * one list, and the user saw the difference as "why are there so many models".
2434
+ *
2435
+ * This module answers the second question with the third upstream signal the
2436
+ * catalog was missing. `isPromotableWireModel` (src/catalog.ts) asks "can this
2437
+ * config be called"; this one asks "does the vendor's own picker offer it", read
2438
+ * from `is_invisible_to_user` on the SAME `batch_get_detail_param` document the
2439
+ * IDE renders. Both are upstream facts; neither is invented.
2440
+ *
2441
+ * The flag is PER (config, function), not per config — measured 2026-10-23:
2442
+ * `glm-4.7` is visible under `code_review_summary` and hidden under `solo_coder`
2443
+ * and `solo_work_remote`. A row's visibility therefore only means something
2444
+ * together with the function the chat call will replay, which is why the
2445
+ * decision below takes BOTH and why the answer cannot be merged as a bare field
2446
+ * the way `contextWindow` is.
2447
+ */
2448
+ /** One (config, function) pair exactly as the IDE roster published it. */
2449
+ interface TraeOfficialChannel {
2450
+ /** The `function_configs[].function` this row was listed under. */
2451
+ function: string;
2452
+ /**
2453
+ * Upstream's `usage` for the config under this function: `chat_completion`
2454
+ * for a real model, one value per built-in tool config (`summary`,
2455
+ * `fast_apply`, …), `custom_model` for the account's own model. Empty when
2456
+ * upstream did not say.
2457
+ */
2458
+ usage: string;
2459
+ /** `config_switch`: false means upstream marked the config OFF on this function. */
2460
+ enabled: boolean;
2461
+ /** `is_invisible_to_user`: true means the vendor's picker does not list it here. */
2462
+ invisible: boolean;
2463
+ }
2464
+ /** What the IDE roster knows about one `config_name`. */
2465
+ interface TraeOfficialRoster {
2466
+ /** Lower-cased `config_name` → every (function, visibility) pair published. */
2467
+ channels: ReadonlyMap<string, readonly TraeOfficialChannel[]>;
2468
+ /** Number of distinct configs and pairs, for diagnostics only. */
2469
+ size: {
2470
+ configs: number;
2471
+ pairs: number;
2472
+ };
2473
+ }
2474
+ /**
2475
+ * Parse a `batch_get_detail_param` answer into a per-(config, function) index.
2476
+ *
2477
+ * Tolerant on purpose: this document is 1.8 MB of upstream-owned shape
2478
+ * (`function_configs[] → config_info_list[] → model_detail_list[]`), and the
2479
+ * plugin must not lose the whole refresh because one nested field changed
2480
+ * spelling. Rows that cannot be read are skipped; a document with no
2481
+ * `function_configs` at all yields an empty roster, which the filter reads as
2482
+ * "nothing to say" rather than "hide everything".
2483
+ *
2484
+ * Duplicate pairs are collapsed first-wins, matching the rest of the catalog's
2485
+ * convention (`mergeTraeModelSources`). Two functions can both list a config,
2486
+ * and those are DIFFERENT pairs, so both are kept.
2487
+ */
2488
+ declare function parseTraeOfficialRoster(payload: unknown): TraeOfficialRoster;
2489
+ /**
2490
+ * What the roster says to do with one catalog row.
2491
+ *
2492
+ * `is_invisible_to_user` is a per-(config, function) MODE roster, not a
2493
+ * lifecycle flag. Measured 2026-10-23 on a live CN account: `DeepSeek-V4-Pro` is
2494
+ * hidden under `solo_work_remote` (where that mode's picker shows
2495
+ * `DeepSeek-V4-Pro-Official`) while `solo_coder`, `chat_v3` and `chat` all list
2496
+ * it as visible; `glm-5` is hidden under `solo_work_remote` and
2497
+ * `solo_agent_remote` and visible under `solo_work_lite` and `solo_coder`.
2498
+ *
2499
+ * Reading the flag as "this model is retired" would have deleted six models that
2500
+ * are in current use. Reading it as "this config is not the one THIS mode
2501
+ * offers" yields the two verdicts below: a config no chat function offers any
2502
+ * more is retired (hide), and a config offered somewhere else is mis-pinned
2503
+ * (re-pin to the function the vendor itself uses). Both replace a guess — the
2504
+ * union of twelve directories — with an upstream answer.
2505
+ */
2506
+ type TraeOfficialVerdict =
2507
+ /** Visible on the function it would be called through, or the roster says nothing. */
2508
+ {
2509
+ kind: 'keep';
2510
+ } |
2511
+ /** Invisible on EVERY chat function that lists it: the vendor retired it as a chat model. */
2512
+ {
2513
+ kind: 'hide';
2514
+ function: string | undefined;
2515
+ listedBy: string[];
2516
+ } |
2517
+ /** Invisible on its own function while another chat function offers it. */
2518
+ {
2519
+ kind: 'repin';
2520
+ from: string | undefined;
2521
+ to: string;
2522
+ listedBy: string[];
2523
+ };
2524
+ /**
2525
+ * Decide one row from the roster.
2526
+ *
2527
+ * `chatFunctions` is the region's own `TRAE_DIRECTORY_FUNCTIONS` list, in
2528
+ * priority order: only those functions can carry a VERDICT, because only those
2529
+ * are functions `llm_utils_chat` accepts. A config the vendor shows under
2530
+ * `code_review_summary` alone is not offered as a chat model at all — that is
2531
+ * exactly the `glm-4.7` case, and it is a "hide", not a "re-pin".
2532
+ *
2533
+ * The verdict is `keep` when the roster cannot speak: no entry for the config
2534
+ * (measured 2026-10-23: `kimi-k2.8-preview` and `qwen3.8-flash` exist only in
2535
+ * the Remote directory's `chat_v3` group), only tool rows (`usage: 'summary'`,
2536
+ * `fast_apply`, …), or no chat function at all. Silence is never a verdict.
2537
+ */
2538
+ declare function officialVerdictOf(model: {
2539
+ id: string;
2540
+ wireConfigName?: string;
2541
+ wireFunction?: string;
2542
+ }, roster: TraeOfficialRoster, chatFunctions: readonly string[]): TraeOfficialVerdict;
2543
+ interface TraeOfficialFilterResult<T> {
2544
+ /** Rows the catalog should keep, in their original order. */
2545
+ rows: T[];
2546
+ /** Rows removed, with the function that hid them, for the log and the tests. */
2547
+ hidden: Array<{
2548
+ id: string;
2549
+ function: string | undefined;
2550
+ }>;
2551
+ /** Rows kept but moved to the chat function the vendor offers them on. */
2552
+ repinned: Array<{
2553
+ id: string;
2554
+ from: string | undefined;
2555
+ to: string;
2556
+ }>;
2557
+ }
2558
+ /**
2559
+ * Apply the roster: retire what no chat function offers any more, and re-pin
2560
+ * what the vendor offers under a different channel.
2561
+ *
2562
+ * FAIL-OPEN BY CONSTRUCTION, which is the whole safety argument for applying
2563
+ * this by default:
2564
+ *
2565
+ * - `undefined` roster (transport failure, restricted network, a credential
2566
+ * that cannot read the IDE document) keeps EVERY row. A refresh must never
2567
+ * lose models because a second, optional endpoint was unreachable.
2568
+ * - `keep` covers every ambiguity — no entry, tool-only entries, a channel the
2569
+ * roster does not name. Only an explicit "the vendor shows this nowhere we
2570
+ * can call it" removes a row.
2571
+ * - `config_switch === false` alone does NOT remove a row: the flag is
2572
+ * recorded on {@link TraeOfficialChannel} but not used as a verdict, because
2573
+ * its semantics are unmeasured and "disabled" there may describe a function
2574
+ * override rather than the model itself.
2575
+ *
2576
+ * This is deliberately NOT "match the Trae client": the client renders one
2577
+ * function, the plugin serves the union, and issue #46's reporter wants the
2578
+ * dated snapshots the union carries. What changes here is only the class where
2579
+ * the union is provably wrong — twelve retired configs that made up the reported
2580
+ * "tail of old models", plus rows pinned to a channel their own vendor hides
2581
+ * them on (the "code model on a solo channel" risk of issue #52).
2582
+ */
2583
+ declare function applyOfficialRoster<T extends {
2584
+ id: string;
2585
+ wireConfigName?: string;
2586
+ wireFunction?: string;
2587
+ }>(rows: readonly T[], roster: TraeOfficialRoster | undefined, chatFunctions: readonly string[]): TraeOfficialFilterResult<T>;
2588
+ interface TraeOfficialRosterOptions {
2589
+ credential(): Promise<TraeCredential>;
2590
+ identity(): Promise<TraeIdentity>;
2591
+ fetchImpl?: typeof fetch;
2592
+ /** Pins the host (tests, diagnostics). Defaults to the credential region's chat gateway. */
2593
+ baseUrl?: string;
2594
+ /** Pin the tenant pool's gateway, exactly like `TraeSoloUpstreamClient`. */
2595
+ route?: 'solo' | 'enterprise';
2596
+ log?: (message: string, detail?: unknown) => void;
2597
+ now?: () => number;
2598
+ }
2599
+ /**
2600
+ * Reads the IDE's roster once per cache window and never throws.
2601
+ *
2602
+ * `undefined` is a first-class answer: it is what a caller sees when the
2603
+ * document could not be read, and {@link applyOfficialRoster} treats it as "no
2604
+ * opinion". Silence on failure is intentional — this is a refinement of a
2605
+ * refresh that already succeeded, so a strict error would turn a usable catalog
2606
+ * into a failed refresh.
2607
+ */
2608
+ declare class TraeOfficialRosterClient {
2609
+ private readonly options;
2610
+ private readonly fetchImpl;
2611
+ private readonly now;
2612
+ private cached;
2613
+ /** The last failure, so a repeatedly-broken endpoint is not re-probed on every refresh. */
2614
+ private failedAt;
2615
+ constructor(options: TraeOfficialRosterOptions);
2616
+ /** Cached roster, without any network I/O. */
2617
+ cachedRoster(): TraeOfficialRoster | undefined;
2618
+ fetch(signal?: AbortSignal): Promise<TraeOfficialRoster | undefined>;
2619
+ }
2620
+ /** Where the client asks for the roster; re-exported so diagnostics do not hard-code it. */
2621
+ declare const TRAE_OFFICIAL_ROSTER_PATH = "/api/ide/v1/batch_get_detail_param";
2622
+ //#endregion
2623
+ //#region src/model-order.d.ts
2624
+ /**
2625
+ * Wire name of the default SOLO chat function.
2626
+ *
2627
+ * Lives here rather than in `solo.ts` so this module stays importable from the
2628
+ * client; `solo.ts` re-exports it, so there is still exactly one definition.
2629
+ */
2630
+ declare const TRAE_SOLO_FUNCTION = "solo_work_lite";
2631
+ /**
2632
+ * The chat functions of one region, in PRIORITY order.
2633
+ *
2634
+ * Two consumers read it, and both mean "priority", which is why they can share
2635
+ * one array: the wire asks these functions in order and the first to list a
2636
+ * config owns it (`solo.ts`), and the card draws the groups in the same order so
2637
+ * the row a user sees first is the one the resolver prefers.
2638
+ */
2639
+ declare const TRAE_CHANNEL_PRIORITY: Readonly<Record<TraeRegion, readonly string[]>>;
2640
+ /** The subset of a catalog row this module needs. */
2641
+ interface TraeOrderableModel {
2642
+ id: string;
2643
+ name: string;
2644
+ /** The directory function the row will be called through; absent = default. */
2645
+ wireFunction?: string;
2646
+ /** The `config_name` to actually send; absent means `id` is the wire id. */
2647
+ wireConfigName?: string;
2648
+ }
2649
+ /**
2650
+ * The catalog in display order: channel priority first, then name.
2651
+ *
2652
+ * Total and stable — ties fall through to `id`, so two rows with the same name
2653
+ * in the same channel still get one fixed order rather than the order they
2654
+ * arrived in.
2655
+ */
2656
+ declare function orderTraeModels<T extends TraeOrderableModel>(rows: readonly T[], region?: TraeRegion): T[];
2657
+ /** One rendered group: the channel and the rows attributed to it. */
2658
+ interface TraeModelGroup<T> {
2659
+ /** `undefined` for rows whose call function is unknown (they use the default). */
2660
+ channel: string | undefined;
2661
+ rows: T[];
2662
+ }
2663
+ /**
2664
+ * Split rows into channel groups, in display order.
2665
+ *
2666
+ * Ordering is re-applied here rather than trusted from the caller: a group list
2667
+ * built from an unsorted input would put the groups in arrival order, which is
2668
+ * the exact instability this module exists to remove.
2669
+ */
2670
+ declare function groupTraeModels<T extends TraeOrderableModel>(rows: readonly T[], region?: TraeRegion): TraeModelGroup<T>[];
2671
+ /**
2672
+ * Does one row match a search query?
2673
+ *
2674
+ * Matches the display name, the display id and the WIRE config name — the last
2675
+ * one because a user debugging a `4001 config_name rejected` arrives with the
2676
+ * upstream name in hand, and the two differ exactly on the rows that carry a
2677
+ * suffix (`DeepSeek-V4-Flash` vs `DeepSeek-V4-Flash-Official`).
2678
+ */
2679
+ declare function traeModelMatchesQuery(model: TraeOrderableModel, query: string): boolean;
2680
+ /** Filter by {@link traeModelMatchesQuery}, preserving order. */
2681
+ declare function filterTraeModels<T extends TraeOrderableModel>(rows: readonly T[], query: string): T[];
2682
+ /**
2683
+ * The channels a NORMAL Trae chat session actually runs on: the `solo_work_*`
2684
+ * family, i.e. the panel's own chat modes.
2685
+ *
2686
+ * Deliberately not "every channel we can call". After issue #52 P1 the catalog
2687
+ * is 34 rows and 10 of them are reachable only through a SPECIALIST channel:
2688
+ * `solo_coder` (7: `Doubao-Seed-2.0-Code`, `glm-5.1`, `glm-5v-turbo`,
2689
+ * `kimi-k2.5`, `minimax-m2.7`, `qwen-3.5`, `qwen-3.6-plus`), `chat_v3` (2:
2690
+ * `kimi-k2.8-preview`, `qwen3.8-flash`) and `solo_agent_remote` (1:
2691
+ * `Doubao-Seed-Code`). Measured 2026-10-23 on a live CN account. Those rows work
2692
+ * — that is why P1 kept them — but they are not what Trae's main chat offers,
2693
+ * and mixing them into the default view is exactly the "a code model answering a
2694
+ * solo request" shape issue #52 asked about.
2695
+ */
2696
+ declare const TRAE_COMMON_FUNCTIONS: Readonly<Record<TraeRegion, readonly string[]>>;
2697
+ /**
2698
+ * The function a request for this row will NAME.
2699
+ *
2700
+ * A row with no `wireFunction` is not "unknown to the wire": the bridge sends
2701
+ * the region default (`TRAE_SOLO_FUNCTION`), so for every question about where
2702
+ * the turn goes, the default is the answer. The distinction still matters for
2703
+ * DISPLAY (`groupTraeModels` keeps these in their own group, because their
2704
+ * provenance — which directory group advertised them — really is unknown), but
2705
+ * not for scope: a `solo_work_lite` turn is a normal chat turn either way.
2706
+ */
2707
+ declare function traeModelCallChannel(model: TraeOrderableModel): string;
2708
+ /** Which slice of the catalog a view asks for. */
2709
+ type TraeModelView =
2710
+ /** Rows a normal chat turn can reach: {@link TRAE_COMMON_FUNCTIONS}. */
2711
+ 'common' |
2712
+ /** Every callable row, specialist channels included. */
2713
+ 'all';
2714
+ /**
2715
+ * Does this row belong to the view?
2716
+ *
2717
+ * Judged on {@link traeModelCallChannel}, never on `wireFunction` directly:
2718
+ * otherwise the one row without a function (`doubao_1_8`, measured 2026-10-23)
2719
+ * would fall OUT of the common view while being called through exactly the
2720
+ * common channel it belongs to.
2721
+ */
2722
+ declare function traeModelInView(model: TraeOrderableModel, view: TraeModelView, region?: TraeRegion): boolean;
2723
+ /** Keep the rows a view asks for, preserving order. */
2724
+ declare function scopeTraeModels<T extends TraeOrderableModel>(rows: readonly T[], view: TraeModelView, region?: TraeRegion): T[];
2725
+ //#endregion
2353
2726
  //#region src/redact.d.ts
2354
2727
  /**
2355
2728
  * Redaction helpers for diagnostics that a user may paste into a public issue.
@@ -2882,7 +3255,6 @@ type TraeStreamEvent = {
2882
3255
  declare function decodeTraeEvent(event: SseEvent): TraeStreamEvent;
2883
3256
  //#endregion
2884
3257
  //#region src/solo.d.ts
2885
- declare const TRAE_SOLO_FUNCTION = "solo_work_lite";
2886
3258
  declare const TRAE_SOLO_CHAT_PATH = "/api/agent/v3/llm_utils_chat";
2887
3259
  declare const TRAE_SOLO_MODELS_PATH = "/api/ide/v1/get_detail_param";
2888
3260
  declare function prepareSoloBody(source: string, defaultModel?: string, functionName?: string): string;
@@ -4028,4 +4400,4 @@ declare function asVolatile<S>(schema: S): S;
4028
4400
  declare const Config: z<Config>;
4029
4401
  declare function apply(ctx: Context$1, config: Config): void;
4030
4402
  //#endregion
4031
- export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, MAX_PROBE_INPUT_TOKENS, 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_ENTERPRISE_PROVIDER, TRAE_MODELS_TEST_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_PANELS, TRAE_PAY_BASE, TRAE_PROBE_TIMEOUT_MS, TRAE_PROVIDER, TRAE_PROVIDERS, TRAE_PROVIDER_DISPLAY_NAMES, TRAE_PROVIDER_IDS, TRAE_PROVIDER_ID_DISPLAY_NAMES, TRAE_PROVIDER_ROUTES, 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, type TraeFailure, TraeFallbackUpstreamClient, type TraeFallbackUpstreamOptions, type TraeFusionRawChatEnvelope, TraeGatedUpstreamClient, type TraeGatedUpstreamOptions, type TraeIdentity, type TraeInputModality, type TraeModelDetailRequest, type TraeModelInfo, type TraeModelProbeVerdict, type TraeModelsTestResponse, type TraeObservedModelConfig, type TraePanel, type TraeProbeResult, type TraeProbeVerdict, type TraeProviderRoute, 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 TraeWebCheckin, type TraeWebCheckinClaim, type TraeWebCredits, type TraeWebUsage, type TraeWireModel, type TraeWireTarget, 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, describeTraeFailure, discoveredCatalog, displayNameOfTraeProvider, fallbackModelsFor, generationOf, hashTraeRawChatArg, identityHeaders, inject, isEnterpriseAccount, isPromotableWireModel, legacyTraeOwnAuthPath, maskUserPath, mergeTraeModelSources, name, nextRegionCreditPosition, nextRegionEnabled, nextRegionSlots, normalizeTraeCredential, normalizeTraeToolSchema, normalizeTraeToolSchemas, normalizeTraeVersionCode, panelOfKey, panelOfProvider, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, piAiRuntimeInfo, pickTraeStorageIdentity, prepareSoloBody, probeBody, probeModelsSequentially, probeOneModel, probeTraeRawChatCapability, providerOfPanel, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeCliIdentity, readTraeIdentity, refreshTraeCredential, regionCreditPositionOf, regionEnabled, regionEnabledOf, regionOfCredential, regionOfEdition, regionOfHost, regionOfPanel, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeIdentity, resolveTraeRawRuntime, routeOfTraeProvider, sanitizeCatalog, settingsNamespaceOf, traeEndpoint, traeInputModalities, traeModelDisplayName, traeOwnAuthPath, traeRawChatExtraInfo, traeStateDatabaseCandidates, traeStorageCandidates, traeWebUsage, traeWindowsAppNames, unwrapVolatile, unwrapVolatileDeep, wireTargetsOf, withContextAdaptation, withTraeRegion };
4403
+ export { Config, FALLBACK_TRAE_MODELS, FALLBACK_TRAE_MODELS_AI, MAX_PROBE_INPUT_TOKENS, type PiAiGeneration, type PiAiRuntimeInfo, REGION_GATEWAYS, type RawChatDelta, type RawChatMessage, type RawChatTool, SseDecoder, type SseEvent, TRAE_ACCOUNT_STATUS_PATH, TRAE_AI_PROVIDER, TRAE_CHANNEL_PRIORITY, TRAE_CHECKIN_PATH, TRAE_CN_AGENT_TASK_PATH, TRAE_CN_TITLE_PATH, TRAE_COMMON_FUNCTIONS, TRAE_ENTERPRISE_PROVIDER, TRAE_MODELS_TEST_PATH, TRAE_MODEL_DETAIL_FUNCTIONS, TRAE_MODEL_DETAIL_PATH, TRAE_OFFICIAL_ROSTER_PATH, TRAE_PANELS, TRAE_PAY_BASE, TRAE_PROBE_TIMEOUT_MS, TRAE_PROVIDER, TRAE_PROVIDERS, TRAE_PROVIDER_DISPLAY_NAMES, TRAE_PROVIDER_IDS, TRAE_PROVIDER_ID_DISPLAY_NAMES, TRAE_PROVIDER_ROUTES, 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, type TraeFailure, TraeFallbackUpstreamClient, type TraeFallbackUpstreamOptions, type TraeFusionRawChatEnvelope, TraeGatedUpstreamClient, type TraeGatedUpstreamOptions, type TraeIdentity, type TraeInputModality, type TraeModelDetailRequest, type TraeModelGroup, type TraeModelInfo, type TraeModelProbeVerdict, type TraeModelView, type TraeModelsTestResponse, type TraeObservedModelConfig, type TraeOfficialChannel, type TraeOfficialFilterResult, type TraeOfficialRoster, TraeOfficialRosterClient, type TraeOfficialVerdict, type TraeOrderableModel, type TraePanel, type TraeProbeResult, type TraeProbeVerdict, type TraeProviderRoute, 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 TraeWebCheckin, type TraeWebCheckinClaim, type TraeWebCredits, type TraeWebUsage, type TraeWireModel, type TraeWireTarget, UnconfiguredTraeUpstreamClient, adaptLegacyPiAiContext, adaptModernPiAiContext, apply, applyContextBudgets, applyImageSelection, applyOfficialRoster, applyReasoningEffort, asVolatile, bridgeTraeSoloStream, buildTraeAgentTaskBody, buildTraeCnHeaders, buildTraeFusionRawChatEnvelope, buildTraeModelDetailRequest, buildTraeRawChatDraft, buildTraeRawChatRuntimeConfig, classifyProbeError, classifyProbeResult, classifyTraeRawChatFailure, configuredAccountsOf, createTraeAdapter, createTraeRawGateway, createTraeShim, creditPosition, decidePiAiGeneration, decodeRawChatChunk, decodeTraeEvent, decryptTraeStorageValue, deriveCatalog, describeIdShape, describeNameShape, describeTraeFailure, discoveredCatalog, displayNameOfTraeProvider, fallbackModelsFor, filterTraeModels, generationOf, groupTraeModels, hashTraeRawChatArg, identityHeaders, inject, isEnterpriseAccount, isPromotableWireModel, legacyTraeOwnAuthPath, maskUserPath, mergeTraeModelSources, name, nextRegionCreditPosition, nextRegionEnabled, nextRegionSlots, normalizeTraeCredential, normalizeTraeToolSchema, normalizeTraeToolSchemas, normalizeTraeVersionCode, officialVerdictOf, orderTraeModels, panelOfKey, panelOfProvider, parseObservedModelConfig, parseReasoningCapability, parseTraeAuthValue, parseTraeCachedModel, parseTraeModelExtraConfigLogLine, parseTraeOfficialRoster, parseTraeRawChatBehaviorConfig, parseTraeRemoteModel, parseTraeStorageDocument, piAiRuntimeInfo, pickTraeStorageIdentity, prepareSoloBody, probeBody, probeModelsSequentially, probeOneModel, probeTraeRawChatCapability, providerOfPanel, rawCapabilityDiagnostic, rawCapabilityFingerprint, readTraeCachedModel, readTraeCliIdentity, readTraeIdentity, refreshTraeCredential, regionCreditPositionOf, regionEnabled, regionEnabledOf, regionOfCredential, regionOfEdition, regionOfHost, regionOfPanel, regionOfTraeProvider, regionOfTraeStatusUrl, regionOfUserRegion, regionStateOf, registerTraeUsageRoute, resolveTraeIdentity, resolveTraeRawRuntime, routeOfTraeProvider, sanitizeCatalog, scopeTraeModels, settingsNamespaceOf, traeEndpoint, traeInputModalities, traeModelCallChannel, traeModelDisplayName, traeModelInView, traeModelMatchesQuery, traeOwnAuthPath, traeRawChatExtraInfo, traeStateDatabaseCandidates, traeStorageCandidates, traeWebUsage, traeWindowsAppNames, unwrapVolatile, unwrapVolatileDeep, wireTargetsOf, withChatCallableFunctions, withContextAdaptation, withTraeRegion };