[{"data":1,"prerenderedAt":1352},["ShallowReactive",2],{"navigation_docs":3,"-logging-audit-schema":402,"-logging-audit-schema-surround":1347},[4,35,159,201,289,299,386],{"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],{"title":295,"path":296,"stem":297,"icon":298},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F4.fs-reader","i-lucide-folder-search",{"title":300,"path":301,"stem":302,"children":303,"page":34},"Adapters","\u002Fadapters","6.adapters",[304,307,347,362],{"title":41,"path":305,"stem":306,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":308,"path":309,"stem":310,"children":311,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[312,317,322,327,332,337,342],{"title":313,"path":314,"stem":315,"icon":316},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":318,"path":319,"stem":320,"icon":321},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":323,"path":324,"stem":325,"icon":326},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":328,"path":329,"stem":330,"icon":331},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":333,"path":334,"stem":335,"icon":336},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":338,"path":339,"stem":340,"icon":341},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":343,"path":344,"stem":345,"icon":346},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":348,"path":349,"stem":350,"children":351,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[352,357],{"title":353,"path":354,"stem":355,"icon":356},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":358,"path":359,"stem":360,"icon":361},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":363,"path":364,"stem":365,"children":366,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[367,372,377,381],{"title":368,"path":369,"stem":370,"icon":371},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":373,"path":374,"stem":375,"icon":376},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":378,"path":379,"stem":380,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":382,"path":383,"stem":384,"icon":385},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":387,"path":388,"stem":389,"children":390,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[391,394,398],{"title":41,"path":392,"stem":393,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":395,"path":396,"stem":397,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":399,"path":400,"stem":401,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":403,"title":404,"body":405,"description":1336,"extension":1337,"links":1338,"meta":1343,"navigation":1344,"path":138,"seo":1345,"stem":139,"__hash__":1346},"docs\u002F2.logging\u002F8.audit\u002F02.schema.md","Audit Schema",{"type":406,"value":407,"toc":1327},"minimark",[408,420,428,901,905,943,946,1058,1076,1080,1102,1177,1181,1227,1239,1243,1261,1264,1268,1310,1323],[409,410,411,415,416,419],"p",{},[412,413,414],"code",{},"event.audit"," is a typed field on every wide event. Downstream queries filter on ",[412,417,418],{},"audit IS NOT NULL"," to materialise an audit dataset out of regular logs.",[421,422,424,427],"h2",{"id":423},"auditfields-type",[412,425,426],{},"AuditFields"," type",[429,430,435],"pre",{"className":431,"code":432,"language":433,"meta":434,"style":434},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","interface AuditFields {\n  action: string                          \u002F\u002F 'invoice.refund'\n  actor: {\n    type: 'user' | 'system' | 'api' | 'agent'\n    id: string\n    displayName?: string\n    email?: string\n    \u002F\u002F For type === 'agent', mirrors evlog\u002Fai fields:\n    model?: string\n    tools?: string[]\n    reason?: string\n    promptId?: string\n  }\n  target?: { type: string, id: string, [k: string]: unknown }\n  outcome: 'success' | 'failure' | 'denied'\n  reason?: string\n  changes?: { before?: unknown, after?: unknown }\n  causationId?: string                    \u002F\u002F ID of the action that caused this one\n  correlationId?: string                  \u002F\u002F Shared by every action in one operation\n  version?: number                        \u002F\u002F Defaults to 1\n  idempotencyKey?: string                 \u002F\u002F Auto-derived; safe retries across drains\n  context?: {                             \u002F\u002F Filled by auditEnricher\n    requestId?: string\n    traceId?: string\n    ip?: string\n    userAgent?: string\n    tenantId?: string\n  }\n  signature?: string                      \u002F\u002F Set by signed({ strategy: 'hmac' })\n  prevHash?: string                       \u002F\u002F Set by signed({ strategy: 'hash-chain' })\n  hash?: string\n}\n","typescript","",[412,436,437,454,471,481,528,539,550,560,566,576,590,600,610,616,667,700,710,738,751,764,778,791,804,814,824,834,844,854,859,872,885,895],{"__ignoreMap":434},[438,439,442,446,450],"span",{"class":440,"line":441},"line",1,[438,443,445],{"class":444},"spNyl","interface",[438,447,449],{"class":448},"sBMFI"," AuditFields",[438,451,453],{"class":452},"sMK4o"," {\n",[438,455,457,461,464,467],{"class":440,"line":456},2,[438,458,460],{"class":459},"swJcz","  action",[438,462,463],{"class":452},":",[438,465,466],{"class":448}," string",[438,468,470],{"class":469},"sHwdD","                          \u002F\u002F 'invoice.refund'\n",[438,472,474,477,479],{"class":440,"line":473},3,[438,475,476],{"class":459},"  actor",[438,478,463],{"class":452},[438,480,453],{"class":452},[438,482,484,487,489,492,496,499,502,504,507,509,511,513,516,518,520,522,525],{"class":440,"line":483},4,[438,485,486],{"class":459},"    type",[438,488,463],{"class":452},[438,490,491],{"class":452}," '",[438,493,495],{"class":494},"sfazB","user",[438,497,498],{"class":452},"'",[438,500,501],{"class":452}," |",[438,503,491],{"class":452},[438,505,506],{"class":494},"system",[438,508,498],{"class":452},[438,510,501],{"class":452},[438,512,491],{"class":452},[438,514,515],{"class":494},"api",[438,517,498],{"class":452},[438,519,501],{"class":452},[438,521,491],{"class":452},[438,523,524],{"class":494},"agent",[438,526,527],{"class":452},"'\n",[438,529,531,534,536],{"class":440,"line":530},5,[438,532,533],{"class":459},"    id",[438,535,463],{"class":452},[438,537,538],{"class":448}," string\n",[438,540,542,545,548],{"class":440,"line":541},6,[438,543,544],{"class":459},"    displayName",[438,546,547],{"class":452},"?:",[438,549,538],{"class":448},[438,551,553,556,558],{"class":440,"line":552},7,[438,554,555],{"class":459},"    email",[438,557,547],{"class":452},[438,559,538],{"class":448},[438,561,563],{"class":440,"line":562},8,[438,564,565],{"class":469},"    \u002F\u002F For type === 'agent', mirrors evlog\u002Fai fields:\n",[438,567,569,572,574],{"class":440,"line":568},9,[438,570,571],{"class":459},"    model",[438,573,547],{"class":452},[438,575,538],{"class":448},[438,577,579,582,584,586],{"class":440,"line":578},10,[438,580,581],{"class":459},"    tools",[438,583,547],{"class":452},[438,585,466],{"class":448},[438,587,589],{"class":588},"sTEyZ","[]\n",[438,591,593,596,598],{"class":440,"line":592},11,[438,594,595],{"class":459},"    reason",[438,597,547],{"class":452},[438,599,538],{"class":448},[438,601,603,606,608],{"class":440,"line":602},12,[438,604,605],{"class":459},"    promptId",[438,607,547],{"class":452},[438,609,538],{"class":448},[438,611,613],{"class":440,"line":612},13,[438,614,615],{"class":452},"  }\n",[438,617,619,622,624,627,629,631,633,636,639,641,643,645,648,652,654,656,659,661,664],{"class":440,"line":618},14,[438,620,621],{"class":459},"  target",[438,623,547],{"class":452},[438,625,626],{"class":452}," {",[438,628,427],{"class":459},[438,630,463],{"class":452},[438,632,466],{"class":448},[438,634,635],{"class":452},",",[438,637,638],{"class":459}," id",[438,640,463],{"class":452},[438,642,466],{"class":448},[438,644,635],{"class":452},[438,646,647],{"class":588}," [",[438,649,651],{"class":650},"sHdIc","k",[438,653,463],{"class":452},[438,655,466],{"class":448},[438,657,658],{"class":588},"]",[438,660,463],{"class":452},[438,662,663],{"class":448}," unknown",[438,665,666],{"class":452}," }\n",[438,668,670,673,675,677,680,682,684,686,689,691,693,695,698],{"class":440,"line":669},15,[438,671,672],{"class":459},"  outcome",[438,674,463],{"class":452},[438,676,491],{"class":452},[438,678,679],{"class":494},"success",[438,681,498],{"class":452},[438,683,501],{"class":452},[438,685,491],{"class":452},[438,687,688],{"class":494},"failure",[438,690,498],{"class":452},[438,692,501],{"class":452},[438,694,491],{"class":452},[438,696,697],{"class":494},"denied",[438,699,527],{"class":452},[438,701,703,706,708],{"class":440,"line":702},16,[438,704,705],{"class":459},"  reason",[438,707,547],{"class":452},[438,709,538],{"class":448},[438,711,713,716,718,720,723,725,727,729,732,734,736],{"class":440,"line":712},17,[438,714,715],{"class":459},"  changes",[438,717,547],{"class":452},[438,719,626],{"class":452},[438,721,722],{"class":459}," before",[438,724,547],{"class":452},[438,726,663],{"class":448},[438,728,635],{"class":452},[438,730,731],{"class":459}," after",[438,733,547],{"class":452},[438,735,663],{"class":448},[438,737,666],{"class":452},[438,739,741,744,746,748],{"class":440,"line":740},18,[438,742,743],{"class":459},"  causationId",[438,745,547],{"class":452},[438,747,466],{"class":448},[438,749,750],{"class":469},"                    \u002F\u002F ID of the action that caused this one\n",[438,752,754,757,759,761],{"class":440,"line":753},19,[438,755,756],{"class":459},"  correlationId",[438,758,547],{"class":452},[438,760,466],{"class":448},[438,762,763],{"class":469},"                  \u002F\u002F Shared by every action in one operation\n",[438,765,767,770,772,775],{"class":440,"line":766},20,[438,768,769],{"class":459},"  version",[438,771,547],{"class":452},[438,773,774],{"class":448}," number",[438,776,777],{"class":469},"                        \u002F\u002F Defaults to 1\n",[438,779,781,784,786,788],{"class":440,"line":780},21,[438,782,783],{"class":459},"  idempotencyKey",[438,785,547],{"class":452},[438,787,466],{"class":448},[438,789,790],{"class":469},"                 \u002F\u002F Auto-derived; safe retries across drains\n",[438,792,794,797,799,801],{"class":440,"line":793},22,[438,795,796],{"class":459},"  context",[438,798,547],{"class":452},[438,800,626],{"class":452},[438,802,803],{"class":469},"                             \u002F\u002F Filled by auditEnricher\n",[438,805,807,810,812],{"class":440,"line":806},23,[438,808,809],{"class":459},"    requestId",[438,811,547],{"class":452},[438,813,538],{"class":448},[438,815,817,820,822],{"class":440,"line":816},24,[438,818,819],{"class":459},"    traceId",[438,821,547],{"class":452},[438,823,538],{"class":448},[438,825,827,830,832],{"class":440,"line":826},25,[438,828,829],{"class":459},"    ip",[438,831,547],{"class":452},[438,833,538],{"class":448},[438,835,837,840,842],{"class":440,"line":836},26,[438,838,839],{"class":459},"    userAgent",[438,841,547],{"class":452},[438,843,538],{"class":448},[438,845,847,850,852],{"class":440,"line":846},27,[438,848,849],{"class":459},"    tenantId",[438,851,547],{"class":452},[438,853,538],{"class":448},[438,855,857],{"class":440,"line":856},28,[438,858,615],{"class":452},[438,860,862,865,867,869],{"class":440,"line":861},29,[438,863,864],{"class":459},"  signature",[438,866,547],{"class":452},[438,868,466],{"class":448},[438,870,871],{"class":469},"                      \u002F\u002F Set by signed({ strategy: 'hmac' })\n",[438,873,875,878,880,882],{"class":440,"line":874},30,[438,876,877],{"class":459},"  prevHash",[438,879,547],{"class":452},[438,881,466],{"class":448},[438,883,884],{"class":469},"                       \u002F\u002F Set by signed({ strategy: 'hash-chain' })\n",[438,886,888,891,893],{"class":440,"line":887},31,[438,889,890],{"class":459},"  hash",[438,892,547],{"class":452},[438,894,538],{"class":448},[438,896,898],{"class":440,"line":897},32,[438,899,900],{"class":452},"}\n",[421,902,904],{"id":903},"action-naming","Action naming",[906,907,908,916,917,920,921,924,925,924,928,931,932,935,936,939,940,942],"tip",{},[909,910,911,912,915],"strong",{},"Naming convention for ",[412,913,914],{},"action","."," Use ",[412,918,919],{},"noun.verb"," (",[412,922,923],{},"invoice.refund",", ",[412,926,927],{},"user.invite",[412,929,930],{},"apiKey.revoke","). Past tense if the action already happened (",[412,933,934],{},"invoice.refunded","), present tense if ",[412,937,938],{},"withAudit()"," will resolve the outcome. Keep a small fixed dictionary in one file — auditors and SIEM rules query on ",[412,941,914],{},", so a typo is a missing alert.",[409,944,945],{},"A single dictionary file makes alerting straightforward:",[429,947,950],{"className":431,"code":948,"filename":949,"language":433,"meta":434,"style":434},"export const AUDIT_ACTIONS = {\n  USER_INVITE: 'user.invite',\n  USER_REMOVE: 'user.remove',\n  USER_ROLE_CHANGE: 'user.role-change',\n  INVOICE_REFUND: 'invoice.refund',\n  API_KEY_REVOKE: 'apiKey.revoke',\n} as const\n","src\u002Faudit\u002Factions.ts",[412,951,952,969,985,1001,1017,1032,1047],{"__ignoreMap":434},[438,953,954,958,961,964,967],{"class":440,"line":441},[438,955,957],{"class":956},"s7zQu","export",[438,959,960],{"class":444}," const",[438,962,963],{"class":588}," AUDIT_ACTIONS ",[438,965,966],{"class":452},"=",[438,968,453],{"class":452},[438,970,971,974,976,978,980,982],{"class":440,"line":456},[438,972,973],{"class":459},"  USER_INVITE",[438,975,463],{"class":452},[438,977,491],{"class":452},[438,979,927],{"class":494},[438,981,498],{"class":452},[438,983,984],{"class":452},",\n",[438,986,987,990,992,994,997,999],{"class":440,"line":473},[438,988,989],{"class":459},"  USER_REMOVE",[438,991,463],{"class":452},[438,993,491],{"class":452},[438,995,996],{"class":494},"user.remove",[438,998,498],{"class":452},[438,1000,984],{"class":452},[438,1002,1003,1006,1008,1010,1013,1015],{"class":440,"line":483},[438,1004,1005],{"class":459},"  USER_ROLE_CHANGE",[438,1007,463],{"class":452},[438,1009,491],{"class":452},[438,1011,1012],{"class":494},"user.role-change",[438,1014,498],{"class":452},[438,1016,984],{"class":452},[438,1018,1019,1022,1024,1026,1028,1030],{"class":440,"line":530},[438,1020,1021],{"class":459},"  INVOICE_REFUND",[438,1023,463],{"class":452},[438,1025,491],{"class":452},[438,1027,923],{"class":494},[438,1029,498],{"class":452},[438,1031,984],{"class":452},[438,1033,1034,1037,1039,1041,1043,1045],{"class":440,"line":541},[438,1035,1036],{"class":459},"  API_KEY_REVOKE",[438,1038,463],{"class":452},[438,1040,491],{"class":452},[438,1042,930],{"class":494},[438,1044,498],{"class":452},[438,1046,984],{"class":452},[438,1048,1049,1052,1055],{"class":440,"line":552},[438,1050,1051],{"class":452},"}",[438,1053,1054],{"class":956}," as",[438,1056,1057],{"class":444}," const\n",[906,1059,1060,1061,1068,1069,1071,1072,1075],{},"For more than a handful of actions, prefer ",[1062,1063,1065],"a",{"href":1064},"\u002Flogging\u002Faudit\u002Frecording#defineauditcatalog",[412,1066,1067],{},"defineAuditCatalog"," over a plain object dictionary — same ",[412,1070,919],{}," convention, but you get autocomplete on the action union and per-entry ",[412,1073,1074],{},"target"," type inference for free.",[421,1077,1079],{"id":1078},"actor-types","Actor types",[1081,1082,1083,916,1086,1089,1090,1093,1094,1097,1098,1101],"warning",{},[909,1084,1085],{},"Don't fake the actor.",[412,1087,1088],{},"actor.type: 'system'"," for cron jobs, queue workers, and background tasks; ",[412,1091,1092],{},"actor.type: 'api'"," for machine-to-machine calls authenticated by a token; ",[412,1095,1096],{},"actor.type: 'agent'"," for AI tool calls. Logging a synthetic ",[412,1099,1100],{},"'user'"," for system actions is the single fastest way to fail an audit review.",[1103,1104,1105,1120],"table",{},[1106,1107,1108],"thead",{},[1109,1110,1111,1117],"tr",{},[1112,1113,1114],"th",{},[412,1115,1116],{},"actor.type",[1112,1118,1119],{},"When to use",[1121,1122,1123,1133,1143,1153],"tbody",{},[1109,1124,1125,1130],{},[1126,1127,1128],"td",{},[412,1129,1100],{},[1126,1131,1132],{},"A human authenticated through your normal auth flow.",[1109,1134,1135,1140],{},[1126,1136,1137],{},[412,1138,1139],{},"'system'",[1126,1141,1142],{},"Cron jobs, queue workers, scheduled tasks, internal background processes.",[1109,1144,1145,1150],{},[1126,1146,1147],{},[412,1148,1149],{},"'api'",[1126,1151,1152],{},"Machine-to-machine calls from another service authenticated by a token.",[1109,1154,1155,1160],{},[1126,1156,1157],{},[412,1158,1159],{},"'agent'",[1126,1161,1162,1163,1166,1167,924,1170,924,1173,1176],{},"AI tool calls (combine with ",[412,1164,1165],{},"evlog\u002Fai"," fields like ",[412,1168,1169],{},"model",[412,1171,1172],{},"tools",[412,1174,1175],{},"promptId",").",[421,1178,1180],{"id":1179},"outcomes","Outcomes",[1103,1182,1183,1195],{},[1106,1184,1185],{},[1109,1186,1187,1192],{},[1112,1188,1189],{},[412,1190,1191],{},"outcome",[1112,1193,1194],{},"Meaning",[1121,1196,1197,1207,1217],{},[1109,1198,1199,1204],{},[1126,1200,1201],{},[412,1202,1203],{},"'success'",[1126,1205,1206],{},"The action completed as requested.",[1109,1208,1209,1214],{},[1126,1210,1211],{},[412,1212,1213],{},"'failure'",[1126,1215,1216],{},"The action was attempted but failed (downstream error, race condition, etc.).",[1109,1218,1219,1224],{},[1126,1220,1221],{},[412,1222,1223],{},"'denied'",[1126,1225,1226],{},"The action was rejected by an authorisation check.",[409,1228,1229,1231,1232,1234,1235,1176],{},[412,1230,1213],{}," and ",[412,1233,1223],{}," are different things — auditors care a lot about denied actions because they signal probing or misconfigured access controls. Always log denials (see ",[1062,1236,1238],{"href":1237},"\u002Flogging\u002Faudit\u002Frecording#deny","Recording Events",[421,1240,1242],{"id":1241},"idempotency","Idempotency",[409,1244,1245,1248,1249,924,1251,924,1254,1256,1257,1260],{},[412,1246,1247],{},"idempotencyKey"," is auto-derived from a hash of ",[412,1250,914],{},[412,1252,1253],{},"actor.id",[412,1255,1074],{},", and a coarse timestamp. The result: even if your drain retries an audit insert across a network blip, the duplicate row collapses on ",[412,1258,1259],{},"ON CONFLICT DO NOTHING",". You don't have to think about it — it's filled in for you.",[409,1262,1263],{},"Use the field as the primary key in Postgres \u002F Bigtable \u002F DynamoDB so retries stay safe by construction.",[421,1265,1267],{"id":1266},"causation-and-correlation","Causation and correlation",[1103,1269,1270,1280],{},[1106,1271,1272],{},[1109,1273,1274,1277],{},[1112,1275,1276],{},"Field",[1112,1278,1279],{},"Use case",[1121,1281,1282,1296],{},[1109,1283,1284,1289],{},[1126,1285,1286],{},[412,1287,1288],{},"correlationId",[1126,1290,1291,1292,1295],{},"Shared by every audit event that belongs to the ",[909,1293,1294],{},"same operation"," (e.g. one HTTP request that triggers a refund + an email + a webhook).",[1109,1297,1298,1303],{},[1126,1299,1300],{},[412,1301,1302],{},"causationId",[1126,1304,1305,1306,1309],{},"The id of the previous audit event that ",[909,1307,1308],{},"caused"," this one. Useful for reconstructing chains of cascading actions.",[409,1311,1312,1313,1315,1316,1319,1320,1322],{},"Most teams set ",[412,1314,1288],{}," to ",[412,1317,1318],{},"requestId",". ",[412,1321,1302],{}," is opt-in and only worth filling when a single user action triggers many internal audit events.",[1324,1325,1326],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 .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}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}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 .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}",{"title":434,"searchDepth":456,"depth":456,"links":1328},[1329,1331,1332,1333,1334,1335],{"id":423,"depth":456,"text":1330},"AuditFields type",{"id":903,"depth":456,"text":904},{"id":1078,"depth":456,"text":1079},{"id":1179,"depth":456,"text":1180},{"id":1241,"depth":456,"text":1242},{"id":1266,"depth":456,"text":1267},"The AuditFields type, action naming conventions, actor types, idempotency, and how the schema sits inside a regular wide event.","md",[1339,1342],{"label":41,"icon":44,"to":134,"color":1340,"variant":1341},"neutral","subtle",{"label":142,"icon":145,"to":143,"color":1340,"variant":1341},{},{"title":137,"icon":140},{"title":404,"description":1336},"gy1kpgQgCJ5-_0ppU0U_2a2vwc_fY_N0gnhdM_FTWZM",[1348,1350],{"title":41,"path":134,"stem":135,"description":1349,"icon":44,"children":-1},"First-class audit logs as a thin layer on top of evlog's wide events. Add tamper-evident audit trails to any app with one enricher, one drain wrapper, and one helper.",{"title":142,"path":143,"stem":144,"description":1351,"icon":145,"children":-1},"log.audit, log.audit.deny, standalone audit(), withAudit auto-instrumentation, defineAuditAction and defineAuditCatalog registries, and auditDiff change patches.",1778325969335]