@fedify/fedify 2.4.0-dev.1422 → 2.4.0-dev.1488

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 (105) hide show
  1. package/README.md +4 -3
  2. package/dist/{assert-DikXweDx.mjs → assert-OguE97r2.mjs} +1 -1
  3. package/dist/{assert_instance_of-C4Ri6VuN.mjs → assert_instance_of-DBC5X09g.mjs} +1 -1
  4. package/dist/{assert_not_equals--wG9hV7u.mjs → assert_not_equals-DkVK8oqV.mjs} +1 -1
  5. package/dist/{assert_rejects-DQP-q39h.mjs → assert_rejects-DN60FHPX.mjs} +2 -2
  6. package/dist/{assert_strict_equals-Dmjbg-bA.mjs → assert_strict_equals-XEgZAlrj.mjs} +1 -1
  7. package/dist/{assert_throws-4NwKEy2q.mjs → assert_throws-BOkhLGYc.mjs} +1 -1
  8. package/dist/{builder-Gef_ZeDE.mjs → builder-Dcr6y6XD.mjs} +3 -23
  9. package/dist/compat/mod.d.cts +1 -1
  10. package/dist/compat/mod.d.ts +1 -1
  11. package/dist/compat/outgoing-jsonld.test.mjs +3 -3
  12. package/dist/compat/public-audience.test.mjs +3 -3
  13. package/dist/compat/transformers.test.mjs +5 -5
  14. package/dist/{context-BuGH_Vft.d.cts → context-BBVLF7lx.d.cts} +70 -286
  15. package/dist/{context-CLtZxCu6.d.ts → context-BU6jSQdo.d.ts} +70 -285
  16. package/dist/{context-BrIOaBSs.mjs → context-DVoTs_wM.mjs} +1 -7
  17. package/dist/{deno-BmD7XRaO.mjs → deno-BCFGf8NR.mjs} +1 -1
  18. package/dist/{docloader-B8AJowCx.mjs → docloader-DWEwaGqF.mjs} +2 -2
  19. package/dist/federation/builder.test.mjs +5 -5
  20. package/dist/federation/circuit-breaker.test.mjs +5 -5
  21. package/dist/federation/collection.test.mjs +3 -3
  22. package/dist/federation/handler.test.mjs +13 -13
  23. package/dist/federation/idempotency.test.mjs +6 -6
  24. package/dist/federation/inbox.test.mjs +3 -3
  25. package/dist/federation/keycache.test.mjs +5 -5
  26. package/dist/federation/kv.test.mjs +3 -3
  27. package/dist/federation/metrics.test.mjs +4 -4
  28. package/dist/federation/middleware.test.mjs +19 -200
  29. package/dist/federation/mod.cjs +1 -1
  30. package/dist/federation/mod.d.cts +3 -3
  31. package/dist/federation/mod.d.ts +3 -3
  32. package/dist/federation/mod.js +1 -1
  33. package/dist/federation/mq.test.mjs +260 -5
  34. package/dist/federation/negotiation.test.mjs +4 -4
  35. package/dist/federation/retry.test.mjs +3 -3
  36. package/dist/federation/router.test.mjs +5 -5
  37. package/dist/federation/send.test.mjs +10 -10
  38. package/dist/federation/temporal.test.mjs +4 -4
  39. package/dist/federation/webfinger.test.mjs +6 -6
  40. package/dist/{http-BCSQJ_gv.cjs → http-DLqxhQg1.cjs} +17 -7
  41. package/dist/{http-CJ0WNyqA.js → http-DaVoLyyA.js} +17 -7
  42. package/dist/{http-GQoPA_YT.mjs → http-RriziGDE.mjs} +4 -4
  43. package/dist/{key-BLy_TeTg.mjs → key-Bkg8Zg36.mjs} +18 -8
  44. package/dist/{kv-cache-pw-kBdVz.mjs → kv-cache-BR--9V4L.mjs} +1 -1
  45. package/dist/{kv-cache-CjEcb9qH.js → kv-cache-DxlFLMiU.js} +1 -1
  46. package/dist/{kv-cache-DXwu7BtY.cjs → kv-cache-Fw-iwKjy.cjs} +1 -1
  47. package/dist/{ld-CWgxPlZq.mjs → ld-BjsmbqO7.mjs} +3 -3
  48. package/dist/{metrics-DUKoLd_E.mjs → metrics-BLoa2pab.mjs} +1 -1
  49. package/dist/{middleware-PZaroDUk.mjs → middleware-D3kuDjvb.mjs} +44 -186
  50. package/dist/{middleware-Dq-HhJHd.mjs → middleware-DNR3YBCi.mjs} +1 -1
  51. package/dist/{middleware-BiCk4wGY.cjs → middleware-V-r1QH5Z.cjs} +31 -281
  52. package/dist/{middleware-2Us0G3Iy.js → middleware-_9t5HVBi.js} +31 -281
  53. package/dist/{mod-DRokcHeU.d.cts → mod-C0F6kvgS.d.cts} +1 -1
  54. package/dist/{mod-r-1xOW_C.d.ts → mod-vPYVoa5n.d.ts} +1 -1
  55. package/dist/mod.cjs +4 -4
  56. package/dist/mod.d.cts +4 -4
  57. package/dist/mod.d.ts +4 -4
  58. package/dist/mod.js +4 -4
  59. package/dist/nodeinfo/client.test.mjs +3 -3
  60. package/dist/nodeinfo/handler.test.mjs +5 -5
  61. package/dist/nodeinfo/types.test.mjs +4 -4
  62. package/dist/otel/exporter.test.mjs +3 -3
  63. package/dist/{outgoing-jsonld-BgFLCJQ_.mjs → outgoing-jsonld-L_DbOaFe.mjs} +1 -1
  64. package/dist/{owner-U0Z8Ex6i.mjs → owner-NK2p1ihR.mjs} +2 -2
  65. package/dist/{proof-DA3hLGSO.cjs → proof-2WI6mMbC.cjs} +1 -1
  66. package/dist/{proof-nb5tfciW.mjs → proof-CRXqo703.mjs} +5 -5
  67. package/dist/{proof-f7K32nz7.js → proof-D7WVwQzs.js} +1 -1
  68. package/dist/{send-CLfW5Fdf.mjs → send-CTaPzl8L.mjs} +3 -3
  69. package/dist/sig/accept.test.mjs +1 -1
  70. package/dist/sig/http.test.mjs +8 -8
  71. package/dist/sig/key.test.mjs +56 -6
  72. package/dist/sig/ld.test.mjs +7 -7
  73. package/dist/sig/mod.cjs +2 -2
  74. package/dist/sig/mod.js +2 -2
  75. package/dist/sig/owner.test.mjs +6 -6
  76. package/dist/sig/proof.test.mjs +8 -8
  77. package/dist/{std__assert-BTEgfoJo.mjs → std__assert-BBjXFNOb.mjs} +4 -4
  78. package/dist/{temporal-2ry_jdCK.mjs → temporal-C8M0Y7v9.mjs} +1 -1
  79. package/dist/testing/mod.d.mts +7 -378
  80. package/dist/testing/mod.mjs +2 -3
  81. package/dist/utils/docloader.test.mjs +6 -6
  82. package/dist/utils/kv-cache.test.mjs +1 -1
  83. package/dist/utils/mod.cjs +1 -1
  84. package/dist/utils/mod.js +1 -1
  85. package/package.json +8 -13
  86. package/dist/codec-Bf-rTqks.mjs +0 -94
  87. package/dist/federation/tasks/codec.test.d.mts +0 -2
  88. package/dist/federation/tasks/codec.test.mjs +0 -292
  89. package/dist/federation/tasks/tasks.test.d.mts +0 -2
  90. package/dist/federation/tasks/tasks.test.mjs +0 -651
  91. package/dist/mq-CvJAzRz5.mjs +0 -260
  92. package/dist/testing-CjYPStvE.mjs +0 -55
  93. /package/dist/{accept-CceiKpCy.mjs → accept-CPkZzmGN.mjs} +0 -0
  94. /package/dist/{activity-listener-BeTGV3wc.mjs → activity-listener-tztVvlNb.mjs} +0 -0
  95. /package/dist/{assert_equals-Ew3jOFa3.mjs → assert_equals-C-ZRDbaf.mjs} +0 -0
  96. /package/dist/{circuit-breaker-hJBB6jwA.mjs → circuit-breaker-CSWsyoef.mjs} +0 -0
  97. /package/dist/{client-B_A6mfn3.mjs → client-ByXmQhYD.mjs} +0 -0
  98. /package/dist/{collection-Dp5ky45w.mjs → collection-Cc3DVAhE.mjs} +0 -0
  99. /package/dist/{keycache-CaOR6NYg.mjs → keycache-BeU0LCII.mjs} +0 -0
  100. /package/dist/{keys-C3kae-6B.mjs → keys-DGu1NFwu.mjs} +0 -0
  101. /package/dist/{kv-x2IvBUyq.mjs → kv-rV3vodCc.mjs} +0 -0
  102. /package/dist/{negotiation-m_L2nyS3.mjs → negotiation-DDstyBvc.mjs} +0 -0
  103. /package/dist/{public-audience-N3pyOx2p.mjs → public-audience-Cvbr2Gzt.mjs} +0 -0
  104. /package/dist/{retry-DI4O-zYl.mjs → retry-CXg_MBI-.mjs} +0 -0
  105. /package/dist/{types-BFowWFTT.mjs → types-J53Kw7so.mjs} +0 -0
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./chunk-CRNNMoPX.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-BGMIq1cs.js";
5
- import { A as formatAcceptSignature, D as recordOutboxEnqueue, E as recordOutboxActivity, F as version, O as recordWebFingerHandle, P as name, S as recordCollectionTotalItems, T as recordInboxActivity, a as verifyRequestDetailed, b as recordCollectionPageItems, d as validateCryptoKey, f as getDurationMs, g as isAbortError, h as instrumentDocumentLoader, i as verifyRequest, k as registerQueueDepthGauge, m as getRemoteHost, n as parseRfc9421SignatureInput, o as exportJwk, p as getFederationMetrics, t as doubleKnock, u as importJwk, v as recordCircuitBreakerStateChange, w as recordFanoutRecipients, x as recordCollectionRequest, y as recordCollectionDispatchDuration } from "./http-CJ0WNyqA.js";
6
- import { _ as hasSignatureLike, b as signJsonLd, c as getKeyOwner, f as compactJsonLd, g as hasSignature, h as getNormalizationContextLoader, i as verifyObject, l as InvalidContextReferenceError, m as detachSignature, n as hasProofLike, o as normalizeOutgoingActivityJsonLd, r as signObject, s as doesActorOwnKey, u as assertSafeJsonLd, v as isClearlyMalformedContextReference, w as wrapContextLoaderForJsonLd, x as verifyCompactJsonLd, y as isInvalidUrlTypeError } from "./proof-f7K32nz7.js";
5
+ import { A as formatAcceptSignature, D as recordOutboxEnqueue, E as recordOutboxActivity, F as version, O as recordWebFingerHandle, P as name, S as recordCollectionTotalItems, T as recordInboxActivity, a as verifyRequestDetailed, b as recordCollectionPageItems, d as validateCryptoKey, f as getDurationMs, g as isAbortError, h as instrumentDocumentLoader, i as verifyRequest, k as registerQueueDepthGauge, m as getRemoteHost, n as parseRfc9421SignatureInput, o as exportJwk, p as getFederationMetrics, t as doubleKnock, u as importJwk, v as recordCircuitBreakerStateChange, w as recordFanoutRecipients, x as recordCollectionRequest, y as recordCollectionDispatchDuration } from "./http-DaVoLyyA.js";
6
+ import { _ as hasSignatureLike, b as signJsonLd, c as getKeyOwner, f as compactJsonLd, g as hasSignature, h as getNormalizationContextLoader, i as verifyObject, l as InvalidContextReferenceError, m as detachSignature, n as hasProofLike, o as normalizeOutgoingActivityJsonLd, r as signObject, s as doesActorOwnKey, u as assertSafeJsonLd, v as isClearlyMalformedContextReference, w as wrapContextLoaderForJsonLd, x as verifyCompactJsonLd, y as isInvalidUrlTypeError } from "./proof-D7WVwQzs.js";
7
7
  import { n as getNodeInfo, t as nodeInfoToJson } from "./types-CAY3OdLq.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CjEcb9qH.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DxlFLMiU.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, lookupObject, traverseCollection } from "@fedify/vocab";
