@fedify/fedify 2.4.0-dev.2169 → 2.4.0-dev.2193

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 (103) hide show
  1. package/dist/{builder-B2d_Pt0j.mjs → builder-0onlMY4u.mjs} +26 -6
  2. package/dist/{circuit-breaker-C5NqoLBJ.mjs → circuit-breaker-XJ53md4S.mjs} +16 -11
  3. package/dist/compat/mod.d.cts +1 -1
  4. package/dist/compat/mod.d.ts +1 -1
  5. package/dist/compat/transformers.test.mjs +1 -1
  6. package/dist/{compound-proof-D28gMFqP.mjs → compound-proof-B-Fk6Slo.mjs} +3 -3
  7. package/dist/{context-BykNUf04.d.ts → context-9T--NSo4.d.ts} +55 -1
  8. package/dist/{context-L0Fnib9j.d.cts → context-CDcAgm4l.d.cts} +55 -1
  9. package/dist/{deno-DU8dvnWk.mjs → deno-DB_Sh0LK.mjs} +1 -1
  10. package/dist/{docloader-CghLH7Zi.mjs → docloader-DpWYYY6a.mjs} +25 -17
  11. package/dist/federation/builder.test.mjs +1 -1
  12. package/dist/federation/circuit-breaker.test.mjs +50 -1
  13. package/dist/federation/compound-fanout.test.mjs +3 -3
  14. package/dist/federation/handler-compound-proof.test.mjs +52 -3
  15. package/dist/federation/handler.test.mjs +5 -5
  16. package/dist/federation/hashlink-media.test.mjs +2 -2
  17. package/dist/federation/idempotency.test.mjs +2 -2
  18. package/dist/federation/keycache.test.mjs +1 -1
  19. package/dist/federation/metrics.test.mjs +1 -1
  20. package/dist/federation/middleware.test.mjs +182 -13
  21. package/dist/federation/mod.cjs +1 -1
  22. package/dist/federation/mod.d.cts +2 -2
  23. package/dist/federation/mod.d.ts +2 -2
  24. package/dist/federation/mod.js +1 -1
  25. package/dist/federation/outgoing-proof.test.mjs +5 -5
  26. package/dist/federation/portable-actor.test.mjs +3 -3
  27. package/dist/federation/portable-chain.test.mjs +3 -3
  28. package/dist/federation/portable-collection.test.mjs +4 -4
  29. package/dist/federation/portable-gateway-keys.test.mjs +6 -6
  30. package/dist/federation/portable-inbox.test.mjs +35 -5
  31. package/dist/federation/portable-parse-uri.test.mjs +1 -1
  32. package/dist/federation/portable-route-activity.test.d.mts +2 -0
  33. package/dist/federation/portable-route-activity.test.mjs +259 -0
  34. package/dist/federation/portable.test.mjs +49 -5
  35. package/dist/federation/send.test.mjs +3 -3
  36. package/dist/federation/tasks/enqueue.test.mjs +1 -1
  37. package/dist/federation/tasks/tasks.test.mjs +2 -2
  38. package/dist/federation/temporal.test.mjs +1 -1
  39. package/dist/federation/webfinger.test.mjs +1 -1
  40. package/dist/{federation-DrNgkLfJ.cjs → federation-BsGo0EH2.cjs} +76 -35
  41. package/dist/{http-5CJBdU8n.cjs → http-BEivI0TS.cjs} +279 -87
  42. package/dist/{http-BGpexPO7.js → http-BGmxtpo2.js} +263 -89
  43. package/dist/{http-Cok5-vIC.d.ts → http-BrwKINQn.d.cts} +29 -1
  44. package/dist/{http-DC1cqAQ2.d.cts → http-DGx0KOws.d.ts} +29 -1
  45. package/dist/{http-Bd6rZlJX.mjs → http-DQf9Mw4V.mjs} +180 -92
  46. package/dist/{key-gIhVZO3p.mjs → key-DA3Yx8p2.mjs} +4 -4
  47. package/dist/{key-owner-evidence-Bo3yaeL5.mjs → key-owner-evidence-APB6NpSk.mjs} +1 -1
  48. package/dist/{keycache-PiOM9pM0.mjs → keycache-Da8A8mZa.mjs} +1 -1
  49. package/dist/{kv-cache-YRi_g8GB.cjs → kv-cache-1hafSoqH.cjs} +23 -15
  50. package/dist/{kv-cache-iR55fqlk.js → kv-cache-DduYhpee.js} +24 -16
  51. package/dist/{kv-cache-D0qjSeWY.mjs → kv-cache-OFBvrKh3.mjs} +1 -1
  52. package/dist/{ld-BsTkRrwF.mjs → ld-C15yzuY6.mjs} +3 -3
  53. package/dist/{metrics-jUDFfVgi.mjs → metrics-B1H23mlq.mjs} +1 -1
  54. package/dist/{middleware-Dq-OCmb6.mjs → middleware-BZQnf0nI.mjs} +1 -1
  55. package/dist/{middleware-Coqgp-K0.mjs → middleware-BqqycC0P.mjs} +52 -36
  56. package/dist/{middleware-DlxMxVp5.js → middleware-ClaUFaLb.js} +77 -36
  57. package/dist/{mod-DK0y9fd-.d.ts → mod-B3OBLj5g.d.ts} +1 -1
  58. package/dist/{mod-B5z_q9TH.d.ts → mod-C5Mwx5ty.d.ts} +5 -1
  59. package/dist/{mod-CPPqkyV_.d.cts → mod-Cy9VNHVw.d.ts} +14 -3
  60. package/dist/{mod-BLOXGs6m.d.cts → mod-D58KCqUg.d.cts} +1 -1
  61. package/dist/{mod--jv6vyrP.d.ts → mod-DoTWIc7F.d.cts} +14 -3
  62. package/dist/{mod-BA_F2x53.d.cts → mod-Dp3Ij7sw.d.cts} +5 -1
  63. package/dist/mod.cjs +4 -4
  64. package/dist/mod.d.cts +5 -5
  65. package/dist/mod.d.ts +5 -5
  66. package/dist/mod.js +4 -4
  67. package/dist/nodeinfo/handler.test.mjs +1 -1
  68. package/dist/{owner-D3GoetXS.mjs → owner-BVpZBM-V.mjs} +5 -5
  69. package/dist/{portable-collection-CnlCamup.cjs → portable-collection-BFSShzwh.cjs} +1 -1
  70. package/dist/{portable-collection-Bkdh_WpL.js → portable-collection-D535cSz_.js} +1 -1
  71. package/dist/{portable-collection-C60_acmx.mjs → portable-collection-Dn2GdZdI.mjs} +2 -2
  72. package/dist/{portable-key-DyF5AnZo.mjs → portable-key-Bmwmq7Y6.mjs} +2 -2
  73. package/dist/{portable-key-id-Bg259c4Z.mjs → portable-key-id-Ca30-hOa.mjs} +45 -1
  74. package/dist/{proof-CQAYqWdj.mjs → proof-DrJWKeOl.mjs} +49 -7
  75. package/dist/{send-DjkQrxt5.mjs → send-CT3a-0Vd.mjs} +3 -3
  76. package/dist/sig/compound-proof-discovery.test.mjs +1 -1
  77. package/dist/sig/compound-proof-producer.test.mjs +1 -1
  78. package/dist/sig/compound-proof-verification.test.mjs +2 -2
  79. package/dist/sig/compound-proof.test.mjs +2 -2
  80. package/dist/sig/http.test.mjs +495 -23
  81. package/dist/sig/key-owner-evidence.test.mjs +2 -2
  82. package/dist/sig/key.test.mjs +1 -1
  83. package/dist/sig/ld.test.mjs +2 -2
  84. package/dist/sig/mod.cjs +2 -2
  85. package/dist/sig/mod.d.cts +2 -2
  86. package/dist/sig/mod.d.ts +2 -2
  87. package/dist/sig/mod.js +2 -2
  88. package/dist/sig/owner.test.mjs +1 -1
  89. package/dist/sig/portable-collection.test.mjs +1 -1
  90. package/dist/sig/portable-key-id.test.d.mts +2 -0
  91. package/dist/sig/portable-key-id.test.mjs +67 -0
  92. package/dist/sig/portable-key.test.mjs +7 -7
  93. package/dist/sig/proof.test.mjs +141 -7
  94. package/dist/{temporal-oRKP803M.mjs → temporal-DNqluyEc.mjs} +1 -1
  95. package/dist/testing/kv.test.mjs +1 -1
  96. package/dist/testing/mod.d.mts +52 -0
  97. package/dist/utils/docloader.test.mjs +93 -2
  98. package/dist/utils/kv-cache.test.mjs +1 -1
  99. package/dist/utils/mod.cjs +1 -1
  100. package/dist/utils/mod.d.cts +1 -1
  101. package/dist/utils/mod.d.ts +1 -1
  102. package/dist/utils/mod.js +1 -1
  103. package/package.json +7 -7
