@fedify/fedify 2.3.0-dev.1110 → 2.3.0-dev.1119

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.
Files changed (97) hide show
  1. package/dist/{assert_rejects-B-qJtC9Z.mjs → assert_rejects-DQP-q39h.mjs} +27 -2
  2. package/dist/{builder-B-Y6fwSu.mjs → builder-Ond_h57y.mjs} +3 -3
  3. package/dist/compat/mod.d.cts +1 -1
  4. package/dist/compat/mod.d.ts +1 -1
  5. package/dist/compat/outgoing-jsonld.test.mjs +1 -1
  6. package/dist/compat/public-audience.test.mjs +1 -1
  7. package/dist/compat/transformers.test.mjs +2 -2
  8. package/dist/{context-C0C_sRha.d.cts → context-Ch-ZLyTQ.d.cts} +1 -1
  9. package/dist/{context-Dqgt8saU.d.ts → context-cSUMk2da.d.ts} +1 -1
  10. package/dist/{deno-hqC7tKJn.mjs → deno-DVsHS7rA.mjs} +1 -1
  11. package/dist/{docloader-BOEuuXkX.mjs → docloader-WsWfKaE5.mjs} +2 -2
  12. package/dist/federation/builder.test.mjs +3 -3
  13. package/dist/federation/collection.test.mjs +2 -2
  14. package/dist/federation/handler.test.mjs +8 -7
  15. package/dist/federation/idempotency.test.mjs +5 -5
  16. package/dist/federation/inbox.test.mjs +1 -1
  17. package/dist/federation/keycache.test.mjs +1 -1
  18. package/dist/federation/kv.test.mjs +2 -2
  19. package/dist/federation/metrics.test.d.mts +2 -0
  20. package/dist/federation/metrics.test.mjs +107 -0
  21. package/dist/federation/middleware.test.mjs +390 -10
  22. package/dist/federation/mod.cjs +1 -1
  23. package/dist/federation/mod.d.cts +2 -2
  24. package/dist/federation/mod.d.ts +2 -2
  25. package/dist/federation/mod.js +1 -1
  26. package/dist/federation/mq.test.mjs +2 -2
  27. package/dist/federation/negotiation.test.mjs +2 -2
  28. package/dist/federation/router.test.mjs +2 -2
  29. package/dist/federation/send.test.mjs +11 -11
  30. package/dist/federation/webfinger.test.mjs +3 -3
  31. package/dist/{getMachineId-bsd-etIyxDet.mjs → getMachineId-bsd-BY01PL1n.mjs} +1 -1
  32. package/dist/{getMachineId-darwin-D23zTf4g.mjs → getMachineId-darwin-Dr1gkBkp.mjs} +1 -1
  33. package/dist/{getMachineId-win-Dpap6v5i.mjs → getMachineId-win-QEYwcJiy.mjs} +1 -1
  34. package/dist/{http-O8MYWwk8.js → http-CouJSFVK.js} +461 -37
  35. package/dist/{http-DV0il3vk.cjs → http-CubOB9wq.cjs} +513 -35
  36. package/dist/{http-BDZeS5om.d.ts → http-D6LP89UO.d.ts} +7 -1
  37. package/dist/{http-C87EWkO0.d.cts → http-D6aw3j2U.d.cts} +7 -1
  38. package/dist/{http-BLopFpvC.mjs → http-DUV8ysti.mjs} +86 -37
  39. package/dist/{key-DW1EVmtP.mjs → key-BoWaYRHm.mjs} +1 -1
  40. package/dist/{kv-cache-C3NWWiTg.js → kv-cache-DBNpsneh.js} +1 -1
  41. package/dist/{kv-cache-Dya-TWMe.cjs → kv-cache-Dz31ATUT.cjs} +1 -1
  42. package/dist/{ld-BNkk2Yal.mjs → ld-B5K1mSuG.mjs} +60 -9
  43. package/dist/{send-hokVCPu6.mjs → metrics-C4attqv0.mjs} +124 -224
  44. package/dist/{middleware-D6FbOjuK.mjs → middleware-BDKFRjue.mjs} +1 -1
  45. package/dist/{middleware-DUWeXjZR.cjs → middleware-CmsDtIHI.cjs} +75 -309
  46. package/dist/{middleware-CjzI3aYo.js → middleware-Dtjz-hSk.js} +46 -280
  47. package/dist/{middleware-DA2WTBr4.mjs → middleware-t0jC8I99.mjs} +59 -34
  48. package/dist/{mod-DXY9JF28.d.cts → mod-B-Lin9Sy.d.ts} +25 -2
  49. package/dist/{mod-DHO9lk3D.d.ts → mod-BDhgfjP7.d.cts} +25 -2
  50. package/dist/{mod-B0rWmfW5.d.cts → mod-BR_BB0bh.d.cts} +1 -1
  51. package/dist/{mod-Dx3-hqyo.d.ts → mod-C6E8rkcz.d.ts} +1 -1
  52. package/dist/{mod-BhU_H1I_.d.ts → mod-DLrRb0dx.d.ts} +1 -1
  53. package/dist/{mod-CLPnQPsv.d.cts → mod-P9tE2WmM.d.cts} +1 -1
  54. package/dist/mod.cjs +4 -4
  55. package/dist/mod.d.cts +5 -5
  56. package/dist/mod.d.ts +5 -5
  57. package/dist/mod.js +4 -4
  58. package/dist/nodeinfo/client.test.mjs +2 -2
  59. package/dist/nodeinfo/handler.test.mjs +3 -3
  60. package/dist/nodeinfo/types.test.mjs +2 -2
  61. package/dist/otel/exporter.test.mjs +2 -2
  62. package/dist/{outgoing-jsonld-BgFLCJQ_.mjs → outgoing-jsonld-BNL8AC14.mjs} +1 -1
  63. package/dist/{owner-jvJAtR5O.mjs → owner-hDxI0ufu.mjs} +2 -2
  64. package/dist/{proof-BD92WeqV.cjs → proof-BUWfVr6Q.cjs} +78 -11
  65. package/dist/{proof-mfmHH9j0.mjs → proof-DhVuz4bc.mjs} +25 -7
  66. package/dist/{proof-5kT7OUPV.js → proof-n60t8o9P.js} +78 -11
  67. package/dist/send-BPhyR5Oo.mjs +225 -0
  68. package/dist/sig/accept.test.mjs +1 -1
  69. package/dist/sig/http.test.mjs +212 -6
  70. package/dist/sig/key.test.mjs +4 -4
  71. package/dist/sig/ld.test.mjs +138 -5
  72. package/dist/sig/mod.cjs +2 -2
  73. package/dist/sig/mod.d.cts +2 -2
  74. package/dist/sig/mod.d.ts +2 -2
  75. package/dist/sig/mod.js +2 -2
  76. package/dist/sig/owner.test.mjs +4 -4
  77. package/dist/sig/proof.test.mjs +167 -6
  78. package/dist/{std__assert-CRDpx_HF.mjs → std__assert-BTEgfoJo.mjs} +2 -27
  79. package/dist/utils/docloader.test.mjs +5 -5
  80. package/dist/utils/kv-cache.test.mjs +1 -1
  81. package/dist/utils/mod.cjs +1 -1
  82. package/dist/utils/mod.d.cts +1 -1
  83. package/dist/utils/mod.d.ts +1 -1
  84. package/dist/utils/mod.js +1 -1
  85. package/package.json +5 -5
  86. /package/dist/{accept-CceiKpCy.mjs → accept-CgDcxvjV.mjs} +0 -0
  87. /package/dist/{activity-listener-tztVvlNb.mjs → activity-listener-BeTGV3wc.mjs} +0 -0
  88. /package/dist/{client-B_A6mfn3.mjs → client-Bneh_DYR.mjs} +0 -0
  89. /package/dist/{collection-CA3V5zyK.mjs → collection-Cc3DVAhE.mjs} +0 -0
  90. /package/dist/{execAsync-DCBrgFiV.mjs → execAsync-Dxb7rNf3.mjs} +0 -0
  91. /package/dist/{getMachineId-linux-ObI47Hql.mjs → getMachineId-linux-Bbhofx-s.mjs} +0 -0
  92. /package/dist/{getMachineId-unsupported-Ddu-PFeh.mjs → getMachineId-unsupported-dIOte2Ct.mjs} +0 -0
  93. /package/dist/{keys-C3kae-6B.mjs → keys-CSYsOMFG.mjs} +0 -0
  94. /package/dist/{kv-x2IvBUyq.mjs → kv-QHE0oeM3.mjs} +0 -0
  95. /package/dist/{kv-cache-CiiNwT6W.mjs → kv-cache-DihufyAQ.mjs} +0 -0
  96. /package/dist/{public-audience-N3pyOx2p.mjs → public-audience-c9zmYKgA.mjs} +0 -0
  97. /package/dist/{types-BFowWFTT.mjs → types-D09GN0uZ.mjs} +0 -0
@@ -2,24 +2,25 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as RouterError } from "./router-BT_F5748.mjs";
5
- import { n as version, t as name } from "./deno-hqC7tKJn.mjs";
6
- import { t as formatAcceptSignature } from "./accept-CceiKpCy.mjs";
7
- import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-DW1EVmtP.mjs";
8
- import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-BLopFpvC.mjs";
9
- import { t as getAuthenticatedDocumentLoader } from "./docloader-BOEuuXkX.mjs";
10
- import { n as kvCache } from "./kv-cache-CiiNwT6W.mjs";
11
- import { a as signJsonLd, i as hasSignatureLike, o as verifyJsonLd, r as detachSignature } from "./ld-BNkk2Yal.mjs";
12
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-jvJAtR5O.mjs";
13
- import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-BgFLCJQ_.mjs";
14
- import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-mfmHH9j0.mjs";
15
- import { t as getNodeInfo } from "./client-B_A6mfn3.mjs";
16
- import { t as nodeInfoToJson } from "./types-BFowWFTT.mjs";
17
- import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-B-Y6fwSu.mjs";
18
- import { t as buildCollectionSynchronizationHeader } from "./collection-CA3V5zyK.mjs";
19
- import { a as getFederationMetrics, c as recordOutboxEnqueue, i as getDurationMs, n as extractInboxes, o as getRemoteHost, r as sendActivity, s as isAbortError, t as SendActivityError } from "./send-hokVCPu6.mjs";
5
+ import { n as version, t as name } from "./deno-DVsHS7rA.mjs";
6
+ import { c as recordOutboxActivity, i as isAbortError, l as recordOutboxEnqueue, n as getFederationMetrics, o as recordFanoutRecipients, r as getRemoteHost, s as recordInboxActivity, t as getDurationMs } from "./metrics-C4attqv0.mjs";
7
+ import { t as formatAcceptSignature } from "./accept-CgDcxvjV.mjs";
8
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-BoWaYRHm.mjs";
9
+ import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-DUV8ysti.mjs";
10
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-WsWfKaE5.mjs";
11
+ import { n as kvCache } from "./kv-cache-DihufyAQ.mjs";
12
+ import { a as signJsonLd, i as hasSignatureLike, o as verifyJsonLd, r as detachSignature } from "./ld-B5K1mSuG.mjs";
13
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-hDxI0ufu.mjs";
14
+ import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-BNL8AC14.mjs";
15
+ import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-DhVuz4bc.mjs";
16
+ import { t as getNodeInfo } from "./client-Bneh_DYR.mjs";
17
+ import { t as nodeInfoToJson } from "./types-D09GN0uZ.mjs";
18
+ import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-Ond_h57y.mjs";
19
+ import { t as buildCollectionSynchronizationHeader } from "./collection-Cc3DVAhE.mjs";
20
20
  import { t as KvKeyCache } from "./keycache-BeU0LCII.mjs";
21
21
  import { t as acceptsJsonLd } from "./negotiation-DDstyBvc.mjs";
22
22
  import { t as createExponentialBackoffPolicy } from "./retry-_VvV0h9f.mjs";
23
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-BPhyR5Oo.mjs";
23
24
  import { getLogger, withContext } from "@logtape/logtape";
24
25
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
25
26
  import { lookupWebFinger } from "@fedify/webfinger";
@@ -191,6 +192,7 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
191
192
  code: SpanStatusCode.UNSET,
192
193
  message: `Activity ${activity.id?.href} has already been processed.`
193
194
  });
195
+ recordInboxActivity(meterProvider, "rejected", getTypeId(activity).href);
194
196
  return "alreadyProcessed";
195
197
  }
196
198
  }
@@ -200,6 +202,7 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
200
202
  code: SpanStatusCode.ERROR,
201
203
  message: "Missing actor."
202
204
  });
205
+ recordInboxActivity(meterProvider, "rejected", getTypeId(activity).href);
203
206
  return "missingActor";
204
207
  }
205
208
  span.setAttribute("activitypub.actor.id", activity.actorId.href);
@@ -235,6 +238,7 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
235
238
  queue,
236
239
  activityType: getTypeId(activity).href
237
240
  }, 0);
241
+ recordInboxActivity(meterProvider, "queued", getTypeId(activity).href);
238
242
  logger.info("Activity {activityId} is enqueued.", {
239
243
  activityId: activity.id?.href,
240
244
  activity: json,
@@ -254,6 +258,7 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
254
258
  code: SpanStatusCode.UNSET,
255
259
  message: `Unsupported activity type: ${getTypeId(activity).href}`
256
260
  });
261
+ recordInboxActivity(meterProvider, "rejected", getTypeId(activity).href);
257
262
  span.end();
258
263
  return "unsupportedActivity";
259
264
  }
@@ -263,7 +268,7 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
263
268
  const activityType = getTypeId(activity).href;
264
269
  const started = performance.now();
265
270
  try {
266
- await listener(inboxContextFactory(recipient, json, activity?.id?.href, activityType), activity);
271
+ await listener(inboxContextFactory(recipient, json, activity.id?.href, activityType), activity);
267
272
  } finally {
268
273
  getFederationMetrics(meterProvider).recordInboxProcessingDuration(activityType, getDurationMs(started));
269
274
  }
@@ -288,9 +293,11 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
288
293
  code: SpanStatusCode.ERROR,
289
294
  message: String(error)
290
295
  });
296
+ recordInboxActivity(meterProvider, "rejected", getTypeId(activity).href);
291
297
  span.end();
292
298
  return "error";
293
299
  }
300
+ recordInboxActivity(meterProvider, "processed", getTypeId(activity).href);
294
301
  if (cacheKey != null) await kv.set(cacheKey, true, { ttl: Temporal.Duration.from({ days: 1 }) });
295
302
  logger.info("Activity {activityId} has been processed.", {
296
303
  activityId: activity.id?.href,
@@ -374,8 +381,8 @@ async function handleObject(request, { values, context, objectDispatcher, author
374
381
  * @param parameters The parameters for handling the collection.
375
382
  * @returns A promise that resolves to an HTTP response.
376
383
  */
377
- async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
378
- const spanName = name$1.trim().replace(/\s+/g, "_");
384
+ async function handleCollection(request, { name: name$2, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
385
+ const spanName = name$2.trim().replace(/\s+/g, "_");
379
386
  tracerProvider = tracerProvider ?? trace.getTracerProvider();
380
387
  const tracer = tracerProvider.getTracer(name, version);
381
388
  const cursor = new URL(request.url).searchParams.get("cursor");
@@ -417,7 +424,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
417
424
  collection = new OrderedCollection({
418
425
  id: baseUri,
419
426
  totalItems: totalItems == null ? null : Number(totalItems),
420
- items: filterCollectionItems(itemsOrResponse, name$1, filterPredicate)
427
+ items: filterCollectionItems(itemsOrResponse, name$2, filterPredicate)
421
428
  });
422
429
  } else {
423
430
  const lastCursor = await collectionCallbacks.lastCursor?.(context, identifier);
@@ -438,7 +445,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
438
445
  } else {
439
446
  const uri = new URL(baseUri);
440
447
  uri.searchParams.set("cursor", cursor);
441
- const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
448
+ const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$2}`, {
442
449
  kind: SpanKind.SERVER,
443
450
  attributes: {
444
451
  "activitypub.collection.id": uri.href,
@@ -482,7 +489,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
482
489
  id: uri,
483
490
  prev,
484
491
  next,
485
- items: filterCollectionItems(items, name$1, filterPredicate),
492
+ items: filterCollectionItems(items, name$2, filterPredicate),
486
493
  partOf
487
494
  });
488
495
  }
@@ -757,7 +764,7 @@ async function handleInbox(request, options) {
757
764
  * @returns A promise that resolves to an HTTP response.
758
765
  */
759
766
  async function handleInboxInternal(request, parameters, span) {
760
- const { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, queue, actorDispatcher, inboxListeners, inboxErrorHandler, unverifiedActivityHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, inboxChallengePolicy, tracerProvider } = parameters;
767
+ const { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, queue, actorDispatcher, inboxListeners, inboxErrorHandler, unverifiedActivityHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, inboxChallengePolicy, meterProvider, tracerProvider } = parameters;
761
768
  const logger = getLogger([
762
769
  "fedify",
763
770
  "federation",
@@ -835,6 +842,7 @@ async function handleInboxInternal(request, parameters, span) {
835
842
  contextLoader: ctx.contextLoader,
836
843
  documentLoader: ctx.documentLoader,
837
844
  keyCache,
845
+ meterProvider,
838
846
  tracerProvider
839
847
  });
840
848
  } catch (error) {
@@ -870,6 +878,7 @@ async function handleInboxInternal(request, parameters, span) {
870
878
  contextLoader: ctx.contextLoader,
871
879
  documentLoader: ctx.documentLoader,
872
880
  keyCache,
881
+ meterProvider,
873
882
  tracerProvider
874
883
  });
875
884
  } catch (error) {
@@ -917,6 +926,7 @@ async function handleInboxInternal(request, parameters, span) {
917
926
  documentLoader: ctx.documentLoader,
918
927
  timeWindow: signatureTimeWindow,
919
928
  keyCache,
929
+ meterProvider,
920
930
  tracerProvider
921
931
  });
922
932
  if (verification.verified === false) {
@@ -1165,8 +1175,8 @@ var CustomCollectionHandler = class {
1165
1175
  * @param CollectionPage The CollectionPage constructor.
1166
1176
  * @param filterPredicate Optional filter predicate for items.
1167
1177
  */
1168
- constructor(name$2, values, context, callbacks, tracerProvider = trace.getTracerProvider(), Collection, CollectionPage, filterPredicate) {
1169
- this.name = name$2;
1178
+ constructor(name$1, values, context, callbacks, tracerProvider = trace.getTracerProvider(), Collection, CollectionPage, filterPredicate) {
1179
+ this.name = name$1;
1170
1180
  this.values = values;
1171
1181
  this.context = context;
1172
1182
  this.callbacks = callbacks;
@@ -2131,6 +2141,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2131
2141
  });
2132
2142
  }
2133
2143
  }
2144
+ recordOutboxActivity(this.meterProvider, "abandoned", message.activityType);
2134
2145
  return;
2135
2146
  }
2136
2147
  if (this.outboxQueue?.nativeRetrial) {
@@ -2161,11 +2172,15 @@ var FederationImpl = class extends FederationBuilderImpl {
2161
2172
  queue: outboxQueue,
2162
2173
  activityType: retryMessage.activityType
2163
2174
  }, retryMessage.attempt);
2175
+ recordOutboxActivity(this.meterProvider, "retried", retryMessage.activityType);
2164
2176
  }
2165
- } else logger.error("Failed to send activity {activityId} to {inbox} after {attempt} attempts; giving up:\n{error}", {
2166
- ...logData,
2167
- error
2168
- });
2177
+ } else {
2178
+ logger.error("Failed to send activity {activityId} to {inbox} after {attempt} attempts; giving up:\n{error}", {
2179
+ ...logData,
2180
+ error
2181
+ });
2182
+ recordOutboxActivity(this.meterProvider, "abandoned", message.activityType);
2183
+ }
2169
2184
  return;
2170
2185
  }
2171
2186
  logger.info("Successfully sent activity {activityId} to {inbox}.", { ...logData });
@@ -2200,6 +2215,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2200
2215
  activity: message.activity,
2201
2216
  recipient: message.identifier
2202
2217
  });
2218
+ recordInboxActivity(this.meterProvider, "rejected", activityType);
2203
2219
  return;
2204
2220
  }
2205
2221
  }
@@ -2216,6 +2232,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2216
2232
  code: SpanStatusCode.ERROR,
2217
2233
  message: `Unsupported activity type: ${activityType}`
2218
2234
  });
2235
+ recordInboxActivity(this.meterProvider, "rejected", activityType);
2219
2236
  span.end();
2220
2237
  return;
2221
2238
  }
@@ -2228,6 +2245,7 @@ var FederationImpl = class extends FederationBuilderImpl {
2228
2245
  } finally {
2229
2246
  getFederationMetrics(this.meterProvider).recordInboxProcessingDuration(activityType, getDurationMs(started));
2230
2247
  }
2248
+ recordInboxActivity(this.meterProvider, "processed", activityType);
2231
2249
  } catch (error) {
2232
2250
  try {
2233
2251
  await this.inboxErrorHandler?.(context, error);
@@ -2278,13 +2296,17 @@ var FederationImpl = class extends FederationBuilderImpl {
2278
2296
  queue: inboxQueue,
2279
2297
  activityType
2280
2298
  }, retryMessage.attempt);
2299
+ recordInboxActivity(this.meterProvider, "retried", activityType);
2281
2300
  }
2282
- } else logger.error("Failed to process the incoming activity {activityId} after {trial} attempts; giving up:\n{error}", {
2283
- error,
2284
- activityId: activity.id?.href,
2285
- activity: message.activity,
2286
- recipient: message.identifier
2287
- });
2301
+ } else {
2302
+ logger.error("Failed to process the incoming activity {activityId} after {trial} attempts; giving up:\n{error}", {
2303
+ error,
2304
+ activityId: activity.id?.href,
2305
+ activity: message.activity,
2306
+ recipient: message.identifier
2307
+ });
2308
+ recordInboxActivity(this.meterProvider, "abandoned", activityType);
2309
+ }
2288
2310
  span.setStatus({
2289
2311
  code: SpanStatusCode.ERROR,
2290
2312
  message: String(error)
@@ -3311,6 +3333,7 @@ var ContextImpl = class ContextImpl {
3311
3333
  queue: this.federation.fanoutQueue,
3312
3334
  activityType: message.activityType
3313
3335
  }, 0);
3336
+ recordFanoutRecipients(this.federation.meterProvider, globalThis.Object.keys(message.inboxes).length, message.activityType);
3314
3337
  return true;
3315
3338
  }
3316
3339
  async *getFollowers(identifier) {
@@ -3374,6 +3397,7 @@ var ContextImpl = class ContextImpl {
3374
3397
  if (await verifyObject(Activity, json, {
3375
3398
  contextLoader,
3376
3399
  documentLoader: options.documentLoader ?? this.documentLoader,
3400
+ meterProvider: this.meterProvider,
3377
3401
  tracerProvider: options.tracerProvider ?? this.tracerProvider,
3378
3402
  keyCache
3379
3403
  }) == null) {
@@ -3516,6 +3540,7 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
3516
3540
  contextLoader: options.contextLoader ?? this.contextLoader,
3517
3541
  documentLoader: options.documentLoader ?? this.documentLoader,
3518
3542
  timeWindow: this.federation.signatureTimeWindow,
3543
+ meterProvider: this.meterProvider,
3519
3544
  tracerProvider: options.tracerProvider ?? this.tracerProvider
3520
3545
  });
3521
3546
  }
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { S as KeyCache } from "./http-C87EWkO0.cjs";
2
+ import { S as KeyCache } from "./http-D6LP89UO.js";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
+ import { MeterProvider, TracerProvider } from "@opentelemetry/api";
4
5
  import { DocumentLoader } from "@fedify/vocab-runtime";
5
- import { TracerProvider } from "@opentelemetry/api";
6
6
 
7
7
  //#region src/sig/ld.d.ts
8
8
  /**
@@ -127,9 +127,26 @@ interface VerifySignatureOptions {
127
127
  * @since 1.3.0
128
128
  */
129
129
  tracerProvider?: TracerProvider;
130
+ /**
131
+ * The OpenTelemetry meter provider. If omitted, the global meter provider
132
+ * is used.
133
+ * @since 2.3.0
134
+ */
135
+ meterProvider?: MeterProvider;
130
136
  }
131
137
  /**
132
138
  * Verifies Linked Data Signatures of the given JSON-LD document.
139
+ *
140
+ * This is a low-level utility that only checks the cryptographic signature
141
+ * and (optionally) the cached key. It does not run the JSON-LD parsing,
142
+ * attribution, and owner checks that a complete inbound LD verification
143
+ * needs. For incoming activities, prefer {@link verifyJsonLd}, which is
144
+ * the public verification entry point and the one that emits the
145
+ * `activitypub.signature.verification.duration` metric for the LD path.
146
+ * `verifySignature` itself only emits
147
+ * `activitypub.signature.key_fetch.duration`, since the rest of the work
148
+ * that the verification-duration metric is meant to cover happens in
149
+ * `verifyJsonLd`.
133
150
  * @param jsonLd The JSON-LD document to verify.
134
151
  * @param options Options for verifying the signature.
135
152
  * @returns The public key that signed the document or `null` if the signature
@@ -246,6 +263,12 @@ interface VerifyProofOptions {
246
263
  * @since 1.3.0
247
264
  */
248
265
  tracerProvider?: TracerProvider;
266
+ /**
267
+ * The OpenTelemetry meter provider. If omitted, the global meter provider
268
+ * is used.
269
+ * @since 2.3.0
270
+ */
271
+ meterProvider?: MeterProvider;
249
272
  }
250
273
  /**
251
274
  * Verifies the given proof for the object.
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { S as KeyCache } from "./http-BDZeS5om.js";
2
+ import { S as KeyCache } from "./http-D6aw3j2U.cjs";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
- import { TracerProvider } from "@opentelemetry/api";
5
4
  import { DocumentLoader } from "@fedify/vocab-runtime";
5
+ import { MeterProvider, TracerProvider } from "@opentelemetry/api";
6
6
 
7
7
  //#region src/sig/ld.d.ts
8
8
  /**
@@ -127,9 +127,26 @@ interface VerifySignatureOptions {
127
127
  * @since 1.3.0
128
128
  */
129
129
  tracerProvider?: TracerProvider;
130
+ /**
131
+ * The OpenTelemetry meter provider. If omitted, the global meter provider
132
+ * is used.
133
+ * @since 2.3.0
134
+ */
135
+ meterProvider?: MeterProvider;
130
136
  }
131
137
  /**
132
138
  * Verifies Linked Data Signatures of the given JSON-LD document.
139
+ *
140
+ * This is a low-level utility that only checks the cryptographic signature
141
+ * and (optionally) the cached key. It does not run the JSON-LD parsing,
142
+ * attribution, and owner checks that a complete inbound LD verification
143
+ * needs. For incoming activities, prefer {@link verifyJsonLd}, which is
144
+ * the public verification entry point and the one that emits the
145
+ * `activitypub.signature.verification.duration` metric for the LD path.
146
+ * `verifySignature` itself only emits
147
+ * `activitypub.signature.key_fetch.duration`, since the rest of the work
148
+ * that the verification-duration metric is meant to cover happens in
149
+ * `verifyJsonLd`.
133
150
  * @param jsonLd The JSON-LD document to verify.
134
151
  * @param options Options for verifying the signature.
135
152
  * @returns The public key that signed the document or `null` if the signature
@@ -246,6 +263,12 @@ interface VerifyProofOptions {
246
263
  * @since 1.3.0
247
264
  */
248
265
  tracerProvider?: TracerProvider;
266
+ /**
267
+ * The OpenTelemetry meter provider. If omitted, the global meter provider
268
+ * is used.
269
+ * @since 2.3.0
270
+ */
271
+ meterProvider?: MeterProvider;
249
272
  }
250
273
  /**
251
274
  * Verifies the given proof for the object.
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as HttpMessageSignaturesSpecDeterminer } from "./http-C87EWkO0.cjs";
2
+ import { n as HttpMessageSignaturesSpecDeterminer } from "./http-D6aw3j2U.cjs";
3
3
  import { n as KvStore, t as KvKey } from "./kv-gJ8LYbxX.cjs";
4
4
  import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
5
5
  import { TracerProvider } from "@opentelemetry/api";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Ct as WebFingerLinksDispatcher, et as ActorAliasMapper, l as RequestContext, nt as ActorHandleMapper, tt as ActorDispatcher } from "./context-Dqgt8saU.js";
2
+ import { Ct as WebFingerLinksDispatcher, et as ActorAliasMapper, l as RequestContext, nt as ActorHandleMapper, tt as ActorDispatcher } from "./context-cSUMk2da.js";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as HttpMessageSignaturesSpecDeterminer } from "./http-BDZeS5om.js";
2
+ import { n as HttpMessageSignaturesSpecDeterminer } from "./http-D6LP89UO.js";
3
3
  import { n as KvStore, t as KvKey } from "./kv-D6hNiMTK.js";
4
4
  import { TracerProvider } from "@opentelemetry/api";
5
5
  import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Ct as WebFingerLinksDispatcher, et as ActorAliasMapper, l as RequestContext, nt as ActorHandleMapper, tt as ActorDispatcher } from "./context-C0C_sRha.cjs";
2
+ import { Ct as WebFingerLinksDispatcher, et as ActorAliasMapper, l as RequestContext, nt as ActorHandleMapper, tt as ActorDispatcher } from "./context-Ch-ZLyTQ.cjs";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
package/dist/mod.cjs CHANGED
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  require("./chunk-DDcVe30Y.cjs");
5
5
  const require_transformers = require("./transformers-NeAONrAq.cjs");
6
6
  require("./compat/mod.cjs");
7
- const require_http = require("./http-DV0il3vk.cjs");
8
- const require_middleware = require("./middleware-DUWeXjZR.cjs");
9
- const require_proof = require("./proof-BD92WeqV.cjs");
7
+ const require_http = require("./http-CubOB9wq.cjs");
8
+ const require_middleware = require("./middleware-CmsDtIHI.cjs");
9
+ const require_proof = require("./proof-BUWfVr6Q.cjs");
10
10
  const require_types = require("./types-KC4QAoxe.cjs");
11
- const require_kv_cache = require("./kv-cache-Dya-TWMe.cjs");
11
+ const require_kv_cache = require("./kv-cache-Dz31ATUT.cjs");
12
12
  const require_federation_mod = require("./federation/mod.cjs");
13
13
  require("./nodeinfo/mod.cjs");
14
14
  require("./runtime/mod.cjs");
package/dist/mod.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CAM_bQXx.cjs";
3
- import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-C87EWkO0.cjs";
3
+ import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-D6aw3j2U.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-DEvZuyOE.cjs";
5
- import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, kt as ActivityTransformer, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "./context-C0C_sRha.cjs";
5
+ import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, kt as ActivityTransformer, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "./context-Ch-ZLyTQ.cjs";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-gJ8LYbxX.cjs";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-CLPnQPsv.cjs";
9
- import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-DXY9JF28.cjs";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-B0rWmfW5.cjs";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-P9tE2WmM.cjs";
9
+ import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-BDhgfjP7.cjs";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BR_BB0bh.cjs";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts
package/dist/mod.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CSddvgWN.js";
3
- import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-BDZeS5om.js";
3
+ import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-D6LP89UO.js";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CnngXDNJ.js";
5
- import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, kt as ActivityTransformer, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "./context-Dqgt8saU.js";
5
+ import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, kt as ActivityTransformer, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "./context-cSUMk2da.js";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-D6hNiMTK.js";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-Dx3-hqyo.js";
9
- import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-DHO9lk3D.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BhU_H1I_.js";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-C6E8rkcz.js";
9
+ import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-B-Lin9Sy.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DLrRb0dx.js";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "./chunk-CRNNMoPX.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BGMIq1cs.js";
5
5
  import "./compat/mod.js";
6
- import { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "./http-O8MYWwk8.js";
7
- import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-CjzI3aYo.js";
8
- import { a as verifyProof, c as getKeyOwner, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyObject, l as attachSignature, m as verifyJsonLd, n as hasProofLike, p as signJsonLd, r as signObject, s as doesActorOwnKey, t as createProof, u as createSignature } from "./proof-5kT7OUPV.js";
6
+ import { C as parseAcceptSignature, S as fulfillAcceptSignature, a as verifyRequestDetailed, c as fetchKeyDetailed, i as verifyRequest, l as generateCryptoKeyPair, o as exportJwk, r as signRequest, s as fetchKey, u as importJwk, w as validateAcceptSignature, x as formatAcceptSignature } from "./http-CouJSFVK.js";
7
+ import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-Dtjz-hSk.js";
8
+ import { a as verifyProof, c as getKeyOwner, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyObject, l as attachSignature, m as verifyJsonLd, n as hasProofLike, p as signJsonLd, r as signObject, s as doesActorOwnKey, t as createProof, u as createSignature } from "./proof-n60t8o9P.js";
9
9
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-CAY3OdLq.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-C3NWWiTg.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DBNpsneh.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
@@ -2,9 +2,9 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import "../std__assert-CRDpx_HF.mjs";
5
+ import "../std__assert-BTEgfoJo.mjs";
6
6
  import { t as esm_default } from "../esm-sdtqOUPu.mjs";
7
- import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-B_A6mfn3.mjs";
7
+ import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-Bneh_DYR.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/nodeinfo/client.test.ts
10
10
  test("getNodeInfo()", async (t) => {
@@ -3,9 +3,9 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { r as createRequestContext } from "../context-BAE7AKLA.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
- import "../std__assert-CRDpx_HF.mjs";
7
- import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
8
- import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-DA2WTBr4.mjs";
6
+ import "../std__assert-BTEgfoJo.mjs";
7
+ import { t as MemoryKvStore } from "../kv-QHE0oeM3.mjs";
8
+ import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-t0jC8I99.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -2,9 +2,9 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import "../std__assert-CRDpx_HF.mjs";
5
+ import "../std__assert-BTEgfoJo.mjs";
6
6
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
7
- import { t as nodeInfoToJson } from "../types-BFowWFTT.mjs";
7
+ import { t as nodeInfoToJson } from "../types-D09GN0uZ.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/nodeinfo/types.test.ts
10
10
  test("nodeInfoToJson()", () => {
@@ -2,8 +2,8 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import "../std__assert-CRDpx_HF.mjs";
6
- import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
5
+ import "../std__assert-BTEgfoJo.mjs";
6
+ import { t as MemoryKvStore } from "../kv-QHE0oeM3.mjs";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { ExportResultCode } from "@opentelemetry/core";
9
9
  import { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as preloadedOnlyDocumentLoader, t as normalizePublicAudience } from "./public-audience-N3pyOx2p.mjs";
4
+ import { n as preloadedOnlyDocumentLoader, t as normalizePublicAudience } from "./public-audience-c9zmYKgA.mjs";
5
5
  import { getLogger } from "@logtape/logtape";
6
6
  import { preloadedContexts } from "@fedify/vocab-runtime";
7
7
  import jsonld from "@fedify/vocab-runtime/jsonld";
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-hqC7tKJn.mjs";
5
- import "./key-DW1EVmtP.mjs";
4
+ import { n as version, t as name } from "./deno-DVsHS7rA.mjs";
5
+ import "./key-BoWaYRHm.mjs";
6
6
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
7
7
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader } from "@fedify/vocab-runtime";