@@ -17,7 +17,6 @@ import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_
17
17
  import jsonld from "@fedify/vocab-runtime/jsonld";
18
18
  import { lookupWebFinger } from "@fedify/webfinger";
19
19
  import { DataPointType, MeterProvider as MeterProvider$1, MetricReader } from "@opentelemetry/sdk-metrics";
20
- import { parse, stringifyAsync } from "devalue";
21
20
  import { domainToASCII } from "node:url";
22
21
  //#region src/federation/activity-listener.ts
23
22
  var ActivityListenerSet = class {
@@ -108,7 +107,6 @@ var FederationBuilderImpl = class {
108
107
  idempotencyStrategy;
109
108
  collectionTypeIds;
110
109
  collectionCallbacks;
111
- taskDefinitions;
112
110
  /**
113
111
  * Symbol registry for unique identification of unnamed symbols.
114
112
  */
@@ -119,7 +117,6 @@ var FederationBuilderImpl = class {
119
117
  this.objectTypeIds = {};
120
118
  this.collectionCallbacks = {};
121
119
  this.collectionTypeIds = {};
122
- this.taskDefinitions = /* @__PURE__ */ new Map();
123
120
  }
124
121
  /**
125
122
  * Builds the federation object.
@@ -158,7 +155,6 @@ var FederationBuilderImpl = class {
158
155
  f.unverifiedActivityHandler = this.unverifiedActivityHandler;
159
156
  f.outboxPermanentFailureHandler = this.outboxPermanentFailureHandler;
160
157
  f.idempotencyStrategy = this.idempotencyStrategy;
161
- f.taskDefinitions = new Map(this.taskDefinitions);
162
158
  return f;
163
159
  }
164
160
  _getTracer() {
@@ -291,23 +287,6 @@ var FederationBuilderImpl = class {
291
287
  setWebFingerLinksDispatcher(dispatcher) {
292
288
  this.webFingerLinksDispatcher = dispatcher;
293
289
  }
294
- defineTask(name, options) {
295
- if (this.taskDefinitions.has(name)) throw new TypeError(`Task ${JSON.stringify(name)} is already defined.`);
296
- const handle = {
297
- name,
298
- schema: options.schema
299
- };
300
- this.taskDefinitions.set(name, {
301
- name,
302
- schema: options.schema,
303
- handle,
304
- handler: options.handler,
305
- onError: options.onError,
306
- retryPolicy: options.retryPolicy,
307
- queue: options.queue
308
- });
309
- return handle;
310
- }
311
290
  /**
312
291
  * The RFC 6570 template-literal `path` overloads were removed for
313
292
  * type-checking efficiency, so the URI variable types can no longer be
@@ -1413,7 +1392,7 @@ function acceptsJsonLd(request) {
1413
1392
  }
1414
1393
  //#endregion
1415
1394
  //#region src/federation/temporal.ts
1416
- function isPlainObject$1(value) {
1395
+ function isPlainObject(value) {
1417
1396
  return typeof value === "object" && value != null && !Array.isArray(value);
1418
1397
  }
1419
1398
  function normalizeDateTimeLiteral(value) {
@@ -1451,11 +1430,11 @@ const QUESTION_CLOSED_IRI = "https://www.w3.org/ns/activitystreams#closed";
1451
1430
  const XSD_DATE_TIME_IRI = "http://www.w3.org/2001/XMLSchema#dateTime";
1452
1431
  function hasMalformedExpandedDateTimeLiteral(value) {
1453
1432
  if (Array.isArray(value)) return value.some(hasMalformedExpandedDateTimeLiteral);
1454
- return isPlainObject$1(value) && "@value" in value && isMalformedDateTimeLiteral(value["@value"]);
1433
+ return isPlainObject(value) && "@value" in value && isMalformedDateTimeLiteral(value["@value"]);
1455
1434
  }
1456
1435
  function hasMalformedExpandedQuestionClosedLiteral(value) {
1457
1436
  if (Array.isArray(value)) return value.some(hasMalformedExpandedQuestionClosedLiteral);
1458
- if (!isPlainObject$1(value) || !("@value" in value)) return false;
1437
+ if (!isPlainObject(value) || !("@value" in value)) return false;
1459
1438
  const literal = value["@value"];
1460
1439
  if (typeof literal === "boolean") return false;
1461
1440
  if (typeof literal !== "string") return false;
@@ -1465,11 +1444,11 @@ function hasMalformedExpandedQuestionClosedLiteral(value) {
1465
1444
  }
1466
1445
  function hasMalformedExpandedDurationLiteral(value) {
1467
1446
  if (Array.isArray(value)) return value.some(hasMalformedExpandedDurationLiteral);
1468
- return isPlainObject$1(value) && "@value" in value && isMalformedDurationLiteral(value["@value"]);
1447
+ return isPlainObject(value) && "@value" in value && isMalformedDurationLiteral(value["@value"]);
1469
1448
  }
1470
1449
  function hasMalformedKnownTemporalLiteralInternal(value, visited) {
1471
1450
  if (Array.isArray(value)) return value.some((item) => hasMalformedKnownTemporalLiteralInternal(item, visited));
1472
- if (!isPlainObject$1(value)) return false;
1451
+ if (!isPlainObject(value)) return false;
1473
1452
  if (visited.has(value)) return false;
1474
1453
  visited.add(value);
1475
1454
  if ("@value" in value) return false;
@@ -3573,94 +3552,6 @@ function createExponentialBackoffPolicy(options = {}) {
3573
3552
  };
3574
3553
  }
3575
3554
  //#endregion
3576
- //#region src/federation/tasks/codec.ts
3577
- var TaskCodec = class TaskCodec {
3578
- options;
3579
- constructor(options) {
3580
- this.options = options;
3581
- }
3582
- serialize = (data) => stringifyAsync(data, { Vocab: this.#stringifyVocab });
3583
- deserialize = (raw) => this.#revive(/* @__PURE__ */ new Map())(parse(raw, { Vocab: VocabHolder.from }));
3584
- /** Validates `data` against `schema`, then serializes it. */
3585
- encode = async (schema, data) => this.serialize(await TaskCodec.validate(schema, data));
3586
- /** Deserializes `raw`, then validates the result against `schema`. */
3587
- decode = async (schema, raw) => TaskCodec.validate(schema, await this.deserialize(raw));
3588
- static validate = async (schema, data) => getValueIfSchema(await schema["~standard"].validate(data));
3589
- #stringifyVocab = (value) => isVocab(value) && this.#toWire(value);
3590
- #toWire = async (value) => ({
3591
- kind: value instanceof Link ? "link" : "object",
3592
- jsonLd: await value.toJsonLd({
3593
- format: "expand",
3594
- ...this.options
3595
- })
3596
- });
3597
- #revive = (seen) => {
3598
- const inner = async (node) => {
3599
- if (node === null || typeof node !== "object") return node;
3600
- if (seen.has(node)) return seen.get(node);
3601
- for (const reviver of this.#classRevivers) {
3602
- const out = reviver(seen, inner, node);
3603
- if (out !== void 0) return await out;
3604
- }
3605
- return node;
3606
- };
3607
- return inner;
3608
- };
3609
- #classRevivers = [
3610
- classReviver(isInstanceOf(VocabHolder), ({ kind, jsonLd }) => kind === "link" ? Link.fromJsonLd(jsonLd, this.options) : Object$1.fromJsonLd(jsonLd, this.options), () => {}),
3611
- classReviver(isInstanceOf(Array), () => [], async (revive, node, arr) => {
3612
- for (const item of await Array.fromAsync(node, revive)) arr.push(item);
3613
- }),
3614
- classReviver(isInstanceOf(Map), () => /* @__PURE__ */ new Map(), async (revive, node, map) => {
3615
- for (const [k, v] of node) map.set(await revive(k), await revive(v));
3616
- }),
3617
- classReviver(isInstanceOf(Set), () => /* @__PURE__ */ new Set(), async (revive, node, set) => {
3618
- for (const v of await Array.fromAsync(node, revive)) set.add(v);
3619
- }),
3620
- classReviver(isPlainObject, () => ({}), async (revive, node, obj) => {
3621
- for (const [k, v] of globalThis.Object.entries(node)) obj[k] = await revive(v);
3622
- })
3623
- ];
3624
- };
3625
- const isVocab = (value) => value instanceof Object$1 || value instanceof Link;
3626
- const isPlainObject = (value) => value === null || typeof value !== "object" ? false : isObjectPrototype(globalThis.Object.getPrototypeOf(value));
3627
- const isObjectPrototype = (proto) => proto === null || proto === globalThis.Object.prototype;
3628
- const isInstanceOf = (cls) => (v) => v instanceof cls;
3629
- function getValueIfSchema(result) {
3630
- assertSchema(result);
3631
- return result.value;
3632
- }
3633
- function assertSchema(result) {
3634
- if (result.issues && result.issues.length > 0) throw new TypeError(`Task data failed schema validation: ${JSON.stringify(result.issues)}`);
3635
- }
3636
- /**
3637
- * A vocabulary object parked by the synchronous decode reviver, held until
3638
- * the async revive pass can `fromJsonLd()` it back into an instance.
3639
- */
3640
- var VocabHolder = class VocabHolder {
3641
- kind;
3642
- jsonLd;
3643
- constructor(kind, jsonLd) {
3644
- this.kind = kind;
3645
- this.jsonLd = jsonLd;
3646
- }
3647
- static from = ({ kind, jsonLd }) => new VocabHolder(kind, jsonLd);
3648
- };
3649
- /**
3650
- * Ties a container filter to its empty-shell `init` and child-filling `set`
3651
- * through one type parameter—a correlation the heterogeneous reviver list
3652
- * cannot carry, which previously forced `@ts-ignore` at the dispatch site.
3653
- */
3654
- const classReviver = (filter, init, set) => (seen, revive, node) => {
3655
- if (!filter(node)) return void 0;
3656
- return (async () => {
3657
- const out = await init(node);
3658
- seen.set(node, out);
3659
- await set(revive, node, out);
3660
- return out;
3661
- })();
3662
- };
3663
- //#endregion
3664
3555
  //#region src/federation/webfinger.ts
3665
3556
  const logger = getLogger([
3666
3557
  "fedify",
@@ -3968,6 +3859,15 @@ function isPermanentRemoteContextError(error) {
3968
3859
  function isPermanentInboxParseError(error) {
3969
3860
  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));
3970
3861
  }
3862
+ function hasLinkedDataSignatureJsonLdProcessingError(error) {
3863
+ if (error.message.startsWith("Maximum deep iterations exceeded")) return true;
3864
+ const cause = error.cause instanceof Error ? error.cause : error.details?.cause;
3865
+ if (error.name === "jsonld.InvalidUrl" && error.details?.code === "loading remote context failed" && cause instanceof Error) return cause.message.startsWith("Maximum deep iterations exceeded") || cause.name.startsWith("jsonld.");
3866
+ return error.name !== "jsonld.InvalidUrl" && error.name.startsWith("jsonld.");
3867
+ }
3868
+ function isLinkedDataSignatureJsonLdProcessingError(error) {
3869
+ return error instanceof Error && hasLinkedDataSignatureJsonLdProcessingError(error);
3870
+ }
3971
3871
  /**
3972
3872
  * Create a new {@link Federation} instance.
3973
3873
  * @param options Parameters for initializing the instance.
@@ -3985,12 +3885,9 @@ var FederationImpl = class extends FederationBuilderImpl {
3985
3885
  inboxQueue;
3986
3886
  outboxQueue;
3987
3887
  fanoutQueue;
3988
- taskQueue;
3989
3888
  inboxQueueStarted;
3990
3889
  outboxQueueStarted;
3991
3890
  fanoutQueueStarted;
3992
- taskQueueStarted;
3993
- startedTaskQueues;
3994
3891
  manuallyStartQueue;
3995
3892
  origin;
3996
3893
  documentLoaderFactory;
@@ -4004,8 +3901,6 @@ var FederationImpl = class extends FederationBuilderImpl {
4004
3901
  skipSignatureVerification;
4005
3902
  outboxRetryPolicy;
4006
3903
  inboxRetryPolicy;
4007
- taskRetryPolicy;
4008
- taskQueueResolution;
4009
3904
  circuitBreaker;
4010
3905
  activityTransformers;
4011
3906
  _tracerProvider;
@@ -4051,17 +3946,14 @@ var FederationImpl = class extends FederationBuilderImpl {
4051
3946
  this.inboxQueue = void 0;
4052
3947
  this.outboxQueue = void 0;
4053
3948
  this.fanoutQueue = void 0;
4054
- this.taskQueue = void 0;
4055
3949
  } else if ("enqueue" in options.queue && "listen" in options.queue) {
4056
3950
  this.inboxQueue = options.queue;
4057
3951
  this.outboxQueue = options.queue;
4058
3952
  this.fanoutQueue = options.queue;
4059
- this.taskQueue = void 0;
4060
3953
  } else {
4061
3954
  this.inboxQueue = options.queue.inbox;
4062
3955
  this.outboxQueue = options.queue.outbox;
4063
3956
  this.fanoutQueue = options.queue.fanout;
4064
- this.taskQueue = options.queue.task;
4065
3957
  }
4066
3958
  if (options.circuitBreaker !== false && this.outboxQueue != null) {
4067
3959
  this.circuitBreaker = new CircuitBreaker({
@@ -4085,8 +3977,6 @@ var FederationImpl = class extends FederationBuilderImpl {
4085
3977
  this.inboxQueueStarted = false;
4086
3978
  this.outboxQueueStarted = false;
4087
3979
  this.fanoutQueueStarted = false;
4088
- this.taskQueueStarted = false;
4089
- this.startedTaskQueues = /* @__PURE__ */ new Set();
4090
3980
  this.manuallyStartQueue = options.manuallyStartQueue ?? false;
4091
3981
  if (options.origin != null) if (typeof options.origin === "string") {
4092
3982
  if (!URL.canParse(options.origin) || !options.origin.match(/^https?:\/\//)) throw new TypeError(`Invalid origin: ${JSON.stringify(options.origin)}`);
@@ -4168,8 +4058,6 @@ var FederationImpl = class extends FederationBuilderImpl {
4168
4058
  this.inboxChallengePolicy = options.inboxChallengePolicy;
4169
4059
  this.outboxRetryPolicy = options.outboxRetryPolicy ?? createExponentialBackoffPolicy();
4170
4060
  this.inboxRetryPolicy = options.inboxRetryPolicy ?? createExponentialBackoffPolicy();
4171
- this.taskRetryPolicy = options.taskRetryPolicy ?? createExponentialBackoffPolicy();
4172
- this.taskQueueResolution = options.taskQueueResolution ?? "fallback";
4173
4061
  this.activityTransformers = options.activityTransformers ?? getDefaultActivityTransformers();
4174
4062
  this._tracerProvider = options.tracerProvider;
4175
4063
  if (benchmarkMode) {
@@ -4218,14 +4106,8 @@ var FederationImpl = class extends FederationBuilderImpl {
4218
4106
  _getTracer() {
4219
4107
  return this.tracerProvider.getTracer(name, version);
4220
4108
  }
4221
- resolveTaskQueue(taskName) {
4222
- const resolved = this.taskDefinitions.get(taskName)?.queue ?? this.taskQueue;
4223
- if (resolved != null) return resolved;
4224
- return this.taskQueueResolution === "strict" ? void 0 : this.outboxQueue;
4225
- }
4226
4109
  async _startQueueInternal(ctxData, signal, queue) {
4227
- const hasDedicatedTaskQueue = [...this.taskDefinitions.values()].some((def) => def.queue != null);
4228
- if (this.inboxQueue == null && this.outboxQueue == null && this.fanoutQueue == null && this.taskQueue == null && !hasDedicatedTaskQueue) return;
4110
+ if (this.inboxQueue == null && this.outboxQueue == null) return;
4229
4111
  const logger = getLogger([
4230
4112
  "fedify",
4231
4113
  "federation",
@@ -4247,26 +4129,6 @@ var FederationImpl = class extends FederationBuilderImpl {
4247
4129
  this.fanoutQueueStarted = true;
4248
4130
  promises.push(this.fanoutQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
4249
4131
  }
4250
- if (this.taskQueue != null && this.taskQueue !== this.inboxQueue && this.taskQueue !== this.outboxQueue && this.taskQueue !== this.fanoutQueue && (queue == null || queue === "task") && !this.taskQueueStarted) {
4251
- logger.debug("Starting a task worker.");
4252
- this.taskQueueStarted = true;
4253
- promises.push(this.taskQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
4254
- }
4255
- if (queue == null || queue === "task") {
4256
- const standardQueues = new Set([
4257
- this.inboxQueue,
4258
- this.outboxQueue,
4259
- this.fanoutQueue,
4260
- this.taskQueue
4261
- ].filter((q) => q != null));
4262
- for (const def of this.taskDefinitions.values()) {
4263
- const taskQueue = def.queue;
4264
- if (taskQueue == null || standardQueues.has(taskQueue) || this.startedTaskQueues.has(taskQueue)) continue;
4265
- logger.debug("Starting a worker for a dedicated per-task queue.");
4266
- this.startedTaskQueues.add(taskQueue);
4267
- promises.push(taskQueue.listen((msg) => this.processQueuedTask(ctxData, msg), { signal }));
4268
- }
4269
- }
4270
4132
  await Promise.all(promises);
4271
4133
  }
4272
4134
  processQueuedTask(contextData, message) {
@@ -4388,7 +4250,7 @@ var FederationImpl = class extends FederationBuilderImpl {
4388
4250
  }
4389
4251
  });
4390
4252
  });
4391
- } else if (message.type === "task") await this.#listenTaskMessage(contextData, message);
4253
+ }
4392
4254
  });
4393
4255
  }
4394
4256
  async #listenFanoutMessage(data, message) {
@@ -4952,77 +4814,6 @@ var FederationImpl = class extends FederationBuilderImpl {
4952
4814
  listenerSpan.end();
4953
4815
  });
4954
4816
  }
4955
- async #listenTaskMessage(contextData, message) {
4956
- const logger = getLogger([
4957
- "fedify",
4958
- "federation",
4959
- "task"
4960
- ]);
4961
- const def = this.taskDefinitions.get(message.taskName);
4962
- if (def == null) {
4963
- logger.warn("Received a custom task {taskName} with no registered handler; dropping.", { taskName: message.taskName });
4964
- return;
4965
- }
4966
- const context = this.#createContext(new URL(message.baseUrl), contextData);
4967
- let data;
4968
- try {
4969
- data = await context.codec.decode(def.schema, message.data);
4970
- } catch (error) {
4971
- logger.error("Custom task {taskName} payload could not be decoded or validated; dropping:\n{error}", {
4972
- taskName: message.taskName,
4973
- error
4974
- });
4975
- return;
4976
- }
4977
- try {
4978
- await def.handler(context, data);
4979
- } catch (error) {
4980
- if (def.onError != null) try {
4981
- await def.onError(context, error, data);
4982
- } catch (onErrorError) {
4983
- logger.error("onError for custom task {taskName} threw:\n{error}", {
4984
- taskName: message.taskName,
4985
- error: onErrorError
4986
- });
4987
- }
4988
- const queue = this.resolveTaskQueue(def.name);
4989
- if (queue?.nativeRetrial) throw error;
4990
- const retryPolicy = def.retryPolicy ?? this.taskRetryPolicy;
4991
- let elapsedTime = Temporal.Duration.from({ seconds: 0 });
4992
- try {
4993
- elapsedTime = Temporal.Instant.from(message.started).until(Temporal.Now.instant());
4994
- } catch (parseError) {
4995
- logger.error("Custom task {taskName} has an unparsable started time {started}; treating elapsedTime as zero:\n{error}", {
4996
- taskName: message.taskName,
4997
- started: message.started,
4998
- error: parseError
4999
- });
5000
- }
5001
- const delay = retryPolicy({
5002
- elapsedTime,
5003
- attempts: message.attempt
5004
- });
5005
- if (delay != null && queue != null) {
5006
- logger.error("Custom task {taskName} failed (attempt #{attempt}); retry...:\n{error}", {
5007
- taskName: message.taskName,
5008
- attempt: message.attempt,
5009
- error
5010
- });
5011
- const retryMessage = {
5012
- ...message,
5013
- attempt: message.attempt + 1
5014
- };
5015
- await queue.enqueue(retryMessage, {
5016
- delay: clampNegativeDelay(delay),
5017
- orderingKey: message.orderingKey
5018
- });
5019
- } else logger.error("Custom task {taskName} failed after {attempt} attempts; giving up:\n{error}", {
5020
- taskName: message.taskName,
5021
- attempt: message.attempt,
5022
- error
5023
- });
5024
- }
5025
- }
5026
4817
  startQueue(contextData, options = {}) {
5027
4818
  return this._startQueueInternal(contextData, options.signal, options.queue);
5028
4819
  }
