@fedify/fedify 2.4.0-dev.2127 → 2.4.0-dev.2129

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 (91) hide show
  1. package/dist/{builder-B2bgGYbP.mjs → builder-C0bxZDL0.mjs} +3 -3
  2. package/dist/compat/mod.d.cts +1 -1
  3. package/dist/compat/mod.d.ts +1 -1
  4. package/dist/compat/transformers.test.mjs +1 -1
  5. package/dist/{compound-proof-SVlHSzV7.mjs → compound-proof-D9Kljk_7.mjs} +3 -3
  6. package/dist/{context-Ci5vuUr_.d.ts → context-Cz1w5Krc.d.ts} +1 -1
  7. package/dist/{context-Bm6ldGvx.d.cts → context-Dvec_D_h.d.cts} +1 -1
  8. package/dist/{deno-Be9xoxps.mjs → deno-_o3lkDlG.mjs} +1 -1
  9. package/dist/{docloader-Dtuyb0ps.mjs → docloader-BbS0rO-Y.mjs} +2 -2
  10. package/dist/federation/builder.test.mjs +1 -1
  11. package/dist/federation/compound-fanout.test.mjs +3 -3
  12. package/dist/federation/handler-compound-proof.test.mjs +3 -3
  13. package/dist/federation/handler.test.mjs +5 -5
  14. package/dist/federation/hashlink-media.test.mjs +2 -2
  15. package/dist/federation/idempotency.test.mjs +2 -2
  16. package/dist/federation/metrics.test.mjs +1 -1
  17. package/dist/federation/middleware.test.mjs +7 -7
  18. package/dist/federation/mod.cjs +1 -1
  19. package/dist/federation/mod.d.cts +2 -2
  20. package/dist/federation/mod.d.ts +2 -2
  21. package/dist/federation/mod.js +1 -1
  22. package/dist/federation/outgoing-proof.test.mjs +6 -6
  23. package/dist/federation/portable-actor.test.mjs +3 -3
  24. package/dist/federation/portable-chain.test.mjs +3 -3
  25. package/dist/federation/portable-gateway-keys.test.mjs +76 -5
  26. package/dist/federation/portable-inbox.test.mjs +9 -4
  27. package/dist/federation/portable.test.mjs +3 -3
  28. package/dist/federation/send.test.mjs +3 -3
  29. package/dist/federation/tasks/enqueue.test.mjs +1 -1
  30. package/dist/federation/tasks/tasks.test.mjs +2 -2
  31. package/dist/federation/temporal.test.mjs +1 -1
  32. package/dist/federation/webfinger.test.mjs +1 -1
  33. package/dist/{federation-B6IHuS6n.cjs → federation-DRY8KrkB.cjs} +12 -12
  34. package/dist/{http-o8l4QeUY.cjs → http-B1J6E-bT.cjs} +384 -33
  35. package/dist/{http-BFeK9sBg.mjs → http-BpOiZE09.mjs} +18 -12
  36. package/dist/{http-D76Py0M4.d.cts → http-C-x_OLSp.d.ts} +57 -14
  37. package/dist/{http-Rmbiu-5S.js → http-C2M6wcs8.js} +374 -35
  38. package/dist/{http-BrQgkJay.d.ts → http-CjezPjFX.d.cts} +57 -14
  39. package/dist/{key-Cc1b6pW9.mjs → key-DolJjJab.mjs} +103 -16
  40. package/dist/{kv-cache-tLKBfxHc.mjs → kv-cache-Bq2cah0c.mjs} +1 -1
  41. package/dist/{kv-cache-BweDce2I.js → kv-cache-D7TiyMxv.js} +1 -1
  42. package/dist/{kv-cache-BUkgZAcX.cjs → kv-cache-D9nRbG2Q.cjs} +1 -1
  43. package/dist/{ld-DQNTIrAe.mjs → ld-Dwc176V4.mjs} +3 -3
  44. package/dist/{metrics-DDE9S63Q.mjs → metrics-CDaHfBXY.mjs} +1 -1
  45. package/dist/{middleware-CsQorLC_.mjs → middleware-CmB1FD8A.mjs} +1 -1
  46. package/dist/{middleware-K9aLnf57.js → middleware-CylX-pvI.js} +12 -12
  47. package/dist/{middleware-BdhvduR9.mjs → middleware-DN3MdTDg.mjs} +24 -24
  48. package/dist/{mod-Co53r-VP.d.ts → mod-Bz9tFXI2.d.ts} +1 -1
  49. package/dist/{mod-Cwdt_CWU.d.ts → mod-CZetqT5h.d.ts} +1 -1
  50. package/dist/{mod-Cr79cQlc.d.cts → mod-D4g9ffEn.d.cts} +1 -1
  51. package/dist/{mod-AVir5nVI.d.cts → mod-DGOIxEfb.d.cts} +1 -1
  52. package/dist/{mod-Byt5tvAS.d.cts → mod-S--JxYjo.d.cts} +1 -1
  53. package/dist/{mod-eVOUPbQE.d.ts → mod-owwElvpw.d.ts} +1 -1
  54. package/dist/mod.cjs +4 -4
  55. package/dist/mod.d.cts +5 -5
  56. package/dist/mod.d.ts +5 -5
  57. package/dist/mod.js +4 -4
  58. package/dist/nodeinfo/handler.test.mjs +1 -1
  59. package/dist/{owner-CCfdL83M.mjs → owner-BNHhwjNu.mjs} +37 -4
  60. package/dist/{portable-collection-WXaHkNqC.mjs → portable-collection-CRpTUHCY.mjs} +2 -2
  61. package/dist/{portable-collection-DdXsKBg4.js → portable-collection-CgglAI9B.js} +34 -1
  62. package/dist/{portable-collection-DXogVs__.cjs → portable-collection-PTGD0q70.cjs} +34 -1
  63. package/dist/portable-key-DqX2emHQ.mjs +395 -0
  64. package/dist/{portable-key-id-T7lecIbt.mjs → portable-key-id-Bg259c4Z.mjs} +69 -2
  65. package/dist/{proof-CW8k0R1G.mjs → proof-B4_0E-KU.mjs} +5 -5
  66. package/dist/{send--FORaIc4.mjs → send-Dpu5qbP5.mjs} +3 -3
  67. package/dist/sig/compound-proof-discovery.test.mjs +1 -1
  68. package/dist/sig/compound-proof-producer.test.mjs +1 -1
  69. package/dist/sig/compound-proof-verification.test.mjs +2 -2
  70. package/dist/sig/compound-proof.test.mjs +2 -2
  71. package/dist/sig/http.test.mjs +2 -2
  72. package/dist/sig/key.test.mjs +1 -1
  73. package/dist/sig/ld.test.mjs +2 -2
  74. package/dist/sig/mod.cjs +2 -2
  75. package/dist/sig/mod.d.cts +2 -2
  76. package/dist/sig/mod.d.ts +2 -2
  77. package/dist/sig/mod.js +2 -2
  78. package/dist/sig/owner.test.mjs +1 -1
  79. package/dist/sig/portable-collection.test.mjs +1 -1
  80. package/dist/sig/portable-key.test.mjs +479 -5
  81. package/dist/sig/proof.test.mjs +3 -3
  82. package/dist/{temporal-CffY_XOJ.mjs → temporal-78JVR3GK.mjs} +1 -1
  83. package/dist/testing/kv.test.mjs +1 -1
  84. package/dist/utils/docloader.test.mjs +2 -2
  85. package/dist/utils/kv-cache.test.mjs +1 -1
  86. package/dist/utils/mod.cjs +1 -1
  87. package/dist/utils/mod.d.cts +1 -1
  88. package/dist/utils/mod.d.ts +1 -1
  89. package/dist/utils/mod.js +1 -1
  90. package/package.json +6 -6
  91. package/dist/portable-key-C-fPq_Yf.mjs +0 -214
package/dist/mod.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-D-XP_Ccb.cjs";
3
- import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-D76Py0M4.cjs";
3
+ import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-CjezPjFX.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BF0L9cMt.cjs";
5
- import { $ as InProcessMessageQueue, A as MediaUploaderSetters, At as HashlinkMediaRequest, B as createFederationBuilder, Bt as OutboxPermanentFailureHandler, C as FederationFetchOptions, Ct as CollectionCounter, D as IdempotencyStrategy, Dt as CustomCollectionCursor, E as IdempotencyKeyCallback, Et as CustomCollectionCounter, F as FederationKvPrefixes, Ft as ObjectAuthorizePredicate, G as TaskRegistry, Gt as WebFingerLinksDispatcher, H as TaskDefinitionOptions, Ht as SharedInboxKeyDispatcher, I as FederationOrigin, It as ObjectDispatcher, J as RetryPolicy, Jt as PageItems, K as CreateExponentialBackoffPolicyOptions, Kt as SendActivityError, L as FederationQueueOptions, Lt as OutboxErrorHandler, M as OutboxListenerSetters, Mt as InboxListener, N as PortableInboxForwardingOptions, Nt as MediaUploaderCallback, O as InboxChallengePolicy, Ot as CustomCollectionDispatcher, P as Rfc6570Expression, Pt as NodeInfoDispatcher, Q as respondWithObjectIfAcceptable, R as createFederation, Rt as OutboxListener, S as FederationBuilder, St as AuthorizePredicate, T as FederationStartQueueOptions, Tt as CollectionDispatcher, U as TaskEnqueueOptions, Ut as UnverifiedActivityHandler, V as TaskDefinition, Vt as PortableActorIdMapper, W as TaskHandler, Wt as UnverifiedActivityReason, X as RespondWithObjectOptions, Xt as digest, Y as createExponentialBackoffPolicy, Yt as buildCollectionSynchronizationHeader, Z as respondWithObject, Zt as ActivityTransformer, _ as ConstructorWithTypeId, _t as parseCircuitBreakerKvState, a as GetObjectOptions, at as ParallelMessageQueue, b as Federation, bt as ActorHandleMapper, c as OutboxContext, ct as CircuitBreakerBeforeSendDecision, d as RequestContext, dt as CircuitBreakerKvState, et as InProcessMessageQueueOptions, f as RouteActivityOptions, ft as CircuitBreakerOptions, g as CollectionCallbackSetters, gt as normalizeCircuitBreakerOptions, h as ActorCallbackSetters, ht as NormalizedCircuitBreakerOptions, i as GetActorOptions, it as MessageQueueListenOptions, j as ObjectCallbackSetters, jt as InboxErrorHandler, k as InboxListenerSetters, kt as HashlinkMediaDispatcher, l as ParseUriResult, lt as CircuitBreakerCreateOptions, m as SendActivityOptionsForCollection, mt as CircuitBreakerStateChange, n as Context, nt as MessageQueueDepth, o as GetSignedKeyOptions, ot as CircuitBreaker, p as SendActivityOptions, pt as CircuitBreakerState, q as RetryContext, qt as SenderKeyPair, r as ForwardActivityOptions, rt as MessageQueueEnqueueOptions, s as InboxContext, st as CircuitBreakerActivityDrop, t as ActorKeyPair, tt as MessageQueue, u as PortableRequest, ut as CircuitBreakerFailurePolicy, v as CustomCollectionCallbackSetters, vt as ActorAliasMapper, w as FederationOptions, wt as CollectionCursor, x as FederationBenchmarkOptions, xt as ActorKeyPairsDispatcher, y as Federatable, yt as ActorDispatcher, z as Message, zt as OutboxListenerErrorHandler } from "./context-Bm6ldGvx.cjs";
5
+ import { $ as InProcessMessageQueue, A as MediaUploaderSetters, At as HashlinkMediaRequest, B as createFederationBuilder, Bt as OutboxPermanentFailureHandler, C as FederationFetchOptions, Ct as CollectionCounter, D as IdempotencyStrategy, Dt as CustomCollectionCursor, E as IdempotencyKeyCallback, Et as CustomCollectionCounter, F as FederationKvPrefixes, Ft as ObjectAuthorizePredicate, G as TaskRegistry, Gt as WebFingerLinksDispatcher, H as TaskDefinitionOptions, Ht as SharedInboxKeyDispatcher, I as FederationOrigin, It as ObjectDispatcher, J as RetryPolicy, Jt as PageItems, K as CreateExponentialBackoffPolicyOptions, Kt as SendActivityError, L as FederationQueueOptions, Lt as OutboxErrorHandler, M as OutboxListenerSetters, Mt as InboxListener, N as PortableInboxForwardingOptions, Nt as MediaUploaderCallback, O as InboxChallengePolicy, Ot as CustomCollectionDispatcher, P as Rfc6570Expression, Pt as NodeInfoDispatcher, Q as respondWithObjectIfAcceptable, R as createFederation, Rt as OutboxListener, S as FederationBuilder, St as AuthorizePredicate, T as FederationStartQueueOptions, Tt as CollectionDispatcher, U as TaskEnqueueOptions, Ut as UnverifiedActivityHandler, V as TaskDefinition, Vt as PortableActorIdMapper, W as TaskHandler, Wt as UnverifiedActivityReason, X as RespondWithObjectOptions, Xt as digest, Y as createExponentialBackoffPolicy, Yt as buildCollectionSynchronizationHeader, Z as respondWithObject, Zt as ActivityTransformer, _ as ConstructorWithTypeId, _t as parseCircuitBreakerKvState, a as GetObjectOptions, at as ParallelMessageQueue, b as Federation, bt as ActorHandleMapper, c as OutboxContext, ct as CircuitBreakerBeforeSendDecision, d as RequestContext, dt as CircuitBreakerKvState, et as InProcessMessageQueueOptions, f as RouteActivityOptions, ft as CircuitBreakerOptions, g as CollectionCallbackSetters, gt as normalizeCircuitBreakerOptions, h as ActorCallbackSetters, ht as NormalizedCircuitBreakerOptions, i as GetActorOptions, it as MessageQueueListenOptions, j as ObjectCallbackSetters, jt as InboxErrorHandler, k as InboxListenerSetters, kt as HashlinkMediaDispatcher, l as ParseUriResult, lt as CircuitBreakerCreateOptions, m as SendActivityOptionsForCollection, mt as CircuitBreakerStateChange, n as Context, nt as MessageQueueDepth, o as GetSignedKeyOptions, ot as CircuitBreaker, p as SendActivityOptions, pt as CircuitBreakerState, q as RetryContext, qt as SenderKeyPair, r as ForwardActivityOptions, rt as MessageQueueEnqueueOptions, s as InboxContext, st as CircuitBreakerActivityDrop, t as ActorKeyPair, tt as MessageQueue, u as PortableRequest, ut as CircuitBreakerFailurePolicy, v as CustomCollectionCallbackSetters, vt as ActorAliasMapper, w as FederationOptions, wt as CollectionCursor, x as FederationBenchmarkOptions, xt as ActorKeyPairsDispatcher, y as Federatable, yt as ActorDispatcher, z as Message, zt as OutboxListenerErrorHandler } from "./context-Dvec_D_h.cjs";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.cjs";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
8
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-AVir5nVI.cjs";
9
- import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-Byt5tvAS.cjs";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-Cr79cQlc.cjs";
8
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-DGOIxEfb.cjs";
9
+ import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-S--JxYjo.cjs";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-D4g9ffEn.cjs";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts
package/dist/mod.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-D-XP_Ccb.js";
3
- import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-BrQgkJay.js";
3
+ import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-C-x_OLSp.js";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BSzr5-I8.js";
5
- import { $ as InProcessMessageQueue, A as MediaUploaderSetters, At as HashlinkMediaRequest, B as createFederationBuilder, Bt as OutboxPermanentFailureHandler, C as FederationFetchOptions, Ct as CollectionCounter, D as IdempotencyStrategy, Dt as CustomCollectionCursor, E as IdempotencyKeyCallback, Et as CustomCollectionCounter, F as FederationKvPrefixes, Ft as ObjectAuthorizePredicate, G as TaskRegistry, Gt as WebFingerLinksDispatcher, H as TaskDefinitionOptions, Ht as SharedInboxKeyDispatcher, I as FederationOrigin, It as ObjectDispatcher, J as RetryPolicy, Jt as PageItems, K as CreateExponentialBackoffPolicyOptions, Kt as SendActivityError, L as FederationQueueOptions, Lt as OutboxErrorHandler, M as OutboxListenerSetters, Mt as InboxListener, N as PortableInboxForwardingOptions, Nt as MediaUploaderCallback, O as InboxChallengePolicy, Ot as CustomCollectionDispatcher, P as Rfc6570Expression, Pt as NodeInfoDispatcher, Q as respondWithObjectIfAcceptable, R as createFederation, Rt as OutboxListener, S as FederationBuilder, St as AuthorizePredicate, T as FederationStartQueueOptions, Tt as CollectionDispatcher, U as TaskEnqueueOptions, Ut as UnverifiedActivityHandler, V as TaskDefinition, Vt as PortableActorIdMapper, W as TaskHandler, Wt as UnverifiedActivityReason, X as RespondWithObjectOptions, Xt as digest, Y as createExponentialBackoffPolicy, Yt as buildCollectionSynchronizationHeader, Z as respondWithObject, Zt as ActivityTransformer, _ as ConstructorWithTypeId, _t as parseCircuitBreakerKvState, a as GetObjectOptions, at as ParallelMessageQueue, b as Federation, bt as ActorHandleMapper, c as OutboxContext, ct as CircuitBreakerBeforeSendDecision, d as RequestContext, dt as CircuitBreakerKvState, et as InProcessMessageQueueOptions, f as RouteActivityOptions, ft as CircuitBreakerOptions, g as CollectionCallbackSetters, gt as normalizeCircuitBreakerOptions, h as ActorCallbackSetters, ht as NormalizedCircuitBreakerOptions, i as GetActorOptions, it as MessageQueueListenOptions, j as ObjectCallbackSetters, jt as InboxErrorHandler, k as InboxListenerSetters, kt as HashlinkMediaDispatcher, l as ParseUriResult, lt as CircuitBreakerCreateOptions, m as SendActivityOptionsForCollection, mt as CircuitBreakerStateChange, n as Context, nt as MessageQueueDepth, o as GetSignedKeyOptions, ot as CircuitBreaker, p as SendActivityOptions, pt as CircuitBreakerState, q as RetryContext, qt as SenderKeyPair, r as ForwardActivityOptions, rt as MessageQueueEnqueueOptions, s as InboxContext, st as CircuitBreakerActivityDrop, t as ActorKeyPair, tt as MessageQueue, u as PortableRequest, ut as CircuitBreakerFailurePolicy, v as CustomCollectionCallbackSetters, vt as ActorAliasMapper, w as FederationOptions, wt as CollectionCursor, x as FederationBenchmarkOptions, xt as ActorKeyPairsDispatcher, y as Federatable, yt as ActorDispatcher, z as Message, zt as OutboxListenerErrorHandler } from "./context-Ci5vuUr_.js";
5
+ import { $ as InProcessMessageQueue, A as MediaUploaderSetters, At as HashlinkMediaRequest, B as createFederationBuilder, Bt as OutboxPermanentFailureHandler, C as FederationFetchOptions, Ct as CollectionCounter, D as IdempotencyStrategy, Dt as CustomCollectionCursor, E as IdempotencyKeyCallback, Et as CustomCollectionCounter, F as FederationKvPrefixes, Ft as ObjectAuthorizePredicate, G as TaskRegistry, Gt as WebFingerLinksDispatcher, H as TaskDefinitionOptions, Ht as SharedInboxKeyDispatcher, I as FederationOrigin, It as ObjectDispatcher, J as RetryPolicy, Jt as PageItems, K as CreateExponentialBackoffPolicyOptions, Kt as SendActivityError, L as FederationQueueOptions, Lt as OutboxErrorHandler, M as OutboxListenerSetters, Mt as InboxListener, N as PortableInboxForwardingOptions, Nt as MediaUploaderCallback, O as InboxChallengePolicy, Ot as CustomCollectionDispatcher, P as Rfc6570Expression, Pt as NodeInfoDispatcher, Q as respondWithObjectIfAcceptable, R as createFederation, Rt as OutboxListener, S as FederationBuilder, St as AuthorizePredicate, T as FederationStartQueueOptions, Tt as CollectionDispatcher, U as TaskEnqueueOptions, Ut as UnverifiedActivityHandler, V as TaskDefinition, Vt as PortableActorIdMapper, W as TaskHandler, Wt as UnverifiedActivityReason, X as RespondWithObjectOptions, Xt as digest, Y as createExponentialBackoffPolicy, Yt as buildCollectionSynchronizationHeader, Z as respondWithObject, Zt as ActivityTransformer, _ as ConstructorWithTypeId, _t as parseCircuitBreakerKvState, a as GetObjectOptions, at as ParallelMessageQueue, b as Federation, bt as ActorHandleMapper, c as OutboxContext, ct as CircuitBreakerBeforeSendDecision, d as RequestContext, dt as CircuitBreakerKvState, et as InProcessMessageQueueOptions, f as RouteActivityOptions, ft as CircuitBreakerOptions, g as CollectionCallbackSetters, gt as normalizeCircuitBreakerOptions, h as ActorCallbackSetters, ht as NormalizedCircuitBreakerOptions, i as GetActorOptions, it as MessageQueueListenOptions, j as ObjectCallbackSetters, jt as InboxErrorHandler, k as InboxListenerSetters, kt as HashlinkMediaDispatcher, l as ParseUriResult, lt as CircuitBreakerCreateOptions, m as SendActivityOptionsForCollection, mt as CircuitBreakerStateChange, n as Context, nt as MessageQueueDepth, o as GetSignedKeyOptions, ot as CircuitBreaker, p as SendActivityOptions, pt as CircuitBreakerState, q as RetryContext, qt as SenderKeyPair, r as ForwardActivityOptions, rt as MessageQueueEnqueueOptions, s as InboxContext, st as CircuitBreakerActivityDrop, t as ActorKeyPair, tt as MessageQueue, u as PortableRequest, ut as CircuitBreakerFailurePolicy, v as CustomCollectionCallbackSetters, vt as ActorAliasMapper, w as FederationOptions, wt as CollectionCursor, x as FederationBenchmarkOptions, xt as ActorKeyPairsDispatcher, y as Federatable, yt as ActorDispatcher, z as Message, zt as OutboxListenerErrorHandler } from "./context-Cz1w5Krc.js";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.js";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
8
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-eVOUPbQE.js";
9
- import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-Co53r-VP.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-Cwdt_CWU.js";
8
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-owwElvpw.js";
9
+ import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-Bz9tFXI2.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CZetqT5h.js";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-DAtXl_Kc.js";
5
5
  import "./compat/mod.js";
6
- import { B as generateCryptoKeyPair, I as exportJwk, N as verifyJsonLd, O as hasSignatureLike, P as verifySignature, R as fetchKey, S as attachSignature, T as detachSignature, V as importJwk, a as signRequest, ct as formatAcceptSignature, d as hasProofLike, dt as validateAcceptSignature, f as signObject, h as verifyPortableObjectProof, j as signJsonLd, lt as fulfillAcceptSignature, m as verifyObject, o as verifyRequest, s as verifyRequestDetailed, u as createProof, ut as parseAcceptSignature, v as verifyProof, w as createSignature, z as fetchKeyDetailed } from "./http-Rmbiu-5S.js";
7
- import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-K9aLnf57.js";
6
+ import { B as fetchKeyDetailed, C as attachSignature, E as detachSignature, F as verifySignature, H as importJwk, L as exportJwk, M as signJsonLd, P as verifyJsonLd, T as createSignature, V as generateCryptoKeyPair, a as signRequest, d as createProof, dt as parseAcceptSignature, f as hasProofLike, ft as validateAcceptSignature, g as verifyPortableObjectProof, h as verifyObject, k as hasSignatureLike, lt as formatAcceptSignature, o as verifyRequest, p as signObject, s as verifyRequestDetailed, ut as fulfillAcceptSignature, y as verifyProof, z as fetchKey } from "./http-C2M6wcs8.js";
7
+ import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-CylX-pvI.js";
8
8
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-C_cNlNVK.js";
9
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-DdXsKBg4.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BweDce2I.js";
9
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-CgglAI9B.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-D7TiyMxv.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
@@ -5,7 +5,7 @@ import { r as createRequestContext } from "../context-DfSVPcJ8.mjs";
5
5
  import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
7
  import "../std__assert-DvMDRPes.mjs";
8
- import { C as handleNodeInfo, o as createFederation, w as handleNodeInfoJrd } from "../middleware-BdhvduR9.mjs";
8
+ import { C as handleNodeInfo, o as createFederation, w as handleNodeInfoJrd } from "../middleware-DN3MdTDg.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -1,10 +1,10 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-Be9xoxps.mjs";
5
- import { a as isCompatibleKeyId, l as isSamePublicKey$1, s as isPortableId, t as getCanonicalPortableId } from "./portable-key-id-T7lecIbt.mjs";
6
- import { l as verifyKeyOwnership, n as exportJwk, r as fetchActorDocument } from "./key-Cc1b6pW9.mjs";
7
- import { t as fetchPortableGatewayKey } from "./portable-key-C-fPq_Yf.mjs";
4
+ import { n as version, t as name } from "./deno-_o3lkDlG.mjs";
5
+ import { c as isPortableId, d as isSamePublicKey$1, o as isCompatibleKeyId, t as getCanonicalPortableId, u as isPortableUri } from "./portable-key-id-Bg259c4Z.mjs";
6
+ import { l as verifyKeyOwnership, n as exportJwk, r as fetchActorDocument } from "./key-DolJjJab.mjs";
7
+ import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-DqX2emHQ.mjs";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
10
10
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -44,6 +44,14 @@ async function doesActorOwnKey(activity, key, options) {
44
44
  span.setAttribute("activitypub.key_ownership.method", "none");
45
45
  return false;
46
46
  }
47
+ if (key.id != null && isPortableUri(key.id)) {
48
+ const owner = await getPortableActorKeyOwner(key, options);
49
+ const ownerId = owner?.id == null ? null : getCanonicalPortableId(owner.id);
50
+ const verified = ownerId != null && ownerId === getCanonicalPortableId(actorId);
51
+ span.setAttribute("activitypub.key_ownership.verified", verified);
52
+ span.setAttribute("activitypub.key_ownership.method", "portable_actor_key");
53
+ return verified;
54
+ }
47
55
  if (key.id != null && isCompatibleKeyId(key.id)) {
48
56
  const owner = await getPortableGatewayKeyOwner(key, options);
49
57
  if (owner !== void 0) {
@@ -143,6 +151,7 @@ async function getKeyOwner(keyId, options) {
143
151
  tracerProvider
144
152
  };
145
153
  const id = keyId instanceof CryptographicKey ? keyId.id : keyId;
154
+ if (id != null && isPortableUri(id)) return await getPortableActorKeyOwner(keyId, fetchOptions);
146
155
  if (id != null && isCompatibleKeyId(id)) {
147
156
  const owner = await getPortableGatewayKeyOwner(keyId, fetchOptions);
148
157
  if (owner !== void 0) return owner;
@@ -215,5 +224,29 @@ async function getPortableGatewayKeyOwner(key, options) {
215
224
  }
216
225
  return resolution.actor;
217
226
  }
227
+ /**
228
+ * Resolves the owner of a key of an [FEP-ef61] portable actor at an `ap:` or
229
+ * `ap+ef61:` key ID.
230
+ *
231
+ * [FEP-ef61]: https://w3id.org/fep/ef61
232
+ * @param key The key, or its ID, which must be an `ap:` or `ap+ef61:` URI.
233
+ * @param options Options for fetching the key.
234
+ * @returns The portable actor if its signed document vouches for the key,
235
+ * and the given key, if any, has the same key material, or `null`
236
+ * if not.
237
+ */
238
+ async function getPortableActorKeyOwner(key, options) {
239
+ const keyId = key instanceof CryptographicKey ? key.id : key;
240
+ if (keyId == null) return null;
241
+ const resolution = await resolvePortableActorKey(keyId, options);
242
+ if (resolution.type !== "verified") return null;
243
+ if (key instanceof CryptographicKey) {
244
+ if (key.publicKey == null || !await isSamePublicKey$1(key.publicKey, resolution.key.publicKey)) {
245
+ logger.debug("The key {keyId} does not have the same key material as the key its portable actor vouches for.", { keyId: keyId.href });
246
+ return null;
247
+ }
248
+ }
249
+ return resolution.actor;
250
+ }
218
251
  //#endregion
219
252
  export { getKeyOwner as n, doesActorOwnKey as t };
@@ -1,8 +1,8 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-Be9xoxps.mjs";
5
- import { l as verifyPortableObjectProofWithRoot, s as verifyPortableObjectProof } from "./proof-CW8k0R1G.mjs";
4
+ import { n as version, t as name } from "./deno-_o3lkDlG.mjs";
5
+ import { l as verifyPortableObjectProofWithRoot, s as verifyPortableObjectProof } from "./proof-B4_0E-KU.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { CollectionPage, Object as Object$1, isActor } from "@fedify/vocab";
8
8
  import { trace } from "@opentelemetry/api";
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { I as exportJwk, L as fetchActorDocument, U as verifyKeyOwnership, _ as verifyPortableObjectProofWithRoot, _t as isPortableId, bt as name, c as fetchPortableGatewayKey, ft as getCanonicalPortableId, gt as isCompatibleKeyId, h as verifyPortableObjectProof, xt as version, yt as isSamePublicKey$1 } from "./http-Rmbiu-5S.js";
3
+ import { Ct as version, L as exportJwk, R as fetchActorDocument, St as name, W as verifyKeyOwnership, _t as isCompatibleKeyId, bt as isPortableUri, c as fetchPortableGatewayKey, g as verifyPortableObjectProof, l as resolvePortableActorKey, pt as getCanonicalPortableId, v as verifyPortableObjectProofWithRoot, vt as isPortableId, xt as isSamePublicKey$1 } from "./http-C2M6wcs8.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { CollectionPage, CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -41,6 +41,14 @@ async function doesActorOwnKey(activity, key, options) {
41
41
  span.setAttribute("activitypub.key_ownership.method", "none");
42
42
  return false;
43
43
  }
44
+ if (key.id != null && isPortableUri(key.id)) {
45
+ const owner = await getPortableActorKeyOwner(key, options);
46
+ const ownerId = owner?.id == null ? null : getCanonicalPortableId(owner.id);
47
+ const verified = ownerId != null && ownerId === getCanonicalPortableId(actorId);
48
+ span.setAttribute("activitypub.key_ownership.verified", verified);
49
+ span.setAttribute("activitypub.key_ownership.method", "portable_actor_key");
50
+ return verified;
51
+ }
44
52
  if (key.id != null && isCompatibleKeyId(key.id)) {
45
53
  const owner = await getPortableGatewayKeyOwner(key, options);
46
54
  if (owner !== void 0) {
@@ -140,6 +148,7 @@ async function getKeyOwner(keyId, options) {
140
148
  tracerProvider
141
149
  };
142
150
  const id = keyId instanceof CryptographicKey ? keyId.id : keyId;
151
+ if (id != null && isPortableUri(id)) return await getPortableActorKeyOwner(keyId, fetchOptions);
143
152
  if (id != null && isCompatibleKeyId(id)) {
144
153
  const owner = await getPortableGatewayKeyOwner(keyId, fetchOptions);
145
154
  if (owner !== void 0) return owner;
@@ -212,6 +221,30 @@ async function getPortableGatewayKeyOwner(key, options) {
212
221
  }
213
222
  return resolution.actor;
214
223
  }
224
+ /**
225
+ * Resolves the owner of a key of an [FEP-ef61] portable actor at an `ap:` or
226
+ * `ap+ef61:` key ID.
227
+ *
228
+ * [FEP-ef61]: https://w3id.org/fep/ef61
229
+ * @param key The key, or its ID, which must be an `ap:` or `ap+ef61:` URI.
230
+ * @param options Options for fetching the key.
231
+ * @returns The portable actor if its signed document vouches for the key,
232
+ * and the given key, if any, has the same key material, or `null`
233
+ * if not.
234
+ */
235
+ async function getPortableActorKeyOwner(key, options) {
236
+ const keyId = key instanceof CryptographicKey ? key.id : key;
237
+ if (keyId == null) return null;
238
+ const resolution = await resolvePortableActorKey(keyId, options);
239
+ if (resolution.type !== "verified") return null;
240
+ if (key instanceof CryptographicKey) {
241
+ if (key.publicKey == null || !await isSamePublicKey$1(key.publicKey, resolution.key.publicKey)) {
242
+ logger$1.debug("The key {keyId} does not have the same key material as the key its portable actor vouches for.", { keyId: keyId.href });
243
+ return null;
244
+ }
245
+ }
246
+ return resolution.actor;
247
+ }
215
248
  //#endregion
216
249
  //#region src/sig/portable-collection.ts
217
250
  const logger = getLogger([
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
- const require_http = require("./http-o8l4QeUY.cjs");
2
+ const require_http = require("./http-B1J6E-bT.cjs");
3
3
  let _logtape_logtape = require("@logtape/logtape");
4
4
  let _fedify_vocab = require("@fedify/vocab");
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -40,6 +40,14 @@ async function doesActorOwnKey(activity, key, options) {
40
40
  span.setAttribute("activitypub.key_ownership.method", "none");
41
41
  return false;
42
42
  }
43
+ if (key.id != null && require_http.isPortableUri(key.id)) {
44
+ const owner = await getPortableActorKeyOwner(key, options);
45
+ const ownerId = owner?.id == null ? null : require_http.getCanonicalPortableId(owner.id);
46
+ const verified = ownerId != null && ownerId === require_http.getCanonicalPortableId(actorId);
47
+ span.setAttribute("activitypub.key_ownership.verified", verified);
48
+ span.setAttribute("activitypub.key_ownership.method", "portable_actor_key");
49
+ return verified;
50
+ }
43
51
  if (key.id != null && require_http.isCompatibleKeyId(key.id)) {
44
52
  const owner = await getPortableGatewayKeyOwner(key, options);
45
53
  if (owner !== void 0) {
@@ -139,6 +147,7 @@ async function getKeyOwner(keyId, options) {
139
147
  tracerProvider
140
148
  };
141
149
  const id = keyId instanceof _fedify_vocab.CryptographicKey ? keyId.id : keyId;
150
+ if (id != null && require_http.isPortableUri(id)) return await getPortableActorKeyOwner(keyId, fetchOptions);
142
151
  if (id != null && require_http.isCompatibleKeyId(id)) {
143
152
  const owner = await getPortableGatewayKeyOwner(keyId, fetchOptions);
144
153
  if (owner !== void 0) return owner;
@@ -211,6 +220,30 @@ async function getPortableGatewayKeyOwner(key, options) {
211
220
  }
212
221
  return resolution.actor;
213
222
  }
223
+ /**
224
+ * Resolves the owner of a key of an [FEP-ef61] portable actor at an `ap:` or
225
+ * `ap+ef61:` key ID.
226
+ *
227
+ * [FEP-ef61]: https://w3id.org/fep/ef61
228
+ * @param key The key, or its ID, which must be an `ap:` or `ap+ef61:` URI.
229
+ * @param options Options for fetching the key.
230
+ * @returns The portable actor if its signed document vouches for the key,
231
+ * and the given key, if any, has the same key material, or `null`
232
+ * if not.
233
+ */
234
+ async function getPortableActorKeyOwner(key, options) {
235
+ const keyId = key instanceof _fedify_vocab.CryptographicKey ? key.id : key;
236
+ if (keyId == null) return null;
237
+ const resolution = await require_http.resolvePortableActorKey(keyId, options);
238
+ if (resolution.type !== "verified") return null;
239
+ if (key instanceof _fedify_vocab.CryptographicKey) {
240
+ if (key.publicKey == null || !await require_http.isSamePublicKey(key.publicKey, resolution.key.publicKey)) {
241
+ logger$1.debug("The key {keyId} does not have the same key material as the key its portable actor vouches for.", { keyId: keyId.href });
242
+ return null;
243
+ }
244
+ }
245
+ return resolution.actor;
246
+ }
214
247
  //#endregion
215
248
  //#region src/sig/portable-collection.ts
216
249
  const logger = (0, _logtape_logtape.getLogger)([