@@ -2,15 +2,15 @@ import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-DAtXl_Kc.js";
5
- import { $ as isAbortError, A as hasSignatureLike, C as assertSafeJsonLd, Ct as isPortableId, D as detachSignature, Dt as name, K as MAX_PORTABLE_KEY_TTL, L as wrapContextLoaderForJsonLd, M as isInvalidUrlTypeError, N as signJsonLd, O as getNormalizationContextLoader, Ot as version, P as verifyCompactJsonLd, Q as instrumentDocumentLoader, R as exportJwk, S as InvalidContextReferenceError, St as isCompatibleKeyId, T as compactJsonLd, Tt as isPortableUri, U as importJwk, W as validateCryptoKey, X as getFederationMetrics, Y as getDurationMs, Z as getRemoteHost, _ as verifyPortableObjectProof, _t as getCanonicalPortableId, bt as getRawCanonicalPortableId, ct as recordOutboxActivity, d as classifyFep2277CoreType, dt as registerQueueDepthGauge, et as recordCircuitBreakerStateChange, ft as preloadedOnlyDocumentLoader, g as verifyObject, h as verifyMapLocalProof, i as selectRequestSignature, it as recordCollectionTotalItems, j as isClearlyMalformedContextReference, k as hasSignature, lt as recordOutboxEnqueue, m as signObject, n as listRequestSignatures, nt as recordCollectionPageItems, o as verifyRequest, ot as recordFanoutRecipients, p as hasProofLike, pt as formatAcceptSignature, r as parseRfc9421SignatureInput, rt as recordCollectionRequest, s as verifyRequestDetailed, st as recordInboxActivity, t as doubleKnock, tt as recordCollectionDispatchDuration, u as InvalidPortableObjectIdError, ut as recordWebFingerHandle, v as verifyPortableObjectProofPolicy, vt as getGatewayKeyBase, wt as isPortableKeyId, x as normalizeOutgoingActivityJsonLd, xt as hasPortableActor, y as verifyPortableObjectProofWithRoot, yt as getPortableDid } from "./http-BGpexPO7.js";
5
+ import { $ as instrumentDocumentLoader, A as hasSignature, At as name, C as InvalidContextReferenceError, Ct as hasPortableActor, Dt as isPortableUri, E as compactJsonLd, Et as isPortableKeyId, F as verifyCompactJsonLd, G as validateCryptoKey, M as isClearlyMalformedContextReference, N as isInvalidUrlTypeError, O as detachSignature, Ot as isSameObjectId, P as signJsonLd, Q as getRemoteHost, R as wrapContextLoaderForJsonLd, S as normalizeOutgoingActivityJsonLd, St as getRawCanonicalPortableId, Tt as isPortableId, W as importJwk, X as getDurationMs, Z as getFederationMetrics, _ as verifyObject, at as recordCollectionTotalItems, b as verifyPortableObjectProofWithRoot, bt as getGatewayKeyBase, c as verifyRequestDetailed, ct as recordInboxActivity, d as InvalidPortableObjectIdError, dt as recordWebFingerHandle, et as isAbortError, f as classifyFep2277CoreType, ft as registerQueueDepthGauge, g as verifyMapLocalProof, h as signObject, i as selectRequestSignature, it as recordCollectionRequest, j as hasSignatureLike, jt as version, k as getNormalizationContextLoader, lt as recordOutboxActivity, m as hasProofLike, mt as formatAcceptSignature, n as listRequestSignatures, nt as recordCollectionDispatchDuration, o as validateMaxSignatures, pt as preloadedOnlyDocumentLoader, q as MAX_PORTABLE_KEY_TTL, r as parseRfc9421SignatureInput, rt as recordCollectionPageItems, s as verifyRequest, st as recordFanoutRecipients, t as doubleKnock, tt as recordCircuitBreakerStateChange, ut as recordOutboxEnqueue, v as verifyPortableObjectProof, vt as getAuthenticationOrigin, w as assertSafeJsonLd, wt as isCompatibleKeyId, xt as getPortableDid, y as verifyPortableObjectProofPolicy, yt as getCanonicalPortableId, z as exportJwk } from "./http-BGmxtpo2.js";
6
6
  import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-_S2_MeLF.js";
7
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-Bkdh_WpL.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-iR55fqlk.js";
7
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-D535cSz_.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DduYhpee.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Router, RouterError, assertPath } from "@fedify/uri-template";
11
11
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, isActor, lookupObject, traverseCollection } from "@fedify/vocab";
12
12
  import { SpanKind, SpanStatusCode, context, metrics, propagation, trace } from "@opentelemetry/api";
13
- import { FetchError, UrlError, canonicalizePortableUri, decodeMultibase, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, isGatewayUrl, parseDigestMultibase, parseHashlink, parseIri, preloadedContexts, toCompatibleEf61Id, validatePublicUrl } from "@fedify/vocab-runtime";
13
+ import { FetchError, UrlError, canonicalizePortableUri, decodeMultibase, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, isGatewayUrl, parseDigestMultibase, parseHashlink, parseIri, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl } from "@fedify/vocab-runtime";
14
14
  import { isCompatibleEf61Iri } from "@fedify/vocab-runtime/internal/portable-dereference";
15
15
  import { encodeHex } from "byte-encodings/hex";
16
16
  import jsonld from "@fedify/vocab-runtime/jsonld";
@@ -210,6 +210,7 @@ var FederationBuilderImpl = class {
210
210
  if (actor.id == null) logger.warn("Actor dispatcher returned an actor without an id property. Set the property with Context.getActorUri(identifier).");
211
211
  else if (!portable && actor.id.href != context.getActorUri(identifier).href) logger.warn("Actor dispatcher returned an actor with an id property that does not match the actor URI. Set the property with Context.getActorUri(identifier).");
212
212
  if (actor instanceof Tombstone) return actor;
213
+ if (portable && actor.id != null) warnPortableActorGateways(actor.id, actor.gateways);
213
214
  if (actor.id != null && isCompatibleEf61Iri(actor.id)) warnCompatibleActorId(actor.id, actor.gateway);
214
215
  if (portable) this.#warnPortableCollectionIds(context, identifier, actor);
215
216
  if (this.followingCallbacks != null && this.followingCallbacks.dispatcher != null) {
@@ -813,9 +814,28 @@ function warnMismatchedTombstoneId(context, cls, values, tombstone) {
813
814
  });
814
815
  }
