@classytic/arc 2.46.0 → 2.47.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 (192) hide show
  1. package/dist/{EventTransport-DNgD9NP4.mjs → EventTransport-BHKy4_Bi.mjs} +4 -4
  2. package/dist/{HookSystem-DRbPzEcP.mjs → HookSystem-CAIDVoKC.mjs} +2 -2
  3. package/dist/{ResourceRegistry-Douk51fa.mjs → ResourceRegistry-23Ml6FNe.mjs} +2 -2
  4. package/dist/{acquire-RbtvDg9s.mjs → acquire-DoFX06fm.mjs} +1 -1
  5. package/dist/{actionPermissions-De0AJ7hm.mjs → actionPermissions-DXrlWHHK.mjs} +13 -13
  6. package/dist/audit/index.d.mts +1 -1
  7. package/dist/audit/index.mjs +4 -4
  8. package/dist/auth/audit.mjs +1 -1
  9. package/dist/auth/index.d.mts +1 -1
  10. package/dist/auth/index.mjs +7 -7
  11. package/dist/auth/redis-session.mjs +1 -1
  12. package/dist/{authorizationDecision-DeZMrHcm.mjs → authorizationDecision-DYiubkYw.mjs} +4 -4
  13. package/dist/{boundedMap-2WBh3gM9.mjs → boundedMap-CtdzpJ3X.mjs} +1 -1
  14. package/dist/{buildHandler-DxVOOBpw.mjs → buildHandler-CARdmPNo.mjs} +4 -4
  15. package/dist/cache/index.mjs +4 -4
  16. package/dist/{caching-BYRwYrUo.mjs → caching-QRiryDLs.mjs} +2 -2
  17. package/dist/{claimed-DYlELdnm.mjs → claimed-BLecr1j3.mjs} +1 -1
  18. package/dist/cleanup/index.d.mts +1 -1
  19. package/dist/cleanup/index.mjs +4 -4
  20. package/dist/cli/commands/describe.d.mts +1 -1
  21. package/dist/cli/commands/describe.mjs +3 -3
  22. package/dist/cli/commands/docs.mjs +3 -3
  23. package/dist/cli/commands/doctor.mjs +1 -1
  24. package/dist/cli/commands/generate.mjs +2 -2
  25. package/dist/cli/commands/init.mjs +2 -2
  26. package/dist/cli/commands/introspect.mjs +2 -2
  27. package/dist/cli/index.mjs +3 -3
  28. package/dist/{constants-CHZMUwBW.mjs → constants-Cx7BcnHT.mjs} +1 -1
  29. package/dist/context/index.mjs +5 -5
  30. package/dist/core/index.d.mts +2 -2
  31. package/dist/core/index.mjs +7 -7
  32. package/dist/{core-D9rS2BxO.mjs → core-0WyMuo0f.mjs} +3 -3
  33. package/dist/{createActionRouter-0qkCRzTL.mjs → createActionRouter-mLAGbpDV.mjs} +6 -6
  34. package/dist/{createAggregationRouter-CUf5Esd9.mjs → createAggregationRouter-BEAjn3dA.mjs} +7 -7
  35. package/dist/{createApp-DZIXfDKD.mjs → createApp-QDP4vYWH.mjs} +29 -29
  36. package/dist/{createMcpServer-DeVpqQF-.d.mts → createMcpServer-DzXHX0SO.d.mts} +1 -1
  37. package/dist/{defineAggregation-bmKQ4NmC.mjs → defineAggregation-CFNfvz-C.mjs} +1 -1
  38. package/dist/{defineResource-CGmdmGwh.mjs → defineResource-BROJmhzJ.mjs} +10 -8
  39. package/dist/discovery/index.mjs +1 -1
  40. package/dist/docs/index.d.mts +1 -1
  41. package/dist/docs/index.mjs +3 -3
  42. package/dist/{elevation-CzhqAyVN.mjs → elevation-DrXeEWWk.mjs} +5 -5
  43. package/dist/encryption/index.mjs +3 -3
  44. package/dist/{errorHandler-dFyGOEoB.mjs → errorHandler-BiBXtxj4.mjs} +3 -3
  45. package/dist/{errors-BY8vzlP4.mjs → errors-DnrUChAy.mjs} +1 -1
  46. package/dist/{eventPlugin-eMhAPtQA.mjs → eventPlugin-BhKLUe7H.mjs} +8 -8
  47. package/dist/{eventTypes-Do2KYeJx.mjs → eventTypes-CCIRGakw.mjs} +2 -2
  48. package/dist/events/index.d.mts +2 -2
  49. package/dist/events/index.mjs +8 -7
  50. package/dist/events/transports/redis-stream-entry.mjs +4 -4
  51. package/dist/events/transports/redis.mjs +2 -2
  52. package/dist/factory/index.d.mts +3 -3
  53. package/dist/factory/index.mjs +6 -6
  54. package/dist/{fastify-augmentation-Dtn0IIRn.d.mts → fastify-augmentation-bzkWPt1f.d.mts} +2 -2
  55. package/dist/{fields-LnbCcvsw.mjs → fields-CYdpcV73.mjs} +1 -1
  56. package/dist/{filter-merge-BAWi019Q.mjs → filter-merge-6kasezRH.mjs} +1 -1
  57. package/dist/{generate-oXoDnpJf.mjs → generate-DUkcbc4r.mjs} +2 -2
  58. package/dist/{headers-DBd3Qheo.mjs → headers-KxhrKevA.mjs} +2 -2
  59. package/dist/{health-BlJu9GXS.mjs → health-CRJg3IIq.mjs} +1 -1
  60. package/dist/{health-Dp-3EC9o.mjs → health-jkYNdobJ.mjs} +1 -1
  61. package/dist/hooks/index.d.mts +1 -1
  62. package/dist/hooks/index.mjs +2 -2
  63. package/dist/http-cache/index.d.mts +211 -0
  64. package/dist/http-cache/index.mjs +605 -0
  65. package/dist/http-cache/purgers/cloudflare.d.mts +13 -0
  66. package/dist/http-cache/purgers/cloudflare.mjs +46 -0
  67. package/dist/http-cache/purgers/fastly.d.mts +12 -0
  68. package/dist/http-cache/purgers/fastly.mjs +47 -0
  69. package/dist/http-cache/testing/index.d.mts +68 -0
  70. package/dist/http-cache/testing/index.mjs +168 -0
  71. package/dist/idempotency/index.mjs +8 -8
  72. package/dist/idempotency/redis.mjs +2 -2
  73. package/dist/{index-BTxzJ_MN.d.mts → index-BxZS-8So.d.mts} +2 -2
  74. package/dist/{index-DyJFTJLA.d.mts → index-Cy2-QffW.d.mts} +9 -0
  75. package/dist/{index-CUdaoCYt.d.mts → index-D1X_C_qz.d.mts} +2 -2
  76. package/dist/{index-Bqfo8hLz.d.mts → index-DFCCQ9AE.d.mts} +1 -1
  77. package/dist/index.d.mts +3 -3
  78. package/dist/index.mjs +11 -11
  79. package/dist/{init-BOaNkLYb.mjs → init-CACwpktI.mjs} +1 -1
  80. package/dist/integrations/event-gateway.mjs +2 -2
  81. package/dist/integrations/index.d.mts +1 -1
  82. package/dist/integrations/index.mjs +1 -1
  83. package/dist/integrations/jobs/index.mjs +3 -3
  84. package/dist/integrations/mcp/index.d.mts +3 -3
  85. package/dist/integrations/mcp/index.mjs +2 -2
  86. package/dist/integrations/mcp/testing.d.mts +2 -2
  87. package/dist/integrations/mcp/testing.mjs +2 -2
  88. package/dist/integrations/streamline.mjs +3 -3
  89. package/dist/integrations/webhooks.d.mts +1 -1
  90. package/dist/integrations/webhooks.mjs +4 -3
  91. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  92. package/dist/integrations/websocket-redis.mjs +1 -1
  93. package/dist/integrations/websocket.mjs +2 -2
  94. package/dist/{jsonBody-DpRpKR_K.mjs → jsonBody-CzDBkCme.mjs} +2 -2
  95. package/dist/{keys-FBz6Ull-.mjs → keys-Cbwf6r1B.mjs} +1 -1
  96. package/dist/{loadResources-Bx1sKPnF.mjs → loadResources-Kr6vuljv.mjs} +3 -3
  97. package/dist/{loadResourcesFromEntry-b_jcqbxh.mjs → loadResourcesFromEntry-D2e0qoDR.mjs} +2 -2
  98. package/dist/logger/index.mjs +2 -2
  99. package/dist/{logger-CbFcIEBZ.mjs → logger-C110X5Yz.mjs} +1 -1
  100. package/dist/{mcpPlugin-yix548XX.mjs → mcpPlugin-4lIPr9OJ.mjs} +22 -22
  101. package/dist/{memory-Bgw5dn8N.mjs → memory-D9qkhXiB.mjs} +3 -3
  102. package/dist/{metrics-CZDQWVjS.mjs → metrics-B-qrrWfI.mjs} +3 -3
  103. package/dist/middleware/index.d.mts +1 -1
  104. package/dist/middleware/index.mjs +3 -3
  105. package/dist/migrations/index.mjs +2 -2
  106. package/dist/{module-Dsc_nKL5.mjs → module-BD8xHgrz.mjs} +1 -1
  107. package/dist/{multiTenant-XCxAUlru.d.mts → multiTenant-KZj8j1uJ.d.mts} +1 -1
  108. package/dist/{multipartBody-B85ek8Kj.mjs → multipartBody-qU7KCn1l.mjs} +1 -1
  109. package/dist/{observeSend-BK-JN1jK.mjs → observeSend-BnPtTotW.mjs} +1 -1
  110. package/dist/{openapi-Co7hl073.mjs → openapi-DoVa5SVP.mjs} +6 -6
  111. package/dist/outbox-admin/index.mjs +5 -5
  112. package/dist/{outbox-module-XvUThpqn.d.mts → outbox-module-5Mnwcycy.d.mts} +1 -1
  113. package/dist/outbox-module-DyITEIop.mjs +297 -0
  114. package/dist/permissions/index.mjs +7 -7
  115. package/dist/{permissions-A1oKtpiC.mjs → permissions-BBy4bOGi.mjs} +9 -9
  116. package/dist/{pipe-Czpw9U2n.mjs → pipe-BOm2o4UA.mjs} +2 -2
  117. package/dist/pipeline/index.d.mts +1 -1
  118. package/dist/pipeline/index.mjs +2 -2
  119. package/dist/{plan-KVseuBCL.mjs → plan-DDIGwuxr.mjs} +1 -1
  120. package/dist/{plugin-DTWt_8C3.mjs → plugin-Bn4D_0XK.mjs} +48 -24
  121. package/dist/plugins/index.d.mts +2 -2
  122. package/dist/plugins/index.mjs +17 -17
  123. package/dist/plugins/response-cache.mjs +4 -4
  124. package/dist/plugins/tracing-entry.mjs +2 -2
  125. package/dist/{pluralize-msB9X3yw.mjs → pluralize-ClEjcKlG.mjs} +1 -1
  126. package/dist/policy.types-DPqToKG1.d.mts +50 -0
  127. package/dist/presets/filesUpload.d.mts +1 -1
  128. package/dist/presets/filesUpload.mjs +5 -5
  129. package/dist/presets/index.d.mts +2 -2
  130. package/dist/presets/index.mjs +2 -2
  131. package/dist/presets/multiTenant.d.mts +1 -1
  132. package/dist/presets/multiTenant.mjs +5 -5
  133. package/dist/presets/search.d.mts +1 -1
  134. package/dist/presets/search.mjs +2 -2
  135. package/dist/{presets-qKCehiJM.mjs → presets-DK2jh5YR.mjs} +4 -4
  136. package/dist/{projection-ClBqtsIw.mjs → projection-BHH-sXyS.mjs} +2 -2
  137. package/dist/purger.types-2wNJK_89.mjs +24 -0
  138. package/dist/purger.types-DvPp4-yd.d.mts +26 -0
  139. package/dist/{queryCachePlugin-3gJj5Rbz.mjs → queryCachePlugin-Ckqe98AM.mjs} +6 -6
  140. package/dist/{rateLimitKey-Kro---xl.mjs → rateLimitKey-CWAjlqcN.mjs} +1 -1
  141. package/dist/{realtime-Ber8uJN2.mjs → realtime-BIJi9USY.mjs} +11 -11
  142. package/dist/registry/index.d.mts +2 -2
  143. package/dist/registry/index.mjs +3 -3
  144. package/dist/{registry-BA-_vFYk.mjs → registry-y9ZA-R_J.mjs} +2 -2
  145. package/dist/{outbox-module-mg9kDYkd.mjs → relay-BNrC1CEP.mjs} +5 -299
  146. package/dist/{renewingLease-CMY8YOcc.mjs → renewingLease-CS43br5E.mjs} +1 -1
  147. package/dist/{replyHelpers-DK9P_XSz.mjs → replyHelpers-oZDzakGb.mjs} +2 -2
  148. package/dist/{requestContext-GYO_0gEw.mjs → requestContext-fWb_YaV2.mjs} +1 -1
  149. package/dist/{requirement-DeNjZIH3.mjs → requirement--2hWyyHi.mjs} +1 -1
  150. package/dist/{resourceRateLimit-tHLbrtWc.mjs → resourceRateLimit-1WbcyMZY.mjs} +2 -2
  151. package/dist/{rolldown-runtime-Kv1fZdLg.mjs → rolldown-runtime-yH2lHMo_.mjs} +1 -1
  152. package/dist/{routeValidator-C_H5NanI.mjs → routeValidator-BSlRIA5c.mjs} +1 -1
  153. package/dist/{runtimeCapabilities-DWqbxkyw.mjs → runtimeCapabilities-CYCEtU1W.mjs} +1 -1
  154. package/dist/{schedules-eO_RzhCU.mjs → schedules-B5WGlYIT.mjs} +5 -5
  155. package/dist/{schemaConverter-DBJrPZN4.mjs → schemaConverter-DtNvts-6.mjs} +2 -2
  156. package/dist/{schemaIR-CEScKT2v.mjs → schemaIR-uS_RHqa3.mjs} +2 -2
  157. package/dist/schemas/index.mjs +1 -1
  158. package/dist/scim/index.mjs +2 -2
  159. package/dist/scope/index.mjs +5 -5
  160. package/dist/{scope-B-Sm9m_E.mjs → scope-BwVLSyNG.mjs} +4 -4
  161. package/dist/{shutdown-DzLFbe27.mjs → shutdown-BJiJN7FT.mjs} +1 -1
  162. package/dist/{simpleEqualityMatcher-DOJhwQ8g.mjs → simpleEqualityMatcher-DGRLq-1k.mjs} +1 -1
  163. package/dist/{sse-2972pVwV.mjs → sse-B_50llZu.mjs} +7 -7
  164. package/dist/{sseStream-AWLEeNV-.mjs → sseStream-BjSo9Ult.mjs} +2 -2
  165. package/dist/{store-helpers-VzjgVTkM.mjs → store-helpers-D-n5cwy5.mjs} +1 -1
  166. package/dist/{streaming-DvraWW6x.mjs → streaming-Dcgqa-hH.mjs} +1 -1
  167. package/dist/{subscriberIdentity-Bya56jsg.mjs → subscriberIdentity-C9KhIXTF.mjs} +1 -1
  168. package/dist/{tenancy-DSa_0hhw.mjs → tenancy-COrhjPRZ.mjs} +2 -2
  169. package/dist/{tenantPreparation-BrpkQre3.mjs → tenantPreparation-BElWHytd.mjs} +4 -4
  170. package/dist/testing/cleanupStoreContract.mjs +1 -1
  171. package/dist/testing/index.d.mts +3 -3
  172. package/dist/testing/index.mjs +11 -11
  173. package/dist/testing/outboxStoreContract.mjs +2 -2
  174. package/dist/testing/requiredPorts.mjs +2 -2
  175. package/dist/testing/storageContract.mjs +1 -1
  176. package/dist/{timing-6rQTuCwg.mjs → timing-CaxKbRk_.mjs} +1 -1
  177. package/dist/{transactionContext-DaxYUEgH.mjs → transactionContext-8qKON0Nk.mjs} +1 -1
  178. package/dist/{typeGuards-UKnX8wPX.mjs → typeGuards-DVjVSsXO.mjs} +1 -1
  179. package/dist/types/index.d.mts +1 -1
  180. package/dist/types/index.mjs +1 -1
  181. package/dist/types/storage.mjs +1 -1
  182. package/dist/{types-CuGjhn83.mjs → types-DZHqOuJE.mjs} +4 -4
  183. package/dist/{types-BYEb_dLW.d.mts → types-DeLiuaNv.d.mts} +1 -1
  184. package/dist/usage/index.mjs +4 -4
  185. package/dist/{userHelpers-oX5_mOVs.mjs → userHelpers-_eGj6kf0.mjs} +1 -1
  186. package/dist/utils/index.d.mts +1 -1
  187. package/dist/utils/index.mjs +12 -12
  188. package/dist/{utils-CjjGOT4E.mjs → utils-Dd6MWpye.mjs} +5 -5
  189. package/dist/{validate-4RlTKOJb.mjs → validate-BaF5wd0x.mjs} +3 -3
  190. package/dist/{versioning-Dk2-19La.mjs → versioning-DyV7mwtK.mjs} +3 -3
  191. package/dist/{workScope-DoBsoVo4.mjs → workScope-CmCBUmPR.mjs} +2 -2
  192. package/package.json +48 -20
@@ -1,23 +1,23 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { g as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-CHZMUwBW.mjs";
3
- import { t as arcLog } from "./logger-CbFcIEBZ.mjs";
4
- import { t as conjoinPolicyFilters } from "./filter-merge-BAWi019Q.mjs";
5
- import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError, u as ValidationError } from "./errors-BY8vzlP4.mjs";
6
- import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-DOJhwQ8g.mjs";
7
- import { n as requireSingleHeaderValue } from "./headers-DBd3Qheo.mjs";
8
- import { n as getUserRoles, t as getUserId } from "./userHelpers-oX5_mOVs.mjs";
9
- import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-CuGjhn83.mjs";
10
- import { r as resolveTenancy } from "./tenancy-DSa_0hhw.mjs";
11
- import { t as buildQueryKey } from "./keys-FBz6Ull-.mjs";
12
- import { t as transactionContext } from "./transactionContext-DaxYUEgH.mjs";
13
- import { a as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-LnbCcvsw.mjs";
14
- import { E as ArcQueryParser, v as getDefaultCrudSchemas } from "./utils-CjjGOT4E.mjs";
15
- import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-DBJrPZN4.mjs";
16
- import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-DvraWW6x.mjs";
17
- import { _ as buildArcDecorator, a as resolveRouterPluginMw, b as createRequestContext, c as buildPipelineHandler, d as buildCrudPermissionMw, f as buildRouteHooks, h as buildAuthMiddleware, i as buildRouteConfig, l as resolvePipelineSteps, m as routeHookOptions, n as tryRegisterRoute, o as selectPluginMw, p as resolveRoutePreHandlers, r as buildRateLimitConfig, t as resolveActionPermission, v as createCrudHandlers, y as createFastifyHandler } from "./actionPermissions-De0AJ7hm.mjs";
18
- import { a as withoutTenantInjection } from "./tenantPreparation-BrpkQre3.mjs";
19
- import { t as hasEvents } from "./typeGuards-UKnX8wPX.mjs";
20
- import { n as idempotencyConfigProblem } from "./requirement-DeNjZIH3.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { g as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-Cx7BcnHT.mjs";
3
+ import { t as arcLog } from "./logger-C110X5Yz.mjs";
4
+ import { t as conjoinPolicyFilters } from "./filter-merge-6kasezRH.mjs";
5
+ import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError, u as ValidationError } from "./errors-DnrUChAy.mjs";
6
+ import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-DGRLq-1k.mjs";
7
+ import { n as requireSingleHeaderValue } from "./headers-KxhrKevA.mjs";
8
+ import { n as getUserRoles, t as getUserId } from "./userHelpers-_eGj6kf0.mjs";
9
+ import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-DZHqOuJE.mjs";
10
+ import { r as resolveTenancy } from "./tenancy-COrhjPRZ.mjs";
11
+ import { t as buildQueryKey } from "./keys-Cbwf6r1B.mjs";
12
+ import { t as transactionContext } from "./transactionContext-8qKON0Nk.mjs";
13
+ import { a as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-CYdpcV73.mjs";
14
+ import { E as ArcQueryParser, v as getDefaultCrudSchemas } from "./utils-Dd6MWpye.mjs";
15
+ import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-DtNvts-6.mjs";
16
+ import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-Dcgqa-hH.mjs";
17
+ import { _ as buildArcDecorator, a as resolveRouterPluginMw, b as createRequestContext, c as buildPipelineHandler, d as buildCrudPermissionMw, f as buildRouteHooks, h as buildAuthMiddleware, i as buildRouteConfig, l as resolvePipelineSteps, m as routeHookOptions, n as tryRegisterRoute, o as selectPluginMw, p as resolveRoutePreHandlers, r as buildRateLimitConfig, t as resolveActionPermission, v as createCrudHandlers, y as createFastifyHandler } from "./actionPermissions-DXrlWHHK.mjs";
18
+ import { a as withoutTenantInjection } from "./tenantPreparation-BElWHytd.mjs";
19
+ import { t as hasEvents } from "./typeGuards-DVjVSsXO.mjs";
20
+ import { n as idempotencyConfigProblem } from "./requirement--2hWyyHi.mjs";
21
21
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
22
22
  import { policyRecordToFilter } from "@classytic/repo-core/filter";
23
23
  import { retryingTransaction } from "@classytic/repo-core/repository";
@@ -2247,6 +2247,29 @@ function methodCarriesBody(method) {
2247
2247
  * SINGLE `config` key Fastify reads. Returns arc's object untouched when the host
2248
2248
  * supplied none, so the route options stay literally what was declared.
2249
2249
  */
2250
+ /** The `config.httpCache` a CRUD read route carries when its resource declared `httpCache`. */
2251
+ function routeHttpCache(httpCache, resourceName, op) {
2252
+ if (!httpCache || op !== "list" && op !== "get") return void 0;
2253
+ const policy = op === "list" ? httpCache.list : httpCache.get;
2254
+ if (!policy) return void 0;
2255
+ const extra = httpCache.tags?.extra;
2256
+ return {
2257
+ ...policy,
2258
+ resource: {
2259
+ name: resourceName,
2260
+ op,
2261
+ ...extra ? { extra } : {}
2262
+ }
2263
+ };
2264
+ }
2265
+ /** Add `httpCache` to a route's `config`, keeping whatever `buildRouteConfig` produced. */
2266
+ function withHttpCache(base, policy) {
2267
+ if (!policy) return base;
2268
+ return { config: {
2269
+ ...base.config ?? {},
2270
+ httpCache: policy
2271
+ } };
2272
+ }
2250
2273
  function mergeRouteConfig(hostConfig, arcConfig) {
2251
2274
  if (!hostConfig) return arcConfig;
2252
2275
  return { config: {
@@ -2375,7 +2398,7 @@ function createCustomRoutes(fastify, routes, controller, options) {
2375
2398
  * @param options - Router configuration
2376
2399
  */
2377
2400
  function createCrudRouter(fastify, controller, options = {}) {
2378
- const { tag = "Resource", schemas = {}, permissions = {}, middlewares = {}, routeGuards = [], routes: customRoutes = [], disableDefaultRoutes = false, disabledRoutes = [], resourceName = "unknown", schemaOptions, rateLimit, pipe: pipeline, fields: fieldPermissions, onFieldWriteDenied, updateMethod = DEFAULT_UPDATE_METHOD, idField, extensions, idempotency } = options;
2401
+ const { tag = "Resource", schemas = {}, permissions = {}, middlewares = {}, routeGuards = [], routes: customRoutes = [], disableDefaultRoutes = false, disabledRoutes = [], resourceName = "unknown", schemaOptions, rateLimit, pipe: pipeline, fields: fieldPermissions, onFieldWriteDenied, updateMethod = DEFAULT_UPDATE_METHOD, idField, extensions, idempotency, httpCache } = options;
2379
2402
  const idempotentOps = new Set(idempotency?.required ?? []);
2380
2403
  for (const op of idempotentOps) if (disableDefaultRoutes || disabledRoutes.includes(op)) throw new Error(`[arc] Resource "${resourceName}" declares idempotency.required '${op}', but that built-in route is not mounted — drop it from idempotency.required.`);
2381
2404
  const rateLimitConfig = buildRateLimitConfig(rateLimit);
@@ -2473,7 +2496,7 @@ function createCrudRouter(fastify, controller, options = {}) {
2473
2496
  }, defaultSchemas[spec.op], schemas[spec.op]),
2474
2497
  ...routeHookOptions(hooks),
2475
2498
  handler: handlers[spec.op],
2476
- ...buildRouteConfig(rateLimitConfig, extensions, void 0, idempotentOps.has(spec.op) ? { required: true } : void 0)
2499
+ ...withHttpCache(buildRouteConfig(rateLimitConfig, extensions, void 0, idempotentOps.has(spec.op) ? { required: true } : void 0), routeHttpCache(httpCache, resourceName, spec.op))
2477
2500
  }, {
2478
2501
  resourceName,
2479
2502
  op: spec.op
@@ -3145,6 +3168,7 @@ function buildResourcePlugin(resource) {
3145
3168
  schemaOptions: resource.schemaOptions,
3146
3169
  rateLimit: resource.rateLimit,
3147
3170
  idempotency: resource.idempotency,
3171
+ httpCache: resource.httpCache,
3148
3172
  updateMethod: resource.updateMethod,
3149
3173
  pipe: resource.pipe,
3150
3174
  fields: resource.fields,
@@ -3153,7 +3177,7 @@ function buildResourcePlugin(resource) {
3153
3177
  extensions: resource.extensions
3154
3178
  });
3155
3179
  if (resource.actions && Object.keys(resource.actions).length > 0) {
3156
- const { createActionRouter } = await import("./createActionRouter-0qkCRzTL.mjs").then((n) => n.n);
3180
+ const { createActionRouter } = await import("./createActionRouter-mLAGbpDV.mjs").then((n) => n.n);
3157
3181
  const actionConfig = normalizeActionsToRouterConfig(resource.actions, resource.actionPermissions, resource.tag, resource.permissions, resource.name, typedInstance.log);
3158
3182
  const actionTarget = resolveActionTargetFence(resource, actionConfig);
3159
3183
  createActionRouter(typedInstance, {
@@ -3173,7 +3197,7 @@ function buildResourcePlugin(resource) {
3173
3197
  });
3174
3198
  }
3175
3199
  if (resource.aggregations && Object.keys(resource.aggregations).length > 0) {
3176
- const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-CUf5Esd9.mjs"), import("./validate-4RlTKOJb.mjs").then((n) => n.r)]);
3200
+ const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-BEAjn3dA.mjs"), import("./validate-BaF5wd0x.mjs").then((n) => n.r)]);
3177
3201
  const repoForAgg = resource.controller?.repository ?? resource.repository;
3178
3202
  if (!adapterSupportsAggregate(repoForAgg)) {
3179
3203
  const undispatchable = Object.entries(resource.aggregations).filter(([, cfg]) => !cfg.materialized).map(([name]) => name);
@@ -1,9 +1,9 @@
1
1
 
2
2
  import { t as AnyRecord } from "../base-HXNgPQww.mjs";
3
- import { Et as RouteDefinition, J as MiddlewareConfig, U as PresetHook, X as RouteSchemaOptions } from "../index-DyJFTJLA.mjs";
3
+ import { Et as RouteDefinition, J as MiddlewareConfig, U as PresetHook, X as RouteSchemaOptions } from "../index-Cy2-QffW.mjs";
4
4
  import { i as errorHandlerPlugin, n as ErrorMapper, r as defaultIsDuplicateKeyError, t as ErrorHandlerOptions } from "../errorHandler-B9r88jZV.mjs";
5
5
  import { A as DailyLedger, C as ScheduleStats, D as DailyClock, E as DailyClaimInfo, F as HealthCheck, I as HealthOptions, L as _default$3, M as MemoryDailyLedger, N as createDailyGate, O as DailyGate, P as createMemoryDailyLedger, S as ScheduleRunContext, T as _default$8, b as DailyScheduleOptions, j as DailyRunOutcome, k as DailyGateOptions, w as SchedulesPluginOptions, x as ScheduleDefinition } from "../types-BeEJm-DV.mjs";
6
- import { i as _default, n as ArcCorePluginOptions, r as PluginMeta, t as ArcCore } from "../fastify-augmentation-Dtn0IIRn.mjs";
6
+ import { i as _default, n as ArcCorePluginOptions, r as PluginMeta, t as ArcCore } from "../fastify-augmentation-bzkWPt1f.mjs";
7
7
  import { _ as ShutdownState, a as MetricsOptions, c as RealtimeOptions, d as SSEStats, f as _default$9, g as GracefulShutdownOptions, h as _default$1, i as MetricsCollector, l as _default$6, m as CachingRule, n as _default$10, o as _default$4, p as CachingOptions, r as MetricEntry, s as ChangeOperation, t as VersioningOptions, u as SSEOptions, v as _default$2 } from "../versioning-S18y2-0C.mjs";
8
8
  import { t as TracingOptions } from "../tracing-JSFiBl5r.mjs";
9
9
  import { PaginatedResult } from "@classytic/repo-core/pagination";
@@ -1,20 +1,20 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { m as MUTATION_OPERATIONS } from "../constants-CHZMUwBW.mjs";
3
- import { t as arcLog } from "../logger-CbFcIEBZ.mjs";
4
- import { c as getOrgId } from "../types-CuGjhn83.mjs";
5
- import { n as requestContext } from "../requestContext-GYO_0gEw.mjs";
6
- import { t as hasEvents } from "../typeGuards-UKnX8wPX.mjs";
7
- import { t as HookSystem } from "../HookSystem-DRbPzEcP.mjs";
8
- import { t as ResourceRegistry } from "../ResourceRegistry-Douk51fa.mjs";
9
- import { c as createRequestIdGenerator, l as requestId_default, n as health_default, u as sanitizeRequestId } from "../health-Dp-3EC9o.mjs";
10
- import { t as caching_default } from "../caching-BYRwYrUo.mjs";
11
- import { i as createMemoryDailyLedger, r as createDailyGate, t as schedules_default } from "../schedules-eO_RzhCU.mjs";
12
- import { n as errorHandlerPlugin, t as defaultIsDuplicateKeyError } from "../errorHandler-dFyGOEoB.mjs";
13
- import { t as metrics_default } from "../metrics-CZDQWVjS.mjs";
14
- import { t as realtime_default } from "../realtime-Ber8uJN2.mjs";
15
- import { t as replyHelpersPlugin } from "../replyHelpers-DK9P_XSz.mjs";
16
- import { t as sse_default } from "../sse-2972pVwV.mjs";
17
- import { t as versioning_default } from "../versioning-Dk2-19La.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { m as MUTATION_OPERATIONS } from "../constants-Cx7BcnHT.mjs";
3
+ import { t as arcLog } from "../logger-C110X5Yz.mjs";
4
+ import { c as getOrgId } from "../types-DZHqOuJE.mjs";
5
+ import { n as requestContext } from "../requestContext-fWb_YaV2.mjs";
6
+ import { t as hasEvents } from "../typeGuards-DVjVSsXO.mjs";
7
+ import { t as HookSystem } from "../HookSystem-CAIDVoKC.mjs";
8
+ import { t as ResourceRegistry } from "../ResourceRegistry-23Ml6FNe.mjs";
9
+ import { c as createRequestIdGenerator, l as requestId_default, n as health_default, u as sanitizeRequestId } from "../health-jkYNdobJ.mjs";
10
+ import { t as caching_default } from "../caching-QRiryDLs.mjs";
11
+ import { i as createMemoryDailyLedger, r as createDailyGate, t as schedules_default } from "../schedules-B5WGlYIT.mjs";
12
+ import { n as errorHandlerPlugin, t as defaultIsDuplicateKeyError } from "../errorHandler-BiBXtxj4.mjs";
13
+ import { t as metrics_default } from "../metrics-B-qrrWfI.mjs";
14
+ import { t as realtime_default } from "../realtime-BIJi9USY.mjs";
15
+ import { t as replyHelpersPlugin } from "../replyHelpers-oZDzakGb.mjs";
16
+ import { t as sse_default } from "../sse-B_50llZu.mjs";
17
+ import { t as versioning_default } from "../versioning-DyV7mwtK.mjs";
18
18
  import fp from "fastify-plugin";
19
19
  import { performance as performance$1 } from "node:perf_hooks";
20
20
  // src/core/arcCorePlugin.ts
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-DWqbxkyw.mjs";
3
- import { t as hasEvents } from "../typeGuards-UKnX8wPX.mjs";
4
- import { n as evictToSize, r as touch, t as assertCapacity } from "../boundedMap-2WBh3gM9.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-CYCEtU1W.mjs";
3
+ import { t as hasEvents } from "../typeGuards-DVjVSsXO.mjs";
4
+ import { n as evictToSize, r as touch, t as assertCapacity } from "../boundedMap-CtdzpJ3X.mjs";
5
5
  import fp from "fastify-plugin";
6
6
  // src/plugins/response-cache.ts
7
7
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
2
  import { createRequire } from "node:module";
3
3
  import fp from "fastify-plugin";
4
4
  // src/plugins/tracing.ts
@@ -59,7 +59,7 @@ try {
59
59
  function createTracerProvider(options) {
60
60
  if (!isAvailable || !NodeTracerProvider || !BatchSpanProcessor || !OTLPTraceExporter) return null;
61
61
  const { serviceName = "@classytic/arc", serviceVersion, exporterUrl = "http://localhost:4318/v1/traces" } = options;
62
- const resolvedVersion = serviceVersion ?? "2.46.0";
62
+ const resolvedVersion = serviceVersion ?? "2.47.0";
63
63
  const exporter = new OTLPTraceExporter({ url: exporterUrl });
64
64
  const provider = new NodeTracerProvider({ resource: { attributes: {
65
65
  "service.name": serviceName,
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
2
  // src/utils/pluralize.ts
3
3
  /**
4
4
  * Lightweight English pluralization for the Arc CLI.
@@ -0,0 +1,50 @@
1
+
2
+ import { FastifyRequest } from "fastify";
3
+ /** Tags for one response: a fixed list, or computed from the request and the reply body. */
4
+ type TagSpec = readonly string[] | ((request: FastifyRequest, body: unknown) => readonly string[] | undefined);
5
+ /** How one route may be cached. Seconds throughout. */
6
+ interface HttpCachePolicy {
7
+ /** Shared-cache (CDN) TTL. Must be > 0. */
8
+ cdn: number;
9
+ /** Browser TTL. A browser copy cannot be purged, so keep it short. Default 0. */
10
+ browser?: number;
11
+ /** Serve a stale copy while one request refreshes it (RFC 5861). CDN only. */
12
+ staleWhileRevalidate?: number;
13
+ /** Serve the last good copy while the origin errors (RFC 5861). Browser and CDN. */
14
+ staleIfError?: number;
15
+ /** Purge tags carried by the response, in addition to any derived ones. */
16
+ tags?: TagSpec;
17
+ }
18
+ /** A path-prefix rule, for routes that cannot carry `config`. */
19
+ interface HttpCacheRule extends HttpCachePolicy {
20
+ /** Path prefix, matched against the URL path without its query string. */
21
+ match: string;
22
+ }
23
+ /** Extra tags for one document: added to the derived `<resource>` / `<resource>:<id>`. */
24
+ type DocumentTags = (doc: unknown) => readonly string[] | undefined;
25
+ /** `defineResource({ httpCache })`: one policy per read operation; tags and purges derived from the resource. */
26
+ interface ResourceHttpCacheConfig {
27
+ list?: HttpCachePolicy;
28
+ get?: HttpCachePolicy;
29
+ tags?: {
30
+ extra?: DocumentTags;
31
+ };
32
+ }
33
+ /** What arc puts in a CRUD route's `config.httpCache` for a resource that declared `httpCache`. */
34
+ interface RouteHttpCacheConfig extends HttpCachePolicy {
35
+ resource?: {
36
+ name: string;
37
+ op: "list" | "get";
38
+ extra?: DocumentTags;
39
+ };
40
+ }
41
+ type PrivacyReason = `header:${string}` | `cookie:${string}` | `scope:${string}` | "classifier";
42
+ type PrivacyDecision = {
43
+ private: false;
44
+ } | {
45
+ private: true;
46
+ reason: PrivacyReason;
47
+ };
48
+ /** Why a response on an opted-in route was not made public. */
49
+ type NonCacheableReason = PrivacyReason | "status" | "set-cookie";
50
+ export { PrivacyDecision as a, RouteHttpCacheConfig as c, NonCacheableReason as i, TagSpec as l, HttpCachePolicy as n, PrivacyReason as o, HttpCacheRule as r, ResourceHttpCacheConfig as s, DocumentTags as t };
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { i as RequestScope } from "../types-DnkIALZ8.mjs";
3
3
  import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
4
- import { W as PresetResult } from "../index-DyJFTJLA.mjs";
4
+ import { W as PresetResult } from "../index-Cy2-QffW.mjs";
5
5
  import { a as StorageReadResult, i as StorageReadRange, n as StorageContext, o as StorageUploadInput, r as StorageFile, t as Storage } from "../storage-odC5MNKN.mjs";
6
6
  export interface FilesUploadPresetRoutes {
7
7
  upload?: boolean;
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { i as NotFoundError, u as ValidationError } from "../errors-BY8vzlP4.mjs";
3
- import { c as getOrgId, g as getUserId } from "../types-CuGjhn83.mjs";
4
- import { B as requireAuth, F as allowPublic } from "../permissions-A1oKtpiC.mjs";
5
- import { t as multipartBody } from "../multipartBody-B85ek8Kj.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { i as NotFoundError, u as ValidationError } from "../errors-DnrUChAy.mjs";
3
+ import { c as getOrgId, g as getUserId } from "../types-DZHqOuJE.mjs";
4
+ import { B as requireAuth, F as allowPublic } from "../permissions-BBy4bOGi.mjs";
5
+ import { t as multipartBody } from "../multipartBody-qU7KCn1l.mjs";
6
6
  // src/presets/filesUpload.ts
7
7
  const DEFAULT_FIELD_NAME = "file";
8
8
  const DEFAULT_MAX_FILE_SIZE = 10485760;
@@ -1,8 +1,8 @@
1
1
 
2
2
  import { t as AnyRecord } from "../base-HXNgPQww.mjs";
3
- import { Hn as IRequestContext, L as ResourceConfig, Vn as IControllerResponse, W as PresetResult, i as PaginationResult } from "../index-DyJFTJLA.mjs";
3
+ import { Hn as IRequestContext, L as ResourceConfig, Vn as IControllerResponse, W as PresetResult, i as PaginationResult } from "../index-Cy2-QffW.mjs";
4
4
  import { FilesUploadPresetOptions, FilesUploadPresetPermissions, FilesUploadPresetRoutes, filesUploadPreset } from "./filesUpload.mjs";
5
- import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-XCxAUlru.mjs";
5
+ import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-KZj8j1uJ.mjs";
6
6
  import { SearchHandler, SearchPresetOptions, SearchRouteConfig, searchPreset } from "./search.mjs";
7
7
  interface AuditedPresetOptions {
8
8
  /** Field name for creator (default: 'createdBy') */
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-qKCehiJM.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-DK2jh5YR.mjs";
3
3
  import { filesUploadPreset } from "./filesUpload.mjs";
4
4
  import { multiTenantPreset } from "./multiTenant.mjs";
5
5
  import { searchPreset } from "./search.mjs";
@@ -1,3 +1,3 @@
1
1
 
2
- import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-XCxAUlru.mjs";
2
+ import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-KZj8j1uJ.mjs";
3
3
  export { MultiTenantOptions, type TenantFieldSpec, multiTenantPreset };
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import "../constants-CHZMUwBW.mjs";
3
- import { t as ArcError } from "../errors-BY8vzlP4.mjs";
4
- import { u as getRequestScope } from "../types-CuGjhn83.mjs";
5
- import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-BrpkQre3.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import "../constants-Cx7BcnHT.mjs";
3
+ import { t as ArcError } from "../errors-DnrUChAy.mjs";
4
+ import { u as getRequestScope } from "../types-DZHqOuJE.mjs";
5
+ import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-BElWHytd.mjs";
6
6
  // src/presets/multiTenant.ts
7
7
  function createTenantMiddleware(specs, mode) {
8
8
  const preparation = {
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
3
- import { Dt as RouteMcpConfig, Et as RouteDefinition, Ln as ControllerHandler, W as PresetResult } from "../index-DyJFTJLA.mjs";
3
+ import { Dt as RouteMcpConfig, Et as RouteDefinition, Ln as ControllerHandler, W as PresetResult } from "../index-Cy2-QffW.mjs";
4
4
  /**
5
5
  * Search Preset — backend-agnostic search / vector / embed routes
6
6
  *
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { B as requireAuth, F as allowPublic } from "../permissions-A1oKtpiC.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { B as requireAuth, F as allowPublic } from "../permissions-BBy4bOGi.mjs";
3
3
  // src/presets/search.ts
4
4
  const BUILTINS = [
5
5
  {
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { l as UnauthorizedError } from "./errors-BY8vzlP4.mjs";
3
- import { b as isElevated, n as PUBLIC_SCOPE } from "./types-CuGjhn83.mjs";
4
- import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-A1oKtpiC.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { l as UnauthorizedError } from "./errors-DnrUChAy.mjs";
3
+ import { b as isElevated, n as PUBLIC_SCOPE } from "./types-DZHqOuJE.mjs";
4
+ import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-BBy4bOGi.mjs";
5
5
  import { multiTenantPreset } from "./presets/multiTenant.mjs";
6
6
  // src/presets/audited.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-CuGjhn83.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-DZHqOuJE.mjs";
3
3
  // src/scope/projection.ts
4
4
  /**
5
5
  * Compute the request-scope projection. Returns `undefined` when no
@@ -0,0 +1,24 @@
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ // src/http-cache/purgers/purger.types.ts
3
+ /** A purge the CDN refused or never answered: a closed code plus the provider's own codes, never a credential. */
4
+ var CachePurgeError = class extends Error {
5
+ code = "http_cache.purge_failed";
6
+ purger;
7
+ status;
8
+ providerCodes;
9
+ constructor(purger, message, status, providerCodes = []) {
10
+ super(message);
11
+ this.name = "CachePurgeError";
12
+ this.purger = purger;
13
+ this.status = status;
14
+ this.providerCodes = providerCodes;
15
+ }
16
+ };
17
+ /** Split tags into calls of at most `size`. */
18
+ function chunkTags(tags, size) {
19
+ if (!size || size >= tags.length) return [[...tags]];
20
+ const out = [];
21
+ for (let i = 0; i < tags.length; i += size) out.push(tags.slice(i, i + size));
22
+ return out;
23
+ }
24
+ export { chunkTags as n, CachePurgeError as t };
@@ -0,0 +1,26 @@
1
+
2
+ /** `hard` evicts; `soft` marks stale so the next visitor gets the old copy while one request refreshes it. */
3
+ type PurgeMode = "hard" | "soft";
4
+ interface PurgerCapabilities {
5
+ /** The vendor can mark content stale instead of evicting it. Absent: soft purges are sent hard. */
6
+ readonly softPurge?: boolean;
7
+ /** Tags per call. arc splits larger batches; each chunk is delivered (and retried) on its own. */
8
+ readonly maxTagsPerCall?: number;
9
+ }
10
+ /** Purges cached responses by tag. Throws on failure: arc logs, counts, and (durably) retries. */
11
+ interface CachePurger {
12
+ readonly name: string;
13
+ readonly capabilities?: PurgerCapabilities;
14
+ purgeTags(tags: readonly string[], options: {
15
+ mode: PurgeMode;
16
+ }): Promise<void>;
17
+ }
18
+ /** A purge the CDN refused or never answered: a closed code plus the provider's own codes, never a credential. */
19
+ declare class CachePurgeError extends Error {
20
+ readonly code = "http_cache.purge_failed";
21
+ readonly purger: string;
22
+ readonly status: number | undefined;
23
+ readonly providerCodes: readonly (number | string)[];
24
+ constructor(purger: string, message: string, status?: number, providerCodes?: readonly (number | string)[]);
25
+ }
26
+ export { PurgerCapabilities as i, CachePurger as n, PurgeMode as r, CachePurgeError as t };
@@ -1,9 +1,9 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-Kv1fZdLg.mjs";
3
- import { i as versionKey, r as tagVersionKey } from "./keys-FBz6Ull-.mjs";
4
- import { n as declareRuntimeCapability } from "./runtimeCapabilities-DWqbxkyw.mjs";
5
- import { t as hasEvents } from "./typeGuards-UKnX8wPX.mjs";
6
- import { t as MemoryCacheStore } from "./memory-Bgw5dn8N.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
3
+ import { i as versionKey, r as tagVersionKey } from "./keys-Cbwf6r1B.mjs";
4
+ import { n as declareRuntimeCapability } from "./runtimeCapabilities-CYCEtU1W.mjs";
5
+ import { t as hasEvents } from "./typeGuards-DVjVSsXO.mjs";
6
+ import { t as MemoryCacheStore } from "./memory-D9qkhXiB.mjs";
7
7
  import fp from "fastify-plugin";
8
8
  // src/cache/QueryCache.ts
9
9
  const MISS = Object.freeze({
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
2
  // src/scope/rateLimitKey.ts
3
3
  /**
4
4
  * Marks a key generator as SCOPE-AWARE, so `buildRateLimitOpts` can place the rate-limit
@@ -1,14 +1,14 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-Kv1fZdLg.mjs";
3
- import { t as arcLog } from "./logger-CbFcIEBZ.mjs";
4
- import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-DOJhwQ8g.mjs";
5
- import { n as getUserRoles } from "./userHelpers-oX5_mOVs.mjs";
6
- import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-DSa_0hhw.mjs";
7
- import { t as applyFieldReadPermissions } from "./fields-LnbCcvsw.mjs";
8
- import { a as promoteStreamTokenToHeader } from "./streaming-DvraWW6x.mjs";
9
- import { n as evaluateAndApplyPermission } from "./authorizationDecision-DeZMrHcm.mjs";
10
- import { t as openSseStream } from "./sseStream-AWLEeNV-.mjs";
11
- import { n as arcRouteValidatorCompiler } from "./routeValidator-C_H5NanI.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
3
+ import { t as arcLog } from "./logger-C110X5Yz.mjs";
4
+ import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-DGRLq-1k.mjs";
5
+ import { n as getUserRoles } from "./userHelpers-_eGj6kf0.mjs";
6
+ import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-COrhjPRZ.mjs";
7
+ import { t as applyFieldReadPermissions } from "./fields-CYdpcV73.mjs";
8
+ import { a as promoteStreamTokenToHeader } from "./streaming-Dcgqa-hH.mjs";
9
+ import { n as evaluateAndApplyPermission } from "./authorizationDecision-DYiubkYw.mjs";
10
+ import { t as openSseStream } from "./sseStream-BjSo9Ult.mjs";
11
+ import { n as arcRouteValidatorCompiler } from "./routeValidator-BSlRIA5c.mjs";
12
12
  import fp from "fastify-plugin";
13
13
  // src/plugins/realtime.ts
14
14
  var realtime_exports = /* @__PURE__ */ __exportAll({
@@ -1,6 +1,6 @@
1
1
 
2
- import { F as ResourceDefinition, G as CrudRouteKey, M as ResourceRegistry, N as RouteRow, S as IntrospectionPluginOptions, V as ResolvedTenantPurge, j as RegisterOptions, o as RegistryEntry } from "../index-DyJFTJLA.mjs";
3
- import "../fastify-augmentation-Dtn0IIRn.mjs";
2
+ import { F as ResourceDefinition, G as CrudRouteKey, M as ResourceRegistry, N as RouteRow, S as IntrospectionPluginOptions, V as ResolvedTenantPurge, j as RegisterOptions, o as RegistryEntry } from "../index-Cy2-QffW.mjs";
3
+ import "../fastify-augmentation-bzkWPt1f.mjs";
4
4
  import { TenantPurgeProgress, TenantPurgeStrategy } from "@classytic/repo-core/repository";
5
5
  import { FastifyPluginAsync } from "fastify";
6
6
  interface AssertNoTenantDataOptions {
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { a as getCascadingResources, i as cascadeDeleteForOrganization, n as buildResourceManifestFromRegistry, o as getCascadingResourcesWithMetadata, r as introspectionPlugin_default, s as assertNoTenantData, t as buildResourceManifest } from "../registry-BA-_vFYk.mjs";
3
- import { t as ResourceRegistry } from "../ResourceRegistry-Douk51fa.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { a as getCascadingResources, i as cascadeDeleteForOrganization, n as buildResourceManifestFromRegistry, o as getCascadingResourcesWithMetadata, r as introspectionPlugin_default, s as assertNoTenantData, t as buildResourceManifest } from "../registry-y9ZA-R_J.mjs";
3
+ import { t as ResourceRegistry } from "../ResourceRegistry-23Ml6FNe.mjs";
4
4
  export { ResourceRegistry, assertNoTenantData, buildResourceManifest, buildResourceManifestFromRegistry, cascadeDeleteForOrganization, getCascadingResources, getCascadingResourcesWithMetadata, introspectionPlugin_default as introspectionPlugin };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
- import { t as CRUD_OPERATIONS } from "./constants-CHZMUwBW.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as CRUD_OPERATIONS } from "./constants-Cx7BcnHT.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  // src/registry/assertNoTenantData.ts
5
5
  /**