@fedify/fedify 2.2.15-dev.2196 → 2.2.16

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 (80) hide show
  1. package/dist/{builder-D8E6s6dI.mjs → builder-2WicIXl5.mjs} +11 -3
  2. package/dist/compat/mod.d.cts +1 -1
  3. package/dist/compat/mod.d.ts +1 -1
  4. package/dist/compat/outgoing-jsonld.test.mjs +1 -1
  5. package/dist/compat/public-audience.test.mjs +1 -1
  6. package/dist/compat/transformers.test.mjs +2 -2
  7. package/dist/{context-Bt2jnbC7.d.ts → context-OkwEpc3-.d.ts} +1 -1
  8. package/dist/{context-Cls_M1HU.d.cts → context-tJbL_Hkw.d.cts} +1 -1
  9. package/dist/{deno-qvNES9lw.mjs → deno-BCQztXLl.mjs} +1 -1
  10. package/dist/{docloader-DDSsh_Jq.mjs → docloader-NG6Mmr-J.mjs} +2 -2
  11. package/dist/federation/builder.test.mjs +38 -2
  12. package/dist/federation/collection.test.mjs +1 -1
  13. package/dist/federation/handler.test.mjs +7 -7
  14. package/dist/federation/idempotency.test.mjs +3 -3
  15. package/dist/federation/inbox.test.mjs +1 -1
  16. package/dist/federation/keycache.test.mjs +33 -2
  17. package/dist/federation/kv.test.mjs +1 -1
  18. package/dist/federation/middleware.test.mjs +122 -7
  19. package/dist/federation/mod.cjs +1 -1
  20. package/dist/federation/mod.d.cts +3 -3
  21. package/dist/federation/mod.d.ts +3 -3
  22. package/dist/federation/mod.js +1 -1
  23. package/dist/federation/send.test.mjs +3 -3
  24. package/dist/federation/temporal.test.mjs +1 -1
  25. package/dist/federation/webfinger.test.mjs +2 -2
  26. package/dist/{http-BW6AJOy7.mjs → http-B72sZOJB.mjs} +2 -2
  27. package/dist/{http-RWKDbjsL.cjs → http-B7mxZjxT.cjs} +1 -1
  28. package/dist/{http-CntX6ab0.js → http-DK5sOqk3.js} +1 -1
  29. package/dist/{key-Zl6BkQxS.mjs → key-DCQAjTMo.mjs} +1 -1
  30. package/dist/{keycache-C1aVprwy.mjs → keycache-Dkc_sflV.mjs} +23 -2
  31. package/dist/{kv-gJ8LYbxX.d.cts → kv-CZKl1IUS.d.cts} +3 -2
  32. package/dist/{kv-D6hNiMTK.d.ts → kv-CxaI4eGo.d.ts} +3 -2
  33. package/dist/{kv-cache-CE9FWYpa.js → kv-cache-BatvhvQ8.js} +1 -1
  34. package/dist/{kv-cache-C6Vsz04k.cjs → kv-cache-DCIQW7aM.cjs} +1 -1
  35. package/dist/{ld-DMr3f6uX.mjs → ld-37J55dno.mjs} +2 -2
  36. package/dist/{middleware-CSK_D6wm.cjs → middleware-BZO3vnP1.cjs} +1 -1
  37. package/dist/{middleware-UrAjyLpb.mjs → middleware-CPmKbXgW.mjs} +1 -1
  38. package/dist/{middleware-Cu0bK3Iq.js → middleware-Cqza2chY.js} +42 -11
  39. package/dist/{middleware-CYTJ-y3g.mjs → middleware-DOTXcNS-.mjs} +24 -21
  40. package/dist/{middleware-BR8TCS1H.cjs → middleware-O_yyvaOf.cjs} +43 -12
  41. package/dist/{mod-C9jqpInC.d.ts → mod-B6LmugJ4.d.ts} +1 -1
  42. package/dist/{mod-DaiJDJdQ.d.ts → mod-DQGjRJUG.d.ts} +1 -1
  43. package/dist/{mod-BYg1qMPB.d.cts → mod-V2vDnYNu.d.cts} +1 -1
  44. package/dist/{mod-DNvnDTS7.d.cts → mod-a6kmB8xD.d.cts} +1 -1
  45. package/dist/mod.cjs +4 -4
  46. package/dist/mod.d.cts +4 -4
  47. package/dist/mod.d.ts +4 -4
  48. package/dist/mod.js +4 -4
  49. package/dist/nodeinfo/client.test.mjs +1 -1
  50. package/dist/nodeinfo/handler.test.mjs +2 -2
  51. package/dist/nodeinfo/types.test.mjs +1 -1
  52. package/dist/otel/exporter.test.mjs +1 -1
  53. package/dist/otel/mod.d.cts +1 -1
  54. package/dist/otel/mod.d.ts +1 -1
  55. package/dist/{outgoing-jsonld-Dc2OXyB-.mjs → outgoing-jsonld-amccRMrV.mjs} +1 -1
  56. package/dist/{owner-CHo1EAg3.mjs → owner-Bou1yabn.mjs} +2 -2
  57. package/dist/{proof-Blxp54sy.mjs → proof-BFSV3hJj.mjs} +4 -4
  58. package/dist/{proof-D6abvk_O.js → proof-BdrKA26Y.js} +1 -1
  59. package/dist/{proof-CHNefbCg.cjs → proof-ZUtbM4a6.cjs} +1 -1
  60. package/dist/{send-ConRtUh3.mjs → send-DwQAYND-.mjs} +2 -2
  61. package/dist/sig/http.test.mjs +62 -3
  62. package/dist/sig/key.test.mjs +1 -1
  63. package/dist/sig/ld.test.mjs +2 -2
  64. package/dist/sig/mod.cjs +2 -2
  65. package/dist/sig/mod.js +2 -2
  66. package/dist/sig/owner.test.mjs +1 -1
  67. package/dist/sig/proof.test.mjs +2 -2
  68. package/dist/{temporal-BIaSZejA.mjs → temporal-BWuGBFaX.mjs} +1 -1
  69. package/dist/utils/docloader.test.mjs +2 -2
  70. package/dist/utils/mod.cjs +1 -1
  71. package/dist/utils/mod.d.cts +1 -1
  72. package/dist/utils/mod.d.ts +1 -1
  73. package/dist/utils/mod.js +1 -1
  74. package/package.json +5 -5
  75. /package/dist/{activity-listener-IojJ9SVl.mjs → activity-listener-ell7W1s9.mjs} +0 -0
  76. /package/dist/{client-CJ4Y0keQ.mjs → client-9F_u23dc.mjs} +0 -0
  77. /package/dist/{collection-DnoYNwBC.mjs → collection-D-HqUuA2.mjs} +0 -0
  78. /package/dist/{kv-CX8qfaad.mjs → kv-mI4Ix2EU.mjs} +0 -0
  79. /package/dist/{public-audience-CS1udGkN.mjs → public-audience-DpJqzPuh.mjs} +0 -0
  80. /package/dist/{types-s4mCTGkT.mjs → types-J53Kw7so.mjs} +0 -0
