@classytic/arc 2.34.0 → 2.36.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 (182) hide show
  1. package/dist/{BaseController-CbkuhNI2.mjs → BaseController-CTJKm6Cb.mjs} +95 -14
  2. package/dist/{EventTransport-tq4CEB-q.mjs → EventTransport-D23Uvhg4.mjs} +1 -1
  3. package/dist/{HookSystem-DqXkMXkB.mjs → HookSystem-DgwxNZTx.mjs} +6 -4
  4. package/dist/{ResourceRegistry-DoALUlOO.mjs → ResourceRegistry-DNuYVbmv.mjs} +2 -2
  5. package/dist/{pipeline-q69DZzgG.mjs → actionPermissions-D97DniUQ.mjs} +30 -7
  6. package/dist/audit/index.d.mts +2 -2
  7. package/dist/audit/index.mjs +2 -2
  8. package/dist/auth/audit.mjs +1 -1
  9. package/dist/auth/index.d.mts +2 -2
  10. package/dist/auth/index.mjs +6 -6
  11. package/dist/auth/redis-session.mjs +1 -1
  12. package/dist/{authorizationDecision-CMMLWmuZ.mjs → authorizationDecision-EsiY3nUu.mjs} +2 -2
  13. package/dist/{base-Csjc2oF-.d.mts → base-C-NL2fTi.d.mts} +16 -1
  14. package/dist/{buildHandler-BrdYrG_1.mjs → buildHandler-Dohd2JuY.mjs} +4 -4
  15. package/dist/cache/index.mjs +4 -4
  16. package/dist/{caching-BcGmvnHh.mjs → caching-CP3GLJ7U.mjs} +2 -2
  17. package/dist/cleanup/index.d.mts +2 -2
  18. package/dist/cleanup/index.mjs +4 -4
  19. package/dist/cli/commands/describe.d.mts +1 -1
  20. package/dist/cli/commands/describe.mjs +3 -3
  21. package/dist/cli/commands/docs.mjs +3 -3
  22. package/dist/cli/commands/doctor.mjs +1 -1
  23. package/dist/cli/commands/generate.mjs +2 -2
  24. package/dist/cli/commands/init.mjs +2 -2
  25. package/dist/cli/commands/introspect.mjs +2 -2
  26. package/dist/cli/index.mjs +3 -3
  27. package/dist/{constants-BxCoxmiN.mjs → constants-DUoKAGYD.mjs} +1 -1
  28. package/dist/context/index.d.mts +16 -1
  29. package/dist/context/index.mjs +64 -4
  30. package/dist/core/index.d.mts +2 -2
  31. package/dist/core/index.mjs +7 -8
  32. package/dist/{core-BYKa8wHu.mjs → core-DTXsiNTJ.mjs} +3 -3
  33. package/dist/{createActionRouter-D6T0jWhS.mjs → createActionRouter-CZz6JO93.mjs} +27 -64
  34. package/dist/{createAggregationRouter-QLV2PrWP.mjs → createAggregationRouter-DKrGv_EC.mjs} +7 -7
  35. package/dist/defineAggregation-CpQfcM8R.mjs +25 -0
  36. package/dist/{defineResource-ZhuLonLm.mjs → defineResource-DWzjyxb2.mjs} +62 -66
  37. package/dist/discovery/index.mjs +1 -1
  38. package/dist/docs/index.d.mts +1 -1
  39. package/dist/docs/index.mjs +3 -3
  40. package/dist/{elevation-B0tlY8y1.mjs → elevation-D_cmo80j.mjs} +4 -4
  41. package/dist/encryption/index.mjs +3 -3
  42. package/dist/{errorHandler-C7xBqHsI.mjs → errorHandler-2RT0hLSI.mjs} +3 -3
  43. package/dist/{errors-Cd_yy7aW.mjs → errors-DDKni6Tz.mjs} +1 -1
  44. package/dist/{eventPlugin-DSNEZWfV.d.mts → eventPlugin-B47sfCJ8.d.mts} +1 -1
  45. package/dist/{eventPlugin-Dar8qRaj.mjs → eventPlugin-c3YwGzz9.mjs} +5 -5
  46. package/dist/events/index.d.mts +2 -2
  47. package/dist/events/index.mjs +5 -5
  48. package/dist/events/transports/redis-stream-entry.mjs +1 -1
  49. package/dist/events/transports/redis.mjs +1 -1
  50. package/dist/factory/index.d.mts +5 -5
  51. package/dist/factory/index.mjs +5 -6
  52. package/dist/{fastify-augmentation-DVsTAy6X.d.mts → fastify-augmentation-Bk_9PoiV.d.mts} +3 -3
  53. package/dist/{fields-CojeUkS4.mjs → fields-DdP225wt.mjs} +1 -1
  54. package/dist/{generate-DiB0nHPR.mjs → generate-B1bKdcV9.mjs} +2 -2
  55. package/dist/{headers-CveNO9gR.mjs → headers-DKslnhey.mjs} +2 -2
  56. package/dist/{health-CasG2A28.mjs → health-k6NODS8f.mjs} +1 -1
  57. package/dist/hooks/index.d.mts +1 -1
  58. package/dist/hooks/index.mjs +2 -2
  59. package/dist/idempotency/index.mjs +22 -56
  60. package/dist/idempotency/redis.mjs +1 -1
  61. package/dist/{index-B-DvUzsr.d.mts → index-BtYoMip1.d.mts} +21 -3
  62. package/dist/{index-BcR2bFZQ.d.mts → index-C01wWGJt.d.mts} +33 -105
  63. package/dist/{index-C5NnMEKF.d.mts → index-C50BUxKs.d.mts} +1 -1
  64. package/dist/{index-CFAJEWCX.d.mts → index-RdpLP71b.d.mts} +7 -30
  65. package/dist/{index-ugr1tQlW.d.mts → index-eyg5WEcy.d.mts} +1 -1
  66. package/dist/index.d.mts +5 -5
  67. package/dist/index.mjs +11 -12
  68. package/dist/{init-mdJ-v4Xp.mjs → init-LuGxIbQ_.mjs} +1 -1
  69. package/dist/integrations/event-gateway.mjs +2 -2
  70. package/dist/integrations/index.d.mts +2 -2
  71. package/dist/integrations/index.mjs +1 -1
  72. package/dist/integrations/jobs/index.d.mts +1 -1
  73. package/dist/integrations/jobs/index.mjs +2 -2
  74. package/dist/integrations/mcp/index.d.mts +4 -4
  75. package/dist/integrations/mcp/index.mjs +2 -2
  76. package/dist/integrations/mcp/testing.d.mts +1 -1
  77. package/dist/integrations/mcp/testing.mjs +3 -3
  78. package/dist/integrations/streamline.mjs +3 -3
  79. package/dist/integrations/webhooks.d.mts +4 -2
  80. package/dist/integrations/webhooks.mjs +28 -27
  81. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  82. package/dist/integrations/websocket-redis.mjs +1 -1
  83. package/dist/integrations/websocket.mjs +1 -1
  84. package/dist/{interface-DznJrm9R.mjs → interface-B7awDx3b.mjs} +1 -1
  85. package/dist/{jsonBody-CfGH-GxO.mjs → jsonBody-CiHih3ZU.mjs} +2 -2
  86. package/dist/{keys-WeKvY1dE.mjs → keys-BcNl12HN.mjs} +1 -1
  87. package/dist/{loadResources-Bj-aSsXi.mjs → loadResources-DGlfRQc9.mjs} +2 -2
  88. package/dist/{loadResourcesFromEntry-DwaxNcE2.mjs → loadResourcesFromEntry-VYPGSas8.mjs} +2 -2
  89. package/dist/logger/index.d.mts +23 -4
  90. package/dist/logger/index.mjs +50 -7
  91. package/dist/{mcpPlugin-DX3PHD7K.mjs → mcpPlugin-NxSlc-Ks.mjs} +15 -16
  92. package/dist/{memory-qYSB7rMQ.mjs → memory-BU-C-MV3.mjs} +2 -2
  93. package/dist/{metrics-D7uchLjN.mjs → metrics-7_1GbJpl.mjs} +2 -2
  94. package/dist/middleware/index.d.mts +1 -1
  95. package/dist/middleware/index.mjs +3 -3
  96. package/dist/migrations/index.mjs +7 -4
  97. package/dist/{module-CwKsgZXp.mjs → module-CQNHzE7g.mjs} +1 -1
  98. package/dist/{multipartBody-4w-S3-PU.mjs → multipartBody-Bi5yqW0M.mjs} +1 -1
  99. package/dist/{openapi-CkV5mQ53.mjs → openapi-RpNbPBL-.mjs} +6 -6
  100. package/dist/outbox-admin/index.d.mts +2 -2
  101. package/dist/outbox-admin/index.mjs +4 -4
  102. package/dist/{outbox-module-D1QfHqO4.mjs → outbox-module-ClcFrq98.mjs} +6 -4
  103. package/dist/{outbox-module-C1Bs_FXF.d.mts → outbox-module-b1TyDGGi.d.mts} +24 -1
  104. package/dist/permissions/index.d.mts +2 -2
  105. package/dist/permissions/index.mjs +5 -5
  106. package/dist/{permissions-CP47jdi7.mjs → permissions-DgPrZsJh.mjs} +36 -9
  107. package/dist/{pipe-BzzoEhHj.mjs → pipe-Cjy1UiXX.mjs} +2 -2
  108. package/dist/pipeline/index.d.mts +1 -1
  109. package/dist/pipeline/index.mjs +2 -2
  110. package/dist/plugins/index.d.mts +92 -7
  111. package/dist/plugins/index.mjs +168 -17
  112. package/dist/plugins/response-cache.mjs +2 -2
  113. package/dist/plugins/tracing-entry.mjs +2 -2
  114. package/dist/{pluralize-B7xf8qZF.mjs → pluralize-B7m0dPm8.mjs} +1 -1
  115. package/dist/{preloadResources-g07ldtzh.d.mts → preloadResources-BuutdWgr.d.mts} +54 -270
  116. package/dist/{createApp-zR-DEesr.mjs → preloadResources-CjnW4iIX.mjs} +170 -34
  117. package/dist/presets/filesUpload.d.mts +3 -3
  118. package/dist/presets/filesUpload.mjs +5 -5
  119. package/dist/presets/index.d.mts +2 -2
  120. package/dist/presets/index.mjs +2 -2
  121. package/dist/presets/multiTenant.d.mts +1 -1
  122. package/dist/presets/multiTenant.mjs +3 -3
  123. package/dist/presets/search.d.mts +9 -47
  124. package/dist/presets/search.mjs +2 -2
  125. package/dist/{presets-BAPijK_A.mjs → presets-CsGg8B58.mjs} +4 -4
  126. package/dist/{projection-BKM0Ui-s.mjs → projection-koISNyQo.mjs} +2 -2
  127. package/dist/{queryCachePlugin-DhsZ0ZIc.mjs → queryCachePlugin-DHueQT9O.mjs} +5 -5
  128. package/dist/{rateLimitKey-XngqVNEV.mjs → rateLimitKey-Bma8VXDO.mjs} +1 -1
  129. package/dist/{realtime-G1TC6Yzc.mjs → realtime-BBoC91Bz.mjs} +9 -9
  130. package/dist/{rateLimit-D4-ASwsI.mjs → registerRoute-BTgORTlR.mjs} +114 -3
  131. package/dist/registry/index.d.mts +2 -2
  132. package/dist/registry/index.mjs +3 -3
  133. package/dist/{registry-CLxCR5LF.mjs → registry-BzvRCYS6.mjs} +15 -56
  134. package/dist/{renewingLease-BnWtbA2U.mjs → renewingLease-CgIGh0Ab.mjs} +14 -2
  135. package/dist/{replyHelpers-BSBVCwL3.mjs → replyHelpers-BN16KPHr.mjs} +2 -2
  136. package/dist/{requestContext-uYE35JxI.mjs → requestContext-B93dmpf0.mjs} +1 -1
  137. package/dist/{rolldown-runtime-DNg-KNCk.mjs → rolldown-runtime-JJWfp8rp.mjs} +1 -1
  138. package/dist/{runtimeCapabilities-Dm88DaTW.mjs → runtimeCapabilities-jK99Ciw_.mjs} +1 -1
  139. package/dist/{schedules-CAcZgia0.mjs → schedules-CKKEL21P.mjs} +6 -4
  140. package/dist/{schemaConverter-XH1RZRyu.mjs → schemaConverter-gg0_aUPF.mjs} +19 -32
  141. package/dist/{schemaIR-CDvclAew.mjs → schemaIR-CngYvpCF.mjs} +2 -2
  142. package/dist/schemas/index.mjs +1 -1
  143. package/dist/scim/index.mjs +2 -2
  144. package/dist/scope/index.d.mts +1 -1
  145. package/dist/scope/index.mjs +5 -5
  146. package/dist/{scope-BaWcqBvr.mjs → scope-B1RsHdjF.mjs} +4 -4
  147. package/dist/simpleEqualityMatcher-_9NAMHUD.mjs +43 -0
  148. package/dist/{sse-Cf0jUHsh.mjs → sse-Bxt03Hk5.mjs} +5 -5
  149. package/dist/{sseStream-Bvpi-UXQ.mjs → sseStream-BMHTLlhR.mjs} +2 -2
  150. package/dist/{store-helpers-B88p99Z2.mjs → store-helpers-Brt8OxWZ.mjs} +1 -1
  151. package/dist/{streaming-DsT1B5zJ.mjs → streaming-CiTJW8kZ.mjs} +1 -1
  152. package/dist/{subscribe-helpers-CLIOHsOK.mjs → subscribe-helpers-B4fNHRNc.mjs} +21 -49
  153. package/dist/sync/changelog.mjs +1 -1
  154. package/dist/testing/cleanupStoreContract.mjs +1 -1
  155. package/dist/testing/index.d.mts +6 -6
  156. package/dist/testing/index.mjs +10 -11
  157. package/dist/testing/outboxStoreContract.mjs +1 -1
  158. package/dist/testing/storageContract.mjs +1 -1
  159. package/dist/{transactionContext-BYtWnwAS.mjs → transactionContext-D2HwJM2z.mjs} +1 -1
  160. package/dist/{typeGuards-jjKJDN13.mjs → typeGuards-IE1laMDf.mjs} +1 -1
  161. package/dist/types/index.d.mts +3 -3
  162. package/dist/types/index.mjs +1 -1
  163. package/dist/types/storage.mjs +1 -1
  164. package/dist/{types-CoqIRrkY.mjs → types-B8lwJv9Q.mjs} +10 -53
  165. package/dist/{types-BfC83KsP.d.mts → types-BXnTOsXP.d.mts} +1 -1
  166. package/dist/{types-BcTumAz_.d.mts → types-DDD5RKTu.d.mts} +30 -87
  167. package/dist/{types-ChuShpCP.d.mts → types-Ddl9OjmE.d.mts} +18 -121
  168. package/dist/usage/index.d.mts +2 -2
  169. package/dist/usage/index.mjs +0 -0
  170. package/dist/{userHelpers-CWF5pbZD.mjs → userHelpers-xQAi5bPF.mjs} +1 -1
  171. package/dist/utils/index.d.mts +16 -42
  172. package/dist/utils/index.mjs +11 -11
  173. package/dist/{utils-h1V_sT-t.mjs → utils-DgNFsJ2c.mjs} +3 -3
  174. package/dist/{validate-CdQlz52F.mjs → validate-DI3L5V9w.mjs} +2 -2
  175. package/dist/{versioning-rZbyLVD-.mjs → versioning-COpAyfpZ.mjs} +3 -3
  176. package/package.json +8 -8
  177. package/dist/actionPermissions-CUeCmpUd.mjs +0 -25
  178. package/dist/defineAggregation-Nv-DwfOf.mjs +0 -48
  179. package/dist/preloadResources-BkyqeTDz.mjs +0 -46
  180. package/dist/registerRoute-Ba8v0PCa.mjs +0 -113
  181. package/dist/repositoryFilter-BANpz6BX.mjs +0 -78
  182. package/dist/simpleEqualityMatcher-Se8VrsaP.mjs +0 -69
