@deepseek-ai/dsh-llm 0.1.5-alpha.1 → 0.1.5-alpha.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/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/llm/llm/README.md
5
- README.md: c2854cc29f98aa860b1e4064d0c12ced3114f61c
6
- README.zh.md: c4a5979e7c8003e897f53971a62abbdd97eca801
5
+ README.md: 75a5d3e1d51ada12338a41e54b42ad8d6d21c279
6
+ README.zh.md: e10706108d86f337c333b1f80a15c731fd2a00cf
package/README.md CHANGED
@@ -60,7 +60,7 @@ After a successful mount, `ctx.llm.listProviders()` reports the registered route
60
60
 
61
61
  - **Stream one model call** — `ctx.llm.stream(options)` yields raw chunks (token-level deltas) for any registered provider and model; consumers assemble them with `BlockAssembler`.
62
62
  - **Register provider adapters** — an adapter owns one or more provider routes, and its registration captures that route's retry policy; registering the same route twice fails with `DUPLICATE_ADAPTER`.
63
- - **Expose and activate providers through configuration** — adapters declare configurable-provider routes plus a settings namespace, so configuration surfaces can activate dormant providers and edit connection facts without a restart.
63
+ - **Expose and activate providers through configuration** — adapters declare configurable-provider routes plus a settings namespace, so configuration surfaces can activate dormant providers and edit connection facts without a restart. `LlmConfigurableProvider.error` reports a configuration diagnostic for repair; unaffected models can remain serviceable.
64
64
  - **Discover and resolve models** — list the models an adapter advertises, interrogate an endpoint for the models it serves, and resolve one exact model's context window, output default, reasoning efforts, input modalities, and system prompt update mode: `LlmResolvedModelInfo.systemPromptUpdate` is `'in-history'` when the model reads the latest `system` message at any position as the effective system prompt and absent when only a leading system message is read; `normalizeModelInfo` rejects any other value with `INVALID_MODEL_INFO`.
65
65
  - **Validate call config** — an explicit or configured reasoning effort is checked against the exact model before any provider I/O, and an adapter-configured output cap is materialized when the request omits one.
66
66
  - **Read an embedded Assistant stream without expanding it** — `assistantStreamFirstTokenTime` (first token), `assistantStreamHasVisibleContent` (any visible content), and `assistantStreamHasVisibleText` (any visible text) answer their questions from the compact records with early exit; `lastAssistantStreamChunk` scans backward to the last raw chunk of one type, `assistantStreamChunks` and `joinAssistantStreamText` scan the whole stream, and `assembleAssistantStream` feeds a `BlockAssembler` one joined delta per run with the same blocks, usage, and replay state as the per-member expansion. `runFirstTokenTime` and `runFirstVisibleTime` do the early-exit scan for one packed run, and `isTokenDelta`, `isVisibleChunk`, and `chunkHasVisibleText` define the token and visibility rules for a single chunk. `expandAssistantStream` remains the validating path for records read at a durable boundary; it is not memoized, because a retained expansion costs roughly ten times the compact stream for as long as the event lives.
package/README.zh.md CHANGED
@@ -60,7 +60,7 @@ for await (const chunk of ctx.llm.stream({
60
60
 
61
61
  - **流式发起一次模型调用**——`ctx.llm.stream(options)` 为任何已注册提供方与模型产出原始分片(token 级增量);消费方用 `BlockAssembler` 组装。
62
62
  - **注册提供方适配器**——一个适配器拥有一个或多个提供方路由,其注册会捕获该路由的重试策略;重复注册同一路由会以 `DUPLICATE_ADAPTER` 失败。
63
- - **通过配置暴露并激活提供方**——适配器声明可配置提供方路由与 settings namespace,配置界面因此可以激活休眠提供方并编辑连接事实,无需重启。
63
+ - **通过配置暴露并激活提供方**——适配器声明可配置提供方路由与 settings namespace,配置界面因此可以激活休眠提供方并编辑连接事实,无需重启。`LlmConfigurableProvider.error` 报告供修复的配置诊断;未受影响的模型仍可提供服务。
64
64
  - **发现与解析模型**——列出适配器公布的模型、询问端点它提供哪些模型,并解析某个精确模型的上下文窗口、输出默认值、推理(reasoning)强度、输入模态与系统提示词更新模式:当模型把任意位置最新的 `system` 消息读作有效系统提示词时,`LlmResolvedModelInfo.systemPromptUpdate` 为 `'in-history'`;只读取开头 system 消息时该字段缺失;`normalizeModelInfo` 以 `INVALID_MODEL_INFO` 拒绝任何其他值。
65
65
  - **校验调用配置**——显式或配置的推理强度会在任何提供方 I/O 之前对照精确模型校验;请求省略输出上限时,会填入适配器配置的输出上限。
66
66
  - **不展开即读取内嵌 Assistant 流**——`assistantStreamFirstTokenTime`(首 token)、`assistantStreamHasVisibleContent`(任一可见内容)与 `assistantStreamHasVisibleText`(任一可见文本)以提前退出从紧凑记录回答各自的问题;`lastAssistantStreamChunk` 反向扫描到某一类型的最后一个原始 chunk,`assistantStreamChunks` 与 `joinAssistantStreamText` 扫描整个流,`assembleAssistantStream` 向 `BlockAssembler` 每个 run 喂一段拼接 delta,blocks/usage/replayState 与逐成员展开相同。`runFirstTokenTime` 与 `runFirstVisibleTime` 对单个打包 run 做提前退出扫描,`isTokenDelta`、`isVisibleChunk` 与 `chunkHasVisibleText` 定义单个 chunk 的 token 与可见性规则。`expandAssistantStream` 仍是持久边界读取记录的校验路径;它不被记忆化,因为保留的展开在事件生命周期内约花费紧凑流的十倍内存。
@@ -20,6 +20,7 @@ const _deepseek_ai_dsh_llm_llm_listConfigurableProviders_result$schema = z.array
20
20
  'settingsNs': z.string(),
21
21
  'settingsPath': z.array(z.string()),
22
22
  'declared': z.boolean().optional(),
23
+ 'error': z.string().optional(),
23
24
  }))
