{"_id":"@aegislog/next","_rev":"8-5488f2b00198f28c12f9ff79e9b08f0e","name":"@aegislog/next","dist-tags":{"latest":"0.2.6"},"versions":{"0.1.0":{"name":"@aegislog/next","version":"0.1.0","author":{"name":"Syed Muzamil","email":"syedmuzamilm@users.noreply.github.com"},"license":"MIT","_id":"@aegislog/next@0.1.0","maintainers":[{"name":"syedmuzamilm","email":"smmhd121@gmail.com"}],"homepage":"https://github.com/syedmuzamilm/aegislog#readme","bugs":{"url":"https://github.com/syedmuzamilm/aegislog/issues"},"dist":{"shasum":"bd37ab06db593700c0bf7f1b5a35958ef28bd53d","tarball":"https://registry.npmjs.org/@aegislog/next/-/next-0.1.0.tgz","fileCount":8,"integrity":"sha512-4cIAVQ61nT8ZEzJwKr6DvdbwTOwv5tKjRxLZnkN1xHLyOeP1QhtvhljT7bgMfq+RMX3H507x29ZPX9hlNc3aiw==","signatures":[{"sig":"MEYCIQDKS9oTlrswpok72JtlVutWnaIMZ8CJwG0RkHRAZnrCRgIhANz3PP0OseP4Tt5o2h9lh5DTK8CrTwuCf7CH8YmNwcQe","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17074},"main":"./dist/index.cjs","type":"module","_from":"file:aegislog-next-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"syedmuzamilm","email":"smmhd121@gmail.com"},"_resolved":"/private/var/folders/sq/7sjt760s67v1mr3598d_3rr00000gn/T/d1bbda66e2aff3285f4ade17658179e5/aegislog-next-0.1.0.tgz","_integrity":"sha512-4cIAVQ61nT8ZEzJwKr6DvdbwTOwv5tKjRxLZnkN1xHLyOeP1QhtvhljT7bgMfq+RMX3H507x29ZPX9hlNc3aiw==","repository":{"url":"git+https://github.com/syedmuzamilm/aegislog.git","type":"git","directory":"packages/next"},"_npmVersion":"11.17.0","description":"Next.js App Router and Server Actions adapter for AegisLog.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"aegislog":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"next":">=13.0.0 || >=14.0.0 || >=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_0.1.0_1786984088252_0.5435149968461612","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aegislog/next","version":"0.1.1","author":{"name":"Syed Muzamil","email":"syedmuzamilm@users.noreply.github.com"},"license":"MIT","_id":"@aegislog/next@0.1.1","maintainers":[{"name":"syedmuzamilm","email":"smmhd121@gmail.com"}],"homepage":"https://github.com/syedmuzamilm/aegislog#readme","bugs":{"url":"https://github.com/syedmuzamilm/aegislog/issues"},"dist":{"shasum":"0f01e5626f3cd49f774d3f2e1e4038906061711d","tarball":"https://registry.npmjs.org/@aegislog/next/-/next-0.1.1.tgz","fileCount":8,"integrity":"sha512-R/7ylPyLO0VoQ0q4BEvBfjb3dIOWlNcDPvwJ79iMm2R87BeUw9frNqCaG8y1toMxlLHJ/AXjQm5YKcfU4XhNXw==","signatures":[{"sig":"MEQCIHbnEM2gmDauU7YemDpX/Wowv6g3P7vWXfyrWOFHofFNAiATBxCDcGU8TyNeCRyTsTtj3Wz76JE5QTd4WycwR0GGPg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17074},"main":"./dist/index.cjs","type":"module","_from":"file:aegislog-next-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"syedmuzamilm","email":"smmhd121@gmail.com"},"_resolved":"/private/var/folders/sq/7sjt760s67v1mr3598d_3rr00000gn/T/91f54607535e47ec498c51da998fb578/aegislog-next-0.1.1.tgz","_integrity":"sha512-R/7ylPyLO0VoQ0q4BEvBfjb3dIOWlNcDPvwJ79iMm2R87BeUw9frNqCaG8y1toMxlLHJ/AXjQm5YKcfU4XhNXw==","repository":{"url":"git+https://github.com/syedmuzamilm/aegislog.git","type":"git","directory":"packages/next"},"_npmVersion":"11.17.0","description":"Next.js App Router and Server Actions adapter for AegisLog.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"aegislog":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"next":">=13.0.0 || >=14.0.0 || >=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_0.1.1_1786986520207_0.5341507937748686","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@aegislog/next","version":"0.2.1","author":{"name":"Syed Muzamil","email":"syedmuzamilm@users.noreply.github.com"},"license":"MIT","_id":"@aegislog/next@0.2.1","maintainers":[{"name":"syedmuzamilm","email":"smmhd121@gmail.com"}],"homepage":"https://github.com/syedmuzamilm/aegislog#readme","bugs":{"url":"https://github.com/syedmuzamilm/aegislog/issues"},"dist":{"shasum":"bdad552d5072432e26ca5cadd76603b4e99b425c","tarball":"https://registry.npmjs.org/@aegislog/next/-/next-0.2.1.tgz","fileCount":8,"integrity":"sha512-/OS/nGGjPcOhLocw9M83ec2VVB1MfY2D0CPB87WDVLcmZYmZs8yC8b1gDjZzlc5nl05NFy6du5IHiBqsXOLq/w==","signatures":[{"sig":"MEYCIQD+/P9dysEMY2K54+B678cXM3UwoNV66mIn9Wi2R2rR4wIhAL6/fJ1Rrf/bhVBfaNl9e6ls0oWisYk5h+yltxGJWxp0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16250},"main":"./dist/index.cjs","type":"module","_from":"file:aegislog-next-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"syedmuzamilm","email":"smmhd121@gmail.com"},"_resolved":"/private/var/folders/sq/7sjt760s67v1mr3598d_3rr00000gn/T/e5a6c3d96b2adba7caabd2b2d7f3ac54/aegislog-next-0.2.1.tgz","_integrity":"sha512-/OS/nGGjPcOhLocw9M83ec2VVB1MfY2D0CPB87WDVLcmZYmZs8yC8b1gDjZzlc5nl05NFy6du5IHiBqsXOLq/w==","repository":{"url":"git+https://github.com/syedmuzamilm/aegislog.git","type":"git","directory":"packages/next"},"_npmVersion":"11.17.0","description":"Next.js App Router and Server Actions adapter for AegisLog.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"aegislog":"0.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"next":">=13.0.0 || >=14.0.0 || >=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_0.2.1_1787027264393_0.47507918834868446","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@aegislog/next","version":"0.2.2","author":{"name":"Syed Muzamil","email":"syedmuzamilm@users.noreply.github.com"},"license":"MIT","_id":"@aegislog/next@0.2.2","maintainers":[{"name":"syedmuzamilm","email":"smmhd121@gmail.com"}],"homepage":"https://github.com/syedmuzamilm/aegislog#readme","bugs":{"url":"https://github.com/syedmuzamilm/aegislog/issues"},"dist":{"shasum":"96d1e5f23bf19f2f6e73cd84ea2393065dd58abf","tarball":"https://registry.npmjs.org/@aegislog/next/-/next-0.2.2.tgz","fileCount":9,"integrity":"sha512-U2B9ESJI0pI7RS4rkEnMLOAJpfpGIVaK64QOaQH9n7USvtXV1aCiFo7Mg0706YancespnRqjHacXlmt+nkpOnQ==","signatures":[{"sig":"MEUCIDENX7SptsG+HtRYGWd0rxc7kPKQxd/Qxf0tkcse2nlmAiEAu3PMeiXVo16LzbbzttW52RZdNYmfbBm09YNGXvOC8E0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18492},"main":"./dist/index.cjs","type":"module","_from":"file:aegislog-next-0.2.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"syedmuzamilm","email":"smmhd121@gmail.com"},"_resolved":"/private/var/folders/sq/7sjt760s67v1mr3598d_3rr00000gn/T/e25ee77ae177a690e7a602170da2d42c/aegislog-next-0.2.2.tgz","_integrity":"sha512-U2B9ESJI0pI7RS4rkEnMLOAJpfpGIVaK64QOaQH9n7USvtXV1aCiFo7Mg0706YancespnRqjHacXlmt+nkpOnQ==","repository":{"url":"git+https://github.com/syedmuzamilm/aegislog.git","type":"git","directory":"packages/next"},"_npmVersion":"11.17.0","description":"Next.js App Router and Server Actions adapter for AegisLog.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"aegislog":"0.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"next":">=13.0.0 || >=14.0.0 || >=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_0.2.2_1787028107892_0.4679844771468593","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@aegislog/next","version":"0.2.3","author":{"name":"Syed Muzamil","email":"syedmuzamilm@users.noreply.github.com"},"license":"MIT","_id":"@aegislog/next@0.2.3","maintainers":[{"name":"syedmuzamilm","email":"smmhd121@gmail.com"}],"homepage":"https://github.com/syedmuzamilm/aegislog#readme","bugs":{"url":"https://github.com/syedmuzamilm/aegislog/issues"},"dist":{"shasum":"706024bd2c0406d6ab493e0b0667e945f22ba3ea","tarball":"https://registry.npmjs.org/@aegislog/next/-/next-0.2.3.tgz","fileCount":9,"integrity":"sha512-v+oiTPsYOQ1BejYUMHO3qG33iE0IBwyz8f+HAhcWFr0p9IfDYyw25nWKL5VT+S0btpsn9yINaD4McjvoIB2yjw==","signatures":[{"sig":"MEUCIHUyHdtPLqX/OjfQ5AcXhohmzhZpSNoEPpkQpbvsb2fsAiEAv1aL2GExyFQuqy0QkWUtN/XSysMvXCFFXaNYmVUHnYE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18492},"main":"./dist/index.cjs","type":"module","_from":"file:aegislog-next-0.2.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"syedmuzamilm","email":"smmhd121@gmail.com"},"_resolved":"/private/var/folders/sq/7sjt760s67v1mr3598d_3rr00000gn/T/949eb1781070cfd737edd4df09ecaace/aegislog-next-0.2.3.tgz","_integrity":"sha512-v+oiTPsYOQ1BejYUMHO3qG33iE0IBwyz8f+HAhcWFr0p9IfDYyw25nWKL5VT+S0btpsn9yINaD4McjvoIB2yjw==","repository":{"url":"git+https://github.com/syedmuzamilm/aegislog.git","type":"git","directory":"packages/next"},"_npmVersion":"11.17.0","description":"Next.js App Router and Server Actions adapter for AegisLog.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"aegislog":"0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"next":">=13.0.0 || >=14.0.0 || >=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_0.2.3_1787549140040_0.6007136288187396","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@aegislog/next","version":"0.2.4","author":{"name":"Syed Muzamil","email":"syedmuzamilm@users.noreply.github.com"},"license":"MIT","_id":"@aegislog/next@0.2.4","maintainers":[{"name":"syedmuzamilm","email":"smmhd121@gmail.com"}],"homepage":"https://github.com/syedmuzamilm/aegislog#readme","bugs":{"url":"https://github.com/syedmuzamilm/aegislog/issues"},"dist":{"shasum":"e5ef7ba7c0dc026eedf6e92d4a6d4e0a582eb8eb","tarball":"https://registry.npmjs.org/@aegislog/next/-/next-0.2.4.tgz","fileCount":9,"integrity":"sha512-OOyMM0mzZ75UGsoXxRDwsvf0SAJrZ77e2D36bPM03/1qTnvhoXN80WKpzen1OVKbPRHeorKQKVy3KwMSKyt6PQ==","signatures":[{"sig":"MEUCIDtYw8RiRMElbFGS7jooB7cjGe653BaedgSmtBjR8YENAiEAuTPxSl3CFX4Y3j5OKqvP0ZL36pyV2fuz1PzqTu3xQQA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18379},"main":"./dist/index.cjs","type":"module","_from":"file:aegislog-next-0.2.4.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"syedmuzamilm","email":"smmhd121@gmail.com"},"_resolved":"/private/var/folders/sq/7sjt760s67v1mr3598d_3rr00000gn/T/072559005bd0d20bcbe4779bfbedbb80/aegislog-next-0.2.4.tgz","_integrity":"sha512-OOyMM0mzZ75UGsoXxRDwsvf0SAJrZ77e2D36bPM03/1qTnvhoXN80WKpzen1OVKbPRHeorKQKVy3KwMSKyt6PQ==","repository":{"url":"git+https://github.com/syedmuzamilm/aegislog.git","type":"git","directory":"packages/next"},"_npmVersion":"11.19.0","description":"Next.js App Router and Server Actions adapter for AegisLog.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"aegislog":"0.2.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"next":">=13.0.0 || >=14.0.0 || >=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_0.2.4_1788416812269_0.21328882495989254","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@aegislog/next","version":"0.2.5","author":{"name":"Syed Muzamil","email":"syedmuzamilm@users.noreply.github.com"},"license":"MIT","_id":"@aegislog/next@0.2.5","maintainers":[{"name":"syedmuzamilm","email":"smmhd121@gmail.com"}],"homepage":"https://github.com/syedmuzamilm/aegislog#readme","bugs":{"url":"https://github.com/syedmuzamilm/aegislog/issues"},"dist":{"shasum":"23349cde130a43a9e40832a46d17e9645f765c87","tarball":"https://registry.npmjs.org/@aegislog/next/-/next-0.2.5.tgz","fileCount":9,"integrity":"sha512-BSxVl0CG5L0pYcOzWA+7Gs+GczCK8rVf+aPfoOhIns97toKfBBBfomIDTzXakIScqfe571wCAHI7FT7N8m0TSA==","signatures":[{"sig":"MEUCIQDTk3bwg+Q3CCX3aHBo3UsxtiGabGpkvsjFXB79UXRzaAIgLnFVGr2BZ8n/AZwnA3eD0xgUgivNkIhMTo7nt9j0TNI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18379},"main":"./dist/index.cjs","type":"module","_from":"file:aegislog-next-0.2.5.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"syedmuzamilm","email":"smmhd121@gmail.com"},"_resolved":"/private/var/folders/sq/7sjt760s67v1mr3598d_3rr00000gn/T/f5650b7a591480cec2d07f20d6d0c376/aegislog-next-0.2.5.tgz","_integrity":"sha512-BSxVl0CG5L0pYcOzWA+7Gs+GczCK8rVf+aPfoOhIns97toKfBBBfomIDTzXakIScqfe571wCAHI7FT7N8m0TSA==","repository":{"url":"git+https://github.com/syedmuzamilm/aegislog.git","type":"git","directory":"packages/next"},"_npmVersion":"11.19.0","description":"Next.js App Router and Server Actions adapter for AegisLog.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"aegislog":"0.2.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"next":">=13.0.0 || >=14.0.0 || >=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_0.2.5_1788493601953_0.02691391623145223","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"@aegislog/next","version":"0.2.6","description":"Next.js App Router and Server Actions adapter for AegisLog.","homepage":"https://github.com/syedmuzamilm/aegislog#readme","license":"MIT","author":"Syed Muzamil <syedmuzamilm@users.noreply.github.com>","repository":{"type":"git","url":"git+https://github.com/syedmuzamilm/aegislog.git","directory":"packages/next"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"publishConfig":{"access":"public"},"dependencies":{"aegislog":"0.2.6"},"peerDependencies":{"next":">=13.0.0 || >=14.0.0 || >=15.0.0"},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","dev":"tsup src/index.ts --format esm,cjs --dts --watch","typecheck":"tsc --noEmit"},"_nodeVersion":"24.21.0","_id":"@aegislog/next@0.2.6","dist":{"integrity":"sha512-mWiFSyXXWuvnFlBwz4psWAwA5f+cw9+aqlfOTlWWgoPYi1xqdmkHNNY4DBTmbzbmhj43D4AFeQbVbCSRkuI1tQ==","shasum":"3ae21439f9fe3f11d301776155a6f5934821a889","tarball":"https://registry.npmjs.org/@aegislog/next/-/next-0.2.6.tgz","fileCount":9,"unpackedSize":18379,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDM0rQh7BlyjkXJ0Ca/Qc53/vc1Nj5O90i06w4n6XtQnQIhAK2oYFRNDwR6V4dFMW8CEPNV6W3A2T1L8Ll3UCtbOBLq"}]},"_npmUser":{"name":"syedmuzamilm","email":"smmhd121@gmail.com"},"directories":{},"maintainers":[{"name":"syedmuzamilm","email":"smmhd121@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/next_0.2.6_1788935500257_0.9648664370941362"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T16:28:08.093Z","modified":"2026-09-09T06:31:40.559Z","0.1.0":"2026-08-17T16:28:08.387Z","0.1.1":"2026-08-17T17:08:40.350Z","0.2.1":"2026-08-18T04:27:44.535Z","0.2.2":"2026-08-18T04:41:48.044Z","0.2.3":"2026-08-24T05:25:40.221Z","0.2.4":"2026-09-03T06:26:52.395Z","0.2.5":"2026-09-04T03:46:42.102Z","0.2.6":"2026-09-09T06:31:40.388Z"},"author":"Syed Muzamil <syedmuzamilm@users.noreply.github.com>","license":"MIT","homepage":"https://github.com/syedmuzamilm/aegislog#readme","repository":{"type":"git","url":"git+https://github.com/syedmuzamilm/aegislog.git","directory":"packages/next"},"description":"Next.js App Router and Server Actions adapter for AegisLog.","maintainers":[{"name":"syedmuzamilm","email":"smmhd121@gmail.com"}],"readme":"# @aegislog/next ⚛️\n\nNext.js App Router, Server Actions, and Route Handlers integration for [AegisLog](https://github.com/syedmuzamilm/aegislog).\n\n---\n\n## 📦 Installation\n\n```bash\npnpm add @aegislog/next aegislog\n# or\nnpm install @aegislog/next aegislog\n```\n\n---\n\n## 🚀 Usage with Server Actions\n\nWrap Next.js Server Actions with `withAegisContext` to automatically track user identity, tenant, request correlation, and execution timing:\n\n```typescript\n// app/actions/billing.ts\n\"use server\";\n\nimport { withAegisContext } from \"@aegislog/next\";\nimport { logger, audit } from \"aegislog\";\n\nexport async function upgradePlanAction(formData: FormData) {\n  const planTier = formData.get(\"tier\") as string;\n  const user = await getCurrentAuthUser();\n\n  return withAegisContext(\n    {\n      actionName: \"upgradePlanAction\",\n      actor: { id: user.id, email: user.email },\n      tenant: { id: user.organizationId },\n    },\n    async () => {\n      logger.info(\"Processing plan upgrade\", { newTier: planTier });\n\n      await stripe.subscriptions.update(user.stripeSubId, { plan: planTier });\n\n      await audit.record({\n        action: \"billing.plan_upgraded\",\n        resource: { type: \"subscription\", id: user.stripeSubId },\n        changes: { plan: { from: user.currentPlan, to: planTier } },\n        outcome: \"success\",\n      });\n\n      return { success: true };\n    },\n  );\n}\n```\n\n---\n\n## 🚀 Usage with Route Handlers (`app/api/.../route.ts`)\n\n```typescript\n// app/api/checkout/route.ts\nimport { NextRequest, NextResponse } from \"next/server\";\nimport { runWithContext, logger } from \"aegislog\";\n\nexport async function POST(req: NextRequest) {\n  const body = await req.json();\n  const requestId = req.headers.get(\"x-request-id\") || `req_${Date.now()}`;\n\n  return runWithContext(\n    {\n      requestId,\n      session: {\n        id: requestId,\n        ip: req.headers.get(\"x-forwarded-for\") || undefined,\n        userAgent: req.headers.get(\"user-agent\") || undefined,\n      },\n    },\n    async () => {\n      logger.info(\"Checkout API request received\", { amount: body.amount });\n      return NextResponse.json({ ok: true });\n    },\n  );\n}\n```\n\n---\n\n## 📄 License\n\nMIT © [AegisLog Contributors](https://github.com/syedmuzamilm/aegislog)\n","readmeFilename":""}