@shi-yangyang/dsh-token-dashboard 0.0.0-stage → 0.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.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +166 -0
  3. package/README.md +165 -2
  4. package/THIRD_PARTY_NOTICES.md +25 -0
  5. package/client/client.js +22897 -0
  6. package/cordis.patch.yml +7 -0
  7. package/icon.svg +13 -0
  8. package/lib/host/aggregate.d.ts +61 -0
  9. package/lib/host/aggregate.js +472 -0
  10. package/lib/host/fold.d.ts +103 -0
  11. package/lib/host/fold.js +375 -0
  12. package/lib/host/index.d.ts +24 -0
  13. package/lib/host/index.js +116 -0
  14. package/lib/host/prices.d.ts +42 -0
  15. package/lib/host/prices.js +118 -0
  16. package/lib/host/server.d.ts +30 -0
  17. package/lib/host/server.js +177 -0
  18. package/lib/host/source.d.ts +37 -0
  19. package/lib/host/source.js +179 -0
  20. package/lib/host/types.d.ts +133 -0
  21. package/lib/host/types.js +9 -0
  22. package/lib/host/verify.d.ts +14 -0
  23. package/lib/host/verify.js +79 -0
  24. package/lib/shared/builtin-prices.d.ts +27 -0
  25. package/lib/shared/builtin-prices.generated.d.ts +7 -0
  26. package/lib/shared/builtin-prices.generated.js +1433 -0
  27. package/lib/shared/builtin-prices.js +111 -0
  28. package/lib/shared/dates.d.ts +23 -0
  29. package/lib/shared/dates.js +79 -0
  30. package/lib/shared/export.d.ts +13 -0
  31. package/lib/shared/export.js +113 -0
  32. package/lib/shared/format.d.ts +23 -0
  33. package/lib/shared/format.js +108 -0
  34. package/lib/shared/model.d.ts +37 -0
  35. package/lib/shared/model.js +87 -0
  36. package/lib/shared/pricing.d.ts +70 -0
  37. package/lib/shared/pricing.js +192 -0
  38. package/lib/shared/range.d.ts +34 -0
  39. package/lib/shared/range.js +93 -0
  40. package/lib/shared/types.d.ts +168 -0
  41. package/lib/shared/types.js +10 -0
  42. package/locale/en.json +6 -0
  43. package/locale/zh.json +6 -0
  44. package/package.json +93 -4
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Built-in list prices, per one million tokens, in USD.
3
+ *
4
+ * DeepSeek rates are the official peak-hour prices published on 2026-10-30:
5
+ * off-peak is half. Other entries mirror the public OpenRouter model list.
6
+ * They are estimates, not a provider invoice, and the user can override any
7
+ * rate in the dashboard.
8
+ */
9
+ import type { ModelPrice } from './pricing.js';
10
+ export declare const BUILTIN_PRICE_UPDATED = "2026-10-30";
11
+ export declare const BUILTIN_PRICE_SOURCE = "DeepSeek official + OpenRouter snapshot";
12
+ export interface BuiltinPriceEntry {
13
+ id: string;
14
+ aliases: readonly string[];
15
+ price: ModelPrice;
16
+ }
17
+ export declare const BUILTIN_PRICES: readonly BuiltinPriceEntry[];
18
+ /**
19
+ * Every useful lookup form for one model id: the raw id, the id without its
20
+ * vendor prefix, without a `:free`/`:batch` variant tag, without a trailing
21
+ * date stamp, and the canonical alias.
22
+ */
23
+ export declare function modelKeyCandidates(model: string): string[];
24
+ /** Resolve a built-in list price by model id, ignoring provider/date variants. */
25
+ export declare function builtinPriceFor(model: string): ModelPrice | undefined;
26
+ /** Prefer standard entries over batch and free variants when both match. */
27
+ export declare function modelVariantRank(id: string): number;
@@ -0,0 +1,7 @@
1
+ import type { ModelPrice } from './pricing.js';
2
+ export declare const GENERATED_PRICE_UPDATED = "2026-10-30";
3
+ export interface GeneratedPriceEntry {
4
+ id: string;
5
+ price: ModelPrice;
6
+ }
7
+ export declare const GENERATED_PRICES: readonly GeneratedPriceEntry[];