@fedify/fedify 2.4.0-dev.2084 → 2.4.0-dev.2099

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 (84) hide show
  1. package/dist/{builder-BGlpUocK.mjs → builder-Bno54o_-.mjs} +34 -3
  2. package/dist/compat/mod.d.cts +1 -1
  3. package/dist/compat/mod.d.ts +1 -1
  4. package/dist/compat/transformers.test.mjs +1 -1
  5. package/dist/{compound-proof-B6Aj2kGY.mjs → compound-proof-X3SxXVbc.mjs} +191 -13
  6. package/dist/{context-CZjZYXFC.d.cts → context-C43spTGI.d.cts} +5 -2
  7. package/dist/{context-BSywYspi.d.ts → context-MORIQJIh.d.ts} +5 -2
  8. package/dist/{deno-Dn-py9Zy.mjs → deno-dxdvl2XZ.mjs} +1 -1
  9. package/dist/{docloader-BUq5bYJr.mjs → docloader-eBxQDsk9.mjs} +2 -2
  10. package/dist/federation/builder.test.mjs +1 -1
  11. package/dist/federation/compound-fanout.test.mjs +3 -3
  12. package/dist/federation/handler-compound-proof.test.mjs +3 -3
  13. package/dist/federation/handler.test.mjs +5 -5
  14. package/dist/federation/hashlink-media.test.mjs +2 -2
  15. package/dist/federation/idempotency.test.mjs +2 -2
  16. package/dist/federation/metrics.test.mjs +1 -1
  17. package/dist/federation/middleware.test.mjs +7 -7
  18. package/dist/federation/mod.cjs +1 -1
  19. package/dist/federation/mod.d.cts +2 -2
  20. package/dist/federation/mod.d.ts +2 -2
  21. package/dist/federation/mod.js +1 -1
  22. package/dist/federation/outgoing-proof.test.mjs +254 -5
  23. package/dist/federation/portable-gateway-keys.test.mjs +72 -11
  24. package/dist/federation/portable-inbox.test.mjs +487 -10
  25. package/dist/federation/portable.test.mjs +182 -4
  26. package/dist/federation/send.test.mjs +3 -3
  27. package/dist/federation/tasks/enqueue.test.mjs +1 -1
  28. package/dist/federation/tasks/tasks.test.mjs +2 -2
  29. package/dist/federation/temporal.test.mjs +1 -1
  30. package/dist/federation/webfinger.test.mjs +89 -1
  31. package/dist/{federation-BLGx8JUH.cjs → federation-C4Ef3JKa.cjs} +1487 -1070
  32. package/dist/{http-B5q1CHtL.cjs → http-C8cZTE3Y.cjs} +1224 -985
  33. package/dist/{http-4PCCvhsU.js → http-D-rbr_Sy.js} +1663 -1460
  34. package/dist/{http-B0VRNipE.mjs → http-DsgawTd8.mjs} +82 -7
  35. package/dist/{key-BJrp524f.mjs → key-DYfmjnmp.mjs} +39 -99
  36. package/dist/{kv-cache-1KUmAPH7.js → kv-cache-DIxwMeNi.js} +1 -1
  37. package/dist/{kv-cache-Dhhhrryv.cjs → kv-cache-Dvd-Q-E2.cjs} +1 -1
  38. package/dist/{kv-cache-C4C3LyYW.mjs → kv-cache-EvOgrFsS.mjs} +1 -1
  39. package/dist/{ld-BmFz5NLA.mjs → ld-B00wWHzc.mjs} +3 -3
  40. package/dist/{metrics-Beod6tzO.mjs → metrics-BP3vdBpb.mjs} +1 -1
  41. package/dist/{middleware-BKeQYPm0.mjs → middleware-Br1_d-Ga.mjs} +606 -389
  42. package/dist/{middleware-D_9pNYe9.js → middleware-CcXMe400.js} +1602 -1185
  43. package/dist/{middleware-B7CNsyqt.mjs → middleware-CeBVBa61.mjs} +1 -1
  44. package/dist/{mod-B2h2KY0q.d.ts → mod-BL5BQHCq.d.ts} +1 -1
  45. package/dist/{mod-HDSvS-ww.d.cts → mod-C8LieBzF.d.cts} +16 -3
  46. package/dist/{mod-C9WSpZWm.d.ts → mod-Coacostr.d.ts} +16 -3
  47. package/dist/{mod-JzkaEXsi.d.cts → mod-DMI4DbOo.d.cts} +1 -1
  48. package/dist/mod.cjs +5 -5
  49. package/dist/mod.d.cts +3 -3
  50. package/dist/mod.d.ts +3 -3
  51. package/dist/mod.js +5 -5
  52. package/dist/nodeinfo/handler.test.mjs +1 -1
  53. package/dist/{owner-CsKVgMzk.mjs → owner-BJPDRDRq.mjs} +5 -4
  54. package/dist/{owner-BQFZtFV4.cjs → owner-DSzH7wro.cjs} +2 -2
  55. package/dist/{owner-_pbbgLJK.js → owner-U12fDpQW.js} +2 -2
  56. package/dist/{portable-key-B4R-CiIV.mjs → portable-key-D0mWbV9G.mjs} +60 -41
  57. package/dist/portable-key-id-Bva5iT3W.mjs +136 -0
  58. package/dist/{proof-ozG4HfcQ.mjs → proof-ChjBwnep.mjs} +59 -18
  59. package/dist/{send-ClPt8nYu.mjs → send-yFX0E-ye.mjs} +3 -3
  60. package/dist/sig/compound-proof-discovery.test.mjs +1 -1
  61. package/dist/sig/compound-proof-producer.test.mjs +1 -1
  62. package/dist/sig/compound-proof-verification.test.mjs +160 -3
  63. package/dist/sig/compound-proof.test.mjs +2 -2
  64. package/dist/sig/http.test.mjs +72 -2
  65. package/dist/sig/key.test.mjs +1 -1
  66. package/dist/sig/ld.test.mjs +2 -2
  67. package/dist/sig/mod.cjs +3 -3
  68. package/dist/sig/mod.d.cts +1 -1
  69. package/dist/sig/mod.d.ts +1 -1
  70. package/dist/sig/mod.js +3 -3
  71. package/dist/sig/owner.test.mjs +1 -1
  72. package/dist/sig/portable-collection.test.mjs +69 -5
  73. package/dist/sig/portable-key.test.mjs +176 -10
  74. package/dist/sig/proof.test.mjs +107 -4
  75. package/dist/{sig-k3C8sF7g.cjs → sig-B689Nj7y.cjs} +19 -3
  76. package/dist/{sig-DhdomAN0.js → sig-C85KqAcx.js} +19 -3
  77. package/dist/{temporal-Ba0EAZAI.mjs → temporal-Dl9x-Qw4.mjs} +1 -1
  78. package/dist/testing/kv.test.mjs +1 -1
  79. package/dist/testing/mod.d.mts +5 -2
  80. package/dist/utils/docloader.test.mjs +2 -2
  81. package/dist/utils/kv-cache.test.mjs +1 -1
  82. package/dist/utils/mod.cjs +1 -1
  83. package/dist/utils/mod.js +1 -1
  84. package/package.json +7 -7
