@oxy.so/federation 2.3.0 → 2.4.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 ADDED
@@ -0,0 +1,31 @@
1
+ # Oxy federation
2
+
3
+ ## Authorizing outbound delivery
4
+
5
+ `createDeliveryService({ authorizeDelivery })` optionally checks live application
6
+ policy before signing or queueing an activity. It receives `activity` and the
7
+ trusted `senderAccountId` supplied by the app or persisted delivery job. Never
8
+ infer that identity from an activity URL or a key ID. Follower fanout checks once
9
+ for the batch; each later worker delivery checks again.
10
+
11
+ Return `true` to allow or `false` for a definitive refusal. A refusal throws
12
+ `DeliveryAuthorizationDeniedError`: a durable worker should mark the job
13
+ suppressed (or permanently failed), without marking it delivered or retrying it.
14
+ Other thrown errors are transient authority failures and should follow the
15
+ worker's normal bounded retry policy. Neither path signs or sends the activity.
16
+ Do not catch an authority failure and retry through an unguarded transport.
17
+
18
+ Without the optional hook, delivery behavior is unchanged. `sendUndoFollow`'s
19
+ boolean reports local relationship removal; it does not confirm remote delivery.
20
+
21
+ ## Discovery response caching
22
+
23
+ `createWebfingerRouter({ httpCacheTtlSeconds })` controls HTTP caching of fresh,
24
+ cached and instance WebFinger responses. The default remains 3600 seconds.
25
+ `createActorRouter` accepts the same option for human and instance actor
26
+ responses, retaining its existing 1800-second default.
27
+ Use `0` for `Cache-Control: no-store` when live privacy decisions must govern
28
+ each request. Only whole seconds from 0 through 86400 are accepted. This does
29
+ not change the injected JRD cache: applications must also authorize its reads
30
+ and their user resolver against current policy. It cannot retract documents
31
+ already cached by remote consumers before this setting changes.