dsh-opendesign-corouter 0.1.9 → 0.1.11

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.md CHANGED
@@ -32,7 +32,7 @@ dsh plugin --profile web add dsh-opendesign-corouter
32
32
  也可打开 [Actions → CI](https://github.com/KouzakiUmi/dsh-opendesign-corouter/actions/workflows/ci.yml),从成功构建下载 **`dsh-opendesign-corouter-build`** artifact。登录 GitHub 后解压 ZIP,取得 `.tgz` 与 `.sha256`,再安装本地包:
33
33
 
34
34
  ```console
35
- dsh plugin --profile web add /absolute/path/to/dsh-opendesign-corouter-0.1.9.tgz
35
+ dsh plugin --profile web add /absolute/path/to/dsh-opendesign-corouter-0.1.11.tgz
36
36
  ```
37
37
 
38
38
  `web` 只是示例,请替换为目标 Profile。Desktop 使用桌面安装器提供的 `dsh` 入口;独立公共 CLI 不能代管保留的 `desktop` Profile。安装后的启用与重载按目标 DSH 的管理流程进行。
@@ -81,11 +81,11 @@ dsh plugin --profile web add /absolute/path/to/dsh-opendesign-corouter-0.1.9.tgz
81
81
  <img src="docs/previews/theme-light.png" width="1040" alt="连接与登录页,展示桌面优先开关、独立登录按钮和不回填的 API Key 输入框;模拟数据">
82
82
  </picture>
83
83
 
84
- ### DeepSeek V4.1 Flash 空回答检测
84
+ ### DeepSeek V4.1 Flash 异常结束检测
85
85
 
86
- 独立开关,默认开启。参考 [dsh-empty-turn-guard](https://github.com/FYTXY/dsh-empty-turn-guard),将“正常 stop、没有工具调用、答案为空或只剩协议残渣”的工具对话标成 `EMPTY_RESPONSE`。
86
+ 独立开关,默认开启。参考 [dsh-empty-turn-guard](https://github.com/FYTXY/dsh-empty-turn-guard),在工具对话中将“stop 且没有工具调用、回答为空或只剩协议残渣”以及短操作前言、简短进度后说明下一步但没有工具调用的情况标成异常 EOT。文字识别属于启发式判断,可能漏检或误判。
87
87
 
88
- 检测到空回答后,由 DSH 的重试策略决定是否重试,**重复请求可能额外消耗额度**。该附加监控仅用于 DeepSeek V4.1 Flash 的工具对话,识别 DSML、thinking 及 `<rea:tool_calls>` 残留。
88
+ 检测到异常 EOT 后,在同一 Agent 步骤内持续重试,直到成功或取消,**没有次数上限,重复请求可能额外消耗额度**。其他错误仍遵循 DSH 的原有重试策略。附加监控仅用于 DeepSeek V4.1 Flash 的工具对话;未收到流终态且工具调用尚未开始时,按可重试的传输中断处理。
89
89
 
90
90
  ## 使用前先知道
91
91
 
package/lib/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import openDesignCoRouterRemote, { type CoRouterRemote } from './generated/typert.remote-client.js';
3
3
  import type { TypertClientRemote } from '@deepseek-ai/dsh-typert-protocol';
4
- import { type LoginState, type Status, type StatusModel } from './remote.js';
4
+ import { type LoginState, type Status, type StatusModel, type PriceCatalog } from './remote.js';
5
5
  import type { QuotaSnapshot, QuotaWindow } from './quota.js';
6
6
  import { type ApiProtocol } from './protocol-options.js';
7
7
  import type { ModelSettings, ModelSettingsMap } from './model-settings.js';
@@ -82,16 +82,29 @@ interface Notice {
82
82
  }
83
83
  export declare function formatUsd(value: number | undefined): string;
84
84
  export declare function formatTime(value: string | undefined): string;
85
+ /** Relative time uses the actual scheduled instant, not the refresh interval. */
86
+ export declare function formatRelativeDeadline(value: string | undefined, now: number, dueText: string): string;
87
+ export declare function formatRefreshCountdown(value: string | undefined, now: number): string;
85
88
  /** Token capacities use the same zh-CN grouping as amounts so large windows stay readable. */
86
89
  export declare function formatTokens(value: number | undefined): string;
90
+ /** Compact credits for the summary; exact figures remain available to assistive technology. */
91
+ export declare function formatWindowCredits(value: number): string;
92
+ type QuotaTone = 'neutral' | 'good' | 'warn' | 'critical';
93
+ export declare function quotaStatusView(quota: QuotaSnapshot, now: number): {
94
+ title: string;
95
+ tone: QuotaTone;
96
+ icon: string;
97
+ window?: QuotaWindow;
98
+ };
87
99
  export interface QuotaViewProps {
88
100
  quota: QuotaSnapshot | undefined;
89
101
  nextAutoRefreshAt?: string | undefined;
90
102
  refreshIntervalSeconds?: number | undefined;
103
+ busy?: boolean | undefined;
91
104
  }
92
105
  /** Earliest still-future window reset; quota recovery comes only from `windows[].resetsAt`. */
93
106
  export declare function nextWindowResetAt(windows: readonly QuotaWindow[], now: number): string | undefined;
94
- export declare function QuotaView({ quota, nextAutoRefreshAt, refreshIntervalSeconds }: QuotaViewProps): React.DetailedReactHTMLElement<{
107
+ export declare function QuotaView({ quota, nextAutoRefreshAt, refreshIntervalSeconds, busy }: QuotaViewProps): React.DetailedReactHTMLElement<{
95
108
  className: string;
96
109
  role: "status";
97
110
  }, HTMLElement> | React.FunctionComponentElement<{
@@ -157,9 +170,11 @@ export interface ModelRowProps {
157
170
  authoritative: boolean;
158
171
  writable: boolean;
159
172
  pending: boolean;
173
+ price?: PriceCatalog['models'][number] | undefined;
174
+ priceKnown?: boolean | undefined;
160
175
  onCommit: (next: ModelSettings | undefined) => Promise<boolean>;
161
176
  }
162
- export declare function ModelRow({ model, settings, authoritative, writable, pending, onCommit }: ModelRowProps): React.DetailedReactHTMLElement<{
177
+ export declare function ModelRow({ model, settings, authoritative, writable, pending, price, priceKnown, onCommit }: ModelRowProps): React.DetailedReactHTMLElement<{
163
178
  className: string;
164
179
  }, HTMLElement>;
165
180
  export interface ModelsProps {
@@ -170,8 +185,11 @@ export interface ModelsProps {
170
185
  onRefreshModels: () => void;
171
186
  refreshingModels: boolean;
172
187
  notice: Notice | null;
188
+ prices?: PriceCatalog | undefined;
189
+ refreshingPrices?: boolean | undefined;
190
+ onRefreshPrices?: (() => void) | undefined;
173
191
  }
174
- export declare function Models({ status, formSnapshot, setFormField, pendingField, onRefreshModels, refreshingModels, notice }: ModelsProps): React.FunctionComponentElement<{
192
+ export declare function Models({ status, formSnapshot, setFormField, pendingField, onRefreshModels, refreshingModels, notice, prices, refreshingPrices, onRefreshPrices }: ModelsProps): React.FunctionComponentElement<{
175
193
  children?: React.ReactNode | undefined;
176
194
  }>;
177
195
  export interface AdvancedProps {