[Unit] Description=Lakehouse Langfuse → observer bridge — forwards LLM trace metadata to :3800 so KB learns from cost/latency/provider deltas Documentation=file:///home/profit/lakehouse/mcp-server/langfuse_bridge.ts After=network.target # No hard dependency on either Langfuse or observer — if either is down, # the bridge retries on the next tick without crashing. That's the # whole point of the cursor state file. [Service] Type=simple WorkingDirectory=/home/profit/lakehouse ExecStart=/home/profit/.bun/bin/bun run /home/profit/lakehouse/mcp-server/langfuse_bridge.ts Restart=on-failure RestartSec=30 # Credentials resolved from env. Matches how # crates/gateway/src/v1/langfuse_trace.rs reads them so both producer # (gateway emitter) and consumer (this bridge) share the same config. EnvironmentFile=-/etc/lakehouse/langfuse.env Environment=LANGFUSE_URL=http://localhost:3001 Environment=OBSERVER_URL=http://localhost:3800 Environment=LANGFUSE_POLL_MS=30000 Environment=LANGFUSE_BATCH_LIMIT=50 Environment=LANGFUSE_STATE_FILE=/var/lib/lakehouse-guard/langfuse_last_seen.json KillSignal=SIGTERM TimeoutStopSec=5 [Install] WantedBy=multi-user.target