@@ -1,12 +1,15 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-Dn-py9Zy.mjs";
4
+ import { n as version, t as name } from "./deno-dxdvl2XZ.mjs";
5
+ import { s as isPortableId } from "./portable-key-id-Bva5iT3W.mjs";
5
6
  import { t as ActivityListenerSet } from "./activity-listener-C-BSbKI7.mjs";
6
7
  import { getLogger } from "@logtape/logtape";
7
8
  import { Router, RouterError, assertPath } from "@fedify/uri-template";
8
9
  import { Tombstone, getTypeId } from "@fedify/vocab";
9
10
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
11
+ import { fromCompatibleEf61Id, isGatewayUrl } from "@fedify/vocab-runtime";
12
+ import { isCompatibleEf61Iri } from "@fedify/vocab-runtime/internal/portable-dereference";
10
13
  //#region src/federation/builder.ts
11
14
  const ACTOR_ALIAS_PREFIX = "actorAlias:";
12
15
  /**
@@ -86,7 +89,7 @@ var FederationBuilderImpl = class {
86
89
  * specified.
87
90
  */
88
91
  async build(options) {
89
- const { FederationImpl } = await import("./middleware-B7CNsyqt.mjs");
92
+ const { FederationImpl } = await import("./middleware-CeBVBa61.mjs");
90
93
  const f = new FederationImpl(options);
91
94
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
92
95
  f.router = this.router.clone();
@@ -158,10 +161,11 @@ var FederationBuilderImpl = class {
158
161
  "federation",
159
162
  "actor"
160
163
  ]);
161
- const portable = actor.id?.protocol === "ap:" || actor.id?.protocol === "ap+ef61:";
164
+ const portable = actor.id != null && isPortableId(actor.id);
162
165
  if (actor.id == null) logger.warn("Actor dispatcher returned an actor without an id property. Set the property with Context.getActorUri(identifier).");
163
166
  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).");
164
167
  if (actor instanceof Tombstone) return actor;
168
+ if (actor.id != null && isCompatibleEf61Iri(actor.id)) warnCompatibleActorId(actor.id, actor.gateway);
165
169
  if (this.followingCallbacks != null && this.followingCallbacks.dispatcher != null) {
166
170
  if (actor.followingId == null) logger.warn("You configured a following collection dispatcher, but the actor does not have a following property. Set the property with Context.getFollowingUri(identifier).");
167
171
  else if (!portable && actor.followingId.href != context.getFollowingUri(identifier).href) logger.warn("You configured a following collection dispatcher, but the actor's following property does not match the following collection URI. Set the property with Context.getFollowingUri(identifier).");
@@ -686,5 +690,32 @@ var FederationBuilderImpl = class {
686
690
  function createFederationBuilder() {
687
691
  return new FederationBuilderImpl();
688
692
  }
693
+ /**
694
+ * Warns about an FEP-ef61 portable actor identified by a compatible identifier
695
+ * that is malformed, or is not on the actor's first gateway, where FEP-ef61
696
+ * requires publishers to construct compatible identifiers.
697
+ */
698
+ function warnCompatibleActorId(actorId, gateway) {
699
+ const logger = getLogger([
700
+ "fedify",
701
+ "federation",
702
+ "actor"
703
+ ]);
704
+ try {
705
+ fromCompatibleEf61Id(actorId);
706
+ } catch (error) {
707
+ if (!(error instanceof TypeError)) throw error;
708
+ logger.warn("Actor dispatcher returned an actor whose id property, {actorId}, is a malformed FEP-ef61 compatible identifier: {error}", {
709
+ actorId: actorId.href,
710
+ error
711
+ });
712
+ return;
713
+ }
714
+ 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 });
715
+ 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.", {
716
+ actorId: actorId.href,
717
+ gateway: gateway.origin
718
+ });
719
+ }
689
720
  //#endregion