@@ -2,6 +2,7 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { CryptographicKey, Multikey } from "@fedify/vocab";
5
+ import { FetchError, UrlError } from "@fedify/vocab-runtime";
5
6
  //#region src/federation/keycache.ts
6
7
  const KEY_CACHE_GENERATION = "2";
7
8
  var KvKeyCache = class {
@@ -76,8 +77,15 @@ var KvKeyCache = class {
76
77
  })
77
78
  };
78
79
  else if ("errorName" in cached && typeof cached.errorName === "string" && "errorMessage" in cached && typeof cached.errorMessage === "string") {
79
- const error = new Error(cached.errorMessage);
80
+ let error;
81
+ if ("errorType" in cached && cached.errorType === "FetchError" && "errorUrl" in cached && typeof cached.errorUrl === "string" && URL.canParse(cached.errorUrl)) {
82
+ error = new FetchError(cached.errorUrl);
83
+ error.message = cached.errorMessage;
84
+ } else if ("errorType" in cached && cached.errorType === "UrlError" && "errorReason" in cached && (cached.errorReason === "dns" || cached.errorReason === "disallowed")) error = new UrlError(cached.errorMessage, { reason: cached.errorReason });
85
+ else error = new Error(cached.errorMessage);
80
86
  error.name = cached.errorName;
87
+ if ("errorCause" in cached && cached.errorCause != null && typeof cached.errorCause === "object" && "name" in cached.errorCause && typeof cached.errorCause.name === "string" && "message" in cached.errorCause && typeof cached.errorCause.message === "string") if ("isDomException" in cached.errorCause && cached.errorCause.isDomException === true) error.cause = new DOMException(cached.errorCause.message, cached.errorCause.name);
88
+ else error.cause = Object.assign(new Error(cached.errorCause.message), { name: cached.errorCause.name });
81
89
  return { error };
82
90
  }
83
91
  }
@@ -95,9 +103,22 @@ var KvKeyCache = class {
95
103
  }, { ttl: this.unavailableKeyTtl });
96
104
  return;
97
105
  }
106
+ const cause = error.error.cause;
98
107
  await this.kv.set(this.#getFetchErrorKey(keyId), {
99
108
  errorName: error.error.name,
100
- errorMessage: error.error.message
109
+ errorMessage: error.error.message,
110
+ ...error.error instanceof FetchError ? {
111
+ errorType: "FetchError",
112
+ errorUrl: error.error.url.href
113
+ } : error.error instanceof UrlError ? {
114
+ errorType: "UrlError",
115
+ errorReason: error.error.reason
116
+ } : {},
117
+ ...cause instanceof Error || cause instanceof DOMException ? { errorCause: {
118
+ name: cause.name,
119
+ message: cause.message,
120
+ isDomException: cause instanceof DOMException
121
+ } } : {}
101
122
  }, { ttl: this.unavailableKeyTtl });
102
123
  }
103
124
  };
