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