effect-app 4.0.0-beta.99 → 4.0.1

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 (391) hide show
  1. package/CHANGELOG.md +2042 -0
  2. package/dist/Array.d.ts +1 -17
  3. package/dist/Array.d.ts.map +1 -1
  4. package/dist/Array.js +3 -27
  5. package/dist/Chunk.d.ts +3 -27
  6. package/dist/Chunk.d.ts.map +1 -1
  7. package/dist/Chunk.js +4 -39
  8. package/dist/Config/SecretURL.d.ts +3 -1
  9. package/dist/Config/SecretURL.d.ts.map +1 -1
  10. package/dist/Config/SecretURL.js +3 -6
  11. package/dist/Config/internal/configSecretURL.d.ts.map +1 -1
  12. package/dist/Config/internal/configSecretURL.js +2 -2
  13. package/dist/Config.d.ts +0 -5
  14. package/dist/Config.d.ts.map +1 -1
  15. package/dist/Config.js +7 -5
  16. package/dist/ConfigProvider.d.ts +0 -37
  17. package/dist/ConfigProvider.d.ts.map +1 -1
  18. package/dist/ConfigProvider.js +5 -41
  19. package/dist/Context.d.ts +6 -4
  20. package/dist/Context.d.ts.map +1 -1
  21. package/dist/Context.js +4 -3
  22. package/dist/DataDependencies.d.ts +136 -0
  23. package/dist/DataDependencies.d.ts.map +1 -0
  24. package/dist/DataDependencies.js +112 -0
  25. package/dist/DateTime.d.ts +33 -0
  26. package/dist/DateTime.d.ts.map +1 -0
  27. package/dist/DateTime.js +18 -0
  28. package/dist/Effect.d.ts +3 -14
  29. package/dist/Effect.d.ts.map +1 -1
  30. package/dist/Effect.js +8 -26
  31. package/dist/Emailer.d.ts +51 -0
  32. package/dist/Emailer.d.ts.map +1 -0
  33. package/dist/Emailer.js +7 -0
  34. package/dist/Function.d.ts +0 -4
  35. package/dist/Function.d.ts.map +1 -1
  36. package/dist/Function.js +1 -7
  37. package/dist/Layer.d.ts +6 -3
  38. package/dist/Layer.d.ts.map +1 -1
  39. package/dist/Layer.js +3 -2
  40. package/dist/Model/Repository/Registry.d.ts +22 -0
  41. package/dist/Model/Repository/Registry.d.ts.map +1 -0
  42. package/dist/Model/Repository/Registry.js +18 -0
  43. package/dist/Model/Repository/dependency.d.ts +6 -0
  44. package/dist/Model/Repository/dependency.d.ts.map +1 -0
  45. package/dist/Model/Repository/dependency.js +29 -0
  46. package/dist/Model/Repository/ext.d.ts +60 -0
  47. package/dist/Model/Repository/ext.d.ts.map +1 -0
  48. package/dist/Model/Repository/ext.js +124 -0
  49. package/dist/Model/Repository/internal/internal.d.ts +68 -0
  50. package/dist/Model/Repository/internal/internal.d.ts.map +1 -0
  51. package/dist/Model/Repository/internal/internal.js +610 -0
  52. package/dist/Model/Repository/legacy.d.ts +21 -0
  53. package/dist/Model/Repository/legacy.d.ts.map +1 -0
  54. package/dist/Model/Repository/legacy.js +2 -0
  55. package/dist/Model/Repository/makeRepo.d.ts +71 -0
  56. package/dist/Model/Repository/makeRepo.d.ts.map +1 -0
  57. package/dist/Model/Repository/makeRepo.js +30 -0
  58. package/dist/Model/Repository/service.d.ts +121 -0
  59. package/dist/Model/Repository/service.d.ts.map +1 -0
  60. package/dist/Model/Repository/service.js +2 -0
  61. package/dist/Model/Repository/validation.d.ts +72 -0
  62. package/dist/Model/Repository/validation.d.ts.map +1 -0
  63. package/dist/Model/Repository/validation.js +39 -0
  64. package/dist/Model/Repository.d.ts +8 -0
  65. package/dist/Model/Repository.d.ts.map +1 -0
  66. package/dist/Model/Repository.js +8 -0
  67. package/dist/Model/dsl.d.ts +34 -0
  68. package/dist/Model/dsl.d.ts.map +1 -0
  69. package/dist/Model/dsl.js +45 -0
  70. package/dist/Model/filter/filterApi.d.ts +30 -0
  71. package/dist/Model/filter/filterApi.d.ts.map +1 -0
  72. package/dist/Model/filter/filterApi.js +2 -0
  73. package/dist/Model/filter/types/errors.d.ts +29 -0
  74. package/dist/Model/filter/types/errors.d.ts.map +1 -0
  75. package/dist/Model/filter/types/errors.js +2 -0
  76. package/dist/Model/filter/types/fields.d.ts +15 -0
  77. package/dist/Model/filter/types/fields.d.ts.map +1 -0
  78. package/dist/Model/filter/types/fields.js +2 -0
  79. package/dist/Model/filter/types/path/common.d.ts +316 -0
  80. package/dist/Model/filter/types/path/common.d.ts.map +1 -0
  81. package/dist/Model/filter/types/path/common.js +2 -0
  82. package/dist/Model/filter/types/path/eager.d.ts +94 -0
  83. package/dist/Model/filter/types/path/eager.d.ts.map +1 -0
  84. package/dist/Model/filter/types/path/eager.js +36 -0
  85. package/dist/Model/filter/types/path/index.d.ts +4 -0
  86. package/dist/Model/filter/types/path/index.d.ts.map +1 -0
  87. package/dist/Model/filter/types/path/index.js +3 -0
  88. package/dist/Model/filter/types/utils.d.ts +79 -0
  89. package/dist/Model/filter/types/utils.d.ts.map +1 -0
  90. package/dist/Model/filter/types/utils.js +2 -0
  91. package/dist/Model/filter/types/validator.d.ts +30 -0
  92. package/dist/Model/filter/types/validator.d.ts.map +1 -0
  93. package/dist/Model/filter/types/validator.js +2 -0
  94. package/dist/Model/filter/types.d.ts +5 -0
  95. package/dist/Model/filter/types.d.ts.map +1 -0
  96. package/dist/Model/filter/types.js +7 -0
  97. package/dist/Model/query/dsl.d.ts +630 -0
  98. package/dist/Model/query/dsl.d.ts.map +1 -0
  99. package/dist/Model/query/dsl.js +376 -0
  100. package/dist/Model/query/new-kid-interpreter.d.ts +132 -0
  101. package/dist/Model/query/new-kid-interpreter.d.ts.map +1 -0
  102. package/dist/Model/query/new-kid-interpreter.js +369 -0
  103. package/dist/Model/query.d.ts +15 -0
  104. package/dist/Model/query.d.ts.map +1 -0
  105. package/dist/Model/query.js +3 -0
  106. package/dist/Model.d.ts +6 -0
  107. package/dist/Model.d.ts.map +1 -0
  108. package/dist/Model.js +6 -0
  109. package/dist/NonEmptySet.d.ts +3 -1
  110. package/dist/NonEmptySet.d.ts.map +1 -1
  111. package/dist/NonEmptySet.js +2 -2
  112. package/dist/Option.d.ts +1 -2
  113. package/dist/Option.d.ts.map +1 -1
  114. package/dist/Option.js +3 -7
  115. package/dist/Pure.d.ts +9 -7
  116. package/dist/Pure.d.ts.map +1 -1
  117. package/dist/Pure.js +20 -17
  118. package/dist/QueueMaker.d.ts +11 -0
  119. package/dist/QueueMaker.d.ts.map +1 -0
  120. package/dist/QueueMaker.js +11 -0
  121. package/dist/RequestContext.d.ts +87 -0
  122. package/dist/RequestContext.d.ts.map +1 -0
  123. package/dist/RequestContext.js +45 -0
  124. package/dist/RequestScopedDependencies.d.ts +21 -0
  125. package/dist/RequestScopedDependencies.d.ts.map +1 -0
  126. package/dist/RequestScopedDependencies.js +16 -0
  127. package/dist/Schema/Class.d.ts +163 -16
  128. package/dist/Schema/Class.d.ts.map +1 -1
  129. package/dist/Schema/Class.js +193 -21
  130. package/dist/Schema/FastCheck.d.ts.map +1 -1
  131. package/dist/Schema/SchemaParser.d.ts +5 -0
  132. package/dist/Schema/SchemaParser.d.ts.map +1 -0
  133. package/dist/Schema/SchemaParser.js +6 -0
  134. package/dist/Schema/SpecialJsonSchema.d.ts +15 -2
  135. package/dist/Schema/SpecialJsonSchema.d.ts.map +1 -1
  136. package/dist/Schema/SpecialJsonSchema.js +70 -12
  137. package/dist/Schema/SpecialOpenApi.d.ts +1 -1
  138. package/dist/Schema/SpecialOpenApi.js +3 -3
  139. package/dist/Schema/brand.d.ts +5 -5
  140. package/dist/Schema/brand.d.ts.map +1 -1
  141. package/dist/Schema/brand.js +6 -4
  142. package/dist/Schema/email.d.ts.map +1 -1
  143. package/dist/Schema/email.js +8 -5
  144. package/dist/Schema/ext.d.ts +279 -75
  145. package/dist/Schema/ext.d.ts.map +1 -1
  146. package/dist/Schema/ext.js +330 -72
  147. package/dist/Schema/moreStrings.d.ts +82 -48
  148. package/dist/Schema/moreStrings.d.ts.map +1 -1
  149. package/dist/Schema/moreStrings.js +85 -51
  150. package/dist/Schema/numbers.d.ts +33 -21
  151. package/dist/Schema/numbers.d.ts.map +1 -1
  152. package/dist/Schema/numbers.js +64 -12
  153. package/dist/Schema/phoneNumber.d.ts.map +1 -1
  154. package/dist/Schema/phoneNumber.js +6 -6
  155. package/dist/Schema/schema.d.ts +1 -1
  156. package/dist/Schema/schema.d.ts.map +1 -1
  157. package/dist/Schema/schema.js +2 -2
  158. package/dist/Schema/strings.d.ts +18 -4
  159. package/dist/Schema/strings.d.ts.map +1 -1
  160. package/dist/Schema/strings.js +1 -5
  161. package/dist/Schema.d.ts +224 -7
  162. package/dist/Schema.d.ts.map +1 -1
  163. package/dist/Schema.js +190 -24
  164. package/dist/SchemaAST.d.ts +2 -0
  165. package/dist/SchemaAST.d.ts.map +1 -0
  166. package/dist/SchemaAST.js +2 -0
  167. package/dist/Set.d.ts +4 -1
  168. package/dist/Set.d.ts.map +1 -1
  169. package/dist/Set.js +8 -6
  170. package/dist/Store.d.ts +215 -0
  171. package/dist/Store.d.ts.map +1 -0
  172. package/dist/Store.js +113 -0
  173. package/dist/_ext/Array.d.ts +1 -1
  174. package/dist/_ext/Array.d.ts.map +1 -1
  175. package/dist/_ext/Array.js +4 -2
  176. package/dist/_ext/ord.ext.d.ts +2 -1
  177. package/dist/_ext/ord.ext.d.ts.map +1 -1
  178. package/dist/_ext/ord.ext.js +2 -2
  179. package/dist/builtin.d.ts +2 -14
  180. package/dist/builtin.d.ts.map +1 -1
  181. package/dist/builtin.js +1 -1
  182. package/dist/client/InvalidationKeys.d.ts +30 -0
  183. package/dist/client/InvalidationKeys.d.ts.map +1 -0
  184. package/dist/client/InvalidationKeys.js +37 -0
  185. package/dist/client/apiClientFactory.d.ts +13 -8
  186. package/dist/client/apiClientFactory.d.ts.map +1 -1
  187. package/dist/client/apiClientFactory.js +154 -34
  188. package/dist/client/clientFor.d.ts +48 -13
  189. package/dist/client/clientFor.d.ts.map +1 -1
  190. package/dist/client/clientFor.js +9 -1
  191. package/dist/client/errors.d.ts +74 -28
  192. package/dist/client/errors.d.ts.map +1 -1
  193. package/dist/client/errors.js +41 -10
  194. package/dist/client/makeClient.d.ts +487 -32
  195. package/dist/client/makeClient.d.ts.map +1 -1
  196. package/dist/client/makeClient.js +47 -21
  197. package/dist/client.d.ts +2 -0
  198. package/dist/client.d.ts.map +1 -1
  199. package/dist/client.js +3 -1
  200. package/dist/faker.d.ts.map +1 -1
  201. package/dist/http/Request.d.ts +2 -2
  202. package/dist/http/Request.d.ts.map +1 -1
  203. package/dist/http/Request.js +2 -2
  204. package/dist/http/internal/lib.d.ts +12 -12
  205. package/dist/http/internal/lib.d.ts.map +1 -1
  206. package/dist/http/internal/lib.js +13 -13
  207. package/dist/ids.d.ts +32 -14
  208. package/dist/ids.d.ts.map +1 -1
  209. package/dist/ids.js +38 -7
  210. package/dist/index.d.ts +3 -0
  211. package/dist/index.d.ts.map +1 -1
  212. package/dist/index.js +5 -1
  213. package/dist/middleware.d.ts +12 -6
  214. package/dist/middleware.d.ts.map +1 -1
  215. package/dist/middleware.js +13 -7
  216. package/dist/migration/nativeEffect.d.ts +21 -0
  217. package/dist/migration/nativeEffect.d.ts.map +1 -0
  218. package/dist/migration/nativeEffect.js +598 -0
  219. package/dist/rpc/Invalidation.d.ts +1124 -0
  220. package/dist/rpc/Invalidation.d.ts.map +1 -0
  221. package/dist/rpc/Invalidation.js +178 -0
  222. package/dist/rpc/MiddlewareMaker.d.ts +10 -7
  223. package/dist/rpc/MiddlewareMaker.d.ts.map +1 -1
  224. package/dist/rpc/MiddlewareMaker.js +57 -37
  225. package/dist/rpc/RpcContextMap.d.ts +2 -2
  226. package/dist/rpc/RpcContextMap.d.ts.map +1 -1
  227. package/dist/rpc/RpcMiddleware.d.ts +13 -10
  228. package/dist/rpc/RpcMiddleware.d.ts.map +1 -1
  229. package/dist/rpc/RpcMiddleware.js +2 -2
  230. package/dist/rpc.d.ts +1 -1
  231. package/dist/rpc.d.ts.map +1 -1
  232. package/dist/rpc.js +2 -2
  233. package/dist/runtime.d.ts +19 -0
  234. package/dist/runtime.d.ts.map +1 -0
  235. package/dist/runtime.js +40 -0
  236. package/dist/setupRequest.d.ts +20 -0
  237. package/dist/setupRequest.d.ts.map +1 -0
  238. package/dist/setupRequest.js +72 -0
  239. package/dist/toast.d.ts +51 -0
  240. package/dist/toast.d.ts.map +1 -0
  241. package/dist/toast.js +34 -0
  242. package/dist/transform.d.ts +1 -1
  243. package/dist/transform.d.ts.map +1 -1
  244. package/dist/transform.js +4 -5
  245. package/dist/utils/effectify.d.ts +1 -1
  246. package/dist/utils/effectify.d.ts.map +1 -1
  247. package/dist/utils/effectify.js +2 -2
  248. package/dist/utils/extend.d.ts +6 -1
  249. package/dist/utils/extend.d.ts.map +1 -1
  250. package/dist/utils/extend.js +24 -6
  251. package/dist/utils/gen.d.ts +4 -4
  252. package/dist/utils/gen.d.ts.map +1 -1
  253. package/dist/utils/logLevel.d.ts +2 -2
  254. package/dist/utils/logLevel.d.ts.map +1 -1
  255. package/dist/utils/logger.d.ts +2 -1
  256. package/dist/utils/logger.d.ts.map +1 -1
  257. package/dist/utils/logger.js +2 -2
  258. package/dist/utils.d.ts +34 -45
  259. package/dist/utils.d.ts.map +1 -1
  260. package/dist/utils.js +33 -49
  261. package/dist/validation/validators.d.ts.map +1 -1
  262. package/dist/validation.d.ts.map +1 -1
  263. package/dist/withToast.d.ts +30 -0
  264. package/dist/withToast.d.ts.map +1 -0
  265. package/dist/withToast.js +64 -0
  266. package/package.json +25 -266
  267. package/src/Array.ts +7 -39
  268. package/src/Chunk.ts +6 -55
  269. package/src/Config/SecretURL.ts +6 -3
  270. package/src/Config/internal/configSecretURL.ts +2 -2
  271. package/src/Config.ts +6 -13
  272. package/src/ConfigProvider.ts +4 -47
  273. package/src/Context.ts +9 -8
  274. package/src/DataDependencies.ts +171 -0
  275. package/src/DateTime.ts +473 -0
  276. package/src/Effect.ts +10 -32
  277. package/src/Emailer.ts +51 -0
  278. package/src/Function.ts +0 -7
  279. package/src/Inputify.type.ts +1 -1
  280. package/src/Layer.ts +8 -5
  281. package/src/Model/Repository/Registry.ts +35 -0
  282. package/src/Model/Repository/dependency.ts +32 -0
  283. package/src/Model/Repository/ext.ts +374 -0
  284. package/src/Model/Repository/internal/internal.ts +987 -0
  285. package/src/Model/Repository/legacy.ts +29 -0
  286. package/src/Model/Repository/makeRepo.ts +168 -0
  287. package/src/Model/Repository/service.ts +676 -0
  288. package/src/Model/Repository/validation.ts +38 -0
  289. package/src/Model/Repository.ts +7 -0
  290. package/src/Model/dsl.ts +130 -0
  291. package/src/Model/filter/filterApi.ts +78 -0
  292. package/src/Model/filter/types/errors.ts +47 -0
  293. package/src/Model/filter/types/fields.ts +50 -0
  294. package/src/Model/filter/types/path/common.ts +404 -0
  295. package/src/Model/filter/types/path/eager.ts +329 -0
  296. package/src/Model/filter/types/path/index.ts +4 -0
  297. package/src/Model/filter/types/utils.ts +128 -0
  298. package/src/Model/filter/types/validator.ts +46 -0
  299. package/src/Model/filter/types.ts +6 -0
  300. package/src/Model/query/dsl.ts +3092 -0
  301. package/src/Model/query/new-kid-interpreter.ts +531 -0
  302. package/src/Model/query.ts +13 -0
  303. package/src/Model.ts +5 -0
  304. package/src/NonEmptySet.ts +6 -4
  305. package/src/Option.ts +3 -8
  306. package/src/Pure.ts +20 -17
  307. package/src/QueueMaker.ts +11 -0
  308. package/src/RequestContext.ts +48 -0
  309. package/src/RequestScopedDependencies.ts +45 -0
  310. package/src/Schema/Class.ts +550 -56
  311. package/src/Schema/SchemaParser.ts +12 -0
  312. package/src/Schema/SpecialJsonSchema.ts +75 -7
  313. package/src/Schema/SpecialOpenApi.ts +5 -5
  314. package/src/Schema/brand.ts +27 -12
  315. package/src/Schema/email.ts +9 -7
  316. package/src/Schema/ext.ts +405 -95
  317. package/src/Schema/moreStrings.ts +213 -88
  318. package/src/Schema/numbers.ts +107 -29
  319. package/src/Schema/phoneNumber.ts +8 -9
  320. package/src/Schema/schema.ts +1 -1
  321. package/src/Schema/strings.ts +23 -14
  322. package/src/Schema.ts +403 -46
  323. package/src/SchemaAST.ts +1 -0
  324. package/src/Set.ts +10 -5
  325. package/src/Store.ts +325 -0
  326. package/src/_ext/Array.ts +4 -2
  327. package/src/_ext/ord.ext.ts +2 -1
  328. package/src/builtin-json.d.ts +24 -0
  329. package/src/builtin.ts +16 -21
  330. package/src/client/InvalidationKeys.ts +55 -0
  331. package/src/client/apiClientFactory.ts +295 -129
  332. package/src/client/clientFor.ts +101 -33
  333. package/src/client/errors.ts +66 -20
  334. package/src/client/makeClient.ts +519 -60
  335. package/src/client.ts +6 -4
  336. package/src/http/Request.ts +4 -4
  337. package/src/http/internal/lib.ts +12 -12
  338. package/src/http.ts +1 -1
  339. package/src/ids.ts +45 -8
  340. package/src/index.ts +20 -16
  341. package/src/middleware.ts +12 -8
  342. package/src/migration/nativeEffect.ts +645 -0
  343. package/src/rpc/Invalidation.ts +278 -0
  344. package/src/rpc/MiddlewareMaker.ts +86 -79
  345. package/src/rpc/README.md +2 -2
  346. package/src/rpc/RpcContextMap.ts +4 -4
  347. package/src/rpc/RpcMiddleware.ts +18 -13
  348. package/src/rpc.ts +4 -4
  349. package/src/runtime.ts +57 -0
  350. package/src/setupRequest.ts +138 -0
  351. package/src/toast.ts +54 -0
  352. package/src/transform.ts +4 -4
  353. package/src/utils/effectify.ts +1 -1
  354. package/src/utils/extend.ts +24 -5
  355. package/src/utils/gen.ts +7 -7
  356. package/src/utils/logLevel.ts +1 -1
  357. package/src/utils/logger.ts +3 -2
  358. package/src/utils.ts +85 -175
  359. package/src/validation.ts +2 -2
  360. package/src/withToast.ts +133 -0
  361. package/test/dateTimeLocal.test.ts +55 -0
  362. package/test/dist/dateTimeLocal.test.d.ts.map +1 -0
  363. package/test/dist/nativeEffectMigration.test.d.ts.map +1 -0
  364. package/test/dist/rpc.test.d.ts.map +1 -1
  365. package/test/dist/rpcMiddlewareContext.test.d.ts.map +1 -0
  366. package/test/moreStrings.test.ts +55 -10
  367. package/test/nativeEffectMigration.test.ts +77 -0
  368. package/test/rpc.test.ts +28 -11
  369. package/test/rpcMiddlewareContext.test.ts +63 -0
  370. package/test/schema.test.ts +318 -55
  371. package/test/secretURL.test.ts +4 -1
  372. package/test/special.test.ts +663 -131
  373. package/test/utils.test.ts +5 -5
  374. package/tsconfig.base.json +6 -4
  375. package/tsconfig.json +9 -1
  376. package/tsconfig.src.json +29 -29
  377. package/tsconfig.test.json +2 -2
  378. package/dist/Operations.d.ts +0 -124
  379. package/dist/Operations.d.ts.map +0 -1
  380. package/dist/Operations.js +0 -29
  381. package/dist/_ext/date.d.ts +0 -15
  382. package/dist/_ext/date.d.ts.map +0 -1
  383. package/dist/_ext/date.js +0 -16
  384. package/dist/_ext/misc.d.ts +0 -14
  385. package/dist/_ext/misc.d.ts.map +0 -1
  386. package/dist/_ext/misc.js +0 -17
  387. package/eslint.config.mjs +0 -26
  388. package/src/Operations.ts +0 -55
  389. package/src/_ext/date.ts +0 -27
  390. package/src/_ext/misc.ts +0 -46
  391. package/tsconfig.json.bak +0 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,2047 @@
