toknmtr-selfhost/src/lib/server/config.ts
megaproxy 71a60ab054 toknmtr — self-hostable Claude Code usage & analytics dashboard
Server (SvelteKit + SQLite Docker container) + per-machine agent that parses
Claude Code JSONL transcripts. docker-compose one-command deploy; raw transcript
view + search gated behind SHOW_TRANSCRIPTS (hidden by default).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 19:33:55 +01:00

18 lines
802 B
TypeScript

import { env } from '$env/dynamic/private';
/**
* Runtime feature flags. Read from the environment lazily (via `$env/dynamic/private`)
* so the container is reconfigurable without a rebuild.
*/
/**
* Gate for the raw-conversation surfaces — the full per-session **transcript view**
* (`/sessions/[host]/[sessionId]`) and full-text **search** (`/search` + `/api/search`),
* both of which expose verbatim prompt/response text.
*
* Defaults to **false (hidden)**: the dashboard is currently reachable publicly, so no
* conversation content should be readable. Aggregate analytics (charts, KPIs, the sessions
* list metadata) stay public regardless. Flip on with `SHOW_TRANSCRIPTS=true` once access
* is gated behind auth.
*/
export const showTranscripts = env.SHOW_TRANSCRIPTS === 'true';