@@ -1,37 +1,24 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-Dm88DaTW.mjs";
3
- import { i as exponentialBackoff, t as createOutboxModule } from "../outbox-module-D1QfHqO4.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-jK99Ciw_.mjs";
3
+ import { i as exponentialBackoff, t as createOutboxModule } from "../outbox-module-ClcFrq98.mjs";
4
4
  import { createHmac, timingSafeEqual } from "node:crypto";
5
5
  import fp from "fastify-plugin";
6
6
  import { createChildEvent } from "@classytic/primitives/events";
7
7
  //#region src/integrations/webhooks.ts
8
8
  /**
9
- * @classytic/arc — Webhook Outbound Integration
9
+ * Outbound webhooks — auto-dispatch arc events to registered endpoints with
10
+ * HMAC-SHA256 signing, delivery logging, and a pluggable `WebhookStore`.
10
11
  *
11
- * Fastify plugin that auto-dispatches Arc events to registered webhook
12
- * endpoints with HMAC-SHA256 signing, delivery logging, and pluggable
13
- * persistence via WebhookStore.
14
- *
15
- * This is a SEPARATE subpath import — only loaded when explicitly used:
16
- * import { webhookPlugin } from '@classytic/arc/integrations/webhooks';
12
+ * A separate subpath, loaded only when used:
13
+ * `@classytic/arc/integrations/webhooks`. For at-least-once delivery use
14
+ * `durable: { store }` / `createDurableWebhookModule` — the in-process retry
15
+ * is explicitly best-effort.
17
16
  *
18
17
  * @example
19
18
  * ```typescript
20
- * import { webhookPlugin } from '@classytic/arc/integrations/webhooks';
21
- *
22
19
  * await fastify.register(webhookPlugin);
23
- *
24
- * // Register a customer webhook
25
- * app.webhooks.register({
26
- * id: 'wh-1',
27
- * url: 'https://customer.com/webhook',
28
- * events: ['order.created', 'order.shipped'],
29
- * secret: 'whsec_abc123',
30
- * });
31
- *
32
- * // Events auto-dispatch — no manual wiring needed
33
- * await app.events.publish('order.created', { orderId: '123' });
34
- * // → POST https://customer.com/webhook with HMAC signature
20
+ * app.webhooks.register({ id: 'wh-1', url, events: ['order.created'], secret });
21
+ * await app.events.publish('order.created', { orderId: '123' }); // → signed POST
35
22
  * ```
36
23
  */
