dsh-workbuddy-connect 0.2.4 → 0.2.5

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/README.en.md CHANGED
@@ -10,6 +10,8 @@ Brings every model in the WorkBuddy desktop app (GLM-5.3, GLM-5.2, DeepSeek-V4-P
10
10
 
11
11
  ![WorkBuddy models in the DSH model picker](assets/1.png)
12
12
 
13
+ - **Image input**: image messages are admitted per the upstream's per-model capability flag — most models (GLM-5.3-Flash, GLM-5.2, the DeepSeek-V4 series, etc.) accept pasted or dragged-in images, while text-only models (e.g. GLM-5.1) keep a clear refusal.
14
+
13
15
  - **Info at a glance**: Settings → Plugins → DSH WorkBuddy Connect card
14
16
 
15
17
  ![Settings card showing the plugin](assets/2.png)
package/README.md CHANGED
@@ -15,6 +15,9 @@
15
15
  ![WorkBuddy 模型出现在 DSH 模型选择器中](assets/1.png)
16
16
 
17
17
 
18
+ - **图片输入**:按上游逐模型声明的能力放行图片——绝大多数模型(含 GLM-5.3-Flash、GLM-5.2、DeepSeek-V4 系列等)可直接粘贴或拖入图片;个别纯文本模型(如 GLM-5.1)按上游声明仍会明确提示不支持。
19
+
20
+
18
21
  - **信息查看**:设置 → 插件 → DSH WorkBuddy Connect 卡片
19
22
 
20
23
 
package/lib/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { _ as WorkBuddyCredentialStore, a as readHostHeartbeat, c as WORKBUDDY_CONNECT_VERSION, l as WorkBuddyUpstreamClient, o as workbuddyHostHeartbeatPath, p as FALLBACK_WORKBUDDY_MODELS, r as isHeartbeatProcessAlive, x as workbuddyOwnAuthPath } from "./host-heartbeat-okrdovCF.js";
2
+ import { _ as WorkBuddyCredentialStore, a as readHostHeartbeat, c as WORKBUDDY_CONNECT_VERSION, l as WorkBuddyUpstreamClient, o as workbuddyHostHeartbeatPath, p as FALLBACK_WORKBUDDY_MODELS, r as isHeartbeatProcessAlive, x as workbuddyOwnAuthPath } from "./host-heartbeat-1MO2dZrM.js";
3
3
  import { realpathSync } from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
5
  //#region src/bin.ts
@@ -314,76 +314,88 @@ var WorkBuddyCredentialStore = class {
314
314
  //#endregion
315
315
  //#region src/catalog.ts
316
316
  /**
317
- * Static CLI models observed on the CN endpoint (2026-08-17). The upstream
318
- * refresh replaces this list at startup; it exists so the provider registers
319
- * with a usable catalog even while the first fetch is in flight or offline.
317
+ * Static CLI models observed on the CN endpoint (2026-08-17; image flags
318
+ * re-verified against the live catalog 2026-08-29). The upstream refresh
319
+ * replaces this list at startup; it exists so the provider registers with a
320
+ * usable catalog even while the first fetch is in flight or offline.
320
321
  */
321
322
  const FALLBACK_WORKBUDDY_MODELS = [
322
323
  {
323
324
  id: "auto",
324
325
  name: "Auto",
325
326
  contextWindow: 168e3,
326
- maxTokens: 32e3
327
+ maxTokens: 32e3,
328
+ supportsImages: true
327
329
  },
328
330
  {
329
331
  id: "hy3",
330
332
  name: "Hy3",
331
333
  contextWindow: 192e3,
332
- maxTokens: 64e3
334
+ maxTokens: 64e3,
335
+ supportsImages: true
333
336
  },
334
337
  {
335
338
  id: "glm-5v-turbo",
336
339
  name: "GLM-5v-Turbo",
337
340
  contextWindow: 2e5,
338
- maxTokens: 64e3
341
+ maxTokens: 64e3,
342
+ supportsImages: true
339
343
  },
340
344
  {
341
345
  id: "glm-5.2",
342
346
  name: "GLM-5.2",
343
347
  contextWindow: 1e6,
344
- maxTokens: 48e3
348
+ maxTokens: 48e3,
349
+ supportsImages: true
345
350
  },
346
351
  {
347
352
  id: "glm-5.1",
348
353
  name: "GLM-5.1",
349
354
  contextWindow: 2e5,
350
- maxTokens: 48e3
355
+ maxTokens: 48e3,
356
+ supportsImages: false
351
357
  },
352
358
  {
353
359
  id: "minimax-m3",
354
360
  name: "MiniMax-M3",
355
361
  contextWindow: 512e3,
356
- maxTokens: 128e3
362
+ maxTokens: 128e3,
363
+ supportsImages: true
357
364
  },
358
365
  {
359
366
  id: "kimi-k3-1",
360
367
  name: "Kimi-K3",
361
368
  contextWindow: 1e6,
362
- maxTokens: 32e3
369
+ maxTokens: 32e3,
370
+ supportsImages: true
363
371
  },
364
372
  {
365
373
  id: "kimi-k2.7",
366
374
  name: "Kimi-K2.7-Code",
367
375
  contextWindow: 256e3,
368
- maxTokens: 32e3
376
+ maxTokens: 32e3,
377
+ supportsImages: true
369
378
  },
370
379
  {
371
380
  id: "kimi-k2.6",
372
381
  name: "Kimi-K2.6",
373
382
  contextWindow: 256e3,
374
- maxTokens: 32e3
383
+ maxTokens: 32e3,
384
+ supportsImages: true
375
385
  },
376
386
  {
377
387
  id: "deepseek-v4-flash",
378
388
  name: "Deepseek-V4-Flash",
379
389
  contextWindow: 1e6,
380
- maxTokens: 5e4
390
+ maxTokens: 5e4,
391
+ supportsImages: true
381
392
  },
382
393
  {
383
394
  id: "deepseek-v4-pro",
384
395
  name: "Deepseek-V4-Pro",
385
396
  contextWindow: 1e6,
386
- maxTokens: 5e4
397
+ maxTokens: 5e4,
398
+ supportsImages: true
387
399
  }
388
400
  ];
389
401
  /** Mutable catalog shared by the shim's `/v1/models` and the adapter. */
@@ -666,7 +678,8 @@ var WorkBuddyUpstreamClient = class {
666
678
  id,
667
679
  name: typeof wrapped["name"] === "string" && wrapped["name"] !== "" ? wrapped["name"] : id,
668
680
  contextWindow: input,
669
- maxTokens: output
681
+ maxTokens: output,
682
+ supportsImages: wrapped["supportsImages"] === true && wrapped["disabledMultimodal"] !== true
670
683
  });
671
684
  }
