@classytic/arc 2.52.0 → 2.53.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 (222) hide show
  1. package/README.md +2 -1
  2. package/dist/{EventTransport-DeNze_-C.mjs → EventTransport-B3jTKMQH.mjs} +2 -2
  3. package/dist/{HookSystem-DTffXM1X.mjs → HookSystem-DNwxV463.mjs} +2 -2
  4. package/dist/{ResourceRegistry-tlqXSZoK.mjs → ResourceRegistry-Ck7RFodL.mjs} +2 -2
  5. package/dist/{acquire-7JKEkKnN.mjs → acquire-DkLruwhL.mjs} +1 -1
  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/auth/social/index.mjs +1 -1
  13. package/dist/{authorizationDecision-DKmH4tZ-.mjs → authorizationDecision-gB5-bHDp.mjs} +5 -5
  14. package/dist/bootError-BT3z3cvX.mjs +38 -0
  15. package/dist/{boundedMap-zxGBpXX0.mjs → boundedMap-Ddw2yGb2.mjs} +1 -1
  16. package/dist/{buildHandler-ZDV6LRZ_.mjs → buildHandler-B8IDGmhD.mjs} +5 -5
  17. package/dist/cache/index.mjs +4 -4
  18. package/dist/{caching-DceUN9Xk.mjs → caching-BitJDAY0.mjs} +2 -2
  19. package/dist/{claimed-DsP5Hi_f.mjs → claimed-CM_-lFHX.mjs} +1 -1
  20. package/dist/cleanup/index.d.mts +2 -2
  21. package/dist/cleanup/index.mjs +4 -4
  22. package/dist/cli/commands/describe.d.mts +18 -1
  23. package/dist/cli/commands/describe.mjs +39 -7
  24. package/dist/cli/commands/docs.mjs +3 -3
  25. package/dist/cli/commands/doctor.d.mts +3 -1
  26. package/dist/cli/commands/doctor.mjs +135 -22
  27. package/dist/cli/commands/generate.mjs +2 -2
  28. package/dist/cli/commands/init.mjs +2 -2
  29. package/dist/cli/commands/introspect.mjs +2 -2
  30. package/dist/cli/index.mjs +3 -3
  31. package/dist/{constants-Ca2IQFy2.mjs → constants-D9EiaO5s.mjs} +1 -1
  32. package/dist/context/index.d.mts +5 -2
  33. package/dist/context/index.mjs +5 -5
  34. package/dist/core/index.d.mts +2 -2
  35. package/dist/core/index.mjs +7 -7
  36. package/dist/{core-M18RhMqi.mjs → core-B_06Fcn0.mjs} +3 -3
  37. package/dist/{createActionRouter-zXlrwWVs.mjs → createActionRouter-DtxUXOCI.mjs} +5 -5
  38. package/dist/{createAggregationRouter-CN0Da9nC.mjs → createAggregationRouter-BMiKyDoW.mjs} +7 -7
  39. package/dist/{createApp-BC67ACu4.mjs → createApp-CEdGZtkP.mjs} +207 -44
  40. package/dist/{createMcpServer-CS2KOVP6.d.mts → createMcpServer-Bk3ls5jS.d.mts} +1 -1
  41. package/dist/{defineAggregation-DqAGb5oI.mjs → defineAggregation-DUsrGcsm.mjs} +1 -1
  42. package/dist/{defineResource-DC5UqkQv.mjs → defineResource-q8TsJpOm.mjs} +92 -36
  43. package/dist/deprecation-DX625dth.mjs +27 -0
  44. package/dist/discovery/index.mjs +1 -1
  45. package/dist/docs/index.d.mts +1 -1
  46. package/dist/docs/index.mjs +3 -3
  47. package/dist/{elevation-DiXVg98q.mjs → elevation-NJ3908pJ.mjs} +5 -5
  48. package/dist/encryption/index.mjs +3 -3
  49. package/dist/{errorHandler-BUTm9P_f.mjs → errorHandler-Ke6PGvF7.mjs} +7 -4
  50. package/dist/{errors-DxpHZBlW.mjs → errors-Ukhmfmmx.mjs} +1 -1
  51. package/dist/{eventPlugin-BY38F6yK.d.mts → eventPlugin-BeJasppx.d.mts} +7 -18
  52. package/dist/{eventPlugin-ZsIQPRso.mjs → eventPlugin-DTKAgSvb.mjs} +10 -8
  53. package/dist/{eventTypes-D-pFtqT1.mjs → eventTypes-DpDQtyR6.mjs} +2 -2
  54. package/dist/events/index.d.mts +2 -2
  55. package/dist/events/index.mjs +8 -8
  56. package/dist/events/transports/redis-stream-entry.mjs +4 -4
  57. package/dist/events/transports/redis.mjs +2 -2
  58. package/dist/factory/index.d.mts +28 -5
  59. package/dist/factory/index.mjs +12 -7
  60. package/dist/{fastify-augmentation-CPReFhZ1.d.mts → fastify-augmentation-DjxuSRG4.d.mts} +4 -3
  61. package/dist/{fieldTypes-f-3TZgR3.mjs → fieldTypes-BtFpQO6I.mjs} +2 -2
  62. package/dist/{fields-kCbIDTjA.mjs → fields-B7fuROWK.mjs} +1 -1
  63. package/dist/{filter-merge-UJCgjbZR.mjs → filter-merge-BuzZ-r9z.mjs} +1 -1
  64. package/dist/{generate-CLpmzbJ_.mjs → generate-c4F39pk1.mjs} +4 -4
  65. package/dist/{headers-Bh47h0XH.mjs → headers-Ib7BDgRI.mjs} +2 -2
  66. package/dist/{health-CEpgVAl7.mjs → health-22T82HAa.mjs} +1 -1
  67. package/dist/health-skjSwNaC.d.mts +36 -0
  68. package/dist/hooks/index.d.mts +1 -1
  69. package/dist/hooks/index.mjs +2 -2
  70. package/dist/http-cache/index.mjs +4 -4
  71. package/dist/http-cache/purgers/cloudflare.mjs +2 -2
  72. package/dist/http-cache/purgers/fastly.mjs +2 -2
  73. package/dist/http-cache/testing/index.mjs +1 -1
  74. package/dist/idempotency/index.d.mts +7 -1
  75. package/dist/idempotency/index.mjs +9 -7
  76. package/dist/idempotency/redis.mjs +2 -2
  77. package/dist/{index-CMNpMBtW.d.mts → index-BzUyno-u.d.mts} +14 -5
  78. package/dist/{index-yXXCsKl7.d.mts → index-CXqYFGoH.d.mts} +13 -4
  79. package/dist/{index-CSbDhif4.d.mts → index-CaBFPmnu.d.mts} +10 -6
  80. package/dist/{index-DCH08eqQ.d.mts → index-DWn0o4U7.d.mts} +2 -2
  81. package/dist/{index-DLCcLUQT.d.mts → index-DtHACefu.d.mts} +109 -116
  82. package/dist/index.d.mts +5 -5
  83. package/dist/index.mjs +12 -12
  84. package/dist/{init-B43DXBpc.mjs → init-XY5slyuS.mjs} +3 -3
  85. package/dist/integrations/event-gateway.mjs +2 -2
  86. package/dist/integrations/index.d.mts +1 -1
  87. package/dist/integrations/index.mjs +1 -1
  88. package/dist/integrations/jobs/index.mjs +3 -3
  89. package/dist/integrations/mcp/index.d.mts +9 -4
  90. package/dist/integrations/mcp/index.mjs +2 -2
  91. package/dist/integrations/mcp/testing.d.mts +2 -2
  92. package/dist/integrations/mcp/testing.mjs +2 -2
  93. package/dist/integrations/streamline.mjs +3 -3
  94. package/dist/integrations/webhooks.d.mts +1 -1
  95. package/dist/integrations/webhooks.mjs +4 -4
  96. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  97. package/dist/integrations/websocket-redis.mjs +1 -1
  98. package/dist/integrations/websocket.mjs +2 -2
  99. package/dist/invariants-COekUeoh.mjs +120 -0
  100. package/dist/{jsonBody-CkKs6dA_.mjs → jsonBody-BNlcGUnb.mjs} +2 -2
  101. package/dist/{keys-DHrHnT0f.mjs → keys-DwvXJwUX.mjs} +1 -1
  102. package/dist/{loadResources-CFdzAWQZ.mjs → loadResources-izEeQLO_.mjs} +3 -3
  103. package/dist/{loadResourcesFromEntry-DkoSiJsI.mjs → loadResourcesFromEntry-CijqjbHE.mjs} +2 -2
  104. package/dist/logger/index.mjs +2 -2
  105. package/dist/{logger-DJwz_-Pl.mjs → logger-DdMS0XC_.mjs} +1 -1
  106. package/dist/{mcpPlugin-CA_MDFlS.mjs → mcpPlugin-D0tSZqKk.mjs} +24 -22
  107. package/dist/{memory-B9CFHbA_.mjs → memory-Ay0haw9n.mjs} +3 -3
  108. package/dist/{metrics-DSKv-T9K.mjs → metrics-Bpgf4UL6.mjs} +3 -3
  109. package/dist/middleware/index.d.mts +1 -1
  110. package/dist/middleware/index.mjs +3 -3
  111. package/dist/migrations/index.mjs +2 -2
  112. package/dist/{module-C0JCsnO7.mjs → module-BLrTmMyk.mjs} +1 -1
  113. package/dist/{multiTenant-QtDzxx_K.d.mts → multiTenant-Cf0Ye-Wu.d.mts} +1 -1
  114. package/dist/{multipartBody-Bxz-q6hI.mjs → multipartBody-L2gr96df.mjs} +1 -1
  115. package/dist/{observeSend-DfNkdGww.mjs → observeSend-B7FEdk_g.mjs} +1 -1
  116. package/dist/{openapi-Dmp7Ipsi.mjs → openapi-COrL_33P.mjs} +6 -6
  117. package/dist/outbox-admin/index.d.mts +1 -1
  118. package/dist/outbox-admin/index.mjs +6 -6
  119. package/dist/{outbox-module-vT6PaThj.mjs → outbox-module-BY2HtnjU.mjs} +7 -7
  120. package/dist/{outbox-module-DzW6zwWJ.d.mts → outbox-module-C1QWMloZ.d.mts} +5 -8
  121. package/dist/permissions/index.d.mts +2 -2
  122. package/dist/permissions/index.mjs +8 -8
  123. package/dist/{permissions-Cga6KBOX.mjs → permissions-CEyeDHtT.mjs} +36 -17
  124. package/dist/{pipe-CqPweKdL.mjs → pipe-DIAr91at.mjs} +2 -2
  125. package/dist/pipeline/index.d.mts +1 -1
  126. package/dist/pipeline/index.mjs +2 -2
  127. package/dist/{plan-CbDTFbTj.mjs → plan-BhKHIkFl.mjs} +75 -20
  128. package/dist/{plugin-8Z1khbAI.mjs → plugin-D6hrdx-j.mjs} +72 -38
  129. package/dist/plugins/index.d.mts +4 -3
  130. package/dist/plugins/index.mjs +18 -18
  131. package/dist/plugins/response-cache.mjs +4 -4
  132. package/dist/plugins/tracing-entry.mjs +177 -85
  133. package/dist/{pluralize-D4vcPLVs.mjs → pluralize-CJKgYkVc.mjs} +1 -1
  134. package/dist/presetPermission-2pcRVYRG.mjs +23 -0
  135. package/dist/presets/filesUpload.d.mts +4 -2
  136. package/dist/presets/filesUpload.mjs +11 -6
  137. package/dist/presets/index.d.mts +6 -4
  138. package/dist/presets/index.mjs +2 -2
  139. package/dist/presets/multiTenant.d.mts +1 -1
  140. package/dist/presets/multiTenant.mjs +5 -5
  141. package/dist/presets/search.d.mts +2 -2
  142. package/dist/presets/search.mjs +54 -38
  143. package/dist/{presets-D28IABZe.mjs → presets-st11ePNn.mjs} +150 -41
  144. package/dist/{projection-aHCtDQQ9.mjs → projection-B4rqiJTi.mjs} +2 -2
  145. package/dist/{purger.types-CNFmEtFu.mjs → purger.types-BcHeAhY_.mjs} +1 -1
  146. package/dist/{queryCachePlugin-CwpEjCwz.mjs → queryCachePlugin-BgSc2bga.mjs} +6 -6
  147. package/dist/rateLimitKey-DLGdeFd2.mjs +138 -0
  148. package/dist/{realtime-Dvu8ES2z.mjs → realtime-CpYpIFsm.mjs} +11 -11
  149. package/dist/registry/index.d.mts +2 -2
  150. package/dist/registry/index.mjs +3 -3
  151. package/dist/{registry-DmxbzW7-.mjs → registry-BQsdAlZ_.mjs} +2 -2
  152. package/dist/{relay-CEaCmUfG.mjs → relay-CmT3gtkP.mjs} +11 -12
  153. package/dist/{renewingLease-g2FjB3im.mjs → renewingLease-DaoP0K-e.mjs} +1 -1
  154. package/dist/{replyHelpers-CSByAX_Z.mjs → replyHelpers-SiLr1wK4.mjs} +2 -2
  155. package/dist/{requestContext-yc7MSgmq.mjs → requestContext-B-TjFpWt.mjs} +8 -3
  156. package/dist/{health-W4S2yFBL.mjs → requestId-ClcKoWLq.mjs} +154 -116
  157. package/dist/{requirement-Dm8njSoC.mjs → requirement-BygDzjDS.mjs} +1 -1
  158. package/dist/{resourceRateLimit-PQaY3HW1.mjs → resourceRateLimit-DdIYis3m.mjs} +2 -2
  159. package/dist/{rolldown-runtime-BBBkGgwA.mjs → rolldown-runtime-Cy6j0m8_.mjs} +1 -1
  160. package/dist/{routeValidator-fuG51bQA.mjs → routeValidator-Bn-x2gaJ.mjs} +1 -1
  161. package/dist/{runtimeCapabilities-B8IT7xiQ.mjs → runtimeCapabilities-DY20Pibh.mjs} +7 -2
  162. package/dist/{schedules-0-aS4jDV.mjs → schedules-CwqC0Mp0.mjs} +5 -5
  163. package/dist/{schemaConverter-Cs3SwP4R.mjs → schemaConverter-XoLKVpzG.mjs} +2 -2
  164. package/dist/{schemaIR-By8XiNeE.mjs → schemaIR-DP7mMj7c.mjs} +16 -16
  165. package/dist/schemas/index.mjs +1 -1
  166. package/dist/scim/index.mjs +2 -2
  167. package/dist/scope/index.d.mts +6 -2
  168. package/dist/scope/index.mjs +5 -5
  169. package/dist/{scope-BWNAlBj0.mjs → scope-B0vgM2Zw.mjs} +4 -4
  170. package/dist/{shutdown-Cf-27xsS.mjs → shutdown-C76Hn-Th.mjs} +1 -1
  171. package/dist/{simpleEqualityMatcher-e-dgJcUO.mjs → simpleEqualityMatcher-Qbl-11cE.mjs} +1 -1
  172. package/dist/{sse-C3bj5qWi.mjs → sse-eyb8lNuI.mjs} +7 -7
  173. package/dist/{sseStream-BYZbpFDa.mjs → sseStream-BsBesrfw.mjs} +2 -2
  174. package/dist/{store-helpers-B9HierHY.mjs → store-helpers-D1yIVa91.mjs} +1 -1
  175. package/dist/{streaming-EN8NJWxr.mjs → streaming-DKziqs1Z.mjs} +1 -1
  176. package/dist/{subscriberIdentity-DSqCh38x.mjs → subscriberIdentity-DpdSQMQq.mjs} +1 -1
  177. package/dist/{tenancy-CAqjGQcQ.mjs → tenancy-YuRYsOPr.mjs} +2 -2
  178. package/dist/{tenantPreparation-CVBWarqs.mjs → tenantPreparation-Bk8ouRB3.mjs} +17 -5
  179. package/dist/testing/cleanupStoreContract.mjs +1 -1
  180. package/dist/testing/index.d.mts +4 -4
  181. package/dist/testing/index.mjs +11 -11
  182. package/dist/testing/outboxStoreContract.mjs +2 -2
  183. package/dist/testing/requiredPorts.d.mts +1 -1
  184. package/dist/testing/requiredPorts.mjs +2 -2
  185. package/dist/testing/storageContract.mjs +1 -1
  186. package/dist/{timing-CKI_Oyub.mjs → timing-BtIDIdQz.mjs} +1 -1
  187. package/dist/{transactionContext-D0UZFoSy.mjs → transactionContext-BsQ5ortM.mjs} +1 -1
  188. package/dist/{typeGuards-CLYkmBLT.mjs → typeGuards-Cr2_zEW0.mjs} +1 -1
  189. package/dist/types/index.d.mts +2 -2
  190. package/dist/types/index.mjs +1 -1
  191. package/dist/types/storage.mjs +1 -1
  192. package/dist/{types-BeEJm-DV.d.mts → types-CQhHTZXs.d.mts} +48 -35
  193. package/dist/{types-B4E0sc6D.d.mts → types-DWFgq8EP.d.mts} +1 -1
  194. package/dist/{types-Cunc4shv.mjs → types-ZvdR7MVa.mjs} +4 -4
  195. package/dist/usage/index.mjs +4 -4
  196. package/dist/{userHelpers-cT5j1kgp.mjs → userHelpers-CwpEK36a.mjs} +1 -1
  197. package/dist/utils/index.d.mts +1 -1
  198. package/dist/utils/index.mjs +12 -12
  199. package/dist/{utils-DlNkm1dI.mjs → utils-CnrfcYMq.mjs} +6 -6
  200. package/dist/{validate-63QThRoS.mjs → validate-BTQBh-Dr.mjs} +3 -3
  201. package/dist/{versioning-f2YGmh4i.mjs → versioning-DiLykI6U.mjs} +3 -3
  202. package/dist/{workScope-DwspXz70.mjs → workScope-C3tPz_Gt.mjs} +2 -2
  203. package/package.json +34 -9
  204. package/skills/arc/SKILL.md +5 -5
  205. package/skills/arc/references/api-reference.md +1 -1
  206. package/skills/arc/references/boot.md +17 -2
  207. package/skills/arc/references/events.md +0 -1
  208. package/skills/arc/references/mcp-setup.md +3 -2
  209. package/skills/arc/references/multi-tenancy.md +1 -1
  210. package/skills/arc/references/production-api.md +19 -12
  211. package/skills/arc/references/production-audit.md +1 -1
  212. package/skills/arc/references/production-boot.md +3 -3
  213. package/skills/arc/references/production-idempotency.md +2 -2
  214. package/skills/arc/references/production-observability.md +14 -2
  215. package/skills/arc/references/production-reliability.md +1 -1
  216. package/skills/arc/references/querying.md +1 -2
  217. package/skills/arc/references/resources.md +8 -6
  218. package/skills/arc/references/testing.md +1 -1
  219. package/skills/arc-code-review/references/arc-cheatsheet.md +1 -1
  220. package/skills/arc-code-review/references/recipe-scope-permissions.md +1 -1
  221. package/skills/arc-module-publishing/references/resource-assembly.md +2 -2
  222. package/dist/rateLimitKey-D9dl3FQn.mjs +0 -40
