@classytic/arc 2.31.0 → 2.33.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 (194) hide show
  1. package/README.md +1 -1
  2. package/bin/arc.js +58 -17
  3. package/dist/{BaseController-De7GqHck.mjs → BaseController-CaQC5EXX.mjs} +298 -35
  4. package/dist/{EventTransport-2uVV34WU.d.mts → EventTransport-BEVP50ka.d.mts} +16 -0
  5. package/dist/{EventTransport-9mlTgqzE.mjs → EventTransport-tq4CEB-q.mjs} +39 -2
  6. package/dist/{HookSystem-BcmPyq5I.mjs → HookSystem-DqXkMXkB.mjs} +2 -2
  7. package/dist/{ResourceRegistry-qq0mn2s9.mjs → ResourceRegistry-DoALUlOO.mjs} +18 -15
  8. package/dist/{actionPermissions-BE5NwaQk.mjs → actionPermissions-CUeCmpUd.mjs} +1 -1
  9. package/dist/audit/index.d.mts +2 -2
  10. package/dist/audit/index.mjs +2 -2
  11. package/dist/auth/audit.mjs +1 -1
  12. package/dist/auth/index.d.mts +2 -2
  13. package/dist/auth/index.mjs +44 -11
  14. package/dist/auth/redis-session.mjs +1 -1
  15. package/dist/{authorizationDecision-ChvUQGG1.mjs → authorizationDecision-B3mP_QTy.mjs} +2 -2
  16. package/dist/{types-B7XeLEgK.d.mts → base-Csjc2oF-.d.mts} +74 -74
  17. package/dist/{buildHandler-CDrCJzmB.mjs → buildHandler-DLE9xX-V.mjs} +6 -5
  18. package/dist/cache/index.mjs +4 -4
  19. package/dist/{caching-BFHA6Scf.mjs → caching-BcGmvnHh.mjs} +2 -2
  20. package/dist/cleanup/index.d.mts +52 -18
  21. package/dist/cleanup/index.mjs +281 -32
  22. package/dist/cli/commands/describe.d.mts +1 -1
  23. package/dist/cli/commands/describe.mjs +4 -6
  24. package/dist/cli/commands/docs.mjs +3 -3
  25. package/dist/cli/commands/doctor.mjs +1 -1
  26. package/dist/cli/commands/generate.mjs +2 -2
  27. package/dist/cli/commands/init.mjs +2 -2
  28. package/dist/cli/commands/introspect.mjs +2 -2
  29. package/dist/cli/index.mjs +3 -3
  30. package/dist/{constants-D3Dv4LAV.mjs → constants-BxCoxmiN.mjs} +1 -1
  31. package/dist/context/index.mjs +3 -3
  32. package/dist/core/index.d.mts +2 -2
  33. package/dist/core/index.mjs +7 -7
  34. package/dist/{core-BGpIxINN.mjs → core-dxhcHhUD.mjs} +3 -3
  35. package/dist/{createActionRouter-CDXEdasl.mjs → createActionRouter-DVpoA0do.mjs} +14 -11
  36. package/dist/{createAggregationRouter-KrQDzx-k.mjs → createAggregationRouter-B_B48JZ-.mjs} +10 -8
  37. package/dist/{createApp-Df89BEni.mjs → createApp-CLGegqiG.mjs} +287 -62
  38. package/dist/{defineAggregation-DbPPS8RI.mjs → defineAggregation-Nv-DwfOf.mjs} +1 -1
  39. package/dist/{defineResource-Bv6EtN1x.mjs → defineResource-DR9vsUYy.mjs} +318 -35
  40. package/dist/discovery/index.mjs +1 -1
  41. package/dist/docs/index.d.mts +1 -1
  42. package/dist/docs/index.mjs +3 -3
  43. package/dist/{elevation-D2l1mh4g.mjs → elevation-B0tlY8y1.mjs} +4 -4
  44. package/dist/encryption/index.mjs +5 -4
  45. package/dist/{errorHandler-C5NeD6bT.mjs → errorHandler-C7xBqHsI.mjs} +42 -5
  46. package/dist/{errorHandler-CpYUJmPA.d.mts → errorHandler-DI5AN2b5.d.mts} +14 -3
  47. package/dist/{errors-Cj42AntO.mjs → errors-Cd_yy7aW.mjs} +1 -1
  48. package/dist/{eventPlugin-GF5nnBIq.d.mts → eventPlugin-DSNEZWfV.d.mts} +29 -1
  49. package/dist/{eventPlugin-CkffEihm.mjs → eventPlugin-Dar8qRaj.mjs} +68 -11
  50. package/dist/events/index.d.mts +18 -297
  51. package/dist/events/index.mjs +7 -758
  52. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  53. package/dist/events/transports/redis-stream-entry.mjs +14 -10
  54. package/dist/events/transports/redis.d.mts +1 -1
  55. package/dist/events/transports/redis.mjs +1 -1
  56. package/dist/factory/index.d.mts +20 -5
  57. package/dist/factory/index.mjs +131 -8
  58. package/dist/fastify-augmentation-DVsTAy6X.d.mts +179 -0
  59. package/dist/{fields-CB5Cuzk9.mjs → fields-CojeUkS4.mjs} +6 -11
  60. package/dist/{generate-EcA6ui4i.mjs → generate-DiB0nHPR.mjs} +2 -2
  61. package/dist/{headers-3zvE0rM3.mjs → headers-CveNO9gR.mjs} +2 -2
  62. package/dist/{health-DjZYjM7H.mjs → health-CasG2A28.mjs} +1 -1
  63. package/dist/hooks/index.d.mts +1 -1
  64. package/dist/hooks/index.mjs +2 -2
  65. package/dist/idempotency/index.d.mts +45 -1
  66. package/dist/idempotency/index.mjs +95 -11
  67. package/dist/idempotency/redis.mjs +1 -1
  68. package/dist/{index-CEJNZFtX.d.mts → index-B-DvUzsr.d.mts} +82 -3
  69. package/dist/{index-CpzxqePp.d.mts → index-BcR2bFZQ.d.mts} +707 -373
  70. package/dist/{index-Bc2ox8_U.d.mts → index-Brin0ODU.d.mts} +4 -4
  71. package/dist/{index-CFThn1K9.d.mts → index-C5NnMEKF.d.mts} +70 -4
  72. package/dist/{index-C-481Zf2.d.mts → index-ugr1tQlW.d.mts} +17 -1
  73. package/dist/index.d.mts +6 -6
  74. package/dist/index.mjs +11 -11
  75. package/dist/{init-BEiNZBsJ.mjs → init-mdJ-v4Xp.mjs} +24 -16
  76. package/dist/integrations/event-gateway.d.mts +1 -1
  77. package/dist/integrations/event-gateway.mjs +2 -2
  78. package/dist/integrations/index.d.mts +2 -2
  79. package/dist/integrations/index.mjs +1 -1
  80. package/dist/integrations/jobs/index.d.mts +1 -1
  81. package/dist/integrations/jobs/index.mjs +100 -98
  82. package/dist/integrations/mcp/index.d.mts +12 -3
  83. package/dist/integrations/mcp/index.mjs +2 -2
  84. package/dist/integrations/mcp/testing.d.mts +1 -1
  85. package/dist/integrations/mcp/testing.mjs +2 -2
  86. package/dist/integrations/streamline.mjs +3 -3
  87. package/dist/integrations/webhooks.d.mts +124 -1
  88. package/dist/integrations/webhooks.mjs +180 -2
  89. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  90. package/dist/integrations/websocket-redis.mjs +1 -1
  91. package/dist/integrations/websocket.mjs +38 -35
  92. package/dist/{interface-DYzM0q-u.mjs → interface-DznJrm9R.mjs} +1 -1
  93. package/dist/{jsonBody-BYbLDi5D.mjs → jsonBody-CfGH-GxO.mjs} +2 -2
  94. package/dist/{keys-C0_pa1tY.mjs → keys-WeKvY1dE.mjs} +1 -1
  95. package/dist/{loadResources-yawi9tAE.mjs → loadResources-Bj-aSsXi.mjs} +4 -3
  96. package/dist/{loadResourcesFromEntry-BAjYZonx.mjs → loadResourcesFromEntry-DwaxNcE2.mjs} +2 -2
  97. package/dist/logger/index.mjs +1 -1
  98. package/dist/{mcpPlugin-B_es0hiF.mjs → mcpPlugin-aJg5TqHi.mjs} +76 -36
  99. package/dist/{memory-DR6wpa9F.mjs → memory-qYSB7rMQ.mjs} +5 -5
  100. package/dist/{metrics-CUdw_wLB.mjs → metrics-D7uchLjN.mjs} +2 -2
  101. package/dist/middleware/index.d.mts +1 -1
  102. package/dist/middleware/index.mjs +3 -3
  103. package/dist/migrations/index.mjs +3 -3
  104. package/dist/{module-0pFJA6YW.mjs → module-CwKsgZXp.mjs} +1 -1
  105. package/dist/{multipartBody-wOgj_fnj.mjs → multipartBody-4w-S3-PU.mjs} +3 -3
  106. package/dist/{openapi-B2L4js1v.mjs → openapi-BN5cQaO2.mjs} +6 -6
  107. package/dist/outbox-admin/index.d.mts +85 -0
  108. package/dist/outbox-admin/index.mjs +115 -0
  109. package/dist/outbox-module-CXB79bvt.mjs +839 -0
  110. package/dist/outbox-module-D-VFq37T.d.mts +368 -0
  111. package/dist/permissions/index.d.mts +3 -3
  112. package/dist/permissions/index.mjs +6 -6
  113. package/dist/{permissions-L--QDAir.mjs → permissions-BAfwgBxc.mjs} +120 -8
  114. package/dist/{pipe-DRDNsI2T.mjs → pipe-BzzoEhHj.mjs} +3 -5
  115. package/dist/pipeline/index.d.mts +1 -1
  116. package/dist/pipeline/index.mjs +2 -2
  117. package/dist/{pipeline-UPQFatit.mjs → pipeline-q69DZzgG.mjs} +17 -15
  118. package/dist/plugins/index.d.mts +6 -6
  119. package/dist/plugins/index.mjs +16 -16
  120. package/dist/plugins/response-cache.mjs +2 -2
  121. package/dist/plugins/tracing-entry.mjs +2 -2
  122. package/dist/{pluralize-O0FZgESl.mjs → pluralize-B7xf8qZF.mjs} +1 -1
  123. package/dist/{preloadResources-Dz6BjzM6.mjs → preloadResources-BkyqeTDz.mjs} +1 -1
  124. package/dist/{preloadResources-CyoJMSiO.d.mts → preloadResources-g07ldtzh.d.mts} +30 -7
  125. package/dist/presets/filesUpload.d.mts +2 -2
  126. package/dist/presets/filesUpload.mjs +6 -6
  127. package/dist/presets/index.d.mts +2 -2
  128. package/dist/presets/index.mjs +2 -2
  129. package/dist/presets/multiTenant.d.mts +1 -1
  130. package/dist/presets/multiTenant.mjs +3 -3
  131. package/dist/presets/search.d.mts +2 -2
  132. package/dist/presets/search.mjs +2 -2
  133. package/dist/{presets-C4-g4_4P.mjs → presets-D-h0uWtP.mjs} +6 -5
  134. package/dist/projection-BKM0Ui-s.mjs +42 -0
  135. package/dist/{queryCachePlugin-BZr8v46E.mjs → queryCachePlugin-DhsZ0ZIc.mjs} +50 -8
  136. package/dist/{rateLimit-CMPY5Qms.mjs → rateLimit-D4-ASwsI.mjs} +2 -2
  137. package/dist/{rateLimitKey-Dn5JNmkj.mjs → rateLimitKey-XngqVNEV.mjs} +1 -1
  138. package/dist/{realtime-C5NoxWFY.mjs → realtime-CTkv3O59.mjs} +10 -10
  139. package/dist/{redis-stream-qN6A-RFv.d.mts → redis-stream-mwLWlfHG.d.mts} +1 -1
  140. package/dist/{registerRoute-CBN84fc7.mjs → registerRoute-DNnd3vkz.mjs} +10 -8
  141. package/dist/registry/index.d.mts +3 -3
  142. package/dist/registry/index.mjs +3 -3
  143. package/dist/{registry-4213U4zb.mjs → registry-CLxCR5LF.mjs} +2 -2
  144. package/dist/{renewingLease-Dll8mGgc.mjs → renewingLease-BnWtbA2U.mjs} +1 -1
  145. package/dist/{replyHelpers-DIiZKGUt.mjs → replyHelpers-BSBVCwL3.mjs} +2 -2
  146. package/dist/{repositoryFilter-f9eAfq_l.mjs → repositoryFilter-DKny7PDn.mjs} +1 -1
  147. package/dist/{requestContext-2TxXOJ7T.mjs → requestContext-uYE35JxI.mjs} +1 -1
  148. package/dist/{rolldown-runtime-CUsjNX9R.mjs → rolldown-runtime-DNg-KNCk.mjs} +1 -1
  149. package/dist/runtimeCapabilities-Dm88DaTW.mjs +49 -0
  150. package/dist/{schedules-DdtlICTf.mjs → schedules-CAcZgia0.mjs} +3 -3
  151. package/dist/{schemaConverter-D--wdJM-.mjs → schemaConverter-XH1RZRyu.mjs} +1 -1
  152. package/dist/{schemaIR-Bm2enbnh.mjs → schemaIR-CDvclAew.mjs} +2 -2
  153. package/dist/schemas/index.mjs +1 -1
  154. package/dist/scim/index.mjs +2 -2
  155. package/dist/scope/index.mjs +5 -5
  156. package/dist/{scope-DHx5Fous.mjs → scope-BaWcqBvr.mjs} +4 -4
  157. package/dist/{simpleEqualityMatcher-DjQJ7FKA.mjs → simpleEqualityMatcher-Se8VrsaP.mjs} +1 -1
  158. package/dist/{sse-CUTo9y0X.mjs → sse-Cf0jUHsh.mjs} +7 -6
  159. package/dist/{sseStream-B_5XcVVd.mjs → sseStream-Bvpi-UXQ.mjs} +2 -2
  160. package/dist/{store-helpers-D1MP_gRG.mjs → store-helpers-B88p99Z2.mjs} +1 -1
  161. package/dist/{streaming-PSZwi8JV.mjs → streaming-DsT1B5zJ.mjs} +1 -1
  162. package/dist/{subscribe-helpers-C0Tb2aUp.mjs → subscribe-helpers-CLIOHsOK.mjs} +2 -2
  163. package/dist/sync/changelog.mjs +1 -1
  164. package/dist/testing/cleanupStoreContract.d.mts +1 -1
  165. package/dist/testing/cleanupStoreContract.mjs +12 -6
  166. package/dist/testing/index.d.mts +52 -13
  167. package/dist/testing/index.mjs +110 -40
  168. package/dist/testing/outboxStoreContract.d.mts +11 -2
  169. package/dist/testing/outboxStoreContract.mjs +110 -21
  170. package/dist/testing/storageContract.mjs +11 -6
  171. package/dist/{transactionContext-dAfBVUrk.mjs → transactionContext-BYtWnwAS.mjs} +1 -1
  172. package/dist/{typeGuards-B0ryPo3I.mjs → typeGuards-jjKJDN13.mjs} +1 -1
  173. package/dist/types/index.d.mts +3 -3
  174. package/dist/types/index.mjs +1 -1
  175. package/dist/types/storage.mjs +1 -1
  176. package/dist/{types-CBgvkp8O.d.mts → types-BcTumAz_.d.mts} +128 -18
  177. package/dist/{types-CwcUQ610.d.mts → types-BfC83KsP.d.mts} +15 -1
  178. package/dist/{types-Cys0ko9Z.mjs → types-CoqIRrkY.mjs} +4 -4
  179. package/dist/{types-C4QE8qnm.d.mts → types-DVLddu2q.d.mts} +144 -1
  180. package/dist/usage/index.d.mts +1 -1
  181. package/dist/usage/index.mjs +0 -0
  182. package/dist/{userHelpers-ChYJ6CdK.mjs → userHelpers-CWF5pbZD.mjs} +1 -1
  183. package/dist/utils/index.d.mts +57 -5
  184. package/dist/utils/index.mjs +12 -11
  185. package/dist/{utils-vL8BrDE2.mjs → utils-h1V_sT-t.mjs} +38 -7
  186. package/dist/{validate-_KbifpHF.mjs → validate-CdQlz52F.mjs} +2 -2
  187. package/dist/{versioning-D_rhHfZm.d.mts → versioning-DEs-_hFi.d.mts} +1 -1
  188. package/dist/{versioning-CHDTor3P.mjs → versioning-rZbyLVD-.mjs} +4 -4
  189. package/package.json +31 -20
  190. package/skills/arc/SKILL.md +96 -4
  191. package/skills/arc/references/api-reference.md +19 -0
  192. package/skills/arc/references/production.md +2 -2
  193. package/dist/fastify-augmentation-zh0_AYHa.d.mts +0 -85
  194. package/dist/projection-BHw6xlOQ.mjs +0 -18
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import "./constants-D3Dv4LAV.mjs";
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
+ import "./constants-BxCoxmiN.mjs";
3
3
  //#region src/registry/ResourceRegistry.ts
