dsh-local-ai 0.2.1 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.2] - 2026-09-01
9
+
10
+ ### Changed
11
+
12
+ - Upgrade the `@deepseek-ai/dsh-*` dev dependencies from `0.1.2-alpha.2` to `0.1.2-alpha.3` (peer ranges stay `>=0.1.0-rc.8 <0.2.0`), align the `@deepseek-ai/cordis` / `@deepseek-ai/schemastery` carets to `^4.0.2` / `^3.18.2`, and refresh `dshWorkshop.compatibility.dshVersions` and the five-language README adaptation notes to `0.1.2-alpha.3`.
13
+
8
14
  ## [0.2.1] - 2026-08-30
9
15
 
10
16
  ### Fixed
package/README.es.md CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  | Superficie | Estado |
27
27
  |---|---|
28
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
28
+ | Harness | DeepSeek Harness `0.1.2-alpha.3` (adaptado el 2026-09-01): el sobre de sesión conserva su campo ignorable solo para compatibilidad de lectura de logs almacenados - Session.append aún no puede estamparlo, por lo que el comportamiento de la puerta no cambia. |
29
29
  | Node | `^22.19.0 \|\| >=24.0.0` |
30
30
  | Backend | [Ollama](https://ollama.com) (API HTTP local + sonda CLI) |
31
31
  | Modelo | Ruta solo texto (`inputModalities: ['text']`); se admiten llamadas y resultados de herramientas |
@@ -153,7 +153,7 @@ Todos los ajustes son campos `Config` de Schemastery (modificables desde cordis.
153
153
 
154
154
  ## Known limitations
155
155
 
156
- - **Solo rc.2** — desarrollado y probado contra `@deepseek-ai/dsh@0.1.1-rc.2`; se espera que baselines más nuevos funcionen, pero los verifica el workflow mensual de compat.
156
+ - **alpha.3** — desarrollado y probado contra `@deepseek-ai/dsh@0.1.2-alpha.3`; se espera que baselines más nuevos funcionen, pero los verifica el workflow mensual de compat.
157
157
  - **Vision cuando el modelo la informa** — los modelos cuyas capacidades de `/api/show` incluyen `vision` declaran `inputModalities: ["text","image"]` y llevan cargas de imagen base64 en los mensajes de usuario (exclusión con `vision: false`); los modelos solo texto siguen rechazando el contenido de imagen (`UNSUPPORTED_CONTENT`).
158
158
  - **Respaldo a mitad de flujo** — una vez que una ruta local empezó a producir contenido, un fallo posterior se reenvía (no se retira); solo un fallo antes del primer token respalda a la nube.
159
159
 
@@ -161,7 +161,7 @@ Todos los ajustes son campos `Config` de Schemastery (modificables desde cordis.
161
161
 
162
162
  ```sh
163
163
  pnpm install # node ^22.19 || >=24
164
- pnpm run typecheck # tsc: src + tests contra los tipos publicados 0.1.1-rc.2
164
+ pnpm run typecheck # tsc: src + tests contra los tipos publicados 0.1.2-alpha.3
165
165
  pnpm run typecheck:ci # tsc estricto contra los tipos publicados rc.2 (skipLibCheck off)
166
166
  pnpm test # vitest: costuras reales Context/LlmRuntime/ToolRuntime/CommandRuntime/subprocess
167
167
  pnpm run test:coverage # puerta de cobertura (90/80/90/90)
package/README.hi.md CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  | सतह | स्थिति |
27
27
  |---|---|
28
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
28
+ | Harness | DeepSeek Harness `0.1.2-alpha.3` (2026-09-01 को अनुकूलित): सत्र लिफ़ाफ़ा अपना ignorable फ़ील्ड केवल संग्रहीत-लॉग पठन संगतता के लिए रखता है - Session.append अभी भी इसे स्टैम्प नहीं कर सकता, इसलिए गेट व्यवहार अपरिवर्तित है। |
29
29
  | Node | `^22.19.0 \|\| >=24.0.0` |
30
30
  | Backend | [Ollama](https://ollama.com) (स्थानीय HTTP API + CLI जाँच) |
31
31
  | Model | केवल-पाठ रूट (`inputModalities: ['text']`); टूल कॉल व परिणाम समर्थित हैं |
@@ -153,7 +153,7 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-local-ai'
153
153
 
154
154
  ## Known limitations
155
155
 
156
- - **केवल rc.2** — `@deepseek-ai/dsh@0.1.1-rc.2` के विरुद्ध विकसित व परीक्षित; नए harness बेसलाइन काम करने की अपेक्षा है, पर मासिक compat workflow उन्हें सत्यापित करता है।
156
+ - **alpha.3** — `@deepseek-ai/dsh@0.1.2-alpha.3` के विरुद्ध विकसित व परीक्षित; नए harness बेसलाइन काम करने की अपेक्षा है, पर मासिक compat workflow उन्हें सत्यापित करता है।
157
157
  - **मॉडल द्वारा vision रिपोर्ट करने पर विज़न** — जिन मॉडलों की `/api/show` capabilities में `vision` है, वे `inputModalities: ["text","image"]` घोषित करते हैं और उपयोगकर्ता संदेशों पर base64 छवि पेलोड ले जाते हैं (`vision: false` से बंद करें); केवल-टेक्स्ट मॉडल अब भी छवि सामग्री अस्वीकार करते हैं (`UNSUPPORTED_CONTENT`)।
158
158
  - **मध्य-स्ट्रीम वापसी** — एक बार स्थानीय रूट सामग्री बनाना शुरू कर दे, तो बाद की विफलता आगे भेजी जाती है (वापस नहीं ली जाती); केवल पहले टोकन से पहले की विफलता क्लाउड पर लौटती है।
159
159
 
@@ -161,7 +161,7 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-local-ai'
161
161
 
162
162
  ```sh
163
163
  pnpm install # node ^22.19 || >=24
164
- pnpm run typecheck # tsc: src + परीक्षण, प्रकाशित 0.1.1-rc.2 प्रकारों के विरुद्ध
164
+ pnpm run typecheck # tsc: src + परीक्षण, प्रकाशित 0.1.2-alpha.3 प्रकारों के विरुद्ध
165
165
  pnpm run typecheck:ci # सख्त tsc, प्रकाशित rc.2 प्रकारों के विरुद्ध (skipLibCheck बंद)
166
166
  pnpm test # vitest: वास्तविक Context/LlmRuntime/ToolRuntime/CommandRuntime/subprocess सीम
167
167
  pnpm run test:coverage # कवरेज द्वार (90/80/90/90)
package/README.md CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  | Surface | Status |
30
30
  |---|---|
31
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
31
+ | Harness | DeepSeek Harness `0.1.2-alpha.3` (adapted 2026-09-01): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged. |
32
32
  | Node | `^22.19.0 \|\| >=24.0.0` |
33
33
  | Backend | [Ollama](https://ollama.com) (local HTTP API + CLI probe) |
34
34
  | Model | Text-only route (`inputModalities: ['text']`); tool calls and tool results are supported |
@@ -158,7 +158,7 @@ All tunables are Schemastery `Config` fields (changeable from cordis.yml). An id
158
158
 
159
159
  ## Known limitations
160
160
 
161
- - **rc.2 only** — developed and tested against `@deepseek-ai/dsh@0.1.1-rc.2`; newer harness baselines are expected to work but are verified by the monthly compat workflow.
161
+ - **alpha.3** — developed and tested against `@deepseek-ai/dsh@0.1.2-alpha.3`; newer harness baselines are expected to work but are verified by the monthly compat workflow.
162
162
  - **Vision when the model reports it** — models whose `/api/show` capabilities include `vision` declare `inputModalities: ["text","image"]` and carry base64 image payloads on user messages (opt out with `vision: false`); text-only models still reject image content (`UNSUPPORTED_CONTENT`).
163
163
  - **Mid-stream fallback** — once a local route has started producing content, a later failure is forwarded (not retracted); only a failure before the first token falls back to the cloud.
164
164
 
@@ -166,7 +166,7 @@ All tunables are Schemastery `Config` fields (changeable from cordis.yml). An id
166
166
 
167
167
  ```sh
168
168
  pnpm install # node ^22.19 || >=24
169
- pnpm run typecheck # tsc: src + tests against the published 0.1.1-rc.2 types
169
+ pnpm run typecheck # tsc: src + tests against the published 0.1.2-alpha.3 types
170
170
  pnpm run typecheck:ci # strict tsc against published rc.2 types (skipLibCheck off)
171
171
  pnpm test # vitest: real Context/LlmRuntime/ToolRuntime/CommandRuntime/subprocess seams
172
172
  pnpm run test:coverage # coverage gate (90/80/90/90)
package/README.pt.md CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  | Superfície | Status |
27
27
  |---|---|
28
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
28
+ | Harness | DeepSeek Harness `0.1.2-alpha.3` (adaptado em 2026-09-01): o envelope de sessão mantém seu campo ignorable apenas para compatibilidade de leitura de logs armazenados - o Session.append ainda não consegue estampá-lo, então o comportamento da porta não muda. |
29
29
  | Node | `^22.19.0 \|\| >=24.0.0` |
30
30
  | Backend | [Ollama](https://ollama.com) (API HTTP local + sonda CLI) |
31
31
  | Modelo | Rota somente texto (`inputModalities: ['text']`); chamadas e resultados de ferramentas são suportados |
@@ -153,7 +153,7 @@ Todos os ajustes são campos `Config` de Schemastery (modificáveis pelo cordis.
153
153
 
154
154
  ## Known limitations
155
155
 
156
- - **Somente rc.2** — desenvolvido e testado contra `@deepseek-ai/dsh@0.1.1-rc.2`; espera-se que baselines mais novos funcionem, mas são verificados pelo workflow mensal de compat.
156
+ - **alpha.3** — desenvolvido e testado contra `@deepseek-ai/dsh@0.1.2-alpha.3`; espera-se que baselines mais novos funcionem, mas são verificados pelo workflow mensal de compat.
157
157
  - **Vision quando o modelo a informa** — modelos cujas capacidades de `/api/show` incluem `vision` declaram `inputModalities: ["text","image"]` e carregam payloads de imagem base64 nas mensagens do usuário (desative com `vision: false`); modelos somente texto continuam rejeitando conteúdo de imagem (`UNSUPPORTED_CONTENT`).
158
158
  - **Fallback no meio do fluxo** — uma vez que uma rota local começou a produzir conteúdo, uma falha posterior é reencaminhada (não retirada); apenas uma falha antes do primeiro token faz fallback para a nuvem.
159
159
 
@@ -161,7 +161,7 @@ Todos os ajustes são campos `Config` de Schemastery (modificáveis pelo cordis.
161
161
 
162
162
  ```sh
163
163
  pnpm install # node ^22.19 || >=24
164
- pnpm run typecheck # tsc: src + testes contra os tipos publicados 0.1.1-rc.2
164
+ pnpm run typecheck # tsc: src + testes contra os tipos publicados 0.1.2-alpha.3
165
165
  pnpm run typecheck:ci # tsc estrito contra os tipos publicados rc.2 (skipLibCheck off)
166
166
  pnpm test # vitest: costuras reais Context/LlmRuntime/ToolRuntime/CommandRuntime/subprocess
167
167
  pnpm run test:coverage # porta de cobertura (90/80/90/90)
package/README.zh.md CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  | 项目 | 状态 |
29
29
  |---|---|
30
- | Harness | DeepSeek Harness `0.1.1-rc.2` |
30
+ | Harness | DeepSeek Harness `0.1.2-alpha.3`(2026-09-01 已适配):会话信封保留 ignorable 字段但仅用于存量日志读取兼容——Session.append 仍无法盖章,门控行为不变。 |
31
31
  | Node | `^22.19.0 \|\| >=24.0.0` |
32
32
  | 后端 | [Ollama](https://ollama.com)(本地 HTTP API + CLI 探测) |
33
33
  | 模型 | 纯文本路由(`inputModalities: ['text']`);支持工具调用与工具结果 |
@@ -155,7 +155,7 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-local-ai'
155
155
 
156
156
  ## Known limitations
157
157
 
158
- - **仅 rc.2** —— 针对 `@deepseek-ai/dsh@0.1.1-rc.2` 开发与测试;更新版本的 harness 基线预期可用,但由每月 compat workflow 验证。
158
+ - **alpha.3** —— 针对 `@deepseek-ai/dsh@0.1.2-alpha.3` 开发与测试;更新版本的 harness 基线预期可用,但由每月 compat workflow 验证。
159
159
  - **模型声明 vision 时启用视觉** — `/api/show` capabilities 含 `vision` 的模型声明 `inputModalities: ["text","image"]`,并在用户消息上携带 base64 图片载荷(可用 `vision: false` 退出);纯文本模型仍拒绝图片内容(`UNSUPPORTED_CONTENT`)。
160
160
  - **中途失败不回退** —— 本地路由一旦开始产出内容,之后的失败会透传(无法撤回);只有首个 token 前的失败才回退云端。
161
161
 
@@ -163,7 +163,7 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-local-ai'
163
163
 
164
164
  ```sh
165
165
  pnpm install # node ^22.19 || >=24
166
- pnpm run typecheck # tsc:src + 测试,对发布版 0.1.1-rc.2 类型
166
+ pnpm run typecheck # tsc:src + 测试,对发布版 0.1.2-alpha.3 类型
167
167
  pnpm run typecheck:ci # 严格 tsc,对发布版 rc.2 类型(关闭 skipLibCheck)
168
168
  pnpm test # vitest:真实 Context/LlmRuntime/ToolRuntime/CommandRuntime/subprocess 机制
169
169
  pnpm run test:coverage # 覆盖率门禁(90/80/90/90)
@@ -11,9 +11,9 @@ published tarball; these are install-time dependencies:
11
11
  |---|---|---|---|
12
12
  | [tsdown](https://github.com/rolldown/tsdown) | `^0.22.14` | MIT | Build-time bundling of `lib/` (a regular dependency so the git-install channel's `prepare` script can build) |
13
13
  | [typescript](https://github.com/microsoft/TypeScript) | `^5.9.0` | Apache-2.0 | Build-time declaration emission (`lib/types/`) |
14
- | [@deepseek-ai/cordis](https://www.npmjs.com/package/@deepseek-ai/cordis) | `^4.0.1` (peer) | See package | The plugin runtime |
15
- | [@deepseek-ai/schemastery](https://www.npmjs.com/package/@deepseek-ai/schemastery) | `^3.18.0` (peer) | See package | Configuration schema |
16
- | `@deepseek-ai/dsh-*` peers | `0.1.1-rc.2` (peer) | See packages | Official harness seams (`dsh-llm`, `dsh-tools`, `dsh-subprocess`, `dsh-commands`, `dsh-timeout`) |
14
+ | [@deepseek-ai/cordis](https://www.npmjs.com/package/@deepseek-ai/cordis) | `^4.0.2` (peer) | See package | The plugin runtime |
15
+ | [@deepseek-ai/schemastery](https://www.npmjs.com/package/@deepseek-ai/schemastery) | `^3.18.2` (peer) | See package | Configuration schema |
16
+ | `@deepseek-ai/dsh-*` peers | `0.1.2-alpha.3` (peer) | See packages | Official harness seams (`dsh-llm`, `dsh-tools`, `dsh-subprocess`, `dsh-commands`, `dsh-timeout`) |
17
17
 
18
18
  At runtime the plugin only talks to the Ollama endpoint you configure (over
19
19
  its HTTP API and, for the process-liveness probe, its CLI); it performs no
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineTool } from "@deepseek-ai/dsh-tools";
2
2
  import z from "@deepseek-ai/schemastery";
3
- import { EMPTY_RESPONSE_CODE, LlmAdapter, LlmError, attributionHeaders, contentHasImage, isTokenDelta } from "@deepseek-ai/dsh-llm";
3
+ import { EMPTY_RESPONSE_CODE, LlmAdapter, LlmError, attributionHeaders, contentHasImage } from "@deepseek-ai/dsh-llm";
4
4
  import { idleWatchdog, timeoutOf } from "@deepseek-ai/dsh-timeout";
5
5
  import { tmpdir } from "node:os";
6
6
  //#region src/config.ts
@@ -1606,17 +1606,21 @@ var OpenAICompatibleAdapter = class extends LlmAdapter {
1606
1606
  //#endregion
1607
1607
  //#region src/route.ts
1608
1608
  /**
1609
- * Local-model routing decision and the streaming fallback. The pure decision
1610
- * matches configured rules (task type via `purpose`, case-insensitive
1611
- * keywords, or a blanket `always`) against a request, in list order — first
1612
- * match wins. The streaming helper routes a matched request to the local
1613
- * provider adapter (Ollama or an OpenAI-compatible backend) and, when the
1614
- * local route fails BEFORE producing any visible content, falls back to the
1615
- * cloud (`next()`) so a down local server never bricks a conversation. Once
1616
- * local content has started, it is streamed through — a mid-stream failure
1617
- * cannot be retracted.
1618
- * @module dsh-local-ai/route
1609
+ * Whether a stream chunk carries visible model output for fallback timing.
1610
+ * The host moved this helper out of `@deepseek-ai/dsh-llm` on 0.1.2-alpha.2
1611
+ * (it now lives in the client ui-chat package), so the plugin pins the same
1612
+ * semantics locally.
1613
+ * @param chunk - Stream chunk to inspect.
1614
+ * @returns true for a non-empty text, reasoning, or tool-call delta.
1619
1615
  */
1616
+ function isTokenDelta(chunk) {
1617
+ switch (chunk.type) {
1618
+ case "text-delta":
1619
+ case "reasoning-delta": return chunk.text !== "";
1620
+ case "tool-call-delta": return chunk.argumentsDelta !== "" || chunk.name !== void 0;
1621
+ default: return false;
1622
+ }
1623
+ }
1620
1624
  /**
1621
1625
  * Concatenate the request's model-visible text (system prompt + every text
1622
1626
  * block) for keyword matching.
@@ -1814,7 +1818,7 @@ async function checkHealth(baseURL, fetchImpl, subprocess, requestTimeoutMs, gra
1814
1818
  * The `dsh-local-ai` plugin version. The release script bumps this string
1815
1819
  * alongside `package.json`; `test/version.spec.ts` trips when the two drift.
1816
1820
  */
1817
- const VERSION = "0.2.1";
1821
+ const VERSION = "0.2.2";
1818
1822
  //#endregion
1819
1823
  //#region src/index.ts
1820
1824
  const name = "local-ai";
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Dual-ruler call-id brand: host master renamed the dsh-llm `CallId`
3
- * brand to `ToolCallId` (and dropped the old value export), while the
4
- * published 0.1.1-rc.2 line still exports `CallId`. Derive the brand
5
- * from the dsh-tools execution contract so the package stays green on
6
- * both rulers without naming either brand name.
3
+ * brand to `ToolCallId` (and dropped the old value export); the published
4
+ * 0.1.2-alpha.3 line matches. Derive the brand from the dsh-tools
5
+ * execution contract so the package stays green on both rulers without
6
+ * naming either brand name.
7
7
  * @module dsh-local-ai/call-id
8
8
  */
9
9
  import type { ToolExecution } from '@deepseek-ai/dsh-tools';
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Dual-ruler call-id brand: host master renamed the dsh-llm `CallId`
3
- * brand to `ToolCallId` (and dropped the old value export), while the
4
- * published 0.1.1-rc.2 line still exports `CallId`. Derive the brand
5
- * from the dsh-tools execution contract so the package stays green on
6
- * both rulers without naming either brand name.
3
+ * brand to `ToolCallId` (and dropped the old value export); the published
4
+ * 0.1.2-alpha.3 line matches. Derive the brand from the dsh-tools
5
+ * execution contract so the package stays green on both rulers without
6
+ * naming either brand name.
7
7
  * @module dsh-local-ai/call-id
8
8
  */
9
9
  export const CallId = ((id) => id);
@@ -15,7 +15,7 @@
15
15
  * @module dsh-local-ai
16
16
  */
17
17
  import type { Context } from '@deepseek-ai/cordis';
18
- import type { JsonValue } from '@deepseek-ai/dsh-tools';
18
+ import type { JsonValue } from '@deepseek-ai/dsh-util-values';
19
19
  import { Config } from './config.js';
20
20
  export declare const name = "local-ai";
21
21
  export declare const inject: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAA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ot":"","sources":["../../src/route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGxE,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpE,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,wCAAwC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAS5D;AAED,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAErE;AAED,mDAAmD;AACnD,wBAAgB,WAAW,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAQtF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAI/F;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,GAAG,aAAa,GAAG,SAAS,CAMzG;AAED;;;;;;;;;;;GAWG;AACH,wBAAuB,UAAU,CAC/B,WAAW,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,aAAa,CAAC,WAAW,CAAC,EACrE,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,aAAa,CAAC,WAAW,CAAC,GACrC,cAAc,CAAC,WAAW,CAAC,CAqC7B"}
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../src/route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGxE,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAsBpE,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,wCAAwC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAS5D;AAED,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAErE;AAED,mDAAmD;AACnD,wBAAgB,WAAW,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAQtF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAI/F;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,GAAG,aAAa,GAAG,SAAS,CAMzG;AAED;;;;;;;;;;;GAWG;AACH,wBAAuB,UAAU,CAC/B,WAAW,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,aAAa,CAAC,WAAW,CAAC,EACrE,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,aAAa,CAAC,WAAW,CAAC,GACrC,cAAc,CAAC,WAAW,CAAC,CAqC7B"}
@@ -10,9 +10,27 @@
10
10
  * cannot be retracted.
11
11
  * @module dsh-local-ai/route
12
12
  */
13
- import { isTokenDelta } from '@deepseek-ai/dsh-llm';
14
13
  import { OLLAMA_PROVIDER } from "./adapter.js";
15
14
  import { DEFAULT_PROVIDER } from "./config.js";
15
+ /**
16
+ * Whether a stream chunk carries visible model output for fallback timing.
17
+ * The host moved this helper out of `@deepseek-ai/dsh-llm` on 0.1.2-alpha.2
18
+ * (it now lives in the client ui-chat package), so the plugin pins the same
19
+ * semantics locally.
20
+ * @param chunk - Stream chunk to inspect.
21
+ * @returns true for a non-empty text, reasoning, or tool-call delta.
22
+ */
23
+ function isTokenDelta(chunk) {
24
+ switch (chunk.type) {
25
+ case 'text-delta':
26
+ case 'reasoning-delta':
27
+ return chunk.text !== '';
28
+ case 'tool-call-delta':
29
+ return chunk.argumentsDelta !== '' || chunk.name !== undefined;
30
+ default:
31
+ return false;
32
+ }
33
+ }
16
34
  /**
17
35
  * Concatenate the request's model-visible text (system prompt + every text
18
36
  * block) for keyword matching.
@@ -1 +1 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../../src/route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAW9C;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,OAAwB;IAClD,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAC5D,KAAK,MAAM,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;gBAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACnD,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,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X,OAAM;YACR,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACnB,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxB,eAAe,GAAG,IAAI,CAAA;gBACtB,KAAK,MAAM,QAAQ,IAAI,OAAO;oBAAE,MAAM,QAAQ,CAAA;gBAC9C,OAAO,CAAC,MAAM,GAAG,CAAC,CAAA;YACpB,CAAC;QACH,CAAC;QACD,qEAAqE;QACrE,KAAK,MAAM,QAAQ,IAAI,OAAO;YAAE,MAAM,QAAQ,CAAA;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,KAAK,CAAC,CAAC,IAAI,EAAE,CAAA;YACb,OAAM;QACR,CAAC;QACD,KAAK,MAAM,QAAQ,IAAI,OAAO;YAAE,MAAM,QAAQ,CAAA;QAC9C,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC"}
@@ -2,5 +2,5 @@
2
2
  * The `dsh-local-ai` plugin version. The release script bumps this string
3
3
  * alongside `package.json`; `test/version.spec.ts` trips when the two drift.
4
4
  */
5
- export declare const VERSION = "0.2.1";
5
+ export declare const VERSION = "0.2.2";
6
6
  //# sourceMappingURL=version.d.ts.map
@@ -2,5 +2,5 @@
2
2
  * The `dsh-local-ai` plugin version. The release script bumps this string
3
3
  * alongside `package.json`; `test/version.spec.ts` trips when the two drift.
4
4
  */
5
- export const VERSION = '0.2.1';
5
+ export const VERSION = '0.2.2';
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-local-ai",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Local-model (Ollama) integration for DeepSeek Harness: discover, pull, remove, and inspect local models, route requests to them by task type or keyword with automatic fallback to the cloud, and get a one-shot status overview via /ollama.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -64,7 +64,7 @@
64
64
  ],
65
65
  "compatibility": {
66
66
  "dshVersions": [
67
- "0.1.1-rc.2"
67
+ "0.1.2-alpha.3"
68
68
  ]
69
69
  },
70
70
  "capability": {
@@ -98,33 +98,34 @@
98
98
  },
99
99
  "packageManager": "pnpm@11.7.0",
100
100
  "peerDependencies": {
101
- "@deepseek-ai/cordis": "^4.0.1",
101
+ "@deepseek-ai/cordis": "^4.0.2",
102
102
  "@deepseek-ai/dsh-attachment": ">=0.1.0-rc.8 <0.2.0",
103
103
  "@deepseek-ai/dsh-commands": ">=0.1.0-rc.8 <0.2.0",
104
104
  "@deepseek-ai/dsh-llm": ">=0.1.0-rc.8 <0.2.0",
105
105
  "@deepseek-ai/dsh-subprocess": ">=0.1.0-rc.8 <0.2.0",
106
106
  "@deepseek-ai/dsh-timeout": ">=0.1.0-rc.8 <0.2.0",
107
107
  "@deepseek-ai/dsh-tools": ">=0.1.0-rc.8 <0.2.0",
108
- "@deepseek-ai/schemastery": "^3.18.0"
108
+ "@deepseek-ai/schemastery": "^3.18.2"
109
109
  },
110
110
  "dependencies": {
111
111
  "tsdown": "^0.22.14",
112
112
  "typescript": "^5.9.0"
113
113
  },
114
114
  "devDependencies": {
115
- "@deepseek-ai/cordis": "^4.0.1",
115
+ "@deepseek-ai/dsh-util-values": "0.1.2-alpha.3",
116
+ "@deepseek-ai/cordis": "^4.0.2",
116
117
  "@deepseek-ai/cordis-plugin-include": "1.0.6",
117
118
  "@deepseek-ai/cordis-plugin-loader": "1.0.2",
118
- "@deepseek-ai/dsh-attachment": "0.1.1-rc.2",
119
- "@deepseek-ai/dsh-commands": "0.1.1-rc.2",
120
- "@deepseek-ai/dsh-llm": "0.1.1-rc.2",
121
- "@deepseek-ai/dsh-session": "0.1.1-rc.2",
122
- "@deepseek-ai/dsh-subprocess": "0.1.1-rc.2",
123
- "@deepseek-ai/dsh-subprocess-local": "0.1.1-rc.2",
124
- "@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
125
- "@deepseek-ai/dsh-timeout": "0.1.1-rc.2",
126
- "@deepseek-ai/dsh-tools": "0.1.1-rc.2",
127
- "@deepseek-ai/schemastery": "^3.18.0",
119
+ "@deepseek-ai/dsh-attachment": "0.1.2-alpha.3",
120
+ "@deepseek-ai/dsh-commands": "0.1.2-alpha.3",
121
+ "@deepseek-ai/dsh-llm": "0.1.2-alpha.3",
122
+ "@deepseek-ai/dsh-session": "0.1.2-alpha.3",
123
+ "@deepseek-ai/dsh-subprocess": "0.1.2-alpha.3",
124
+ "@deepseek-ai/dsh-subprocess-local": "0.1.2-alpha.3",
125
+ "@deepseek-ai/dsh-system-prompt": "0.1.2-alpha.3",
126
+ "@deepseek-ai/dsh-timeout": "0.1.2-alpha.3",
127
+ "@deepseek-ai/dsh-tools": "0.1.2-alpha.3",
128
+ "@deepseek-ai/schemastery": "^3.18.2",
128
129
  "@types/node": "^22.19.0",
129
130
  "@vitest/coverage-v8": "^3.2.0",
130
131
  "oxlint": "0.18.1",
package/src/call-id.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Dual-ruler call-id brand: host master renamed the dsh-llm `CallId`
3
- * brand to `ToolCallId` (and dropped the old value export), while the
4
- * published 0.1.1-rc.2 line still exports `CallId`. Derive the brand
5
- * from the dsh-tools execution contract so the package stays green on
6
- * both rulers without naming either brand name.
3
+ * brand to `ToolCallId` (and dropped the old value export); the published
4
+ * 0.1.2-alpha.3 line matches. Derive the brand from the dsh-tools
5
+ * execution contract so the package stays green on both rulers without
6
+ * naming either brand name.
7
7
  * @module dsh-local-ai/call-id
8
8
  */
9
9
 
package/src/index.ts CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  import type { Context } from '@deepseek-ai/cordis'
19
19
  import { defineTool } from '@deepseek-ai/dsh-tools'
20
- import type { JsonValue } from '@deepseek-ai/dsh-tools'
20
+ import type { JsonValue } from '@deepseek-ai/dsh-util-values'
21
21
  import type { CommandResult } from '@deepseek-ai/dsh-commands'
22
22
  import type { GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm'
23
23
  import { Config, resolveConfig } from './config.ts'
package/src/route.ts CHANGED
@@ -11,12 +11,31 @@
11
11
  * @module dsh-local-ai/route
12
12
  */
13
13
 
14
- import { isTokenDelta } from '@deepseek-ai/dsh-llm'
15
14
  import type { GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm'
16
15
  import { OLLAMA_PROVIDER } from './adapter.ts'
17
16
  import { DEFAULT_PROVIDER } from './config.ts'
18
17
  import type { ResolvedConfig, ResolvedRouteRule } from './config.ts'
19
18
 
19
+ /**
20
+ * Whether a stream chunk carries visible model output for fallback timing.
21
+ * The host moved this helper out of `@deepseek-ai/dsh-llm` on 0.1.2-alpha.2
22
+ * (it now lives in the client ui-chat package), so the plugin pins the same
23
+ * semantics locally.
24
+ * @param chunk - Stream chunk to inspect.
25
+ * @returns true for a non-empty text, reasoning, or tool-call delta.
26
+ */
27
+ function isTokenDelta(chunk: StreamChunk): boolean {
28
+ switch (chunk.type) {
29
+ case 'text-delta':
30
+ case 'reasoning-delta':
31
+ return chunk.text !== ''
32
+ case 'tool-call-delta':
33
+ return chunk.argumentsDelta !== '' || chunk.name !== undefined
34
+ default:
35
+ return false
36
+ }
37
+ }
38
+
20
39
  /** The chosen local provider + model for one matched request. */
21
40
  export interface RouteDecision {
22
41
  /** The local provider id to route to (`ollama` or `openai:<name>`). */
package/src/version.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * The `dsh-local-ai` plugin version. The release script bumps this string
3
3
  * alongside `package.json`; `test/version.spec.ts` trips when the two drift.
4
4
  */
5
- export const VERSION = '0.2.1'
5
+ export const VERSION = '0.2.2'