@lynn123411/dsh-a6api 1.0.1 → 1.2.0

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.
@@ -1,4 +1,4 @@
1
- import type { MerchantChannelInfo } from '../types.js';
1
+ import type { ApiRoutingLogItem, MerchantChannelInfo } from '../types.js';
2
2
  export interface ProbeResult {
3
3
  modelName: string;
4
4
  success: boolean;
@@ -11,4 +11,4 @@ export interface ProbeResult {
11
11
  /** Probe a single model by sending a 1-token prompt and querying logs */
12
12
  export declare function probeSingleModel(baseURL: string, apiKey: string, userId?: string, accessToken?: string, modelName?: string): Promise<ProbeResult>;
13
13
  /** Pre-populate merchant cards from recent logs without triggering live probe */
14
- export declare function getKnownMerchantsFromLogs(userId?: string, accessToken?: string, modelNames?: string[]): Promise<Record<string, MerchantChannelInfo>>;
14
+ export declare function getKnownMerchantsFromLogs(userId?: string, accessToken?: string, modelNames?: string[], logs?: ApiRoutingLogItem[]): Promise<Record<string, MerchantChannelInfo>>;
@@ -120,6 +120,10 @@ export interface ModelCardData {
120
120
  probeError?: string;
121
121
  probeLatencyMs?: number;
122
122
  lastProbedAt?: number;
123
+ /** 路由快照时效:该模型最新一条「带 channel 的调用日志」时间(秒),即卡片商户数据来源请求的时刻 */
124
+ lastRoutedAt?: number;
125
+ /** 服务端算好的相对时间文案(如「3 小时前」),无记录时客户端显示「从未路由」 */
126
+ lastRoutedText?: string;
123
127
  }
124
128
  export interface BalanceInfo {
125
129
  hasAccountAuth: boolean;
@@ -158,3 +162,11 @@ export interface A6ApiStateResponse {
158
162
  dshConfiguredModels: string[];
159
163
  recentLogs?: ApiRoutingLogItem[];
160
164
  }
165
+ export interface PriceFluctuationState {
166
+ pendingCount: number;
167
+ unseenCount: number;
168
+ totalCount: number;
169
+ updatedAt: number | null;
170
+ hasAuth?: boolean;
171
+ authError?: boolean;
172
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lynn123411/dsh-a6api",
3
- "version": "1.0.1",
4
- "description": "A6API 多模型聚合站接入插件:原生 LLM 提供商注册、账户实时余额监控与预警、Token 模型列表白名单同步、商户线路实时探测与全景指标卡片展示",
3
+ "version": "1.2.0",
4
+ "description": "A6API 多模型聚合站接入插件:原生 LLM 提供商注册、账户实时余额与价格波动监控、Token 白名单同步、商户线路探测与全景指标卡片",
5
5
  "license": "MIT",
6
6
  "author": "lynn123411",
7
7
  "repository": {