@fedify/fedify 2.4.0-dev.2259 → 2.4.0-dev.2260

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 (80) hide show
  1. package/dist/{builder-CBNa1Uw2.mjs → builder-BK8HfSUm.mjs} +2 -2
  2. package/dist/compat/transformers.test.mjs +1 -1
  3. package/dist/{compound-proof-CMPv4UK0.mjs → compound-proof-D--HeIbV.mjs} +23 -3
  4. package/dist/{deno-C8XaXmPB.mjs → deno-DVP7DGJC.mjs} +1 -1
  5. package/dist/{docloader-CpdFLwAg.mjs → docloader-Dv1JJl37.mjs} +2 -2
  6. package/dist/federation/builder.test.mjs +1 -1
  7. package/dist/federation/compound-fanout.test.mjs +3 -3
  8. package/dist/federation/handler-compound-proof.test.mjs +3 -3
  9. package/dist/federation/handler.test.mjs +5 -5
  10. package/dist/federation/hashlink-media.test.mjs +2 -2
  11. package/dist/federation/idempotency.test.mjs +2 -2
  12. package/dist/federation/inbox-report.test.mjs +5 -5
  13. package/dist/federation/metrics.test.mjs +1 -1
  14. package/dist/federation/middleware.test.mjs +7 -7
  15. package/dist/federation/mod.cjs +1 -1
  16. package/dist/federation/mod.js +1 -1
  17. package/dist/federation/outgoing-proof.test.mjs +54 -10
  18. package/dist/federation/portable-actor.test.mjs +3 -3
  19. package/dist/federation/portable-chain.test.mjs +3 -3
  20. package/dist/federation/portable-collection.test.mjs +66 -4
  21. package/dist/federation/portable-delivery.test.mjs +2 -2
  22. package/dist/federation/portable-gateway-keys.test.mjs +4 -4
  23. package/dist/federation/portable-inbox.test.mjs +4 -4
  24. package/dist/federation/portable-parse-uri.test.mjs +1 -1
  25. package/dist/federation/portable-route-activity.test.mjs +2 -2
  26. package/dist/federation/portable.test.mjs +3 -3
  27. package/dist/federation/send.test.mjs +3 -3
  28. package/dist/federation/tasks/enqueue.test.mjs +1 -1
  29. package/dist/federation/tasks/tasks.test.mjs +2 -2
  30. package/dist/federation/temporal.test.mjs +1 -1
  31. package/dist/federation/webfinger.test.mjs +1 -1
  32. package/dist/{federation-D6giSGUT.cjs → federation-Bo5z395X.cjs} +31 -7
  33. package/dist/{http-Cki-npuA.cjs → http-BIhWdDf5.cjs} +1 -1
  34. package/dist/{http-OMtKlbx1.js → http-DRMu1C2T.js} +1 -1
  35. package/dist/{http-BqSbUEiQ.mjs → http-DvpuyDJB.mjs} +4 -4
  36. package/dist/{key-DecAtABm.mjs → key-B7N8mNoY.mjs} +2 -2
  37. package/dist/{kv-cache-CWWlMv-s.mjs → kv-cache-D0kA0rml.mjs} +1 -1
  38. package/dist/{kv-cache-J0v3UbUn.js → kv-cache-DZLpqhW9.js} +1 -1
  39. package/dist/{kv-cache-D73yVcE5.cjs → kv-cache-mF8Zmjix.cjs} +1 -1
  40. package/dist/{ld-UsN-TIPh.mjs → ld-BDMNyM2M.mjs} +3 -3
  41. package/dist/{metrics-DWCn4VXX.mjs → metrics-BbBj-VZN.mjs} +1 -1
  42. package/dist/{middleware-DHn2q0L1.mjs → middleware-CE1X7-UM.mjs} +1 -1
  43. package/dist/{middleware-CkjwiEBd.mjs → middleware-DAA7wDdS.mjs} +22 -18
  44. package/dist/{middleware-BqzfIlUO.js → middleware-DfUWPAa-.js} +31 -7
  45. package/dist/mod.cjs +4 -4
  46. package/dist/mod.js +4 -4
  47. package/dist/nodeinfo/handler.test.mjs +1 -1
  48. package/dist/{owner-CEBn81LD.mjs → owner-CzUycuhd.mjs} +3 -3
  49. package/dist/{portable-collection-ZkUNjtb7.js → portable-collection-COcJxZg_.js} +1 -1
  50. package/dist/{portable-collection-qFSYw4TG.mjs → portable-collection-CTcNJiAa.mjs} +2 -2
  51. package/dist/{portable-collection-DqTUBKY7.cjs → portable-collection-cPMffcHJ.cjs} +1 -1
  52. package/dist/{portable-key-LlMkP-vz.mjs → portable-key-B4QN3OzR.mjs} +1 -1
  53. package/dist/{proof-BHRf_jMG.mjs → proof-nce4pf5S.mjs} +4 -4
  54. package/dist/{send-DjG8DDU_.mjs → send-4Idpe2z0.mjs} +3 -3
  55. package/dist/sig/compound-proof-discovery.test.mjs +1 -1
  56. package/dist/sig/compound-proof-producer.test.mjs +1 -1
  57. package/dist/sig/compound-proof-verification.test.mjs +2 -2
  58. package/dist/sig/compound-proof.test.mjs +2 -2
  59. package/dist/sig/http.test.mjs +2 -2
  60. package/dist/sig/key.test.mjs +1 -1
  61. package/dist/sig/ld.test.mjs +2 -2
  62. package/dist/sig/mitra-receive-interop.test.mjs +4 -4
  63. package/dist/sig/mitra-send-interop.test.mjs +3 -3
  64. package/dist/sig/mod.cjs +2 -2
  65. package/dist/sig/mod.js +2 -2
  66. package/dist/sig/owner.test.mjs +1 -1
  67. package/dist/sig/portable-collection.test.mjs +1 -1
  68. package/dist/sig/portable-interop.test.mjs +3 -3
  69. package/dist/sig/portable-key.test.mjs +6 -6
  70. package/dist/sig/proof.test.mjs +3 -3
  71. package/dist/sig/tootik-request-interop.test.mjs +4 -4
  72. package/dist/sig/tootik-send-interop.test.mjs +3 -3
  73. package/dist/sig/verification.test.mjs +3 -3
  74. package/dist/{temporal-BRFH_dte.mjs → temporal-BbjmPHYn.mjs} +1 -1
  75. package/dist/testing/kv.test.mjs +1 -1
  76. package/dist/utils/docloader.test.mjs +2 -2
  77. package/dist/utils/kv-cache.test.mjs +1 -1
  78. package/dist/utils/mod.cjs +1 -1
  79. package/dist/utils/mod.js +1 -1
  80. package/package.json +6 -6
