@thehammer/danx-session-telemetry 0.1.33 → 0.1.34
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 +0 -0
- package/dist/pricing.d.ts +0 -14
- package/dist/pricing.js +0 -14
- package/dist/session-log-watcher.d.ts +2 -2
- package/dist/session-log-watcher.js +2 -2
- package/package.json +1 -1
- package/dist/.source-hash +0 -1
package/README.md
CHANGED
|
File without changes
|
package/dist/pricing.d.ts
CHANGED
|
@@ -73,20 +73,6 @@ 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[];
|
|
90
76
|
export type PriceResult = {
|
|
91
77
|
kind: "priced";
|
|
92
78
|
costUsd: number;
|
package/dist/pricing.js
CHANGED
|
@@ -130,20 +130,6 @@ 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
|
-
}
|
|
147
133
|
/**
|
|
148
134
|
* Price one unit of usage. NEVER throws (DX-2963 replaces DX-1720's throw):
|
|
149
135
|
* an unknown model — or a fast reply on a model with no fast price — returns
|
|
@@ -433,7 +433,7 @@ export declare class SessionLogWatcher {
|
|
|
433
433
|
*
|
|
434
434
|
* This method gives the finalize backstop a deterministic, cause-agnostic
|
|
435
435
|
* way to resolve the file: by the time a dispatch finalizes, the agent's
|
|
436
|
-
*
|
|
436
|
+
* the dispatch-complete call's tool_use is already written to the JSONL, so the file
|
|
437
437
|
* is guaranteed present on disk. It scans the watcher's OWN `sessionDir`
|
|
438
438
|
* (the dir derived from `agentCwd` at construction — the same dir claude
|
|
439
439
|
* wrote to) for the dispatch tag. Returns the file path, or null when no
|
|
@@ -451,7 +451,7 @@ export declare class SessionLogWatcher {
|
|
|
451
451
|
* Read any JSONL bytes appended since the last scheduled poll tick. Used by
|
|
452
452
|
* the launcher's cleanup path to capture the agent's final assistant entry
|
|
453
453
|
* (the one carrying the closing `usage` block + the `tool_use` for
|
|
454
|
-
*
|
|
454
|
+
* the dispatch-complete call) before stop() halts polling. Without this, the row
|
|
455
455
|
* finalized by `DispatchTracker.finalize` snapshots stale `job.usage` and
|
|
456
456
|
* the dispatches table undercounts every token + counter field by exactly
|
|
457
457
|
* what the JSONL grew between ticks.
|
|
@@ -653,7 +653,7 @@ export class SessionLogWatcher {
|
|
|
653
653
|
*
|
|
654
654
|
* This method gives the finalize backstop a deterministic, cause-agnostic
|
|
655
655
|
* way to resolve the file: by the time a dispatch finalizes, the agent's
|
|
656
|
-
*
|
|
656
|
+
* the dispatch-complete call's tool_use is already written to the JSONL, so the file
|
|
657
657
|
* is guaranteed present on disk. It scans the watcher's OWN `sessionDir`
|
|
658
658
|
* (the dir derived from `agentCwd` at construction — the same dir claude
|
|
659
659
|
* wrote to) for the dispatch tag. Returns the file path, or null when no
|
|
@@ -692,7 +692,7 @@ export class SessionLogWatcher {
|
|
|
692
692
|
* Read any JSONL bytes appended since the last scheduled poll tick. Used by
|
|
693
693
|
* the launcher's cleanup path to capture the agent's final assistant entry
|
|
694
694
|
* (the one carrying the closing `usage` block + the `tool_use` for
|
|
695
|
-
*
|
|
695
|
+
* the dispatch-complete call) before stop() halts polling. Without this, the row
|
|
696
696
|
* finalized by `DispatchTracker.finalize` snapshots stale `job.usage` and
|
|
697
697
|
* the dispatches table undercounts every token + counter field by exactly
|
|
698
698
|
* what the JSONL grew between ticks.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thehammer/danx-session-telemetry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
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",
|
package/dist/.source-hash
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fcb9cebd4c4e0d000f864b88609af799e759befd5f16cebfdd96438c8e28fd25
|