@xiaoso/dsh-tool-plus 0.1.16 → 0.1.17-beta.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.
Files changed (109) hide show
  1. package/lib/{abort-DZ54CaKU.mjs → abort-BTblp0Rt.mjs} +2 -2
  2. package/lib/{alibaba-coding-plan-DODpkcqi.mjs → alibaba-coding-plan-t3R4YKCB.mjs} +3 -3
  3. package/lib/{alibaba-token-plan-C6lpKCda.mjs → alibaba-token-plan-CO4djG1y.mjs} +4 -4
  4. package/lib/{alibaba-token-plan-CHGyWOfX.mjs → alibaba-token-plan-CUjYJX0-.mjs} +1 -1
  5. package/lib/{anthropic-Dv_GGX6g.mjs → anthropic-nf7w6so1.mjs} +48 -21
  6. package/lib/{api-key-validation-MnMf_ihX.mjs → api-key-validation-C_tZ7Y9a.mjs} +2 -2
  7. package/lib/behavior-BwvTUtag.mjs +111 -0
  8. package/lib/{browser-render-BZXt548F.mjs → browser-render-BQaEVK_n.mjs} +4 -4
  9. package/lib/{reference-CtvM4zLU.mjs → bundled-references-CrQ4dQcT.mjs} +57 -4
  10. package/lib/cascade-BWjRTD1q.mjs +30265 -0
  11. package/lib/{cline-pass-BT9CBEOj.mjs → cline-pass-Bjm-O8GG.mjs} +2 -2
  12. package/lib/cloudflare-CKXRJ0l9.mjs +37 -0
  13. package/lib/{cloudflare-ai-gateway-DReN6ohJ.mjs → cloudflare-ai-gateway-BpnBSjwV.mjs} +8 -4
  14. package/lib/cloudflare-workers-ai-odj9XswL.mjs +32 -0
  15. package/lib/collapse-_nkb2dn7.mjs +1945 -0
  16. package/lib/{coreweave-C82HrLpb.mjs → coreweave-CGDZOD8-.mjs} +1 -1
  17. package/lib/{coreweave-C68UgRQO.mjs → coreweave-DwffcgW5.mjs} +4 -4
  18. package/lib/cursor-BgOuV7Qf.mjs +794 -0
  19. package/lib/{cursor-_gHHq-Dq.mjs → cursor-CF1iHHbv.mjs} +68 -19
  20. package/lib/{cursor-proto-Cr_WEMuv.mjs → cursor-proto-BuNTjX3L.mjs} +823 -23
  21. package/lib/{devin-QpfTSl9H.mjs → devin-7OEeEb80.mjs} +112 -31
  22. package/lib/{devin-proto-DYhp4Ty6.mjs → devin-proto-C-QreeAv.mjs} +71 -5
  23. package/lib/{dom-DG3sPESc.mjs → dom-BmbZv4v9.mjs} +598 -182
  24. package/lib/{error-O63pC8zg.mjs → error-8LVo7tug.mjs} +725 -104
  25. package/lib/factory-droid-ChhmsGWb.mjs +71 -0
  26. package/lib/{fs-promises-shim-B2YFWkcd.mjs → fs-promises-shim-CANAxFWh.mjs} +10 -1
  27. package/lib/{github-copilot-BMEcw8N1.mjs → github-copilot-QwevdT30.mjs} +4 -4
  28. package/lib/{github-copilot-headers-DnjGEbko.mjs → github-copilot-headers-CAUZ0rUD.mjs} +138 -26
  29. package/lib/{gitlab-duo-DnHqJjFY.mjs → gitlab-duo-DigV7k_o.mjs} +2 -2
  30. package/lib/{google-antigravity-B1mSckrK.mjs → google-antigravity-D-oe0r8A.mjs} +6 -7
  31. package/lib/{google-gemini-cli-DJwThCCn.mjs → google-gemini-cli-CQBHgGJT.mjs} +5 -6
  32. package/lib/{google-oauth-shared-BctLpVUN.mjs → google-oauth-shared-CvgVIUwJ.mjs} +2 -2
  33. package/lib/google-validation-CdvRj4ec.mjs +126 -0
  34. package/lib/id-EJwVLDHE.mjs +2548 -0
  35. package/lib/index.mjs +248 -258
  36. package/lib/{kilo-BEgEwMJQ.mjs → kilo-5r6OffCa.mjs} +2 -2
  37. package/lib/{kimi-T9NldEIJ.mjs → kimi-DOOtbXmm.mjs} +9 -10
  38. package/lib/{launch-BIWNyrBB.mjs → launch-DkAjib7h.mjs} +1 -1
  39. package/lib/{markit-Dvp2JPdT.mjs → markit-CCcyeAds.mjs} +359 -140
  40. package/lib/{models-DnXMYGcJ.mjs → models-DCpDT_im.mjs} +199203 -112275
  41. package/lib/{muse-code-CNvqqAp6.mjs → muse-code-CYf8zj_B.mjs} +5 -5
  42. package/lib/{openai-codex-D5-CyTxa.mjs → openai-codex-Cj-TvSFh.mjs} +13 -10
  43. package/lib/{perplexity-A2PEoGaC.mjs → perplexity-Dh_Qgsmx.mjs} +68 -25
  44. package/lib/{pkce-BYjmugmw.mjs → pkce-DO-jBJLV.mjs} +1 -1
  45. package/lib/pricing-DusBEhwm.mjs +593 -0
  46. package/lib/{readability-uGhqb4GC.mjs → readability-XHK0o3bv.mjs} +287 -27
  47. package/lib/{scrapers-C1ujjV8k.mjs → scrapers-B6PADOVm.mjs} +13 -13
  48. package/lib/slugify-ynYWBIA5.mjs +11 -0
  49. package/lib/snowflake-B_jap6lz.mjs +666 -0
  50. package/lib/snowflake-Cu1ZyOp6.mjs +151 -0
  51. package/lib/{src-AELUUb5U.mjs → src-BhinCSpi.mjs} +1172 -458
  52. package/lib/{stream-AVOoe5Hj.mjs → stream-D2ivg3GH.mjs} +3740 -5311
  53. package/lib/{turndown-D6fof1OX.mjs → turndown-Vya8SavL.mjs} +82 -30
  54. package/lib/types/tools/hashline/native/index.d.ts +2 -2
  55. package/lib/types/tools/hashline/native/policy.d.ts +19 -21
  56. package/lib/types/tools/omp/session/agent-storage.d.ts +3 -3
  57. package/lib/types/tools/shared/bun-named-shim.d.ts +5 -0
  58. package/lib/{types-BLrLohwK.mjs → types-tH1v9uRm.mjs} +2 -2
  59. package/lib/{utils-cZX3f_Ls.mjs → utils-C_Ncya1r.mjs} +1737 -509
  60. package/lib/utils-D2tK38xq.mjs +34006 -0
  61. package/lib/{utils-I4I8azHN.mjs → utils-DrDwmNtu.mjs} +8 -3
  62. package/lib/{xai-oauth-CbeldUSV.mjs → xai-oauth-DLLzX6my.mjs} +4 -4
  63. package/lib/{xiaomi-Dl3VSs04.mjs → xiaomi-CqK-KivK.mjs} +2 -2
  64. package/lib/{zai-FyjGSypr.mjs → zai-DoJ2xPIH.mjs} +2 -2
  65. package/lib/{zip-DRrycScC.mjs → zip-DG1mUV6X.mjs} +1 -1
  66. package/package.json +8 -8
  67. package/lib/amazon-bedrock-Dx0rr9dY.mjs +0 -996
  68. package/lib/anthropic-ClCw0PV_.mjs +0 -3624
  69. package/lib/anthropic-wire-lbGAFzYb.mjs +0 -927
  70. package/lib/azure-openai-responses-WE_bgFWp.mjs +0 -285
  71. package/lib/bundled-references-DY3EJxZV.mjs +0 -56
  72. package/lib/cloudflare-ai-gateway-CrMa97Ap.mjs +0 -44
  73. package/lib/collapse-CkMNRNr7.mjs +0 -2304
  74. package/lib/cursor-C6jaIJDg.mjs +0 -283
  75. package/lib/cursor-D-XZYDf_.mjs +0 -4544
  76. package/lib/deterministic-id-CUEIMSqR.mjs +0 -17
  77. package/lib/devin-ExGIghmx.mjs +0 -69
  78. package/lib/devin-u0ljw5P6.mjs +0 -628
  79. package/lib/effort-BdtQMN-_.mjs +0 -23
  80. package/lib/event-stream-BKEtb45Y.mjs +0 -167
  81. package/lib/gemini-headers-Co9cVvex.mjs +0 -54
  82. package/lib/google-auth-qAN-6DMW.mjs +0 -232
  83. package/lib/google-gemini-cli-B2Aw1S5w.mjs +0 -844
  84. package/lib/google-lTxuq28n.mjs +0 -38
  85. package/lib/google-shared-Y01j9xOr.mjs +0 -856
  86. package/lib/google-validation-BEkNs-Bx.mjs +0 -18
  87. package/lib/google-vertex-DcM-FRC5.mjs +0 -99
  88. package/lib/hosts-00rjRzUD.mjs +0 -203
  89. package/lib/id-AL5obQzR.mjs +0 -71
  90. package/lib/idle-iterator-D0ZXEcUq.mjs +0 -366
  91. package/lib/ollama-6R0oXZks.mjs +0 -574
  92. package/lib/openai-codex-responses-C8bnBWOe.mjs +0 -3232
  93. package/lib/openai-completions-DNr3mUsn.mjs +0 -1430
  94. package/lib/openai-configuration-update-xMYUjaK_.mjs +0 -150
  95. package/lib/openai-reasoning-fallback-Ju-5pSR8.mjs +0 -380
  96. package/lib/openai-responses-CjpafAEr.mjs +0 -861
  97. package/lib/protobuf-BMgDYu_U.mjs +0 -717
  98. package/lib/provider-response-SqKSkkUc.mjs +0 -22
  99. package/lib/proxy-DxvCQOCA.mjs +0 -230
  100. package/lib/request-debug-BwPOqN_j.mjs +0 -183
  101. package/lib/sanitize-text-BCf5KmCf.mjs +0 -33
  102. package/lib/sse-debug-B-tkLCPW.mjs +0 -11
  103. package/lib/stream-markup-healing-CN3RsqG9.mjs +0 -267
  104. package/lib/strict-tool-validation-CBTz1dAA.mjs +0 -105
  105. package/lib/taxonomy-DSIM99rS.mjs +0 -15392
  106. package/lib/thinking-ngMwf_1Y.mjs +0 -336
  107. package/lib/type-guards-CttAANEx.mjs +0 -11
  108. package/lib/utils-CE3DSebh.mjs +0 -11763
  109. package/lib/vision-guard-BCpXWUj3.mjs +0 -77
