@powerhousedao/reactor-api 6.2.3-dev.24 → 6.2.3-dev.25

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 (34) hide show
  1. package/dist/{adapter-gateway-apollo-CxJNBVyD.mjs → adapter-gateway-apollo-B54G_cXT.mjs} +15 -13
  2. package/dist/{adapter-gateway-apollo-CxJNBVyD.mjs.map → adapter-gateway-apollo-B54G_cXT.mjs.map} +1 -1
  3. package/dist/{adapter-gateway-apollo-DowrX6E_.mjs → adapter-gateway-apollo-D2DNlPY0.mjs} +3 -3
  4. package/dist/{adapter-gateway-mercurius-CZVy88Za.mjs → adapter-gateway-mercurius-rbKlwF9m.mjs} +4 -4
  5. package/dist/{adapter-gateway-mercurius-CZVy88Za.mjs.map → adapter-gateway-mercurius-rbKlwF9m.mjs.map} +1 -1
  6. package/dist/{adapter-gateway-stitching-CaZjvRzx.mjs → adapter-gateway-stitching-Dzv10u8D.mjs} +15 -10
  7. package/dist/{adapter-gateway-stitching-CaZjvRzx.mjs.map → adapter-gateway-stitching-Dzv10u8D.mjs.map} +1 -1
  8. package/dist/{adapter-http-express-D4KBmDcQ.mjs → adapter-http-express-Drbaxszc.mjs} +4 -4
  9. package/dist/{adapter-http-express-D4KBmDcQ.mjs.map → adapter-http-express-Drbaxszc.mjs.map} +1 -1
  10. package/dist/{adapter-http-fastify-U9j7HxQE.mjs → adapter-http-fastify-DMPW_huG.mjs} +6 -5
  11. package/dist/{adapter-http-fastify-U9j7HxQE.mjs.map → adapter-http-fastify-DMPW_huG.mjs.map} +1 -1
  12. package/dist/index.d.mts +577 -459
  13. package/dist/index.d.mts.map +1 -1
  14. package/dist/index.mjs +156 -72
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/{pieces-eqj2RKgd.mjs → pieces-BOwV3Ql9.mjs} +6 -3
  17. package/dist/{pieces-eqj2RKgd.mjs.map → pieces-BOwV3Ql9.mjs.map} +1 -1
  18. package/dist/rolldown-runtime-D7D4PA-g.mjs +15 -0
  19. package/dist/{run-node-handler-Bqn0X6bT.mjs → run-node-handler-CQjyjOuN.mjs} +3 -3
  20. package/dist/{run-node-handler-Bqn0X6bT.mjs.map → run-node-handler-CQjyjOuN.mjs.map} +1 -1
  21. package/dist/src/packages/https-hooks.d.mts +4 -4
  22. package/dist/src/packages/https-hooks.d.mts.map +1 -1
  23. package/dist/src/packages/https-hooks.mjs +2 -2
  24. package/dist/src/packages/https-hooks.mjs.map +1 -1
  25. package/dist/src/packages/vite-loader.d.mts +5 -6
  26. package/dist/src/packages/vite-loader.d.mts.map +1 -1
  27. package/dist/src/packages/vite-loader.mjs +9 -6
  28. package/dist/src/packages/vite-loader.mjs.map +1 -1
  29. package/dist/{types-BXjLvTe3.d.mts → types-D4Qnqo_D.d.mts} +2 -2
  30. package/dist/types-D4Qnqo_D.d.mts.map +1 -0
  31. package/dist/{websocket-DncAB9XK.mjs → websocket-_SH5aBcy.mjs} +3 -3
  32. package/dist/{websocket-DncAB9XK.mjs.map → websocket-_SH5aBcy.mjs.map} +1 -1
  33. package/package.json +15 -15
  34. package/dist/types-BXjLvTe3.d.mts.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="29fbf62b-398f-53fa-ac67-5fcef3d5ac7d")}catch(e){}}();
3
- import { C as createAuthorizationService, D as MalformedStoredOperationError, E as ForbiddenError, S as AuthorizedDocumentHandle, T as AuthenticationRequiredError, _ as loadSubgraphs, a as piecesFromCdnList, b as createCanonicalDocumentIdResolver, c as buildGraphQlDriveDocument, d as isSubgraphClass, f as debounce, g as loadProcessors, h as loadDocumentModels, i as pieceListLocation, l as buildGraphqlOperation, o as piecesFromListModule, p as extractUpgradeManifests, r as PIECE_SOURCE_LIST, s as buildGraphQlDocument, u as buildGraphqlOperations, v as BaseSubgraph, w as AuthEvaluationUnsupportedError, x as AuthorizationPolicy, y as CanonicalDocumentIdResolutionError } from "./pieces-eqj2RKgd.mjs";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6828688f-9737-5852-b599-51439acc4894")}catch(e){}}();
3
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
4
+ import { C as createAuthorizationService, D as MalformedStoredOperationError, E as ForbiddenError, S as AuthorizedDocumentHandle, T as AuthenticationRequiredError, _ as loadSubgraphs, a as piecesFromCdnList, b as createCanonicalDocumentIdResolver, c as buildGraphQlDriveDocument, d as isSubgraphClass, f as debounce, g as loadProcessors, h as loadDocumentModels, i as pieceListLocation, l as buildGraphqlOperation, o as piecesFromListModule, p as extractUpgradeManifests, r as PIECE_SOURCE_LIST, s as buildGraphQlDocument, u as buildGraphqlOperations, v as BaseSubgraph, w as AuthEvaluationUnsupportedError, x as AuthorizationPolicy, y as CanonicalDocumentIdResolutionError } from "./pieces-BOwV3Ql9.mjs";
4
5
  import { AnalyticsQueryEngine } from "@powerhousedao/analytics-engine-core";
5
6
  import { AnalyticsModel, AnalyticsResolvers, typedefs } from "@powerhousedao/analytics-engine-graphql";
6
7
  import { gql } from "graphql-tag";
@@ -47,18 +48,6 @@ import { AtomicNodeFs } from "@powerhousedao/pglite-fs";
47
48
  import knex from "knex";
48
49
  import ClientPgLite from "knex-pglite";
49
50
  import { KyselyKnexDialect, PGColdDialect } from "kysely-knex";