815
816
  /**
817
+ * Warns about an FEP-ef61 portable actor whose `gateways` is empty or has
818
+ * an item that is not an HTTP(S) origin, which FEP-ef61 does not allow.
819
+ * Every item is checked, since the list and its URLs can be mutated after
820
+ * the actor is constructed.
821
+ */
822
+ function warnPortableActorGateways(actorId, gateways) {
823
+ if (gateways.length > 0 && gateways.every(isGatewayUrl)) return;
824
+ getLogger([
825
+ "fedify",
826
+ "federation",
827
+ "actor"
828
+ ]).warn("Actor dispatcher returned an FEP-ef61 portable actor, {actorId}, whose gateways property is empty or has an item that is not an HTTP(S) origin. FEP-ef61 requires a portable actor to have at least one gateway, and every gateway to be an HTTP(S) URI with an empty path, query, and fragment. Set the gateways property.", {
829
+ actorId: actorId.href,
830
+ gateways: gateways.map((g) => g.href)
831
+ });
832
+ }
833
+ /**
816
834
  * Warns about an FEP-ef61 portable actor identified by a compatible identifier
817
835
  * that is malformed, or is not on the actor's first gateway, where FEP-ef61
818
- * requires publishers to construct compatible identifiers.
836
+ * requires publishers to construct compatible identifiers. A missing or
837
+ * invalid first gateway is reported by {@link warnPortableActorGateways}
838
+ * instead.
819
839
  */