@@ -1,13 +1,12 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { C as warn } from "./src-AELUUb5U.mjs";
4
- import { n as discoveryFetch } from "./utils-I4I8azHN.mjs";
5
- import { n as THINKING_EFFORTS } from "./effort-BdtQMN-_.mjs";
6
- import { t as collapseVariants } from "./collapse-CkMNRNr7.mjs";
7
- import { r as devinDiscoveryMetadata } from "./devin-ExGIghmx.mjs";
8
- import { o as toBinary, t as create } from "./protobuf-BMgDYu_U.mjs";
9
- import { d as GetCliModelConfigsRequestSchema, f as GetCliModelConfigsResponseSchema, t as decodeDevinUnaryMessage, v as MetadataSchema } from "./devin-proto-DYhp4Ty6.mjs";
10
- //#region node_modules/.pnpm/@oh-my-pi+pi-catalog@18.1.17/node_modules/@oh-my-pi/pi-catalog/src/discovery/devin.ts
3
+ import { k as warn } from "./src-BhinCSpi.mjs";
4
+ import { t as slugify } from "./slugify-ynYWBIA5.mjs";
5
+ import { L as THINKING_EFFORTS } from "./id-EJwVLDHE.mjs";
6
+ import { n as discoveryFetch } from "./utils-DrDwmNtu.mjs";
7
+ import { i as create, l as toBinary, t as collapseVariants } from "./collapse-_nkb2dn7.mjs";
8
+ import { h as GetCliModelConfigsResponseSchema, i as devinDiscoveryMetadata, m as GetCliModelConfigsRequestSchema, t as decodeDevinUnaryMessage, x as MetadataSchema } from "./devin-proto-C-QreeAv.mjs";
9
+ //#region node_modules/.pnpm/@oh-my-pi+pi-catalog@18.12.6/node_modules/@oh-my-pi/pi-catalog/src/discovery/devin.ts
11
10
  const DEVIN_GET_CLI_MODEL_CONFIGS_PATH = "/exa.api_server_pb.ApiServerService/GetCliModelConfigs";
