@fedify/fedify 2.3.0-dev.1137 → 2.3.0-dev.1150

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 (68) hide show
  1. package/dist/{builder-BCkBXxky.mjs → builder-Bjm1Jq9n.mjs} +2 -2
  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/{context-DI2gRbyN.d.cts → context-CRXCkTM6.d.cts} +48 -6
  6. package/dist/{context-DCtsSHDv.d.ts → context-MgCh7YGu.d.ts} +48 -6
  7. package/dist/{deno-B_9yJW3w.mjs → deno-CKFE6Uya.mjs} +1 -1
  8. package/dist/{docloader-BT89tyFr.mjs → docloader-B-ZE1cZf.mjs} +2 -2
  9. package/dist/federation/builder.test.mjs +1 -1
  10. package/dist/federation/handler.test.mjs +1363 -44
  11. package/dist/federation/idempotency.test.mjs +2 -2
  12. package/dist/federation/metrics.test.mjs +60 -1
  13. package/dist/federation/middleware.test.mjs +1667 -163
  14. package/dist/federation/mod.cjs +1 -1
  15. package/dist/federation/mod.d.cts +2 -2
  16. package/dist/federation/mod.d.ts +2 -2
  17. package/dist/federation/mod.js +1 -1
  18. package/dist/federation/retry.test.mjs +1 -1
  19. package/dist/federation/send.test.mjs +8 -8
  20. package/dist/federation/temporal.test.d.mts +2 -0
  21. package/dist/federation/temporal.test.mjs +71 -0
  22. package/dist/federation/webfinger.test.mjs +147 -2
  23. package/dist/{getMachineId-bsd-etIyxDet.mjs → getMachineId-bsd-BY01PL1n.mjs} +1 -1
  24. package/dist/{getMachineId-darwin-D23zTf4g.mjs → getMachineId-darwin-Dr1gkBkp.mjs} +1 -1
  25. package/dist/{getMachineId-win-Dpap6v5i.mjs → getMachineId-win-QEYwcJiy.mjs} +1 -1
  26. package/dist/{http-CWoeyogl.cjs → http-DQYEA7AZ.cjs} +53 -1
  27. package/dist/{http-CToqG5ap.js → http-WbS1gKzr.js} +48 -2
  28. package/dist/{http-Cyx5SNuu.mjs → http-vHCgbhTg.mjs} +3 -3
  29. package/dist/{key-CkkMJBjF.mjs → key-N0zP_oJA.mjs} +2 -2
  30. package/dist/{kv-cache-CuCn2xvM.js → kv-cache-DM2O-Yjy.js} +1 -1
  31. package/dist/{kv-cache-DuEwFYcN.cjs → kv-cache-Dsg_bi4N.cjs} +1 -1
  32. package/dist/{kv-cache-VHFP42vY.mjs → kv-cache-GXXZEemD.mjs} +1 -1
  33. package/dist/{ld-k8yqD2a-.mjs → ld-BwKhquPx.mjs} +302 -6
  34. package/dist/{metrics-iRBg8jTk.mjs → metrics-7Vy9FvEw.mjs} +48 -2
  35. package/dist/{middleware-D7FrhN9q.js → middleware-BscgvU-m.js} +496 -115
  36. package/dist/{middleware-BWLUrbS9.cjs → middleware-D_iXrYHJ.cjs} +497 -115
  37. package/dist/{middleware-CztxpARM.mjs → middleware-Db1_qAFG.mjs} +1 -1
  38. package/dist/{middleware-DQEgdr83.mjs → middleware-ZuUcO0t1.mjs} +416 -124
  39. package/dist/{mod-C504qevA.d.cts → mod-C7HOzGqH.d.cts} +11 -2
  40. package/dist/{mod-wYfuXeDE.d.ts → mod-CpQHB3Ys.d.ts} +11 -2
  41. package/dist/mod.cjs +4 -4
  42. package/dist/mod.d.cts +2 -2
  43. package/dist/mod.d.ts +2 -2
  44. package/dist/mod.js +4 -4
  45. package/dist/nodeinfo/handler.test.mjs +1 -1
  46. package/dist/{owner-nmXdvXpc.mjs → owner-FD0H_vpj.mjs} +2 -2
  47. package/dist/{proof-CcsIJLTn.cjs → proof-CYK8T8IS.cjs} +353 -3
  48. package/dist/{proof-NRmtrTDu.js → proof-I3EokKN-.js} +300 -4
  49. package/dist/{proof-DpwO1T4S.mjs → proof-V_lafPmA.mjs} +3 -3
  50. package/dist/{send-DvX2tYyZ.mjs → send-Cc2_10tF.mjs} +3 -3
  51. package/dist/sig/http.test.mjs +2 -2
  52. package/dist/sig/key.test.mjs +1 -1
  53. package/dist/sig/ld.test.mjs +558 -2
  54. package/dist/sig/mod.cjs +2 -2
  55. package/dist/sig/mod.js +2 -2
  56. package/dist/sig/owner.test.mjs +1 -1
  57. package/dist/sig/proof.test.mjs +1 -1
  58. package/dist/temporal-BkmBfs__.mjs +95 -0
  59. package/dist/testing/mod.d.mts +48 -6
  60. package/dist/utils/docloader.test.mjs +2 -2
  61. package/dist/utils/kv-cache.test.mjs +1 -1
  62. package/dist/utils/mod.cjs +1 -1
  63. package/dist/utils/mod.js +1 -1
  64. package/package.json +6 -6
  65. /package/dist/{execAsync-DCBrgFiV.mjs → execAsync-Dxb7rNf3.mjs} +0 -0
  66. /package/dist/{getMachineId-linux-ObI47Hql.mjs → getMachineId-linux-Bbhofx-s.mjs} +0 -0
  67. /package/dist/{getMachineId-unsupported-Ddu-PFeh.mjs → getMachineId-unsupported-dIOte2Ct.mjs} +0 -0
  68. /package/dist/{retry-v_sGLH1d.mjs → retry-_VvV0h9f.mjs} +0 -0