690
721
  export { FederationBuilderImpl as n, createFederationBuilder as r, ACTOR_ALIAS_PREFIX as t };
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Xt as ActivityTransformer, n as Context } from "../context-CZjZYXFC.cjs";
2
+ import { Xt as ActivityTransformer, n as Context } from "../context-C43spTGI.cjs";
3
3
  import { Activity } from "@fedify/vocab";
4
4
 
5
5
  //#region src/compat/transformers.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Xt as ActivityTransformer, n as Context } from "../context-BSywYspi.js";
2
+ import { Xt as ActivityTransformer, n as Context } from "../context-MORIQJIh.js";
3
3
  import { Activity } from "@fedify/vocab";
4
4
 
5
5
  //#region src/compat/transformers.d.ts
@@ -5,7 +5,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
6
6
  import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
7
7
  import { t as assert } from "../assert-D1Eafmd_.mjs";
8
- import { C as actorDehydrator, n as FederationImpl, w as autoIdAssigner } from "../middleware-BKeQYPm0.mjs";
8
+ import { E as autoIdAssigner, T as actorDehydrator, n as FederationImpl } from "../middleware-Br1_d-Ga.mjs";
9
9
  import { Follow, Person } from "@fedify/vocab";
10
10
  import { test } from "@fedify/fixture";
11
11
  //#region src/compat/transformers.test.ts
@@ -1,10 +1,22 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { i as verifyMapLocalProof, s as verifyPortableObjectProofPolicy } from "./proof-ozG4HfcQ.mjs";
4
+ import { s as isPortableId, t as getCanonicalPortableId } from "./portable-key-id-Bva5iT3W.mjs";
5
+ import { n as preloadedOnlyDocumentLoader } from "./public-audience--klBIOk1.mjs";
6
+ import { c as getNormalizationContextLoader } from "./ld-B00wWHzc.mjs";
7
+ import { a as verifyMapLocalProof, c as verifyPortableObjectProofPolicy } from "./proof-ChjBwnep.mjs";
8
+ import { fromCompatibleEf61Id, parseIri } from "@fedify/vocab-runtime";
9
+ import jsonld from "@fedify/vocab-runtime/jsonld";
5
10
  //#region src/sig/compound-proof.ts
6
11
  const textEncoder = new TextEncoder();
7
- const PORTABLE_OBJECT_ID_PATTERN = /^ap(?:\+ef61)?:\/\//i;
12
+ /**
13
+ * Checks whether a literal `id` or `@id` value makes a map a portable object:
14
+ * an `ap:` or `ap+ef61:` URI, or anything that looks like an FEP-ef61
15
+ * compatible identifier, even a malformed one, which then fails the policy.
16
+ */
17
+ function isPortableIdValue(value) {
18
+ return typeof value === "string" && isPortableId(value);
19
+ }
8
20
  function isJsonMap(value) {
9
21
  return typeof value === "object" && value != null && !Array.isArray(value);
10
22
  }
@@ -250,18 +262,20 @@ function collectPortableObjects(snapshot) {
250
262
  for (let index = current.value.length - 1; index >= 0; index--) pending.push({
251
263
  value: current.value[index],
252
264
  path: childPath(current.path, String(index)),
253
- depth: current.depth + 1
265
+ depth: current.depth + 1,
266
+ keyOf: current.keyOf
254
267
  });
255
268
  continue;
256
269
  }
257
270
  if (!isCompoundProofJsonObject(current.value)) continue;
258
271
  const document = current.value;
259
- const id = [document.id, document["@id"]].find((value) => typeof value === "string" && PORTABLE_OBJECT_ID_PATTERN.test(value));
272
+ const id = [document.id, document["@id"]].find(isPortableIdValue);
260
273
  if (typeof id === "string") objects.push(Object.freeze({
261
274
  path: current.path,
262
275
  id,
263
276
  depth: current.depth,
264
- document
277
+ document,
278
+ ...current.keyOf == null ? {} : { keyOf: current.keyOf }
265
279
  }));
266
280
  const entries = Object.entries(document).sort(([left], [right]) => comparePaths(left, right));
267
281
  for (let index = entries.length - 1; index >= 0; index--) {
@@ -270,7 +284,11 @@ function collectPortableObjects(snapshot) {
270
284
  pending.push({
271
285
  value,
272
286
  path: childPath(current.path, key),
273
- depth: current.depth + 1
287
+ depth: current.depth + 1,
288
+ ...typeof id === "string" && (key === "publicKey" || key === "assertionMethod") ? { keyOf: {
289
+ path: current.path,
290
+ member: key
291
+ } } : {}
274
292
  });
275
293
  }
276
294
  }
@@ -278,8 +296,9 @@ function collectPortableObjects(snapshot) {
278
296
  return objects;
279
297
  }