1
1
  # @effect-app/prelude
2
2
 
3
+ ## 4.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 222e619: Remove effect-app helpers that Effect already provides, and add `migrateEffectAppSource` to rewrite call sites.
8
+
9
+ Deleted aliases and wrappers now live in Effect: `String.capitalize` / `uncapitalize`, `Struct.keys`, `Record.values`, `absurd`, `Tuple.make`, `Option.isSome`, `Option.liftPredicate` for non-empty arrays, `Array.chunksOf`, `Chunk.findFirst` / `findLast` / `partition` / `containsWith`, `Array.dedupeWith`, `Effect.annotateLogsScoped`, `Deferred.await`, `Effect.fromOption`, `Result.fromOption`, and `DateTime.add` / `subtract`. `Schema.DateValid` was an alias of `Schema.Date`. The date-fns calendar wrappers and the `date-fns` dependency are gone.
10
+
11
+ `effect-app/migration/nativeEffect` exports the replacement table and `migrateEffectAppSource(source)`, which rewrites those imports in one file. `dropUndefined` and `fromBool` stay, along with `groupByT` (any key, entry list), `randomElement`, `findFirstMap`, and the schema constructors that add construction defaults.
12
+
13
+ `effect-app/DateTime` adds `makeZonedLocal` and `pipeZonedLocal`. `makeZonedLocal` attaches the process timezone to a `Date` without moving the instant. `pipeZonedLocal` runs the functions passed to it and returns that instant with `DateTime.toDateUtc`. `DateAdd*` and `DateSub*` migrate to `pipeZonedLocal(date, DateTime.add({ days }))`, which keeps the local calendar.
14
+
15
+ `Chunk.containsWith` calls the equivalence as `(needle, element)`. The old `elem` called it as `(element, needle)`, so only a symmetric equivalence is unchanged. `Record.values` expects one value type, so a mapped type whose value depends on its key should use `Object.values`.
16
+
17
+ ## 4.0.0
18
+
19
+ ### Major Changes
20
+
21
+ - 52b0b01: Fix Schema->Codec
22
+ - 52b0b01: Effect v4 beta
23
+
24
+ ### Minor Changes
25
+
26
+ - b2df3fa: Align `Schema.Void` with TypeScript `void` return-value semantics (effect-smol PR #2475 / `b7d46ab`).
27
+
28
+ `S.Void` now accepts **any present value** at runtime and discards it to `undefined`, while keeping the decoded/encoded type as `void` — matching a `void` return whose result callers never observe. This is implemented as an override of the AST node in a new `effect-app/SchemaAST` module (`export * from "effect/SchemaAST"` plus a `Void` subclass whose parser mirrors the PR's `fromAnyToConst(undefined)`), so there is a single canonical `Void` used everywhere, including RPC success schemas.
29
+
30
+ - New `effect-app/SchemaAST` module; internal `SchemaAST` imports across the libs now route through it.
31
+ - Removed `ForceVoid` from `effect-app/client/makeClient` — use `S.Void` directly, which now carries this behaviour.
32
+ - `S.Void_` remains available as effect's original (`undefined`-only) Void.
33
+
34
+ - ba789a2: Move core service contracts and runtime-agnostic modules into `effect-app`, keep `infra` and `vue` focused on adapters, and drop the temporary `infra` compatibility re-export paths in favor of the new canonical imports.
35
+
36
+ `@effect-app/infra` no longer re-exports moved core modules such as `./Model`, `./Emailer/service`, `./QueueMaker/service`, `./Store/service`, `./adapters/*`, or `./api/*` entrypoints.
37
+
38
+ - ab289d4: Add opt-in `autoscaleMaxThroughput` for Cosmos containers created on demand (`StorageConfig`, `ClusterCosmosConfig`, `WorkflowEngineCosmosConfig`). When set, a missing container is created with autoscale at that max RU/s, unless its database has shared throughput (then it keeps sharing the database pool). Existing containers are untouched; unset keeps the Cosmos default of manual 400 RU/s per container.
39
+ - aeb17bc: Add `disableQueryInvalidation` flag to Command config for background saves.
40
+
41
+ Set `disableQueryInvalidation: true` in a `Req.Command` config (3rd argument)
42
+ to suppress all client-side query invalidation for that command — client
43
+ `invalidatesQueries` callbacks, server-returned `metadata.invalidateQueries`,
44
+ and repository-derived write-dependency matching are all skipped. Use for
45
+ background saves (e.g. debounced auto-save) whose writes should not trigger
46
+ query refetches.
47
+
48
+ - `InvalidationConfig` gains `disableQueryInvalidation?: boolean`.
49
+ - `RequestHandlerWithInput` gains `disableQueryInvalidation?: boolean`,
50
+ propagated from `Request.config` by `ApiClientFactory.makeFor`.
51
+ - `invalidateCache` early-returns `Effect.void` when the flag is set,
52
+ applying to both regular and stream mutations.
53
+
54
+ - f21190c: Add `copy` property to `Class` and `TaggedClass` for creating modified instances with updated fields. The `copy` method is cached per-class and supports both object and function-based updates, with pipeline support.
55
+ - f88ea34: Move `makeQueryKey` into `effect-app/client` and update Vue source and tests to import it from the shared client module. Vue still re-exports `makeQueryKey` from `src/lib` for compatibility.
56
+ - 2ebf8ae: `jitM` runs at the store boundary as JSON → JSON, before the `toCodecJson(toEncoded(schema))` decode; repositories decode the Encoded shape only.
57
+
58
+ `jitM` used to be applied by the repository _after_ the store had already decoded the document, and was typed `(pm: Encoded) => Encoded` - a lie, since jitMs are written against the stored JSON and `Encoded` holds native `Date`/`Map`/`Set` values.
59
+
60
+ The read pipeline is now: raw JSON document → merge `defaultValues` (unchanged: they only fill _absent_ keys, so an explicitly stored `null` reaches `jitM`) → `jitM` (JSON → JSON) → decode `Schema.toCodecJson(Schema.toEncoded(schema))` → Encoded. The repository then decodes Encoded → the domain type with `schema` and no longer applies `jitM` at all. Because `jitM` now runs before any schema decode sees the document, it can repair legacy shapes including explicit `null`s.
61
+
62
+ - `StoreConfig.jitM?: (json: JsonRecord) => JsonRecord` is new, where `JsonRecord` (exported from `effect-app/Store`) is `{ readonly [key: string]: Schema.Json }`. It is not applied on the write/encode path, and never receives `_etag`.
63
+ - `RepositoryOptions.jitM` changes type from `(pm: Encoded) => Encoded` to `(json: JsonRecord) => JsonRecord` and is forwarded into the store config.
64
+ - **Migrating a jitM:** it now receives and must return JSON. A `Date` field arrives as an ISO string (return a string, not a `Date`), a `ReadonlySet` as an array, a `ReadonlyMap` as an array of `[key, value]` pairs. Field access is index-signature based (`json["x"]`) rather than typed property access.
65
+ - The JSON→Encoded decode stays strict: a document `jitM` does not repair fails at the store boundary instead of being read back half-decoded.
66
+ - `ValidationError.jitMResult` is deprecated: `validateSample` only ever sees the store's output, so it is identical to `rawData`.
67
+
68
+ - 8cb3de4: Add command invalidation helpers that preserve query-only resource types and pass mutation input and `Exit` results into invalidation callbacks. Update Vue `clientFor` to merge request-level invalidation config with call-site invalidation and require matching invalidation resources.
69
+ - 186de3a: Stop forcing Date/Map/Set Encoded shapes to JSON.
70
+
71
+ `Schema.Date` / `ReadonlySet` / `ReadonlyMap` now keep native Encoded types (`Date`, `Set`, `Map`). Use `DateFromString`, `ReadonlySetFromArray`, and `ReadonlyMapFromArray` when the Encoded form must be JSON. The query DSL accepts those native values, including array ops (`includes` / `in` / `includes-any`) on `Date[]` and `ReadonlySet` fields. Memory, Disk, SQL, and Cosmos convert Encoded Date/Map/Set through `Schema.toCodecJson` on write/read; query parameters and defaults lower the same way from the store schema. App types such as DateOnly stay native Encoded and JSON-lower via that schema — not a type registry.
72
+
73
+ - 186de3a: Query maps as JSON arrays of `[key, value]` tuples.
74
+
75
+ `where("meta", "hasKey" | "hasValue" | "hasKeyValue", ...)` (and `not*` / `*-any` / `*-all` variants) filter `ReadonlyMap` fields. Memory, Disk, SQLite, Postgres, and Cosmos compile those ops against the encoded tuple array.
76
+
77
+ - d16845e: Remove `TaggedRequest` from `makeRpcClient`, now only `TaggedRequestFor` is returned. Remove all legacy `meta.moduleName` support — `id` and `moduleName` are now required on `Req` type. Remove `makeRpcGroup` (use `makeRpcGroupFromRequestsAndModuleName` instead).
78
+ - beae3a0: Remove `withDefaultConstructor` wrapper, use `S.withConstructorDefault` directly with `Effect.succeed`/`Effect.sync`.
79
+ - 1f103b2: Replace `proxify` with explicit service accessor helpers: `accessFn`, `accessEffectFn`, `accessCn`, `accessEffectCn`.
80
+ - 0054611: Derive query invalidation from repository read/write dependencies and propagate dependency metadata through RPC clients.
81
+ - 89d8b3a: Add Effect RPC `Stream` support to the wrapper.
82
+
83
+ - New `Stream` request constructor on `TaggedRequestFor` parallel to `Query`/`Command`. Emits resources with `type: "stream"`.
84
+ - Server router (`@effect-app/infra` `routing.ts`) accepts stream resources whose handlers return a `Stream.Stream<A, E, R>` (or a function from input to one). Forwards `stream: true` to `Rpc.make` so `RpcSchema.Stream` wrapping is applied. Streams bypass `applyRequestTypeInterruptibility` and the `Effect.withSpan` wrapping (the RPC server adds its own span).
85
+ - Client (`apiClientFactory.ts`) detects stream resources, forwards `stream: true` when constructing `RpcGroup`, and exposes the per-request `handler` as a `Stream.Stream` (via `Stream.unwrap` over the `ManagedRuntime` context) instead of an `Effect`. `Invalidation.CommandResponseWithMetaData` continues to apply only to commands.
86
+ - New `RequestStreamHandler` / `RequestStreamHandlerWithInput` shapes in `clientFor.ts`; `RequestHandlers` dispatches on `type: "stream"`.
87
+
88
+ - 08d2e70: Add `concurrency: "unbounded"` parseOptions annotation to Schema constructors (Struct, Array, NonEmptyArray, Record, TaggedStruct, ReadonlySet, ReadonlyMap, Class, TaggedClass) so all encode/decode operations automatically run with unbounded concurrency. Also override `mapFields` on Struct and Class/TaggedClass to preserve the annotation.
89
+ - 5f9cd6a: Schema/Class facades: add `StructFacade` and carry `identifier` on the class facades.
90
+
91
+ - Add `StructFacade<Self, Encoded, MakeIn, DecodingServices, EncodingServices, Fields>` = `Omit<S.Struct<Fields>, "Type" | "Encoded" | "~type.make.in" | "DecodingServices" | "EncodingServices"> & { pinned type-level members }`. A top-level `const X = S.Struct(...)` / `S.TaggedStruct(...)` model faceted by the `.d.ts`-emit compiler is retyped to it: still a real `S.Struct<Fields>` (so `Workflow.AnyStructSchema`, the `Struct<Fields & Context>` reconstruction, `Union`, `.fields.x` keep working) while `Type`/`Encoded`/make/services resolve to the named namespace interfaces.
92
+ - Add `readonly identifier: string` to `OpaqueClassFacade` and `OpaqueErrorFacadeClass` (an `S.Class` static lost from the bare emitted interface, which the compiler otherwise had to hand-emit per model). `OpaqueFacade` is intentionally left untouched — `S.Opaque` and requests build on `S.Bottom`, not `S.Class`, so they have no `identifier`.
93
+
94
+ - 6252808: Add `ReadonlySetFromArray` and `ReadonlyMapFromArray` schema transformations that decode from annotated arrays to Set/Map. Update `ReadonlySet` and `ReadonlyMap` to use these internally.
95
+ - 821468d: Add server-driven cache invalidation via RPC response headers.
96
+
97
+ - `effect-app/rpc`: new `Invalidation` module with `InvalidationKey` / `InvalidationKeys` schemas, `Invalidates` annotation (for declaring static invalidation on Rpc definitions), `InvalidationSet` reference (request-scoped accumulator), and `makeInvalidationSet` helper.
98
+ - `effect-app/middleware`: new `InvalidationMiddleware` RPC middleware tag; included in `DefaultGenericMiddlewares`.
99
+ - `effect-app/client`: new `InvalidationKeys` module with `InvalidationKeysFromServer` reference and `makeInvalidationKeysService` helper; `apiClientFactory` now taps HTTP responses to read the `x-invalidate` header and forward keys to `InvalidationKeysFromServer`.
100
+ - `@effect-app/infra`: new `InvalidationMiddlewareLive` RPC middleware implementation that owns the full lifecycle — creates a request-scoped `InvalidationSet` (backed by a `Ref`), pre-populates it from the `Invalidates` annotation, provides it to the handler, and after the handler completes registers an HTTP pre-response handler (via `appendPreResponseHandlerUnsafe`) to write the accumulated keys as an `x-invalidate` response header. No separate HTTP middleware is needed.
101
+ - `@effect-app/vue`: `invalidateQueries` / `useMutation` now reads server-provided invalidation keys from `InvalidationKeysFromServer` after each mutation and applies them alongside the client-side invalidation.
102
+
103
+ - 025de47: Fold the encoded-override support from `ExtendedClass` and `ExtendedTaggedClass` into `Class`, `TaggedClass`, `ErrorClass`, and `TaggedErrorClass`, and update model codegen to detect the new second-generic form.
104
+ - 3a8c710: Store document decode fails as a typed `SchemaError` instead of a defect; repositories keep their public error channels by dying at the boundary; `validateSample` reports documents that fail at the store boundary.
105
+ - 186de3a: JSON stores lower native Encoded values (Date, Map, Set, and app types such as DateOnly) through the store's document schema.
106
+
107
+ `makeRepo` already passes that schema. Adapters encode documents, query parameters, and defaults with `Schema.toCodecJson(toEncoded(schema))` at the field path. No type registry. Schemaless stores still lower Date/Map/Set structurally.
108
+
109
+ - 828d264: Stream requests now support an optional `final` schema that models the final success type of the stream. When declared, `mutateStream`'s execute effect resolves with the last emitted value typed as `Final` instead of `void`.
110
+
111
+ ```ts
112
+ class MyStream extends SomethingStream<MyStream>()(
113
+ "MyStream",
114
+ { id: S.String },
115
+ {
116
+ success: S.Union([OperationProgress, ExportComplete]),
117
+ final: ExportComplete, // execute now resolves with ExportComplete
118
+ }
119
+ ) {}
120
+ ```
121
+
122
+ - 7fa3045: V1/V2/V3: stream and command requests carry invalidation metadata
123
+
124
+ **V1** – stream final response includes metadata
125
+
126
+ - `Invalidation.StreamResponseChunk` wraps each stream item as `{ _tag: "value", value }` and appends `{ _tag: "done", metadata }` at the end carrying all accumulated invalidation keys.
127
+
128
+ **V2** – invalidation keys included in failures
129
+
130
+ - `Invalidation.CommandFailureWithMetaData` and `Invalidation.StreamFailureChunk` carry keys accumulated up to the point of failure, so clients can invalidate queries even when a command or stream errors.
131
+ - `InvalidationMiddlewareLive` wraps command failures; `routing.ts` wraps stream failures.
132
+ - `apiClientFactory.ts` unwraps both on the client side, forwarding keys before re-failing with the original error.
133
+
134
+ **V3** – mid-stream metadata chunks
135
+
136
+ - `Invalidation.StreamResponseChunk` now also includes `{ _tag: "metadata", metadata }` for mid-stream invalidation.
137
+ - After each emitted value, the server drains accumulated keys and emits a "metadata" chunk if any keys were collected since the last drain (bucket reset via `InvalidationSet.drain`).
138
+ - `apiClientFactory.ts` processes "metadata" chunks the same as "done" chunks, forwarding keys to `InvalidationKeysFromServer` immediately.
139
+ - `makeInvalidationKeysService` accepts an optional `onAdded` callback that fires after each key addition, enabling `mutate.ts` to trigger query invalidation mid-stream without waiting for the stream to complete.
140
+
141
+ - 3dc0d2a: Add streaming as a `stream: true` config option on `Query` / `Command` instead of a separate request type.
142
+
143
+ `TaggedRequestFor` now exposes only `Query` and `Command` factories — the standalone `Stream` factory is removed. To produce a Stream of `success` values, pass `stream: true` in the request config. The request `type` field stays `"command" | "query"`; a new `stream: boolean` field carries the streaming flag (stripped from the stored handler config).
144
+
145
+ ```ts
146
+ // Query that streams results
147
+ Req.Query<T>()("Tag", {}, { stream: true, success: ... })
148
+
149
+ // Command that streams results
150
+ Req.Command<T>()("Tag", {}, { stream: true, success: ... })
151
+ ```
152
+
153
+ Vue client mapping (per-handler properties mirror the non-stream API — `.query`, `.fn`, `.mutate`):
154
+
155
+ - `query` + `stream: true` → exposes `.query` (read-only streaming, tracked Vue Query). Helper map key: `${name}Query`.
156
+ - `command` + `stream: true` → exposes `.fn` and `.mutate` (mutating streaming).
157
+ - Plain `query` / `command` unchanged.
158
+
159
+ Server routing dispatches via the new `stream` flag (`makeStreamRpc` for streaming commands/queries, `makeCommandRpc` / `Rpc.make` otherwise).
160
+
161
+ Also lifts the `Struct` / `TaggedStruct` and `Opaque` definitions in `effect-app/Schema` to use `S.Bottom` / `S.Opaque` directly, exposing `fields`, `mapFields`, and a `MakeIn` that allows `void` when all fields are optional. `TaggedRequestFor` request classes now use `Opaque(TaggedStruct(...))` instead of `TaggedClass`, and decoding/encoding services are derived from `success` / `error` rather than stored on the request.
162
+
163
+ **Migration**: replace `Req.Stream` with `Req.Query` or `Req.Command` and add `stream: true` to the config — `Query` for read-only streams, `Command` for mutating streams.
164
+
165
+ - 738b482: Add pick/omit to Struct and TaggedStruct
166
+ - 3613e87: Add `TaggedRequestFor` helper to `makeRpcClient` that curries a `moduleName`, producing request classes with static `id` and `moduleName` properties. This enables passing request classes directly to `makeQueryKey` without going through `clientFor` first. The `clientFor` function no longer requires a `meta` property on the module when requests carry `moduleName`. The meta codegen preset now generates `Req = TaggedRequestFor(moduleName)`. Original `TaggedRequest` remains for backwards compatibility.
167
+ - 7119320: Add `generateGuards` and `generateGuardsFor` to `TaggedUnion` / `ExtendTaggedUnion` for property-scoped type guards.
168
+
169
+ - `generateGuards("key")` — generic per-guard, no need to specify the container type
170
+ - `generateGuardsFor<A>()("key")` — curried, fixes `A` for concrete guard signatures
171
+
172
+ Both return `{ is{Tag}, isAnyOf }` guards that narrow the container type by its tagged union property.
173
+
174
+ - e944bca: Add `generateGuards` and `generateGuardsFor` to `TaggedUnion` / `ExtendTaggedUnion` for property-scoped type guards.
175
+
176
+ - `generateGuards("key")` — generic per-guard, no need to specify the container type
177
+ - `generateGuardsFor<A>()("key")` — curried, fixes `A` for concrete guard signatures
178
+
179
+ Both return `{ is{Tag}, isAnyOf }` guards that narrow the container type by its tagged union property.
180
+
181
+ - 8bd9a11: Support ID-scoped signal dependencies and additive repository dependencies derived from previous and current entities.
182
+ - 23a7167: Add a typed, serializable `DatabaseError { message, transient, cause }` for store adapter failures.
183
+
184
+ Store adapters wrapped DB calls in bare `Effect.promise` / `.orDie`, so a transient infra failure (request timeout, throttle, 5xx, dropped socket) became a raw-`Error` defect — which `Effect.retry` can't retry and which breaks JSON encoding of a workflow exit cause ("Expected JSON value, got Error"). `DatabaseError` is now exposed on all `Store` and `Repository` method error channels (writes: `OptimisticConcurrencyException | DatabaseError`) and added to `SupportedErrors` so the api/client/FE treat it as a 500-class error. Each adapter wraps its db-call failures into `DatabaseError` with a `transient` flag (timeout/throttle/5xx ⇒ retryable); the `cause` serializes via `Schema.Defect`. Construction/seed/DDL paths stay `orDie`.
185
+
186
+ - e71eb78: Tighten typing of query DSL builders so field/path parameters are constrained to actual field paths instead of bare `string`:
187
+
188
+ - `relation(path)` now infers the relation's element type and constrains `distinctCount`/`sum`/`collect`/`collectDistinct`/`collectFields`/`collectDistinctFields` and the `unit` of `sumExprBy`/`sumExprNormalized` to `FieldPath<Element>`.
189
+ - `relation(path).expr` exposes a scope-bound math-expression builder so `expr.field(...)` inside `sumExpr`/`sumExprBy`/`sumExprNormalized` is typed against the relation element.
190
+ - Top-level `expr.field` accepts an optional generic for opt-in tightening (`expr.field<E>("x")`).
191
+ - `aggregate(schema, build)` accepts a builder callback whose `agg` argument is bound to the source row inferred from the pipe — paths are checked without any explicit generic: `make<Row>().pipe(aggregate(schema, ($) => ({ city: $.field("address.city") })))`. Plain `AggregateMap` form still accepted.
192
+ - `projectComputed(schema, build, mode?)` accepts a builder callback whose `{ relation }` argument is bound to the source row inferred from the pipe: `make<Row>().pipe(projectComputed(out, ({ relation }) => ({ total: relation("items").sum("qty") })))`. Plain `ComputedProjectionMap` form still accepted.
193
+ - `agg<Row>()` factory remains as an escape hatch when the builder is built outside a pipe.
194
+
195
+ ### Patch Changes
196
+
197
+ - 439cbeb: Adopt module system from effect-smol: replace barrel imports with specific submodule imports (`import * as X from "effect-app/X"` / `import * as X from "effect/X"`).
198
+ - da83c1f: Align `InvalidationEntry` (vue) with `InvalidateQueryInstruction` (effect-app).
199
+
200
+ `InvalidateQueryInstruction` is now parametrized over `Filters` / `Options`
201
+ (defaulting to `Record<string, unknown>` so the core stays framework-agnostic).
202
+ `@effect-app/vue` exposes `InvalidationEntry` as a narrowed alias substituting
203
+ `@tanstack/vue-query`'s `InvalidateQueryFilters` and `InvalidateOptions`. Single
204
+ source of truth for the union shape across both packages.
205
+
206
+ - 199e9a5: Allow Struct and TaggedStruct make helpers to omit input when every constructor field is optional or defaulted, and preserve widening copy typings through a lighter named public type to improve TypeScript editor responsiveness.
207
+ - b035b1c: Isolate per-call `Effect.provide(layers)` / `Stream.provide(layers)` in the
208
+ RPC api client factory via `{ local: true }`.
209
+
210
+ `layers` here is built per RPC invocation from a caller-supplied
211
+ `requestLevelLayers` plus a fresh `RequestName` layer. Today both pieces are
212
+ stateless, so no observable bug — but `Effect.provide(layer)` without
213
+ `local: true` resolves its `MemoMap` from the ambient fiber context, and on a
214
+ long-lived runtime (browser app, server fiber) any stateful layer slipped into
215
+ `requestLevelLayers` by a caller would be memoized and shared across every
216
+ subsequent RPC call. `{ local: true }` builds the layer fresh per call and
217
+ skips the ambient MemoMap entirely.
218
+
219
+ Also documents the rule in `AGENTS.md` ("Per-request `Effect.provide(layer)`
220
+ must isolate its MemoMap") so the pattern is enforceable in code review and
221
+ caught early. Companion to the `provideOnRequestScope` MemoMap fix in
222
+ `@effect-app/infra`.
223
+
224
+ - 664e83d: Add Atom-native Vue query APIs, stream query pull atoms, and a TanStack-backed legacy query engine toggle.
225
+ - a4dff57: Adjust Struct and TaggedStruct copy typing to follow class-style widening constraints while keeping structural copy runtime behavior.
226
+ - ba4bdc3: improve: support .ts extension
227
+ - 52b0b01: remove hopefully obsolete Struct overrides
228
+ - 9d3495e: Preserve field-level schema decode errors for relaxed Class and TaggedClass declarations so decode failures report nested constraints (for example min-length violations) instead of only a generic class-type mismatch.
229
+ - 3436d44: Extend `Schema.Opaque` in `effect-app/Schema` to support an optional encoded-type generic while preserving the original single-generic behavior.
230
+ - 52b0b01: Update `Effect.allLower` to call `svc.asEffect()` when available, ensuring service entries are normalized before `Effect.all` evaluation.
231
+ - f317c5e: Preserve omitted-input make helpers through Schema.Opaque when the wrapped schema allows optional or default-only constructor input.
232
+ - e585c9c: fix config nested
233
+ - e4ff9a6: Fix the global `Array`/`ReadonlyArray.map` override breaking union-of-array receivers. The previous `this: NonEmptyArray`/`NonEmptyReadonlyArray` overload was selected-then-rejected on a union receiver (e.g. `(readonly A[] | readonly B[]).map(...)`), raising TS2684. Replaced with a single conditional-return signature (`this extends NonEmpty… ? NonEmpty<U> : U[]`) that preserves NonEmpty refinement without a `this` parameter, so union-array `.map` calls type-check again.
234
+ - 33b0544: Replace repository codec child spans with parent-span timing attributes and bounded metrics, and record database operation timing for instrumented stores.
235
+ - 99c43c4: Derive scoped dependency reads and writes from typed query filters and annotated model relationships, including previous aliases.
236
+ - 52b0b01: Fix `Schema.TaggedUnion(...).tags` extraction for class-based members (for example `TaggedClass`) by using a local AST sentinel walker instead of relying on internal effect APIs.
237
+
238
+ Add tests covering:
239
+
240
+ - `TaggedUnion` with `encodeKeys`-wrapped members
241
+ - `TaggedUnion` with `TaggedClass` members
242
+
243
+ - 08d092c: Update Atom query caches in memory and accumulate stream invalidations so live events do not cause repeated RPC refetches.
244
+ - 947fe20: fix input date
245
+ - 21ac90a: Unify generated model facades on `OpaqueFacade` and support class facades through encoded-key schema transforms.
246
+ - 32f05c8: Remove unused dependency declarations from package manifests.
247
+ - 6cfd83d: update effect to latest beta
248
+ - 1c858d3: fix request scope problems
249
+ - 52b0b01: fix bs
250
+ - 992d9fa: fix more branded types
251
+ - 505bfa9: Add concurrent decode helper APIs and migrate decode callsites to use them.
252
+
253
+ - Add `withDefaultParseOptions` and keep `DefaultParseOptions` centralized.
254
+ - Export `decodeEffectConcurrently` and `decodeUnknownEffectConcurrently` from Schema and SchemaParser modules.
255
+ - Update repository, queue, client, form, and CLI decode paths to use concurrent decode helpers.
256
+ - Keep schema constructors free of hardcoded parse concurrency overrides.
257
+
258
+ - 939bebc: Remove the local `Config.nested` / `ConfigProvider.nested` overrides. They worked around an effect v3 bug where the nested namespace segment bypassed the provider's `mapInput`/`constantCase` transform. effect `4.0.0-beta.84` fixes this upstream (its transformation-compose refactor threads the nested prefix through the provider's lookup transform), and the old overrides relied on internals (`Config.make`, `provider.get`/`mapInput`/`prefix`) that no longer exist. Both modules now re-export effect directly; behaviour for consumers (e.g. `Config.nested("cups")` against a `constantCase` env provider) is unchanged and correct.
259
+ - 52b0b01: Beta25
260
+ - e0c4835: revert bs
261
+ - 32dbc54: fix stream type when no success specified
262
+ - 0a0030f: fix missing overloads
263
+ - 0263827: Fix `Date` / `DateValid` default helpers to pipe from their own schema.
264
+
265
+ `withConstructorDefault` and `withDecodingDefaultType` on `DateValid` previously piped from `DateFromString`, dropping the `isDateValid()` check (and, after the recent identifier split, the `DateValid` annotations) from the resulting defaulted schema. Both `Date` and `DateValid` now use `extendM` so the helpers attach to the underlying schema (`DateFromString` / `DateValidFromString`).
266
+
267
+ - 0263827: Distinguish `Date` and `DateValid` in JSON Schema output.
268
+
269
+ - `Date` now emits identifier `DateOrInvalid` with description noting the value may be invalid.
270
+ - `DateValid` now emits its own annotated string (identifier `Date`) with description stating a valid ISO 8601 date is required.
271
+
272
+ - c0e5a1b: Add `Schema.dropConstructorDefault`, a `Struct.Lambda` that clears a field's `withConstructorDefault`. Compose it with `Struct.omit`/`Struct.map` when deriving a partial-update schema from a "create" schema, so omitted fields' constructor defaults don't resurrect themselves in `.make(...)` output.
273
+
274
+ Also, `makeExactOptional` now drops constructor defaults automatically, matching this behavior.
275
+
276
+ - 10b55ff: update packages
277
+ - 14aba14: fix: clientFor
278
+ - a0075b8: `Email` and `PhoneNumber` carry native `arbitraryConstraint` patterns, so `effect/unstable/arbitrary` (and `generateFromSchema`) can sample them instead of exhausting rejection sampling on their `refine` guards.
279
+ - f052d38: Replace `(...) => Effect.gen` with `Effect.fnUntraced` in `apiClientFactory`.
280
+ - f233f3d: `PositiveNumber` and `NonNegativeNumber` bound native Arbitrary generation to at most 1,000,000 (`arbitraryConstraint` on their existing checks), so generated fixtures no longer overflow derived totals to `Infinity`. Validation and JSON Schema output are unchanged.
281
+ - 18bae5b: Upgrade Effect packages to `4.0.0-rc.114` (core `effect` via pkg.pr.new at `cdb3ac91` until npm publishes that version). Also bump independently versioned `@effect/language-service` to `0.87.2` and `@effect/tsgo` to `0.45.0` (requires `oxlint` `1.82.0`).
282
+
283
+ Breaking API updates from this RC:
284
+
285
+ - PascalCase Config/CLI constructors (`Config.String`, `Flag.File`, `Config.NonEmptyString`, `Config.Redacted`, `Config.Literal`)
286
+ - `Config.Record` now returns a Config
287
+ - Schema `toArbitrary` (fast-check) replaced by native `effect/unstable/arbitrary`
288
+ - `SchemaTransformation.transformOrFail` renamed to `transformEffect`
289
+ - `Fiber.currentSpan` moved to `fiber.cache.span`
290
+ - HTTP server addresses are `InetAddressV4`/`InetAddressV6` instead of `TcpAddress`
291
+ - Object JSON Schema now emits `additionalProperties: true`
292
+ - Schema `Union` AST stores matching as `options.mode` instead of `mode`
293
+
294
+ - f313973: fix type make interface
295
+ - edc52e4: update
296
+ - ea1bd46: fix: prevent expansion of nominal brands
297
+ - 85a8275: Expose `make`, `makeOption`, and `makeEffect` static helpers on request classes created via `Query`/`Command`.
298
+ - 50b022e: Harden model facades and add `OpaqueErrorFacadeClass`.
299
+
300
+ - `OpaqueErrorFacadeClass`: facade `TaggedErrorClass`/`ErrorClass` while keeping
301
+ `Cause.YieldableError` on the constructed instance (so `yield* new Err()`,
302
+ `Effect.fail`, and `instanceof` keep working through the facade).
303
+ - `OpaqueFacadeInput` relaxed to require only the codec service channels, so
304
+ transformed schemas (`.pipe(encodeKeys/annotate/filter/...)`) can be facaded;
305
+ `fields`/`copy`/`mapFields` flow through `OpaqueFacadeStatics` when present, and
306
+ `to` is carried so models that compose via `X.to.fields` keep working.
307
+ - Dropped the wide `fields`/`mapFields` overrides on the facade interfaces so the
308
+ precise statics win (keeps `Q.project(X.mapFields(...))` typed).
309
+ - Codegen (`eslint-codegen-model`): resolver prefers the private `_X` over the
310
+ self-referential facade; converges static service types in one run; per-model
311
+ classification (facade Opaque models, leave `Class` standard in mixed files);
312
+ `Make` emitted as `type X = {...} | void` when the make-input is voidable;
313
+ `readonly`-prefixed array/tuple elements parenthesized; value self-references in
314
+ the moved `_X` body rewritten to `_X`; instance getters surface on `Self`.
315
+
316
+ - 52b0b01: Migrate schema arbitrary annotations to Effect v4 `toArbitrary` and cover `StringId` generation with a fast-check test.
317
+ - 47e3742: Preserve Struct.copy through `annotate`, `annotateKey`, and `mapFields` chains, and add tests covering chained copy behavior on Struct schemas.
318
+ - 458bb1b: fix type
319
+ - 3365758: workaround effect error messages
320
+ - 54ec1ef: fix bs
321
+ - 0d4e0b8: Fix `isGeneratorFunction` using `isObject` instead of `isFunction`: generator functions have `typeof === "function"`, not `"object"`, so the check always returned `false`. This caused `Command.streamFn` generator-form handlers to silently pass a raw `Generator` object rather than an `Effect<Stream>`, meaning the mutation was never executed.
322
+ - 31739d7: Fix JSON schema output for Email, Date, PhoneNumber, and Url schemas. The `jsonSchema` annotation key is not recognized by Effect v4's JSON schema generator — use proper v4 annotations (`format`, `description`) and built-in checks (`isMinLength`, `isMaxLength`) instead.
323
+ - 0b21a02: fix: flatten simple allOf constraints in JSON Schema output for better codegen compatibility
324
+ - bbaa67e: Fix `TS2589: Type instantiation is excessively deep and possibly infinite` when querying models that embed `Schema.Defect()` (or any field encoded as `Json`).
325
+
326
+ The query path type `Path<T>` (used by `Q.where`/`Q.and`/`Q.order` to type dotted field paths) recursed through object types with no termination for self-referential ones. Under effect `4.0.0-beta.83`, `Schema.Defect()` encodes as `Json`, whose `JsonObject = { readonly [x: string]: Json }` index signature made `Path` descend forever, blowing past TypeScript's instantiation limit on any model with such a field (e.g. carrier-error states carrying `raw: Schema.Defect()`).
327
+
328
+ `Path` now threads a `Seen` set of already-entered object types and stops before re-entering one, so self-referential types terminate (the field itself stays a valid leaf path; only the unbounded descent is cut). Finite models are unaffected.
329
+
330
+ - a211c12: Fix projection schema typing for union members and computed projections.
331
+ - 347af48: Fix schema interface widening regression introduced in 4.0.0-beta.255 (changeset `olive-onions-lose`).
332
+
333
+ The original refactor annotated branded schema constants with interfaces extending `S.Codec<A, primitive> & WithDefaults<...>`. That widened the underlying `BrandedSchema<...>` chain and dropped phantom slots (`Iso`, `~type.make.in`, `~type.parameters`, `Rebuild`, etc.) that downstream combinators read. In consumer projects this surfaced as `DecodingServices` / `EncodingServices` leaking as `unknown` — for example `Q.project(schema, "project")` failing with `Type 'unknown' is not assignable to type 'never'`, and RPC handler / generator-return shape mismatches against `Effect<any, ..., CurrentSettings | ...>`.
334
+
335
+ Each `*Schema` interface now extends the concrete underlying chain (e.g. `BrandedSchema<S.NonEmptyString, NonEmptyString64>`) and adds a call signature for `withDefaultMake` (and an explicit `withConstructorDefault` field for the numeric and `StringId` schemas). The runtime values are unchanged and the type-display improvement is preserved.
336
+
337
+ Affected: `NonEmptyString*`, `Min3String255`, `StringId`, `Url`, `PositiveInt`, `NonNegativeInt`, `Int`, `PositiveNumber`, `NonNegativeNumber`, and `brandedStringId`.
338
+
339
+ - bd26832: Add nested anyOf flattening to JSON Schema post-processing
340
+ - 3053760: fix: restore context map container behavior
341
+ - 52b0b01: fix TaggedUnion
342
+ - 55c6572: update packages
343
+ - 52b0b01: Tighten schema helper generics in `Schema/ext.ts` so default-related helpers accept properly named schema type parameters instead of bare `S.Top` inputs.
344
+ - c991be1: update packages
345
+ - d738811: remove double prefix
346
+ - 8fffc3c: cleanup
347
+ - 52b0b01: Migrate `Schema/ext` context helpers to Effect v4 by implementing `provide` and `contextFromServices` with proper service subtraction across decoding and encoding requirements.
348
+ - a788432: fix circular
349
+ - 10e90d5: fix: TaggedRequest should be an Opaque Schema Class
350
+ - 4b95009: use Finite instead of Number
351
+ - 52b0b01: Replace `ForceVoid` in `makeClient` with a typed codec transformation instead of an unsafe cast.
352
+ - 178480a: Fix request handler input classification to use request schema fields instead of `make` parameters, preventing defaulted/nullable input fields from being treated as no-input handlers.
353
+ - 985176b: Align request handler input typing with the request's `make` signature. Handlers are now classified as no-input only when the request schema declares no payload fields; any payload (even fully-optional) yields a function handler whose input matches `make`'s first parameter. Adds `HandlerInput<I>` and threads it through `CommandFromRequest`.
354
+ - dc465e3: update to latest effect beta
355
+ - 21017d5: `InvalidationSet.add` accepts arrays and is exposed as a static shortcut.
356
+
357
+ - Single item: `yield* InvalidationSet.add(UserRsc.GetMe)`
358
+ - Batch: `yield* InvalidationSet.add([UserRsc.GetMe, ["custom", "key"]])`
359
+ - Skips the `.use(_ => _.add(...))` boilerplate.
360
+
361
+ Existing `InvalidationSet.use(_ => _.add(...))` form still works; the service
362
+ identity is preserved via `Object.assign` so `Effect.provideService` and
363
+ `.use` / `.useSync` continue to operate on the same `Context.Reference`.
364
+
365
+ - 0541f0d: fix withDefault types
366
+ - 8c645d5: update to latest effect
367
+ - 30c512d: fix rpc middleware context type issue
368
+ - 50b022e: Add generated opaque model facades that expose static Type, Encoded, Make, and Schema declarations without leaking the private struct schema type to downstream project references.
369
+ - 52b0b01: adapt isObject change
370
+ - b952f19: bye cruft
371
+ - a37aa38: Update to effect beta 43
372
+ - 52b0b01: again
373
+ - c1e73de:
374
+ - d867272: the return of `Context`
375
+ - 774a9b3: `MiddlewareMaker.makeMiddlewareBasic` now derives each middleware's effective error from both the static `error` field on the tag AND the `rcm` config entry referenced by `dynamic.key`, rather than relying on the static field alone.
376
+
377
+ Middlewares declared with `dynamic: RequestContextMap.get("foo")` (instead of an explicit static `error: ...`) end up with `tag.error = Schema.Never` at runtime — `RpcMiddleware.Tag` defaults the static error to `Never` when not provided. The composite `MiddlewareMaker.Tag(...).middleware(...)` walked `make[*].error` to build its own error union, collapsing to `Union<Never, ...> ≡ Never`.
378
+
379
+ `Rpc.exitSchema` walks `rpc.middlewares[*].error` when building the wire-level failure union for every rpc kind. Empty-union meant middleware-thrown errors (`NotLoggedInError`, `UnauthorizedError`, etc.) never reached the wire schema. Query/command happened to work because their wire `errorSchema = resource.error` already covered the merge from `makeRpcClient`. Stream rpcs have `errorSchema` force-set to `Schema.Never` by effect-rpc, so the resource-level merge never reached the wire — middleware errors decoded as "Expected never, got X".
380
+
381
+ Per middleware, the new logic pushes both the static `_.error` (if non-`Never`) and `rcm[_.dynamic.key].error` (if non-`Never`) into the composite's failure union.
382
+
383
+ - d67d17a: Source middleware errors exclusively from the rpc middleware tag, and move command/stream invalidation wrap/unwrap entirely into the routing layer (server) and `apiClientFactory` (client). `InvalidationMiddleware` and `InvalidationMiddlewareLive` are removed.
384
+
385
+ ### Resource error schemas
386
+
387
+ Three sites that used to fold `RequestContextMap[*].error` into a request's own error schema now stop doing so:
388
+
389
+ - `makeRpcClient` / `makeRequestClass` — `failureSchema` is just `config.error` (still merged with the optional `generalErrors` parameter, which is the only remaining error mix on both type and runtime levels).
390
+ - `MiddlewareMaker.rpc()` — `error: options.error` only; the previous union with `rcm.config[*].error` is gone.
391
+ - Routing and `apiClientFactory.makeRpcGroupFromRequestsAndModuleName` — `Invalidation.makeCommandRpc` is called with `error: resource.error` (no widening with the composite middleware error union).
392
+
393
+ Middleware errors reach the client through the rpc's `middlewares[*].error` failure-union channel of `Rpc.exitSchema`, exposed by attaching the middleware tag to the rpc on both sides:
394
+
395
+ - **Server**: `makeRouter(middleware)` attaches the live composite tag (existing behavior).
396
+ - **Client**: new `middleware` option on `ClientForOptions` / `ApiClientFactory.makeFor(layer, { middleware })` attaches the same tag schema-only (no Live invoked). Threaded through `makeRpcGroupFromRequestsAndModuleName` to `RpcGroup.middleware(tag)`. Without it, stream rpcs (whose top-level `errorSchema` is forced to `Never` by effect-rpc) hit `SchemaError: Expected never | { _tag: "error", ... }` decoding middleware-thrown errors that bypass the in-stream `Stream.catch` wrap.
397
+
398
+ **Migration**: handlers that yield errors previously sourced from rcm (e.g. `yield* new UnauthorizedError()`) now require those errors to be declared explicitly on the resource — `Req.Query<T>()("...", fields, { success, error: UnauthorizedError })`. The handler error type no longer auto-includes the rcm union.
399
+
400
+ ### Invalidation wrap/unwrap
401
+
402
+ - `routing.ts` (server) provides a per-request `InvalidationSet` for commands, wraps the success value as `CommandResponseWithMetaData`, and converts handler-thrown failures into `CommandFailureWithMetaData` so accumulated invalidation keys reach the client on either path. Stream wrap (per-chunk envelope + final `done` chunk) was already in routing and is unchanged.
403
+ - `apiClientFactory.ts` (client) `unwrapCommand` strips both envelopes and forwards keys to `InvalidationKeysFromServer`.
404
+ - `InvalidationMiddleware` (the tag) and `InvalidationMiddlewareLive` (the layer) are **removed**. The middleware was the previous home of the wrap; with the wrap moved to routing/apiClientFactory, the middleware became a thin pass-through and is no longer needed. `DefaultGenericMiddlewares` and `DefaultGenericMiddlewaresLive` shrink accordingly — no migration needed for callers that used the defaults; callers that referenced `InvalidationMiddleware` / `InvalidationMiddlewareLive` directly should drop those imports.
405
+
406
+ Middleware-thrown errors are never wrapped: by definition the handler never ran, so there is nothing to invalidate. They flow raw on the Cause and the client decodes them via the middleware-tag failure-union channel described above.
407
+
408
+ - 8f09f77: fix
409
+ - 50ce7e6: Replace typescript-eslint with oxlint-tsgolint for type-aware lint. Drop ESLint entirely from non-vue packages (cli, effect-app, infra) — they now use only `oxlint --type-aware`. Vue packages keep ESLint to run `@effect-app/no-await-effect` (no tsgolint equivalent) via `@typescript-eslint/parser` + `vue-eslint-parser`.
410
+ - d71d976: fix
411
+ - 2aa8e5e: `queryInvalidation` / `invalidatesQueries` accept shorthand entries (per-mutation, Command, client-level `QueryInvalidation<M>` maps, and server-side `Req.Command` `invalidatesQueries` callbacks).
412
+
413
+ Each entry returned may now be:
414
+
415
+ - a raw query key (`string[]`)
416
+ - an RPC handler (`{ id, options? }`) — its query key is derived via `makeQueryKey`
417
+ - the existing `{ filters, options }` raw tanstack-query invalidation
418
+
419
+ ```ts
420
+ queryInvalidation: (queryKey) => [queryKey, GetMe, PackListIndex];
421
+ ```
422
+
423
+ equivalent to:
424
+
425
+ ```ts
426
+ queryInvalidation: (queryKey) => [
427
+ { filters: { queryKey } },
428
+ { filters: { queryKey: makeQueryKey(GetMe) } },
429
+ { filters: { queryKey: makeQueryKey(PackListIndex) } },
430
+ ];
431
+ ```
432
+
433
+ - 29a1e57: Repository `changeFeed` is now namespace-aware. Events carry the `storeId` namespace as a third tuple element (`ChangeFeedEvent<T> = [items, op, namespace]`). `subscribe` accepts `options.namespace` to register a per-namespace handler; omitting it registers a wildcard handler that receives events from every namespace. Per-namespace handler buckets eliminate cross-namespace fan-out and avoid waking handlers for irrelevant tenants.
434
+ - 52b0b01: Align effect-app tagged union helpers with Effect v4 by delegating to the native tagged union utilities, exposing v4-style `cases` and `guards`, and preserving the local `tags` helper.
435
+ - 52b0b01: Update Effect dependencies to 4.0.0-beta.31 across workspace packages.
436
+ - 6fff09c: unify encoded function for when you use encodedKeys
437
+ - 11422f8: Update request helper typing and runtime invocation to rely on schema `.make` instead of class constructors, avoiding `new`-based assumptions for request schemas.
438
+ - eb28ea5: bogus
439
+ - 52b0b01: Change `Schema.Class` and `Schema.TaggedClass` wrappers to default constructor options to `{ disableValidation: true }`.
440
+
441
+ This avoids strict class identifier validation by default when constructing wrapper classes (for example passing a compatible view class), while keeping existing behavior when explicit options are provided.
442
+
443
+ - 8f1cf6a: able to configure schema concurrency
444
+ - ee9694e: fix type issue?
445
+ - 52a31dd: Reduce schema type complexity by exposing explicit interfaces for branded string and number schemas.
446
+
447
+ Each branded constant in `Schema/strings.ts`, `Schema/moreStrings.ts`, and `Schema/numbers.ts` now has a named interface (e.g. `NonEmptyStringSchema`, `StringIdSchema`, `PositiveIntSchema`, `UrlSchema`) annotating its `export const`. Mirrors the pattern used in `effect/Schema` itself — TypeScript reports the interface name instead of expanding the full pipe/brand/extension chain, which shrinks inferred types in consumer code and speeds up type display.
448
+
449
+ No runtime or API surface changes; `brandedStringId` now returns `BrandedStringIdSchema<Id>` (same shape as before, just named).
450
+
451
+ - 52b0b01: fix withDefault
452
+ - ca94edf: fix typo
453
+ - d1c15d3: Tighten projectComputed projection schema typing against encoded repo fields and computed output types.
454
+ - a1b59bc: Allow query projections to use a repository's full union schema.
455
+ - dc07df5: Fix nested DTO subset projection inference for tagged unions.
456
+ - 0fe925d: Tag-aware `ProjectableFromDomain` for `projectComputed`: projection Encoded fields must exist on the matching domain tagged state (or be computed). Prevents Overview.List SchemaErrors when cancel states omit workflow lock fields like `activeRequest`.
457
+ - 40585ca: Keep tag-aware `ProjectableFromDomain` for `projectComputed` only; restore loose key-presence guard for `project()` so view DTOs with reshaped fields keep typechecking.
458
+ - 5ac46cb: Make `Schema.provide` dual (pipeable)
459
+ - a354345: Move release tsconfig flattening from publish to pack lifecycle so package configs are restored before registry upload/auth can fail.
460
+ - 52b0b01: Refactor `Pure` helpers to use typed `useSync` calls instead of unsafe casts.
461
+ - 48d9f36: Memory, SQLite, and Postgres `Store.queryRaw` now run over stored JSON documents, not Encoded rows. `Repository.queryRaw` already applies `toCodecJson` to the projector output, so native Encoded `Date` / `Map` / `Set` values no longer fail `Expected JSON value`. Cosmos was already JSON and is unchanged.
462
+
463
+ Memory projectors that assumed native Encoded `Date` / `Map` / `Set` values now see the stored JSON form (ISO strings, arrays).
464
+
465
+ - 52b0b01: Update Effect dependencies to 4.0.0-beta.28 across workspace packages.
466
+ - 52b0b01: fix: isA
467
+ - d31253f: Refactor eligible schema classes and tagged classes to Opaque schemas, and migrate constructor call sites to use `.make` for those models.
468
+ - 5615e47: bs
469
+ - 3e46e7b: allow excess props in openapi schemas
470
+ - cec026d: update packages
471
+ - 88838fb: Remove pick/omit customizations from Class/TaggedClass/Struct/TaggedStruct. Use `Struct.pick(X.fields, [...])` from `effect-app` instead.
472
+ - 3bae238: Remove lodash type imports from utils.ts, replacing with native TypeScript equivalents.
473
+ - b2e438f: Remove Operations service and repo
474
+ - f150cf9: Remove obsolete queue machinery left unused after the move to cluster entities: the SB/SQLite/mem `QueueMaker` implementations (`QueueMaker/{SQLQueue,memQueue,sbqueue}.ts`), their `ServiceBus.ts`/`memQueue.ts` transports, and `RequestFiberSet.ts` (its `setRootParentSpan` helper is inlined into `MainFiberSet`). `effect-app/QueueMaker` keeps only `QueueMeta`; the `QueueBase` interface and empty `QueueMaker` ops object are dropped.
475
+ - 0c88f78: Remove `TaggedError` compatibility re-export, use `TaggedErrorClass` directly
476
+ - 261470f: Remove the local `Schema.Void` / `SchemaAST.Void` override. effect `4.0.0-beta.90` ships the TypeScript `void` parser semantics upstream (`SchemaAST.Void.getParser()` → `fromAnyToConst(undefined)`, the effect-smol PR #2475 behavior), so `S.Void` already accepts any present value and discards it to `undefined`. `Schema.Void` now re-uses effect's `S.Void` and `SchemaAST` is a plain re-export of `effect/SchemaAST`. The unused `Void_` alias is dropped. No behavior change.
477
+ - 8792221: Rename `withDefault` schema extensions to `withConstructorDefault` for clarity.
478
+
479
+ Document that `.withConstructorDefault` is **construction-only** (applied during `.make(...)` when a field is omitted) and is **not** applied during decode — it cannot be used to JIT-migrate database fields. Per-property JSDoc on every `.withConstructorDefault` / `.withDecodingDefaultType` exposed by `Schema/ext.ts`, `Schema/numbers.ts`, `Schema/moreStrings.ts`, and `ids.ts` so the caveat is visible on hover.
480
+
481
+ Re-export `withConstructorDefault`, `withDecodingDefault`, `withDecodingDefaultKey`, `withDecodingDefaultType`, and `withDecodingDefaultTypeKey` from `effect-app/Schema` with explicit JSDoc. `withDecodingDefault*` is discouraged for persisted data: a missing field may be data corruption rather than an old-shape document, and silently substituting a default hides the problem. Prefer an explicit, preferably versioned migration of database data over decode-time fallbacks.
482
+
483
+ - 7bd8234: Use set-backed data dependencies and provide request-scoped dependency services through a shared root-checked helper.
484
+ - 54bfc59: Require middleware to flow through `makeRpcClient` and the live layer through `makeRouter`.
485
+
486
+ ### `makeRpcClient(middleware, generalErrors?)`
487
+
488
+ Signature drops the `rcs` (request-context map wrapper) parameter. `rcs` was only load-bearing on the type side for `RequestConfig` inference; that information is now derived from `middleware.requestContextMap`. `middleware` is required — the previous "rcs + optional middleware" overload is gone.
489
+
490
+ **Migration**:
491
+
492
+ ```diff
493
+ -makeRpcClient(RequestContextMap, undefined, AppMiddleware)
494
+ +makeRpcClient(AppMiddleware)
495
+ ```
496
+
497
+ For tests/clients without a real middleware, build a minimal stub (`{ requestContextMap, requestContext }`) or pass any value satisfying `ClientMiddleware<RCM>`.
498
+
499
+ ### `makeRouter(middlewareLive)`
500
+
501
+ `makeRouter()` no longer infers the live middleware layer from `meta.middleware.Default`. The Live layer is now passed explicitly to `makeRouter`, and the request classes only carry the middleware tag (schema-only). This decouples the router from any assumption that the middleware tag exposes a `Default` static.
502
+
503
+ **Migration**:
504
+
505
+ ```diff
506
+ -export const { Router, matchAll } = makeRouter()
507
+ +export const { Router, matchAll } = makeRouter(AppMiddleware.Default)
508
+ ```
509
+
510
+ - ad0ede6: Keep tag-aware `ProjectableGuard` on both `project()` and `projectComputed` (no loose key-only paper-over).
511
+
512
+ Hardening:
513
+
514
+ - single-literal tags allow dual same-tag domain variants (KeysOfUnion of matched members)
515
+ - multi-tag / string tags still require keys on every matched member
516
+ - optional projection/domain keys checked by key presence only (not optional-assignability)
517
+
518
+ Call sites must project domain-owned fields per tagged state.
519
+
520
+ - 52b0b01: fix request attr
521
+ - 9ea024d: Improve repository schema encode/decode telemetry for event-loop tail analysis.
522
+
523
+ - widen `app.schema.{encode,decode}.duration` histogram buckets into multi-second stalls
524
+ - count `app.schema.slow` (duration ≥ 100ms) with `app.entity` / operation attributes for alertable rates
525
+ - annotate spans with `app.schema.slow` and, on encode, `app.entity.state` from the first item's `_tag`
526
+
527
+ - e6f2341: Add SecretURL tests and switch secretURL config to use Config.nonEmptyString
528
+ - 2495ace: `InvalidationSet.add` accepts RPC handler shorthand.
529
+
530
+ Server-side handlers may now pass an RPC handler object directly to
531
+ `InvalidationSet.add`; its query key is derived via `makeQueryKey`. Raw
532
+ `InvalidationKey` arrays continue to work.
533
+
534
+ ```ts
535
+ // before
536
+ yield *
537
+ Invalidation.InvalidationSet.use((_) => _.add(makeQueryKey(UserRsc.GetMe)));
538
+
539
+ // after
540
+ yield * Invalidation.InvalidationSet.use((_) => _.add(UserRsc.GetMe));
541
+ ```
542
+
543
+ - 0b3e00e: fix bug
544
+ - 52b0b01: fix Req
545
+ - c215db8: align TaggedUnion with array arg
546
+ - 12abb55: Refine schema copy behavior by keeping class copy constructor-based while using structural copy for Struct and TaggedStruct helpers.
547
+ - 0cff7c1: workaround middleware error issue
548
+ - c1a6fdc: fix proxify
549
+ - 8ae8b53: input mess
550
+ - a5248a9: use new schema features
551
+ - 0e824ef: add missing Brand
552
+ - 52b0b01: fix RequestName
553
+ - eb06b32: improve root union select
554
+ - 52b0b01: Update Effect dependencies to 4.0.0-beta.29 across workspace packages.
555
+ - 52b0b01: switch to NdJson
556
+ - acfdc9e: Point development package exports at TypeScript sources while keeping published exports on compiled dist files.
557
+ - 1186b09: improve branded types, keep types through Rebuild
558
+ - a69da09: Publish from generated staging directories so release-only files are created outside the source package tree.
559
+ - 3c1f52d: improve: class strictness enabled by default again, allow `strict: false` as opt out for now.
560
+ - 0054611: Stream RPC: drain read/write data-dependencies per emitted value chunk instead of sending the
561
+ cumulative set on every metadata chunk. Each metadata chunk now carries only the delta recorded
562
+ since the last chunk, the bucket is cleared for the next segment, and the terminal "done"/"error"
563
+ chunks drain the remainder. The emit condition also broadens to include non-empty reads, so stream
564
+ queries forward their read-dependencies mid-stream too. The client already accumulates deltas into
565
+ its per-call recorder, so no FE change is required.
566
+ - 583393f: Default the stream `mutateStream` execute resolved value to the request's success type when no `final` schema is declared.
567
+
568
+ Previously the type defaulted to `void`, but the runtime already resolves with the last emitted value. Types now match runtime behaviour: `execute` returns `Final` if a `final` schema is set, otherwise the success type.
569
+
570
+ - 459697f: Restore native Arbitrary for the schemas that lost custom fast-check `toArbitrary`. `StringId` uses `toCodecArbitrary` (the native replacement): generate a 210-byte `Uint8Array` and run `customRandom(urlAlphabet, 21, …)` — same as the old `StringIdArb`. JSON stays a branded string via `toCodec`. `Url` is `https://…`. `RequestId` samples unique nanoid-shaped ids. `Finite` generation is capped at ±1e6. `generateFromSchema` jumps its master seed per call so successive `count: 1` draws do not collide on attempt-0 edge strings.
571
+ - 3eda52e: Fix `StructFacade` to extend effect-app's own `Struct`, not `effect/Schema`'s.
572
+
573
+ `StructFacade` was built on `Omit<S.Struct<Fields>, ...>` where `S` is `effect/Schema` (core). Scanner / consumer models are effect-app `S.Struct`, which is a distinct type from effect core's `Struct`, so a facade built on the core `Struct` is not assignable where an effect-app struct is expected — e.g. workflow payloads (`Workflow<…, Struct<Fields & Context>>`) and other effect-app `Struct`-shaped positions failed to type-check. Switch the `Omit` base to effect-app's `Struct` (the `Fields extends S.Struct.Fields` constraint stays effect core, matching effect-app's own `Struct`).
574
+
575
+ - b52b424: restore annotations for now
576
+ - 7c25dbb: Add relaxed wrapper support for `ErrorClass` and `TaggedErrorClass` in `effect-app/Schema`, matching the existing class wrapper behavior (`copy`, cached `ast`, and unbounded parse concurrency).
577
+ - b8b9080: update packages
578
+ - b90fa30: Repository `changeFeed` now broadcasts synchronously: `publish` awaits every subscribed handler before resolving. Replaces `PubSub.PubSub` with a `ChangeFeed<T>` interface (`publish` + scoped `subscribe`). Handlers are auto-removed when the subscriber's scope closes, and the full handler set is cleared when the repository's scope closes. Repository construction now requires `Scope` — wire `makeRepo` through `Layer.scoped` / `Effect.scoped`.
579
+ - 57db551: Split `TaggedRequestFor` into `Query` and `Command` factories, and mark generated request classes with `type: "query" | "command"`.
580
+
581
+ Vue client helpers now expose query-only helpers (`query`, `suspense`, `fetch`) for query requests and mutation-only helpers (`mutate`, `fetch`) for command requests.
582
+
583
+ - 52b0b01: remove `fields` constraint from TaggedUnion/tags helpers, extract `_tag` via AST walk instead
584
+ - dbcc53b: Refactor command invalidation typing: declare resources via `Command<Self, Resources>()`, pass `invalidatesQueries` as the optional 4th argument, and enforce exact `clientFor` invalidation resources when required.
585
+ - 52b0b01: Configure Changesets fixed versioning for public packages.
586
+ - 140e192: Relax invalidation resource value constraints to allow arbitrary values while preserving query-only filtering in invalidation handling.
587
+ - 9992e70: pass options
588
+ - 24f0a5a: rename Literal to Literals, no longer hiding Schema's singular Literal.
589
+ - 256ae85: cleanup
590
+ - 52b0b01: update effect to 4.0.0-beta.37 and drop the Schema Class disableValidation workaround now that the patched effect schema covers it
591
+ - fac725d: update effect to latest beta
592
+ - 412f08b: Include changed entity IDs in repository data dependencies, with explicit query scopes and configurable write aliases, while retaining coarse collection dependencies.
593
+ - 79eb019: Remove redundant schema `title` annotations when they duplicate the schema `identifier`.
594
+ - 6ae3050: Preserve class annotation parseOptions in relaxed declaration struct decoding so custom parse options (including concurrency defaults) are applied consistently.
595
+ - f353d48: Rename the Class/TaggedClass relaxed declaration option to `strict` (default `false`) and apply it to `Class`, `TaggedClass`, `ExtendedClass`, and `ExtendedTaggedClass`.
596
+
597
+ When `strict: true`, class decoding keeps strict class-level declaration behavior; by default, decoding remains relaxed and preserves field-level schema errors.
598
+
599
+ - 52b0b01: Fix `TaggedRequest` no-config error type inference so requests without a third argument infer the same default error schema as requests with explicit success config.
600
+ - 01bab22: Work around tsgo failing to reduce `S.Codec.DecodingServices<X>` (`X extends Top ? X["DecodingServices"] : never`) in generic positions, which left `unknown` and polluted the `R` channel of client handlers and RPC middleware failure context. Since the schemas involved are already constrained to `S.Top`, read `["DecodingServices"]` directly in `RequestHandlerFor`, `TagClass.FailureContext`, and the Vue `MutationExt` / `QueryProjection` types.
601
+ - 2a86a17: improve tsgo compat: avoid deferred `Schema.Type`/`Codec.Encoded`/`Codec.DecodingServices`/`Codec.EncodingServices` conditional helpers in generic positions where the type parameter is already constrained to `Schema.Top`. Index the property directly (`X["Type"]`, `X["Encoded"]`, `X["DecodingServices"]`, …) so tsgo doesn't leak `unknown` into `Effect` channels (notably `R`).
602
+
603
+ Sites: `client/clientFor.ts` (`RequestHandlerFor`, `FinalTypeOf`, `ExtractResponse`, `ExtractEResponse`), `client/makeClient.ts` (`InputFromPayload`, `OutputFromSuccess`, `InvalidationConfigForCommand`, `TaggedRequestWithMeta` overloads), `rpc/MiddlewareMaker.ts` (`Errors`), `rpc/RpcMiddleware.ts` (`Failure`, `FailureContext`), `Schema/ext.ts` (`ReadonlySetFromArray`, `ReadonlyMapFromArray`), `infra/routing.ts` (`GetSuccessShape`, handlers, route matcher), `vue/makeClient.ts` (`MutationExt.project`, `MutationWithExtensions`, `QueryProjection`), `vue/routeParams.ts` (`parseRouteParams*`).
604
+
605
+ - 52b0b01: update all teh tings
606
+ - c3299f7: update packages
607
+ - 6b57330: Upgrade Effect packages to npm `4.0.0`.
608
+ - e2d00b5: Upgrade Effect packages to npm `4.0.1`.
609
+ - 547e2e1: Update effect packages to `4.0.0-beta.107` (from `beta.90`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`, and `fast-check` to `^4.9.0`. Sync `repos/effect` subtree from `Effect-TS/effect` (effect-smol stopped publishing tags after beta.98).
610
+
611
+ API adaptations for beta.107:
612
+
613
+ - `concurrency: "inherit"` → `"unbounded"`
614
+ - `Schema.ErrorClass` / `TaggedErrorClass` → `Schema.Error` / `TaggedError`
615
+ - `Schema.LazyArbitrary` → `Schema.Arbitrary`
616
+ - `Schema.DateValid` / `isDateValid` removed (`Schema.Date` rejects invalid dates)
617
+ - `SchemaIssue` constructors no longer take `Option` (annotations + input)
618
+ - filter meta via `annotations.representation` instead of `annotations.meta`
619
+ - `context.defaultValue` → `context.constructorDefault` (single Link)
620
+ - Class detection via `~constructor` + static `identifier`
621
+ - Redacted detection via `representation.id`
622
+ - localized StandardSchema hooks updated for new issue/input model
623
+ - provide `NodeCrypto.layer` for cluster sqlite tests
624
+ - default `sync-effect` subtree URL → `Effect-TS/effect`
625
+
626
+ - 52b0b01: update effect to 4.0.0-beta.36, adapt to Option<A> revert from A | undefined
627
+ - Update effect packages to 4.0.0-beta.52
628
+ - ea32222: Update to effect 4.0.0-beta.60 and use native `Rpc.custom` constructors (`makeCommandRpc`, `makeStreamRpc`) for metadata-wrapped RPC schemas instead of manually wrapping/unwrapping schemas inline.
629
+ - 7ca66ce: Update to effect 4.0.0-beta.66. Remove `Yieldable` and `asEffect()` (service tags are now `Effect` directly).
630
+ - 57a1862: Update to effect 4.0.0-beta.67. Switch deps from `pkg.pr.new` snapshot back to npm beta tag.
631
+ - 3e855bc: Update Effect packages to `4.0.0-beta.83` (from `beta.74`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/sql-sqlite-node`, `@effect/atom-vue`, `@effect/vitest`.
632
+
633
+ Adapt the infra workflow engines to beta.83 API changes:
634
+
635
+ - `Schema.Defect` is now a constructor function — use `S.Defect()` when building the deferred-exit codec (the bare constant no longer produces a usable schema and crashed `toType`).
636
+ - `Workflow` exposes its name as `_tag` instead of `name`. `WorkflowEngineSqlite`/`WorkflowEngineCosmos` now key the registry, codec caches, and persisted `workflow_name` off `workflow._tag`, fixing crash-recovery (stale-lease re-drive previously registered under an `undefined` key and never matched).
637
+
638
+ - 78d076a: Update effect packages to `4.0.0-beta.84` (`effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`).
639
+ - ffd140f: Update effect packages to `4.0.0-beta.86` (from `beta.84`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`. No source changes required — typecheck and tests pass unchanged.
640
+ - e8842aa: Update effect packages to `4.0.0-beta.88` (from `beta.86`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`. Also bump `@effect-app/cli` to `2.1.0-beta.35`. No source changes required — typecheck and tests pass unchanged.
641
+ - b6dda09: Update effect packages to `4.0.0-beta.90` (from `beta.88`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`. No source changes required — typecheck and tests pass unchanged.
642
+ - 0263827: Update to effect `pkg.pr.new` snapshot at `a42ef66` (4.0.0-beta.66). Remove `Yieldable` and `asEffect()` (service tags are now `Effect` directly).
643
+ - 8bd5bfe: Update effect packages to `4.0.0-rc.112` (from `beta.107`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`. Sync `repos/effect` subtree from `Effect-TS/effect` at `effect@4.0.0-rc.112`.
644
+
645
+ API adaptations for rc.112:
646
+
647
+ - cluster encoded driver `resetAddress` → batched `resetAddresses`
648
+ - Cosmos `unprocessedMessages` honors optional `limit` / `addresses` (only claimed rows are returned)
649
+ - Service Bus `Runners.make` supplies `codecFor` for schema-aware RPC serialization
650
+ - `pnpm subtree:effect` passes `--url https://github.com/Effect-TS/effect.git` (published CLI still defaults to effect-smol)
651
+ - JSON Schema check constraints are compacted onto the parent (`minLength`/`maxLength` instead of `allOf`)
652
+
653
+ - 2231ef8: Upgrade Effect packages to npm `4.0.0-rc.115`. Drop the pkg.pr.new pin used while `effect@4.0.0-rc.114` was unpublished.
654
+ - c7bbc41: fix - class should check type side
655
+ - 52b0b01: fix ForceVOid
656
+ - 52b0b01: fix ForceVoid for real
657
+
658
+ ## 4.0.0-beta.333
659
+
660
+ ### Patch Changes
661
+
662
+ - e2d00b5: Upgrade Effect packages to npm `4.0.1`.
663
+
664
+ ## 4.0.0-beta.332
665
+
666
+ ### Patch Changes
667
+
668
+ - 6b57330: Upgrade Effect packages to npm `4.0.0`.
669
+
670
+ ## 4.0.0-beta.331
671
+
672
+ ## 4.0.0-beta.330
673
+
674
+ ### Patch Changes
675
+
676
+ - 48d9f36: Memory, SQLite, and Postgres `Store.queryRaw` now run over stored JSON documents, not Encoded rows. `Repository.queryRaw` already applies `toCodecJson` to the projector output, so native Encoded `Date` / `Map` / `Set` values no longer fail `Expected JSON value`. Cosmos was already JSON and is unchanged.
677
+
678
+ Memory projectors that assumed native Encoded `Date` / `Map` / `Set` values now see the stored JSON form (ISO strings, arrays).
679
+
680
+ ## 4.0.0-beta.329
681
+
682
+ ### Patch Changes
683
+
684
+ - 459697f: Restore native Arbitrary for the schemas that lost custom fast-check `toArbitrary`. `StringId` uses `toCodecArbitrary` (the native replacement): generate a 210-byte `Uint8Array` and run `customRandom(urlAlphabet, 21, …)` — same as the old `StringIdArb`. JSON stays a branded string via `toCodec`. `Url` is `https://…`. `RequestId` samples unique nanoid-shaped ids. `Finite` generation is capped at ±1e6. `generateFromSchema` jumps its master seed per call so successive `count: 1` draws do not collide on attempt-0 edge strings.
685
+
686
+ ## 4.0.0-beta.328
687
+
688
+ ### Minor Changes
689
+
690
+ - 3a8c710: Store document decode fails as a typed `SchemaError` instead of a defect; repositories keep their public error channels by dying at the boundary; `validateSample` reports documents that fail at the store boundary.
691
+
692
+ ## 4.0.0-beta.327
693
+
694
+ ## 4.0.0-beta.326
695
+
696
+ ### Minor Changes
697
+
698
+ - 2ebf8ae: `jitM` runs at the store boundary as JSON → JSON, before the `toCodecJson(toEncoded(schema))` decode; repositories decode the Encoded shape only.
699
+
700
+ `jitM` used to be applied by the repository _after_ the store had already decoded the document, and was typed `(pm: Encoded) => Encoded` - a lie, since jitMs are written against the stored JSON and `Encoded` holds native `Date`/`Map`/`Set` values.
701
+
702
+ The read pipeline is now: raw JSON document → merge `defaultValues` (unchanged: they only fill _absent_ keys, so an explicitly stored `null` reaches `jitM`) → `jitM` (JSON → JSON) → decode `Schema.toCodecJson(Schema.toEncoded(schema))` → Encoded. The repository then decodes Encoded → the domain type with `schema` and no longer applies `jitM` at all. Because `jitM` now runs before any schema decode sees the document, it can repair legacy shapes including explicit `null`s.
703
+
704
+ - `StoreConfig.jitM?: (json: JsonRecord) => JsonRecord` is new, where `JsonRecord` (exported from `effect-app/Store`) is `{ readonly [key: string]: Schema.Json }`. It is not applied on the write/encode path, and never receives `_etag`.
705
+ - `RepositoryOptions.jitM` changes type from `(pm: Encoded) => Encoded` to `(json: JsonRecord) => JsonRecord` and is forwarded into the store config.
706
+ - **Migrating a jitM:** it now receives and must return JSON. A `Date` field arrives as an ISO string (return a string, not a `Date`), a `ReadonlySet` as an array, a `ReadonlyMap` as an array of `[key, value]` pairs. Field access is index-signature based (`json["x"]`) rather than typed property access.
707
+ - The JSON→Encoded decode stays strict: a document `jitM` does not repair fails at the store boundary instead of being read back half-decoded.
708
+ - `ValidationError.jitMResult` is deprecated: `validateSample` only ever sees the store's output, so it is identical to `rawData`.
709
+
710
+ ## 4.0.0-beta.325
711
+
712
+ ### Patch Changes
713
+
714
+ - f233f3d: `PositiveNumber` and `NonNegativeNumber` bound native Arbitrary generation to at most 1,000,000 (`arbitraryConstraint` on their existing checks), so generated fixtures no longer overflow derived totals to `Infinity`. Validation and JSON Schema output are unchanged.
715
+
716
+ ## 4.0.0-beta.324
717
+
718
+ ### Patch Changes
719
+
720
+ - a0075b8: `Email` and `PhoneNumber` carry native `arbitraryConstraint` patterns, so `effect/unstable/arbitrary` (and `generateFromSchema`) can sample them instead of exhausting rejection sampling on their `refine` guards.
721
+
722
+ ## 4.0.0-beta.323
723
+
724
+ ### Minor Changes
725
+
726
+ - ab289d4: Add opt-in `autoscaleMaxThroughput` for Cosmos containers created on demand (`StorageConfig`, `ClusterCosmosConfig`, `WorkflowEngineCosmosConfig`). When set, a missing container is created with autoscale at that max RU/s, unless its database has shared throughput (then it keeps sharing the database pool). Existing containers are untouched; unset keeps the Cosmos default of manual 400 RU/s per container.
727
+
728
+ ## 4.0.0-beta.322
729
+
730
+ ### Patch Changes
731
+
732
+ - 2231ef8: Upgrade Effect packages to npm `4.0.0-rc.115`. Drop the pkg.pr.new pin used while `effect@4.0.0-rc.114` was unpublished.
733
+
734
+ ## 4.0.0-beta.321
735
+
736
+ ### Patch Changes
737
+
738
+ - 18bae5b: Upgrade Effect packages to `4.0.0-rc.114` (core `effect` via pkg.pr.new at `cdb3ac91` until npm publishes that version). Also bump independently versioned `@effect/language-service` to `0.87.2` and `@effect/tsgo` to `0.45.0` (requires `oxlint` `1.82.0`).
739
+
740
+ Breaking API updates from this RC:
741
+
742
+ - PascalCase Config/CLI constructors (`Config.String`, `Flag.File`, `Config.NonEmptyString`, `Config.Redacted`, `Config.Literal`)
743
+ - `Config.Record` now returns a Config
744
+ - Schema `toArbitrary` (fast-check) replaced by native `effect/unstable/arbitrary`
745
+ - `SchemaTransformation.transformOrFail` renamed to `transformEffect`
746
+ - `Fiber.currentSpan` moved to `fiber.cache.span`
747
+ - HTTP server addresses are `InetAddressV4`/`InetAddressV6` instead of `TcpAddress`
748
+ - Object JSON Schema now emits `additionalProperties: true`
749
+ - Schema `Union` AST stores matching as `options.mode` instead of `mode`
750
+
751
+ ## 4.0.0-beta.320
752
+
753
+ ## 4.0.0-beta.319
754
+
755
+ ## 4.0.0-beta.318
756
+
757
+ ### Patch Changes
758
+
759
+ - 8bd5bfe: Update effect packages to `4.0.0-rc.112` (from `beta.107`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`. Sync `repos/effect` subtree from `Effect-TS/effect` at `effect@4.0.0-rc.112`.
760
+
761
+ API adaptations for rc.112:
762
+
763
+ - cluster encoded driver `resetAddress` → batched `resetAddresses`
764
+ - Cosmos `unprocessedMessages` honors optional `limit` / `addresses` (only claimed rows are returned)
765
+ - Service Bus `Runners.make` supplies `codecFor` for schema-aware RPC serialization
766
+ - `pnpm subtree:effect` passes `--url https://github.com/Effect-TS/effect.git` (published CLI still defaults to effect-smol)
767
+ - JSON Schema check constraints are compacted onto the parent (`minLength`/`maxLength` instead of `allOf`)
768
+
769
+ ## 4.0.0-beta.317
770
+
771
+ ### Minor Changes
772
+
773
+ - 186de3a: Stop forcing Date/Map/Set Encoded shapes to JSON.
774
+
775
+ `Schema.Date` / `ReadonlySet` / `ReadonlyMap` now keep native Encoded types (`Date`, `Set`, `Map`). Use `DateFromString`, `ReadonlySetFromArray`, and `ReadonlyMapFromArray` when the Encoded form must be JSON. The query DSL accepts those native values, including array ops (`includes` / `in` / `includes-any`) on `Date[]` and `ReadonlySet` fields. Memory, Disk, SQL, and Cosmos convert Encoded Date/Map/Set through `Schema.toCodecJson` on write/read; query parameters and defaults lower the same way from the store schema. App types such as DateOnly stay native Encoded and JSON-lower via that schema — not a type registry.
776
+
777
+ - 186de3a: Query maps as JSON arrays of `[key, value]` tuples.
778
+
779
+ `where("meta", "hasKey" | "hasValue" | "hasKeyValue", ...)` (and `not*` / `*-any` / `*-all` variants) filter `ReadonlyMap` fields. Memory, Disk, SQLite, Postgres, and Cosmos compile those ops against the encoded tuple array.
780
+
781
+ - 186de3a: JSON stores lower native Encoded values (Date, Map, Set, and app types such as DateOnly) through the store's document schema.
782
+
783
+ `makeRepo` already passes that schema. Adapters encode documents, query parameters, and defaults with `Schema.toCodecJson(toEncoded(schema))` at the field path. No type registry. Schemaless stores still lower Date/Map/Set structurally.
784
+
785
+ ## 4.0.0-beta.316
786
+
787
+ ## 4.0.0-beta.315
788
+
789
+ ## 4.0.0-beta.314
790
+
791
+ ## 4.0.0-beta.313
792
+
793
+ ## 4.0.0-beta.312
794
+
795
+ ### Patch Changes
796
+
797
+ - 9ea024d: Improve repository schema encode/decode telemetry for event-loop tail analysis.
798
+
799
+ - widen `app.schema.{encode,decode}.duration` histogram buckets into multi-second stalls
800
+ - count `app.schema.slow` (duration ≥ 100ms) with `app.entity` / operation attributes for alertable rates
801
+ - annotate spans with `app.schema.slow` and, on encode, `app.entity.state` from the first item's `_tag`
802
+
803
+ ## 4.0.0-beta.311
804
+
805
+ ### Patch Changes
806
+
807
+ - 547e2e1: Update effect packages to `4.0.0-beta.107` (from `beta.90`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`, and `fast-check` to `^4.9.0`. Sync `repos/effect` subtree from `Effect-TS/effect` (effect-smol stopped publishing tags after beta.98).
808
+
809
+ API adaptations for beta.107:
810
+
811
+ - `concurrency: "inherit"` → `"unbounded"`
812
+ - `Schema.ErrorClass` / `TaggedErrorClass` → `Schema.Error` / `TaggedError`
813
+ - `Schema.LazyArbitrary` → `Schema.Arbitrary`
814
+ - `Schema.DateValid` / `isDateValid` removed (`Schema.Date` rejects invalid dates)
815
+ - `SchemaIssue` constructors no longer take `Option` (annotations + input)
816
+ - filter meta via `annotations.representation` instead of `annotations.meta`
817
+ - `context.defaultValue` → `context.constructorDefault` (single Link)
818
+ - Class detection via `~constructor` + static `identifier`
819
+ - Redacted detection via `representation.id`
820
+ - localized StandardSchema hooks updated for new issue/input model
821
+ - provide `NodeCrypto.layer` for cluster sqlite tests
822
+ - default `sync-effect` subtree URL → `Effect-TS/effect`
823
+
824
+ ## 4.0.0-beta.310
825
+
826
+ ## 4.0.0-beta.309
827
+
828
+ ### Patch Changes
829
+
830
+ - 99c43c4: Derive scoped dependency reads and writes from typed query filters and annotated model relationships, including previous aliases.
831
+
832
+ ## 4.0.0-beta.308
833
+
834
+ ## 4.0.0-beta.307
835
+
836
+ ### Patch Changes
837
+
838
+ - 40585ca: Keep tag-aware `ProjectableFromDomain` for `projectComputed` only; restore loose key-presence guard for `project()` so view DTOs with reshaped fields keep typechecking.
839
+ - ad0ede6: Keep tag-aware `ProjectableGuard` on both `project()` and `projectComputed` (no loose key-only paper-over).
840
+
841
+ Hardening:
842
+
843
+ - single-literal tags allow dual same-tag domain variants (KeysOfUnion of matched members)
844
+ - multi-tag / string tags still require keys on every matched member
845
+ - optional projection/domain keys checked by key presence only (not optional-assignability)
846
+
847
+ Call sites must project domain-owned fields per tagged state.
848
+
849
+ ## 4.0.0-beta.306
850
+
851
+ ### Patch Changes
852
+
853
+ - 0fe925d: Tag-aware `ProjectableFromDomain` for `projectComputed`: projection Encoded fields must exist on the matching domain tagged state (or be computed). Prevents Overview.List SchemaErrors when cancel states omit workflow lock fields like `activeRequest`.
854
+
855
+ ## 4.0.0-beta.305
856
+
857
+ ### Minor Changes
858
+
859
+ - 8bd9a11: Support ID-scoped signal dependencies and additive repository dependencies derived from previous and current entities.
860
+
861
+ ## 4.0.0-beta.304
862
+
863
+ ### Patch Changes
864
+
865
+ - 412f08b: Include changed entity IDs in repository data dependencies, with explicit query scopes and configurable write aliases, while retaining coarse collection dependencies.
866
+
867
+ ## 4.0.0-beta.303
868
+
869
+ ### Patch Changes
870
+
871
+ - 33b0544: Replace repository codec child spans with parent-span timing attributes and bounded metrics, and record database operation timing for instrumented stores.
872
+
873
+ ## 4.0.0-beta.302
874
+
875
+ ### Patch Changes
876
+
877
+ - c0e5a1b: Add `Schema.dropConstructorDefault`, a `Struct.Lambda` that clears a field's `withConstructorDefault`. Compose it with `Struct.omit`/`Struct.map` when deriving a partial-update schema from a "create" schema, so omitted fields' constructor defaults don't resurrect themselves in `.make(...)` output.
878
+
879
+ Also, `makeExactOptional` now drops constructor defaults automatically, matching this behavior.
880
+
881
+ ## 4.0.0-beta.301
882
+
883
+ ## 4.0.0-beta.300
884
+
885
+ ## 4.0.0-beta.299
886
+
887
+ ## 4.0.0-beta.298
888
+
889
+ ### Patch Changes
890
+
891
+ - 08d092c: Update Atom query caches in memory and accumulate stream invalidations so live events do not cause repeated RPC refetches.
892
+
893
+ ## 4.0.0-beta.297
894
+
895
+ ### Patch Changes
896
+
897
+ - 30c512d: fix rpc middleware context type issue
898
+
899
+ ## 4.0.0-beta.296
900
+
901
+ ### Patch Changes
902
+
903
+ - e0c4835: revert bs
904
+
905
+ ## 4.0.0-beta.295
906
+
907
+ ### Patch Changes
908
+
909
+ - eb06b32: improve root union select
910
+
911
+ ## 4.0.0-beta.294
912
+
913
+ ### Patch Changes
914
+
915
+ - a211c12: Fix projection schema typing for union members and computed projections.
916
+
917
+ ## 4.0.0-beta.293
918
+
919
+ ### Patch Changes
920
+
921
+ - d1c15d3: Tighten projectComputed projection schema typing against encoded repo fields and computed output types.
922
+
923
+ ## 4.0.0-beta.292
924
+
925
+ ## 4.0.0-beta.291
926
+
927
+ ## 4.0.0-beta.290
928
+
929
+ ### Patch Changes
930
+
931
+ - dc07df5: Fix nested DTO subset projection inference for tagged unions.
932
+
933
+ ## 4.0.0-beta.289
934
+
935
+ ### Patch Changes
936
+
937
+ - a1b59bc: Allow query projections to use a repository's full union schema.
938
+
939
+ ## 4.0.0-beta.288
940
+
941
+ ### Minor Changes
942
+
943
+ - aeb17bc: Add `disableQueryInvalidation` flag to Command config for background saves.
944
+
945
+ Set `disableQueryInvalidation: true` in a `Req.Command` config (3rd argument)
946
+ to suppress all client-side query invalidation for that command — client
947
+ `invalidatesQueries` callbacks, server-returned `metadata.invalidateQueries`,
948
+ and repository-derived write-dependency matching are all skipped. Use for
949
+ background saves (e.g. debounced auto-save) whose writes should not trigger
950
+ query refetches.
951
+
952
+ - `InvalidationConfig` gains `disableQueryInvalidation?: boolean`.
953
+ - `RequestHandlerWithInput` gains `disableQueryInvalidation?: boolean`,
954
+ propagated from `Request.config` by `ApiClientFactory.makeFor`.
955
+ - `invalidateCache` early-returns `Effect.void` when the flag is set,
956
+ applying to both regular and stream mutations.
957
+
958
+ ## 4.0.0-beta.287
959
+
960
+ ### Patch Changes
961
+
962
+ - 261470f: Remove the local `Schema.Void` / `SchemaAST.Void` override. effect `4.0.0-beta.90` ships the TypeScript `void` parser semantics upstream (`SchemaAST.Void.getParser()` → `fromAnyToConst(undefined)`, the effect-smol PR #2475 behavior), so `S.Void` already accepts any present value and discards it to `undefined`. `Schema.Void` now re-uses effect's `S.Void` and `SchemaAST` is a plain re-export of `effect/SchemaAST`. The unused `Void_` alias is dropped. No behavior change.
963
+
964
+ ## 4.0.0-beta.286
965
+
966
+ ### Patch Changes
967
+
968
+ - b6dda09: Update effect packages to `4.0.0-beta.90` (from `beta.88`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`. No source changes required — typecheck and tests pass unchanged.
969
+
970
+ ## 4.0.0-beta.285
971
+
972
+ ### Patch Changes
973
+
974
+ - 7bd8234: Use set-backed data dependencies and provide request-scoped dependency services through a shared root-checked helper.
975
+
976
+ ## 4.0.0-beta.284
977
+
978
+ ## 4.0.0-beta.283
979
+
980
+ ### Minor Changes
981
+
982
+ - 0054611: Derive query invalidation from repository read/write dependencies and propagate dependency metadata through RPC clients.
983
+
984
+ ### Patch Changes
985
+
986
+ - 0054611: Stream RPC: drain read/write data-dependencies per emitted value chunk instead of sending the
987
+ cumulative set on every metadata chunk. Each metadata chunk now carries only the delta recorded
988
+ since the last chunk, the bucket is cleared for the next segment, and the terminal "done"/"error"
989
+ chunks drain the remainder. The emit condition also broadens to include non-empty reads, so stream
990
+ queries forward their read-dependencies mid-stream too. The client already accumulates deltas into
991
+ its per-call recorder, so no FE change is required.
992
+
993
+ ## 4.0.0-beta.282
994
+
995
+ ### Minor Changes
996
+
997
+ - b2df3fa: Align `Schema.Void` with TypeScript `void` return-value semantics (effect-smol PR #2475 / `b7d46ab`).
998
+
999
+ `S.Void` now accepts **any present value** at runtime and discards it to `undefined`, while keeping the decoded/encoded type as `void` — matching a `void` return whose result callers never observe. This is implemented as an override of the AST node in a new `effect-app/SchemaAST` module (`export * from "effect/SchemaAST"` plus a `Void` subclass whose parser mirrors the PR's `fromAnyToConst(undefined)`), so there is a single canonical `Void` used everywhere, including RPC success schemas.
1000
+
1001
+ - New `effect-app/SchemaAST` module; internal `SchemaAST` imports across the libs now route through it.
1002
+ - Removed `ForceVoid` from `effect-app/client/makeClient` — use `S.Void` directly, which now carries this behaviour.
1003
+ - `S.Void_` remains available as effect's original (`undefined`-only) Void.
1004
+
1005
+ ### Patch Changes
1006
+
1007
+ - f150cf9: Remove obsolete queue machinery left unused after the move to cluster entities: the SB/SQLite/mem `QueueMaker` implementations (`QueueMaker/{SQLQueue,memQueue,sbqueue}.ts`), their `ServiceBus.ts`/`memQueue.ts` transports, and `RequestFiberSet.ts` (its `setRootParentSpan` helper is inlined into `MainFiberSet`). `effect-app/QueueMaker` keeps only `QueueMeta`; the `QueueBase` interface and empty `QueueMaker` ops object are dropped.
1008
+ - e8842aa: Update effect packages to `4.0.0-beta.88` (from `beta.86`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`. Also bump `@effect-app/cli` to `2.1.0-beta.35`. No source changes required — typecheck and tests pass unchanged.
1009
+
1010
+ ## 4.0.0-beta.281
1011
+
1012
+ ### Patch Changes
1013
+
1014
+ - ffd140f: Update effect packages to `4.0.0-beta.86` (from `beta.84`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`. No source changes required — typecheck and tests pass unchanged.
1015
+
1016
+ ## 4.0.0-beta.280
1017
+
1018
+ ### Patch Changes
1019
+
1020
+ - 3eda52e: Fix `StructFacade` to extend effect-app's own `Struct`, not `effect/Schema`'s.
1021
+
1022
+ `StructFacade` was built on `Omit<S.Struct<Fields>, ...>` where `S` is `effect/Schema` (core). Scanner / consumer models are effect-app `S.Struct`, which is a distinct type from effect core's `Struct`, so a facade built on the core `Struct` is not assignable where an effect-app struct is expected — e.g. workflow payloads (`Workflow<…, Struct<Fields & Context>>`) and other effect-app `Struct`-shaped positions failed to type-check. Switch the `Omit` base to effect-app's `Struct` (the `Fields extends S.Struct.Fields` constraint stays effect core, matching effect-app's own `Struct`).
1023
+
1024
+ ## 4.0.0-beta.279
1025
+
1026
+ ### Minor Changes
1027
+
1028
+ - 5f9cd6a: Schema/Class facades: add `StructFacade` and carry `identifier` on the class facades.
1029
+
1030
+ - Add `StructFacade<Self, Encoded, MakeIn, DecodingServices, EncodingServices, Fields>` = `Omit<S.Struct<Fields>, "Type" | "Encoded" | "~type.make.in" | "DecodingServices" | "EncodingServices"> & { pinned type-level members }`. A top-level `const X = S.Struct(...)` / `S.TaggedStruct(...)` model faceted by the `.d.ts`-emit compiler is retyped to it: still a real `S.Struct<Fields>` (so `Workflow.AnyStructSchema`, the `Struct<Fields & Context>` reconstruction, `Union`, `.fields.x` keep working) while `Type`/`Encoded`/make/services resolve to the named namespace interfaces.
1031
+ - Add `readonly identifier: string` to `OpaqueClassFacade` and `OpaqueErrorFacadeClass` (an `S.Class` static lost from the bare emitted interface, which the compiler otherwise had to hand-emit per model). `OpaqueFacade` is intentionally left untouched — `S.Opaque` and requests build on `S.Bottom`, not `S.Class`, so they have no `identifier`.
1032
+
1033
+ ## 4.0.0-beta.278
1034
+
1035
+ ### Patch Changes
1036
+
1037
+ - a354345: Move release tsconfig flattening from publish to pack lifecycle so package configs are restored before registry upload/auth can fail.
1038
+ - a69da09: Publish from generated staging directories so release-only files are created outside the source package tree.
1039
+
1040
+ ## 4.0.0-beta.277
1041
+
1042
+ ## 4.0.0-beta.276
1043
+
1044
+ ### Patch Changes
1045
+
1046
+ - 32f05c8: Remove unused dependency declarations from package manifests.
1047
+
1048
+ ## 4.0.0-beta.275
1049
+
1050
+ ## 4.0.0-beta.274
1051
+
1052
+ ## 4.0.0-beta.273
1053
+
1054
+ ### Patch Changes
1055
+
1056
+ - 664e83d: Add Atom-native Vue query APIs, stream query pull atoms, and a TanStack-backed legacy query engine toggle.
1057
+ - e4ff9a6: Fix the global `Array`/`ReadonlyArray.map` override breaking union-of-array receivers. The previous `this: NonEmptyArray`/`NonEmptyReadonlyArray` overload was selected-then-rejected on a union receiver (e.g. `(readonly A[] | readonly B[]).map(...)`), raising TS2684. Replaced with a single conditional-return signature (`this extends NonEmpty… ? NonEmpty<U> : U[]`) that preserves NonEmpty refinement without a `this` parameter, so union-array `.map` calls type-check again.
1058
+
1059
+ ## 4.0.0-beta.272
1060
+
1061
+ ### Patch Changes
1062
+
1063
+ - 21ac90a: Unify generated model facades on `OpaqueFacade` and support class facades through encoded-key schema transforms.
1064
+
1065
+ ## 4.0.0-beta.271
1066
+
1067
+ ### Patch Changes
1068
+
1069
+ - 939bebc: Remove the local `Config.nested` / `ConfigProvider.nested` overrides. They worked around an effect v3 bug where the nested namespace segment bypassed the provider's `mapInput`/`constantCase` transform. effect `4.0.0-beta.84` fixes this upstream (its transformation-compose refactor threads the nested prefix through the provider's lookup transform), and the old overrides relied on internals (`Config.make`, `provider.get`/`mapInput`/`prefix`) that no longer exist. Both modules now re-export effect directly; behaviour for consumers (e.g. `Config.nested("cups")` against a `constantCase` env provider) is unchanged and correct.
1070
+
1071
+ ## 4.0.0-beta.270
1072
+
1073
+ ### Patch Changes
1074
+
1075
+ - 78d076a: Update effect packages to `4.0.0-beta.84` (`effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/atom-vue`, `@effect/sql-sqlite-node`, `@effect/vitest`).
1076
+
1077
+ ## 4.0.0-beta.269
1078
+
1079
+ ### Patch Changes
1080
+
1081
+ - 50b022e: Harden model facades and add `OpaqueErrorFacadeClass`.
1082
+
1083
+ - `OpaqueErrorFacadeClass`: facade `TaggedErrorClass`/`ErrorClass` while keeping
1084
+ `Cause.YieldableError` on the constructed instance (so `yield* new Err()`,
1085
+ `Effect.fail`, and `instanceof` keep working through the facade).
1086
+ - `OpaqueFacadeInput` relaxed to require only the codec service channels, so
1087
+ transformed schemas (`.pipe(encodeKeys/annotate/filter/...)`) can be facaded;
1088
+ `fields`/`copy`/`mapFields` flow through `OpaqueFacadeStatics` when present, and
1089
+ `to` is carried so models that compose via `X.to.fields` keep working.
1090
+ - Dropped the wide `fields`/`mapFields` overrides on the facade interfaces so the
1091
+ precise statics win (keeps `Q.project(X.mapFields(...))` typed).
1092
+ - Codegen (`eslint-codegen-model`): resolver prefers the private `_X` over the
1093
+ self-referential facade; converges static service types in one run; per-model
1094
+ classification (facade Opaque models, leave `Class` standard in mixed files);
1095
+ `Make` emitted as `type X = {...} | void` when the make-input is voidable;
1096
+ `readonly`-prefixed array/tuple elements parenthesized; value self-references in
1097
+ the moved `_X` body rewritten to `_X`; instance getters surface on `Self`.
1098
+
1099
+ - 50b022e: Add generated opaque model facades that expose static Type, Encoded, Make, and Schema declarations without leaking the private struct schema type to downstream project references.
1100
+
1101
+ ## 4.0.0-beta.268
1102
+
1103
+ ### Patch Changes
1104
+
1105
+ - acfdc9e: Point development package exports at TypeScript sources while keeping published exports on compiled dist files.
1106
+
1107
+ ## 4.0.0-beta.267
1108
+
1109
+ ### Minor Changes
1110
+
1111
+ - 23a7167: Add a typed, serializable `DatabaseError { message, transient, cause }` for store adapter failures.
1112
+
1113
+ Store adapters wrapped DB calls in bare `Effect.promise` / `.orDie`, so a transient infra failure (request timeout, throttle, 5xx, dropped socket) became a raw-`Error` defect — which `Effect.retry` can't retry and which breaks JSON encoding of a workflow exit cause ("Expected JSON value, got Error"). `DatabaseError` is now exposed on all `Store` and `Repository` method error channels (writes: `OptimisticConcurrencyException | DatabaseError`) and added to `SupportedErrors` so the api/client/FE treat it as a 500-class error. Each adapter wraps its db-call failures into `DatabaseError` with a `transient` flag (timeout/throttle/5xx ⇒ retryable); the `cause` serializes via `Schema.Defect`. Construction/seed/DDL paths stay `orDie`.
1114
+
1115
+ ## 4.0.0-beta.266
1116
+
1117
+ ### Patch Changes
1118
+
1119
+ - bbaa67e: Fix `TS2589: Type instantiation is excessively deep and possibly infinite` when querying models that embed `Schema.Defect()` (or any field encoded as `Json`).
1120
+
1121
+ The query path type `Path<T>` (used by `Q.where`/`Q.and`/`Q.order` to type dotted field paths) recursed through object types with no termination for self-referential ones. Under effect `4.0.0-beta.83`, `Schema.Defect()` encodes as `Json`, whose `JsonObject = { readonly [x: string]: Json }` index signature made `Path` descend forever, blowing past TypeScript's instantiation limit on any model with such a field (e.g. carrier-error states carrying `raw: Schema.Defect()`).
1122
+
1123
+ `Path` now threads a `Seen` set of already-entered object types and stops before re-entering one, so self-referential types terminate (the field itself stays a valid leaf path; only the unbounded descent is cut). Finite models are unaffected.
1124
+
1125
+ ## 4.0.0-beta.265
1126
+
1127
+ ### Patch Changes
1128
+
1129
+ - 3e855bc: Update Effect packages to `4.0.0-beta.83` (from `beta.74`): `effect`, `@effect/platform-node`, `@effect/platform-browser`, `@effect/sql-sqlite-node`, `@effect/atom-vue`, `@effect/vitest`.
1130
+
1131
+ Adapt the infra workflow engines to beta.83 API changes:
1132
+
1133
+ - `Schema.Defect` is now a constructor function — use `S.Defect()` when building the deferred-exit codec (the bare constant no longer produces a usable schema and crashed `toType`).
1134
+ - `Workflow` exposes its name as `_tag` instead of `name`. `WorkflowEngineSqlite`/`WorkflowEngineCosmos` now key the registry, codec caches, and persisted `workflow_name` off `workflow._tag`, fixing crash-recovery (stale-lease re-drive previously registered under an `undefined` key and never matched).
1135
+
1136
+ ## 4.0.0-beta.264
1137
+
1138
+ ## 4.0.0-beta.263
1139
+
1140
+ ## 4.0.0-beta.262
1141
+
1142
+ ### Patch Changes
1143
+
1144
+ - 55c6572: update packages
1145
+
1146
+ ## 4.0.0-beta.261
1147
+
1148
+ ## 4.0.0-beta.260
1149
+
1150
+ ### Patch Changes
1151
+
1152
+ - bogus
1153
+
1154
+ ## 4.0.0-beta.259
1155
+
1156
+ ## 4.0.0-beta.258
1157
+
1158
+ ## 4.0.0-beta.257
1159
+
1160
+ ### Minor Changes
1161
+
1162
+ - e71eb78: Tighten typing of query DSL builders so field/path parameters are constrained to actual field paths instead of bare `string`:
1163
+
1164
+ - `relation(path)` now infers the relation's element type and constrains `distinctCount`/`sum`/`collect`/`collectDistinct`/`collectFields`/`collectDistinctFields` and the `unit` of `sumExprBy`/`sumExprNormalized` to `FieldPath<Element>`.
1165
+ - `relation(path).expr` exposes a scope-bound math-expression builder so `expr.field(...)` inside `sumExpr`/`sumExprBy`/`sumExprNormalized` is typed against the relation element.
1166
+ - Top-level `expr.field` accepts an optional generic for opt-in tightening (`expr.field<E>("x")`).
1167
+ - `aggregate(schema, build)` accepts a builder callback whose `agg` argument is bound to the source row inferred from the pipe — paths are checked without any explicit generic: `make<Row>().pipe(aggregate(schema, ($) => ({ city: $.field("address.city") })))`. Plain `AggregateMap` form still accepted.
1168
+ - `projectComputed(schema, build, mode?)` accepts a builder callback whose `{ relation }` argument is bound to the source row inferred from the pipe: `make<Row>().pipe(projectComputed(out, ({ relation }) => ({ total: relation("items").sum("qty") })))`. Plain `ComputedProjectionMap` form still accepted.
1169
+ - `agg<Row>()` factory remains as an escape hatch when the builder is built outside a pipe.
1170
+
1171
+ ## 4.0.0-beta.256
1172
+
1173
+ ### Patch Changes
1174
+
1175
+ - 347af48: Fix schema interface widening regression introduced in 4.0.0-beta.255 (changeset `olive-onions-lose`).
1176
+
1177
+ The original refactor annotated branded schema constants with interfaces extending `S.Codec<A, primitive> & WithDefaults<...>`. That widened the underlying `BrandedSchema<...>` chain and dropped phantom slots (`Iso`, `~type.make.in`, `~type.parameters`, `Rebuild`, etc.) that downstream combinators read. In consumer projects this surfaced as `DecodingServices` / `EncodingServices` leaking as `unknown` — for example `Q.project(schema, "project")` failing with `Type 'unknown' is not assignable to type 'never'`, and RPC handler / generator-return shape mismatches against `Effect<any, ..., CurrentSettings | ...>`.
1178
+
1179
+ Each `*Schema` interface now extends the concrete underlying chain (e.g. `BrandedSchema<S.NonEmptyString, NonEmptyString64>`) and adds a call signature for `withDefaultMake` (and an explicit `withConstructorDefault` field for the numeric and `StringId` schemas). The runtime values are unchanged and the type-display improvement is preserved.
1180
+
1181
+ Affected: `NonEmptyString*`, `Min3String255`, `StringId`, `Url`, `PositiveInt`, `NonNegativeInt`, `Int`, `PositiveNumber`, `NonNegativeNumber`, and `brandedStringId`.
1182
+
1183
+ ## 4.0.0-beta.255
1184
+
1185
+ ### Patch Changes
1186
+
1187
+ - 52a31dd: Reduce schema type complexity by exposing explicit interfaces for branded string and number schemas.
1188
+
1189
+ Each branded constant in `Schema/strings.ts`, `Schema/moreStrings.ts`, and `Schema/numbers.ts` now has a named interface (e.g. `NonEmptyStringSchema`, `StringIdSchema`, `PositiveIntSchema`, `UrlSchema`) annotating its `export const`. Mirrors the pattern used in `effect/Schema` itself — TypeScript reports the interface name instead of expanding the full pipe/brand/extension chain, which shrinks inferred types in consumer code and speeds up type display.
1190
+
1191
+ No runtime or API surface changes; `brandedStringId` now returns `BrandedStringIdSchema<Id>` (same shape as before, just named).
1192
+
1193
+ ## 4.0.0-beta.254
1194
+
1195
+ ### Patch Changes
1196
+
1197
+ - 29a1e57: Repository `changeFeed` is now namespace-aware. Events carry the `storeId` namespace as a third tuple element (`ChangeFeedEvent<T> = [items, op, namespace]`). `subscribe` accepts `options.namespace` to register a per-namespace handler; omitting it registers a wildcard handler that receives events from every namespace. Per-namespace handler buckets eliminate cross-namespace fan-out and avoid waking handlers for irrelevant tenants.
1198
+
1199
+ ## 4.0.0-beta.253
1200
+
1201
+ ### Patch Changes
1202
+
1203
+ - b90fa30: Repository `changeFeed` now broadcasts synchronously: `publish` awaits every subscribed handler before resolving. Replaces `PubSub.PubSub` with a `ChangeFeed<T>` interface (`publish` + scoped `subscribe`). Handlers are auto-removed when the subscriber's scope closes, and the full handler set is cleared when the repository's scope closes. Repository construction now requires `Scope` — wire `makeRepo` through `Layer.scoped` / `Effect.scoped`.
1204
+
1205
+ ## 4.0.0-beta.252
1206
+
1207
+ ### Patch Changes
1208
+
1209
+ - a788432: fix circular
1210
+
1211
+ ## 4.0.0-beta.251
1212
+
1213
+ ### Patch Changes
1214
+
1215
+ - 1c858d3: fix request scope problems
1216
+
1217
+ ## 4.0.0-beta.250
1218
+
1219
+ ### Patch Changes
1220
+
1221
+ - 3053760: fix: restore context map container behavior
1222
+
1223
+ ## 4.0.0-beta.249
1224
+
1225
+ ### Minor Changes
1226
+
1227
+ - ba789a2: Move core service contracts and runtime-agnostic modules into `effect-app`, keep `infra` and `vue` focused on adapters, and drop the temporary `infra` compatibility re-export paths in favor of the new canonical imports.
1228
+
1229
+ `@effect-app/infra` no longer re-exports moved core modules such as `./Model`, `./Emailer/service`, `./QueueMaker/service`, `./Store/service`, `./adapters/*`, or `./api/*` entrypoints.
1230
+
1231
+ ## 4.0.0-beta.248
1232
+
1233
+ ### Patch Changes
1234
+
1235
+ - 2a86a17: improve tsgo compat: avoid deferred `Schema.Type`/`Codec.Encoded`/`Codec.DecodingServices`/`Codec.EncodingServices` conditional helpers in generic positions where the type parameter is already constrained to `Schema.Top`. Index the property directly (`X["Type"]`, `X["Encoded"]`, `X["DecodingServices"]`, …) so tsgo doesn't leak `unknown` into `Effect` channels (notably `R`).
1236
+
1237
+ Sites: `client/clientFor.ts` (`RequestHandlerFor`, `FinalTypeOf`, `ExtractResponse`, `ExtractEResponse`), `client/makeClient.ts` (`InputFromPayload`, `OutputFromSuccess`, `InvalidationConfigForCommand`, `TaggedRequestWithMeta` overloads), `rpc/MiddlewareMaker.ts` (`Errors`), `rpc/RpcMiddleware.ts` (`Failure`, `FailureContext`), `Schema/ext.ts` (`ReadonlySetFromArray`, `ReadonlyMapFromArray`), `infra/routing.ts` (`GetSuccessShape`, handlers, route matcher), `vue/makeClient.ts` (`MutationExt.project`, `MutationWithExtensions`, `QueryProjection`), `vue/routeParams.ts` (`parseRouteParams*`).
1238
+
1239
+ ## 4.0.0-beta.247
1240
+
1241
+ ### Patch Changes
1242
+
1243
+ - 01bab22: Work around tsgo failing to reduce `S.Codec.DecodingServices<X>` (`X extends Top ? X["DecodingServices"] : never`) in generic positions, which left `unknown` and polluted the `R` channel of client handlers and RPC middleware failure context. Since the schemas involved are already constrained to `S.Top`, read `["DecodingServices"]` directly in `RequestHandlerFor`, `TagClass.FailureContext`, and the Vue `MutationExt` / `QueryProjection` types.
1244
+
1245
+ ## 4.0.0-beta.246
1246
+
1247
+ ## 4.0.0-beta.245
1248
+
1249
+ ## 4.0.0-beta.244
1250
+
1251
+ ### Patch Changes
1252
+
1253
+ - b8b9080: update packages
1254
+
1255
+ ## 4.0.0-beta.243
1256
+
1257
+ ## 4.0.0-beta.242
1258
+
1259
+ ### Patch Changes
1260
+
1261
+ - da83c1f: Align `InvalidationEntry` (vue) with `InvalidateQueryInstruction` (effect-app).
1262
+
1263
+ `InvalidateQueryInstruction` is now parametrized over `Filters` / `Options`
1264
+ (defaulting to `Record<string, unknown>` so the core stays framework-agnostic).
1265
+ `@effect-app/vue` exposes `InvalidationEntry` as a narrowed alias substituting
1266
+ `@tanstack/vue-query`'s `InvalidateQueryFilters` and `InvalidateOptions`. Single
1267
+ source of truth for the union shape across both packages.
1268
+
1269
+ - 21017d5: `InvalidationSet.add` accepts arrays and is exposed as a static shortcut.
1270
+
1271
+ - Single item: `yield* InvalidationSet.add(UserRsc.GetMe)`
1272
+ - Batch: `yield* InvalidationSet.add([UserRsc.GetMe, ["custom", "key"]])`
1273
+ - Skips the `.use(_ => _.add(...))` boilerplate.
1274
+
1275
+ Existing `InvalidationSet.use(_ => _.add(...))` form still works; the service
1276
+ identity is preserved via `Object.assign` so `Effect.provideService` and
1277
+ `.use` / `.useSync` continue to operate on the same `Context.Reference`.
1278
+
1279
+ - 2495ace: `InvalidationSet.add` accepts RPC handler shorthand.
1280
+
1281
+ Server-side handlers may now pass an RPC handler object directly to
1282
+ `InvalidationSet.add`; its query key is derived via `makeQueryKey`. Raw
1283
+ `InvalidationKey` arrays continue to work.
1284
+
1285
+ ```ts
1286
+ // before
1287
+ yield *
1288
+ Invalidation.InvalidationSet.use((_) => _.add(makeQueryKey(UserRsc.GetMe)));
1289
+
1290
+ // after
1291
+ yield * Invalidation.InvalidationSet.use((_) => _.add(UserRsc.GetMe));
1292
+ ```
1293
+
1294
+ ## 4.0.0-beta.241
1295
+
1296
+ ### Patch Changes
1297
+
1298
+ - b035b1c: Isolate per-call `Effect.provide(layers)` / `Stream.provide(layers)` in the
1299
+ RPC api client factory via `{ local: true }`.
1300
+
1301
+ `layers` here is built per RPC invocation from a caller-supplied
1302
+ `requestLevelLayers` plus a fresh `RequestName` layer. Today both pieces are
1303
+ stateless, so no observable bug — but `Effect.provide(layer)` without
1304
+ `local: true` resolves its `MemoMap` from the ambient fiber context, and on a
1305
+ long-lived runtime (browser app, server fiber) any stateful layer slipped into
1306
+ `requestLevelLayers` by a caller would be memoized and shared across every
1307
+ subsequent RPC call. `{ local: true }` builds the layer fresh per call and
1308
+ skips the ambient MemoMap entirely.
1309
+
1310
+ Also documents the rule in `AGENTS.md` ("Per-request `Effect.provide(layer)`
1311
+ must isolate its MemoMap") so the pattern is enforceable in code review and
1312
+ caught early. Companion to the `provideOnRequestScope` MemoMap fix in
1313
+ `@effect-app/infra`.
1314
+
1315
+ ## 4.0.0-beta.240
1316
+
1317
+ ## 4.0.0-beta.239
1318
+
1319
+ ## 4.0.0-beta.238
1320
+
1321
+ ## 4.0.0-beta.237
1322
+
1323
+ ## 4.0.0-beta.236
1324
+
1325
+ ## 4.0.0-beta.235
1326
+
1327
+ ### Patch Changes
1328
+
1329
+ - ba4bdc3: improve: support .ts extension
1330
+ - 6cfd83d: update effect to latest beta
1331
+
1332
+ ## 4.0.0-beta.234
1333
+
1334
+ ## 4.0.0-beta.233
1335
+
1336
+ ### Patch Changes
1337
+
1338
+ - 57a1862: Update to effect 4.0.0-beta.67. Switch deps from `pkg.pr.new` snapshot back to npm beta tag.
1339
+
1340
+ ## 4.0.0-beta.232
1341
+
1342
+ ### Patch Changes
1343
+
1344
+ - 0263827: Fix `Date` / `DateValid` default helpers to pipe from their own schema.
1345
+
1346
+ `withConstructorDefault` and `withDecodingDefaultType` on `DateValid` previously piped from `DateFromString`, dropping the `isDateValid()` check (and, after the recent identifier split, the `DateValid` annotations) from the resulting defaulted schema. Both `Date` and `DateValid` now use `extendM` so the helpers attach to the underlying schema (`DateFromString` / `DateValidFromString`).
1347
+
1348
+ - 0263827: Distinguish `Date` and `DateValid` in JSON Schema output.
1349
+
1350
+ - `Date` now emits identifier `DateOrInvalid` with description noting the value may be invalid.
1351
+ - `DateValid` now emits its own annotated string (identifier `Date`) with description stating a valid ISO 8601 date is required.
1352
+
1353
+ - 0263827: Update to effect `pkg.pr.new` snapshot at `a42ef66` (4.0.0-beta.66). Remove `Yieldable` and `asEffect()` (service tags are now `Effect` directly).
1354
+
1355
+ ## 4.0.0-beta.231
1356
+
1357
+ ### Patch Changes
1358
+
1359
+ - 7ca66ce: Update to effect 4.0.0-beta.66. Remove `Yieldable` and `asEffect()` (service tags are now `Effect` directly).
1360
+
1361
+ ## 4.0.0-beta.230
1362
+
1363
+ ## 4.0.0-beta.229
1364
+
1365
+ ## 4.0.0-beta.228
1366
+
1367
+ ## 4.0.0-beta.227
1368
+
1369
+ ## 4.0.0-beta.226
1370
+
1371
+ ## 4.0.0-beta.225
1372
+
1373
+ ## 4.0.0-beta.224
1374
+
1375
+ ## 4.0.0-beta.223
1376
+
1377
+ ## 4.0.0-beta.222
1378
+
1379
+ ## 4.0.0-beta.221
1380
+
1381
+ ### Patch Changes
1382
+
1383
+ - 439cbeb: Adopt module system from effect-smol: replace barrel imports with specific submodule imports (`import * as X from "effect-app/X"` / `import * as X from "effect/X"`).
1384
+
1385
+ ## 4.0.0-beta.220
1386
+
1387
+ ## 4.0.0-beta.219
1388
+
1389
+ ### Patch Changes
1390
+
1391
+ - d738811: remove double prefix
1392
+
1393
+ ## 4.0.0-beta.218
1394
+
1395
+ ## 4.0.0-beta.217
1396
+
1397
+ ### Patch Changes
1398
+
1399
+ - 0e824ef: add missing Brand
1400
+
1401
+ ## 4.0.0-beta.216
1402
+
1403
+ ## 4.0.0-beta.215
1404
+
1405
+ ## 4.0.0-beta.214
1406
+
1407
+ ## 4.0.0-beta.213
1408
+
1409
+ ## 4.0.0-beta.212
1410
+
1411
+ ### Patch Changes
1412
+
1413
+ - 8792221: Rename `withDefault` schema extensions to `withConstructorDefault` for clarity.
1414
+
1415
+ Document that `.withConstructorDefault` is **construction-only** (applied during `.make(...)` when a field is omitted) and is **not** applied during decode — it cannot be used to JIT-migrate database fields. Per-property JSDoc on every `.withConstructorDefault` / `.withDecodingDefaultType` exposed by `Schema/ext.ts`, `Schema/numbers.ts`, `Schema/moreStrings.ts`, and `ids.ts` so the caveat is visible on hover.
1416
+
1417
+ Re-export `withConstructorDefault`, `withDecodingDefault`, `withDecodingDefaultKey`, `withDecodingDefaultType`, and `withDecodingDefaultTypeKey` from `effect-app/Schema` with explicit JSDoc. `withDecodingDefault*` is discouraged for persisted data: a missing field may be data corruption rather than an old-shape document, and silently substituting a default hides the problem. Prefer an explicit, preferably versioned migration of database data over decode-time fallbacks.
1418
+
1419
+ ## 4.0.0-beta.211
1420
+
1421
+ ## 4.0.0-beta.210
1422
+
1423
+ ## 4.0.0-beta.209
1424
+
1425
+ ### Patch Changes
1426
+
1427
+ - c991be1: update packages
1428
+ - 3bae238: Remove lodash type imports from utils.ts, replacing with native TypeScript equivalents.
1429
+
1430
+ ## 4.0.0-beta.208
1431
+
1432
+ ## 4.0.0-beta.207
1433
+
1434
+ ### Patch Changes
1435
+
1436
+ - 8fffc3c: cleanup
1437
+
1438
+ ## 4.0.0-beta.206
1439
+
1440
+ ### Patch Changes
1441
+
1442
+ - 54bfc59: Require middleware to flow through `makeRpcClient` and the live layer through `makeRouter`.
1443
+
1444
+ ### `makeRpcClient(middleware, generalErrors?)`
1445
+
1446
+ Signature drops the `rcs` (request-context map wrapper) parameter. `rcs` was only load-bearing on the type side for `RequestConfig` inference; that information is now derived from `middleware.requestContextMap`. `middleware` is required — the previous "rcs + optional middleware" overload is gone.
1447
+
1448
+ **Migration**:
1449
+
1450
+ ```diff
1451
+ -makeRpcClient(RequestContextMap, undefined, AppMiddleware)
1452
+ +makeRpcClient(AppMiddleware)
1453
+ ```
1454
+
1455
+ For tests/clients without a real middleware, build a minimal stub (`{ requestContextMap, requestContext }`) or pass any value satisfying `ClientMiddleware<RCM>`.
1456
+
1457
+ ### `makeRouter(middlewareLive)`
1458
+
1459
+ `makeRouter()` no longer infers the live middleware layer from `meta.middleware.Default`. The Live layer is now passed explicitly to `makeRouter`, and the request classes only carry the middleware tag (schema-only). This decouples the router from any assumption that the middleware tag exposes a `Default` static.
1460
+
1461
+ **Migration**:
1462
+
1463
+ ```diff
1464
+ -export const { Router, matchAll } = makeRouter()
1465
+ +export const { Router, matchAll } = makeRouter(AppMiddleware.Default)
1466
+ ```
1467
+
1468
+ ## 4.0.0-beta.205
1469
+
1470
+ ### Patch Changes
1471
+
1472
+ - f313973: fix type make interface
1473
+
1474
+ ## 4.0.0-beta.204
1475
+
1476
+ ### Patch Changes
1477
+
1478
+ - 0a0030f: fix missing overloads
1479
+
1480
+ ## 4.0.0-beta.203
1481
+
1482
+ ### Patch Changes
1483
+
1484
+ - 992d9fa: fix more branded types
1485
+
1486
+ ## 4.0.0-beta.202
1487
+
1488
+ ### Patch Changes
1489
+
1490
+ - 1186b09: improve branded types, keep types through Rebuild
1491
+
1492
+ ## 4.0.0-beta.201
1493
+
1494
+ ### Patch Changes
1495
+
1496
+ - d67d17a: Source middleware errors exclusively from the rpc middleware tag, and move command/stream invalidation wrap/unwrap entirely into the routing layer (server) and `apiClientFactory` (client). `InvalidationMiddleware` and `InvalidationMiddlewareLive` are removed.
1497
+
1498
+ ### Resource error schemas
1499
+
1500
+ Three sites that used to fold `RequestContextMap[*].error` into a request's own error schema now stop doing so:
1501
+
1502
+ - `makeRpcClient` / `makeRequestClass` — `failureSchema` is just `config.error` (still merged with the optional `generalErrors` parameter, which is the only remaining error mix on both type and runtime levels).
1503
+ - `MiddlewareMaker.rpc()` — `error: options.error` only; the previous union with `rcm.config[*].error` is gone.
1504
+ - Routing and `apiClientFactory.makeRpcGroupFromRequestsAndModuleName` — `Invalidation.makeCommandRpc` is called with `error: resource.error` (no widening with the composite middleware error union).
1505
+
1506
+ Middleware errors reach the client through the rpc's `middlewares[*].error` failure-union channel of `Rpc.exitSchema`, exposed by attaching the middleware tag to the rpc on both sides:
1507
+
1508
+ - **Server**: `makeRouter(middleware)` attaches the live composite tag (existing behavior).
1509
+ - **Client**: new `middleware` option on `ClientForOptions` / `ApiClientFactory.makeFor(layer, { middleware })` attaches the same tag schema-only (no Live invoked). Threaded through `makeRpcGroupFromRequestsAndModuleName` to `RpcGroup.middleware(tag)`. Without it, stream rpcs (whose top-level `errorSchema` is forced to `Never` by effect-rpc) hit `SchemaError: Expected never | { _tag: "error", ... }` decoding middleware-thrown errors that bypass the in-stream `Stream.catch` wrap.
1510
+
1511
+ **Migration**: handlers that yield errors previously sourced from rcm (e.g. `yield* new UnauthorizedError()`) now require those errors to be declared explicitly on the resource — `Req.Query<T>()("...", fields, { success, error: UnauthorizedError })`. The handler error type no longer auto-includes the rcm union.
1512
+
1513
+ ### Invalidation wrap/unwrap
1514
+
1515
+ - `routing.ts` (server) provides a per-request `InvalidationSet` for commands, wraps the success value as `CommandResponseWithMetaData`, and converts handler-thrown failures into `CommandFailureWithMetaData` so accumulated invalidation keys reach the client on either path. Stream wrap (per-chunk envelope + final `done` chunk) was already in routing and is unchanged.
1516
+ - `apiClientFactory.ts` (client) `unwrapCommand` strips both envelopes and forwards keys to `InvalidationKeysFromServer`.
1517
+ - `InvalidationMiddleware` (the tag) and `InvalidationMiddlewareLive` (the layer) are **removed**. The middleware was the previous home of the wrap; with the wrap moved to routing/apiClientFactory, the middleware became a thin pass-through and is no longer needed. `DefaultGenericMiddlewares` and `DefaultGenericMiddlewaresLive` shrink accordingly — no migration needed for callers that used the defaults; callers that referenced `InvalidationMiddleware` / `InvalidationMiddlewareLive` directly should drop those imports.
1518
+
1519
+ Middleware-thrown errors are never wrapped: by definition the handler never ran, so there is nothing to invalidate. They flow raw on the Cause and the client decodes them via the middleware-tag failure-union channel described above.
1520
+
1521
+ ## 4.0.0-beta.200
1522
+
1523
+ ### Patch Changes
1524
+
1525
+ - 8f1cf6a: able to configure schema concurrency
1526
+ - 0cff7c1: workaround middleware error issue
1527
+
1528
+ ## 4.0.0-beta.199
1529
+
1530
+ ## 4.0.0-beta.198
1531
+
1532
+ ### Patch Changes
1533
+
1534
+ - 32dbc54: fix stream type when no success specified
1535
+
1536
+ ## 4.0.0-beta.197
1537
+
1538
+ ### Minor Changes
1539
+
1540
+ - 3dc0d2a: Add streaming as a `stream: true` config option on `Query` / `Command` instead of a separate request type.
1541
+
1542
+ `TaggedRequestFor` now exposes only `Query` and `Command` factories — the standalone `Stream` factory is removed. To produce a Stream of `success` values, pass `stream: true` in the request config. The request `type` field stays `"command" | "query"`; a new `stream: boolean` field carries the streaming flag (stripped from the stored handler config).
1543
+
1544
+ ```ts
1545
+ // Query that streams results
1546
+ Req.Query<T>()("Tag", {}, { stream: true, success: ... })
1547
+
1548
+ // Command that streams results
1549
+ Req.Command<T>()("Tag", {}, { stream: true, success: ... })
1550
+ ```
1551
+
1552
+ Vue client mapping (per-handler properties mirror the non-stream API — `.query`, `.fn`, `.mutate`):
1553
+
1554
+ - `query` + `stream: true` → exposes `.query` (read-only streaming, tracked Vue Query). Helper map key: `${name}Query`.
1555
+ - `command` + `stream: true` → exposes `.fn` and `.mutate` (mutating streaming).
1556
+ - Plain `query` / `command` unchanged.
1557
+
1558
+ Server routing dispatches via the new `stream` flag (`makeStreamRpc` for streaming commands/queries, `makeCommandRpc` / `Rpc.make` otherwise).
1559
+
1560
+ Also lifts the `Struct` / `TaggedStruct` and `Opaque` definitions in `effect-app/Schema` to use `S.Bottom` / `S.Opaque` directly, exposing `fields`, `mapFields`, and a `MakeIn` that allows `void` when all fields are optional. `TaggedRequestFor` request classes now use `Opaque(TaggedStruct(...))` instead of `TaggedClass`, and decoding/encoding services are derived from `success` / `error` rather than stored on the request.
1561
+
1562
+ **Migration**: replace `Req.Stream` with `Req.Query` or `Req.Command` and add `stream: true` to the config — `Query` for read-only streams, `Command` for mutating streams.
1563
+
1564
+ ## 4.0.0-beta.196
1565
+
1566
+ ## 4.0.0-beta.195
1567
+
1568
+ ### Patch Changes
1569
+
1570
+ - 774a9b3: `MiddlewareMaker.makeMiddlewareBasic` now derives each middleware's effective error from both the static `error` field on the tag AND the `rcm` config entry referenced by `dynamic.key`, rather than relying on the static field alone.
1571
+
1572
+ Middlewares declared with `dynamic: RequestContextMap.get("foo")` (instead of an explicit static `error: ...`) end up with `tag.error = Schema.Never` at runtime — `RpcMiddleware.Tag` defaults the static error to `Never` when not provided. The composite `MiddlewareMaker.Tag(...).middleware(...)` walked `make[*].error` to build its own error union, collapsing to `Union<Never, ...> ≡ Never`.
1573
+
1574
+ `Rpc.exitSchema` walks `rpc.middlewares[*].error` when building the wire-level failure union for every rpc kind. Empty-union meant middleware-thrown errors (`NotLoggedInError`, `UnauthorizedError`, etc.) never reached the wire schema. Query/command happened to work because their wire `errorSchema = resource.error` already covered the merge from `makeRpcClient`. Stream rpcs have `errorSchema` force-set to `Schema.Never` by effect-rpc, so the resource-level merge never reached the wire — middleware errors decoded as "Expected never, got X".
1575
+
1576
+ Per middleware, the new logic pushes both the static `_.error` (if non-`Never`) and `rcm[_.dynamic.key].error` (if non-`Never`) into the composite's failure union.
1577
+
1578
+ ## 4.0.0-beta.194
1579
+
1580
+ ## 4.0.0-beta.193
1581
+
1582
+ ## 4.0.0-beta.192
1583
+
1584
+ ## 4.0.0-beta.191
1585
+
1586
+ ### Patch Changes
1587
+
1588
+ - 50ce7e6: Replace typescript-eslint with oxlint-tsgolint for type-aware lint. Drop ESLint entirely from non-vue packages (cli, effect-app, infra) — they now use only `oxlint --type-aware`. Vue packages keep ESLint to run `@effect-app/no-await-effect` (no tsgolint equivalent) via `@typescript-eslint/parser` + `vue-eslint-parser`.
1589
+
1590
+ ## 4.0.0-beta.190
1591
+
1592
+ ### Patch Changes
1593
+
1594
+ - 985176b: Align request handler input typing with the request's `make` signature. Handlers are now classified as no-input only when the request schema declares no payload fields; any payload (even fully-optional) yields a function handler whose input matches `make`'s first parameter. Adds `HandlerInput<I>` and threads it through `CommandFromRequest`.
1595
+
1596
+ ## 4.0.0-beta.189
1597
+
1598
+ ### Patch Changes
1599
+
1600
+ - ea32222: Update to effect 4.0.0-beta.60 and use native `Rpc.custom` constructors (`makeCommandRpc`, `makeStreamRpc`) for metadata-wrapped RPC schemas instead of manually wrapping/unwrapping schemas inline.
1601
+
1602
+ ## 4.0.0-beta.188
1603
+
1604
+ ### Patch Changes
1605
+
1606
+ - b2e438f: Remove Operations service and repo
1607
+
1608
+ ## 4.0.0-beta.187
1609
+
1610
+ ### Patch Changes
1611
+
1612
+ - 0d4e0b8: Fix `isGeneratorFunction` using `isObject` instead of `isFunction`: generator functions have `typeof === "function"`, not `"object"`, so the check always returned `false`. This caused `Command.streamFn` generator-form handlers to silently pass a raw `Generator` object rather than an `Effect<Stream>`, meaning the mutation was never executed.
1613
+
1614
+ ## 4.0.0-beta.186
1615
+
1616
+ ## 4.0.0-beta.185
1617
+
1618
+ ## 4.0.0-beta.184
1619
+
1620
+ ## 4.0.0-beta.183
1621
+
1622
+ ## 4.0.0-beta.182
1623
+
1624
+ ## 4.0.0-beta.181
1625
+
1626
+ ### Patch Changes
1627
+
1628
+ - 583393f: Default the stream `mutateStream` execute resolved value to the request's success type when no `final` schema is declared.
1629
+
1630
+ Previously the type defaulted to `void`, but the runtime already resolves with the last emitted value. Types now match runtime behaviour: `execute` returns `Final` if a `final` schema is set, otherwise the success type.
1631
+
1632
+ ## 4.0.0-beta.180
1633
+
1634
+ ### Minor Changes
1635
+
1636
+ - 7fa3045: V1/V2/V3: stream and command requests carry invalidation metadata
1637
+
1638
+ **V1** – stream final response includes metadata
1639
+
1640
+ - `Invalidation.StreamResponseChunk` wraps each stream item as `{ _tag: "value", value }` and appends `{ _tag: "done", metadata }` at the end carrying all accumulated invalidation keys.
1641
+
1642
+ **V2** – invalidation keys included in failures
1643
+
1644
+ - `Invalidation.CommandFailureWithMetaData` and `Invalidation.StreamFailureChunk` carry keys accumulated up to the point of failure, so clients can invalidate queries even when a command or stream errors.
1645
+ - `InvalidationMiddlewareLive` wraps command failures; `routing.ts` wraps stream failures.
1646
+ - `apiClientFactory.ts` unwraps both on the client side, forwarding keys before re-failing with the original error.
1647
+
1648
+ **V3** – mid-stream metadata chunks
1649
+
1650
+ - `Invalidation.StreamResponseChunk` now also includes `{ _tag: "metadata", metadata }` for mid-stream invalidation.
1651
+ - After each emitted value, the server drains accumulated keys and emits a "metadata" chunk if any keys were collected since the last drain (bucket reset via `InvalidationSet.drain`).
1652
+ - `apiClientFactory.ts` processes "metadata" chunks the same as "done" chunks, forwarding keys to `InvalidationKeysFromServer` immediately.
1653
+ - `makeInvalidationKeysService` accepts an optional `onAdded` callback that fires after each key addition, enabling `mutate.ts` to trigger query invalidation mid-stream without waiting for the stream to complete.
1654
+
1655
+ ## 4.0.0-beta.179
1656
+
1657
+ ### Minor Changes
1658
+
1659
+ - 828d264: Stream requests now support an optional `final` schema that models the final success type of the stream. When declared, `mutateStream`'s execute effect resolves with the last emitted value typed as `Final` instead of `void`.
1660
+
1661
+ ```ts
1662
+ class MyStream extends SomethingStream<MyStream>()(
1663
+ "MyStream",
1664
+ { id: S.String },
1665
+ {
1666
+ success: S.Union([OperationProgress, ExportComplete]),
1667
+ final: ExportComplete, // execute now resolves with ExportComplete
1668
+ }
1669
+ ) {}
1670
+ ```
1671
+
1672
+ ## 4.0.0-beta.178
1673
+
1674
+ ## 4.0.0-beta.177
1675
+
1676
+ ### Minor Changes
1677
+
1678
+ - 89d8b3a: Add Effect RPC `Stream` support to the wrapper.
1679
+
1680
+ - New `Stream` request constructor on `TaggedRequestFor` parallel to `Query`/`Command`. Emits resources with `type: "stream"`.
1681
+ - Server router (`@effect-app/infra` `routing.ts`) accepts stream resources whose handlers return a `Stream.Stream<A, E, R>` (or a function from input to one). Forwards `stream: true` to `Rpc.make` so `RpcSchema.Stream` wrapping is applied. Streams bypass `applyRequestTypeInterruptibility` and the `Effect.withSpan` wrapping (the RPC server adds its own span).
1682
+ - Client (`apiClientFactory.ts`) detects stream resources, forwards `stream: true` when constructing `RpcGroup`, and exposes the per-request `handler` as a `Stream.Stream` (via `Stream.unwrap` over the `ManagedRuntime` context) instead of an `Effect`. `Invalidation.CommandResponseWithMetaData` continues to apply only to commands.
1683
+ - New `RequestStreamHandler` / `RequestStreamHandlerWithInput` shapes in `clientFor.ts`; `RequestHandlers` dispatches on `type: "stream"`.
1684
+
1685
+ ## 4.0.0-beta.176
1686
+
1687
+ ### Patch Changes
1688
+
1689
+ - pass options
1690
+
1691
+ ## 4.0.0-beta.175
1692
+
1693
+ ## 4.0.0-beta.174
1694
+
1695
+ ### Minor Changes
1696
+
1697
+ - 821468d: Add server-driven cache invalidation via RPC response headers.
1698
+
1699
+ - `effect-app/rpc`: new `Invalidation` module with `InvalidationKey` / `InvalidationKeys` schemas, `Invalidates` annotation (for declaring static invalidation on Rpc definitions), `InvalidationSet` reference (request-scoped accumulator), and `makeInvalidationSet` helper.
1700
+ - `effect-app/middleware`: new `InvalidationMiddleware` RPC middleware tag; included in `DefaultGenericMiddlewares`.
1701
+ - `effect-app/client`: new `InvalidationKeys` module with `InvalidationKeysFromServer` reference and `makeInvalidationKeysService` helper; `apiClientFactory` now taps HTTP responses to read the `x-invalidate` header and forward keys to `InvalidationKeysFromServer`.
1702
+ - `@effect-app/infra`: new `InvalidationMiddlewareLive` RPC middleware implementation that owns the full lifecycle — creates a request-scoped `InvalidationSet` (backed by a `Ref`), pre-populates it from the `Invalidates` annotation, provides it to the handler, and after the handler completes registers an HTTP pre-response handler (via `appendPreResponseHandlerUnsafe`) to write the accumulated keys as an `x-invalidate` response header. No separate HTTP middleware is needed.
1703
+ - `@effect-app/vue`: `invalidateQueries` / `useMutation` now reads server-provided invalidation keys from `InvalidationKeysFromServer` after each mutation and applies them alongside the client-side invalidation.
1704
+
1705
+ ## 4.0.0-beta.173
1706
+
1707
+ ## 4.0.0-beta.172
1708
+
1709
+ ## 4.0.0-beta.171
1710
+
1711
+ ### Patch Changes
1712
+
1713
+ - d71d976: fix
1714
+
1715
+ ## 4.0.0-beta.170
1716
+
1717
+ ### Patch Changes
1718
+
1719
+ - 8f09f77: fix
1720
+
1721
+ ## 4.0.0-beta.169
1722
+
1723
+ ### Patch Changes
1724
+
1725
+ - 8ae8b53: input mess
1726
+
1727
+ ## 4.0.0-beta.168
1728
+
1729
+ ### Patch Changes
1730
+
1731
+ - 178480a: Fix request handler input classification to use request schema fields instead of `make` parameters, preventing defaulted/nullable input fields from being treated as no-input handlers.
1732
+
1733
+ ## 4.0.0-beta.167
1734
+
1735
+ ### Patch Changes
1736
+
1737
+ - 140e192: Relax invalidation resource value constraints to allow arbitrary values while preserving query-only filtering in invalidation handling.
1738
+
1739
+ ## 4.0.0-beta.166
1740
+
1741
+ ### Patch Changes
1742
+
1743
+ - dbcc53b: Refactor command invalidation typing: declare resources via `Command<Self, Resources>()`, pass `invalidatesQueries` as the optional 4th argument, and enforce exact `clientFor` invalidation resources when required.
1744
+
1745
+ ## 4.0.0-beta.165
1746
+
1747
+ ### Minor Changes
1748
+
1749
+ - f88ea34: Move `makeQueryKey` into `effect-app/client` and update Vue source and tests to import it from the shared client module. Vue still re-exports `makeQueryKey` from `src/lib` for compatibility.
1750
+
1751
+ ## 4.0.0-beta.164
1752
+
1753
+ ### Minor Changes
1754
+
1755
+ - 8cb3de4: Add command invalidation helpers that preserve query-only resource types and pass mutation input and `Exit` results into invalidation callbacks. Update Vue `clientFor` to merge request-level invalidation config with call-site invalidation and require matching invalidation resources.
1756
+
1757
+ ## 4.0.0-beta.163
1758
+
1759
+ ### Patch Changes
1760
+
1761
+ - b952f19: bye cruft
1762
+
1763
+ ## 4.0.0-beta.162
1764
+
1765
+ ### Patch Changes
1766
+
1767
+ - b52b424: restore annotations for now
1768
+
1769
+ ## 4.0.0-beta.161
1770
+
1771
+ ## 4.0.0-beta.160
1772
+
1773
+ ### Patch Changes
1774
+
1775
+ - 505bfa9: Add concurrent decode helper APIs and migrate decode callsites to use them.
1776
+
1777
+ - Add `withDefaultParseOptions` and keep `DefaultParseOptions` centralized.
1778
+ - Export `decodeEffectConcurrently` and `decodeUnknownEffectConcurrently` from Schema and SchemaParser modules.
1779
+ - Update repository, queue, client, form, and CLI decode paths to use concurrent decode helpers.
1780
+ - Keep schema constructors free of hardcoded parse concurrency overrides.
1781
+
1782
+ ## 4.0.0-beta.159
1783
+
1784
+ ### Patch Changes
1785
+
1786
+ - c1e73de:
1787
+
1788
+ ## 4.0.0-beta.158
1789
+
1790
+ ### Patch Changes
1791
+
1792
+ - 3c1f52d: improve: class strictness enabled by default again, allow `strict: false` as opt out for now.
1793
+ - 6ae3050: Preserve class annotation parseOptions in relaxed declaration struct decoding so custom parse options (including concurrency defaults) are applied consistently.
1794
+
1795
+ ## 4.0.0-beta.157
1796
+
1797
+ ### Patch Changes
1798
+
1799
+ - 6fff09c: unify encoded function for when you use encodedKeys
1800
+
1801
+ ## 4.0.0-beta.156
1802
+
1803
+ ## 4.0.0-beta.155
1804
+
1805
+ ### Patch Changes
1806
+
1807
+ - c215db8: align TaggedUnion with array arg
1808
+
1809
+ ## 4.0.0-beta.154
1810
+
1811
+ ## 4.0.0-beta.153
1812
+
1813
+ ## 4.0.0-beta.152
1814
+
1815
+ ## 4.0.0-beta.151
1816
+
1817
+ ## 4.0.0-beta.150
1818
+
1819
+ ### Patch Changes
1820
+
1821
+ - 85a8275: Expose `make`, `makeOption`, and `makeEffect` static helpers on request classes created via `Query`/`Command`.
1822
+
1823
+ ## 4.0.0-beta.149
1824
+
1825
+ ### Patch Changes
1826
+
1827
+ - f317c5e: Preserve omitted-input make helpers through Schema.Opaque when the wrapped schema allows optional or default-only constructor input.
1828
+
1829
+ ## 4.0.0-beta.148
1830
+
1831
+ ### Patch Changes
1832
+
1833
+ - 199e9a5: Allow Struct and TaggedStruct make helpers to omit input when every constructor field is optional or defaulted, and preserve widening copy typings through a lighter named public type to improve TypeScript editor responsiveness.
1834
+
1835
+ ## 4.0.0-beta.147
1836
+
1837
+ ### Patch Changes
1838
+
1839
+ - 47e3742: Preserve Struct.copy through `annotate`, `annotateKey`, and `mapFields` chains, and add tests covering chained copy behavior on Struct schemas.
1840
+
1841
+ ## 4.0.0-beta.146
1842
+
1843
+ ### Patch Changes
1844
+
1845
+ - a4dff57: Adjust Struct and TaggedStruct copy typing to follow class-style widening constraints while keeping structural copy runtime behavior.
1846
+
1847
+ ## 4.0.0-beta.145
1848
+
1849
+ ### Patch Changes
1850
+
1851
+ - 12abb55: Refine schema copy behavior by keeping class copy constructor-based while using structural copy for Struct and TaggedStruct helpers.
1852
+
1853
+ ## 4.0.0-beta.144
1854
+
1855
+ ### Patch Changes
1856
+
1857
+ - 11422f8: Update request helper typing and runtime invocation to rely on schema `.make` instead of class constructors, avoiding `new`-based assumptions for request schemas.
1858
+ - d31253f: Refactor eligible schema classes and tagged classes to Opaque schemas, and migrate constructor call sites to use `.make` for those models.
1859
+
1860
+ ## 4.0.0-beta.143
1861
+
1862
+ ### Patch Changes
1863
+
1864
+ - 79eb019: Remove redundant schema `title` annotations when they duplicate the schema `identifier`.
1865
+
1866
+ ## 4.0.0-beta.142
1867
+
1868
+ ### Minor Changes
1869
+
1870
+ - 025de47: Fold the encoded-override support from `ExtendedClass` and `ExtendedTaggedClass` into `Class`, `TaggedClass`, `ErrorClass`, and `TaggedErrorClass`, and update model codegen to detect the new second-generic form.
1871
+
1872
+ ### Patch Changes
1873
+
1874
+ - 3436d44: Extend `Schema.Opaque` in `effect-app/Schema` to support an optional encoded-type generic while preserving the original single-generic behavior.
1875
+
1876
+ ## 4.0.0-beta.141
1877
+
1878
+ ### Patch Changes
1879
+
1880
+ - 7c25dbb: Add relaxed wrapper support for `ErrorClass` and `TaggedErrorClass` in `effect-app/Schema`, matching the existing class wrapper behavior (`copy`, cached `ast`, and unbounded parse concurrency).
1881
+
1882
+ ## 4.0.0-beta.140
1883
+
1884
+ ## 4.0.0-beta.139
1885
+
1886
+ ## 4.0.0-beta.138
1887
+
1888
+ ## 4.0.0-beta.137
1889
+
1890
+ ## 4.0.0-beta.136
1891
+
1892
+ ## 4.0.0-beta.135
1893
+
1894
+ ### Patch Changes
1895
+
1896
+ - c7bbc41: fix - class should check type side
1897
+
1898
+ ## 4.0.0-beta.134
1899
+
1900
+ ### Patch Changes
1901
+
1902
+ - 9d3495e: Preserve field-level schema decode errors for relaxed Class and TaggedClass declarations so decode failures report nested constraints (for example min-length violations) instead of only a generic class-type mismatch.
1903
+ - f353d48: Rename the Class/TaggedClass relaxed declaration option to `strict` (default `false`) and apply it to `Class`, `TaggedClass`, `ExtendedClass`, and `ExtendedTaggedClass`.
1904
+
1905
+ When `strict: true`, class decoding keeps strict class-level declaration behavior; by default, decoding remains relaxed and preserves field-level schema errors.
1906
+
1907
+ ## 4.0.0-beta.133
1908
+
1909
+ ### Patch Changes
1910
+
1911
+ - c3299f7: update packages
1912
+
1913
+ ## 4.0.0-beta.132
1914
+
1915
+ ## 4.0.0-beta.131
1916
+
1917
+ ## 4.0.0-beta.130
1918
+
1919
+ ### Patch Changes
1920
+
1921
+ - ea1bd46: fix: prevent expansion of nominal brands
1922
+
1923
+ ## 4.0.0-beta.129
1924
+
1925
+ ## 4.0.0-beta.128
1926
+
1927
+ ### Patch Changes
1928
+
1929
+ - 57db551: Split `TaggedRequestFor` into `Query` and `Command` factories, and mark generated request classes with `type: "query" | "command"`.
1930
+
1931
+ Vue client helpers now expose query-only helpers (`query`, `suspense`, `fetch`) for query requests and mutation-only helpers (`mutate`, `fetch`) for command requests.
1932
+
1933
+ ## 4.0.0-beta.127
1934
+
1935
+ ## 4.0.0-beta.126
1936
+
1937
+ ### Patch Changes
1938
+
1939
+ - 458bb1b: fix type
1940
+
1941
+ ## 4.0.0-beta.125
1942
+
1943
+ ## 4.0.0-beta.124
1944
+
1945
+ ### Patch Changes
1946
+
1947
+ - 256ae85: cleanup
1948
+
1949
+ ## 4.0.0-beta.123
1950
+
1951
+ ### Patch Changes
1952
+
1953
+ - 14aba14: fix: clientFor
1954
+
1955
+ ## 4.0.0-beta.122
1956
+
1957
+ ### Patch Changes
1958
+
1959
+ - f052d38: Replace `(...) => Effect.gen` with `Effect.fnUntraced` in `apiClientFactory`.
1960
+
1961
+ ## 4.0.0-beta.121
1962
+
1963
+ ### Patch Changes
1964
+
1965
+ - 5ac46cb: Make `Schema.provide` dual (pipeable)
1966
+
1967
+ ## 4.0.0-beta.120
1968
+
1969
+ ### Minor Changes
1970
+
1971
+ - f21190c: Add `copy` property to `Class` and `TaggedClass` for creating modified instances with updated fields. The `copy` method is cached per-class and supports both object and function-based updates, with pipeline support.
1972
+
1973
+ ## 4.0.0-beta.119
1974
+
1975
+ ## 4.0.0-beta.118
1976
+
1977
+ ### Minor Changes
1978
+
1979
+ - 08d2e70: Add `concurrency: "unbounded"` parseOptions annotation to Schema constructors (Struct, Array, NonEmptyArray, Record, TaggedStruct, ReadonlySet, ReadonlyMap, Class, TaggedClass) so all encode/decode operations automatically run with unbounded concurrency. Also override `mapFields` on Struct and Class/TaggedClass to preserve the annotation.
1980
+
1981
+ ### Patch Changes
1982
+
1983
+ - bd26832: Add nested anyOf flattening to JSON Schema post-processing
1984
+ - Update effect packages to 4.0.0-beta.52
1985
+
1986
+ ## 4.0.0-beta.117
1987
+
1988
+ ## 4.0.0-beta.116
1989
+
1990
+ ## 4.0.0-beta.115
1991
+
1992
+ ## 4.0.0-beta.114
1993
+
1994
+ ## 4.0.0-beta.113
1995
+
1996
+ ## 4.0.0-beta.112
1997
+
1998
+ ## 4.0.0-beta.111
1999
+
2000
+ ### Patch Changes
2001
+
2002
+ - ca94edf: fix typo
2003
+
2004
+ ## 4.0.0-beta.110
2005
+
2006
+ ## 4.0.0-beta.109
2007
+
2008
+ ## 4.0.0-beta.108
2009
+
2010
+ ### Patch Changes
2011
+
2012
+ - 3e46e7b: allow excess props in openapi schemas
2013
+
2014
+ ## 4.0.0-beta.107
2015
+
2016
+ ## 4.0.0-beta.106
2017
+
2018
+ ## 4.0.0-beta.105
2019
+
2020
+ ## 4.0.0-beta.104
2021
+
2022
+ ### Minor Changes
2023
+
2024
+ - e944bca: Add `generateGuards` and `generateGuardsFor` to `TaggedUnion` / `ExtendTaggedUnion` for property-scoped type guards.
2025
+
2026
+ - `generateGuards("key")` — generic per-guard, no need to specify the container type
2027
+ - `generateGuardsFor<A>()("key")` — curried, fixes `A` for concrete guard signatures
2028
+
2029
+ Both return `{ is{Tag}, isAnyOf }` guards that narrow the container type by its tagged union property.
2030
+
2031
+ ## 4.0.0-beta.103
2032
+
2033
+ ### Minor Changes
2034
+
2035
+ - 7119320: Add `generateGuards` to `TaggedUnion` / `ExtendTaggedUnion` for generating property-scoped type guards.
2036
+
2037
+ Usage: `MyUnion.generateGuards<MyType>()("propertyKey")` returns `{ is{Tag}, isAnyOf }` guards that narrow the container type by its tagged union property.
2038
+
2039
+ ## 4.0.0-beta.102
2040
+
2041
+ ## 4.0.0-beta.101
2042
+
2043
+ ## 4.0.0-beta.100
2044
+
3
2045
  ## 4.0.0-beta.99
4
2046
 
5
2047
  ## 4.0.0-beta.98