@kenz1117/dsh-ui-usage-billing 1.4.26 → 1.4.27

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/lib/index.js CHANGED
@@ -1576,6 +1576,30 @@ const BUILTIN_MODEL_CATALOG = [
1576
1576
  output: 10
1577
1577
  }
1578
1578
  },
1579
+ {
1580
+ key: "gpt-image-2",
1581
+ name: "GPT Image 2",
1582
+ provider: "OpenAI",
1583
+ colorVar: "ds-green",
1584
+ price: {
1585
+ currency: "CNY",
1586
+ input: 14,
1587
+ cacheHit: 5.6,
1588
+ output: 84
1589
+ }
1590
+ },
1591
+ {
1592
+ key: "gpt-image-2.5-sunburst",
1593
+ name: "GPT Image 2.5 Sunburst",
1594
+ provider: "OpenAI",
1595
+ colorVar: "ds-green",
1596
+ price: {
1597
+ currency: "CNY",
1598
+ input: 14,
1599
+ cacheHit: 5.6,
1600
+ output: 84
1601
+ }
1602
+ },
1579
1603
  {
1580
1604
  key: "gemini-pro",
1581
1605
  name: "Gemini 3.1 Pro",
@@ -2415,7 +2439,10 @@ const BUILTIN_MODEL_KEY_ALIASES = {
2415
2439
  "grok-4.5": "grok-4.5",
2416
2440
  "grok-4-5": "grok-4.5",
2417
2441
  "grok-4.6": "grok",
2418
- "grok-4-6": "grok"
2442
+ "grok-4-6": "grok",
2443
+ "gpt-image-2": "gpt-image-2",
2444
+ "gpt-image-2.5-sunburst": "gpt-image-2.5-sunburst",
2445
+ "gpt-image-2-5-sunburst": "gpt-image-2.5-sunburst"
2419
2446
  };
2420
2447
  //#endregion
2421
2448
  //#region lib/types/aggregate.js
@@ -3399,7 +3426,7 @@ function createUsageAggregator(persistence, options = {}) {
3399
3426
  id,
3400
3427
  ...cwd === void 0 ? {} : { cwd },
3401
3428
  ...stamp === null ? {} : { stamp },
3402
- foldVersion: 19,
3429
+ foldVersion: 20,
3403
3430
  fingerprint: foldFingerprint,
3404
3431
  fold: serializeFold(fold)
3405
3432
  };
@@ -3506,7 +3533,7 @@ function createUsageAggregator(persistence, options = {}) {
3506
3533
  try {
3507
3534
  const cwd = meta.cwd;
3508
3535
  const ledgerRow = ledger.get(id);
3509
- if (ledgerRow !== void 0 && ledgerRow.stamp !== void 0 && stamp !== null && ledgerRow.stamp === stamp && (ledgerRow.foldVersion ?? 1) === 19 && ledgerRow.fingerprint === foldFingerprint) {
3536
+ if (ledgerRow !== void 0 && ledgerRow.stamp !== void 0 && stamp !== null && ledgerRow.stamp === stamp && (ledgerRow.foldVersion ?? 1) === 20 && ledgerRow.fingerprint === foldFingerprint) {
3510
3537
  const fold = deserializeFold(ledgerRow.fold);
3511
3538
  folds.push({
3512
3539
  id,
@@ -3594,7 +3621,7 @@ function createUsageAggregator(persistence, options = {}) {
3594
3621
  for (const entry of ledger.values()) {
3595
3622
  if (included.has(entry.id)) continue;
3596
3623
  try {
3597
- const stale = (entry.foldVersion ?? 1) < 19 || entry.fingerprint !== foldFingerprint;
3624
+ const stale = (entry.foldVersion ?? 1) < 20 || entry.fingerprint !== foldFingerprint;
3598
3625
  folds.push({
3599
3626
  id: entry.id,
3600
3627
  ...entry.cwd === void 0 ? {} : { cwd: entry.cwd },
@@ -568,7 +568,7 @@ export interface UsageLedgerDocument {
568
568
  * 会话费用只剩最近一段,issue #29)。
569
569
  * 持久账本行据此区分新旧算法:日志已删/不可读而只能沿用旧行时,UI 标注置信度提示。
570
570
  */
571
- export declare const FOLD_VERSION = 19;
571
+ export declare const FOLD_VERSION = 20;
572
572
  /**
573
573
  * 一次性账本迁移:id 唯一,apply 在加载边界对原始文档执行,已应用过的跳过。
574
574
  * 未来账本/schema 字段变更(重命名、拆桶、语义调整)时,在此追加一条迁移并
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kenz1117/dsh-ui-usage-billing",
3
3
  "description": "Usage billing dashboard for DeepSeek Harness: sidebar cost metrics plus a full dashboard modal, priced from a current multi-provider catalog with real usage aggregated from session logs.",
4
- "version": "1.4.26",
4
+ "version": "1.4.27",
5
5
  "keywords": [
6
6
  "deepseek-harness",
7
7
  "deepseek",