672
685
  const models = cliIds.map((id) => byId.get(id)).filter((model) => model !== void 0);
@@ -734,7 +747,7 @@ var WorkBuddyUpstreamClient = class {
734
747
  };
735
748
  //#endregion
736
749
  //#region src/version.ts
737
- const WORKBUDDY_CONNECT_VERSION = "0.2.4";
750
+ const WORKBUDDY_CONNECT_VERSION = "0.2.5";
738
751
  //#endregion
739
752
  //#region src/host-heartbeat.ts
740
753
  /**
package/lib/index.d.ts CHANGED
@@ -13,6 +13,12 @@ interface WorkBuddyUpstreamModel {
13
13
  name: string;
14
14
  contextWindow: number;
15
15
  maxTokens: number;
16
+ /**
17
+ * Upstream-declared image input capability. Missing or false upstream data
18
+ * resolves to false, so an unknown model stays text-only: over-claiming
19
+ * admits an image the provider then rejects after the message is durable.
20
+ */
21
+ supportsImages: boolean;
16
22
  }
17
23
  /** One billing package and its remaining credit. */
18
24
  interface WorkBuddyCreditAccount {
@@ -184,9 +190,10 @@ declare class WorkBuddyCredentialStore {
184
190
  /** One model entry the adapter exposes. */
185
191
  type WorkBuddyModelInfo = WorkBuddyUpstreamModel;
186
192
  /**
187
- * Static CLI models observed on the CN endpoint (2026-08-17). The upstream
188
- * refresh replaces this list at startup; it exists so the provider registers
189
- * with a usable catalog even while the first fetch is in flight or offline.
193
+ * Static CLI models observed on the CN endpoint (2026-08-17; image flags
194
+ * re-verified against the live catalog 2026-08-29). The upstream refresh
195
+ * replaces this list at startup; it exists so the provider registers with a
196
+ * usable catalog even while the first fetch is in flight or offline.
190
197
  */
191
198
  declare const FALLBACK_WORKBUDDY_MODELS: readonly WorkBuddyModelInfo[];
192
199
  /** Mutable catalog shared by the shim's `/v1/models` and the adapter. */
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as WorkBuddyCredentialStore, a as readHostHeartbeat, b as parseWorkBuddyAuth, d as prepareChatBody, f as regionOf, g as WORKBUDDY_AUTH_FILE_ENV, h as WORKBUDDY_AUTH_FILENAME, i as processStartTimeMs, l as WorkBuddyUpstreamClient, m as WorkBuddyCatalog, n as clearHostHeartbeat, o as workbuddyHostHeartbeatPath, p as FALLBACK_WORKBUDDY_MODELS, r as isHeartbeatProcessAlive, s as writeHostHeartbeat, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, u as classifyUpstreamError, v as defaultDesktopAuthCandidates, x as workbuddyOwnAuthPath, y as defaultDesktopAuthPath } from "./host-heartbeat-okrdovCF.js";
1
+ import { _ as WorkBuddyCredentialStore, a as readHostHeartbeat, b as parseWorkBuddyAuth, d as prepareChatBody, f as regionOf, g as WORKBUDDY_AUTH_FILE_ENV, h as WORKBUDDY_AUTH_FILENAME, i as processStartTimeMs, l as WorkBuddyUpstreamClient, m as WorkBuddyCatalog, n as clearHostHeartbeat, o as workbuddyHostHeartbeatPath, p as FALLBACK_WORKBUDDY_MODELS, r as isHeartbeatProcessAlive, s as writeHostHeartbeat, t as WORKBUDDY_HOST_HEARTBEAT_FILENAME, u as classifyUpstreamError, v as defaultDesktopAuthCandidates, x as workbuddyOwnAuthPath, y as defaultDesktopAuthPath } from "./host-heartbeat-1MO2dZrM.js";
2
2
  import z from "@deepseek-ai/schemastery";
3
3
  import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
4
4
  import { createProvider } from "@earendil-works/pi-ai";
@@ -22,8 +22,8 @@ const WORKBUDDY_PROVIDER = "workbuddy";
22
22
  const WORKBUDDY_STREAM_IDLE_TIMEOUT_MS = 3e5;
23
23
  /**
24
24
  * Image-request budgets at the dsh-llm-pi-ai defaults; the profile type made
25
- * them required in 0.1.1-rc.2. WorkBuddy routes are text-only today, so these
26
- * bounds never bite unless image input is added to the catalog.
25
+ * them required in 0.1.1-rc.2. They bound requests to models whose catalog
26
+ * entry declares `supportsImages`; text-only models never receive images.
27
27
  */
28
28
  const REQUEST_IMAGE_BUDGETS = {
29
29
  maxRequestImageBytes: 20971520,
@@ -70,7 +70,7 @@ function toPiModel(info, baseUrl) {
70
70
  api: "openai-completions",
71
71
  provider: WORKBUDDY_PROVIDER,
72
72
  baseUrl,
73
- input: ["text"],
73
+ input: info.supportsImages === true ? ["text", "image"] : ["text"],
74
74
  cost: NO_COST,
75
75
  contextWindow: info.contextWindow,
76
76
  maxTokens: info.maxTokens
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dsh-workbuddy-connect",
3
3
  "displayName": "DSH WorkBuddy Connect",
4
4
  "description": "将 WorkBuddy 桌面 App 包含的模型自动接入 DeepSeek Harness — bring WorkBuddy desktop app models into DeepSeek Harness with zero configuration.",
5
- "version": "0.2.4",
5
+ "version": "0.2.5",
6
6
  "author": "corrinehu",
7
7
  "keywords": [
8
8
  "dsh-plugin",