dsh-opendesign-corouter 0.1.15 → 0.1.17

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.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 最近一次成功的网关模型目录快照。
3
+ *
4
+ * 快照保存在普通插件配置里,这样宿主重启后不会静默退回内置目录。它按不可信输入校验:
5
+ * 未知字段、越界数值与重复 id 一律拒绝;无效快照返回 `undefined`(忽略该字段),
6
+ * 不让损坏的持久化数据阻断插件加载。`baseURL` 绑定读取时的网关,换网关后旧快照不生效。
7
+ */
8
+ import type { CatalogModel } from './catalog.js';
9
+ export interface ModelCatalogSnapshot {
10
+ /** 读取目录时的规范化网关地址。 */
11
+ baseURL: string;
12
+ /** 成功读取时间的 ISO-8601 字符串。 */
13
+ updatedAt: string;
14
+ models: readonly CatalogModel[];
15
+ }
16
+ /**
17
+ * Validate a persisted snapshot into a fresh, allowlisted value.
18
+ * This is also a Schemastery transform: every constant and helper lives inline because the
19
+ * function is serialized as source and re-executed in a fresh realm. Avoid nested function
20
+ * declarations here — bundlers wrap them with helpers the fresh realm does not define.
21
+ */
22
+ export declare function parseModelCatalogSnapshot(value: unknown): ModelCatalogSnapshot | undefined;
@@ -12,7 +12,8 @@
12
12
  * - 错误文字固定,不回显设置值或模型 ID。
13
13
  */
14
14
  import type { CatalogModel } from './catalog.js';
15
- /** One model's optional overrides; every field absent means "inherit the catalog row". */
15
+ import { type ContextWindowPresetId } from './context-budget.js';
16
+ /** One model's overrides; absent context uses the default working-window preset. */
16
17
  export interface ModelSettings {
17
18
  /** 是否出现在模型选择器;缺省视为启用。 */
18
19
  enabled?: boolean;
@@ -24,8 +25,10 @@ export interface ModelSettings {
24
25
  topP?: number;
25
26
  /** 单次输出上限;覆盖目录行的 maxOutputTokens。 */
26
27
  maxTokens?: number;
27
- /** 上下文窗口;覆盖目录行的 contextWindow。 */
28
+ /** 旧版自定义总窗口;数值原样保留,不按档位解释。 */
28
29
  contextWindow?: number;
30
+ /** 总窗口档位;与旧 contextWindow 数值互斥,缺省使用默认档。 */
31
+ contextTier?: ContextWindowPresetId;
29
32
  /** 思考深度;只允许目录同一套档位。 */
30
33
  reasoningEffort?: string;
31
34
  }
@@ -38,8 +41,8 @@ export type ModelSettingsMap = Record<string, ModelSettings>;
38
41
  */
39
42
  export declare function parseModelSettingsMap(value: unknown): ModelSettingsMap;
40
43
  /**
41
- * Copy a catalog row and apply explicit capacity and image-input overrides. The input row and
42
- * its arrays are never mutated; sampling and effort belong to the request instead.
44
+ * Copy a catalog row, resolve the working window, and apply explicit output/image
45
+ * overrides. Catalog references remain unchanged; sampling/effort belong to requests.
43
46
  */
44
47
  export declare function applyModelSettings(row: CatalogModel, settings?: ModelSettings): CatalogModel;
45
48
  /** A model is selectable unless the map explicitly disables it; unknown ids and an absent map stay enabled. */
package/lib/remote.d.ts CHANGED
@@ -11,6 +11,8 @@ export declare const REMOTE_SERVICE = "openDesignCoRouter";
11
11
  /** Live switches of this plugin, mirrored for a settings page that only has this RPC. */
12
12
  export interface StatusConfig {
13
13
  emptyTurnGuard: boolean;
14
+ /** Opt-in completion handshake; absent on a Host that predates it. */
15
+ turnCompletionReview?: boolean;
14
16
  useDesktopCredential: boolean;
15
17
  baseURL: string;
16
18
  /** Credential reference name (an env var or a DSH credential ref), never the value. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-opendesign-corouter",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "OpenDesign CoRouter:套餐赠送与付费模型双 Provider、桌面登录态额度及独立登录",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -63,6 +63,8 @@
63
63
  "inject": [
64
64
  "@deepseek-ai/dsh-client-ui-settings",
65
65
  "@deepseek-ai/dsh-client-ui-slots",
66
+ "@deepseek-ai/dsh-client-ui-conversation",
67
+ "@deepseek-ai/dsh-client-ui-model-selection",
66
68
  "@deepseek-ai/dsh-api-remotes"
67
69
  ]
68
70
  }