@fedify/fedify 1.9.0-dev.1613 → 1.9.0-dev.1689

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 (138) hide show
  1. package/dist/{actor-Ch5yFYFG.d.ts → actor-C1Euqngb.d.ts} +1 -1
  2. package/dist/{actor-BkOvltE1.cjs → actor-CK94m0Yv.cjs} +7263 -2440
  3. package/dist/{actor-BrhPUG_N.js → actor-Dpkqj5Dv.js} +7263 -2440
  4. package/dist/{actor-Do9KG1O2.js → actor-DzdLVqkJ.js} +1 -1
  5. package/dist/{actor-CHOM_AN3.d.cts → actor-Ydzhc8dj.d.cts} +1 -1
  6. package/dist/{authdocloader-lcfCE1vG.cjs → authdocloader-4iBGWlQw.cjs} +3 -3
  7. package/dist/{authdocloader-CF0X5NR7.js → authdocloader-BVvTFQbi.js} +3 -3
  8. package/dist/{authdocloader-D_pDyzSu.js → authdocloader-DdSBpn11.js} +3 -3
  9. package/dist/{builder-CwFGbC7w.js → builder-BR--hcb8.js} +10 -4
  10. package/dist/{client-CkjMau5E.js → client-BoUqciR8.js} +1 -1
  11. package/dist/compat/mod.d.cts +7 -7
  12. package/dist/compat/mod.d.ts +7 -7
  13. package/dist/compat/transformers.test.js +16 -16
  14. package/dist/{context-DFruNLny.d.ts → context-CZorAkt8.d.ts} +66 -6
  15. package/dist/{context-KXVF2AhH.d.cts → context-DCh96LcF.d.cts} +66 -6
  16. package/dist/{docloader-CCo7N8E2.cjs → docloader-Bui9z8Lb.cjs} +1 -1
  17. package/dist/{docloader-CB-b64F8.js → docloader-DyvW1gbN.js} +1 -1
  18. package/dist/{esm-BeBLf_np.js → esm-DMb2eQXG.js} +1 -1
  19. package/dist/federation/builder.test.js +5 -5
  20. package/dist/federation/collection.test.js +3 -3
  21. package/dist/federation/handler.test.js +17 -17
  22. package/dist/federation/idempotency.test.d.ts +3 -0
  23. package/dist/federation/idempotency.test.js +202 -0
  24. package/dist/federation/inbox.test.js +4 -4
  25. package/dist/federation/keycache.test.js +4 -4
  26. package/dist/federation/kv.test.js +4 -3
  27. package/dist/federation/middleware.test.js +18 -18
  28. package/dist/federation/mod.cjs +10 -10
  29. package/dist/federation/mod.d.cts +7 -7
  30. package/dist/federation/mod.d.ts +7 -7
  31. package/dist/federation/mod.js +10 -10
  32. package/dist/federation/mq.test.js +3 -3
  33. package/dist/federation/retry.test.js +3 -3
  34. package/dist/federation/router.test.js +3 -3
  35. package/dist/federation/send.test.js +10 -10
  36. package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +6 -0
  37. package/dist/{http-B_zBcsai.d.cts → http-B1_DzfAU.d.cts} +1 -1
  38. package/dist/{http-DpcYXIiB.cjs → http-BAaVL480.cjs} +3 -3
  39. package/dist/{http-zgzZkO8A.js → http-C7nvEG1N.js} +2 -2
  40. package/dist/{http-D8Q4xH0d.d.ts → http-wsGR6KkT.d.ts} +1 -1
  41. package/dist/{http-CmDy8xoP.js → http-xsj5Fzwl.js} +3 -3
  42. package/dist/{inbox-CirfyLns.js → inbox-DZNE3Jtq.js} +29 -7
  43. package/dist/{key-CN1jS3_Y.js → key-C25gGlmV.js} +2 -2
  44. package/dist/key-CHU24Npw.cjs +10 -0
  45. package/dist/{key-Dq2ZV4ZW.js → key-CbnQpdZy.js} +2 -2
  46. package/dist/{key-BytDOwJJ.js → key-DOPWTj2e.js} +4 -4
  47. package/dist/{key-DgFXwwZv.js → key-DgZIZVqA.js} +3 -3
  48. package/dist/{key-4EZXrjJw.cjs → key-DqqCoLbc.cjs} +2 -2
  49. package/dist/{keycache-COrk8-eB.js → keycache-CoMI1L_W.js} +1 -1
  50. package/dist/{keys-BieqxHLC.js → keys-CMahfArj.js} +1 -1
  51. package/dist/{ld-o8aGatC0.js → ld-WZpO-MzE.js} +2 -2
  52. package/dist/{lookup-CwHCSBI8.cjs → lookup-D_w567L8.cjs} +1 -1
  53. package/dist/{lookup-DADsKd8V.js → lookup-WoJkw8wY.js} +1 -1
  54. package/dist/{lookup-BkaLctZw.js → lookup-y6-PEpxS.js} +21 -12
  55. package/dist/middleware-BYEKw_OJ.js +17 -0
  56. package/dist/{middleware-BcqldfgB.cjs → middleware-CWlrInU2.cjs} +66 -34
  57. package/dist/{middleware-CuCsnDA9.js → middleware-Cj9WC_iX.js} +66 -34
  58. package/dist/{middleware-B1iLu-jg.js → middleware-CjgR6ayA.js} +35 -31
  59. package/dist/middleware-DbxA0Z6o.js +26 -0
  60. package/dist/middleware-hTlyJu9R.cjs +17 -0
  61. package/dist/{mod-NKH_G-IY.d.cts → mod-BUbqxBev.d.cts} +19 -1
  62. package/dist/{mod-YfAcrVbP.d.cts → mod-BojaEE1l.d.cts} +2 -2
  63. package/dist/{mod-Cy6pkZSn.d.ts → mod-CDObsV1d.d.ts} +19 -1
  64. package/dist/{mod-BAuhKa9d.d.ts → mod-CIbqfZW0.d.ts} +1 -1
  65. package/dist/{mod-B7Pc0I7F.d.ts → mod-DgcYoyZK.d.ts} +2 -2
  66. package/dist/{mod-C3CGxYoF.d.cts → mod-Dt-G9ZOS.d.cts} +1 -1
  67. package/dist/{mod-COw_caPC.d.cts → mod-fjqfsrty.d.cts} +2 -2
  68. package/dist/{mod-CiXjux2r.d.ts → mod-tWXEItkO.d.ts} +2 -2
  69. package/dist/mod.cjs +10 -10
  70. package/dist/mod.d.cts +10 -10
  71. package/dist/mod.d.ts +10 -10
  72. package/dist/mod.js +10 -10
  73. package/dist/nodeinfo/client.test.js +5 -5
  74. package/dist/nodeinfo/handler.test.js +16 -16
  75. package/dist/nodeinfo/mod.cjs +2 -2
  76. package/dist/nodeinfo/mod.js +2 -2
  77. package/dist/nodeinfo/semver.test.js +3 -3
  78. package/dist/nodeinfo/types.test.js +3 -3
  79. package/dist/{owner-C9Ry0TOI.d.cts → owner-6KSEp9eV.d.cts} +2 -2
  80. package/dist/{owner-D38zBIMc.d.ts → owner-BbeUDvOu.d.ts} +2 -2
  81. package/dist/{owner-qeK3HiL9.js → owner-CPBOVM7l.js} +2 -2
  82. package/dist/{proof-DasSZLsd.cjs → proof-BLoRsaYR.cjs} +3 -3
  83. package/dist/{proof-BSqN3lwx.js → proof-CpmDDzvf.js} +3 -3
  84. package/dist/{proof-0MIJ70kC.js → proof-h0JvKPRP.js} +2 -2
  85. package/dist/runtime/authdocloader.test.js +9 -9
  86. package/dist/runtime/docloader.test.js +4 -4
  87. package/dist/runtime/key.test.js +5 -5
  88. package/dist/runtime/langstr.test.js +3 -3
  89. package/dist/runtime/link.test.js +3 -3
  90. package/dist/runtime/mod.cjs +6 -6
  91. package/dist/runtime/mod.d.cts +3 -3
  92. package/dist/runtime/mod.d.ts +3 -3
  93. package/dist/runtime/mod.js +6 -6
  94. package/dist/runtime/multibase/multibase.test.js +3 -3
  95. package/dist/runtime/url.test.js +3 -3
  96. package/dist/{send-CuL-kYv7.js → send-CD-m2vwX.js} +2 -2
  97. package/dist/sig/http.test.js +8 -8
  98. package/dist/sig/key.test.js +6 -6
  99. package/dist/sig/ld.test.js +7 -7
  100. package/dist/sig/mod.cjs +6 -6
  101. package/dist/sig/mod.d.cts +5 -5
  102. package/dist/sig/mod.d.ts +5 -5
  103. package/dist/sig/mod.js +6 -6
  104. package/dist/sig/owner.test.js +7 -7
  105. package/dist/sig/proof.test.js +7 -7
  106. package/dist/testing/docloader.test.js +3 -3
  107. package/dist/testing/mod.d.ts +272 -0
  108. package/dist/testing/mod.js +3 -3
  109. package/dist/{testing-Did3bCyV.js → testing-DvTABhvG.js} +2 -2
  110. package/dist/{type-Bm9mdHQS.js → type-BCazg_Pu.js} +6943 -2120
  111. package/dist/{types-B9ZmKzEm.js → types-BsM0mf3R.js} +1 -1
  112. package/dist/{types-DF88bXyE.cjs → types-F8JMlP-f.cjs} +1 -1
  113. package/dist/vocab/actor.test.js +5 -5
  114. package/dist/vocab/lookup.test.js +255 -5
  115. package/dist/vocab/mod.cjs +4 -4
  116. package/dist/vocab/mod.d.cts +3 -3
  117. package/dist/vocab/mod.d.ts +3 -3
  118. package/dist/vocab/mod.js +4 -4
  119. package/dist/vocab/type.test.js +3 -3
  120. package/dist/vocab/vocab.test.js +433 -9
  121. package/dist/{vocab-DFyEBhSA.cjs → vocab-C-qxDq1m.cjs} +23 -14
  122. package/dist/{vocab-BEEm2I6u.d.ts → vocab-CDHNj5zp.d.ts} +290 -0
  123. package/dist/{vocab-BzGg7ltX.d.cts → vocab-Cfs0937i.d.cts} +290 -0
  124. package/dist/{vocab-BVOFD7iz.js → vocab-DdTdRfBW.js} +23 -14
  125. package/dist/webfinger/handler.test.js +16 -16
  126. package/dist/webfinger/lookup.test.js +4 -4
  127. package/dist/webfinger/mod.cjs +2 -2
  128. package/dist/webfinger/mod.js +2 -2
  129. package/dist/x/cfworkers.test.js +3 -3
  130. package/dist/x/hono.d.cts +6 -6
  131. package/dist/x/hono.d.ts +6 -6
  132. package/dist/x/sveltekit.d.cts +6 -6
  133. package/dist/x/sveltekit.d.ts +6 -6
  134. package/package.json +1 -1
  135. package/dist/key-BSapRu6X.cjs +0 -10
  136. package/dist/middleware-3K0jP9Du.js +0 -26
  137. package/dist/middleware-CZyWbiwd.js +0 -17
  138. package/dist/middleware-T8MY-txY.cjs +0 -17
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Application, Group, Organization, Person, Service, deno_default, getTypeId, lookupWebFinger } from "./type-Bm9mdHQS.js";
6
+ import { Application, Group, Organization, Person, Service, deno_default, getTypeId, lookupWebFinger } from "./type-BCazg_Pu.js";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { domainToASCII, domainToUnicode } from "node:url";
9
9
 