@@ -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-BWLUrbS9.cjs");
5
+ const require_middleware = require("../middleware-D_iXrYHJ.cjs");
6
6
  let _logtape_logtape = require("@logtape/logtape");
7
7
  let _fedify_uri_template = require("@fedify/uri-template");
8
8
  let es_toolkit = require("es-toolkit");
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as CustomCollectionDispatcher, A as FederationKvPrefixes, B as RespondWithObjectOptions, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as ActorHandleMapper, H as respondWithObjectIfAcceptable, I as RetryPolicy, J as CollectionCounter, K as ActorKeyPairsDispatcher, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CustomCollectionCursor, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as ActorAliasMapper, V as respondWithObject, W as ActorDispatcher, X as CollectionDispatcher, Y as CollectionCursor, Z as CustomCollectionCounter, _ as Federatable, _t as digest, a as GetSignedKeyOptions, at as OutboxErrorHandler, b as FederationFetchOptions, c as ParseUriResult, ct as OutboxPermanentFailureHandler, d as SendActivityOptions, dt as UnverifiedActivityReason, et as InboxErrorHandler, f as SendActivityOptionsForCollection, ft as WebFingerLinksDispatcher, g as CustomCollectionCallbackSetters, gt as buildCollectionSynchronizationHeader, h as ConstructorWithTypeId, ht as PageItems, i as GetActorOptions, it as ObjectDispatcher, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as SharedInboxKeyDispatcher, m as CollectionCallbackSetters, mt as SenderKeyPair, n as Context, nt as NodeInfoDispatcher, o as InboxContext, ot as OutboxListener, p as ActorCallbackSetters, pt as SendActivityError, q as AuthorizePredicate, r as ForwardActivityOptions, rt as ObjectAuthorizePredicate, s as OutboxContext, st as OutboxListenerErrorHandler, t as ActorKeyPair, tt as InboxListener, u as RouteActivityOptions, ut as UnverifiedActivityHandler, v as Federation, w as IdempotencyStrategy, x as FederationOptions, y as FederationBuilder, z as createFederationBuilder } from "../context-DI2gRbyN.cjs";
2
+ import { $ as CustomCollectionDispatcher, A as FederationKvPrefixes, B as RespondWithObjectOptions, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as ActorHandleMapper, H as respondWithObjectIfAcceptable, I as RetryPolicy, J as CollectionCounter, K as ActorKeyPairsDispatcher, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CustomCollectionCursor, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as ActorAliasMapper, V as respondWithObject, W as ActorDispatcher, X as CollectionDispatcher, Y as CollectionCursor, Z as CustomCollectionCounter, _ as Federatable, _t as digest, a as GetSignedKeyOptions, at as OutboxErrorHandler, b as FederationFetchOptions, c as ParseUriResult, ct as OutboxPermanentFailureHandler, d as SendActivityOptions, dt as UnverifiedActivityReason, et as InboxErrorHandler, f as SendActivityOptionsForCollection, ft as WebFingerLinksDispatcher, g as CustomCollectionCallbackSetters, gt as buildCollectionSynchronizationHeader, h as ConstructorWithTypeId, ht as PageItems, i as GetActorOptions, it as ObjectDispatcher, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as SharedInboxKeyDispatcher, m as CollectionCallbackSetters, mt as SenderKeyPair, n as Context, nt as NodeInfoDispatcher, o as InboxContext, ot as OutboxListener, p as ActorCallbackSetters, pt as SendActivityError, q as AuthorizePredicate, r as ForwardActivityOptions, rt as ObjectAuthorizePredicate, s as OutboxContext, st as OutboxListenerErrorHandler, t as ActorKeyPair, tt as InboxListener, u as RouteActivityOptions, ut as UnverifiedActivityHandler, v as Federation, w as IdempotencyStrategy, x as FederationOptions, y as FederationBuilder, z as createFederationBuilder } from "../context-CRXCkTM6.cjs";
3
3
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-gJ8LYbxX.cjs";
4
4
  import { a as MessageQueueEnqueueOptions, i as MessageQueueDepth, n as InProcessMessageQueueOptions, o as MessageQueueListenOptions, r as MessageQueue, s as ParallelMessageQueue, t as InProcessMessageQueue } from "../mq-D8uSFzxe.cjs";