37
24
  /**
@@ -442,6 +429,8 @@ function createWebhookDeliveryTransport(options) {
442
429
  timestamp,
443
430
  deliveryId: payload.event.meta.id
444
431
  });
432
+ const extraHeaders = options.resolveHeaders ? await options.resolveHeaders(sub, payload.event) : {};
433
+ assertWebhookHeaderOverrides(extraHeaders);
445
434
  const ac = new AbortController();
446
435
  const timer = setTimeout(() => ac.abort(), timeout);
447
436
  let response;
@@ -452,7 +441,8 @@ function createWebhookDeliveryTransport(options) {
452
441
  "content-type": "application/json",
453
442
  "x-arc-webhook-signature": v1Signature,
454
443
  "x-arc-webhook-timestamp": String(timestamp),
455
- "x-arc-webhook-delivery": payload.event.meta.id
444
+ "x-arc-webhook-delivery": payload.event.meta.id,
445
+ ...extraHeaders
456
446
  },
457
447
  body,
458
448
  signal: ac.signal,
@@ -515,7 +505,7 @@ function webhookDeliveryFailurePolicy(options = {}) {
515
505
  * boot-checked, not discovered on the first row.
516
506
  */
517
507
  function createDurableWebhookModule(options) {
518
- const { name, delivery, failurePolicy, fetch, timeout, validateUrl, ...outboxOptions } = options;
508
+ const { name, delivery, failurePolicy, fetch, timeout, validateUrl, resolveHeaders, ...outboxOptions } = options;
519
509
  return createOutboxModule({
520
510
  ...outboxOptions,
521
511
  name: name ?? "webhook-delivery",
@@ -533,11 +523,22 @@ function createDurableWebhookModule(options) {
533
523
  },
534
524
  ...fetch !== void 0 ? { fetch } : {},
535
525
  ...timeout !== void 0 ? { timeout } : {},
536
- ...validateUrl !== void 0 ? { validateUrl } : {}
526
+ ...validateUrl !== void 0 ? { validateUrl } : {},
527
+ ...resolveHeaders !== void 0 ? { resolveHeaders } : {}
537
528
  });
538
529
  },
539
530
  failurePolicy: failurePolicy ?? webhookDeliveryFailurePolicy(delivery)
540
531
  });
541
532
  }
533
+ const RESERVED_WEBHOOK_HEADERS = /* @__PURE__ */ new Set([
534
+ "content-type",
535
+ "x-arc-webhook-signature",
536
+ "x-arc-webhook-timestamp",
537
+ "x-arc-webhook-delivery"
538
+ ]);
539
+ function assertWebhookHeaderOverrides(headers) {
540
+ const reserved = Object.keys(headers).find((name) => RESERVED_WEBHOOK_HEADERS.has(name.toLowerCase()));
541
+ if (reserved) throw new WebhookDeliveryError(`webhook authentication header '${reserved}' is reserved`, { transient: false });
542
+ }
542
543
  //#endregion
543
544
  export { WEBHOOK_DELIVERY_EVENT, WebhookDeliveryError, createDurableWebhookModule, createWebhookDeliveryTransport, webhooks_default as default, defaultWebhookUrlPolicy, signWebhook, verifySignature, verifyWebhook, webhookDeliveryFailurePolicy, webhookPlugin };
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
2
  //#region src/integrations/websocket-pushref-redis.ts
3
3
  /**
4
4
  * Lua script for atomic claim. Runs server-side, single-roundtrip.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
2
  //#region src/integrations/websocket-redis.ts
3
3
  /**
4
4
  * Redis Pub/Sub adapter for cross-instance WebSocket broadcast.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
2
  import { randomUUID } from "node:crypto";
3
3
  import sjson from "secure-json-parse";
4
4
  import fp from "fastify-plugin";
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
2
  //#region src/idempotency/stores/interface.ts
3
3
  /**
4
4
  * Helper to create a result object
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as ArcError } from "./errors-Cd_yy7aW.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "./errors-DDKni6Tz.mjs";
3
3
  import sjson from "secure-json-parse";
4
4
  //#region src/utils/jsonBody.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
2
  //#region src/cache/keys.ts
3
3
  /**
4
4
  * Cache Key Utilities
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.mjs";
3
3
  import { arcLog } from "./logger/index.mjs";
4
4
  import { readdir } from "node:fs/promises";
5
5
  import { dirname, join, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as ResourceRegistry } from "./ResourceRegistry-DoALUlOO.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { t as ResourceRegistry } from "./ResourceRegistry-DNuYVbmv.mjs";
3
3
  import { resolve } from "node:path";
4
4
  import { pathToFileURL } from "node:url";
5
5
  //#region src/cli/utils/loadResourcesFromEntry.ts
@@ -54,10 +54,29 @@ interface ArcLogger {
54
54
  error: (...args: unknown[]) => void;
55
55
  }
56
56
  /**
57
- * Configure the Arc logger globally.
57
+ * Run `fn` with `options` as the active logger config.
58
58
  *
59
- * Called automatically by `createApp({ debug })`, but can also be
60
- * called manually for standalone usage outside of `createApp`.
59
+ * `options` is held BY REFERENCE deliberately: `createApp` enters the scope
60
+ * before Fastify exists, then fills in the pino writer once `fastify.log` is
61
+ * constructed. Copying here would freeze the pre-Fastify view and send every
62
+ * post-construction boot warning to the console instead of the app's logger.
63
+ */
64
+ declare function runWithArcLogger<T>(options: ArcLoggerOptions, fn: () => T): T;
65
+ /**
66
+ * Enter `options` for the remainder of the current async context.
67
+ *
68
+ * For Fastify's `onRequest` hook, where `run(store, done)` wraps the rest of
69
+ * the request lifecycle. Outside a hook, prefer {@link runWithArcLogger}.
70
+ */
71
+ declare function enterArcLoggerScope(options: ArcLoggerOptions, done: () => void): void;
72
+ /**
73
+ * Configure the PROCESS-GLOBAL Arc logger — the fallback used outside any app.
74
+ *
75
+ * `createApp` no longer routes its writer through here; each app carries its
76
+ * own scoped options (see {@link runWithArcLogger}) so two apps in one process
77
+ * cannot overwrite each other's. This remains the way to configure arcLog for
78
+ * standalone use — `defineResource()` at module import, CLI commands, and any
79
+ * code running before or outside a `createApp` boot.
61
80
  */