24
25
  const _deepseek_ai_dsh_llm_llm_listProviders_result$schema = z.array(z.object({
25
26
  'id': z.string(),
@@ -319,7 +320,7 @@ export const TYPERT = {
319
320
  },
320
321
  {
321
322
  "name": "LlmConfigurableProvider",
322
- "declaration": "export interface LlmConfigurableProvider {\n provider: string;\n displayName: string;\n settingsNs: string;\n settingsPath: readonly string[];\n declared?: boolean;\n}"
323
+ "declaration": "export interface LlmConfigurableProvider {\n provider: string;\n displayName: string;\n settingsNs: string;\n settingsPath: readonly string[];\n declared?: boolean;\n error?: string;\n}"
323
324
  },
324
325
  {
325
326
  "name": "LlmDiscoveredModel",
@@ -20,6 +20,7 @@ const _deepseek_ai_dsh_llm_llm_listConfigurableProviders_result$schema = z.array
20
20
  'settingsNs': z.string(),
21
21
  'settingsPath': z.array(z.string()),
22
22
  'declared': z.boolean().optional(),
23
+ 'error': z.string().optional(),
23
24
  }))
24
25
  const _deepseek_ai_dsh_llm_llm_listProviders_result$schema = z.array(z.object({
25
26
  'id': z.string(),
@@ -217,6 +217,8 @@ export interface LlmConfigurableProvider {
217
217
  * from outside.
218
218
  */
219
219
  declared?: boolean;
220
+ /** Configuration diagnostic for repair; unaffected models may remain serviceable. */
221
+ error?: string;
220
222
  }
221
223
  /**
222
224
  * One interrogation of a provider endpoint that configuration has not stored
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-llm",
3
3
  "description": "Provider-neutral LLM service interface for the DeepSeek Harness",
4
- "version": "0.1.5-alpha.1",
4
+ "version": "0.1.5-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -65,16 +65,16 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "zod": "^4.4.3",
68
- "@deepseek-ai/dsh-util-crypto": "^0.1.5-alpha.1",
69
- "@deepseek-ai/dsh-timeout": "^0.1.5-alpha.1",
70
- "@deepseek-ai/dsh-brand": "^0.1.5-alpha.1",
71
- "@deepseek-ai/dsh-util-values": "^0.1.5-alpha.1",
72
- "@deepseek-ai/dsh-typert-protocol": "^0.1.5-alpha.1",
73
- "@deepseek-ai/schemastery": "^3.18.2"
68
+ "@deepseek-ai/schemastery": "^3.18.2",
69
+ "@deepseek-ai/dsh-timeout": "^0.1.5-alpha.2",
70
+ "@deepseek-ai/dsh-brand": "^0.1.5-alpha.2",
71
+ "@deepseek-ai/dsh-util-values": "^0.1.5-alpha.2",
72
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.5-alpha.2",
73
+ "@deepseek-ai/dsh-util-crypto": "^0.1.5-alpha.2"
74
74
  },
75
75
  "devDependencies": {
76
- "@deepseek-ai/dsh-attachment": "^0.1.5-alpha.1",
77
- "@deepseek-ai/dsh-invariants": "^0.1.5-alpha.1",
76
+ "@deepseek-ai/dsh-attachment": "^0.1.5-alpha.2",
77
+ "@deepseek-ai/dsh-invariants": "^0.1.5-alpha.2",
78
78
  "@deepseek-ai/cordis": "^4.0.2"
79
79
  }
80
80
  }