perf(coding-agent): deferred heavy module imports to startup paths

- Lazy-loaded OTEL SDK, HTML export, TTSR, and autoresearch modules.
- Made resolveMemoryBackend async to import backends on demand.
- Replaced backend resolution with direct settings reads for rekey checks.
This commit is contained in:
can1357
2026-06-06 23:25:18 +02:00
parent 5ec6c0e7a7
commit f552ce4e6d
16 changed files with 95 additions and 70 deletions
@@ -35,7 +35,7 @@ const server = Bun.serve({
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = `http://localhost:${server.port}/v1/traces`;
process.env.OTEL_SERVICE_NAME = "oh-my-pi-export-probe";
initTelemetryExport();
await initTelemetryExport();
if (!isTelemetryExportEnabled()) {
console.error("PROBE: provider did not register");
await server.stop(true);