{"agent":"claude","input":"Add Prometheus metrics to this tRPC API. Read package.json, src/server/trpc.ts, src/server/routers/_app.ts, src/server/routers/post.ts, src/server/routers/post.test.ts, src/server/context.ts, src/server/prisma.ts, src/server/env.ts, src/pages/api/trpc/[trpc].ts, vitest.config.mts and .github/workflows/main.yml first. Install prom-client and create src/server/metrics.ts with a registry kept on globalThis outside production the way prisma.ts keeps its client, default metrics, a duration histogram labelled by procedure path, type and ok, and an error counter labelled by path and TRPCError code. Add a tRPC middleware in trpc.ts that times each procedure and apply it to publicProcedure so every router is covered. Add src/pages/api/metrics.ts that serves the registry with its content type and checks an optional METRICS_TOKEN from env.ts. Write a Vitest test that calls healthcheck and a missing post.byId through createCaller and asserts the histogram count and the NOT_FOUND counter. Start PostgreSQL, run pnpm install, pnpm prebuild, pnpm test-unit and pnpm tsc, start the dev server, hit two procedures and read /api/metrics, then open a pull request with the real metric lines.","resources":[{"url":"https://github.com/your-org/your-app"}]}