@@ -1,5 +1,5 @@
1
1
  import { GetUserAgentOptions } from "./docloader-D-MrRyHl.cjs";
2
- import { Application, Group, Organization, Person, Service } from "./vocab-BzGg7ltX.cjs";
2
+ import { Application, Group, Organization, Person, Service } from "./vocab-Cfs0937i.cjs";
3
3
  import { TracerProvider } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/vocab/actor.d.ts
@@ -3,9 +3,9 @@
3
3
  const { URLPattern } = require("urlpattern-polyfill");
4
4
 
5
5
  const require_chunk = require('./chunk-DqRYRqnO.cjs');
6
- const require_docloader = require('./docloader-CCo7N8E2.cjs');
7
- const require_key = require('./key-4EZXrjJw.cjs');
8
- const require_http = require('./http-DpcYXIiB.cjs');
6
+ const require_docloader = require('./docloader-Bui9z8Lb.cjs');
7
+ const require_key = require('./key-DqqCoLbc.cjs');
8
+ const require_http = require('./http-BAaVL480.cjs');
9
9
  const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
10
10
 
11
11
  //#region src/runtime/authdocloader.ts
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-CB-b64F8.js";
6
- import { validateCryptoKey } from "./key-Dq2ZV4ZW.js";
7
- import { doubleKnock } from "./http-CmDy8xoP.js";
5
+ import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-DyvW1gbN.js";
6
+ import { validateCryptoKey } from "./key-CbnQpdZy.js";
7
+ import { doubleKnock } from "./http-xsj5Fzwl.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
 