5
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-C504qevA.cjs";
5
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-C7HOzGqH.cjs";
6
6
  export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { $ as CustomCollectionDispatcher, A as FederationKvPrefixes, B as RespondWithObjectOptions, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as ActorHandleMapper, H as respondWithObjectIfAcceptable, I as RetryPolicy, J as CollectionCounter, K as ActorKeyPairsDispatcher, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CustomCollectionCursor, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as ActorAliasMapper, V as respondWithObject, W as ActorDispatcher, X as CollectionDispatcher, Y as CollectionCursor, Z as CustomCollectionCounter, _ as Federatable, _t as digest, a as GetSignedKeyOptions, at as OutboxErrorHandler, b as FederationFetchOptions, c as ParseUriResult, ct as OutboxPermanentFailureHandler, d as SendActivityOptions, dt as UnverifiedActivityReason, et as InboxErrorHandler, f as SendActivityOptionsForCollection, ft as WebFingerLinksDispatcher, g as CustomCollectionCallbackSetters, gt as buildCollectionSynchronizationHeader, h as ConstructorWithTypeId, ht as PageItems, i as GetActorOptions, it as ObjectDispatcher, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as SharedInboxKeyDispatcher, m as CollectionCallbackSetters, mt as SenderKeyPair, n as Context, nt as NodeInfoDispatcher, o as InboxContext, ot as OutboxListener, p as ActorCallbackSetters, pt as SendActivityError, q as AuthorizePredicate, r as ForwardActivityOptions, rt as ObjectAuthorizePredicate, s as OutboxContext, st as OutboxListenerErrorHandler, t as ActorKeyPair, tt as InboxListener, u as RouteActivityOptions, ut as UnverifiedActivityHandler, v as Federation, w as IdempotencyStrategy, x as FederationOptions, y as FederationBuilder, z as createFederationBuilder } from "../context-DCtsSHDv.js";
2
+ import { $ as CustomCollectionDispatcher, A as FederationKvPrefixes, B as RespondWithObjectOptions, C as IdempotencyKeyCallback, D as ObjectCallbackSetters, E as InboxListenerSetters, F as RetryContext, G as ActorHandleMapper, H as respondWithObjectIfAcceptable, I as RetryPolicy, J as CollectionCounter, K as ActorKeyPairsDispatcher, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, P as CreateExponentialBackoffPolicyOptions, Q as CustomCollectionCursor, R as Message, S as FederationStartQueueOptions, T as InboxChallengePolicy, U as ActorAliasMapper, V as respondWithObject, W as ActorDispatcher, X as CollectionDispatcher, Y as CollectionCursor, Z as CustomCollectionCounter, _ as Federatable, _t as digest, a as GetSignedKeyOptions, at as OutboxErrorHandler, b as FederationFetchOptions, c as ParseUriResult, ct as OutboxPermanentFailureHandler, d as SendActivityOptions, dt as UnverifiedActivityReason, et as InboxErrorHandler, f as SendActivityOptionsForCollection, ft as WebFingerLinksDispatcher, g as CustomCollectionCallbackSetters, gt as buildCollectionSynchronizationHeader, h as ConstructorWithTypeId, ht as PageItems, i as GetActorOptions, it as ObjectDispatcher, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as SharedInboxKeyDispatcher, m as CollectionCallbackSetters, mt as SenderKeyPair, n as Context, nt as NodeInfoDispatcher, o as InboxContext, ot as OutboxListener, p as ActorCallbackSetters, pt as SendActivityError, q as AuthorizePredicate, r as ForwardActivityOptions, rt as ObjectAuthorizePredicate, s as OutboxContext, st as OutboxListenerErrorHandler, t as ActorKeyPair, tt as InboxListener, u as RouteActivityOptions, ut as UnverifiedActivityHandler, v as Federation, w as IdempotencyStrategy, x as FederationOptions, y as FederationBuilder, z as createFederationBuilder } from "../context-MgCh7YGu.js";
3
3
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-D6hNiMTK.js";
4
4
  import { a as MessageQueueEnqueueOptions, i as MessageQueueDepth, n as InProcessMessageQueueOptions, o as MessageQueueListenOptions, r as MessageQueue, s as ParallelMessageQueue, t as InProcessMessageQueue } from "../mq-D-nlpY04.js";
5
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-wYfuXeDE.js";
5
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "../mod-CpQHB3Ys.js";
6
6
  export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetActorOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -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, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-D7FrhN9q.js";
3
+ import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-BscgvU-m.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Router as Router$1, RouterError as RouterError$1, assertPath, isPath } from "@fedify/uri-template";
6
6
  import { isEqual } from "es-toolkit";
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { l as AssertionError, t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
5
  import { t as assertNotEquals } from "../assert_not_equals-DkVK8oqV.mjs";
6
- import { t as createExponentialBackoffPolicy } from "../retry-v_sGLH1d.mjs";
6
+ import { t as createExponentialBackoffPolicy } from "../retry-_VvV0h9f.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  //#region src/federation/retry.test.ts
9
9
  test("createExponentialBackoffPolicy()", () => {
@@ -9,10 +9,10 @@ import { t as assertInstanceOf } from "../assert_instance_of-DBC5X09g.mjs";
9
9
  import { t as assertNotEquals } from "../assert_not_equals-DkVK8oqV.mjs";
10
10
  import { t as assert } from "../assert-OguE97r2.mjs";
11
11
  import { t as esm_default } from "../esm-BQRw925N.mjs";
12
- import { l as verifyRequest } from "../http-Cyx5SNuu.mjs";
12
+ import { l as verifyRequest } from "../http-vHCgbhTg.mjs";
13
13
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-C3kae-6B.mjs";
14
- import { t as doesActorOwnKey } from "../owner-nmXdvXpc.mjs";
15
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-DvX2tYyZ.mjs";
14
+ import { t as doesActorOwnKey } from "../owner-FD0H_vpj.mjs";
15
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-Cc2_10tF.mjs";
16
16
  import { Activity, Application, Endpoints, Group, Person, Service } from "@fedify/vocab";
17
17
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
18
18
  //#region ../../node_modules/.pnpm/@opentelemetry+sdk-metrics@2.7.1_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationTemporality.js
@@ -2525,19 +2525,19 @@ var require_getMachineId = /* @__PURE__ */ __commonJSMin(((exports) => {
2525
2525
  async function getMachineId() {
2526
2526
  if (!getMachineIdImpl) switch (process$1.platform) {
2527
2527
  case "darwin":
2528
- getMachineIdImpl = (await import("../getMachineId-darwin-D23zTf4g.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2528
+ getMachineIdImpl = (await import("../getMachineId-darwin-Dr1gkBkp.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2529
2529
  break;
2530
2530
  case "linux":
2531
- getMachineIdImpl = (await import("../getMachineId-linux-ObI47Hql.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2531
+ getMachineIdImpl = (await import("../getMachineId-linux-Bbhofx-s.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2532
2532
  break;
2533
2533
  case "freebsd":
2534
- getMachineIdImpl = (await import("../getMachineId-bsd-etIyxDet.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2534
+ getMachineIdImpl = (await import("../getMachineId-bsd-BY01PL1n.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2535
2535
  break;
2536
2536
  case "win32":
2537
- getMachineIdImpl = (await import("../getMachineId-win-Dpap6v5i.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2537
+ getMachineIdImpl = (await import("../getMachineId-win-QEYwcJiy.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2538
2538
  break;
2539
2539
  default:
2540
- getMachineIdImpl = (await import("../getMachineId-unsupported-Ddu-PFeh.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2540
+ getMachineIdImpl = (await import("../getMachineId-unsupported-dIOte2Ct.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).getMachineId;
2541
2541
  break;
2542
2542
  }
2543
2543
  return getMachineIdImpl();
@@ -0,0 +1,2 @@
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ import { URLPattern } from "urlpattern-polyfill";
@@ -0,0 +1,71 @@
1
+ import "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import "../std__assert-BBjXFNOb.mjs";
5
+ import { r as assertFalse } from "../assert_rejects-DN60FHPX.mjs";
6
+ import { t as assert } from "../assert-OguE97r2.mjs";
7
+ import { t as hasMalformedKnownTemporalLiteral } from "../temporal-BkmBfs__.mjs";
8
+ import { test } from "@fedify/fixture";
9
+ //#region src/federation/temporal.test.ts
10
+ test("hasMalformedKnownTemporalLiteral() detects expanded proof timestamps", async () => {
11
+ assert(await hasMalformedKnownTemporalLiteral({
12
+ "@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"],
13
+ id: "https://example.com/activities/invalid-proof-created",
14
+ type: "Create",
15
+ actor: "https://example.com/person2",
16
+ object: {
17
+ id: "https://example.com/notes/invalid-proof-created",
18
+ type: "Note",
19
+ attributedTo: "https://example.com/person2",
20
+ content: "Hello, world!"
21
+ },
22
+ proof: {
23
+ type: "DataIntegrityProof",
24
+ cryptosuite: "eddsa-jcs-2022",
25
+ verificationMethod: "https://example.com/person2#main-key",
26
+ proofPurpose: "assertionMethod",
27
+ created: { "@value": "not-a-date" },
28
+ proofValue: "zLaewdp4H9kqtwyrLatK4cjY5oRHwVcw4gibPSUDYDMhi4M49v8pcYk3ZB6D69dNpAPbUmY8ocuJ3m9KhKJEEg7z"
29
+ }
30
+ }, void 0));
31
+ });
32
+ test("hasMalformedKnownTemporalLiteral() follows aliases in nested objects", async () => {
33
+ assert(await hasMalformedKnownTemporalLiteral({
34
+ "@context": ["https://www.w3.org/ns/activitystreams", { publishedAt: "as:published" }],
35
+ id: "https://example.com/activities/invalid-nested-published",
36
+ type: "Create",
37
+ actor: "https://example.com/person2",
38
+ object: {
39
+ id: "https://example.com/notes/invalid-nested-published",
40
+ type: "Note",
41
+ attributedTo: "https://example.com/person2",
42
+ content: "Hello, world!"
43
+ },
44
+ audience: {
45
+ type: "Note",
46
+ publishedAt: { "@value": "not-a-date" }
47
+ }
48
+ }, void 0));
49
+ });
50
+ test("hasMalformedKnownTemporalLiteral() does not over-classify ignored as:closed values", async () => {
51
+ assertFalse(await hasMalformedKnownTemporalLiteral({
52
+ "@context": "https://www.w3.org/ns/activitystreams",
53
+ type: "Question",
54
+ closed: "not-a-date"
55
+ }, void 0));
56
+ });
57
+ test("hasMalformedKnownTemporalLiteral() detects date-like invalid as:closed values", async () => {
58
+ assert(await hasMalformedKnownTemporalLiteral({
59
+ "@context": "https://www.w3.org/ns/activitystreams",
60
+ type: "Question",
61
+ closed: "2024-02-31T00:00:00Z"
62
+ }, void 0));
63
+ });
64
+ test("hasMalformedKnownTemporalLiteral() ignores custom-typed as:closed values", async () => {
65
+ assertFalse(await hasMalformedKnownTemporalLiteral({ "https://www.w3.org/ns/activitystreams#closed": [{
66
+ "@value": "2024-02-31T00:00:00Z",
67
+ "@type": "https://example.com/ns#customDateTime"
68
+ }] }, void 0));
69
+ });
70
+ //#endregion
71
+ export {};
@@ -4,10 +4,11 @@ globalThis.addEventListener = () => {};
4
4
  import { r as createRequestContext } from "../context-DVoTs_wM.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
6
6
  import "../std__assert-BBjXFNOb.mjs";
7
+ import { t as assertNotEquals } from "../assert_not_equals-DkVK8oqV.mjs";
7
8
  import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
8
- import { o as createFederation, s as handleWebFinger } from "../middleware-DQEgdr83.mjs";
9
+ import { o as createFederation, s as handleWebFinger } from "../middleware-ZuUcO0t1.mjs";
9
10
  import { Image, Link, Person, Tombstone } from "@fedify/vocab";
10
- import { test } from "@fedify/fixture";
11
+ import { createTestMeterProvider, test } from "@fedify/fixture";
11
12
  //#region src/federation/webfinger.test.ts
12
13
  test("handleWebFinger()", async (t) => {
13
14
  const url = new URL("https://example.com/.well-known/webfinger");
@@ -532,5 +533,149 @@ test("handleWebFinger()", async (t) => {
532
533
  });
533
534
  });
534
535
  });
536
+ test("handleWebFinger() records webfinger.handle counter and duration", async (t) => {
537
+ const url = new URL("https://example.com/.well-known/webfinger");
538
+ const actorDispatcher = (ctx, identifier) => {
539
+ if (identifier === "gone") return new Tombstone({ id: ctx.getActorUri(identifier) });
540
+ if (identifier !== "someone") return null;
541
+ return new Person({
542
+ id: ctx.getActorUri(identifier),
543
+ preferredUsername: "someone"
544
+ });
545
+ };
546
+ const onNotFound = () => new Response("Not found", { status: 404 });
547
+ function createContext(u) {
548
+ return createRequestContext({
549
+ federation: createFederation({ kv: new MemoryKvStore() }),
550
+ url: u,
551
+ data: void 0,
552
+ getActorUri(identifier) {
553
+ return new URL(`${u.origin}/users/${identifier}`);
554
+ },
555
+ async getActor(handle) {
556
+ const actor = await actorDispatcher(this, handle);
557
+ return actor instanceof Tombstone ? null : actor;
558
+ },
559
+ parseUri(uri) {
560
+ if (uri == null) return null;
561
+ if (uri.protocol === "acct:") return null;
562
+ if (!uri.pathname.startsWith("/users/")) return null;
563
+ return {
564
+ type: "actor",
565
+ identifier: uri.pathname.split("/").pop()
566
+ };
567
+ }
568
+ });
569
+ }
570
+ await t.step("records result=resolved for a 200 response", async () => {
571
+ const u = new URL(url);
572
+ u.searchParams.set("resource", "acct:someone@example.com");
573
+ const context = createContext(u);
574
+ const [meterProvider, recorder] = createTestMeterProvider();
575
+ assertEquals((await handleWebFinger(context.request, {
576
+ context,
577
+ actorDispatcher,
578
+ onNotFound,
579
+ meterProvider
580
+ })).status, 200);
581
+ const counter = recorder.getMeasurement("webfinger.handle");
582
+ assertNotEquals(counter, void 0);
583
+ assertEquals(counter?.type, "counter");
584
+ assertEquals(counter?.value, 1);
585
+ assertEquals(counter?.attributes["webfinger.handle.result"], "resolved");
586
+ assertEquals(counter?.attributes["webfinger.resource.scheme"], "acct");
587
+ assertEquals(counter?.attributes["http.response.status_code"], 200);
588
+ const duration = recorder.getMeasurement("webfinger.handle.duration");
589
+ assertNotEquals(duration, void 0);
590
+ assertEquals(duration?.type, "histogram");
591
+ assertEquals(duration?.attributes["webfinger.handle.result"], "resolved");
592
+ });
593
+ await t.step("records result=invalid for a 400 response", async () => {
594
+ const context = createContext(new URL(url));
595
+ const [meterProvider, recorder] = createTestMeterProvider();
596
+ assertEquals((await handleWebFinger(context.request, {
597
+ context,
598
+ actorDispatcher,
599
+ onNotFound,
600
+ meterProvider
601
+ })).status, 400);
602
+ const counter = recorder.getMeasurement("webfinger.handle");
603
+ assertEquals(counter?.attributes["webfinger.handle.result"], "invalid");
604
+ assertEquals(counter?.attributes["http.response.status_code"], 400);
605
+ assertEquals("webfinger.resource.scheme" in (counter?.attributes ?? {}), false, "missing resource has no scheme attribute");
606
+ });
607
+ await t.step("records result=not_found for a 404 response", async () => {
608
+ const u = new URL(url);
609
+ u.searchParams.set("resource", "acct:absent@example.com");
610
+ const context = createContext(u);
611
+ const [meterProvider, recorder] = createTestMeterProvider();
612
+ assertEquals((await handleWebFinger(context.request, {
613
+ context,
614
+ actorDispatcher,
615
+ onNotFound,
616
+ meterProvider
617
+ })).status, 404);
618
+ const counter = recorder.getMeasurement("webfinger.handle");
619
+ assertEquals(counter?.attributes["webfinger.handle.result"], "not_found");
620
+ assertEquals(counter?.attributes["http.response.status_code"], 404);
621
+ assertEquals(counter?.attributes["webfinger.resource.scheme"], "acct");
622
+ });
623
+ await t.step("records result=tombstoned for a 410 response", async () => {
624
+ const u = new URL(url);
625
+ u.searchParams.set("resource", "acct:gone@example.com");
626
+ const context = createContext(u);
627
+ const [meterProvider, recorder] = createTestMeterProvider();
628
+ assertEquals((await handleWebFinger(context.request, {
629
+ context,
630
+ actorDispatcher,
631
+ onNotFound,
632
+ meterProvider
633
+ })).status, 410);
634
+ const counter = recorder.getMeasurement("webfinger.handle");
635
+ assertEquals(counter?.attributes["webfinger.handle.result"], "tombstoned");
636
+ assertEquals(counter?.attributes["http.response.status_code"], 410);
637
+ });
638
+ await t.step("records result=not_found when onNotFound returns 200", async () => {
639
+ const u = new URL(url);
640
+ u.searchParams.set("resource", "acct:absent@example.com");
641
+ const context = createContext(u);
642
+ const [meterProvider, recorder] = createTestMeterProvider();
643
+ assertEquals((await handleWebFinger(context.request, {
644
+ context,
645
+ actorDispatcher,
646
+ onNotFound: () => new Response("custom fallback", { status: 200 }),
647
+ meterProvider
648
+ })).status, 200);
649
+ const counter = recorder.getMeasurement("webfinger.handle");
650
+ assertEquals(counter?.attributes["webfinger.handle.result"], "not_found");
651
+ assertEquals(counter?.attributes["http.response.status_code"], 200);
652
+ });
653
+ await t.step("buckets unknown resource schemes as 'other' to keep metric cardinality bounded", async () => {
654
+ const u = new URL(url);
655
+ u.searchParams.set("resource", "ssh:nobody@example.com");
656
+ const context = createContext(u);
657
+ const [meterProvider, recorder] = createTestMeterProvider();
658
+ await handleWebFinger(context.request, {
659
+ context,
660
+ actorDispatcher,
661
+ onNotFound,
662
+ meterProvider
663
+ });
664
+ assertEquals(recorder.getMeasurement("webfinger.handle")?.attributes["webfinger.resource.scheme"], "other");
665
+ });
666
+ await t.step("omits measurements when no meterProvider is provided", async () => {
667
+ const u = new URL(url);
668
+ u.searchParams.set("resource", "acct:someone@example.com");
669
+ const context = createContext(u);
670
+ const [_unused, recorder] = createTestMeterProvider();
671
+ await handleWebFinger(context.request, {
672
+ context,
673
+ actorDispatcher,
674
+ onNotFound
675
+ });
676
+ assertEquals(recorder.getMeasurements("webfinger.handle").length, 0);
677
+ assertEquals(recorder.getMeasurements("webfinger.handle.duration").length, 0);
678
+ });
679
+ });
535
680
  //#endregion
536
681
  export {};
@@ -2,7 +2,7 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as __require, t as __commonJSMin } from "./chunk-DNRtMIoB.mjs";
5
- import { t as require_execAsync } from "./execAsync-DCBrgFiV.mjs";
5
+ import { t as require_execAsync } from "./execAsync-Dxb7rNf3.mjs";
6
6
  //#region ../../node_modules/.pnpm/@opentelemetry+resources@2.7.1_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js
7
7
  var require_getMachineId_bsd = /* @__PURE__ */ __commonJSMin(((exports) => {
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,7 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as __require, t as __commonJSMin } from "./chunk-DNRtMIoB.mjs";
5
- import { t as require_execAsync } from "./execAsync-DCBrgFiV.mjs";
5
+ import { t as require_execAsync } from "./execAsync-Dxb7rNf3.mjs";
6
6
  //#region ../../node_modules/.pnpm/@opentelemetry+resources@2.7.1_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js
7
7
  var require_getMachineId_darwin = /* @__PURE__ */ __commonJSMin(((exports) => {
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,7 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as __require, t as __commonJSMin } from "./chunk-DNRtMIoB.mjs";
5
- import { t as require_execAsync } from "./execAsync-DCBrgFiV.mjs";
5
+ import { t as require_execAsync } from "./execAsync-Dxb7rNf3.mjs";
6
6
  //#region ../../node_modules/.pnpm/@opentelemetry+resources@2.7.1_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js
7
7
  var require_getMachineId_win = /* @__PURE__ */ __commonJSMin(((exports) => {
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,7 +11,7 @@ let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conve
11
11
  let byte_encodings_base64 = require("byte-encodings/base64");
12
12
  //#region deno.json
13
13
  var name = "@fedify/fedify";
14
- var version = "2.3.0-dev.1137+53a1f26d";
14
+ var version = "2.3.0-dev.1150+8db5848a";
15
15
  //#endregion
16
16
  //#region src/sig/accept.ts
17
17
  /**
@@ -177,6 +177,8 @@ var FederationMetrics = class {
177
177
  documentFetch;
178
178
  documentFetchDuration;
179
179
  documentCache;
180
+ webFingerHandle;
181
+ webFingerHandleDuration;
180
182
  constructor(meterProvider) {
181
183
  const meter = meterProvider.getMeter(name, version);
182
184
  this.deliverySent = meter.createCounter("activitypub.delivery.sent", {
@@ -335,6 +337,30 @@ var FederationMetrics = class {
335
337
  description: "KV-backed document loader cache lookups, with `hit` or `miss` classification.",
336
338
  unit: "{lookup}"
337
339
  });
340
+ this.webFingerHandle = meter.createCounter("webfinger.handle", {
341
+ description: "Incoming WebFinger requests handled by Fedify, classified by terminal outcome.",
342
+ unit: "{request}"
343
+ });
344
+ this.webFingerHandleDuration = meter.createHistogram("webfinger.handle.duration", {
345
+ description: "Duration of incoming WebFinger request handling in Fedify.",
346
+ unit: "ms",
347
+ advice: { explicitBucketBoundaries: [
348
+ 5,
349
+ 10,
350
+ 25,
351
+ 50,
352
+ 75,
353
+ 100,
354
+ 250,
355
+ 500,
356
+ 750,
357
+ 1e3,
358
+ 2500,
359
+ 5e3,
360
+ 7500,
361
+ 1e4
362
+ ] }
363
+ });
338
364
  }
339
365
  recordDelivery(inbox, durationMs, success, activityType) {
340
366
  const deliveryAttributes = {
@@ -448,6 +474,13 @@ var FederationMetrics = class {
448
474
  if (attrs.remoteUrl != null) attributes["activitypub.remote.host"] = getRemoteHost(attrs.remoteUrl);
449
475
  this.documentCache.add(1, attributes);
450
476
  }
477
+ recordWebFingerHandle(attrs) {
478
+ const attributes = { "webfinger.handle.result": attrs.result };
479
+ if (attrs.scheme != null) attributes["webfinger.resource.scheme"] = attrs.scheme;
480
+ if (attrs.statusCode != null) attributes["http.response.status_code"] = attrs.statusCode;
481
+ this.webFingerHandle.add(1, attributes);
482
+ this.webFingerHandleDuration.record(attrs.durationMs, attributes);
483
+ }
451
484
  };
452
485
  function buildActivityLifecycleAttributes(result, activityType) {
453
486
  const attributes = { "activitypub.processing.result": result };
@@ -572,6 +605,19 @@ function recordDocumentCache(meterProvider, attrs) {
572
605
  getFederationMetrics(meterProvider).recordDocumentCache(attrs);
573
606
  }
574
607
  /**
608
+ * Records one measurement on `webfinger.handle` (counter) and
609
+ * `webfinger.handle.duration` (histogram) for an incoming WebFinger
610
+ * request handled by Fedify. Counter and histogram are always recorded
611
+ * together, with `webfinger.handle.result` set to one of `resolved`,
612
+ * `invalid`, `not_found`, `tombstoned`, or `error`. The queried
613
+ * resource string is deliberately excluded; it remains on the
614
+ * `webfinger.handle` span for trace-level investigation.
615
+ * @since 2.3.0
616
+ */
617
+ function recordWebFingerHandle(meterProvider, attrs) {
618
+ getFederationMetrics(meterProvider).recordWebFingerHandle(attrs);
619
+ }
620
+ /**
575
621
  * Classifies a thrown value from a key or document fetch into the bounded
576
622
  * {@link LookupResult} taxonomy and, when an HTTP response was received,
577
623
  * surfaces its status code.
@@ -2309,6 +2355,12 @@ Object.defineProperty(exports, "recordOutboxEnqueue", {
2309
2355
  return recordOutboxEnqueue;
2310
2356
  }
2311
2357
  });
2358
+ Object.defineProperty(exports, "recordWebFingerHandle", {
2359
+ enumerable: true,
2360
+ get: function() {
2361
+ return recordWebFingerHandle;
2362
+ }
2363
+ });
2312
2364
  Object.defineProperty(exports, "signRequest", {
2313
2365
  enumerable: true,
2314
2366
  get: function() {
@@ -10,7 +10,7 @@ import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } fro
10
10
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "2.3.0-dev.1137+53a1f26d";
13
+ var version = "2.3.0-dev.1150+8db5848a";
14
14
  //#endregion
15
15
  //#region src/sig/accept.ts
16
16
  /**
@@ -176,6 +176,8 @@ var FederationMetrics = class {
176
176
  documentFetch;
177
177
  documentFetchDuration;
178
178
  documentCache;
179
+ webFingerHandle;
180
+ webFingerHandleDuration;
179
181
  constructor(meterProvider) {
180
182
  const meter = meterProvider.getMeter(name, version);
181
183
  this.deliverySent = meter.createCounter("activitypub.delivery.sent", {
@@ -334,6 +336,30 @@ var FederationMetrics = class {
334
336
  description: "KV-backed document loader cache lookups, with `hit` or `miss` classification.",
335
337
  unit: "{lookup}"
336
338
  });
339
+ this.webFingerHandle = meter.createCounter("webfinger.handle", {
340
+ description: "Incoming WebFinger requests handled by Fedify, classified by terminal outcome.",
341
+ unit: "{request}"
342
+ });
343
+ this.webFingerHandleDuration = meter.createHistogram("webfinger.handle.duration", {
344
+ description: "Duration of incoming WebFinger request handling in Fedify.",
345
+ unit: "ms",
346
+ advice: { explicitBucketBoundaries: [
347
+ 5,
348
+ 10,
349
+ 25,
350
+ 50,
351
+ 75,
352
+ 100,
353
+ 250,
354
+ 500,
355
+ 750,
356
+ 1e3,
357
+ 2500,
358
+ 5e3,
359
+ 7500,
360
+ 1e4
361
+ ] }
362
+ });
337
363
  }
338
364
  recordDelivery(inbox, durationMs, success, activityType) {
339
365
  const deliveryAttributes = {
@@ -447,6 +473,13 @@ var FederationMetrics = class {
447
473
  if (attrs.remoteUrl != null) attributes["activitypub.remote.host"] = getRemoteHost(attrs.remoteUrl);
448
474
  this.documentCache.add(1, attributes);
449
475
  }
476
+ recordWebFingerHandle(attrs) {
477
+ const attributes = { "webfinger.handle.result": attrs.result };
478
+ if (attrs.scheme != null) attributes["webfinger.resource.scheme"] = attrs.scheme;
479
+ if (attrs.statusCode != null) attributes["http.response.status_code"] = attrs.statusCode;
480
+ this.webFingerHandle.add(1, attributes);
481
+ this.webFingerHandleDuration.record(attrs.durationMs, attributes);
482
+ }
450
483
  };
451
484
  function buildActivityLifecycleAttributes(result, activityType) {
452
485
  const attributes = { "activitypub.processing.result": result };
@@ -571,6 +604,19 @@ function recordDocumentCache(meterProvider, attrs) {
571
604
  getFederationMetrics(meterProvider).recordDocumentCache(attrs);
572
605
  }
573
606
  /**
607
+ * Records one measurement on `webfinger.handle` (counter) and
608
+ * `webfinger.handle.duration` (histogram) for an incoming WebFinger
609
+ * request handled by Fedify. Counter and histogram are always recorded
610
+ * together, with `webfinger.handle.result` set to one of `resolved`,
611
+ * `invalid`, `not_found`, `tombstoned`, or `error`. The queried
612
+ * resource string is deliberately excluded; it remains on the
613
+ * `webfinger.handle` span for trace-level investigation.
614
+ * @since 2.3.0
615
+ */
616
+ function recordWebFingerHandle(meterProvider, attrs) {
617
+ getFederationMetrics(meterProvider).recordWebFingerHandle(attrs);
618
+ }
619
+ /**
574
620
  * Classifies a thrown value from a key or document fetch into the bounded
575
621
  * {@link LookupResult} taxonomy and, when an HTTP response was received,
576
622
  * surfaces its status code.
@@ -2176,4 +2222,4 @@ function timingSafeEqual(a, b) {
2176
2222
  return result === 0;
2177
2223
  }
2178
2224
  //#endregion
2179
- export { formatAcceptSignature as C, name as D, validateAcceptSignature as E, version as O, recordOutboxEnqueue as S, parseAcceptSignature as T, measureSignatureKeyFetch as _, verifyRequestDetailed as a, recordInboxActivity as b, fetchKeyDetailed as c, validateCryptoKey as d, getDurationMs as f, isAbortError$1 as g, instrumentDocumentLoader as h, verifyRequest as i, generateCryptoKeyPair as l, getRemoteHost as m, parseRfc9421SignatureInput as n, exportJwk as o, getFederationMetrics as p, signRequest as r, fetchKey as s, doubleKnock as t, importJwk as u, recordDocumentCache as v, fulfillAcceptSignature as w, recordOutboxActivity as x, recordFanoutRecipients as y };
2225
+ export { recordWebFingerHandle as C, validateAcceptSignature as D, parseAcceptSignature as E, name as O, recordOutboxEnqueue as S, fulfillAcceptSignature as T, measureSignatureKeyFetch as _, verifyRequestDetailed as a, recordInboxActivity as b, fetchKeyDetailed as c, validateCryptoKey as d, getDurationMs as f, isAbortError$1 as g, instrumentDocumentLoader as h, verifyRequest as i, version as k, generateCryptoKeyPair as l, getRemoteHost as m, parseRfc9421SignatureInput as n, exportJwk as o, getFederationMetrics as p, signRequest as r, fetchKey as s, doubleKnock as t, importJwk as u, recordDocumentCache as v, formatAcceptSignature as w, recordOutboxActivity as x, recordFanoutRecipients as y };
@@ -1,10 +1,10 @@
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-B_9yJW3w.mjs";
5
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-iRBg8jTk.mjs";
4
+ import { n as version, t as name } from "./deno-CKFE6Uya.mjs";
5
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-7Vy9FvEw.mjs";
6
6
  import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature } from "./accept-CceiKpCy.mjs";
7
- import { o as validateCryptoKey, r as fetchKeyDetailed } from "./key-CkkMJBjF.mjs";
7
+ import { o as validateCryptoKey, r as fetchKeyDetailed } from "./key-N0zP_oJA.mjs";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { CryptographicKey } from "@fedify/vocab";
10
10
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -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-B_9yJW3w.mjs";
5
- import { f as recordKeyLookup, n as getDurationMs, t as classifyFetchError } from "./metrics-iRBg8jTk.mjs";
4
+ import { n as version, t as name } from "./deno-CKFE6Uya.mjs";
5
+ import { f as recordKeyLookup, n as getDurationMs, t as classifyFetchError } from "./metrics-7Vy9FvEw.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { d as validateCryptoKey, t as doubleKnock, v as recordDocumentCache } from "./http-CToqG5ap.js";
3
+ import { d as validateCryptoKey, t as doubleKnock, v as recordDocumentCache } from "./http-WbS1gKzr.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { curry } from "es-toolkit";
6
6
  import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, validatePublicUrl } 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-CWoeyogl.cjs");
4
+ const require_http = require("./http-DQYEA7AZ.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,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { c as recordDocumentCache } from "./metrics-iRBg8jTk.mjs";
4
+ import { c as recordDocumentCache } from "./metrics-7Vy9FvEw.mjs";
5
5
  import { getLogger } from "@logtape/logtape";
6
6
  import { preloadedContexts } from "@fedify/vocab-runtime";
7
7
  //#region src/utils/kv-cache.ts