62
81
  declare function configureArcLogger(options: ArcLoggerOptions): void;
63
82
  /**
@@ -104,4 +123,4 @@ interface PinoLike {
104
123
  */
105
124
  declare function createPinoWriter(logger: PinoLike): ArcLogWriter;
106
125
  //#endregion
107
- export { ArcLogWriter, ArcLogger, ArcLoggerOptions, PinoLike, arcLog, configureArcLogger, createPinoWriter };
126
+ export { ArcLogWriter, ArcLogger, ArcLoggerOptions, PinoLike, arcLog, configureArcLogger, createPinoWriter, enterArcLoggerScope, runWithArcLogger };
@@ -1,11 +1,54 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { AsyncLocalStorage } from "node:async_hooks";
2
3
  //#region src/logger/index.ts
4
+ /**
5
+ * Per-app logger options, resolved from the async context.
6
+ *
7
+ * The process-global below is a FALLBACK, not the source of truth. It used to
8
+ * be both, and `configureArcLogger` overwrote it on every boot — so the
9
+ * last-created app owned the writer for every app in the process. One app's
10
+ * framework warnings then surfaced through another app's transports, level,
11
+ * and redaction config. Fine for one-app-per-process; wrong for multi-app test
12
+ * files and for serverless containers that reuse a warm process across apps.
13
+ *
14
+ * Follows the same shape as `requestContext`: the scope is entered once and
15
+ * wraps everything downstream, so the 23 `arcLog()` call sites keep their
16
+ * zero-argument signature and resolve correctly without threading a logger.
17
+ */
18
+ const scope = new AsyncLocalStorage();
3
19
  let globalOptions = {};
20
+ /** Active options: the app's if we're inside one, else the process fallback. */
21
+ function resolveOptions() {
22
+ return scope.getStore() ?? globalOptions;
23
+ }
24
+ /**
25
+ * Run `fn` with `options` as the active logger config.
26
+ *
27
+ * `options` is held BY REFERENCE deliberately: `createApp` enters the scope
28
+ * before Fastify exists, then fills in the pino writer once `fastify.log` is
29
+ * constructed. Copying here would freeze the pre-Fastify view and send every
30
+ * post-construction boot warning to the console instead of the app's logger.
31
+ */
32
+ function runWithArcLogger(options, fn) {
33
+ return scope.run(options, fn);
34
+ }
35
+ /**
36
+ * Enter `options` for the remainder of the current async context.
37
+ *
38
+ * For Fastify's `onRequest` hook, where `run(store, done)` wraps the rest of
39
+ * the request lifecycle. Outside a hook, prefer {@link runWithArcLogger}.
40
+ */
41
+ function enterArcLoggerScope(options, done) {
42
+ scope.run(options, done);
43
+ }
4
44
  /**
5
- * Configure the Arc logger globally.
45
+ * Configure the PROCESS-GLOBAL Arc logger — the fallback used outside any app.
6
46
  *
7
- * Called automatically by `createApp({ debug })`, but can also be
8
- * called manually for standalone usage outside of `createApp`.
47
+ * `createApp` no longer routes its writer through here; each app carries its
48
+ * own scoped options (see {@link runWithArcLogger}) so two apps in one process
49
+ * cannot overwrite each other's. This remains the way to configure arcLog for
50
+ * standalone use — `defineResource()` at module import, CLI commands, and any
51
+ * code running before or outside a `createApp` boot.
9
52
  */
10
53
  function configureArcLogger(options) {
11
54
  globalOptions = { ...options };
@@ -84,10 +127,10 @@ function createPinoWriter(logger) {
84
127
  };
85
128
  }
86
129
  function getWriter() {
87
- return globalOptions.writer ?? console;
130
+ return resolveOptions().writer ?? console;
88
131
  }
89
132
  function isDebugEnabled(module) {
90
- const configDebug = globalOptions.debug;
133
+ const configDebug = resolveOptions().debug;
91
134
  if (configDebug !== void 0 && configDebug !== false) return matchesModule(configDebug, module);
92
135
  const envDebug = typeof process !== "undefined" ? process.env?.ARC_DEBUG : void 0;
93
136
  if (envDebug) return matchesModule(envDebug, module);
@@ -107,4 +150,4 @@ function isSuppressed() {
107
150
  return env === "1" || env === "true";
108
151
  }
109
152
  //#endregion
110
- export { arcLog, configureArcLogger, createPinoWriter };
153
+ export { arcLog, configureArcLogger, createPinoWriter, enterArcLoggerScope, runWithArcLogger };
@@ -1,19 +1,18 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { r as evaluatePermissionDecision } from "./authorizationDecision-CMMLWmuZ.mjs";
3
- import { p as isArcError, t as ArcError } from "./errors-Cd_yy7aW.mjs";
4
- import { n as requireSingleHeaderValue } from "./headers-CveNO9gR.mjs";
5
- import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-CoqIRrkY.mjs";
6
- import { t as BaseController } from "./BaseController-CbkuhNI2.mjs";
7
- import { i as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-CojeUkS4.mjs";
8
- import { t as executePipeline } from "./pipe-BzzoEhHj.mjs";
9
- import { t as buildRequestScopeProjection } from "./projection-BKM0Ui-s.mjs";
10
- import { r as resolvePipelineSteps } from "./pipeline-q69DZzgG.mjs";
11
- import { n as validateAggregations } from "./validate-CdQlz52F.mjs";
12
- import { n as executeAggregation } from "./buildHandler-BrdYrG_1.mjs";
13
- import { t as pluralize } from "./pluralize-B7xf8qZF.mjs";
14
- import { t as resolveActionPermission } from "./actionPermissions-CUeCmpUd.mjs";
15
- import { t as createIdempotencyResult } from "./interface-DznJrm9R.mjs";
16
- import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-CDvclAew.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { r as evaluatePermissionDecision } from "./authorizationDecision-EsiY3nUu.mjs";
3
+ import { p as isArcError, t as ArcError } from "./errors-DDKni6Tz.mjs";
4
+ import { n as requireSingleHeaderValue } from "./headers-DKslnhey.mjs";
5
+ import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-B8lwJv9Q.mjs";
6
+ import { t as BaseController } from "./BaseController-CTJKm6Cb.mjs";
7
+ import { i as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-DdP225wt.mjs";
8
+ import { t as executePipeline } from "./pipe-Cjy1UiXX.mjs";
9
+ import { t as buildRequestScopeProjection } from "./projection-koISNyQo.mjs";
10
+ import { i as resolvePipelineSteps, t as resolveActionPermission } from "./actionPermissions-D97DniUQ.mjs";
11
+ import { n as validateAggregations } from "./validate-DI3L5V9w.mjs";
12
+ import { n as executeAggregation } from "./buildHandler-Dohd2JuY.mjs";
13
+ import { t as pluralize } from "./pluralize-B7m0dPm8.mjs";
14
+ import { t as createIdempotencyResult } from "./interface-B7awDx3b.mjs";
15
+ import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-CngYvpCF.mjs";
17
16
  import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
18
17
  import { createHash, randomUUID } from "node:crypto";
19
18
  import fp from "fastify-plugin";
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.mjs";
3
3
  //#region src/cache/memory.ts
4
4
  var memory_exports = /* @__PURE__ */ __exportAll({ MemoryCacheStore: () => MemoryCacheStore });
5
5
  /**
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/plugins/metrics.ts
5
5
  var metrics_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
1
 
2
- import { I as MiddlewareHandler, L as RequestWithExtras, Q as MiddlewareConfig } from "../index-BcR2bFZQ.mjs";
2
+ import { I as MiddlewareHandler, L as RequestWithExtras, Q as MiddlewareConfig } from "../index-C01wWGJt.mjs";
3
3
  import { RouteHandlerMethod } from "fastify";
4
4
  //#region src/middleware/middleware.d.ts
5
5
  interface NamedMiddleware {
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as CRUD_OPERATIONS } from "../constants-BxCoxmiN.mjs";
3
- import { t as multipartBody } from "../multipartBody-4w-S3-PU.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { t as CRUD_OPERATIONS } from "../constants-DUoKAGYD.mjs";
3
+ import { t as multipartBody } from "../multipartBody-Bi5yqW0M.mjs";
4
4
  //#region src/middleware/middleware.ts
5
5
  /**
6
6
  * Named Middleware — Priority-based, conditional middleware execution.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as startRenewingLease } from "../renewingLease-BnWtbA2U.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { t as startRenewingLease } from "../renewingLease-CgIGh0Ab.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  //#region src/migrations/index.ts
5
5
  /**
@@ -160,12 +160,14 @@ var MigrationRunner = class {
160
160
  async withLock(fn) {
161
161
  const lock = this.lock;
162
162
  if (!lock) return fn(() => false);
163
- if (!await lock.tryAcquire(MIGRATION_LOCK_NAME, this.holderId, this.lockLeaseMs)) throw new Error(`MigrationRunner: another runner holds the migration lock — refusing to run concurrently. If a previous runner crashed, the lease expires on its own (leaseMs: ${this.lockLeaseMs}).`);
163
+ const fenced = await lock.tryAcquireFenced?.(MIGRATION_LOCK_NAME, this.holderId, this.lockLeaseMs);
164
+ if (!(fenced !== void 0 ? fenced !== null : await lock.tryAcquire(MIGRATION_LOCK_NAME, this.holderId, this.lockLeaseMs))) throw new Error(`MigrationRunner: another runner holds the migration lock — refusing to run concurrently. If a previous runner crashed, the lease expires on its own (leaseMs: ${this.lockLeaseMs}).`);
164
165
  const lease = startRenewingLease({
165
166
  lock,
166
167
  name: MIGRATION_LOCK_NAME,
167
168
  holderId: this.holderId,
168
169
  leaseMs: this.lockLeaseMs,
170
+ ...fenced ? { token: fenced.token } : {},
169
171
  onLost: () => this.log.error("MigrationRunner: lease renewal lost — another holder took the migration lock; no further migrations will start and this run will fail."),
170
172
  onError: (error) => this.log.error(`MigrationRunner: lease renewal errored (lease may lapse mid-run): ${error.message}`)
171
173
  });
@@ -230,7 +232,7 @@ var MigrationRunner = class {
230
232
  * Rollback last migration
231
233
  */
232
234
  async down(migrations) {
233
- await this.withLock(async () => {
235
+ await this.withLock(async (leaseLost) => {
234
236
  const applied = await this.store.getApplied();
235
237
  const last = applied[applied.length - 1];
236
238
  if (!last) {
@@ -239,6 +241,7 @@ var MigrationRunner = class {
239
241
  }
240
242
  const migration = migrations.find((m) => m.resource === last.resource && m.version === last.version);
241
243
  if (!migration) throw new Error(`Migration ${last.resource}:${last.version} not found in migration files`);
244
+ if (leaseLost()) throw new Error("MigrationRunner: refusing to roll back — lock ownership lost between acquiring the lease and starting the rollback.");
242
245
  this.log.info(`Rolling back ${migration.resource} v${migration.version}...`);
243
246
  await this.runMigration(migration, "down", true);
244
247
  this.log.info("Rollback completed");
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
2
  //#region src/factory/module/index.ts
3
3
  /**
4
4
  * Identity helper for authoring a typed module — mirrors `defineResource`.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
2
  import sjson from "secure-json-parse";
3
3
  //#region src/middleware/multipartBody.ts
4
4
  const DEFAULT_MAX_FILE_SIZE = 10485760;
@@ -1,9 +1,9 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { n as getUserRoles } from "./userHelpers-CWF5pbZD.mjs";
3
- import { n as convertRouteSchema } from "./schemaConverter-XH1RZRyu.mjs";
4
- import { t as pluralize } from "./pluralize-B7xf8qZF.mjs";
5
- import { t as resolveActionPermission } from "./actionPermissions-CUeCmpUd.mjs";
6
- import { t as buildActionBodySchema } from "./createActionRouter-D6T0jWhS.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { n as getUserRoles } from "./userHelpers-xQAi5bPF.mjs";
3
+ import { n as convertRouteSchema } from "./schemaConverter-gg0_aUPF.mjs";
4
+ import { t as resolveActionPermission } from "./actionPermissions-D97DniUQ.mjs";
5
+ import { t as pluralize } from "./pluralize-B7m0dPm8.mjs";
6
+ import { t as buildActionBodySchema } from "./createActionRouter-CZz6JO93.mjs";
7
7
  import fp from "fastify-plugin";
8
8
  //#region src/docs/openapi/canonical-schemas.ts
9
9
  /**
@@ -1,6 +1,6 @@
1
1
 
2
- import { l as PermissionCheck } from "../base-Csjc2oF-.mjs";
3
- import { t as ArcModule } from "../types-BcTumAz_.mjs";
2
+ import { l as PermissionCheck } from "../base-C-NL2fTi.mjs";
3
+ import { t as ArcModule } from "../types-DDD5RKTu.mjs";
4
4
  import { OutboxStore } from "@classytic/primitives/outbox";
5
5
  //#region src/outbox-admin/module.d.ts
6
6
  /**
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { i as NotFoundError, u as ValidationError } from "../errors-Cd_yy7aW.mjs";
3
- import { t as defineResource } from "../defineResource-ZhuLonLm.mjs";
4
- import { n as getModuleExports, t as defineModule } from "../module-CwKsgZXp.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { i as NotFoundError, u as ValidationError } from "../errors-DDKni6Tz.mjs";
3
+ import { t as defineResource } from "../defineResource-DWzjyxb2.mjs";
4
+ import { n as getModuleExports, t as defineModule } from "../module-CQNHzE7g.mjs";
5
5
  //#region src/outbox-admin/module.ts
6
6
  /**
7
7
  * Strip the domain payload and the stack unless explicitly opted in.
@@ -1,6 +1,7 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { i as resolveEventTransport } from "./EventTransport-tq4CEB-q.mjs";
3
- import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-B88p99Z2.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { t as transactionContext } from "./transactionContext-D2HwJM2z.mjs";
3
+ import { i as resolveEventTransport } from "./EventTransport-D23Uvhg4.mjs";
4
+ import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-Brt8OxWZ.mjs";
4
5
  import { and, anyOf, eq, lte, ne, or } from "@classytic/repo-core/filter";
5
6
  import { randomBytes } from "node:crypto";
6
7
  import { InvalidOutboxEventError, OutboxOwnershipError } from "@classytic/primitives/outbox";
@@ -822,7 +823,8 @@ function createOutboxModule(options) {
822
823
  ...info.event?.type !== void 0 ? { eventType: info.event.type } : {}
823
824
  }, `outbox relay "${name}" failed`);
824
825
  }),
825
- ...options.failurePolicy !== void 0 ? { failurePolicy: options.failurePolicy } : {}
826
+ ...options.failurePolicy !== void 0 ? { failurePolicy: options.failurePolicy } : {},
827
+ ...options.sessionProvider === false ? {} : { sessionProvider: options.sessionProvider ?? (() => transactionContext.get()) }
826
828
  })
827
829
  };
828
830
  return exports;
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { a as EventTransport, n as DomainEvent, t as DeadLetteredEvent } from "./EventTransport-BEVP50ka.mjs";
3
- import { t as ArcModule } from "./types-BcTumAz_.mjs";
3
+ import { t as ArcModule } from "./types-DDD5RKTu.mjs";
4
4
  import { FastifyInstance } from "fastify";
5
5
  import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
6
6
  import { OutboxFailurePolicy, OutboxStore, OutboxWriteOptions } from "@classytic/primitives/outbox";
@@ -336,6 +336,29 @@ interface OutboxModuleOptions {
336
336
  * shape is exponential backoff up to N attempts, then dead-letter.
337
337
  */
338
338
  failurePolicy?: OutboxFailurePolicy;
339
+ /**
340
+ * Unit-of-Work session provider. Defaults to `() => transactionContext.get()`.
341
+ *
342
+ * This is what makes the durable path the DEFAULT path rather than a
343
+ * discipline. `EventOutbox.store()` already auto-injects a session from this
344
+ * provider (explicit `options.session` still wins), and a `transactional:
345
+ * true` write now publishes its session on `transactionContext` — so with
346
+ * the default in place, `outbox.store(event)` inside a transactional write
347
+ * commits the event row atomically with the domain write. No threading the
348
+ * handle from the controller through every service layer to the call site.
349
+ *
350
+ * The default matters more than the capability: `auditPlugin` has defaulted
351
+ * its `sessionProvider` the same way since it shipped, while this module
352
+ * required every host to remember. A host that forgets does not get an
353
+ * error — it gets an event row written outside the transaction, which
354
+ * survives a rollback and reports something that never happened. That is
355
+ * precisely the guarantee an outbox exists to provide.
356
+ *
357
+ * Pass `false` (or `() => undefined`) to opt out — for a store whose
358
+ * writes must NOT join the caller's transaction (a separate connection,
359
+ * an external queue).
360
+ */
361
+ sessionProvider?: (() => unknown) | false;
339
362
  /**
340
363
  * Run one relay pass at boot. Default `true` — a process that restarts with a backlog should
341
364
  * drain it immediately rather than waiting a full interval, because that backlog is precisely
@@ -1,5 +1,5 @@
1
1
 
2
- import { c as DataPolicy, d as UserBase, l as PermissionCheck, m as normalizeRoles, p as getUserRoles, s as AuthorizationDecision, u as PermissionContext } from "../base-Csjc2oF-.mjs";
2
+ import { c as DataPolicy, d as UserBase, l as PermissionCheck, m as normalizeRoles, p as getUserRoles, s as AuthorizationDecision, u as PermissionContext } from "../base-C-NL2fTi.mjs";
3
3
  import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, n as FieldPermissionMap, o as fields, r as FieldPermissionType, s as resolveEffectiveRoles, t as FieldPermission } from "../fields-I_EeRWND.mjs";
4
- import { $ as requireAuth, A as RequireGrantOptions, B as ConnectEventsOptions, C as requireServiceScope, D as GRANT_MODES, E as createRoleHierarchy, F as PermissionRequirement, G as createOrgPermissions, H as DynamicPermissionMatrixConfig, I as collectPublicSurface, J as allowPublic, K as allOf, L as describePermission, M as requireGrant, N as conjoinPolicyFilters, O as GrantMode, P as AccessExplanation, Q as not, R as describePermissionMap, S as requireScopeContext, T as RoleHierarchy, U as PermissionEventBus, V as DynamicPermissionMatrix, W as createDynamicPermissionMatrix, X as deny, Y as anyOf, Z as denyAll, _ as publicReadAdminWrite, a as PermissionMatrixRegistry, at as scopeOf, b as requireOrgMembership, c as introspectModule, ct as evaluatePermissionDecision, d as authenticated, dt as RequireMandateOptions, et as requireOwnership, f as fullPublic, ft as requireAgentScope, g as publicRead, h as presets_d_exports, i as PermissionMatrixOptions, it as when, j as modeSatisfies, k as GrantResolution, l as introspectRegistry, lt as normalizeToDecision, m as permissionMatrix, mt as requireMandate, n as PermissionEntryType, nt as requireRoles, o as buildPermissionMatrix, ot as PermissionCheckReturn, p as ownerWithAdminBypass, pt as requireDPoP, q as allow, r as PermissionMatrix, rt as roles, s as introspectCheck, st as applyAuthorizationDecision, t as PermissionEntry, tt as requirePlatformRole, u as adminOnly, ut as RequireAgentScopeOptions, v as readOnly, w as requireTeamMembership, x as requireOrgRole, y as requireOrgInScope, z as explainAccess } from "../index-B-DvUzsr.mjs";
4
+ import { $ as requireAuth, A as RequireGrantOptions, B as ConnectEventsOptions, C as requireServiceScope, D as GRANT_MODES, E as createRoleHierarchy, F as PermissionRequirement, G as createOrgPermissions, H as DynamicPermissionMatrixConfig, I as collectPublicSurface, J as allowPublic, K as allOf, L as describePermission, M as requireGrant, N as conjoinPolicyFilters, O as GrantMode, P as AccessExplanation, Q as not, R as describePermissionMap, S as requireScopeContext, T as RoleHierarchy, U as PermissionEventBus, V as DynamicPermissionMatrix, W as createDynamicPermissionMatrix, X as deny, Y as anyOf, Z as denyAll, _ as publicReadAdminWrite, a as PermissionMatrixRegistry, at as scopeOf, b as requireOrgMembership, c as introspectModule, ct as evaluatePermissionDecision, d as authenticated, dt as RequireMandateOptions, et as requireOwnership, f as fullPublic, ft as requireAgentScope, g as publicRead, h as presets_d_exports, i as PermissionMatrixOptions, it as when, j as modeSatisfies, k as GrantResolution, l as introspectRegistry, lt as normalizeToDecision, m as permissionMatrix, mt as requireMandate, n as PermissionEntryType, nt as requireRoles, o as buildPermissionMatrix, ot as PermissionCheckReturn, p as ownerWithAdminBypass, pt as requireDPoP, q as allow, r as PermissionMatrix, rt as roles, s as introspectCheck, st as applyAuthorizationDecision, t as PermissionEntry, tt as requirePlatformRole, u as adminOnly, ut as RequireAgentScopeOptions, v as readOnly, w as requireTeamMembership, x as requireOrgRole, y as requireOrgInScope, z as explainAccess } from "../index-BtYoMip1.mjs";
5
5
  export { type AccessExplanation, type AuthorizationDecision, type ConnectEventsOptions, type DataPolicy, type DynamicPermissionMatrix, type DynamicPermissionMatrixConfig, type FieldPermission, type FieldPermissionMap, type FieldPermissionType, GRANT_MODES, type GrantMode, type GrantResolution, type PermissionCheck, type PermissionCheckReturn, type PermissionContext, type PermissionEntry, type PermissionEntryType, type PermissionEventBus, type PermissionMatrix, type PermissionMatrixOptions, type PermissionMatrixRegistry, type PermissionRequirement, type RequireAgentScopeOptions, type RequireGrantOptions, type RequireMandateOptions, type RoleHierarchy, type UserBase, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createOrgPermissions, createRoleHierarchy, deny, denyAll, describePermission, describePermissionMap, evaluatePermissionDecision, explainAccess, fields, fullPublic, getUserRoles, introspectCheck, introspectModule, introspectRegistry, modeSatisfies, normalizeRoles, normalizeToDecision, not, ownerWithAdminBypass, permissionMatrix, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAgentScope, requireAuth, requireDPoP, requireGrant, requireMandate, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requirePlatformRole, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, resolveEffectiveRoles, roles, scopeOf, when };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { a as conjoinPolicyFilters, i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-CMMLWmuZ.mjs";
3
- import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-CWF5pbZD.mjs";
4
- import { i as resolveEffectiveRoles, n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "../fields-CojeUkS4.mjs";
5
- import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-CP47jdi7.mjs";
1
+ /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
+ import { a as conjoinPolicyFilters, i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-EsiY3nUu.mjs";
3
+ import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-xQAi5bPF.mjs";
4
+ import { i as resolveEffectiveRoles, n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "../fields-DdP225wt.mjs";
5
+ import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-DgPrZsJh.mjs";
6
6
  export { GRANT_MODES, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createOrgPermissions, createRoleHierarchy, deny, denyAll, describePermission, describePermissionMap, evaluatePermissionDecision, explainAccess, fields, fullPublic, getUserRoles, introspectCheck, introspectModule, introspectRegistry, modeSatisfies, normalizeRoles, normalizeToDecision, not, ownerWithAdminBypass, permissionMatrix, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAgentScope, requireAuth, requireDPoP, requireGrant, requireMandate, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requirePlatformRole, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, resolveEffectiveRoles, roles, scopeOf, when };