{"agent":"claude","input":"Add real-time updates to this tRPC and Next.js app so that a post added in one browser tab appears in every open tab without a refresh. Read package.json, src/server/trpc.ts, src/server/routers/post.ts, src/server/routers/_app.ts, src/server/context.ts, src/utils/trpc.ts, src/pages/api/trpc/[trpc].ts, src/pages/index.tsx, src/server/routers/post.test.ts, playwright/smoke.test.ts and .github/workflows first. Add a post.onAdd subscription as an async generator that replays posts newer than lastEventId, then yields each new post wrapped in tracked() from an event emitter that post.add emits on, and stops on the abort signal. Serve subscriptions over server-sent events with the fetch adapter in an App Router route at the same /api/trpc path, enable the sse ping and inactivity reconnect in initTRPC, and keep the Pages Router handler for queries and mutations. On the client add a splitLink that sends subscriptions to httpSubscriptionLink and everything else to the existing link, and subscribe on the index page, inserting each post into the post.list infinite query cache instead of refetching. Add a vitest case for the subscription and a two-tab Playwright test. Run pnpm prebuild, pnpm test-unit, pnpm build, pnpm test-e2e and pnpm tsc with a Postgres, and open a pull request. Do not change the Prisma schema or the existing procedures' inputs.","resources":[{"url":"https://github.com/your-org/your-app"}]}