dsh-connect-workbuddy 5.0.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -985,17 +985,30 @@ const NATIVE_MODALITY_BY_MODEL_ID = {
985
985
  /**
986
986
  * Ids the upstream lists in the model roster that are ROUTERS, not models.
987
987
  *
988
- * `auto` (CN) is the one observed today: the gateway resolves it to whichever
989
- * model it considers the best fit (measured: CN `auto` → `hy4-preview`), so its
990
- * price, context window and behaviour are decided at request time by something
991
- * else. Offering it as a row advertises a model whose terms the plugin cannot
992
- * state, and it duplicates a real row already in the same roster.
988
+ * Two of them are known, one per region, and they are the SAME concept under
989
+ * two ids:
990
+ *
991
+ * - `auto` (CN gateway) — the gateway resolves it to whichever model it
992
+ * considers the best fit (measured: CN `auto` → `hy4-preview`), and its own
993
+ * description says so outright: 「平衡效果与速度。自动为每个任务匹配最优模型,
994
+ * 积分倍率随之浮动」 ("picks the best model per task; the credit multiplier
995
+ * floats accordingly").
996
+ * - `default-model` (international gateway) — identical role (name "Auto",
997
+ * `isDefault: true`, the region's default pick), also the ONLY entry in that
998
+ * roster that declares no `credits` at all.
999
+ *
1000
+ * The evidence for treating both as routers is the shared, self-describing
1001
+ * shape, not the name: measured 2026-10-22 against both live gateways, these
1002
+ * two entries are the ONLY ones whose `credits` field is absent/empty (CN 19
1003
+ * of 20 priced, global 27 of 28), and the ones carrying `isDefault: true`.
1004
+ * A row the plugin cannot price is a row whose cost it cannot state, and the
1005
+ * router duplicates a real row already in the same roster.
993
1006
  *
994
1007
  * Kept as an explicit table rather than a heuristic: a router is an upstream
995
1008
  * concept with no declared flag, and guessing from the name would eventually
996
1009
  * hide a real model. Add an id here only after the same kind of evidence.
997
1010
  */
998
- const ROUTER_MODEL_IDS = /* @__PURE__ */ new Set(["auto"]);
1011
+ const ROUTER_MODEL_IDS = /* @__PURE__ */ new Set(["auto", "default-model"]);
999
1012
  /** Whether this id is an upstream router rather than a model. */
1000
1013
  function isRouterModelId(modelId) {
1001
1014
  return ROUTER_MODEL_IDS.has(modelId);
@@ -1984,6 +1997,59 @@ const MODEL_BUSY_CODE = "\"code\":14003";
1984
1997
  */
1985
1998
  const CHANNEL_REJECT_CODE = "\"code\":11128";
1986
1999
  /**
2000
+ * Business code for "the request exceeded the model's context window" (issue #101).
2001
+ *
2002
+ * The gateway answers `11115` in TWO shapes, and only one of them is
2003
+ * self-describing:
2004
+ *
2005
+ * A. `prompt is too long: 100001 tokens > 100000 maximum` — carries numbers;
2006
+ * B. the localized sentence only (「本次输入加上历史对话超过了模型上限…」), no numbers.
2007
+ *
2008
+ * Shape B is the one that hurt. The HOST decides whether to run its
2009
+ * context-overflow rescue by matching the error text against a list of ENGLISH
2010
+ * patterns (`prompt (?:is )?too long`, `exceeds the context window`,
2011
+ * `context[_ ]length[_ ]exceeded`, …25 of them), and a Chinese sentence matches
2012
+ * none of them. So on shape B the host neither compacts nor retries: the user
2013
+ * gets a bare 400 whose own advice ("请精简内容") the host cannot act on.
2014
+ *
2015
+ * {@link contextOverflowMarker} is the fix: the plugin adds an English clause
2016
+ * the host recognises, and keeps the upstream's own sentence beside it.
2017
+ */
2018
+ /**
2019
+ * The business code, in either of the two spellings the plugin ever holds.
2020
+ *
2021
+ * Two forms are in circulation and BOTH reach this predicate:
2022
+ * - the raw upstream body: `{"code":11115,...}`;
2023
+ * - the reply this plugin already composed, which renders it as
2024
+ * `(code 11115,requestId …)` — the form the retry path re-reads.
2025
+ *
2026
+ * The trailing `(?!\d)` matters: `111150` and `1111` both contain the digits
2027
+ * after a naive substring test, and misreading a DIFFERENT refusal as an
2028
+ * overflow would send the host into a compaction pass that cannot help.
2029
+ */
2030
+ const CONTEXT_TOO_LONG_CODE = /"code"\s*:\s*11115(?!\d)|code\s+11115(?!\d)/u;
2031
+ /**
2032
+ * Whether this body is the context-length refusal, in EITHER of its shapes.
2033
+ *
2034
+ * Shape B carries no number and no English phrase, so the business code is the
2035
+ * only reliable handle — the same reasoning as {@link isChannelRejectBody}'s
2036
+ * code-plus-wording pair, except that here the wording is what VARIES.
2037
+ */
2038
+ function isContextTooLongBody(body) {
2039
+ return CONTEXT_TOO_LONG_CODE.test(body);
2040
+ }
2041
+ /**
2042
+ * An English clause the HOST's overflow detector recognises, for issue #101.
2043
+ *
2044
+ * `prompt is too long` is the first entry of the host's pattern list and the
2045
+ * phrasing Anthropic-compatible gateways already use, so it is the cheapest way
2046
+ * to say "this is an overflow" to a detector that only reads English. The
2047
+ * numbers are omitted deliberately: the upstream never gave them in shape B, and
2048
+ * inventing them would be the exact confident-wrong-diagnosis this plugin spends
2049
+ * its comments avoiding.
2050
+ */
2051
+ const CONTEXT_OVERFLOW_MARKER = "prompt is too long (upstream code 11115)";
2052
+ /**
1987
2053
  * Wording that identifies the CHANNEL half of `11128` (the other halves being
1988
2054
  * `conversation id missing` and `first message is not system prompt`).
1989
2055
  *
@@ -3233,7 +3299,7 @@ function selectCliModels(rawModels, agents, keepIds = []) {
3233
3299
  }
3234
3300
  const ids = cliIds !== void 0 && cliIds.length > 0 ? cliIds : [...byId.keys()];
3235
3301
  const models = ids.filter((id) => !isRouterModelId(id)).map((id) => byId.get(id)).filter((model) => model !== void 0);
3236
- const kept = keepIds.filter((id) => !ids.includes(id)).map((id) => byId.get(id)).filter((model) => model !== void 0);
3302
+ const kept = keepIds.filter((id) => !ids.includes(id) && !isRouterModelId(id)).map((id) => byId.get(id)).filter((model) => model !== void 0);
3237
3303
  const resolved = [...models, ...kept];
3238
3304
  if (resolved.length === 0) throw new Error("workbuddy model catalog resolved to an empty list");
3239
3305
  return resolved;
@@ -5229,6 +5295,22 @@ var WorkBuddyCredentialStore = class {
5229
5295
  //#endregion
5230
5296
  //#region src/catalog.ts
5231
5297
  /**
5298
+ * WorkBuddy model catalog: a static fallback list, replaced by the upstream's
5299
+ * dynamic catalog once it loads, and filtered by the user's explicit selection.
5300
+ *
5301
+ * 参考:dingminhua/dsh-connect-trae(MIT,Copyright (c) 2026 LaoDing)
5302
+ * — 「上次刷新的完整目录(lastCatalog)与用户勾选分离,运行时目录由两者
5303
+ * 推导」的模型来自该项目。它让卡片永远展示最新目录而不是陈旧快照,
5304
+ * 并让上游刷新成为草稿操作(用户点保存才生效)。
5305
+ * 静态 fallback 目录的做法来自
5306
+ * corrinehu/dsh-workbuddy-connect(MIT):上游不可用时 provider 不为空。
5307
+ * 改动:WorkBuddy 直接用各模型的 `maxInputTokens` 声明实际上下文窗口;
5308
+ * 上游没有独立的长上下文开关或第二个模型 id,因此不会虚构 `@1m` 变体。
5309
+ * 本目录额外承载上游给出的积分倍率、多模态与推理档位。
5310
+ *
5311
+ * @module dsh-connect-workbuddy/catalog
5312
+ */
5313
+ /**
5232
5314
  * Static CLI models captured from the CN endpoint (2026-08-30). The upstream
5233
5315
  * refresh replaces this list at startup; it exists so the provider registers
5234
5316
  * with a usable catalog even while the first fetch is in flight or offline.
@@ -5316,13 +5398,6 @@ const FALLBACK_WORKBUDDY_MODELS = [
5316
5398
  * usable before the first fetch lands. Order and rates mirror the upstream.
5317
5399
  */
5318
5400
  const FALLBACK_WORKBUDDY_MODELS_GLOBAL = [
5319
- {
5320
- id: "default-model",
5321
- name: "Auto",
5322
- contextWindow: 176e3,
5323
- maxTokens: 24e3,
5324
- creditMultiplier: .79
5325
- },
5326
5401
  {
5327
5402
  id: "fast-model",
5328
5403
  name: "Fast",
@@ -5466,6 +5541,21 @@ function fallbackModelsFor(region) {
5466
5541
  return region === "global" ? FALLBACK_WORKBUDDY_MODELS_GLOBAL : FALLBACK_WORKBUDDY_MODELS;
5467
5542
  }
5468
5543
  /**
5544
+ * Drop the upstream's ROUTER rows from a roster that came from settings.
5545
+ *
5546
+ * The static lists and `selectCliModels` both refuse routers already, but
5547
+ * `lastCatalog` is a SNAPSHOT the user's profile carries from an earlier
5548
+ * version — and every read of it (the card's list, the runtime catalog, the
5549
+ * provider's advertisement) would otherwise keep showing the row long after the
5550
+ * code stopped offering it. Filtering at the READ point instead of migrating the
5551
+ * saved value is deliberate: the stored slot stays exactly what the last refresh
5552
+ * wrote, so nothing is silently rewritten on load, and the row disappears the
5553
+ * moment the new code runs rather than at the next refresh.
5554
+ */
5555
+ function withoutRouters(models) {
5556
+ return models.filter((model) => !isRouterModelId(model.id));
5557
+ }
5558
+ /**
5469
5559
  * Apply the saved local DSH budget. A budget is an UPPER LIMIT the user sets,
5470
5560
  * never a default: a model without an explicit budget keeps its own window, and
5471
5561
  * a budget can only ever LOWER a window (`Math.min`), so a value above the
@@ -5762,7 +5852,7 @@ function generationOf(version) {
5762
5852
  //#endregion
5763
5853
  //#region src/version.ts
5764
5854
  /** The npm package version this build was produced from. */
5765
- const WORKBUDDY_CONNECT_VERSION = "5.0.0";
5855
+ const WORKBUDDY_CONNECT_VERSION = "5.2.1";
5766
5856
  //#endregion
5767
5857
  //#region src/host-heartbeat.ts
5768
5858
  /**
@@ -5920,4 +6010,4 @@ async function clearHostHeartbeat() {
5920
6010
  await rm(workbuddyHostHeartbeatPath(), { force: true });
5921
6011
  }
5922
6012
  //#endregion
5923
- export { REFUSES_OFF_MODEL_IDS as $, workbuddyAccountId as A, withFileLock as At, isCredentialRejectedError as B, defaultDesktopAuthDirs as C, macosBundleExecutable as Ct, isVaultAccountId as D, workbuddyAppExecutableCandidates as Dt, isEncryptedCredentialError as E, readAtRestKey as Et, WorkBuddyUpstreamClient as F, parseCreditMultiplier as G, knownRegionOf as H, classifyUpstreamError as I, perturbChannelFingerprints as J, parseReasoning as K, declaredTools as L, CREDENTIAL_REJECTED_CODE as M, WORKBUDDY_FALLBACK_SYSTEM_PROMPT as N, legacyWorkbuddyOwnAuthPath as O, hostPeersInfo as Ot, WorkBuddyCredentialRejectedError as P, busyDisplaySuffix as Q, forceNeutralHead as R, defaultDesktopAuthCandidates as S, isWorkbuddyBundle as St, hasEncryptedCredentialFields as T, openEncryptedField as Tt, modelIdOfBody as U, isFirstMessageGateBody as V, openingEvidenceOfBody as W, regionOf as X, prepareChatBody as Y, attachBusyLevels as Z, WORKBUDDY_AUTH_FILENAME as _, deriveAtRestKeyId as _t, readHostHeartbeat as a, withEffectiveOff as at, WorkBuddyEncryptedCredentialError as b, findWorkbuddyAppExecutableWithSource as bt, WORKBUDDY_CONNECT_VERSION as c, pickImageModel as ct, FALLBACK_WORKBUDDY_MODELS_GLOBAL as d, NATIVE_MODALITY_BY_MODEL_ID as dt, defaultOffModelIds as et, WorkBuddyCatalog as f, imageDefaultFor as ft, ENCRYPTED_CREDENTIAL_CODE as g, deriveAtRestKey as gt, fallbackModelsFor as h, clearAtRestKeyCache as ht, processStartTimeMs as i, recordRefusal as it, workbuddyOwnAuthPath as j, writeFileAtomic as jt, parseWorkBuddyAuth as k, resolveDshHome as kt, piAiRuntimeInfo as l, parseQueueAnswer as lt, deriveCatalog as m, WORKBUDDY_APP_EXECUTABLE_ENV as mt, clearHostHeartbeat as n, offDefaultFor as nt, workbuddyHostHeartbeatPath as o, DEFAULT_IMAGE_SIZE as ot, applyContextBudgets as p, nativeModalityOf as pt, parseUpstreamModel as q, isHeartbeatProcessAlive as r, offRefused as rt, writeHostHeartbeat as s, WorkBuddyImageError as st, WORKBUDDY_HOST_HEARTBEAT_FILENAME as t, lastRefusalFor as tt, FALLBACK_WORKBUDDY_MODELS as u, queueNoticeText as ut, WORKBUDDY_AUTH_FILE_ENV as v, fetchAtRestKeyPayload as vt, defaultDesktopAuthPath as w, macosNestedAppBundles as wt, authFileName as x, isEncryptedFieldWrapper as xt, WorkBuddyCredentialStore as y, findWorkbuddyAppExecutable as yt, isConversationIdGateBody as z };
6013
+ export { regionOf as $, parseWorkBuddyAuth as A, workbuddyAppExecutableCandidates as At, forceNeutralHead as B, defaultDesktopAuthCandidates as C, findWorkbuddyAppExecutableWithSource as Ct, isEncryptedCredentialError as D, macosNestedAppBundles as Dt, hasEncryptedCredentialFields as E, macosBundleExecutable as Et, WORKBUDDY_FALLBACK_SYSTEM_PROMPT as F, knownRegionOf as G, isConversationIdGateBody as H, WorkBuddyCredentialRejectedError as I, parseCreditMultiplier as J, modelIdOfBody as K, WorkBuddyUpstreamClient as L, workbuddyOwnAuthPath as M, resolveDshHome as Mt, CONTEXT_OVERFLOW_MARKER as N, withFileLock as Nt, isVaultAccountId as O, openEncryptedField as Ot, CREDENTIAL_REJECTED_CODE as P, writeFileAtomic as Pt, prepareChatBody as Q, classifyUpstreamError as R, authFileName as S, findWorkbuddyAppExecutable as St, defaultDesktopAuthPath as T, isWorkbuddyBundle as Tt, isCredentialRejectedError as U, isContextTooLongBody as V, isFirstMessageGateBody as W, parseUpstreamModel as X, parseReasoning as Y, perturbChannelFingerprints as Z, ENCRYPTED_CREDENTIAL_CODE as _, WORKBUDDY_APP_EXECUTABLE_ENV as _t, readHostHeartbeat as a, offDefaultFor as at, WorkBuddyCredentialStore as b, deriveAtRestKeyId as bt, WORKBUDDY_CONNECT_VERSION as c, withEffectiveOff as ct, FALLBACK_WORKBUDDY_MODELS_GLOBAL as d, pickImageModel as dt, attachBusyLevels as et, WorkBuddyCatalog as f, parseQueueAnswer as ft, withoutRouters as g, nativeModalityOf as gt, fallbackModelsFor as h, imageDefaultFor as ht, processStartTimeMs as i, lastRefusalFor as it, workbuddyAccountId as j, hostPeersInfo as jt, legacyWorkbuddyOwnAuthPath as k, readAtRestKey as kt, piAiRuntimeInfo as l, DEFAULT_IMAGE_SIZE as lt, deriveCatalog as m, NATIVE_MODALITY_BY_MODEL_ID as mt, clearHostHeartbeat as n, REFUSES_OFF_MODEL_IDS as nt, workbuddyHostHeartbeatPath as o, offRefused as ot, applyContextBudgets as p, queueNoticeText as pt, openingEvidenceOfBody as q, isHeartbeatProcessAlive as r, defaultOffModelIds as rt, writeHostHeartbeat as s, recordRefusal as st, WORKBUDDY_HOST_HEARTBEAT_FILENAME as t, busyDisplaySuffix as tt, FALLBACK_WORKBUDDY_MODELS as u, WorkBuddyImageError as ut, WORKBUDDY_AUTH_FILENAME as v, clearAtRestKeyCache as vt, defaultDesktopAuthDirs as w, isEncryptedFieldWrapper as wt, WorkBuddyEncryptedCredentialError as x, fetchAtRestKeyPayload as xt, WORKBUDDY_AUTH_FILE_ENV as y, deriveAtRestKey as yt, declaredTools as z };
package/lib/index.d.ts CHANGED
@@ -2770,6 +2770,17 @@ declare const WORKBUDDY_CHECKIN_PATH = "/plugins/dsh-connect-workbuddy/checkin";
2770
2770
  * browser half.
2771
2771
  */
2772
2772
  declare const WORKBUDDY_PROBE_PATH = "/plugins/dsh-connect-workbuddy/probe";
2773
+ /**
2774
+ * Plugin-owned OUTPUT-SPEED measurement endpoint (issue #92).
2775
+ *
2776
+ * Separate from {@link WORKBUDDY_PROBE_PATH} because the two ask opposite
2777
+ * questions and cost different amounts: the availability probe sends 25,000
2778
+ * input tokens and caps output at one (measured `credit 0.72`), while this one
2779
+ * sends ~35 input tokens and caps output at 256 (measured `credit 0.01`–`0.15`).
2780
+ * Sharing the route would mean sharing its one-model-per-request cap and its
2781
+ * cost wording, and the two would then be wrong for each other.
2782
+ */
2783
+ declare const WORKBUDDY_TPS_PATH = "/plugins/dsh-connect-workbuddy/tps";
2773
2784
  /**
2774
2785
  * One entry of the transfer PREVIEW: display fields only, never token
2775
2786
  * material. `hasToken` is the import decision input — the import step skips
@@ -3265,6 +3276,33 @@ interface WorkBuddyWebProbeResult {
3265
3276
  /** Which of those four sources supplied {@link retryAtMs}. */
3266
3277
  retrySource?: 'retry-after' | 'upstream-message' | 'quota-refresh' | 'upstream-tips';
3267
3278
  }
3279
+ /**
3280
+ * One model's output-speed result, as the card renders it (issue #92).
3281
+ *
3282
+ * Deliberately its own type rather than extra fields on
3283
+ * {@link WorkBuddyWebProbeResult}: the two runs answer different questions, and
3284
+ * a shared type would let a card render an availability verdict with a speed on
3285
+ * it, or vice versa, with nothing to stop it.
3286
+ */
3287
+ interface WorkBuddyWebTpsResult {
3288
+ modelId: string;
3289
+ /** `ok` when at least one run answered; the speed fields say what was learned. */
3290
+ outcome: 'ok' | 'unavailable' | 'credential-rejected' | 'failed';
3291
+ /** Median output tokens/second over the usable runs. */
3292
+ tokensPerSecond?: number;
3293
+ /** Median time to first content chunk, in ms. */
3294
+ timeToFirstTokenMs?: number;
3295
+ /** Output tokens the upstream counted for the fastest usable run. */
3296
+ outputTokens?: number;
3297
+ /** How many runs contributed; below the planned count when runs were lost. */
3298
+ samples: number;
3299
+ /** Why {@link tokensPerSecond} is absent, when it is. */
3300
+ reason?: 'few-chunks' | 'no-usage' | 'all-failed';
3301
+ /** Total credit the runs reported, rounded to 2dp. */
3302
+ credit?: number;
3303
+ /** Upstream's own words when the run failed outright. */
3304
+ message?: string;
3305
+ }
3268
3306
  /** Why one account is currently out of the pool. */
3269
3307
  type WorkBuddyWebPoolExclusion = 'unusable' | 'rate-limited' |
3270
3308
  /**
@@ -3605,6 +3643,21 @@ interface WorkBuddyStatusRouteOptions {
3605
3643
  probeModels?(region: WorkBuddyRegion, modelIds: readonly string[], options?: {
3606
3644
  signal?: AbortSignal;
3607
3645
  }): Promise<readonly WorkBuddyWebProbeResult[]>;
3646
+ /**
3647
+ * Measure OUTPUT SPEED for each named model of a region (issue #92).
3648
+ *
3649
+ * Separate from {@link probeModels} because it answers the opposite question
3650
+ * with the opposite request shape: tiny input, long output. The availability
3651
+ * probe's `max_tokens: 1` means its `elapsedMs` is time-to-first-token and
3652
+ * carries no rate information at all.
3653
+ *
3654
+ * Costs a fraction of a probe per model (measured `credit 0.01`–`0.15` against
3655
+ * `0.72`), because this gateway prices by INPUT. It still spends real credit,
3656
+ * so it stays one model per click like every other spending route.
3657
+ */
3658
+ measureTps?(region: WorkBuddyRegion, modelIds: readonly string[], options?: {
3659
+ signal?: AbortSignal;
3660
+ }): Promise<readonly WorkBuddyWebTpsResult[]>;
3608
3661
  /**
3609
3662
  * The region's next monthly quota refresh, when the upstream declares one.
3610
3663
  *
@@ -4263,4 +4316,4 @@ declare function legacyAttributionRegion(value: Config, accountsFor: (region: Wo
4263
4316
  */
4264
4317
  declare function apply(ctx: Context, config: Config): void;
4265
4318
  //#endregion
4266
- 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 };
4319
+ 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_TPS_PATH, 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 };