@thehammer/danx-session-telemetry 0.1.23 → 0.1.25

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 CHANGED
@@ -41,7 +41,7 @@ own header comments for the per-file reasoning.
41
41
  |---|---|---|
42
42
  | **danxbot worker** (root repo, `tsx src/index.ts`) | npm **workspace** link (`"workspaces": ["packages/*"]` in root `package.json`, `"@thehammer/danx-session-telemetry"` in root `dependencies`) | The worker and this package always ship from the SAME repo commit — a workspace link means the worker runs whatever source the current commit carries, with zero drift risk and no dependency on registry propagation timing. The Docker image builds `dist/` for it in a dedicated builder stage (mirroring `dashboard-builder`/`frontend-builder` in `Dockerfile`) since the final image's `npm ci --omit=dev` never installs this package's own `devDependencies` (`typescript`). |
43
43
  | **`danx-dashboard-mcp` desktop bridge** (separate npm-published package, DX-2954) | Ordinary npm dependency, **pinned to the exact published version** the worker's commit ships | The bridge is a genuinely separate installable artifact (`npx -y @thehammer/danx-dashboard-mcp`), so it cannot workspace-link into danxbot's own checkout — it needs the real published bytes. Pinning exact (not `^`/`~`) is what makes "worker and MCP run identical collector code for any given release" true: MCP's own version bump is the only thing that ever changes what collector code it runs. |
44
- | **Dashboard server / dashboard SPA** (`src/dashboard/*`, `dashboard/*`) | Same npm dependency shape as the worker (dashboard's `src/` is root-repo code, so it resolves through the SAME root workspace link as the worker; `dashboard/` is its own separate npm package — DX-2963, the first real consumer there, adds an ordinary `dashboard/package.json` dependency, resolved by Vite/Vitest/`vue-tsc` through plain node_modules resolution, no alias needed) | No `@backend`-style alias is needed for an npm dependency the way one is needed for `dashboard/`'s reach into root `src/` — that alias exists because `dashboard/` is a SEPARATE package with no other way to reach root source; a real npm dependency resolves through ordinary node_modules lookup in every one of Vite's two configs, Vitest, `vue-tsc`, and the Dockerfile builder stages (`dashboard-deps-builder` runs `cd dashboard && npm ci` from `dashboard/`'s own manifests, so a `dashboard/package.json` dependency is resolvable with zero Dockerfile change). `dashboard/` is FROZEN (`.claude/rules/ui-deprecation.md`) — this card adds no dependency there since nothing consumes it yet; DX-2963 adds the one line when it wires the real counter into `DispatchDetail.vue`/`DispatchList.vue`. |
44
+ | **Dashboard server** (`src/dashboard/*`) | Same npm dependency shape as the worker (the dashboard server's `src/` is root-repo code, so it resolves through the SAME root workspace link as the worker) | An npm dependency resolves through ordinary node_modules lookup, so no `@backend`-style alias is needed. |
45
45
 
46
46
  ## Release order (DX-2962 AC3)
47
47
 
package/dist/.source-hash CHANGED
@@ -1 +1 @@
1
- e6bcf853731747abce107b80449eea1f0a08c13dc90336d527157f0d7bbb0d3a
1
+ a99005cc5028d93375bca47e2f9f264b443b8bccf00fa0e0c24e2de266b93acb
package/dist/browser.d.ts CHANGED
@@ -17,7 +17,7 @@
17
17
  * DX-2963 adds the first real runtime exports here: the one usage counter
18
18
  * (`usage-ledger.ts`) and the one pricing function (`pricing.ts`), both pure
19
19
  * arithmetic with no I/O — `usage-snapshot.ts` in danxbot root (bundled by the
20
- * frozen Vue SPA) imports through THIS subpath, never the main entry.
20
+ * React frontend) imports through THIS subpath, never the main entry.
21
21
  */
22
22
  export type { AgentLogEntry, AgentLineage } from "./types.js";
23
23
  export { truncStr } from "./tool-summary.js";
@@ -285,7 +285,7 @@ export declare function findNewestJsonlFile(dir: string, sessionId?: string): Pr
285
285
  * detection for that dispatch.
286
286
  *
287
287
  * So we scan BOTH a head window and a tail window (they overlap, covering
288
- * the whole file, for any file ≤ 2�—`SCAN_BYTES`). A resumed tag always
288
+ * the whole file, for any file ≤ 2x`SCAN_BYTES`). A resumed tag always
289
289
  * lands in the freshly-appended tail; a fresh tag always lands in the head.
290
290
  *
291
291
  * Returns the full path to the matching file, or null if no file matches.
@@ -223,7 +223,7 @@ export async function findNewestJsonlFile(dir, sessionId) {
223
223
  * detection for that dispatch.
224
224
  *
225
225
  * So we scan BOTH a head window and a tail window (they overlap, covering
226
- * the whole file, for any file ≤ 2�—`SCAN_BYTES`). A resumed tag always
226
+ * the whole file, for any file ≤ 2x`SCAN_BYTES`). A resumed tag always
227
227
  * lands in the freshly-appended tail; a fresh tag always lands in the head.
228
228
  *
229
229
  * Returns the full path to the matching file, or null if no file matches.
@@ -349,7 +349,7 @@ export function convertJsonlEntry(raw, lastTimestamp) {
349
349
  // thinking + text + tool_use, etc.) into one JSONL line per content
350
350
  // block, but stamps the SAME response-level `message.usage` on every
351
351
  // line. Surface `messageId` so downstream usage accumulators can dedupe
352
- // — without it, every multi-block turn over-counts tokens 2-5�—. See
352
+ // — without it, every multi-block turn over-counts tokens 2-5x. See
353
353
  // `.claude/rules/agent-dispatch.md`.
354
354
  const messageId = typeof message.id === "string" && message.id.length > 0
355
355
  ? message.id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-session-telemetry",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
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",