@classytic/arc 2.49.0 → 2.50.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 (155) hide show
  1. package/dist/{EventTransport-DbHZK230.mjs → EventTransport-B18mcj_M.mjs} +2 -2
  2. package/dist/{HookSystem-DMoeJ6Do.mjs → HookSystem-FUBaLTRm.mjs} +2 -2
  3. package/dist/{ResourceRegistry-CP-iTcKy.mjs → ResourceRegistry-C5NM07fZ.mjs} +2 -2
  4. package/dist/{acquire-CB0va87C.mjs → acquire-MHCnbDtH.mjs} +1 -1
  5. package/dist/audit/index.mjs +4 -4
  6. package/dist/auth/audit.mjs +1 -1
  7. package/dist/auth/index.mjs +7 -7
  8. package/dist/auth/redis-session.mjs +1 -1
  9. package/dist/{authorizationDecision-DHO94aV2.mjs → authorizationDecision-BD8K4jdQ.mjs} +4 -4
  10. package/dist/{boundedMap-C51EUUOm.mjs → boundedMap-CuCwos_X.mjs} +1 -1
  11. package/dist/{buildHandler-9DuwEKvr.mjs → buildHandler-BttjNkTM.mjs} +5 -5
  12. package/dist/cache/index.mjs +4 -4
  13. package/dist/{caching-COTX3sDa.mjs → caching-CxUQLHfR.mjs} +2 -2
  14. package/dist/{claimed-C7T1nHlo.mjs → claimed-CQ4ZpD8K.mjs} +1 -1
  15. package/dist/cleanup/index.mjs +4 -4
  16. package/dist/cli/commands/describe.mjs +3 -3
  17. package/dist/cli/commands/docs.mjs +3 -3
  18. package/dist/cli/commands/doctor.mjs +1 -1
  19. package/dist/cli/commands/generate.mjs +2 -2
  20. package/dist/cli/commands/init.mjs +2 -2
  21. package/dist/cli/commands/introspect.mjs +2 -2
  22. package/dist/cli/index.mjs +3 -3
  23. package/dist/{constants-DOnfMd7i.mjs → constants-BZFsZwJh.mjs} +1 -1
  24. package/dist/context/index.mjs +5 -5
  25. package/dist/core/index.mjs +7 -7
  26. package/dist/{core-BoEdFDDw.mjs → core-DWA1-5IE.mjs} +3 -3
  27. package/dist/{createActionRouter-CpTn15dm.mjs → createActionRouter-fP3l2xVF.mjs} +5 -5
  28. package/dist/{createAggregationRouter-CD_Hydp0.mjs → createAggregationRouter-BJZeOmBa.mjs} +7 -7
  29. package/dist/{createApp-Be6XTGD9.mjs → createApp-Db9JRumw.mjs} +29 -29
  30. package/dist/{defineAggregation-BI5pRb8c.mjs → defineAggregation-BskqRz8M.mjs} +1 -1
  31. package/dist/{defineResource-BAzNu5Um.mjs → defineResource-B2vTvKzW.mjs} +8 -8
  32. package/dist/discovery/index.mjs +1 -1
  33. package/dist/docs/index.mjs +3 -3
  34. package/dist/{elevation-DupGuM41.mjs → elevation-XoY0C73T.mjs} +5 -5
  35. package/dist/encryption/index.mjs +3 -3
  36. package/dist/{errorHandler-DA03vRqp.mjs → errorHandler-BYI-JQMm.mjs} +3 -3
  37. package/dist/{errors-BpYV859Y.mjs → errors-3xaK0i9n.mjs} +1 -1
  38. package/dist/{eventPlugin-D7LYtYzL.mjs → eventPlugin-CVQ9ddnL.mjs} +8 -8
  39. package/dist/{eventTypes-BqA-N-Uz.mjs → eventTypes-UPYg7gW1.mjs} +2 -2
  40. package/dist/events/index.mjs +8 -8
  41. package/dist/events/transports/redis-stream-entry.mjs +4 -4
  42. package/dist/events/transports/redis.mjs +2 -2
  43. package/dist/factory/index.mjs +6 -6
  44. package/dist/{fieldTypes-EFWxCkZ5.mjs → fieldTypes-CxRvCaaZ.mjs} +2 -2
  45. package/dist/{fields-CT1Erg7o.mjs → fields-DLFcJiDe.mjs} +1 -1
  46. package/dist/{filter-merge-B1eJ1pMx.mjs → filter-merge-Bvjk_8dV.mjs} +1 -1
  47. package/dist/{generate-Cr0ULavs.mjs → generate-0OpCUjUv.mjs} +2 -2
  48. package/dist/{headers-D4bncIOf.mjs → headers-BROW65-r.mjs} +2 -2
  49. package/dist/{health-BoFxrkJE.mjs → health-Cfh-kYI_.mjs} +1 -1
  50. package/dist/{health-DN_pUVMX.mjs → health-Cy6aOg1i.mjs} +1 -1
  51. package/dist/hooks/index.mjs +2 -2
  52. package/dist/http-cache/index.mjs +4 -4
  53. package/dist/http-cache/purgers/cloudflare.mjs +2 -2
  54. package/dist/http-cache/purgers/fastly.mjs +2 -2
  55. package/dist/http-cache/testing/index.mjs +1 -1
  56. package/dist/idempotency/index.mjs +7 -7
  57. package/dist/idempotency/redis.mjs +2 -2
  58. package/dist/index.mjs +11 -11
  59. package/dist/{init-C4a24wD2.mjs → init-D7PQcvvL.mjs} +1 -1
  60. package/dist/integrations/event-gateway.mjs +2 -2
  61. package/dist/integrations/index.mjs +1 -1
  62. package/dist/integrations/jobs/index.mjs +3 -3
  63. package/dist/integrations/mcp/index.mjs +2 -2
  64. package/dist/integrations/mcp/testing.mjs +2 -2
  65. package/dist/integrations/streamline.mjs +3 -3
  66. package/dist/integrations/webhooks.mjs +4 -4
  67. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  68. package/dist/integrations/websocket-redis.mjs +1 -1
  69. package/dist/integrations/websocket.mjs +2 -2
  70. package/dist/{jsonBody-DoTt5BS6.mjs → jsonBody-C0oREwUc.mjs} +2 -2
  71. package/dist/{keys--l9n7aOC.mjs → keys-CGlPoVSn.mjs} +1 -1
  72. package/dist/{loadResources-rygByIQA.mjs → loadResources-Oi47dogA.mjs} +3 -3
  73. package/dist/{loadResourcesFromEntry-ItNBIQ5w.mjs → loadResourcesFromEntry-BW-LexBz.mjs} +2 -2
  74. package/dist/logger/index.mjs +2 -2
  75. package/dist/{logger-UbknHqHy.mjs → logger-BagW7_YA.mjs} +1 -1
  76. package/dist/{mcpPlugin-CTkk4RP8.mjs → mcpPlugin-C6-wFsOX.mjs} +21 -21
  77. package/dist/{memory-C47xVsjX.mjs → memory-Bl7kv6TS.mjs} +3 -3
  78. package/dist/{metrics-TJyAb1Xk.mjs → metrics-CqnMJKrJ.mjs} +3 -3
  79. package/dist/middleware/index.mjs +3 -3
  80. package/dist/migrations/index.mjs +2 -2
  81. package/dist/{module-CWiqsXnh.mjs → module-lbEbHUfI.mjs} +1 -1
  82. package/dist/{multipartBody-BdG1qbn1.mjs → multipartBody-CqNezaB3.mjs} +1 -1
  83. package/dist/{observeSend-DrA3ADFN.mjs → observeSend-BjilzlYl.mjs} +1 -1
  84. package/dist/{openapi-D6MAbYpv.mjs → openapi-DXNbadgd.mjs} +6 -6
  85. package/dist/outbox-admin/index.mjs +5 -5
  86. package/dist/{outbox-module-D5QABFQW.mjs → outbox-module-k5rIszQ4.mjs} +7 -7
  87. package/dist/permissions/index.mjs +7 -7
  88. package/dist/{permissions-CFsmdYUt.mjs → permissions-BJylQopQ.mjs} +9 -9
  89. package/dist/{pipe-B_05AgGt.mjs → pipe-D1cq8hET.mjs} +2 -2
  90. package/dist/pipeline/index.mjs +2 -2
  91. package/dist/{plan-BnlNJhrj.mjs → plan-iEgaS5_H.mjs} +1 -1
  92. package/dist/{plugin-CrMPYbdj.mjs → plugin-DsLr6L4O.mjs} +24 -24
  93. package/dist/plugins/index.mjs +18 -18
  94. package/dist/plugins/response-cache.mjs +4 -4
  95. package/dist/plugins/tracing-entry.mjs +2 -2
  96. package/dist/{pluralize-oVIxJ4CY.mjs → pluralize-CX4ZvwCa.mjs} +1 -1
  97. package/dist/presets/filesUpload.mjs +5 -5
  98. package/dist/presets/index.mjs +2 -2
  99. package/dist/presets/multiTenant.mjs +5 -5
  100. package/dist/presets/search.mjs +2 -2
  101. package/dist/{presets-CUd3L7v6.mjs → presets-D_suT4OY.mjs} +4 -4
  102. package/dist/{projection-DowJlIto.mjs → projection-CmjGjFih.mjs} +2 -2
  103. package/dist/{purger.types-BjKy8869.mjs → purger.types-CZwkTZ7B.mjs} +1 -1
  104. package/dist/{queryCachePlugin-BvB3k_Fh.mjs → queryCachePlugin-BDOPEAmH.mjs} +6 -6
  105. package/dist/{rateLimitKey-56nH1cWN.mjs → rateLimitKey-igF1x64n.mjs} +1 -1
  106. package/dist/{realtime-DXGBPtYK.mjs → realtime-Cq_ugiWw.mjs} +67 -11
  107. package/dist/registry/index.mjs +3 -3
  108. package/dist/{registry-Biz-6sEZ.mjs → registry-DmF9Akvn.mjs} +2 -2
  109. package/dist/{relay-DEIoMntZ.mjs → relay-DA89IhFt.mjs} +5 -5
  110. package/dist/{renewingLease-BCJpW9-u.mjs → renewingLease-DBtGUt8T.mjs} +1 -1
  111. package/dist/{replyHelpers-DliJNb0-.mjs → replyHelpers-CUbeUc5q.mjs} +2 -2
  112. package/dist/{requestContext-tUgLt9Ky.mjs → requestContext-DO9Qv0gw.mjs} +1 -1
  113. package/dist/{requirement-0l2DApiQ.mjs → requirement-C3GaQmkR.mjs} +1 -1
  114. package/dist/{resourceRateLimit-iSXF8rLH.mjs → resourceRateLimit-KKn-sFhb.mjs} +2 -2
  115. package/dist/{rolldown-runtime-gKJR3o-6.mjs → rolldown-runtime-Ck1Tj4Ax.mjs} +1 -1
  116. package/dist/{routeValidator-xNYA4rr1.mjs → routeValidator-BF7n34xV.mjs} +1 -1
  117. package/dist/{runtimeCapabilities-BQK-GrYe.mjs → runtimeCapabilities-D0A4kkrC.mjs} +1 -1
  118. package/dist/{schedules-D9iMVFhF.mjs → schedules-CLrQRSTt.mjs} +5 -5
  119. package/dist/{schemaConverter-cIh4oX9a.mjs → schemaConverter-JEmU21fu.mjs} +2 -2
  120. package/dist/{schemaIR-BsY4y9VP.mjs → schemaIR-wOffQlbq.mjs} +14 -14
  121. package/dist/schemas/index.mjs +1 -1
  122. package/dist/scim/index.mjs +2 -2
  123. package/dist/scope/index.mjs +5 -5
  124. package/dist/{scope-QyhM9w8z.mjs → scope-CcTMRd7s.mjs} +4 -4
  125. package/dist/{shutdown-BM7Q0h4B.mjs → shutdown-BIR-QBYM.mjs} +1 -1
  126. package/dist/{streamFrames-B3ZJfI02.mjs → simpleEqualityMatcher-DqqJqovq.mjs} +2 -19
  127. package/dist/{sse-ofvlcTQQ.mjs → sse-OEuPpgss.mjs} +7 -7
  128. package/dist/{sseStream-BxQW7hPq.mjs → sseStream-DknHE2K5.mjs} +2 -2
  129. package/dist/{store-helpers-_FRhHDyv.mjs → store-helpers-D4vtEXt2.mjs} +1 -1
  130. package/dist/{streaming-HZr63UiM.mjs → streaming-CcIpcx02.mjs} +1 -1
  131. package/dist/{subscriberIdentity-DSgnoT_D.mjs → subscriberIdentity-PO6kimAl.mjs} +1 -1
  132. package/dist/{tenancy-_ukT0oBt.mjs → tenancy-CH2Kuksc.mjs} +2 -2
  133. package/dist/{tenantPreparation-DSlQI53c.mjs → tenantPreparation-BTGpblQW.mjs} +4 -4
  134. package/dist/testing/cleanupStoreContract.mjs +1 -1
  135. package/dist/testing/index.mjs +11 -11
  136. package/dist/testing/outboxStoreContract.mjs +2 -2
  137. package/dist/testing/requiredPorts.mjs +2 -2
  138. package/dist/testing/storageContract.mjs +1 -1
  139. package/dist/{timing-Z8p-Zlw1.mjs → timing-Dii5X7AP.mjs} +1 -1
  140. package/dist/{transactionContext-DBbSTfY3.mjs → transactionContext-DMPhYEOt.mjs} +1 -1
  141. package/dist/{typeGuards-_6nNQqgq.mjs → typeGuards-C1o_XEyp.mjs} +1 -1
  142. package/dist/types/index.mjs +1 -1
  143. package/dist/types/storage.mjs +1 -1
  144. package/dist/{types-CrOlZ4rY.mjs → types-BuV_cFqT.mjs} +4 -4
  145. package/dist/usage/index.mjs +4 -4
  146. package/dist/{userHelpers-CBKx3XJN.mjs → userHelpers-D4m_pLSC.mjs} +1 -1
  147. package/dist/utils/index.d.mts +2 -48
  148. package/dist/utils/index.mjs +13 -13
  149. package/dist/{utils--HE8R8sH.mjs → utils-CxLMXGn5.mjs} +7 -7
  150. package/dist/{validate-BUeE2MLR.mjs → validate-CZ975J8N.mjs} +3 -3
  151. package/dist/{versioning-qYgqwOhL.mjs → versioning-B2_8SBZo.mjs} +3 -3
  152. package/dist/{workScope-C-1QHNmV.mjs → workScope-B3W3r35s.mjs} +2 -2
  153. package/package.json +3 -3
  154. package/skills/arc/references/api-reference.md +1 -1
  155. package/skills/arc/references/production-realtime.md +1 -1
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  // src/utils/simpleEqualityMatcher.ts
3
3
  /**
4
4
  * `simpleEqualityMatcher` — a minimal, dialect-agnostic flat-key equality
@@ -39,21 +39,4 @@ function simpleEqualityMatcher(item, filters) {
39
39
  }
40
40
  return true;
41
41
  }
42
- // src/utils/streamFrames.ts
43
- /**
44
- * SSE control-frame vocabulary shared by every arc stream and `@classytic/arc-next/sse`.
45
- *
46
- * Kept apart from `replayStream.ts` so a feed that only names the frames
47
- * (`realtimePlugin`) does not pull the replay hub, and `node:crypto`, into its chunk.
48
- */
49
- /**
50
- * SSE control frame names. The same literals ship from `@classytic/arc-next/sse`;
51
- * a test in each package pins them.
52
- */
53
- const STREAM_FRAMES = {
54
- READY: "ready",
55
- RESYNC: "resync",
56
- REVOKED: "revoked",
57
- RETRY: "retry"
58
- };
59
- export { simpleEqualityMatcher as n, STREAM_FRAMES as t };
42
+ export { simpleEqualityMatcher as t };
@@ -1,10 +1,10 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-gKJR3o-6.mjs";
3
- import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-_ukT0oBt.mjs";
4
- import { t as arcLog } from "./logger-UbknHqHy.mjs";
5
- import { g as getUserId, n as PUBLIC_SCOPE } from "./types-CrOlZ4rY.mjs";
6
- import { a as registerSseStats, r as openSseStream } from "./sseStream-BxQW7hPq.mjs";
7
- import { a as promoteStreamTokenToHeader } from "./streaming-HZr63UiM.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
3
+ import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-CH2Kuksc.mjs";
4
+ import { t as arcLog } from "./logger-BagW7_YA.mjs";
5
+ import { g as getUserId, n as PUBLIC_SCOPE } from "./types-BuV_cFqT.mjs";
6
+ import { a as registerSseStats, r as openSseStream } from "./sseStream-DknHE2K5.mjs";
7
+ import { a as promoteStreamTokenToHeader } from "./streaming-CcIpcx02.mjs";
8
8
  import fp from "fastify-plugin";