@@ -6,7 +6,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
7
7
  import { t as assertNotEquals } from "../assert_not_equals-CpPK2t89.mjs";
8
8
  import "../std__assert-DvMDRPes.mjs";
9
- import { o as createFederation, s as handleWebFinger } from "../middleware-CkjwiEBd.mjs";
9
+ import { o as createFederation, s as handleWebFinger } from "../middleware-DAA7wDdS.mjs";
10
10
  import { Image, Link, Person, Tombstone } from "@fedify/vocab";
11
11
  import { parseIri } from "@fedify/vocab-runtime";
12
12
  import { createTestMeterProvider, test } from "@fedify/fixture";
@@ -1,10 +1,10 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-Dmm3t92W.cjs");
3
3
  const require_transformers = require("./transformers-BalCrSsr.cjs");
4
- const require_http = require("./http-Cki-npuA.cjs");
4
+ const require_http = require("./http-BIhWdDf5.cjs");
5
5
  const require_types = require("./types-poIao40f.cjs");
6
- const require_portable_collection = require("./portable-collection-DqTUBKY7.cjs");
7
- const require_kv_cache = require("./kv-cache-D73yVcE5.cjs");
6
+ const require_portable_collection = require("./portable-collection-cPMffcHJ.cjs");
7
+ const require_kv_cache = require("./kv-cache-mF8Zmjix.cjs");
8
8
  let _logtape_logtape = require("@logtape/logtape");
9
9
  let _fedify_uri_template = require("@fedify/uri-template");
10
10
  let _fedify_vocab = require("@fedify/vocab");
@@ -1992,6 +1992,26 @@ function findUnsupportedCompoundProofShape(json) {
1992
1992
  return findInJsonMaps(json, (map, path) => Object.hasOwn(map, "proof") && !isJsonMap$1(map.proof) ? childPath(path, "proof") : void 0) ?? null;
1993
1993
  }
