Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .changeset/adr-0018-m5-webhooks-shared-outbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
"@objectstack/plugin-webhooks": major
"@objectstack/service-messaging": minor
---

ADR-0018 M3 (Phase 5): `plugin-webhooks` now delivers through the shared
`service-messaging` HTTP outbox instead of its own.

The webhook delivery substrate — durable outbox, cluster-coordinated dispatcher,
retry/backoff/dead-letter, retention — is removed from `plugin-webhooks` and
replaced by the generic `sys_http_delivery` outbox + `HttpDispatcher` in
`@objectstack/service-messaging`. Webhooks keep only their domain concerns: the
`sys_webhook` config object, the `AutoEnqueuer` (now enqueues `source: 'webhook'`
rows via `messaging.enqueueHttp`), and the redeliver admin endpoint (now backed
by `messaging.redeliverHttp`).

**`@objectstack/service-messaging`:** `MessagingService` gains `redeliverHttp(id)`
and `listHttp(filter)` over the HTTP outbox.

**`@objectstack/plugin-webhooks` — BREAKING:**

- Now **requires** `MessagingServicePlugin` (declared as a plugin dependency).
- Removed exports: `WebhookDispatcher`, `MemoryWebhookOutbox`, `SqlWebhookOutbox`
(and the `./sql` subpath), `DeliveryRetentionSweeper`, `hashPartition`,
`sendOnce` / `classifyAttempt` / `nextRetryDelayMs`, and the `IWebhookOutbox` /
`WebhookDelivery` / `EnqueueInput` / `AckResult` / `RedeliverError` types.
- Removed the `sys_webhook_delivery` object — webhook deliveries are now rows in
`sys_http_delivery` (`source = 'webhook'`). The Setup nav points there.
- `AutoEnqueuer`'s constructor takes an `HttpEnqueueFn` instead of an
`IWebhookOutbox`.
- `WebhookOutboxPluginOptions` reduced to `{ autoEnqueue }` (dispatcher / outbox /
retention / nodeId options removed — those now live on `MessagingServicePlugin`).
11 changes: 2 additions & 9 deletions packages/plugins/plugin-webhooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./sql": {
"types": "./dist/sql-outbox.d.ts",
"import": "./dist/sql-outbox.js",
"require": "./dist/sql-outbox.cjs"
},
"./schema": {
"types": "./dist/schema.d.ts",
"import": "./dist/schema.js",
Expand All @@ -29,10 +24,8 @@
},
"dependencies": {
"@objectstack/core": "workspace:*",
"@objectstack/platform-objects": "workspace:*",
"@objectstack/service-cluster": "workspace:*",
"@objectstack/spec": "workspace:*",
"@objectstack/types": "workspace:*"
"@objectstack/service-messaging": "workspace:*",
"@objectstack/spec": "workspace:*"
},
"devDependencies": {
"@types/node": "^25.9.1",
Expand Down
Loading
Loading