280
298
  /**
281
- * Determines whether a received JSON tree contains a portable object ID
282
- * outside a proof or context definition, without exceeding discovery limits.
299
+ * Determines whether a received JSON tree contains a portable object ID, i.e.,
300
+ * an `ap:` or `ap+ef61:` URI or an FEP-ef61 compatible identifier, outside
301
+ * a proof or context definition, without exceeding discovery limits.
283
302
  *
284
303
  * This is only an applicability check. It does not authenticate the input;
285
304
  * callers must still use {@link verifyCompoundPortableObjectProofs} to obtain
@@ -326,7 +345,7 @@ function inspectCompoundPortableObjectApplicability(json, limits) {
326
345
  } else if (isJsonMap(value)) {
327
346
  mapCount++;
328
347
  if (mapCount > limits.maxMaps) return "indeterminate";
329
- if ([value.id, value["@id"]].some((id) => typeof id === "string" && PORTABLE_OBJECT_ID_PATTERN.test(id))) return "present";
348
+ if ([value.id, value["@id"]].some(isPortableIdValue)) return "present";
330
349
  if (!addByteLength(2)) return "indeterminate";
331
350
  const children = function* () {
332
351
  let first = true;
@@ -389,7 +408,8 @@ function findInJsonMaps(json, visit) {
389
408
  /**
390
409
  * Determines whether an outgoing JSON tree contains portable content that
391
410
  * requires producer-side proof-shape checks: a map, outside proof and context
392
- * values, whose direct `id` or `@id` is a portable ActivityPub URI.
411
+ * values, whose direct `id` or `@id` is a portable ActivityPub URI or an
412
+ * FEP-ef61 compatible identifier.
393
413
  *
394
414
  * This deliberately differs from
395
415
  * {@link inspectCompoundPortableObjectApplicability}: it applies no resource
@@ -402,7 +422,7 @@ function findInJsonMaps(json, visit) {
402
422
  * @internal
403
423
  */
404
424
  function containsCompoundPortableObject(json) {
405
- return findInJsonMaps(json, (map) => [map.id, map["@id"]].some((id) => typeof id === "string" && PORTABLE_OBJECT_ID_PATTERN.test(id)) ? true : void 0) ?? false;
425
+ return findInJsonMaps(json, (map) => [map.id, map["@id"]].some(isPortableIdValue) ? true : void 0) ?? false;
406
426
  }
407
427
  /**
408
428
  * Finds the first direct `proof` member whose value the map-local
@@ -521,7 +541,7 @@ async function verifyCompoundPortableObjectProofs(json, limits, options = {}) {
521
541
  if (discovered.status !== "ok") return discovered;
522
542
  const proofs = await verifyDiscoveredProofDocuments(discovered, options);
523
543
  const proofByPath = new Map(proofs.map((proof) => [proof.path, proof]));
524
- const portableObjects = await Promise.all(collectPortableObjects(discovered.snapshot).map(async (object) => {
544
+ const verifyPortableObject = async (object) => {
525
545
  const metadata = {
526
546
  path: object.path,
527
547
  id: object.id,
@@ -553,15 +573,173 @@ async function verifyCompoundPortableObjectProofs(json, limits, options = {}) {
553
573
  reason: { type: "invalidPortableObject" }
554
574
  });
555
575
  }
576
+ };
577
+ const collected = collectPortableObjects(discovered.snapshot);
578
+ const objectByPath = new Map(collected.map((object) => [object.path, object]));
579
+ const isKeyCandidate = (object) => object.keyOf != null && !Object.hasOwn(object.document, "proof");
580
+ const results = /* @__PURE__ */ new Map();
581
+ for (const result of await Promise.all(collected.filter((object) => !isKeyCandidate(object)).map(verifyPortableObject))) results.set(result.path, result);
582
+ let projections = 0;
583
+ for (const object of collected) {
584
+ if (!isKeyCandidate(object)) continue;
585
+ const { path, member } = object.keyOf;
586
+ const parent = results.get(path);
587
+ const parentObject = objectByPath.get(path);
588
+ if (parent?.verified === true && parentObject != null && projections++ < MAX_KEY_PROJECTIONS && await isEmbeddedPortableKey(parentObject.document, member, object.document, parent.id)) continue;
589
+ results.set(object.path, await verifyPortableObject(object));
590
+ }
591
+ const portableObjects = Object.freeze(collected.flatMap((object) => {
592
+ const result = results.get(object.path);
593
+ return result == null ? [] : [result];
556
594
  }));
557
595
  return {
558
596
  status: "ok",
559
597
  verified: portableObjects.length > 0 && proofs.every((proof) => proof.verified) && portableObjects.every((object) => object.verified),
560
598
  snapshot: discovered.snapshot,
561
599
  proofs,
562
- portableObjects: Object.freeze(portableObjects),
600
+ portableObjects,
563
601
  statistics: discovered.statistics
564
602
  };
565
603
  }