9
9
  // src/plugins/sse.ts
10
10
  var sse_exports = /* @__PURE__ */ __exportAll({ default: () => sse_default });
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { n as forwardedStreamHeaders } from "./streaming-HZr63UiM.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { n as forwardedStreamHeaders } from "./streaming-CcIpcx02.mjs";
3
3
  // src/utils/sseStats.ts
4
4
  /** Per-instance stats providers behind one `sseStats` decorator. */
5
5
  const statsProviders = /* @__PURE__ */ new WeakMap();
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  // src/utils/store-helpers.ts
3
3
  /**
4
4
  * Classify an error thrown by `getOne` / `getById` / `update` as a
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  import { Readable } from "node:stream";
3
3
  // src/utils/streaming.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  // src/events/subscriberIdentity.ts
3
3
  const SUBSCRIBER_ID = Symbol.for("@classytic/arc/subscriber-id");
4
4
  /** Assign a deployment-stable identity for durable per-handler progress; never use an index. */
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { b as isElevated, c as getOrgId } from "./types-CrOlZ4rY.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { b as isElevated, c as getOrgId } from "./types-BuV_cFqT.mjs";
3
3
  // src/core/tenancy.ts
4
4
  function eventAudienceOf(scope) {
5
5
  const tenancy = resolveTenancy({ _scope: scope }, "organizationId");
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { t as conjoinPolicyFilters } from "./filter-merge-B1eJ1pMx.mjs";
3
- import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-CrOlZ4rY.mjs";
4
- import { d as createDomainError } from "./errors-BpYV859Y.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { t as conjoinPolicyFilters } from "./filter-merge-Bvjk_8dV.mjs";
3
+ import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-BuV_cFqT.mjs";
4
+ import { d as createDomainError } from "./errors-3xaK0i9n.mjs";
5
5
  // src/permissions/tenantPreparation.ts
6
6
  /** Tenant preparation shared by HTTP middleware and direct transport invocation. */
7
7
  const PREPARATION = Symbol.for("arc.tenantPreparation");
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  import { afterAll, beforeAll, describe, expect, it } from "vitest";
3
3
  // src/testing/cleanupStoreContract.ts
4
4
  /**
@@ -1,13 +1,13 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-BnlNJhrj.mjs";
3
- import { h as asModulePorts, r as createApp } from "../createApp-Be6XTGD9.mjs";
4
- import { n as getModuleExports } from "../module-CWiqsXnh.mjs";
5
- import { g as getUserId } from "../types-CrOlZ4rY.mjs";
6
- import { t as defineAggregation } from "../defineAggregation-BI5pRb8c.mjs";
7
- import { f as BaseController } from "../plugin-CrMPYbdj.mjs";
8
- import { t as defineResource } from "../defineResource-BAzNu5Um.mjs";
9
- import { t as CRUD_OPERATIONS } from "../constants-DOnfMd7i.mjs";
10
- import { E as requireOrgRole } from "../permissions-CFsmdYUt.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-iEgaS5_H.mjs";
3
+ import { h as asModulePorts, r as createApp } from "../createApp-Db9JRumw.mjs";
4
+ import { n as getModuleExports } from "../module-lbEbHUfI.mjs";
5
+ import { g as getUserId } from "../types-BuV_cFqT.mjs";
6
+ import { t as defineAggregation } from "../defineAggregation-BskqRz8M.mjs";
7
+ import { f as BaseController } from "../plugin-DsLr6L4O.mjs";
8
+ import { t as defineResource } from "../defineResource-B2vTvKzW.mjs";
9
+ import { t as CRUD_OPERATIONS } from "../constants-BZFsZwJh.mjs";
10
+ import { E as requireOrgRole } from "../permissions-BJylQopQ.mjs";
11
11
  import { runStorageContract } from "./storageContract.mjs";
12
12
  import Fastify from "fastify";
13
13
  import { mkdir, mkdtemp, readFile, readdir, rm, stat } from "node:fs/promises";
@@ -1873,7 +1873,7 @@ function pickDefaultAuth(authMode, callerAuth) {
1873
1873
  };
1874
1874
  }
1875
1875
  async function createTestApp(options = {}) {
1876
- const { createApp } = await import("../createApp-Be6XTGD9.mjs").then((n) => n.i);
1876
+ const { createApp } = await import("../createApp-Db9JRumw.mjs").then((n) => n.i);
1877
1877
  const { resources = [], db = "in-memory", connectMongoose = false, authMode = "jwt", defaultOrgId, plugins, auth: callerAuth, ...appOptions } = options;
1878
1878
  let dbHandle;
1879
1879
  let dbUri;
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { t as claimedAttempts } from "../claimed-C7T1nHlo.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { t as claimedAttempts } from "../claimed-CQ4ZpD8K.mjs";
3
3
  import { OutboxConflictError, OutboxOwnershipError } from "@classytic/primitives/outbox";
4
4
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
5
5
  // src/testing/outboxStoreContract.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { c as declareModules, d as resolveModule, i as planModules, r as compositionProblems } from "../plan-BnlNJhrj.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { c as declareModules, d as resolveModule, i as planModules, r as compositionProblems } from "../plan-iEgaS5_H.mjs";
3
3
  // src/testing/requiredPorts.ts
4
4
  /**
5
5
  * Assert a module declares EXACTLY `ports` as required, and that composing it without any one of
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  import { afterAll, beforeAll, describe, expect, it } from "vitest";
3
3
  // src/testing/storageContract.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  import { createHash } from "node:crypto";
3
3
  // src/utils/operationIdentity.ts
4
4
  /** Security context included in idempotency identities across transports. */
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/context/transactionContext.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  // src/utils/typeGuards.ts
3
3
  /** Check if fastify has the events plugin registered */
4
4
  function hasEvents(instance) {
@@ -1,2 +1,2 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  export {};
@@ -1,2 +1,2 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  export {};
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-BpYV859Y.mjs";
3
- import { n as requireSingleHeaderValue } from "./headers-D4bncIOf.mjs";
4
- import { t as getUserId$1 } from "./userHelpers-CBKx3XJN.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-3xaK0i9n.mjs";
3
+ import { n as requireSingleHeaderValue } from "./headers-BROW65-r.mjs";
4
+ import { t as getUserId$1 } from "./userHelpers-D4m_pLSC.mjs";
5
5
  // src/scope/types.ts
6
6
  /**
7
7
  * Request Scope — The One Standard
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { t as ArcError } from "../errors-BpYV859Y.mjs";
3
- import { c as getOrgId, g as getUserId, i as getClientId } from "../types-CrOlZ4rY.mjs";
4
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-BQK-GrYe.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "../errors-3xaK0i9n.mjs";
3
+ import { c as getOrgId, g as getUserId, i as getClientId } from "../types-BuV_cFqT.mjs";
4
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-D0A4kkrC.mjs";
5
5
  import { usagePeriod } from "@classytic/repo-core/usage";
6
6
  import fp from "fastify-plugin";
7
7
  // src/usage/requireQuota.ts
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
2
  // src/utils/userHelpers.ts
3
3
  /**
4
4
  * Extract a user ID from a user object. Accepts `id` or `_id` — returns
@@ -7,8 +7,8 @@ import { a as SSE_DEFAULT_DRAIN_TIMEOUT_MS, c as SseStreamOptions, i as register
7
7
  import { f as getUserId, m as normalizeRoles, p as getUserRoles, t as AnyRecord } from "../base-HXNgPQww.mjs";
8
8
  import { errorContractSchema } from "@classytic/repo-core/errors";
9
9
  import { FilterClause } from "@classytic/repo-core/query-parser";
10
- import { FastifyInstance, FastifyReply, FastifyRequest, RouteHandlerMethod } from "fastify";
11
10
  import { ChangeEntry, ChangeLogStore, ChangesSinceOptions } from "@classytic/repo-core/sync";
11
+ import { FastifyInstance, FastifyReply, FastifyRequest, RouteHandlerMethod } from "fastify";
12
12
  export declare const CircuitState: {
13
13
  readonly CLOSED: "CLOSED";
14
14
  readonly OPEN: "OPEN";
@@ -585,52 +585,6 @@ export declare class ArcQueryParser implements QueryParserInterface {
585
585
  }
586
586
  /** Create a new ArcQueryParser instance. */
587
587
  export declare function createQueryParser(options?: ArcQueryParserOptions): ArcQueryParser;
588
- /**
589
- * SSE control-frame vocabulary shared by every arc stream and `@classytic/arc-next/sse`.
590
- *
591
- * Kept apart from `replayStream.ts` so a feed that only names the frames
592
- * (`realtimePlugin`) does not pull the replay hub, and `node:crypto`, into its chunk.
593
- */
594
- /**
595
- * SSE control frame names. The same literals ship from `@classytic/arc-next/sse`;
596
- * a test in each package pins them.
597
- */
598
- export declare const STREAM_FRAMES: {
599
- readonly READY: "ready";
600
- readonly RESYNC: "resync";
601
- readonly REVOKED: "revoked";
602
- readonly RETRY: "retry";
603
- };
604
- type StreamFrameName = (typeof STREAM_FRAMES)[keyof typeof STREAM_FRAMES];
605
- type ResyncReason = "cursor_expired" | "gap_too_large" | "cursor_invalid";
606
- /**
607
- * `event: ready` (no `id:`). The first frame on every connection. `cursor` is
608
- * present only on a replayable stream (the replay hub always sends it).
609
- * `realtimePlugin` keeps its `resources` and `operations` fields next to these.
610
- */
611
- interface ReadyFrame {
612
- cursor?: string;
613
- resumed: boolean;
614
- }
615
- /** `event: resync` (no `id:`). The gap could not be replayed: reload the snapshot, then continue from `cursor`. */
616
- interface ResyncFrame {
617
- cursor: string;
618
- reason: ResyncReason;
619
- }
620
- /** `event: revoked` (no `id:`). Access ended; the server closes the stream right after this frame. */
621
- interface RevokedFrame {
622
- reason: string;
623
- }
624
- /**
625
- * `event: retry` (no `id:`). NOT final: the server closes right after, and the client
626
- * should reconnect at once (no backoff) with its `Last-Event-ID`, so the stream is
627
- * authorized afresh. Sent by the replay hub's `revalidate` (`{ close: 'retry' }` or
628
- * `maxConsecutiveFailures`). A client that does not know the frame still reconnects
629
- * with its normal backoff, so the frame is safe to send to older clients.
630
- */
631
- interface RetryFrame {
632
- reason: string;
633
- }
634
588
  /**
635
589
  * Identity keys a revoke matches on, e.g. `{ userId }`, `{ sessionId }`, `{ deviceId }`.
636
590
  * Values are compared as strings (`String(value)`), so an ObjectId or a number
@@ -1674,4 +1628,4 @@ interface EventsDecorator {
1674
1628
  export declare function hasEvents(instance: FastifyInstance): instance is FastifyInstance & {
1675
1629
  events: EventsDecorator;
1676
1630
  };
1677
- export { type AnyAsyncFn, ArcError, type ArcHeaders, type ArcQueryParserOptions, type CircuitBreakerOptions, type CircuitBreakerRedisLike, type CircuitBreakerSharedState, type CircuitBreakerStats, type CompensationDefinition, type CompensationError, type CompensationHooks, type CompensationResult, type CompensationStep, ConflictError, type ErrorOptions, type EventsDecorator, type FilterDialect, ForbiddenError, type Guard, type GuardConfig, type JsonSchema, type JsonSchemaTarget, NotFoundError, OrgAccessDeniedError, OrgRequiredError, type PipeUIMessageStreamOptions, RateLimitError, type ReadyFrame, type RedisCircuitBreakerStateOptions, type ReplayCloseVerdict, type ReplayHub, type ReplayHubOptions, type ReplayHubStats, type ReplayHubTimers, type ReplayReadScope, type ReplaySubscription, type ResyncFrame, type ResyncReason, type RetryFrame, type RevokeTarget, type RevokedFrame, type RuntimeCapabilityDeclaration, type SSEStats, SSE_DEFAULT_DRAIN_TIMEOUT_MS, SSE_DEFAULT_MAX_BUFFERED_BYTES, type SchemaIo, ServiceUnavailableError, type ShutdownParticipant, type SseConnectionGauge, type SseStream, type SseStreamOptions, type StateMachine, type StreamFrameName, type TransitionConfig, UnauthorizedError, type UnconvertibleMode, ValidationError, createDomainError, createError, createSseConnectionGauge, errorContractSchema, getHeader, getUserId, getUserRoles, isArcError, normalizeRoles, openSseStream, registerSseStats, requireSingleHeaderValue };
1631
+ export { type AnyAsyncFn, ArcError, type ArcHeaders, type ArcQueryParserOptions, type CircuitBreakerOptions, type CircuitBreakerRedisLike, type CircuitBreakerSharedState, type CircuitBreakerStats, type CompensationDefinition, type CompensationError, type CompensationHooks, type CompensationResult, type CompensationStep, ConflictError, type ErrorOptions, type EventsDecorator, type FilterDialect, ForbiddenError, type Guard, type GuardConfig, type JsonSchema, type JsonSchemaTarget, NotFoundError, OrgAccessDeniedError, OrgRequiredError, type PipeUIMessageStreamOptions, RateLimitError, type RedisCircuitBreakerStateOptions, type ReplayCloseVerdict, type ReplayHub, type ReplayHubOptions, type ReplayHubStats, type ReplayHubTimers, type ReplayReadScope, type ReplaySubscription, type RevokeTarget, type RuntimeCapabilityDeclaration, type SSEStats, SSE_DEFAULT_DRAIN_TIMEOUT_MS, SSE_DEFAULT_MAX_BUFFERED_BYTES, type SchemaIo, ServiceUnavailableError, type ShutdownParticipant, type SseConnectionGauge, type SseStream, type SseStreamOptions, type StateMachine, type TransitionConfig, UnauthorizedError, type UnconvertibleMode, ValidationError, createDomainError, createError, createSseConnectionGauge, errorContractSchema, getHeader, getUserId, getUserRoles, isArcError, normalizeRoles, openSseStream, registerSseStats, requireSingleHeaderValue };
@@ -1,13 +1,13 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { a as OrgAccessDeniedError, c as ServiceUnavailableError, d as createDomainError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-BpYV859Y.mjs";
3
- import { n as simpleEqualityMatcher, t as STREAM_FRAMES } from "../streamFrames-B3ZJfI02.mjs";
4
- import { n as requireSingleHeaderValue, t as getHeader } from "../headers-D4bncIOf.mjs";
5
- import { n as getUserRoles, r as normalizeRoles, t as getUserId } from "../userHelpers-CBKx3XJN.mjs";
6
- import { A as MONGO_DIALECT, C as listResponse, D as responses, E as queryParams, O as ArcQueryParser, S as keysetListResponse, T as paginationSchema, _ as bareListResponse, a as defineGuard, b as getDefaultCrudSchemas, c as withCompensation, d as CircuitBreakerError, f as CircuitBreakerRegistry, g as aggregateListResponse, h as createCircuitBreakerRegistry, i as handleRaw, j as NEUTRAL_DIALECT, k as createQueryParser, l as RedisCircuitBreakerState, m as createCircuitBreaker, n as createReplayHub, o as defineErrorMapper, p as CircuitState, r as lastEventIdOf, s as defineCompensation, t as createStateMachine, u as CircuitBreaker, v as deleteResponse, w as offsetListResponse, x as getListQueryParams, y as errorContractSchema } from "../utils--HE8R8sH.mjs";
7
- import { a as isZodSchema, i as isJsonSchema, n as convertRouteSchema, o as toJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-cIh4oX9a.mjs";
8
- import { a as promoteStreamTokenToHeader, i as pipeUIMessageStreamToReply, n as forwardedStreamHeaders, r as isReadableStream, t as UI_MESSAGE_STREAM_HEADERS } from "../streaming-HZr63UiM.mjs";
9
- import { a as registerSseStats, i as createSseConnectionGauge, n as SSE_DEFAULT_MAX_BUFFERED_BYTES, r as openSseStream, t as SSE_DEFAULT_DRAIN_TIMEOUT_MS } from "../sseStream-BxQW7hPq.mjs";
10
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-BQK-GrYe.mjs";
11
- import { i as runAdmittedWork, r as registerShutdownParticipant } from "../shutdown-BM7Q0h4B.mjs";
12
- import { t as hasEvents } from "../typeGuards-_6nNQqgq.mjs";
13
- export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, MONGO_DIALECT, NEUTRAL_DIALECT, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, RedisCircuitBreakerState, SSE_DEFAULT_DRAIN_TIMEOUT_MS, SSE_DEFAULT_MAX_BUFFERED_BYTES, STREAM_FRAMES, ServiceUnavailableError, UI_MESSAGE_STREAM_HEADERS, UnauthorizedError, ValidationError, aggregateListResponse, bareListResponse, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createDomainError, createError, createQueryParser, createReplayHub, createSseConnectionGauge, createStateMachine, declareRuntimeCapability, defineCompensation, defineErrorMapper, defineGuard, deleteResponse, errorContractSchema, forwardedStreamHeaders, getDefaultCrudSchemas, getHeader, getListQueryParams, getUserId, getUserRoles, handleRaw, hasEvents, isArcError, isJsonSchema, isReadableStream, isZodSchema, keysetListResponse, lastEventIdOf, listResponse, normalizeRoles, offsetListResponse, openSseStream, paginationSchema, pipeUIMessageStreamToReply, promoteStreamTokenToHeader, queryParams, registerShutdownParticipant, registerSseStats, requireSingleHeaderValue, responses, runAdmittedWork, simpleEqualityMatcher, toJsonSchema, withCompensation };
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { a as OrgAccessDeniedError, c as ServiceUnavailableError, d as createDomainError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-3xaK0i9n.mjs";
3
+ import { t as simpleEqualityMatcher } from "../simpleEqualityMatcher-DqqJqovq.mjs";
4
+ import { n as requireSingleHeaderValue, t as getHeader } from "../headers-BROW65-r.mjs";
5
+ import { n as getUserRoles, r as normalizeRoles, t as getUserId } from "../userHelpers-D4m_pLSC.mjs";
6
+ import { A as MONGO_DIALECT, C as listResponse, D as responses, E as queryParams, O as ArcQueryParser, S as keysetListResponse, T as paginationSchema, _ as bareListResponse, a as defineGuard, b as getDefaultCrudSchemas, c as withCompensation, d as CircuitBreakerError, f as CircuitBreakerRegistry, g as aggregateListResponse, h as createCircuitBreakerRegistry, i as handleRaw, j as NEUTRAL_DIALECT, k as createQueryParser, l as RedisCircuitBreakerState, m as createCircuitBreaker, n as createReplayHub, o as defineErrorMapper, p as CircuitState, r as lastEventIdOf, s as defineCompensation, t as createStateMachine, u as CircuitBreaker, v as deleteResponse, w as offsetListResponse, x as getListQueryParams, y as errorContractSchema } from "../utils-CxLMXGn5.mjs";
7
+ import { a as isZodSchema, i as isJsonSchema, n as convertRouteSchema, o as toJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-JEmU21fu.mjs";
8
+ import { a as promoteStreamTokenToHeader, i as pipeUIMessageStreamToReply, n as forwardedStreamHeaders, r as isReadableStream, t as UI_MESSAGE_STREAM_HEADERS } from "../streaming-CcIpcx02.mjs";
9
+ import { a as registerSseStats, i as createSseConnectionGauge, n as SSE_DEFAULT_MAX_BUFFERED_BYTES, r as openSseStream, t as SSE_DEFAULT_DRAIN_TIMEOUT_MS } from "../sseStream-DknHE2K5.mjs";
10
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-D0A4kkrC.mjs";
11
+ import { i as runAdmittedWork, r as registerShutdownParticipant } from "../shutdown-BIR-QBYM.mjs";
12
+ import { t as hasEvents } from "../typeGuards-C1o_XEyp.mjs";
13
+ export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, MONGO_DIALECT, NEUTRAL_DIALECT, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, RedisCircuitBreakerState, SSE_DEFAULT_DRAIN_TIMEOUT_MS, SSE_DEFAULT_MAX_BUFFERED_BYTES, ServiceUnavailableError, UI_MESSAGE_STREAM_HEADERS, UnauthorizedError, ValidationError, aggregateListResponse, bareListResponse, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createDomainError, createError, createQueryParser, createReplayHub, createSseConnectionGauge, createStateMachine, declareRuntimeCapability, defineCompensation, defineErrorMapper, defineGuard, deleteResponse, errorContractSchema, forwardedStreamHeaders, getDefaultCrudSchemas, getHeader, getListQueryParams, getUserId, getUserRoles, handleRaw, hasEvents, isArcError, isJsonSchema, isReadableStream, isZodSchema, keysetListResponse, lastEventIdOf, listResponse, normalizeRoles, offsetListResponse, openSseStream, paginationSchema, pipeUIMessageStreamToReply, promoteStreamTokenToHeader, queryParams, registerShutdownParticipant, registerSseStats, requireSingleHeaderValue, responses, runAdmittedWork, simpleEqualityMatcher, toJsonSchema, withCompensation };
@@ -1,14 +1,14 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { t as ArcError, u as ValidationError } from "./errors-BpYV859Y.mjs";
3
- import { t as runObservingSend } from "./observeSend-DrA3ADFN.mjs";
4
- import { h as RESERVED_QUERY_PARAMS } from "./constants-DOnfMd7i.mjs";
5
- import { t as arcLog } from "./logger-UbknHqHy.mjs";
6
- import { a as registerSseStats } from "./sseStream-BxQW7hPq.mjs";
7
- import { t as STREAM_FRAMES } from "./streamFrames-B3ZJfI02.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { t as ArcError, u as ValidationError } from "./errors-3xaK0i9n.mjs";
3
+ import { t as runObservingSend } from "./observeSend-BjilzlYl.mjs";
4
+ import { h as RESERVED_QUERY_PARAMS } from "./constants-BZFsZwJh.mjs";
5
+ import { t as arcLog } from "./logger-BagW7_YA.mjs";
6
+ import { a as registerSseStats } from "./sseStream-DknHE2K5.mjs";
8
7
  import { errorContractSchema as errorContractSchema$1 } from "@classytic/repo-core/errors";
9
8
  import { readEnv } from "@classytic/primitives/environment";
10
9
  import { OPERATOR_DESCRIPTIONS, URL_OPERATORS, escapeRegex, isQueryGrammarError, readFilterClauses, readPageRequest, readSearch, readSelect, readSort } from "@classytic/repo-core/query-parser";
11
10
  import { createCipheriv, createDecipheriv, hkdfSync, randomBytes } from "node:crypto";
11
+ import { STREAM_FRAMES } from "@classytic/repo-core/sync";
12
12
  // src/utils/filter-dialect.ts
13
13
  /**
14
14
  * Filter dialects — what `ArcQueryParser` EMITS. Reading a URL (keys, operators, coercion,
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-gKJR3o-6.mjs";
3
- import { x as pathTouchesBlocked } from "./plugin-CrMPYbdj.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
3
+ import { x as pathTouchesBlocked } from "./plugin-DsLr6L4O.mjs";
4
4
  // src/core/aggregation/normalize.ts
5
5
  /**
6
6
  * Framework cap on URL-driven aggregation limits when the host opts
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-gKJR3o-6.mjs";
3
- import { d as createDomainError } from "./errors-BpYV859Y.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
3
+ import { d as createDomainError } from "./errors-3xaK0i9n.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  // src/plugins/versioning.ts
6
6
  var versioning_exports = /* @__PURE__ */ __exportAll({ default: () => versioning_default });
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
2
- import { n as requestContext } from "./requestContext-tUgLt9Ky.mjs";
1
+ /*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
2
+ import { n as requestContext } from "./requestContext-DO9Qv0gw.mjs";
3
3
  // src/context/workScope.ts
4
4
  /** Enter a scope for `fn`, or run it inside the active one. */
5
5
  function runWorkScope(seed, fn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classytic/arc",
3
- "version": "2.49.0",
3
+ "version": "2.50.0",
4
4
  "description": "Resource-oriented backend framework for Fastify - clean, minimal, powerful, tree-shakable",
5
5
  "type": "module",
6
6
  "exports": {
@@ -379,7 +379,7 @@
379
379
  },
380
380
  "peerDependencies": {
381
381
  "@classytic/primitives": ">=0.36.0",
382
- "@classytic/repo-core": ">=0.37.0",
382
+ "@classytic/repo-core": ">=0.38.0",
383
383
  "@classytic/streamline": ">=2.12.0",
384
384
  "@fastify/cors": ">=11.0.0",
385
385
  "@fastify/helmet": ">=13.0.0",
@@ -516,7 +516,7 @@
516
516
  "@classytic/mongokit": "^3.44.0",
517
517
  "@classytic/pgkit": "^0.1.1",
518
518
  "@classytic/primitives": "^0.36.0",
519
- "@classytic/repo-core": "^0.37.0",
519
+ "@classytic/repo-core": "^0.38.0",
520
520
  "@classytic/sqlitekit": "^0.13.0",
521
521
  "@classytic/streamline": "^2.12.0",
522
522
  "@electric-sql/pglite": "^0.5.15",
@@ -25,7 +25,7 @@ Import only from these subpaths (tree-shaken, no deep imports). Authoritative li
25
25
  | `/context`, `/logger` | `requestContext`, `transactionContext`, `runWorkScope`; `arcLog`, `configureArcLogger` |
26
26
  | `/registry`, `/discovery`, `/docs` | `ResourceRegistry`, `introspectionPlugin`; `discoverResources`; `openApiPlugin`, `scalarPlugin`, `buildOpenApiSpec` |
27
27
  | `/schemas` | `Type`, `ArcListResponse`, `ArcErrorResponse`, `ArcPaginationQuery` |
28
- | `/utils` | `createStateMachine`, `CircuitBreaker`, `withCompensation`, `defineGuard`, `declareRuntimeCapability`, `createQueryParser`, `ArcQueryParser`, `createError`, `pipeUIMessageStreamToReply`, `openSseStream`, `createReplayHub`, `lastEventIdOf`, `STREAM_FRAMES`, `registerSseStats`, `createSseConnectionGauge`, `listResponse`, `errorContractSchema`, error classes |
28
+ | `/utils` | `createStateMachine`, `CircuitBreaker`, `withCompensation`, `defineGuard`, `declareRuntimeCapability`, `createQueryParser`, `ArcQueryParser`, `createError`, `pipeUIMessageStreamToReply`, `openSseStream`, `createReplayHub`, `lastEventIdOf`, `registerSseStats`, `createSseConnectionGauge`, `listResponse`, `errorContractSchema`, error classes |
29
29
  | `/migrations` | `defineMigration`, `MigrationRunner`, `MigrationRegistry`, `MongoMigrationStore` |
30
30
  | `/cleanup` | `createDataCleanupModule`, `createCleanupService`, `createCleanupRegistry`, `recipeFromSteps` |
31
31
  | `/encryption` | `encryptionPlugin`, `encryptField`, `decryptField`, `createStaticKeyProvider` |
@@ -68,7 +68,7 @@ await app.events.subscribe('alert.*', () => hub.notify()); // the bus only WAK
68
68
  await hub.attach(openSseStream(req, reply), ctx, lastEventIdOf(req));
69
69
  ```
70
70
 
71
- - Frames: `ready {cursor, resumed}` first, then the replay or one `resync {cursor, reason}`, then live (`id:` = cursor). `revoked {reason}` then close (final). `retry {reason}` then close (not final: reconnect now). Names: `STREAM_FRAMES`, same literals as `@classytic/arc-next/sse`.
71
+ - Frames: `ready {cursor, resumed}` first, then the replay or one `resync {cursor, reason}`, then live (`id:` = cursor). `revoked {reason}` then close (final). `retry {reason}` then close (not final: reconnect now). Names: `STREAM_FRAMES` from `@classytic/repo-core/sync` (the contract owner; `@classytic/arc-next/sse` reads the same one).
72
72
  - `openSseStream` waits for `drain` (`maxBufferedBytes` 1 MiB, `drainTimeoutMs` 10 s; `0` bytes = old fail-fast); the hub paces a replay on `needsDrain`/`drain()`, so a large resume is not cut.
73
73
  - A live entry the replay already sent goes out once. Entries hidden by `toFrame` are followed by an id-only frame, so the client cursor keeps up.
74
74
  - Gap over `maxReplay` (500) → `gap_too_large`; `CursorExpiredError` → `cursor_expired`; invalid or ahead → `cursor_invalid`. Other store errors close with no frame.