ohmyswitch 0.2.3 → 0.2.4

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 (2) hide show
  1. package/oms.mjs +7 -6
  2. package/package.json +1 -1
package/oms.mjs CHANGED
@@ -9879,7 +9879,7 @@ function appDirs(home, env, platform) {
9879
9879
  function loadConfig() {
9880
9880
  const home = homedir();
9881
9881
  return {
9882
- version: "0.2.3",
9882
+ version: "0.2.4",
9883
9883
  dirs: appDirs(home, process.env, process.platform),
9884
9884
  home,
9885
9885
  env: { ...process.env }
@@ -21865,7 +21865,7 @@ const catalogProviders = [
21865
21865
  ];
21866
21866
  /** Routes registered by DSH's own DeepSeek adapters. */
21867
21867
  const deepseekRoutes = ["deepseek-official", "deepseek-account"];
21868
- /** DSH's API for each endpoint it can serve, and the path its client expects at the end of `baseURL`. */
21868
+ /** DSH's API for each endpoint, and the path its client expects at the end of `baseURL` (DSH 0.2.2-rc.2). */
21869
21869
  const apis$2 = {
21870
21870
  "/v1/chat/completions": {
21871
21871
  api: "openai-completions",
@@ -21878,9 +21878,12 @@ const apis$2 = {
21878
21878
  "/v1/messages": {
21879
21879
  api: "anthropic-messages",
21880
21880
  path: ""
21881
+ },
21882
+ "/v1beta/generateContent": {
21883
+ api: "google-generative-ai",
21884
+ path: "/v1beta"
21881
21885
  }
21882
21886
  };
21883
- const dshUnsupportedEndpoints = ["/v1beta/generateContent"];
21884
21887
  const jsTag = "tag:yaml.org,2002:js";
21885
21888
  /** `!!js` expressions are kept as tagged strings, so untouched ones are written back as they were. */
21886
21889
  const patchOptions = {
@@ -22068,7 +22071,6 @@ function dshModel(model, api, existing) {
22068
22071
  }
22069
22072
  function dshProviderEntry(provider, existing, key) {
22070
22073
  const protocol = apis$2[provider.endpoint];
22071
- if (!protocol) throw new AppError("precondition_failed", "DeepSeek Harness 不支持 Google Generative AI 端点");
22072
22074
  if (!provider.models.length) throw new AppError("precondition_failed", "DeepSeek Harness 要求供应商至少有一个模型");
22073
22075
  const previous = isJsonObject(existing) ? existing : {};
22074
22076
  const previousModels = new Map((Array.isArray(previous.models) ? previous.models : []).filter(isJsonObject).map((model) => [model.id, model]));
@@ -22228,8 +22230,7 @@ const DshHarnessPlugin = harnessPlugin({
22228
22230
  if (patches.length === 1) return patches[0].path;
22229
22231
  const names = patches.map((file) => file.path.split(/[\\/]/).at(-2));
22230
22232
  return join(homeDir$2(environment), "profiles", `{${names.join(",")}}`, "cordis.patch.yml");
22231
- },
22232
- unsupportedEndpoints: dshUnsupportedEndpoints
22233
+ }
22233
22234
  });
22234
22235
  //#endregion
22235
22236
  //#region src/core/harnesses/import.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohmyswitch",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Provider-first config manager for AI coding harnesses",
5
5
  "license": "MIT",
6
6
  "repository": {