@classytic/arc 2.35.0 → 2.37.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 (171) hide show
  1. package/dist/{BaseController-C-pofd0v.mjs → BaseController-B5GZfUBy.mjs} +11 -11
  2. package/dist/{EventTransport-BrPeGUil.mjs → EventTransport-pGNNDQ__.mjs} +1 -1
  3. package/dist/{HookSystem-LlPm3Anm.mjs → HookSystem-CuhHvcyZ.mjs} +2 -2
  4. package/dist/{ResourceRegistry-yuD1Ra53.mjs → ResourceRegistry-DFOmazXg.mjs} +2 -2
  5. package/dist/{actionPermissions-LFuOra7W.mjs → actionPermissions-CQQrR4tu.mjs} +6 -6
  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-DYXBBgtg.mjs → authorizationDecision-DgyWdav8.mjs} +2 -2
  13. package/dist/{base-GZU3LlzP.d.mts → base-C-NL2fTi.d.mts} +15 -0
  14. package/dist/{buildHandler-Do9aMIvL.mjs → buildHandler-D2DkqtiY.mjs} +4 -4
  15. package/dist/cache/index.mjs +4 -4
  16. package/dist/{caching-cN5X9VEL.mjs → caching-BmC2T-pX.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-BhzLXCfN.mjs → constants-CUpamQMJ.mjs} +1 -1
  28. package/dist/context/index.mjs +3 -3
  29. package/dist/core/index.d.mts +2 -2
  30. package/dist/core/index.mjs +7 -7
  31. package/dist/{core-DdEvmmkY.mjs → core-C8GWw-Iu.mjs} +3 -3
  32. package/dist/{createActionRouter-EYWgd0ly.mjs → createActionRouter-CwDU_j2S.mjs} +7 -7
  33. package/dist/{createAggregationRouter-ByOK9Iev.mjs → createAggregationRouter-d057xXX1.mjs} +7 -7
  34. package/dist/{defineAggregation-DoIijIFq.mjs → defineAggregation-cCitY2FA.mjs} +1 -1
  35. package/dist/{defineResource-BOrGeocE.mjs → defineResource-WcbE1kJL.mjs} +18 -18
  36. package/dist/discovery/index.mjs +1 -1
  37. package/dist/docs/index.d.mts +1 -1
  38. package/dist/docs/index.mjs +3 -3
  39. package/dist/{elevation-tGIAldco.mjs → elevation-Bc6Gafv9.mjs} +4 -4
  40. package/dist/encryption/index.mjs +3 -3
  41. package/dist/{errorHandler-BbQ1nQdk.mjs → errorHandler-CB75oY5i.mjs} +3 -3
  42. package/dist/{errors-CLid6atr.mjs → errors-DsdZc1Xv.mjs} +1 -1
  43. package/dist/{eventPlugin-ClPn5kjn.mjs → eventPlugin-DEIfV1iC.mjs} +5 -5
  44. package/dist/events/index.d.mts +1 -1
  45. package/dist/events/index.mjs +5 -5
  46. package/dist/events/transports/redis-stream-entry.mjs +1 -1
  47. package/dist/events/transports/redis.mjs +1 -1
  48. package/dist/factory/index.d.mts +4 -4
  49. package/dist/factory/index.mjs +5 -5
  50. package/dist/{fastify-augmentation-CMMTL3cj.d.mts → fastify-augmentation-CdY8FINU.d.mts} +3 -3
  51. package/dist/{fields-UtpiJO5R.mjs → fields-DvGz47Ul.mjs} +1 -1
  52. package/dist/{generate-BoAVy3_b.mjs → generate-D7CIIWhS.mjs} +2 -2
  53. package/dist/{headers-DODWf7aC.mjs → headers-BFu1st_i.mjs} +2 -2
  54. package/dist/{health-_Zs3R_Sb.mjs → health-Cc_sb94d.mjs} +1 -1
  55. package/dist/hooks/index.d.mts +1 -1
  56. package/dist/hooks/index.mjs +2 -2
  57. package/dist/idempotency/index.mjs +4 -4
  58. package/dist/idempotency/redis.mjs +1 -1
  59. package/dist/{index-K7auNNW0.d.mts → index-BtYoMip1.d.mts} +20 -2
  60. package/dist/{index-C5K78SXo.d.mts → index-C01wWGJt.d.mts} +1 -1
  61. package/dist/{index-C50BUxKs.d.mts → index-DCxxRwLC.d.mts} +1 -1
  62. package/dist/{index-h-mTgMqy.d.mts → index-du18bJjH.d.mts} +3 -3
  63. package/dist/{index-CJCcbADG.d.mts → index-eyg5WEcy.d.mts} +1 -1
  64. package/dist/index.d.mts +5 -5
  65. package/dist/index.mjs +11 -11
  66. package/dist/{init-Ce4R0ZGK.mjs → init-BMgU1wYR.mjs} +1 -1
  67. package/dist/integrations/event-gateway.mjs +2 -2
  68. package/dist/integrations/index.d.mts +2 -2
  69. package/dist/integrations/index.mjs +1 -1
  70. package/dist/integrations/jobs/index.d.mts +1 -1
  71. package/dist/integrations/jobs/index.mjs +2 -2
  72. package/dist/integrations/mcp/index.d.mts +3 -3
  73. package/dist/integrations/mcp/index.mjs +2 -2
  74. package/dist/integrations/mcp/testing.d.mts +1 -1
  75. package/dist/integrations/mcp/testing.mjs +2 -2
  76. package/dist/integrations/streamline.mjs +3 -3
  77. package/dist/integrations/webhooks.d.mts +4 -2
  78. package/dist/integrations/webhooks.mjs +20 -6
  79. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  80. package/dist/integrations/websocket-redis.mjs +1 -1
  81. package/dist/integrations/websocket.mjs +1 -1
  82. package/dist/{interface-my7sxjw5.mjs → interface-CaPVHoVJ.mjs} +1 -1
  83. package/dist/{jsonBody-CVKA7C5m.mjs → jsonBody-BuzxOZV8.mjs} +2 -2
  84. package/dist/{keys-GlU7XpmG.mjs → keys-DoUI9-yP.mjs} +1 -1
  85. package/dist/{loadResources-DdQb0qgV.mjs → loadResources-CPlRWJCv.mjs} +2 -2
  86. package/dist/{loadResourcesFromEntry-s6aGs6-0.mjs → loadResourcesFromEntry-CPCZiX9n.mjs} +2 -2
  87. package/dist/logger/index.mjs +1 -1
  88. package/dist/{mcpPlugin-DkzZ7Nfx.mjs → mcpPlugin-dxMxBPIg.mjs} +15 -15
  89. package/dist/{memory-BwedEXau.mjs → memory-BnafVem_.mjs} +2 -2
  90. package/dist/{metrics-5LNPvL3P.mjs → metrics-CeAIcVMY.mjs} +2 -2
  91. package/dist/middleware/index.d.mts +1 -1
  92. package/dist/middleware/index.mjs +3 -3
  93. package/dist/migrations/index.mjs +2 -2
  94. package/dist/{module-Bh5OC7ww.mjs → module-DIvG8qOg.mjs} +1 -1
  95. package/dist/{multipartBody-DjilSDAT.mjs → multipartBody-BVCoaTwu.mjs} +1 -1
  96. package/dist/{openapi-ItLH12_L.mjs → openapi-D_i6CifU.mjs} +6 -6
  97. package/dist/outbox-admin/index.d.mts +2 -2
  98. package/dist/outbox-admin/index.mjs +4 -4
  99. package/dist/{outbox-module-b1TyDGGi.d.mts → outbox-module-BbdaMyqy.d.mts} +1 -1
  100. package/dist/{outbox-module-SGIZz6oS.mjs → outbox-module-CKaLL5BH.mjs} +4 -4
  101. package/dist/permissions/index.d.mts +2 -2
  102. package/dist/permissions/index.mjs +5 -5
  103. package/dist/{permissions-CpSBlFXZ.mjs → permissions-DWkl60hx.mjs} +36 -9
  104. package/dist/{pipe-DNOuCfAs.mjs → pipe-Dbs3GhOZ.mjs} +2 -2
  105. package/dist/pipeline/index.d.mts +1 -1
  106. package/dist/pipeline/index.mjs +2 -2
  107. package/dist/plugins/index.d.mts +4 -4
  108. package/dist/plugins/index.mjs +16 -16
  109. package/dist/plugins/response-cache.mjs +2 -2
  110. package/dist/plugins/tracing-entry.mjs +2 -2
  111. package/dist/{pluralize-DGAQQKL8.mjs → pluralize-DgaYX91M.mjs} +1 -1
  112. package/dist/{preloadResources-DYMzmUk1.mjs → preloadResources-BUoGKPaS.mjs} +79 -24
  113. package/dist/{preloadResources--ZtY9pe9.d.mts → preloadResources-BYFfYnjZ.d.mts} +3 -3
  114. package/dist/presets/filesUpload.d.mts +2 -2
  115. package/dist/presets/filesUpload.mjs +5 -5
  116. package/dist/presets/index.d.mts +2 -2
  117. package/dist/presets/index.mjs +2 -2
  118. package/dist/presets/multiTenant.d.mts +1 -1
  119. package/dist/presets/multiTenant.mjs +3 -3
  120. package/dist/presets/search.d.mts +2 -2
  121. package/dist/presets/search.mjs +2 -2
  122. package/dist/{presets-Bi0Z6Iq8.mjs → presets-Gbv9mNKD.mjs} +4 -4
  123. package/dist/{projection-aevMua7Q.mjs → projection-BunxoeON.mjs} +2 -2
  124. package/dist/{queryCachePlugin-BI7Z88Cx.mjs → queryCachePlugin-BYqmg89O.mjs} +5 -5
  125. package/dist/{rateLimitKey-pyevMUVf.mjs → rateLimitKey-DlqmDHA5.mjs} +1 -1
  126. package/dist/{realtime-Cfl2bVjj.mjs → realtime-CiAp2-LH.mjs} +9 -9
  127. package/dist/{registerRoute-u1opU66a.mjs → registerRoute-dnf-JJf-.mjs} +5 -5
  128. package/dist/registry/index.d.mts +2 -2
  129. package/dist/registry/index.mjs +3 -3
  130. package/dist/{registry-B4sf9Rfm.mjs → registry-ByC0UFNS.mjs} +2 -2
  131. package/dist/{renewingLease-5ESPMxp0.mjs → renewingLease-C5Ta_ImD.mjs} +1 -1
  132. package/dist/{replyHelpers-2jfmMnnV.mjs → replyHelpers-D1k0wHoO.mjs} +2 -2
  133. package/dist/{requestContext-DzOUGNdY.mjs → requestContext-DGM7EZRI.mjs} +1 -1
  134. package/dist/{rolldown-runtime-CEvvVXTC.mjs → rolldown-runtime-DrZrabOW.mjs} +1 -1
  135. package/dist/{runtimeCapabilities-BagWc3TI.mjs → runtimeCapabilities-c4Sc85X-.mjs} +1 -1
  136. package/dist/{schedules-BLpZLWGF.mjs → schedules-CVtolEa-.mjs} +31 -5
  137. package/dist/{schemaConverter-D2_bHGil.mjs → schemaConverter-C8zbW7tJ.mjs} +1 -1
  138. package/dist/{schemaIR-s3-ouZmP.mjs → schemaIR-BfI425RH.mjs} +2 -2
  139. package/dist/schemas/index.mjs +1 -1
  140. package/dist/scim/index.mjs +2 -2
  141. package/dist/scope/index.mjs +5 -5
  142. package/dist/{scope-DgepeCv6.mjs → scope-DFSOKc4T.mjs} +4 -4
  143. package/dist/{simpleEqualityMatcher-BO-sFTQf.mjs → simpleEqualityMatcher-Bhp7WrRF.mjs} +1 -1
  144. package/dist/{sse-DUIP1XH6.mjs → sse-vRuwDd6N.mjs} +5 -5
  145. package/dist/{sseStream-ByFGyIVr.mjs → sseStream-cWezGOk1.mjs} +2 -2
  146. package/dist/{store-helpers-kIJCY0wI.mjs → store-helpers-bU8H5c-A.mjs} +1 -1
  147. package/dist/{streaming-DOpZVht6.mjs → streaming-weWcFCk4.mjs} +1 -1
  148. package/dist/{subscribe-helpers-Dh2BnzJf.mjs → subscribe-helpers-BrcG3NlV.mjs} +11 -5
  149. package/dist/sync/changelog.mjs +1 -1
  150. package/dist/testing/cleanupStoreContract.mjs +1 -1
  151. package/dist/testing/index.d.mts +5 -5
  152. package/dist/testing/index.mjs +10 -10
  153. package/dist/testing/outboxStoreContract.mjs +1 -1
  154. package/dist/testing/storageContract.mjs +1 -1
  155. package/dist/{transactionContext-BTZzEcRo.mjs → transactionContext-Ca5peQpc.mjs} +1 -1
  156. package/dist/{typeGuards-B-_jqaMi.mjs → typeGuards-ALWme5WB.mjs} +1 -1
  157. package/dist/types/index.d.mts +2 -2
  158. package/dist/types/index.mjs +1 -1
  159. package/dist/types/storage.mjs +1 -1
  160. package/dist/{types-DDD5RKTu.d.mts → types-BMa2EPtv.d.mts} +9 -0
  161. package/dist/{types-DSvHH0uR.d.mts → types-BXnTOsXP.d.mts} +1 -1
  162. package/dist/{types-GY4kATJb.mjs → types-lDs9oF4z.mjs} +4 -4
  163. package/dist/usage/index.d.mts +1 -1
  164. package/dist/usage/index.mjs +0 -0
  165. package/dist/{userHelpers-AKcB4V03.mjs → userHelpers-DU_Z5OBA.mjs} +1 -1
  166. package/dist/utils/index.d.mts +2 -2
  167. package/dist/utils/index.mjs +11 -11
  168. package/dist/{utils-CBK9HQOI.mjs → utils-sXGFLegw.mjs} +3 -3
  169. package/dist/{validate-dosAIvQU.mjs → validate-qK_-7MVk.mjs} +2 -2
  170. package/dist/{versioning-BbTs4pwM.mjs → versioning-Dtw0MyX4.mjs} +3 -3
  171. package/package.json +5 -2
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { n as MemoryEventTransport } from "../EventTransport-BrPeGUil.mjs";
3
- import { a as createEventRegistry, i as wrapWithSchema, n as subscribeWithSchema, o as defineEvent, r as wrapWithBoundary, t as subscribeWithBoundary } from "../subscribe-helpers-Dh2BnzJf.mjs";
4
- import { i as withRetry, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-ClPn5kjn.mjs";
5
- import { i as exponentialBackoff, n as EventOutbox, r as repositoryAsOutboxStore, t as createOutboxModule } from "../outbox-module-SGIZz6oS.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { n as MemoryEventTransport } from "../EventTransport-pGNNDQ__.mjs";
3
+ import { a as createEventRegistry, i as wrapWithSchema, n as subscribeWithSchema, o as defineEvent, r as wrapWithBoundary, t as subscribeWithBoundary } from "../subscribe-helpers-BrcG3NlV.mjs";
4
+ import { i as withRetry, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-DEIfV1iC.mjs";
5
+ import { i as exponentialBackoff, n as EventOutbox, r as repositoryAsOutboxStore, t as createOutboxModule } from "../outbox-module-CKaLL5BH.mjs";
6
6
  import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
7
7
  //#region src/events/eventTypes.ts
8
8
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import sjson from "secure-json-parse";
3
3
  //#region src/events/transports/redis-stream.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import sjson from "secure-json-parse";
3
3
  //#region src/events/transports/redis.ts
4
4
  /**
@@ -1,8 +1,8 @@
1
1
 
2
- import { _ as HealthCheck, a as ModuleContribution, c as LoadResourcesOptions, d as loadResources, i as EventHandlerDefinition, l as ResourceLike, n as ArcModuleInput, o as ModuleDisposer, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule, u as ResourceModule } from "../types-DDD5RKTu.mjs";
3
- import { _ as collectModuleScheduledJobs, a as lazyModuleExports, c as getModuleState, d as resolveModule, f as orderModules, g as collectModuleHealthChecks, h as extendModule, i as hasModuleExports, l as hasModule, m as ModuleExtension, n as getModuleExports, o as lazyRequiredModuleExports, p as subscribeModuleEventHandlers, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as resolveContribution, v as collectModuleWorkflows } from "../index-C50BUxKs.mjs";
4
- import { c as ResolvedResourceDescriptor, l as describeResolvedModule, o as ResolvedModuleDescriptor, s as ResolvedModuleLifecycle } from "../fastify-augmentation-CMMTL3cj.mjs";
5
- import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as preloadResourcesAsync, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as preloadResources, u as CustomPluginAuthOption } from "../preloadResources--ZtY9pe9.mjs";
2
+ import { _ as HealthCheck, a as ModuleContribution, c as LoadResourcesOptions, d as loadResources, i as EventHandlerDefinition, l as ResourceLike, n as ArcModuleInput, o as ModuleDisposer, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule, u as ResourceModule } from "../types-BMa2EPtv.mjs";
3
+ import { _ as collectModuleScheduledJobs, a as lazyModuleExports, c as getModuleState, d as resolveModule, f as orderModules, g as collectModuleHealthChecks, h as extendModule, i as hasModuleExports, l as hasModule, m as ModuleExtension, n as getModuleExports, o as lazyRequiredModuleExports, p as subscribeModuleEventHandlers, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as resolveContribution, v as collectModuleWorkflows } from "../index-DCxxRwLC.mjs";
4
+ import { c as ResolvedResourceDescriptor, l as describeResolvedModule, o as ResolvedModuleDescriptor, s as ResolvedModuleLifecycle } from "../fastify-augmentation-CdY8FINU.mjs";
5
+ import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as preloadResourcesAsync, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as preloadResources, u as CustomPluginAuthOption } from "../preloadResources-BYFfYnjZ.mjs";
6
6
  import { FastifyInstance, FastifyServerOptions } from "fastify";
7
7
  //#region src/factory/createApp.d.ts
8
8
  /**
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { r as mergeHealthChecks, t as healthPlugin } from "../health-_Zs3R_Sb.mjs";
3
- import { S as resolveModule, _ as describeResolvedModule, a as createApp, b as collectModuleWorkflows, c as edgePreset, d as testingPreset, f as workerPreset, g as subscribeModuleEventHandlers, h as orderModules, i as DEFAULT_LOGGER_REDACT_PATHS, l as getPreset, m as hasModule, n as preloadResourcesAsync, p as getModuleState, r as ArcFactory, s as developmentPreset, t as preloadResources, u as productionPreset, v as collectModuleHealthChecks, x as resolveContribution, y as collectModuleScheduledJobs } from "../preloadResources-DYMzmUk1.mjs";
4
- import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-Bh5OC7ww.mjs";
5
- import { t as loadResources } from "../loadResources-DdQb0qgV.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { r as mergeHealthChecks, t as healthPlugin } from "../health-Cc_sb94d.mjs";
3
+ import { S as resolveModule, _ as describeResolvedModule, a as createApp, b as collectModuleWorkflows, c as edgePreset, d as testingPreset, f as workerPreset, g as subscribeModuleEventHandlers, h as orderModules, i as DEFAULT_LOGGER_REDACT_PATHS, l as getPreset, m as hasModule, n as preloadResourcesAsync, p as getModuleState, r as ArcFactory, s as developmentPreset, t as preloadResources, u as productionPreset, v as collectModuleHealthChecks, x as resolveContribution, y as collectModuleScheduledJobs } from "../preloadResources-BUoGKPaS.mjs";
4
+ import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-DIvG8qOg.mjs";
5
+ import { t as loadResources } from "../loadResources-CPlRWJCv.mjs";
6
6
  //#region src/factory/module/extend.ts
7
7
  /** Concatenate two contributions, resolving factories only when arc asks. */
8
8
  function mergeContribution(own, extra) {
@@ -1,8 +1,8 @@
1
1
 
2
- import { on as HookSystem, z as ResourceRegistry } from "./index-C5K78SXo.mjs";
2
+ import { on as HookSystem, z as ResourceRegistry } from "./index-C01wWGJt.mjs";
3
3
  import { t as ExternalOpenApiPaths } from "./externalPaths-CmGOxOtD.mjs";
4
- import { _ as HealthCheck, f as ScheduleDefinition, r as ArcModuleRegistry, t as ArcModule } from "./types-DDD5RKTu.mjs";
5
- import { s as ModuleState } from "./index-C50BUxKs.mjs";
4
+ import { _ as HealthCheck, f as ScheduleDefinition, r as ArcModuleRegistry, t as ArcModule } from "./types-BMa2EPtv.mjs";
5
+ import { s as ModuleState } from "./index-DCxxRwLC.mjs";
6
6
  import { FastifyPluginAsync } from "fastify";
7
7
  //#region src/factory/module/descriptor.d.ts
8
8
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  //#region src/permissions/fields.ts
3
3
  /**
4
4
  * Field-Level Permissions
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { t as pluralize } from "./pluralize-DGAQQKL8.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as pluralize } from "./pluralize-DgaYX91M.mjs";
3
3
  import { join } from "node:path";
4
4
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  //#region src/cli/commands/generate/name-helpers.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { u as ValidationError } from "./errors-CLid6atr.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { u as ValidationError } from "./errors-DsdZc1Xv.mjs";
3
3
  //#region src/utils/headers.ts
4
4
  /**
5
5
  * Canonical header typing + accessor.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { randomUUID } from "node:crypto";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/plugins/requestId.ts
@@ -1,3 +1,3 @@
1
1
 
2
- import { an as HookRegistration, cn as afterCreate, dn as beforeCreate, en as DefineHookOptions, fn as beforeDelete, hn as defineHook, in as HookPhase, ln as afterDelete, mn as createHookSystem, nn as HookHandler, on as HookSystem, pn as beforeUpdate, rn as HookOperation, sn as HookSystemOptions, tn as HookContext, un as afterUpdate } from "../index-C5K78SXo.mjs";
2
+ import { an as HookRegistration, cn as afterCreate, dn as beforeCreate, en as DefineHookOptions, fn as beforeDelete, hn as defineHook, in as HookPhase, ln as afterDelete, mn as createHookSystem, nn as HookHandler, on as HookSystem, pn as beforeUpdate, rn as HookOperation, sn as HookSystemOptions, tn as HookContext, un as afterUpdate } from "../index-C01wWGJt.mjs";
3
3
  export { type DefineHookOptions, type HookContext, type HookHandler, type HookOperation, type HookPhase, type HookRegistration, HookSystem, type HookSystemOptions, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
@@ -1,3 +1,3 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-LlPm3Anm.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-CuhHvcyZ.mjs";
3
3
  export { HookSystem, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { n as requireSingleHeaderValue } from "../headers-DODWf7aC.mjs";
3
- import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-kIJCY0wI.mjs";
4
- import { t as createIdempotencyResult } from "../interface-my7sxjw5.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { n as requireSingleHeaderValue } from "../headers-BFu1st_i.mjs";
3
+ import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-bU8H5c-A.mjs";
4
+ import { t as createIdempotencyResult } from "../interface-CaPVHoVJ.mjs";
5
5
  import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
6
6
  import { createHash } from "node:crypto";
7
7
  import fp from "fastify-plugin";
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  //#region src/idempotency/stores/redis.ts
3
3
  var RedisIdempotencyStore = class {
4
4
  name = "redis";
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { i as RequestScope, n as Mandate } from "./types-Ddl9OjmE.mjs";
3
- import { l as PermissionCheck, s as AuthorizationDecision, u as PermissionContext } from "./base-GZU3LlzP.mjs";
3
+ import { l as PermissionCheck, s as AuthorizationDecision, u as PermissionContext } from "./base-C-NL2fTi.mjs";
4
4
  import { r as CacheStore, t as CacheLogger } from "./interface-BOk3YnTz.mjs";
5
5
  import { FastifyReply, FastifyRequest } from "fastify";
6
6
  //#region src/permissions/agent.d.ts
@@ -567,6 +567,14 @@ type PermissionRequirement = {
567
567
  readonly conditional?: boolean;
568
568
  } | {
569
569
  readonly kind: "authenticated";
570
+ } |
571
+ /**
572
+ * Nobody passes — an explicit `denyAll()`. Distinct from "no rule found",
573
+ * which is `public` (public-by-omission): one is a closed door, the other is
574
+ * an open one, and before this existed both were reported as `authenticated`.
575
+ */
576
+ {
577
+ readonly kind: "denied";
570
578
  };
571
579
  /**
572
580
  * Extract a check's static requirement from its `PermissionCheckMeta`. Public
@@ -991,7 +999,17 @@ declare function fullPublic<TDoc = Record<string, unknown>>(overrides?: Permissi
991
999
  declare function readOnly<TDoc = Record<string, unknown>>(overrides?: PermissionOverrides<TDoc>): ResourcePermissions<TDoc>;
992
1000
  //#endregion
993
1001
  //#region src/permissions/matrix.d.ts
994
- type PermissionEntryType = "public" | "authenticated" | "roles" | "scoped";
1002
+ /**
1003
+ * `denied` is a CLOSED door — an explicit `denyAll()`. It is not the same as
1004
+ * "no rule found", which surfaces as `public` (public-by-omission). Before it
1005
+ * existed a denyAll gate was reported as `authenticated`, so a permission UI
1006
+ * rendered the action for every signed-in user and the server refused every
1007
+ * attempt.
1008
+ *
1009
+ * A CLIENT MUST treat an unrecognised type as DENIED, never as permitted — the
1010
+ * next type added here will otherwise read as "allowed" on every older client.
1011
+ */
1012
+ type PermissionEntryType = "public" | "authenticated" | "roles" | "scoped" | "denied";
995
1013
  interface PermissionEntry {
996
1014
  type: PermissionEntryType;
997
1015
  roles: string[];
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { P as ArcHeaders, i as RequestScope } from "./types-Ddl9OjmE.mjs";
3
- import { d as UserBase, l as PermissionCheck, t as AnyRecord } from "./base-GZU3LlzP.mjs";
3
+ import { d as UserBase, l as PermissionCheck, t as AnyRecord } from "./base-C-NL2fTi.mjs";
4
4
  import { a as QueryCacheConfig } from "./QueryCache-DFA-QrU9.mjs";
5
5
  import "./elevation-BXCfVcNG.mjs";
6
6
  import { n as FieldPermissionMap } from "./fields-I_EeRWND.mjs";
@@ -1,5 +1,5 @@
1
1
 
2
- import { _ as HealthCheck, a as ModuleContribution, f as ScheduleDefinition, n as ArcModuleInput, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule } from "./types-DDD5RKTu.mjs";
2
+ import { _ as HealthCheck, a as ModuleContribution, f as ScheduleDefinition, n as ArcModuleInput, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule } from "./types-BMa2EPtv.mjs";
3
3
  import { FastifyInstance } from "fastify";
4
4
  //#region src/factory/module/contributions.d.ts
5
5
  /**
@@ -1,8 +1,8 @@
1
1
 
2
2
  import { i as RequestScope } from "./types-Ddl9OjmE.mjs";
3
- import { l as PermissionCheck, t as AnyRecord } from "./base-GZU3LlzP.mjs";
4
- import { C as RequestContext, Et as ActionDefinition, F as FastifyWithDecorators, Fn as IControllerResponse, H as CrudController, In as IRequestContext, L as RequestWithExtras, Pn as IController, T as CrudRouterOptions, U as ResourceConfig, V as ResourceDefinition, et as RouteSchemaOptions, jt as RouteMcpConfig, tt as ArcFieldRule, ut as AggregationConfig } from "./index-C5K78SXo.mjs";
5
- import "./fastify-augmentation-CMMTL3cj.mjs";
3
+ import { l as PermissionCheck, t as AnyRecord } from "./base-C-NL2fTi.mjs";
4
+ import { C as RequestContext, Et as ActionDefinition, F as FastifyWithDecorators, Fn as IControllerResponse, H as CrudController, In as IRequestContext, L as RequestWithExtras, Pn as IController, T as CrudRouterOptions, U as ResourceConfig, V as ResourceDefinition, et as RouteSchemaOptions, jt as RouteMcpConfig, tt as ArcFieldRule, ut as AggregationConfig } from "./index-C01wWGJt.mjs";
5
+ import "./fastify-augmentation-CdY8FINU.mjs";
6
6
  import { Filter } from "@classytic/repo-core/filter";
7
7
  import { AggDateBucket, AggMeasure, AggTopN } from "@classytic/repo-core/repository";
8
8
  import { FastifyReply, FastifyRequest, RouteHandlerMethod } from "fastify";
@@ -1,5 +1,5 @@
1
1
 
2
- import { l as PermissionCheck } from "./base-GZU3LlzP.mjs";
2
+ import { l as PermissionCheck } from "./base-C-NL2fTi.mjs";
3
3
  import { FastifyPluginAsync } from "fastify";
4
4
  //#region src/integrations/jobs/execution.d.ts
5
5
  /**
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
 
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-GZU3LlzP.mjs";
3
- import { A as RequestIdOptions, An as WriteVerbKey, B as defineResource, Bt as BaseController, C as RequestContext, Cn as ControllerConstructionOptions, D as HealthCheck, Dn as MutationWriteContext, E as GracefulShutdownOptions, F as FastifyWithDecorators, Fn as IControllerResponse, Ft as AuthPluginOptions, Gt as SlugExt, H as CrudController, Ht as SoftDeleteMixin, In as IRequestContext, Jt as BulkMixin, Kt as SlugMixin, L as RequestWithExtras, Ln as RawRouteHandler, Mn as ControllerLike, N as FastifyRequestExtras, Nt as RateLimitConfig, O as HealthOptions, On as ResourceWrites, P as FastifyWithAuth, Pn as IController, Q as MiddlewareConfig, Rn as RouteHandler, S as QueryParserInterface, Sn as ControllerConfigurableOptions, T as CrudRouterOptions, U as ResourceConfig, Ut as TreeExt, V as ResourceDefinition, Vt as SoftDeleteExt, Wt as TreeMixin, X as CrudRouteKey, Y as PresetResult, Yt as BaseCrudController, Z as CrudSchemas, _n as ArcDeleteResult, a as InferAdapterDoc, bn as ArcUpdateResult, c as TypedController, ct as AggMeasureShorthand, d as PaginationResult, dt as AggregationDateRangeRequirement, et as RouteSchemaOptions, f as IntrospectionData, ft as AggregationIndexHint, g as ArcInternalMetadata, gn as ArcCreateResult, gt as AggregationsMap, h as ResourceMetadata, ht as AggregationRateLimit, i as ValidationResult, k as IntrospectionPluginOptions, kn as WriteContext, l as TypedRepository, lt as AggregationCacheConfig, m as RegistryStats, mt as AggregationMaterializedResult, n as ConfigError, nt as FieldRule, o as InferDocType, ot as EventDefinition, p as RegistryEntry, pt as AggregationMaterializedContext, q as PresetFunction, qt as BulkExt, r as ValidateOptions, s as InferResourceDoc, st as AggMeasureInput, t as RouteHandlerMethod, u as TypedResourceConfig, ut as AggregationConfig, vn as ArcGetResult, w as ServiceContext, wn as ListResult, xn as BaseControllerOptions, y as OwnershipCheck, yn as ArcListResult } from "./index-C5K78SXo.mjs";
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-C-NL2fTi.mjs";
3
+ import { A as RequestIdOptions, An as WriteVerbKey, B as defineResource, Bt as BaseController, C as RequestContext, Cn as ControllerConstructionOptions, D as HealthCheck, Dn as MutationWriteContext, E as GracefulShutdownOptions, F as FastifyWithDecorators, Fn as IControllerResponse, Ft as AuthPluginOptions, Gt as SlugExt, H as CrudController, Ht as SoftDeleteMixin, In as IRequestContext, Jt as BulkMixin, Kt as SlugMixin, L as RequestWithExtras, Ln as RawRouteHandler, Mn as ControllerLike, N as FastifyRequestExtras, Nt as RateLimitConfig, O as HealthOptions, On as ResourceWrites, P as FastifyWithAuth, Pn as IController, Q as MiddlewareConfig, Rn as RouteHandler, S as QueryParserInterface, Sn as ControllerConfigurableOptions, T as CrudRouterOptions, U as ResourceConfig, Ut as TreeExt, V as ResourceDefinition, Vt as SoftDeleteExt, Wt as TreeMixin, X as CrudRouteKey, Y as PresetResult, Yt as BaseCrudController, Z as CrudSchemas, _n as ArcDeleteResult, a as InferAdapterDoc, bn as ArcUpdateResult, c as TypedController, ct as AggMeasureShorthand, d as PaginationResult, dt as AggregationDateRangeRequirement, et as RouteSchemaOptions, f as IntrospectionData, ft as AggregationIndexHint, g as ArcInternalMetadata, gn as ArcCreateResult, gt as AggregationsMap, h as ResourceMetadata, ht as AggregationRateLimit, i as ValidationResult, k as IntrospectionPluginOptions, kn as WriteContext, l as TypedRepository, lt as AggregationCacheConfig, m as RegistryStats, mt as AggregationMaterializedResult, n as ConfigError, nt as FieldRule, o as InferDocType, ot as EventDefinition, p as RegistryEntry, pt as AggregationMaterializedContext, q as PresetFunction, qt as BulkExt, r as ValidateOptions, s as InferResourceDoc, st as AggMeasureInput, t as RouteHandlerMethod, u as TypedResourceConfig, ut as AggregationConfig, vn as ArcGetResult, w as ServiceContext, wn as ListResult, xn as BaseControllerOptions, y as OwnershipCheck, yn as ArcListResult } from "./index-C01wWGJt.mjs";
4
4
  import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, n as FieldPermissionMap, o as fields, t as FieldPermission } from "./fields-I_EeRWND.mjs";
5
- import "./fastify-augmentation-CMMTL3cj.mjs";
6
- import { A as CRUD_OPERATIONS, B as HookOperation, C as SeamedResourceConfig, E as defineAction, F as DEFAULT_SORT, G as MUTATION_OPERATIONS, H as MAX_FILTER_DEPTH, I as DEFAULT_TENANT_FIELD, J as SYSTEM_FIELDS, K as MutationOperation, L as DEFAULT_UPDATE_METHOD, M as DEFAULT_ID_FIELD, N as DEFAULT_LIMIT, P as DEFAULT_MAX_LIMIT, R as HOOK_OPERATIONS, S as ResourceSeams, U as MAX_REGEX_LENGTH, V as HookPhase, W as MAX_SEARCH_LENGTH, b as defineResourceVariants, c as nativePolicyFilter, h as getControllerScope, j as CrudOperation, k as defineAggregation, q as RESERVED_QUERY_PARAMS, s as NativePolicyFilter, w as mergeResourceConfig, x as AdapterLike, z as HOOK_PHASES } from "./index-h-mTgMqy.mjs";
7
- import { $ as requireAuth, C as requireServiceScope, G as createOrgPermissions, H as DynamicPermissionMatrixConfig, J as allowPublic, K as allOf, S as requireScopeContext, V as DynamicPermissionMatrix, W as createDynamicPermissionMatrix, Y as anyOf, Z as denyAll, _ as publicReadAdminWrite, b as requireOrgMembership, d as authenticated, et as requireOwnership, f as fullPublic, g as publicRead, h as presets_d_exports, it as when, nt as requireRoles, p as ownerWithAdminBypass, u as adminOnly, v as readOnly, w as requireTeamMembership, x as requireOrgRole, y as requireOrgInScope } from "./index-K7auNNW0.mjs";
5
+ import "./fastify-augmentation-CdY8FINU.mjs";
6
+ import { A as CRUD_OPERATIONS, B as HookOperation, C as SeamedResourceConfig, E as defineAction, F as DEFAULT_SORT, G as MUTATION_OPERATIONS, H as MAX_FILTER_DEPTH, I as DEFAULT_TENANT_FIELD, J as SYSTEM_FIELDS, K as MutationOperation, L as DEFAULT_UPDATE_METHOD, M as DEFAULT_ID_FIELD, N as DEFAULT_LIMIT, P as DEFAULT_MAX_LIMIT, R as HOOK_OPERATIONS, S as ResourceSeams, U as MAX_REGEX_LENGTH, V as HookPhase, W as MAX_SEARCH_LENGTH, b as defineResourceVariants, c as nativePolicyFilter, h as getControllerScope, j as CrudOperation, k as defineAggregation, q as RESERVED_QUERY_PARAMS, s as NativePolicyFilter, w as mergeResourceConfig, x as AdapterLike, z as HOOK_PHASES } from "./index-du18bJjH.mjs";
7
+ import { $ as requireAuth, C as requireServiceScope, G as createOrgPermissions, H as DynamicPermissionMatrixConfig, J as allowPublic, K as allOf, S as requireScopeContext, V as DynamicPermissionMatrix, W as createDynamicPermissionMatrix, Y as anyOf, Z as denyAll, _ as publicReadAdminWrite, b as requireOrgMembership, d as authenticated, et as requireOwnership, f as fullPublic, g as publicRead, h as presets_d_exports, it as when, nt as requireRoles, p as ownerWithAdminBypass, u as adminOnly, v as readOnly, w as requireTeamMembership, x as requireOrgRole, y as requireOrgInScope } from "./index-BtYoMip1.mjs";
8
8
  import { a as NotFoundError, d as ValidationError, f as createDomainError, i as ForbiddenError, t as ArcError, u as UnauthorizedError } from "./errors-BGdVwP25.mjs";
9
9
  //#region src/index.d.ts
10
10
  declare const version: string;
package/dist/index.mjs CHANGED
@@ -1,14 +1,14 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "./constants-BhzLXCfN.mjs";
3
- import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-CLid6atr.mjs";
4
- import { a as BulkMixin, h as nativePolicyFilter, i as SlugMixin, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, t as BaseController } from "./BaseController-C-pofd0v.mjs";
5
- import { n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "./fields-UtpiJO5R.mjs";
6
- import { a as ResourceDefinition, t as defineResource } from "./defineResource-BOrGeocE.mjs";
7
- import { l as getControllerScope } from "./actionPermissions-LFuOra7W.mjs";
8
- import { t as defineAggregation } from "./defineAggregation-DoIijIFq.mjs";
9
- import { a as mergeResourceConfig, i as defineResourceVariants, o as defineAction } from "./core-DdEvmmkY.mjs";
10
- 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-CpSBlFXZ.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "./constants-CUpamQMJ.mjs";
3
+ import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-DsdZc1Xv.mjs";
4
+ import { a as BulkMixin, h as nativePolicyFilter, i as SlugMixin, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, t as BaseController } from "./BaseController-B5GZfUBy.mjs";
5
+ import { n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "./fields-DvGz47Ul.mjs";
6
+ import { a as ResourceDefinition, t as defineResource } from "./defineResource-WcbE1kJL.mjs";
7
+ import { l as getControllerScope } from "./actionPermissions-CQQrR4tu.mjs";
8
+ import { t as defineAggregation } from "./defineAggregation-cCitY2FA.mjs";
9
+ import { a as mergeResourceConfig, i as defineResourceVariants, o as defineAction } from "./core-C8GWw-Iu.mjs";
10
+ 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-DWkl60hx.mjs";
11
11
  //#region src/index.ts
12
- const version = "2.35.0";
12
+ const version = "2.37.0";
13
13
  //#endregion
14
14
  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.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.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.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import fp from "fastify-plugin";
3
3
  //#region src/integrations/event-gateway.ts
4
4
  const eventGatewayPluginImpl = async (fastify, opts = {}) => {
5
5
  const { auth = true, orgScoped = false, 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-DUIP1XH6.mjs").then((n) => n.r);
8
+ const { default: ssePlugin } = await import("../sse-vRuwDd6N.mjs").then((n) => n.r);
9
9
  await fastify.register(ssePlugin, {
10
10
  path: opts.sse?.path ?? "/events/stream",
11
11
  requireAuth: auth,
@@ -1,8 +1,8 @@
1
1
 
2
2
  import { c as WebSocketClient, l as WebSocketMessage, u as WebSocketPluginOptions } from "../websocket-BOXVggMf.mjs";
3
3
  import { EventGatewayOptions } from "./event-gateway.mjs";
4
- import { a as JobMeta, c as JobsPluginOptions, i as JobDispatcher, l as QueueStats, n as JobDefinition, r as JobDispatchOptions } from "../index-CJCcbADG.mjs";
5
- import { _ as ToolDefinition, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, n as CallToolResult, o as CrudOperation, r as CreateMcpServerConfig, t as BetterAuthHandler, u as McpPluginOptions } from "../types-DSvHH0uR.mjs";
4
+ import { a as JobMeta, c as JobsPluginOptions, i as JobDispatcher, l as QueueStats, n as JobDefinition, r as JobDispatchOptions } from "../index-eyg5WEcy.mjs";
5
+ import { _ as ToolDefinition, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, n as CallToolResult, o as CrudOperation, r as CreateMcpServerConfig, t as BetterAuthHandler, u as McpPluginOptions } from "../types-BXnTOsXP.mjs";
6
6
  import { StreamlinePluginOptions, WorkflowLike, WorkflowRunLike } from "./streamline.mjs";
7
7
  import { WebhookDeliveryRecord, WebhookManager, WebhookPluginOptions, WebhookStore, WebhookSubscription } from "./webhooks.mjs";
8
8
  export type { BetterAuthHandler, CallToolResult, CreateMcpServerConfig, CrudOperation, EventGatewayOptions, JobDefinition, JobDispatchOptions, JobDispatcher, JobMeta, JobsPluginOptions, McpAuthResult, McpPluginOptions, McpResourceConfig, PromptDefinition, QueueStats, StreamlinePluginOptions, ToolAnnotations, ToolContext, ToolDefinition, WebSocketClient, WebSocketMessage, WebSocketPluginOptions, WebhookDeliveryRecord, WebhookManager, WebhookPluginOptions, WebhookStore, WebhookSubscription, WorkflowLike, WorkflowRunLike };
@@ -1,2 +1,2 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  export {};
@@ -1,3 +1,3 @@
1
1
 
2
- import { a as JobMeta, c as JobsPluginOptions, d as ExecuteTimedHandlerOptions, f as TimedHandlerLogger, i as JobDispatcher, l as QueueStats, n as JobDefinition, o as JobRepeatOptions, p as executeTimedHandler, r as JobDispatchOptions, s as JobStatus, t as jobsPlugin, u as defineJob } from "../../index-CJCcbADG.mjs";
2
+ import { a as JobMeta, c as JobsPluginOptions, d as ExecuteTimedHandlerOptions, f as TimedHandlerLogger, i as JobDispatcher, l as QueueStats, n as JobDefinition, o as JobRepeatOptions, p as executeTimedHandler, r as JobDispatchOptions, s as JobStatus, t as jobsPlugin, u as defineJob } from "../../index-eyg5WEcy.mjs";
3
3
  export { type ExecuteTimedHandlerOptions, type JobDefinition, type JobDispatchOptions, type JobDispatcher, type JobMeta, type JobRepeatOptions, type JobStatus, type JobsPluginOptions, type QueueStats, type TimedHandlerLogger, defineJob, executeTimedHandler, jobsPlugin };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { n as evaluateAndApplyPermission } from "../../authorizationDecision-DYXBBgtg.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { n as evaluateAndApplyPermission } from "../../authorizationDecision-DgyWdav8.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/integrations/jobs/execution.ts
5
5
  async function executeTimedHandler(options) {
@@ -1,9 +1,9 @@
1
1
 
2
2
  import { i as RequestScope } from "../../types-Ddl9OjmE.mjs";
3
- import { l as PermissionCheck } from "../../base-GZU3LlzP.mjs";
4
- import { Fn as IControllerResponse, In as IRequestContext, V as ResourceDefinition, zn as ServerAccessor } from "../../index-C5K78SXo.mjs";
3
+ import { l as PermissionCheck } from "../../base-C-NL2fTi.mjs";
4
+ import { Fn as IControllerResponse, In as IRequestContext, V as ResourceDefinition, zn as ServerAccessor } from "../../index-C01wWGJt.mjs";
5
5
  import { n as FieldPermissionMap } from "../../fields-I_EeRWND.mjs";
6
- import { _ as ToolDefinition, a as CrudDescriptionOverride, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, i as CrudDescriptionMeta, l as McpExecutionWiring, m as SessionEntry, n as CallToolResult, o as CrudOperation, p as PromptResult, r as CreateMcpServerConfig, s as McpAuthResolver, t as BetterAuthHandler, u as McpPluginOptions } from "../../types-DSvHH0uR.mjs";
6
+ import { _ as ToolDefinition, a as CrudDescriptionOverride, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, i as CrudDescriptionMeta, l as McpExecutionWiring, m as SessionEntry, n as CallToolResult, o as CrudOperation, p as PromptResult, r as CreateMcpServerConfig, s as McpAuthResolver, t as BetterAuthHandler, u as McpPluginOptions } from "../../types-BXnTOsXP.mjs";
7
7
  import { ErrorContract } from "@classytic/repo-core/errors";
8
8
  import { FastifyPluginAsync } from "fastify";
9
9
  import { z } from "zod";
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { a as defaultCrudDescription, c as mcpHandlerAdapter, d as toCallToolResult, f as toCallToolSuccess, h as resolveToolCollisions, i as fieldRulesToZod, l as permissionDeniedResult, m as createMcpServer, n as mcpPlugin, o as resolveCrudDescription, p as buildRequestContext, r as resourceToTools, s as invokeController, t as filterResourcesForMcp, u as toCallToolError } from "../../mcpPlugin-DkzZ7Nfx.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { a as defaultCrudDescription, c as mcpHandlerAdapter, d as toCallToolResult, f as toCallToolSuccess, h as resolveToolCollisions, i as fieldRulesToZod, l as permissionDeniedResult, m as createMcpServer, n as mcpPlugin, o as resolveCrudDescription, p as buildRequestContext, r as resourceToTools, s as invokeController, t as filterResourcesForMcp, u as toCallToolError } from "../../mcpPlugin-dxMxBPIg.mjs";
3
3
  //#region src/integrations/mcp/defineTool.ts
4
4
  /**
5
5
  * Define a type-safe MCP tool.
@@ -1,5 +1,5 @@
1
1
 
2
- import { c as McpAuthResult, u as McpPluginOptions } from "../../types-DSvHH0uR.mjs";
2
+ import { c as McpAuthResult, u as McpPluginOptions } from "../../types-BXnTOsXP.mjs";
3
3
  //#region src/integrations/mcp/testing.d.ts
4
4
  interface TestMcpClientOptions {
5
5
  /** MCP plugin options (resources, overrides, etc.) — same as mcpPlugin config */
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { m as createMcpServer, r as resourceToTools, t as filterResourcesForMcp } from "../../mcpPlugin-DkzZ7Nfx.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { m as createMcpServer, r as resourceToTools, t as filterResourcesForMcp } from "../../mcpPlugin-dxMxBPIg.mjs";
3
3
  //#region src/integrations/mcp/testing.ts
4
4
  /**
5
5
  * @classytic/arc/mcp/testing — MCP Test Utilities
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-CLid6atr.mjs";
3
- import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-DOpZVht6.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-DsdZc1Xv.mjs";
3
+ import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-weWcFCk4.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  //#region src/integrations/streamline.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { a as EventTransport, n as DomainEvent } from "../EventTransport-BEVP50ka.mjs";
3
- import { n as OutboxModuleOptions, r as createOutboxModule } from "../outbox-module-b1TyDGGi.mjs";
3
+ import { n as OutboxModuleOptions, r as createOutboxModule } from "../outbox-module-BbdaMyqy.mjs";
4
4
  import { FastifyPluginAsync } from "fastify";
5
5
  import { OutboxFailurePolicy, OutboxStore } from "@classytic/primitives/outbox";
6
6
  //#region src/integrations/webhooks.d.ts
@@ -310,6 +310,8 @@ interface WebhookDeliveryTransportOptions {
310
310
  * an allowed URL can't 302 into a blocked target; a rejection is permanent.
311
311
  */
312
312
  validateUrl?: (url: URL, subscription: WebhookSubscription) => void | Promise<void>;
313
+ /** Resolve private auth headers at delivery time; reserved Arc headers cannot be replaced. */
314
+ resolveHeaders?: (subscription: WebhookSubscription, event: WebhookDeliveryPayload["event"]) => Record<string, string> | Promise<Record<string, string>>;
313
315
  }
314
316
  /**
315
317
  * Publish-only `EventTransport` whose `publish()` IS the webhook POST —
@@ -338,7 +340,7 @@ interface WebhookDeliveryPolicyOptions {
338
340
  * retry on exponential backoff until `maxAttempts`, then dead-letter.
339
341
  */
340
342
  declare function webhookDeliveryFailurePolicy(options?: WebhookDeliveryPolicyOptions): OutboxFailurePolicy;
341
- interface DurableWebhookModuleOptions extends Omit<OutboxModuleOptions, "name" | "transport" | "failurePolicy">, Pick<WebhookDeliveryTransportOptions, "fetch" | "timeout" | "validateUrl"> {
343
+ interface DurableWebhookModuleOptions extends Omit<OutboxModuleOptions, "name" | "transport" | "failurePolicy">, Pick<WebhookDeliveryTransportOptions, "fetch" | "timeout" | "validateUrl" | "resolveHeaders"> {
342
344
  /** Module name / `dependsOn` key. Default `'webhook-delivery'`. */
343
345
  name?: string;
344
346
  /** Retry/backoff tuning for the default failure policy. */
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-BagWc3TI.mjs";
3
- import { i as exponentialBackoff, t as createOutboxModule } from "../outbox-module-SGIZz6oS.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-c4Sc85X-.mjs";
3
+ import { i as exponentialBackoff, t as createOutboxModule } from "../outbox-module-CKaLL5BH.mjs";
4
4
  import { createHmac, timingSafeEqual } from "node:crypto";
5
5
  import fp from "fastify-plugin";
6
6
  import { createChildEvent } from "@classytic/primitives/events";
@@ -429,6 +429,8 @@ function createWebhookDeliveryTransport(options) {
429
429
  timestamp,
430
430
  deliveryId: payload.event.meta.id
431
431
  });
432
+ const extraHeaders = options.resolveHeaders ? await options.resolveHeaders(sub, payload.event) : {};
433
+ assertWebhookHeaderOverrides(extraHeaders);
432
434
  const ac = new AbortController();
433
435
  const timer = setTimeout(() => ac.abort(), timeout);
434
436
  let response;
@@ -439,7 +441,8 @@ function createWebhookDeliveryTransport(options) {
439
441
  "content-type": "application/json",
440
442
  "x-arc-webhook-signature": v1Signature,
441
443
  "x-arc-webhook-timestamp": String(timestamp),
442
- "x-arc-webhook-delivery": payload.event.meta.id
444
+ "x-arc-webhook-delivery": payload.event.meta.id,
445
+ ...extraHeaders
443
446
  },
444
447
  body,
445
448
  signal: ac.signal,
@@ -502,7 +505,7 @@ function webhookDeliveryFailurePolicy(options = {}) {
502
505
  * boot-checked, not discovered on the first row.
503
506
  */
504
507
  function createDurableWebhookModule(options) {
505
- const { name, delivery, failurePolicy, fetch, timeout, validateUrl, ...outboxOptions } = options;
508
+ const { name, delivery, failurePolicy, fetch, timeout, validateUrl, resolveHeaders, ...outboxOptions } = options;
506
509
  return createOutboxModule({
507
510
  ...outboxOptions,
508
511
  name: name ?? "webhook-delivery",
@@ -520,11 +523,22 @@ function createDurableWebhookModule(options) {
520
523
  },
521
524
  ...fetch !== void 0 ? { fetch } : {},
522
525
  ...timeout !== void 0 ? { timeout } : {},
523
- ...validateUrl !== void 0 ? { validateUrl } : {}
526
+ ...validateUrl !== void 0 ? { validateUrl } : {},
527
+ ...resolveHeaders !== void 0 ? { resolveHeaders } : {}
524
528
  });
525
529
  },
526
530
  failurePolicy: failurePolicy ?? webhookDeliveryFailurePolicy(delivery)
527
531
  });
528
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
+ }
529
543
  //#endregion
530
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.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.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.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.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.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.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.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.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.35.0 | MIT | https://classytic.com */
2
- import { t as ArcError } from "./errors-CLid6atr.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "./errors-DsdZc1Xv.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.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.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.35.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-CEvvVXTC.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-DrZrabOW.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.35.0 | MIT | https://classytic.com */
2
- import { t as ResourceRegistry } from "./ResourceRegistry-yuD1Ra53.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as ResourceRegistry } from "./ResourceRegistry-DFOmazXg.mjs";
3
3
  import { resolve } from "node:path";
4
4
  import { pathToFileURL } from "node:url";
5
5
  //#region src/cli/utils/loadResourcesFromEntry.ts
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/logger/index.ts
4
4
  /**