@@ -41,14 +41,15 @@ interface KvStore {
41
41
  /**
42
42
  * Gets the value for the given key.
43
43
  * @param key The key to get the value for.
44
- * @returns The value for the key, or `undefined` if the key does not exist.
44
+ * @returns The value for the key, including `null` if stored, or `undefined`
45
+ * if the key does not exist.
45
46
  * @template T The type of the value to get.
46
47
  */
47
48
  get<T = unknown>(key: KvKey): Promise<T | undefined>;
48
49
  /**
49
50
  * Sets the value for the given key.
50
51
  * @param key The key to set the value for.
51
- * @param value The value to set.
52
+ * @param value The value to set. `null` is a storable value.
52
53
  * @param options Additional options for setting the value.
53
54
  */
54
55
  set(key: KvKey, value: unknown, options?: KvStoreSetOptions): Promise<void>;
@@ -41,14 +41,15 @@ interface KvStore {
41
41
  /**
42
42
  * Gets the value for the given key.
43
43
  * @param key The key to get the value for.
44
- * @returns The value for the key, or `undefined` if the key does not exist.
44
+ * @returns The value for the key, including `null` if stored, or `undefined`
45
+ * if the key does not exist.
45
46
  * @template T The type of the value to get.
46
47
  */
47
48
  get<T = unknown>(key: KvKey): Promise<T | undefined>;
48
49
  /**
49
50
  * Sets the value for the given key.
50
51
  * @param key The key to set the value for.
51
- * @param value The value to set.
52
+ * @param value The value to set. `null` is a storable value.
52
53
  * @param options Additional options for setting the value.
53
54
  */
54
55
  set(key: KvKey, value: unknown, options?: KvStoreSetOptions): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { f as validateCryptoKey, t as doubleKnock } from "./http-CntX6ab0.js";
3
+ import { f as validateCryptoKey, t as doubleKnock } from "./http-DK5sOqk3.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { curry } from "es-toolkit";
6
6
  import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, validatePublicUrl } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  require("./chunk-DDcVe30Y.cjs");
4
- const require_http = require("./http-RWKDbjsL.cjs");
4
+ const require_http = require("./http-B7mxZjxT.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let es_toolkit = require("es-toolkit");
7
7
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
@@ -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-qvNES9lw.mjs";
5
- import { r as fetchKey, s as validateCryptoKey } from "./key-Zl6BkQxS.mjs";
4
+ import { n as version, t as name } from "./deno-BCQztXLl.mjs";
5
+ import { r as fetchKey, s as validateCryptoKey } from "./key-DCQAjTMo.mjs";
6
6
  import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader } from "@fedify/vocab-runtime";
@@ -1,4 +1,4 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
- const require_middleware = require("./middleware-BR8TCS1H.cjs");
3
+ const require_middleware = require("./middleware-O_yyvaOf.cjs");
4
4
  exports.FederationImpl = require_middleware.FederationImpl;
@@ -1,5 +1,5 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-CYTJ-y3g.mjs";
4
+ import { n as FederationImpl } from "./middleware-DOTXcNS-.mjs";
5
5
  export { FederationImpl };
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./chunk-CRNNMoPX.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-BGMIq1cs.js";
5
- import { a as verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as name, y as version } from "./http-CntX6ab0.js";
5
+ import { a as verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as name, y as version } from "./http-DK5sOqk3.js";
6
6
  import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-miAYfiGO.js";
7
- import { _ as hasSignatureLike, b as signJsonLd, c as getKeyOwner, f as compactJsonLd, g as hasSignature, h as getNormalizationContextLoader, i as verifyObject, l as InvalidContextReferenceError, m as detachSignature, n as hasProofLike, o as normalizeOutgoingActivityJsonLd, r as signObject, s as doesActorOwnKey, u as assertSafeJsonLd, v as isClearlyMalformedContextReference, w as wrapContextLoaderForJsonLd, x as verifyCompactJsonLd, y as isInvalidUrlTypeError } from "./proof-D6abvk_O.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CE9FWYpa.js";
7
+ import { _ as hasSignatureLike, b as signJsonLd, c as getKeyOwner, f as compactJsonLd, g as hasSignature, h as getNormalizationContextLoader, i as verifyObject, l as InvalidContextReferenceError, m as detachSignature, n as hasProofLike, o as normalizeOutgoingActivityJsonLd, r as signObject, s as doesActorOwnKey, u as assertSafeJsonLd, v as isClearlyMalformedContextReference, w as wrapContextLoaderForJsonLd, x as verifyCompactJsonLd, y as isInvalidUrlTypeError } from "./proof-BdrKA26Y.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BatvhvQ8.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
11
11
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -203,6 +203,7 @@ var FederationBuilderImpl = class {
203
203
  * Symbol registry for unique identification of unnamed symbols.
204
204
  */
205
205
  #symbolRegistry = /* @__PURE__ */ new Map();
206
+ #collectionNames = /* @__PURE__ */ new Map();
206
207
  constructor() {
207
208
  this.router = new Router$1();
208
209
  this.objectCallbacks = {};
@@ -224,6 +225,8 @@ var FederationBuilderImpl = class {
224
225
  f.objectTypeIds = { ...this.objectTypeIds };
225
226
  f.collectionCallbacks = { ...this.collectionCallbacks };
226
227
  f.collectionTypeIds = { ...this.collectionTypeIds };
228
+ f.#symbolRegistry = new Map(this.#symbolRegistry);
229
+ f.#collectionNames = new Map(this.#collectionNames);
227
230
  f.inboxPath = this.inboxPath;
228
231
  f.outboxPath = this.outboxPath;
229
232
  f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
@@ -672,6 +675,7 @@ var FederationBuilderImpl = class {
672
675
  if (this.router.has(routeName)) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
673
676
  if (this.collectionCallbacks[name] != null) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
674
677
  if (this.router.add(path, routeName).size < 1) throw new RouterError("Path for collection dispatcher must have at least one variable.");
678
+ this.#collectionNames.set(routeName, name);
675
679
  const callbacks = { dispatcher };
676
680
  this.collectionCallbacks[name] = callbacks;
677
681
  this.collectionTypeIds[name] = itemType;
@@ -708,6 +712,10 @@ var FederationBuilderImpl = class {
708
712
  const routeName = this.#uniqueCollectionId(name);
709
713
  return this.router.build(`collection:${routeName}`, values) ?? this.router.build(`orderedCollection:${routeName}`, values);
710
714
  }
715
+ /** Resolves a custom collection route to its original name. */
716
+ getCollectionName(routeName) {
717
+ return this.#collectionNames.get(routeName) ?? routeName.replace(/^(collection|orderedCollection):/, "");
718
+ }
711
719
  setOutboxPermanentFailureHandler(handler) {
712
720
  this.outboxPermanentFailureHandler = handler;
713
721
  }
@@ -987,8 +995,15 @@ var KvKeyCache = class {
987
995
  })
988
996
  };
989
997
  else if ("errorName" in cached && typeof cached.errorName === "string" && "errorMessage" in cached && typeof cached.errorMessage === "string") {
990
- const error = new Error(cached.errorMessage);
998
+ let error;
999
+ if ("errorType" in cached && cached.errorType === "FetchError" && "errorUrl" in cached && typeof cached.errorUrl === "string" && URL.canParse(cached.errorUrl)) {
1000
+ error = new FetchError(cached.errorUrl);
1001
+ error.message = cached.errorMessage;
1002
+ } else if ("errorType" in cached && cached.errorType === "UrlError" && "errorReason" in cached && (cached.errorReason === "dns" || cached.errorReason === "disallowed")) error = new UrlError(cached.errorMessage, { reason: cached.errorReason });
1003
+ else error = new Error(cached.errorMessage);
991
1004
  error.name = cached.errorName;
1005
+ if ("errorCause" in cached && cached.errorCause != null && typeof cached.errorCause === "object" && "name" in cached.errorCause && typeof cached.errorCause.name === "string" && "message" in cached.errorCause && typeof cached.errorCause.message === "string") if ("isDomException" in cached.errorCause && cached.errorCause.isDomException === true) error.cause = new DOMException(cached.errorCause.message, cached.errorCause.name);
1006
+ else error.cause = Object.assign(new Error(cached.errorCause.message), { name: cached.errorCause.name });
992
1007
  return { error };
993
1008
  }
994
1009
  }
@@ -1006,9 +1021,22 @@ var KvKeyCache = class {
1006
1021
  }, { ttl: this.unavailableKeyTtl });
1007
1022
  return;
1008
1023
  }
1024
+ const cause = error.error.cause;
1009
1025
  await this.kv.set(this.#getFetchErrorKey(keyId), {
1010
1026
  errorName: error.error.name,
1011
- errorMessage: error.error.message
1027
+ errorMessage: error.error.message,
1028
+ ...error.error instanceof FetchError ? {
1029
+ errorType: "FetchError",
1030
+ errorUrl: error.error.url.href
1031
+ } : error.error instanceof UrlError ? {
1032
+ errorType: "UrlError",
1033
+ errorReason: error.error.reason
1034
+ } : {},
1035
+ ...cause instanceof Error || cause instanceof DOMException ? { errorCause: {
1036
+ name: cause.name,
1037
+ message: cause.message,
1038
+ isDomException: cause instanceof DOMException
1039
+ } } : {}
1012
1040
  }, { ttl: this.unavailableKeyTtl });
1013
1041
  }
1014
1042
  };
@@ -4102,10 +4130,10 @@ var FederationImpl = class extends FederationBuilderImpl {
4102
4130
  onNotFound
4103
4131
  });
4104
4132
  case "collection": {
4105
- const name = route.name.replace(/^collection:/, "");
4133
+ const name = this.getCollectionName(route.name);
4106
4134
  const callbacks = this.collectionCallbacks[name];
4107
4135
  return await handleCustomCollection(request, {
4108
- name,
4136
+ name: String(name),
4109
4137
  context,
4110
4138
  values: route.values,
4111
4139
  collectionCallbacks: callbacks,
@@ -4115,10 +4143,10 @@ var FederationImpl = class extends FederationBuilderImpl {
4115
4143
  });
4116
4144
  }
4117
4145
  case "orderedCollection": {
4118
- const name = route.name.replace(/^orderedCollection:/, "");
4146
+ const name = this.getCollectionName(route.name);
4119
4147
  const callbacks = this.collectionCallbacks[name];
4120
4148
  return await handleOrderedCollection(request, {
4121
- name,
4149
+ name: String(name),
4122
4150
  context,
4123
4151
  values: route.values,
4124
4152
  collectionCallbacks: callbacks,
@@ -4311,8 +4339,10 @@ var ContextImpl = class ContextImpl {
4311
4339
  const collectionRegex = new RegExp(`^(${["collection", "orderedCollection"].join("|")}):(.*)$`);
4312
4340
  const match = route.name.match(collectionRegex);
4313
4341
  if (match !== null) {
4314
- const [, type, name] = match;
4342
+ const [, type] = match;
4343
+ const name = this.federation.getCollectionName(route.name);
4315
4344
  const cls = this.federation.collectionTypeIds[name];
4345
+ if (cls == null) return null;
4316
4346
  return {
4317
4347
  type,
4318
4348
  name,
@@ -4674,7 +4704,7 @@ var ContextImpl = class ContextImpl {
4674
4704
  "inbox"
4675
4705
  ]);
4676
4706
  const contextLoader = options.contextLoader ?? this.contextLoader;
4677
- const json = await activity.toJsonLd({ contextLoader });
4707
+ let json = await activity.toJsonLd({ contextLoader });
4678
4708
  const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, this);
4679
4709
  if (await verifyObject(Activity, json, {
4680
4710
  contextLoader,
@@ -4730,6 +4760,7 @@ var ContextImpl = class ContextImpl {
4730
4760
  }
4731
4761
  logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
4732
4762
  activity = fetched;
4763
+ json = await fetched.toJsonLd({ contextLoader });
4733
4764
  } else logger.debug("Object Integrity Proofs are verified.", {
4734
4765
  recipient,
4735
4766
  activity: json
@@ -2,25 +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-CrMLXoOr.mjs";
5
- import { n as version, t as name } from "./deno-qvNES9lw.mjs";
5
+ import { n as version, t as name } from "./deno-BCQztXLl.mjs";
6
6
  import { t as formatAcceptSignature } from "./accept-Dd__NiUL.mjs";
7
- import { o as importJwk, s as validateCryptoKey, t as exportJwk } from "./key-Zl6BkQxS.mjs";
8
- import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-BW6AJOy7.mjs";
9
- import { t as getAuthenticatedDocumentLoader } from "./docloader-DDSsh_Jq.mjs";
7
+ import { o as importJwk, s as validateCryptoKey, t as exportJwk } from "./key-DCQAjTMo.mjs";
8
+ import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-B72sZOJB.mjs";
9
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-NG6Mmr-J.mjs";
10
10
  import { n as kvCache } from "./kv-cache-FsT1ljhs.mjs";
11
- import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-DMr3f6uX.mjs";
12
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CHo1EAg3.mjs";
13
- import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-Dc2OXyB-.mjs";
14
- import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-Blxp54sy.mjs";
15
- import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-CJ4Y0keQ.mjs";
16
- import { t as nodeInfoToJson } from "./types-s4mCTGkT.mjs";
17
- import { t as FederationBuilderImpl } from "./builder-D8E6s6dI.mjs";
18
- import { t as buildCollectionSynchronizationHeader } from "./collection-DnoYNwBC.mjs";
19
- import { t as KvKeyCache } from "./keycache-C1aVprwy.mjs";
11
+ import { t as KvKeyCache } from "./keycache-Dkc_sflV.mjs";
12
+ import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-37J55dno.mjs";
13
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-Bou1yabn.mjs";
14
+ import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-amccRMrV.mjs";
15
+ import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-BFSV3hJj.mjs";
16
+ import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-9F_u23dc.mjs";
17
+ import { t as nodeInfoToJson } from "./types-J53Kw7so.mjs";
18
+ import { t as FederationBuilderImpl } from "./builder-2WicIXl5.mjs";
19
+ import { t as buildCollectionSynchronizationHeader } from "./collection-D-HqUuA2.mjs";
20
20
  import { t as acceptsJsonLd } from "./negotiation-BHtZN6Y1.mjs";
21
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-BIaSZejA.mjs";
21
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-BWuGBFaX.mjs";
22
22
  import { t as createExponentialBackoffPolicy } from "./retry-bMXBL97A.mjs";
23
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-ConRtUh3.mjs";
23
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-DwQAYND-.mjs";
24
24
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
25
25
  import { lookupWebFinger } from "@fedify/webfinger";
26
26
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -2908,10 +2908,10 @@ var FederationImpl = class extends FederationBuilderImpl {
2908
2908
  onNotFound
2909
2909
  });
2910
2910
  case "collection": {
2911
- const name = route.name.replace(/^collection:/, "");
2911
+ const name = this.getCollectionName(route.name);
2912
2912
  const callbacks = this.collectionCallbacks[name];
2913
2913
  return await handleCustomCollection(request, {
2914
- name,
2914
+ name: String(name),
2915
2915
  context,
2916
2916
  values: route.values,
2917
2917
  collectionCallbacks: callbacks,
@@ -2921,10 +2921,10 @@ var FederationImpl = class extends FederationBuilderImpl {
2921
2921
  });
2922
2922
  }
2923
2923
  case "orderedCollection": {
2924
- const name = route.name.replace(/^orderedCollection:/, "");
2924
+ const name = this.getCollectionName(route.name);
2925
2925
  const callbacks = this.collectionCallbacks[name];
2926
2926
  return await handleOrderedCollection(request, {
2927
- name,
2927
+ name: String(name),
2928
2928
  context,
2929
2929
  values: route.values,
2930
2930
  collectionCallbacks: callbacks,
@@ -3117,8 +3117,10 @@ var ContextImpl = class ContextImpl {
3117
3117
  const collectionRegex = new RegExp(`^(${["collection", "orderedCollection"].join("|")}):(.*)$`);
3118
3118
  const match = route.name.match(collectionRegex);
3119
3119
  if (match !== null) {
3120
- const [, type, name] = match;
3120
+ const [, type] = match;
3121
+ const name = this.federation.getCollectionName(route.name);
3121
3122
  const cls = this.federation.collectionTypeIds[name];
3123
+ if (cls == null) return null;
3122
3124
  return {
3123
3125
  type,
3124
3126
  name,
@@ -3480,7 +3482,7 @@ var ContextImpl = class ContextImpl {
3480
3482
  "inbox"
3481
3483
  ]);
3482
3484
  const contextLoader = options.contextLoader ?? this.contextLoader;
3483
- const json = await activity.toJsonLd({ contextLoader });
3485
+ let json = await activity.toJsonLd({ contextLoader });
3484
3486
  const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, this);
3485
3487
  if (await verifyObject(Activity, json, {
3486
3488
  contextLoader,
@@ -3536,6 +3538,7 @@ var ContextImpl = class ContextImpl {
3536
3538
  }
3537
3539
  logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
3538
3540
  activity = fetched;
3541
+ json = await fetched.toJsonLd({ contextLoader });
3539
3542
  } else logger.debug("Object Integrity Proofs are verified.", {
3540
3543
  recipient,
3541
3544
  activity: json
@@ -2,10 +2,10 @@ const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  const require_chunk = require("./chunk-DDcVe30Y.cjs");
4
4
  const require_transformers = require("./transformers-NeAONrAq.cjs");
5
- const require_http = require("./http-RWKDbjsL.cjs");
5
+ const require_http = require("./http-B7mxZjxT.cjs");
6
6
  const require_types = require("./types-DRPjmHVV.cjs");
7
- const require_proof = require("./proof-CHNefbCg.cjs");
8
- const require_kv_cache = require("./kv-cache-C6Vsz04k.cjs");
7
+ const require_proof = require("./proof-ZUtbM4a6.cjs");
8
+ const require_kv_cache = require("./kv-cache-DCIQW7aM.cjs");
9
9
  let _logtape_logtape = require("@logtape/logtape");
10
10
  let _fedify_vocab = require("@fedify/vocab");
11
11
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -204,6 +204,7 @@ var FederationBuilderImpl = class {
204
204
  * Symbol registry for unique identification of unnamed symbols.
205
205
  */
206
206
  #symbolRegistry = /* @__PURE__ */ new Map();
207
+ #collectionNames = /* @__PURE__ */ new Map();
207
208
  constructor() {
208
209
  this.router = new Router();
209
210
  this.objectCallbacks = {};
@@ -212,7 +213,7 @@ var FederationBuilderImpl = class {
212
213
  this.collectionTypeIds = {};
213
214
  }
214
215
  async build(options) {
215
- const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-CSK_D6wm.cjs"));
216
+ const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-BZO3vnP1.cjs"));
216
217
  const f = new FederationImpl(options);
217
218
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
218
219
  f.router = this.router.clone();
@@ -225,6 +226,8 @@ var FederationBuilderImpl = class {
225
226
  f.objectTypeIds = { ...this.objectTypeIds };
226
227
  f.collectionCallbacks = { ...this.collectionCallbacks };
227
228
  f.collectionTypeIds = { ...this.collectionTypeIds };
229
+ f.#symbolRegistry = new Map(this.#symbolRegistry);
230
+ f.#collectionNames = new Map(this.#collectionNames);
228
231
  f.inboxPath = this.inboxPath;
229
232
  f.outboxPath = this.outboxPath;
230
233
  f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
@@ -673,6 +676,7 @@ var FederationBuilderImpl = class {
673
676
  if (this.router.has(routeName)) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
674
677
  if (this.collectionCallbacks[name] != null) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
675
678
  if (this.router.add(path, routeName).size < 1) throw new RouterError("Path for collection dispatcher must have at least one variable.");
679
+ this.#collectionNames.set(routeName, name);
676
680
  const callbacks = { dispatcher };
677
681
  this.collectionCallbacks[name] = callbacks;
678
682
  this.collectionTypeIds[name] = itemType;
@@ -709,6 +713,10 @@ var FederationBuilderImpl = class {
709
713
  const routeName = this.#uniqueCollectionId(name);
710
714
  return this.router.build(`collection:${routeName}`, values) ?? this.router.build(`orderedCollection:${routeName}`, values);
711
715
  }
716
+ /** Resolves a custom collection route to its original name. */
717
+ getCollectionName(routeName) {
718
+ return this.#collectionNames.get(routeName) ?? routeName.replace(/^(collection|orderedCollection):/, "");
719
+ }
712
720
  setOutboxPermanentFailureHandler(handler) {
713
721
  this.outboxPermanentFailureHandler = handler;
714
722
  }
@@ -988,8 +996,15 @@ var KvKeyCache = class {
988
996
  })
989
997
  };
990
998
  else if ("errorName" in cached && typeof cached.errorName === "string" && "errorMessage" in cached && typeof cached.errorMessage === "string") {
991
- const error = new Error(cached.errorMessage);
999
+ let error;
1000
+ if ("errorType" in cached && cached.errorType === "FetchError" && "errorUrl" in cached && typeof cached.errorUrl === "string" && URL.canParse(cached.errorUrl)) {
1001
+ error = new _fedify_vocab_runtime.FetchError(cached.errorUrl);
1002
+ error.message = cached.errorMessage;
1003
+ } else if ("errorType" in cached && cached.errorType === "UrlError" && "errorReason" in cached && (cached.errorReason === "dns" || cached.errorReason === "disallowed")) error = new _fedify_vocab_runtime.UrlError(cached.errorMessage, { reason: cached.errorReason });
1004
+ else error = new Error(cached.errorMessage);
992
1005
  error.name = cached.errorName;
1006
+ if ("errorCause" in cached && cached.errorCause != null && typeof cached.errorCause === "object" && "name" in cached.errorCause && typeof cached.errorCause.name === "string" && "message" in cached.errorCause && typeof cached.errorCause.message === "string") if ("isDomException" in cached.errorCause && cached.errorCause.isDomException === true) error.cause = new DOMException(cached.errorCause.message, cached.errorCause.name);
1007
+ else error.cause = Object.assign(new Error(cached.errorCause.message), { name: cached.errorCause.name });
993
1008
  return { error };
994
1009
  }
995
1010
  }
@@ -1007,9 +1022,22 @@ var KvKeyCache = class {
1007
1022
  }, { ttl: this.unavailableKeyTtl });
1008
1023
  return;
1009
1024
  }
1025
+ const cause = error.error.cause;
1010
1026
  await this.kv.set(this.#getFetchErrorKey(keyId), {
1011
1027
  errorName: error.error.name,
1012
- errorMessage: error.error.message
1028
+ errorMessage: error.error.message,
1029
+ ...error.error instanceof _fedify_vocab_runtime.FetchError ? {
1030
+ errorType: "FetchError",
1031
+ errorUrl: error.error.url.href
1032
+ } : error.error instanceof _fedify_vocab_runtime.UrlError ? {
1033
+ errorType: "UrlError",
1034
+ errorReason: error.error.reason
1035
+ } : {},
1036
+ ...cause instanceof Error || cause instanceof DOMException ? { errorCause: {
1037
+ name: cause.name,
1038
+ message: cause.message,
1039
+ isDomException: cause instanceof DOMException
1040
+ } } : {}
1013
1041
  }, { ttl: this.unavailableKeyTtl });
1014
1042
  }
1015
1043
  };
@@ -4095,10 +4123,10 @@ var FederationImpl = class extends FederationBuilderImpl {
4095
4123
  onNotFound
4096
4124
  });
4097
4125
  case "collection": {
4098
- const name = route.name.replace(/^collection:/, "");
4126
+ const name = this.getCollectionName(route.name);
4099
4127
  const callbacks = this.collectionCallbacks[name];
4100
4128
  return await handleCustomCollection(request, {
4101
- name,
4129
+ name: String(name),
4102
4130
  context,
4103
4131
  values: route.values,
4104
4132
  collectionCallbacks: callbacks,
@@ -4108,10 +4136,10 @@ var FederationImpl = class extends FederationBuilderImpl {
4108
4136
  });
4109
4137
  }
4110
4138
  case "orderedCollection": {
4111
- const name = route.name.replace(/^orderedCollection:/, "");
4139
+ const name = this.getCollectionName(route.name);
4112
4140
  const callbacks = this.collectionCallbacks[name];
4113
4141
  return await handleOrderedCollection(request, {
4114
- name,
4142
+ name: String(name),
4115
4143
  context,
4116
4144
  values: route.values,
4117
4145
  collectionCallbacks: callbacks,
@@ -4304,8 +4332,10 @@ var ContextImpl = class ContextImpl {
4304
4332
  const collectionRegex = new RegExp(`^(${["collection", "orderedCollection"].join("|")}):(.*)$`);
4305
4333
  const match = route.name.match(collectionRegex);
4306
4334
  if (match !== null) {
4307
- const [, type, name] = match;
4335
+ const [, type] = match;
4336
+ const name = this.federation.getCollectionName(route.name);
4308
4337
  const cls = this.federation.collectionTypeIds[name];
4338
+ if (cls == null) return null;
4309
4339
  return {
4310
4340
  type,
4311
4341
  name,
@@ -4667,7 +4697,7 @@ var ContextImpl = class ContextImpl {
4667
4697
  "inbox"
4668
4698
  ]);
4669
4699
  const contextLoader = options.contextLoader ?? this.contextLoader;
4670
- const json = await activity.toJsonLd({ contextLoader });
4700
+ let json = await activity.toJsonLd({ contextLoader });
4671
4701
  const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, this);
4672
4702
  if (await require_proof.verifyObject(_fedify_vocab.Activity, json, {
4673
4703
  contextLoader,
@@ -4723,6 +4753,7 @@ var ContextImpl = class ContextImpl {
4723
4753
  }
4724
4754
  logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
4725
4755
  activity = fetched;
4756
+ json = await fetched.toJsonLd({ contextLoader });
4726
4757
  } else logger.debug("Object Integrity Proofs are verified.", {
4727
4758
  recipient,
4728
4759
  activity: json
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { n as HttpMessageSignaturesSpecDeterminer } from "./http-Dl00HXr4.js";
3
- import { n as KvStore, t as KvKey } from "./kv-D6hNiMTK.js";
3
+ import { n as KvStore, t as KvKey } from "./kv-CxaI4eGo.js";
4
4
  import { TracerProvider } from "@opentelemetry/api";
5
5
  import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
6
6
 
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as ActorAliasMapper, St as WebFingerLinksDispatcher, et as ActorDispatcher, l as RequestContext, tt as ActorHandleMapper } from "./context-Bt2jnbC7.js";
2
+ import { $ as ActorAliasMapper, St as WebFingerLinksDispatcher, et as ActorDispatcher, l as RequestContext, tt as ActorHandleMapper } from "./context-OkwEpc3-.js";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { n as HttpMessageSignaturesSpecDeterminer } from "./http-DqZhyEso.cjs";
3
- import { n as KvStore, t as KvKey } from "./kv-gJ8LYbxX.cjs";
3
+ import { n as KvStore, t as KvKey } from "./kv-CZKl1IUS.cjs";
4
4
  import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
5
5
  import { TracerProvider } from "@opentelemetry/api";
6
6
 
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as ActorAliasMapper, St as WebFingerLinksDispatcher, et as ActorDispatcher, l as RequestContext, tt as ActorHandleMapper } from "./context-Cls_M1HU.cjs";
2
+ import { $ as ActorAliasMapper, St as WebFingerLinksDispatcher, et as ActorDispatcher, l as RequestContext, tt as ActorHandleMapper } from "./context-tJbL_Hkw.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-RWKDbjsL.cjs");
8
- const require_middleware = require("./middleware-BR8TCS1H.cjs");
7
+ const require_http = require("./http-B7mxZjxT.cjs");
8
+ const require_middleware = require("./middleware-O_yyvaOf.cjs");
9
9
  const require_types = require("./types-DRPjmHVV.cjs");
10
- const require_proof = require("./proof-CHNefbCg.cjs");
11
- const require_kv_cache = require("./kv-cache-C6Vsz04k.cjs");
10
+ const require_proof = require("./proof-ZUtbM4a6.cjs");
11
+ const require_kv_cache = require("./kv-cache-DCIQW7aM.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
@@ -2,12 +2,12 @@
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
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-DqZhyEso.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-B3hNQCG8.cjs";
5
- import { $ as ActorAliasMapper, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as SendActivityError, D as ObjectCallbackSetters, Dt as digest, E as InboxListenerSetters, Et as buildCollectionSynchronizationHeader, 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 ActivityTransformer, P as CreateExponentialBackoffPolicyOptions, Q as ParallelMessageQueue, R as Message, S as FederationStartQueueOptions, St as WebFingerLinksDispatcher, T as InboxChallengePolicy, Tt as PageItems, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueEnqueueOptions, Y as MessageQueue, Z as MessageQueueListenOptions, _ as Federatable, _t as OutboxListenerErrorHandler, a as GetSignedKeyOptions, at as CollectionCursor, b as FederationFetchOptions, bt as UnverifiedActivityHandler, c as ParseUriResult, ct as CustomCollectionCursor, d as SendActivityOptions, dt as InboxListener, et as ActorDispatcher, f as SendActivityOptionsForCollection, ft as NodeInfoDispatcher, g as CustomCollectionCallbackSetters, gt as OutboxListener, h as ConstructorWithTypeId, ht as OutboxErrorHandler, i as GetActorOptions, it as CollectionCounter, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionDispatcher, m as CollectionCallbackSetters, mt as ObjectDispatcher, n as Context, nt as ActorKeyPairsDispatcher, o as InboxContext, ot as CollectionDispatcher, p as ActorCallbackSetters, pt as ObjectAuthorizePredicate, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as AuthorizePredicate, s as OutboxContext, st as CustomCollectionCounter, t as ActorKeyPair, tt as ActorHandleMapper, u as RouteActivityOptions, ut as InboxErrorHandler, v as Federation, vt as OutboxPermanentFailureHandler, w as IdempotencyStrategy, wt as SenderKeyPair, x as FederationOptions, xt as UnverifiedActivityReason, y as FederationBuilder, yt as SharedInboxKeyDispatcher, z as createFederationBuilder } from "./context-Cls_M1HU.cjs";
6
- import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-gJ8LYbxX.cjs";
5
+ import { $ as ActorAliasMapper, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as SendActivityError, D as ObjectCallbackSetters, Dt as digest, E as InboxListenerSetters, Et as buildCollectionSynchronizationHeader, 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 ActivityTransformer, P as CreateExponentialBackoffPolicyOptions, Q as ParallelMessageQueue, R as Message, S as FederationStartQueueOptions, St as WebFingerLinksDispatcher, T as InboxChallengePolicy, Tt as PageItems, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueEnqueueOptions, Y as MessageQueue, Z as MessageQueueListenOptions, _ as Federatable, _t as OutboxListenerErrorHandler, a as GetSignedKeyOptions, at as CollectionCursor, b as FederationFetchOptions, bt as UnverifiedActivityHandler, c as ParseUriResult, ct as CustomCollectionCursor, d as SendActivityOptions, dt as InboxListener, et as ActorDispatcher, f as SendActivityOptionsForCollection, ft as NodeInfoDispatcher, g as CustomCollectionCallbackSetters, gt as OutboxListener, h as ConstructorWithTypeId, ht as OutboxErrorHandler, i as GetActorOptions, it as CollectionCounter, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionDispatcher, m as CollectionCallbackSetters, mt as ObjectDispatcher, n as Context, nt as ActorKeyPairsDispatcher, o as InboxContext, ot as CollectionDispatcher, p as ActorCallbackSetters, pt as ObjectAuthorizePredicate, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as AuthorizePredicate, s as OutboxContext, st as CustomCollectionCounter, t as ActorKeyPair, tt as ActorHandleMapper, u as RouteActivityOptions, ut as InboxErrorHandler, v as Federation, vt as OutboxPermanentFailureHandler, w as IdempotencyStrategy, wt as SenderKeyPair, x as FederationOptions, xt as UnverifiedActivityReason, y as FederationBuilder, yt as SharedInboxKeyDispatcher, z as createFederationBuilder } from "./context-tJbL_Hkw.cjs";
6
+ import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CZKl1IUS.cjs";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-DNvnDTS7.cjs";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-a6kmB8xD.cjs";
9
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-D2JyWtW3.cjs";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BYg1qMPB.cjs";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-V2vDnYNu.cjs";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts