@thehammer/danx-session-telemetry 0.1.18 → 0.1.20

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.
@@ -40,7 +40,8 @@
40
40
  * producers derive `activity_id` from the same thing: the sub-agent's transcript
41
41
  * file basename, `agent-<agent_id>`. The watcher has it directly; a hook has the
42
42
  * `agent_id` and builds the same basename from it (`subagentActivityId` in
43
- * danx-dashboard-mcp's `activity.ts`). A hook's `transcript_path` is NOT the
43
+ * danx-dashboard-mcp's `activity.ts`, which also strips an `agent-` prefix the hooks docs show
44
+ * on some `agent_id`s so both forms reach this key). A hook's `transcript_path` is NOT the
44
45
  * sub-agent's file — on these events it is the MAIN session's transcript, and only
45
46
  * `SubagentStop` also carries the sub-agent's own as `agent_transcript_path`,
46
47
  * which the subcommand uses to refuse a key that disagrees. That basename is also
package/dist/pricing.d.ts CHANGED
@@ -31,6 +31,17 @@
31
31
  * Haiku 3.5) are not in Claude Code's own model-tag surface and are left out
32
32
  * on the same basis the table already excludes them.
33
33
  *
34
+ * DX-3960 — re-read the whole "Model pricing" table and the "Fast mode pricing"
35
+ * section again, 2026-10-01, https://platform.claude.com/docs/en/about-claude/pricing
36
+ * (cross-checked against the claude-api skill's model table). Found:
37
+ * `claude-sonnet-5-5` ($2 in / $10 out, $2.50 5m write, $4 1h write, $0.20 hit)
38
+ * was missing, so every Sonnet 5.5 bucket in production priced at $0; added.
39
+ * Every other row matched; fast mode is still Opus 5.5 / Opus 5 / Opus 4.8 only.
40
+ * A model id with no row is never silently $0: `priceUsage` returns
41
+ * `unpriced`, the ledger writer records a visible `unpriced_model` dispatch
42
+ * event for it, and `src/agent/priced-models.test.ts` (danxbot root) fails the
43
+ * suite when a model danxbot can select has no row.
44
+ *
34
45
  * DX-2963 — cache writes are TWO prices, never one: a 5-minute write is
35
46
  * 1.25x base input and a 1-hour write is 2x base input. Claude Code reports
36
47
  * each lifetime separately (`usage.cache_creation.ephemeral_5m_input_tokens` /
package/dist/pricing.js CHANGED
@@ -31,6 +31,17 @@
31
31
  * Haiku 3.5) are not in Claude Code's own model-tag surface and are left out
32
32
  * on the same basis the table already excludes them.
33
33
  *
34
+ * DX-3960 — re-read the whole "Model pricing" table and the "Fast mode pricing"
35
+ * section again, 2026-10-01, https://platform.claude.com/docs/en/about-claude/pricing
36
+ * (cross-checked against the claude-api skill's model table). Found:
37
+ * `claude-sonnet-5-5` ($2 in / $10 out, $2.50 5m write, $4 1h write, $0.20 hit)
38
+ * was missing, so every Sonnet 5.5 bucket in production priced at $0; added.
39
+ * Every other row matched; fast mode is still Opus 5.5 / Opus 5 / Opus 4.8 only.
40
+ * A model id with no row is never silently $0: `priceUsage` returns
41
+ * `unpriced`, the ledger writer records a visible `unpriced_model` dispatch
42
+ * event for it, and `src/agent/priced-models.test.ts` (danxbot root) fails the
43
+ * suite when a model danxbot can select has no row.
44
+ *
34
45
  * DX-2963 — cache writes are TWO prices, never one: a 5-minute write is
35
46
  * 1.25x base input and a 1-hour write is 2x base input. Claude Code reports
36
47
  * each lifetime separately (`usage.cache_creation.ephemeral_5m_input_tokens` /
@@ -76,6 +87,10 @@ const PRICING = {
76
87
  "claude-opus-4-5": price(5, 25, 0.5),
77
88
  "claude-opus-4-20250514": price(15, 75, 1.5),
78
89
  "claude-sonnet-5": price(2, 10, 0.2),
90
+ // DX-3960 — Claude Sonnet 5.5, page row ($2 in / $2.50 5m / $4 1h / $0.20 hit /
91
+ // $10 out). Its absence priced every sonnet-5-5 bucket at $0. No fast row: the
92
+ // page's "Fast mode pricing" section lists Opus 5.5 / Opus 5 / Opus 4.8 only.
93
+ "claude-sonnet-5-5": price(2, 10, 0.2),
79
94
  "claude-sonnet-4-6": price(3, 15, 0.3),
80
95
  "claude-sonnet-4-5-20250929": price(3, 15, 0.3),
81
96
  "claude-sonnet-4-20250514": price(3, 15, 0.3),
@@ -111,9 +111,9 @@ export interface SessionLogWatcherOptions {
111
111
  * This is the transcript-side producer of the dispatch's running set. It
112
112
  * reports the sub-agent's ledger source key, which is the same value its
113
113
  * `dispatch_activities.activity_id` and its per-source token total join on —
114
- * so a hook-side producer reporting the same sub-agent by its
115
- * `transcript_path` resolves to this same id and upserts the SAME row rather
116
- * than a duplicate.
114
+ * so a hook-side producer reporting the same sub-agent by its `agent_id`
115
+ * (`agent-` + the id, DX-3284) resolves to this same id and upserts the SAME
116
+ * row rather than a duplicate.
117
117
  *
118
118
  * Fired once per source, from the discovery pass, for sub-agent files only —
119
119
  * never for the main transcript, which is the dispatch itself, not an activity
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-session-telemetry",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
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",