package/README.md CHANGED
@@ -119,7 +119,8 @@ export default defineResource({
119
119
  },
120
120
  cache: { staleTime: 30, gcTime: 300, tags: ['catalog'] },
121
121
  routes: [
122
- { method: 'GET', path: '/featured', handler: 'getFeatured', permissions: allowPublic() },
122
+ { method: 'GET', path: '/featured', permissions: allowPublic(),
123
+ handler: async () => ({ data: await productRepository.getAll({ filters: { featured: true } }) }) }, // arc pipeline + MCP tool
123
124
  ],
124
125
  actions: {
125
126
  approve: { handler: approveOrder, permissions: requireRoles(['admin']) },
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { r as workSeedFromEvent, t as runWorkScope } from "./workScope-DwspXz70.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { r as workSeedFromEvent, t as runWorkScope } from "./workScope-C3tPz_Gt.mjs";
3
3
  import { createEvent as createEvent$1, createEventRouter } from "@classytic/primitives/events";
4
4
  // src/events/EventTransport.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as buildRequestScopeProjection } from "./projection-aHCtDQQ9.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as buildRequestScopeProjection } from "./projection-B4rqiJTi.mjs";
3
3
  // src/hooks/HookSystem.ts
4
4
  /**
5
5
  * Hook System
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import "./constants-Ca2IQFy2.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import "./constants-D9EiaO5s.mjs";
3
3
  // src/registry/ResourceRegistry.ts
4
4
  /**
5
5
  * Resource Registry
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  // src/idempotency/acquire.ts
3
3
  async function acquireIdempotencyKey(store, key, requestId, lockTtlMs) {
4
4
  if (typeof store.acquire === "function") return store.acquire(key, requestId, lockTtlMs);
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { d as UserBase } from "../base-HXNgPQww.mjs";
3
- import "../index-DLCcLUQT.mjs";
3
+ import "../index-DtHACefu.mjs";
4
4
  import { FastifyPluginAsync } from "fastify";
5
5
  import { RepositoryLike } from "@classytic/repo-core/adapter";
6
6
  type AuditAction = "create" | "update" | "delete" | "restore" | "custom";
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as transactionContext } from "../transactionContext-D0UZFoSy.mjs";
3
- import { g as getUserId, i as getClientId } from "../types-Cunc4shv.mjs";
4
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-B8IT7xiQ.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as transactionContext } from "../transactionContext-BsQ5ortM.mjs";
3
+ import { g as getUserId, i as getClientId } from "../types-ZvdR7MVa.mjs";
4
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-DY20Pibh.mjs";
5
5
  import { and, anyOf, eq, gte, lt, lte } from "@classytic/repo-core/filter";
6
6
  import fp from "fastify-plugin";
7
7
  // src/audit/repository-audit-adapter.ts
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  // src/auth/audit.ts
3
3
  function compileGlobs(patterns) {
4
4
  if (patterns.length === 0) return () => false;
@@ -1,5 +1,5 @@
1
1
 
2
- import { Mt as AuthHelpers, Nt as AuthPluginOptions } from "../index-DLCcLUQT.mjs";
2
+ import { Nt as AuthHelpers, Pt as AuthPluginOptions } from "../index-DtHACefu.mjs";
3
3
  import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
4
4
  import { t as ExternalOpenApiPaths } from "../externalPaths-BOqdq5wr.mjs";
5
5
  import { i as RequestScope } from "../types-DnkIALZ8.mjs";
@@ -1,10 +1,10 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-cT5j1kgp.mjs";
3
- import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-DxpHZBlW.mjs";
4
- import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-Cga6KBOX.mjs";
5
- import { n as requireSingleHeaderValue } from "../headers-Bh47h0XH.mjs";
6
- import { o as toJsonSchema } from "../schemaConverter-Cs3SwP4R.mjs";
7
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-B8IT7xiQ.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-CwpEK36a.mjs";
3
+ import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-Ukhmfmmx.mjs";
4
+ import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-CEyeDHtT.mjs";
5
+ import { n as requireSingleHeaderValue } from "../headers-Ib7BDgRI.mjs";
6
+ import { o as toJsonSchema } from "../schemaConverter-XoLKVpzG.mjs";
7
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-DY20Pibh.mjs";
8
8
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
9
9
  import { isProductionEnv } from "@classytic/primitives/environment";
10
10
  import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  import sjson from "secure-json-parse";
3
3
  // src/auth/redis-session.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
3
3
  import { APIError, createAuthEndpoint, createAuthMiddleware, getOAuthState } from "better-auth/api";
4
4
  import { makeSignature } from "better-auth/crypto";
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as arcLog } from "./logger-DJwz_-Pl.mjs";
3
- import { n as PUBLIC_SCOPE, y as isAuthenticated } from "./types-Cunc4shv.mjs";
4
- import { t as ArcError } from "./errors-DxpHZBlW.mjs";
5
- import { t as conjoinPolicyFilters } from "./filter-merge-UJCgjbZR.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as arcLog } from "./logger-DdMS0XC_.mjs";
3
+ import { n as PUBLIC_SCOPE, y as isAuthenticated } from "./types-ZvdR7MVa.mjs";
4
+ import { t as ArcError } from "./errors-Ukhmfmmx.mjs";
5
+ import { t as conjoinPolicyFilters } from "./filter-merge-BuzZ-r9z.mjs";
6
6
  // src/permissions/authorizationDecision.ts
7
7
  const log = arcLog("permissions:enforce");
8
8
  /**
@@ -0,0 +1,38 @@
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "./errors-Ukhmfmmx.mjs";
3
+ // src/utils/bootError.ts
4
+ /**
5
+ * One shape for every boot failure arc detects from configuration: a stable
6
+ * `code`, the module it belongs to (when one does), what is wrong, and a
7
+ * one-line `fix`. Codes are kebab-case like resource diagnostics
8
+ * (`crud-public-by-omission`); a module's own invariant codes are its own.
9
+ *
10
+ * Every problem found by one check is collected first and thrown together,
11
+ * so a deployment is fixed in one pass, not one boot per mistake.
12
+ */
13
+ /**
14
+ * Thrown by `createApp` for a configuration that cannot boot. `problems` lists
15
+ * every failure found; `code` is the single problem's code, or `boot-failed`
16
+ * when there are several.
17
+ */
18
+ var ArcBootError = class extends ArcError {
19
+ name = "ArcBootError";
20
+ problems;
21
+ constructor(message, problems) {
22
+ const list = Object.freeze([...problems]);
23
+ super(message, {
24
+ code: list.length === 1 ? list[0].code : "boot-failed",
25
+ details: { problems: list }
26
+ });
27
+ this.problems = list;
28
+ }
29
+ };
30
+ /** One problem, thrown with its message verbatim. */
31
+ function bootError(problem) {
32
+ return new ArcBootError(problem.message, [problem]);
33
+ }
34
+ /** `header (N problems):` followed by one `[code] module "x": message` + `fix:` pair per problem. */
35
+ function formatBootProblems(header, problems) {
36
+ return `${header} (${`${problems.length} problem${problems.length === 1 ? "" : "s"}`}):\n${problems.map((p) => ` - [${p.code}]${p.module !== void 0 ? ` module "${p.module}":` : ""} ${p.message}\n fix: ${p.fix}`).join("\n")}`;
37
+ }
38
+ export { bootError as n, formatBootProblems as r, ArcBootError as t };
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  // src/collections/boundedMap.ts
3
3
  /**
4
4
  * Insertion-order LRU on a plain `Map` — the two moves, written once.
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as conjoinPolicyFilters } from "./filter-merge-UJCgjbZR.mjs";
3
- import { D as toRepositoryFilter } from "./plugin-8Z1khbAI.mjs";
4
- import { i as guessDate, t as coerceByType } from "./fieldTypes-f-3TZgR3.mjs";
5
- import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-63QThRoS.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as conjoinPolicyFilters } from "./filter-merge-BuzZ-r9z.mjs";
3
+ import { D as toRepositoryFilter } from "./plugin-D6hrdx-j.mjs";
4
+ import { i as guessDate, t as coerceByType } from "./fieldTypes-BtFpQO6I.mjs";
5
+ import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-BTQBh-Dr.mjs";
6
6
  // src/core/aggregation/buildHandler.ts
7
7
  /**
8
8
  * Framework-agnostic aggregation execution. Runs safety guards,
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-DHrHnT0f.mjs";
3
- import { t as MemoryCacheStore } from "../memory-B9CFHbA_.mjs";
4
- import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-CwpEjCwz.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-DwvXJwUX.mjs";
3
+ import { t as MemoryCacheStore } from "../memory-Ay0haw9n.mjs";
4
+ import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-BgSc2bga.mjs";
5
5
  // src/cache/redis.ts
6
6
  /**
7
7
  * Redis-backed cache store.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Cy6j0m8_.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  // src/plugins/caching.ts
5
5
  var caching_exports = /* @__PURE__ */ __exportAll({ default: () => caching_default });
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  // src/events/outbox/claimed.ts
3
3
  function claimedAttempts(claimed) {
4
4
  const value = claimed.attempts;
@@ -1,8 +1,8 @@
1
1
 
2
2
  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-C0YJAiL0.mjs";
3
- import { n as ArcModule } from "../types-BeEJm-DV.mjs";
3
+ import { n as ArcModule } from "../types-CQhHTZXs.mjs";
4
4
  import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
5
- import { A as RequestWithExtras } from "../index-DLCcLUQT.mjs";
5
+ import { A as RequestWithExtras } from "../index-DtHACefu.mjs";
6
6
  import { PurgeStrategyKind as PurgeStrategyKind$1 } from "@classytic/primitives/retention";
7
7
  import { CleanupStep } from "@classytic/repo-core/cleanup";
8
8
  /** Metadata + steps for {@link recipeFromSteps}. */
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as defineResource } from "../defineResource-DC5UqkQv.mjs";
3
- import { t as defineModule } from "../module-C0JCsnO7.mjs";
4
- import { g as getUserId } from "../types-Cunc4shv.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as defineResource } from "../defineResource-q8TsJpOm.mjs";
3
+ import { t as defineModule } from "../module-BLrTmMyk.mjs";
4
+ import { g as getUserId } from "../types-ZvdR7MVa.mjs";
5
5
  import { createPurgeEvidence } from "@classytic/primitives/retention";
6
6
  import { canonicalJson, sha256Hex } from "@classytic/primitives/canonical";
7
7
  // src/cleanup/errors.ts
@@ -1,5 +1,17 @@
1
1
 
2
- import { F as ResourceDefinition, X as RouteSchemaOptions, jt as RateLimitConfig } from "../../index-DLCcLUQT.mjs";
2
+ import { F as ResourceDefinition, Mt as RateLimitConfig, Z as RouteSchemaOptions } from "../../index-DtHACefu.mjs";
3
+ import { n as ArcModule } from "../../types-CQhHTZXs.mjs";
4
+ /** A module's facts and the result of each invariant — evaluated without booting anything. */
5
+ export interface DescribedModule {
6
+ name: string;
7
+ facts: Record<string, unknown>;
8
+ invariants: {
9
+ code: string;
10
+ fix: string;
11
+ ok: boolean;
12
+ reason?: string;
13
+ }[];
14
+ }
3
15
  export interface DescribedResource {
4
16
  name: string;
5
17
  displayName: string;
@@ -124,5 +136,10 @@ interface EventDescription {
124
136
  * can call this directly.
125
137
  */
126
138
  export declare function describeResource(resource: ResourceDefinition<unknown>, module?: string): DescribedResource;
139
+ /**
140
+ * Facts and invariant results for the modules given — the same evaluation boot runs, with the
141
+ * same cross-module `all` map (limited to these modules). Pure: nothing is booted.
142
+ */
143
+ export declare function describeModules(modules: readonly Pick<ArcModule, "name" | "facts" | "invariants">[]): DescribedModule[];
127
144
  export declare function describe(args: string[]): Promise<void>;
128
145
  export {};
@@ -1,6 +1,7 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as CRUD_OPERATIONS } from "../../constants-Ca2IQFy2.mjs";
3
- import { n as stringifyMeasureMap } from "../../ResourceRegistry-tlqXSZoK.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as CRUD_OPERATIONS } from "../../constants-D9EiaO5s.mjs";
3
+ import { n as evaluateModuleInvariants } from "../../invariants-COekUeoh.mjs";
4
+ import { n as stringifyMeasureMap } from "../../ResourceRegistry-Ck7RFodL.mjs";
4
5
  import { resolve } from "node:path";
5
6
  import { pathToFileURL } from "node:url";
6
7
  // src/cli/commands/describe.ts
@@ -269,6 +270,29 @@ function describeResource(resource, module) {
269
270
  idField: resource.idField ?? "_id"
270
271
  };
271
272
  }
273
+ /**
274
+ * Facts and invariant results for the modules given — the same evaluation boot runs, with the
275
+ * same cross-module `all` map (limited to these modules). Pure: nothing is booted.
276
+ */
277
+ function describeModules(modules) {
278
+ const results = evaluateModuleInvariants(modules);
279
+ return modules.map((m) => ({
280
+ name: m.name,
281
+ facts: { ...m.facts ?? {} },
282
+ invariants: results.filter((r) => r.module === m.name).map(({ code, fix, ok, reason }) => ({
283
+ code,
284
+ fix,
285
+ ok,
286
+ ...reason ? { reason } : {}
287
+ }))
288
+ }));
289
+ }
290
+ /** A constructed module object (not a thunk) that declares facts or invariants. */
291
+ function isDescribableModule(value) {
292
+ if (!value || typeof value !== "object" || "_registryMeta" in value) return false;
293
+ const v = value;
294
+ return typeof v.name === "string" && (v.facts !== void 0 || Array.isArray(v.invariants));
295
+ }
272
296
  async function describe(args) {
273
297
  try {
274
298
  const flags = new Set(args.filter((a) => a.startsWith("--")));
@@ -297,12 +321,19 @@ async function describe(args) {
297
321
  function tryCollectRegistry(value) {
298
322
  if (value && typeof value === "object" && "catalog" in value && "register" in value && "validate" in value && typeof value.catalog === "function") eventRegistry = value;
299
323
  }
300
- for (const exported of Object.values(entryModule)) if (Array.isArray(exported)) exported.forEach(tryCollect);
301
- else {
324
+ const modules = [];
325
+ const tryCollectModule = (value) => {
326
+ if (isDescribableModule(value) && !modules.includes(value)) modules.push(value);
327
+ };
328
+ for (const exported of Object.values(entryModule)) if (Array.isArray(exported)) {
329
+ exported.forEach(tryCollect);
330
+ exported.forEach(tryCollectModule);
331
+ } else {
302
332
  tryCollect(exported);
303
333
  tryCollectRegistry(exported);
334
+ tryCollectModule(exported);
304
335
  }
305
- if (resources.length === 0) throw new Error("No resource definitions found in entry file.\nMake sure your file exports defineResource() results:\n export const productResource = defineResource({ ... });");
336
+ if (resources.length === 0 && modules.length === 0) throw new Error("No resource definitions found in entry file.\nMake sure your file exports defineResource() results:\n export const productResource = defineResource({ ... });");
306
337
  const filtered = filterResource ? resources.filter((r) => r.name === filterResource) : resources;
307
338
  if (filterResource && filtered.length === 0) throw new Error(`Resource '${filterResource}' not found.\nAvailable: ${resources.map((r) => r.name).join(", ")}`);
308
339
  const described = filtered.map((r) => describeResource(r, r._registryMeta?.module));
@@ -327,6 +358,7 @@ async function describe(args) {
327
358
  $schema: "arc-describe/v1",
328
359
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
329
360
  resources: described,
361
+ ...modules.length > 0 ? { modules: describeModules(modules) } : {},
330
362
  ...eventCatalog?.length ? { eventCatalog } : {},
331
363
  stats: {
332
364
  totalResources: described.length,
@@ -347,4 +379,4 @@ async function describe(args) {
347
379
  throw new Error(String(error));
348
380
  }
349
381
  }
350
- export { describe, describeResource };
382
+ export { describe, describeModules, describeResource };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as buildOpenApiSpec } from "../../openapi-Dmp7Ipsi.mjs";
3
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-DkoSiJsI.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as buildOpenApiSpec } from "../../openapi-COrL_33P.mjs";
3
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-CijqjbHE.mjs";
4
4
  import { dirname, resolve } from "node:path";
5
5
  import { mkdirSync, writeFileSync } from "node:fs";
6
6
  // src/cli/commands/docs.ts
@@ -3,6 +3,8 @@
3
3
  * Arc CLI - Doctor Command
4
4
  *
5
5
  * Health check utility that validates the development environment.
6
- * Checks Node.js version, dependencies, configuration, and env variables.
6
+ * Checks Node.js version, dependencies, configuration, the env variables the
7
+ * project's own dependencies and `.env.example` imply, and static notes
8
+ * (proxy trust, readiness checks). Static only: it never boots the app.
7
9
  */
8
10
  export declare function doctor(_args?: string[]): Promise<void>;
@@ -1,13 +1,141 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  import { dirname, join, parse, resolve } from "node:path";
3
- import { existsSync, readFileSync } from "node:fs";
3
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
4
4
  // src/cli/commands/doctor.ts
5
5
  /**
6
6
  * Arc CLI - Doctor Command
7
7
  *
8
8
  * Health check utility that validates the development environment.
9
- * Checks Node.js version, dependencies, configuration, and env variables.
9
+ * Checks Node.js version, dependencies, configuration, the env variables the
10
+ * project's own dependencies and `.env.example` imply, and static notes
11
+ * (proxy trust, readiness checks). Static only: it never boots the app.
10
12
  */
13
+ /**
14
+ * Env vars implied by an installed dependency. `names[0]` is the one reported; any of `names`
15
+ * counts as set.
16
+ */
17
+ const ENV_BY_DEPENDENCY = [
18
+ {
19
+ deps: ["better-auth"],
20
+ names: ["BETTER_AUTH_SECRET"],
21
+ detail: "required for Better Auth session encryption"
22
+ },
23
+ {
24
+ deps: [
25
+ "@classytic/mongokit",
26
+ "mongoose",
27
+ "mongodb"
28
+ ],
29
+ names: [
30
+ "MONGO_URI",
31
+ "MONGODB_URI",
32
+ "DATABASE_URL"
33
+ ],
34
+ detail: "required at runtime for MongoDB"
35
+ },
36
+ {
37
+ deps: ["ioredis", "bullmq"],
38
+ names: ["REDIS_URL"],
39
+ detail: "required at runtime for Redis"
40
+ }
41
+ ];
42
+ const ENV_TEMPLATES = [
43
+ ".env.example",
44
+ ".env.sample",
45
+ ".env.template"
46
+ ];
47
+ /** `KEY=` names from a dotenv-style file; empty when it is absent. */
48
+ function readEnvKeys(file) {
49
+ if (!existsSync(file)) return [];
50
+ try {
51
+ return readFileSync(file, "utf-8").split(/\r?\n/).map((line) => /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=/.exec(line)?.[1]).filter((k) => k !== void 0);
52
+ } catch {
53
+ return [];
54
+ }
55
+ }
56
+ /**
57
+ * Env checks derived from the project, not a fixed list: a var is checked when an installed
58
+ * dependency needs it, or when the project's `.env.example` declares it. A var counts as set
59
+ * when it is in the environment or in `./.env` (doctor never boots or loads the app).
60
+ */
61
+ function envChecks(allDeps, cwd) {
62
+ const configured = new Set(readEnvKeys(resolve(cwd, ".env")));
63
+ const isSet = (name) => Boolean(process.env[name]) || configured.has(name);
64
+ const out = [];
65
+ const covered = /* @__PURE__ */ new Set();
66
+ for (const rule of ENV_BY_DEPENDENCY) {
67
+ const dep = rule.deps.find((d) => allDeps[d]);
68
+ if (!dep) continue;
69
+ for (const n of rule.names) covered.add(n);
70
+ const found = rule.names.find(isSet);
71
+ if (found) out.push({
72
+ status: "pass",
73
+ label: `${found} set`
74
+ });
75
+ else {
76
+ const also = rule.names.slice(1);
77
+ out.push({
78
+ status: "warn",
79
+ label: `${rule.names[0]} not set`,
80
+ detail: `${rule.detail} (${dep} installed)${also.length ? `; also accepted: ${also.join(", ")}` : ""}`
81
+ });
82
+ }
83
+ }
84
+ const template = ENV_TEMPLATES.find((f) => existsSync(resolve(cwd, f)));
85
+ if (template) for (const name of readEnvKeys(resolve(cwd, template))) {
86
+ if (covered.has(name)) continue;
87
+ covered.add(name);
88
+ if (!isSet(name)) out.push({
89
+ status: "warn",
90
+ label: `${name} not set`,
91
+ detail: `declared in ${template}`
92
+ });
93
+ }
94
+ return out;
95
+ }
96
+ const SOURCE_EXTENSIONS = /\.(?:[cm]?[jt]s|tsx|jsx)$/;
97
+ const MAX_SCANNED_FILES = 2e3;
98
+ /** Concatenated source text under `src/` (or the project root), skipping node_modules/dist. */
99
+ function readProjectSource(cwd) {
100
+ const root = existsSync(resolve(cwd, "src")) ? resolve(cwd, "src") : cwd;
101
+ const chunks = [];
102
+ const stack = [root];
103
+ while (stack.length > 0 && chunks.length < MAX_SCANNED_FILES) {
104
+ const dir = stack.pop();
105
+ let entries;
106
+ try {
107
+ entries = readdirSync(dir, { withFileTypes: true });
108
+ } catch {
109
+ continue;
110
+ }
111
+ for (const e of entries) {
112
+ if (e.name === "node_modules" || e.name === "dist" || e.name.startsWith(".")) continue;
113
+ const full = join(dir, e.name);
114
+ if (e.isDirectory()) stack.push(full);
115
+ else if (SOURCE_EXTENSIONS.test(e.name)) try {
116
+ chunks.push(readFileSync(full, "utf-8"));
117
+ } catch {}
118
+ }
119
+ }
120
+ return chunks.join("\n");
121
+ }
122
+ /** Static notes arc cannot decide at boot: proxy trust and empty readiness. */
123
+ function sourceNotes(cwd) {
124
+ const source = readProjectSource(cwd);
125
+ if (!/createApp|createWorker/.test(source)) return [];
126
+ const notes = [];
127
+ if (!/\btrustProxy\b/.test(source)) notes.push({
128
+ status: "info",
129
+ label: "trustProxy not set in source",
130
+ detail: "preset 'production' defaults to false; behind a load balancer request.ip is then the proxy's address (rate limits, audit). Set it explicitly"
131
+ });
132
+ if (!/\bhealthChecks\b|\bchecks\s*:/.test(source)) notes.push({
133
+ status: "info",
134
+ label: "no readiness checks found in source",
135
+ detail: "/_health/ready can never report not_ready; add module healthChecks or arcPlugins.health.checks"
136
+ });
137
+ return notes;
138
+ }
11
139
  async function doctor(_args = []) {
12
140
  console.log("\nArc Doctor\n");
13
141
  const results = [];
@@ -108,33 +236,18 @@ async function doctor(_args = []) {
108
236
  status: "pass",
109
237
  label: `better-auth ${allDeps["better-auth"]}`
110
238
  });
111
- for (const env of [{
112
- name: "MONGO_URI",
113
- severity: "warn",
114
- detail: "required at runtime for MongoDB"
115
- }, {
116
- name: "BETTER_AUTH_SECRET",
117
- severity: "warn",
118
- detail: "required for Better Auth session encryption"
119
- }]) if (process.env[env.name]) results.push({
120
- status: "pass",
121
- label: `${env.name} set`
122
- });
123
- else results.push({
124
- status: env.severity,
125
- label: `${env.name} not set`,
126
- detail: env.detail
127
- });
239
+ results.push(...envChecks(allDeps, cwd));
240
+ results.push(...sourceNotes(cwd));
128
241
  let passCount = 0;
129
242
  let warnCount = 0;
130
243
  let failCount = 0;
131
244
  for (const r of results) {
132
- const icon = r.status === "pass" ? "[pass]" : r.status === "warn" ? "[warn]" : "[FAIL]";
245
+ const icon = r.status === "pass" ? "[pass]" : r.status === "warn" ? "[warn]" : r.status === "info" ? "[info]" : "[FAIL]";
133
246
  const detail = r.detail ? ` (${r.detail})` : "";
134
247
  console.log(` ${icon} ${r.label}${detail}`);
135
248
  if (r.status === "pass") passCount++;
136
249
  else if (r.status === "warn") warnCount++;
137
- else failCount++;
250
+ else if (r.status === "fail") failCount++;
138
251
  }
139
252
  console.log(`\n${passCount} passed, ${warnCount} warnings, ${failCount} failures\n`);
140
253
  if (failCount > 0) process.exitCode = 1;
@@ -1,2 +1,2 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- export { t as generate } from "../../generate-CLpmzbJ_.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ export { t as generate } from "../../generate-c4F39pk1.mjs";
@@ -1,2 +1,2 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- export { t as init } from "../../init-B43DXBpc.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ export { t as init } from "../../init-XY5slyuS.mjs";
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-DkoSiJsI.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-CijqjbHE.mjs";
3
3
  // src/cli/commands/introspect.ts
4
4
  function describePermission(value) {
5
5
  if (!value) return "none";
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  import { describe } from "./commands/describe.mjs";
3
3
  import { exportDocs } from "./commands/docs.mjs";
4
4
  import { doctor } from "./commands/doctor.mjs";
5
- import { t as generate } from "../generate-CLpmzbJ_.mjs";
6
- import { t as init } from "../init-B43DXBpc.mjs";
5
+ import { t as generate } from "../generate-c4F39pk1.mjs";
6
+ import { t as init } from "../init-XY5slyuS.mjs";
7
7
  import { introspect } from "./commands/introspect.mjs";
8
8
  export { describe, doctor, exportDocs, generate, init, introspect };
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  // src/constants.ts
3
3
  /**
4
4
  * Arc Framework Constants — Single Source of Truth
@@ -49,7 +49,7 @@ interface RequestStore {
49
49
  *
50
50
  * - `get()` — returns current store or undefined if outside request scope
51
51
  * - `run(store, fn)` — run a function with a specific store (used by Arc internals)
52
- * - `getStore()` — alias for get() (matches Node.js API naming)
52
+ * - `getStore()` — deprecated alias for get()
53
53
  */
54
54
  export declare const requestContext: {
55
55
  /**
@@ -58,7 +58,10 @@ export declare const requestContext: {
58
58
  */
59
59
  get(): RequestStore | undefined;
60
60
  /**
61
- * Alias for get() — matches Node.js AsyncLocalStorage API naming.
61
+ * Alias for get().
62
+ *
63
+ * @deprecated Use `requestContext.get()`. Warns once per process; removed
64
+ * in the next minor.
62
65
  */
63
66
  getStore(): RequestStore | undefined;
64
67
  /**