@thehammer/danx-session-telemetry 0.1.29 → 0.1.33

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/dist/.source-hash CHANGED
@@ -1 +1 @@
1
- 2f856d47ffedab1236ae8ab337dfdd4c37c3d578a819f50ffee9f8603865c721
1
+ fcb9cebd4c4e0d000f864b88609af799e759befd5f16cebfdd96438c8e28fd25
package/dist/pricing.d.ts CHANGED
@@ -73,6 +73,20 @@ export interface PricedTokens {
73
73
  export declare const SYNTHETIC_MODEL = "<synthetic>";
74
74
  /** The `usage.speed` value a fast-mode reply carries. */
75
75
  export declare const FAST_SPEED = "fast";
76
+ /** DX-4593 - whether a `speed:"fast"` request on `model` is billed at the STANDARD row (see `FAST_BILLS_AT_STANDARD_RATE`): it has no fast row of its own. */
77
+ export declare function billsFastAtStandardRate(model: string): boolean;
78
+ /** One row of the list-price table: a model at a speed and its five per-million-token prices. */
79
+ export interface ListPriceRow {
80
+ model: string;
81
+ speed: "standard" | "fast";
82
+ price: ModelPrice;
83
+ }
84
+ /**
85
+ * DX-4593 - every row of the list-price table as data: each priced model at standard speed, then each model with its own fast row at fast
86
+ * speed. This is the SEED a team's editable price table starts from (`src/token-prices/`); it is a copy, so editing a team's price never
87
+ * changes this table and `priceUsage` keeps pricing the ledger from it.
88
+ */
89
+ export declare function listListPrices(): ListPriceRow[];
76
90
  export type PriceResult = {
77
91
  kind: "priced";
78
92
  costUsd: number;
package/dist/pricing.js CHANGED
@@ -130,6 +130,20 @@ const FAST_BILLS_AT_STANDARD_RATE = new Set([
130
130
  "claude-opus-4-6",
131
131
  "claude-opus-4-6-20250916",
132
132
  ]);
133
+ /** DX-4593 - whether a `speed:"fast"` request on `model` is billed at the STANDARD row (see `FAST_BILLS_AT_STANDARD_RATE`): it has no fast row of its own. */
134
+ export function billsFastAtStandardRate(model) {
135
+ return FAST_BILLS_AT_STANDARD_RATE.has(model);
136
+ }
137
+ /**
138
+ * DX-4593 - every row of the list-price table as data: each priced model at standard speed, then each model with its own fast row at fast
139
+ * speed. This is the SEED a team's editable price table starts from (`src/token-prices/`); it is a copy, so editing a team's price never
140
+ * changes this table and `priceUsage` keeps pricing the ledger from it.
141
+ */
142
+ export function listListPrices() {
143
+ const standard = Object.entries(PRICING).map(([model, price]) => ({ model, speed: "standard", price: { ...price } }));
144
+ const fast = Object.entries(FAST_PRICING).map(([model, price]) => ({ model, speed: "fast", price: { ...price } }));
145
+ return [...standard, ...fast];
146
+ }
133
147
  /**
134
148
  * Price one unit of usage. NEVER throws (DX-2963 replaces DX-1720's throw):
135
149
  * an unknown model — or a fast reply on a model with no fast price — returns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-session-telemetry",
3
- "version": "0.1.29",
3
+ "version": "0.1.33",
4
4
  "description": "Shared Claude Code transcript collector (DX-2962) — incremental JSONL tailing for the danxbot worker and the danx-dashboard-mcp desktop bridge, so both run identical collector code.",
5
5
  "license": "MIT",
6
6
  "type": "module",