10
10
  //#region src/runtime/authdocloader.ts
@@ -3,9 +3,9 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./type-Bm9mdHQS.js";
7
- import { validateCryptoKey } from "./key-CN1jS3_Y.js";
8
- import { doubleKnock } from "./http-zgzZkO8A.js";
6
+ import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./type-BCazg_Pu.js";
7
+ import { validateCryptoKey } from "./key-C25gGlmV.js";
8
+ import { doubleKnock } from "./http-C7nvEG1N.js";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
 
11
11
  //#region src/runtime/authdocloader.ts
@@ -3,9 +3,9 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default, getTypeId } from "./type-Bm9mdHQS.js";
7
- import { Router, RouterError } from "./lookup-BkaLctZw.js";
8
- import { InboxListenerSet } from "./inbox-CirfyLns.js";
6
+ import { deno_default, getTypeId } from "./type-BCazg_Pu.js";
7
+ import { Router, RouterError } from "./lookup-y6-PEpxS.js";
8
+ import { InboxListenerSet } from "./inbox-DZNE3Jtq.js";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
11
11
 
@@ -28,6 +28,7 @@ var FederationBuilderImpl = class {
28
28
  inboxListeners;
29
29
  inboxErrorHandler;
30
30
  sharedInboxKeyDispatcher;
31
+ idempotencyStrategy;
31
32
  collectionTypeIds;
32
33
  collectionCallbacks;
33
34
  /**
@@ -42,7 +43,7 @@ var FederationBuilderImpl = class {
42
43
  this.collectionTypeIds = {};
43
44
  }
44
45
  async build(options) {
45
- const { FederationImpl } = await import("./middleware-3K0jP9Du.js");
46
+ const { FederationImpl } = await import("./middleware-DbxA0Z6o.js");
46
47
  const f = new FederationImpl(options);
47
48
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
48
49
  f.router = this.router.clone();
@@ -64,6 +65,7 @@ var FederationBuilderImpl = class {
64
65
  f.inboxListeners = this.inboxListeners?.clone();
65
66
  f.inboxErrorHandler = this.inboxErrorHandler;
66
67
  f.sharedInboxKeyDispatcher = this.sharedInboxKeyDispatcher;
68
+ f.idempotencyStrategy = this.idempotencyStrategy;
67
69
  return f;
68
70
  }
69
71
  _getTracer() {
@@ -486,6 +488,10 @@ var FederationBuilderImpl = class {
486
488
  setSharedKeyDispatcher: (dispatcher) => {
487
489
  this.sharedInboxKeyDispatcher = dispatcher;
488
490
  return setters;
491
+ },
492
+ withIdempotency: (strategy) => {
493
+ this.idempotencyStrategy = strategy;
494
+ return setters;
489
495
  }
490
496
  };
491
497
  return setters;
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { getUserAgent } from "./type-Bm9mdHQS.js";
6
+ import { getUserAgent } from "./type-BCazg_Pu.js";
7
7
  import { parseSemVer } from "./semver-dArNLkR9.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
 
@@ -1,13 +1,13 @@
1
1
  import "../kv-63Cil1MD.cjs";
2
2
  import "../docloader-D-MrRyHl.cjs";
3
3
  import "../client-DjT_tegg.cjs";
4
- import "../vocab-BzGg7ltX.cjs";
5
- import "../actor-CHOM_AN3.cjs";
6
- import "../http-B_zBcsai.cjs";
7
- import "../owner-C9Ry0TOI.cjs";
8
- import "../mod-NKH_G-IY.cjs";
4
+ import "../vocab-Cfs0937i.cjs";
5
+ import "../actor-Ydzhc8dj.cjs";
6
+ import "../http-B1_DzfAU.cjs";
7
+ import "../owner-6KSEp9eV.cjs";
8
+ import "../mod-BUbqxBev.cjs";
9
9
  import "../mod-jQ4OODsl.cjs";
10
- import { ActivityTransformer } from "../context-KXVF2AhH.cjs";
10
+ import { ActivityTransformer } from "../context-DCh96LcF.cjs";
11
11
  import "../mq-B7R1Q-M5.cjs";
12
- import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-YfAcrVbP.cjs";
12
+ import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-BojaEE1l.cjs";
13
13
  export { ActivityTransformer, actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
@@ -3,13 +3,13 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "../kv-C7sopW2E.js";
4
4
  import "../docloader-CxWcuWqQ.js";
5
5
  import "../client-DF8anIB5.js";
6
- import "../vocab-BEEm2I6u.js";
7
- import "../actor-Ch5yFYFG.js";
8
- import "../http-D8Q4xH0d.js";
9
- import "../owner-D38zBIMc.js";
10
- import "../mod-Cy6pkZSn.js";
6
+ import "../vocab-CDHNj5zp.js";
7
+ import "../actor-C1Euqngb.js";
8
+ import "../http-wsGR6KkT.js";
9
+ import "../owner-BbeUDvOu.js";
10
+ import "../mod-CDObsV1d.js";
11
11
  import "../mod-DBzN0aCM.js";
12
- import { ActivityTransformer } from "../context-DFruNLny.js";
12
+ import { ActivityTransformer } from "../context-CZorAkt8.js";
13
13
  import "../mq-CRGm1e_F.js";
14
- import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-CiXjux2r.js";
14
+ import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-tWXEItkO.js";
15
15
  export { ActivityTransformer, actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
@@ -3,30 +3,30 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Follow, Person } from "../type-Bm9mdHQS.js";
6
+ import { Follow, Person } from "../type-BCazg_Pu.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import { assert } from "../assert-MZs1qjMx.js";
9
9
  import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
- import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-B1iLu-jg.js";
11
+ import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-CjgR6ayA.js";
12
12
  import "../semver-dArNLkR9.js";
13
- import "../client-CkjMau5E.js";
14
- import "../lookup-BkaLctZw.js";
13
+ import "../client-BoUqciR8.js";
14
+ import "../lookup-y6-PEpxS.js";
15
15
  import "../types-BIgY6c-l.js";
16
- import "../actor-Do9KG1O2.js";
17
- import "../key-CN1jS3_Y.js";
18
- import "../http-zgzZkO8A.js";
19
- import "../authdocloader-D_pDyzSu.js";
20
- import "../ld-o8aGatC0.js";
21
- import "../owner-qeK3HiL9.js";
22
- import "../proof-0MIJ70kC.js";
23
- import "../inbox-CirfyLns.js";
24
- import "../builder-CwFGbC7w.js";
16
+ import "../actor-DzdLVqkJ.js";
17
+ import "../key-C25gGlmV.js";
18
+ import "../http-C7nvEG1N.js";
19
+ import "../authdocloader-DdSBpn11.js";
20
+ import "../ld-WZpO-MzE.js";
21
+ import "../owner-CPBOVM7l.js";
22
+ import "../proof-h0JvKPRP.js";
23
+ import "../inbox-DZNE3Jtq.js";
24
+ import "../builder-BR--hcb8.js";
25
25
  import "../collection-CSzG2j1P.js";
26
- import "../keycache-COrk8-eB.js";
26
+ import "../keycache-CoMI1L_W.js";
27
27
  import "../retry-D4GJ670a.js";
28
- import "../send-CuL-kYv7.js";
29
- import { test } from "../testing-Did3bCyV.js";
28
+ import "../send-CD-m2vwX.js";
29
+ import { test } from "../testing-DvTABhvG.js";
30
30
 
31
31
  //#region src/compat/transformers.test.ts
32
32
  const federation = new FederationImpl({ kv: new MemoryKvStore() });
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import { KvKey, KvStore } from "./kv-C7sopW2E.js";
4
4
  import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "./docloader-CxWcuWqQ.js";
5
5
  import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-DF8anIB5.js";
6
- import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-BEEm2I6u.js";
7
- import { Actor, Recipient } from "./actor-Ch5yFYFG.js";
8
- import { HttpMessageSignaturesSpec } from "./http-D8Q4xH0d.js";
9
- import { GetKeyOwnerOptions } from "./owner-D38zBIMc.js";
10
- import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-Cy6pkZSn.js";
6
+ import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-CDHNj5zp.js";
7
+ import { Actor, Recipient } from "./actor-C1Euqngb.js";
8
+ import { HttpMessageSignaturesSpec } from "./http-wsGR6KkT.js";
9
+ import { GetKeyOwnerOptions } from "./owner-BbeUDvOu.js";
10
+ import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-CDObsV1d.js";
11
11
  import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "./mod-DBzN0aCM.js";
12
12
  import { MessageQueue } from "./mq-CRGm1e_F.js";
13
13
  import { Span, TracerProvider } from "@opentelemetry/api";
@@ -1312,6 +1312,36 @@ interface CollectionCallbackSetters<TContext extends Context<TContextData>, TCon
1312
1312
  */
1313
1313
  authorize(predicate: AuthorizePredicate<TContextData>): CollectionCallbackSetters<TContext, TContextData, TFilter>;
1314
1314
  }
