[{"data":1,"prerenderedAt":1958},["ShallowReactive",2],{"navigation_docs":3,"-build-on-top-stream-server":454,"-build-on-top-stream-server-surround":1953},[4,35,159,201,289,352,438],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24,29],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-zap",{"title":25,"path":26,"stem":27,"icon":28},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F4.agent-skills","i-lucide-sparkles",{"title":30,"path":31,"stem":32,"icon":33},"vs Other Loggers","\u002Fgetting-started\u002Fvs-other-loggers","1.getting-started\u002F5.vs-other-loggers","i-lucide-scale",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Logging","\u002Flogging","2.logging",[40,45,50,55,60,65,70,99,127],{"title":41,"path":42,"stem":43,"icon":44},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":46,"path":47,"stem":48,"icon":49},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":51,"path":52,"stem":53,"icon":54},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":56,"path":57,"stem":58,"icon":59},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":61,"path":62,"stem":63,"icon":64},"Catalogs","\u002Flogging\u002Fcatalogs","2.logging\u002F4.catalogs","i-lucide-book-open",{"title":66,"path":67,"stem":68,"icon":69},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F5.client-logging","i-lucide-monitor",{"title":71,"icon":72,"path":73,"stem":74,"children":75,"page":34},"AI SDK","i-simple-icons-vercel","\u002Flogging\u002Fai-sdk","2.logging\u002F6.ai-sdk",[76,79,84,89,94],{"title":41,"path":77,"stem":78,"icon":44},"\u002Flogging\u002Fai-sdk\u002Foverview","2.logging\u002F6.ai-sdk\u002F01.overview",{"title":80,"path":81,"stem":82,"icon":83},"Usage","\u002Flogging\u002Fai-sdk\u002Fusage","2.logging\u002F6.ai-sdk\u002F02.usage","i-lucide-code",{"title":85,"path":86,"stem":87,"icon":88},"Options","\u002Flogging\u002Fai-sdk\u002Foptions","2.logging\u002F6.ai-sdk\u002F03.options","i-lucide-sliders",{"title":90,"path":91,"stem":92,"icon":93},"Metadata","\u002Flogging\u002Fai-sdk\u002Fmetadata","2.logging\u002F6.ai-sdk\u002F04.metadata","i-lucide-database",{"title":95,"path":96,"stem":97,"icon":98},"Telemetry","\u002Flogging\u002Fai-sdk\u002Ftelemetry","2.logging\u002F6.ai-sdk\u002F05.telemetry","i-lucide-activity",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":34},"Better Auth","i-simple-icons-betterauth","\u002Flogging\u002Fbetter-auth","2.logging\u002F7.better-auth",[105,108,113,118,122],{"title":41,"path":106,"stem":107,"icon":44},"\u002Flogging\u002Fbetter-auth\u002Foverview","2.logging\u002F7.better-auth\u002F01.overview",{"title":109,"path":110,"stem":111,"icon":112},"Identify User","\u002Flogging\u002Fbetter-auth\u002Fidentify-user","2.logging\u002F7.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":114,"path":115,"stem":116,"icon":117},"Middleware","\u002Flogging\u002Fbetter-auth\u002Fmiddleware","2.logging\u002F7.better-auth\u002F03.middleware","i-lucide-shield",{"title":119,"path":120,"stem":121,"icon":69},"Client Sync","\u002Flogging\u002Fbetter-auth\u002Fclient-sync","2.logging\u002F7.better-auth\u002F04.client-sync",{"title":123,"path":124,"stem":125,"icon":126},"Performance","\u002Flogging\u002Fbetter-auth\u002Fperformance","2.logging\u002F7.better-auth\u002F05.performance","i-lucide-gauge",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":34},"Audit Logs","i-lucide-shield-check","\u002Flogging\u002Faudit","2.logging\u002F8.audit",[133,136,141,146,151,155],{"title":41,"path":134,"stem":135,"icon":44},"\u002Flogging\u002Faudit\u002Foverview","2.logging\u002F8.audit\u002F01.overview",{"title":137,"path":138,"stem":139,"icon":140},"Schema","\u002Flogging\u002Faudit\u002Fschema","2.logging\u002F8.audit\u002F02.schema","i-lucide-file-text",{"title":142,"path":143,"stem":144,"icon":145},"Recording","\u002Flogging\u002Faudit\u002Frecording","2.logging\u002F8.audit\u002F03.recording","i-lucide-pen-line",{"title":147,"path":148,"stem":149,"icon":150},"Drains","\u002Flogging\u002Faudit\u002Fpipeline","2.logging\u002F8.audit\u002F04.pipeline","i-lucide-link",{"title":152,"path":153,"stem":154,"icon":129},"Compliance","\u002Flogging\u002Faudit\u002Fcompliance","2.logging\u002F8.audit\u002F05.compliance",{"title":156,"path":157,"stem":158,"icon":64},"Recipes","\u002Flogging\u002Faudit\u002Frecipes","2.logging\u002F8.audit\u002F06.recipes",{"title":160,"path":161,"stem":162,"children":163,"page":34},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[164,169,174,179,184,188,191,196],{"title":165,"path":166,"stem":167,"icon":168},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":170,"path":171,"stem":172,"icon":173},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":175,"path":176,"stem":177,"icon":178},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":180,"path":181,"stem":182,"icon":183},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":185,"path":186,"stem":187,"icon":129},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":123,"path":189,"stem":190,"icon":126},"\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance",{"title":192,"path":193,"stem":194,"icon":195},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":197,"path":198,"stem":199,"icon":200},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":202,"path":203,"stem":204,"children":205,"page":34},"Frameworks","\u002Fframeworks","4.frameworks",[206,210,215,220,225,230,235,240,245,250,255,260,265,270,274,279,284],{"title":41,"path":207,"stem":208,"icon":209},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":211,"path":212,"stem":213,"icon":214},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":216,"path":217,"stem":218,"icon":219},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":221,"path":222,"stem":223,"icon":224},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":226,"path":227,"stem":228,"icon":229},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":231,"path":232,"stem":233,"icon":234},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":236,"path":237,"stem":238,"icon":239},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":241,"path":242,"stem":243,"icon":244},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":246,"path":247,"stem":248,"icon":249},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":251,"path":252,"stem":253,"icon":254},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":256,"path":257,"stem":258,"icon":259},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":261,"path":262,"stem":263,"icon":264},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":266,"path":267,"stem":268,"icon":269},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":271,"path":272,"stem":273,"icon":183},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":275,"path":276,"stem":277,"icon":278},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":280,"path":281,"stem":282,"icon":283},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":285,"path":286,"stem":287,"icon":288},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F17.custom-integration","i-lucide-puzzle",{"title":290,"path":291,"stem":292,"children":293,"page":34},"Build on top","\u002Fbuild-on-top","5.build-on-top",[294,297,302,307,312,316,321,326,330,334,338,342,347],{"title":41,"path":295,"stem":296,"icon":54},"\u002Fbuild-on-top\u002Foverview","5.build-on-top\u002F0.overview",{"title":298,"path":299,"stem":300,"icon":301},"In-process stream","\u002Fbuild-on-top\u002Fin-process-stream","5.build-on-top\u002F1.in-process-stream","i-lucide-radio-tower",{"title":303,"path":304,"stem":305,"icon":306},"Fanout","\u002Fbuild-on-top\u002Ffanout-and-multi-drain","5.build-on-top\u002F10.fanout-and-multi-drain","i-lucide-share-2",{"title":308,"path":309,"stem":310,"icon":311},"Identity headers","\u002Fbuild-on-top\u002Fidentity-headers","5.build-on-top\u002F11.identity-headers","i-lucide-fingerprint",{"title":313,"path":314,"stem":315,"icon":288},"Custom framework","\u002Fbuild-on-top\u002Fcustom-framework","5.build-on-top\u002F12.custom-framework",{"title":317,"path":318,"stem":319,"icon":320},"Stream server","\u002Fbuild-on-top\u002Fstream-server","5.build-on-top\u002F2.stream-server","i-lucide-radio",{"title":322,"path":323,"stem":324,"icon":325},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F3.fs-reader","i-lucide-folder-search",{"title":156,"path":327,"stem":328,"icon":329},"\u002Fbuild-on-top\u002Fconsumer-recipes","5.build-on-top\u002F4.consumer-recipes","i-lucide-chef-hat",{"title":331,"path":332,"stem":333,"icon":288},"Plugins","\u002Fbuild-on-top\u002Fplugins","5.build-on-top\u002F5.plugins",{"title":335,"path":336,"stem":337,"icon":28},"Custom enrichers","\u002Fbuild-on-top\u002Fcustom-enrichers","5.build-on-top\u002F6.custom-enrichers",{"title":339,"path":340,"stem":341,"icon":178},"Tail sampling","\u002Fbuild-on-top\u002Ftail-sampling","5.build-on-top\u002F7.tail-sampling",{"title":343,"path":344,"stem":345,"icon":346},"Custom drains","\u002Fbuild-on-top\u002Fcustom-drains","5.build-on-top\u002F8.custom-drains","i-lucide-code-2",{"title":348,"path":349,"stem":350,"icon":351},"Drain pipeline","\u002Fbuild-on-top\u002Fdrain-pipeline","5.build-on-top\u002F9.drain-pipeline","i-lucide-workflow",{"title":353,"path":354,"stem":355,"children":356,"page":34},"Adapters","\u002Fadapters","6.adapters",[357,360,400,415],{"title":41,"path":358,"stem":359,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":361,"path":362,"stem":363,"children":364,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[365,370,375,380,385,390,395],{"title":366,"path":367,"stem":368,"icon":369},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":371,"path":372,"stem":373,"icon":374},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":376,"path":377,"stem":378,"icon":379},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":381,"path":382,"stem":383,"icon":384},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":386,"path":387,"stem":388,"icon":389},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":391,"path":392,"stem":393,"icon":394},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":396,"path":397,"stem":398,"icon":399},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":401,"path":402,"stem":403,"children":404,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[405,410],{"title":406,"path":407,"stem":408,"icon":409},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":411,"path":412,"stem":413,"icon":414},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":416,"path":417,"stem":418,"children":419,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[420,424,429,433],{"title":421,"path":422,"stem":423,"icon":351},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline",{"title":425,"path":426,"stem":427,"icon":428},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":430,"path":431,"stem":432,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":434,"path":435,"stem":436,"icon":437},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":439,"path":440,"stem":441,"children":442,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[443,446,450],{"title":41,"path":444,"stem":445,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":447,"path":448,"stem":449,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":451,"path":452,"stem":453,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":455,"title":317,"body":456,"description":1946,"extension":1947,"links":1948,"meta":1949,"navigation":1950,"path":318,"seo":1951,"stem":319,"__hash__":1952},"docs\u002F5.build-on-top\u002F2.stream-server.md",{"type":457,"value":458,"toc":1930},"minimark",[459,475,487,516,522,599,604,610,642,652,665,669,673,771,781,844,853,860,958,1035,1038,1042,1147,1151,1164,1210,1214,1477,1490,1494,1500,1548,1551,1596,1676,1686,1690,1746,1750,1757,1763,1827,1834,1838,1841,1862,1908,1912,1926],[460,461,462,466,467,470,471,474],"callout",{"icon":13},[463,464,465],"strong",{},"Looking for the in-process primitive?"," This page covers the ",[463,468,469],{},"HTTP mini-server"," that exposes events over Server-Sent Events. For subscribers running inside the same Node process (scripts, tests, plugins), see ",[472,473,298],"a",{"href":299},".",[476,477,478,479,482,483,486],"p",{},"evlog ships a tiny HTTP server that exposes the ",[472,480,481],{"href":299},"in-process stream"," over ",[463,484,485],{},"Server-Sent Events",". It runs in the same Node process as your app, on its own ephemeral port — your API surface is untouched, and any consumer (browser tab, CLI, Tauri\u002FElectron devtool) can subscribe.",[460,488,491,496,508],{"icon":489,"color":490},"i-lucide-alert-triangle","warning",[476,492,493],{},[463,494,495],{},"Local development and long-lived self-hosted servers only.",[476,497,498,499,502,503,502,505,507],{},"The server lives in-process. On serverless platforms (",[463,500,501],{},"Vercel Functions",", ",[463,504,266],{},[463,506,280],{},"…), each invocation is isolated, so a subscriber on one isolate would never see events emitted from another. Use a real broker (Redis Streams, NATS, Pub\u002FSub…) for cross-instance fan-out.",[476,509,510,511,515],{},"It works perfectly in ",[512,513,514],"code",{},"pnpm dev",", on a Node \u002F Bun \u002F Deno container, on a long-lived VM, on Fly \u002F Railway \u002F Coolify-style instances.",[460,517,518,521],{"icon":117},[463,519,520],{},"Strict opt-in."," Nothing starts unless you set the option explicitly. There is no auto-enable in dev — the server only boots when you ask for it.",[523,524,527,530,591],"prompt",{":actions":525,"description":526,"icon":320},"[\"copy\",\"cursor\",\"windsurf\"]","Expose the evlog stream over SSE",[476,528,529],{},"Turn on the local stream server so I can subscribe to wide events from a browser tab, CLI, or Tauri\u002FElectron devtool.",[531,532,533,560,567,577,588],"ul",{},[534,535,536,537,540,541,544,545,540,548,551,552,555,556,559],"li",{},"Detect my framework and opt in explicitly (Nuxt: ",[512,538,539],{},"evlog.stream: true"," in ",[512,542,543],{},"nuxt.config.ts","; Next.js: ",[512,546,547],{},"defineStreamedInstrumentation({ stream: true })",[512,549,550],{},"instrumentation.ts","; Hono\u002FExpress\u002FFastify\u002FElysia\u002Fstandalone: call ",[512,553,554],{},"startStreamServer()"," once at boot and register the returned ",[512,557,558],{},"drain"," on the evlog drain hook)",[534,561,562,563,566],{},"Never enable in production by default; gate it behind ",[512,564,565],{},"process.env.NODE_ENV !== 'production'"," or a feature flag",[534,568,569,570,573,574],{},"For shared dev environments, set ",[512,571,572],{},"token: process.env.EVLOG_STREAM_TOKEN"," and pass it from the consumer as ",[512,575,576],{},"?token=...",[534,578,579,580,583,584,587],{},"Discover the URL from ",[512,581,582],{},".evlog\u002Fstream.url"," (or ",[512,585,586],{},"\u002Fapi\u002F_evlog\u002Fstream-info"," on Nuxt) — never hard-code the port, it's ephemeral",[534,589,590],{},"Skip on serverless platforms (Vercel Functions, Cloudflare Workers, AWS Lambda) — the server is in-process",[476,592,593,594],{},"Docs: ",[472,595,596],{"href":596,"rel":597},"https:\u002F\u002Fwww.evlog.dev\u002Fbuild-on-top\u002Fstream-server",[598],"nofollow",[600,601,603],"h2",{"id":602},"what-boots-up","What boots up",[476,605,606,607,609],{},"When you opt in, evlog calls ",[512,608,554],{}," and:",[611,612,613,624,632,639],"ol",{},[534,614,615,616,619,620,623],{},"Opens a ",[512,617,618],{},"node:http"," server bound to ",[512,621,622],{},"127.0.0.1"," on an OS-assigned ephemeral port.",[534,625,626,627,631],{},"Subscribes the SSE connections to the ",[472,628,630],{"href":629},"\u002Fbuild-on-top\u002Fin-process-stream#default-singleton","default in-process stream"," — every wide event flows through.",[534,633,634,635,638],{},"Writes the URL to ",[512,636,637],{},"\u003Ccwd>\u002F.evlog\u002Fstream.url"," so external tools can discover the port.",[534,640,641],{},"Prints a banner at startup:",[643,644,650],"pre",{"className":645,"code":647,"language":648,"meta":649},[646],"language-text","  [evlog] Stream → http:\u002F\u002F127.0.0.1:51203\n","text","",[512,651,647],{"__ignoreMap":649},[611,653,655],{"start":654},5,[534,656,657,658,502,661,664],{},"Cleans up the URL file and closes the server on ",[512,659,660],{},"SIGINT",[512,662,663],{},"SIGTERM",", and process exit.",[600,666,668],{"id":667},"per-framework","Per framework",[670,671,211],"h3",{"id":672},"nuxt",[643,674,678],{"className":675,"code":676,"filename":543,"language":677,"meta":649,"style":649},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineNuxtConfig({\n  modules: ['evlog\u002Fnuxt'],\n  evlog: {\n    stream: true,\n  },\n})\n","ts",[512,679,680,704,732,743,757,762],{"__ignoreMap":649},[681,682,685,689,692,696,700],"span",{"class":683,"line":684},"line",1,[681,686,688],{"class":687},"s7zQu","export",[681,690,691],{"class":687}," default",[681,693,695],{"class":694},"s2Zo4"," defineNuxtConfig",[681,697,699],{"class":698},"sTEyZ","(",[681,701,703],{"class":702},"sMK4o","{\n",[681,705,707,711,714,717,720,724,726,729],{"class":683,"line":706},2,[681,708,710],{"class":709},"swJcz","  modules",[681,712,713],{"class":702},":",[681,715,716],{"class":698}," [",[681,718,719],{"class":702},"'",[681,721,723],{"class":722},"sfazB","evlog\u002Fnuxt",[681,725,719],{"class":702},[681,727,728],{"class":698},"]",[681,730,731],{"class":702},",\n",[681,733,735,738,740],{"class":683,"line":734},3,[681,736,737],{"class":709},"  evlog",[681,739,713],{"class":702},[681,741,742],{"class":702}," {\n",[681,744,746,749,751,755],{"class":683,"line":745},4,[681,747,748],{"class":709},"    stream",[681,750,713],{"class":702},[681,752,754],{"class":753},"sfNiH"," true",[681,756,731],{"class":702},[681,758,759],{"class":683,"line":654},[681,760,761],{"class":702},"  },\n",[681,763,765,768],{"class":683,"line":764},6,[681,766,767],{"class":702},"}",[681,769,770],{"class":698},")\n",[476,772,773,774,776,777,780],{},"That's it — ",[512,775,514],{}," boots the server and prints the URL. Pass an options object instead of ",[512,778,779],{},"true"," for full control:",[643,782,784],{"className":675,"code":783,"language":677,"meta":649,"style":649},"evlog: {\n  stream: { port: 4317, token: process.env.EVLOG_STREAM_TOKEN },\n}\n",[512,785,786,796,839],{"__ignoreMap":649},[681,787,788,792,794],{"class":683,"line":684},[681,789,791],{"class":790},"sBMFI","evlog",[681,793,713],{"class":702},[681,795,742],{"class":702},[681,797,798,801,803,806,809,811,815,818,821,823,826,828,831,833,836],{"class":683,"line":706},[681,799,800],{"class":790},"  stream",[681,802,713],{"class":702},[681,804,805],{"class":702}," {",[681,807,808],{"class":790}," port",[681,810,713],{"class":702},[681,812,814],{"class":813},"sbssI"," 4317",[681,816,817],{"class":702},",",[681,819,820],{"class":790}," token",[681,822,713],{"class":702},[681,824,825],{"class":698}," process",[681,827,474],{"class":702},[681,829,830],{"class":698},"env",[681,832,474],{"class":702},[681,834,835],{"class":698},"EVLOG_STREAM_TOKEN",[681,837,838],{"class":702}," },\n",[681,840,841],{"class":683,"line":734},[681,842,843],{"class":702},"}\n",[476,845,846,847,849,850,852],{},"The Nuxt module also registers a tiny ",[512,848,586],{}," route that reads ",[512,851,582],{}," and returns the URL — useful when the consumer is a page on the same Nuxt app and needs to discover the mini-server's ephemeral port.",[670,854,856,857,859],{"id":855},"nextjs-instrumentationts","Next.js (",[512,858,550],{},")",[643,861,864],{"className":675,"code":862,"filename":863,"language":677,"meta":649,"style":649},"import { defineStreamedInstrumentation } from 'evlog\u002Fnext\u002Fstream'\n\nexport const { register, onRequestError } = defineStreamedInstrumentation({\n  service: 'my-app',\n  stream: true,\n})\n","lib\u002Fevlog.ts",[512,865,866,891,897,926,942,952],{"__ignoreMap":649},[681,867,868,871,873,876,879,882,885,888],{"class":683,"line":684},[681,869,870],{"class":687},"import",[681,872,805],{"class":702},[681,874,875],{"class":698}," defineStreamedInstrumentation",[681,877,878],{"class":702}," }",[681,880,881],{"class":687}," from",[681,883,884],{"class":702}," '",[681,886,887],{"class":722},"evlog\u002Fnext\u002Fstream",[681,889,890],{"class":702},"'\n",[681,892,893],{"class":683,"line":706},[681,894,896],{"emptyLinePlaceholder":895},true,"\n",[681,898,899,901,905,907,910,912,915,917,920,922,924],{"class":683,"line":734},[681,900,688],{"class":687},[681,902,904],{"class":903},"spNyl"," const",[681,906,805],{"class":702},[681,908,909],{"class":698}," register",[681,911,817],{"class":702},[681,913,914],{"class":698}," onRequestError ",[681,916,767],{"class":702},[681,918,919],{"class":702}," =",[681,921,875],{"class":694},[681,923,699],{"class":698},[681,925,703],{"class":702},[681,927,928,931,933,935,938,940],{"class":683,"line":745},[681,929,930],{"class":709},"  service",[681,932,713],{"class":702},[681,934,884],{"class":702},[681,936,937],{"class":722},"my-app",[681,939,719],{"class":702},[681,941,731],{"class":702},[681,943,944,946,948,950],{"class":683,"line":654},[681,945,800],{"class":709},[681,947,713],{"class":702},[681,949,754],{"class":753},[681,951,731],{"class":702},[681,953,954,956],{"class":683,"line":764},[681,955,767],{"class":702},[681,957,770],{"class":698},[643,959,961],{"className":675,"code":960,"filename":550,"language":677,"meta":649,"style":649},"import { defineNodeInstrumentation } from 'evlog\u002Fnext\u002Finstrumentation'\n\nexport const { register, onRequestError } = defineNodeInstrumentation(() =>\n  import('.\u002Flib\u002Fevlog')\n)\n",[512,962,963,983,987,1015,1031],{"__ignoreMap":649},[681,964,965,967,969,972,974,976,978,981],{"class":683,"line":684},[681,966,870],{"class":687},[681,968,805],{"class":702},[681,970,971],{"class":698}," defineNodeInstrumentation",[681,973,878],{"class":702},[681,975,881],{"class":687},[681,977,884],{"class":702},[681,979,980],{"class":722},"evlog\u002Fnext\u002Finstrumentation",[681,982,890],{"class":702},[681,984,985],{"class":683,"line":706},[681,986,896],{"emptyLinePlaceholder":895},[681,988,989,991,993,995,997,999,1001,1003,1005,1007,1009,1012],{"class":683,"line":734},[681,990,688],{"class":687},[681,992,904],{"class":903},[681,994,805],{"class":702},[681,996,909],{"class":698},[681,998,817],{"class":702},[681,1000,914],{"class":698},[681,1002,767],{"class":702},[681,1004,919],{"class":702},[681,1006,971],{"class":694},[681,1008,699],{"class":698},[681,1010,1011],{"class":702},"()",[681,1013,1014],{"class":903}," =>\n",[681,1016,1017,1020,1022,1024,1027,1029],{"class":683,"line":745},[681,1018,1019],{"class":702},"  import",[681,1021,699],{"class":698},[681,1023,719],{"class":702},[681,1025,1026],{"class":722},".\u002Flib\u002Fevlog",[681,1028,719],{"class":702},[681,1030,770],{"class":698},[681,1032,1033],{"class":683,"line":654},[681,1034,770],{"class":698},[476,1036,1037],{},"The stream server's drain is composed with any user-provided drain so events keep flowing to your other adapters too.",[670,1039,1041],{"id":1040},"standalone-node-bun-deno-script","Standalone Node \u002F Bun \u002F Deno script",[643,1043,1045],{"className":675,"code":1044,"language":677,"meta":649,"style":649},"import { startStreamServer } from 'evlog\u002Fstream'\nimport { initLogger } from 'evlog'\n\nconst server = await startStreamServer()\ninitLogger({ drain: server.drain })\n\n\u002F\u002F ... your script runs, devtools can subscribe ...\n",[512,1046,1047,1067,1086,1090,1109,1136,1140],{"__ignoreMap":649},[681,1048,1049,1051,1053,1056,1058,1060,1062,1065],{"class":683,"line":684},[681,1050,870],{"class":687},[681,1052,805],{"class":702},[681,1054,1055],{"class":698}," startStreamServer",[681,1057,878],{"class":702},[681,1059,881],{"class":687},[681,1061,884],{"class":702},[681,1063,1064],{"class":722},"evlog\u002Fstream",[681,1066,890],{"class":702},[681,1068,1069,1071,1073,1076,1078,1080,1082,1084],{"class":683,"line":706},[681,1070,870],{"class":687},[681,1072,805],{"class":702},[681,1074,1075],{"class":698}," initLogger",[681,1077,878],{"class":702},[681,1079,881],{"class":687},[681,1081,884],{"class":702},[681,1083,791],{"class":722},[681,1085,890],{"class":702},[681,1087,1088],{"class":683,"line":734},[681,1089,896],{"emptyLinePlaceholder":895},[681,1091,1092,1095,1098,1101,1104,1106],{"class":683,"line":745},[681,1093,1094],{"class":903},"const",[681,1096,1097],{"class":698}," server ",[681,1099,1100],{"class":702},"=",[681,1102,1103],{"class":687}," await",[681,1105,1055],{"class":694},[681,1107,1108],{"class":698},"()\n",[681,1110,1111,1114,1116,1119,1122,1124,1127,1129,1132,1134],{"class":683,"line":654},[681,1112,1113],{"class":694},"initLogger",[681,1115,699],{"class":698},[681,1117,1118],{"class":702},"{",[681,1120,1121],{"class":709}," drain",[681,1123,713],{"class":702},[681,1125,1126],{"class":698}," server",[681,1128,474],{"class":702},[681,1130,1131],{"class":698},"drain ",[681,1133,767],{"class":702},[681,1135,770],{"class":698},[681,1137,1138],{"class":683,"line":764},[681,1139,896],{"emptyLinePlaceholder":895},[681,1141,1143],{"class":683,"line":1142},7,[681,1144,1146],{"class":1145},"sHwdD","\u002F\u002F ... your script runs, devtools can subscribe ...\n",[670,1148,1150],{"id":1149},"hono-express-fastify-elysia-nestjs-sveltekit","Hono \u002F Express \u002F Fastify \u002F Elysia \u002F NestJS \u002F SvelteKit",[476,1152,1153,1154,1156,1157,1159,1160,1163],{},"These integrations work as documented in their respective ",[472,1155,202],{"href":207}," pages — no extra setup is required to use them with the stream server. The server is independent of the framework middleware: import ",[512,1158,554],{}," once at boot and pass ",[512,1161,1162],{},"server.drain"," wherever you compose your evlog drain.",[643,1165,1167],{"className":675,"code":1166,"language":677,"meta":649,"style":649},"import { startStreamServer } from 'evlog\u002Fstream'\n\nconst server = await startStreamServer()\n\u002F\u002F then plug `server.drain` into your evlog drain composer\n",[512,1168,1169,1187,1191,1205],{"__ignoreMap":649},[681,1170,1171,1173,1175,1177,1179,1181,1183,1185],{"class":683,"line":684},[681,1172,870],{"class":687},[681,1174,805],{"class":702},[681,1176,1055],{"class":698},[681,1178,878],{"class":702},[681,1180,881],{"class":687},[681,1182,884],{"class":702},[681,1184,1064],{"class":722},[681,1186,890],{"class":702},[681,1188,1189],{"class":683,"line":706},[681,1190,896],{"emptyLinePlaceholder":895},[681,1192,1193,1195,1197,1199,1201,1203],{"class":683,"line":734},[681,1194,1094],{"class":903},[681,1196,1097],{"class":698},[681,1198,1100],{"class":702},[681,1200,1103],{"class":687},[681,1202,1055],{"class":694},[681,1204,1108],{"class":698},[681,1206,1207],{"class":683,"line":745},[681,1208,1209],{"class":1145},"\u002F\u002F then plug `server.drain` into your evlog drain composer\n",[600,1211,1213],{"id":1212},"api","API",[643,1215,1217],{"className":675,"code":1216,"language":677,"meta":649,"style":649},"import { startStreamServer, type StreamServer, type StreamServerOptions } from 'evlog\u002Fstream'\n\nconst server: StreamServer = await startStreamServer({\n  port: 0,                  \u002F\u002F 0 = OS picks ephemeral port (default)\n  host: '127.0.0.1',        \u002F\u002F default — local-only, never exposed to LAN\n  token: 'optional-bearer', \u002F\u002F default: none (origin check used instead)\n  heartbeatMs: 15_000,      \u002F\u002F default\n  buffer: 500,              \u002F\u002F default ring buffer size\n  banner: true,             \u002F\u002F default — prints `[evlog] Stream → ...`\n  urlFileDir: '.evlog',     \u002F\u002F default — false to disable .evlog\u002Fstream.url\n})\n\nserver.url   \u002F\u002F → 'http:\u002F\u002F127.0.0.1:51203'\nserver.port  \u002F\u002F → 51203\nserver.drain \u002F\u002F DrainFn — pass to nitroApp.hooks.hook('evlog:drain', drain) or initLogger({ drain })\nserver.stream \u002F\u002F StreamDrain (the underlying in-process pub\u002Fsub)\nawait server.close() \u002F\u002F stop, remove .evlog\u002Fstream.url, unsubscribe clients\n",[512,1218,1219,1252,1256,1276,1291,1309,1328,1343,1359,1374,1394,1401,1406,1420,1433,1445,1458],{"__ignoreMap":649},[681,1220,1221,1223,1225,1227,1229,1232,1235,1237,1239,1242,1244,1246,1248,1250],{"class":683,"line":684},[681,1222,870],{"class":687},[681,1224,805],{"class":702},[681,1226,1055],{"class":698},[681,1228,817],{"class":702},[681,1230,1231],{"class":687}," type",[681,1233,1234],{"class":698}," StreamServer",[681,1236,817],{"class":702},[681,1238,1231],{"class":687},[681,1240,1241],{"class":698}," StreamServerOptions",[681,1243,878],{"class":702},[681,1245,881],{"class":687},[681,1247,884],{"class":702},[681,1249,1064],{"class":722},[681,1251,890],{"class":702},[681,1253,1254],{"class":683,"line":706},[681,1255,896],{"emptyLinePlaceholder":895},[681,1257,1258,1260,1262,1264,1266,1268,1270,1272,1274],{"class":683,"line":734},[681,1259,1094],{"class":903},[681,1261,1126],{"class":698},[681,1263,713],{"class":702},[681,1265,1234],{"class":790},[681,1267,919],{"class":702},[681,1269,1103],{"class":687},[681,1271,1055],{"class":694},[681,1273,699],{"class":698},[681,1275,703],{"class":702},[681,1277,1278,1281,1283,1286,1288],{"class":683,"line":745},[681,1279,1280],{"class":709},"  port",[681,1282,713],{"class":702},[681,1284,1285],{"class":813}," 0",[681,1287,817],{"class":702},[681,1289,1290],{"class":1145},"                  \u002F\u002F 0 = OS picks ephemeral port (default)\n",[681,1292,1293,1296,1298,1300,1302,1304,1306],{"class":683,"line":654},[681,1294,1295],{"class":709},"  host",[681,1297,713],{"class":702},[681,1299,884],{"class":702},[681,1301,622],{"class":722},[681,1303,719],{"class":702},[681,1305,817],{"class":702},[681,1307,1308],{"class":1145},"        \u002F\u002F default — local-only, never exposed to LAN\n",[681,1310,1311,1314,1316,1318,1321,1323,1325],{"class":683,"line":764},[681,1312,1313],{"class":709},"  token",[681,1315,713],{"class":702},[681,1317,884],{"class":702},[681,1319,1320],{"class":722},"optional-bearer",[681,1322,719],{"class":702},[681,1324,817],{"class":702},[681,1326,1327],{"class":1145}," \u002F\u002F default: none (origin check used instead)\n",[681,1329,1330,1333,1335,1338,1340],{"class":683,"line":1142},[681,1331,1332],{"class":709},"  heartbeatMs",[681,1334,713],{"class":702},[681,1336,1337],{"class":813}," 15_000",[681,1339,817],{"class":702},[681,1341,1342],{"class":1145},"      \u002F\u002F default\n",[681,1344,1346,1349,1351,1354,1356],{"class":683,"line":1345},8,[681,1347,1348],{"class":709},"  buffer",[681,1350,713],{"class":702},[681,1352,1353],{"class":813}," 500",[681,1355,817],{"class":702},[681,1357,1358],{"class":1145},"              \u002F\u002F default ring buffer size\n",[681,1360,1362,1365,1367,1369,1371],{"class":683,"line":1361},9,[681,1363,1364],{"class":709},"  banner",[681,1366,713],{"class":702},[681,1368,754],{"class":753},[681,1370,817],{"class":702},[681,1372,1373],{"class":1145},"             \u002F\u002F default — prints `[evlog] Stream → ...`\n",[681,1375,1377,1380,1382,1384,1387,1389,1391],{"class":683,"line":1376},10,[681,1378,1379],{"class":709},"  urlFileDir",[681,1381,713],{"class":702},[681,1383,884],{"class":702},[681,1385,1386],{"class":722},".evlog",[681,1388,719],{"class":702},[681,1390,817],{"class":702},[681,1392,1393],{"class":1145},"     \u002F\u002F default — false to disable .evlog\u002Fstream.url\n",[681,1395,1397,1399],{"class":683,"line":1396},11,[681,1398,767],{"class":702},[681,1400,770],{"class":698},[681,1402,1404],{"class":683,"line":1403},12,[681,1405,896],{"emptyLinePlaceholder":895},[681,1407,1409,1412,1414,1417],{"class":683,"line":1408},13,[681,1410,1411],{"class":698},"server",[681,1413,474],{"class":702},[681,1415,1416],{"class":698},"url   ",[681,1418,1419],{"class":1145},"\u002F\u002F → 'http:\u002F\u002F127.0.0.1:51203'\n",[681,1421,1423,1425,1427,1430],{"class":683,"line":1422},14,[681,1424,1411],{"class":698},[681,1426,474],{"class":702},[681,1428,1429],{"class":698},"port  ",[681,1431,1432],{"class":1145},"\u002F\u002F → 51203\n",[681,1434,1436,1438,1440,1442],{"class":683,"line":1435},15,[681,1437,1411],{"class":698},[681,1439,474],{"class":702},[681,1441,1131],{"class":698},[681,1443,1444],{"class":1145},"\u002F\u002F DrainFn — pass to nitroApp.hooks.hook('evlog:drain', drain) or initLogger({ drain })\n",[681,1446,1448,1450,1452,1455],{"class":683,"line":1447},16,[681,1449,1411],{"class":698},[681,1451,474],{"class":702},[681,1453,1454],{"class":698},"stream ",[681,1456,1457],{"class":1145},"\u002F\u002F StreamDrain (the underlying in-process pub\u002Fsub)\n",[681,1459,1461,1464,1466,1468,1471,1474],{"class":683,"line":1460},17,[681,1462,1463],{"class":687},"await",[681,1465,1126],{"class":698},[681,1467,474],{"class":702},[681,1469,1470],{"class":694},"close",[681,1472,1473],{"class":698},"() ",[681,1475,1476],{"class":1145},"\u002F\u002F stop, remove .evlog\u002Fstream.url, unsubscribe clients\n",[476,1478,1479,1481,1482,1485,1486,1489],{},[512,1480,554],{}," is ",[463,1483,1484],{},"idempotent"," — calling it again returns the same instance until ",[512,1487,1488],{},"close()"," is called.",[600,1491,1493],{"id":1492},"security","Security",[476,1495,1496,1497,1499],{},"The server binds to ",[512,1498,622],{}," by default and is unreachable from the LAN. For any non-local exposure (different host, reverse-proxy, port-forward), add a bearer token:",[643,1501,1503],{"className":675,"code":1502,"language":677,"meta":649,"style":649},"evlog: {\n  stream: {\n    token: process.env.EVLOG_STREAM_TOKEN,\n  },\n}\n",[512,1504,1505,1513,1521,1540,1544],{"__ignoreMap":649},[681,1506,1507,1509,1511],{"class":683,"line":684},[681,1508,791],{"class":790},[681,1510,713],{"class":702},[681,1512,742],{"class":702},[681,1514,1515,1517,1519],{"class":683,"line":706},[681,1516,800],{"class":790},[681,1518,713],{"class":702},[681,1520,742],{"class":702},[681,1522,1523,1526,1528,1530,1532,1534,1536,1538],{"class":683,"line":734},[681,1524,1525],{"class":790},"    token",[681,1527,713],{"class":702},[681,1529,825],{"class":698},[681,1531,474],{"class":702},[681,1533,830],{"class":698},[681,1535,474],{"class":702},[681,1537,835],{"class":698},[681,1539,731],{"class":702},[681,1541,1542],{"class":683,"line":745},[681,1543,761],{"class":702},[681,1545,1546],{"class":683,"line":654},[681,1547,843],{"class":702},[476,1549,1550],{},"Or programmatically:",[643,1552,1554],{"className":675,"code":1553,"language":677,"meta":649,"style":649},"const server = await startStreamServer({\n  token: process.env.EVLOG_STREAM_TOKEN,\n})\n",[512,1555,1556,1572,1590],{"__ignoreMap":649},[681,1557,1558,1560,1562,1564,1566,1568,1570],{"class":683,"line":684},[681,1559,1094],{"class":903},[681,1561,1097],{"class":698},[681,1563,1100],{"class":702},[681,1565,1103],{"class":687},[681,1567,1055],{"class":694},[681,1569,699],{"class":698},[681,1571,703],{"class":702},[681,1573,1574,1576,1578,1580,1582,1584,1586,1588],{"class":683,"line":706},[681,1575,1313],{"class":709},[681,1577,713],{"class":702},[681,1579,825],{"class":698},[681,1581,474],{"class":702},[681,1583,830],{"class":698},[681,1585,474],{"class":702},[681,1587,835],{"class":698},[681,1589,731],{"class":702},[681,1591,1592,1594],{"class":683,"line":734},[681,1593,767],{"class":702},[681,1595,770],{"class":698},[1597,1598,1599,1612],"table",{},[1600,1601,1602],"thead",{},[1603,1604,1605,1609],"tr",{},[1606,1607,1608],"th",{},"Mode",[1606,1610,1611],{},"Behavior",[1613,1614,1615,1630,1644,1664],"tbody",{},[1603,1616,1617,1624],{},[1618,1619,1620,1623],"td",{},[512,1621,1622],{},"token"," set",[1618,1625,1626,1629],{},[512,1627,1628],{},"Authorization: Bearer \u003Ctoken>"," is required. 401 otherwise.",[1603,1631,1632,1641],{},[1618,1633,1634,1636,1637,1640],{},[512,1635,1622],{}," unset, request has no ",[512,1638,1639],{},"Origin"," (curl, Node fetch)",[1618,1642,1643],{},"Allowed.",[1603,1645,1646,1662],{},[1618,1647,1648,1650,1651,1653,1654,502,1657,502,1659,859],{},[512,1649,1622],{}," unset, request ",[512,1652,1639],{}," is local (",[512,1655,1656],{},"localhost",[512,1658,622],{},[512,1660,1661],{},"::1",[1618,1663,1643],{},[1603,1665,1666,1673],{},[1618,1667,1668,1650,1670,1672],{},[512,1669,1622],{},[512,1671,1639],{}," is non-local",[1618,1674,1675],{},"403.",[476,1677,1678,1679,1682,1683,1685],{},"You can also override ",[512,1680,1681],{},"host",", but think twice — exposing the server beyond ",[512,1684,622],{}," without a token is unsafe. Wide events often carry user data your other adapters would normally redact.",[600,1687,1689],{"id":1688},"endpoints","Endpoints",[1597,1691,1692,1702],{},[1600,1693,1694],{},[1603,1695,1696,1699],{},[1606,1697,1698],{},"Path",[1606,1700,1701],{},"Purpose",[1613,1703,1704,1718,1732],{},[1603,1705,1706,1711],{},[1618,1707,1708],{},[512,1709,1710],{},"GET \u002F",[1618,1712,1713,1714,1717],{},"The SSE stream itself. Accepts ",[512,1715,1716],{},"?since=\u003Ciso>"," to replay buffered events.",[1603,1719,1720,1725],{},[1618,1721,1722],{},[512,1723,1724],{},"GET \u002Finfo",[1618,1726,1727,1728,1731],{},"JSON ",[512,1729,1730],{},"{ evlogVersion, bufferSize, heartbeatMs }"," — server discovery.",[1603,1733,1734,1739],{},[1618,1735,1736],{},[512,1737,1738],{},"OPTIONS *",[1618,1740,1741,1742,1745],{},"CORS preflight (the server allows ",[512,1743,1744],{},"*"," because it binds to localhost).",[600,1747,1749],{"id":1748},"wire-format","Wire format",[476,1751,1752,1753,1756],{},"Every SSE ",[512,1754,1755],{},"data:"," line is a versioned envelope:",[643,1758,1761],{"className":1759,"code":1760,"language":648,"meta":649},[646],"data: {\"evlog\":\"1\",\"type\":\"hello\",\"data\":{\"evlogVersion\":\"2.16.0\",\"bufferSize\":500,\"heartbeatMs\":15000}}\n\ndata: {\"evlog\":\"1\",\"type\":\"replay\",\"data\":{...wide event...}}\n\ndata: {\"evlog\":\"1\",\"type\":\"event\",\"data\":{...wide event...}}\n\nevent: ping\ndata: {\"evlog\":\"1\",\"type\":\"ping\",\"data\":{\"t\":1730000000000}}\n",[512,1762,1760],{"__ignoreMap":649},[1597,1764,1765,1775],{},[1600,1766,1767],{},[1603,1768,1769,1772],{},[1606,1770,1771],{},"Type",[1606,1773,1774],{},"When",[1613,1776,1777,1787,1800,1810],{},[1603,1778,1779,1784],{},[1618,1780,1781],{},[512,1782,1783],{},"hello",[1618,1785,1786],{},"First frame — server version + stream config",[1603,1788,1789,1794],{},[1618,1790,1791],{},[512,1792,1793],{},"replay",[1618,1795,1796,1797],{},"Each buffered event flushed when the client passed ",[512,1798,1799],{},"?since=",[1603,1801,1802,1807],{},[1618,1803,1804],{},[512,1805,1806],{},"event",[1618,1808,1809],{},"Each new event drained after the connection opened",[1603,1811,1812,1817],{},[1618,1813,1814],{},[512,1815,1816],{},"ping",[1618,1818,1819,1820,1823,1824],{},"Heartbeat every ",[512,1821,1822],{},"heartbeatMs"," (default 15s), sent with ",[512,1825,1826],{},"event: ping",[476,1828,1829,1830,1833],{},"The ",[512,1831,1832],{},"evlog: \"1\""," discriminant is the protocol version — incompatible changes will bump it.",[600,1835,1837],{"id":1836},"discovery","Discovery",[476,1839,1840],{},"External tools (a Tauri devtool, a CLI watcher) can find the running server in two ways:",[611,1842,1843,1850],{},[534,1844,1845,1849],{},[463,1846,1847],{},[512,1848,582],{}," — read directly from the project directory. Cleaned up at process exit.",[534,1851,1852,1857,1858,1861],{},[463,1853,1854],{},[512,1855,1856],{},"GET \u002Fapi\u002F_evlog\u002Fstream-info"," (Nuxt only) — returns ",[512,1859,1860],{},"{ url }",", reads from the file.",[643,1863,1867],{"className":1864,"code":1865,"language":1866,"meta":649,"style":649},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# CLI consumer\nURL=$(cat .evlog\u002Fstream.url) && curl -N \"$URL\"\n","bash",[512,1868,1869,1874],{"__ignoreMap":649},[681,1870,1871],{"class":683,"line":684},[681,1872,1873],{"class":1145},"# CLI consumer\n",[681,1875,1876,1879,1882,1885,1888,1890,1893,1896,1899,1902,1905],{"class":683,"line":706},[681,1877,1878],{"class":698},"URL",[681,1880,1881],{"class":702},"=$(",[681,1883,1884],{"class":790},"cat",[681,1886,1887],{"class":722}," .evlog\u002Fstream.url",[681,1889,859],{"class":702},[681,1891,1892],{"class":702}," &&",[681,1894,1895],{"class":790}," curl",[681,1897,1898],{"class":722}," -N",[681,1900,1901],{"class":702}," \"",[681,1903,1904],{"class":698},"$URL",[681,1906,1907],{"class":702},"\"\n",[600,1909,1911],{"id":1910},"going-further","Going further",[531,1913,1914,1920],{},[534,1915,1916,1919],{},[472,1917,1918],{"href":327},"Consumer recipes"," — copy-paste examples for browser, curl + jq, Node fetch, replay-then-live, aggregation.",[534,1921,1922,1925],{},[472,1923,1924],{"href":299},"Stream API"," — the in-process primitive the server is built on.",[1927,1928,1929],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":649,"searchDepth":706,"depth":706,"links":1931},[1932,1933,1940,1941,1942,1943,1944,1945],{"id":602,"depth":706,"text":603},{"id":667,"depth":706,"text":668,"children":1934},[1935,1936,1938,1939],{"id":672,"depth":734,"text":211},{"id":855,"depth":734,"text":1937},"Next.js (instrumentation.ts)",{"id":1040,"depth":734,"text":1041},{"id":1149,"depth":734,"text":1150},{"id":1212,"depth":706,"text":1213},{"id":1492,"depth":706,"text":1493},{"id":1688,"depth":706,"text":1689},{"id":1748,"depth":706,"text":1749},{"id":1836,"depth":706,"text":1837},{"id":1910,"depth":706,"text":1911},"A local HTTP mini-server on its own port that exposes the in-process stream over Server-Sent Events. Strict opt-in, framework-agnostic, no app route to wire.","md",null,{},{"title":317,"icon":320},{"title":317,"description":1946},"nqXcTzTtwF-NQDzuJHQ5j8G8dlr5T26pbqtsqCqzduY",[1954,1956],{"title":313,"path":314,"stem":315,"description":1955,"icon":288,"children":-1},"Build evlog support for an HTTP framework that doesn't ship a built-in integration — Medusa, AdonisJS, h3 directly, custom dispatchers, queue workers.",{"title":322,"path":323,"stem":324,"description":1957,"icon":325,"children":-1},"Replay and tail the local NDJSON drain with readFsLogs and tailFsLogs — works in-process or from any external Node tool.",1778340942852]