4
4
  /**
5
5
  * Resource Registry
@@ -60,6 +60,7 @@ var ResourceRegistry = class {
60
60
  summary: r.summary,
61
61
  description: r.description,
62
62
  permissions: r.permissions,
63
+ capability: r.capability,
63
64
  raw: r.rawHandler !== void 0,
64
65
  schema: r.schema
65
66
  })),
@@ -216,22 +217,24 @@ var ResourceRegistry = class {
216
217
  path: r.prefix,
217
218
  operation: "create"
218
219
  });
219
- if (!disabled.has("update")) if (updateMethod === "both") {
220
- routes.push({
221
- method: "PUT",
220
+ if (!disabled.has("update")) {
221
+ if (updateMethod === "both") {
222
+ routes.push({
223
+ method: "PUT",
224
+ path: `${r.prefix}/:id`,
225
+ operation: "update"
226
+ });
227
+ routes.push({
228
+ method: "PATCH",
229
+ path: `${r.prefix}/:id`,
230
+ operation: "update"
231
+ });
232
+ } else routes.push({
233
+ method: updateMethod,
222
234
  path: `${r.prefix}/:id`,
223
235
  operation: "update"
224
236
  });
225
- routes.push({
226
- method: "PATCH",
227
- path: `${r.prefix}/:id`,
228
- operation: "update"
229
- });
230
- } else routes.push({
231
- method: updateMethod,
232
- path: `${r.prefix}/:id`,
233
- operation: "update"
234
- });
237
+ }
235
238
  if (!disabled.has("delete")) routes.push({
236
239
  method: "DELETE",
237
240
  path: `${r.prefix}/:id`,
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
2
  //#region src/core/actionPermissions.ts
3
3
  /**
4
4
  * Return the effective `PermissionCheck` for a single action, or `undefined`
@@ -1,6 +1,6 @@
1
1
 
2
- import "../index-CpzxqePp.mjs";
3
- import { a as UserBase } from "../types-B7XeLEgK.mjs";
2
+ import { d as UserBase } from "../base-Csjc2oF-.mjs";
3
+ import "../index-BcR2bFZQ.mjs";
4
4
  import { FastifyPluginAsync } from "fastify";
5
5
  import { RepositoryLike } from "@classytic/repo-core/adapter";
6
6
  //#region src/audit/stores/interface.d.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as transactionContext } from "../transactionContext-dAfBVUrk.mjs";
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
+ import { t as transactionContext } from "../transactionContext-BYtWnwAS.mjs";
3
3
  import { and, anyOf, eq, gte, lt, lte } from "@classytic/repo-core/filter";
4
4
  import fp from "fastify-plugin";
5
5
  //#region src/audit/repository-audit-adapter.ts
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
2
  //#region src/auth/audit.ts
3
3
  function compileGlobs(patterns) {
4
4
  if (patterns.length === 0) return () => false;
@@ -1,6 +1,6 @@
1
1
 
2
- import { Ut as AuthHelpers, Wt as AuthPluginOptions } from "../index-CpzxqePp.mjs";
3
- import { r as PermissionCheck } from "../types-B7XeLEgK.mjs";
2
+ import { l as PermissionCheck } from "../base-Csjc2oF-.mjs";
3
+ import { Ft as AuthPluginOptions, Pt as AuthHelpers } from "../index-BcR2bFZQ.mjs";
4
4
  import { t as ExternalOpenApiPaths } from "../externalPaths-CmGOxOtD.mjs";
5
5
  import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-qimlKV0P.mjs";
6
6
  import { FastifyPluginAsync, FastifyReply as FastifyReply$1, FastifyRequest } from "fastify";
@@ -1,9 +1,10 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-Cj42AntO.mjs";
3
- import { n as requireSingleHeaderValue } from "../headers-3zvE0rM3.mjs";
4
- import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-ChYJ6CdK.mjs";
5
- import { o as toJsonSchema } from "../schemaConverter-D--wdJM-.mjs";
6
- import { S as requireOrgRole, T as requireTeamMembership, x as requireOrgMembership } from "../permissions-L--QDAir.mjs";
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
+ import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-Cd_yy7aW.mjs";
3
+ import { n as requireSingleHeaderValue } from "../headers-CveNO9gR.mjs";
4
+ import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-CWF5pbZD.mjs";
5
+ import { o as toJsonSchema } from "../schemaConverter-XH1RZRyu.mjs";
6
+ import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-BAfwgBxc.mjs";
7
+ import { isProductionEnv } from "@classytic/primitives/environment";
7
8
  import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
8
9
  import fp from "fastify-plugin";
9
10
  //#region src/auth/authPlugin.ts
@@ -346,9 +347,10 @@ function extractBetterAuthOpenApi(authApi, options = {}) {
346
347
  if (excludeServerOnly && endpointOpts.metadata?.SERVER_ONLY) continue;
347
348
  const fullPath = toOpenApiPath(`${normalizedBase}${endpointPath}`);
348
349
  const methods = [];
349
- if (endpointOpts.method) if (Array.isArray(endpointOpts.method)) methods.push(...endpointOpts.method.map((m) => m.toLowerCase()));
350
- else methods.push(endpointOpts.method.toLowerCase());
351
- else methods.push(endpointOpts.body ? "post" : "get");
350
+ if (endpointOpts.method) {
351
+ if (Array.isArray(endpointOpts.method)) methods.push(...endpointOpts.method.map((m) => m.toLowerCase()));
352
+ else methods.push(endpointOpts.method.toLowerCase());
353
+ } else methods.push(endpointOpts.body ? "post" : "get");
352
354
  const openApiMeta = endpointOpts.metadata?.openapi;
353
355
  for (const method of methods) {
354
356
  const operation = {
@@ -860,6 +862,25 @@ function createBetterAuthAdapter(options) {
860
862
  if (openapiOpt === false) extractedOpenApi = void 0;
861
863
  else if (typeof openapiOpt === "object") extractedOpenApi = openapiOpt;
862
864
  const betterAuthPlugin = async (fastify) => {
865
+ /**
866
+ * `orgContext` without the `organization()` plugin is a SILENT
867
+ * misconfiguration, so it fails at boot instead.
868
+ *
869
+ * Arc resolves org membership through `auth.api.getActiveMember` /
870
+ * `getActiveMemberRole`. Absent the plugin those methods do not exist,
871
+ * every lookup returns null, and `request.scope` silently stays
872
+ * `'authenticated'` — so `requireOrgId()` throws 403 on every
873
+ * tenant-scoped route. It fails CLOSED (no data leak), but the symptom
874
+ * points nowhere near the cause: the host sees blanket 403s and no
875
+ * indication that a plugin is missing. One check at registration turns
876
+ * that into a sentence.
877
+ */
878
+ if (orgEnabled) {
879
+ if (!(pickApiMethod(auth, "getActiveMember", "organization") !== void 0 || pickApiMethod(auth, "getActiveMemberRole", "organization") !== void 0)) throw new ArcError("createBetterAuthAdapter({ orgContext: true }) requires Better Auth's `organization()` plugin — `auth.api.getActiveMember` / `getActiveMemberRole` are missing. Without it arc can never resolve membership, so request.scope stays 'authenticated' and every tenant-scoped route answers 403. Add `organization()` to your betterAuth({ plugins }), or drop `orgContext`.", {
880
+ code: "BETTER_AUTH_ORG_PLUGIN_MISSING",
881
+ statusCode: 500
882
+ });
883
+ }
863
884
  const routeOpts = options.rateLimit && typeof options.rateLimit === "object" ? { config: { rateLimit: options.rateLimit } } : {};
864
885
  fastify.all(`${normalizedBase}/*`, routeOpts, async (request, reply) => {
865
886
  try {
@@ -993,7 +1014,19 @@ function buildSetCookieHeader(name, value, maxAgeSeconds, options) {
993
1014
  `Path=${options.path ?? "/"}`
994
1015
  ];
995
1016
  if (options.httpOnly !== false) parts.push("HttpOnly");
996
- if (options.secure ?? process.env.NODE_ENV === "production") parts.push("Secure");
1017
+ /**
1018
+ * `Secure` defaults to "is this a production environment?" — via the shared classifier, NOT a
1019
+ * raw `NODE_ENV === "production"` comparison.
1020
+ *
1021
+ * The raw form shipped session cookies WITHOUT `Secure` on any deployment using `NODE_ENV=prod`,
1022
+ * because that comparison recognises only the long spelling. A cookie without `Secure` is sent
1023
+ * over plaintext HTTP, so a session token becomes interceptable — and nothing anywhere reports
1024
+ * it: the cookie is set, login works, the app behaves normally.
1025
+ *
1026
+ * `options.secure` still wins when stated (`??`), including an explicit `false` for local HTTP
1027
+ * development. Only the DEFAULT changed, and only in the direction of being correct more often.
1028
+ */
1029
+ if (options.secure ?? isProductionEnv(process.env.NODE_ENV)) parts.push("Secure");
997
1030
  parts.push(`SameSite=${capitalize(options.sameSite ?? "lax")}`);
998
1031
  if (options.domain) parts.push(`Domain=${options.domain}`);
999
1032
  return parts.join("; ");
@@ -1149,7 +1182,7 @@ var MemorySessionStore = class {
1149
1182
  * ```
1150
1183
  */
1151
1184
  function createSessionManager(options) {
1152
- const { store, secret, maxAge: maxAgeSeconds = 10080 * 60, updateAge: updateAgeSeconds = 1440 * 60, freshAge: freshAgeSeconds = 600, cookieName = "arc.session", cookie: cookieOptions = {} } = options;
1185
+ const { store, secret, maxAge: maxAgeSeconds = 604800, updateAge: updateAgeSeconds = 86400, freshAge: freshAgeSeconds = 600, cookieName = "arc.session", cookie: cookieOptions = {} } = options;
1153
1186
  if (secret.length < 32) throw new Error(`Session secret must be at least 32 characters (current: ${secret.length}). Use a strong random secret for production.`);
1154
1187
  const maxAgeMs = maxAgeSeconds * 1e3;
1155
1188
  const updateAgeMs = updateAgeSeconds * 1e3;
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
2
  import sjson from "secure-json-parse";
3
3
  //#region src/auth/redis-session.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
2
  import { arcLog } from "./logger/index.mjs";
3
- import { t as ArcError } from "./errors-Cj42AntO.mjs";
3
+ import { t as ArcError } from "./errors-Cd_yy7aW.mjs";
4
4
  //#region src/permissions/filter-merge.ts
5
5
  /**
6
6
  * Policy-filter composition — logical AND, never last-writer-wins.
@@ -1,79 +1,6 @@
1
1
 
2
2
  import { i as RequestScope } from "./types-ChuShpCP.mjs";
3
3
  import { FastifyRequest } from "fastify";
4
- //#region src/types/base.d.ts
5
- declare module "fastify" {
6
- interface FastifyRequest {
7
- /** Request scope — set by auth adapter, read by permissions/presets/guards */
8
- scope: RequestScope;
9
- /**
10
- * Current user — set by auth adapter (Better Auth, JWT, custom).
11
- * `undefined` on public routes (`auth: false`) or unauthenticated requests.
12
- * Guard with `if (request.user)` on routes that allow anonymous access.
13
- *
14
- * Kept as required (not `user?`) because `@fastify/jwt` declares it
15
- * as required — declaration merges must have identical modifiers.
16
- * The `| undefined` in the type achieves the same DX.
17
- */
18
- user: Record<string, unknown> | undefined;
19
- /** Policy-injected query filters (e.g. ownership, org-scoping) */
20
- _policyFilters?: Record<string, unknown>;
21
- /** Field mask — fields to include/exclude in responses */
22
- fieldMask?: {
23
- include?: string[];
24
- exclude?: string[];
25
- };
26
- /** Arbitrary policy metadata for downstream consumers */
27
- policyMetadata?: Record<string, unknown>;
28
- /** Document loaded by policy middleware for ownership checks */
29
- document?: unknown;
30
- /** Ownership check context (field name + user field) */
31
- _ownershipCheck?: Record<string, unknown>;
32
- }
33
- }
34
- type AnyRecord = Record<string, unknown>;
35
- /** MongoDB ObjectId — accepts string or any object with a `toString()` (e.g. mongoose ObjectId). */
36
- type ObjectId = string | {
37
- toString(): string;
38
- };
39
- /**
40
- * Flexible user type that accepts any object with id/_id properties.
41
- * The actual user structure is defined by your app's auth system.
42
- */
43
- type UserLike = UserBase & {
44
- /** User email (optional) */
45
- email?: string;
46
- };
47
- interface UserOrganization {
48
- userId: string;
49
- organizationId: string;
50
- [key: string]: unknown;
51
- }
52
- interface JWTPayload {
53
- sub: string;
54
- [key: string]: unknown;
55
- }
56
- /**
57
- * Typed Fastify request with Arc decorations. Use in `rawHandler` routes
58
- * instead of `(req as any).user`.
59
- *
60
- * @example
61
- * ```typescript
62
- * import type { ArcRequest } from '@classytic/arc';
63
- *
64
- * handler: async (req: ArcRequest, reply) => {
65
- * req.user?.id; // typed
66
- * req.scope.organizationId; // typed (when member)
67
- * req.signal; // AbortSignal (Fastify 5)
68
- * }
69
- * ```
70
- */
71
- type ArcRequest = FastifyRequest & {
72
- scope: RequestScope;
73
- user: Record<string, unknown> | undefined;
74
- signal: AbortSignal;
75
- };
76
- //#endregion
77
4
  //#region src/utils/userHelpers.d.ts
78
5
  /**
79
6
  * Extract a user ID from a user object. Accepts `id` or `_id` — returns
@@ -324,4 +251,77 @@ interface PermissionCheckMeta {
324
251
  _conditional?: boolean;
325
252
  }
326
253
  //#endregion
327
- export { UserBase as a, normalizeRoles as c, JWTPayload as d, ObjectId as f, PermissionContext as i, AnyRecord as l, UserOrganization as m, DataPolicy as n, getUserId as o, UserLike as p, PermissionCheck as r, getUserRoles as s, AuthorizationDecision as t, ArcRequest as u };
254
+ //#region src/types/base.d.ts
255
+ declare module "fastify" {
256
+ interface FastifyRequest {
257
+ /** Request scope — set by auth adapter, read by permissions/presets/guards */
258
+ scope: RequestScope;
259
+ /**
260
+ * Current user — set by auth adapter (Better Auth, JWT, custom).
261
+ * `undefined` on public routes (`auth: false`) or unauthenticated requests.
262
+ * Guard with `if (request.user)` on routes that allow anonymous access.
263
+ *
264
+ * Kept as required (not `user?`) because `@fastify/jwt` declares it
265
+ * as required — declaration merges must have identical modifiers.
266
+ * The `| undefined` in the type achieves the same DX.
267
+ */
268
+ user: Record<string, unknown> | undefined;
269
+ /** Policy-injected query filters (e.g. ownership, org-scoping) */
270
+ _policyFilters?: Record<string, unknown>;
271
+ /** Field mask — fields to include/exclude in responses */
272
+ fieldMask?: {
273
+ include?: string[];
274
+ exclude?: string[];
275
+ };
276
+ /** Arbitrary policy metadata for downstream consumers */
277
+ policyMetadata?: Record<string, unknown>;
278
+ /** Document loaded by policy middleware for ownership checks */
279
+ document?: unknown;
280
+ /** Ownership check context (field name + user field) */
281
+ _ownershipCheck?: Record<string, unknown>;
282
+ }
283
+ }
284
+ type AnyRecord = Record<string, unknown>;
285
+ /** MongoDB ObjectId — accepts string or any object with a `toString()` (e.g. mongoose ObjectId). */
286
+ type ObjectId = string | {
287
+ toString(): string;
288
+ };
289
+ /**
290
+ * Flexible user type that accepts any object with id/_id properties.
291
+ * The actual user structure is defined by your app's auth system.
292
+ */
293
+ type UserLike = UserBase & {
294
+ /** User email (optional) */
295
+ email?: string;
296
+ };
297
+ interface UserOrganization {
298
+ userId: string;
299
+ organizationId: string;
300
+ [key: string]: unknown;
301
+ }
302
+ interface JWTPayload {
303
+ sub: string;
304
+ [key: string]: unknown;
305
+ }
306
+ /**
307
+ * Typed Fastify request with Arc decorations. Use in `rawHandler` routes
308
+ * instead of `(req as any).user`.
309
+ *
310
+ * @example
311
+ * ```typescript
312
+ * import type { ArcRequest } from '@classytic/arc';
313
+ *
314
+ * handler: async (req: ArcRequest, reply) => {
315
+ * req.user?.id; // typed
316
+ * req.scope.organizationId; // typed (when member)
317
+ * req.signal; // AbortSignal (Fastify 5)
318
+ * }
319
+ * ```
320
+ */
321
+ type ArcRequest = FastifyRequest & {
322
+ scope: RequestScope;
323
+ user: Record<string, unknown> | undefined;
324
+ signal: AbortSignal;
325
+ };
326
+ //#endregion
327
+ export { UserLike as a, DataPolicy as c, UserBase as d, getUserId as f, ObjectId as i, PermissionCheck as l, normalizeRoles as m, ArcRequest as n, UserOrganization as o, getUserRoles as p, JWTPayload as r, AuthorizationDecision as s, AnyRecord as t, PermissionContext as u };
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { a as conjoinPolicyFilters } from "./authorizationDecision-ChvUQGG1.mjs";
3
- import { t as toRepositoryFilter } from "./repositoryFilter-f9eAfq_l.mjs";
4
- import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-_KbifpHF.mjs";
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
+ import { a as conjoinPolicyFilters } from "./authorizationDecision-B3mP_QTy.mjs";
3
+ import { t as toRepositoryFilter } from "./repositoryFilter-DKny7PDn.mjs";
4
+ import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-CdQlz52F.mjs";
5
5
  //#region src/core/aggregation/buildHandler.ts
6
6
  /**
7
7
  * Framework-agnostic aggregation execution. Runs safety guards,
@@ -27,7 +27,8 @@ async function executeAggregation(normalized, deps, ctx) {
27
27
  status: 400,
28
28
  body: guardError
29
29
  };
30
- const aggReq = compileAggRequest(normalized, conjoinPolicyFilters(extractCallerFilter(query), policyFilter), tenantOptions, query);
30
+ const callerFilter = conjoinPolicyFilters(extractCallerFilter(query), policyFilter);
31
+ const aggReq = compileAggRequest(normalized, callerFilter, tenantOptions, query);
31
32
  if (config.materialized) {
32
33
  const matCtx = {
33
34
  filter: aggReq.filter,
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-C0_pa1tY.mjs";
3
- import { t as MemoryCacheStore } from "../memory-DR6wpa9F.mjs";
4
- import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-BZr8v46E.mjs";
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
+ import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-WeKvY1dE.mjs";
3
+ import { t as MemoryCacheStore } from "../memory-qYSB7rMQ.mjs";
4
+ import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-DhsZ0ZIc.mjs";
5
5
  //#region src/cache/redis.ts
6
6
  /**
7
7
  * Redis-backed cache store.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-CUsjNX9R.mjs";
1
+ /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/plugins/caching.ts
5
5
  var caching_exports = /* @__PURE__ */ __exportAll({
@@ -1,7 +1,7 @@
1
1
 
2
- import { L as RequestWithExtras } from "../index-CpzxqePp.mjs";
3
- import { A as CleanupWriteFence, C as CleanupResult, D as CleanupRunStore, E as CleanupRunStatus, F as PurgeStrategyKind, I as PurgeVerificationSummary, L as VerificationCheck, M as PurgeActor, N as PurgeEvidence, O as CleanupRunTransitionPatch, P as PurgeResourceResult, R as VerificationResult, S as CleanupRecipe, T as CleanupRunCreateResult, _ as CleanupPermissions, a as CleanupEvidenceStore, b as CleanupPlanItem, c as CleanupInput, d as CleanupLease, f as CleanupLimits, g as CleanupPermissionCheck, h as CleanupOutcomeStatus, i as CleanupContext, j as DEFAULT_CLEANUP_LIMITS, k as CleanupStepResult, l as CleanupJob, m as CleanupManifest, n as CLEANUP_TERMINAL_STATUSES, o as CleanupExecutionContext, p as CleanupLogger, r as CleanupCancelRequest, s as CleanupFinalizationPayload, t as Availability, u as CleanupJobQueue, v as CleanupPlan, w as CleanupRun, x as CleanupProgressSummary, y as CleanupPlanDraft } from "../types-C4QE8qnm.mjs";
4
- import { t as ArcModule } from "../types-CBgvkp8O.mjs";
2
+ import { L as RequestWithExtras } from "../index-BcR2bFZQ.mjs";
3
+ import { A as CleanupStepResult, B as VerificationResult, C as CleanupResult, D as CleanupRunStore, E as CleanupRunStatus, F as PurgeEvidence, I as PurgeResourceResult, L as PurgeStrategyKind, M as CleanupWriteFence, N as DEFAULT_CLEANUP_LIMITS, O as CleanupRunTransitionPatch, P as PurgeActor, R as PurgeVerificationSummary, S as CleanupRecipe, T as CleanupRunCreateResult, _ as CleanupPermissions, a as CleanupEvidenceStore, b as CleanupPlanItem, c as CleanupInput, d as CleanupLease, f as CleanupLimits, g as CleanupPermissionCheck, h as CleanupOutcomeStatus, i as CleanupContext, j as CleanupStepRunStatus, k as CleanupStepProgress, l as CleanupJob, m as CleanupManifest, n as CLEANUP_TERMINAL_STATUSES, o as CleanupExecutionContext, p as CleanupLogger, r as CleanupCancelRequest, s as CleanupFinalizationPayload, t as Availability, u as CleanupJobQueue, v as CleanupPlan, w as CleanupRun, x as CleanupProgressSummary, y as CleanupPlanDraft, z as VerificationCheck } from "../types-DVLddu2q.mjs";
4
+ import { t as ArcModule } from "../types-BcTumAz_.mjs";
5
5
  import { PurgeStrategyKind as PurgeStrategyKind$1 } from "@classytic/primitives/retention";
6
6
  import { canonicalJson } from "@classytic/primitives/canonical";
7
7
  import { CleanupStep } from "@classytic/repo-core/cleanup";
@@ -75,7 +75,9 @@ type CleanupErrorCode =
75
75
  /** No authenticated actor could be resolved for a destructive action (fail-closed). */
76
76
  "CLEANUP_ACTOR_REQUIRED" |
77
77
  /** Caller lacks permission for the operation. */
78
- "CLEANUP_FORBIDDEN";
78
+ "CLEANUP_FORBIDDEN" |
79
+ /** The exclusion list names an unknown or protective step (fail-closed). */
80
+ "CLEANUP_INVALID_EXCLUSION";
79
81
  /**
80
82
  * A framework error carrying BOTH `status` (read directly in code/tests) and
81
83
  * `statusCode` (the Fastify convention arc's global error handler recognizes,
@@ -112,6 +114,16 @@ declare const CleanupErrors: {
112
114
  readonly alreadyRunning: (runId: string) => CleanupError;
113
115
  readonly runNotFound: (id: string) => CleanupError;
114
116
  readonly invalidAction: (action: string, status: string) => CleanupError;
117
+ /**
118
+ * The operator's exclusion list cannot be honoured as written.
119
+ *
120
+ * A 400 rather than a filter: dropping an unrecognised exclusion leaves
121
+ * someone believing they narrowed a destructive run when they did not, and
122
+ * dropping a PROTECTIVE one would let a guard be switched off from the same
123
+ * request that starts the run. `steps` carries the offending ids so a UI can
124
+ * point at them.
125
+ */
126
+ readonly invalidExclusion: (reason: string, steps: readonly string[]) => CleanupError;
115
127
  readonly forbidden: (operation: string) => CleanupError;
116
128
  };
117
129
  //#endregion
@@ -255,18 +267,44 @@ declare function createCleanupService(deps: CleanupServiceDeps): CleanupService;
255
267
  //#endregion
256
268
  //#region src/cleanup/module.d.ts
257
269
  interface DataCleanupModuleDeps {
258
- /** The recipes this deployment exposes. Ids must be unique (boot-checked). */
259
- recipes: readonly CleanupRecipe[];
260
- /** Durable run store — host-owned persistence (atomic create + CAS transitions). */
261
- runStore: CleanupRunStore;
270
+ /**
271
+ * The recipes this deployment exposes. Ids must be unique (boot-checked).
272
+ *
273
+ * May be a THUNK, and for any host whose recipes are built from live engines it
274
+ * should be. Resolved once, inside `bootstrap` — i.e. after arc has validated the
275
+ * module graph and run every module's bootstrap — instead of while this factory
276
+ * runs during composition.
277
+ *
278
+ * Why that matters beyond tidiness: a host assembles cleanup recipes by folding
279
+ * over its composed modules and calling their `preLivePurge()` / `cleanupSteps()`
280
+ * arms, and those arms read `engine.repositories`. An array forces that fold at
281
+ * composition time, which in turn forces every contributing domain to allocate its
282
+ * engine before arc owns the lifecycle — so a graph that then fails validation
283
+ * leaks every engine built up to that point. A thunk breaks that chain.
284
+ */
285
+ recipes: readonly CleanupRecipe[] | (() => readonly CleanupRecipe[] | Promise<readonly CleanupRecipe[]>);
286
+ /**
287
+ * Durable run store — host-owned persistence (atomic create + CAS transitions).
288
+ *
289
+ * Accepts a THUNK for the same reason `recipes` does. A store is backed by a
290
+ * model, and constructing it registers that model — so an eager value forces
291
+ * the host to register `CleanupRun` (and its siblings below) while the module
292
+ * graph is still being composed, before arc has validated it or opened the
293
+ * connection. Everything here is read inside `service()`, which is built on
294
+ * first use at `bootstrap`, so deferral costs nothing.
295
+ */
296
+ runStore: CleanupRunStore | (() => CleanupRunStore | Promise<CleanupRunStore>);
262
297
  /** Durable evidence + manifest store — host-owned, idempotent by operationId. */
263
- evidenceStore: CleanupEvidenceStore;
298
+ evidenceStore: CleanupEvidenceStore | (() => CleanupEvidenceStore | Promise<CleanupEvidenceStore>);
264
299
  /** Permission checks for view / execute / manage. */
265
300
  permissions: CleanupPermissions;
266
- /** Optional write fence (§8). */
267
- writeFence?: CleanupWriteFence | undefined;
268
- /** Optional durable job queue (§8) — defaults to microtask-deferred in-process. */
269
- jobQueue?: CleanupJobQueue | undefined;
301
+ /** Optional write fence (§8). Thunk-friendly — see {@link runStore}. */
302
+ writeFence?: CleanupWriteFence | (() => CleanupWriteFence | Promise<CleanupWriteFence>) | undefined;
303
+ /**
304
+ * Optional durable job queue (§8) — defaults to microtask-deferred in-process.
305
+ * Thunk-friendly — see {@link runStore}.
306
+ */
307
+ jobQueue?: CleanupJobQueue | (() => CleanupJobQueue | Promise<CleanupJobQueue>) | undefined;
270
308
  /** Framework size caps. */
271
309
  limits?: Partial<CleanupLimits> | undefined;
272
310
  /** Exclusive worker-lease duration (ms). Default 5 minutes. */
@@ -296,10 +334,6 @@ interface DataCleanupModuleDeps {
296
334
  /** Injected clock (tests). */
297
335
  now?: () => Date;
298
336
  }
299
- /**
300
- * Build the Data Cleanup Center Arc module. The module's public export is the
301
- * live {@link CleanupService} (so other modules / tests can drive it directly).
302
- */
303
337
  declare function createDataCleanupModule(deps: DataCleanupModuleDeps): ArcModule<CleanupService>;
304
338
  //#endregion
305
339
  //#region src/cleanup/plan-digest.d.ts
@@ -311,4 +345,4 @@ declare function computePlanDigest(plan: Omit<CleanupPlan, "digest">): string;
311
345
  */
312
346
  declare function computeManifestDigest(manifest: Record<string, unknown>): string;
313
347
  //#endregion
314
- export { type Availability, CLEANUP_TERMINAL_STATUSES, type CancelInput, type CleanupCancelRequest, CleanupCancelled, type CleanupContext, CleanupError, type CleanupErrorCode, CleanupErrors, type CleanupEvidenceStore, type CleanupExecutionContext, type CleanupFinalizationPayload, type CleanupInput, type CleanupJob, type CleanupJobQueue, type CleanupLease, type CleanupLimits, type CleanupLogger, type CleanupManifest, type CleanupOutcomeStatus, type CleanupPermissionCheck, type CleanupPermissions, type CleanupPlan, type CleanupPlanDraft, type CleanupPlanItem, type CleanupProgressSummary, type CleanupRecipe, type CleanupRecipeInfo, type CleanupRegistry, type CleanupResult, type CleanupRun, type CleanupRunCreateResult, type CleanupRunStatus, type CleanupRunStore, type CleanupRunTransitionPatch, type CleanupService, type CleanupServiceDeps, type CleanupStepResult, type CleanupWriteFence, DEFAULT_CLEANUP_LIMITS, type DataCleanupModuleDeps, type ExecuteInput, GLOBAL_DESTRUCTIVE_KEY, MemoryCleanupEvidenceStore, MemoryCleanupJobQueue, MemoryCleanupRunStore, type PreviewInput, type PurgeActor, type PurgeEvidence, type PurgeResourceResult, type PurgeStrategyKind, type PurgeVerificationSummary, type RecipeFromStepsInput, type VerificationCheck, type VerificationResult, canonicalJson, computeManifestDigest, computePlanDigest, createCleanupRegistry, createCleanupService, createDataCleanupModule, recipeFromSteps };
348
+ export { type Availability, CLEANUP_TERMINAL_STATUSES, type CancelInput, type CleanupCancelRequest, CleanupCancelled, type CleanupContext, CleanupError, type CleanupErrorCode, CleanupErrors, type CleanupEvidenceStore, type CleanupExecutionContext, type CleanupFinalizationPayload, type CleanupInput, type CleanupJob, type CleanupJobQueue, type CleanupLease, type CleanupLimits, type CleanupLogger, type CleanupManifest, type CleanupOutcomeStatus, type CleanupPermissionCheck, type CleanupPermissions, type CleanupPlan, type CleanupPlanDraft, type CleanupPlanItem, type CleanupProgressSummary, type CleanupRecipe, type CleanupRecipeInfo, type CleanupRegistry, type CleanupResult, type CleanupRun, type CleanupRunCreateResult, type CleanupRunStatus, type CleanupRunStore, type CleanupRunTransitionPatch, type CleanupService, type CleanupServiceDeps, type CleanupStepProgress, type CleanupStepResult, type CleanupStepRunStatus, type CleanupWriteFence, DEFAULT_CLEANUP_LIMITS, type DataCleanupModuleDeps, type ExecuteInput, GLOBAL_DESTRUCTIVE_KEY, MemoryCleanupEvidenceStore, MemoryCleanupJobQueue, MemoryCleanupRunStore, type PreviewInput, type PurgeActor, type PurgeEvidence, type PurgeResourceResult, type PurgeStrategyKind, type PurgeVerificationSummary, type RecipeFromStepsInput, type VerificationCheck, type VerificationResult, canonicalJson, computeManifestDigest, computePlanDigest, createCleanupRegistry, createCleanupService, createDataCleanupModule, recipeFromSteps };