@classytic/arc 2.51.0 → 2.52.0

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 (164) hide show
  1. package/dist/{EventTransport-K7Q9WPjm.mjs → EventTransport-DeNze_-C.mjs} +2 -2
  2. package/dist/{HookSystem-DBAu9uNT.mjs → HookSystem-DTffXM1X.mjs} +2 -2
  3. package/dist/{ResourceRegistry-BelzCRMy.mjs → ResourceRegistry-tlqXSZoK.mjs} +2 -2
  4. package/dist/{acquire-B0zhfGSm.mjs → acquire-7JKEkKnN.mjs} +1 -1
  5. package/dist/audit/index.mjs +4 -4
  6. package/dist/auth/audit.mjs +1 -1
  7. package/dist/auth/index.mjs +7 -7
  8. package/dist/auth/redis-session.mjs +1 -1
  9. package/dist/auth/social/index.mjs +1 -1
  10. package/dist/{authorizationDecision-Dxj_cy6N.mjs → authorizationDecision-DKmH4tZ-.mjs} +9 -7
  11. package/dist/{boundedMap-DOBai-H3.mjs → boundedMap-zxGBpXX0.mjs} +1 -1
  12. package/dist/{buildHandler-Dyl8P9j0.mjs → buildHandler-ZDV6LRZ_.mjs} +5 -5
  13. package/dist/cache/index.mjs +4 -4
  14. package/dist/{caching-CUmaNL8Y.mjs → caching-DceUN9Xk.mjs} +2 -2
  15. package/dist/{claimed-DJPk4VZr.mjs → claimed-DsP5Hi_f.mjs} +1 -1
  16. package/dist/cleanup/index.mjs +4 -4
  17. package/dist/cli/commands/describe.mjs +3 -3
  18. package/dist/cli/commands/docs.mjs +3 -3
  19. package/dist/cli/commands/doctor.mjs +1 -1
  20. package/dist/cli/commands/generate.mjs +2 -2
  21. package/dist/cli/commands/init.mjs +2 -2
  22. package/dist/cli/commands/introspect.mjs +2 -2
  23. package/dist/cli/index.mjs +3 -3
  24. package/dist/{constants-DH41jnNT.mjs → constants-Ca2IQFy2.mjs} +1 -1
  25. package/dist/context/index.mjs +5 -5
  26. package/dist/core/index.d.mts +1 -1
  27. package/dist/core/index.mjs +7 -7
  28. package/dist/{core-DPmRWlpx.mjs → core-M18RhMqi.mjs} +3 -3
  29. package/dist/{createActionRouter-B1xhER6i.mjs → createActionRouter-zXlrwWVs.mjs} +5 -5
  30. package/dist/{createAggregationRouter-CNntJL-z.mjs → createAggregationRouter-CN0Da9nC.mjs} +7 -7
  31. package/dist/{createApp-DpG26bCu.mjs → createApp-BC67ACu4.mjs} +29 -29
  32. package/dist/{defineAggregation-rI3EbZUg.mjs → defineAggregation-DqAGb5oI.mjs} +1 -1
  33. package/dist/{defineResource-5DcG_wlI.mjs → defineResource-DC5UqkQv.mjs} +8 -8
  34. package/dist/discovery/index.mjs +1 -1
  35. package/dist/docs/index.mjs +3 -3
  36. package/dist/{elevation-XFu7J3aj.mjs → elevation-DiXVg98q.mjs} +5 -5
  37. package/dist/encryption/index.d.mts +26 -1
  38. package/dist/encryption/index.mjs +56 -6
  39. package/dist/{errorHandler-xDVUWOMu.mjs → errorHandler-BUTm9P_f.mjs} +3 -3
  40. package/dist/{errors-KBZ3tQk5.mjs → errors-DxpHZBlW.mjs} +1 -1
  41. package/dist/{eventPlugin-C4lNj2Dw.mjs → eventPlugin-ZsIQPRso.mjs} +8 -8
  42. package/dist/{eventTypes-DZRoUAdk.mjs → eventTypes-D-pFtqT1.mjs} +2 -2
  43. package/dist/events/index.mjs +8 -8
  44. package/dist/events/transports/redis-stream-entry.mjs +4 -4
  45. package/dist/events/transports/redis.mjs +2 -2
  46. package/dist/factory/index.d.mts +4 -4
  47. package/dist/factory/index.mjs +7 -7
  48. package/dist/{fastify-augmentation-baQc3MaO.d.mts → fastify-augmentation-CPReFhZ1.d.mts} +1 -1
  49. package/dist/{fieldTypes-DrXUW1jc.mjs → fieldTypes-f-3TZgR3.mjs} +2 -2
  50. package/dist/{fields-C5J8WTd2.mjs → fields-kCbIDTjA.mjs} +1 -1
  51. package/dist/{filter-merge-DTjYoDrj.mjs → filter-merge-UJCgjbZR.mjs} +1 -1
  52. package/dist/{generate-SA8oMlLB.mjs → generate-CLpmzbJ_.mjs} +2 -2
  53. package/dist/{headers-D5wrBLOk.mjs → headers-Bh47h0XH.mjs} +2 -2
  54. package/dist/{health-BLal039H.mjs → health-CEpgVAl7.mjs} +1 -1
  55. package/dist/{health-vEo3fni4.mjs → health-W4S2yFBL.mjs} +1 -1
  56. package/dist/hooks/index.mjs +2 -2
  57. package/dist/http-cache/index.mjs +4 -4
  58. package/dist/http-cache/purgers/cloudflare.mjs +2 -2
  59. package/dist/http-cache/purgers/fastly.mjs +2 -2
  60. package/dist/http-cache/testing/index.mjs +1 -1
  61. package/dist/idempotency/index.mjs +7 -7
  62. package/dist/idempotency/redis.mjs +2 -2
  63. package/dist/{index-DexdFs1a.d.mts → index-CSbDhif4.d.mts} +19 -1
  64. package/dist/{index-DKM2p5w5.d.mts → index-DCH08eqQ.d.mts} +1 -1
  65. package/dist/{index-Dhrks-hM.d.mts → index-yXXCsKl7.d.mts} +1 -1
  66. package/dist/index.d.mts +2 -2
  67. package/dist/index.mjs +11 -11
  68. package/dist/{init-DeKHaNZn.mjs → init-B43DXBpc.mjs} +1 -1
  69. package/dist/integrations/event-gateway.mjs +2 -2
  70. package/dist/integrations/index.mjs +1 -1
  71. package/dist/integrations/jobs/index.mjs +3 -3
  72. package/dist/integrations/mcp/index.mjs +2 -2
  73. package/dist/integrations/mcp/testing.mjs +2 -2
  74. package/dist/integrations/streamline.mjs +3 -3
  75. package/dist/integrations/webhooks.mjs +4 -4
  76. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  77. package/dist/integrations/websocket-redis.mjs +1 -1
  78. package/dist/integrations/websocket.mjs +2 -2
  79. package/dist/{jsonBody-rDPGT5A9.mjs → jsonBody-CkKs6dA_.mjs} +2 -2
  80. package/dist/{keys-t7i-lJ2r.mjs → keys-DHrHnT0f.mjs} +1 -1
  81. package/dist/{loadResources-CcupAVJH.mjs → loadResources-CFdzAWQZ.mjs} +3 -3
  82. package/dist/{loadResourcesFromEntry-BpjYlaoj.mjs → loadResourcesFromEntry-DkoSiJsI.mjs} +2 -2
  83. package/dist/logger/index.mjs +2 -2
  84. package/dist/{logger-IL7Btm-N.mjs → logger-DJwz_-Pl.mjs} +1 -1
  85. package/dist/{mcpPlugin-BsdH7Vot.mjs → mcpPlugin-CA_MDFlS.mjs} +21 -21
  86. package/dist/{memory-Dkp6ZD3F.mjs → memory-B9CFHbA_.mjs} +3 -3
  87. package/dist/{metrics-CDPqgdKr.mjs → metrics-DSKv-T9K.mjs} +3 -3
  88. package/dist/middleware/index.mjs +3 -3
  89. package/dist/migrations/index.mjs +2 -2
  90. package/dist/{module-KFxT1Iuk.mjs → module-C0JCsnO7.mjs} +17 -2
  91. package/dist/{multipartBody-BHktuarE.mjs → multipartBody-Bxz-q6hI.mjs} +1 -1
  92. package/dist/{observeSend-CY-sLanc.mjs → observeSend-DfNkdGww.mjs} +1 -1
  93. package/dist/{openapi-DbeXiy2v.mjs → openapi-Dmp7Ipsi.mjs} +6 -6
  94. package/dist/outbox-admin/index.mjs +5 -5
  95. package/dist/{outbox-module-BWqkTE8-.mjs → outbox-module-vT6PaThj.mjs} +7 -7
  96. package/dist/permissions/index.mjs +7 -7
  97. package/dist/{permissions-e5YMrFbm.mjs → permissions-Cga6KBOX.mjs} +9 -9
  98. package/dist/{pipe-CMnKfdF4.mjs → pipe-CqPweKdL.mjs} +2 -2
  99. package/dist/pipeline/index.mjs +2 -2
  100. package/dist/{plan-BvLJGm3U.mjs → plan-CbDTFbTj.mjs} +1 -1
  101. package/dist/{plugin-DYmu8uT4.mjs → plugin-8Z1khbAI.mjs} +24 -24
  102. package/dist/plugins/index.d.mts +1 -1
  103. package/dist/plugins/index.mjs +18 -18
  104. package/dist/plugins/response-cache.mjs +4 -4
  105. package/dist/plugins/tracing-entry.mjs +2 -2
  106. package/dist/{pluralize-ClwfBdIx.mjs → pluralize-D4vcPLVs.mjs} +1 -1
  107. package/dist/presets/filesUpload.mjs +5 -5
  108. package/dist/presets/index.mjs +2 -2
  109. package/dist/presets/multiTenant.mjs +5 -5
  110. package/dist/presets/search.mjs +2 -2
  111. package/dist/{presets-DX_lPabi.mjs → presets-D28IABZe.mjs} +4 -4
  112. package/dist/{projection-DnZiFPPE.mjs → projection-aHCtDQQ9.mjs} +2 -2
  113. package/dist/{purger.types-BEzTVDOU.mjs → purger.types-CNFmEtFu.mjs} +1 -1
  114. package/dist/{queryCachePlugin-C57-Nj-g.mjs → queryCachePlugin-CwpEjCwz.mjs} +6 -6
  115. package/dist/{rateLimitKey-B1RxyGt3.mjs → rateLimitKey-D9dl3FQn.mjs} +1 -1
  116. package/dist/{realtime-C-VIoXMg.mjs → realtime-Dvu8ES2z.mjs} +11 -11
  117. package/dist/registry/index.d.mts +1 -1
  118. package/dist/registry/index.mjs +3 -3
  119. package/dist/{registry-DbQvODPH.mjs → registry-DmxbzW7-.mjs} +2 -2
  120. package/dist/{relay-B61seKq1.mjs → relay-CEaCmUfG.mjs} +5 -5
  121. package/dist/{renewingLease-Dp7wmzNN.mjs → renewingLease-g2FjB3im.mjs} +1 -1
  122. package/dist/{replyHelpers-CHii_jIO.mjs → replyHelpers-CSByAX_Z.mjs} +2 -2
  123. package/dist/{requestContext-C_mbAm8o.mjs → requestContext-yc7MSgmq.mjs} +1 -1
  124. package/dist/{requirement-C8OsWLYp.mjs → requirement-Dm8njSoC.mjs} +1 -1
  125. package/dist/{resourceRateLimit-DhbQZjE2.mjs → resourceRateLimit-PQaY3HW1.mjs} +2 -2
  126. package/dist/{rolldown-runtime-HTi8KV7V.mjs → rolldown-runtime-BBBkGgwA.mjs} +1 -1
  127. package/dist/{routeValidator-DnQ2BGnH.mjs → routeValidator-fuG51bQA.mjs} +1 -1
  128. package/dist/{runtimeCapabilities-G9QXHov1.mjs → runtimeCapabilities-B8IT7xiQ.mjs} +1 -1
  129. package/dist/{schedules-DAthT5O3.mjs → schedules-0-aS4jDV.mjs} +5 -5
  130. package/dist/{schemaConverter-BOt_ed78.mjs → schemaConverter-Cs3SwP4R.mjs} +2 -2
  131. package/dist/{schemaIR-MZVVj6Cw.mjs → schemaIR-By8XiNeE.mjs} +14 -14
  132. package/dist/schemas/index.mjs +1 -1
  133. package/dist/scim/index.mjs +2 -2
  134. package/dist/scope/index.mjs +5 -5
  135. package/dist/{scope-btg-225w.mjs → scope-BWNAlBj0.mjs} +4 -4
  136. package/dist/{shutdown-Dfy8La90.mjs → shutdown-Cf-27xsS.mjs} +1 -1
  137. package/dist/{simpleEqualityMatcher-D5dOqbbj.mjs → simpleEqualityMatcher-e-dgJcUO.mjs} +1 -1
  138. package/dist/{sse-DivxX1m6.mjs → sse-C3bj5qWi.mjs} +7 -7
  139. package/dist/{sseStream-hQxQjvre.mjs → sseStream-BYZbpFDa.mjs} +2 -2
  140. package/dist/{store-helpers-DfqfssAw.mjs → store-helpers-B9HierHY.mjs} +1 -1
  141. package/dist/{streaming-CQiOktsh.mjs → streaming-EN8NJWxr.mjs} +1 -1
  142. package/dist/{subscriberIdentity-Bf8VLqA7.mjs → subscriberIdentity-DSqCh38x.mjs} +1 -1
  143. package/dist/{tenancy-Btmaf1MB.mjs → tenancy-CAqjGQcQ.mjs} +2 -2
  144. package/dist/{tenantPreparation-4e3qyb6q.mjs → tenantPreparation-CVBWarqs.mjs} +4 -4
  145. package/dist/testing/cleanupStoreContract.mjs +1 -1
  146. package/dist/testing/index.d.mts +2 -2
  147. package/dist/testing/index.mjs +11 -11
  148. package/dist/testing/outboxStoreContract.mjs +2 -2
  149. package/dist/testing/requiredPorts.mjs +2 -2
  150. package/dist/testing/storageContract.mjs +1 -1
  151. package/dist/{timing-DXx0IWyi.mjs → timing-CKI_Oyub.mjs} +1 -1
  152. package/dist/{transactionContext-DperjON1.mjs → transactionContext-D0UZFoSy.mjs} +1 -1
  153. package/dist/{typeGuards-eoQLIOh6.mjs → typeGuards-CLYkmBLT.mjs} +1 -1
  154. package/dist/types/index.mjs +1 -1
  155. package/dist/types/storage.mjs +1 -1
  156. package/dist/{types-CcpISJe8.mjs → types-Cunc4shv.mjs} +4 -4
  157. package/dist/usage/index.mjs +4 -4
  158. package/dist/{userHelpers-Cp5zqlEN.mjs → userHelpers-cT5j1kgp.mjs} +1 -1
  159. package/dist/utils/index.mjs +12 -12
  160. package/dist/{utils-dKN-_315.mjs → utils-DlNkm1dI.mjs} +6 -6
  161. package/dist/{validate-BZHaAdgy.mjs → validate-63QThRoS.mjs} +3 -3
  162. package/dist/{versioning-CPLP0VbB.mjs → versioning-f2YGmh4i.mjs} +3 -3
  163. package/dist/{workScope-BI72KXsI.mjs → workScope-DwspXz70.mjs} +2 -2
  164. package/package.json +1 -1
@@ -33,6 +33,31 @@ interface ParsedFieldEnvelope {
33
33
  export declare function parseFieldEnvelope(token: string): ParsedFieldEnvelope | null;
34
34
  /** Decrypt a parsed `arc.v1` envelope with the resolved key. Throws on tamper. */
35
35
  export declare function decryptField(envelope: ParsedFieldEnvelope, key: unknown): string;
36
+ /**
37
+ * A synchronous string sealer over the `arc.v1` field envelope and a STATIC key ring, for values sealed
38
+ * at rest (an account number, a token). The ring's first key seals; every listed key opens (rotation).
39
+ * A value that does not open THROWS; it never returns its input. Pinned by tests/encryption/field-sealer.test.ts.
40
+ */
41
+ /** Keys by `kid`, in ring order; `activeKid` (the first) seals; `label` names the source in errors. */
42
+ interface FieldKeyRing {
43
+ readonly activeKid: string;
44
+ readonly keys: ReadonlyMap<string, Buffer>;
45
+ readonly label: string;
46
+ }
47
+ interface FieldSealer {
48
+ readonly activeKid: string;
49
+ encrypt(plain: string): string;
50
+ /** Throws on a value that is not an envelope, names a kid the ring lacks, or fails the GCM tag. */
51
+ decrypt(token: string): string;
52
+ /** The kid a value is sealed under, or `null` when it is not an `arc.v1` envelope. */
53
+ kidOf(token: string): string | null;
54
+ }
55
+ /**
56
+ * Parse `kid:base64(32 bytes)` entries (e.g. an env list) into a ring. `label` names the source in every
57
+ * error. Empty, malformed, short or repeated entries throw.
58
+ */
59
+ export declare function parseFieldKeyRing(entries: readonly string[], label: string): FieldKeyRing;
60
+ export declare function createFieldSealer(ring: FieldKeyRing): FieldSealer;
36
61
  interface StaticKeyProviderOptions {
37
62
  /**
38
63
  * Active key used to ENCRYPT outbound responses. For `jwe` mode this is the
@@ -72,4 +97,4 @@ interface StaticKeyProviderOptions {
72
97
  * ```
73
98
  */
74
99
  export declare function createStaticKeyProvider(options: StaticKeyProviderOptions): KeyProvider;
75
- export { type ActiveKey, type EncryptionDirective, type EncryptionMode, type EncryptionOptions, type JweAlg, type JweEnc, type KeyContext, type KeyMaterial, type KeyProvider, type ParsedFieldEnvelope, type StaticKeyProviderOptions, _default as default, encryptionPlugin };
100
+ export { type ActiveKey, type EncryptionDirective, type EncryptionMode, type EncryptionOptions, type FieldKeyRing, type FieldSealer, type JweAlg, type JweEnc, type KeyContext, type KeyMaterial, type KeyProvider, type ParsedFieldEnvelope, type StaticKeyProviderOptions, _default as default, encryptionPlugin };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as ArcError } from "../errors-KBZ3tQk5.mjs";
3
- import { t as parseJsonBody } from "../jsonBody-rDPGT5A9.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "../errors-DxpHZBlW.mjs";
3
+ import { t as parseJsonBody } from "../jsonBody-CkKs6dA_.mjs";
4
4
  import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
5
5
  import fp from "fastify-plugin";
6
6
  // src/encryption/fieldCipher.ts
@@ -23,13 +23,13 @@ import fp from "fastify-plugin";
23
23
  */
24
24
  const ENVELOPE_PREFIX = "arc.v1";
25
25
  const IV_BYTES = 12;
26
- const KEY_BYTES = 32;
26
+ const KEY_BYTES$1 = 32;
27
27
  function b64url(buf) {
28
28
  return buf.toString("base64url");
29
29
  }
30
30
  function toKeyBuffer(key) {
31
31
  if (Buffer.isBuffer(key)) {
32
- if (key.length !== KEY_BYTES) throw new Error(`[arc/encryption] field-mode key must be ${KEY_BYTES} bytes (AES-256); got ${key.length}`);
32
+ if (key.length !== KEY_BYTES$1) throw new Error(`[arc/encryption] field-mode key must be ${KEY_BYTES$1} bytes (AES-256); got ${key.length}`);
33
33
  return key;
34
34
  }
35
35
  if (key instanceof Uint8Array) return toKeyBuffer(Buffer.from(key));
@@ -236,6 +236,56 @@ var encryptionPlugin_default = fp(encryptionPlugin, {
236
236
  name: "arc-encryption",
237
237
  fastify: "5.x"
238
238
  });
239
+ // src/encryption/fieldSealer.ts
240
+ /**
241
+ * A synchronous string sealer over the `arc.v1` field envelope and a STATIC key ring, for values sealed
242
+ * at rest (an account number, a token). The ring's first key seals; every listed key opens (rotation).
243
+ * A value that does not open THROWS; it never returns its input. Pinned by tests/encryption/field-sealer.test.ts.
244
+ */
245
+ const KID = /^[A-Za-z0-9_-]{1,32}$/;
246
+ const KEY_BYTES = 32;
247
+ /**
248
+ * Parse `kid:base64(32 bytes)` entries (e.g. an env list) into a ring. `label` names the source in every
249
+ * error. Empty, malformed, short or repeated entries throw.
250
+ */
251
+ function parseFieldKeyRing(entries, label) {
252
+ const trimmed = entries.map((e) => e.trim()).filter((e) => e !== "");
253
+ if (trimmed.length === 0) throw new Error(`${label} is not set: a field key ring needs at least one kid:base64 entry (32 random bytes)`);
254
+ const keys = /* @__PURE__ */ new Map();
255
+ let activeKid = "";
256
+ for (const entry of trimmed) {
257
+ const at = entry.indexOf(":");
258
+ const kid = at > 0 ? entry.slice(0, at) : "";
259
+ if (!KID.test(kid)) throw new Error(`${label}: each entry is kid:base64 with a kid of [A-Za-z0-9_-]{1,32}`);
260
+ const key = Buffer.from(entry.slice(at + 1), "base64");
261
+ if (key.length !== KEY_BYTES) throw new Error(`${label}: key ${kid} must be ${KEY_BYTES} bytes (AES-256), got ${key.length}`);
262
+ if (keys.has(kid)) throw new Error(`${label}: key id ${kid} is listed twice`);
263
+ keys.set(kid, key);
264
+ activeKid ||= kid;
265
+ }
266
+ return {
267
+ activeKid,
268
+ keys,
269
+ label
270
+ };
271
+ }
272
+ function createFieldSealer(ring) {
273
+ const { label } = ring;
274
+ const activeKey = ring.keys.get(ring.activeKid);
275
+ if (!activeKey) throw new Error(`createFieldSealer: active key ${ring.activeKid} is not in ${label}`);
276
+ return {
277
+ activeKid: ring.activeKid,
278
+ encrypt: (plain) => encryptField(plain, ring.activeKid, activeKey),
279
+ decrypt(token) {
280
+ const envelope = parseFieldEnvelope(token);
281
+ if (!envelope) throw new Error("not a sealed value (expected an arc.v1 field envelope)");
282
+ const key = ring.keys.get(envelope.kid);
283
+ if (!key) throw new Error(`the value is sealed with key ${envelope.kid}, which ${label} does not hold`);
284
+ return decryptField(envelope, key);
285
+ },
286
+ kidOf: (token) => parseFieldEnvelope(token)?.kid ?? null
287
+ };
288
+ }
239
289
  // src/encryption/keyProvider.ts
240
290
  /**
241
291
  * A static, in-memory key provider with `kid`-based rotation. Keys are held
@@ -268,4 +318,4 @@ function createStaticKeyProvider(options) {
268
318
  decryptionKey: (kid) => decryptionKeys[kid]
269
319
  };
270
320
  }
271
- export { createStaticKeyProvider, decryptField, encryptionPlugin_default as default, encryptField, encryptionPlugin, parseFieldEnvelope };
321
+ export { createFieldSealer, createStaticKeyProvider, decryptField, encryptionPlugin_default as default, encryptField, encryptionPlugin, parseFieldEnvelope, parseFieldKeyRing };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-HTi8KV7V.mjs";
3
- import { m as statusToArcCode, p as isArcError } from "./errors-KBZ3tQk5.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
3
+ import { m as statusToArcCode, p as isArcError } from "./errors-DxpHZBlW.mjs";
4
4
  import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
5
5
  import { isProductionEnv } from "@classytic/primitives/environment";
6
6
  import fp from "fastify-plugin";
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
2
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
3
3
  // src/utils/errors.ts
4
4
  /**
@@ -1,11 +1,11 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-HTi8KV7V.mjs";
3
- import { n as requestContext } from "./requestContext-C_mbAm8o.mjs";
4
- import { t as arcLog } from "./logger-IL7Btm-N.mjs";
5
- import { d as createDomainError } from "./errors-KBZ3tQk5.mjs";
6
- import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-Dfy8La90.mjs";
7
- import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-K7Q9WPjm.mjs";
8
- import { n as preserveSubscriberIdentity } from "./subscriberIdentity-Bf8VLqA7.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
3
+ import { n as requestContext } from "./requestContext-yc7MSgmq.mjs";
4
+ import { t as arcLog } from "./logger-DJwz_-Pl.mjs";
5
+ import { d as createDomainError } from "./errors-DxpHZBlW.mjs";
6
+ import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-Cf-27xsS.mjs";
7
+ import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-DeNze_-C.mjs";
8
+ import { n as preserveSubscriberIdentity } from "./subscriberIdentity-DSqCh38x.mjs";
9
9
  import { isProductionEnv } from "@classytic/primitives/environment";
10
10
  import fp from "fastify-plugin";
11
11
  import { NonDurablePublishError } from "@classytic/primitives/durable-events";
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { r as createEvent } from "./EventTransport-K7Q9WPjm.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { r as createEvent } from "./EventTransport-DeNze_-C.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { durableEventMeta } from "@classytic/primitives/durable-events";
5
5
  // src/events/defineEvent.ts
@@ -1,11 +1,11 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-DZRoUAdk.mjs";
3
- import { n as MemoryEventTransport } from "../EventTransport-K7Q9WPjm.mjs";
4
- import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-C4lNj2Dw.mjs";
5
- import { r as withSubscriberId } from "../subscriberIdentity-Bf8VLqA7.mjs";
6
- import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-BLal039H.mjs";
7
- import { t as createOutboxModule } from "../outbox-module-BWqkTE8-.mjs";
8
- import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-B61seKq1.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-D-pFtqT1.mjs";
3
+ import { n as MemoryEventTransport } from "../EventTransport-DeNze_-C.mjs";
4
+ import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-ZsIQPRso.mjs";
5
+ import { r as withSubscriberId } from "../subscriberIdentity-DSqCh38x.mjs";
6
+ import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-CEpgVAl7.mjs";
7
+ import { t as createOutboxModule } from "../outbox-module-vT6PaThj.mjs";
8
+ import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-CEaCmUfG.mjs";
9
9
  import { fingerprintRequest, runIdempotent } from "@classytic/repo-core/idempotency";
10
10
  import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
11
11
  // src/events/inbox.ts
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { n as evictToSize } from "../../boundedMap-DOBai-H3.mjs";
3
- import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-BI72KXsI.mjs";
4
- import { t as getSubscriberId } from "../../subscriberIdentity-Bf8VLqA7.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { n as evictToSize } from "../../boundedMap-zxGBpXX0.mjs";
3
+ import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-DwspXz70.mjs";
4
+ import { t as getSubscriberId } from "../../subscriberIdentity-DSqCh38x.mjs";
5
5
  import sjson from "secure-json-parse";
6
6
  import { createEventRouter } from "@classytic/primitives/events";
7
7
  // src/events/transports/redis-stream.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-BI72KXsI.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-DwspXz70.mjs";
3
3
  import sjson from "secure-json-parse";
4
4
  // src/events/transports/redis.ts
5
5
  /**
@@ -1,8 +1,8 @@
1
1
 
2
- import { a as ResolvedModuleDescriptor, o as ResolvedModuleLifecycle, s as ResolvedResourceDescriptor } from "../fastify-augmentation-baQc3MaO.mjs";
3
- import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as CreateAppHttpOptions, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as BootDisposer, u as CustomPluginAuthOption } from "../index-Dhrks-hM.mjs";
2
+ import { a as ResolvedModuleDescriptor, o as ResolvedModuleLifecycle, s as ResolvedResourceDescriptor } from "../fastify-augmentation-CPReFhZ1.mjs";
3
+ import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as CreateAppHttpOptions, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as BootDisposer, u as CustomPluginAuthOption } from "../index-yXXCsKl7.mjs";
4
4
  import { F as HealthCheck, _ as ResourceLike, a as ArcPortRegistry, c as LazyBridge, d as ModulePorts, f as ModuleRequirements, g as LoadResourcesOptions, h as ModuleSetupContext, i as ArcModuleRegistry, l as ModuleContribution, m as ModuleDisposer, n as ArcModule, o as ArcPorts, p as PortName, r as ArcModuleInput, s as EventHandlerDefinition, t as ArcCompositionConfig, u as ModuleName, v as ResourceModule, y as loadResources } from "../types-BeEJm-DV.mjs";
5
- import { $ as verifyModuleGraph, A as AsyncApiCatalogEntry, B as ModuleGraphMode, C as planModules, D as ModuleExtension, E as subscribeModuleEventHandlers, F as DurabilityFacts, G as activateBridges, H as ModuleGraphOptions, I as HandlerDurabilityFact, J as crudEventsOf, K as analyzeModuleGraph, L as ModuleGraph, M as toAsyncApi, N as CrudSurface, O as extendModule, P as DerivedPublishes, Q as verifyEventDurability, R as ModuleGraphAnalysis, S as compositionProblems, T as orderModules, U as ModuleKind, V as ModuleGraphNode, W as SkippedBridge, X as eventTopology, Y as dependentsOf, Z as renderModuleGraph, _ as ClosureNode, a as lazyModuleExports, b as PlanModulesOptions, c as getModuleResources, d as resolveContribution, f as resolveModule, g as withRelayNudge, h as createRelayNudge, i as hasModuleExports, j as AsyncApiInfo, k as collectModuleWorkflows, l as getModuleState, m as RelayOption, n as getModuleExports, o as lazyRequiredModuleExports, p as RelayNudge, q as buildModuleGraph, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as hasModule, v as CompositionProblem, w as resolveModuleClosure, x as assertComposable, y as ModulePlan, z as ModuleGraphIssue } from "../index-DexdFs1a.mjs";
5
+ import { $ as renderModuleGraph, A as extendModule, B as ModuleGraphAnalysis, C as assertComposable, D as orderModules, E as resolveModuleClosure, F as CrudSurface, G as ModuleKind, H as ModuleGraphMode, I as DerivedPublishes, J as analyzeModuleGraph, K as SkippedBridge, L as DurabilityFacts, M as AsyncApiCatalogEntry, N as AsyncApiInfo, O as subscribeModuleEventHandlers, P as toAsyncApi, Q as eventTopology, R as HandlerDurabilityFact, S as PlanModulesOptions, T as planModules, U as ModuleGraphNode, V as ModuleGraphIssue, W as ModuleGraphOptions, X as crudEventsOf, Y as buildModuleGraph, Z as dependentsOf, _ as createRelayNudge, a as hasModuleExports, b as CompositionProblem, c as moduleHandleRef, d as getModuleState, et as verifyEventDurability, f as hasModule, g as RelayOption, h as RelayNudge, i as getOptionalModuleExports, j as collectModuleWorkflows, k as ModuleExtension, l as ModuleState, m as resolveModule, n as defineModule, o as lazyModuleExports, p as resolveContribution, q as activateBridges, r as getModuleExports, s as lazyRequiredModuleExports, t as ModuleHandleRef, tt as verifyModuleGraph, u as getModuleResources, v as withRelayNudge, w as compositionProblems, x as ModulePlan, y as ClosureNode, z as ModuleGraph } from "../index-CSbDhif4.mjs";
6
6
  import { FastifyInstance, FastifyServerOptions } from "fastify";
7
7
  /**
8
8
  * Default pino redact paths (auth/cookie/API-key headers, nested
@@ -157,4 +157,4 @@ export declare const testingPreset: Partial<CreateAppOptions>;
157
157
  */
158
158
  export declare const edgePreset: Partial<CreateAppOptions>;
159
159
  export declare function getPreset(name: "production" | "development" | "testing" | "edge" | "worker"): Partial<CreateAppOptions>;
160
- export { type ArcCompositionConfig, type ArcModule, type ArcModuleInput, type ArcModuleRegistry, type ArcPortRegistry, type ArcPorts, type ArcWorker, type AsyncApiCatalogEntry, type AsyncApiInfo, type AuthOption, type BetterAuthOption, type BootDisposer, type ClosureNode, type CompositionProblem, type CreateAppHttpOptions, type CreateAppOptions, type CreateWorkerOptions, type CrudSurface, type CustomAuthenticatorOption, type CustomPluginAuthOption, type DerivedPublishes, type DurabilityFacts, type EagerGlobResult, type EventHandlerDefinition, type FetchHandlerOptions, type HandlerDurabilityFact, type JwtAuthOption, type LazyBridge, type LazyGlobResult, type LoadResourcesOptions, type ModuleContribution, type ModuleDisposer, type ModuleExtension, type ModuleGraph, type ModuleGraphAnalysis, type ModuleGraphIssue, type ModuleGraphMode, type ModuleGraphNode, type ModuleGraphOptions, type ModuleKind, type ModuleName, type ModulePlan, type ModulePorts, type ModuleRequirements, type ModuleSetupContext, type ModuleState, type MultipartOptions, type PlanModulesOptions, type PortName, type RawBodyOptions, type RelayNudge, type RelayOption, type ResolvedModuleDescriptor, type ResolvedModuleLifecycle, type ResolvedResourceDescriptor, type ResourceLike, type ResourceModule, type SkippedBridge, type UnderPressureOptions, type WorkerHealthOptions, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createRelayNudge, crudEventsOf, defineModule, dependentsOf, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, orderModules, planModules, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, toAsyncApi, verifyEventDurability, verifyModuleGraph, withRelayNudge };
160
+ export { type ArcCompositionConfig, type ArcModule, type ArcModuleInput, type ArcModuleRegistry, type ArcPortRegistry, type ArcPorts, type ArcWorker, type AsyncApiCatalogEntry, type AsyncApiInfo, type AuthOption, type BetterAuthOption, type BootDisposer, type ClosureNode, type CompositionProblem, type CreateAppHttpOptions, type CreateAppOptions, type CreateWorkerOptions, type CrudSurface, type CustomAuthenticatorOption, type CustomPluginAuthOption, type DerivedPublishes, type DurabilityFacts, type EagerGlobResult, type EventHandlerDefinition, type FetchHandlerOptions, type HandlerDurabilityFact, type JwtAuthOption, type LazyBridge, type LazyGlobResult, type LoadResourcesOptions, type ModuleContribution, type ModuleDisposer, type ModuleExtension, type ModuleGraph, type ModuleGraphAnalysis, type ModuleGraphIssue, type ModuleGraphMode, type ModuleGraphNode, type ModuleGraphOptions, type ModuleHandleRef, type ModuleKind, type ModuleName, type ModulePlan, type ModulePorts, type ModuleRequirements, type ModuleSetupContext, type ModuleState, type MultipartOptions, type PlanModulesOptions, type PortName, type RawBodyOptions, type RelayNudge, type RelayOption, type ResolvedModuleDescriptor, type ResolvedModuleLifecycle, type ResolvedResourceDescriptor, type ResourceLike, type ResourceModule, type SkippedBridge, type UnderPressureOptions, type WorkerHealthOptions, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createRelayNudge, crudEventsOf, defineModule, dependentsOf, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, moduleHandleRef, orderModules, planModules, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, toAsyncApi, verifyEventDurability, verifyModuleGraph, withRelayNudge };
@@ -1,9 +1,9 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-DpG26bCu.mjs";
3
- import { r as mergeHealthChecks, t as healthPlugin } from "../health-vEo3fni4.mjs";
4
- import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-KFxT1Iuk.mjs";
5
- import { t as loadResources } from "../loadResources-CcupAVJH.mjs";
6
- import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-BvLJGm3U.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-BC67ACu4.mjs";
3
+ import { r as mergeHealthChecks, t as healthPlugin } from "../health-W4S2yFBL.mjs";
4
+ import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, s as moduleHandleRef, t as defineModule } from "../module-C0JCsnO7.mjs";
5
+ import { t as loadResources } from "../loadResources-CFdzAWQZ.mjs";
6
+ import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-CbDTFbTj.mjs";
7
7
  // src/factory/module/asyncapi.ts
8
8
  /**
9
9
  * The module graph as an AsyncAPI 3.0 document — one channel per event (addressed by the event
@@ -418,4 +418,4 @@ function pickResource(value) {
418
418
  ];
419
419
  for (const c of candidates) if (c && typeof c === "object" && typeof c.toPlugin === "function") return c;
420
420
  }
421
- export { ArcFactory, DEFAULT_LOGGER_REDACT_PATHS, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createApp, createRelayNudge, createWorker, crudEventsOf, defineModule, dependentsOf, developmentPreset, edgePreset, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, getPreset, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, orderModules, planModules, preloadResources, preloadResourcesAsync, productionPreset, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, testingPreset, toAsyncApi, toFetchHandler, verifyEventDurability, verifyModuleGraph, withRelayNudge };
421
+ export { ArcFactory, DEFAULT_LOGGER_REDACT_PATHS, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createApp, createRelayNudge, createWorker, crudEventsOf, defineModule, dependentsOf, developmentPreset, edgePreset, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, getPreset, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, moduleHandleRef, orderModules, planModules, preloadResources, preloadResourcesAsync, productionPreset, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, testingPreset, toAsyncApi, toFetchHandler, verifyEventDurability, verifyModuleGraph, withRelayNudge };
@@ -2,7 +2,7 @@
2
2
  import { M as ResourceRegistry, pn as HookSystem } from "./index-DLCcLUQT.mjs";
3
3
  import { t as ExternalOpenApiPaths } from "./externalPaths-BOqdq5wr.mjs";
4
4
  import { F as HealthCheck, i as ArcModuleRegistry, n as ArcModule, x as ScheduleDefinition } from "./types-BeEJm-DV.mjs";
5
- import { L as ModuleGraph, s as ModuleState } from "./index-DexdFs1a.mjs";
5
+ import { l as ModuleState, z as ModuleGraph } from "./index-CSbDhif4.mjs";
6
6
  import { FastifyPluginAsync } from "fastify";
7
7
  /**
8
8
  * Resolved module introspection — what a module ACTUALLY composed to.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-HTi8KV7V.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
3
3
  // src/core/aggregation/fieldTypes.ts
4
4
  var fieldTypes_exports = /* @__PURE__ */ __exportAll({
5
5
  coerceByType: () => coerceByType,
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
2
  // src/permissions/fields.ts
3
3
  /**
4
4
  * Field-Level Permissions
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
2
  // src/permissions/filter-merge.ts
3
3
  /**
4
4
  * Policy-filter composition — logical AND, never last-writer-wins.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as pluralize } from "./pluralize-ClwfBdIx.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { t as pluralize } from "./pluralize-D4vcPLVs.mjs";
3
3
  import { join } from "node:path";
4
4
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  // src/cli/commands/generate/name-helpers.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { u as ValidationError } from "./errors-KBZ3tQk5.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { u as ValidationError } from "./errors-DxpHZBlW.mjs";
3
3
  // src/utils/headers.ts
4
4
  /**
5
5
  * Canonical header typing + accessor.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
2
  // src/events/outbox/health.ts
3
3
  /** Pending age past which the relay counts as stalled. */
4
4
  const DEFAULT_RELAY_LAG_UNHEALTHY_MS = 3e5;
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
2
  import { randomUUID } from "node:crypto";
3
3
  import fp from "fastify-plugin";
4
4
  // src/plugins/requestId.ts
@@ -1,2 +1,2 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-DBAu9uNT.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-DTffXM1X.mjs";
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { n as chunkTags, t as CachePurgeError } from "../purger.types-BEzTVDOU.mjs";
3
- import { t as hasEvents } from "../typeGuards-eoQLIOh6.mjs";
4
- import { r as exponentialBackoff, t as EventOutbox } from "../relay-B61seKq1.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { n as chunkTags, t as CachePurgeError } from "../purger.types-CNFmEtFu.mjs";
3
+ import { t as hasEvents } from "../typeGuards-CLYkmBLT.mjs";
4
+ import { r as exponentialBackoff, t as EventOutbox } from "../relay-CEaCmUfG.mjs";
5
5
  import fp from "fastify-plugin";
6
6
  import { createEvent } from "@classytic/primitives/events";
7
7
  // src/http-cache/invalidation/delivery.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as CachePurgeError } from "../../purger.types-BEzTVDOU.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { t as CachePurgeError } from "../../purger.types-CNFmEtFu.mjs";
3
3
  // src/http-cache/purgers/cloudflare.ts
4
4
  /**
5
5
  * Cloudflare purge-by-tag (`Cache-Tag`). Needs an API token scoped to Zone > Cache Purge only.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as CachePurgeError } from "../../purger.types-BEzTVDOU.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { t as CachePurgeError } from "../../purger.types-CNFmEtFu.mjs";
3
3
  // src/http-cache/purgers/fastly.ts
4
4
  /**
5
5
  * Fastly surrogate-key purge, with soft purge (`Fastly-Soft-Purge: 1`). Responses must carry the tags in
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
2
  // src/http-cache/testing/assertions.ts
3
3
  const header = (res, name) => {
4
4
  const v = res.headers[name];
@@ -1,10 +1,10 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { d as createDomainError } from "../errors-KBZ3tQk5.mjs";
3
- import { n as requireSingleHeaderValue } from "../headers-D5wrBLOk.mjs";
4
- import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-DXx0IWyi.mjs";
5
- import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-B0zhfGSm.mjs";
6
- import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-DfqfssAw.mjs";
7
- import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-C8OsWLYp.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { d as createDomainError } from "../errors-DxpHZBlW.mjs";
3
+ import { n as requireSingleHeaderValue } from "../headers-Bh47h0XH.mjs";
4
+ import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-CKI_Oyub.mjs";
5
+ import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-7JKEkKnN.mjs";
6
+ import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-B9HierHY.mjs";
7
+ import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-Dm8njSoC.mjs";
8
8
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
9
9
  import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
10
10
  import { createHash } from "node:crypto";
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as acquireBySteps } from "../acquire-B0zhfGSm.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { t as acquireBySteps } from "../acquire-7JKEkKnN.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  // src/idempotency/stores/redis.ts
5
5
  /**
@@ -485,4 +485,22 @@ declare function lazyModuleExports<TExports = unknown>(fastify: FastifyInstance,
485
485
  */
486
486
  declare function lazyRequiredModuleExports<K extends keyof ArcModuleRegistry>(fastify: FastifyInstance, name: K): () => ArcModuleRegistry[K];
487
487
  declare function lazyRequiredModuleExports<TExports = unknown>(fastify: FastifyInstance, name: string): () => TExports;
488
- export { verifyModuleGraph as $, AsyncApiCatalogEntry as A, ModuleGraphMode as B, planModules as C, ModuleExtension as D, subscribeModuleEventHandlers as E, DurabilityFacts as F, activateBridges as G, ModuleGraphOptions as H, HandlerDurabilityFact as I, crudEventsOf as J, analyzeModuleGraph as K, ModuleGraph as L, toAsyncApi as M, CrudSurface as N, extendModule as O, DerivedPublishes as P, verifyEventDurability as Q, ModuleGraphAnalysis as R, compositionProblems as S, orderModules as T, ModuleKind as U, ModuleGraphNode as V, SkippedBridge as W, eventTopology as X, dependentsOf as Y, renderModuleGraph as Z, ClosureNode as _, lazyModuleExports as a, PlanModulesOptions as b, getModuleResources as c, resolveContribution as d, resolveModule as f, withRelayNudge as g, createRelayNudge as h, hasModuleExports as i, AsyncApiInfo as j, collectModuleWorkflows as k, getModuleState as l, RelayOption as m, getModuleExports as n, lazyRequiredModuleExports as o, RelayNudge as p, buildModuleGraph as q, getOptionalModuleExports as r, ModuleState as s, defineModule as t, hasModule as u, CompositionProblem as v, resolveModuleClosure as w, assertComposable as x, ModulePlan as y, ModuleGraphIssue as z };
488
+ /** A sibling module's export for a seam built at COMPOSITION, before any app exists. See `moduleHandleRef`. */
489
+ interface ModuleHandleRef<T> {
490
+ /** Call from the consumer's `plugins` arm: records the booting app. */
491
+ readonly plugins: (fastify: FastifyInstance) => undefined;
492
+ /** The sibling's export; throws by name when read before the consumer's app booted. */
493
+ readonly get: () => T;
494
+ /** The sibling's export, or `undefined` when it is not composed (an OPTIONAL sibling, no edge). */
495
+ readonly find: () => T | undefined;
496
+ /** Whether the recording module's app booted; `false` when that module is not composed. */
497
+ readonly booted: () => boolean;
498
+ }
499
+ /**
500
+ * A handle for seams a module builds at composition but calls at request or event time: spread `plugins`
501
+ * into the consumer and call `get()` from the seam. Declare a required sibling in the consumer's `dependsOn`.
502
+ * Pinned by tests/factory/module-handle-ref.test.ts.
503
+ */
504
+ declare function moduleHandleRef<K extends keyof ArcModuleRegistry>(name: K): ModuleHandleRef<ArcModuleRegistry[K]>;
505
+ declare function moduleHandleRef<TExports = unknown>(name: string): ModuleHandleRef<TExports>;
506
+ export { renderModuleGraph as $, extendModule as A, ModuleGraphAnalysis as B, assertComposable as C, orderModules as D, resolveModuleClosure as E, CrudSurface as F, ModuleKind as G, ModuleGraphMode as H, DerivedPublishes as I, analyzeModuleGraph as J, SkippedBridge as K, DurabilityFacts as L, AsyncApiCatalogEntry as M, AsyncApiInfo as N, subscribeModuleEventHandlers as O, toAsyncApi as P, eventTopology as Q, HandlerDurabilityFact as R, PlanModulesOptions as S, planModules as T, ModuleGraphNode as U, ModuleGraphIssue as V, ModuleGraphOptions as W, crudEventsOf as X, buildModuleGraph as Y, dependentsOf as Z, createRelayNudge as _, hasModuleExports as a, CompositionProblem as b, moduleHandleRef as c, getModuleState as d, verifyEventDurability as et, hasModule as f, RelayOption as g, RelayNudge as h, getOptionalModuleExports as i, collectModuleWorkflows as j, ModuleExtension as k, ModuleState as l, resolveModule as m, defineModule as n, lazyModuleExports as o, resolveContribution as p, activateBridges as q, getModuleExports as r, lazyRequiredModuleExports as s, ModuleHandleRef as t, verifyModuleGraph as tt, getModuleResources as u, withRelayNudge as v, compositionProblems as w, ModulePlan as x, ClosureNode as y, ModuleGraph as z };
@@ -1,5 +1,5 @@
1
1
 
2
- import "./fastify-augmentation-baQc3MaO.mjs";
2
+ import "./fastify-augmentation-CPReFhZ1.mjs";
3
3
  import { A as RequestWithExtras, F as ResourceDefinition, I as CrudController, L as ResourceConfig, O as FastifyWithDecorators, Un as IControllerResponse, Wn as IRequestContext, X as RouteSchemaOptions, Z as ArcFieldRule, g as RequestContext, k as MiddlewareHandler, kt as RouteMcpConfig, ot as AggregationConfig, v as CrudRouterOptions, wt as ActionDefinition } from "./index-DLCcLUQT.mjs";
4
4
  import { l as PermissionCheck, t as AnyRecord } from "./base-HXNgPQww.mjs";
5
5
  import { i as RequestScope } from "./types-DnkIALZ8.mjs";
@@ -4,7 +4,7 @@ import { a as MetricsOptions, c as RealtimeOptions, f as CachingOptions, h as Gr
4
4
  import { t as EventPluginOptions } from "./eventPlugin-BY38F6yK.mjs";
5
5
  import { r as QueryCachePluginOptions } from "./queryCachePlugin-DrQNnGws.mjs";
6
6
  import { t as ErrorHandlerOptions } from "./errorHandler-B9r88jZV.mjs";
7
- import { H as ModuleGraphOptions } from "./index-DexdFs1a.mjs";
7
+ import { W as ModuleGraphOptions } from "./index-CSbDhif4.mjs";
8
8
  import { r as CacheStore } from "./interface-WR1U0K7t.mjs";
9
9
  import { a as EventTransport } from "./EventTransport-CYEoCJGe.mjs";
10
10
  import { i as IdempotencyStore } from "./interface-BmExzQRD.mjs";
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  import { c as DataPolicy, d as UserBase, l as PermissionCheck, n as ArcRequest, o as UserOrganization, r as JWTPayload, s as AuthorizationDecision, t as AnyRecord, u as PermissionContext } from "./base-HXNgPQww.mjs";
3
- import "./fastify-augmentation-baQc3MaO.mjs";
3
+ import "./fastify-augmentation-CPReFhZ1.mjs";
4
4
  import { a as applyFieldReadPermissions, n as FieldPermissionMap, o as applyFieldWritePermissions, s as fields, t as FieldPermission } from "./fields-JTkrtO-r.mjs";
5
- import { $ as MAX_SEARCH_LENGTH, A as ResourceSeams, B as DEFAULT_ID_FIELD, C as getControllerScope, G as DEFAULT_UPDATE_METHOD, H as DEFAULT_MAX_LIMIT, J as HOOK_PHASES, L as defineAggregation, M as mergeResourceConfig, O as defineResourceVariants, P as defineAction, Q as MAX_REGEX_LENGTH, R as CRUD_OPERATIONS, U as DEFAULT_SORT, V as DEFAULT_LIMIT, W as DEFAULT_TENANT_FIELD, X as HookPhase, Y as HookOperation, Z as MAX_FILTER_DEPTH, _ as nativePolicyFilter, et as MUTATION_OPERATIONS, g as NativePolicyFilter, j as SeamedResourceConfig, k as AdapterLike, nt as RESERVED_QUERY_PARAMS, q as HOOK_OPERATIONS, rt as SYSTEM_FIELDS, tt as MutationOperation, z as CrudOperation } from "./index-DKM2p5w5.mjs";
5
+ import { $ as MAX_SEARCH_LENGTH, A as ResourceSeams, B as DEFAULT_ID_FIELD, C as getControllerScope, G as DEFAULT_UPDATE_METHOD, H as DEFAULT_MAX_LIMIT, J as HOOK_PHASES, L as defineAggregation, M as mergeResourceConfig, O as defineResourceVariants, P as defineAction, Q as MAX_REGEX_LENGTH, R as CRUD_OPERATIONS, U as DEFAULT_SORT, V as DEFAULT_LIMIT, W as DEFAULT_TENANT_FIELD, X as HookPhase, Y as HookOperation, Z as MAX_FILTER_DEPTH, _ as nativePolicyFilter, et as MUTATION_OPERATIONS, g as NativePolicyFilter, j as SeamedResourceConfig, k as AdapterLike, nt as RESERVED_QUERY_PARAMS, q as HOOK_OPERATIONS, rt as SYSTEM_FIELDS, tt as MutationOperation, z as CrudOperation } from "./index-DCH08eqQ.mjs";
6
6
  import { A as RequestWithExtras, An as ControllerConstructionOptions, Bn as ControllerLike, Bt as SoftDeleteMixin, C as RequestIdOptions, Cn as ArcCreateResult, D as FastifyWithAuth, Dn as ArcUpdateResult, E as FastifyRequestExtras, En as ArcListResult, F as ResourceDefinition, Fn as MutationWriteContext, G as CrudRouteKey, Gn as RawRouteHandler, Gt as BulkExt, H as PresetFunction, Hn as IController, Ht as TreeMixin, I as CrudController, In as ResourceWrites, J as MiddlewareConfig, K as CrudSchemas, Kn as RouteHandler, Kt as BulkMixin, L as ResourceConfig, Ln as WriteContext, Nt as AuthPluginOptions, O as FastifyWithDecorators, On as BaseControllerOptions, P as defineResource, Q as FieldRule, Rn as WriteVerbKey, Rt as BaseController, S as IntrospectionPluginOptions, Tn as ArcGetResult, Un as IControllerResponse, Ut as SlugExt, Vt as TreeExt, W as PresetResult, Wn as IRequestContext, Wt as SlugMixin, X as RouteSchemaOptions, _ as ServiceContext, a as IntrospectionData, at as AggregationCacheConfig, b as HealthCheck, c as ResourceMetadata, ct as AggregationIndexHint, dt as AggregationRateLimit, f as OwnershipCheck, ft as AggregationsMap, g as RequestContext, h as QueryParserInterface, i as PaginationResult, it as AggMeasureShorthand, jn as ListResult, jt as RateLimitConfig, kn as ControllerConfigurableOptions, l as ArcInternalMetadata, lt as AggregationMaterializedContext, n as InferDocType, nt as EventDefinition, o as RegistryEntry, ot as AggregationConfig, qt as BaseCrudController, r as InferResourceDoc, rt as AggMeasureInput, s as RegistryStats, st as AggregationDateRangeRequirement, t as InferAdapterDoc, ut as AggregationMaterializedResult, v as CrudRouterOptions, wn as ArcDeleteResult, x as HealthOptions, y as GracefulShutdownOptions, zt as SoftDeleteExt } from "./index-DLCcLUQT.mjs";
7
7
  import { C as requireScopeContext, G as createDynamicPermissionMatrix, H as DynamicPermissionMatrix, J as PublicPolicy, K as createOrgPermissions, Q as anyOf, S as requireOrgRole, T as requireTeamMembership, U as DynamicPermissionMatrixConfig, Y as allOf, Z as allowPublic, _ as publicRead, at as requireRoles, b as requireOrgInScope, d as adminOnly, et as denyAll, f as authenticated, g as presets_d_exports, m as ownerWithAdminBypass, nt as requireAuth, p as fullPublic, q as AllowPublicOptions, rt as requireOwnership, st as when, v as publicReadAdminWrite, w as requireServiceScope, x as requireOrgMembership, y as readOnly } from "./index-CMNpMBtW.mjs";
8
8
  import { a as NotFoundError, d as ValidationError, f as createDomainError, i as ForbiddenError, t as ArcError, u as UnauthorizedError } from "./errors-DTo0me1o.mjs";
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-DYmu8uT4.mjs";
3
- import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-DPmRWlpx.mjs";
4
- import { t as defineAggregation } from "./defineAggregation-rI3EbZUg.mjs";
5
- import { a as ResourceDefinition, t as defineResource } from "./defineResource-5DcG_wlI.mjs";
6
- import { E as getControllerScope } from "./schemaIR-MZVVj6Cw.mjs";
7
- import { a as DEFAULT_SORT, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "./constants-DH41jnNT.mjs";
8
- import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-e5YMrFbm.mjs";
9
- import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-C5J8WTd2.mjs";
10
- import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-KBZ3tQk5.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-8Z1khbAI.mjs";
3
+ import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-M18RhMqi.mjs";
4
+ import { t as defineAggregation } from "./defineAggregation-DqAGb5oI.mjs";
5
+ import { a as ResourceDefinition, t as defineResource } from "./defineResource-DC5UqkQv.mjs";
6
+ import { E as getControllerScope } from "./schemaIR-By8XiNeE.mjs";
7
+ import { a as DEFAULT_SORT, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "./constants-Ca2IQFy2.mjs";
8
+ import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-Cga6KBOX.mjs";
9
+ import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-kCbIDTjA.mjs";
10
+ import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-DxpHZBlW.mjs";
11
11
  // src/index.ts
12
- const version = "2.51.0";
12
+ const version = "2.52.0";
13
13
  export { ArcError, BaseController, BaseCrudController, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, ForbiddenError, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, NotFoundError, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, UnauthorizedError, ValidationError, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, nativePolicyFilter, ownerWithAdminBypass, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
2
  import * as fs from "node:fs/promises";
3
3
  import * as path from "node:path";
4
4
  import { dirname, join } from "node:path";
@@ -1,11 +1,11 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
2
  import fp from "fastify-plugin";
3
3
  // src/integrations/event-gateway.ts
4
4
  const eventGatewayPluginImpl = async (fastify, opts = {}) => {
5
5
  const { auth = true, orgScoped, roomPolicy, maxMessageBytes, maxSubscriptionsPerClient, authenticate } = opts;
6
6
  if (auth && !authenticate && !fastify.hasDecorator("authenticate")) throw new Error("[arc-event-gateway] auth is true but fastify.authenticate is not registered. Register an auth plugin first, provide a custom authenticate function, or set auth: false.");
7
7
  if (opts.sse !== false) {
8
- const { default: ssePlugin } = await import("../sse-DivxX1m6.mjs").then((n) => n.n);
8
+ const { default: ssePlugin } = await import("../sse-C3bj5qWi.mjs").then((n) => n.n);
9
9
  await fastify.register(ssePlugin, {
10
10
  path: opts.sse?.path ?? "/events/stream",
11
11
  requireAuth: auth,
@@ -1,2 +1,2 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
2
  export {};
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { n as evaluateAndApplyPermission } from "../../authorizationDecision-Dxj_cy6N.mjs";
3
- import { i as runAdmittedWork, r as registerShutdownParticipant } from "../../shutdown-Dfy8La90.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { n as evaluateAndApplyPermission } from "../../authorizationDecision-DKmH4tZ-.mjs";
3
+ import { i as runAdmittedWork, r as registerShutdownParticipant } from "../../shutdown-Cf-27xsS.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  // src/integrations/jobs/execution.ts
6
6
  async function executeTimedHandler(options) {
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { _ as createMcpServer, a as isZodTypeSchema, c as defaultCrudDescription, d as mcpHandlerAdapter, f as permissionDeniedResult, g as buildRequestContext, h as toCallToolSuccess, i as resourceToTools, l as resolveCrudDescription, m as toCallToolResult, n as filterResourcesForMcp, o as toolInputShape, p as toCallToolError, r as mcpPlugin, s as fieldRulesToZod, u as invokeController, v as resolveToolCollisions } from "../../mcpPlugin-BsdH7Vot.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { _ as createMcpServer, a as isZodTypeSchema, c as defaultCrudDescription, d as mcpHandlerAdapter, f as permissionDeniedResult, g as buildRequestContext, h as toCallToolSuccess, i as resourceToTools, l as resolveCrudDescription, m as toCallToolResult, n as filterResourcesForMcp, o as toolInputShape, p as toCallToolError, r as mcpPlugin, s as fieldRulesToZod, u as invokeController, v as resolveToolCollisions } from "../../mcpPlugin-CA_MDFlS.mjs";
3
3
  // src/integrations/mcp/defineTool.ts
4
4
  /**
5
5
  * Define a type-safe MCP tool.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { _ as createMcpServer, i as resourceToTools, n as filterResourcesForMcp, t as MCP_PROTOCOL_VERSION } from "../../mcpPlugin-BsdH7Vot.mjs";
1
+ /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
+ import { _ as createMcpServer, i as resourceToTools, n as filterResourcesForMcp, t as MCP_PROTOCOL_VERSION } from "../../mcpPlugin-CA_MDFlS.mjs";
3
3
  // src/integrations/mcp/testing.ts
4
4
  /**
5
5
  * Connect a 2026-07-28 client to an already-built `McpServer`.