{"_id":"@absolutejs/incidents","_rev":"6-3a5a95afcdbbb99d1d80077c7bd3db3b","name":"@absolutejs/incidents","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@absolutejs/incidents","version":"0.1.0","author":{"name":"Alex Kahn"},"license":"MIT","_id":"@absolutejs/incidents@0.1.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/incidents","bugs":{"url":"https://github.com/absolutejs/incidents/issues"},"dist":{"shasum":"b789e2394ba40e23c037cd754d8e5cbe38990bf3","tarball":"https://registry.npmjs.org/@absolutejs/incidents/-/incidents-0.1.0.tgz","fileCount":10,"integrity":"sha512-lrkC32t0/BzztMoa8QcWFcMJV0osItIoqt3laobaXxh5oTu32Kvp4FWgxkIicjMqZgWeqnNpT+Xp5sA+Dr7mcg==","signatures":[{"sig":"MEQCIBJe65ekYZYx+hbIXNP7H0G5Qocj8EddCgCDpykT37f4AiBr5e9MUaGzkvAhULmbU/PpVGsCzoF1XPh/ZXYaZEB1Tw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11784},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"8aa997ae9ee99465e49f16c9edd0cbc6b7a592a9","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @absolutejs/queue --external @sinclair/typebox && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/incidents.git","type":"git"},"_npmVersion":"10.9.2","description":"Durable incident delivery workers with leases, retries, escalation preparation, and operator metrics.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@absolutejs/queue":"0.4.1","@sinclair/typebox":"0.34.52","@absolutejs/manifest":"0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.8.1","@types/bun":"1.3.14","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/incidents_0.1.0_1784254567178_0.012613247031975305","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@absolutejs/incidents","version":"0.1.1","author":"Alex Kahn","license":"MIT","_id":"@absolutejs/incidents@0.1.1","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/incidents","bugs":{"url":"https://github.com/absolutejs/incidents/issues"},"dist":{"shasum":"42a2bb73e48732134d6cf6ef0841beca45a4f056","tarball":"https://registry.npmjs.org/@absolutejs/incidents/-/incidents-0.1.1.tgz","fileCount":10,"integrity":"sha512-1tDVLSVNYvAfchXzOGw/0rIZmHYT9o7YxyMRKfoK3AlT9L23Aycd3xwToP6EMr4s+gR+qpNZUqLV/vN0Nzk8pA==","signatures":[{"sig":"MEYCIQDt0+GgEeSL4zZ1QmLRbIJcOvAPQLbot9YLMgJDFWwCaQIhAKl5zqKGNECn4bntQWxaJNthBj94GHHUz3Kt4/wJWCFg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12117},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","shasum":"42a2bb73e48732134d6cf6ef0841beca45a4f056","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @absolutejs/queue --external @sinclair/typebox && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-1tDVLSVNYvAfchXzOGw/0rIZmHYT9o7YxyMRKfoK3AlT9L23Aycd3xwToP6EMr4s+gR+qpNZUqLV/vN0Nzk8pA==","absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/incidents.git","type":"git"},"_npmVersion":"10.8.3","description":"Durable incident delivery workers with leases, retries, escalation preparation, and operator metrics.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@absolutejs/queue":"0.4.1","@sinclair/typebox":"0.34.52","@absolutejs/manifest":"0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.8.1","@types/bun":"1.3.14","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/incidents_0.1.1_1784254743521_0.7984686599758029","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@absolutejs/incidents","version":"0.1.2","author":"Alex Kahn","license":"MIT","_id":"@absolutejs/incidents@0.1.2","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/incidents","bugs":{"url":"https://github.com/absolutejs/incidents/issues"},"dist":{"shasum":"2fb11dcabf8f2846a216b3d3e5069a1a84de710c","tarball":"https://registry.npmjs.org/@absolutejs/incidents/-/incidents-0.1.2.tgz","fileCount":10,"integrity":"sha512-v49hrp25+tck7i5K8qbFvp1ct65lotjPTZfsGjWsygx9Qi2Z1pDEyfEhGTnpLp8C8jmwy/yuMkPUsiFs4ZtgXg==","signatures":[{"sig":"MEYCIQDJkRi12oVhnnpX0yUGJpXXlWodA5vIJxSy0vKdl/BF6wIhAPpmsQNEe9IuUR7NDvvWGWD+lRYdsjws++Ys6H7PgSnu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12469},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","shasum":"2fb11dcabf8f2846a216b3d3e5069a1a84de710c","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @absolutejs/queue --external @sinclair/typebox && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-v49hrp25+tck7i5K8qbFvp1ct65lotjPTZfsGjWsygx9Qi2Z1pDEyfEhGTnpLp8C8jmwy/yuMkPUsiFs4ZtgXg==","absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/incidents.git","type":"git"},"_npmVersion":"10.8.3","description":"Durable incident delivery workers with leases, retries, escalation preparation, and operator metrics.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@absolutejs/queue":"0.7.1","@sinclair/typebox":"0.34.52","@absolutejs/manifest":"0.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.8.1","@types/bun":"1.3.14","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/incidents_0.1.2_1784959213821_0.9425809215950185","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@absolutejs/incidents","version":"0.1.3","author":{"name":"Alex Kahn"},"license":"MIT","_id":"@absolutejs/incidents@0.1.3","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/incidents","bugs":{"url":"https://github.com/absolutejs/incidents/issues"},"dist":{"shasum":"608f6f38a0b88f766456fb5532567a85cb76ed81","tarball":"https://registry.npmjs.org/@absolutejs/incidents/-/incidents-0.1.3.tgz","fileCount":10,"integrity":"sha512-q51jXjRUKJlzYv87rkQIf94cCBUaBjhFH5fnQGxTwkRoyiVDvunLRXV0X3fmEOQzyoLc6az0jQZFt6u6PN/4lQ==","signatures":[{"sig":"MEQCIAxfvYOmKCSW2dOIKCWBzUck4hP/rypIMNneY8lQA+u8AiBvbt4wwwuLy4uGJdT+ButR08MLafHP8jQl/fDeqHcmGQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12567},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @absolutejs/queue --external @sinclair/typebox && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/incidents.git","type":"git"},"_npmVersion":"10.9.2","description":"Durable incident delivery workers with leases, retries, escalation preparation, and operator metrics.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@absolutejs/queue":"0.7.2","@sinclair/typebox":"0.34.52","@absolutejs/manifest":"0.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.8.1","@types/bun":"1.3.14","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/incidents_0.1.3_1786078300366_0.7943516907654993","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@absolutejs/incidents","version":"0.1.4","author":{"name":"Alex Kahn"},"license":"MIT","_id":"@absolutejs/incidents@0.1.4","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/incidents","bugs":{"url":"https://github.com/absolutejs/incidents/issues"},"dist":{"shasum":"6a0f2b5386e05c7847b847c0915196b9f057b771","tarball":"https://registry.npmjs.org/@absolutejs/incidents/-/incidents-0.1.4.tgz","fileCount":10,"integrity":"sha512-yOQQfOfqRzyjsabwE2GbDh4kiXN3wEFon5m9IcdPl0dx4eh/FZvpszbvk7FXDgYLVk3IKev8C8vwSlwFLaoDKA==","signatures":[{"sig":"MEQCIHbP6GDrupoP+iTvPJmPbMy3/+SaII7DtBfvrbRA5zawAiAb8fH2gzcrJjdyhz0emOESuoccjsNYiIhugjXmWUp5HQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12567},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"869d9593dd06c0ccca1a2d7a132ca2e8971a7060","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @absolutejs/queue --external @sinclair/typebox && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/incidents.git","type":"git"},"_npmVersion":"10.9.2","description":"Durable incident delivery workers with leases, retries, escalation preparation, and operator metrics.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@absolutejs/queue":"0.8.0","@sinclair/typebox":"0.34.52","@absolutejs/manifest":"0.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.8.1","@types/bun":"1.3.14","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/incidents_0.1.4_1787346055692_0.06667979811031732","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@absolutejs/incidents","version":"0.1.5","description":"Durable incident delivery workers with leases, retries, escalation preparation, and operator metrics.","type":"module","license":"MIT","author":{"name":"Alex Kahn"},"repository":{"type":"git","url":"git+https://github.com/absolutejs/incidents.git"},"homepage":"https://github.com/absolutejs/incidents","bugs":{"url":"https://github.com/absolutejs/incidents/issues"},"publishConfig":{"access":"public"},"main":"./dist/index.js","types":"./dist/index.d.ts","absolutejs":{"manifestContract":2},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @absolutejs/queue --external @sinclair/typebox && tsc -p tsconfig.build.json && absolute-manifest emit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"dependencies":{"@absolutejs/manifest":"0.9.0","@absolutejs/queue":"0.8.1","@sinclair/typebox":"0.34.52"},"devDependencies":{"@types/bun":"1.3.14","prettier":"3.8.1","typescript":"5.9.3"},"_id":"@absolutejs/incidents@0.1.5","gitHead":"68c554a33ad39f8e2cfa1eb5ec921888c3761508","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-4lSub/JiXJuUjrKDLb0DzTHDabTpUrNqsTQLFthLJlalC1JXZxqNV9A6sp8PDbhc4KgoZkhDNhdAAFUPa9VxzQ==","shasum":"6864af7f1c4ec06f359afbf562ad626f0ece8c8f","tarball":"https://registry.npmjs.org/@absolutejs/incidents/-/incidents-0.1.5.tgz","fileCount":10,"unpackedSize":12567,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICX41ToZ4zHm4CDWdTlV6dEnN+B6ptRrY2QNschqPZ40AiEA8B4VBsIwsCW6CZiW+T6dLcVUIA1eQkCgT+pn+H7BrsM="}]},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"directories":{},"maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/incidents_0.1.5_1787449736160_0.3412398579295859"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-17T02:16:06.967Z","modified":"2026-08-23T01:48:56.455Z","0.1.0":"2026-07-17T02:16:07.285Z","0.1.1":"2026-07-17T02:19:03.667Z","0.1.2":"2026-07-25T06:00:13.960Z","0.1.3":"2026-08-07T04:51:40.505Z","0.1.4":"2026-08-21T21:00:55.838Z","0.1.5":"2026-08-23T01:48:56.305Z"},"bugs":{"url":"https://github.com/absolutejs/incidents/issues"},"author":{"name":"Alex Kahn"},"license":"MIT","homepage":"https://github.com/absolutejs/incidents","repository":{"type":"git","url":"git+https://github.com/absolutejs/incidents.git"},"description":"Durable incident delivery workers with leases, retries, escalation preparation, and operator metrics.","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"readme":"# @absolutejs/incidents\n\nReusable incident-delivery infrastructure for AbsoluteJS control planes.\nApplications retain their domain-specific incident schema and transitions;\nthis package owns the operational machinery that should not be rewritten:\n\n## Delivery worker capabilities\n\n- multi-replica lease claiming through a pluggable store;\n- bounded exponential retry after provider failures;\n- expired-lease recovery through the store's claim contract;\n- a preparation hook for discovery, deduplication, dismissal, or escalation;\n- single-flight runs, graceful drain, scheduling, and operator metrics.\n\n## Store and idempotency contract\n\nThe store must claim atomically and return an incremented one-based attempt.\nPostgreSQL adapters should use `FOR UPDATE SKIP LOCKED` and make expired leases\nclaimable. Delivery handlers receive a stable idempotency key and should pass it\nto providers that support idempotent requests.\n\n## Quick start\n\n```ts\nimport { createIncidentDeliveryWorker } from '@absolutejs/incidents';\n\nconst worker = createIncidentDeliveryWorker({\n\tstore: incidentDeliveryStore,\n\tprepare: discoverAndEscalateIncidents,\n\tdeliver: (delivery, signal) =>\n\t\tdispatchAlert(delivery.payload, {\n\t\t\tidempotencyKey: delivery.idempotencyKey,\n\t\t\tsignal\n\t\t})\n});\n\nawait worker.runOnce();\nworker.start();\n```\n\n## Application-owned policy\n\nIncident state, event ledgers, acknowledgement rules, resolution authorization,\nand recipient selection remain application policy. This separation lets one\nworker serve email, paging, webhook, or provider-specific adapters without\nforcing every product into one database schema.\n","readmeFilename":"README.md"}