dsh-connect-workbuddy 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
@@ -640,23 +640,36 @@ interface WorkBuddyUpstreamModel {
640
640
  interface WorkBuddyCreditPackage {
641
641
  packageName: string;
642
642
  /**
643
- * Remaining credit, always read from `CapacityRemain` (issue #48).
643
+ * Remaining credit, always read from the CYCLE family (issue #58).
644
644
  *
645
645
  * The upstream reports a monthly resource (`CapacityType 4`) with TWO
646
- * capacity families, and they answer different questions:
647
- *
648
- * - `CapacityRemain` / `CapacitySize` / `CapacityUsed` — the capacity POOL.
649
- * - `CycleCapacityRemain` / `CycleCapacitySize` / `CycleCapacityUsed` — the
650
- * CURRENT BILLING CYCLE.
651
- *
652
- * "How much credit do I have" is the pool, so that is what this field
653
- * carries. Reading `CycleCapacityRemain` here was the defect: on three real
654
- * global accounts the upstream returned `CapacityRemain=100` together with
655
- * `CycleCapacityRemain=0` and `CycleCapacityUsed=100` inside an UNFINISHED
656
- * cycle (`CycleEndTime` days out, `Status=0`), so the plugin reported 0
657
- * credits for accounts that were not exhausted at all.
646
+ * capacity families, and for a long time this field carried the POOL one on
647
+ * the theory that the pool answers "how much do I have" (issue #48). That was
648
+ * wrong, and the official client settles it: on a live CN account the client
649
+ * shows `总剩余积分 2,196.61` = `套餐基础积分 500` + `平台奖励积分 1,696.61`,
650
+ * which is EXACTLY Σ `CycleCapacityRemainPrecise` over the same response
651
+ * (1696.61 + 500), while Σ `CapacityRemain` is 2,196 — the pool figure lands
652
+ * on the right integer only because that account's cycle is untouched, and
653
+ * the cent is what proves which family the client reads.
654
+ *
655
+ * The pool family is not a balance at all: on a monthly resource whose cycle
656
+ * is fully spent it still reports `CapacityRemain=500, CapacityUsed=0`, i.e.
657
+ * "nothing used, everything left", while the cycle reports
658
+ * `CycleCapacityUsed=500`. Read as a balance it OVER-reports by the whole
659
+ * monthly allowance of every account (measured on 8/8 CN accounts: pool and
660
+ * cycle agree only where the cycle is untouched).
661
+ *
662
+ * Independent confirmation comes from the international gateway: three global
663
+ * accounts report `CapacityRemain=100` while the gateway REFUSES their chat
664
+ * requests with `14018 Credits exhausted`, so the pool figure is not spendable
665
+ * credit there either.
666
+ *
667
+ * A gift (`CapacityType 1`) carries both families with identical values, so
668
+ * reading the cycle uniformly costs nothing and removes the branch that
669
+ * produced the defect.
658
670
  */
659
671
  remain: number;
672
+ /** The package's capacity, from the same family as {@link remain}. */
660
673
  size: number;
661
674
  /** CapacityType 4: refreshed every cycle and never expires. */
662
675
  monthly: boolean;
@@ -664,16 +677,6 @@ interface WorkBuddyCreditPackage {
664
677
  refreshAtMs?: number;
665
678
  /** One-off expiry; the package disappears from the account at this time. */
666
679
  expiresAtMs?: number;
667
- /**
668
- * Remaining credit in the CURRENT cycle; only on monthly packages.
669
- *
670
- * Kept beside {@link remain} because it answers the one question the pool
671
- * total cannot: whether THIS cycle's allowance is spent. That is what makes
672
- * `refreshAtMs` meaningful — "you are out until the cycle resets" is a
673
- * different statement from "you are out of credit", and only the cycle
674
- * figure can tell them apart.
675
- */
676
- cycleRemain?: number;
677
680
  }
678
681
  /** Aggregated credit answer for one credential. */
679
682
  interface WorkBuddyCredits {
@@ -795,6 +798,15 @@ declare function knownRegionOf(domain: string): WorkBuddyRegion | undefined;
795
798
  * `tool_choice` (the upstream's field is a string; object forms return 400),
796
799
  * and guarantee a leading system message.
797
800
  */
801
+ /**
802
+ * The model id a prepared body asks for, when it carries one (issue #61).
803
+ *
804
+ * Lives beside {@link prepareChatBody} because it reads the same shape: the
805
+ * serialized OpenAI body, after this plugin's rewrites. Never throws — a
806
+ * malformed body is the upstream's to reject, not a reason to lose the failure
807
+ * measurement that this id is needed for.
808
+ */
809
+ declare function modelIdOfBody(bodyJson: string): string | undefined;
798
810
  declare function prepareChatBody(source: string): string;
799
811
  /** Marker carried by {@link WorkBuddyCredentialRejectedError}; survives bundling. */
800
812
  declare const CREDENTIAL_REJECTED_CODE = "WORKBUDDY_CREDENTIAL_REJECTED";
@@ -1104,7 +1116,29 @@ interface WorkBuddyShimOptions {
1104
1116
  status: number;
1105
1117
  kind: UpstreamErrorKind;
1106
1118
  message: string;
1119
+ /**
1120
+ * The model that request asked for (issue #61).
1121
+ *
1122
+ * Carried because the failure is remembered against the ACCOUNT, and `6004`
1123
+ * is an account × model condition: without this the record cannot say which
1124
+ * model the measurement belongs to, so the card has to present a
1125
+ * single-model result as account-level availability.
1126
+ */
1127
+ modelId?: string;
1107
1128
  }) => void;
1129
+ /**
1130
+ * Called with the FINAL serialized body of every chat request, just before it
1131
+ * goes upstream (issue #59).
1132
+ *
1133
+ * It exists so the plugin can record what was actually sent without the shim
1134
+ * having to know where that record goes: the region belongs to whoever wires
1135
+ * this up, and the report is a plugin concern. The body handed over is the
1136
+ * post-`prepareChatBody` one, because THAT is what the upstream counts.
1137
+ *
1138
+ * Fired without awaiting: a request must never wait on a diagnostic. The
1139
+ * callee must treat the string as read-only.
1140
+ */
1141
+ onRequestBody?: (bodyJson: string) => void;
1108
1142
  }
1109
1143
  /**
1110
1144
  * Start the loopback endpoint. Requests must carry the shim's shared secret;
@@ -1941,6 +1975,49 @@ interface WorkBuddyPoolProbe {
1941
1975
  * old probe files stay readable rather than being discarded.
1942
1976
  */
1943
1977
  message?: string;
1978
+ /**
1979
+ * WHICH MODEL this measurement is about (issue #61).
1980
+ *
1981
+ * The pool's "test all accounts" action probes ONE model — the region's
1982
+ * `targetModelId` — while `6004` is an ACCOUNT × MODEL condition: the reporter
1983
+ * measured two accounts where `hy4-preview-f` answered and `step-5-preview`
1984
+ * returned `429 / 6004` at the same moment. A row rendered as plain "可用"
1985
+ * therefore claims more than the measurement says, and the pool's own routing
1986
+ * reads that `ok` as an account-level fact.
1987
+ *
1988
+ * Storing the model id is what makes the claim checkable: the card can say
1989
+ * WHICH model an `ok` came from, and a reader can see that a different model
1990
+ * was never tested at all. `probeModel()` has always returned this field; the
1991
+ * write simply dropped it.
1992
+ *
1993
+ * Deliberately NOT inherited by {@link mergePoolProbe} when an update omits it
1994
+ * — the opposite of `accountName` and `retryAtMs`. Those two describe the
1995
+ * ACCOUNT (a name that a later writer could not see is still true, and a
1996
+ * future refresh time is still in the future), whereas the model describes
1997
+ * THIS measurement. Carrying an older model id forward would relabel a fresh
1998
+ * measurement with a model it was not taken on, which is exactly the confusion
1999
+ * this field exists to end. ABSENT therefore means "unknown scope", never a
2000
+ * guess.
2001
+ */
2002
+ modelId?: string;
2003
+ /**
2004
+ * The account's display name AT THE MOMENT IT WAS MEASURED (issue #60).
2005
+ *
2006
+ * Stored because a saved pool member can outlive its sign-in. Once the
2007
+ * desktop app drops a login, that id resolves to no listed account, so the
2008
+ * card has nothing left to render for it — and the old warning ("1 saved
2009
+ * account is no longer signed in") was a count with no subject, leaving the
2010
+ * user unable to tell WHICH account had gone. The name was in hand at write
2011
+ * time (both writers already carry it) and nowhere afterwards, so the record
2012
+ * is the only place it can survive.
2013
+ *
2014
+ * ABSENT on records written before this field existed, and when the desktop
2015
+ * app recorded no name: the card then falls back to a short id prefix rather
2016
+ * than inventing a label. Snapshots are never refreshed from a LISTING — only
2017
+ * a real measurement writes this, so a stale name cannot be "confirmed" by a
2018
+ * routine scan that never saw the account.
2019
+ */
2020
+ accountName?: string;
1944
2021
  }
1945
2022
  /** One account's live credit situation, as the pool ranks it. */
1946
2023
  interface WorkBuddyPoolCredits {
@@ -2104,13 +2181,6 @@ interface WorkBuddyWebCreditPackage {
2104
2181
  size: number;
2105
2182
  /** CapacityType 4: refreshed every cycle and never expires. */
2106
2183
  monthly: boolean;
2107
- /**
2108
- * Balance of the CURRENT cycle (`CycleCapacityRemain`); only on monthly
2109
- * packages. `0` on a live package means this cycle's allowance is spent,
2110
- * which is what {@link cycleRefreshMs} is telling the user to wait for — and
2111
- * is deliberately NOT the same as {@link remain} being 0 (issue #48).
2112
- */
2113
- cycleRemain?: number;
2114
2184
  /** Next cycle start (the monthly refresh point) in ms; only on monthly packages. */
2115
2185
  cycleRefreshMs?: number;
2116
2186
  /** One-off expiry in ms; the package disappears from the account then. */
@@ -2469,7 +2539,13 @@ interface WorkBuddyWebPoolAccount {
2469
2539
  expiringSoon?: number;
2470
2540
  /** When the nearest package expires, in ms. */
2471
2541
  nearestExpiryMs?: number;
2472
- /** The last test of the target model, absent when never tested. */
2542
+ /**
2543
+ * The last test of this account's target model, absent when never tested.
2544
+ *
2545
+ * The model is recorded INSIDE the probe (issue #61) rather than assumed from
2546
+ * the row's current setting: the setting can be changed after the test, and a
2547
+ * result must keep naming what it actually measured.
2548
+ */
2473
2549
  probe?: {
2474
2550
  outcome: WorkBuddyWebProbeOutcome;
2475
2551
  atMs: number;
@@ -2481,6 +2557,16 @@ interface WorkBuddyWebPoolAccount {
2481
2557
  * guess which of the two it was.
2482
2558
  */
2483
2559
  source?: 'test-batch' | 'live-request';
2560
+ /**
2561
+ * WHICH model this measurement is about (issue #61).
2562
+ *
2563
+ * `6004` is an account × model condition, so an `ok` without a model reads as
2564
+ * account-level availability — which is exactly the false positive the
2565
+ * reporter hit: the card said 可用 for two accounts whose actual model
2566
+ * returned `429 / 6004`. ABSENT for records written before the field existed;
2567
+ * the card must then say the scope is unknown rather than assume it.
2568
+ */
2569
+ modelId?: string;
2484
2570
  /** Only when the upstream named a time; never invented locally. */
2485
2571
  retryAtMs?: number;
2486
2572
  /**
@@ -2513,6 +2599,17 @@ interface WorkBuddyWebPoolAccount {
2513
2599
  * result the user just watched succeed.
2514
2600
  */
2515
2601
  checkedInToday?: boolean;
2602
+ /**
2603
+ * The model a TEST of this row would use (issue #61).
2604
+ *
2605
+ * Per row, because a test model can be chosen per account: the card shows it
2606
+ * beside the row it applies to rather than implying one model for the table.
2607
+ */
2608
+ testModelId?: string;
2609
+ /** Where this row's test target came from (see {@link WorkBuddyWebPool.targetModelSource}). */
2610
+ testModelSource?: 'preferred' | 'free' | 'none' | 'stale';
2611
+ /** This row's saved override that the region no longer offers. */
2612
+ staleTestModelId?: string;
2516
2613
  }
2517
2614
  /**
2518
2615
  * The pool's state for one region.
@@ -2542,6 +2639,14 @@ interface WorkBuddyWebPool {
2542
2639
  * would run against a model the upstream does not offer.
2543
2640
  */
2544
2641
  staleTargetModelId?: string;
2642
+ /**
2643
+ * The SAVED per-account test models, keyed by account id (issue #61).
2644
+ *
2645
+ * Sent verbatim rather than as the effective set: the card edits this map, and
2646
+ * an id whose model has left the catalog must survive a save so the user's
2647
+ * record of what they chose is not silently destroyed.
2648
+ */
2649
+ targetModelIdByAccount?: Readonly<Record<string, string>>;
2545
2650
  /**
2546
2651
  * Where the target came from. `'stale'` means the SAVED id is no longer in
2547
2652
  * the catalog — a distinct state from `'none'` (no free model exists),
@@ -2567,6 +2672,17 @@ interface WorkBuddyWebPool {
2567
2672
  * ran on ZERO accounts and reported success.
2568
2673
  */
2569
2674
  effectiveMemberAccountIds?: readonly string[];
2675
+ /**
2676
+ * Last measured display name per saved member id (issue #60).
2677
+ *
2678
+ * Only ids the roster above does NOT list are useful here: those are the
2679
+ * members whose sign-in has gone, and whose name therefore survives nowhere
2680
+ * else. The card renders a name when there is one and a short id prefix when
2681
+ * there is not — the point is that the ghost warning stops being a
2682
+ * subjectless count ("1 saved account is no longer signed in") that the user
2683
+ * has no way to act on.
2684
+ */
2685
+ memberNames?: Readonly<Record<string, string>>;
2570
2686
  accounts: readonly WorkBuddyWebPoolAccount[];
2571
2687
  /**
2572
2688
  * The models a manual target can be chosen from.
@@ -2815,6 +2931,8 @@ interface WorkBuddyPoolDeps {
2815
2931
  preferences(region: WorkBuddyRegion): {
2816
2932
  enabled: boolean;
2817
2933
  targetModelId: string;
2934
+ /** Per-account override of `targetModelId` (issue #61). */
2935
+ targetModelIdByAccount?: Readonly<Record<string, string>>;
2818
2936
  /**
2819
2937
  * Tokens each test probe sends as saved; `0` when the user never chose.
2820
2938
  *
@@ -2837,6 +2955,16 @@ interface WorkBuddyPoolDeps {
2837
2955
  * checked) instead of passing the guard and running a batch over nothing.
2838
2956
  */
2839
2957
  effectiveMemberAccountIds?(region: WorkBuddyRegion): Promise<readonly string[]>;
2958
+ /**
2959
+ * Last display name measured for each of a region's saved member ids
2960
+ * (issue #60), from the runtime probe store — no upstream call.
2961
+ *
2962
+ * The card needs this for the one case it cannot answer from its own props: a
2963
+ * saved member whose sign-in is gone resolves to no listed account, so its
2964
+ * name exists ONLY in the measurement that once saw it. Optional: a Host
2965
+ * built without it still renders, with the id-prefix fallback.
2966
+ */
2967
+ memberNames?(region: WorkBuddyRegion): Promise<Readonly<Record<string, string>>>;
2840
2968
  /**
2841
2969
  * Test ONE account against the region's target model.
2842
2970
  *
@@ -2900,7 +3028,18 @@ interface WorkBuddyPoolDeps {
2900
3028
  * the route handles both, because a missing reporter must degrade to the
2901
3029
  * previous behaviour rather than to no rows at all.
2902
3030
  */
2903
- test?(region: WorkBuddyRegion, modelId: string, onRow?: (row: WorkBuddyPoolTestRow) => void): Promise<readonly WorkBuddyPoolTestRow[]>;
3031
+ test?(region: WorkBuddyRegion,
3032
+ /**
3033
+ * One model for the whole batch, or a per-account resolver (issue #61).
3034
+ *
3035
+ * The resolver form is what lets a batch honour a per-account test model; a
3036
+ * resolver that names no model yields an `unavailable` row for that account
3037
+ * rather than silently testing the region default.
3038
+ */
3039
+ modelId: string | ((accountId: string) => {
3040
+ modelId?: string;
3041
+ staleModelId?: string;
3042
+ }), onRow?: (row: WorkBuddyPoolTestRow) => void): Promise<readonly WorkBuddyPoolTestRow[]>;
2904
3043
  /** The region's live catalog, used to resolve the free target model. */
2905
3044
  catalog?(region: WorkBuddyRegion): readonly WorkBuddyModelInfo[];
2906
3045
  }
@@ -3010,6 +3149,18 @@ interface WorkBuddyPoolPreferences {
3010
3149
  enabled?: boolean;
3011
3150
  /** Model id to test; `''` means auto-pick a free model from this region. */
3012
3151
  targetModelId?: string;
3152
+ /**
3153
+ * Per-account override of {@link targetModelId}, keyed by account id (#61).
3154
+ *
3155
+ * `6004` is an ACCOUNT × MODEL condition, so "can this account serve" has no
3156
+ * single answer: the reporter measured two accounts where one model answered
3157
+ * and another returned `429 / 6004` in the same second. The region-wide target
3158
+ * stays the default — this map only says "for THIS account, test THAT model",
3159
+ * which is what makes the pool's verdict match the model the user is actually
3160
+ * chatting with. An id that is no longer in the catalog is reported as stale
3161
+ * rather than replaced, so no credits are spent on a model nobody chose.
3162
+ */
3163
+ targetModelIdByAccount?: Record<string, string>;
3013
3164
  /**
3014
3165
  * How much input a probe sends, in tokens — the pool's biggest single knob.
3015
3166
  *
@@ -3181,4 +3332,4 @@ declare function legacyAttributionRegion(value: Config, accountsFor: (region: Wo
3181
3332
  */
3182
3333
  declare function apply(ctx: Context, config: Config): void;
3183
3334
  //#endregion
3184
- export { CREDENTIAL_REJECTED_CODE, Config, DEFAULT_PROBE_INPUT_TOKENS, ENCRYPTED_CREDENTIAL_CODE, FALLBACK_WORKBUDDY_MODELS, FALLBACK_WORKBUDDY_MODELS_GLOBAL, NATIVE_MODALITY_BY_MODEL_ID, PROBE_INPUT_TOKEN_CHOICES, PROBE_MAX_TOKENS, PROBE_SYSTEM_PROMPT, REFUSES_OFF_MODEL_IDS, type UpstreamErrorKind, WORKBUDDY_ACCOUNTS_REFRESH_PATH, WORKBUDDY_APP_EXECUTABLE_ENV, WORKBUDDY_AUTH_FILENAME, WORKBUDDY_AUTH_FILE_ENV, WORKBUDDY_CHECKIN_PATH, WORKBUDDY_CONNECT_VERSION, WORKBUDDY_GLOBAL_PROVIDER, WORKBUDDY_HOST_HEARTBEAT_FILENAME, WORKBUDDY_MODELS_REFRESH_PATH, WORKBUDDY_PROBE_PATH, WORKBUDDY_PROVIDER, WORKBUDDY_PROVIDERS, WORKBUDDY_PROVIDER_DISPLAY_NAMES, WORKBUDDY_REGIONS, WORKBUDDY_REGION_PARAM, WORKBUDDY_SETTINGS_NS, WORKBUDDY_STREAM_IDLE_TIMEOUT_MS, WORKBUDDY_USAGE_PATH, type WorkBuddyAccountChoice, type WorkBuddyAdapter, type WorkBuddyAuthStatus, type WorkBuddyCandidateFailure, WorkBuddyCatalog, type WorkBuddyChatResult, type WorkBuddyCredential, type WorkBuddyCredentialRecovery, WorkBuddyCredentialRejectedError, WorkBuddyCredentialStore, type WorkBuddyCreditPackage, type WorkBuddyCredits, WorkBuddyEncryptedCredentialError, type WorkBuddyEncryptedField, type WorkBuddyHostHeartbeat, type WorkBuddyModelInfo, type WorkBuddyNativeModality, WorkBuddyPoolPreferences, type WorkBuddyProbeClient, type WorkBuddyProbeOutcome, type WorkBuddyProbeResult, type WorkBuddyProbeStore, type WorkBuddyReasoning, type WorkBuddyRecoveryCandidate, type WorkBuddyRefreshOutcome, WorkBuddyRegionState, type WorkBuddyShim, type WorkBuddyStatusRouteOptions, type WorkBuddyStoreOptions, WorkBuddyUpstreamClient, type WorkBuddyUpstreamModel, type WorkBuddyUsabilityProbeOptions, apply, asVolatile, authFileName, classifyUpstreamError, clearAtRestKeyCache, clearHostHeartbeat, cooldownOf, createAccountUsabilityProbe, createWorkBuddyAdapter, createWorkBuddyShim, creditOfStream, defaultDesktopAuthCandidates, defaultDesktopAuthDirs, defaultDesktopAuthPath, defaultOffModelIds, deriveAtRestKey, deriveAtRestKeyId, deriveCatalog, fallbackModelsFor, fetchAtRestKeyPayload, findWorkbuddyAppExecutable, hasEncryptedCredentialFields, imageDefaultFor, inject, isCredentialRejectedError, isEncryptedCredentialError, isEncryptedFieldWrapper, isHeartbeatProcessAlive, isWorkbuddyBundle, knownRegionOf, legacyAttributionRegion, legacyWorkbuddyOwnAuthPath, macosBundleExecutable, macosNestedAppBundles, name, nativeModalityOf, nextRegionEnabled, nextRegionSlots, offDefaultFor, openEncryptedField, outcomeOfFailure, parseCreditMultiplier, parseReasoning, parseRetryAfter, parseUpstreamModel, parseWorkBuddyAuth, prepareChatBody, probeModel, probeRequestBody, probeSucceeded, processStartTimeMs, readAtRestKey, readHostHeartbeat, regionCleared, regionEnabled, regionEnabledOf, regionOf, regionOfProvider, regionOfStatusUrl, regionStateOf, registerWorkBuddyStatusRoute, resolveCredentialRecovery, selectAccountFor, settingsNamespaceOf, toPersistedWorkBuddyModel, unwrapVolatileDeep, withEffectiveOff, withWorkBuddyRegion, workBuddyDisplayName, workBuddyModelInput, workBuddyThinkingLevelMap, workBuddyWebStatus, workbuddyAccountId, workbuddyAppExecutableCandidates, workbuddyHostHeartbeatPath, workbuddyOwnAuthPath, writeHostHeartbeat };
3335
+ export { CREDENTIAL_REJECTED_CODE, Config, DEFAULT_PROBE_INPUT_TOKENS, ENCRYPTED_CREDENTIAL_CODE, FALLBACK_WORKBUDDY_MODELS, FALLBACK_WORKBUDDY_MODELS_GLOBAL, NATIVE_MODALITY_BY_MODEL_ID, PROBE_INPUT_TOKEN_CHOICES, PROBE_MAX_TOKENS, PROBE_SYSTEM_PROMPT, REFUSES_OFF_MODEL_IDS, type UpstreamErrorKind, WORKBUDDY_ACCOUNTS_REFRESH_PATH, WORKBUDDY_APP_EXECUTABLE_ENV, WORKBUDDY_AUTH_FILENAME, WORKBUDDY_AUTH_FILE_ENV, WORKBUDDY_CHECKIN_PATH, WORKBUDDY_CONNECT_VERSION, WORKBUDDY_GLOBAL_PROVIDER, WORKBUDDY_HOST_HEARTBEAT_FILENAME, WORKBUDDY_MODELS_REFRESH_PATH, WORKBUDDY_PROBE_PATH, WORKBUDDY_PROVIDER, WORKBUDDY_PROVIDERS, WORKBUDDY_PROVIDER_DISPLAY_NAMES, WORKBUDDY_REGIONS, WORKBUDDY_REGION_PARAM, WORKBUDDY_SETTINGS_NS, WORKBUDDY_STREAM_IDLE_TIMEOUT_MS, WORKBUDDY_USAGE_PATH, type WorkBuddyAccountChoice, type WorkBuddyAdapter, type WorkBuddyAuthStatus, type WorkBuddyCandidateFailure, WorkBuddyCatalog, type WorkBuddyChatResult, type WorkBuddyCredential, type WorkBuddyCredentialRecovery, WorkBuddyCredentialRejectedError, WorkBuddyCredentialStore, type WorkBuddyCreditPackage, type WorkBuddyCredits, WorkBuddyEncryptedCredentialError, type WorkBuddyEncryptedField, type WorkBuddyHostHeartbeat, type WorkBuddyModelInfo, type WorkBuddyNativeModality, WorkBuddyPoolPreferences, type WorkBuddyProbeClient, type WorkBuddyProbeOutcome, type WorkBuddyProbeResult, type WorkBuddyProbeStore, type WorkBuddyReasoning, type WorkBuddyRecoveryCandidate, type WorkBuddyRefreshOutcome, WorkBuddyRegionState, type WorkBuddyShim, type WorkBuddyStatusRouteOptions, type WorkBuddyStoreOptions, WorkBuddyUpstreamClient, type WorkBuddyUpstreamModel, type WorkBuddyUsabilityProbeOptions, apply, asVolatile, authFileName, classifyUpstreamError, clearAtRestKeyCache, clearHostHeartbeat, cooldownOf, createAccountUsabilityProbe, createWorkBuddyAdapter, createWorkBuddyShim, creditOfStream, defaultDesktopAuthCandidates, defaultDesktopAuthDirs, defaultDesktopAuthPath, defaultOffModelIds, deriveAtRestKey, deriveAtRestKeyId, deriveCatalog, fallbackModelsFor, fetchAtRestKeyPayload, findWorkbuddyAppExecutable, hasEncryptedCredentialFields, imageDefaultFor, inject, isCredentialRejectedError, isEncryptedCredentialError, isEncryptedFieldWrapper, isHeartbeatProcessAlive, isWorkbuddyBundle, knownRegionOf, legacyAttributionRegion, legacyWorkbuddyOwnAuthPath, macosBundleExecutable, macosNestedAppBundles, modelIdOfBody, name, nativeModalityOf, nextRegionEnabled, nextRegionSlots, offDefaultFor, openEncryptedField, outcomeOfFailure, parseCreditMultiplier, parseReasoning, parseRetryAfter, parseUpstreamModel, parseWorkBuddyAuth, prepareChatBody, probeModel, probeRequestBody, probeSucceeded, processStartTimeMs, readAtRestKey, readHostHeartbeat, regionCleared, regionEnabled, regionEnabledOf, regionOf, regionOfProvider, regionOfStatusUrl, regionStateOf, registerWorkBuddyStatusRoute, resolveCredentialRecovery, selectAccountFor, settingsNamespaceOf, toPersistedWorkBuddyModel, unwrapVolatileDeep, withEffectiveOff, withWorkBuddyRegion, workBuddyDisplayName, workBuddyModelInput, workBuddyThinkingLevelMap, workBuddyWebStatus, workbuddyAccountId, workbuddyAppExecutableCandidates, workbuddyHostHeartbeatPath, workbuddyOwnAuthPath, writeHostHeartbeat };