604
+ /**
605
+ * The maximum number of embedded keys per compound document that are checked
606
+ * by {@link isEmbeddedPortableKey}, each of which expands a projection of its
607
+ * parent. Keys beyond it have to carry their own proofs.
608
+ */
609
+ const MAX_KEY_PROJECTIONS = 64;
610
+ const SECURITY = "https://w3id.org/security#";
611
+ const KEY_TYPES = /* @__PURE__ */ new Set([`${SECURITY}Key`, `${SECURITY}Multikey`]);
612
+ const KEY_PROPERTIES = /* @__PURE__ */ new Set([
613
+ "@id",
614
+ "@type",
615
+ `${SECURITY}owner`,
616
+ `${SECURITY}controller`,
617
+ `${SECURITY}publicKeyPem`,
618
+ `${SECURITY}publicKeyMultibase`
619
+ ]);
620
+ /**
621
+ * Tells whether an unsigned map embedded in a verified portable map is just
622
+ * a key of the portable object the parent is, e.g., a gateway key of
623
+ * a portable actor, which the parent's proof covers.
624
+ *
625
+ * The key's meaning depends on the contexts active where it sits, so it is
626
+ * decided on a projection of the parent that keeps only what those contexts
627
+ * depend on: the parent's `@context`, its types and ID, and the member that
628
+ * holds the key. That holds only if nothing else in the parent can change
629
+ * them, so both documents may only use contexts that define no keyword
630
+ * aliases and no scoped contexts; Fedify's preloaded contexts, the only
631
+ * remote ones the compound policy loads, alias just `id` and `type`.
632
+ *
633
+ * The projection must expand to the parent's verified ID with the key as the
634
+ * single value of `publicKey` or `assertionMethod`, and the key must be
635
+ * nothing but a `CryptographicKey` or `Multikey` whose ID is a compatible
636
+ * identifier of the parent plus a fragment, and whose owner or controller,
637
+ * if any, is the parent.
638
+ */
639
+ async function isEmbeddedPortableKey(parent, member, key, parentId) {
640
+ const parentPortableId = getCanonicalPortableIdOf(parentId);
641
+ if (parentPortableId == null) return false;
642
+ if (!isSimpleContext(parent["@context"]) || Object.hasOwn(key, "@context") && !isSimpleContext(key["@context"])) return false;
643
+ const literalIds = [key.id, key["@id"]].filter((id) => id !== void 0);
644
+ if (literalIds.length < 1 || literalIds.some((id) => id !== literalIds[0]) || typeof literalIds[0] !== "string" || !isKeyIdOf(literalIds[0], parentPortableId)) return false;
645
+ const projection = {};
646
+ for (const property of [
647
+ "@context",
648
+ "type",
649
+ "@type",
650
+ "id",
651
+ "@id"
652
+ ]) if (Object.hasOwn(parent, property)) projection[property] = parent[property];
653
+ projection[member] = key;
654
+ let expanded;
655
+ try {
656
+ expanded = await jsonld.expand(structuredClone(projection), {
657
+ documentLoader: getNormalizationContextLoader(preloadedOnlyDocumentLoader),
658
+ keepFreeFloatingNodes: true
659
+ });
660
+ } catch {
661
+ return false;
662
+ }
663
+ if (expanded.length !== 1 || hasGraphKeyword(expanded)) return false;
664
+ const node = expanded[0];
665
+ if (!isJsonMap(node) || typeof node["@id"] !== "string" || getCanonicalPortableIdOf(node["@id"]) !== parentPortableId) return false;
666
+ const properties = Object.keys(node).filter((property) => property !== "@id" && property !== "@type");
667
+ if (properties.length !== 1 || properties[0] !== `${SECURITY}${member}`) return false;
668
+ const values = node[properties[0]];
669
+ if (!Array.isArray(values) || values.length !== 1) return false;
670
+ const expandedKey = values[0];
671
+ if (!isJsonMap(expandedKey) || expandedKey["@id"] !== literalIds[0] || Object.keys(expandedKey).some((property) => !KEY_PROPERTIES.has(property))) return false;
672
+ const types = expandedKey["@type"];
673
+ if (types !== void 0 && (!Array.isArray(types) || types.some((type) => typeof type !== "string" || !KEY_TYPES.has(type)))) return false;
674
+ const pem = expandedKey[`${SECURITY}publicKeyPem`];
675
+ const multibase = expandedKey[`${SECURITY}publicKeyMultibase`];
676
+ if (pem === void 0 && multibase === void 0) return false;
677
+ if (pem !== void 0 && !isSingleStringValue(pem)) return false;
678
+ if (multibase !== void 0 && !isSingleStringValue(multibase, `${SECURITY}multibase`)) return false;
679
+ for (const property of [`${SECURITY}owner`, `${SECURITY}controller`]) {
680
+ const owners = expandedKey[property];
681
+ if (owners === void 0) continue;
682
+ if (!Array.isArray(owners) || owners.length !== 1 || !isJsonMap(owners[0]) || Object.keys(owners[0]).length !== 1 || typeof owners[0]["@id"] !== "string" || getCanonicalPortableIdOf(owners[0]["@id"]) !== parentPortableId) return false;
683
+ }
684
+ return true;
685
+ }
686
+ function getCanonicalPortableIdOf(id) {
687
+ try {
688
+ return getCanonicalPortableId(parseIri(id));
689
+ } catch (error) {
690
+ if (error instanceof TypeError) return null;
691
+ throw error;
692
+ }
693
+ }
694
+ /**
695
+ * Checks whether an ID is a compatible identifier of the given portable
696
+ * object plus a fragment.
697
+ */
698
+ function isKeyIdOf(id, portableId) {
699
+ let url;
700
+ try {
701
+ if (fromCompatibleEf61Id(id) == null) return false;
702
+ url = new URL(id);
703
+ } catch (error) {
704
+ if (error instanceof TypeError) return false;
705
+ throw error;
706
+ }
707
+ if (url.hash.length < 2) return false;
708
+ url.hash = "";
709
+ return getCanonicalPortableId(url) === portableId;
710
+ }
711
+ /**
712
+ * Checks whether a `@context` value defines no keyword aliases and no scoped
713
+ * contexts: only references to contexts and term definitions that map terms
714
+ * to IRIs, optionally with an `@id` or `@vocab` type coercion or a datatype.
715
+ */
716
+ function isSimpleContext(context) {
717
+ if (typeof context === "string") return true;
718
+ if (Array.isArray(context)) return context.every(isSimpleContext);
719
+ if (context === void 0 || !isCompoundProofJsonObject(context)) return false;
720
+ return Object.entries(context).every(([term, definition]) => {
721
+ if (term.startsWith("@")) return false;
722
+ if (typeof definition === "string") return !definition.startsWith("@");
723
+ if (!isCompoundProofJsonObject(definition)) return false;
724
+ const { "@id": id, "@type": type, ...rest } = definition;
725
+ return Object.keys(rest).length < 1 && typeof id === "string" && !id.startsWith("@") && (type === void 0 || type === "@id" || type === "@vocab" || typeof type === "string" && !type.startsWith("@"));
726
+ });
727
+ }
728
+ function hasGraphKeyword(value) {
729
+ if (Array.isArray(value)) return value.some(hasGraphKeyword);
730
+ if (!isJsonMap(value)) return false;
731
+ return Object.entries(value).some(([key, child]) => key === "@graph" || key === "@included" || key === "@reverse" || hasGraphKeyword(child));
732
+ }
733
+ /**
734
+ * Checks whether expanded values are a single plain string, optionally with
735
+ * the given datatype.
736
+ */
737
+ function isSingleStringValue(values, datatype) {
738
+ if (!Array.isArray(values) || values.length !== 1) return false;
739
+ const value = values[0];
740
+ if (!isJsonMap(value) || typeof value["@value"] !== "string") return false;
741
+ const keys = Object.keys(value);
742
+ return keys.length === 1 || datatype != null && keys.length === 2 && value["@type"] === datatype;
743
+ }
566
744
  //#endregion
