@dsh-cc/model-aliases 0.9.5 → 0.9.6-rc.1

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 check:readme --write
5
- README.md: 83372cd6d0fde3d68ad491b2af6a281af5714580
6
- README.zh.md: 36d353997c9192c43d29668a7ff68b9592e3c1f1
5
+ README.md: 2c88d1e3ed00249f3406df8dfa6507964fe91273
6
+ README.zh.md: b933fb1cb1e3fc426105f58cd3bdc1bb720af087
package/README.md CHANGED
@@ -71,7 +71,8 @@ modelAliases:
71
71
  // settings namespace "model-aliases"
72
72
  {
73
73
  "fable": { "provider": "anthropic", "model": "claude-fable-5" },
74
- "sonnet": null // null = delete the same-named config-default alias
74
+ "sonnet": null, // null = delete the same-named config-default alias
75
+ "warnOnInherit": true // control key (boolean, default true): warn when an unconfigured alias inherits
75
76
  }
76
77
  ```
77
78
 
@@ -219,6 +220,23 @@ cc-shell (and the routes service), so in CC mode the fix is always active.
219
220
  - `ConfigAliasesSchema` / `SettingsAliasesSchema` (and their record forms) —
220
221
  schemastery schemas for the config layer (no `null`) and settings layer
221
222
  (`null` allowed), plus `AliasTarget` / `ResolvedRoute` types.
223
+ - `createModelInspector(getAliases, { warn })` builds an inspection closure
224
+ returning `AliasInspection` (`{ kind, route?, via?, hop? }`), so a caller can
225
+ report how a `model` was classified without resolving it again.
226
+ - `splitLevelSuffix(ref)` splits a trailing `$<level>` reasoning-effort suffix
227
+ (`opus$high`) off a model reference; a malformed suffix passes the whole ref
228
+ through verbatim.
229
+ - `resolveAlias(ctx, alias?)` / `resolveDetailedAlias(ctx, alias?)` resolve
230
+ through the mounted `ccModelRoutes` service, falling back to a resolver built
231
+ from the `model-aliases` settings overlay when the service is absent.
232
+ - `MODEL_ALIASES_NAMESPACE` is the `'model-aliases'` settings namespace constant.
233
+ - `isSystemOneTarget(target)` is true when an alias target names a System One
234
+ model or carries the System One protocol marker.
235
+ - `CC_ALIASES` / `LANE_ALIASES` are the two builtin name lists
236
+ (`fable`/`opus`/`sonnet`/`haiku` and the six dsh-cc lanes), for callers that
237
+ need the names without the map.
238
+ - Subpath exports `@dsh-cc/model-aliases/types`, `/schema`, and `/resolver`
239
+ expose the types, the schemas, and the pure resolver without the plugin entry.
222
240
 
223
241
  ## dsh-cc lanes
224
242
 
package/README.zh.md CHANGED
@@ -43,7 +43,8 @@ modelAliases:
43
43
  // settings 命名空间 "model-aliases"
44
44
  {
45
45
  "fable": { "provider": "anthropic", "model": "claude-fable-5" },
46
- "sonnet": null // null = 删除同名的 config-default alias
46
+ "sonnet": null, // null = 删除同名的 config-default alias
47
+ "warnOnInherit": true // 控制键(布尔,默认 true):未配置 alias 继承时告警
47
48
  }
48
49
  ```
49
50
 
@@ -120,6 +121,13 @@ alias 的查找顺序:**settings overlay → config 默认 → builtin fallbac
120
121
  - `toAgentOptions(route)` — 丢弃 resolved route 中的 `undefined` 字段以保住按字段继承(绝不把 child 请求的字段写成 `undefined`);`undefined` 进 → `undefined` 出,全 `undefined` 的 route 收敛为 `undefined`(「无 override」)。由 Task、cc-plugin-loader、hooks bridge 与 memory recall 共享。
121
122
  - `toOneShotRoute(route, parent?)` — 把 resolved alias 填成完整的 `{provider, model}` 二元组,供独立的 one-shot `ctx.llm.stream` 调用使用:alias 字段优先,缺失字段从 `parent` 继承;补不完整(继承后仍无 model)返回 `undefined`,调用方视为「未配置」。session-title overlay 与 WebFetch summarizer 使用。
122
123
  - `ConfigAliasesSchema` / `SettingsAliasesSchema`(及其 record 形式)— config 层(无 `null`)与 settings 层(允许 `null`)的 schemastery schema,外加 `AliasTarget` / `ResolvedRoute` 类型。
124
+ - `createModelInspector(getAliases, { warn })` 构建检查闭包,返回 `AliasInspection`(`{ kind, route?, via?, hop? }`),调用方无需再次解析即可报告某个 `model` 是如何被归类的。
125
+ - `splitLevelSuffix(ref)` 从 model 引用中拆出末尾的 `$<level>` 推理强度后缀(`opus$high`);格式非法的后缀会原样透传整个引用。
126
+ - `resolveAlias(ctx, alias?)` / `resolveDetailedAlias(ctx, alias?)` 优先经已挂载的 `ccModelRoutes` 服务解析,服务缺失时回退到由 `model-aliases` 设置覆盖构建的解析器。
127
+ - `MODEL_ALIASES_NAMESPACE` 是 `'model-aliases'` 设置命名空间常量。
128
+ - `isSystemOneTarget(target)` 在 alias 目标指向 System One 模型、或携带 System One 协议标记时为真。
129
+ - `CC_ALIASES` / `LANE_ALIASES` 是两份内建名称列表(`fable`/`opus`/`sonnet`/`haiku` 与六个 dsh-cc lane),供只需要名字、不需要映射的调用方使用。
130
+ - 子路径导出 `@dsh-cc/model-aliases/types`、`/schema` 与 `/resolver`,无需插件入口即可取到类型、schema 与纯解析器。
123
131
 
124
132
  ## dsh-cc lane
125
133
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dsh-cc/model-aliases",
3
3
  "description": "Claude Code-compatible model alias resolution for the DeepSeek Harness",
4
- "version": "0.9.5",
4
+ "version": "0.9.6-rc.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/dsh-cc/dsh-cc.git",
@@ -39,7 +39,7 @@
39
39
  "@deepseek-ai/dsh-session": ">=0.2.2-rc.1",
40
40
  "@deepseek-ai/dsh-subagent": ">=0.2.2-rc.1",
41
41
  "@deepseek-ai/schemastery": "^3.18.1",
42
- "@dsh-cc/settings": "^0.9.5"
42
+ "@dsh-cc/settings": "^0.9.6-rc.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@deepseek-ai/cordis": "link:../../../../deepseek-harness/vendor/cordis",
@@ -54,8 +54,8 @@
54
54
  "@deepseek-ai/dsh-subagent-fork-in-process": "link:../../../../deepseek-harness/packages/subagent/subagent-fork-in-process",
55
55
  "@deepseek-ai/dsh-subagent-spawn-in-process": "link:../../../../deepseek-harness/packages/subagent/subagent-spawn-in-process",
56
56
  "@deepseek-ai/schemastery": "link:../../../../deepseek-harness/vendor/schemastery",
57
- "@dsh-cc/settings": "^0.9.5",
58
- "@dsh-cc/agent-loop-mock": "^0.1.0"
57
+ "@dsh-cc/agent-loop-mock": "^0.1.0",
58
+ "@dsh-cc/settings": "^0.9.6-rc.1"
59
59
  },
60
60
  "publishConfig": {
61
61
  "access": "public"