{"locator":"npm:@open-mercato/events","path":"@open-mercato/events","npm":"@open-mercato/events","github":null,"repoPath":"open-mercato/open-mercato#main/packages/events","kind":"module","type":"official","enterprise":false,"title":"Events","summary":"Event bus with module subscribers, inline or persistent delivery and a queue worker for async events.","whenToUse":"Use when modules must react to each other's domain events, with retries for persistent ones. New apps already enable it.","whenNotToUse":null,"category":"storage-infrastructure","tags":["events","subscribers","queue"],"providers":[],"moduleIds":["events"],"requires":[],"replaces":[],"slotConflicts":[],"renamedFrom":[],"supersededBy":null,"alternatives":[],"status":"active","listed":true,"featured":false,"license":{"spdx":"MIT","kind":"osi","mismatch":false},"version":{"latest":"0.10.1","preview":null,"publishedAt":"2026-11-25","integrity":"sha512-LAlPAKAdlIzlQ8tUjaxcxz3TBT6OqJa5m1vfom6N1Kx5mRDeisOrBF9vtdCbyMr5/+Qi+JxMr/VBlAI7WtKafQ==","installableFrom":"2026-11-25","gitRef":null,"recommended":{"0.10":null,"0.9":"0.9.0","next":null}},"identity":{"builtFrom":"verified","claimed":false,"source":"npm"},"compat":{"builtFor":{"range":null,"kind":"missing","lines":[]},"lines":{"0.9":{"status":"harness-red","step":"typecheck","omVersion":"0.9.0","moduleVersion":"0.9.0","at":"2026-11-29T11:30:44Z","receipt":"r_20261129_e5f612bd10e0","since":"2026-11-19","precheck":null,"patches":[]}},"verifiedOn":[],"inPresets":["0.9","0.10","next"],"ships":{"0.10":"0.10.1","0.9":"0.9.0","next":"0.11.1-develop.9022.1.4a0659af46"},"inEmptyPreset":["0.9","0.10","next"],"isolation":{"0.10":{"status":"broken","step":"smoke","moduleVersion":"0.10.1","at":"2026-12-03T02:59:35Z","receipt":"r_20261203_8c6a0b12c8e0","finding":"GET /api/events needs the workflows.view feature, and the empty preset does not enable the workflows module."},"0.9":{"status":"broken","step":"smoke","moduleVersion":"0.9.0","at":"2026-11-15T09:26:36Z","receipt":"r_20261115_e148da0a9a8d","finding":"GET /api/events needs the workflows.view feature, and the empty preset does not enable the workflows module."}}},"anatomy":{"version":"0.10.1","coverage":"partial","counts":{"entities":0,"tables":0,"migrations":0,"routes":2,"publicRoutes":0,"aclFeatures":0,"eventsEmitted":0,"eventsConsumed":0,"backendPages":0,"frontendPages":0,"widgets":0,"workers":1,"cli":0,"aiTools":0,"aiAgents":0,"extends":0},"lists":{"aclFeatures":[],"eventsEmitted":[],"eventsConsumed":[],"env":["WORKERS_EVENTS_CONCURRENCY","DATABASE_URL","OM_BROADCAST_COALESCE_INTERVAL_MS","QUEUE_STRATEGY"],"envIfSet":["OM_EVENTS_SHARED_PRODUCER"],"hosts":[],"tables":[],"publicRoutes":[],"credentials":[]},"callout":"ADDS 2 ROUTES (0 PUBLIC)","diff":{"from":"0.10.0","added":{"tables":0,"routes":0,"publicRoutes":0,"aclFeatures":0,"env":[],"hosts":[]},"removed":{"tables":0,"routes":0,"aclFeatures":0}}},"signals":{"receipt":{"0.10":"untested","0.9":"harness-red","next":"untested"},"fit":{"0.10":"ok","0.9":"drift","next":"unknown"},"anatomy":"partial","supplyChain":{"status":"ok","reasons":[]},"hygiene":{"status":"ok","failing":[]},"maintenance":{"status":"current","lastRelease":"2026-11-25","catchUpDays":null},"declaredVsObserved":{"status":"mismatch","notes":["No Open Mercato peer range; verified on no line."]}},"tier":"listed","quality":null,"agentPolicy":{"0.10":{"decision":"ask","reasons":[{"code":"NOT_VERIFIED","text":"Not yet tested in a new app on 0.10. In isolation (empty preset): broken at smoke on 3 Dec."},{"code":"NOT_VERIFIED","text":"In isolation (empty preset): GET /api/events needs the workflows.view feature, and the empty preset does not enable the workflows module."},{"code":"IN_PRESET","text":"Nothing to install: a new app already registers events in src/modules.ts."}]},"0.9":{"decision":"ask","reasons":[{"code":"NOT_VERIFIED","text":"Not judged on 0.9: our test app failed on 29 Nov."},{"code":"IN_PRESET","text":"Nothing to install: a new app already registers events in src/modules.ts."}]},"next":{"decision":"ask","reasons":[{"code":"NOT_VERIFIED","text":"Not yet tested in a new app on next."},{"code":"IN_PRESET","text":"Nothing to install: a new app already registers events in src/modules.ts."}]}},"install":{"cli":"yarn add @open-mercato/events@0.10.1","cmm":"npx create-mercato-module install @open-mercato/events@0.10.1","needsAllowThirdParty":false,"moduleFlag":null},"stats":{"downloads30d":110031,"stars":null},"sigil":{"glyph":"0200100","phase":86,"publicRoutes":false},"links":{"page":"https://www.openmercato.com/run/m/@open-mercato/events","md":"https://www.openmercato.com/run/m/@open-mercato/events.md","json":"https://www.openmercato.com/run/m/@open-mercato/events.json","facts":"https://www.openmercato.com/run/m/@open-mercato/events/v/0.10.1/facts.json","npm":"https://www.npmjs.com/package/@open-mercato/events","repo":"https://github.com/open-mercato/open-mercato","docs":"https://docs.openmercato.com/framework/events/overview"},"addedAt":"2026-10-23","updatedAt":"2026-12-03T18:30:24Z","_meta":{"com.openmercato.modules/installable":{"0.10":"0.10.1","0.9":"0.10.1","next":"0.10.1"}},"facts":{"factsVersion":1,"extractor":{"engine":"@open-mercato/cli@0.9.0 extractModuleFacts","factsContractVersion":2,"catalog":"om-modules rentgen 5","durationMs":27},"package":{"locator":"npm:@open-mercato/events","name":"@open-mercato/events","version":"0.10.1","integrity":"sha512-LAlPAKAdlIzlQ8tUjaxcxz3TBT6OqJa5m1vfom6N1Kx5mRDeisOrBF9vtdCbyMr5/+Qi+JxMr/VBlAI7WtKafQ==","source":"npm-tarball","gitRef":null},"gate":{"installable":true,"needsModuleFlag":false,"reason":null,"modules":[{"id":"events","src":true,"dist":true}]},"kind":"module","license":{"value":"MIT","kind":"osi","mismatch":false,"sources":{"packageJson":"MIT","licenseFile":null,"moduleInfo":null,"integrationTs":null}},"omPeers":{},"dependencies":{"@open-mercato/queue":"0.10.1","@open-mercato/shared":"0.10.1","pg":"8.23.0"},"agentsMd":true,"readmeExcerpt":"# @open-mercato/events 📡\n\nEvent-driven backbone for Open Mercato modules.\n\n`@open-mercato/events` enables typed event publication/subscription with support for ephemeral and persistent delivery patterns.\n\n## Why this package ✨\n\n- 🧩 Decouple modules with clean event contracts\n- 🔁 Persistent subscribers for reliable side effects\n- ⚡ Ephemeral events for real-time UX flows\n- 🧠 Works with queue workers for scalable processing\n\n## Install\n\n```bash\nyarn add @open-mercato/events\n```\n\n## Learn more\n\n- GitHub (package): https://github.com/open-mercato/open-mercato/tree/main/packages/events\n- GitHub (project): https://github.com/open-mercato/open-mercato\n- Docs: https://docs.openmercato.com\n\n## License\n\nMIT\n","modules":[{"id":"events","title":"Events","description":"Event bus and subscriber dispatch","requires":[],"ejectable":null,"data":{"entities":[],"migrations":{"count":0,"first":null,"last":null},"customEntities":0},"http":{"routes":[{"method":"GET","path":"/api/events","requireAuth":true,"requireFeatures":["workflows.view"],"hasOpenApi":true,"src":{"file":"src/modules/events/api/route.ts","line":52}},{"method":"GET","path":"/api/events/stream","requireAuth":true,"requireFeatures":[],"hasOpenApi":true,"src":{"file":"src/modules/events/api/stream/route.ts","line":309}}],"legacyRouteFiles":0,"authResolved":1},"security":{"aclFeatures":[],"setupDefaultRoleFeatures":false},"events":{"emits":[],"subscribes":[]},"ui":{"backendPages":[],"frontendPages":[],"widgets":0,"extensionHosts":0},"background":{"workers":[{"queue":"events"}],"cli":[]},"ai":{"tools":[],"agents":[]},"config":{"credentials":[],"env":[{"name":"WORKERS_EVENTS_CONCURRENCY","src":{"file":"src/modules/events/workers/events.worker.ts","line":13}},{"name":"DATABASE_URL","src":{"file":"src/bridge.ts","line":56}},{"name":"OM_BROADCAST_COALESCE_INTERVAL_MS","src":{"file":"src/broadcast-coalescer.ts","line":59}},{"name":"OM_EVENTS_SHARED_PRODUCER","src":{"file":"src/bus.ts","line":253},"ifSet":true},{"name":"QUEUE_STRATEGY","src":{"file":"src/bus.ts","line":367}}]},"network":{"hosts":[],"undeclared":[]},"extends":[],"omImports":{"@open-mercato/queue":{".":["JobContext","Queue","QueuedJob","WorkerMeta","createQueue"]},"@open-mercato/shared":{"lib/api/context":["resolveRequestContext"],"lib/auth/principal-service":["OrganizationScopeService"],"lib/boolean":["parseBooleanWithDefault"],"lib/db/ssl":["getSslConfig"],"lib/events/patterns":["matchEventPattern"],"lib/logger":["createLogger"],"lib/modules/resource-usage":["inferModuleIdFromResourceId","withModuleResourceUsage"],"lib/number":["parseNumberWithDefault"],"lib/openapi":["OpenApiRouteDoc"],"lib/redis/connection":["getRedisUrlOrThrow"],"lib/sse/connectionBounds":["resolveSseConnectionBounds"],"modules/events":["getDeclaredEvents","isBroadcastEvent","isCoalescedBroadcastEvent","isCrossProcessBroadcastEvent","isPortalBroadcastEvent","isPrivateCrossProcessBroadcastEvent","isPrivateCrossProcessEventEmitter"],"modules/registry":["ModuleInfo"]}},"collisionKeys":{"moduleId":"events","tables":[],"aclFeatures":[],"eventIds":[],"backendRoutes":[]},"publicRoutes":0,"glyph":"0200100","lint":[{"code":"ships-tests","severity":"info","message":"The tarball ships test files.","anchor":null,"src":null}]}],"coverage":{"routesAuthResolved":1,"integrationTs":"absent"},"diagnostics":[]},"receipts":[{"schema":1,"id":"r_20261203_8c6a0b12c8e0","cellKey":"8c6a0b12c8e0604a4d411a0a2354793005a0b567786f49d1b121b79a24abc578","module":{"locator":"npm:@open-mercato/events","version":"0.10.1","integrity":"sha512-LAlPAKAdlIzlQ8tUjaxcxz3TBT6OqJa5m1vfom6N1Kx5mRDeisOrBF9vtdCbyMr5/+Qi+JxMr/VBlAI7WtKafQ=="},"om":{"line":"0.10","version":"0.10.1","createApp":"create-mercato-app@0.10.1","preset":"empty"},"harness":{"version":"c349007c2b5b","node":"24.21.0","yarn":"4.17.1","runner":"ubuntu-latest","mode":"realistic","patches":[]},"baseline":{"status":"verified","receipt":"r_20261203_59c5c6bb2c3d"},"requiresInstalled":[],"steps":[{"name":"scaffold","status":"pass","sec":4,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"install","status":"pass","sec":69,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"add","status":"pass","sec":10,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"generate","status":"pass","sec":8,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"typecheck","status":"pass","sec":41,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"initialize","status":"pass","sec":10,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"build","status":"pass","sec":79,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"start","status":"pass","sec":5,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"smoke","status":"fail","sec":1,"signature":"8c1fc8834f4a5d494338148da0c007f594a3a621","excerpt":"smoke: FAIL module api GET /api/events -> 403 (expected 2[0-9][0-9])\n{\"error\":\"Forbidden\",\"requiredFeatures\":[\"workflows.view\"]}\nsmoke: 1 check(s) failed\nsmoke: server log ok","file":null,"line":null}],"result":{"status":"broken","failedStep":"smoke","alsoFailed":[],"classification":"module-fail","quarantineUntil":null},"transition":{"from":null,"to":"broken","confirmed":true},"run":{"id":47019911269,"attempt":2,"url":"https://github.com/open-mercato/modules/actions/runs/47024124020/job/143973139225","at":"2026-12-03T02:59:35Z","durationSec":321},"attestation":null,"notes":["in-preset"]},{"schema":1,"id":"r_20261108_82ada6c85d0c","cellKey":"82ada6c85d0c171d9b4079fc287fda6bf85819ba2b202f69193de30812c5e288","module":{"locator":"npm:@open-mercato/events","version":"0.9.0","integrity":"sha512-YD9mGFduluVEmvas16mw9fSHXxL+7p3YG1kNdbskDMWFtDzcp2uKwyJTgp/U7Zi8YrfAjAzc0VBNMEE0LN9Buw=="},"om":{"line":"0.9","version":"0.9.0","createApp":"create-mercato-app@0.9.0","preset":"classic"},"harness":{"version":"c349007c2b5b","node":"24.21.0","yarn":"4.17.1","runner":"ubuntu-latest","mode":"realistic","patches":[]},"baseline":{"status":"verified","receipt":"r_20261105_e5f612bd10e0"},"requiresInstalled":[],"steps":[{"name":"scaffold","status":"pass","sec":3,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"install","status":"pass","sec":63,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"add","status":"pass","sec":10,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"generate","status":"pass","sec":24,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"typecheck","status":"pass","sec":99,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"initialize","status":"pass","sec":40,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"build","status":"pass","sec":188,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"start","status":"pass","sec":5,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"smoke","status":"pass","sec":2,"signature":null,"excerpt":null,"file":null,"line":null}],"result":{"status":"verified","failedStep":null,"alsoFailed":[],"classification":"pass","quarantineUntil":null},"transition":{"from":null,"to":"verified","confirmed":true},"run":{"id":42465231410,"attempt":1,"url":"https://github.com/open-mercato/modules/actions/runs/42465231410/job/128683247302","at":"2026-11-08T08:59:30Z","durationSec":571},"attestation":null,"notes":["in-preset"]},{"schema":1,"id":"r_20261102_e148da0a9a8d","cellKey":"e148da0a9a8d0c6a45de3d1bb742e389ef170021f3a2e2400ea0ec6d845d0b86","module":{"locator":"npm:@open-mercato/events","version":"0.9.0","integrity":"sha512-YD9mGFduluVEmvas16mw9fSHXxL+7p3YG1kNdbskDMWFtDzcp2uKwyJTgp/U7Zi8YrfAjAzc0VBNMEE0LN9Buw=="},"om":{"line":"0.9","version":"0.9.0","createApp":"create-mercato-app@0.9.0","preset":"empty"},"harness":{"version":"c349007c2b5b","node":"24.21.0","yarn":"4.17.1","runner":"ubuntu-latest","mode":"realistic","patches":[{"id":"api-keys","why":"OM 0.9.0 empty preset omits api_keys (fixed on main in #7473, not in release/v0.9.x)","ref":"https://github.com/open-mercato/open-mercato/pull/7473"}]},"baseline":{"status":"verified","receipt":"r_20261029_971197f20239"},"requiresInstalled":[],"steps":[{"name":"scaffold","status":"pass","sec":3,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"install","status":"pass","sec":52,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"add","status":"pass","sec":8,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"generate","status":"pass","sec":5,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"typecheck","status":"pass","sec":22,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"initialize","status":"pass","sec":5,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"build","status":"pass","sec":51,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"start","status":"pass","sec":2,"signature":null,"excerpt":null,"file":null,"line":null},{"name":"smoke","status":"fail","sec":1,"signature":"8c1fc8834f4a5d494338148da0c007f594a3a621","excerpt":"smoke: FAIL module api GET /api/events -> 403 (expected 2[0-9][0-9])\n{\"error\":\"Forbidden\",\"requiredFeatures\":[\"workflows.view\"]}\nsmoke: 1 check(s) failed\nsmoke: server log ok","file":null,"line":null}],"result":{"status":"broken","failedStep":"smoke","alsoFailed":[],"classification":"module-fail","quarantineUntil":null},"transition":{"from":null,"to":"broken","confirmed":true},"run":{"id":41421327323,"attempt":2,"url":"https://github.com/open-mercato/modules/actions/runs/41425757989/job/125212157079","at":"2026-11-02T10:04:12Z","durationSec":218},"attestation":null,"notes":["in-preset"]}],"rules":[{"id":"LST-1","pass":true,"detail":"Descriptor is valid."},{"id":"LST-2","pass":true,"detail":"Stable version exists and is not deprecated."},{"id":"LST-3","pass":true,"detail":"src/modules and dist/modules pair found."},{"id":"LST-4","pass":true,"detail":"License: MIT."},{"id":"LST-5","pass":true,"detail":"No known malware or open critical advisory."},{"id":"LST-6","pass":true,"detail":"Name reviewed at merge."},{"id":"VER-1","pass":false,"detail":"Not yet tested in a new app on 0.10. In isolation (empty preset): broken at smoke on 3 Dec."},{"id":"VER-2","pass":true,"detail":"Fits statically on 0.10: ok."},{"id":"VER-3","pass":true,"detail":"Supply chain: ok."},{"id":"VER-4","pass":true,"detail":"No lint errors."},{"id":"VER-5","pass":true,"detail":"No repository in the descriptor to compare."}],"maintainers":["pat-lewczuk","piotrkarwatka"]}