@@ -5111,10 +4902,18 @@ var FederationImpl = class extends FederationBuilderImpl {
5111
4902
  privateKey: pair.privateKey
5112
4903
  }))
5113
4904
  });
5114
- else jsonLd = await signJsonLd(jsonLd, rsaKey.privateKey, rsaKey.keyId, {
5115
- contextLoader,
5116
- tracerProvider: this.tracerProvider
5117
- });
4905
+ else try {
4906
+ jsonLd = await signJsonLd(jsonLd, rsaKey.privateKey, rsaKey.keyId, {
4907
+ contextLoader,
4908
+ tracerProvider: this.tracerProvider
4909
+ });
4910
+ } catch (error) {
4911
+ if (!isLinkedDataSignatureJsonLdProcessingError(error)) throw error;
4912
+ logger.warn("Failed to create a Linked Data signature for the activity {activityId}. The activity will be sent without a Linked Data signature.", {
4913
+ activityId,
4914
+ error
4915
+ });
4916
+ }
5118
4917
  if (!hasProof) logger.warn("No supported key found to create a proof for the activity {activityId}. The activity will be sent without a proof. In order to create a proof, at least one Ed25519 key must be provided.", {
5119
4918
  activityId,
5120
4919
  keys: keys.map((pair) => ({
@@ -5599,7 +5398,6 @@ var ContextImpl = class ContextImpl {
5599
5398
  documentLoader;
5600
5399
  contextLoader;
5601
5400
  invokedFromActorKeyPairsDispatcher;
5602
- #codec;
5603
5401
  constructor({ url, federation, data, documentLoader, contextLoader, invokedFromActorKeyPairsDispatcher }) {
5604
5402
  this.url = url;
5605
5403
  this.federation = federation;
@@ -5608,15 +5406,6 @@ var ContextImpl = class ContextImpl {
5608
5406
  this.contextLoader = contextLoader;
5609
5407
  this.invokedFromActorKeyPairsDispatcher = invokedFromActorKeyPairsDispatcher;
5610
5408
  }
5611
- /**
5612
- * A {@link TaskCodec} bound to this context's loaders, used to encode
5613
- * and decode custom task payloads. Lazily created and cached so a context
5614
- * that never enqueues or dispatches a task pays nothing.
5615
- * @internal
5616
- */
5617
- get codec() {
5618
- return this.#codec ??= new TaskCodec(this);
5619
- }
5620
5409
  clone(data) {
5621
5410
  return new ContextImpl({
5622
5411
  url: this.url,
@@ -5935,45 +5724,6 @@ var ContextImpl = class ContextImpl {
5935
5724
  allowPrivateAddress: this.federation.allowPrivateAddress
5936
5725
  });
5937
5726
  }
5938
- async enqueueTask(task, data, options = {}) {
5939
- await this.#enqueueTasks(task, [data], options);
5940
- }
5941
- async enqueueTaskMany(task, payloads, options = {}) {
5942
- await this.#enqueueTasks(task, payloads, options);
5943
- }
5944
- async #enqueueTasks(task, items, options) {
5945
- const def = this.federation.taskDefinitions.get(task.name);
5946
- if (def == null || def.handle !== task) throw new TypeError(`Task ${JSON.stringify(task.name)} is not defined on this federation; pass a handle returned by its defineTask().`);
5947
- const queue = this.federation.resolveTaskQueue(task.name);
5948
- if (queue == null) throw new TypeError("No message queue is configured for tasks; pass `queue` to createFederation() or to defineTask().");
5949
- if (items.length < 1) return;
5950
- const delay = options.delay == null ? void 0 : Temporal.Duration.from(options.delay);
5951
- const messages = await Promise.all(items.map(this.#encodeTaskMessage(task, options)));
5952
- if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
5953
- const enqueueOptions = {
5954
- delay,
5955
- orderingKey: options.orderingKey
5956
- };
5957
- if (messages.length === 1) await queue.enqueue(messages[0], enqueueOptions);
5958
- else if (queue.enqueueMany != null) await queue.enqueueMany(messages, enqueueOptions);
5959
- else await Promise.all(messages.map((m) => queue.enqueue(m, enqueueOptions)));
5960
- }
5961
- #encodeTaskMessage = (task, options) => async (data) => {
5962
- const encoded = await this.codec.encode(task.schema, data);
5963
- const carrier = {};
5964
- propagation.inject(context.active(), carrier);
5965
- return {
5966
- type: "task",
5967
- id: crypto.randomUUID(),
5968
- baseUrl: this.origin,
5969
- taskName: task.name,
5970
- data: encoded,
5971
- started: Temporal.Now.instant().toString(),
5972
- attempt: 0,
5973
- orderingKey: options.orderingKey,
5974
- traceContext: carrier
5975
- };
5976
- };
5977
5727
  sendActivity(sender, recipients, activity, options = {}) {
5978
5728
  return this.tracerProvider.getTracer(name, version).startActiveSpan(this.federation.outboxQueue == null || options.immediate ? "activitypub.outbox" : "activitypub.fanout", {
5979
5729
  kind: this.federation.outboxQueue == null || options.immediate ? SpanKind.CLIENT : SpanKind.PRODUCER,
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, l as RequestContext, vt as WebFingerLinksDispatcher } from "./context-BuGH_Vft.cjs";
2
+ import { G as ActorDispatcher, K as ActorHandleMapper, W as ActorAliasMapper, l as RequestContext, pt as WebFingerLinksDispatcher } from "./context-BBVLF7lx.cjs";
3
3
  import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
4
4
  import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
5
5
 
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, l as RequestContext, vt as WebFingerLinksDispatcher } from "./context-CLtZxCu6.js";
2
+ import { G as ActorDispatcher, K as ActorHandleMapper, W as ActorAliasMapper, l as RequestContext, pt as WebFingerLinksDispatcher } from "./context-BU6jSQdo.js";
3
3
  import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
4
4
  import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
5
5
 
package/dist/mod.cjs CHANGED
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  require("./chunk-DDcVe30Y.cjs");
5
5
  const require_transformers = require("./transformers-NeAONrAq.cjs");
6
6
  require("./compat/mod.cjs");
7
- const require_http = require("./http-BCSQJ_gv.cjs");
8
- const require_middleware = require("./middleware-BiCk4wGY.cjs");
9
- const require_proof = require("./proof-DA3hLGSO.cjs");
7
+ const require_http = require("./http-DLqxhQg1.cjs");
8
+ const require_middleware = require("./middleware-V-r1QH5Z.cjs");
9
+ const require_proof = require("./proof-2WI6mMbC.cjs");
10
10
  const require_types = require("./types-KC4QAoxe.cjs");
11
- const require_kv_cache = require("./kv-cache-DXwu7BtY.cjs");
11
+ const require_kv_cache = require("./kv-cache-Fw-iwKjy.cjs");
12
12
  const require_federation_mod = require("./federation/mod.cjs");
13
13
  require("./nodeinfo/mod.cjs");
14
14
  require("./runtime/mod.cjs");
package/dist/mod.d.cts CHANGED
@@ -2,18 +2,18 @@
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CAM_bQXx.cjs";
3
3
  import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-VyDTd4G3.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-DEvZuyOE.cjs";
5
- import { $ as AuthorizePredicate, A as Rfc6570Expression, At as CircuitBreakerOptions, B as TaskHandler, C as FederationStartQueueOptions, Ct as digest, D as InboxListenerSetters, Dt as CircuitBreakerCreateOptions, E as InboxChallengePolicy, Et as CircuitBreakerBeforeSendDecision, F as Message, Ft as parseCircuitBreakerKvState, G as createExponentialBackoffPolicy, H as CreateExponentialBackoffPolicyOptions, I as createFederationBuilder, It as ActivityTransformer, J as respondWithObjectIfAcceptable, K as RespondWithObjectOptions, L as TaskDefinition, M as FederationOrigin, Mt as CircuitBreakerStateChange, N as FederationQueueOptions, Nt as NormalizedCircuitBreakerOptions, O as ObjectCallbackSetters, Ot as CircuitBreakerFailurePolicy, P as createFederation, Pt as normalizeCircuitBreakerOptions, Q as ActorKeyPairsDispatcher, R as TaskDefinitionOptions, S as FederationOptions, St as buildCollectionSynchronizationHeader, T as IdempotencyStrategy, Tt as CircuitBreakerActivityDrop, U as RetryContext, V as TaskRegistry, W as RetryPolicy, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as Federatable, _t as UnverifiedActivityReason, a as GetSignedKeyOptions, at as CustomCollectionDispatcher, b as FederationBuilder, bt as SenderKeyPair, c as ParseUriResult, ct as NodeInfoDispatcher, d as SendActivityOptions, dt as OutboxErrorHandler, et as CollectionCounter, f as SendActivityOptionsForCollection, ft as OutboxListener, g as CustomCollectionCallbackSetters, gt as UnverifiedActivityHandler, h as ConstructorWithTypeId, ht as SharedInboxKeyDispatcher, i as GetActorOptions, it as CustomCollectionCursor, j as FederationKvPrefixes, jt as CircuitBreakerState, k as OutboxListenerSetters, kt as CircuitBreakerKvState, l as RequestContext, lt as ObjectAuthorizePredicate, m as CollectionCallbackSetters, mt as OutboxPermanentFailureHandler, n as Context, nt as CollectionDispatcher, o as InboxContext, ot as InboxErrorHandler, p as ActorCallbackSetters, pt as OutboxListenerErrorHandler, q as respondWithObject, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as OutboxContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as RouteActivityOptions, ut as ObjectDispatcher, v as Federation, vt as WebFingerLinksDispatcher, w as IdempotencyKeyCallback, wt as CircuitBreaker, x as FederationFetchOptions, xt as PageItems, y as FederationBenchmarkOptions, yt as SendActivityError, z as TaskEnqueueOptions } from "./context-BuGH_Vft.cjs";
5
+ import { $ as CustomCollectionCursor, A as Rfc6570Expression, At as parseCircuitBreakerKvState, B as createFederationBuilder, C as FederationStartQueueOptions, Ct as CircuitBreakerFailurePolicy, D as InboxListenerSetters, Dt as CircuitBreakerStateChange, E as InboxChallengePolicy, Et as CircuitBreakerState, F as CreateExponentialBackoffPolicyOptions, G as ActorDispatcher, H as respondWithObject, I as RetryContext, J as AuthorizePredicate, K as ActorHandleMapper, L as RetryPolicy, M as FederationOrigin, N as FederationQueueOptions, O as ObjectCallbackSetters, Ot as NormalizedCircuitBreakerOptions, P as createFederation, Q as CustomCollectionCounter, R as createExponentialBackoffPolicy, S as FederationOptions, St as CircuitBreakerCreateOptions, T as IdempotencyStrategy, Tt as CircuitBreakerOptions, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as ActorAliasMapper, X as CollectionCursor, Y as CollectionCounter, Z as CollectionDispatcher, _ as Federatable, _t as buildCollectionSynchronizationHeader, a as GetSignedKeyOptions, at as ObjectDispatcher, b as FederationBuilder, bt as CircuitBreakerActivityDrop, c as ParseUriResult, ct as OutboxListenerErrorHandler, d as SendActivityOptions, dt as UnverifiedActivityHandler, et as CustomCollectionDispatcher, f as SendActivityOptionsForCollection, ft as UnverifiedActivityReason, g as CustomCollectionCallbackSetters, gt as PageItems, h as ConstructorWithTypeId, ht as SenderKeyPair, i as GetActorOptions, it as ObjectAuthorizePredicate, j as FederationKvPrefixes, jt as ActivityTransformer, k as OutboxListenerSetters, kt as normalizeCircuitBreakerOptions, l as RequestContext, lt as OutboxPermanentFailureHandler, m as CollectionCallbackSetters, mt as SendActivityError, n as Context, nt as InboxListener, o as InboxContext, ot as OutboxErrorHandler, p as ActorCallbackSetters, pt as WebFingerLinksDispatcher, q as ActorKeyPairsDispatcher, r as ForwardActivityOptions, rt as NodeInfoDispatcher, s as OutboxContext, st as OutboxListener, t as ActorKeyPair, tt as InboxErrorHandler, u as RouteActivityOptions, ut as SharedInboxKeyDispatcher, v as Federation, vt as digest, w as IdempotencyKeyCallback, wt as CircuitBreakerKvState, x as FederationFetchOptions, xt as CircuitBreakerBeforeSendDecision, y as FederationBenchmarkOptions, yt as CircuitBreaker, z as Message } from "./context-BBVLF7lx.cjs";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-gJ8LYbxX.cjs";
7
7
  import { a as MessageQueueEnqueueOptions, i as MessageQueueDepth, n as InProcessMessageQueueOptions, o as MessageQueueListenOptions, r as MessageQueue, s as ParallelMessageQueue, t as InProcessMessageQueue } from "./mq-D8uSFzxe.cjs";
8
8
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
9
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-DRokcHeU.cjs";
9
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-C0F6kvgS.cjs";
10
10
  import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-B0hW12_O.cjs";
11
11
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-yvIXFAEi.cjs";
12
12
  export * from "@fedify/vocab-runtime";
13
13
 
14
14
  //#region src/mod.d.ts
15
15
  declare namespace mod_d_exports {
16
- export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
16
+ export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
17
17
  }
18
18
  //#endregion
19
- export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
19
+ export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };