@fedify/fedify 2.0.36-dev.2746 → 2.0.36-dev.2779

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 (67) hide show
  1. package/dist/attachment-arrays-D43igPLB.mjs +111 -0
  2. package/dist/{builder-CnyFdlUn.mjs → builder-UXDfZSno.mjs} +3 -3
  3. package/dist/compat/attachment-arrays.test.d.mts +2 -0
  4. package/dist/compat/attachment-arrays.test.mjs +254 -0
  5. package/dist/compat/transformers.test.mjs +1 -1
  6. package/dist/{deno-DCXndlEx.mjs → deno-Bwn7hAXr.mjs} +1 -1
  7. package/dist/{docloader-7M06kit4.mjs → docloader-DSQXpyiJ.mjs} +2 -2
  8. package/dist/federation/attachment-responses.test.d.mts +2 -0
  9. package/dist/federation/attachment-responses.test.mjs +182 -0
  10. package/dist/federation/builder.test.mjs +1 -1
  11. package/dist/federation/collection.test.mjs +1 -1
  12. package/dist/federation/delivery-attachments.test.d.mts +2 -0
  13. package/dist/federation/delivery-attachments.test.mjs +280 -0
  14. package/dist/federation/handler.test.mjs +43 -14
  15. package/dist/federation/idempotency.test.mjs +2 -2
  16. package/dist/federation/inbox.test.mjs +1 -1
  17. package/dist/federation/keycache.test.mjs +1 -1
  18. package/dist/federation/middleware.test.mjs +7 -7
  19. package/dist/federation/mod.cjs +1 -1
  20. package/dist/federation/mod.js +1 -1
  21. package/dist/federation/negotiation.test.mjs +1 -1
  22. package/dist/federation/retry.test.mjs +1 -1
  23. package/dist/federation/send.test.mjs +3 -3
  24. package/dist/federation/temporal.test.mjs +1 -1
  25. package/dist/federation/webfinger.test.mjs +1 -1
  26. package/dist/{http-hjoPA7jZ.js → http-C-P8JP1h.js} +1 -1
  27. package/dist/{http-hi5IS6qw.mjs → http-DuIId6ul.mjs} +2 -2
  28. package/dist/{http-BhaAN2KG.cjs → http-aVfiO4CG.cjs} +1 -1
  29. package/dist/{inbox-Bygi511A.mjs → inbox-Cq4_-nPi.mjs} +1 -1
  30. package/dist/{key-DYyRTxPH.mjs → key-BMJlknME.mjs} +1 -1
  31. package/dist/{kv-cache-Bjnv9p9e.cjs → kv-cache-C6BYEp2D.cjs} +1 -1
  32. package/dist/{kv-cache-YZ2bpa_P.js → kv-cache-PAsTBkxX.js} +1 -1
  33. package/dist/{ld-CKUnk1Ps.mjs → ld-oemavcUi.mjs} +2 -2
  34. package/dist/{middleware-D5uql06B.js → middleware-BSMUxoX2.js} +259 -32
  35. package/dist/{middleware-dYPOyDLN.mjs → middleware-Bw59VTh0.mjs} +1 -1
  36. package/dist/{middleware-C_4rWloR.cjs → middleware-CjwdngG9.cjs} +260 -32
  37. package/dist/{middleware-yx080dbw.mjs → middleware-D8Hh8RSu.mjs} +170 -45
  38. package/dist/{middleware-BDCfPddM.cjs → middleware-sDUMisQG.cjs} +1 -1
  39. package/dist/mod.cjs +4 -4
  40. package/dist/mod.js +4 -4
  41. package/dist/nodeinfo/handler.test.mjs +1 -1
  42. package/dist/nodeinfo/types.test.mjs +1 -1
  43. package/dist/{owner-CqHBbNXl.mjs → owner-CYTWux20.mjs} +2 -2
  44. package/dist/{proof-CDalRU9r.mjs → proof-B7pdOJb5.mjs} +2 -2
  45. package/dist/{proof-D2RNLHHt.js → proof-DWny6g-g.js} +2 -2
  46. package/dist/{proof-DLqGjdaL.cjs → proof-DXp_5fqW.cjs} +3 -3
  47. package/dist/{send-XHpoZpxW.mjs → send-7rTXYfE8.mjs} +2 -2
  48. package/dist/sig/http.test.mjs +2 -2
  49. package/dist/sig/key-types.test.d.mts +1 -1
  50. package/dist/sig/key.test.mjs +2 -2
  51. package/dist/sig/ld.test.mjs +2 -2
  52. package/dist/sig/mod.cjs +2 -2
  53. package/dist/sig/mod.js +2 -2
  54. package/dist/sig/owner.test.mjs +1 -1
  55. package/dist/sig/proof.test.mjs +26 -3
  56. package/dist/{temporal-D3yEsvvS.mjs → temporal-CxaXuWOi.mjs} +1 -1
  57. package/dist/testing/mod.d.mts +1 -1
  58. package/dist/utils/docloader.test.mjs +2 -2
  59. package/dist/utils/mod.cjs +1 -1
  60. package/dist/utils/mod.js +1 -1
  61. package/package.json +6 -6
  62. /package/dist/{callback-BFMEE_9V.d.mts → callback-ySj5p3Ml.d.mts} +0 -0
  63. /package/dist/{collection-ChgDTHLz.mjs → collection-BD6-SZ6O.mjs} +0 -0
  64. /package/dist/{keycache-crDMn2HK.mjs → keycache-BhLorx33.mjs} +0 -0
  65. /package/dist/{negotiation-BehA2uul.mjs → negotiation-DnsfFF8I.mjs} +0 -0
  66. /package/dist/{retry-B_E3V_Dx.mjs → retry-CJL0poaU.mjs} +0 -0
  67. /package/dist/{types-C37hquWI.mjs → types-DCP0WLdt.mjs} +0 -0
@@ -0,0 +1,280 @@
1
+ import "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import { t as esm_default } from "../esm-DVILvP5e.mjs";
5
+ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
+ import "../std__assert-DflMZha5.mjs";
7
+ import { t as assert } from "../assert-BhQd8QHP.mjs";
8
+ import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-CCxRJhWa.mjs";
9
+ import { _ as verifySignature, c as detachSignature } from "../ld-oemavcUi.mjs";
10
+ import { n as signObject } from "../proof-B7pdOJb5.mjs";
11
+ import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
12
+ import { n as FederationImpl, t as ContextImpl, v as prepareActivityJsonLd } from "../middleware-D8Hh8RSu.mjs";
13
+ import { mockDocumentLoader, test } from "@fedify/fixture";
14
+ import { Create, Image, Note, Person, PropertyValue, Update } from "@fedify/vocab";
15
+ import { decodeMultibase } from "@fedify/vocab-runtime";
16
+ import serialize from "json-canon";
17
+ //#region src/federation/delivery-attachments.test.ts
18
+ async function assertRawProof(document, proof, publicKey) {
19
+ const unsigned = { ...document };
20
+ delete unsigned.proof;
21
+ delete unsigned.signature;
22
+ const encoder = new TextEncoder();
23
+ const config = {
24
+ "@context": document["@context"],
25
+ type: "DataIntegrityProof",
26
+ cryptosuite: proof.cryptosuite,
27
+ verificationMethod: proof.verificationMethod,
28
+ proofPurpose: proof.proofPurpose,
29
+ created: proof.created
30
+ };
31
+ const configDigest = await crypto.subtle.digest("SHA-256", encoder.encode(serialize(config)));
32
+ const messageDigest = await crypto.subtle.digest("SHA-256", encoder.encode(serialize(unsigned)));
33
+ const bytes = new Uint8Array(configDigest.byteLength + messageDigest.byteLength);
34
+ bytes.set(new Uint8Array(configDigest));
35
+ bytes.set(new Uint8Array(messageDigest), configDigest.byteLength);
36
+ assert(await crypto.subtle.verify("Ed25519", publicKey, decodeMultibase(proof.proofValue).slice(), bytes), "The proof must cover the exact received JSON representation.");
37
+ }
38
+ test("attachment delivery keeps fetched profiles, proofs, and queued bytes consistent", async (t) => {
39
+ const secondEdKey = await crypto.subtle.generateKey("Ed25519", true, ["sign", "verify"]);
40
+ const inbox = "https://example.com/attachment-inbox";
41
+ const received = [];
42
+ let responseStatus = 202;
43
+ esm_default.spyGlobal();
44
+ esm_default.post(inbox, async ({ request }) => {
45
+ received.push(await request.json());
46
+ return new Response(null, { status: responseStatus });
47
+ });
48
+ try {
49
+ for (const scenario of [
50
+ "rsa",
51
+ "immediate",
52
+ "outbox",
53
+ "fanout",
54
+ "raw-fanout",
55
+ "raw-immediate",
56
+ "raw-outbox",
57
+ "rsa-fanout",
58
+ "retry"
59
+ ]) await t.step(scenario, async () => {
60
+ const messages = [];
61
+ const federation = new FederationImpl({
62
+ kv: new MemoryKvStore(),
63
+ queue: {
64
+ enqueue(message) {
65
+ messages.push(message);
66
+ return Promise.resolve();
67
+ },
68
+ async listen() {}
69
+ },
70
+ manuallyStartQueue: true,
71
+ allowPrivateAddress: true
72
+ });
73
+ federation.setActorDispatcher("/users/{identifier}", (ctx, identifier) => new Person({
74
+ id: ctx.getActorUri(identifier),
75
+ preferredUsername: identifier,
76
+ attachments: [new PropertyValue({
77
+ name: "Website",
78
+ value: "https://example.com/"
79
+ })]
80
+ })).setKeyPairsDispatcher(() => [{
81
+ privateKey: rsaPrivateKey2,
82
+ publicKey: rsaPublicKey2.publicKey
83
+ }, ...scenario.startsWith("rsa") ? [] : [{
84
+ privateKey: ed25519PrivateKey,
85
+ publicKey: ed25519PublicKey.publicKey
86
+ }, {
87
+ privateKey: secondEdKey.privateKey,
88
+ publicKey: secondEdKey.publicKey
89
+ }]]);
90
+ const ctx = new ContextImpl({
91
+ data: void 0,
92
+ federation,
93
+ url: new URL("https://example.com/"),
94
+ documentLoader: mockDocumentLoader,
95
+ contextLoader: mockDocumentLoader
96
+ });
97
+ const actor = new Person({
98
+ id: ctx.getActorUri("alice"),
99
+ preferredUsername: "alice",
100
+ attachments: [new PropertyValue({
101
+ name: "Website",
102
+ value: "https://example.com/"
103
+ })]
104
+ });
105
+ const fetched = await (await federation.fetch(new Request(ctx.getActorUri("alice"), { headers: { Accept: "application/activity+json" } }), { contextData: void 0 })).json();
106
+ assert(Array.isArray(fetched.attachment));
107
+ const keyPairs = await ctx.getActorKeyPairs("alice");
108
+ const start = received.length;
109
+ await ctx.sendActivity(scenario.startsWith("raw-") ? keyPairs.map((kp) => ({
110
+ privateKey: kp.privateKey,
111
+ keyId: kp.keyId
112
+ })) : { identifier: "alice" }, {
113
+ id: new URL("https://example.com/recipient"),
114
+ inboxId: new URL(inbox)
115
+ }, new Update({
116
+ id: new URL(`https://example.com/updates/${scenario}`),
117
+ actor: actor.id,
118
+ object: actor
119
+ }), scenario === "immediate" || scenario === "raw-immediate" || scenario === "rsa" ? { immediate: true } : scenario === "fanout" || scenario === "raw-fanout" || scenario === "rsa-fanout" ? { fanout: "force" } : {});
120
+ if (scenario === "retry") {
121
+ const first = messages.shift();
122
+ assert(first?.type === "outbox");
123
+ const original = structuredClone(first.activity);
124
+ responseStatus = 503;
125
+ await federation.processQueuedTask(void 0, first);
126
+ responseStatus = 202;
127
+ const retried = messages[0];
128
+ assert(retried?.type === "outbox");
129
+ assertEquals(retried.attempt, 1);
130
+ assertEquals(retried.activity, original);
131
+ }
132
+ for (let count = 0; messages.length > 0; count++) {
133
+ assert(count < 10, "The delivery queue must drain.");
134
+ await federation.processQueuedTask(void 0, messages.shift());
135
+ }
136
+ assert(received.length > start);
137
+ const delivered = received.at(-1);
138
+ assertEquals(delivered.object.attachment, fetched.attachment);
139
+ assert(await verifySignature(delivered, {
140
+ contextLoader: mockDocumentLoader,
141
+ keyCache: {
142
+ get(id) {
143
+ return Promise.resolve(keyPairs.find((kp) => kp.cryptographicKey.id?.href === id.href)?.cryptographicKey ?? null);
144
+ },
145
+ async set() {}
146
+ }
147
+ }));
148
+ const wire = detachSignature(delivered);
149
+ const proofs = wire.proof == null ? [] : Array.isArray(wire.proof) ? wire.proof : [wire.proof];
150
+ assertEquals(proofs.length, scenario.startsWith("rsa") ? 0 : 2);
151
+ for (const proof of proofs) {
152
+ const key = keyPairs.find((kp) => kp.multikey.id?.href === proof.verificationMethod || kp.keyId.href === proof.verificationMethod);
153
+ assert(key != null);
154
+ await assertRawProof(wire, proof, key.publicKey);
155
+ }
156
+ if (scenario === "retry") assertEquals(received.at(-2), received.at(-1));
157
+ });
158
+ } finally {
159
+ esm_default.unmockGlobal();
160
+ esm_default.removeRoutes();
161
+ esm_default.clearHistory();
162
+ }
163
+ });
164
+ test("public attachment proof serialization remains unchanged", async () => {
165
+ const signed = await signObject(new Create({
166
+ actor: new URL("https://example.com/actor"),
167
+ object: new Note({ attachments: [new Image({ url: new URL("https://example.com/image.png") })] })
168
+ }), ed25519PrivateKey, ed25519PublicKey.id, { contextLoader: mockDocumentLoader });
169
+ const raw = await signed.toJsonLd({
170
+ format: "compact",
171
+ contextLoader: mockDocumentLoader
172
+ });
173
+ assert(!Array.isArray(raw.object.attachment));
174
+ await assertRawProof(raw, raw.proof, ed25519PublicKey.publicKey);
175
+ const resignedJson = await (await signObject(signed, ed25519PrivateKey, ed25519PublicKey.id, { contextLoader: mockDocumentLoader })).toJsonLd({
176
+ format: "compact",
177
+ contextLoader: mockDocumentLoader
178
+ });
179
+ assert(!Array.isArray(resignedJson.object.attachment));
180
+ assert(Array.isArray(resignedJson.proof));
181
+ assertEquals(resignedJson.proof.length, 2);
182
+ for (const proof of resignedJson.proof) await assertRawProof(resignedJson, proof, ed25519PublicKey.publicKey);
183
+ });
184
+ test("delivery preparation only selects changed proof-free attachment JSON", async () => {
185
+ assertEquals(await prepareActivityJsonLd(new Create({
186
+ actor: new URL("https://example.com/actor"),
187
+ object: new Note({ content: "No attachments" })
188
+ }), mockDocumentLoader), void 0);
189
+ const child = new Note({ attachments: [new Image({ url: new URL("https://example.com/image.png") })] });
190
+ const activity = new Create({
191
+ actor: new URL("https://example.com/actor"),
192
+ object: child
193
+ });
194
+ const before = structuredClone(await activity.toJsonLd());
195
+ const childBefore = structuredClone(await child.toJsonLd());
196
+ const prepared = await prepareActivityJsonLd(activity, mockDocumentLoader);
197
+ assert(prepared != null);
198
+ assert(Array.isArray(prepared.object.attachment));
199
+ assertEquals(await activity.toJsonLd(), before);
200
+ assertEquals(await child.toJsonLd(), childBefore);
201
+ const signedChild = await signObject(child, ed25519PrivateKey, ed25519PublicKey.id, { contextLoader: mockDocumentLoader });
202
+ assertEquals(await prepareActivityJsonLd(new Create({
203
+ actor: activity.actorId,
204
+ object: signedChild
205
+ }), mockDocumentLoader), void 0);
206
+ });
207
+ test("existing root proofs retain baseline delivery signing and scalar attachments", async (t) => {
208
+ const inbox = "https://example.com/existing-proof-inbox";
209
+ let delivered;
210
+ esm_default.spyGlobal();
211
+ esm_default.post(inbox, async ({ request }) => {
212
+ delivered = await request.json();
213
+ return new Response(null, { status: 202 });
214
+ });
215
+ try {
216
+ for (const sender of ["actor", "raw"]) await t.step(sender, async () => {
217
+ const federation = new FederationImpl({
218
+ kv: new MemoryKvStore(),
219
+ allowPrivateAddress: true
220
+ });
221
+ federation.setActorDispatcher("/users/{identifier}", (ctx, identifier) => new Person({ id: ctx.getActorUri(identifier) })).setKeyPairsDispatcher(() => [{
222
+ privateKey: rsaPrivateKey2,
223
+ publicKey: rsaPublicKey2.publicKey
224
+ }, {
225
+ privateKey: ed25519PrivateKey,
226
+ publicKey: ed25519PublicKey.publicKey
227
+ }]);
228
+ const ctx = new ContextImpl({
229
+ data: void 0,
230
+ federation,
231
+ url: new URL("https://example.com/"),
232
+ documentLoader: mockDocumentLoader,
233
+ contextLoader: mockDocumentLoader
234
+ });
235
+ const activity = await signObject(new Update({
236
+ id: new URL(`https://example.com/existing-proof/${sender}`),
237
+ actor: ctx.getActorUri("alice"),
238
+ object: new Person({
239
+ id: ctx.getActorUri("alice"),
240
+ attachments: [new PropertyValue({
241
+ name: "Site",
242
+ value: "example"
243
+ })]
244
+ })
245
+ }), ed25519PrivateKey, ed25519PublicKey.id, { contextLoader: mockDocumentLoader });
246
+ const before = structuredClone(await activity.toJsonLd());
247
+ assertEquals(await prepareActivityJsonLd(activity, mockDocumentLoader), void 0);
248
+ await ctx.sendActivity(sender === "actor" ? { identifier: "alice" } : [{
249
+ privateKey: rsaPrivateKey2,
250
+ keyId: rsaPublicKey2.id
251
+ }, {
252
+ privateKey: ed25519PrivateKey,
253
+ keyId: ed25519PublicKey.id
254
+ }], {
255
+ id: new URL("https://example.com/recipient"),
256
+ inboxId: new URL(inbox)
257
+ }, activity, { immediate: true });
258
+ assert(delivered != null);
259
+ assert(!Array.isArray(delivered.object.attachment));
260
+ assert(await verifySignature(delivered, {
261
+ contextLoader: mockDocumentLoader,
262
+ keyCache: {
263
+ get: () => Promise.resolve(rsaPublicKey2),
264
+ async set() {}
265
+ }
266
+ }));
267
+ const wire = detachSignature(delivered);
268
+ const proofs = Array.isArray(wire.proof) ? wire.proof : [wire.proof];
269
+ assertEquals(proofs.length, sender === "actor" ? 2 : 1);
270
+ for (const proof of proofs) await assertRawProof(wire, proof, ed25519PublicKey.publicKey);
271
+ assertEquals(await activity.toJsonLd(), before);
272
+ });
273
+ } finally {
274
+ esm_default.unmockGlobal();
275
+ esm_default.removeRoutes();
276
+ esm_default.clearHistory();
277
+ }
278
+ });
279
+ //#endregion
280
+ export {};
@@ -7,15 +7,15 @@ import "../std__assert-DflMZha5.mjs";
7
7
  import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
8
8
  import { t as assert } from "../assert-BhQd8QHP.mjs";
9
9
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
10
- import { i as generateCryptoKeyPair } from "../key-DYyRTxPH.mjs";
11
- import { c as signRequest } from "../http-hi5IS6qw.mjs";
10
+ import { i as generateCryptoKeyPair } from "../key-BMJlknME.mjs";
11
+ import { c as signRequest } from "../http-DuIId6ul.mjs";
12
12
  import { a as rsaPrivateKey3, c as rsaPublicKey3, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
13
- import { a as compactJsonLd, m as signJsonLd } from "../ld-CKUnk1Ps.mjs";
13
+ import { a as compactJsonLd, m as signJsonLd } from "../ld-oemavcUi.mjs";
14
14
  import { t as ldSignatureWithoutCreated } from "../ld-signature-_KYhPsqt.mjs";
15
- import { n as signObject } from "../proof-CDalRU9r.mjs";
15
+ import { n as signObject } from "../proof-B7pdOJb5.mjs";
16
16
  import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
17
- import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-yx080dbw.mjs";
18
- import { t as InboxListenerSet } from "../inbox-Bygi511A.mjs";
17
+ import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-D8Hh8RSu.mjs";
18
+ import { t as InboxListenerSet } from "../inbox-Cq4_-nPi.mjs";
19
19
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
20
20
  import { Create, CryptographicKey, Multikey, Note, Person } from "@fedify/vocab";
21
21
  import { configure, reset } from "@logtape/logtape";
@@ -578,7 +578,13 @@ test("handleCollection()", async () => {
578
578
  "@id": "fedibird:emojiReactions",
579
579
  "@type": "@id"
580
580
  }
581
- }
581
+ },
582
+ { orderedItems: {
583
+ "@id": "https://www.w3.org/ns/activitystreams#items",
584
+ "@type": "@id",
585
+ "@container": "@list",
586
+ "@context": null
587
+ } }
582
588
  ],
583
589
  id: "https://example.com/users/someone",
584
590
  type: "OrderedCollection",
@@ -661,7 +667,13 @@ test("handleCollection()", async () => {
661
667
  "@id": "fedibird:emojiReactions",
662
668
  "@type": "@id"
663
669
  }
664
- }
670
+ },
671
+ { orderedItems: {
672
+ "@id": "https://www.w3.org/ns/activitystreams#items",
673
+ "@type": "@id",
674
+ "@container": "@list",
675
+ "@context": null
676
+ } }
665
677
  ],
666
678
  id: "https://example.com/users/someone",
667
679
  type: "OrderedCollection",
@@ -777,7 +789,13 @@ test("handleCollection()", async () => {
777
789
  "@id": "fedibird:emojiReactions",
778
790
  "@type": "@id"
779
791
  }
780
- }
792
+ },
793
+ { orderedItems: {
794
+ "@id": "https://www.w3.org/ns/activitystreams#items",
795
+ "@type": "@id",
796
+ "@container": "@list",
797
+ "@context": null
798
+ } }
781
799
  ],
782
800
  id: "https://example.com/users/someone?cursor=0",
783
801
  type: "OrderedCollectionPage",
@@ -835,7 +853,13 @@ test("handleCollection()", async () => {
835
853
  "@id": "fedibird:emojiReactions",
836
854
  "@type": "@id"
837
855
  }
838
- }
856
+ },
857
+ { orderedItems: {
858
+ "@id": "https://www.w3.org/ns/activitystreams#items",
859
+ "@type": "@id",
860
+ "@container": "@list",
861
+ "@context": null
862
+ } }
839
863
  ],
840
864
  id: "https://example.com/users/someone?cursor=2",
841
865
  type: "OrderedCollectionPage",
@@ -3028,8 +3052,13 @@ test("handleCustomCollection()", async () => {
3028
3052
  }
3029
3053
  }
3030
3054
  ];
3055
+ const ITEM_CONTEXT = [...CONTEXT, { items: {
3056
+ "@id": "https://www.w3.org/ns/activitystreams#items",
3057
+ "@type": "@id",
3058
+ "@context": null
3059
+ } }];
3031
3060
  assertEquals(await response.json(), {
3032
- "@context": CONTEXT,
3061
+ "@context": ITEM_CONTEXT,
3033
3062
  id: "https://example.com/",
3034
3063
  type: "Collection",
3035
3064
  items: [
@@ -3084,7 +3113,7 @@ test("handleCustomCollection()", async () => {
3084
3113
  assertEquals(response.status, 200);
3085
3114
  assertEquals(response.headers.get("Content-Type"), "application/activity+json");
3086
3115
  assertEquals(await response.json(), {
3087
- "@context": CONTEXT,
3116
+ "@context": ITEM_CONTEXT,
3088
3117
  id: "https://example.com/",
3089
3118
  type: "Collection",
3090
3119
  items: [
@@ -3142,7 +3171,7 @@ test("handleCustomCollection()", async () => {
3142
3171
  assertEquals(response.status, 200);
3143
3172
  assertEquals(response.headers.get("Content-Type"), "application/activity+json");
3144
3173
  assertEquals(await response.json(), {
3145
- "@context": CONTEXT,
3174
+ "@context": ITEM_CONTEXT,
3146
3175
  id: "https://example.com/?cursor=0",
3147
3176
  type: "CollectionPage",
3148
3177
  partOf: "https://example.com/",
@@ -3171,7 +3200,7 @@ test("handleCustomCollection()", async () => {
3171
3200
  assertEquals(response.status, 200);
3172
3201
  assertEquals(response.headers.get("Content-Type"), "application/activity+json");
3173
3202
  assertEquals(await response.json(), {
3174
- "@context": CONTEXT,
3203
+ "@context": ITEM_CONTEXT,
3175
3204
  id: "https://example.com/?cursor=2",
3176
3205
  type: "CollectionPage",
3177
3206
  partOf: "https://example.com/",
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import "../std__assert-DflMZha5.mjs";
6
6
  import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
7
- import { n as signObject } from "../proof-CDalRU9r.mjs";
7
+ import { n as signObject } from "../proof-B7pdOJb5.mjs";
8
8
  import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
9
- import { a as createFederation } from "../middleware-yx080dbw.mjs";
9
+ import { a as createFederation } from "../middleware-D8Hh8RSu.mjs";
10
10
  import { mockDocumentLoader, test } from "@fedify/fixture";
11
11
  import { Create, Follow, Person } from "@fedify/vocab";
12
12
  //#region src/federation/idempotency.test.ts
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
6
- import { n as actorsHaveSameOrigin, t as InboxListenerSet } from "../inbox-Bygi511A.mjs";
6
+ import { n as actorsHaveSameOrigin, t as InboxListenerSet } from "../inbox-Cq4_-nPi.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
9
9
  //#region src/federation/inbox.test.ts
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
6
6
  import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
7
- import { t as KvKeyCache } from "../keycache-crDMn2HK.mjs";
7
+ import { t as KvKeyCache } from "../keycache-BhLorx33.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  import { CryptographicKey, Multikey } from "@fedify/vocab";
10
10
  //#region src/federation/keycache.test.ts
@@ -9,16 +9,16 @@ import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.m
9
9
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
10
10
  import { t as assertNotEquals } from "../assert_not_equals-BkxW5QJI.mjs";
11
11
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
12
- import { c as signRequest, u as verifyRequest } from "../http-hi5IS6qw.mjs";
12
+ import { c as signRequest, u as verifyRequest } from "../http-DuIId6ul.mjs";
13
13
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
14
- import { n as getAuthenticatedDocumentLoader } from "../docloader-7M06kit4.mjs";
15
- import { a as compactJsonLd, c as detachSignature, g as verifyJsonLd, i as attachSignature, m as signJsonLd } from "../ld-CKUnk1Ps.mjs";
14
+ import { n as getAuthenticatedDocumentLoader } from "../docloader-DSQXpyiJ.mjs";
15
+ import { a as compactJsonLd, c as detachSignature, g as verifyJsonLd, i as attachSignature, m as signJsonLd } from "../ld-oemavcUi.mjs";
16
16
  import { t as ldSignatureWithoutCreated } from "../ld-signature-_KYhPsqt.mjs";
17
- import { t as doesActorOwnKey } from "../owner-CqHBbNXl.mjs";
18
- import { n as signObject, r as verifyObject } from "../proof-CDalRU9r.mjs";
17
+ import { t as doesActorOwnKey } from "../owner-CYTWux20.mjs";
18
+ import { n as signObject, r as verifyObject } from "../proof-B7pdOJb5.mjs";
19
19
  import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
20
- import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-yx080dbw.mjs";
21
- import { t as SendActivityError } from "../send-XHpoZpxW.mjs";
20
+ import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-D8Hh8RSu.mjs";
21
+ import { t as SendActivityError } from "../send-7rTXYfE8.mjs";
22
22
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
23
23
  import * as vocab from "@fedify/vocab";
24
24
  import { Create, Offer, Person, getTypeId, lookupObject } from "@fedify/vocab";
@@ -2,7 +2,7 @@ const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  require("../chunk-DDcVe30Y.cjs");
5
- const require_middleware = require("../middleware-C_4rWloR.cjs");
5
+ const require_middleware = require("../middleware-CjwdngG9.cjs");
6
6
  let es_toolkit = require("es-toolkit");
7
7
  //#region src/federation/kv.ts
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-D5uql06B.js";
3
+ import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-BSMUxoX2.js";
4
4
  import { isEqual } from "es-toolkit";
5
5
  //#region src/federation/kv.ts
6
6
  /**
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import "../std__assert-DflMZha5.mjs";
5
5
  import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
6
6
  import { t as assert } from "../assert-BhQd8QHP.mjs";
7
- import { t as acceptsJsonLd } from "../negotiation-BehA2uul.mjs";
7
+ import { t as acceptsJsonLd } from "../negotiation-DnsfFF8I.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/federation/negotiation.test.ts
10
10
  test("acceptsJsonLd()", () => {
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { l as AssertionError, t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { t as assertNotEquals } from "../assert_not_equals-BkxW5QJI.mjs";
6
- import { t as createExponentialBackoffPolicy } from "../retry-B_E3V_Dx.mjs";
6
+ import { t as createExponentialBackoffPolicy } from "../retry-CJL0poaU.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  //#region src/federation/retry.test.ts
9
9
  test("createExponentialBackoffPolicy()", () => {
@@ -8,10 +8,10 @@ import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
8
8
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
9
9
  import { t as assertNotEquals } from "../assert_not_equals-BkxW5QJI.mjs";
10
10
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
11
- import { u as verifyRequest } from "../http-hi5IS6qw.mjs";
11
+ import { u as verifyRequest } from "../http-DuIId6ul.mjs";
12
12
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
13
- import { t as doesActorOwnKey } from "../owner-CqHBbNXl.mjs";
14
- import { i as sendActivity, n as extractInboxes, r as fetchWithValidatedRedirects, t as SendActivityError } from "../send-XHpoZpxW.mjs";
13
+ import { t as doesActorOwnKey } from "../owner-CYTWux20.mjs";
14
+ import { i as sendActivity, n as extractInboxes, r as fetchWithValidatedRedirects, t as SendActivityError } from "../send-7rTXYfE8.mjs";
15
15
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
16
16
  import { Activity, Application, Endpoints, Group, Person, Service } from "@fedify/vocab";
17
17
  import { FetchError, UrlError } from "@fedify/vocab-runtime";
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import "../std__assert-DflMZha5.mjs";
5
5
  import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
6
6
  import { t as assert } from "../assert-BhQd8QHP.mjs";
7
- import { t as hasMalformedKnownTemporalLiteral } from "../temporal-D3yEsvvS.mjs";
7
+ import { t as hasMalformedKnownTemporalLiteral } from "../temporal-CxaXuWOi.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/federation/temporal.test.ts
10
10
  test("hasMalformedKnownTemporalLiteral() detects expanded proof timestamps", async () => {
@@ -5,7 +5,7 @@ import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-DflMZha5.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
8
- import { a as createFederation, o as handleWebFinger } from "../middleware-yx080dbw.mjs";
8
+ import { a as createFederation, o as handleWebFinger } from "../middleware-D8Hh8RSu.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  import { Image, Link, Person } from "@fedify/vocab";
11
11
  //#region src/federation/webfinger.test.ts
@@ -11,7 +11,7 @@ import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
11
11
  import { Item, decodeDict, encodeItem } from "structured-field-values";
12
12
  //#region deno.json
13
13
  var name = "@fedify/fedify";
14
- var version = "2.0.36-dev.2746+2371871b";
14
+ var version = "2.0.36-dev.2779+68f8f486";
15
15
  //#endregion
16
16
  //#region src/sig/key.ts
17
17
  /** Classifies decoding failures without hiding unexpected loader errors. */
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-DCXndlEx.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-DYyRTxPH.mjs";
4
+ import { n as version, t as name } from "./deno-Bwn7hAXr.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-BMJlknME.mjs";
6
6
  import { CryptographicKey } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { FetchError } from "@fedify/vocab-runtime";
@@ -12,7 +12,7 @@ let byte_encodings_base64 = require("byte-encodings/base64");
12
12
  let structured_field_values = require("structured-field-values");
13
13
  //#region deno.json
14
14
  var name = "@fedify/fedify";
15
- var version = "2.0.36-dev.2746+2371871b";
15
+ var version = "2.0.36-dev.2779+68f8f486";
16
16
  //#endregion
17
17
  //#region src/sig/key.ts
18
18
  /** Classifies decoding failures without hiding unexpected loader errors. */
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-DCXndlEx.mjs";
4
+ import { n as version, t as name } from "./deno-Bwn7hAXr.mjs";
5
5
  import { Activity, getTypeId } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
7
7
  import { getLogger } from "@logtape/logtape";
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-DCXndlEx.mjs";
4
+ import { n as version, t as name } from "./deno-Bwn7hAXr.mjs";
5
5
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  require("./chunk-DDcVe30Y.cjs");
4
- const require_http = require("./http-BhaAN2KG.cjs");
4
+ const require_http = require("./http-aVfiO4CG.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let es_toolkit = require("es-toolkit");
7
7
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { l as validateCryptoKey, t as doubleKnockScoped } from "./http-hjoPA7jZ.js";
3
+ import { l as validateCryptoKey, t as doubleKnockScoped } from "./http-C-P8JP1h.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { curry } from "es-toolkit";
6
6
  import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts } from "@fedify/vocab-runtime";
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-DCXndlEx.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-DYyRTxPH.mjs";
4
+ import { n as version, t as name } from "./deno-Bwn7hAXr.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-BMJlknME.mjs";
6
6
  import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader, preloadedContexts } from "@fedify/vocab-runtime";