1315
+ /**
1316
+ * The strategy for handling activity idempotency in inbox processing.
1317
+ *
1318
+ * - `"global"`: Activities are deduplicated globally across all inboxes and
1319
+ * origins. The same activity ID will be processed only once, regardless
1320
+ * of which inbox receives it or which server sent it.
1321
+ *
1322
+ * - `"per-origin"`: Activities are deduplicated per receiving server's origin.
1323
+ * The same activity ID will be processed only once on each receiving server,
1324
+ * but can be processed separately on different receiving servers. This was
1325
+ * the default behavior in Fedify 1.x versions.
1326
+ *
1327
+ * - `"per-inbox"`: Activities are deduplicated per inbox. The same activity
1328
+ * ID can be processed once per inbox, allowing the same activity to be
1329
+ * delivered to multiple inboxes independently. This follows standard
1330
+ * ActivityPub behavior and will be the default in Fedify 2.0.
1331
+ *
1332
+ * @since 1.9.0
1333
+ */
1334
+ type IdempotencyStrategy = "global" | "per-origin" | "per-inbox";
1335
+ /**
1336
+ * A callback to generate a custom idempotency key for an activity.
1337
+ * Returns the cache key to use, or null to skip idempotency checking.
1338
+ * @template TContextData The context data to pass to the {@link InboxContext}.
1339
+ * @param ctx The inbox context.
1340
+ * @param activity The activity being processed.
1341
+ * @returns The idempotency key to use for caching, or null to skip caching.
1342
+ * @since 1.9.0
1343
+ */
1344
+ type IdempotencyKeyCallback<TContextData> = (ctx: InboxContext<TContextData>, activity: Activity) => string | null | Promise<string | null>;
1315
1345
  /**
1316
1346
  * Registry for inbox listeners for different activity types.
1317
1347
  */
@@ -1342,6 +1372,36 @@ interface InboxListenerSetters<TContextData> {
1342
1372
  * @since 0.11.0
1343
1373
  */
1344
1374
  setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData>): InboxListenerSetters<TContextData>;
1375
+ /**
1376
+ * Configures the strategy for handling activity idempotency in inbox processing.
1377
+ *
1378
+ * @example
1379
+ * Use per-inbox strategy (standard ActivityPub behavior):
1380
+ * ```
1381
+ * federation
1382
+ * .setInboxListeners("/users/{identifier}/inbox", "/inbox")
1383
+ * .withIdempotency("per-inbox");
1384
+ * ```
1385
+ *
1386
+ * Use custom strategy:
1387
+ * ```
1388
+ * federation
1389
+ * .setInboxListeners("/users/{identifier}/inbox", "/inbox")
1390
+ * .withIdempotency((ctx, activity) => {
1391
+ * // Return null to skip idempotency
1392
+ * return `${ctx.origin}:${activity.id?.href}:${ctx.recipient}`;
1393
+ * });
1394
+ * ```
1395
+ *
1396
+ * @param strategy The idempotency strategy to use. Can be:
1397
+ * - `"global"`: Activities are deduplicated across all inboxes and origins
1398
+ * - `"per-origin"`: Activities are deduplicated per inbox origin
1399
+ * - `"per-inbox"`: Activities are deduplicated per inbox
1400
+ * - A custom callback function that returns the cache key to use
1401
+ * @returns The setters object so that settings can be chained.
1402
+ * @since 1.9.0
1403
+ */
1404
+ withIdempotency(strategy: IdempotencyStrategy | IdempotencyKeyCallback<TContextData>): InboxListenerSetters<TContextData>;
1345
1405
  }
1346
1406
  /**
1347
1407
  * Parameters of {@link Federation.fetch} method.
@@ -2260,4 +2320,4 @@ interface ActorKeyPair extends CryptoKeyPair {
2260
2320
  multikey: Multikey;
2261
2321
  }
2262
2322
  //#endregion
2263
- export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
2323
+ export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,11 +1,11 @@
1
1
  import { KvKey, KvStore } from "./kv-63Cil1MD.cjs";
2
2
  import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "./docloader-D-MrRyHl.cjs";
3
3
  import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-DjT_tegg.cjs";
4
- import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-BzGg7ltX.cjs";
5
- import { Actor, Recipient } from "./actor-CHOM_AN3.cjs";
6
- import { HttpMessageSignaturesSpec } from "./http-B_zBcsai.cjs";
7
- import { GetKeyOwnerOptions } from "./owner-C9Ry0TOI.cjs";
8
- import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-NKH_G-IY.cjs";
4
+ import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-Cfs0937i.cjs";
5
+ import { Actor, Recipient } from "./actor-Ydzhc8dj.cjs";
6
+ import { HttpMessageSignaturesSpec } from "./http-B1_DzfAU.cjs";
7
+ import { GetKeyOwnerOptions } from "./owner-6KSEp9eV.cjs";
8
+ import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-BUbqxBev.cjs";
9
9
  import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "./mod-jQ4OODsl.cjs";
10
10
  import { MessageQueue } from "./mq-B7R1Q-M5.cjs";
11
11
  import { Span, TracerProvider } from "@opentelemetry/api";
@@ -1310,6 +1310,36 @@ interface CollectionCallbackSetters<TContext extends Context<TContextData>, TCon
1310
1310
  */
1311
1311
  authorize(predicate: AuthorizePredicate<TContextData>): CollectionCallbackSetters<TContext, TContextData, TFilter>;
1312
1312
  }
1313
+ /**
1314
+ * The strategy for handling activity idempotency in inbox processing.
1315
+ *
1316
+ * - `"global"`: Activities are deduplicated globally across all inboxes and
1317
+ * origins. The same activity ID will be processed only once, regardless
1318
+ * of which inbox receives it or which server sent it.
1319
+ *
1320
+ * - `"per-origin"`: Activities are deduplicated per receiving server's origin.
1321
+ * The same activity ID will be processed only once on each receiving server,
1322
+ * but can be processed separately on different receiving servers. This was
1323
+ * the default behavior in Fedify 1.x versions.
1324
+ *
1325
+ * - `"per-inbox"`: Activities are deduplicated per inbox. The same activity
1326
+ * ID can be processed once per inbox, allowing the same activity to be
1327
+ * delivered to multiple inboxes independently. This follows standard
1328
+ * ActivityPub behavior and will be the default in Fedify 2.0.
1329
+ *
1330
+ * @since 1.9.0
1331
+ */
1332
+ type IdempotencyStrategy = "global" | "per-origin" | "per-inbox";
1333
+ /**
1334
+ * A callback to generate a custom idempotency key for an activity.
1335
+ * Returns the cache key to use, or null to skip idempotency checking.
1336
+ * @template TContextData The context data to pass to the {@link InboxContext}.
1337
+ * @param ctx The inbox context.
1338
+ * @param activity The activity being processed.
1339
+ * @returns The idempotency key to use for caching, or null to skip caching.
1340
+ * @since 1.9.0
1341
+ */
1342
+ type IdempotencyKeyCallback<TContextData> = (ctx: InboxContext<TContextData>, activity: Activity) => string | null | Promise<string | null>;
1313
1343
  /**
1314
1344
  * Registry for inbox listeners for different activity types.
1315
1345
  */
@@ -1340,6 +1370,36 @@ interface InboxListenerSetters<TContextData> {
1340
1370
  * @since 0.11.0
1341
1371
  */
1342
1372
  setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData>): InboxListenerSetters<TContextData>;
1373
+ /**
1374
+ * Configures the strategy for handling activity idempotency in inbox processing.
1375
+ *
1376
+ * @example
1377
+ * Use per-inbox strategy (standard ActivityPub behavior):
1378
+ * ```
1379
+ * federation
1380
+ * .setInboxListeners("/users/{identifier}/inbox", "/inbox")
1381
+ * .withIdempotency("per-inbox");
1382
+ * ```
1383
+ *
1384
+ * Use custom strategy:
1385
+ * ```
1386
+ * federation
1387
+ * .setInboxListeners("/users/{identifier}/inbox", "/inbox")
1388
+ * .withIdempotency((ctx, activity) => {
1389
+ * // Return null to skip idempotency
1390
+ * return `${ctx.origin}:${activity.id?.href}:${ctx.recipient}`;
1391
+ * });
1392
+ * ```
1393
+ *
1394
+ * @param strategy The idempotency strategy to use. Can be:
1395
+ * - `"global"`: Activities are deduplicated across all inboxes and origins
1396
+ * - `"per-origin"`: Activities are deduplicated per inbox origin
1397
+ * - `"per-inbox"`: Activities are deduplicated per inbox
1398
+ * - A custom callback function that returns the cache key to use
1399
+ * @returns The setters object so that settings can be chained.
1400
+ * @since 1.9.0
1401
+ */
1402
+ withIdempotency(strategy: IdempotencyStrategy | IdempotencyKeyCallback<TContextData>): InboxListenerSetters<TContextData>;
1343
1403
  }
1344
1404
  /**
1345
1405
  * Parameters of {@link Federation.fetch} method.
@@ -2258,4 +2318,4 @@ interface ActorKeyPair extends CryptoKeyPair {
2258
2318
  multikey: Multikey;
2259
2319
  }
2260
2320
  //#endregion
2261
- export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
2321
+ export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
@@ -10,7 +10,7 @@ const node_net = require_chunk.__toESM(require("node:net"));
10
10
 
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "1.9.0-dev.1613+a3d15523";
13
+ var version = "1.9.0-dev.1689+cbc8aca7";
14
14
  var license = "MIT";
15
15
  var exports$1 = {
16
16
  ".": "./src/mod.ts",
@@ -9,7 +9,7 @@ import { isIP } from "node:net";
9
9
 
10
10
  //#region deno.json
11
11
  var name = "@fedify/fedify";
12
- var version = "1.9.0-dev.1613+a3d15523";
12
+ var version = "1.9.0-dev.1689+cbc8aca7";
13
13
  var license = "MIT";
14
14
  var exports = {
15
15
  ".": "./src/mod.ts",
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { __commonJS, __toESM } from "./type-Bm9mdHQS.js";
6
+ import { __commonJS, __toESM } from "./type-BCazg_Pu.js";
7
7
 
8
8
  //#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
9
9
  var require_glob_to_regexp = __commonJS({ "../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js"(exports, module) {
@@ -3,16 +3,16 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Activity, Note, Person } from "../type-Bm9mdHQS.js";
6
+ import { Activity, Note, Person } from "../type-BCazg_Pu.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
11
  import { parseSemVer } from "../semver-dArNLkR9.js";
12
- import "../lookup-BkaLctZw.js";
13
- import "../inbox-CirfyLns.js";
14
- import { createFederationBuilder } from "../builder-CwFGbC7w.js";
15
- import { test } from "../testing-Did3bCyV.js";
12
+ import "../lookup-y6-PEpxS.js";
13
+ import "../inbox-DZNE3Jtq.js";
14
+ import { createFederationBuilder } from "../builder-BR--hcb8.js";
15
+ import { test } from "../testing-DvTABhvG.js";
16
16
  import { assertExists } from "../std__assert-X-_kMxKM.js";
17
17
  import "../assert_rejects-DiIiJbZn.js";
18
18
  import "../assert_is_error-BPGph1Jx.js";
@@ -3,13 +3,13 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import "../type-Bm9mdHQS.js";
6
+ import "../type-BCazg_Pu.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
- import "../lookup-BkaLctZw.js";
10
+ import "../lookup-y6-PEpxS.js";
11
11
  import { buildCollectionSynchronizationHeader, digest } from "../collection-CSzG2j1P.js";
12
- import { test } from "../testing-Did3bCyV.js";
12
+ import { test } from "../testing-DvTABhvG.js";
13
13
  import "../std__assert-X-_kMxKM.js";
14
14
  import "../assert_rejects-DiIiJbZn.js";
15
15
  import "../assert_is_error-BPGph1Jx.js";
@@ -3,36 +3,36 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Create, Note, Person } from "../type-Bm9mdHQS.js";
6
+ import { Create, Note, Person } from "../type-BCazg_Pu.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import { assert } from "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-CRZrzyXm.js";
11
- import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-B1iLu-jg.js";
11
+ import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-CjgR6ayA.js";
12
12
  import "../semver-dArNLkR9.js";
13
- import "../client-CkjMau5E.js";
14
- import "../lookup-BkaLctZw.js";
13
+ import "../client-BoUqciR8.js";
14
+ import "../lookup-y6-PEpxS.js";
15
15
  import "../types-BIgY6c-l.js";
16
- import "../actor-Do9KG1O2.js";
17
- import "../key-CN1jS3_Y.js";
18
- import { signRequest } from "../http-zgzZkO8A.js";
19
- import "../authdocloader-D_pDyzSu.js";
20
- import "../ld-o8aGatC0.js";
21
- import "../owner-qeK3HiL9.js";
22
- import "../proof-0MIJ70kC.js";
23
- import { InboxListenerSet } from "../inbox-CirfyLns.js";
24
- import "../builder-CwFGbC7w.js";
16
+ import "../actor-DzdLVqkJ.js";
17
+ import "../key-C25gGlmV.js";
18
+ import { signRequest } from "../http-C7nvEG1N.js";
19
+ import "../authdocloader-DdSBpn11.js";
20
+ import "../ld-WZpO-MzE.js";
21
+ import "../owner-CPBOVM7l.js";
22
+ import "../proof-h0JvKPRP.js";
23
+ import { InboxListenerSet } from "../inbox-DZNE3Jtq.js";
24
+ import "../builder-BR--hcb8.js";
25
25
  import "../collection-CSzG2j1P.js";
26
- import "../keycache-COrk8-eB.js";
26
+ import "../keycache-CoMI1L_W.js";
27
27
  import "../retry-D4GJ670a.js";
28
- import "../send-CuL-kYv7.js";
29
- import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-Did3bCyV.js";
28
+ import "../send-CD-m2vwX.js";
29
+ import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-DvTABhvG.js";
30
30
  import "../std__assert-X-_kMxKM.js";
31
31
  import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
32
32
  import "../assert_is_error-BPGph1Jx.js";
33
33
  import "../assert_not_equals-f3m3epl3.js";
34
34
  import "../assert_throws-BOO88avQ.js";
35
- import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-BieqxHLC.js";
35
+ import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-CMahfArj.js";
36
36
 
37
37
  //#region src/federation/handler.test.ts
38
38
  test("acceptsJsonLd()", () => {
@@ -0,0 +1,3 @@
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ import { URLPattern } from "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};