1994
1994
  /**
1995
+ * Finds the first embedded map that carries a direct `proof` but not its own
1996
+ * `@context`. The map-local compound-proof profile verifies each proof-bearing
1997
+ * map as a self-contained document, so the inbox rejects such a map with
1998
+ * `missingContext` whatever its proof. An object embedded with its captured
1999
+ * signed representation, e.g., by {@link signObject}, always keeps its own
2000
+ * `@context`; one rebuilt under its parent's context, e.g., an object parsed
2001
+ * from a received document, never does, and its proof no longer covers what
2002
+ * it has become anyway.
2003
+ *
2004
+ * The input must be a finite, already-materialized JSON tree; see
2005
+ * {@link containsCompoundPortableObject}.
2006
+ *
2007
+ * @returns The RFC 6901 JSON Pointer to the map, or `null` if every embedded
2008
+ * proof-bearing map has its own `@context`.
2009
+ * @internal
2010
+ */
2011
+ function findEmbeddedProofWithoutContext(json) {
2012
+ return findInJsonMaps(json, (map, path) => path !== "" && Object.hasOwn(map, "proof") && !Object.hasOwn(map, "@context") ? path : void 0) ?? null;
2013
+ }
2014
+ /**
1995
2015
  * Discovers direct literal proof-bearing maps in an immutable JSON snapshot.
1996
2016
  *
1997
2017
  * Discovery is bounded and atomic. Unsupported proof shapes, non-JSON input,
@@ -4777,7 +4797,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
4777
4797
  collection = new _fedify_vocab.OrderedCollection({
4778
4798
  id: baseUri,
4779
4799
  attribution,
4780
- totalItems: totalItemCount ?? null,
4800
+ totalItems: totalItemCount ?? (portable == null ? null : itemsOrResponse.length),
4781
4801
  items: itemsOrResponse
4782
4802
  });
4783
4803
  } else {
@@ -7288,7 +7308,10 @@ function selectPortableActivityKey(activity, activityId, keys) {
7288
7308
  /**
7289
7309
  * Rejects an outgoing activity whose proofs Fedify's own inbox would reject
7290
7310
  * as unsupported: a document with portable objects in which some map carries
7291
- * a proof set or another value that is not a single proof map.
7311
+ * a proof set or another value that is not a single proof map, or in which
7312
+ * an embedded map carries a proof but not its own `@context`, e.g., a signed
7313
+ * object parsed from a received document and rebuilt under the activity's
7314
+ * context.
7292
7315
  *
7293
7316
  * @param jsonLd The compact JSON-LD document about to be delivered.
7294
7317
  * @param activityId The activity ID, for the error message.
@@ -7298,8 +7321,9 @@ function selectPortableActivityKey(activity, activityId, keys) {
7298
7321
  function assertSupportedCompoundProofShape(jsonLd, activityId) {
7299
7322
  if (!containsCompoundPortableObject(jsonLd)) return;
7300
7323
  const path = findUnsupportedCompoundProofShape(jsonLd);
7301
- if (path == null) return;
7302
- throw new TypeError(`Cannot send the activity ${activityId}: it embeds portable objects, but its proof at the JSON Pointer ${JSON.stringify(path)} is not a single proof map. The map-local compound-proof profile accepts exactly one direct proof per map, so Fedify inboxes would reject the activity. Sign each object with exactly one key.`);
7324
+ if (path != null) throw new TypeError(`Cannot send the activity ${activityId}: it embeds portable objects, but its proof at the JSON Pointer ${JSON.stringify(path)} is not a single proof map. The map-local compound-proof profile accepts exactly one direct proof per map, so Fedify inboxes would reject the activity. Sign each object with exactly one key.`);
7325
+ const embedded = findEmbeddedProofWithoutContext(jsonLd);
7326
+ if (embedded != null) throw new TypeError(`Cannot send the activity ${activityId}: it embeds portable objects, but the map at the JSON Pointer ${JSON.stringify(embedded)} carries a proof without its own @context. The map-local compound-proof profile verifies each proof-bearing map on its own, so Fedify inboxes would reject the activity. This happens when a signed object parsed from a received document, e.g., a Follow in an inbox listener, is embedded, as it is rebuilt under the activity's context and its proof no longer covers it. Refer to such an object by its ID instead, e.g., new Accept({ object: follow.id }), or embed an object that you signed with signObject().`);
7303
7327
  }
7304
7328
  //#endregion
7305
7329
  //#region src/federation/retry.ts
@@ -17,7 +17,7 @@ json_canon = require_rolldown_runtime.__toESM(json_canon, 1);
17
17
  let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
18
18
  //#region deno.json
19
19
  var name = "@fedify/fedify";
20
- var version = "2.4.0-dev.2259+d9c843fc";
20
+ var version = "2.4.0-dev.2260+42356e7d";
21
21
  //#endregion
22
22
  //#region src/sig/portable-key-id.ts
23
23
  const COMPATIBLE_KEY_ID_PATH_PATTERN = /^\/\.well-known\/apgateway\/did(?::|%3A)/i;
@@ -15,7 +15,7 @@ import serialize from "json-canon";
15
15
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
16
16
  //#region deno.json
17
17
  var name = "@fedify/fedify";
18
- var version = "2.4.0-dev.2259+d9c843fc";
18
+ var version = "2.4.0-dev.2260+42356e7d";
19
19
  //#endregion
20
20
  //#region src/sig/portable-key-id.ts
21
21
  const COMPATIBLE_KEY_ID_PATH_PATTERN = /^\/\.well-known\/apgateway\/did(?::|%3A)/i;
@@ -3,12 +3,12 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { m as parseKeyIdString } from "./portable-key-id-Ca30-hOa.mjs";
5
5
  import { a as verificationObservation, i as triedKey, n as observeCheck, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
6
- import { n as version, t as name } from "./deno-C8XaXmPB.mjs";
7
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-DWCn4VXX.mjs";
6
+ import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
7
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-BbBj-VZN.mjs";
8
8
  import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature } from "./accept-CPVqki78.mjs";
9
9
  import { a as promoteKeyOwnerEvidence } from "./key-owner-evidence-APB6NpSk.mjs";
10
- import { a as fetchKeyDetailed, c as validateCryptoKey, t as bypassKeyCacheReads } from "./key-DecAtABm.mjs";
11
- import { n as resolvePortableActorKey, r as verifyPortableGatewayKeyDocument } from "./portable-key-LlMkP-vz.mjs";
10
+ import { a as fetchKeyDetailed, c as validateCryptoKey, t as bypassKeyCacheReads } from "./key-B7N8mNoY.mjs";
11
+ import { n as resolvePortableActorKey, r as verifyPortableGatewayKeyDocument } from "./portable-key-B4QN3OzR.mjs";
12
12
  import { getLogger } from "@logtape/logtape";
13
13
  import { CryptographicKey } from "@fedify/vocab";
14
14
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -3,8 +3,8 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { c as isPortableActorDocument, d as isPortableUri, l as isPortableId, m as parseKeyIdString, s as isCompatibleKeyId } from "./portable-key-id-Ca30-hOa.mjs";
5
5
  import { a as verificationObservation } from "./verification-Dpfcw8ml.mjs";
6
- import { n as version, t as name } from "./deno-C8XaXmPB.mjs";
7
- import { _ as recordKeyLookup, n as getDurationMs, t as classifyFetchError } from "./metrics-DWCn4VXX.mjs";
6
+ import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
7
+ import { _ as recordKeyLookup, n as getDurationMs, t as classifyFetchError } from "./metrics-BbBj-VZN.mjs";
8
8
  import { n as attachKeyOwnerEvidence, t as MAX_PORTABLE_KEY_TTL } from "./key-owner-evidence-APB6NpSk.mjs";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
  import { CryptographicKey, Multikey, Object as Object$1, isActor } from "@fedify/vocab";
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { p as recordDocumentCache } from "./metrics-DWCn4VXX.mjs";
4
+ import { p as recordDocumentCache } from "./metrics-BbBj-VZN.mjs";
5
5
  import { getLogger } from "@logtape/logtape";
6
6
  import { preloadedContexts } from "@fedify/vocab-runtime";
7
7
  //#region src/utils/kv-cache.ts
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { G as validateCryptoKey, ot as recordDocumentCache, t as doubleKnock } from "./http-OMtKlbx1.js";
3
+ import { G as validateCryptoKey, ot as recordDocumentCache, t as doubleKnock } from "./http-DRMu1C2T.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, resolveDocumentLoaderTimeout, validatePublicUrl, withDocumentLoaderTimeout } from "@fedify/vocab-runtime";
6
6
  import { curry } from "es-toolkit";
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
- const require_http = require("./http-Cki-npuA.cjs");
2
+ const require_http = require("./http-BIhWdDf5.cjs");
3
3
  let _logtape_logtape = require("@logtape/logtape");
4
4
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
5
5
  let es_toolkit = require("es-toolkit");
@@ -2,9 +2,9 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { a as verificationObservation, i as triedKey, n as observeCheck, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
5
- import { n as version, t as name } from "./deno-C8XaXmPB.mjs";
6
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-DWCn4VXX.mjs";
7
- import { c as validateCryptoKey, i as fetchKey, t as bypassKeyCacheReads } from "./key-DecAtABm.mjs";
5
+ import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
6
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-BbBj-VZN.mjs";
7
+ import { c as validateCryptoKey, i as fetchKey, t as bypassKeyCacheReads } from "./key-B7N8mNoY.mjs";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
10
10
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,7 +1,7 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-C8XaXmPB.mjs";
4
+ import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
5
5
  import { metrics } from "@opentelemetry/api";
6
6
  import { FetchError } from "@fedify/vocab-runtime";
7
7
  //#region src/federation/metrics.ts
@@ -1,5 +1,5 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-CkjwiEBd.mjs";
4
+ import { n as FederationImpl } from "./middleware-DAA7wDdS.mjs";
5
5
  export { FederationImpl };
@@ -4,28 +4,28 @@ globalThis.addEventListener = () => {};
4
4
  import { d as isPortableUri, f as isSameObjectId, i as getPortableDid, l as isPortableId, n as getCanonicalPortableId, o as hasPortableActor, r as getGatewayKeyBase, s as isCompatibleKeyId, t as getAuthenticationOrigin, u as isPortableKeyId } from "./portable-key-id-Ca30-hOa.mjs";
5
5
  import { n as isPubliclyAddressedNode, t as isInAudience } from "./audience-CHQ-FlLD.mjs";
6
6
  import { a as verificationObservation, r as snapshotKey, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
7
- import { n as version, t as name } from "./deno-C8XaXmPB.mjs";
8
- import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-DWCn4VXX.mjs";
7
+ import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
8
+ import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-BbBj-VZN.mjs";
9
9
  import { t as formatAcceptSignature } from "./accept-CPVqki78.mjs";
10
- import { c as validateCryptoKey, n as exportJwk, s as importJwk } from "./key-DecAtABm.mjs";
10
+ import { c as validateCryptoKey, n as exportJwk, s as importJwk } from "./key-B7N8mNoY.mjs";
11
11
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-4IJqPYos.mjs";
12
- import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-UsN-TIPh.mjs";
13
- import { a as signObject, c as verifyPortableObjectProof, i as hasProofLike, s as verifyObject, t as InvalidPortableObjectIdError, u as verifyPortableObjectProofWithRoot } from "./proof-BHRf_jMG.mjs";
14
- import { a as listRequestSignatures, c as selectRequestSignature, d as validateMaxSignatures, f as verifyRequest, p as verifyRequestDetailed, s as parseRfc9421SignatureInput } from "./http-BqSbUEiQ.mjs";
15
- import { t as getAuthenticatedDocumentLoader } from "./docloader-CpdFLwAg.mjs";
16
- import { n as kvCache } from "./kv-cache-CWWlMv-s.mjs";
12
+ import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-BDMNyM2M.mjs";
13
+ import { a as signObject, c as verifyPortableObjectProof, i as hasProofLike, s as verifyObject, t as InvalidPortableObjectIdError, u as verifyPortableObjectProofWithRoot } from "./proof-nce4pf5S.mjs";
14
+ import { a as listRequestSignatures, c as selectRequestSignature, d as validateMaxSignatures, f as verifyRequest, p as verifyRequestDetailed, s as parseRfc9421SignatureInput } from "./http-DvpuyDJB.mjs";
15
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-Dv1JJl37.mjs";
16
+ import { n as kvCache } from "./kv-cache-D0kA0rml.mjs";
17
17
  import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-CEnNz8O7.mjs";
18
18
  import { t as nodeInfoToJson } from "./types-DE_LV1JB.mjs";
19
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CEBn81LD.mjs";
20
- import { t as verifyPortableObject } from "./portable-collection-qFSYw4TG.mjs";
21
- import { a as getOrderingDestination, i as sendActivityThroughGateways, n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-DjG8DDU_.mjs";
22
- import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-CBNa1Uw2.mjs";
19
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CzUycuhd.mjs";
20
+ import { t as verifyPortableObject } from "./portable-collection-CTcNJiAa.mjs";
21
+ import { a as getOrderingDestination, i as sendActivityThroughGateways, n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-4Idpe2z0.mjs";
22
+ import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-BK8HfSUm.mjs";
23
23
  import { t as CircuitBreaker } from "./circuit-breaker-XJ53md4S.mjs";
24
24
  import { t as buildCollectionSynchronizationHeader } from "./collection-CnnP1UAv.mjs";
25
- import { a as verifyCompoundPortableObjectProofs, i as inspectCompoundPortableObjectApplicability, r as findUnsupportedCompoundProofShape, s as verifyServedPortableObjects, t as containsCompoundPortableObject } from "./compound-proof-CMPv4UK0.mjs";
25
+ import { a as inspectCompoundPortableObjectApplicability, c as verifyServedPortableObjects, i as findUnsupportedCompoundProofShape, o as verifyCompoundPortableObjectProofs, r as findEmbeddedProofWithoutContext, t as containsCompoundPortableObject } from "./compound-proof-D--HeIbV.mjs";
26
26
  import { t as KvKeyCache } from "./keycache-Da8A8mZa.mjs";
27
27
  import { t as acceptsJsonLd } from "./negotiation-CCocWT_N.mjs";
28
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-BRFH_dte.mjs";
28
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-BbjmPHYn.mjs";
29
29
  import { t as createExponentialBackoffPolicy } from "./retry-zX5xw5e0.mjs";
30
30
  import { t as TaskCodec } from "./codec-C6rTrpIp.mjs";
31
31
  import { getLogger, withContext } from "@logtape/logtape";
@@ -1797,7 +1797,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
1797
1797
  collection = new OrderedCollection({
1798
1798
  id: baseUri,
1799
1799
  attribution,
1800
- totalItems: totalItemCount ?? null,
1800
+ totalItems: totalItemCount ?? (portable == null ? null : itemsOrResponse.length),
1801
1801
  items: itemsOrResponse
1802
1802
  });
1803
1803
  } else {
@@ -3990,7 +3990,10 @@ function selectPortableActivityKey(activity, activityId, keys) {
3990
3990
  /**
3991
3991
  * Rejects an outgoing activity whose proofs Fedify's own inbox would reject
3992
3992
  * as unsupported: a document with portable objects in which some map carries
3993
- * a proof set or another value that is not a single proof map.
3993
+ * a proof set or another value that is not a single proof map, or in which
3994
+ * an embedded map carries a proof but not its own `@context`, e.g., a signed
3995
+ * object parsed from a received document and rebuilt under the activity's
3996
+ * context.
3994
3997
  *
3995
3998
  * @param jsonLd The compact JSON-LD document about to be delivered.
3996
3999
  * @param activityId The activity ID, for the error message.
@@ -4000,8 +4003,9 @@ function selectPortableActivityKey(activity, activityId, keys) {
4000
4003
  function assertSupportedCompoundProofShape(jsonLd, activityId) {
4001
4004
  if (!containsCompoundPortableObject(jsonLd)) return;
4002
4005
  const path = findUnsupportedCompoundProofShape(jsonLd);
4003
- if (path == null) return;
4004
- throw new TypeError(`Cannot send the activity ${activityId}: it embeds portable objects, but its proof at the JSON Pointer ${JSON.stringify(path)} is not a single proof map. The map-local compound-proof profile accepts exactly one direct proof per map, so Fedify inboxes would reject the activity. Sign each object with exactly one key.`);
4006
+ if (path != null) throw new TypeError(`Cannot send the activity ${activityId}: it embeds portable objects, but its proof at the JSON Pointer ${JSON.stringify(path)} is not a single proof map. The map-local compound-proof profile accepts exactly one direct proof per map, so Fedify inboxes would reject the activity. Sign each object with exactly one key.`);
4007
+ const embedded = findEmbeddedProofWithoutContext(jsonLd);
4008
+ if (embedded != null) throw new TypeError(`Cannot send the activity ${activityId}: it embeds portable objects, but the map at the JSON Pointer ${JSON.stringify(embedded)} carries a proof without its own @context. The map-local compound-proof profile verifies each proof-bearing map on its own, so Fedify inboxes would reject the activity. This happens when a signed object parsed from a received document, e.g., a Follow in an inbox listener, is embedded, as it is rebuilt under the activity's context and its proof no longer covers it. Refer to such an object by its ID instead, e.g., new Accept({ object: follow.id }), or embed an object that you signed with signObject().`);
4005
4009
  }
4006
4010
  //#endregion
4007
4011
  //#region src/federation/tasks/enqueue.ts
@@ -2,10 +2,10 @@ import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-DAtXl_Kc.js";
5
- import { $ as instrumentDocumentLoader, A as hasSignature, At as isPortableUri, C as InvalidContextReferenceError, Ct as getGatewayKeyBase, Dt as isCompatibleKeyId, E as compactJsonLd, Et as hasPortableActor, F as verifyCompactJsonLd, G as validateCryptoKey, M as isClearlyMalformedContextReference, N as isInvalidUrlTypeError, Nt as name, O as detachSignature, Ot as isPortableId, P as signJsonLd, Pt as version, Q as getRemoteHost, R as wrapContextLoaderForJsonLd, S as normalizeOutgoingActivityJsonLd, St as getCanonicalPortableId, Tt as getRawCanonicalPortableId, W as importJwk, X as getDurationMs, Z as getFederationMetrics, _ as verifyObject, at as recordCollectionTotalItems, b as verifyPortableObjectProofWithRoot, bt as verificationObservation, c as verifyRequestDetailed, ct as recordInboxActivity, d as InvalidPortableObjectIdError, dt as recordWebFingerHandle, et as isAbortError, f as classifyFep2277CoreType, ft as registerQueueDepthGauge, g as verifyMapLocalProof, h as signObject, i as selectRequestSignature, it as recordCollectionRequest, j as hasSignatureLike, jt as isSameObjectId, k as getNormalizationContextLoader, kt as isPortableKeyId, lt as recordOutboxActivity, m as hasProofLike, mt as formatAcceptSignature, n as listRequestSignatures, nt as recordCollectionDispatchDuration, o as validateMaxSignatures, pt as preloadedOnlyDocumentLoader, q as MAX_PORTABLE_KEY_TTL, r as parseRfc9421SignatureInput, rt as recordCollectionPageItems, s as verifyRequest, st as recordFanoutRecipients, t as doubleKnock, tt as recordCircuitBreakerStateChange, ut as recordOutboxEnqueue, v as verifyPortableObjectProof, vt as observeAttempt, w as assertSafeJsonLd, wt as getPortableDid, xt as getAuthenticationOrigin, y as verifyPortableObjectProofPolicy, yt as snapshotKey, z as exportJwk } from "./http-OMtKlbx1.js";
5
+ import { $ as instrumentDocumentLoader, A as hasSignature, At as isPortableUri, C as InvalidContextReferenceError, Ct as getGatewayKeyBase, Dt as isCompatibleKeyId, E as compactJsonLd, Et as hasPortableActor, F as verifyCompactJsonLd, G as validateCryptoKey, M as isClearlyMalformedContextReference, N as isInvalidUrlTypeError, Nt as name, O as detachSignature, Ot as isPortableId, P as signJsonLd, Pt as version, Q as getRemoteHost, R as wrapContextLoaderForJsonLd, S as normalizeOutgoingActivityJsonLd, St as getCanonicalPortableId, Tt as getRawCanonicalPortableId, W as importJwk, X as getDurationMs, Z as getFederationMetrics, _ as verifyObject, at as recordCollectionTotalItems, b as verifyPortableObjectProofWithRoot, bt as verificationObservation, c as verifyRequestDetailed, ct as recordInboxActivity, d as InvalidPortableObjectIdError, dt as recordWebFingerHandle, et as isAbortError, f as classifyFep2277CoreType, ft as registerQueueDepthGauge, g as verifyMapLocalProof, h as signObject, i as selectRequestSignature, it as recordCollectionRequest, j as hasSignatureLike, jt as isSameObjectId, k as getNormalizationContextLoader, kt as isPortableKeyId, lt as recordOutboxActivity, m as hasProofLike, mt as formatAcceptSignature, n as listRequestSignatures, nt as recordCollectionDispatchDuration, o as validateMaxSignatures, pt as preloadedOnlyDocumentLoader, q as MAX_PORTABLE_KEY_TTL, r as parseRfc9421SignatureInput, rt as recordCollectionPageItems, s as verifyRequest, st as recordFanoutRecipients, t as doubleKnock, tt as recordCircuitBreakerStateChange, ut as recordOutboxEnqueue, v as verifyPortableObjectProof, vt as observeAttempt, w as assertSafeJsonLd, wt as getPortableDid, xt as getAuthenticationOrigin, y as verifyPortableObjectProofPolicy, yt as snapshotKey, z as exportJwk } from "./http-DRMu1C2T.js";
6
6
  import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-_S2_MeLF.js";
7
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-ZkUNjtb7.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-J0v3UbUn.js";
7
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-COcJxZg_.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DZLpqhW9.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Router, RouterError, assertPath } from "@fedify/uri-template";
11
11
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, PUBLIC_COLLECTION, Tombstone, getTypeId, isActor, lookupObject, traverseCollection } from "@fedify/vocab";
@@ -1991,6 +1991,26 @@ function findUnsupportedCompoundProofShape(json) {
1991
1991
  return findInJsonMaps(json, (map, path) => Object.hasOwn(map, "proof") && !isJsonMap$1(map.proof) ? childPath(path, "proof") : void 0) ?? null;
1992
1992
  }
1993
1993
  /**
1994
+ * Finds the first embedded map that carries a direct `proof` but not its own
1995
+ * `@context`. The map-local compound-proof profile verifies each proof-bearing
1996
+ * map as a self-contained document, so the inbox rejects such a map with
1997
+ * `missingContext` whatever its proof. An object embedded with its captured
1998
+ * signed representation, e.g., by {@link signObject}, always keeps its own
1999
+ * `@context`; one rebuilt under its parent's context, e.g., an object parsed
2000
+ * from a received document, never does, and its proof no longer covers what
2001
+ * it has become anyway.
2002
+ *
2003
+ * The input must be a finite, already-materialized JSON tree; see
2004
+ * {@link containsCompoundPortableObject}.
2005
+ *
2006
+ * @returns The RFC 6901 JSON Pointer to the map, or `null` if every embedded
2007
+ * proof-bearing map has its own `@context`.
2008
+ * @internal
2009
+ */
2010
+ function findEmbeddedProofWithoutContext(json) {
2011
+ return findInJsonMaps(json, (map, path) => path !== "" && Object.hasOwn(map, "proof") && !Object.hasOwn(map, "@context") ? path : void 0) ?? null;
2012
+ }
2013
+ /**
1994
2014
  * Discovers direct literal proof-bearing maps in an immutable JSON snapshot.
1995
2015
  *
1996
2016
  * Discovery is bounded and atomic. Unsupported proof shapes, non-JSON input,
@@ -4771,7 +4791,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
4771
4791
  collection = new OrderedCollection({
4772
4792
  id: baseUri,
4773
4793
  attribution,
4774
- totalItems: totalItemCount ?? null,
4794
+ totalItems: totalItemCount ?? (portable == null ? null : itemsOrResponse.length),
4775
4795
  items: itemsOrResponse
4776
4796
  });
4777
4797
  } else {
@@ -7194,7 +7214,10 @@ function selectPortableActivityKey(activity, activityId, keys) {
7194
7214
  /**
7195
7215
  * Rejects an outgoing activity whose proofs Fedify's own inbox would reject
7196
7216
  * as unsupported: a document with portable objects in which some map carries
7197
- * a proof set or another value that is not a single proof map.
7217
+ * a proof set or another value that is not a single proof map, or in which
7218
+ * an embedded map carries a proof but not its own `@context`, e.g., a signed
7219
+ * object parsed from a received document and rebuilt under the activity's
7220
+ * context.
7198
7221
  *
7199
7222
  * @param jsonLd The compact JSON-LD document about to be delivered.
7200
7223
  * @param activityId The activity ID, for the error message.
@@ -7204,8 +7227,9 @@ function selectPortableActivityKey(activity, activityId, keys) {
7204
7227
  function assertSupportedCompoundProofShape(jsonLd, activityId) {
7205
7228
  if (!containsCompoundPortableObject(jsonLd)) return;
7206
7229
  const path = findUnsupportedCompoundProofShape(jsonLd);
7207
- if (path == null) return;
7208
- throw new TypeError(`Cannot send the activity ${activityId}: it embeds portable objects, but its proof at the JSON Pointer ${JSON.stringify(path)} is not a single proof map. The map-local compound-proof profile accepts exactly one direct proof per map, so Fedify inboxes would reject the activity. Sign each object with exactly one key.`);
7230
+ if (path != null) throw new TypeError(`Cannot send the activity ${activityId}: it embeds portable objects, but its proof at the JSON Pointer ${JSON.stringify(path)} is not a single proof map. The map-local compound-proof profile accepts exactly one direct proof per map, so Fedify inboxes would reject the activity. Sign each object with exactly one key.`);
7231
+ const embedded = findEmbeddedProofWithoutContext(jsonLd);
7232
+ if (embedded != null) throw new TypeError(`Cannot send the activity ${activityId}: it embeds portable objects, but the map at the JSON Pointer ${JSON.stringify(embedded)} carries a proof without its own @context. The map-local compound-proof profile verifies each proof-bearing map on its own, so Fedify inboxes would reject the activity. This happens when a signed object parsed from a received document, e.g., a Follow in an inbox listener, is embedded, as it is rebuilt under the activity's context and its proof no longer covers it. Refer to such an object by its ID instead, e.g., new Accept({ object: follow.id }), or embed an object that you signed with signObject().`);
7209
7233
  }
7210
7234
  //#endregion
7211
7235
  //#region src/federation/retry.ts
package/dist/mod.cjs CHANGED
@@ -3,11 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("./rolldown-runtime-Dmm3t92W.cjs");
4
4
  const require_transformers = require("./transformers-BalCrSsr.cjs");
5
5
  require("./compat/mod.cjs");
6
- const require_http = require("./http-Cki-npuA.cjs");
7
- const require_federation = require("./federation-D6giSGUT.cjs");
6
+ const require_http = require("./http-BIhWdDf5.cjs");
7
+ const require_federation = require("./federation-Bo5z395X.cjs");
8
8
  const require_types = require("./types-poIao40f.cjs");
9
- const require_portable_collection = require("./portable-collection-DqTUBKY7.cjs");
10
- const require_kv_cache = require("./kv-cache-D73yVcE5.cjs");
9
+ const require_portable_collection = require("./portable-collection-cPMffcHJ.cjs");
10
+ const require_kv_cache = require("./kv-cache-mF8Zmjix.cjs");
11
11
  require("./nodeinfo/mod.cjs");
12
12
  require("./runtime/mod.cjs");
13
13
  require("./sig/mod.cjs");
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 { D as createSignature, H as fetchKeyDetailed, I as verifyJsonLd, L as verifySignature, O as detachSignature, P as signJsonLd, T as attachSignature, U as generateCryptoKeyPair, V as fetchKey, W as importJwk, _ as verifyObject, _t as validateAcceptSignature, a as signRequest, c as verifyRequestDetailed, gt as parseAcceptSignature, h as signObject, ht as fulfillAcceptSignature, j as hasSignatureLike, m as hasProofLike, mt as formatAcceptSignature, p as createProof, s as verifyRequest, v as verifyPortableObjectProof, x as verifyProof, z as exportJwk } from "./http-OMtKlbx1.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-BqzfIlUO.js";
6
+ import { D as createSignature, H as fetchKeyDetailed, I as verifyJsonLd, L as verifySignature, O as detachSignature, P as signJsonLd, T as attachSignature, U as generateCryptoKeyPair, V as fetchKey, W as importJwk, _ as verifyObject, _t as validateAcceptSignature, a as signRequest, c as verifyRequestDetailed, gt as parseAcceptSignature, h as signObject, ht as fulfillAcceptSignature, j as hasSignatureLike, m as hasProofLike, mt as formatAcceptSignature, p as createProof, s as verifyRequest, v as verifyPortableObjectProof, x as verifyProof, z as exportJwk } from "./http-DRMu1C2T.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-DfUWPAa-.js";
8
8
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-_S2_MeLF.js";
9
- import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-ZkUNjtb7.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-J0v3UbUn.js";
9
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-COcJxZg_.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DZLpqhW9.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-8Tu9kea0.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 { D as handleNodeInfoJrd, E as handleNodeInfo, o as createFederation } from "../middleware-CkjwiEBd.mjs";
8
+ import { D as handleNodeInfoJrd, E as handleNodeInfo, o as createFederation } from "../middleware-DAA7wDdS.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -2,10 +2,10 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { d as isPortableUri, l as isPortableId, n as getCanonicalPortableId, p as isSamePublicKey$1, s as isCompatibleKeyId } from "./portable-key-id-Ca30-hOa.mjs";
5
- import { n as version, t as name } from "./deno-C8XaXmPB.mjs";
5
+ import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
6
6
  import { i as parseKeyOwnerEvidence, r as getVerifiedKeyOwnerEvidence } from "./key-owner-evidence-APB6NpSk.mjs";
7
- import { l as verifyKeyOwnership, n as exportJwk, r as fetchActorDocument } from "./key-DecAtABm.mjs";
8
- import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-LlMkP-vz.mjs";
7
+ import { l as verifyKeyOwnership, n as exportJwk, r as fetchActorDocument } from "./key-B7N8mNoY.mjs";
8
+ import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-B4QN3OzR.mjs";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
11
11
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { At as isPortableUri, B as fetchActorDocument, Dt as isCompatibleKeyId, J as getVerifiedKeyOwnerEvidence, K as verifyKeyOwnership, Mt as isSamePublicKey$1, Nt as name, Ot as isPortableId, Pt as version, St as getCanonicalPortableId, Y as parseKeyOwnerEvidence, b as verifyPortableObjectProofWithRoot, l as fetchPortableGatewayKey, u as resolvePortableActorKey, v as verifyPortableObjectProof, z as exportJwk } from "./http-OMtKlbx1.js";
3
+ import { At as isPortableUri, B as fetchActorDocument, Dt as isCompatibleKeyId, J as getVerifiedKeyOwnerEvidence, K as verifyKeyOwnership, Mt as isSamePublicKey$1, Nt as name, Ot as isPortableId, Pt as version, St as getCanonicalPortableId, Y as parseKeyOwnerEvidence, b as verifyPortableObjectProofWithRoot, l as fetchPortableGatewayKey, u as resolvePortableActorKey, v as verifyPortableObjectProof, z as exportJwk } from "./http-DRMu1C2T.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";
@@ -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-C8XaXmPB.mjs";
5
- import { c as verifyPortableObjectProof, u as verifyPortableObjectProofWithRoot } from "./proof-BHRf_jMG.mjs";
4
+ import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
5
+ import { c as verifyPortableObjectProof, u as verifyPortableObjectProofWithRoot } from "./proof-nce4pf5S.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,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
- const require_http = require("./http-Cki-npuA.cjs");
2
+ const require_http = require("./http-BIhWdDf5.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");
@@ -2,7 +2,7 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { a as getRawCanonicalPortableId, c as isPortableActorDocument, d as isPortableUri, n as getCanonicalPortableId, p as isSamePublicKey } from "./portable-key-id-Ca30-hOa.mjs";
5
- import { u as verifyPortableObjectProofWithRoot } from "./proof-BHRf_jMG.mjs";
5
+ import { u as verifyPortableObjectProofWithRoot } from "./proof-nce4pf5S.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { CryptographicKey, Multikey, Object as Object$1 } from "@fedify/vocab";
8
8
  import { FetchError, formatIri, getDocumentLoader, isGatewayUrl, parseIri, toCompatibleEf61Id } from "@fedify/vocab-runtime";
@@ -3,12 +3,12 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { i as getPortableDid, l as isPortableId } from "./portable-key-id-Ca30-hOa.mjs";
5
5
  import { a as verificationObservation, i as triedKey, n as observeCheck, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
6
- import { n as version, t as name } from "./deno-C8XaXmPB.mjs";
7
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-DWCn4VXX.mjs";
8
- import { c as validateCryptoKey, i as fetchKey, t as bypassKeyCacheReads } from "./key-DecAtABm.mjs";
6
+ import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
7
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-BbBj-VZN.mjs";
8
+ import { c as validateCryptoKey, i as fetchKey, t as bypassKeyCacheReads } from "./key-B7N8mNoY.mjs";
9
9
  import { n as preloadedOnlyDocumentLoader } from "./public-audience--klBIOk1.mjs";
10
10
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-4IJqPYos.mjs";
11
- import { c as getNormalizationContextLoader } from "./ld-UsN-TIPh.mjs";
11
+ import { c as getNormalizationContextLoader } from "./ld-BDMNyM2M.mjs";
12
12
  import { getLogger } from "@logtape/logtape";
13
13
  import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
14
14
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -2,9 +2,9 @@ import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { d as isPortableUri } from "./portable-key-id-Ca30-hOa.mjs";
5
- import { n as version, t as name } from "./deno-C8XaXmPB.mjs";
6
- import { n as getDurationMs, r as getFederationMetrics } from "./metrics-DWCn4VXX.mjs";
7
- import { n as doubleKnock } from "./http-BqSbUEiQ.mjs";
5
+ import { n as version, t as name } from "./deno-DVP7DGJC.mjs";
6
+ import { n as getDurationMs, r as getFederationMetrics } from "./metrics-BbBj-VZN.mjs";
7
+ import { n as doubleKnock } from "./http-DvpuyDJB.mjs";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
10
10
  import { FetchError, UrlError, canonicalizePortableUri, getFe34Origin, isGatewayUrl, toCompatibleEf61Id, validatePublicUrl } from "@fedify/vocab-runtime";
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
- import { i as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-CMPv4UK0.mjs";
6
+ import { a as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-D--HeIbV.mjs";
7
7
  import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/sig/compound-proof-discovery.test.ts
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
- import { i as inspectCompoundPortableObjectApplicability, r as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-CMPv4UK0.mjs";
6
+ import { a as inspectCompoundPortableObjectApplicability, i as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-D--HeIbV.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  //#region src/sig/compound-proof-producer.test.ts
9
9
  const portableId = "ap+ef61://did:key:z6MkAlice/objects/1";
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
5
5
  import "../std__assert-DvMDRPes.mjs";
6
6
  import { t as assert } from "../assert-D1Eafmd_.mjs";
7
- import { l as verifyPortableObjectProofPolicy, o as verifyMapLocalProof } from "../proof-BHRf_jMG.mjs";
7
+ import { l as verifyPortableObjectProofPolicy, o as verifyMapLocalProof } from "../proof-nce4pf5S.mjs";
8
8
  import { n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
9
- import { a as verifyCompoundPortableObjectProofs, i as inspectCompoundPortableObjectApplicability, o as verifyCompoundProofDocuments, t as containsCompoundPortableObject } from "../compound-proof-CMPv4UK0.mjs";
9
+ import { a as inspectCompoundPortableObjectApplicability, o as verifyCompoundPortableObjectProofs, s as verifyCompoundProofDocuments, t as containsCompoundPortableObject } from "../compound-proof-D--HeIbV.mjs";
10
10
  import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
11
11
  import { t as map_local_context_conflict_default } from "../map-local-context-conflict-DOYEEJ3u.mjs";
12
12
  import { CryptographicKey, Multikey, Person } from "@fedify/vocab";
@@ -6,9 +6,9 @@ import "../std__assert-DvMDRPes.mjs";
6
6
  import { t as assert } from "../assert-D1Eafmd_.mjs";
7
7
  import { n as preloadedOnlyDocumentLoader } from "../public-audience--klBIOk1.mjs";
8
8
  import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
9
- import { a as signObject, d as verifyProof } from "../proof-BHRf_jMG.mjs";
9
+ import { a as signObject, d as verifyProof } from "../proof-nce4pf5S.mjs";
10
10
  import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
11
- import { o as verifyCompoundProofDocuments } from "../compound-proof-CMPv4UK0.mjs";
11
+ import { s as verifyCompoundProofDocuments } from "../compound-proof-D--HeIbV.mjs";
12
12
  import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
13
13
  import { t as map_local_context_conflict_default } from "../map-local-context-conflict-DOYEEJ3u.mjs";
14
14
  import { Create, DataIntegrityProof, Note, Question } from "@fedify/vocab";
@@ -12,8 +12,8 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
12
12
  import "../std__assert-DvMDRPes.mjs";
13
13
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
14
14
  import { t as assert } from "../assert-D1Eafmd_.mjs";
15
- import { n as exportJwk } from "../key-DecAtABm.mjs";
16
- import { a as listRequestSignatures, c as selectRequestSignature, f as verifyRequest, i as formatRfc9421SignatureParameters, l as signRequest, n as doubleKnock, o as parseRfc9421Signature, p as verifyRequestDetailed, r as formatRfc9421Signature, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as timingSafeEqual } from "../http-BqSbUEiQ.mjs";
15
+ import { n as exportJwk } from "../key-B7N8mNoY.mjs";
16
+ import { a as listRequestSignatures, c as selectRequestSignature, f as verifyRequest, i as formatRfc9421SignatureParameters, l as signRequest, n as doubleKnock, o as parseRfc9421Signature, p as verifyRequestDetailed, r as formatRfc9421Signature, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as timingSafeEqual } from "../http-DvpuyDJB.mjs";
17
17
  import { a as rsaPrivateKey3, i as rsaPrivateKey2, l as rsaPublicKey5, n as ed25519PrivateKey, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
18
18
  import { t as KvKeyCache } from "../keycache-Da8A8mZa.mjs";
19
19
  import { FetchError, exportSpki, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -6,7 +6,7 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
6
6
  import "../std__assert-DvMDRPes.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
8
8
  import { t as assert } from "../assert-D1Eafmd_.mjs";
9
- import { a as fetchKeyDetailed, c as validateCryptoKey, i as fetchKey, n as exportJwk, o as generateCryptoKeyPair, s as importJwk } from "../key-DecAtABm.mjs";
9
+ import { a as fetchKeyDetailed, c as validateCryptoKey, i as fetchKey, n as exportJwk, o as generateCryptoKeyPair, s as importJwk } from "../key-B7N8mNoY.mjs";
10
10
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
11
11
  import { CryptographicKey, Multikey } from "@fedify/vocab";
12
12
  import { FetchError, exportDidKey } from "@fedify/vocab-runtime";
@@ -8,8 +8,8 @@ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
8
8
  import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
9
9
  import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
10
10
  import { t as assert } from "../assert-D1Eafmd_.mjs";
11
- import { o as generateCryptoKeyPair } from "../key-DecAtABm.mjs";
12
- import { a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-UsN-TIPh.mjs";
11
+ import { o as generateCryptoKeyPair } from "../key-B7N8mNoY.mjs";
12
+ import { a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-BDMNyM2M.mjs";
13
13
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
14
14
  import { CryptographicKey } from "@fedify/vocab";
15
15
  import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";