50
- //#region \0rolldown/runtime.js
51
- var __defProp = Object.defineProperty;
52
- var __exportAll = (all, no_symbols) => {
53
- let target = {};
54
- for (var name in all) __defProp(target, name, {
55
- get: all[name],
56
- enumerable: true
57
- });
58
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
59
- return target;
60
- };
61
- //#endregion
62
51
  //#region src/graphql/analytics-subgraph.ts
63
52
  var AnalyticsSubgraph = class extends BaseSubgraph {
64
53
  analyticsStore;
@@ -312,15 +301,15 @@ function createAuthFetchMiddleware(authService) {
312
301
  async function createGatewayAdapter(type, logger) {
313
302
  switch (type) {
314
303
  case "apollo": {
315
- const { ApolloGatewayAdapter } = await import("./adapter-gateway-apollo-DowrX6E_.mjs");
304
+ const { ApolloGatewayAdapter } = await import("./adapter-gateway-apollo-D2DNlPY0.mjs");
316
305
  return new ApolloGatewayAdapter(logger);
317
306
  }
318
307
  case "mercurius": {
319
- const { MercuriusGatewayAdapter } = await import("./adapter-gateway-mercurius-CZVy88Za.mjs");
308
+ const { MercuriusGatewayAdapter } = await import("./adapter-gateway-mercurius-rbKlwF9m.mjs");
320
309
  return new MercuriusGatewayAdapter(logger);
321
310
  }
322
311
  case "stitching": {
323
- const { StitchingGatewayAdapter } = await import("./adapter-gateway-stitching-CaZjvRzx.mjs");
312
+ const { StitchingGatewayAdapter } = await import("./adapter-gateway-stitching-Dzv10u8D.mjs");
324
313
  return new StitchingGatewayAdapter(logger);
325
314
  }
326
315
  }
@@ -328,11 +317,11 @@ async function createGatewayAdapter(type, logger) {
328
317
  async function createHttpAdapter(type) {
329
318
  switch (type) {
330
319
  case "express": {
331
- const { createExpressHttpAdapter } = await import("./adapter-http-express-D4KBmDcQ.mjs");
320
+ const { createExpressHttpAdapter } = await import("./adapter-http-express-Drbaxszc.mjs");
332
321
  return createExpressHttpAdapter();
333
322
  }
334
323
  case "fastify": {
335
- const { createFastifyHttpAdapter } = await import("./adapter-http-fastify-U9j7HxQE.mjs");
324
+ const { createFastifyHttpAdapter } = await import("./adapter-http-fastify-DMPW_huG.mjs");
336
325
  return createFastifyHttpAdapter();
337
326
  }
338
327
  }
@@ -360,7 +349,7 @@ const WS_AUTH_CLOSE_REASONS = [WS_CLOSE_REASON_AUTHENTICATION_REQUIRED, WS_CLOSE
360
349
  */
361
350
  const SEGMENT = /^[a-z0-9][-a-z0-9._]*$/i;
362
351
  /** Segments that would read as path traversal rather than as a name. */
363
- const TRAVERSAL = new Set([".", ".."]);
352
+ const TRAVERSAL = /* @__PURE__ */ new Set([".", ".."]);
364
353
  var InvalidNamespaceError = class extends Error {};
365
354
  /**
366
355
  * Turns a package name into the path segments it occupies.
@@ -846,27 +835,29 @@ var HttpScope = class {
846
835
  headers: fetchHeaders(req),
847
836
  signal: controller.signal
848
837
  };
849
- if (method !== "GET" && method !== "HEAD" && body !== "none") if (body === "stream") init = {
850
- ...init,
851
- body: Readable.toWeb(req),
852
- duplex: "half"
853
- };
854
- else {
855
- try {
856
- raw = await readBody(req, spec.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES$1);
857
- } catch (error) {
858
- if (error instanceof BodyTooLargeError) {
859
- res.setHeader("connection", "close");
860
- res.once("finish", () => req.destroy());
861
- writeError(res, 413, "Payload too large");
862
- return;
863
- }
864
- throw error;
865
- }
866
- if (raw.length) init = {
838
+ if (method !== "GET" && method !== "HEAD" && body !== "none") {
839
+ if (body === "stream") init = {
867
840
  ...init,
868
- body: new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength)
841
+ body: Readable.toWeb(req),
842
+ duplex: "half"
869
843
  };
844
+ else {
845
+ try {
846
+ raw = await readBody(req, spec.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES$1);
847
+ } catch (error) {
848
+ if (error instanceof BodyTooLargeError) {
849
+ res.setHeader("connection", "close");
850
+ res.once("finish", () => req.destroy());
851
+ writeError(res, 413, "Payload too large");
852
+ return;
853
+ }
854
+ throw error;
855
+ }
856
+ if (raw.length) init = {
857
+ ...init,
858
+ body: new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength)
859
+ };
860
+ }
870
861
  }
871
862
  await writeResponse(res, await spec.handler(new Request(url, init), {
872
863
  ...ctx,
@@ -1043,7 +1034,7 @@ function verifyWebhook(options) {
1043
1034
  }
1044
1035
  /** Headers that would put a credential in a log or run journal. The configured signature
1045
1036
  * header joins them: it is an HMAC of the body under a live secret. */
1046
- const REDACTED_HEADERS = new Set([
1037
+ const REDACTED_HEADERS = /* @__PURE__ */ new Set([
1047
1038
  "authorization",
1048
1039
  "proxy-authorization",
1049
1040
  "cookie",
@@ -1316,6 +1307,7 @@ function newWebhookToken() {
1316
1307
  const NAMESPACE = "reactor_webhooks";
1317
1308
  /** Relational implementation, over the reactor's own database. */
1318
1309
  var RelationalWebhookStore = class {
1310
+ relationalDb;
1319
1311
  #db;
1320
1312
  constructor(relationalDb) {
1321
1313
  this.relationalDb = relationalDb;
@@ -1461,7 +1453,7 @@ const stripScalarDefinitions = (doc) => {
1461
1453
  * whole gateway. We dedupe these by name; field/operation/extension nodes are
1462
1454
  * left untouched.
1463
1455
  */
1464
- const TYPE_DEFINITION_KINDS = new Set([
1456
+ const TYPE_DEFINITION_KINDS = /* @__PURE__ */ new Set([
1465
1457
  Kind.OBJECT_TYPE_DEFINITION,
1466
1458
  Kind.ENUM_TYPE_DEFINITION,
1467
1459
  Kind.INPUT_OBJECT_TYPE_DEFINITION,
@@ -1563,7 +1555,7 @@ const getDocumentModelTypeDefs = (documentModels, typeDefs$1) => {
1563
1555
  stateJSON: JSONObject
1564
1556
  }\n`;
1565
1557
  });
1566
- return dedupeTypeDefinitions(gql`
1558
+ const schema = gql`
1567
1559
  scalar JSONObject
1568
1560
  scalar AttachmentRef
1569
1561
  # Codegen scalars not in the document-engineering set.
@@ -1639,7 +1631,8 @@ const getDocumentModelTypeDefs = (documentModels, typeDefs$1) => {
1639
1631
  }
1640
1632
 
1641
1633
  ${stripScalarDefinitions(typeDefs$1)}
1642
- `);
1634
+ `;
1635
+ return dedupeTypeDefinitions(schema);
1643
1636
  };
1644
1637
  /**
1645
1638
  * Extract type names from a GraphQL schema.
@@ -1735,9 +1728,7 @@ function generateStateInputTypes(stateSchema, excludeTypeNames) {
1735
1728
  case Kind.OBJECT_TYPE_DEFINITION:
1736
1729
  objectNames.add(def.name.value);
1737
1730
  break;
1738
- case Kind.INPUT_OBJECT_TYPE_DEFINITION:
1739
- existingInputNames.add(def.name.value);
1740
- break;
1731
+ case Kind.INPUT_OBJECT_TYPE_DEFINITION: existingInputNames.add(def.name.value);
1741
1732
  }
1742
1733
  const inputTypes = [];
1743
1734
  for (const def of ast.definitions) {
@@ -1766,7 +1757,7 @@ function applyGraphQLTypePrefixes(schema, prefix, externalTypeNames = []) {
1766
1757
  if (!schema || !schema.trim()) return schema;
1767
1758
  let processedSchema = schema;
1768
1759
  const localTypeNames = extractTypeNames(schema);
1769
- const allTypeNames = [...new Set([...localTypeNames, ...externalTypeNames])];
1760
+ const allTypeNames = [.../* @__PURE__ */ new Set([...localTypeNames, ...externalTypeNames])];
1770
1761
  if (allTypeNames.length === 0) return schema;
1771
1762
  allTypeNames.forEach((typeName) => {
1772
1763
  const typeRegex = new RegExp(`(?<![_A-Za-z0-9])(${typeName})(?![_A-Za-z0-9])|\\[(${typeName})\\]|\\[(${typeName})!\\]|\\[(${typeName})\\]!|\\[(${typeName})!\\]!`, "g");
@@ -1794,8 +1785,9 @@ function generateDocumentModelSchema(documentModel, options = {}) {
1794
1785
  const localStateTypeNames = extractTypeNames(localStateSchema ?? "");
1795
1786
  const stateTypeNames = [...globalStateTypeNames, ...localStateTypeNames];
1796
1787
  const allOperationTypeNames = specification?.modules.flatMap((module) => module.operations.flatMap((op) => extractTypeNames(op.schema ?? ""))) ?? [];
1797
- const allTypeNames = [...new Set([...stateTypeNames, ...allOperationTypeNames])];
1798
- const prefixedStateInputTypes = applyGraphQLTypePrefixes(extractInputTypeDefinitions(globalStateSchema ?? "", new Set(allOperationTypeNames)), documentName, allTypeNames);
1788
+ const allTypeNames = [.../* @__PURE__ */ new Set([...stateTypeNames, ...allOperationTypeNames])];
1789
+ const operationInputTypeNames = new Set(allOperationTypeNames);
1790
+ const prefixedStateInputTypes = applyGraphQLTypePrefixes(extractInputTypeDefinitions(globalStateSchema ?? "", operationInputTypeNames), documentName, allTypeNames);
1799
1791
  const hasValidSchema = (schema) => !!(schema && /\b(input|type|enum|union|interface)\s+\w+/.test(schema));
1800
1792
  const stateSchemaTypes = globalStateSchema ? applyGraphQLTypePrefixes(globalStateSchema.replaceAll("scalar DateTime", "").replaceAll(/input (.*?) {[\s\S]*?}/g, ""), documentName, allTypeNames) : "";
1801
1793
  if (useNewApi) return generateNewApiSchema(documentName, specification, stateSchemaTypes, prefixedStateInputTypes, allTypeNames, hasValidSchema);
@@ -3020,8 +3012,8 @@ function fromInputMaybe(value) {
3020
3012
  function toReactorPropagationMode(gqlMode) {
3021
3013
  if (gqlMode == null) return;
3022
3014
  switch (gqlMode) {
3023
- case PropagationMode.Cascade: return PropagationMode$1.Cascade;
3024
- case PropagationMode.Orphan: return PropagationMode$1.None;
3015
+ case "CASCADE": return PropagationMode$1.Cascade;
3016
+ case "ORPHAN": return PropagationMode$1.None;
3025
3017
  }
3026
3018
  }
3027
3019
  /**
@@ -3031,10 +3023,10 @@ function toReactorPropagationMode(gqlMode) {
3031
3023
  */
3032
3024
  function toGqlActionEvaluation(evaluation) {
3033
3025
  return evaluation.decision === "allow" ? {
3034
- decision: AuthDecision.Allow,
3026
+ decision: "ALLOW",
3035
3027
  reason: null
3036
3028
  } : {
3037
- decision: AuthDecision.Deny,
3029
+ decision: "DENY",
3038
3030
  reason: evaluation.reason
3039
3031
  };
3040
3032
  }
@@ -3617,7 +3609,8 @@ async function createEmptyDocument(reactorClient, args, reactorDriveClient) {
3617
3609
  if (parentIdentifier) {
3618
3610
  const parent = await reactorClient.get(parentIdentifier);
3619
3611
  if (isDriveContainerType(parent.header.documentType)) {
3620
- const document = withSignaturePolicy((await reactorClient.getDocumentModelModule(args.documentType)).utils.createDocument(), await reactorClient.getCreateSignaturePolicy());
3612
+ const module = await reactorClient.getDocumentModelModule(args.documentType);
3613
+ const document = withSignaturePolicy(module.utils.createDocument(), await reactorClient.getCreateSignaturePolicy());
3621
3614
  if (name) document.header.name = name;
3622
3615
  result = await pickDriveClient(reactorClient, parent.header.documentType, reactorDriveClient).addFile(parentIdentifier, document);
3623
3616
  } else result = await reactorClient.createEmpty(args.documentType, { parentIdentifier });
@@ -4343,7 +4336,7 @@ const DRIVE_ID_HEADER = "drive-id";
4343
4336
  * in the ownership set yet); other create-shaped operations that may
4344
4337
  * synthesize a drive must be added here too.
4345
4338
  */
4346
- const CACHE_BYPASS_OPERATIONS = new Set(["createDocument", "createEmptyDocument"]);
4339
+ const CACHE_BYPASS_OPERATIONS = /* @__PURE__ */ new Set(["createDocument", "createEmptyDocument"]);
4347
4340
  const driveIdMap = /* @__PURE__ */ new WeakMap();
4348
4341
  /** Internal — only `graphql-manager.ts` should call this. */
4349
4342
  function getRequestDriveId(request) {
@@ -4413,6 +4406,7 @@ function wrongShardResponse(driveId) {
4413
4406
  * 421 response.
4414
4407
  */
4415
4408
  var DriveOwnershipCache = class {
4409
+ reactorClient;
4416
4410
  drives = /* @__PURE__ */ new Set();
4417
4411
  constructor(reactorClient) {
4418
4412
  this.reactorClient = reactorClient;
@@ -4530,6 +4524,22 @@ function createWsAuthHandlers(opts) {
4530
4524
  };
4531
4525
  }
4532
4526
  var GraphQLManager = class {
4527
+ path;
4528
+ httpServer;
4529
+ wsServer;
4530
+ reactorClient;
4531
+ relationalDb;
4532
+ analyticsStore;
4533
+ syncManager;
4534
+ logger;
4535
+ httpAdapter;
4536
+ gatewayAdapter;
4537
+ authService;
4538
+ documentPermissionService;
4539
+ featureFlags;
4540
+ port;
4541
+ syncServingGate;
4542
+ httpRoutes;
4533
4543
  initialized = false;
4534
4544
  coreSubgraphsMap = /* @__PURE__ */ new Map();
4535
4545
  contextFields = {};
@@ -6003,6 +6013,13 @@ var ReactorSubgraph = class extends BaseSubgraph {
6003
6013
  throw error;
6004
6014
  }
6005
6015
  },
6016
+ /**
6017
+ * Gated on reading the document, the same gate every other read here
6018
+ * carries: a verdict is derived from the document's policy, so a caller
6019
+ * who may not read the document may not preflight against it either.
6020
+ * That gate decides whether the query runs; the answer comes entirely
6021
+ * from the reactor's decision model.
6022
+ */
6006
6023
  evaluateActions: async (_parent, args, ctx) => {
6007
6024
  this.logger.debug("evaluateActions(@args)", args);
6008
6025
  try {
@@ -6378,10 +6395,10 @@ const ADMIN_USERS = getAdminUsers();
6378
6395
  //#endregion
6379
6396
  //#region src/graphql/system/version.ts
6380
6397
  function getVersion() {
6381
- return "6.2.3-dev.24";
6398
+ return "6.2.3-dev.25";
6382
6399
  }
6383
6400
  function getGitHash() {
6384
- return "895cfda0dfc73ba08e40437ca258507d8b2c9377";
6401
+ return "e44ced14916428517ebc9e26d9bfb53d1d86cbc0";
6385
6402
  }
6386
6403
  function getGitUrl() {
6387
6404
  return buildTreeUrl(getGitHash());
@@ -6482,7 +6499,8 @@ var HttpPackageLoader = class {
6482
6499
  async loadUpgradeManifests(packageSpec) {
6483
6500
  const { name: packageName } = this.parsePackageSpec(packageSpec);
6484
6501
  if (!this.isValidPackageName(packageName)) throw new Error(`Invalid package name: ${packageName}`);
6485
- const manifests = extractUpgradeManifests(await import(`${this.registryUrl}-/cdn/${packageSpec}/node/document-models/index.mjs`));
6502
+ const module = await import(`${this.registryUrl}-/cdn/${packageSpec}/node/document-models/index.mjs`);
6503
+ const manifests = extractUpgradeManifests(module);
6486
6504
  if (manifests.length > 0) this.logger.verbose(`Loaded ${manifests.length} upgrade manifests from ${packageName}`);
6487
6505
  return manifests;
6488
6506
  }
@@ -6673,10 +6691,11 @@ var ImportPackageLoader = class {
6673
6691
  this.reportUnbuilt(identifier, root, listPath);
6674
6692
  return [];
6675
6693
  }
6676
- const pieces = piecesFromListModule(await import(
6694
+ const module = await import(
6677
6695
  /* @vite-ignore */
6678
6696
  pathToFileURL(listPath).href
6679
- ), {
6697
+ );
6698
+ const pieces = piecesFromListModule(module, {
6680
6699
  root,
6681
6700
  identifier,
6682
6701
  logger: this.logger
@@ -6726,6 +6745,7 @@ function getUniqueUpgradeManifests(...upgradeManifests) {
6726
6745
  return Array.from(uniqueManifests.values());
6727
6746
  }
6728
6747
  var PackageManager = class {
6748
+ options;
6729
6749
  logger = childLogger(["reactor-api", "package-manager"]);
6730
6750
  loaders;
6731
6751
  docModelsMap = /* @__PURE__ */ new Map();
@@ -7080,20 +7100,41 @@ async function createStartupAttachmentBackend({ db, env = process.env, s3Depende
7080
7100
  }
7081
7101
  //#endregion
7082
7102
  //#region src/services/attachment-access.service.ts
7103
+ /** The scope an attachment's bytes belong to: the document's own domain state. */
7104
+ const ATTACHMENT_SCOPE = "global";
7105
+ /** The branch an attachment reference is resolved against. */
7106
+ const ATTACHMENT_BRANCH = "main";
7083
7107
  const HASH_PATTERN = /^[a-f0-9]{64}$/;
7084
7108
  /**
7085
7109
  * Composes document authorization with the projected document/ref
7086
7110
  * relationship. Order is fixed: validate ref, resolve the canonical document
7087
- * id, check `canRead`, then check the reference index. A denied document
7111
+ * id, decide the read, then check the reference index. A denied document
7088
7112
  * never reaches the reference reader, and the facade never touches
7089
7113
  * attachment metadata, storage backends, or presigners.
7114
+ *
7115
+ * The read is decided by the document's own policy when this composition has a
7116
+ * model to enforce it with, and by the host's permission tables when it does
7117
+ * not. That is not a preference between two equivalent answers: a host running
7118
+ * document policies keeps no rows in the permission tables, so asking them
7119
+ * about such a document returns whatever the host-wide policy says — under
7120
+ * `OPEN`, `true`, for everyone. Serving bytes on that answer hands the file to
7121
+ * anyone who learns its hash, which the document's own state may well have told
7122
+ * them. Both are kept because they are the two halves of one rule: an
7123
+ * attachment is readable by whoever may read the document that references it,
7124
+ * and each composition can only express that in its own terms.
7090
7125
  */
7091
7126
  var AttachmentAccessService = class {
7092
- constructor(resolveCanonicalId, authorization, references, projection) {
7127
+ resolveCanonicalId;
7128
+ authorization;
7129
+ references;
7130
+ projection;
7131
+ scopeGate;
7132
+ constructor(resolveCanonicalId, authorization, references, projection, scopeGate) {
7093
7133
  this.resolveCanonicalId = resolveCanonicalId;
7094
7134
  this.authorization = authorization;
7095
7135
  this.references = references;
7096
7136
  this.projection = projection;
7137
+ this.scopeGate = scopeGate;
7097
7138
  }
7098
7139
  async canReadAttachment(request) {
7099
7140
  if (this.projection.status !== "available") return { kind: "projection-unavailable" };
@@ -7105,7 +7146,7 @@ var AttachmentAccessService = class {
7105
7146
  } catch {
7106
7147
  return { kind: "denied" };
7107
7148
  }
7108
- if (!await this.authorization.canRead(documentId, request.userAddress)) return { kind: "denied" };
7149
+ if (!await this.canReadDocument(documentId, request)) return { kind: "denied" };
7109
7150
  if (!await this.references.hasReference(documentId, ref)) return { kind: "denied" };
7110
7151
  return {
7111
7152
  kind: "allowed",
@@ -7113,6 +7154,21 @@ var AttachmentAccessService = class {
7113
7154
  ref
7114
7155
  };
7115
7156
  }
7157
+ /**
7158
+ * Whether the caller may read the state the reference lives in.
7159
+ *
7160
+ * A failure here is rethrown rather than turned into a denial. A read side
7161
+ * that is down must not read as a policy: a denial nobody can distinguish
7162
+ * from a refusal is one nobody investigates, and the route answers 500 for a
7163
+ * reason.
7164
+ */
7165
+ async canReadDocument(documentId, request) {
7166
+ if (!this.scopeGate) return this.authorization.canRead(documentId, request.userAddress);
7167
+ return (await this.scopeGate.scopePredicateById(documentId, {
7168
+ address: request.userAddress,
7169
+ key: request.appKey
7170
+ }, ATTACHMENT_BRANCH))(ATTACHMENT_SCOPE);
7171
+ }
7116
7172
  };
7117
7173
  /**
7118
7174
  * Parses and canonicalizes a caller-supplied ref through the shared parser.
@@ -7596,6 +7652,7 @@ async function createRenownCredentialVerifier(config = {}) {
7596
7652
  * - Users can be granted permission to execute specific operations
7597
7653
  */
7598
7654
  var DocumentPermissionService = class {
7655
+ db;
7599
7656
  config;
7600
7657
  constructor(db, config = { defaultProtection: false }) {
7601
7658
  this.db = db;
@@ -8098,6 +8155,17 @@ function assertRequireAuthenticatedCallerAllowed(requireAuthenticatedCaller, res
8098
8155
  if (!requireAuthenticatedCaller || resolvesCallerIdentity) return;
8099
8156
  throw new Error("REQUIRE_AUTHENTICATED_CALLER is set but refused: it rejects every request without a resolved caller, and with neither AUTH_ENABLED nor RESOLVE_CALLER_IDENTITY the server never reads a bearer, so it would reject every caller, including authenticated ones. Enable identity resolution first (RESOLVE_CALLER_IDENTITY=true or AUTH_ENABLED=true).");
8100
8157
  }
8158
+ /**
8159
+ * Deciding an attachment read by the document's policy needs a policy model to
8160
+ * decide with, and that is what auth enforcement supplies. Without one there is
8161
+ * nothing to consult, so the setting would silently leave the permission tables
8162
+ * in charge — configuration that describes a protection the server is not
8163
+ * applying, which is worse than no configuration at all. Refuse instead.
8164
+ */
8165
+ function assertAttachmentPolicyReadsAllowed(attachmentReadsFollowDocumentPolicy, hasDecisionModel) {
8166
+ if (!attachmentReadsFollowDocumentPolicy || hasDecisionModel) return;
8167
+ throw new Error("ATTACHMENT_READS_FOLLOW_DOCUMENT_POLICY is set but refused: deciding an attachment read by the referencing document's policy requires a policy model to evaluate, and this composition has none, so the host permission tables would keep deciding while the configuration says otherwise. Enable auth enforcement first (REACTOR_AUTH_ENFORCEMENT=true).");
8168
+ }
8101
8169
  function createReadinessGate() {
8102
8170
  let ready = false;
8103
8171
  return {
@@ -8288,6 +8356,7 @@ async function _setupCommonInfrastructure(options) {
8288
8356
  let configuredResolveIdentity;
8289
8357
  let configuredRequireAuth;
8290
8358
  let configuredExemptPaths;
8359
+ let configuredAttachmentPolicyReads;
8291
8360
  let configuredRenown;
8292
8361
  if (options.configFile) {
8293
8362
  const config = getConfig(options.configFile);
@@ -8300,8 +8369,9 @@ async function _setupCommonInfrastructure(options) {
8300
8369
  configuredResolveIdentity = options.auth.resolveIdentity;
8301
8370
  configuredRequireAuth = options.auth.requireAuthenticatedCaller;
8302
8371
  configuredExemptPaths = options.auth.requireAuthenticatedCallerExemptPaths;
8372
+ configuredAttachmentPolicyReads = options.auth.attachmentReadsFollowDocumentPolicy;
8303
8373
  }
8304
- const { AUTH_ENABLED, RESOLVE_CALLER_IDENTITY, REQUIRE_AUTHENTICATED_CALLER, REQUIRE_AUTHENTICATED_CALLER_EXEMPT_PATHS, ADMINS, DEFAULT_PROTECTION, DOCUMENT_PERMISSIONS_ENABLED, SKIP_CREDENTIAL_VERIFICATION, CREDENTIAL_VERIFICATION_CACHE_TTL_MS } = process.env;
8374
+ const { AUTH_ENABLED, RESOLVE_CALLER_IDENTITY, REQUIRE_AUTHENTICATED_CALLER, REQUIRE_AUTHENTICATED_CALLER_EXEMPT_PATHS, ATTACHMENT_READS_FOLLOW_DOCUMENT_POLICY, ADMINS, DEFAULT_PROTECTION, DOCUMENT_PERMISSIONS_ENABLED, SKIP_CREDENTIAL_VERIFICATION, CREDENTIAL_VERIFICATION_CACHE_TTL_MS } = process.env;
8305
8375
  if (AUTH_ENABLED !== void 0) authEnabled = AUTH_ENABLED === "true";
8306
8376
  /**
8307
8377
  * Whether the auth middleware reads the bearer and populates `ctx.user`,
@@ -8344,6 +8414,18 @@ async function _setupCommonInfrastructure(options) {
8344
8414
  */
8345
8415
  let requireAuthenticatedCallerExemptPaths = configuredExemptPaths ?? [];
8346
8416
  if (REQUIRE_AUTHENTICATED_CALLER_EXEMPT_PATHS !== void 0) requireAuthenticatedCallerExemptPaths = REQUIRE_AUTHENTICATED_CALLER_EXEMPT_PATHS.split(",").map((path) => path.trim()).filter((path) => path.length > 0);
8417
+ /**
8418
+ * Whether an attachment read is decided by the referencing document's own
8419
+ * policy rather than by the host's permission tables.
8420
+ *
8421
+ * Off by default, and a deployment's choice rather than something derived
8422
+ * from the flags around it. Which model governs those bytes is configuration
8423
+ * in the same sense the storage backend behind them is: a host that has said
8424
+ * nothing keeps exactly the behaviour it has, and one that wants the change
8425
+ * asks for it and can take it back without disturbing anything else.
8426
+ */
8427
+ let attachmentReadsFollowDocumentPolicy = configuredAttachmentPolicyReads ?? false;
8428
+ if (ATTACHMENT_READS_FOLLOW_DOCUMENT_POLICY !== void 0) attachmentReadsFollowDocumentPolicy = ATTACHMENT_READS_FOLLOW_DOCUMENT_POLICY === "true";
8347
8429
  if (ADMINS !== void 0) admins = ADMINS.split(",").map((a) => a.toLowerCase());
8348
8430
  let defaultProtection = false;
8349
8431
  if (DEFAULT_PROTECTION !== void 0) defaultProtection = DEFAULT_PROTECTION.toLowerCase() === "true";
@@ -8420,7 +8502,7 @@ async function _setupCommonInfrastructure(options) {
8420
8502
  await mkdir(attachmentStoragePath, { recursive: true });
8421
8503
  const { db: attachmentDb, knex: attachmentKnex, pglite: attachmentPglite } = getDbClient(options.dbPath, options.pgliteFactory);
8422
8504
  dbClosers.push(...makeDbClosers(attachmentKnex, attachmentPglite));
8423
- const ATTACHMENT_SWEEP_INTERVAL_MS = 3600 * 1e3;
8505
+ const ATTACHMENT_SWEEP_INTERVAL_MS = 36e5;
8424
8506
  const attachmentBackend = await createStartupAttachmentBackend({ db: attachmentDb });
8425
8507
  const attachmentBuilder = new AttachmentBuilder(attachmentDb, attachmentStoragePath).withReservationSweepMs(ATTACHMENT_SWEEP_INTERVAL_MS);
8426
8508
  if (attachmentBackend) attachmentBuilder.withBackend(attachmentBackend);
@@ -8465,13 +8547,14 @@ async function _setupCommonInfrastructure(options) {
8465
8547
  attachmentReferenceIndex,
8466
8548
  packages,
8467
8549
  dbClosers,
8468
- readiness
8550
+ readiness,
8551
+ attachmentReadsFollowDocumentPolicy
8469
8552
  };
8470
8553
  }
8471
8554
  /**
8472
8555
  * Private helper function containing common setup logic for API initialization
8473
8556
  */
8474
- async function _setupAPI(reactorClient, syncManager, reactorProcessorManager, httpAdapter, authFetchMiddleware, requireAuthFetchMiddleware, authService, port, packages, relationalDb, analyticsStore, documentPermissionService, processors, subgraphs, options, processorApp, readModels, attachments, attachmentReferenceIndex, attachmentReferenceProjection, authorizationConfig, documentModelRegistry, dbClosers = [], reactorDriveClient, syncServingGate, httpRoutes) {
8557
+ async function _setupAPI(reactorClient, syncManager, reactorProcessorManager, httpAdapter, authFetchMiddleware, requireAuthFetchMiddleware, authService, port, packages, relationalDb, analyticsStore, documentPermissionService, processors, subgraphs, options, processorApp, readModels, attachments, attachmentReferenceIndex, attachmentReferenceProjection, authorizationConfig, documentModelRegistry, dbClosers = [], reactorDriveClient, syncServingGate, httpRoutes, attachmentReadsFollowDocumentPolicy = false) {
8475
8558
  const hostModuleBase = {
8476
8559
  ...createReactorHostModuleBase({
8477
8560
  client: reactorClient,
@@ -8513,7 +8596,8 @@ async function _setupAPI(reactorClient, syncManager, reactorProcessorManager, ht
8513
8596
  const { httpServer, wsServer } = await startServer(httpAdapter, port, options.https, logger);
8514
8597
  const authorizationService = createAuthorizationService(authorizationConfig, documentPermissionService, createGetParentIdsFn(reactorClient));
8515
8598
  logger.info(`Authorization service initialized (policy: ${authorizationConfig.policy})`);
8516
- const attachmentAccess = new AttachmentAccessService(createCanonicalDocumentIdResolver(reactorClient), authorizationService, attachmentReferenceIndex.store, attachmentReferenceProjection);
8599
+ assertAttachmentPolicyReadsAllowed(attachmentReadsFollowDocumentPolicy, syncServingGate !== void 0);
8600
+ const attachmentAccess = new AttachmentAccessService(createCanonicalDocumentIdResolver(reactorClient), authorizationService, attachmentReferenceIndex.store, attachmentReferenceProjection, attachmentReadsFollowDocumentPolicy ? syncServingGate : void 0);
8517
8601
  const coreSubgraphs = DefaultCoreSubgraphs.slice();
8518
8602
  coreSubgraphs.push(ReactorSubgraph);
8519
8603
  if (documentPermissionService) {
@@ -8599,7 +8683,7 @@ function buildApiDispose(args) {
8599
8683
  };
8600
8684
  }
8601
8685
  async function initializeAndStartAPI(clientInitializer, options, processorApp) {
8602
- const { port, httpAdapter, httpRoutes, authFetchMiddleware, requireAuthFetchMiddleware, authService, relationalDb, analyticsStore, documentPermissionService, authorizationConfig, attachments, attachmentReferenceIndex, packages, dbClosers, readiness } = await _setupCommonInfrastructure(options);
8686
+ const { port, httpAdapter, httpRoutes, authFetchMiddleware, requireAuthFetchMiddleware, authService, relationalDb, analyticsStore, documentPermissionService, authorizationConfig, attachments, attachmentReferenceIndex, packages, dbClosers, readiness, attachmentReadsFollowDocumentPolicy } = await _setupCommonInfrastructure(options);
8603
8687
  const { documentModels, upgradeManifests, processors, subgraphs } = await packages.init();
8604
8688
  const { module: reactorClientModule, reactorDriveClient, attachmentReferenceProjection = {
8605
8689
  status: "unavailable",
@@ -8616,7 +8700,7 @@ async function initializeAndStartAPI(clientInitializer, options, processorApp) {
8616
8700
  const documentModelRegistry = reactorClientModule.reactorModule?.documentModelRegistry;
8617
8701
  if (!documentModelRegistry) throw new Error("DocumentModelRegistry not available from InProcessReactorClientModule");
8618
8702
  return {
8619
- ...await _setupAPI(reactorClient, syncManager, reactorProcessorManager, httpAdapter, authFetchMiddleware, requireAuthFetchMiddleware, authService, port, packages, relationalDb, analyticsStore, documentPermissionService, processors, subgraphs, options, processorApp, (reactorClientModule.reactorModule?.readModelCoordinator)?.readModels ?? [], attachments, attachmentReferenceIndex, attachmentReferenceProjection, authorizationConfig, documentModelRegistry, dbClosers, reactorDriveClient, buildSyncServingGate(reactorClientModule.reactorModule, authorizationConfig, options.logger ?? defaultLogger), httpRoutes),
8703
+ ...await _setupAPI(reactorClient, syncManager, reactorProcessorManager, httpAdapter, authFetchMiddleware, requireAuthFetchMiddleware, authService, port, packages, relationalDb, analyticsStore, documentPermissionService, processors, subgraphs, options, processorApp, (reactorClientModule.reactorModule?.readModelCoordinator)?.readModels ?? [], attachments, attachmentReferenceIndex, attachmentReferenceProjection, authorizationConfig, documentModelRegistry, dbClosers, reactorDriveClient, buildSyncServingGate(reactorClientModule.reactorModule, authorizationConfig, options.logger ?? defaultLogger), httpRoutes, attachmentReadsFollowDocumentPolicy),
8620
8704
  client: reactorClient,
8621
8705
  syncManager,
8622
8706
  documentModelRegistry,
@@ -8749,7 +8833,7 @@ var PackageManagementService = class {
8749
8833
  }
8750
8834
  };
8751
8835
  //#endregion
8752
- export { ADMIN_USERS, ActionCandidateInputSchema, ActionContextInputSchema, ActionInputSchema, AddRelationshipDocument, AnalyticsSubgraph, AttachmentAccessService, AuthDecision, AuthDecisionSchema, AuthEvaluationUnsupportedError, AuthService, AuthSubgraph, AuthenticationRequiredError, AuthorizationPolicy, AuthorizedDocumentHandle, BaseSubgraph, CORE_PACKAGE_NAME, CanonicalDocumentIdResolutionError, ChannelMetaInputSchema, CreateDocumentDocument, CreateEmptyDocumentDocument, DeleteDocumentDocument, DeleteDocumentsDocument, DocumentChangeType, DocumentChangeTypeSchema, DocumentChangesDocument, DocumentOperationsFilterInputSchema, DocumentPermissionService, DocumentRelationshipFieldsFragmentDoc, EvaluateActionsDocument, FindDocumentsDocument, ForbiddenError, GetDocumentDocument, GetDocumentIncomingRelationshipEdgesDocument, GetDocumentIncomingRelationshipsDocument, GetDocumentModelsDocument, GetDocumentOperationsDocument, GetDocumentOutgoingRelationshipEdgesDocument, GetDocumentOutgoingRelationshipsDocument, GetDocumentWithOperationsDocument, GetJobStatusDocument, GraphQLManager, HttpDocumentModelLoader, HttpPackageLoader, HttpRouteService, ImportPackageLoader, InMemoryPackageStorage, InvalidNamespaceError, JobChangesDocument, MalformedStoredOperationError, MemoryWebhookStore, MoveRelationshipDocument, MutateDocumentAsyncDocument, MutateDocumentDocument, OperationContextInputSchema, OperationInputSchema, OperationWithContextInputSchema, OperationsFilterInputSchema, PACKAGE_ROUTE_SEGMENT, PGLITE_UTC_PARSERS, PackageManagementService, PackageManager, PackagesSubgraph, PagingInputSchema, PhDocumentFieldsFragmentDoc, PollSyncEnvelopesDocument, PropagationMode, PropagationModeSchema, PushSyncEnvelopesDocument, ReactorSignerAppInputSchema, ReactorSignerInputSchema, ReactorSignerUserInputSchema, ReactorSubgraph, RelationalWebhookStore, RemoteCursorInputSchema, RemoteFilterInputSchema, RemoveRelationshipDocument, RenameDocumentDocument, SearchFilterInputSchema, SetPreferredEditorDocument, SyncEnvelopeInputSchema, SyncEnvelopeType, SyncEnvelopeTypeSchema, SystemSubgraph, TouchChannelDocument, TouchChannelInputSchema, UpdateRelationshipDocument, ViewFilterInputSchema, WEBHOOK_SEGMENT, WS_AUTH_CLOSE_REASONS, WS_CLOSE_REASON_AUTHENTICATION_REQUIRED, WS_CLOSE_REASON_BEARER_REJECTED, WebhookService, assertAuthRequiredForDocumentPermissions, assertCredentialVerifierForSource, assertHostMountPath, assertRequireAuthenticatedCallerAllowed, assertSkipCredentialVerificationAllowed, buildGraphQlDocument, buildGraphQlDriveDocument, buildGraphqlOperation, buildGraphqlOperations, buildSubgraphSchemaModule, createAuthFetchMiddleware, createCanonicalDocumentIdResolver, createGatewayAdapter, createHttpAdapter, createMergedSchema, createReactorGraphQLClient, createRenownCredentialVerifier, createSchema, createWsAuthHandlers, decodeExplorerUrlState, definedNonNullAnySchema, driveIdFromUrl, extractSubgraphsFromModule, generateDocumentModelSchema, getAuthContext, getDbClient, getDocumentModelSchemaName, getDocumentModelTypeDefs, getExplorerPrefix, getGitHash, getGitUrl, getSdk, getUniqueDocumentModels, getUniqueUpgradeManifests, getVersion, initAnalyticsStoreSql, initializeAndStartAPI, isDefinedNonNullAny, isExpectedLoaderMiss, isSubgraphClass, namespacePath, namespaceSegments, newWebhookToken, parseDriveUrl, parseWebhookBody, redactHeaders, renderGraphqlPlayground, resolvePackageName, resolveRenownConfig, verifyWebhook };
8836
+ export { ADMIN_USERS, ActionCandidateInputSchema, ActionContextInputSchema, ActionInputSchema, AddRelationshipDocument, AnalyticsSubgraph, AttachmentAccessService, AuthDecision, AuthDecisionSchema, AuthEvaluationUnsupportedError, AuthService, AuthSubgraph, AuthenticationRequiredError, AuthorizationPolicy, AuthorizedDocumentHandle, BaseSubgraph, CORE_PACKAGE_NAME, CanonicalDocumentIdResolutionError, ChannelMetaInputSchema, CreateDocumentDocument, CreateEmptyDocumentDocument, DeleteDocumentDocument, DeleteDocumentsDocument, DocumentChangeType, DocumentChangeTypeSchema, DocumentChangesDocument, DocumentOperationsFilterInputSchema, DocumentPermissionService, DocumentRelationshipFieldsFragmentDoc, EvaluateActionsDocument, FindDocumentsDocument, ForbiddenError, GetDocumentDocument, GetDocumentIncomingRelationshipEdgesDocument, GetDocumentIncomingRelationshipsDocument, GetDocumentModelsDocument, GetDocumentOperationsDocument, GetDocumentOutgoingRelationshipEdgesDocument, GetDocumentOutgoingRelationshipsDocument, GetDocumentWithOperationsDocument, GetJobStatusDocument, GraphQLManager, HttpDocumentModelLoader, HttpPackageLoader, HttpRouteService, ImportPackageLoader, InMemoryPackageStorage, InvalidNamespaceError, JobChangesDocument, MalformedStoredOperationError, MemoryWebhookStore, MoveRelationshipDocument, MutateDocumentAsyncDocument, MutateDocumentDocument, OperationContextInputSchema, OperationInputSchema, OperationWithContextInputSchema, OperationsFilterInputSchema, PACKAGE_ROUTE_SEGMENT, PGLITE_UTC_PARSERS, PackageManagementService, PackageManager, PackagesSubgraph, PagingInputSchema, PhDocumentFieldsFragmentDoc, PollSyncEnvelopesDocument, PropagationMode, PropagationModeSchema, PushSyncEnvelopesDocument, ReactorSignerAppInputSchema, ReactorSignerInputSchema, ReactorSignerUserInputSchema, ReactorSubgraph, RelationalWebhookStore, RemoteCursorInputSchema, RemoteFilterInputSchema, RemoveRelationshipDocument, RenameDocumentDocument, SearchFilterInputSchema, SetPreferredEditorDocument, SyncEnvelopeInputSchema, SyncEnvelopeType, SyncEnvelopeTypeSchema, SystemSubgraph, TouchChannelDocument, TouchChannelInputSchema, UpdateRelationshipDocument, ViewFilterInputSchema, WEBHOOK_SEGMENT, WS_AUTH_CLOSE_REASONS, WS_CLOSE_REASON_AUTHENTICATION_REQUIRED, WS_CLOSE_REASON_BEARER_REJECTED, WebhookService, assertAttachmentPolicyReadsAllowed, assertAuthRequiredForDocumentPermissions, assertCredentialVerifierForSource, assertHostMountPath, assertRequireAuthenticatedCallerAllowed, assertSkipCredentialVerificationAllowed, buildGraphQlDocument, buildGraphQlDriveDocument, buildGraphqlOperation, buildGraphqlOperations, buildSubgraphSchemaModule, createAuthFetchMiddleware, createCanonicalDocumentIdResolver, createGatewayAdapter, createHttpAdapter, createMergedSchema, createReactorGraphQLClient, createRenownCredentialVerifier, createSchema, createWsAuthHandlers, decodeExplorerUrlState, definedNonNullAnySchema, driveIdFromUrl, extractSubgraphsFromModule, generateDocumentModelSchema, getAuthContext, getDbClient, getDocumentModelSchemaName, getDocumentModelTypeDefs, getExplorerPrefix, getGitHash, getGitUrl, getSdk, getUniqueDocumentModels, getUniqueUpgradeManifests, getVersion, initAnalyticsStoreSql, initializeAndStartAPI, isDefinedNonNullAny, isExpectedLoaderMiss, isSubgraphClass, namespacePath, namespaceSegments, newWebhookToken, parseDriveUrl, parseWebhookBody, redactHeaders, renderGraphqlPlayground, resolvePackageName, resolveRenownConfig, verifyWebhook };
8753
8837
 
8754
8838
  //# sourceMappingURL=index.mjs.map
8755
- //# debugId=29fbf62b-398f-53fa-ac67-5fcef3d5ac7d
8839
+ //# debugId=6828688f-9737-5852-b599-51439acc4894