@ours.network/messenger-server 1.0.31-nightly.9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -404,3 +404,38 @@ Use the companion Fleet gateway and its local password/session authentication.
404
404
  See [Fleet setup and verification](docs/FLEET-PREVIEW.md) for connection requirements,
405
405
  current coverage and limitations. `npm run test:fleet` runs the current isolated fixture gates.
406
406
  The older mock walkthrough and its browser tests describe an earlier design stage.
407
+
408
+
409
+ ### Dedicated notification service
410
+
411
+ Set `OURS_NOTIFICATIONS_ORIGIN` and a Messenger-scoped `OURS_NOTIFICATIONS_PRODUCER_TOKEN` to forward incoming messages/files to [ours-notifications](https://github.com/adapt-toolkit/ours-notifications). Both settings must be provided together. The canonical watcher durably queues notifications even without a local push binding, freezes projected content before its first HTTP attempt, and retries the same payload after outages/restarts. Keep the Messenger state directory across restarts. When configured, new events use the dedicated service; legacy pending push jobs may finish. Existing standalone push endpoints remain for compatibility.
412
+
413
+ Workspace enrollment supports optional `preserveProfile: true` on its protected POST endpoint. This skips human profile creation/replacement (including an absent profile); root checks and the signed binding command remain mandatory. The protected enrollment-identity response advertises `preserveProfile: true` so clients can fail closed against older servers. Omitted/false keeps fresh-host account profile setup.
414
+
415
+ Messenger may run as the Human root or as a permanent identity under it. For the latter, the enrollment-identity response also carries `rootCid`, the root the daemon describes for the bound identity; `POST /api/identity/profile` accepts both. Only a Messenger bound to the root itself signs the workspace binding on `POST /api/workspace/enroll`; for an identity under the root the caller obtains that signature from the root outside Messenger.
416
+
417
+ After successful contact removal, the notification producer durably retires that
418
+ conversation through the notification service's scoped `/api/v1/delete-target`
419
+ route. Pending sends for that contact are removed; cleanup follows any already
420
+ inflight send and retries after service outages or restart. Watch replay confirms
421
+ absence against a complete contacts/pending inventory before dropping an event.
422
+ Inventory errors preserve the queue. The gateway and notification service must
423
+ support this producer lifecycle route before source cleanup can be delivered.
424
+
425
+ Profile-preserving workspace enrollment reuses an already authenticated contact
426
+ with the exact pinned enrollment server CID. This permits a fresh signed account
427
+ challenge after the one-time invitation was used for registration retirement;
428
+ account-side invitation provenance or an exact signed replacement handoff still
429
+ controls proof acceptance.
430
+
431
+ `POST /api/workspace/unregister` carries the first-party retirement command when
432
+ Messenger already holds the Human root lease. It requires local API/CSRF
433
+ authentication, a permanent root matching `rootCid`, the exact ready enrollment
434
+ server contact, and well-formed workspace/host/nonce identifiers. An optional
435
+ three-field replacement challenge is forwarded unchanged. The account service
436
+ owns retirement authorization and cleanup; this route only sends the signed
437
+ command and acknowledges submission.
438
+
439
+ Conversation notifications use `/fleet/chats/contacts/:contactId`, escaping the ID once and preserving the matching message anchor. Contact retirement matches canonical contact identity independent of filters and anchors. Deploy the app, notification service, and producers together: old query-based conversation links are intentionally unsupported. Previously frozen delivery URLs replay unchanged for idempotency, and unsupported persisted cleanup URLs remain pending without being sent or blocking canonical cleanup. Contact lifecycle authorization and inventory checks still apply.
440
+
441
+ Full resource SSE delivery and registered initial reads are documented in [docs/resource-delivery.md](docs/resource-delivery.md).
@@ -38,7 +38,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
38
38
  var define_MESSENGER_BUILD_INFO_default;
39
39
  var init_define_MESSENGER_BUILD_INFO = __esm({
40
40
  "<define:__MESSENGER_BUILD_INFO__>"() {
41
- define_MESSENGER_BUILD_INFO_default = { name: "@ours.network/messenger-server", version: "1.0.31-nightly.9", sha: "6a01873ba636d187e4410aef45723a5a77d7d691", dirty: true };
41
+ define_MESSENGER_BUILD_INFO_default = { name: "@ours.network/messenger-server", version: "2.0.0", sha: "0f6e2a35732ec0a218eab602ade119ab88a62773", dirty: false };
42
42
  }
43
43
  });
44
44