567
745
  export { verifyCompoundPortableObjectProofs as a, inspectCompoundPortableObjectApplicability as i, discoverCompoundProofDocuments as n, verifyCompoundProofDocuments as o, findUnsupportedCompoundProofShape as r, containsCompoundPortableObject as t };
@@ -2066,8 +2066,11 @@ interface PortableInboxForwardingOptions {
2066
2066
  /**
2067
2067
  * How long a delivery waits for forwarding requests made immediately, i.e.,
2068
2068
  * when no outbox queue is configured, before Fedify responds to it.
2069
- * Requests still running afterwards continue in the background. It does
2070
- * not apply when forwarding is queued. It cannot have calendar units,
2069
+ * Requests still running afterwards continue in the background. It also
2070
+ * bounds verifying the HTTP Signature that identifies the gateway which
2071
+ * forwarded the delivery, with or without an outbox queue; if the
2072
+ * verification does not finish in time, the activity is forwarded to that
2073
+ * gateway as well. It cannot have calendar units,
2071
2074
  * i.e., weeks, months, or years, and cannot be longer than
2072
2075
  * 2,147,483,647 milliseconds (about 24.8 days), the longest delay timers
2073
2076
  * support.
@@ -2068,8 +2068,11 @@ interface PortableInboxForwardingOptions {
2068
2068
  /**
2069
2069
  * How long a delivery waits for forwarding requests made immediately, i.e.,
2070
2070
  * when no outbox queue is configured, before Fedify responds to it.
2071
- * Requests still running afterwards continue in the background. It does
2072
- * not apply when forwarding is queued. It cannot have calendar units,
2071
+ * Requests still running afterwards continue in the background. It also
2072
+ * bounds verifying the HTTP Signature that identifies the gateway which
2073
+ * forwarded the delivery, with or without an outbox queue; if the
2074
+ * verification does not finish in time, the activity is forwarded to that
2075
+ * gateway as well. It cannot have calendar units,
2073
2076
  * i.e., weeks, months, or years, and cannot be longer than
2074
2077
  * 2,147,483,647 milliseconds (about 24.8 days), the longest delay timers
2075
2078
  * support.
@@ -3,6 +3,6 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  //#region deno.json
5
5
  var name = "@fedify/fedify";
6
- var version = "2.4.0-dev.2084+4b8bd325";
6
+ var version = "2.4.0-dev.2099+cd074fe2";
7
7
  //#endregion
8
8
  export { version as n, name as t };
@@ -1,8 +1,8 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { s as validateCryptoKey } from "./key-BJrp524f.mjs";
5
- import { n as doubleKnock } from "./http-B0VRNipE.mjs";
4
+ import { s as validateCryptoKey } from "./key-DYfmjnmp.mjs";
5
+ import { n as doubleKnock } from "./http-DsgawTd8.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { curry } from "es-toolkit";
8
8
  import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
@@ -6,7 +6,7 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
6
6
  import { t as assertExists } from "../assert_exists-cffSpJ7X.mjs";
7
7
  import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
8
8
  import "../std__assert-DvMDRPes.mjs";
9
- import { r as createFederationBuilder } from "../builder-BGlpUocK.mjs";
9
+ import { r as createFederationBuilder } from "../builder-Bno54o_-.mjs";
10
10
  import { DisallowedOperatorError, DisallowedVarSpecModifierError, DuplicateRouteVariableError, RouteTemplateOptionsNotMatchedError, RouterError } from "@fedify/uri-template";
11
11
  import { Activity, Note, Person } from "@fedify/vocab";
12
12
  import { test } from "@fedify/fixture";
@@ -6,11 +6,11 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
7
  import "../std__assert-DvMDRPes.mjs";
8
8
  import { t as assert } from "../assert-D1Eafmd_.mjs";
9
- import { t as exportJwk } from "../key-BJrp524f.mjs";
9
+ import { t as exportJwk } from "../key-DYfmjnmp.mjs";
10
10
  import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
11
- import { l as verifyProof, r as signObject } from "../proof-ozG4HfcQ.mjs";
11
+ import { i as signObject, u as verifyProof } from "../proof-ChjBwnep.mjs";
12
12
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
13
- import { n as FederationImpl } from "../middleware-BKeQYPm0.mjs";
13
+ import { n as FederationImpl } from "../middleware-Br1_d-Ga.mjs";
14
14
  import { Create, DataIntegrityProof, Note } from "@fedify/vocab";
15
15
  import { mockDocumentLoader, test } from "@fedify/fixture";
16
16
  import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
@@ -5,10 +5,10 @@ import { r as createRequestContext, t as createInboxContext } from "../context-D
5
5
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
7
  import "../std__assert-DvMDRPes.mjs";
8
- import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-BmFz5NLA.mjs";
9
- import { s as signRequest } from "../http-B0VRNipE.mjs";
8
+ import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-B00wWHzc.mjs";
9
+ import { l as signRequest } from "../http-DsgawTd8.mjs";
10
10
  import { a as rsaPrivateKey3, c as rsaPublicKey3, n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
11
- import { o as createFederation, p as handleInbox } from "../middleware-BKeQYPm0.mjs";
11
+ import { f as handleInbox, o as createFederation } from "../middleware-Br1_d-Ga.mjs";
12
12
  import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
13
13
  import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
14
14
  import { Create } from "@fedify/vocab";
@@ -10,12 +10,12 @@ import "../std__assert-DvMDRPes.mjs";
10
10
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
11
11
  import { t as assert } from "../assert-D1Eafmd_.mjs";
12
12
  import { r as parseAcceptSignature } from "../accept-CPVqki78.mjs";
13
- import { a as generateCryptoKeyPair } from "../key-BJrp524f.mjs";
14
- import { a as compactJsonLd, p as signJsonLd } from "../ld-BmFz5NLA.mjs";
15
- import { r as signObject } from "../proof-ozG4HfcQ.mjs";
16
- import { s as signRequest } from "../http-B0VRNipE.mjs";
13
+ import { a as generateCryptoKeyPair } from "../key-DYfmjnmp.mjs";
14
+ import { a as compactJsonLd, p as signJsonLd } from "../ld-B00wWHzc.mjs";
15
+ import { i as signObject } from "../proof-ChjBwnep.mjs";
16
+ import { l as signRequest } from "../http-DsgawTd8.mjs";
17
17
  import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
18
- import { _ as respondWithObjectIfAcceptable, d as handleCollection, f as handleCustomCollection, g as respondWithObject, h as handleOutbox, m as handleObject, o as createFederation, p as handleInbox, u as handleActor } from "../middleware-BKeQYPm0.mjs";
18
+ import { d as handleCustomCollection, f as handleInbox, g as respondWithObjectIfAcceptable, h as respondWithObject, l as handleActor, m as handleOutbox, o as createFederation, p as handleObject, u as handleCollection } from "../middleware-Br1_d-Ga.mjs";
19
19
  import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
20
20
  import { Activity, Create, CryptographicKey, Multikey, Note, Person, Tombstone } from "@fedify/vocab";
21
21
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -10,8 +10,8 @@ import "../std__assert-DvMDRPes.mjs";
10
10
  import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
11
11
  import { t as assert } from "../assert-D1Eafmd_.mjs";
12
12
  import { r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
13
- import { o as createFederation, y as parseHashlinkGatewayRequest } from "../middleware-BKeQYPm0.mjs";
14
- import { r as createFederationBuilder } from "../builder-BGlpUocK.mjs";
13
+ import { o as createFederation, x as parseHashlinkGatewayRequest } from "../middleware-Br1_d-Ga.mjs";
14
+ import { r as createFederationBuilder } from "../builder-Bno54o_-.mjs";
15
15
  import { n as RouterError } from "../router-u5O5KCQr.mjs";
16
16
  import { Note } from "@fedify/vocab";
17
17
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
6
6
  import "../std__assert-DvMDRPes.mjs";
7
- import { r as signObject } from "../proof-ozG4HfcQ.mjs";
7
+ import { i as signObject } from "../proof-ChjBwnep.mjs";
8
8
  import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
9
- import { o as createFederation } from "../middleware-BKeQYPm0.mjs";
9
+ import { o as createFederation } from "../middleware-Br1_d-Ga.mjs";
10
10
  import { Create, Follow, Person } from "@fedify/vocab";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  //#region src/federation/idempotency.test.ts
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
6
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
7
- import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-Beod6tzO.mjs";
7
+ import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-BP3vdBpb.mjs";
8
8
  import { createTestMeterProvider, test } from "@fedify/fixture";
9
9
  import { FetchError } from "@fedify/vocab-runtime";
10
10
  import { DataPointType, MeterProvider, MetricReader } from "@opentelemetry/sdk-metrics";
@@ -16,14 +16,14 @@ import "../std__assert-DvMDRPes.mjs";
16
16
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
17
17
  import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
18
18
  import { t as assert } from "../assert-D1Eafmd_.mjs";
19
- import { g as recordInboxActivity } from "../metrics-Beod6tzO.mjs";
20
- import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-BmFz5NLA.mjs";
21
- import { a as verifyObject, r as signObject } from "../proof-ozG4HfcQ.mjs";
22
- import { l as verifyRequest, s as signRequest } from "../http-B0VRNipE.mjs";
19
+ import { g as recordInboxActivity } from "../metrics-BP3vdBpb.mjs";
20
+ import { a as compactJsonLd, h as verifyJsonLd, p as signJsonLd, s as detachSignature } from "../ld-B00wWHzc.mjs";
21
+ import { i as signObject, o as verifyObject } from "../proof-ChjBwnep.mjs";
22
+ import { d as verifyRequest, l as signRequest } from "../http-DsgawTd8.mjs";
23
23
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
24
- import { t as getAuthenticatedDocumentLoader } from "../docloader-BUq5bYJr.mjs";
25
- import { b as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-BKeQYPm0.mjs";
26
- import { t as doesActorOwnKey } from "../owner-CsKVgMzk.mjs";
24
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-eBxQDsk9.mjs";
25
+ import { S as handleBenchmarkTrigger, i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-Br1_d-Ga.mjs";
26
+ import { t as doesActorOwnKey } from "../owner-BJPDRDRq.mjs";
27
27
  import { t as CircuitBreaker } from "../circuit-breaker-C5NqoLBJ.mjs";
28
28
  import { t as TaskCodec } from "../codec-C6rTrpIp.mjs";
29
29
  import { t as markCircuitBreakerLegacySweepDone } from "../circuit-breaker-test-utils-DW6YC_Pe.mjs";
@@ -1,6 +1,6 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_federation = require("../federation-BLGx8JUH.cjs");
3
+ const require_federation = require("../federation-C4Ef3JKa.cjs");
4
4
  exports.CircuitBreaker = require_federation.CircuitBreaker;
5
5
  exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
6
6
  exports.MemoryKvStore = require_federation.MemoryKvStore;
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "../context-CZjZYXFC.cjs";
2
+ import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "../context-C43spTGI.cjs";
3
3
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-BhNbN8Ed.cjs";
4
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-JzkaEXsi.cjs";
4
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-DMI4DbOo.cjs";
5
5
  export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, PortableActorIdMapper, PortableInboxForwardingOptions, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "../context-BSywYspi.js";
2
+ import { $ as InProcessMessageQueueOptions, A as ObjectCallbackSetters, At as InboxErrorHandler, B as TaskDefinition, Bt as PortableActorIdMapper, C as FederationOptions, Ct as CollectionCursor, D as InboxChallengePolicy, Dt as CustomCollectionDispatcher, E as IdempotencyStrategy, Et as CustomCollectionCursor, F as FederationOrigin, Ft as ObjectDispatcher, G as CreateExponentialBackoffPolicyOptions, Gt as SendActivityError, H as TaskEnqueueOptions, Ht as UnverifiedActivityHandler, I as FederationQueueOptions, It as OutboxErrorHandler, J as createExponentialBackoffPolicy, Jt as buildCollectionSynchronizationHeader, K as RetryContext, Kt as SenderKeyPair, L as createFederation, Lt as OutboxListener, M as PortableInboxForwardingOptions, Mt as MediaUploaderCallback, N as Rfc6570Expression, Nt as NodeInfoDispatcher, O as InboxListenerSetters, Ot as HashlinkMediaDispatcher, P as FederationKvPrefixes, Pt as ObjectAuthorizePredicate, Q as InProcessMessageQueue, R as Message, Rt as OutboxListenerErrorHandler, S as FederationFetchOptions, St as CollectionCounter, T as IdempotencyKeyCallback, Tt as CustomCollectionCounter, U as TaskHandler, Ut as UnverifiedActivityReason, V as TaskDefinitionOptions, Vt as SharedInboxKeyDispatcher, W as TaskRegistry, Wt as WebFingerLinksDispatcher, X as respondWithObject, Y as RespondWithObjectOptions, Yt as digest, Z as respondWithObjectIfAcceptable, _ as CustomCollectionCallbackSetters, _t as ActorAliasMapper, a as GetSignedKeyOptions, at as CircuitBreaker, b as FederationBenchmarkOptions, bt as ActorKeyPairsDispatcher, c as ParseUriResult, ct as CircuitBreakerCreateOptions, d as RouteActivityOptions, dt as CircuitBreakerOptions, et as MessageQueue, f as SendActivityOptions, ft as CircuitBreakerState, g as ConstructorWithTypeId, gt as parseCircuitBreakerKvState, h as CollectionCallbackSetters, ht as normalizeCircuitBreakerOptions, i as GetActorOptions, it as ParallelMessageQueue, j as OutboxListenerSetters, jt as InboxListener, k as MediaUploaderSetters, kt as HashlinkMediaRequest, l as PortableRequest, lt as CircuitBreakerFailurePolicy, m as ActorCallbackSetters, mt as NormalizedCircuitBreakerOptions, n as Context, nt as MessageQueueEnqueueOptions, o as InboxContext, ot as CircuitBreakerActivityDrop, p as SendActivityOptionsForCollection, pt as CircuitBreakerStateChange, q as RetryPolicy, qt as PageItems, r as ForwardActivityOptions, rt as MessageQueueListenOptions, s as OutboxContext, st as CircuitBreakerBeforeSendDecision, t as ActorKeyPair, tt as MessageQueueDepth, u as RequestContext, ut as CircuitBreakerKvState, v as Federatable, vt as ActorDispatcher, w as FederationStartQueueOptions, wt as CollectionDispatcher, x as FederationBuilder, xt as AuthorizePredicate, y as Federation, yt as ActorHandleMapper, z as createFederationBuilder, zt as OutboxPermanentFailureHandler } from "../context-MORIQJIh.js";
3
3
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-BhNbN8Ed.js";
4
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-B2h2KY0q.js";
4
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-BL5BQHCq.js";
5
5
  export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, PortableActorIdMapper, PortableInboxForwardingOptions, PortableRequest, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, normalizeCircuitBreakerOptions, parseCircuitBreakerKvState, respondWithObject, respondWithObjectIfAcceptable };