@fedify/fedify 1.9.0-pr.407.1544 → 1.9.0-pr.421.1747

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 (176) hide show
  1. package/dist/{actor-Ch5yFYFG.d.ts → actor-C1Euqngb.d.ts} +1 -1
  2. package/dist/{actor-CeBu8hLy.js → actor-CNV1ck1S.js} +1 -1
  3. package/dist/actor-DaFSkBV-.cjs +42606 -0
  4. package/dist/{actor-BY--uubW.js → actor-J-9oLs-V.js} +6951 -2127
  5. package/dist/actor-Ydzhc8dj.d.cts +128 -0
  6. package/dist/{authdocloader-C89pKQKE.js → authdocloader-D4qQkXT9.js} +6 -6
  7. package/dist/{authdocloader-jHzDqZo2.js → authdocloader-DKEFUico.js} +3 -3
  8. package/dist/authdocloader-DM1vtjbY.cjs +58 -0
  9. package/dist/{builder-ClMKBUks.js → builder-2yBgTZpU.js} +14 -8
  10. package/dist/chunk-DqRYRqnO.cjs +34 -0
  11. package/dist/client-DjT_tegg.d.cts +294 -0
  12. package/dist/{client-DB3mC1oJ.js → client-nAHORZym.js} +1 -1
  13. package/dist/compat/mod.cjs +10 -0
  14. package/dist/compat/mod.d.cts +13 -0
  15. package/dist/compat/mod.d.ts +7 -7
  16. package/dist/compat/mod.js +5 -5
  17. package/dist/compat/transformers.test.js +16 -16
  18. package/dist/compat-DmDDELst.cjs +4 -0
  19. package/dist/compat-nxUqe4Z-.js +4 -0
  20. package/dist/{context-DFruNLny.d.ts → context-CXUibY4L.d.ts} +179 -116
  21. package/dist/context-CwUAkopp.d.cts +2324 -0
  22. package/dist/{docloader-BJTPo7_i.js → docloader-BRrqMbX0.js} +188 -8
  23. package/dist/docloader-D-MrRyHl.d.cts +219 -0
  24. package/dist/docloader-FAn755Ez.cjs +4862 -0
  25. package/dist/{esm-BjUpSZdQ.js → esm-CZDlG8Yt.js} +1 -1
  26. package/dist/federation/builder.test.js +5 -5
  27. package/dist/federation/collection.test.js +3 -3
  28. package/dist/federation/handler.test.js +17 -17
  29. package/dist/federation/idempotency.test.d.ts +3 -0
  30. package/dist/federation/idempotency.test.js +202 -0
  31. package/dist/federation/inbox.test.js +4 -4
  32. package/dist/federation/keycache.test.js +4 -4
  33. package/dist/federation/kv.test.js +4 -3
  34. package/dist/federation/middleware.test.js +18 -18
  35. package/dist/federation/mod.cjs +29 -0
  36. package/dist/federation/mod.d.cts +13 -0
  37. package/dist/federation/mod.d.ts +7 -7
  38. package/dist/federation/mod.js +15 -15
  39. package/dist/federation/mq.test.js +3 -3
  40. package/dist/federation/retry.test.js +3 -3
  41. package/dist/federation/router.test.js +3 -3
  42. package/dist/federation/send.test.js +10 -10
  43. package/dist/{federation-CMX7WzeL.js → federation-D1U8YY9t.js} +3 -3
  44. package/dist/federation-H2_En3j5.cjs +244 -0
  45. package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +6 -0
  46. package/dist/{http-sU0Wj-tv.js → http-B0Rp4UOp.js} +7 -7
  47. package/dist/http-B1_DzfAU.d.cts +253 -0
  48. package/dist/{http-3pAI0mqb.js → http-CyMjXkYA.js} +3 -3
  49. package/dist/http-D7xo4v5M.cjs +826 -0
  50. package/dist/{http-D8Q4xH0d.d.ts → http-wsGR6KkT.d.ts} +1 -1
  51. package/dist/{inbox-Dg825gXU.js → inbox-CAt-VuhL.js} +29 -7
  52. package/dist/key-BZBF55sg.cjs +10 -0
  53. package/dist/key-CKScBmP1.js +10 -0
  54. package/dist/{key-l5QMtRss.js → key-D7A24D7c.js} +5 -5
  55. package/dist/key-DFZ_CvG0.cjs +290 -0
  56. package/dist/{key-RzI0hV7H.js → key-DbX-_KvI.js} +2 -2
  57. package/dist/{key-BWgRsIwz.js → key-uBD0-2wc.js} +3 -3
  58. package/dist/{keycache-BGlP5YTm.js → keycache-DVVM5m9f.js} +1 -1
  59. package/dist/{keys-BRbwmdDJ.js → keys-Hl2h0ZG0.js} +1 -1
  60. package/dist/kv-63Cil1MD.d.cts +81 -0
  61. package/dist/{ld-C9E9DPBz.js → ld-e-G3iYdn.js} +4 -4
  62. package/dist/{lookup-oZxe6kZr.js → lookup-DNGo5BR6.js} +21 -12
  63. package/dist/lookup-DSSOyhz2.cjs +137 -0
  64. package/dist/{lookup-CN62_yPh.js → lookup-Zzj9McvA.js} +4 -4
  65. package/dist/{middleware-extU7qDB.js → middleware-4mR2kSKQ.js} +96 -65
  66. package/dist/middleware-B-YooLeX.cjs +17 -0
  67. package/dist/middleware-BG51vY-0.js +17 -0
  68. package/dist/{middleware-jQ1GPh2U.js → middleware-BWW4nCk1.js} +57 -54
  69. package/dist/middleware-CVb0KXM7.cjs +4271 -0
  70. package/dist/middleware-DXunR6sJ.js +26 -0
  71. package/dist/mod-BUbqxBev.d.cts +307 -0
  72. package/dist/{mod-CiXjux2r.d.ts → mod-BcObK1Lz.d.ts} +2 -2
  73. package/dist/mod-C2tOeRkN.d.cts +1 -0
  74. package/dist/{mod-Cy6pkZSn.d.ts → mod-CDObsV1d.d.ts} +19 -1
  75. package/dist/{mod-BAuhKa9d.d.ts → mod-CIbqfZW0.d.ts} +1 -1
  76. package/dist/{mod-B7Pc0I7F.d.ts → mod-DgcYoyZK.d.ts} +2 -2
  77. package/dist/mod-Dt-G9ZOS.d.cts +102 -0
  78. package/dist/mod-FZd39qVq.d.cts +1 -0
  79. package/dist/mod-fjqfsrty.d.cts +266 -0
  80. package/dist/mod-jQ4OODsl.d.cts +113 -0
  81. package/dist/mod-mXx9V0q5.d.cts +80 -0
  82. package/dist/mod.cjs +152 -0
  83. package/dist/mod.d.cts +17 -0
  84. package/dist/mod.d.ts +10 -10
  85. package/dist/mod.js +20 -20
  86. package/dist/mq-B7R1Q-M5.d.cts +140 -0
  87. package/dist/nodeinfo/client.test.js +5 -5
  88. package/dist/nodeinfo/handler.test.js +16 -16
  89. package/dist/nodeinfo/mod.cjs +13 -0
  90. package/dist/nodeinfo/mod.d.cts +5 -0
  91. package/dist/nodeinfo/mod.js +6 -6
  92. package/dist/nodeinfo/semver.test.js +3 -3
  93. package/dist/nodeinfo/types.test.js +3 -3
  94. package/dist/nodeinfo-Co9lJrWl.cjs +4 -0
  95. package/dist/nodeinfo-DfycQ8Wf.js +4 -0
  96. package/dist/owner-6KSEp9eV.d.cts +67 -0
  97. package/dist/{owner-D38zBIMc.d.ts → owner-BbeUDvOu.d.ts} +2 -2
  98. package/dist/{owner-B836JKuZ.js → owner-C4sPn9c4.js} +2 -2
  99. package/dist/{proof-D63mA1Rv.js → proof-C3QoDkRC.js} +3 -3
  100. package/dist/proof-DT8hWqV6.cjs +673 -0
  101. package/dist/{proof-DLwnfKak.js → proof-iy7cOAt6.js} +9 -9
  102. package/dist/runtime/authdocloader.test.js +9 -9
  103. package/dist/runtime/docloader.test.js +4 -4
  104. package/dist/runtime/key.test.js +5 -5
  105. package/dist/runtime/langstr.test.js +3 -3
  106. package/dist/runtime/link.test.d.ts +3 -0
  107. package/dist/runtime/link.test.js +61 -0
  108. package/dist/runtime/mod.cjs +25 -0
  109. package/dist/runtime/mod.d.cts +6 -0
  110. package/dist/runtime/mod.d.ts +3 -3
  111. package/dist/runtime/mod.js +10 -10
  112. package/dist/runtime/multibase/multibase.test.js +3 -3
  113. package/dist/runtime/url.test.js +3 -3
  114. package/dist/runtime-C58AJWSv.cjs +4 -0
  115. package/dist/runtime-DPYEDf-o.js +4 -0
  116. package/dist/{send-CE9GFSCd.js → send-BOn6IbzV.js} +2 -2
  117. package/dist/sig/http.test.js +9 -9
  118. package/dist/sig/key.test.js +6 -6
  119. package/dist/sig/ld.test.js +7 -7
  120. package/dist/sig/mod.cjs +30 -0
  121. package/dist/sig/mod.d.cts +8 -0
  122. package/dist/sig/mod.d.ts +5 -5
  123. package/dist/sig/mod.js +10 -10
  124. package/dist/sig/owner.test.js +7 -7
  125. package/dist/sig/proof.test.js +7 -7
  126. package/dist/sig-ByHXzqUi.cjs +4 -0
  127. package/dist/sig-Cj3tk-ig.js +4 -0
  128. package/dist/testing/docloader.test.js +3 -3
  129. package/dist/testing/mod.d.ts +385 -110
  130. package/dist/testing/mod.js +3 -3
  131. package/dist/{testing-B2tgn0a4.js → testing-DaKcIaFF.js} +2 -2
  132. package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
  133. package/dist/transformers-CoBS-oFG.cjs +116 -0
  134. package/dist/{type-OboVsUha.js → type-D50ufokc.js} +7261 -2257
  135. package/dist/{types-BLr6AjjI.js → types-BCmRSiaD.js} +4 -4
  136. package/dist/types-wG2EuWYS.cjs +488 -0
  137. package/dist/vocab/actor.test.js +5 -5
  138. package/dist/vocab/lookup.test.js +255 -5
  139. package/dist/vocab/mod.cjs +87 -0
  140. package/dist/vocab/mod.d.cts +6 -0
  141. package/dist/vocab/mod.d.ts +3 -3
  142. package/dist/vocab/mod.js +7 -7
  143. package/dist/vocab/type.test.js +3 -3
  144. package/dist/vocab/vocab.test.js +433 -9
  145. package/dist/vocab-B_AjsPE2.cjs +291 -0
  146. package/dist/{vocab-BEEm2I6u.d.ts → vocab-CDHNj5zp.d.ts} +290 -0
  147. package/dist/vocab-Cfs0937i.d.cts +14919 -0
  148. package/dist/{vocab-Z7alheNv.js → vocab-CtBL6Aur.js} +26 -17
  149. package/dist/webfinger/handler.test.js +16 -16
  150. package/dist/webfinger/lookup.test.js +4 -4
  151. package/dist/webfinger/mod.cjs +9 -0
  152. package/dist/webfinger/mod.d.cts +4 -0
  153. package/dist/webfinger/mod.js +6 -6
  154. package/dist/webfinger-BjOEdFPs.cjs +4 -0
  155. package/dist/webfinger-De_bU0iE.js +4 -0
  156. package/dist/x/cfworkers.cjs +100 -0
  157. package/dist/x/cfworkers.d.cts +59 -0
  158. package/dist/x/cfworkers.js +3 -3
  159. package/dist/x/cfworkers.test.js +3 -3
  160. package/dist/x/hono.cjs +61 -0
  161. package/dist/x/hono.d.cts +54 -0
  162. package/dist/x/hono.d.ts +6 -6
  163. package/dist/x/hono.js +3 -3
  164. package/dist/x/sveltekit.cjs +69 -0
  165. package/dist/x/sveltekit.d.cts +46 -0
  166. package/dist/x/sveltekit.d.ts +6 -6
  167. package/dist/x/sveltekit.js +3 -3
  168. package/package.json +68 -13
  169. package/dist/compat-Bb5myD13.js +0 -4
  170. package/dist/key-_XZAOE9D.js +0 -10
  171. package/dist/middleware-Ccahu3ql.js +0 -26
  172. package/dist/middleware-fO804EqJ.js +0 -17
  173. package/dist/nodeinfo-CyEbLjHs.js +0 -4
  174. package/dist/runtime-BSkOVUWM.js +0 -4
  175. package/dist/sig-BXJO--F9.js +0 -4
  176. package/dist/webfinger-C3GIyXIg.js +0 -4
@@ -3,22 +3,22 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-OboVsUha.js";
7
- import { getNodeInfo } from "./client-DB3mC1oJ.js";
8
- import { RouterError, lookupObject, traverseCollection } from "./lookup-oZxe6kZr.js";
6
+ import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-D50ufokc.js";
7
+ import { getNodeInfo } from "./client-nAHORZym.js";
8
+ import { RouterError, lookupObject, traverseCollection } from "./lookup-DNGo5BR6.js";
9
9
  import { nodeInfoToJson } from "./types-BIgY6c-l.js";
10
- import { exportJwk, importJwk, validateCryptoKey } from "./key-RzI0hV7H.js";
11
- import { verifyRequest } from "./http-3pAI0mqb.js";
12
- import { getAuthenticatedDocumentLoader } from "./authdocloader-jHzDqZo2.js";
13
- import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-C9E9DPBz.js";
14
- import { doesActorOwnKey, getKeyOwner } from "./owner-B836JKuZ.js";
15
- import { signObject, verifyObject } from "./proof-D63mA1Rv.js";
16
- import { routeActivity } from "./inbox-Dg825gXU.js";
17
- import { FederationBuilderImpl } from "./builder-ClMKBUks.js";
10
+ import { exportJwk, importJwk, validateCryptoKey } from "./key-DbX-_KvI.js";
11
+ import { verifyRequest } from "./http-CyMjXkYA.js";
12
+ import { getAuthenticatedDocumentLoader } from "./authdocloader-DKEFUico.js";
13
+ import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-e-G3iYdn.js";
14
+ import { doesActorOwnKey, getKeyOwner } from "./owner-C4sPn9c4.js";
15
+ import { signObject, verifyObject } from "./proof-C3QoDkRC.js";
16
+ import { routeActivity } from "./inbox-CAt-VuhL.js";
17
+ import { FederationBuilderImpl } from "./builder-2yBgTZpU.js";
18
18
  import { buildCollectionSynchronizationHeader } from "./collection-CSzG2j1P.js";
19
- import { KvKeyCache } from "./keycache-BGlP5YTm.js";
19
+ import { KvKeyCache } from "./keycache-DVVM5m9f.js";
20
20
  import { createExponentialBackoffPolicy } from "./retry-D4GJ670a.js";
21
- import { extractInboxes, sendActivity } from "./send-CE9GFSCd.js";
21
+ import { extractInboxes, sendActivity } from "./send-BOn6IbzV.js";
22
22
  import { getLogger, withContext } from "@logtape/logtape";
23
23
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
24
24
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
@@ -671,7 +671,8 @@ async function handleInbox(request, options) {
671
671
  * @param span The OpenTelemetry span for tracing.
672
672
  * @returns A promise that resolves to an HTTP response.
673
673
  */
674
- async function handleInboxInternal(request, { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, queue, actorDispatcher, inboxListeners, inboxErrorHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, tracerProvider }, span) {
674
+ async function handleInboxInternal(request, parameters, span) {
675
+ const { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, queue, actorDispatcher, inboxListeners, inboxErrorHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, tracerProvider } = parameters;
675
676
  const logger$2 = getLogger([
676
677
  "fedify",
677
678
  "federation",
@@ -873,7 +874,8 @@ async function handleInboxInternal(request, { recipient, context: ctx, inboxCont
873
874
  kvPrefixes,
874
875
  queue,
875
876
  span,
876
- tracerProvider
877
+ tracerProvider,
878
+ idempotencyStrategy: parameters.idempotencyStrategy
877
879
  });
878
880
  if (routeResult === "alreadyProcessed") return new Response(`Activity <${activity.id}> has already been processed.`, {
879
881
  status: 202,
@@ -903,7 +905,7 @@ async function handleInboxInternal(request, { recipient, context: ctx, inboxCont
903
905
  /**
904
906
  * Handles a custom collection request.
905
907
  * @template TItem The type of items in the collection.
906
- * @template TParams The parameter names of the requested URL.
908
+ * @template TParam The parameter names of the requested URL.
907
909
  * @template TContext The type of the context, extending {@link RequestContext}.
908
910
  * @template TContextData The context data to pass to the `TContext`.
909
911
  * @param request The HTTP request.
@@ -922,7 +924,7 @@ async function _handleCustomCollection(request, { name, values, context: context
922
924
  /**
923
925
  * Handles an ordered collection request.
924
926
  * @template TItem The type of items in the collection.
925
- * @template TParams The parameter names of the requested URL.
927
+ * @template TParam The parameter names of the requested URL.
926
928
  * @template TContext The type of the context, extending {@link RequestContext}.
927
929
  * @template TContextData The context data to pass to the `TContext`.
928
930
  * @param request The HTTP request.
@@ -943,7 +945,7 @@ async function _handleOrderedCollection(request, { name, values, context: contex
943
945
  * The main flow is on `getCollection`, `dispatch`.
944
946
  *
945
947
  * @template TItem The type of items in the collection.
946
- * @template TParams The parameter names of the requested URL.
948
+ * @template TParam The parameter names of the requested URL.
947
949
  * @template TContext The type of the context. {@link Context} or {@link RequestContext}.
948
950
  * @template TContextData The context data to pass to the `TContext`.
949
951
  * @template TCollection The type of the collection, extending {@link Collection}.
@@ -977,14 +979,14 @@ var CustomCollectionHandler = class {
977
979
  #collection = null;
978
980
  /**
979
981
  * Creates a new CustomCollection instance.
980
- * @param {string} name The name of the collection.
981
- * @param {TParams} values The parameter values for the collection.
982
- * @param {TContext} context The request context.
983
- * @param {CustomCollectionCallbacks} callbacks The collection callbacks.
984
- * @param {TracerProvider} tracerProvider The tracer provider for telemetry.
985
- * @param {ConstructorWithTypeId<TCollection>} Collection The Collection constructor.
986
- * @param {ConstructorWithTypeId<TCollectionPage>} CollectionPage The CollectionPage constructor.
987
- * @param {(item: TItem) => boolean} filterPredicate Optional filter predicate for items.
982
+ * @param name The name of the collection.
983
+ * @param values The parameter values for the collection.
984
+ * @param context The request context.
985
+ * @param callbacks The collection callbacks.
986
+ * @param tracerProvider The tracer provider for telemetry.
987
+ * @param Collection The Collection constructor.
988
+ * @param CollectionPage The CollectionPage constructor.
989
+ * @param filterPredicate Optional filter predicate for items.
988
990
  */
989
991
  constructor(name, values, context$1, callbacks, tracerProvider = trace.getTracerProvider(), Collection$1, CollectionPage$1, filterPredicate) {
990
992
  this.name = name;
@@ -1109,7 +1111,7 @@ var CustomCollectionHandler = class {
1109
1111
  /**
1110
1112
  * Creates a function to wrap the dispatcher so tracing can be applied.
1111
1113
  * @param params Parameters including cursor and total items.
1112
- * @returns {(span: Span) => Promise<PageItems<TItem>>} A function that handles the span operation.
1114
+ * @returns A function that handles the span operation.
1113
1115
  */
1114
1116
  spanPages = ({ totalItems = null, cursor = null }) => async (span) => {
1115
1117
  try {
@@ -1130,23 +1132,23 @@ var CustomCollectionHandler = class {
1130
1132
  };
1131
1133
  /**
1132
1134
  * Dispatches the collection request to get items.
1133
- * @param {string | null} cursor The cursor for pagination, or null for the first page.
1134
- * @returns {Promise<PageItems<TItem>>} A promise that resolves to the page items.
1135
+ * @param cursor The cursor for pagination, or null for the first page.
1136
+ * @returns A promise that resolves to the page items.
1135
1137
  */
1136
1138
  async dispatch(cursor = null) {
1137
1139
  return await this.#dispatcher(this.context, this.values, cursor) ?? new ItemsNotFoundError().throw();
1138
1140
  }
1139
1141
  /**
1140
1142
  * Filters the items in the collection.
1141
- * @param {TItem[]} items The items to filter.
1142
- * @returns {(Object | Link | URL)[]} The filtered items.
1143
+ * @param items The items to filter.
1144
+ * @returns The filtered items.
1143
1145
  */
1144
1146
  filterItems(items) {
1145
1147
  return filterCollectionItems(items, this.name, this.filterPredicate);
1146
1148
  }
1147
1149
  /**
1148
1150
  * Appends a cursor to the URL if it exists.
1149
- * @param {string | null | undefined} cursor The cursor to append, or null/undefined.
1151
+ * @param cursor The cursor to append, or null/undefined.
1150
1152
  * @returns The URL with cursor appended, or null if cursor is null/undefined.
1151
1153
  */
1152
1154
  appendToUrl(cursor) {
@@ -1154,8 +1156,7 @@ var CustomCollectionHandler = class {
1154
1156
  }
1155
1157
  /**
1156
1158
  * Gets the stored collection or collection page.
1157
- * @returns {Promise<TCollection | TCollectionPage>} A promise that resolves to
1158
- the collection or collection page.
1159
+ * @returns A promise that resolves to the collection or collection page.
1159
1160
  */
1160
1161
  get collection() {
1161
1162
  if (this.#collection === null) this.#collection = this.getCollection();
@@ -1163,8 +1164,8 @@ var CustomCollectionHandler = class {
1163
1164
  }
1164
1165
  /**
1165
1166
  * Gets the total number of items in the collection.
1166
- * @returns {Promise<number | null>} A promise that
1167
- resolves to the total items count, or null if not available.
1167
+ * @returns A promise that resolves to the total items count,
1168
+ * or null if not available.
1168
1169
  */
1169
1170
  get totalItems() {
1170
1171
  if (this.#totalItems === void 0) this.totalItems = this.callbacks.counter?.(this.context, this.values);
@@ -1180,8 +1181,8 @@ var CustomCollectionHandler = class {
1180
1181
  }
1181
1182
  /**
1182
1183
  * Gets the first cursor for pagination.
1183
- * @returns {Promise<string | null>} A promise that resolves to the first cursor,
1184
- or null if not available.
1184
+ * @returns A promise that resolves to the first cursor,
1185
+ * or null if not available.
1185
1186
  */
1186
1187
  get firstCursor() {
1187
1188
  const cursor = this.callbacks.firstCursor?.(this.context, this.values);
@@ -2151,7 +2152,8 @@ var FederationImpl = class extends FederationBuilderImpl {
2151
2152
  onNotFound,
2152
2153
  signatureTimeWindow: this.signatureTimeWindow,
2153
2154
  skipSignatureVerification: this.skipSignatureVerification,
2154
- tracerProvider: this.tracerProvider
2155
+ tracerProvider: this.tracerProvider,
2156
+ idempotencyStrategy: this.idempotencyStrategy
2155
2157
  });
2156
2158
  case "following": return await handleCollection(request, {
2157
2159
  name: "following",
@@ -2542,15 +2544,16 @@ var ContextImpl = class ContextImpl {
2542
2544
  "actor"
2543
2545
  ]);
2544
2546
  if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
2545
- const path = this.federation.router.build("actor", {
2546
- identifier,
2547
- handle: identifier
2548
- });
2549
- if (path == null) {
2550
- logger$2.warn("No actor dispatcher registered.");
2551
- return [];
2547
+ let actorUri;
2548
+ try {
2549
+ actorUri = this.getActorUri(identifier);
2550
+ } catch (error) {
2551
+ if (error instanceof RouterError) {
2552
+ logger$2.warn(error.message);
2553
+ return [];
2554
+ }
2555
+ throw error;
2552
2556
  }
2553
- const actorUri = new URL(path, this.canonicalOrigin);
2554
2557
  const keyPairs = await this.federation.actorCallbacks?.keyPairsDispatcher(new ContextImpl({
2555
2558
  ...this,
2556
2559
  invokedFromActorKeyPairsDispatcher: { identifier }
@@ -2711,12 +2714,11 @@ var ContextImpl = class ContextImpl {
2711
2714
  if (identifier == null) throw new Error("If recipients is \"followers\", sender must be an actor identifier or username.");
2712
2715
  expandedRecipients = [];
2713
2716
  for await (const recipient of this.getFollowers(identifier)) expandedRecipients.push(recipient);
2714
- if (options.syncCollection) {
2715
- const collectionId = this.federation.router.build("followers", {
2716
- identifier,
2717
- handle: identifier
2718
- });
2719
- opts.collectionSync = collectionId == null ? void 0 : new URL(collectionId, this.canonicalOrigin).href;
2717
+ if (options.syncCollection) try {
2718
+ opts.collectionSync = this.getFollowersUri(identifier).href;
2719
+ } catch (error) {
2720
+ if (error instanceof RouterError) opts.collectionSync = void 0;
2721
+ else throw error;
2720
2722
  }
2721
2723
  } else expandedRecipients = [recipients];
2722
2724
  span.setAttribute("activitypub.inboxes", expandedRecipients.length);
@@ -2901,7 +2903,8 @@ var ContextImpl = class ContextImpl {
2901
2903
  kvPrefixes: this.federation.kvPrefixes,
2902
2904
  queue: this.federation.inboxQueue,
2903
2905
  span,
2904
- tracerProvider: options.tracerProvider ?? this.tracerProvider
2906
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
2907
+ idempotencyStrategy: this.federation.idempotencyStrategy
2905
2908
  });
2906
2909
  return routeResult === "alreadyProcessed" || routeResult === "enqueued" || routeResult === "unsupportedActivity" || routeResult === "success";
2907
2910
  }