12
11
  const DEFAULT_CONTEXT_WINDOW = 2e5;
13
12
  const DEFAULT_MAX_TOKENS = 64e3;
@@ -53,6 +52,8 @@ function supportsDevinThinking(config) {
53
52
  const DEVIN_COST_LABEL_INPUT = "input";
54
53
  const DEVIN_COST_LABEL_CACHE_READ = "cached input";
55
54
  const DEVIN_COST_LABEL_OUTPUT = "output";
55
+ /** Normalized label of the marker dimension separating composite rate cards. */
56
+ const DEVIN_SIDEKICK_LABEL = "sidekick";
56
57
  /** Leading token count of a cost denominator ("1M tokens", "1K tokens"). */
57
58
  const DEVIN_COST_DENOMINATOR_PATTERN = /(\d+(?:\.\d+)?)\s*([kmb])?/i;
58
59
  const DEVIN_COST_DENOMINATOR_SCALE = {
@@ -76,8 +77,14 @@ function devinCostDenominatorTokens(denominator) {
76
77
  /**
77
78
  * Per-million-token rates from the config's cost dimensions. `COST_FUZZY` marks
78
79
  * an estimated rate, not a different unit, so both kinds are read. `cacheWrite`
79
- * has no Cascade dimension — Devin bills cache writes at the input rate — and
80
- * stays 0.
80
+ * has no Cascade dimension and stays 0; the provider's `cache-write-rate` rules
81
+ * supply Devin's published rate.
82
+ *
83
+ * Composite configs (`fusion`) flatten their own rate card plus every
84
+ * dispatched component's card into one `modelDimensions` list. A `Sidekick`
85
+ * marker dimension separates the composite's own card from the component
86
+ * cards, so reading stops there: a headline card may omit dimensions a
87
+ * component includes, which makes repeated-label detection unreliable.
81
88
  */
82
89
  function devinModelCost(config) {
83
90
  const cost = {
@@ -87,9 +94,11 @@ function devinModelCost(config) {
87
94
  cacheWrite: 0
88
95
  };
89
96
  for (const dimension of config.modelDimensions) {
97
+ const label = dimension.label.trim().toLowerCase();
98
+ if (label === DEVIN_SIDEKICK_LABEL) break;
90
99
  if (dimension.kind !== 1 && dimension.kind !== 2) continue;
91
100
  const perMillion = Math.round(dimension.value * 1e6 / devinCostDenominatorTokens(dimension.denominator) * 1e6) / 1e6;
92
- switch (dimension.label.trim().toLowerCase()) {
101
+ switch (label) {
93
102
  case DEVIN_COST_LABEL_INPUT:
94
103
  cost.input = perMillion;
95
104
  break;
@@ -159,7 +168,7 @@ function collectDevinFamilyLane(lanes, config, uid) {
159
168
  if (DEVIN_FAMILY_EFFORT_KEYS[key]) effort = DEVIN_FAMILY_EFFORT_BY_NAME[value.name.toLowerCase().replace(/[^a-z0-9]+/g, "")];
160
169
  }
161
170
  if (thinking === false) effort = "off";
162
- const baseId = label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
171
+ const baseId = slugify(label);
163
172
  if (!baseId) return;
164
173
  const laneId = `${baseId}${oneMillionContext ? "-1m" : ""}${fast ? "-fast" : ""}`;
165
174
  let lane = lanes.get(laneId);
@@ -221,12 +230,12 @@ async function fetchDevinModels(options) {
221
230
  const controller = new AbortController();
222
231
  const timer = setTimeout(() => controller.abort(), timeoutMs);
223
232
  const signal = options.signal ? AbortSignal.any([controller.signal, options.signal]) : controller.signal;
233
+ const request = create(GetCliModelConfigsRequestSchema, { metadata: create(MetadataSchema, {
234
+ ...devinDiscoveryMetadata(options.apiKey),
235
+ supportedModelDisplays: [...DEVIN_SUPPORTED_MODEL_DISPLAYS]
236
+ }) });
237
+ let payload;
224
238
  try {
225
- const request = create(GetCliModelConfigsRequestSchema, { metadata: create(MetadataSchema, {
226
- ...devinDiscoveryMetadata(options.apiKey),
227
- supportedModelDisplays: [...DEVIN_SUPPORTED_MODEL_DISPLAYS]
228
- }) });
229
- const body = toBinary(GetCliModelConfigsRequestSchema, request);
230
239
  const response = await discoveryFetch(options.fetch)(requestUrl, {
231
240
  method: "POST",
232
241
  headers: {
@@ -234,23 +243,24 @@ async function fetchDevinModels(options) {
234
243
  "connect-protocol-version": "1",
235
244
  accept: "*/*"
236
245
  },
237
- body,
246
+ body: toBinary(GetCliModelConfigsRequestSchema, request),
238
247
  signal
239
248
  });
240
249
  if (!response.ok) return null;
241
- const decoded = decodeDevinUnaryMessage(GetCliModelConfigsResponseSchema, new Uint8Array(await response.arrayBuffer()));
242
- if (!decoded) return null;
243
- const models = normalizeDevinModels(decoded.clientModelConfigs, options.baseUrl);
244
- if (models.length === 0) {
245
- warn("Devin returned an empty native model catalog; the pinned CLI identity may be stale", { metadata: devinDiscoveryMetadata(void 0) });
246
- return null;
247
- }
248
- return models;
250
+ payload = new Uint8Array(await response.arrayBuffer());
249
251
  } catch {
250
252
  return null;
251
253
  } finally {
252
254
  clearTimeout(timer);
253
255
  }
256
+ const decoded = decodeDevinUnaryMessage(GetCliModelConfigsResponseSchema, payload);
257
+ if (!decoded) return null;
258
+ const models = normalizeDevinModels(decoded, options.baseUrl);
259
+ if (models.length === 0) {
260
+ warn("Devin returned an empty model catalog; the pinned client identity may be stale", { metadata: devinDiscoveryMetadata(void 0) });
261
+ return null;
262
+ }
263
+ return models;
254
264
  }
255
265
  /**
256
266
  * Wire uids whose configs advertise `supports_images` but whose backend
@@ -264,11 +274,11 @@ async function fetchDevinModels(options) {
264
274
  */
265
275
  const DEVIN_IMAGE_BLIND_UIDS = /* @__PURE__ */ new Set(["swe-1-6", "swe-1-6-fast"]);
266
276
  /** One config as a raw (pre-collapse) spec keyed on its wire uid. */
267
- function devinModelSpec(config, uid, baseUrl, isRouter) {
277
+ function devinModelSpec(config, uid, baseUrl, isAssignModelRouter) {
268
278
  const features = config.modelInfo?.modelFeatures;
269
279
  const input = (features !== void 0 ? features.supportsImages : config.supportsImages) && !DEVIN_IMAGE_BLIND_UIDS.has(uid) ? ["text", "image"] : ["text"];
270
280
  const compat = {};
271
- if (isRouter) compat.modelRouter = true;
281
+ if (isAssignModelRouter) compat.modelRouter = true;
272
282
  if (features?.supportsParallelToolCalls === true) compat.supportsParallelToolCalls = true;
273
283
  const maxOutputTokens = config.modelInfo?.maxOutputTokens ?? 0;
274
284
  const spec = {
@@ -292,11 +302,65 @@ function devinModelSpec(config, uid, baseUrl, isRouter) {
292
302
  if (config.isRecommended) spec.isRecommended = true;
293
303
  return spec;
294
304
  }
295
- function normalizeDevinModels(configs, baseUrlOverride) {
305
+ /**
306
+ * Lead chat uid of a Fusion pairing `fusion-<lead>[-fast]-sidekick-<sidekick>`.
307
+ * An exact live lead uid wins, so leads whose own uid ends in `-fast`
308
+ * (`swe-1-6-fast`) route as written. Otherwise `-fast` selects the lead's
309
+ * priority lane when the server lists one, then the standard lane.
310
+ *
311
+ * Returns `undefined` for uids that are not pairings and `null` for pairings
312
+ * whose lead is not live: the composite uid itself is never servable.
313
+ */
314
+ function devinFusionLeadUid(uid, liveUids) {
315
+ if (!uid.startsWith("fusion-")) return void 0;
316
+ const cut = uid.indexOf("-sidekick-");
317
+ if (cut <= 7) return void 0;
318
+ const lead = uid.slice(7, cut);
319
+ if (liveUids.has(lead)) return lead;
320
+ if (lead.endsWith("-fast")) {
321
+ const base = lead.slice(0, -5);
322
+ if (liveUids.has(`${base}-priority`)) return `${base}-priority`;
323
+ if (liveUids.has(base)) return base;
324
+ }
325
+ return null;
326
+ }
327
+ /**
328
+ * Point a Fusion pairing at its lead. omp runs only the lead (the sidekick is
329
+ * paired by the native client), so the limits and pricing a caller budgets
330
+ * against are the lead's, not the composite card's. The composite uid names no
331
+ * model, so `buildModel` resolves the row under its `requestModelId` and the
332
+ * lead's catalog rules (cache-write rate, long-context tier) apply there.
333
+ */
334
+ function routeDevinFusionLead(spec, lead) {
335
+ spec.requestModelId = lead.id;
336
+ spec.reasoning = lead.reasoning;
337
+ spec.input = lead.input;
338
+ spec.supportsTools = lead.supportsTools;
339
+ spec.cost = lead.cost;
340
+ spec.contextWindow = lead.contextWindow;
341
+ spec.maxTokens = lead.maxTokens;
342
+ if (lead.compat?.supportsParallelToolCalls) spec.compat = {
343
+ ...spec.compat,
344
+ supportsParallelToolCalls: true
345
+ };
346
+ else if (spec.compat?.supportsParallelToolCalls) {
347
+ const { supportsParallelToolCalls: _, ...rest } = spec.compat;
348
+ if (Object.keys(rest).length > 0) spec.compat = rest;
349
+ else delete spec.compat;
350
+ }
351
+ }
352
+ function normalizeDevinModels(response, baseUrlOverride) {
353
+ const configs = response.clientModelConfigs;
354
+ const accountDefaultUid = response.defaultOverrideModelConfig?.modelUid.trim();
296
355
  const baseUrl = baseUrlOverride ?? "https://server.codeium.com";
297
356
  const specs = [];
298
357
  const seen = /* @__PURE__ */ new Set();
299
358
  const lanes = /* @__PURE__ */ new Map();
359
+ const liveConfigs = /* @__PURE__ */ new Map();
360
+ for (const config of configs) {
361
+ const uid = config.modelUid.trim();
362
+ if (!config.disabled && uid && !liveConfigs.has(uid)) liveConfigs.set(uid, config);
363
+ }
300
364
  for (const config of configs) {
301
365
  if (config.disabled) continue;
302
366
  const displayOption = config.modelInfo?.displayOption ?? 0;
@@ -305,12 +369,29 @@ function normalizeDevinModels(configs, baseUrlOverride) {
305
369
  if (!uid || seen.has(uid)) continue;
306
370
  seen.add(uid);
307
371
  const isRouter = displayOption === 3 || config.modelInfo?.isModelRouter === true;
308
- specs.push(devinModelSpec(config, uid, baseUrl, isRouter));
372
+ const isAssignModelRouter = isRouter && (config.modelInfo?.harnessUids.length ?? 0) === 0;
373
+ const lead = devinFusionLeadUid(uid, liveConfigs);
374
+ if (lead === null) continue;
375
+ const spec = devinModelSpec(config, uid, baseUrl, isAssignModelRouter);
376
+ if (lead !== void 0) routeDevinFusionLead(spec, devinModelSpec(liveConfigs.get(lead), lead, baseUrl, false));
377
+ if (uid === accountDefaultUid) spec.isProviderDefault = true;
378
+ specs.push(spec);
309
379
  if (!isRouter) collectDevinFamilyLane(lanes, config, uid);
310
380
  }
311
381
  const families = devinDynamicFamilies(lanes.values());
312
382
  const dynamic = families.length > 0 ? collapseVariants(specs, { table: { families } }) : specs;
313
- return collapseVariants(dynamic).sort((a, b) => a.id.localeCompare(b.id));
383
+ const collapsed = collapseVariants(dynamic);
384
+ const accountFamily = collapsed.find((spec) => spec.isProviderDefault && spec.thinking?.effortRouting);
385
+ const accountEffort = THINKING_EFFORTS.find((effort) => accountFamily?.thinking?.effortRouting?.[effort] === accountDefaultUid);
386
+ if (accountFamily?.thinking && accountEffort !== void 0) {
387
+ accountFamily.thinking = {
388
+ ...accountFamily.thinking,
389
+ defaultLevel: accountEffort
390
+ };
391
+ if (accountFamily.id === accountDefaultUid) delete accountFamily.requestModelId;
392
+ else accountFamily.requestModelId = accountDefaultUid;
393
+ }
394
+ return collapsed.sort((a, b) => a.id.localeCompare(b.id));
314
395
  }
315
396
  //#endregion
316
397
  export { fetchDevinModels };
@@ -1,10 +1,10 @@
1
1
  import { installBunShim as __installBunShim } from "./bun-shim.mjs";
2
2
  __installBunShim();
3
- import { a as pb, i as fromBinary } from "./protobuf-BMgDYu_U.mjs";
3
+ import { c as pb, s as fromBinary } from "./collapse-_nkb2dn7.mjs";
4
4
  import { gunzipSync } from "node:zlib";
5
- //#region node_modules/.pnpm/@oh-my-pi+pi-catalog@18.1.17/node_modules/@oh-my-pi/pi-catalog/src/discovery/devin-proto.ts
5
+ //#region node_modules/.pnpm/@oh-my-pi+pi-catalog@18.12.6/node_modules/@oh-my-pi/pi-catalog/src/discovery/devin-proto.ts
6
6
  /**
7
- * Devin protocol declarations used by Oh My Pi.
7
+ * Devin protocol declarations used by omp.
8
8
  *
9
9
  * Each declaration retains only fields consumed by the client or its protocol tests.
10
10
  */
@@ -2860,7 +2860,73 @@ const UserStatusSchema = pb("exa.codeium_common_pb.UserStatus", [
2860
2860
  }
2861
2861
  ]);
2862
2862
  //#endregion
2863
- //#region node_modules/.pnpm/@oh-my-pi+pi-catalog@18.1.17/node_modules/@oh-my-pi/pi-catalog/src/wire/devin-proto.ts
2863
+ //#region node_modules/.pnpm/@oh-my-pi+pi-catalog@18.12.6/node_modules/@oh-my-pi/pi-catalog/src/wire/devin.ts
2864
+ /**
2865
+ * Devin (Codeium Cascade) wire constants shared by catalog discovery, the pi-ai
2866
+ * provider, and account usage. This module deliberately stays free of the
2867
+ * generated protobuf runtime so the synchronous model seed can import it
2868
+ * without pulling devin-gen into the boot path.
2869
+ */
2870
+ /** Base host for Codeium/Windsurf's Cascade API (Connect protocol over HTTP/1.1). */
2871
+ const DEVIN_DEFAULT_BASE_URL = "https://server.codeium.com";
2872
+ const DEVIN_SESSION_TOKEN_PREFIX = "devin-session-token$";
2873
+ /** `Metadata.os` vocabulary; `process.platform` is fixed for the process lifetime. */
2874
+ const DEVIN_OS = process.platform === "darwin" ? "darwin" : process.platform === "win32" ? "windows" : "linux";
2875
+ const DEVIN_LOCALE = "en";
2876
+ /**
2877
+ * Released Devin CLI request identity. The backend gates behavior on this
2878
+ * tuple: `ideType: "chisel"` is what unlocks router assignment (`AssignModel`)
2879
+ * and the CLI model surface.
2880
+ */
2881
+ const DEVIN_CLI_METADATA = {
2882
+ ideName: "devin-cli",
2883
+ ideType: "chisel",
2884
+ ideVersion: "3000.11.3",
2885
+ extensionName: "chisel",
2886
+ extensionVersion: "3000.11.3",
2887
+ locale: DEVIN_LOCALE,
2888
+ os: DEVIN_OS
2889
+ };
2890
+ /**
2891
+ * Native discovery identity. The Devin CLI announces itself as the `chisel`
2892
+ * client on its dev channel for `GetCliModelConfigs`; that identity, not the
2893
+ * released chat identity, unlocks the full native config set.
2894
+ */
2895
+ const DEVIN_DISCOVERY_METADATA = {
2896
+ ideName: "chisel",
2897
+ ideVersion: "0.0.0-dev",
2898
+ extensionName: "chisel",
2899
+ extensionVersion: "0.0.0-dev",
2900
+ locale: DEVIN_LOCALE,
2901
+ os: DEVIN_OS
2902
+ };
2903
+ /** Prefixes bare JWT-shaped session tokens; every other key, legacy `sk-ws-` ones included, goes out as stored. */
2904
+ function encodeDevinCredential(apiKey) {
2905
+ const key = apiKey?.trim();
2906
+ if (!key) return "";
2907
+ if (key.startsWith(DEVIN_SESSION_TOKEN_PREFIX)) return key;
2908
+ return key.split(".").length === 3 ? `${DEVIN_SESSION_TOKEN_PREFIX}${key}` : key;
2909
+ }
2910
+ /**
2911
+ * Fields for `Metadata` on released-CLI calls (`GetUserJwt`, `AssignModel`,
2912
+ * `GetChatMessage`, `GetUserStatus`).
2913
+ */
2914
+ function devinCliMetadata(apiKey, userJwt = "") {
2915
+ return {
2916
+ apiKey: encodeDevinCredential(apiKey),
2917
+ userJwt,
2918
+ ...DEVIN_CLI_METADATA
2919
+ };
2920
+ }
2921
+ /** Fields for `Metadata` on the dev-channel `GetCliModelConfigs` call. */
2922
+ function devinDiscoveryMetadata(apiKey) {
2923
+ return {
2924
+ apiKey: encodeDevinCredential(apiKey),
2925
+ ...DEVIN_DISCOVERY_METADATA
2926
+ };
2927
+ }
2928
+ //#endregion
2929
+ //#region node_modules/.pnpm/@oh-my-pi+pi-catalog@18.12.6/node_modules/@oh-my-pi/pi-catalog/src/wire/devin-proto.ts
2864
2930
  /**
2865
2931
  * Protobuf decoding helpers for Devin's unary Connect RPCs. Kept separate from
2866
2932
  * `wire/devin.ts`: that module stays protobuf-free for the synchronous catalog
@@ -2885,4 +2951,4 @@ function decodeDevinUnaryMessage(schema, payload) {
2885
2951
  }
2886
2952
  }
2887
2953
  //#endregion
2888
- export { ImageDataSchema as _, ChatToolCallSchema as a, TeamsTier as b, CompletionConfigurationSchema as c, GetCliModelConfigsRequestSchema as d, GetCliModelConfigsResponseSchema as f, GetUserStatusResponseSchema as g, GetUserStatusRequestSchema as h, ChatMessagePromptSchema as i, GetChatMessageRequestSchema as l, GetUserJwtResponseSchema as m, AssignModelRequestSchema as n, ChatToolChoiceSchema as o, GetUserJwtRequestSchema as p, AssignModelResponseSchema as r, ChatToolDefinitionSchema as s, decodeDevinUnaryMessage as t, GetChatMessageResponseSchema as u, MetadataSchema as v, PromptCacheOptionsSchema as y };
2954
+ export { TeamsTier as C, PromptCacheOptionsSchema as S, GetUserJwtResponseSchema as _, AssignModelRequestSchema as a, ImageDataSchema as b, ChatToolCallSchema as c, CompletionConfigurationSchema as d, GetChatMessageRequestSchema as f, GetUserJwtRequestSchema as g, GetCliModelConfigsResponseSchema as h, devinDiscoveryMetadata as i, ChatToolChoiceSchema as l, GetCliModelConfigsRequestSchema as m, DEVIN_DEFAULT_BASE_URL as n, AssignModelResponseSchema as o, GetChatMessageResponseSchema as p, devinCliMetadata as r, ChatMessagePromptSchema as s, decodeDevinUnaryMessage as t, ChatToolDefinitionSchema as u, GetUserStatusRequestSchema as v, MetadataSchema as x, GetUserStatusResponseSchema as y };