820
840
  function warnCompatibleActorId(actorId, gateway) {
821
841
  const logger = getLogger([
@@ -833,8 +853,8 @@ function warnCompatibleActorId(actorId, gateway) {
833
853
  });
834
854
  return;
835
855
  }
836
- if (gateway == null || !isGatewayUrl(gateway)) logger.warn("Actor dispatcher returned an actor whose id property, {actorId}, is an FEP-ef61 compatible identifier, but whose first gateway is not an HTTP(S) origin. Set the gateways property, and construct the compatible identifier with its first gateway.", { actorId: actorId.href });
837
- else if (actorId.origin !== gateway.origin) logger.warn("Actor dispatcher returned an actor whose id property, {actorId}, is an FEP-ef61 compatible identifier on another gateway than its first gateway, {gateway}. FEP-ef61 requires publishers to construct compatible identifiers with the first gateway in the actor's gateways.", {
856
+ if (gateway == null || !isGatewayUrl(gateway)) return;
857
+ if (actorId.origin !== gateway.origin) logger.warn("Actor dispatcher returned an actor whose id property, {actorId}, is an FEP-ef61 compatible identifier on another gateway than its first gateway, {gateway}. FEP-ef61 requires publishers to construct compatible identifiers with the first gateway in the actor's gateways.", {
838
858
  actorId: actorId.href,
839
859
  gateway: gateway.origin
840
860
  });
@@ -885,7 +905,7 @@ var CircuitBreaker = class {
885
905
  };
886
906
  let lastConflictingState;
887
907
  for (let attempt = 0; attempt < 10; attempt++) {
888
- const oldState = await this.#get(remoteHost);
908
+ const { state: oldState, raw: oldValue } = await this.#get(remoteHost);
889
909
  if (oldState == null || oldState.state === "closed") return {
890
910
  type: "send",
891
911
  probe: false
@@ -911,7 +931,7 @@ var CircuitBreaker = class {
911
931
  state: "half-open",
912
932
  halfOpened: now.toString()
913
933
  };
914
- if (await this.#replace(remoteHost, oldState, newState)) return {
934
+ if (await this.#replace(remoteHost, oldValue, newState)) return {
915
935
  type: "send",
916
936
  probe: true
917
937
  };
@@ -933,7 +953,7 @@ var CircuitBreaker = class {
933
953
  state: "half-open",
934
954
  halfOpened: now.toString()
935
955
  };
936
- if (await this.#replace(remoteHost, oldState, newState)) {
956
+ if (await this.#replace(remoteHost, oldValue, newState)) {
937
957
  await this.#notifyStateChange(remoteHost, "open", "half-open");
938
958
  return {
939
959
  type: "send",
@@ -960,9 +980,9 @@ var CircuitBreaker = class {
960
980
  async recordSuccess(remoteHost) {
961
981
  this.#sweepLegacyStates();
962
982
  for (let attempt = 0; attempt < 10; attempt++) {
963
- const oldState = await this.#get(remoteHost);
983
+ const { state: oldState, raw: oldValue } = await this.#get(remoteHost);
964
984
  if (oldState == null) return void 0;
965
- if (await this.#replace(remoteHost, oldState, void 0)) {
985
+ if (await this.#replace(remoteHost, oldValue, void 0)) {
966
986
  if (oldState.state !== "closed") {
967
987
  await this.#notifyStateChange(remoteHost, oldState.state, "closed");
968
988
  return {
@@ -982,7 +1002,7 @@ var CircuitBreaker = class {
982
1002
  this.#sweepLegacyStates();
983
1003
  const now = this.#now();
984
1004
  for (let attempt = 0; attempt < 10; attempt++) {
985
- const oldState = await this.#get(remoteHost);
1005
+ const { state: oldState, raw: oldValue } = await this.#get(remoteHost);
986
1006
  if (oldState?.state === "open") return void 0;
987
1007
  const oldFailures = oldState?.failures.map(Temporal.Instant.from) ?? [];
988
1008
  const failures = this.#options.pruneFailures([...oldFailures, now], now);
@@ -999,7 +1019,7 @@ var CircuitBreaker = class {
999
1019
  state: "closed",
1000
1020
  failures: failures.map((t) => t.toString())
1001
1021
  };
1002
- if (await this.#replace(remoteHost, oldState, newState)) {
1022
+ if (await this.#replace(remoteHost, oldValue, newState)) {
1003
1023
  if (transition != null) {
1004
1024
  await this.#notifyStateChange(remoteHost, transition[0], transition[1]);
1005
1025
  return {
@@ -1028,7 +1048,7 @@ var CircuitBreaker = class {
1028
1048
  }
1029
1049
  async getState(remoteHost) {
1030
1050
  this.#sweepLegacyStates();
1031
- return stripStoredCircuitBreakerState(await this.#get(remoteHost));
1051
+ return stripStoredCircuitBreakerState((await this.#get(remoteHost)).state);
1032
1052
  }
1033
1053
  /**
1034
1054
  * The currently running background legacy sweep, if any.
@@ -1148,9 +1168,14 @@ var CircuitBreaker = class {
1148
1168
  return Temporal.Instant.compare(expiresAt, retryAt) < 0 ? expiresAt : retryAt;
1149
1169
  }
1150
1170
  async #get(remoteHost) {
1151
- return parseStoredCircuitBreakerKvState(await this.#kv.get(this.#key(remoteHost)));
1171
+ const value = await this.#kv.get(this.#key(remoteHost));
1172
+ const state = parseStoredCircuitBreakerKvState(value);
1173
+ return {
1174
+ state,
1175
+ raw: state == null ? void 0 : value
1176
+ };
1152
1177
  }
1153
- async #replace(remoteHost, oldState, newState) {
1178
+ async #replace(remoteHost, oldValue, newState) {
1154
1179
  const key = this.#key(remoteHost);
1155
1180
  const storedState = newState == null ? void 0 : markCircuitBreakerState(newState);
1156
1181
  if (this.#kv.cas == null) {
@@ -1158,7 +1183,7 @@ var CircuitBreaker = class {
1158
1183
  else await this.#kv.set(key, storedState, this.#setOptions());
1159
1184
  return true;
1160
1185
  }
1161
- return await this.#kv.cas(key, oldState, storedState, storedState == null ? void 0 : this.#setOptions());
1186
+ return await this.#kv.cas(key, oldValue, storedState, storedState == null ? void 0 : this.#setOptions());
1162
1187
  }
1163
1188
  #setOptions() {
1164
1189
  return this.#options.stateTtl == null ? void 0 : { ttl: this.#options.stateTtl };
@@ -3781,7 +3806,7 @@ function isInvalidJsonLdError(error) {
3781
3806
  return name === "UnsafeJsonLdError" || error instanceof InvalidContextReferenceError || isPermanentRemoteContextError$1(error) || name === "jsonld.SyntaxError" && !isRemoteContextLoadingFailure$1(error);
3782
3807
  }
3783
3808
  function isValidationTypeError(error) {
3784
- return error instanceof TypeError && (/^(Invalid JSON-LD:|Invalid type:|Unexpected type:|Invalid @id:)/.test(error.message) || isInvalidUrlTypeError(error));
3809
+ return error instanceof TypeError && (/^(Invalid JSON-LD:|Invalid type:|Unexpected type:|Invalid @id:|Invalid FEP-ef61 gateway:)/.test(error.message) || isInvalidUrlTypeError(error));
3785
3810
  }
3786
3811
  function isPermanentActivityParseError(error) {
3787
3812
  return isInvalidJsonLdError(error) || isValidationTypeError(error);
@@ -3924,7 +3949,11 @@ async function handlePortableObject(request, { values, context, objectDispatcher
3924
3949
  return await onNotFound(request);
3925
3950
  }
3926
3951
  if (tombstone || result.reason.type !== "unsecuredCollection" && result.reason.type !== "unsupportedObjectType") {
3927
- logger.error("Refusing to serve the portable object {portableId}, as it does not satisfy the FEP-ef61 proof policy: {reason}. Portable actors, activities, objects, and tombstones need an Object Integrity Proof made with a key of the DID in their ID.", {
3952
+ if (result.reason.type === "invalidGateways") logger.error("Refusing to serve the portable actor {portableId}, as its gateways property is missing, empty, or has an item that is not an HTTP(S) origin. FEP-ef61 requires a portable actor to list at least one gateway where it can be retrieved.", {
3953
+ portableId: canonicalId,
3954
+ reason: result.reason.type
3955
+ });
3956
+ else logger.error("Refusing to serve the portable object {portableId}, as it does not satisfy the FEP-ef61 proof policy: {reason}. Portable actors, activities, objects, and tombstones need an Object Integrity Proof made with a key of the DID in their ID.", {
3928
3957
  portableId: canonicalId,
3929
3958
  reason: result.reason.type
3930
3959
  });
@@ -4043,13 +4072,13 @@ function recordCollectionMetrics(meterProvider, base, result, options = {}) {
4043
4072
  * @param parameters The parameters for handling the collection.
4044
4073
  * @returns A promise that resolves to an HTTP response.
4045
4074
  */
4046
- async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, portable, tracerProvider, meterProvider, onUnauthorized, onNotFound }) {
4047
- const spanName = name$1.trim().replace(/\s+/g, "_");
4075
+ async function handleCollection(request, { name: name$2, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, portable, tracerProvider, meterProvider, onUnauthorized, onNotFound }) {
4076
+ const spanName = name$2.trim().replace(/\s+/g, "_");
4048
4077
  tracerProvider = tracerProvider ?? trace.getTracerProvider();
4049
4078
  const tracer = tracerProvider.getTracer(name, version);
4050
4079
  const cursor = new URL(request.url).searchParams.get("cursor");
4051
4080
  const metricBase = {
4052
- kind: getCollectionMetricKind(name$1),
4081
+ kind: getCollectionMetricKind(name$2),
4053
4082
  page: cursor != null,
4054
4083
  dispatcher: "built_in"
4055
4084
  };
@@ -4095,7 +4124,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
4095
4124
  span.setStatus({ code: SpanStatusCode.ERROR });
4096
4125
  return await onNotFound(request);
4097
4126
  }
4098
- const items = filterCollectionItems(page.items, name$1, filterPredicate);
4127
+ const items = filterCollectionItems(page.items, name$2, filterPredicate);
4099
4128
  itemCount = items.length;
4100
4129
  span.setAttribute("fedify.collection.items", itemCount);
4101
4130
  return items;
@@ -4137,7 +4166,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
4137
4166
  } else {
4138
4167
  const uri = new URL(portable == null ? baseUri : pageBase);
4139
4168
  uri.searchParams.set("cursor", cursor);
4140
- const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
4169
+ const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$2}`, {
4141
4170
  kind: SpanKind.SERVER,
4142
4171
  attributes: {
4143
4172
  "activitypub.collection.id": uri.href,
@@ -4153,7 +4182,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
4153
4182
  span.setStatus({ code: SpanStatusCode.ERROR });
4154
4183
  return await onNotFound(request);
4155
4184
  }
4156
- const items = filterCollectionItems(page.items, name$1, filterPredicate);
4185
+ const items = filterCollectionItems(page.items, name$2, filterPredicate);
4157
4186
  itemCount = items.length;
4158
4187
  span.setAttribute("fedify.collection.items", itemCount);
4159
4188
  return {
@@ -4661,7 +4690,7 @@ async function handleInbox(request, options) {
4661
4690
  * @returns A promise that resolves to an HTTP response.
4662
4691
  */
4663
4692
  async function handleInboxInternal(request, parameters, span) {
4664
- const { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, publicKeyTtl, queue, actorDispatcher, inboxListeners, inboxErrorHandler, unverifiedActivityHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, inboxChallengePolicy, meterProvider, tracerProvider, portableInbox } = parameters;
4693
+ const { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, publicKeyTtl, queue, actorDispatcher, inboxListeners, inboxErrorHandler, unverifiedActivityHandler, onNotFound, signatureTimeWindow, maxHttpSignatures, skipSignatureVerification, inboxChallengePolicy, meterProvider, tracerProvider, portableInbox } = parameters;
4665
4694
  const logger = getLogger([
4666
4695
  "fedify",
4667
4696
  "federation",
@@ -4947,6 +4976,7 @@ async function handleInboxInternal(request, parameters, span) {
4947
4976
  contextLoader: ctx.contextLoader,
4948
4977
  documentLoader: ctx.documentLoader,
4949
4978
  timeWindow: signatureTimeWindow,
4979
+ maxSignatures: maxHttpSignatures,
4950
4980
  keyCache,
4951
4981
  meterProvider,
4952
4982
  tracerProvider
@@ -5169,7 +5199,7 @@ async function handleInboxInternal(request, parameters, span) {
5169
5199
  inbox: portableInbox.recipient.canonicalInboxId
5170
5200
  });
5171
5201
  else try {
5172
- await portableInbox.forward(json, activity.id, getTypeId(activity).href, listRequestSignatures(request).map((signature) => ({
5202
+ await portableInbox.forward(json, activity.id, getTypeId(activity).href, listRequestSignatures(request, maxHttpSignatures).map((signature) => ({
5173
5203
  keyId: signature.keyId,
5174
5204
  coversDelivery: coversDelivery(signature),
5175
5205
  verify: async () => {
@@ -5343,8 +5373,8 @@ var CustomCollectionHandler = class {
5343
5373
  * @param CollectionPage The CollectionPage constructor.
5344
5374
  * @param filterPredicate Optional filter predicate for items.
5345
5375
  */
5346
- constructor(name$2, values, context, callbacks, tracerProvider = trace.getTracerProvider(), meterProvider, Collection, CollectionPage, filterPredicate, portable) {
5347
- this.name = name$2;
5376
+ constructor(name$1, values, context, callbacks, tracerProvider = trace.getTracerProvider(), meterProvider, Collection, CollectionPage, filterPredicate, portable) {
5377
+ this.name = name$1;
5348
5378
  this.values = values;
5349
5379
  this.context = context;
5350
5380
  this.callbacks = callbacks;
@@ -7132,7 +7162,7 @@ function isPermanentRemoteContextError(error) {
7132
7162
  return isRemoteContextLoadingFailure(error) && typeof details?.url === "string" && !URL.canParse(details.url) && isClearlyMalformedContextReference(details.url);
7133
7163
  }
7134
7164
  function isPermanentInboxParseError(error) {
7135
- return error instanceof Error && (error.name === "UnsafeJsonLdError" || error instanceof InvalidContextReferenceError || isPermanentRemoteContextError(error) || error.name === "jsonld.SyntaxError" && !isRemoteContextLoadingFailure(error)) || error instanceof TypeError && (/^(Invalid JSON-LD:|Invalid type:|Unexpected type:|Invalid @id:)/.test(error.message) || isInvalidUrlTypeError(error));
7165
+ return error instanceof Error && (error.name === "UnsafeJsonLdError" || error instanceof InvalidContextReferenceError || isPermanentRemoteContextError(error) || error.name === "jsonld.SyntaxError" && !isRemoteContextLoadingFailure(error)) || error instanceof TypeError && (/^(Invalid JSON-LD:|Invalid type:|Unexpected type:|Invalid @id:|Invalid FEP-ef61 gateway:)/.test(error.message) || isInvalidUrlTypeError(error));
7136
7166
  }
7137
7167
  function hasLinkedDataSignatureJsonLdProcessingError(error) {
7138
7168
  if (error.message.startsWith("Maximum deep iterations exceeded")) return true;
@@ -7149,6 +7179,8 @@ function isLinkedDataSignatureJsonLdProcessingError(error) {
7149
7179
  * @returns A new {@link Federation} instance.
7150
7180
  * @throws {TypeError} If benchmark mode and `meterProvider` are both
7151
7181
  * specified.
7182
+ * @throws {RangeError} If {@link FederationOptions.maxHttpSignatures} is not
7183
+ * a positive integer or `Infinity`.
7152
7184
  * @since 0.10.0
7153
7185
  */
7154
7186
  function createFederation(options) {
@@ -7175,6 +7207,7 @@ var FederationImpl = class extends FederationBuilderImpl {
7175
7207
  onOutboxError;
7176
7208
  permanentFailureStatusCodes;
7177
7209
  signatureTimeWindow;
7210
+ maxHttpSignatures;
7178
7211
  skipSignatureVerification;
7179
7212
  outboxRetryPolicy;
7180
7213
  inboxRetryPolicy;
@@ -7203,6 +7236,7 @@ var FederationImpl = class extends FederationBuilderImpl {
7203
7236
  const hasCustomLoaderFactory = options.documentLoaderFactory != null || options.contextLoaderFactory != null;
7204
7237
  const allowPrivateAddress = options.allowPrivateAddress ?? (benchmarkMode && !hasCustomLoaderFactory ? true : false);
7205
7238
  const signatureTimeWindow = options.signatureTimeWindow ?? (benchmarkMode ? false : { hours: 1 });
7239
+ if (options.maxHttpSignatures !== void 0) validateMaxSignatures(options.maxHttpSignatures, "maxHttpSignatures");
7206
7240
  if (benchmarkMode && options.meterProvider != null) throw new TypeError("benchmarkMode requires Fedify to own the meterProvider; OpenTelemetry metric readers cannot be added after a MeterProvider is constructed.");
7207
7241
  if (benchmarkMode) {
7208
7242
  const relaxations = getBenchmarkRelaxations(allowPrivateAddress, signatureTimeWindow);
@@ -7295,13 +7329,15 @@ var FederationImpl = class extends FederationBuilderImpl {
7295
7329
  }
7296
7330
  const { userAgent } = options;
7297
7331
  this.allowPrivateAddress = allowPrivateAddress;
7332
+ const documentLoaderTimeout = resolveDocumentLoaderTimeout(options.documentLoaderTimeout == null ? options.documentLoaderTimeout : Temporal.Duration.from(options.documentLoaderTimeout).total("millisecond"));
7298
7333
  const userDocumentLoaderFactory = options.documentLoaderFactory;
7299
7334
  const userContextLoaderFactory = options.contextLoaderFactory;
7300
7335
  const userAuthFactory = options.authenticatedDocumentLoaderFactory;
7301
7336
  const builtinDocumentLoaderFactory = (opts) => kvCache({
7302
7337
  loader: getDocumentLoader({
7303
7338
  allowPrivateAddress: opts?.allowPrivateAddress ?? allowPrivateAddress,
7304
- userAgent: opts?.userAgent ?? userAgent
7339
+ userAgent: opts?.userAgent ?? userAgent,
7340
+ timeout: opts?.timeout !== void 0 ? opts.timeout : documentLoaderTimeout
7305
7341
  }),
7306
7342
  kv: options.kv,
7307
7343
  prefix: this.kvPrefixes.remoteDocument,
@@ -7311,7 +7347,8 @@ var FederationImpl = class extends FederationBuilderImpl {
7311
7347
  const builtinContextLoaderFactory = (opts) => kvCache({
7312
7348
  loader: getDocumentLoader({
7313
7349
  allowPrivateAddress: opts?.allowPrivateAddress ?? allowPrivateAddress,
7314
- userAgent: opts?.userAgent ?? userAgent
7350
+ userAgent: opts?.userAgent ?? userAgent,
7351
+ timeout: opts?.timeout !== void 0 ? opts.timeout : documentLoaderTimeout
7315
7352
  }),
7316
7353
  kv: options.kv,
7317
7354
  prefix: this.kvPrefixes.remoteDocument,
@@ -7332,6 +7369,7 @@ var FederationImpl = class extends FederationBuilderImpl {
7332
7369
  this.authenticatedDocumentLoaderFactory = (identity, factoryOpts) => instrumentDocumentLoader(userAuthFactory != null ? userAuthFactory(identity, factoryOpts) : getAuthenticatedDocumentLoader(identity, {
7333
7370
  allowPrivateAddress: factoryOpts?.allowPrivateAddress ?? allowPrivateAddress,
7334
7371
  userAgent: factoryOpts?.userAgent ?? userAgent,
7372
+ timeout: factoryOpts?.timeout !== void 0 ? factoryOpts.timeout : documentLoaderTimeout,
7335
7373
  specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec, options.firstKnock, { specTtl: this.httpMessageSignaturesSpecTtl }),
7336
7374
  tracerProvider: this.tracerProvider
7337
7375
  }), {
@@ -7343,6 +7381,7 @@ var FederationImpl = class extends FederationBuilderImpl {
7343
7381
  this.onOutboxError = options.onOutboxError;
7344
7382
  this.permanentFailureStatusCodes = options.permanentFailureStatusCodes ?? [404, 410];
7345
7383
  this.signatureTimeWindow = signatureTimeWindow;
7384
+ this.maxHttpSignatures = options.maxHttpSignatures ?? 3;
7346
7385
  this.skipSignatureVerification = options.skipSignatureVerification ?? false;
7347
7386
  this.inboxChallengePolicy = options.inboxChallengePolicy;
7348
7387
  this.outboxRetryPolicy = options.outboxRetryPolicy ?? createExponentialBackoffPolicy();
@@ -8968,6 +9007,7 @@ var FederationImpl = class extends FederationBuilderImpl {
8968
9007
  unverifiedActivityHandler: this.unverifiedActivityHandler,
8969
9008
  onNotFound,
8970
9009
  signatureTimeWindow: this.signatureTimeWindow,
9010
+ maxHttpSignatures: this.maxHttpSignatures,
8971
9011
  skipSignatureVerification: this.skipSignatureVerification,
8972
9012
  inboxChallengePolicy: this.inboxChallengePolicy,
8973
9013
  meterProvider: this.meterProvider,
@@ -9956,7 +9996,7 @@ var ContextImpl = class ContextImpl {
9956
9996
  activity: await fetched.toJsonLd({ contextLoader })
9957
9997
  });
9958
9998
  return false;
9959
- } else if (fetched.id?.href !== activity.id.href) {
9999
+ } else if (fetched.id == null || !isSameObjectId(fetched.id, activity.id)) {
9960
10000
  logger.debug("Fetched activity object has a different ID; failed to verify.", {
9961
10001
  recipient,
9962
10002
  activity: await fetched.toJsonLd({ contextLoader })
@@ -9969,8 +10009,8 @@ var ContextImpl = class ContextImpl {
9969
10009
  });
9970
10010
  return false;
9971
10011
  }
9972
- const activityId = fetched.id;
9973
- if (!fetched.actorIds.every((actor) => actor.origin === activityId.origin)) {
10012
+ const activityOrigin = getAuthenticationOrigin(fetched.id);
10013
+ if (activityOrigin == null || !fetched.actorIds.every((actor) => getAuthenticationOrigin(actor) === activityOrigin)) {
9974
10014
  logger.debug("Fetched activity object has actors from different origins; unable to verify.", {
9975
10015
  recipient,
9976
10016
  activity: await fetched.toJsonLd({ contextLoader })
@@ -10106,6 +10146,7 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
10106
10146
  contextLoader: options.contextLoader ?? this.contextLoader,
10107
10147
  documentLoader: options.documentLoader ?? this.documentLoader,
10108
10148
  timeWindow: this.federation.signatureTimeWindow,
10149
+ maxSignatures: this.federation.maxHttpSignatures,
10109
10150
  meterProvider: this.meterProvider,
10110
10151
  tracerProvider: options.tracerProvider ?? this.tracerProvider
10111
10152
  });
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { bt as ActorDispatcher, f as RequestContext, qt as WebFingerLinksDispatcher, xt as ActorHandleMapper, yt as ActorAliasMapper } from "./context-BykNUf04.js";
2
+ import { bt as ActorDispatcher, f as RequestContext, qt as WebFingerLinksDispatcher, xt as ActorHandleMapper, yt as ActorAliasMapper } from "./context-9T--NSo4.js";
3
3
  import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
4
4
  import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
5
5
 
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as HttpMessageSignaturesSpecDeterminer } from "./http-Cok5-vIC.js";
2
+ import { n as HttpMessageSignaturesSpecDeterminer } from "./http-DGx0KOws.js";
3
3
  import { n as KvStore, t as KvKey } from "./kv-BhNbN8Ed.js";
4
4
  import { t as DocumentFetchKind } from "./metrics-DoRtI0qU.js";
5
5
  import { MeterProvider, TracerProvider } from "@opentelemetry/api";
@@ -33,11 +33,14 @@ interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOpt
33
33
  * the fetched documents.
34
34
  * At most 20 HTTP redirects and alternate document links are followed in total
35
35
  * per call. Revisiting a URL within that chain throws a {@link FetchError}.
36
+ * Each call, including its double-knocking retries, times out after
37
+ * 10 seconds by default; see {@link DocumentLoaderFactoryOptions.timeout}.
36
38
  * @param identity The identity to get the document loader for.
37
39
  * The actor's key pair.
38
40
  * @param options The options for the document loader.
39
41
  * @returns The authenticated document loader.
40
42
  * @throws {TypeError} If the key is invalid or unsupported.
43
+ * @throws {RangeError} If the `timeout` option is invalid.
41
44
  * @since 0.4.0
42
45
  */
43
46
  declare function getAuthenticatedDocumentLoader(identity: {
@@ -48,6 +51,7 @@ declare function getAuthenticatedDocumentLoader(identity: {
48
51
  maxRedirection,
49
52
  userAgent,
50
53
  specDeterminer,
54
+ timeout,
51
55
  tracerProvider
52
56
  }?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
53
57
  //#endregion
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { S as KeyCache } from "./http-DC1cqAQ2.cjs";
2
+ import { S as KeyCache } from "./http-DGx0KOws.js";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
- import { DocumentLoader, PortableObjectVerifier, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
5
4
  import { MeterProvider, TracerProvider } from "@opentelemetry/api";
5
+ import { DocumentLoader, PortableObjectVerifier, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
6
6
 
7
7
  //#region src/sig/ld.d.ts
8
8
  /**
@@ -305,6 +305,14 @@ type VerifyPortableObjectProofFailureReason = {
305
305
  readonly objectType: "verificationMethod" | "publicKey" | "link";
306
306
  } | {
307
307
  /** A portable actor, activity, or object has no proof. */readonly type: "missingProof";
308
+ } | {
309
+ /**
310
+ * A portable actor's `gateways` is missing or empty, or has an item that
311
+ * is not an HTTP(S) URI with an empty path, query, and fragment.
312
+ * The document is rejected before its proofs are verified, so this
313
+ * reason does not mean that the proofs are valid.
314
+ */
315
+ readonly type: "invalidGateways";
308
316
  } | {
309
317
  /** The proof is malformed, unsupported, or cryptographically invalid. */readonly type: "invalidProof"; /** The zero-based index of the invalid proof. */
310
318
  readonly proofIndex: number;
@@ -358,7 +366,10 @@ declare function verifyProof(jsonLd: unknown, proof: DataIntegrityProof, options
358
366
  *
359
367
  * Every proof must use a DID URL whose DID matches the portable object's
360
368
  * authority, i.e., the DID of its canonical portable ID, and every proof must
361
- * pass {@link verifyProof}. The proofs are verified over the document as
369
+ * pass {@link verifyProof}. A portable actor must also have a non-empty
370
+ * `gateways` list whose items are all HTTP(S) URIs with an empty path, query,
371
+ * and fragment; otherwise, it is rejected with the `invalidGateways` reason
372
+ * before its proofs are verified. The proofs are verified over the document as
362
373
  * given; a compatible identifier is never rewritten into a portable ID.
363
374
  *
364
375
  * [FEP-ef61]: https://w3id.org/fep/ef61
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { bt as ActorDispatcher, f as RequestContext, qt as WebFingerLinksDispatcher, xt as ActorHandleMapper, yt as ActorAliasMapper } from "./context-L0Fnib9j.cjs";
2
+ import { bt as ActorDispatcher, f as RequestContext, qt as WebFingerLinksDispatcher, xt as ActorHandleMapper, yt as ActorAliasMapper } from "./context-CDcAgm4l.cjs";
3
3
  import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
4
4
  import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
5
5
 
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { S as KeyCache } from "./http-Cok5-vIC.js";
2
+ import { S as KeyCache } from "./http-BrwKINQn.cjs";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
- import { MeterProvider, TracerProvider } from "@opentelemetry/api";
5
4
  import { DocumentLoader, PortableObjectVerifier, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
5
+ import { MeterProvider, TracerProvider } from "@opentelemetry/api";
6
6
 
7
7
  //#region src/sig/ld.d.ts
8
8
  /**
@@ -305,6 +305,14 @@ type VerifyPortableObjectProofFailureReason = {
305
305
  readonly objectType: "verificationMethod" | "publicKey" | "link";
306
306
  } | {
307
307
  /** A portable actor, activity, or object has no proof. */readonly type: "missingProof";
308
+ } | {
309
+ /**
310
+ * A portable actor's `gateways` is missing or empty, or has an item that
311
+ * is not an HTTP(S) URI with an empty path, query, and fragment.
312
+ * The document is rejected before its proofs are verified, so this
313
+ * reason does not mean that the proofs are valid.
314
+ */
315
+ readonly type: "invalidGateways";
308
316
  } | {
309
317
  /** The proof is malformed, unsupported, or cryptographically invalid. */readonly type: "invalidProof"; /** The zero-based index of the invalid proof. */
310
318
  readonly proofIndex: number;
@@ -358,7 +366,10 @@ declare function verifyProof(jsonLd: unknown, proof: DataIntegrityProof, options
358
366
  *
359
367
  * Every proof must use a DID URL whose DID matches the portable object's
360
368
  * authority, i.e., the DID of its canonical portable ID, and every proof must
361
- * pass {@link verifyProof}. The proofs are verified over the document as
369
+ * pass {@link verifyProof}. A portable actor must also have a non-empty
370
+ * `gateways` list whose items are all HTTP(S) URIs with an empty path, query,
371
+ * and fragment; otherwise, it is rejected with the `invalidGateways` reason
372
+ * before its proofs are verified. The proofs are verified over the document as
362
373
  * given; a compatible identifier is never rewritten into a portable ID.
363
374
  *
364
375
  * [FEP-ef61]: https://w3id.org/fep/ef61
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as HttpMessageSignaturesSpecDeterminer } from "./http-DC1cqAQ2.cjs";
2
+ import { n as HttpMessageSignaturesSpecDeterminer } from "./http-BrwKINQn.cjs";
3
3
  import { n as KvStore, t as KvKey } from "./kv-BhNbN8Ed.cjs";
4
4
  import { t as DocumentFetchKind } from "./metrics-DVKYY6K1.cjs";
5
5
  import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
@@ -33,11 +33,14 @@ interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOpt
33
33
  * the fetched documents.
34
34
  * At most 20 HTTP redirects and alternate document links are followed in total
35
35
  * per call. Revisiting a URL within that chain throws a {@link FetchError}.
36
+ * Each call, including its double-knocking retries, times out after
37
+ * 10 seconds by default; see {@link DocumentLoaderFactoryOptions.timeout}.
36
38
  * @param identity The identity to get the document loader for.
37
39
  * The actor's key pair.
38
40
  * @param options The options for the document loader.
39
41
  * @returns The authenticated document loader.
40
42
  * @throws {TypeError} If the key is invalid or unsupported.
43
+ * @throws {RangeError} If the `timeout` option is invalid.
41
44
  * @since 0.4.0
42
45
  */
43
46
  declare function getAuthenticatedDocumentLoader(identity: {
@@ -48,6 +51,7 @@ declare function getAuthenticatedDocumentLoader(identity: {
48
51
  maxRedirection,
49
52
  userAgent,
50
53
  specDeterminer,
54
+ timeout,
51
55
  tracerProvider
52
56
  }?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
53
57
  //#endregion
package/dist/mod.cjs CHANGED
@@ -3,11 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("./rolldown-runtime-Dmm3t92W.cjs");
4
4
  const require_transformers = require("./transformers-BalCrSsr.cjs");
5
5
  require("./compat/mod.cjs");
6
- const require_http = require("./http-5CJBdU8n.cjs");
7
- const require_federation = require("./federation-DrNgkLfJ.cjs");
6
+ const require_http = require("./http-BEivI0TS.cjs");
7
+ const require_federation = require("./federation-BsGo0EH2.cjs");
8
8
  const require_types = require("./types-poIao40f.cjs");
9
- const require_portable_collection = require("./portable-collection-CnlCamup.cjs");
10
- const require_kv_cache = require("./kv-cache-YRi_g8GB.cjs");
9
+ const require_portable_collection = require("./portable-collection-BFSShzwh.cjs");
10
+ const require_kv_cache = require("./kv-cache-1hafSoqH.cjs");
11
11
  require("./nodeinfo/mod.cjs");
12
12
  require("./runtime/mod.cjs");
13
13
  require("./sig/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-D-XP_Ccb.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-DC1cqAQ2.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-BrwKINQn.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BF0L9cMt.cjs";
5
- import { $ as respondWithObjectIfAcceptable, $t as ActivityTransformer, A as InboxListenerSetters, At as HashlinkMediaDispatcher, B as Message, Bt as OutboxListenerErrorHandler, C as FederationBuilder, Ct as AuthorizePredicate, D as IdempotencyKeyCallback, Dt as CustomCollectionCounter, E as FederationStartQueueOptions, Et as CollectionDispatcher, F as Rfc6570Expression, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as FederationKvPrefixes, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationOrigin, Lt as ObjectDispatcher, M as ObjectCallbackSetters, Mt as InboxErrorHandler, N as OutboxListenerSetters, Nt as InboxListener, O as IdempotencyStrategy, Ot as CustomCollectionCursor, P as PortableInboxForwardingOptions, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as digest, R as FederationQueueOptions, Rt as OutboxErrorHandler, S as FederationBenchmarkOptions, St as ActorKeyPairsDispatcher, T as FederationOptions, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as PageItems, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as buildCollectionSynchronizationHeader, _ as CollectionCallbackSetters, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, at as MessageQueueListenOptions, b as Federatable, bt as ActorDispatcher, c as OutboxContext, ct as CircuitBreakerActivityDrop, d as PortableRequest, dt as CircuitBreakerFailurePolicy, et as InProcessMessageQueue, f as RequestContext, ft as CircuitBreakerKvState, g as ActorCallbackSetters, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptionsForCollection, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as MediaUploaderSetters, jt as HashlinkMediaRequest, k as InboxChallengePolicy, kt as CustomCollectionDispatcher, l as ParseUriOptions, lt as CircuitBreakerBeforeSendDecision, m as SendActivityOptions, mt as CircuitBreakerState, n as Context, nt as MessageQueue, o as GetSignedKeyOptions, ot as ParallelMessageQueue, p as RouteActivityOptions, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rt as MessageQueueDepth, s as InboxContext, st as CircuitBreaker, t as ActorKeyPair, tt as InProcessMessageQueueOptions, u as ParseUriResult, ut as CircuitBreakerCreateOptions, v as ConstructorWithTypeId, vt as parseCircuitBreakerKvState, w as FederationFetchOptions, wt as CollectionCounter, x as Federation, xt as ActorHandleMapper, y as CustomCollectionCallbackSetters, yt as ActorAliasMapper, z as createFederation, zt as OutboxListener } from "./context-L0Fnib9j.cjs";
5
+ import { $ as respondWithObjectIfAcceptable, $t as ActivityTransformer, A as InboxListenerSetters, At as HashlinkMediaDispatcher, B as Message, Bt as OutboxListenerErrorHandler, C as FederationBuilder, Ct as AuthorizePredicate, D as IdempotencyKeyCallback, Dt as CustomCollectionCounter, E as FederationStartQueueOptions, Et as CollectionDispatcher, F as Rfc6570Expression, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as FederationKvPrefixes, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationOrigin, Lt as ObjectDispatcher, M as ObjectCallbackSetters, Mt as InboxErrorHandler, N as OutboxListenerSetters, Nt as InboxListener, O as IdempotencyStrategy, Ot as CustomCollectionCursor, P as PortableInboxForwardingOptions, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as digest, R as FederationQueueOptions, Rt as OutboxErrorHandler, S as FederationBenchmarkOptions, St as ActorKeyPairsDispatcher, T as FederationOptions, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as PageItems, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as buildCollectionSynchronizationHeader, _ as CollectionCallbackSetters, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, at as MessageQueueListenOptions, b as Federatable, bt as ActorDispatcher, c as OutboxContext, ct as CircuitBreakerActivityDrop, d as PortableRequest, dt as CircuitBreakerFailurePolicy, et as InProcessMessageQueue, f as RequestContext, ft as CircuitBreakerKvState, g as ActorCallbackSetters, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptionsForCollection, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as MediaUploaderSetters, jt as HashlinkMediaRequest, k as InboxChallengePolicy, kt as CustomCollectionDispatcher, l as ParseUriOptions, lt as CircuitBreakerBeforeSendDecision, m as SendActivityOptions, mt as CircuitBreakerState, n as Context, nt as MessageQueue, o as GetSignedKeyOptions, ot as ParallelMessageQueue, p as RouteActivityOptions, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rt as MessageQueueDepth, s as InboxContext, st as CircuitBreaker, t as ActorKeyPair, tt as InProcessMessageQueueOptions, u as ParseUriResult, ut as CircuitBreakerCreateOptions, v as ConstructorWithTypeId, vt as parseCircuitBreakerKvState, w as FederationFetchOptions, wt as CollectionCounter, x as Federation, xt as ActorHandleMapper, y as CustomCollectionCallbackSetters, yt as ActorAliasMapper, z as createFederation, zt as OutboxListener } from "./context-CDcAgm4l.cjs";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.cjs";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
8
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-BLOXGs6m.cjs";
9
- import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-CPPqkyV_.cjs";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BA_F2x53.cjs";
8
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-D58KCqUg.cjs";
9
+ import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-DoTWIc7F.cjs";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-Dp3Ij7sw.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-D-XP_Ccb.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-Cok5-vIC.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-DGx0KOws.js";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BSzr5-I8.js";
5
- import { $ as respondWithObjectIfAcceptable, $t as ActivityTransformer, A as InboxListenerSetters, At as HashlinkMediaDispatcher, B as Message, Bt as OutboxListenerErrorHandler, C as FederationBuilder, Ct as AuthorizePredicate, D as IdempotencyKeyCallback, Dt as CustomCollectionCounter, E as FederationStartQueueOptions, Et as CollectionDispatcher, F as Rfc6570Expression, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as FederationKvPrefixes, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationOrigin, Lt as ObjectDispatcher, M as ObjectCallbackSetters, Mt as InboxErrorHandler, N as OutboxListenerSetters, Nt as InboxListener, O as IdempotencyStrategy, Ot as CustomCollectionCursor, P as PortableInboxForwardingOptions, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as digest, R as FederationQueueOptions, Rt as OutboxErrorHandler, S as FederationBenchmarkOptions, St as ActorKeyPairsDispatcher, T as FederationOptions, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as PageItems, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as buildCollectionSynchronizationHeader, _ as CollectionCallbackSetters, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, at as MessageQueueListenOptions, b as Federatable, bt as ActorDispatcher, c as OutboxContext, ct as CircuitBreakerActivityDrop, d as PortableRequest, dt as CircuitBreakerFailurePolicy, et as InProcessMessageQueue, f as RequestContext, ft as CircuitBreakerKvState, g as ActorCallbackSetters, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptionsForCollection, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as MediaUploaderSetters, jt as HashlinkMediaRequest, k as InboxChallengePolicy, kt as CustomCollectionDispatcher, l as ParseUriOptions, lt as CircuitBreakerBeforeSendDecision, m as SendActivityOptions, mt as CircuitBreakerState, n as Context, nt as MessageQueue, o as GetSignedKeyOptions, ot as ParallelMessageQueue, p as RouteActivityOptions, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rt as MessageQueueDepth, s as InboxContext, st as CircuitBreaker, t as ActorKeyPair, tt as InProcessMessageQueueOptions, u as ParseUriResult, ut as CircuitBreakerCreateOptions, v as ConstructorWithTypeId, vt as parseCircuitBreakerKvState, w as FederationFetchOptions, wt as CollectionCounter, x as Federation, xt as ActorHandleMapper, y as CustomCollectionCallbackSetters, yt as ActorAliasMapper, z as createFederation, zt as OutboxListener } from "./context-BykNUf04.js";
5
+ import { $ as respondWithObjectIfAcceptable, $t as ActivityTransformer, A as InboxListenerSetters, At as HashlinkMediaDispatcher, B as Message, Bt as OutboxListenerErrorHandler, C as FederationBuilder, Ct as AuthorizePredicate, D as IdempotencyKeyCallback, Dt as CustomCollectionCounter, E as FederationStartQueueOptions, Et as CollectionDispatcher, F as Rfc6570Expression, Ft as NodeInfoDispatcher, G as TaskHandler, Gt as UnverifiedActivityHandler, H as TaskDefinition, Ht as PortableActorIdMapper, I as FederationKvPrefixes, It as ObjectAuthorizePredicate, J as RetryContext, Jt as SendActivityError, K as TaskRegistry, Kt as UnverifiedActivityReason, L as FederationOrigin, Lt as ObjectDispatcher, M as ObjectCallbackSetters, Mt as InboxErrorHandler, N as OutboxListenerSetters, Nt as InboxListener, O as IdempotencyStrategy, Ot as CustomCollectionCursor, P as PortableInboxForwardingOptions, Pt as MediaUploaderCallback, Q as respondWithObject, Qt as digest, R as FederationQueueOptions, Rt as OutboxErrorHandler, S as FederationBenchmarkOptions, St as ActorKeyPairsDispatcher, T as FederationOptions, Tt as CollectionCursor, U as TaskDefinitionOptions, Ut as PortableCollectionOwnerMapper, V as createFederationBuilder, Vt as OutboxPermanentFailureHandler, W as TaskEnqueueOptions, Wt as SharedInboxKeyDispatcher, X as createExponentialBackoffPolicy, Xt as PageItems, Y as RetryPolicy, Yt as SenderKeyPair, Z as RespondWithObjectOptions, Zt as buildCollectionSynchronizationHeader, _ as CollectionCallbackSetters, _t as normalizeCircuitBreakerOptions, a as GetObjectOptions, at as MessageQueueListenOptions, b as Federatable, bt as ActorDispatcher, c as OutboxContext, ct as CircuitBreakerActivityDrop, d as PortableRequest, dt as CircuitBreakerFailurePolicy, et as InProcessMessageQueue, f as RequestContext, ft as CircuitBreakerKvState, g as ActorCallbackSetters, gt as NormalizedCircuitBreakerOptions, h as SendActivityOptionsForCollection, ht as CircuitBreakerStateChange, i as GetActorOptions, it as MessageQueueEnqueueOptions, j as MediaUploaderSetters, jt as HashlinkMediaRequest, k as InboxChallengePolicy, kt as CustomCollectionDispatcher, l as ParseUriOptions, lt as CircuitBreakerBeforeSendDecision, m as SendActivityOptions, mt as CircuitBreakerState, n as Context, nt as MessageQueue, o as GetSignedKeyOptions, ot as ParallelMessageQueue, p as RouteActivityOptions, pt as CircuitBreakerOptions, q as CreateExponentialBackoffPolicyOptions, qt as WebFingerLinksDispatcher, r as ForwardActivityOptions, rt as MessageQueueDepth, s as InboxContext, st as CircuitBreaker, t as ActorKeyPair, tt as InProcessMessageQueueOptions, u as ParseUriResult, ut as CircuitBreakerCreateOptions, v as ConstructorWithTypeId, vt as parseCircuitBreakerKvState, w as FederationFetchOptions, wt as CollectionCounter, x as Federation, xt as ActorHandleMapper, y as CustomCollectionCallbackSetters, yt as ActorAliasMapper, z as createFederation, zt as OutboxListener } from "./context-9T--NSo4.js";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.js";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
8
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-DK0y9fd-.js";
9
- import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod--jv6vyrP.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-B5z_q9TH.js";
8
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-B3OBLj5g.js";
9
+ import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-Cy9VNHVw.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-C5Mwx5ty.js";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts