@effect-app/infra 4.0.0-beta.99 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (486) hide show
  1. package/CHANGELOG.md +2884 -0
  2. package/_check.sh +1 -1
  3. package/dist/CUPS.d.ts +28 -9
  4. package/dist/CUPS.d.ts.map +1 -1
  5. package/dist/CUPS.js +35 -14
  6. package/dist/ClusterCosmos.d.ts +67 -0
  7. package/dist/ClusterCosmos.d.ts.map +1 -0
  8. package/dist/ClusterCosmos.js +588 -0
  9. package/dist/ClusterServiceBus.d.ts +67 -0
  10. package/dist/ClusterServiceBus.d.ts.map +1 -0
  11. package/dist/ClusterServiceBus.js +84 -0
  12. package/dist/{api/ContextProvider.d.ts → ContextProvider.d.ts} +7 -4
  13. package/dist/ContextProvider.d.ts.map +1 -0
  14. package/dist/ContextProvider.js +40 -0
  15. package/dist/Emailer/Sendgrid.d.ts +110 -146
  16. package/dist/Emailer/Sendgrid.d.ts.map +1 -1
  17. package/dist/Emailer/Sendgrid.js +24 -19
  18. package/dist/Emailer/fake.d.ts +1 -1
  19. package/dist/Emailer/fake.d.ts.map +1 -1
  20. package/dist/Emailer/fake.js +4 -4
  21. package/dist/MainFiberSet.d.ts +11 -7
  22. package/dist/MainFiberSet.d.ts.map +1 -1
  23. package/dist/MainFiberSet.js +22 -6
  24. package/dist/QueueMaker/errors.d.ts +3 -1
  25. package/dist/QueueMaker/errors.d.ts.map +1 -1
  26. package/dist/QueueMaker/errors.js +4 -2
  27. package/dist/{adapters/SQL → SQL}/Model.d.ts +34 -45
  28. package/dist/SQL/Model.d.ts.map +1 -0
  29. package/dist/SQL/Model.js +469 -0
  30. package/dist/SQL.d.ts.map +1 -0
  31. package/dist/{adapters/SQL.js → SQL.js} +1 -1
  32. package/dist/Store/Cosmos/query.d.ts +16 -4
  33. package/dist/Store/Cosmos/query.d.ts.map +1 -1
  34. package/dist/Store/Cosmos/query.js +238 -42
  35. package/dist/Store/Cosmos.d.ts +2 -2
  36. package/dist/Store/Cosmos.d.ts.map +1 -1
  37. package/dist/Store/Cosmos.js +394 -319
  38. package/dist/Store/Disk.d.ts +4 -4
  39. package/dist/Store/Disk.d.ts.map +1 -1
  40. package/dist/Store/Disk.js +91 -39
  41. package/dist/Store/Memory.d.ts +7 -10
  42. package/dist/Store/Memory.d.ts.map +1 -1
  43. package/dist/Store/Memory.js +348 -78
  44. package/dist/Store/SQL/Pg.d.ts +2 -2
  45. package/dist/Store/SQL/Pg.d.ts.map +1 -1
  46. package/dist/Store/SQL/Pg.js +229 -154
  47. package/dist/Store/SQL/query.d.ts +19 -3
  48. package/dist/Store/SQL/query.d.ts.map +1 -1
  49. package/dist/Store/SQL/query.js +306 -12
  50. package/dist/Store/SQL.d.ts +22 -5
  51. package/dist/Store/SQL.d.ts.map +1 -1
  52. package/dist/Store/SQL.js +369 -98
  53. package/dist/Store/codeFilter.d.ts +4 -4
  54. package/dist/Store/codeFilter.d.ts.map +1 -1
  55. package/dist/Store/codeFilter.js +71 -22
  56. package/dist/Store/index.d.ts +6 -4
  57. package/dist/Store/index.d.ts.map +1 -1
  58. package/dist/Store/index.js +9 -6
  59. package/dist/Store/jsonDocument.d.ts +67 -0
  60. package/dist/Store/jsonDocument.d.ts.map +1 -0
  61. package/dist/Store/jsonDocument.js +107 -0
  62. package/dist/Store/utils.d.ts +21 -2
  63. package/dist/Store/utils.d.ts.map +1 -1
  64. package/dist/Store/utils.js +253 -10
  65. package/dist/WorkflowEngineCosmos.d.ts +30 -0
  66. package/dist/WorkflowEngineCosmos.d.ts.map +1 -0
  67. package/dist/WorkflowEngineCosmos.js +542 -0
  68. package/dist/WorkflowEngineSqlite.d.ts +24 -0
  69. package/dist/WorkflowEngineSqlite.d.ts.map +1 -0
  70. package/dist/WorkflowEngineSqlite.js +550 -0
  71. package/dist/arbs.d.ts +6 -3
  72. package/dist/arbs.d.ts.map +1 -1
  73. package/dist/arbs.js +20 -4
  74. package/dist/codec.d.ts.map +1 -0
  75. package/dist/codec.js +5 -0
  76. package/dist/cosmos-client.d.ts +40 -0
  77. package/dist/cosmos-client.d.ts.map +1 -0
  78. package/dist/cosmos-client.js +41 -0
  79. package/dist/errorReporter.d.ts +6 -4
  80. package/dist/errorReporter.d.ts.map +1 -1
  81. package/dist/errorReporter.js +23 -27
  82. package/dist/fileUtil.d.ts +1 -1
  83. package/dist/fileUtil.d.ts.map +1 -1
  84. package/dist/fileUtil.js +2 -2
  85. package/dist/index.d.ts +2 -1
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +3 -2
  88. package/dist/internal/RequestContextMiddleware.d.ts +5 -0
  89. package/dist/internal/RequestContextMiddleware.d.ts.map +1 -0
  90. package/dist/internal/RequestContextMiddleware.js +45 -0
  91. package/dist/internal/auth.d.ts +53 -0
  92. package/dist/internal/auth.d.ts.map +1 -0
  93. package/dist/internal/auth.js +180 -0
  94. package/dist/internal/events.d.ts +11 -0
  95. package/dist/internal/events.d.ts.map +1 -0
  96. package/dist/internal/events.js +49 -0
  97. package/dist/{api/internal → internal}/health.d.ts +1 -1
  98. package/dist/internal/health.d.ts.map +1 -0
  99. package/dist/internal/health.js +5 -0
  100. package/dist/{api/layerUtils.d.ts → layerUtils.d.ts} +10 -2
  101. package/dist/layerUtils.d.ts.map +1 -0
  102. package/dist/layerUtils.js +17 -0
  103. package/dist/logger/jsonLogger.d.ts +1 -1
  104. package/dist/logger/jsonLogger.d.ts.map +1 -1
  105. package/dist/logger/jsonLogger.js +5 -3
  106. package/dist/logger/logFmtLogger.d.ts +1 -1
  107. package/dist/logger/logFmtLogger.d.ts.map +1 -1
  108. package/dist/logger/logFmtLogger.js +3 -3
  109. package/dist/logger/shared.d.ts +2 -2
  110. package/dist/logger/shared.d.ts.map +1 -1
  111. package/dist/logger/shared.js +6 -6
  112. package/dist/logger.d.ts.map +1 -1
  113. package/dist/middlewares.d.ts.map +1 -0
  114. package/dist/{api/middlewares.js → middlewares.js} +1 -1
  115. package/dist/{adapters/mongo-client.d.ts → mongo-client.d.ts} +2 -1
  116. package/dist/mongo-client.d.ts.map +1 -0
  117. package/dist/mongo-client.js +15 -0
  118. package/dist/otel.d.ts +75 -0
  119. package/dist/otel.d.ts.map +1 -0
  120. package/dist/otel.js +84 -0
  121. package/dist/rateLimit.d.ts +11 -3
  122. package/dist/rateLimit.d.ts.map +1 -1
  123. package/dist/rateLimit.js +7 -12
  124. package/dist/{adapters/redis-client.d.ts → redis-client.d.ts} +4 -1
  125. package/dist/redis-client.d.ts.map +1 -0
  126. package/dist/redis-client.js +98 -0
  127. package/dist/{api/reportError.d.ts → reportError.d.ts} +1 -1
  128. package/dist/reportError.d.ts.map +1 -0
  129. package/dist/reportError.js +28 -0
  130. package/dist/{api/routing → routing}/middleware/RouterMiddleware.d.ts +2 -1
  131. package/dist/routing/middleware/RouterMiddleware.d.ts.map +1 -0
  132. package/dist/{api/routing → routing}/middleware/RouterMiddleware.js +1 -1
  133. package/dist/{api/routing → routing}/middleware/middleware.d.ts +11 -6
  134. package/dist/routing/middleware/middleware.d.ts.map +1 -0
  135. package/dist/routing/middleware/middleware.js +152 -0
  136. package/dist/{api/routing → routing}/middleware.d.ts +0 -1
  137. package/dist/routing/middleware.d.ts.map +1 -0
  138. package/dist/{api/routing → routing}/middleware.js +1 -2
  139. package/dist/routing/schema/jwt.d.ts.map +1 -0
  140. package/dist/routing/schema/jwt.js +12 -0
  141. package/dist/routing/tsort.d.ts.map +1 -0
  142. package/dist/routing/tsort.js +51 -0
  143. package/dist/{api/routing → routing}/utils.d.ts +3 -3
  144. package/dist/routing/utils.d.ts.map +1 -0
  145. package/dist/routing/utils.js +45 -0
  146. package/dist/routing.d.ts +182 -0
  147. package/dist/routing.d.ts.map +1 -0
  148. package/dist/routing.js +256 -0
  149. package/dist/test.d.ts +2 -2
  150. package/dist/test.d.ts.map +1 -1
  151. package/dist/test.js +5 -5
  152. package/dist/util.d.ts.map +1 -0
  153. package/dist/util.js +14 -0
  154. package/docs/cluster-storage.md +26 -0
  155. package/docs/workflow-engine.md +262 -0
  156. package/examples/query.ts +23 -19
  157. package/package.json +36 -364
  158. package/src/CUPS.ts +53 -14
  159. package/src/ClusterCosmos.ts +1170 -0
  160. package/src/ClusterServiceBus.ts +244 -0
  161. package/src/{api/ContextProvider.ts → ContextProvider.ts} +10 -7
  162. package/src/Emailer/Sendgrid.ts +83 -60
  163. package/src/Emailer/fake.ts +4 -4
  164. package/src/MainFiberSet.ts +31 -12
  165. package/src/QueueMaker/errors.ts +3 -1
  166. package/src/{adapters/SQL → SQL}/Model.ts +48 -47
  167. package/src/SQL.ts +1 -0
  168. package/src/Store/Cosmos/query.ts +275 -55
  169. package/src/Store/Cosmos.ts +597 -511
  170. package/src/Store/Disk.ts +145 -71
  171. package/src/Store/Memory.ts +420 -115
  172. package/src/Store/SQL/Pg.ts +352 -268
  173. package/src/Store/SQL/query.ts +366 -20
  174. package/src/Store/SQL.ts +742 -293
  175. package/src/Store/codeFilter.ts +78 -28
  176. package/src/Store/index.ts +18 -13
  177. package/src/Store/jsonDocument.ts +143 -0
  178. package/src/Store/utils.ts +307 -30
  179. package/src/WorkflowEngineCosmos.ts +749 -0
  180. package/src/WorkflowEngineSqlite.ts +813 -0
  181. package/src/arbs.ts +25 -5
  182. package/src/cosmos-client.ts +72 -0
  183. package/src/errorReporter.ts +68 -78
  184. package/src/fileUtil.ts +1 -1
  185. package/src/index.ts +2 -1
  186. package/src/{api/internal → internal}/RequestContextMiddleware.ts +23 -6
  187. package/src/internal/auth.ts +272 -0
  188. package/src/{api/internal → internal}/events.ts +18 -9
  189. package/src/{api/layerUtils.ts → layerUtils.ts} +7 -3
  190. package/src/logger/jsonLogger.ts +5 -3
  191. package/src/logger/logFmtLogger.ts +3 -3
  192. package/src/logger/shared.ts +6 -5
  193. package/src/middlewares.ts +10 -0
  194. package/src/{adapters/mongo-client.ts → mongo-client.ts} +3 -1
  195. package/src/otel.ts +177 -0
  196. package/src/rateLimit.ts +35 -24
  197. package/src/{adapters/redis-client.ts → redis-client.ts} +6 -2
  198. package/src/{api/reportError.ts → reportError.ts} +3 -2
  199. package/src/{api/routing → routing}/middleware/RouterMiddleware.ts +2 -1
  200. package/src/{api/routing → routing}/middleware/middleware.ts +75 -50
  201. package/src/routing/middleware.ts +4 -0
  202. package/src/{api/routing → routing}/schema/jwt.ts +2 -2
  203. package/src/{api/routing → routing}/utils.ts +2 -1
  204. package/src/routing.ts +823 -0
  205. package/src/test.ts +6 -6
  206. package/src/vitest.ts +1 -1
  207. package/test/arbs-magnitude.test.ts +33 -0
  208. package/test/arbs.test.ts +41 -0
  209. package/test/auth.test.ts +101 -0
  210. package/test/cluster-cosmos.test.ts +634 -0
  211. package/test/cluster-servicebus.test.ts +180 -0
  212. package/test/cluster-sqlite.test.ts +207 -0
  213. package/test/contextProvider.test.ts +11 -8
  214. package/test/controller.test.ts +23 -28
  215. package/test/cosmos-container-throughput.test.ts +80 -0
  216. package/test/cosmos-query.test.ts +368 -0
  217. package/test/dist/arbs-magnitude.test.d.ts.map +1 -0
  218. package/test/dist/arbs.test.d.ts.map +1 -0
  219. package/test/dist/auth.test.d.ts.map +1 -0
  220. package/test/dist/cluster-cosmos.test.d.ts.map +1 -0
  221. package/test/dist/cluster-servicebus.test.d.ts.map +1 -0
  222. package/test/dist/cluster-sqlite.test.d.ts.map +1 -0
  223. package/test/dist/contextProvider.test.d.ts.map +1 -1
  224. package/test/dist/controller.test.d.ts.map +1 -1
  225. package/test/dist/cosmos-container-throughput.test.d.ts.map +1 -0
  226. package/test/dist/cosmos-query.test.d.ts.map +1 -0
  227. package/test/dist/fixtures.d.ts +17 -9
  228. package/test/dist/fixtures.d.ts.map +1 -1
  229. package/test/dist/fixtures.js +8 -3
  230. package/test/dist/json-lower.test.d.ts.map +1 -0
  231. package/test/dist/query.test.d.ts.map +1 -1
  232. package/test/dist/rawQuery.test.d.ts.map +1 -1
  233. package/test/dist/repository-ext.test.d.ts.map +1 -0
  234. package/test/dist/repository-legacy-document.test.d.ts.map +1 -0
  235. package/test/dist/requires.test.d.ts.map +1 -1
  236. package/test/dist/router-generator.test.d.ts.map +1 -0
  237. package/test/dist/routing-interruptibility.test.d.ts.map +1 -0
  238. package/test/dist/rpc-context-map-streaming.test.d.ts.map +1 -0
  239. package/test/dist/rpc-e2e-invalidation.test.d.ts.map +1 -0
  240. package/test/dist/rpc-multi-middleware.test.d.ts.map +1 -1
  241. package/test/dist/rpc-stream-fullstack.test.d.ts.map +1 -0
  242. package/test/dist/workflow-engine-cosmos.test.d.ts.map +1 -0
  243. package/test/dist/workflow-engine-sqlite.test.d.ts.map +1 -0
  244. package/test/fixtures.ts +7 -2
  245. package/test/json-lower.test.ts +129 -0
  246. package/test/layerUtils.test.ts +2 -2
  247. package/test/query.test.ts +1232 -42
  248. package/test/rawQuery.test.ts +432 -7
  249. package/test/repository-ext.test.ts +456 -0
  250. package/test/repository-legacy-document.test.ts +394 -0
  251. package/test/requires.test.ts +7 -3
  252. package/test/router-generator.test.ts +187 -0
  253. package/test/routing-interruptibility.test.ts +66 -0
  254. package/test/rpc-context-map-streaming.test.ts +265 -0
  255. package/test/rpc-e2e-invalidation.test.ts +421 -0
  256. package/test/rpc-multi-middleware.test.ts +17 -11
  257. package/test/rpc-stream-fullstack.test.ts +307 -0
  258. package/test/sql-store.test.ts +1202 -47
  259. package/test/validateSample.test.ts +70 -42
  260. package/test/workflow-engine-cosmos.test.ts +345 -0
  261. package/test/workflow-engine-sqlite.test.ts +297 -0
  262. package/tsconfig.examples.json +1 -1
  263. package/tsconfig.json +9 -1
  264. package/tsconfig.src.json +35 -35
  265. package/tsconfig.test.json +2 -2
  266. package/dist/Emailer/service.d.ts +0 -55
  267. package/dist/Emailer/service.d.ts.map +0 -1
  268. package/dist/Emailer/service.js +0 -6
  269. package/dist/Emailer.d.ts +0 -2
  270. package/dist/Emailer.d.ts.map +0 -1
  271. package/dist/Emailer.js +0 -2
  272. package/dist/Model/Repository/ext.d.ts +0 -41
  273. package/dist/Model/Repository/ext.d.ts.map +0 -1
  274. package/dist/Model/Repository/ext.js +0 -65
  275. package/dist/Model/Repository/internal/internal.d.ts +0 -59
  276. package/dist/Model/Repository/internal/internal.d.ts.map +0 -1
  277. package/dist/Model/Repository/internal/internal.js +0 -320
  278. package/dist/Model/Repository/legacy.d.ts +0 -19
  279. package/dist/Model/Repository/legacy.d.ts.map +0 -1
  280. package/dist/Model/Repository/legacy.js +0 -2
  281. package/dist/Model/Repository/makeRepo.d.ts +0 -49
  282. package/dist/Model/Repository/makeRepo.d.ts.map +0 -1
  283. package/dist/Model/Repository/makeRepo.js +0 -24
  284. package/dist/Model/Repository/service.d.ts +0 -89
  285. package/dist/Model/Repository/service.d.ts.map +0 -1
  286. package/dist/Model/Repository/service.js +0 -2
  287. package/dist/Model/Repository/validation.d.ts +0 -43
  288. package/dist/Model/Repository/validation.d.ts.map +0 -1
  289. package/dist/Model/Repository/validation.js +0 -32
  290. package/dist/Model/Repository.d.ts +0 -6
  291. package/dist/Model/Repository.d.ts.map +0 -1
  292. package/dist/Model/Repository.js +0 -6
  293. package/dist/Model/dsl.d.ts +0 -32
  294. package/dist/Model/dsl.d.ts.map +0 -1
  295. package/dist/Model/dsl.js +0 -44
  296. package/dist/Model/filter/filterApi.d.ts +0 -30
  297. package/dist/Model/filter/filterApi.d.ts.map +0 -1
  298. package/dist/Model/filter/filterApi.js +0 -2
  299. package/dist/Model/filter/types/errors.d.ts +0 -29
  300. package/dist/Model/filter/types/errors.d.ts.map +0 -1
  301. package/dist/Model/filter/types/errors.js +0 -2
  302. package/dist/Model/filter/types/fields.d.ts +0 -15
  303. package/dist/Model/filter/types/fields.d.ts.map +0 -1
  304. package/dist/Model/filter/types/fields.js +0 -2
  305. package/dist/Model/filter/types/path/common.d.ts +0 -316
  306. package/dist/Model/filter/types/path/common.d.ts.map +0 -1
  307. package/dist/Model/filter/types/path/common.js +0 -2
  308. package/dist/Model/filter/types/path/eager.d.ts +0 -95
  309. package/dist/Model/filter/types/path/eager.d.ts.map +0 -1
  310. package/dist/Model/filter/types/path/eager.js +0 -31
  311. package/dist/Model/filter/types/path/index.d.ts +0 -4
  312. package/dist/Model/filter/types/path/index.d.ts.map +0 -1
  313. package/dist/Model/filter/types/path/index.js +0 -3
  314. package/dist/Model/filter/types/utils.d.ts +0 -79
  315. package/dist/Model/filter/types/utils.d.ts.map +0 -1
  316. package/dist/Model/filter/types/utils.js +0 -2
  317. package/dist/Model/filter/types/validator.d.ts +0 -30
  318. package/dist/Model/filter/types/validator.d.ts.map +0 -1
  319. package/dist/Model/filter/types/validator.js +0 -2
  320. package/dist/Model/filter/types.d.ts +0 -5
  321. package/dist/Model/filter/types.d.ts.map +0 -1
  322. package/dist/Model/filter/types.js +0 -7
  323. package/dist/Model/query/dsl.d.ts +0 -248
  324. package/dist/Model/query/dsl.d.ts.map +0 -1
  325. package/dist/Model/query/dsl.js +0 -104
  326. package/dist/Model/query/new-kid-interpreter.d.ts +0 -28
  327. package/dist/Model/query/new-kid-interpreter.d.ts.map +0 -1
  328. package/dist/Model/query/new-kid-interpreter.js +0 -165
  329. package/dist/Model/query.d.ts +0 -15
  330. package/dist/Model/query.d.ts.map +0 -1
  331. package/dist/Model/query.js +0 -3
  332. package/dist/Model.d.ts +0 -4
  333. package/dist/Model.d.ts.map +0 -1
  334. package/dist/Model.js +0 -4
  335. package/dist/Operations.d.ts +0 -55
  336. package/dist/Operations.d.ts.map +0 -1
  337. package/dist/Operations.js +0 -102
  338. package/dist/OperationsRepo.d.ts +0 -41
  339. package/dist/OperationsRepo.d.ts.map +0 -1
  340. package/dist/OperationsRepo.js +0 -14
  341. package/dist/QueueMaker/SQLQueue.d.ts +0 -14
  342. package/dist/QueueMaker/SQLQueue.d.ts.map +0 -1
  343. package/dist/QueueMaker/SQLQueue.js +0 -132
  344. package/dist/QueueMaker/memQueue.d.ts +0 -11
  345. package/dist/QueueMaker/memQueue.d.ts.map +0 -1
  346. package/dist/QueueMaker/memQueue.js +0 -76
  347. package/dist/QueueMaker/sbqueue.d.ts +0 -12
  348. package/dist/QueueMaker/sbqueue.d.ts.map +0 -1
  349. package/dist/QueueMaker/sbqueue.js +0 -91
  350. package/dist/QueueMaker/service.d.ts +0 -11
  351. package/dist/QueueMaker/service.d.ts.map +0 -1
  352. package/dist/QueueMaker/service.js +0 -4
  353. package/dist/RequestContext.d.ts +0 -68
  354. package/dist/RequestContext.d.ts.map +0 -1
  355. package/dist/RequestContext.js +0 -49
  356. package/dist/RequestFiberSet.d.ts +0 -36
  357. package/dist/RequestFiberSet.d.ts.map +0 -1
  358. package/dist/RequestFiberSet.js +0 -78
  359. package/dist/Store/ContextMapContainer.d.ts +0 -25
  360. package/dist/Store/ContextMapContainer.d.ts.map +0 -1
  361. package/dist/Store/ContextMapContainer.js +0 -77
  362. package/dist/Store/service.d.ts +0 -111
  363. package/dist/Store/service.d.ts.map +0 -1
  364. package/dist/Store/service.js +0 -79
  365. package/dist/Store.d.ts +0 -2
  366. package/dist/Store.d.ts.map +0 -1
  367. package/dist/Store.js +0 -2
  368. package/dist/adapters/SQL/Model.d.ts.map +0 -1
  369. package/dist/adapters/SQL/Model.js +0 -478
  370. package/dist/adapters/SQL.d.ts.map +0 -1
  371. package/dist/adapters/ServiceBus.d.ts +0 -58
  372. package/dist/adapters/ServiceBus.d.ts.map +0 -1
  373. package/dist/adapters/ServiceBus.js +0 -99
  374. package/dist/adapters/cosmos-client.d.ts +0 -14
  375. package/dist/adapters/cosmos-client.d.ts.map +0 -1
  376. package/dist/adapters/cosmos-client.js +0 -9
  377. package/dist/adapters/index.d.ts +0 -2
  378. package/dist/adapters/index.d.ts.map +0 -1
  379. package/dist/adapters/index.js +0 -2
  380. package/dist/adapters/logger.d.ts +0 -9
  381. package/dist/adapters/logger.d.ts.map +0 -1
  382. package/dist/adapters/logger.js +0 -3
  383. package/dist/adapters/memQueue.d.ts +0 -13
  384. package/dist/adapters/memQueue.d.ts.map +0 -1
  385. package/dist/adapters/memQueue.js +0 -20
  386. package/dist/adapters/mongo-client.d.ts.map +0 -1
  387. package/dist/adapters/mongo-client.js +0 -13
  388. package/dist/adapters/redis-client.d.ts.map +0 -1
  389. package/dist/adapters/redis-client.js +0 -94
  390. package/dist/api/ContextProvider.d.ts.map +0 -1
  391. package/dist/api/ContextProvider.js +0 -38
  392. package/dist/api/codec.d.ts.map +0 -1
  393. package/dist/api/codec.js +0 -5
  394. package/dist/api/internal/RequestContextMiddleware.d.ts +0 -5
  395. package/dist/api/internal/RequestContextMiddleware.d.ts.map +0 -1
  396. package/dist/api/internal/RequestContextMiddleware.js +0 -35
  397. package/dist/api/internal/auth.d.ts +0 -15
  398. package/dist/api/internal/auth.d.ts.map +0 -1
  399. package/dist/api/internal/auth.js +0 -47
  400. package/dist/api/internal/events.d.ts +0 -9
  401. package/dist/api/internal/events.d.ts.map +0 -1
  402. package/dist/api/internal/events.js +0 -42
  403. package/dist/api/internal/health.d.ts.map +0 -1
  404. package/dist/api/internal/health.js +0 -5
  405. package/dist/api/layerUtils.d.ts.map +0 -1
  406. package/dist/api/layerUtils.js +0 -16
  407. package/dist/api/middlewares.d.ts.map +0 -1
  408. package/dist/api/reportError.d.ts.map +0 -1
  409. package/dist/api/reportError.js +0 -27
  410. package/dist/api/routing/middleware/RouterMiddleware.d.ts.map +0 -1
  411. package/dist/api/routing/middleware/middleware.d.ts.map +0 -1
  412. package/dist/api/routing/middleware/middleware.js +0 -130
  413. package/dist/api/routing/middleware.d.ts.map +0 -1
  414. package/dist/api/routing/schema/jwt.d.ts.map +0 -1
  415. package/dist/api/routing/schema/jwt.js +0 -12
  416. package/dist/api/routing/tsort.d.ts.map +0 -1
  417. package/dist/api/routing/tsort.js +0 -51
  418. package/dist/api/routing/utils.d.ts.map +0 -1
  419. package/dist/api/routing/utils.js +0 -44
  420. package/dist/api/routing.d.ts +0 -134
  421. package/dist/api/routing.d.ts.map +0 -1
  422. package/dist/api/routing.js +0 -167
  423. package/dist/api/setupRequest.d.ts +0 -15
  424. package/dist/api/setupRequest.d.ts.map +0 -1
  425. package/dist/api/setupRequest.js +0 -49
  426. package/dist/api/util.d.ts.map +0 -1
  427. package/dist/api/util.js +0 -14
  428. package/eslint.config.mjs +0 -24
  429. package/src/Emailer/service.ts +0 -52
  430. package/src/Emailer.ts +0 -1
  431. package/src/Model/Repository/ext.ts +0 -283
  432. package/src/Model/Repository/internal/internal.ts +0 -580
  433. package/src/Model/Repository/legacy.ts +0 -27
  434. package/src/Model/Repository/makeRepo.ts +0 -139
  435. package/src/Model/Repository/service.ts +0 -627
  436. package/src/Model/Repository/validation.ts +0 -31
  437. package/src/Model/Repository.ts +0 -5
  438. package/src/Model/dsl.ts +0 -128
  439. package/src/Model/filter/filterApi.ts +0 -60
  440. package/src/Model/filter/types/errors.ts +0 -47
  441. package/src/Model/filter/types/fields.ts +0 -50
  442. package/src/Model/filter/types/path/common.ts +0 -404
  443. package/src/Model/filter/types/path/eager.ts +0 -298
  444. package/src/Model/filter/types/path/index.ts +0 -4
  445. package/src/Model/filter/types/utils.ts +0 -128
  446. package/src/Model/filter/types/validator.ts +0 -46
  447. package/src/Model/filter/types.ts +0 -6
  448. package/src/Model/query/dsl.ts +0 -2110
  449. package/src/Model/query/new-kid-interpreter.ts +0 -210
  450. package/src/Model/query.ts +0 -13
  451. package/src/Model.ts +0 -3
  452. package/src/Operations.ts +0 -235
  453. package/src/OperationsRepo.ts +0 -16
  454. package/src/QueueMaker/SQLQueue.ts +0 -190
  455. package/src/QueueMaker/memQueue.ts +0 -130
  456. package/src/QueueMaker/sbqueue.ts +0 -137
  457. package/src/QueueMaker/service.ts +0 -17
  458. package/src/RequestContext.ts +0 -63
  459. package/src/RequestFiberSet.ts +0 -105
  460. package/src/Store/ContextMapContainer.ts +0 -116
  461. package/src/Store/index.test.ts.bak +0 -112
  462. package/src/Store/service.ts +0 -193
  463. package/src/Store.ts +0 -1
  464. package/src/adapters/SQL.ts +0 -1
  465. package/src/adapters/ServiceBus.ts +0 -209
  466. package/src/adapters/cosmos-client.ts +0 -16
  467. package/src/adapters/index.ts +0 -0
  468. package/src/adapters/logger.ts +0 -3
  469. package/src/adapters/memQueue.ts +0 -21
  470. package/src/api/internal/auth.ts +0 -68
  471. package/src/api/middlewares.ts +0 -10
  472. package/src/api/routing/middleware.ts +0 -6
  473. package/src/api/routing.ts +0 -598
  474. package/src/api/setupRequest.ts +0 -104
  475. package/test/dist/date-query.test.d.ts.map +0 -1
  476. package/tsconfig.json.bak +0 -12
  477. /package/dist/{adapters/SQL.d.ts → SQL.d.ts} +0 -0
  478. /package/dist/{api/codec.d.ts → codec.d.ts} +0 -0
  479. /package/dist/{api/middlewares.d.ts → middlewares.d.ts} +0 -0
  480. /package/dist/{api/routing → routing}/schema/jwt.d.ts +0 -0
  481. /package/dist/{api/routing → routing}/tsort.d.ts +0 -0
  482. /package/dist/{api/util.d.ts → util.d.ts} +0 -0
  483. /package/src/{api/codec.ts → codec.ts} +0 -0
  484. /package/src/{api/internal → internal}/health.ts +0 -0
  485. /package/src/{api/routing → routing}/tsort.ts +0 -0
  486. /package/src/{api/util.ts → util.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,2889 @@
1
1
  # @effect-app/infra
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 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.
8
+
9
+ `@effect-app/infra` no longer re-exports moved core modules such as `./Model`, `./Emailer/service`, `./QueueMaker/service`, `./Store/service`, `./adapters/*`, or `./api/*` entrypoints.
10
+
11
+ - 52b0b01: Fix Schema->Codec
12
+ - 52b0b01: Effect v4 beta
13
+
14
+ ### Minor Changes
15
+
16
+ - 6884a32: Add Azure Service Bus topic notifications for persisted cluster storage polling.
17
+ - fb93244: Extend computed projections with additional relation operators:
18
+
19
+ - `relation(path).every(op)` — boolean, all elements match the filter (compiled as `NOT EXISTS(... WHERE NOT (filter))`).
20
+ - `relation(path).distinctCount(field, op?)` — distinct count of values at `field` within the relation.
21
+ - `relation(path).sum(field, op?)` — numeric sum over a relation field.
22
+ - `relation(path).collect(field, op?)` / `collectDistinct(field, op?)` — collect values into an array (with optional dedup).
23
+
24
+ All operators compile to native subqueries on SQL (sqlite/pg) and Cosmos, and to in-memory equivalents on the Memory store.
25
+
26
+ - aac6308: Add computed projections for repository queries with adapter-level compilation for memory, SQL, and Cosmos stores.
27
+ - fd67f0b: Add `withRequestResolverCache` to scope RequestResolver cache to the ContextMap (request-scoped). Add `getOrCreateStore` to ContextMap for generic scoped storage.
28
+ - 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.
29
+ - 48f1457: Add storage namespace support to CosmosDB adapter via partition key prefixing. When `allowNamespace` is configured, the namespace from `storeId` is prepended to partition key values (e.g., `test-ns::primary`), isolating data per namespace within the same container.
30
+ - 0520dd4: Add Cosmos DB backed `WorkflowEngine` adapter (`layerCosmos` in `WorkflowEngineCosmos.ts`). Persists workflow state in a single container partitioned by `executionId` so per-execution writes share a partition key (TransactionalBatch-eligible). Optimistic concurrency via `_etag` + `IfMatch` on Replace; first-writer-wins via create-only batch ops for activity results and durable-deferred completions; a persisted _suspended_ activity is overwritten via upsert on resume. Values crossing the storage boundary round-trip through `Schema` codecs (`S.fromJsonString(S.toCodecJson(...))`) using the workflow's own `payloadSchema` / `successSchema` / `errorSchema` for typed values, and the cluster engine's opaque `AnyOrVoid` codec for activity / deferred payloads. Includes time-bound lease + heartbeat fiber, scope-bound recovery poller for crashed-driver takeover, and cross-partition clock poller for restart-survivable durable timers.
31
+ - 2ebf8ae: `jitM` runs at the store boundary as JSON → JSON, before the `toCodecJson(toEncoded(schema))` decode; repositories decode the Encoded shape only.
32
+
33
+ `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.
34
+
35
+ 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.
36
+
37
+ - `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`.
38
+ - `RepositoryOptions.jitM` changes type from `(pm: Encoded) => Encoded` to `(json: JsonRecord) => JsonRecord` and is forwarded into the store config.
39
+ - **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.
40
+ - The JSON→Encoded decode stays strict: a document `jitM` does not repair fails at the store boundary instead of being read back half-decoded.
41
+ - `ValidationError.jitMResult` is deprecated: `validateSample` only ever sees the store's output, so it is identical to `rawData`.
42
+
43
+ - 186de3a: Stop forcing Date/Map/Set Encoded shapes to JSON.
44
+
45
+ `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.
46
+
47
+ - 3a588e4: Standardize span attributes on OpenTelemetry semantic conventions.
48
+
49
+ All Store adapters (Cosmos, PostgreSQL, SQLite, Memory, Disk) and Queue adapters
50
+ (Service Bus, SQL, Memory) now emit OTel-compliant span names and attributes via
51
+ the new `@effect-app/infra/otel` helper module.
52
+
53
+ Span name convention: `<operation> <collection|destination>` (low cardinality).
54
+
55
+ Attribute key migration:
56
+
57
+ | Old | New |
58
+ | --------------------------------------------------- | --------------------------------------------------------------------------------- |
59
+ | `repository.table_name` / `repository.container_id` | `db.collection.name` |
60
+ | `repository.namespace` | `db.namespace` |
61
+ | `repository.model_name` / `itemType` | `app.entity` |
62
+ | `id` / `itemId` (entity span attr) | `app.entity.id` |
63
+ | `itemIds` | `app.entity.ids` |
64
+ | `db.cosmos.request_charge` | `azure.cosmosdb.operation.request_charge` |
65
+ | `db.cosmos.resource_count` | `db.response.returned_rows` |
66
+ | `db.cosmos.response_bytes` | `db.response.body.size` |
67
+ | `disk.file` / `disk.file_size` | `disk.file.path` / `disk.file.size` |
68
+ | `queue.name` | `messaging.destination.name` |
69
+ | `queue.sessionId` | `messaging.message.conversation_id` |
70
+ | `queue.type` | `messaging.system` |
71
+ | `queue.input` (full body) | `messaging.message.body` (+ `messaging.message.id`, `messaging.message.type`) |
72
+ | `message_tags` | `messaging.message.types` + `messaging.batch.message_count` |
73
+ | `request.name` | `code.function.name` (from `spanAttributes`) / `rpc.method` (middleware) |
74
+ | `request.locale` | `app.locale` |
75
+ | `request.namespace` | `app.tenant.id` |
76
+ | `request.source.id` | `client.id` |
77
+ | `request.user.sub` / `.roles` | `user.id` / `user.roles` |
78
+ | `requestInput` | `rpc.request.payload` |
79
+ | `connectionId` | `network.connection.id` |
80
+ | Span `Request.<module>.<method>` | Span `<module>/<method>` + `rpc.system`/`rpc.service`/`rpc.method` (kind: server) |
81
+ | `<spanPrefix>.<op>` (SQL/Model) | OTel db span via `withDbSpan`, with `dbSystem?` option |
82
+
83
+ New attributes added:
84
+
85
+ - `db.system.name` — e.g. `postgresql`, `sqlite`, `cosmosdb`, `memory`, `disk`
86
+ - `db.operation.name` — e.g. `find`, `all`, `filter`, `set`
87
+ - `db.query.text` — sanitized / parameterized SQL or Cosmos query (no bound values)
88
+ - `messaging.operation.name` — `publish`, `process`, `receive`
89
+
90
+ Breaking: dashboards/alerts keying on the previous attribute names must be
91
+ updated. Queue consumer spans no longer log raw message bodies — use
92
+ `messaging.message.id` and `messaging.message.type` instead.
93
+
94
+ - 1cee480: Add aggregate query support: `Q.aggregate(schema, aggregateMap)` performs GROUP BY + aggregate functions at the database level (Memory, SQL, Cosmos).
95
+
96
+ - New `agg` DSL namespace: `agg.field(path)` (group-by), `agg.count()`, `agg.countWhen(op)`, `agg.sum(field)`, `agg.min(field)`, `agg.max(field)`
97
+ - New `aggregate(schema, aggregateMap)` query operator replaces in-memory grouping with a single DB-level query
98
+ - Memory store: pure JS group-by + aggregation
99
+ - SQL store: `GROUP BY` + `COUNT(CASE WHEN ...)` / `SUM` / `MIN` / `MAX`
100
+ - Cosmos store: `GROUP BY` + `SUM(IIF(...))` for conditional counts
101
+
102
+ - 186de3a: Query maps as JSON arrays of `[key, value]` tuples.
103
+
104
+ `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.
105
+
106
+ - 95995d5: Add `collectFields`/`collectDistinctFields` to `relation()` DSL for collecting values from multiple fields of relation items into a single flattened array.
107
+
108
+ Example: given `T = { a: boolean, items: { x: string, y: string, z: number }[] }[]`, you can now collect all distinct `x` and `y` values into a single `string[]`:
109
+
110
+ ```ts
111
+ relation("items").collectDistinctFields(["x", "y"]);
112
+ ```
113
+
114
+ - 0054611: Derive query invalidation from repository read/write dependencies and propagate dependency metadata through RPC clients.
115
+ - ddc5492: Add RepositoryRegistry service that tracks all repositories by modelName, with `seedNamespace` to seed all registered repos in parallel and `entries` to inspect the registry.
116
+
117
+ Make non-primary namespace seeding explicit: Store and Repository now expose `seedNamespace` instead of auto-seeding on access. Primary namespace is still seeded eagerly on initialization.
118
+
119
+ SQL stores: table creation (`CREATE TABLE IF NOT EXISTS`) is now part of `seedNamespace` instead of running eagerly at store construction, ensuring tables for non-primary namespaces are only created when explicitly seeded.
120
+
121
+ - 3d732b1: Rewrite `withRequestResolverCache` to use official `RequestResolver.withCache`, creating a cached resolver per ContextMap via `getOrCreateStoreEffect` with semaphore-guarded initialization.
122
+ - 818e047: Router `matchFor` no longer requires `meta` property on resource when requests carry `moduleName` from `TaggedRequestFor`
123
+ - 89d8b3a: Add Effect RPC `Stream` support to the wrapper.
124
+
125
+ - New `Stream` request constructor on `TaggedRequestFor` parallel to `Query`/`Command`. Emits resources with `type: "stream"`.
126
+ - 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).
127
+ - 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.
128
+ - New `RequestStreamHandler` / `RequestStreamHandlerWithInput` shapes in `clientFor.ts`; `RequestHandlers` dispatches on `type: "stream"`.
129
+
130
+ - 821468d: Add server-driven cache invalidation via RPC response headers.
131
+
132
+ - `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.
133
+ - `effect-app/middleware`: new `InvalidationMiddleware` RPC middleware tag; included in `DefaultGenericMiddlewares`.
134
+ - `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`.
135
+ - `@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.
136
+ - `@effect-app/vue`: `invalidateQueries` / `useMutation` now reads server-provided invalidation keys from `InvalidationKeysFromServer` after each mutation and applies them alongside the client-side invalidation.
137
+
138
+ - 48f1457: Add storage namespace support to SQL adapters (SQLite and Postgres) via a `_namespace` column. When `allowNamespace` is configured, a `_namespace` column with composite primary key `(id, _namespace)` isolates data per namespace within the same table. New tables get the schema automatically; existing tables require manual migration.
139
+ - 48f1457: Add SQL Store adapter for Effect SQL (SQLite + PostgreSQL). Table-per-repo with id/etag/data JSON columns, query DSL translation to SQL WHERE clauses, optimistic concurrency via etag.
140
+ - 48f1457: Make `withSqlTransaction` in `setupRequest` configurable via `withTransaction` option (defaults to `false`). Add `requiresTransactionConfig` and `makeSqlTransactionMiddleware` for per-RPC transaction control as a dynamic middleware that requires `SqlClient` directly. Transactions are disabled by default; opt in with `withTransaction: true` or `requiresTransaction: true`.
141
+ - c313c07: Add per-namespace in-memory SQLite adapter via LayerMap. When `makeSqlClientLayer` option is provided to `SQLiteStoreLayer`, each namespace gets its own SQLite database instance managed by a `LayerMap`. Introduces `WithNsTransaction` service for namespace-aware SQL transactions, used by `makeSqlTransactionMiddleware`.
142
+ - 0ddda6f: Add SQLite backed `WorkflowEngine` adapter (`layerSqlite` in `WorkflowEngineSqlite.ts`). Persists workflow state across `workflow_exec` / `workflow_activity` / `workflow_deferred` / `workflow_clock` tables via `SqlClient`. Uses `sql.withTransaction` for atomicity, etag-based optimistic concurrency (`UPDATE ... WHERE etag = ? RETURNING etag`), and `INSERT ... ON CONFLICT DO NOTHING RETURNING` for first-writer-wins on activity / deferred / clock writes. Values crossing the storage boundary round-trip through `Schema` codecs (`S.fromJsonString(S.toCodecJson(...))`) using the workflow's own `payloadSchema` / `successSchema` / `errorSchema` for typed values, and the cluster engine's opaque `AnyOrVoid` codec for activity / deferred payloads. Includes time-bound lease + heartbeat fiber, scope-bound recovery poller for crashed-driver takeover, and cross-partition clock poller for restart-survivable durable timers.
143
+ - 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.
144
+ - 186de3a: JSON stores lower native Encoded values (Date, Map, Set, and app types such as DateOnly) through the store's document schema.
145
+
146
+ `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.
147
+
148
+ - 7fa3045: V1/V2/V3: stream and command requests carry invalidation metadata
149
+
150
+ **V1** – stream final response includes metadata
151
+
152
+ - `Invalidation.StreamResponseChunk` wraps each stream item as `{ _tag: "value", value }` and appends `{ _tag: "done", metadata }` at the end carrying all accumulated invalidation keys.
153
+
154
+ **V2** – invalidation keys included in failures
155
+
156
+ - `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.
157
+ - `InvalidationMiddlewareLive` wraps command failures; `routing.ts` wraps stream failures.
158
+ - `apiClientFactory.ts` unwraps both on the client side, forwarding keys before re-failing with the original error.
159
+
160
+ **V3** – mid-stream metadata chunks
161
+
162
+ - `Invalidation.StreamResponseChunk` now also includes `{ _tag: "metadata", metadata }` for mid-stream invalidation.
163
+ - 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`).
164
+ - `apiClientFactory.ts` processes "metadata" chunks the same as "done" chunks, forwarding keys to `InvalidationKeysFromServer` immediately.
165
+ - `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.
166
+
167
+ - 3dc0d2a: Add streaming as a `stream: true` config option on `Query` / `Command` instead of a separate request type.
168
+
169
+ `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).
170
+
171
+ ```ts
172
+ // Query that streams results
173
+ Req.Query<T>()("Tag", {}, { stream: true, success: ... })
174
+
175
+ // Command that streams results
176
+ Req.Command<T>()("Tag", {}, { stream: true, success: ... })
177
+ ```
178
+
179
+ Vue client mapping (per-handler properties mirror the non-stream API — `.query`, `.fn`, `.mutate`):
180
+
181
+ - `query` + `stream: true` → exposes `.query` (read-only streaming, tracked Vue Query). Helper map key: `${name}Query`.
182
+ - `command` + `stream: true` → exposes `.fn` and `.mutate` (mutating streaming).
183
+ - Plain `query` / `command` unchanged.
184
+
185
+ Server routing dispatches via the new `stream` flag (`makeStreamRpc` for streaming commands/queries, `makeCommandRpc` / `Rpc.make` otherwise).
186
+
187
+ 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.
188
+
189
+ **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.
190
+
191
+ - 23a7167: Add a typed, serializable `DatabaseError { message, transient, cause }` for store adapter failures.
192
+
193
+ 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`.
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
+ - b2df3fa: Align `Schema.Void` with TypeScript `void` return-value semantics (effect-smol PR #2475 / `b7d46ab`).
199
+
200
+ `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.
201
+
202
+ - New `effect-app/SchemaAST` module; internal `SchemaAST` imports across the libs now route through it.
203
+ - Removed `ForceVoid` from `effect-app/client/makeClient` — use `S.Void` directly, which now carries this behaviour.
204
+ - `S.Void_` remains available as effect's original (`undefined`-only) Void.
205
+
206
+ - abb9c99: Batch Cosmos ack message processing updates.
207
+ - 71a0719: Merge `batchPar` into `batch`, expose `concurrency` via an optional `BatchOptions` argument, and make `batch` dual (data-first + data-last).
208
+ - aa436d3: fix bs span
209
+ - 52b0b01: fix lock
210
+ - eaf0115: enforce local
211
+ - f4b58cd: Add `cachedPerRequest` helper to `ContextMapContainer`. Runs a given Effect at most once per ContextMap (i.e. per request) and stores the result in the ContextMap under a fresh symbol, using the ContextMap's shared semaphore for safe single initialization. Use as a building block for any per-request memoized value (request resolver caches, per-request `Cache.make` instances, etc.).
212
+ - 33b0544: Replace repository codec child spans with parent-span timing attributes and bounded metrics, and record database operation timing for instrumented stores.
213
+ - 6821fc5: Add Cosmos DB backed storage layers for Effect Cluster message and runner state.
214
+ - 38289e0: Break the circular dependency between the memory store and code filter modules.
215
+ - 1f9d7da: fix missing toCodecJson usages
216
+ - d1fc90a: Strip `_etag` and `id` from the `data` JSON column in SQL store adapters (SQLite + PostgreSQL). These fields are already stored as dedicated columns and were redundantly duplicated inside the JSON blob. On read, `parseRow` now re-injects `id` from the row column. Backward compatible: existing rows with `_etag`/`id` in `data` continue to work as the column values take precedence.
217
+ - 32f05c8: Remove unused dependency declarations from package manifests.
218
+ - 6cfd83d: update effect to latest beta
219
+ - 1c858d3: fix request scope problems
220
+ - 52b0b01: fix bs
221
+ - 82f66f1: use uninterruptiple
222
+ - 505bfa9: Add concurrent decode helper APIs and migrate decode callsites to use them.
223
+
224
+ - Add `withDefaultParseOptions` and keep `DefaultParseOptions` centralized.
225
+ - Export `decodeEffectConcurrently` and `decodeUnknownEffectConcurrently` from Schema and SchemaParser modules.
226
+ - Update repository, queue, client, form, and CLI decode paths to use concurrent decode helpers.
227
+ - Keep schema constructors free of hardcoded parse concurrency overrides.
228
+
229
+ - c31c673: Tighten Cosmos cluster OCC handling for concurrent node polling.
230
+ - bac9f1a: Fix Cosmos `projectComputed` parameter index shift when `relation(...).every(...)` is present. The shared filter `print` was invoked twice per `relation-every` (once eagerly for the `where` variable, again inside the `NOT EXISTS(... WHERE NOT (...))` branch), bumping the outer `@v` counter beyond the bound parameter array and producing SQL that referenced unbound placeholders — queries returned 0 rows on Cosmos while SQLite/Memory adapters were unaffected.
231
+ - 3eb66e9: Fix CosmosDB store `filter` to trigger namespace seeding on first access. Previously, if `filter` was the first operation called on a namespace, seed data was never created.
232
+ - 5aed2e3: Add span to Cosmos `batchRemove` and include `namespace` attribute on all Cosmos store spans.
233
+ - de9fb83: Annotate Cosmos read spans with response size, resource count, and request charge.
234
+
235
+ `Cosmos.queryRaw`, `Cosmos.all`, `Cosmos.filter`, and `Cosmos.find` now set `db.cosmos.request_charge`, `db.cosmos.response_bytes`, and (where applicable) `db.cosmos.resource_count` on the active span. Bytes are sourced from `diagnostics.clientSideRequestStatistics.totalResponsePayloadLengthInBytes` — no payload stringification.
236
+
237
+ - 13c2fd9: doc span
238
+ - 52b0b01: Beta25
239
+ - fdb9cb3: cleanup
240
+ - c5e348f: Fix `provideOnRequestScope` leaking a single `ContextMap` across concurrent requests.
241
+
242
+ `Layer.buildWithScope(layer, requestScope)` resolves its `MemoMap` from the
243
+ ambient fiber context, which lives on the HTTP server fiber and is therefore
244
+ shared by every request that server handles. With the resulting memoization,
245
+ the first request to land on a freshly-started server built
246
+ `ContextMapContainer.layer` once; every subsequent overlapping request received
247
+ the same `ContextMap` instance — etags written by one request were observed
248
+ (or overwritten) by another, and the finalizer was anchored to the first
249
+ request's scope.
250
+
251
+ `provideOnRequestScope` now allocates a fresh `MemoMap` per call via
252
+ `Layer.makeMemoMap` and builds with `Layer.buildWithMemoMap(layer, memoMap,
253
+ requestScope)`. Each request gets its own `ContextMap`, the request-scope
254
+ binding from the earlier SSE fix is preserved, and the finalizer still only
255
+ fires once the response body has fully drained.
256
+
257
+ Adds regression coverage in `rpc-context-map-streaming.test.ts` for three
258
+ properties: mid-stream survival of ContextMap state, a fresh map on each
259
+ succeeding request, and isolation between overlapping concurrent requests.
260
+
261
+ - 8eb6737: Wrap `CUPS` exec failures in tagged `CUPSError` instead of `UnknownException`.
262
+
263
+ Retains `command`, `message`, exit `code`, `signal`, `killed`, `stdout`,
264
+ `stderr`, and original `cause` from the underlying `child_process.exec`
265
+ rejection so callers can branch on real failure detail.
266
+
267
+ - 4a7d95a: Use request-type RPC annotations to drive interruptibility and retry behavior, apply command uninterruptibility through the router wrapper path, and add an in-memory E2E test covering command vs query interruption behavior.
268
+ - 27bf9b6: Fix `Repository.query` environment typing to exclude schema context provided through `makeRepo` options.
269
+ - 32dbc54: fix stream type when no success specified
270
+ - 6613f3d: Document `Q.project` modes (`transform` / `project` / `collect`): how `select` is derived from the schema AST, the PM reverse-mapping behaviour per mode, and which decode errors surface vs `orDie`.
271
+ - 10b55ff: update packages
272
+ - 52b0b01: fix SSE event stream merge in pipe usage
273
+ - 3cf0c42: Fix `ContextMap` memory leak: tie its lifecycle to the request scope.
274
+
275
+ `ContextMapContainer.layer` provides a fresh `ContextMap` per request via `Layer.effect`, but the inner `etags` and `store` maps were never released. Cached `RequestResolver` entries (and anything they closed over) stayed reachable as long as any fiber held a reference to the map, even after the request scope closed.
276
+
277
+ `ContextMap` is now built with `Effect.acquireRelease`, and `makeContextMap` exposes a `clear()` finalizer that empties both maps when the request scope closes. `Layer.effect` strips the `Scope` requirement automatically in Effect v4.
278
+
279
+ - b6cb25b: Fix Cosmos cluster workflow resume after durable deferred completion.
280
+ - fce6ee9: Fix machine-id allocation in the Cosmos cluster `RunnerStorage`. It derived the machine id from a 31-multiplier string hash of the runner address, so two distinct runners could hash to the same value mod 1024 — and since the machine id feeds the Snowflake generator mod 1024, those runners would emit colliding Snowflake ids (corrupting request/reply identity across the cluster).
281
+
282
+ Machine ids are now allocated from a single counter document via an atomic server-side `incr`, mirroring SQL's auto-increment `machine_id` primary key: unique across distinct runners and stable per address (a re-registering runner reuses its persisted id). Verified against a live Cosmos account.
283
+
284
+ - 65835a6: Create missing Cosmos containers without throughput when the account is serverless (offer read/replace returns 400). Provisioned databases still get autoscale when configured.
285
+ - be3300d: Fix correctness bugs in the Cosmos `WorkflowEngine`, found by running the adapter against a real Cosmos account. The Cosmos workflow engine now passes the same conformance suite as the in-memory and SQLite engines.
286
+
287
+ - **OCC conflicts were fatal.** `replaceExec` used `Effect.promise` + a `statusCode` check, but single-item Cosmos `replace` _throws_ on 409/412/404 (only `read` and batch ops surface the code), so every conflict became an unrecoverable defect and the `OptimisticConcurrencyException` catch was dead code. It now uses `Effect.tryPromise` and matches the thrown error (mirrors `ClusterCosmos`), so lease claims, completions, and interrupts lose gracefully under contention.
288
+ - **Illegal resource ids.** Activity/deferred/clock doc ids embedded workflow/deferred names containing `/`, which Cosmos rejects. Ids are now URI-encoded via `cosmosId` (mirrors `ClusterCosmos`).
289
+ - **Interrupt could be lost under Cosmos latency.** A concurrent `interrupt` racing a suspending driver's `onComplete` could have its `interrupted` flag swallowed (OCC) or downgraded, leaving the re-drive unable to collapse the suspension. `interrupt`/`interruptUnsafe` now persist the flag with OCC retry (`markInterrupted`), and `onComplete` never downgrades a persisted `interrupted: true`.
290
+ - **`execute` now drives unconditionally** (matching SQLite), letting `drive`'s own guard short-circuit a running/completed fiber and re-drive a suspended one, instead of skipping re-drive when a stale local entry existed.
291
+
292
+ - eed57c6: Fix `R` inference in `OneDSL`, `OneDSLExt.modify` and `OneDSLExt.update`. The callback's effect type was annotated as `Effect<…, E, FixEnv<R, Evt, S1, S2>>`, which deadlocked inference of `R` (TS6 fell back to `never`, tsgo to `unknown`, leaking `unknown` into yielded effects in generator handlers). Now matches the existing `AllDSLExt` pattern: bare `R` in the callback, `FixEnv<R, …>` only in the return type.
293
+ - 1015582: Fix `Q.project` field selection with `Schema.encodeKeys` by deriving selected fields from the encoded schema shape.
294
+ - ebffba8: Stop re-encoding store `defaultValues` in Cosmos and SQL query builders.
295
+
296
+ Stores already JSON-lower `defaultValues` at construction. A second schema encode of an ISO `Date` string throws `Expected a valid Date`, which failed `filter({ select: [id] })` even when the select path never decoded a document.
297
+
298
+ - 29c39d2: Fix repository `find` with transformed id fields in tagged union schemas
299
+ - fbf47b8: Fix repository `find` with transformed id fields (e.g. composite ids using `decodeTo`)
300
+ - 47e53f5: Fix `withRequestResolverCache` causing "RequestResolver did not complete request" errors by using the `preCheck` hook instead of handling cache in `runAll`. Cache hits for in-flight or completed requests are now handled before entries enter the batch, preventing uncompleted entries.
301
+ - 70f1f27: Fix store seeding: break circular dependency where bulkSet re-entered seedNamespace, and add explicit seed markers to SQL/Pg stores using a dedicated `__seed__` namespace.
302
+ - d786b91: Fix SQL `whereSome`/`whereEvery` array relation queries using `EXISTS` with `json_each` (SQLite) / `jsonb_array_elements` (Pg).
303
+ - dfd5562: Fix SQL `IN`/`NOT IN` with null values to use `IS NULL`/`IS NOT NULL` instead of `IN (NULL, ...)`.
304
+ - 2d85646: fix SQL includes-any/all double-quoting values for SQLite (JSON.stringify only needed for Postgres jsonb)
305
+ - 2f862a4: Apply `toCodecJson` in `SQLModel.JsonFromString` so SQL JSON string fields use the proper JSON-safe codec at the encode/decode boundary (aligns with queue, event, and gist call sites).
306
+ - c80e781: Fix SQLite store namespace parameter ordering in filter queries. The `_namespace` placeholder was prepended to the WHERE clause but its value was appended to the end of the positional params array, causing it to bind to the wrong placeholder. PostgreSQL was unaffected (uses indexed `$N` placeholders).
307
+ - fe2caba: SQL and Pg stores: use separate `_migrations` table for seed tracking instead of inserting a marker row into the data table, preventing it from appearing in `all`/`filter` queries.
308
+ - 9a9e46c: Fix SQL select queries to read `_etag` from column instead of JSON data, preventing INSERT on update.
309
+ - 5a709d1: Fix SQLite select query type coercion using `json_quote` and apply defaultValues in SQL WHERE clauses via `COALESCE`.
310
+ - b4ffee0: fix SQL whereEvery double-negation bug causing wrong query when operators like notIn are used (especially with empty arrays)
311
+ - 1ab3cf7: SQLite per-namespace adapter: use separate `_migrations` table for seed tracking instead of inserting a marker row into the data table, preventing it from appearing in `all`/`filter` queries.
312
+ - 3053760: fix: restore context map container behavior
313
+ - f28fce5: fix sqlite
314
+ - c9e0c44: cleanup auth
315
+ - 55c6572: update packages
316
+ - dd239fa: fix atom invalidation
317
+ - c991be1: update packages
318
+ - d738811: remove double prefix
319
+ - 4b95009: use Finite instead of Number
320
+ - e02a258: Add optional batching overloads for repository `save` and `remove` helpers.
321
+ - f7290aa: Add `relation(...).length()` computed projection — emits `ARRAY_LENGTH` on Cosmos / `arrayLength` on SQL / native `.length` on Memory. Cheaper than `relation.count()` for unconditional array sizing (no subquery scan, just metadata read).
322
+
323
+ ```ts
324
+ projectComputed(
325
+ S.Struct({ id: S.String, packageCount: S.NonNegativeInt }),
326
+ computed({ packageCount: relation<OrderEnc>("packages").length() })
327
+ );
328
+ ```
329
+
330
+ - 2871841: RequestContextMiddleware: set request name to `HTTP <method> <path>` (strip query string) for clearer span/trace names.
331
+ - dc465e3: update to latest effect beta
332
+ - b4d5f55: fix DatabaseError typing
333
+ - a0075b8: `generateFromSchema` advances its seed on every call, so successive samples differ (deterministic across runs) instead of always returning the same value.
334
+ - f052d38: Replace `(...) => Effect.gen` with `Effect.fnUntraced` and convert select multi-step `pipe` chains to `Effect.gen` across infra.
335
+ - 186de3a: Declare `@sentry/node` as a runtime dependency of `@effect-app/infra`. `errorReporter.ts` imports it statically, so `pnpm install --prod` of linked source (Docker) must install it next to the package, not only as a peer of the app.
336
+ - 8c645d5: update to latest effect
337
+ - 52b0b01: adapt isObject change
338
+ - a37aa38: Update to effect beta 43
339
+ - c1e73de:
340
+ - d867272: the return of `Context`
341
+ - 24f5dd0: fix memory computation
342
+ - 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.
343
+
344
+ 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`.
345
+
346
+ `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".
347
+
348
+ 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.
349
+
350
+ - 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.
351
+
352
+ ### Resource error schemas
353
+
354
+ Three sites that used to fold `RequestContextMap[*].error` into a request's own error schema now stop doing so:
355
+
356
+ - `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).
357
+ - `MiddlewareMaker.rpc()` — `error: options.error` only; the previous union with `rcm.config[*].error` is gone.
358
+ - Routing and `apiClientFactory.makeRpcGroupFromRequestsAndModuleName` — `Invalidation.makeCommandRpc` is called with `error: resource.error` (no widening with the composite middleware error union).
359
+
360
+ 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:
361
+
362
+ - **Server**: `makeRouter(middleware)` attaches the live composite tag (existing behavior).
363
+ - **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.
364
+
365
+ **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.
366
+
367
+ ### Invalidation wrap/unwrap
368
+
369
+ - `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.
370
+ - `apiClientFactory.ts` (client) `unwrapCommand` strips both envelopes and forwards keys to `InvalidationKeysFromServer`.
371
+ - `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.
372
+
373
+ 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.
374
+
375
+ - 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`.
376
+ - e3ceaba: Add computed projection expression sums with grouped and normalized variants for projectComputed relation aggregations.
377
+ - 52b0b01: Update Effect dependencies to 4.0.0-beta.31 across workspace packages.
378
+ - 6fff09c: unify encoded function for when you use encodedKeys
379
+ - dab6992: no need for .lock.lock
380
+ - eb28ea5: bogus
381
+ - 7d5cefc: SQL and Pg stores now scope seed migration records by namespace and table name in shared databases to avoid cross-namespace seed collisions.
382
+ - 848d26d: Capture more of the rpc request payload in the `rpc.request.payload` span
383
+ attribute.
384
+
385
+ The summarizer was one level deep: top-level scalars were kept, but any nested
386
+ object collapsed to `Object[N]` and any array to `Array[N]`, hiding useful
387
+ inputs (carrier, packageType, dimensions, ids, per-item amounts, …).
388
+
389
+ It now recurses into nested objects up to `PAYLOAD_MAX_DEPTH` (4) and samples
390
+ arrays to their first `PAYLOAD_ARRAY_HEAD` (20) elements, appending a `…N more`
391
+ marker when longer — so item arrays stay diagnosable without dumping the whole
392
+ tail on high-frequency commands. Long strings are still snipped at 256 chars,
393
+ and `password`/`secret`/`token` keys are redacted at any depth (previously only
394
+ a top-level `password`).
395
+
396
+ - db285e9: Add per-namespace seeding to SQL (SQLite/PostgreSQL) and CosmosDB store adapters. Previously only the `primary` namespace was seeded at initialization; now each namespace is lazily seeded on first access using `Effect.cached` to guarantee at-most-once execution. Primary namespace continues to seed eagerly on initialization. CosmosDB uses namespace-specific marker documents for backward compatibility.
397
+ - ca94edf: fix typo
398
+ - 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`.
399
+ - 40585ca: Keep tag-aware `ProjectableFromDomain` for `projectComputed` only; restore loose key-presence guard for `project()` so view DTOs with reshaped fields keep typechecking.
400
+ - a354345: Move release tsconfig flattening from publish to pack lifecycle so package configs are restored before registry upload/auth can fail.
401
+ - 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.
402
+
403
+ Memory projectors that assumed native Encoded `Date` / `Map` / `Set` values now see the stored JSON form (ISO strings, arrays).
404
+
405
+ - 52b0b01: Update Effect dependencies to 4.0.0-beta.28 across workspace packages.
406
+ - d31253f: Refactor eligible schema classes and tagged classes to Opaque schemas, and migrate constructor call sites to use `.make` for those models.
407
+ - cec026d: update packages
408
+ - 902ca1b: fix
409
+ - 925214b: update packages
410
+ - 7191fc1: `removeById` now takes `id | NonEmptyReadonlyArray<id>` instead of a variadic rest, and the extended repo's `removeById` accepts a `batch` option to chunk large deletes — consistent with `save` and `remove`.
411
+ - 88838fb: Remove pick/omit customizations from Class/TaggedClass/Struct/TaggedStruct. Use `Struct.pick(X.fields, [...])` from `effect-app` instead.
412
+ - b2e438f: Remove Operations service and repo
413
+ - 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.
414
+ - 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).
415
+ - beae3a0: Remove `withDefaultConstructor` wrapper, use `S.withConstructorDefault` directly with `Effect.succeed`/`Effect.sync`.
416
+ - 4bc3d05: Repository `save`, `remove`, and `removeById` now accept plain `ReadonlyArray` instead of `NonEmptyReadonlyArray`. Callers no longer need to narrow or guard for non-emptiness before invoking — empty inputs short-circuit to a no-op, making it ergonomic to pass through query results directly.
417
+ - ebbb799: Repository owns OTel span topology; store adapters annotate db._ semconv attrs on the current span instead of opening their own child spans. Eliminates 1-1 nested span chains (e.g. `Repository.query` → `Cosmos.filter`). Adds `annotateDb` helper alongside `withDbSpan` in `otel.ts`. Repo public ops (`find`, `all`, `query`, `queryRaw`, `mapped._`) get explicit `Repository.<op>` spans; internal codec steps (`encodeMany`, `parseMany`, `parseMany2`) keep bare names. `validateSample`opens per-iteration sub-spans to prevent attribute clobber. Adds WeakMap decoder cache for`parseMany2` schemas.
418
+ - 5773159: Add `itemType` annotation to all repository spans
419
+ - 7bd8234: Use set-backed data dependencies and provide request-scoped dependency services through a shared root-checked helper.
420
+ - 54bfc59: Require middleware to flow through `makeRpcClient` and the live layer through `makeRouter`.
421
+
422
+ ### `makeRpcClient(middleware, generalErrors?)`
423
+
424
+ 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.
425
+
426
+ **Migration**:
427
+
428
+ ```diff
429
+ -makeRpcClient(RequestContextMap, undefined, AppMiddleware)
430
+ +makeRpcClient(AppMiddleware)
431
+ ```
432
+
433
+ For tests/clients without a real middleware, build a minimal stub (`{ requestContextMap, requestContext }`) or pass any value satisfying `ClientMiddleware<RCM>`.
434
+
435
+ ### `makeRouter(middlewareLive)`
436
+
437
+ `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.
438
+
439
+ **Migration**:
440
+
441
+ ```diff
442
+ -export const { Router, matchAll } = makeRouter()
443
+ +export const { Router, matchAll } = makeRouter(AppMiddleware.Default)
444
+ ```
445
+
446
+ - ad0ede6: Keep tag-aware `ProjectableGuard` on both `project()` and `projectComputed` (no loose key-only paper-over).
447
+
448
+ Hardening:
449
+
450
+ - single-literal tags allow dual same-tag domain variants (KeysOfUnion of matched members)
451
+ - multi-tag / string tags still require keys on every matched member
452
+ - optional projection/domain keys checked by key presence only (not optional-assignability)
453
+
454
+ Call sites must project domain-owned fields per tagged state.
455
+
456
+ - 1576688: Add configurable `fakeMailAddress` to `SendgridConfig`. Supports `{i}` placeholder for unique addresses, e.g. `"test+{i}@example.com"`.
457
+ - e33f1eb: Drop OTel spans from ServiceBus client/sender/receiver/subscription lifecycle wrappers; keep `withLogSpan` + info logs only. Removes high-cardinality `sessionId` from log span names; promotes it to `messaging.session.id` log attribute via `Effect.annotateLogs`.
458
+ - 0cff7c1: workaround middleware error issue
459
+ - 62627e9: Fix boolean handling in SQL SELECT and WHERE
460
+ - eb06b32: improve root union select
461
+ - 52b0b01: Update Effect dependencies to 4.0.0-beta.29 across workspace packages.
462
+ - 52b0b01: switch to NdJson
463
+ - 8a4a6d2: fup
464
+ - dba5779: namespaces
465
+ - acfdc9e: Point development package exports at TypeScript sources while keeping published exports on compiled dist files.
466
+ - bb3f51d: Fix ContextMap finalizer running mid-stream on SSE responses. SSE handler now binds ContextMapContainer to the request scope via a shared `provideOnRequestScope` helper (also used by `RequestContextMiddleware`), so finalizers only run after the response body is fully drained. Adds `setupStreamingRequestContextFromCurrent` for use by streaming HTTP handlers.
467
+ - db7ba34: Filter SSE events stream by storeId namespace
468
+ - a69da09: Publish from generated staging directories so release-only files are created outside the source package tree.
469
+ - f22a026: Use `Effect.cached` in `getOrCreateStoreEffect` for proper memoization of the resolver effect.
470
+ - 1d85785: Wrap store seed effects with `Effect.uninterruptible` to prevent interruption during seeding
471
+ - 0054611: Stream RPC: drain read/write data-dependencies per emitted value chunk instead of sending the
472
+ cumulative set on every metadata chunk. Each metadata chunk now carries only the delta recorded
473
+ since the last chunk, the bucket is cleared for the next segment, and the terminal "done"/"error"
474
+ chunks drain the remainder. The emit condition also broadens to include non-empty reads, so stream
475
+ queries forward their read-dependencies mid-stream too. The client already accumulates deltas into
476
+ its per-call recorder, so no FE change is required.
477
+ - 9569911: Stream resources accept `Effect.fail(...)` (and `Effect<Stream>`) from controller handlers — previously only `Stream.fail(...)` / a returned `Stream` worked. The router now lifts an Effect result to a Stream via `Stream.unwrap`, so failures from an `Effect` propagate as a failing Stream on the client, matching `Stream.fail(...)` behavior. Also removes the need for manual `.pipe(Stream.unwrap)` on generator handlers that return a `Stream`.
478
+ - b0db40f: Router handlers are now discriminated by `Resource[K]["stream"]`:
479
+
480
+ - Stream resources (`stream: true`) accept only `(req) => Stream<...>` handlers.
481
+ - Non-stream resources accept only `(req) => Effect<...>` (or generator yielding `Yieldable`).
482
+
483
+ Mixing — e.g. returning `Effect.fail(...)` or `Effect<Stream<...>>` from a stream handler — no longer type-checks.
484
+
485
+ The runtime `Stream.unwrap` branch that lifted `Effect`/`Effect<Stream>` returns into a `Stream` is removed; handlers for stream resources must return a `Stream` directly. Migrate `Effect.gen(...).pipe(Stream.unwrap)` patterns by returning the `Stream` directly, and convert `Effect.fail(err)` in stream handlers to `Stream.fail(err)`.
486
+
487
+ - 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.
488
+ - b53c59e: fix signature
489
+ - b8b9080: update packages
490
+ - ffbff5d: improve sentry
491
+ - b63f10f: fix: nasty request scope bug
492
+ - 52b0b01: Configure Changesets fixed versioning for public packages.
493
+ - 6a0e008: remove artificial Cosmos bulkSet delays
494
+ - 9992e70: pass options
495
+ - 43611c7: enable cosmosdb large partition key hashes
496
+ - 256ae85: cleanup
497
+ - 1587bfc: Batch more Cosmos cluster storage updates.
498
+ - 8bd9a11: Support ID-scoped signal dependencies and additive repository dependencies derived from previous and current entities.
499
+ - 52b0b01: update effect to 4.0.0-beta.37 and drop the Schema Class disableValidation workaround now that the patched effect schema covers it
500
+ - fac725d: update effect to latest beta
501
+ - 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.
502
+ - 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`).
503
+
504
+ 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*`).
505
+
506
+ - c3299f7: update packages
507
+ - 8062ad3: Unify Emailer `sendMail` spans across implementations. `Fake.sendMail` and `Sendgrid.sendMail` now both emit as `Emailer.sendMail` with OTel-standard `messaging.system` attribute (`"fake"` / `"sendgrid"`).
508
+ - 39996f7: Unify `parseMany` span variants under a single span name. The four prior spans (`parseMany`, `parseMany2`, `parseManyProject`, `parseManyCollect`) now all emit as `parseMany` with `app.entity` and `app.query.mode` attributes (`"transform" | "project" | "collect"`). Reuses the same attribute key already set on the parent `Repository.query` span for consistency. `parseManyProject`/`parseManyCollect` previously lacked `app.entity` — now included.
509
+ - 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).
510
+
511
+ API adaptations for beta.107:
512
+
513
+ - `concurrency: "inherit"` → `"unbounded"`
514
+ - `Schema.ErrorClass` / `TaggedErrorClass` → `Schema.Error` / `TaggedError`
515
+ - `Schema.LazyArbitrary` → `Schema.Arbitrary`
516
+ - `Schema.DateValid` / `isDateValid` removed (`Schema.Date` rejects invalid dates)
517
+ - `SchemaIssue` constructors no longer take `Option` (annotations + input)
518
+ - filter meta via `annotations.representation` instead of `annotations.meta`
519
+ - `context.defaultValue` → `context.constructorDefault` (single Link)
520
+ - Class detection via `~constructor` + static `identifier`
521
+ - Redacted detection via `representation.id`
522
+ - localized StandardSchema hooks updated for new issue/input model
523
+ - provide `NodeCrypto.layer` for cluster sqlite tests
524
+ - default `sync-effect` subtree URL → `Effect-TS/effect`
525
+
526
+ - 52b0b01: update effect to 4.0.0-beta.36, adapt to Option<A> revert from A | undefined
527
+ - Update effect packages to 4.0.0-beta.52
528
+ - 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.
529
+ - 7ca66ce: Update to effect 4.0.0-beta.66. Remove `Yieldable` and `asEffect()` (service tags are now `Effect` directly).
530
+ - 57a1862: Update to effect 4.0.0-beta.67. Switch deps from `pkg.pr.new` snapshot back to npm beta tag.
531
+ - 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`.
532
+
533
+ Adapt the infra workflow engines to beta.83 API changes:
534
+
535
+ - `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`).
536
+ - `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).
537
+
538
+ - 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`).
539
+ - 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.
540
+ - 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.
541
+ - 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.
542
+ - 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).
543
+ - 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`.
544
+
545
+ API adaptations for rc.112:
546
+
547
+ - cluster encoded driver `resetAddress` → batched `resetAddresses`
548
+ - Cosmos `unprocessedMessages` honors optional `limit` / `addresses` (only claimed rows are returned)
549
+ - Service Bus `Runners.make` supplies `codecFor` for schema-aware RPC serialization
550
+ - `pnpm subtree:effect` passes `--url https://github.com/Effect-TS/effect.git` (published CLI still defaults to effect-smol)
551
+ - JSON Schema check constraints are compacted onto the parent (`minLength`/`maxLength` instead of `allOf`)
552
+
553
+ - 724da29: replace useless span
554
+ - Updated dependencies [439cbeb]
555
+ - Updated dependencies [da83c1f]
556
+ - Updated dependencies [b2df3fa]
557
+ - Updated dependencies [199e9a5]
558
+ - Updated dependencies [b035b1c]
559
+ - Updated dependencies [664e83d]
560
+ - Updated dependencies [a4dff57]
561
+ - Updated dependencies [ba4bdc3]
562
+ - Updated dependencies [52b0b01]
563
+ - Updated dependencies [9d3495e]
564
+ - Updated dependencies [3436d44]
565
+ - Updated dependencies [52b0b01]
566
+ - Updated dependencies [f317c5e]
567
+ - Updated dependencies [e585c9c]
568
+ - Updated dependencies [e4ff9a6]
569
+ - Updated dependencies [33b0544]
570
+ - Updated dependencies [99c43c4]
571
+ - Updated dependencies [52b0b01]
572
+ - Updated dependencies [08d092c]
573
+ - Updated dependencies [947fe20]
574
+ - Updated dependencies [21ac90a]
575
+ - Updated dependencies [32f05c8]
576
+ - Updated dependencies [6cfd83d]
577
+ - Updated dependencies [1c858d3]
578
+ - Updated dependencies [52b0b01]
579
+ - Updated dependencies [992d9fa]
580
+ - Updated dependencies [505bfa9]
581
+ - Updated dependencies [939bebc]
582
+ - Updated dependencies [ba789a2]
583
+ - Updated dependencies [ab289d4]
584
+ - Updated dependencies [52b0b01]
585
+ - Updated dependencies [e0c4835]
586
+ - Updated dependencies [32dbc54]
587
+ - Updated dependencies [0a0030f]
588
+ - Updated dependencies [0263827]
589
+ - Updated dependencies [0263827]
590
+ - Updated dependencies [aeb17bc]
591
+ - Updated dependencies [c0e5a1b]
592
+ - Updated dependencies [10b55ff]
593
+ - Updated dependencies [14aba14]
594
+ - Updated dependencies [a0075b8]
595
+ - Updated dependencies [f052d38]
596
+ - Updated dependencies [f233f3d]
597
+ - Updated dependencies [18bae5b]
598
+ - Updated dependencies [f313973]
599
+ - Updated dependencies [edc52e4]
600
+ - Updated dependencies [ea1bd46]
601
+ - Updated dependencies [85a8275]
602
+ - Updated dependencies [50b022e]
603
+ - Updated dependencies [52b0b01]
604
+ - Updated dependencies [47e3742]
605
+ - Updated dependencies [458bb1b]
606
+ - Updated dependencies [3365758]
607
+ - Updated dependencies [54ec1ef]
608
+ - Updated dependencies [f21190c]
609
+ - Updated dependencies [0d4e0b8]
610
+ - Updated dependencies [31739d7]
611
+ - Updated dependencies [0b21a02]
612
+ - Updated dependencies [bbaa67e]
613
+ - Updated dependencies [a211c12]
614
+ - Updated dependencies [347af48]
615
+ - Updated dependencies [bd26832]
616
+ - Updated dependencies [3053760]
617
+ - Updated dependencies [52b0b01]
618
+ - Updated dependencies [55c6572]
619
+ - Updated dependencies [f88ea34]
620
+ - Updated dependencies [52b0b01]
621
+ - Updated dependencies [c991be1]
622
+ - Updated dependencies [d738811]
623
+ - Updated dependencies [8fffc3c]
624
+ - Updated dependencies [52b0b01]
625
+ - Updated dependencies [a788432]
626
+ - Updated dependencies [10e90d5]
627
+ - Updated dependencies [4b95009]
628
+ - Updated dependencies [52b0b01]
629
+ - Updated dependencies [178480a]
630
+ - Updated dependencies [985176b]
631
+ - Updated dependencies [dc465e3]
632
+ - Updated dependencies [21017d5]
633
+ - Updated dependencies [0541f0d]
634
+ - Updated dependencies [2ebf8ae]
635
+ - Updated dependencies [8c645d5]
636
+ - Updated dependencies [8cb3de4]
637
+ - Updated dependencies [30c512d]
638
+ - Updated dependencies [50b022e]
639
+ - Updated dependencies [52b0b01]
640
+ - Updated dependencies [b952f19]
641
+ - Updated dependencies [a37aa38]
642
+ - Updated dependencies [52b0b01]
643
+ - Updated dependencies [c1e73de]
644
+ - Updated dependencies [d867272]
645
+ - Updated dependencies [774a9b3]
646
+ - Updated dependencies [d67d17a]
647
+ - Updated dependencies [8f09f77]
648
+ - Updated dependencies [50ce7e6]
649
+ - Updated dependencies [d71d976]
650
+ - Updated dependencies [2aa8e5e]
651
+ - Updated dependencies [29a1e57]
652
+ - Updated dependencies [186de3a]
653
+ - Updated dependencies [52b0b01]
654
+ - Updated dependencies [52b0b01]
655
+ - Updated dependencies [6fff09c]
656
+ - Updated dependencies [11422f8]
657
+ - Updated dependencies [eb28ea5]
658
+ - Updated dependencies [52b0b01]
659
+ - Updated dependencies [8f1cf6a]
660
+ - Updated dependencies [ee9694e]
661
+ - Updated dependencies [52a31dd]
662
+ - Updated dependencies [52b0b01]
663
+ - Updated dependencies [ca94edf]
664
+ - Updated dependencies [d1c15d3]
665
+ - Updated dependencies [a1b59bc]
666
+ - Updated dependencies [dc07df5]
667
+ - Updated dependencies [0fe925d]
668
+ - Updated dependencies [40585ca]
669
+ - Updated dependencies [5ac46cb]
670
+ - Updated dependencies [a354345]
671
+ - Updated dependencies [52b0b01]
672
+ - Updated dependencies [186de3a]
673
+ - Updated dependencies [48d9f36]
674
+ - Updated dependencies [52b0b01]
675
+ - Updated dependencies [52b0b01]
676
+ - Updated dependencies [d31253f]
677
+ - Updated dependencies [5615e47]
678
+ - Updated dependencies [3e46e7b]
679
+ - Updated dependencies [cec026d]
680
+ - Updated dependencies [88838fb]
681
+ - Updated dependencies [3bae238]
682
+ - Updated dependencies [b2e438f]
683
+ - Updated dependencies [f150cf9]
684
+ - Updated dependencies [0c88f78]
685
+ - Updated dependencies [d16845e]
686
+ - Updated dependencies [261470f]
687
+ - Updated dependencies [beae3a0]
688
+ - Updated dependencies [8792221]
689
+ - Updated dependencies [1f103b2]
690
+ - Updated dependencies [0054611]
691
+ - Updated dependencies [7bd8234]
692
+ - Updated dependencies [54bfc59]
693
+ - Updated dependencies [ad0ede6]
694
+ - Updated dependencies [89d8b3a]
695
+ - Updated dependencies [52b0b01]
696
+ - Updated dependencies [08d2e70]
697
+ - Updated dependencies [9ea024d]
698
+ - Updated dependencies [5f9cd6a]
699
+ - Updated dependencies [6252808]
700
+ - Updated dependencies [e6f2341]
701
+ - Updated dependencies [821468d]
702
+ - Updated dependencies [2495ace]
703
+ - Updated dependencies [0b3e00e]
704
+ - Updated dependencies [52b0b01]
705
+ - Updated dependencies [c215db8]
706
+ - Updated dependencies [12abb55]
707
+ - Updated dependencies [0cff7c1]
708
+ - Updated dependencies [c1a6fdc]
709
+ - Updated dependencies [8ae8b53]
710
+ - Updated dependencies [a5248a9]
711
+ - Updated dependencies [0e824ef]
712
+ - Updated dependencies [52b0b01]
713
+ - Updated dependencies [eb06b32]
714
+ - Updated dependencies [52b0b01]
715
+ - Updated dependencies [52b0b01]
716
+ - Updated dependencies [025de47]
717
+ - Updated dependencies [acfdc9e]
718
+ - Updated dependencies [1186b09]
719
+ - Updated dependencies [a69da09]
720
+ - Updated dependencies [3c1f52d]
721
+ - Updated dependencies [3a8c710]
722
+ - Updated dependencies [186de3a]
723
+ - Updated dependencies [0054611]
724
+ - Updated dependencies [583393f]
725
+ - Updated dependencies [828d264]
726
+ - Updated dependencies [7fa3045]
727
+ - Updated dependencies [3dc0d2a]
728
+ - Updated dependencies [459697f]
729
+ - Updated dependencies [738b482]
730
+ - Updated dependencies [3eda52e]
731
+ - Updated dependencies [b52b424]
732
+ - Updated dependencies [7c25dbb]
733
+ - Updated dependencies [b8b9080]
734
+ - Updated dependencies [b90fa30]
735
+ - Updated dependencies [57db551]
736
+ - Updated dependencies [3613e87]
737
+ - Updated dependencies [52b0b01]
738
+ - Updated dependencies [7119320]
739
+ - Updated dependencies [e944bca]
740
+ - Updated dependencies [dbcc53b]
741
+ - Updated dependencies [52b0b01]
742
+ - Updated dependencies [140e192]
743
+ - Updated dependencies [9992e70]
744
+ - Updated dependencies [24f0a5a]
745
+ - Updated dependencies [256ae85]
746
+ - Updated dependencies [8bd9a11]
747
+ - Updated dependencies [52b0b01]
748
+ - Updated dependencies [fac725d]
749
+ - Updated dependencies [412f08b]
750
+ - Updated dependencies [79eb019]
751
+ - Updated dependencies [6ae3050]
752
+ - Updated dependencies [f353d48]
753
+ - Updated dependencies [52b0b01]
754
+ - Updated dependencies [01bab22]
755
+ - Updated dependencies [2a86a17]
756
+ - Updated dependencies [52b0b01]
757
+ - Updated dependencies [c3299f7]
758
+ - Updated dependencies [23a7167]
759
+ - Updated dependencies [e71eb78]
760
+ - Updated dependencies [6b57330]
761
+ - Updated dependencies [e2d00b5]
762
+ - Updated dependencies [547e2e1]
763
+ - Updated dependencies [52b0b01]
764
+ - Updated dependencies
765
+ - Updated dependencies [ea32222]
766
+ - Updated dependencies [7ca66ce]
767
+ - Updated dependencies [57a1862]
768
+ - Updated dependencies [3e855bc]
769
+ - Updated dependencies [78d076a]
770
+ - Updated dependencies [ffd140f]
771
+ - Updated dependencies [e8842aa]
772
+ - Updated dependencies [b6dda09]
773
+ - Updated dependencies [0263827]
774
+ - Updated dependencies [8bd5bfe]
775
+ - Updated dependencies [2231ef8]
776
+ - Updated dependencies [c7bbc41]
777
+ - Updated dependencies [52b0b01]
778
+ - Updated dependencies [52b0b01]
779
+ - Updated dependencies [52b0b01]
780
+ - Updated dependencies [52b0b01]
781
+ - effect-app@4.0.0
782
+
783
+ ## 4.0.0-beta.333
784
+
785
+ ### Patch Changes
786
+
787
+ - Updated dependencies [e2d00b5]
788
+ - effect-app@4.0.0-beta.333
789
+
790
+ ## 4.0.0-beta.332
791
+
792
+ ### Patch Changes
793
+
794
+ - Updated dependencies [6b57330]
795
+ - effect-app@4.0.0-beta.332
796
+
797
+ ## 4.0.0-beta.331
798
+
799
+ ### Patch Changes
800
+
801
+ - 65835a6: Create missing Cosmos containers without throughput when the account is serverless (offer read/replace returns 400). Provisioned databases still get autoscale when configured.
802
+ - effect-app@4.0.0-beta.331
803
+
804
+ ## 4.0.0-beta.330
805
+
806
+ ### Patch Changes
807
+
808
+ - 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.
809
+
810
+ Memory projectors that assumed native Encoded `Date` / `Map` / `Set` values now see the stored JSON form (ISO strings, arrays).
811
+
812
+ - Updated dependencies [48d9f36]
813
+ - effect-app@4.0.0-beta.330
814
+
815
+ ## 4.0.0-beta.329
816
+
817
+ ### Patch Changes
818
+
819
+ - 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.
820
+ - Updated dependencies [459697f]
821
+ - effect-app@4.0.0-beta.329
822
+
823
+ ## 4.0.0-beta.328
824
+
825
+ ### Minor Changes
826
+
827
+ - 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.
828
+
829
+ ### Patch Changes
830
+
831
+ - Updated dependencies [3a8c710]
832
+ - effect-app@4.0.0-beta.328
833
+
834
+ ## 4.0.0-beta.327
835
+
836
+ ### Patch Changes
837
+
838
+ - ebffba8: Stop re-encoding store `defaultValues` in Cosmos and SQL query builders.
839
+
840
+ Stores already JSON-lower `defaultValues` at construction. A second schema encode of an ISO `Date` string throws `Expected a valid Date`, which failed `filter({ select: [id] })` even when the select path never decoded a document.
841
+
842
+ - effect-app@4.0.0-beta.327
843
+
844
+ ## 4.0.0-beta.326
845
+
846
+ ### Minor Changes
847
+
848
+ - 2ebf8ae: `jitM` runs at the store boundary as JSON → JSON, before the `toCodecJson(toEncoded(schema))` decode; repositories decode the Encoded shape only.
849
+
850
+ `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.
851
+
852
+ 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.
853
+
854
+ - `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`.
855
+ - `RepositoryOptions.jitM` changes type from `(pm: Encoded) => Encoded` to `(json: JsonRecord) => JsonRecord` and is forwarded into the store config.
856
+ - **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.
857
+ - The JSON→Encoded decode stays strict: a document `jitM` does not repair fails at the store boundary instead of being read back half-decoded.
858
+ - `ValidationError.jitMResult` is deprecated: `validateSample` only ever sees the store's output, so it is identical to `rawData`.
859
+
860
+ ### Patch Changes
861
+
862
+ - Updated dependencies [2ebf8ae]
863
+ - effect-app@4.0.0-beta.326
864
+
865
+ ## 4.0.0-beta.325
866
+
867
+ ### Patch Changes
868
+
869
+ - Updated dependencies [f233f3d]
870
+ - effect-app@4.0.0-beta.325
871
+
872
+ ## 4.0.0-beta.324
873
+
874
+ ### Patch Changes
875
+
876
+ - a0075b8: `generateFromSchema` advances its seed on every call, so successive samples differ (deterministic across runs) instead of always returning the same value.
877
+ - Updated dependencies [a0075b8]
878
+ - effect-app@4.0.0-beta.324
879
+
880
+ ## 4.0.0-beta.323
881
+
882
+ ### Minor Changes
883
+
884
+ - 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.
885
+
886
+ ### Patch Changes
887
+
888
+ - Updated dependencies [ab289d4]
889
+ - effect-app@4.0.0-beta.323
890
+
891
+ ## 4.0.0-beta.322
892
+
893
+ ### Patch Changes
894
+
895
+ - Updated dependencies [2231ef8]
896
+ - effect-app@4.0.0-beta.322
897
+
898
+ ## 4.0.0-beta.321
899
+
900
+ ### Patch Changes
901
+
902
+ - Updated dependencies [18bae5b]
903
+ - effect-app@4.0.0-beta.321
904
+
905
+ ## 4.0.0-beta.320
906
+
907
+ ### Patch Changes
908
+
909
+ - effect-app@4.0.0-beta.320
910
+
911
+ ## 4.0.0-beta.319
912
+
913
+ ### Patch Changes
914
+
915
+ - effect-app@4.0.0-beta.319
916
+
917
+ ## 4.0.0-beta.318
918
+
919
+ ### Patch Changes
920
+
921
+ - 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`.
922
+
923
+ API adaptations for rc.112:
924
+
925
+ - cluster encoded driver `resetAddress` → batched `resetAddresses`
926
+ - Cosmos `unprocessedMessages` honors optional `limit` / `addresses` (only claimed rows are returned)
927
+ - Service Bus `Runners.make` supplies `codecFor` for schema-aware RPC serialization
928
+ - `pnpm subtree:effect` passes `--url https://github.com/Effect-TS/effect.git` (published CLI still defaults to effect-smol)
929
+ - JSON Schema check constraints are compacted onto the parent (`minLength`/`maxLength` instead of `allOf`)
930
+
931
+ - Updated dependencies [8bd5bfe]
932
+ - effect-app@4.0.0-beta.318
933
+
934
+ ## 4.0.0-beta.317
935
+
936
+ ### Minor Changes
937
+
938
+ - 186de3a: Stop forcing Date/Map/Set Encoded shapes to JSON.
939
+
940
+ `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.
941
+
942
+ - 186de3a: Query maps as JSON arrays of `[key, value]` tuples.
943
+
944
+ `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.
945
+
946
+ - 186de3a: JSON stores lower native Encoded values (Date, Map, Set, and app types such as DateOnly) through the store's document schema.
947
+
948
+ `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.
949
+
950
+ ### Patch Changes
951
+
952
+ - 186de3a: Declare `@sentry/node` as a runtime dependency of `@effect-app/infra`. `errorReporter.ts` imports it statically, so `pnpm install --prod` of linked source (Docker) must install it next to the package, not only as a peer of the app.
953
+ - Updated dependencies [186de3a]
954
+ - Updated dependencies [186de3a]
955
+ - Updated dependencies [186de3a]
956
+ - effect-app@4.0.0-beta.317
957
+
958
+ ## 4.0.0-beta.316
959
+
960
+ ### Patch Changes
961
+
962
+ - effect-app@4.0.0-beta.316
963
+
964
+ ## 4.0.0-beta.315
965
+
966
+ ### Patch Changes
967
+
968
+ - effect-app@4.0.0-beta.315
969
+
970
+ ## 4.0.0-beta.314
971
+
972
+ ### Patch Changes
973
+
974
+ - effect-app@4.0.0-beta.314
975
+
976
+ ## 4.0.0-beta.313
977
+
978
+ ### Patch Changes
979
+
980
+ - effect-app@4.0.0-beta.313
981
+
982
+ ## 4.0.0-beta.312
983
+
984
+ ### Patch Changes
985
+
986
+ - Updated dependencies [9ea024d]
987
+ - effect-app@4.0.0-beta.312
988
+
989
+ ## 4.0.0-beta.311
990
+
991
+ ### Patch Changes
992
+
993
+ - 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).
994
+
995
+ API adaptations for beta.107:
996
+
997
+ - `concurrency: "inherit"` → `"unbounded"`
998
+ - `Schema.ErrorClass` / `TaggedErrorClass` → `Schema.Error` / `TaggedError`
999
+ - `Schema.LazyArbitrary` → `Schema.Arbitrary`
1000
+ - `Schema.DateValid` / `isDateValid` removed (`Schema.Date` rejects invalid dates)
1001
+ - `SchemaIssue` constructors no longer take `Option` (annotations + input)
1002
+ - filter meta via `annotations.representation` instead of `annotations.meta`
1003
+ - `context.defaultValue` → `context.constructorDefault` (single Link)
1004
+ - Class detection via `~constructor` + static `identifier`
1005
+ - Redacted detection via `representation.id`
1006
+ - localized StandardSchema hooks updated for new issue/input model
1007
+ - provide `NodeCrypto.layer` for cluster sqlite tests
1008
+ - default `sync-effect` subtree URL → `Effect-TS/effect`
1009
+
1010
+ - Updated dependencies [547e2e1]
1011
+ - effect-app@4.0.0-beta.311
1012
+
1013
+ ## 4.0.0-beta.310
1014
+
1015
+ ### Patch Changes
1016
+
1017
+ - effect-app@4.0.0-beta.310
1018
+
1019
+ ## 4.0.0-beta.309
1020
+
1021
+ ### Patch Changes
1022
+
1023
+ - Updated dependencies [99c43c4]
1024
+ - effect-app@4.0.0-beta.309
1025
+
1026
+ ## 4.0.0-beta.308
1027
+
1028
+ ### Patch Changes
1029
+
1030
+ - b4d5f55: fix DatabaseError typing
1031
+ - effect-app@4.0.0-beta.308
1032
+
1033
+ ## 4.0.0-beta.307
1034
+
1035
+ ### Patch Changes
1036
+
1037
+ - 40585ca: Keep tag-aware `ProjectableFromDomain` for `projectComputed` only; restore loose key-presence guard for `project()` so view DTOs with reshaped fields keep typechecking.
1038
+ - ad0ede6: Keep tag-aware `ProjectableGuard` on both `project()` and `projectComputed` (no loose key-only paper-over).
1039
+
1040
+ Hardening:
1041
+
1042
+ - single-literal tags allow dual same-tag domain variants (KeysOfUnion of matched members)
1043
+ - multi-tag / string tags still require keys on every matched member
1044
+ - optional projection/domain keys checked by key presence only (not optional-assignability)
1045
+
1046
+ Call sites must project domain-owned fields per tagged state.
1047
+
1048
+ - Updated dependencies [40585ca]
1049
+ - Updated dependencies [ad0ede6]
1050
+ - effect-app@4.0.0-beta.307
1051
+
1052
+ ## 4.0.0-beta.306
1053
+
1054
+ ### Patch Changes
1055
+
1056
+ - 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`.
1057
+ - Updated dependencies [0fe925d]
1058
+ - effect-app@4.0.0-beta.306
1059
+
1060
+ ## 4.0.0-beta.305
1061
+
1062
+ ### Patch Changes
1063
+
1064
+ - 8bd9a11: Support ID-scoped signal dependencies and additive repository dependencies derived from previous and current entities.
1065
+ - Updated dependencies [8bd9a11]
1066
+ - effect-app@4.0.0-beta.305
1067
+
1068
+ ## 4.0.0-beta.304
1069
+
1070
+ ### Patch Changes
1071
+
1072
+ - Updated dependencies [412f08b]
1073
+ - effect-app@4.0.0-beta.304
1074
+
1075
+ ## 4.0.0-beta.303
1076
+
1077
+ ### Patch Changes
1078
+
1079
+ - 33b0544: Replace repository codec child spans with parent-span timing attributes and bounded metrics, and record database operation timing for instrumented stores.
1080
+ - Updated dependencies [33b0544]
1081
+ - effect-app@4.0.0-beta.303
1082
+
1083
+ ## 4.0.0-beta.302
1084
+
1085
+ ### Patch Changes
1086
+
1087
+ - Updated dependencies [c0e5a1b]
1088
+ - effect-app@4.0.0-beta.302
1089
+
1090
+ ## 4.0.0-beta.301
1091
+
1092
+ ### Patch Changes
1093
+
1094
+ - effect-app@4.0.0-beta.301
1095
+
1096
+ ## 4.0.0-beta.300
1097
+
1098
+ ### Patch Changes
1099
+
1100
+ - effect-app@4.0.0-beta.300
1101
+
1102
+ ## 4.0.0-beta.299
1103
+
1104
+ ### Patch Changes
1105
+
1106
+ - effect-app@4.0.0-beta.299
1107
+
1108
+ ## 4.0.0-beta.298
1109
+
1110
+ ### Patch Changes
1111
+
1112
+ - Updated dependencies [08d092c]
1113
+ - effect-app@4.0.0-beta.298
1114
+
1115
+ ## 4.0.0-beta.297
1116
+
1117
+ ### Patch Changes
1118
+
1119
+ - Updated dependencies [30c512d]
1120
+ - effect-app@4.0.0-beta.297
1121
+
1122
+ ## 4.0.0-beta.296
1123
+
1124
+ ### Patch Changes
1125
+
1126
+ - Updated dependencies [e0c4835]
1127
+ - effect-app@4.0.0-beta.296
1128
+
1129
+ ## 4.0.0-beta.295
1130
+
1131
+ ### Patch Changes
1132
+
1133
+ - eb06b32: improve root union select
1134
+ - Updated dependencies [eb06b32]
1135
+ - effect-app@4.0.0-beta.295
1136
+
1137
+ ## 4.0.0-beta.294
1138
+
1139
+ ### Patch Changes
1140
+
1141
+ - Updated dependencies [a211c12]
1142
+ - effect-app@4.0.0-beta.294
1143
+
1144
+ ## 4.0.0-beta.293
1145
+
1146
+ ### Patch Changes
1147
+
1148
+ - Updated dependencies [d1c15d3]
1149
+ - effect-app@4.0.0-beta.293
1150
+
1151
+ ## 4.0.0-beta.292
1152
+
1153
+ ### Patch Changes
1154
+
1155
+ - effect-app@4.0.0-beta.292
1156
+
1157
+ ## 4.0.0-beta.291
1158
+
1159
+ ### Patch Changes
1160
+
1161
+ - 848d26d: Capture more of the rpc request payload in the `rpc.request.payload` span
1162
+ attribute.
1163
+
1164
+ The summarizer was one level deep: top-level scalars were kept, but any nested
1165
+ object collapsed to `Object[N]` and any array to `Array[N]`, hiding useful
1166
+ inputs (carrier, packageType, dimensions, ids, per-item amounts, …).
1167
+
1168
+ It now recurses into nested objects up to `PAYLOAD_MAX_DEPTH` (4) and samples
1169
+ arrays to their first `PAYLOAD_ARRAY_HEAD` (20) elements, appending a `…N more`
1170
+ marker when longer — so item arrays stay diagnosable without dumping the whole
1171
+ tail on high-frequency commands. Long strings are still snipped at 256 chars,
1172
+ and `password`/`secret`/`token` keys are redacted at any depth (previously only
1173
+ a top-level `password`).
1174
+
1175
+ - effect-app@4.0.0-beta.291
1176
+
1177
+ ## 4.0.0-beta.290
1178
+
1179
+ ### Patch Changes
1180
+
1181
+ - Updated dependencies [dc07df5]
1182
+ - effect-app@4.0.0-beta.290
1183
+
1184
+ ## 4.0.0-beta.289
1185
+
1186
+ ### Patch Changes
1187
+
1188
+ - Updated dependencies [a1b59bc]
1189
+ - effect-app@4.0.0-beta.289
1190
+
1191
+ ## 4.0.0-beta.288
1192
+
1193
+ ### Patch Changes
1194
+
1195
+ - Updated dependencies [aeb17bc]
1196
+ - effect-app@4.0.0-beta.288
1197
+
1198
+ ## 4.0.0-beta.287
1199
+
1200
+ ### Patch Changes
1201
+
1202
+ - Updated dependencies [261470f]
1203
+ - effect-app@4.0.0-beta.287
1204
+
1205
+ ## 4.0.0-beta.286
1206
+
1207
+ ### Patch Changes
1208
+
1209
+ - 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.
1210
+ - Updated dependencies [b6dda09]
1211
+ - effect-app@4.0.0-beta.286
1212
+
1213
+ ## 4.0.0-beta.285
1214
+
1215
+ ### Patch Changes
1216
+
1217
+ - 7bd8234: Use set-backed data dependencies and provide request-scoped dependency services through a shared root-checked helper.
1218
+ - Updated dependencies [7bd8234]
1219
+ - effect-app@4.0.0-beta.285
1220
+
1221
+ ## 4.0.0-beta.284
1222
+
1223
+ ### Patch Changes
1224
+
1225
+ - dd239fa: fix atom invalidation
1226
+ - effect-app@4.0.0-beta.284
1227
+
1228
+ ## 4.0.0-beta.283
1229
+
1230
+ ### Minor Changes
1231
+
1232
+ - 0054611: Derive query invalidation from repository read/write dependencies and propagate dependency metadata through RPC clients.
1233
+
1234
+ ### Patch Changes
1235
+
1236
+ - 0054611: Stream RPC: drain read/write data-dependencies per emitted value chunk instead of sending the
1237
+ cumulative set on every metadata chunk. Each metadata chunk now carries only the delta recorded
1238
+ since the last chunk, the bucket is cleared for the next segment, and the terminal "done"/"error"
1239
+ chunks drain the remainder. The emit condition also broadens to include non-empty reads, so stream
1240
+ queries forward their read-dependencies mid-stream too. The client already accumulates deltas into
1241
+ its per-call recorder, so no FE change is required.
1242
+ - Updated dependencies [0054611]
1243
+ - Updated dependencies [0054611]
1244
+ - effect-app@4.0.0-beta.283
1245
+
1246
+ ## 4.0.0-beta.282
1247
+
1248
+ ### Patch Changes
1249
+
1250
+ - b2df3fa: Align `Schema.Void` with TypeScript `void` return-value semantics (effect-smol PR #2475 / `b7d46ab`).
1251
+
1252
+ `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.
1253
+
1254
+ - New `effect-app/SchemaAST` module; internal `SchemaAST` imports across the libs now route through it.
1255
+ - Removed `ForceVoid` from `effect-app/client/makeClient` — use `S.Void` directly, which now carries this behaviour.
1256
+ - `S.Void_` remains available as effect's original (`undefined`-only) Void.
1257
+
1258
+ - 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.
1259
+ - 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.
1260
+ - Updated dependencies [b2df3fa]
1261
+ - Updated dependencies [f150cf9]
1262
+ - Updated dependencies [e8842aa]
1263
+ - effect-app@4.0.0-beta.282
1264
+
1265
+ ## 4.0.0-beta.281
1266
+
1267
+ ### Patch Changes
1268
+
1269
+ - 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.
1270
+ - Updated dependencies [ffd140f]
1271
+ - effect-app@4.0.0-beta.281
1272
+
1273
+ ## 4.0.0-beta.280
1274
+
1275
+ ### Patch Changes
1276
+
1277
+ - Updated dependencies [3eda52e]
1278
+ - effect-app@4.0.0-beta.280
1279
+
1280
+ ## 4.0.0-beta.279
1281
+
1282
+ ### Patch Changes
1283
+
1284
+ - Updated dependencies [5f9cd6a]
1285
+ - effect-app@4.0.0-beta.279
1286
+
1287
+ ## 4.0.0-beta.278
1288
+
1289
+ ### Patch Changes
1290
+
1291
+ - a354345: Move release tsconfig flattening from publish to pack lifecycle so package configs are restored before registry upload/auth can fail.
1292
+ - a69da09: Publish from generated staging directories so release-only files are created outside the source package tree.
1293
+ - Updated dependencies [a354345]
1294
+ - Updated dependencies [a69da09]
1295
+ - effect-app@4.0.0-beta.278
1296
+
1297
+ ## 4.0.0-beta.277
1298
+
1299
+ ### Patch Changes
1300
+
1301
+ - effect-app@4.0.0-beta.277
1302
+
1303
+ ## 4.0.0-beta.276
1304
+
1305
+ ### Patch Changes
1306
+
1307
+ - 32f05c8: Remove unused dependency declarations from package manifests.
1308
+ - Updated dependencies [32f05c8]
1309
+ - effect-app@4.0.0-beta.276
1310
+
1311
+ ## 4.0.0-beta.275
1312
+
1313
+ ### Patch Changes
1314
+
1315
+ - effect-app@4.0.0-beta.275
1316
+
1317
+ ## 4.0.0-beta.274
1318
+
1319
+ ### Patch Changes
1320
+
1321
+ - effect-app@4.0.0-beta.274
1322
+
1323
+ ## 4.0.0-beta.273
1324
+
1325
+ ### Patch Changes
1326
+
1327
+ - Updated dependencies [664e83d]
1328
+ - Updated dependencies [e4ff9a6]
1329
+ - effect-app@4.0.0-beta.273
1330
+
1331
+ ## 4.0.0-beta.272
1332
+
1333
+ ### Patch Changes
1334
+
1335
+ - Updated dependencies [21ac90a]
1336
+ - effect-app@4.0.0-beta.272
1337
+
1338
+ ## 4.0.0-beta.271
1339
+
1340
+ ### Patch Changes
1341
+
1342
+ - Updated dependencies [939bebc]
1343
+ - effect-app@4.0.0-beta.271
1344
+
1345
+ ## 4.0.0-beta.270
1346
+
1347
+ ### Patch Changes
1348
+
1349
+ - 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`).
1350
+ - Updated dependencies [78d076a]
1351
+ - effect-app@4.0.0-beta.270
1352
+
1353
+ ## 4.0.0-beta.269
1354
+
1355
+ ### Patch Changes
1356
+
1357
+ - Updated dependencies [50b022e]
1358
+ - Updated dependencies [50b022e]
1359
+ - effect-app@4.0.0-beta.269
1360
+
1361
+ ## 4.0.0-beta.268
1362
+
1363
+ ### Patch Changes
1364
+
1365
+ - 38289e0: Break the circular dependency between the memory store and code filter modules.
1366
+ - acfdc9e: Point development package exports at TypeScript sources while keeping published exports on compiled dist files.
1367
+ - Updated dependencies [acfdc9e]
1368
+ - effect-app@4.0.0-beta.268
1369
+
1370
+ ## 4.0.0-beta.267
1371
+
1372
+ ### Minor Changes
1373
+
1374
+ - 23a7167: Add a typed, serializable `DatabaseError { message, transient, cause }` for store adapter failures.
1375
+
1376
+ 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`.
1377
+
1378
+ ### Patch Changes
1379
+
1380
+ - Updated dependencies [23a7167]
1381
+ - effect-app@4.0.0-beta.267
1382
+
1383
+ ## 4.0.0-beta.266
1384
+
1385
+ ### Patch Changes
1386
+
1387
+ - Updated dependencies [bbaa67e]
1388
+ - effect-app@4.0.0-beta.266
1389
+
1390
+ ## 4.0.0-beta.265
1391
+
1392
+ ### Patch Changes
1393
+
1394
+ - fce6ee9: Fix machine-id allocation in the Cosmos cluster `RunnerStorage`. It derived the machine id from a 31-multiplier string hash of the runner address, so two distinct runners could hash to the same value mod 1024 — and since the machine id feeds the Snowflake generator mod 1024, those runners would emit colliding Snowflake ids (corrupting request/reply identity across the cluster).
1395
+
1396
+ Machine ids are now allocated from a single counter document via an atomic server-side `incr`, mirroring SQL's auto-increment `machine_id` primary key: unique across distinct runners and stable per address (a re-registering runner reuses its persisted id). Verified against a live Cosmos account.
1397
+
1398
+ - be3300d: Fix correctness bugs in the Cosmos `WorkflowEngine`, found by running the adapter against a real Cosmos account. The Cosmos workflow engine now passes the same conformance suite as the in-memory and SQLite engines.
1399
+
1400
+ - **OCC conflicts were fatal.** `replaceExec` used `Effect.promise` + a `statusCode` check, but single-item Cosmos `replace` _throws_ on 409/412/404 (only `read` and batch ops surface the code), so every conflict became an unrecoverable defect and the `OptimisticConcurrencyException` catch was dead code. It now uses `Effect.tryPromise` and matches the thrown error (mirrors `ClusterCosmos`), so lease claims, completions, and interrupts lose gracefully under contention.
1401
+ - **Illegal resource ids.** Activity/deferred/clock doc ids embedded workflow/deferred names containing `/`, which Cosmos rejects. Ids are now URI-encoded via `cosmosId` (mirrors `ClusterCosmos`).
1402
+ - **Interrupt could be lost under Cosmos latency.** A concurrent `interrupt` racing a suspending driver's `onComplete` could have its `interrupted` flag swallowed (OCC) or downgraded, leaving the re-drive unable to collapse the suspension. `interrupt`/`interruptUnsafe` now persist the flag with OCC retry (`markInterrupted`), and `onComplete` never downgrades a persisted `interrupted: true`.
1403
+ - **`execute` now drives unconditionally** (matching SQLite), letting `drive`'s own guard short-circuit a running/completed fiber and re-drive a suspended one, instead of skipping re-drive when a stale local entry existed.
1404
+
1405
+ - 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`.
1406
+
1407
+ Adapt the infra workflow engines to beta.83 API changes:
1408
+
1409
+ - `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`).
1410
+ - `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).
1411
+
1412
+ - Updated dependencies [3e855bc]
1413
+ - effect-app@4.0.0-beta.265
1414
+
1415
+ ## 4.0.0-beta.264
1416
+
1417
+ ### Patch Changes
1418
+
1419
+ - 1587bfc: Batch more Cosmos cluster storage updates.
1420
+ - effect-app@4.0.0-beta.264
1421
+
1422
+ ## 4.0.0-beta.263
1423
+
1424
+ ### Patch Changes
1425
+
1426
+ - abb9c99: Batch Cosmos ack message processing updates.
1427
+ - effect-app@4.0.0-beta.263
1428
+
1429
+ ## 4.0.0-beta.262
1430
+
1431
+ ### Patch Changes
1432
+
1433
+ - 55c6572: update packages
1434
+ - Updated dependencies [55c6572]
1435
+ - effect-app@4.0.0-beta.262
1436
+
1437
+ ## 4.0.0-beta.261
1438
+
1439
+ ### Patch Changes
1440
+
1441
+ - c31c673: Tighten Cosmos cluster OCC handling for concurrent node polling.
1442
+ - effect-app@4.0.0-beta.261
1443
+
1444
+ ## 4.0.0-beta.260
1445
+
1446
+ ### Patch Changes
1447
+
1448
+ - bogus
1449
+ - Updated dependencies
1450
+ - effect-app@4.0.0-beta.260
1451
+
1452
+ ## 4.0.0-beta.259
1453
+
1454
+ ### Minor Changes
1455
+
1456
+ - 6884a32: Add Azure Service Bus topic notifications for persisted cluster storage polling.
1457
+
1458
+ ### Patch Changes
1459
+
1460
+ - 6821fc5: Add Cosmos DB backed storage layers for Effect Cluster message and runner state.
1461
+ - b6cb25b: Fix Cosmos cluster workflow resume after durable deferred completion.
1462
+ - effect-app@4.0.0-beta.259
1463
+
1464
+ ## 4.0.0-beta.258
1465
+
1466
+ ### Minor Changes
1467
+
1468
+ - 0520dd4: Add Cosmos DB backed `WorkflowEngine` adapter (`layerCosmos` in `WorkflowEngineCosmos.ts`). Persists workflow state in a single container partitioned by `executionId` so per-execution writes share a partition key (TransactionalBatch-eligible). Optimistic concurrency via `_etag` + `IfMatch` on Replace; first-writer-wins via create-only batch ops for activity results and durable-deferred completions; a persisted _suspended_ activity is overwritten via upsert on resume. Values crossing the storage boundary round-trip through `Schema` codecs (`S.fromJsonString(S.toCodecJson(...))`) using the workflow's own `payloadSchema` / `successSchema` / `errorSchema` for typed values, and the cluster engine's opaque `AnyOrVoid` codec for activity / deferred payloads. Includes time-bound lease + heartbeat fiber, scope-bound recovery poller for crashed-driver takeover, and cross-partition clock poller for restart-survivable durable timers.
1469
+ - 0ddda6f: Add SQLite backed `WorkflowEngine` adapter (`layerSqlite` in `WorkflowEngineSqlite.ts`). Persists workflow state across `workflow_exec` / `workflow_activity` / `workflow_deferred` / `workflow_clock` tables via `SqlClient`. Uses `sql.withTransaction` for atomicity, etag-based optimistic concurrency (`UPDATE ... WHERE etag = ? RETURNING etag`), and `INSERT ... ON CONFLICT DO NOTHING RETURNING` for first-writer-wins on activity / deferred / clock writes. Values crossing the storage boundary round-trip through `Schema` codecs (`S.fromJsonString(S.toCodecJson(...))`) using the workflow's own `payloadSchema` / `successSchema` / `errorSchema` for typed values, and the cluster engine's opaque `AnyOrVoid` codec for activity / deferred payloads. Includes time-bound lease + heartbeat fiber, scope-bound recovery poller for crashed-driver takeover, and cross-partition clock poller for restart-survivable durable timers.
1470
+
1471
+ ### Patch Changes
1472
+
1473
+ - effect-app@4.0.0-beta.258
1474
+
1475
+ ## 4.0.0-beta.257
1476
+
1477
+ ### Patch Changes
1478
+
1479
+ - Updated dependencies [e71eb78]
1480
+ - effect-app@4.0.0-beta.257
1481
+
1482
+ ## 4.0.0-beta.256
1483
+
1484
+ ### Patch Changes
1485
+
1486
+ - Updated dependencies [347af48]
1487
+ - effect-app@4.0.0-beta.256
1488
+
1489
+ ## 4.0.0-beta.255
1490
+
1491
+ ### Patch Changes
1492
+
1493
+ - Updated dependencies [52a31dd]
1494
+ - effect-app@4.0.0-beta.255
1495
+
1496
+ ## 4.0.0-beta.254
1497
+
1498
+ ### Patch Changes
1499
+
1500
+ - Updated dependencies [29a1e57]
1501
+ - effect-app@4.0.0-beta.254
1502
+
1503
+ ## 4.0.0-beta.253
1504
+
1505
+ ### Patch Changes
1506
+
1507
+ - Updated dependencies [b90fa30]
1508
+ - effect-app@4.0.0-beta.253
1509
+
1510
+ ## 4.0.0-beta.252
1511
+
1512
+ ### Patch Changes
1513
+
1514
+ - Updated dependencies [a788432]
1515
+ - effect-app@4.0.0-beta.252
1516
+
1517
+ ## 4.0.0-beta.251
1518
+
1519
+ ### Patch Changes
1520
+
1521
+ - 1c858d3: fix request scope problems
1522
+ - Updated dependencies [1c858d3]
1523
+ - effect-app@4.0.0-beta.251
1524
+
1525
+ ## 4.0.0-beta.250
1526
+
1527
+ ### Patch Changes
1528
+
1529
+ - 3053760: fix: restore context map container behavior
1530
+ - Updated dependencies [3053760]
1531
+ - effect-app@4.0.0-beta.250
1532
+
1533
+ ## 4.0.0-beta.249
1534
+
1535
+ ### Major Changes
1536
+
1537
+ - 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.
1538
+
1539
+ `@effect-app/infra` no longer re-exports moved core modules such as `./Model`, `./Emailer/service`, `./QueueMaker/service`, `./Store/service`, `./adapters/*`, or `./api/*` entrypoints.
1540
+
1541
+ ### Patch Changes
1542
+
1543
+ - Updated dependencies [ba789a2]
1544
+ - effect-app@4.0.0-beta.249
1545
+
1546
+ ## 4.0.0-beta.248
1547
+
1548
+ ### Patch Changes
1549
+
1550
+ - 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`).
1551
+
1552
+ 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*`).
1553
+
1554
+ - Updated dependencies [2a86a17]
1555
+ - effect-app@4.0.0-beta.248
1556
+
1557
+ ## 4.0.0-beta.247
1558
+
1559
+ ### Patch Changes
1560
+
1561
+ - Updated dependencies [01bab22]
1562
+ - effect-app@4.0.0-beta.247
1563
+
1564
+ ## 4.0.0-beta.246
1565
+
1566
+ ### Patch Changes
1567
+
1568
+ - f4b58cd: Add `cachedPerRequest` helper to `ContextMapContainer`. Runs a given Effect at most once per ContextMap (i.e. per request) and stores the result in the ContextMap under a fresh symbol, using the ContextMap's shared semaphore for safe single initialization. Use as a building block for any per-request memoized value (request resolver caches, per-request `Cache.make` instances, etc.).
1569
+ - effect-app@4.0.0-beta.246
1570
+
1571
+ ## 4.0.0-beta.245
1572
+
1573
+ ### Patch Changes
1574
+
1575
+ - effect-app@4.0.0-beta.245
1576
+
1577
+ ## 4.0.0-beta.244
1578
+
1579
+ ### Patch Changes
1580
+
1581
+ - b8b9080: update packages
1582
+ - Updated dependencies [b8b9080]
1583
+ - effect-app@4.0.0-beta.244
1584
+
1585
+ ## 4.0.0-beta.243
1586
+
1587
+ ### Patch Changes
1588
+
1589
+ - 8eb6737: Wrap `CUPS` exec failures in tagged `CUPSError` instead of `UnknownException`.
1590
+
1591
+ Retains `command`, `message`, exit `code`, `signal`, `killed`, `stdout`,
1592
+ `stderr`, and original `cause` from the underlying `child_process.exec`
1593
+ rejection so callers can branch on real failure detail.
1594
+
1595
+ - effect-app@4.0.0-beta.243
1596
+
1597
+ ## 4.0.0-beta.242
1598
+
1599
+ ### Patch Changes
1600
+
1601
+ - Updated dependencies [da83c1f]
1602
+ - Updated dependencies [21017d5]
1603
+ - Updated dependencies [2495ace]
1604
+ - effect-app@4.0.0-beta.242
1605
+
1606
+ ## 4.0.0-beta.241
1607
+
1608
+ ### Patch Changes
1609
+
1610
+ - Updated dependencies [b035b1c]
1611
+ - effect-app@4.0.0-beta.241
1612
+
1613
+ ## 4.0.0-beta.240
1614
+
1615
+ ### Patch Changes
1616
+
1617
+ - c5e348f: Fix `provideOnRequestScope` leaking a single `ContextMap` across concurrent requests.
1618
+
1619
+ `Layer.buildWithScope(layer, requestScope)` resolves its `MemoMap` from the
1620
+ ambient fiber context, which lives on the HTTP server fiber and is therefore
1621
+ shared by every request that server handles. With the resulting memoization,
1622
+ the first request to land on a freshly-started server built
1623
+ `ContextMapContainer.layer` once; every subsequent overlapping request received
1624
+ the same `ContextMap` instance — etags written by one request were observed
1625
+ (or overwritten) by another, and the finalizer was anchored to the first
1626
+ request's scope.
1627
+
1628
+ `provideOnRequestScope` now allocates a fresh `MemoMap` per call via
1629
+ `Layer.makeMemoMap` and builds with `Layer.buildWithMemoMap(layer, memoMap,
1630
+ requestScope)`. Each request gets its own `ContextMap`, the request-scope
1631
+ binding from the earlier SSE fix is preserved, and the finalizer still only
1632
+ fires once the response body has fully drained.
1633
+
1634
+ Adds regression coverage in `rpc-context-map-streaming.test.ts` for three
1635
+ properties: mid-stream survival of ContextMap state, a fresh map on each
1636
+ succeeding request, and isolation between overlapping concurrent requests.
1637
+
1638
+ - effect-app@4.0.0-beta.240
1639
+
1640
+ ## 4.0.0-beta.239
1641
+
1642
+ ### Patch Changes
1643
+
1644
+ - bb3f51d: Fix ContextMap finalizer running mid-stream on SSE responses. SSE handler now binds ContextMapContainer to the request scope via a shared `provideOnRequestScope` helper (also used by `RequestContextMiddleware`), so finalizers only run after the response body is fully drained. Adds `setupStreamingRequestContextFromCurrent` for use by streaming HTTP handlers.
1645
+ - effect-app@4.0.0-beta.239
1646
+
1647
+ ## 4.0.0-beta.238
1648
+
1649
+ ### Patch Changes
1650
+
1651
+ - b63f10f: fix: nasty request scope bug
1652
+ - effect-app@4.0.0-beta.238
1653
+
1654
+ ## 4.0.0-beta.237
1655
+
1656
+ ### Patch Changes
1657
+
1658
+ - 3cf0c42: Fix `ContextMap` memory leak: tie its lifecycle to the request scope.
1659
+
1660
+ `ContextMapContainer.layer` provides a fresh `ContextMap` per request via `Layer.effect`, but the inner `etags` and `store` maps were never released. Cached `RequestResolver` entries (and anything they closed over) stayed reachable as long as any fiber held a reference to the map, even after the request scope closed.
1661
+
1662
+ `ContextMap` is now built with `Effect.acquireRelease`, and `makeContextMap` exposes a `clear()` finalizer that empties both maps when the request scope closes. `Layer.effect` strips the `Scope` requirement automatically in Effect v4.
1663
+
1664
+ - effect-app@4.0.0-beta.237
1665
+
1666
+ ## 4.0.0-beta.236
1667
+
1668
+ ### Patch Changes
1669
+
1670
+ - effect-app@4.0.0-beta.236
1671
+
1672
+ ## 4.0.0-beta.235
1673
+
1674
+ ### Patch Changes
1675
+
1676
+ - 6cfd83d: update effect to latest beta
1677
+ - Updated dependencies [ba4bdc3]
1678
+ - Updated dependencies [6cfd83d]
1679
+ - effect-app@4.0.0-beta.235
1680
+
1681
+ ## 4.0.0-beta.234
1682
+
1683
+ ### Patch Changes
1684
+
1685
+ - effect-app@4.0.0-beta.234
1686
+
1687
+ ## 4.0.0-beta.233
1688
+
1689
+ ### Patch Changes
1690
+
1691
+ - 57a1862: Update to effect 4.0.0-beta.67. Switch deps from `pkg.pr.new` snapshot back to npm beta tag.
1692
+ - Updated dependencies [57a1862]
1693
+ - effect-app@4.0.0-beta.233
1694
+
1695
+ ## 4.0.0-beta.232
1696
+
1697
+ ### Patch Changes
1698
+
1699
+ - 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).
1700
+ - Updated dependencies [0263827]
1701
+ - Updated dependencies [0263827]
1702
+ - Updated dependencies [0263827]
1703
+ - effect-app@4.0.0-beta.232
1704
+
1705
+ ## 4.0.0-beta.231
1706
+
1707
+ ### Patch Changes
1708
+
1709
+ - 7ca66ce: Update to effect 4.0.0-beta.66. Remove `Yieldable` and `asEffect()` (service tags are now `Effect` directly).
1710
+ - Updated dependencies [7ca66ce]
1711
+ - effect-app@4.0.0-beta.231
1712
+
1713
+ ## 4.0.0-beta.230
1714
+
1715
+ ### Minor Changes
1716
+
1717
+ - 1cee480: Add aggregate query support: `Q.aggregate(schema, aggregateMap)` performs GROUP BY + aggregate functions at the database level (Memory, SQL, Cosmos).
1718
+
1719
+ - New `agg` DSL namespace: `agg.field(path)` (group-by), `agg.count()`, `agg.countWhen(op)`, `agg.sum(field)`, `agg.min(field)`, `agg.max(field)`
1720
+ - New `aggregate(schema, aggregateMap)` query operator replaces in-memory grouping with a single DB-level query
1721
+ - Memory store: pure JS group-by + aggregation
1722
+ - SQL store: `GROUP BY` + `COUNT(CASE WHEN ...)` / `SUM` / `MIN` / `MAX`
1723
+ - Cosmos store: `GROUP BY` + `SUM(IIF(...))` for conditional counts
1724
+
1725
+ ### Patch Changes
1726
+
1727
+ - effect-app@4.0.0-beta.230
1728
+
1729
+ ## 4.0.0-beta.229
1730
+
1731
+ ### Patch Changes
1732
+
1733
+ - effect-app@4.0.0-beta.229
1734
+
1735
+ ## 4.0.0-beta.228
1736
+
1737
+ ### Patch Changes
1738
+
1739
+ - effect-app@4.0.0-beta.228
1740
+
1741
+ ## 4.0.0-beta.227
1742
+
1743
+ ### Patch Changes
1744
+
1745
+ - bac9f1a: Fix Cosmos `projectComputed` parameter index shift when `relation(...).every(...)` is present. The shared filter `print` was invoked twice per `relation-every` (once eagerly for the `where` variable, again inside the `NOT EXISTS(... WHERE NOT (...))` branch), bumping the outer `@v` counter beyond the bound parameter array and producing SQL that referenced unbound placeholders — queries returned 0 rows on Cosmos while SQLite/Memory adapters were unaffected.
1746
+ - effect-app@4.0.0-beta.227
1747
+
1748
+ ## 4.0.0-beta.226
1749
+
1750
+ ### Patch Changes
1751
+
1752
+ - f7290aa: Add `relation(...).length()` computed projection — emits `ARRAY_LENGTH` on Cosmos / `arrayLength` on SQL / native `.length` on Memory. Cheaper than `relation.count()` for unconditional array sizing (no subquery scan, just metadata read).
1753
+
1754
+ ```ts
1755
+ projectComputed(
1756
+ S.Struct({ id: S.String, packageCount: S.NonNegativeInt }),
1757
+ computed({ packageCount: relation<OrderEnc>("packages").length() })
1758
+ );
1759
+ ```
1760
+
1761
+ - 8062ad3: Unify Emailer `sendMail` spans across implementations. `Fake.sendMail` and `Sendgrid.sendMail` now both emit as `Emailer.sendMail` with OTel-standard `messaging.system` attribute (`"fake"` / `"sendgrid"`).
1762
+ - effect-app@4.0.0-beta.226
1763
+
1764
+ ## 4.0.0-beta.225
1765
+
1766
+ ### Patch Changes
1767
+
1768
+ - 39996f7: Unify `parseMany` span variants under a single span name. The four prior spans (`parseMany`, `parseMany2`, `parseManyProject`, `parseManyCollect`) now all emit as `parseMany` with `app.entity` and `app.query.mode` attributes (`"transform" | "project" | "collect"`). Reuses the same attribute key already set on the parent `Repository.query` span for consistency. `parseManyProject`/`parseManyCollect` previously lacked `app.entity` — now included.
1769
+ - effect-app@4.0.0-beta.225
1770
+
1771
+ ## 4.0.0-beta.224
1772
+
1773
+ ### Patch Changes
1774
+
1775
+ - effect-app@4.0.0-beta.224
1776
+
1777
+ ## 4.0.0-beta.223
1778
+
1779
+ ### Patch Changes
1780
+
1781
+ - 2871841: RequestContextMiddleware: set request name to `HTTP <method> <path>` (strip query string) for clearer span/trace names.
1782
+ - effect-app@4.0.0-beta.223
1783
+
1784
+ ## 4.0.0-beta.222
1785
+
1786
+ ### Patch Changes
1787
+
1788
+ - effect-app@4.0.0-beta.222
1789
+
1790
+ ## 4.0.0-beta.221
1791
+
1792
+ ### Patch Changes
1793
+
1794
+ - 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"`).
1795
+ - Updated dependencies [439cbeb]
1796
+ - effect-app@4.0.0-beta.221
1797
+
1798
+ ## 4.0.0-beta.220
1799
+
1800
+ ### Patch Changes
1801
+
1802
+ - aa436d3: fix bs span
1803
+ - effect-app@4.0.0-beta.220
1804
+
1805
+ ## 4.0.0-beta.219
1806
+
1807
+ ### Patch Changes
1808
+
1809
+ - 13c2fd9: doc span
1810
+ - d738811: remove double prefix
1811
+ - 724da29: replace useless span
1812
+ - Updated dependencies [d738811]
1813
+ - effect-app@4.0.0-beta.219
1814
+
1815
+ ## 4.0.0-beta.218
1816
+
1817
+ ### Minor Changes
1818
+
1819
+ - 95995d5: Add `collectFields`/`collectDistinctFields` to `relation()` DSL for collecting values from multiple fields of relation items into a single flattened array.
1820
+
1821
+ Example: given `T = { a: boolean, items: { x: string, y: string, z: number }[] }[]`, you can now collect all distinct `x` and `y` values into a single `string[]`:
1822
+
1823
+ ```ts
1824
+ relation("items").collectDistinctFields(["x", "y"]);
1825
+ ```
1826
+
1827
+ ### Patch Changes
1828
+
1829
+ - effect-app@4.0.0-beta.218
1830
+
1831
+ ## 4.0.0-beta.217
1832
+
1833
+ ### Patch Changes
1834
+
1835
+ - e3ceaba: Add computed projection expression sums with grouped and normalized variants for projectComputed relation aggregations.
1836
+ - Updated dependencies [0e824ef]
1837
+ - effect-app@4.0.0-beta.217
1838
+
1839
+ ## 4.0.0-beta.216
1840
+
1841
+ ### Patch Changes
1842
+
1843
+ - f28fce5: fix sqlite
1844
+ - effect-app@4.0.0-beta.216
1845
+
1846
+ ## 4.0.0-beta.215
1847
+
1848
+ ### Patch Changes
1849
+
1850
+ - 24f5dd0: fix memory computation
1851
+ - effect-app@4.0.0-beta.215
1852
+
1853
+ ## 4.0.0-beta.214
1854
+
1855
+ ### Minor Changes
1856
+
1857
+ - fb93244: Extend computed projections with additional relation operators:
1858
+
1859
+ - `relation(path).every(op)` — boolean, all elements match the filter (compiled as `NOT EXISTS(... WHERE NOT (filter))`).
1860
+ - `relation(path).distinctCount(field, op?)` — distinct count of values at `field` within the relation.
1861
+ - `relation(path).sum(field, op?)` — numeric sum over a relation field.
1862
+ - `relation(path).collect(field, op?)` / `collectDistinct(field, op?)` — collect values into an array (with optional dedup).
1863
+
1864
+ All operators compile to native subqueries on SQL (sqlite/pg) and Cosmos, and to in-memory equivalents on the Memory store.
1865
+
1866
+ ### Patch Changes
1867
+
1868
+ - effect-app@4.0.0-beta.214
1869
+
1870
+ ## 4.0.0-beta.213
1871
+
1872
+ ### Minor Changes
1873
+
1874
+ - aac6308: Add computed projections for repository queries with adapter-level compilation for memory, SQL, and Cosmos stores.
1875
+
1876
+ ### Patch Changes
1877
+
1878
+ - 6613f3d: Document `Q.project` modes (`transform` / `project` / `collect`): how `select` is derived from the schema AST, the PM reverse-mapping behaviour per mode, and which decode errors surface vs `orDie`.
1879
+ - effect-app@4.0.0-beta.213
1880
+
1881
+ ## 4.0.0-beta.212
1882
+
1883
+ ### Patch Changes
1884
+
1885
+ - Updated dependencies [8792221]
1886
+ - effect-app@4.0.0-beta.212
1887
+
1888
+ ## 4.0.0-beta.211
1889
+
1890
+ ### Patch Changes
1891
+
1892
+ - ebbb799: Repository owns OTel span topology; store adapters annotate db._ semconv attrs on the current span instead of opening their own child spans. Eliminates 1-1 nested span chains (e.g. `Repository.query` → `Cosmos.filter`). Adds `annotateDb` helper alongside `withDbSpan` in `otel.ts`. Repo public ops (`find`, `all`, `query`, `queryRaw`, `mapped._`) get explicit `Repository.<op>` spans; internal codec steps (`encodeMany`, `parseMany`, `parseMany2`) keep bare names. `validateSample`opens per-iteration sub-spans to prevent attribute clobber. Adds WeakMap decoder cache for`parseMany2` schemas.
1893
+ - e33f1eb: Drop OTel spans from ServiceBus client/sender/receiver/subscription lifecycle wrappers; keep `withLogSpan` + info logs only. Removes high-cardinality `sessionId` from log span names; promotes it to `messaging.session.id` log attribute via `Effect.annotateLogs`.
1894
+ - effect-app@4.0.0-beta.211
1895
+
1896
+ ## 4.0.0-beta.210
1897
+
1898
+ ### Minor Changes
1899
+
1900
+ - 3a588e4: Standardize span attributes on OpenTelemetry semantic conventions.
1901
+
1902
+ All Store adapters (Cosmos, PostgreSQL, SQLite, Memory, Disk) and Queue adapters
1903
+ (Service Bus, SQL, Memory) now emit OTel-compliant span names and attributes via
1904
+ the new `@effect-app/infra/otel` helper module.
1905
+
1906
+ Span name convention: `<operation> <collection|destination>` (low cardinality).
1907
+
1908
+ Attribute key migration:
1909
+
1910
+ | Old | New |
1911
+ | --------------------------------------------------- | --------------------------------------------------------------------------------- |
1912
+ | `repository.table_name` / `repository.container_id` | `db.collection.name` |
1913
+ | `repository.namespace` | `db.namespace` |
1914
+ | `repository.model_name` / `itemType` | `app.entity` |
1915
+ | `id` / `itemId` (entity span attr) | `app.entity.id` |
1916
+ | `itemIds` | `app.entity.ids` |
1917
+ | `db.cosmos.request_charge` | `azure.cosmosdb.operation.request_charge` |
1918
+ | `db.cosmos.resource_count` | `db.response.returned_rows` |
1919
+ | `db.cosmos.response_bytes` | `db.response.body.size` |
1920
+ | `disk.file` / `disk.file_size` | `disk.file.path` / `disk.file.size` |
1921
+ | `queue.name` | `messaging.destination.name` |
1922
+ | `queue.sessionId` | `messaging.message.conversation_id` |
1923
+ | `queue.type` | `messaging.system` |
1924
+ | `queue.input` (full body) | `messaging.message.body` (+ `messaging.message.id`, `messaging.message.type`) |
1925
+ | `message_tags` | `messaging.message.types` + `messaging.batch.message_count` |
1926
+ | `request.name` | `code.function.name` (from `spanAttributes`) / `rpc.method` (middleware) |
1927
+ | `request.locale` | `app.locale` |
1928
+ | `request.namespace` | `app.tenant.id` |
1929
+ | `request.source.id` | `client.id` |
1930
+ | `request.user.sub` / `.roles` | `user.id` / `user.roles` |
1931
+ | `requestInput` | `rpc.request.payload` |
1932
+ | `connectionId` | `network.connection.id` |
1933
+ | Span `Request.<module>.<method>` | Span `<module>/<method>` + `rpc.system`/`rpc.service`/`rpc.method` (kind: server) |
1934
+ | `<spanPrefix>.<op>` (SQL/Model) | OTel db span via `withDbSpan`, with `dbSystem?` option |
1935
+
1936
+ New attributes added:
1937
+
1938
+ - `db.system.name` — e.g. `postgresql`, `sqlite`, `cosmosdb`, `memory`, `disk`
1939
+ - `db.operation.name` — e.g. `find`, `all`, `filter`, `set`
1940
+ - `db.query.text` — sanitized / parameterized SQL or Cosmos query (no bound values)
1941
+ - `messaging.operation.name` — `publish`, `process`, `receive`
1942
+
1943
+ Breaking: dashboards/alerts keying on the previous attribute names must be
1944
+ updated. Queue consumer spans no longer log raw message bodies — use
1945
+ `messaging.message.id` and `messaging.message.type` instead.
1946
+
1947
+ ### Patch Changes
1948
+
1949
+ - effect-app@4.0.0-beta.210
1950
+
1951
+ ## 4.0.0-beta.209
1952
+
1953
+ ### Patch Changes
1954
+
1955
+ - c991be1: update packages
1956
+ - Updated dependencies [c991be1]
1957
+ - Updated dependencies [3bae238]
1958
+ - effect-app@4.0.0-beta.209
1959
+
1960
+ ## 4.0.0-beta.208
1961
+
1962
+ ### Patch Changes
1963
+
1964
+ - effect-app@4.0.0-beta.208
1965
+
1966
+ ## 4.0.0-beta.207
1967
+
1968
+ ### Patch Changes
1969
+
1970
+ - b0db40f: Router handlers are now discriminated by `Resource[K]["stream"]`:
1971
+
1972
+ - Stream resources (`stream: true`) accept only `(req) => Stream<...>` handlers.
1973
+ - Non-stream resources accept only `(req) => Effect<...>` (or generator yielding `Yieldable`).
1974
+
1975
+ Mixing — e.g. returning `Effect.fail(...)` or `Effect<Stream<...>>` from a stream handler — no longer type-checks.
1976
+
1977
+ The runtime `Stream.unwrap` branch that lifted `Effect`/`Effect<Stream>` returns into a `Stream` is removed; handlers for stream resources must return a `Stream` directly. Migrate `Effect.gen(...).pipe(Stream.unwrap)` patterns by returning the `Stream` directly, and convert `Effect.fail(err)` in stream handlers to `Stream.fail(err)`.
1978
+
1979
+ - Updated dependencies [8fffc3c]
1980
+ - effect-app@4.0.0-beta.207
1981
+
1982
+ ## 4.0.0-beta.206
1983
+
1984
+ ### Patch Changes
1985
+
1986
+ - 54bfc59: Require middleware to flow through `makeRpcClient` and the live layer through `makeRouter`.
1987
+
1988
+ ### `makeRpcClient(middleware, generalErrors?)`
1989
+
1990
+ 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.
1991
+
1992
+ **Migration**:
1993
+
1994
+ ```diff
1995
+ -makeRpcClient(RequestContextMap, undefined, AppMiddleware)
1996
+ +makeRpcClient(AppMiddleware)
1997
+ ```
1998
+
1999
+ For tests/clients without a real middleware, build a minimal stub (`{ requestContextMap, requestContext }`) or pass any value satisfying `ClientMiddleware<RCM>`.
2000
+
2001
+ ### `makeRouter(middlewareLive)`
2002
+
2003
+ `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.
2004
+
2005
+ **Migration**:
2006
+
2007
+ ```diff
2008
+ -export const { Router, matchAll } = makeRouter()
2009
+ +export const { Router, matchAll } = makeRouter(AppMiddleware.Default)
2010
+ ```
2011
+
2012
+ - Updated dependencies [54bfc59]
2013
+ - effect-app@4.0.0-beta.206
2014
+
2015
+ ## 4.0.0-beta.205
2016
+
2017
+ ### Patch Changes
2018
+
2019
+ - Updated dependencies [f313973]
2020
+ - effect-app@4.0.0-beta.205
2021
+
2022
+ ## 4.0.0-beta.204
2023
+
2024
+ ### Patch Changes
2025
+
2026
+ - Updated dependencies [0a0030f]
2027
+ - effect-app@4.0.0-beta.204
2028
+
2029
+ ## 4.0.0-beta.203
2030
+
2031
+ ### Patch Changes
2032
+
2033
+ - Updated dependencies [992d9fa]
2034
+ - effect-app@4.0.0-beta.203
2035
+
2036
+ ## 4.0.0-beta.202
2037
+
2038
+ ### Patch Changes
2039
+
2040
+ - Updated dependencies [1186b09]
2041
+ - effect-app@4.0.0-beta.202
2042
+
2043
+ ## 4.0.0-beta.201
2044
+
2045
+ ### Patch Changes
2046
+
2047
+ - 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.
2048
+
2049
+ ### Resource error schemas
2050
+
2051
+ Three sites that used to fold `RequestContextMap[*].error` into a request's own error schema now stop doing so:
2052
+
2053
+ - `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).
2054
+ - `MiddlewareMaker.rpc()` — `error: options.error` only; the previous union with `rcm.config[*].error` is gone.
2055
+ - Routing and `apiClientFactory.makeRpcGroupFromRequestsAndModuleName` — `Invalidation.makeCommandRpc` is called with `error: resource.error` (no widening with the composite middleware error union).
2056
+
2057
+ 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:
2058
+
2059
+ - **Server**: `makeRouter(middleware)` attaches the live composite tag (existing behavior).
2060
+ - **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.
2061
+
2062
+ **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.
2063
+
2064
+ ### Invalidation wrap/unwrap
2065
+
2066
+ - `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.
2067
+ - `apiClientFactory.ts` (client) `unwrapCommand` strips both envelopes and forwards keys to `InvalidationKeysFromServer`.
2068
+ - `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.
2069
+
2070
+ 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.
2071
+
2072
+ - Updated dependencies [d67d17a]
2073
+ - effect-app@4.0.0-beta.201
2074
+
2075
+ ## 4.0.0-beta.200
2076
+
2077
+ ### Patch Changes
2078
+
2079
+ - 0cff7c1: workaround middleware error issue
2080
+ - Updated dependencies [8f1cf6a]
2081
+ - Updated dependencies [0cff7c1]
2082
+ - effect-app@4.0.0-beta.200
2083
+
2084
+ ## 4.0.0-beta.199
2085
+
2086
+ ### Patch Changes
2087
+
2088
+ - de9fb83: Annotate Cosmos read spans with response size, resource count, and request charge.
2089
+
2090
+ `Cosmos.queryRaw`, `Cosmos.all`, `Cosmos.filter`, and `Cosmos.find` now set `db.cosmos.request_charge`, `db.cosmos.response_bytes`, and (where applicable) `db.cosmos.resource_count` on the active span. Bytes are sourced from `diagnostics.clientSideRequestStatistics.totalResponsePayloadLengthInBytes` — no payload stringification.
2091
+
2092
+ - effect-app@4.0.0-beta.199
2093
+
2094
+ ## 4.0.0-beta.198
2095
+
2096
+ ### Patch Changes
2097
+
2098
+ - 32dbc54: fix stream type when no success specified
2099
+ - Updated dependencies [32dbc54]
2100
+ - effect-app@4.0.0-beta.198
2101
+
2102
+ ## 4.0.0-beta.197
2103
+
2104
+ ### Minor Changes
2105
+
2106
+ - 3dc0d2a: Add streaming as a `stream: true` config option on `Query` / `Command` instead of a separate request type.
2107
+
2108
+ `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).
2109
+
2110
+ ```ts
2111
+ // Query that streams results
2112
+ Req.Query<T>()("Tag", {}, { stream: true, success: ... })
2113
+
2114
+ // Command that streams results
2115
+ Req.Command<T>()("Tag", {}, { stream: true, success: ... })
2116
+ ```
2117
+
2118
+ Vue client mapping (per-handler properties mirror the non-stream API — `.query`, `.fn`, `.mutate`):
2119
+
2120
+ - `query` + `stream: true` → exposes `.query` (read-only streaming, tracked Vue Query). Helper map key: `${name}Query`.
2121
+ - `command` + `stream: true` → exposes `.fn` and `.mutate` (mutating streaming).
2122
+ - Plain `query` / `command` unchanged.
2123
+
2124
+ Server routing dispatches via the new `stream` flag (`makeStreamRpc` for streaming commands/queries, `makeCommandRpc` / `Rpc.make` otherwise).
2125
+
2126
+ 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.
2127
+
2128
+ **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.
2129
+
2130
+ ### Patch Changes
2131
+
2132
+ - Updated dependencies [3dc0d2a]
2133
+ - effect-app@4.0.0-beta.197
2134
+
2135
+ ## 4.0.0-beta.196
2136
+
2137
+ ### Patch Changes
2138
+
2139
+ - effect-app@4.0.0-beta.196
2140
+
2141
+ ## 4.0.0-beta.195
2142
+
2143
+ ### Patch Changes
2144
+
2145
+ - 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.
2146
+
2147
+ 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`.
2148
+
2149
+ `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".
2150
+
2151
+ 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.
2152
+
2153
+ - Updated dependencies [774a9b3]
2154
+ - effect-app@4.0.0-beta.195
2155
+
2156
+ ## 4.0.0-beta.194
2157
+
2158
+ ### Patch Changes
2159
+
2160
+ - effect-app@4.0.0-beta.194
2161
+
2162
+ ## 4.0.0-beta.193
2163
+
2164
+ ### Patch Changes
2165
+
2166
+ - 9569911: Stream resources accept `Effect.fail(...)` (and `Effect<Stream>`) from controller handlers — previously only `Stream.fail(...)` / a returned `Stream` worked. The router now lifts an Effect result to a Stream via `Stream.unwrap`, so failures from an `Effect` propagate as a failing Stream on the client, matching `Stream.fail(...)` behavior. Also removes the need for manual `.pipe(Stream.unwrap)` on generator handlers that return a `Stream`.
2167
+ - effect-app@4.0.0-beta.193
2168
+
2169
+ ## 4.0.0-beta.192
2170
+
2171
+ ### Patch Changes
2172
+
2173
+ - dba5779: namespaces
2174
+ - effect-app@4.0.0-beta.192
2175
+
2176
+ ## 4.0.0-beta.191
2177
+
2178
+ ### Patch Changes
2179
+
2180
+ - 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`.
2181
+ - Updated dependencies [50ce7e6]
2182
+ - effect-app@4.0.0-beta.191
2183
+
2184
+ ## 4.0.0-beta.190
2185
+
2186
+ ### Patch Changes
2187
+
2188
+ - Updated dependencies [985176b]
2189
+ - effect-app@4.0.0-beta.190
2190
+
2191
+ ## 4.0.0-beta.189
2192
+
2193
+ ### Patch Changes
2194
+
2195
+ - 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.
2196
+ - Updated dependencies [ea32222]
2197
+ - effect-app@4.0.0-beta.189
2198
+
2199
+ ## 4.0.0-beta.188
2200
+
2201
+ ### Patch Changes
2202
+
2203
+ - b2e438f: Remove Operations service and repo
2204
+ - Updated dependencies [b2e438f]
2205
+ - effect-app@4.0.0-beta.188
2206
+
2207
+ ## 4.0.0-beta.187
2208
+
2209
+ ### Patch Changes
2210
+
2211
+ - Updated dependencies [0d4e0b8]
2212
+ - effect-app@4.0.0-beta.187
2213
+
2214
+ ## 4.0.0-beta.186
2215
+
2216
+ ### Patch Changes
2217
+
2218
+ - effect-app@4.0.0-beta.186
2219
+
2220
+ ## 4.0.0-beta.185
2221
+
2222
+ ### Patch Changes
2223
+
2224
+ - effect-app@4.0.0-beta.185
2225
+
2226
+ ## 4.0.0-beta.184
2227
+
2228
+ ### Patch Changes
2229
+
2230
+ - effect-app@4.0.0-beta.184
2231
+
2232
+ ## 4.0.0-beta.183
2233
+
2234
+ ### Patch Changes
2235
+
2236
+ - effect-app@4.0.0-beta.183
2237
+
2238
+ ## 4.0.0-beta.182
2239
+
2240
+ ### Patch Changes
2241
+
2242
+ - effect-app@4.0.0-beta.182
2243
+
2244
+ ## 4.0.0-beta.181
2245
+
2246
+ ### Patch Changes
2247
+
2248
+ - Updated dependencies [583393f]
2249
+ - effect-app@4.0.0-beta.181
2250
+
2251
+ ## 4.0.0-beta.180
2252
+
2253
+ ### Minor Changes
2254
+
2255
+ - 7fa3045: V1/V2/V3: stream and command requests carry invalidation metadata
2256
+
2257
+ **V1** – stream final response includes metadata
2258
+
2259
+ - `Invalidation.StreamResponseChunk` wraps each stream item as `{ _tag: "value", value }` and appends `{ _tag: "done", metadata }` at the end carrying all accumulated invalidation keys.
2260
+
2261
+ **V2** – invalidation keys included in failures
2262
+
2263
+ - `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.
2264
+ - `InvalidationMiddlewareLive` wraps command failures; `routing.ts` wraps stream failures.
2265
+ - `apiClientFactory.ts` unwraps both on the client side, forwarding keys before re-failing with the original error.
2266
+
2267
+ **V3** – mid-stream metadata chunks
2268
+
2269
+ - `Invalidation.StreamResponseChunk` now also includes `{ _tag: "metadata", metadata }` for mid-stream invalidation.
2270
+ - 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`).
2271
+ - `apiClientFactory.ts` processes "metadata" chunks the same as "done" chunks, forwarding keys to `InvalidationKeysFromServer` immediately.
2272
+ - `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.
2273
+
2274
+ ### Patch Changes
2275
+
2276
+ - Updated dependencies [7fa3045]
2277
+ - effect-app@4.0.0-beta.180
2278
+
2279
+ ## 4.0.0-beta.179
2280
+
2281
+ ### Patch Changes
2282
+
2283
+ - Updated dependencies [828d264]
2284
+ - effect-app@4.0.0-beta.179
2285
+
2286
+ ## 4.0.0-beta.178
2287
+
2288
+ ### Patch Changes
2289
+
2290
+ - effect-app@4.0.0-beta.178
2291
+
2292
+ ## 4.0.0-beta.177
2293
+
2294
+ ### Minor Changes
2295
+
2296
+ - 89d8b3a: Add Effect RPC `Stream` support to the wrapper.
2297
+
2298
+ - New `Stream` request constructor on `TaggedRequestFor` parallel to `Query`/`Command`. Emits resources with `type: "stream"`.
2299
+ - 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).
2300
+ - 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.
2301
+ - New `RequestStreamHandler` / `RequestStreamHandlerWithInput` shapes in `clientFor.ts`; `RequestHandlers` dispatches on `type: "stream"`.
2302
+
2303
+ ### Patch Changes
2304
+
2305
+ - Updated dependencies [89d8b3a]
2306
+ - effect-app@4.0.0-beta.177
2307
+
2308
+ ## 4.0.0-beta.176
2309
+
2310
+ ### Patch Changes
2311
+
2312
+ - pass options
2313
+ - Updated dependencies
2314
+ - effect-app@4.0.0-beta.176
2315
+
2316
+ ## 4.0.0-beta.175
2317
+
2318
+ ### Patch Changes
2319
+
2320
+ - effect-app@4.0.0-beta.175
2321
+
2322
+ ## 4.0.0-beta.174
2323
+
2324
+ ### Minor Changes
2325
+
2326
+ - 821468d: Add server-driven cache invalidation via RPC response headers.
2327
+
2328
+ - `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.
2329
+ - `effect-app/middleware`: new `InvalidationMiddleware` RPC middleware tag; included in `DefaultGenericMiddlewares`.
2330
+ - `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`.
2331
+ - `@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.
2332
+ - `@effect-app/vue`: `invalidateQueries` / `useMutation` now reads server-provided invalidation keys from `InvalidationKeysFromServer` after each mutation and applies them alongside the client-side invalidation.
2333
+
2334
+ ### Patch Changes
2335
+
2336
+ - Updated dependencies [821468d]
2337
+ - effect-app@4.0.0-beta.174
2338
+
2339
+ ## 4.0.0-beta.173
2340
+
2341
+ ### Patch Changes
2342
+
2343
+ - effect-app@4.0.0-beta.173
2344
+
2345
+ ## 4.0.0-beta.172
2346
+
2347
+ ### Patch Changes
2348
+
2349
+ - improve sentry
2350
+ - effect-app@4.0.0-beta.172
2351
+
2352
+ ## 4.0.0-beta.171
2353
+
2354
+ ### Patch Changes
2355
+
2356
+ - Updated dependencies [d71d976]
2357
+ - effect-app@4.0.0-beta.171
2358
+
2359
+ ## 4.0.0-beta.170
2360
+
2361
+ ### Patch Changes
2362
+
2363
+ - Updated dependencies [8f09f77]
2364
+ - effect-app@4.0.0-beta.170
2365
+
2366
+ ## 4.0.0-beta.169
2367
+
2368
+ ### Patch Changes
2369
+
2370
+ - Updated dependencies [8ae8b53]
2371
+ - effect-app@4.0.0-beta.169
2372
+
2373
+ ## 4.0.0-beta.168
2374
+
2375
+ ### Patch Changes
2376
+
2377
+ - Updated dependencies [178480a]
2378
+ - effect-app@4.0.0-beta.168
2379
+
2380
+ ## 4.0.0-beta.167
2381
+
2382
+ ### Patch Changes
2383
+
2384
+ - Updated dependencies [140e192]
2385
+ - effect-app@4.0.0-beta.167
2386
+
2387
+ ## 4.0.0-beta.166
2388
+
2389
+ ### Patch Changes
2390
+
2391
+ - Updated dependencies [dbcc53b]
2392
+ - effect-app@4.0.0-beta.166
2393
+
2394
+ ## 4.0.0-beta.165
2395
+
2396
+ ### Patch Changes
2397
+
2398
+ - Updated dependencies [f88ea34]
2399
+ - effect-app@4.0.0-beta.165
2400
+
2401
+ ## 4.0.0-beta.164
2402
+
2403
+ ### Patch Changes
2404
+
2405
+ - Updated dependencies [8cb3de4]
2406
+ - effect-app@4.0.0-beta.164
2407
+
2408
+ ## 4.0.0-beta.163
2409
+
2410
+ ### Patch Changes
2411
+
2412
+ - Updated dependencies [b952f19]
2413
+ - effect-app@4.0.0-beta.163
2414
+
2415
+ ## 4.0.0-beta.162
2416
+
2417
+ ### Patch Changes
2418
+
2419
+ - Updated dependencies [b52b424]
2420
+ - effect-app@4.0.0-beta.162
2421
+
2422
+ ## 4.0.0-beta.161
2423
+
2424
+ ### Patch Changes
2425
+
2426
+ - effect-app@4.0.0-beta.161
2427
+
2428
+ ## 4.0.0-beta.160
2429
+
2430
+ ### Patch Changes
2431
+
2432
+ - 505bfa9: Add concurrent decode helper APIs and migrate decode callsites to use them.
2433
+
2434
+ - Add `withDefaultParseOptions` and keep `DefaultParseOptions` centralized.
2435
+ - Export `decodeEffectConcurrently` and `decodeUnknownEffectConcurrently` from Schema and SchemaParser modules.
2436
+ - Update repository, queue, client, form, and CLI decode paths to use concurrent decode helpers.
2437
+ - Keep schema constructors free of hardcoded parse concurrency overrides.
2438
+
2439
+ - Updated dependencies [505bfa9]
2440
+ - effect-app@4.0.0-beta.160
2441
+
2442
+ ## 4.0.0-beta.159
2443
+
2444
+ ### Patch Changes
2445
+
2446
+ - c1e73de:
2447
+ - Updated dependencies [c1e73de]
2448
+ - effect-app@4.0.0-beta.159
2449
+
2450
+ ## 4.0.0-beta.158
2451
+
2452
+ ### Patch Changes
2453
+
2454
+ - Updated dependencies [3c1f52d]
2455
+ - Updated dependencies [6ae3050]
2456
+ - effect-app@4.0.0-beta.158
2457
+
2458
+ ## 4.0.0-beta.157
2459
+
2460
+ ### Patch Changes
2461
+
2462
+ - 6fff09c: unify encoded function for when you use encodedKeys
2463
+ - Updated dependencies [6fff09c]
2464
+ - effect-app@4.0.0-beta.157
2465
+
2466
+ ## 4.0.0-beta.156
2467
+
2468
+ ### Patch Changes
2469
+
2470
+ - effect-app@4.0.0-beta.156
2471
+
2472
+ ## 4.0.0-beta.155
2473
+
2474
+ ### Patch Changes
2475
+
2476
+ - Updated dependencies [c215db8]
2477
+ - effect-app@4.0.0-beta.155
2478
+
2479
+ ## 4.0.0-beta.154
2480
+
2481
+ ### Patch Changes
2482
+
2483
+ - effect-app@4.0.0-beta.154
2484
+
2485
+ ## 4.0.0-beta.153
2486
+
2487
+ ### Patch Changes
2488
+
2489
+ - effect-app@4.0.0-beta.153
2490
+
2491
+ ## 4.0.0-beta.152
2492
+
2493
+ ### Patch Changes
2494
+
2495
+ - effect-app@4.0.0-beta.152
2496
+
2497
+ ## 4.0.0-beta.151
2498
+
2499
+ ### Patch Changes
2500
+
2501
+ - 925214b: update packages
2502
+ - effect-app@4.0.0-beta.151
2503
+
2504
+ ## 4.0.0-beta.150
2505
+
2506
+ ### Patch Changes
2507
+
2508
+ - Updated dependencies [85a8275]
2509
+ - effect-app@4.0.0-beta.150
2510
+
2511
+ ## 4.0.0-beta.149
2512
+
2513
+ ### Patch Changes
2514
+
2515
+ - Updated dependencies [f317c5e]
2516
+ - effect-app@4.0.0-beta.149
2517
+
2518
+ ## 4.0.0-beta.148
2519
+
2520
+ ### Patch Changes
2521
+
2522
+ - Updated dependencies [199e9a5]
2523
+ - effect-app@4.0.0-beta.148
2524
+
2525
+ ## 4.0.0-beta.147
2526
+
2527
+ ### Patch Changes
2528
+
2529
+ - Updated dependencies [47e3742]
2530
+ - effect-app@4.0.0-beta.147
2531
+
2532
+ ## 4.0.0-beta.146
2533
+
2534
+ ### Patch Changes
2535
+
2536
+ - Updated dependencies [a4dff57]
2537
+ - effect-app@4.0.0-beta.146
2538
+
2539
+ ## 4.0.0-beta.145
2540
+
2541
+ ### Patch Changes
2542
+
2543
+ - Updated dependencies [12abb55]
2544
+ - effect-app@4.0.0-beta.145
2545
+
2546
+ ## 4.0.0-beta.144
2547
+
2548
+ ### Patch Changes
2549
+
2550
+ - d31253f: Refactor eligible schema classes and tagged classes to Opaque schemas, and migrate constructor call sites to use `.make` for those models.
2551
+ - Updated dependencies [11422f8]
2552
+ - Updated dependencies [d31253f]
2553
+ - effect-app@4.0.0-beta.144
2554
+
2555
+ ## 4.0.0-beta.143
2556
+
2557
+ ### Patch Changes
2558
+
2559
+ - Updated dependencies [79eb019]
2560
+ - effect-app@4.0.0-beta.143
2561
+
2562
+ ## 4.0.0-beta.142
2563
+
2564
+ ### Patch Changes
2565
+
2566
+ - Updated dependencies [3436d44]
2567
+ - Updated dependencies [025de47]
2568
+ - effect-app@4.0.0-beta.142
2569
+
2570
+ ## 4.0.0-beta.141
2571
+
2572
+ ### Patch Changes
2573
+
2574
+ - Updated dependencies [7c25dbb]
2575
+ - effect-app@4.0.0-beta.141
2576
+
2577
+ ## 4.0.0-beta.140
2578
+
2579
+ ### Patch Changes
2580
+
2581
+ - 1576688: Add configurable `fakeMailAddress` to `SendgridConfig`. Supports `{i}` placeholder for unique addresses, e.g. `"test+{i}@example.com"`.
2582
+ - effect-app@4.0.0-beta.140
2583
+
2584
+ ## 4.0.0-beta.139
2585
+
2586
+ ### Patch Changes
2587
+
2588
+ - effect-app@4.0.0-beta.139
2589
+
2590
+ ## 4.0.0-beta.138
2591
+
2592
+ ### Patch Changes
2593
+
2594
+ - effect-app@4.0.0-beta.138
2595
+
2596
+ ## 4.0.0-beta.137
2597
+
2598
+ ### Patch Changes
2599
+
2600
+ - effect-app@4.0.0-beta.137
2601
+
2602
+ ## 4.0.0-beta.136
2603
+
2604
+ ### Patch Changes
2605
+
2606
+ - effect-app@4.0.0-beta.136
2607
+
2608
+ ## 4.0.0-beta.135
2609
+
2610
+ ### Patch Changes
2611
+
2612
+ - Updated dependencies [c7bbc41]
2613
+ - effect-app@4.0.0-beta.135
2614
+
2615
+ ## 4.0.0-beta.134
2616
+
2617
+ ### Patch Changes
2618
+
2619
+ - eed57c6: Fix `R` inference in `OneDSL`, `OneDSLExt.modify` and `OneDSLExt.update`. The callback's effect type was annotated as `Effect<…, E, FixEnv<R, Evt, S1, S2>>`, which deadlocked inference of `R` (TS6 fell back to `never`, tsgo to `unknown`, leaking `unknown` into yielded effects in generator handlers). Now matches the existing `AllDSLExt` pattern: bare `R` in the callback, `FixEnv<R, …>` only in the return type.
2620
+ - Updated dependencies [9d3495e]
2621
+ - Updated dependencies [f353d48]
2622
+ - effect-app@4.0.0-beta.134
2623
+
2624
+ ## 4.0.0-beta.133
2625
+
2626
+ ### Patch Changes
2627
+
2628
+ - 2f862a4: Apply `toCodecJson` in `SQLModel.JsonFromString` so SQL JSON string fields use the proper JSON-safe codec at the encode/decode boundary (aligns with queue, event, and gist call sites).
2629
+ - c3299f7: update packages
2630
+ - Updated dependencies [c3299f7]
2631
+ - effect-app@4.0.0-beta.133
2632
+
2633
+ ## 4.0.0-beta.132
2634
+
2635
+ ### Patch Changes
2636
+
2637
+ - effect-app@4.0.0-beta.132
2638
+
2639
+ ## 4.0.0-beta.131
2640
+
2641
+ ### Patch Changes
2642
+
2643
+ - 4a7d95a: Use request-type RPC annotations to drive interruptibility and retry behavior, apply command uninterruptibility through the router wrapper path, and add an in-memory E2E test covering command vs query interruption behavior.
2644
+ - effect-app@4.0.0-beta.131
2645
+
2646
+ ## 4.0.0-beta.130
2647
+
2648
+ ### Patch Changes
2649
+
2650
+ - Updated dependencies [ea1bd46]
2651
+ - effect-app@4.0.0-beta.130
2652
+
2653
+ ## 4.0.0-beta.129
2654
+
2655
+ ### Patch Changes
2656
+
2657
+ - effect-app@4.0.0-beta.129
2658
+
2659
+ ## 4.0.0-beta.128
2660
+
2661
+ ### Patch Changes
2662
+
2663
+ - Updated dependencies [57db551]
2664
+ - effect-app@4.0.0-beta.128
2665
+
2666
+ ## 4.0.0-beta.127
2667
+
2668
+ ### Patch Changes
2669
+
2670
+ - 71a0719: Merge `batchPar` into `batch`, expose `concurrency` via an optional `BatchOptions` argument, and make `batch` dual (data-first + data-last).
2671
+ - 4bc3d05: Repository `save`, `remove`, and `removeById` now accept plain `ReadonlyArray` instead of `NonEmptyReadonlyArray`. Callers no longer need to narrow or guard for non-emptiness before invoking — empty inputs short-circuit to a no-op, making it ergonomic to pass through query results directly.
2672
+ - effect-app@4.0.0-beta.127
2673
+
2674
+ ## 4.0.0-beta.126
2675
+
2676
+ ### Patch Changes
2677
+
2678
+ - Updated dependencies [458bb1b]
2679
+ - effect-app@4.0.0-beta.126
2680
+
2681
+ ## 4.0.0-beta.125
2682
+
2683
+ ### Patch Changes
2684
+
2685
+ - 7191fc1: `removeById` now takes `id | NonEmptyReadonlyArray<id>` instead of a variadic rest, and the extended repo's `removeById` accepts a `batch` option to chunk large deletes — consistent with `save` and `remove`.
2686
+ - effect-app@4.0.0-beta.125
2687
+
2688
+ ## 4.0.0-beta.124
2689
+
2690
+ ### Patch Changes
2691
+
2692
+ - c9e0c44: cleanup auth
2693
+ - 256ae85: cleanup
2694
+ - Updated dependencies [256ae85]
2695
+ - effect-app@4.0.0-beta.124
2696
+
2697
+ ## 4.0.0-beta.123
2698
+
2699
+ ### Patch Changes
2700
+
2701
+ - Updated dependencies [14aba14]
2702
+ - effect-app@4.0.0-beta.123
2703
+
2704
+ ## 4.0.0-beta.122
2705
+
2706
+ ### Patch Changes
2707
+
2708
+ - 27bf9b6: Fix `Repository.query` environment typing to exclude schema context provided through `makeRepo` options.
2709
+ - e02a258: Add optional batching overloads for repository `save` and `remove` helpers.
2710
+ - f052d38: Replace `(...) => Effect.gen` with `Effect.fnUntraced` and convert select multi-step `pipe` chains to `Effect.gen` across infra.
2711
+ - Updated dependencies [f052d38]
2712
+ - effect-app@4.0.0-beta.122
2713
+
2714
+ ## 4.0.0-beta.121
2715
+
2716
+ ### Patch Changes
2717
+
2718
+ - 1015582: Fix `Q.project` field selection with `Schema.encodeKeys` by deriving selected fields from the encoded schema shape.
2719
+ - Updated dependencies [5ac46cb]
2720
+ - effect-app@4.0.0-beta.121
2721
+
2722
+ ## 4.0.0-beta.120
2723
+
2724
+ ### Patch Changes
2725
+
2726
+ - Updated dependencies [f21190c]
2727
+ - effect-app@4.0.0-beta.120
2728
+
2729
+ ## 4.0.0-beta.119
2730
+
2731
+ ### Patch Changes
2732
+
2733
+ - db7ba34: Filter SSE events stream by storeId namespace
2734
+ - effect-app@4.0.0-beta.119
2735
+
2736
+ ## 4.0.0-beta.118
2737
+
2738
+ ### Patch Changes
2739
+
2740
+ - Update effect packages to 4.0.0-beta.52
2741
+ - Updated dependencies [bd26832]
2742
+ - Updated dependencies [08d2e70]
2743
+ - Updated dependencies
2744
+ - effect-app@4.0.0-beta.118
2745
+
2746
+ ## 4.0.0-beta.117
2747
+
2748
+ ### Patch Changes
2749
+
2750
+ - 1d85785: Wrap store seed effects with `Effect.uninterruptible` to prevent interruption during seeding
2751
+ - effect-app@4.0.0-beta.117
2752
+
2753
+ ## 4.0.0-beta.116
2754
+
2755
+ ### Patch Changes
2756
+
2757
+ - 7d5cefc: SQL and Pg stores now scope seed migration records by namespace and table name in shared databases to avoid cross-namespace seed collisions.
2758
+ - effect-app@4.0.0-beta.116
2759
+
2760
+ ## 4.0.0-beta.115
2761
+
2762
+ ### Patch Changes
2763
+
2764
+ - fe2caba: SQL and Pg stores: use separate `_migrations` table for seed tracking instead of inserting a marker row into the data table, preventing it from appearing in `all`/`filter` queries.
2765
+ - effect-app@4.0.0-beta.115
2766
+
2767
+ ## 4.0.0-beta.114
2768
+
2769
+ ### Patch Changes
2770
+
2771
+ - 1ab3cf7: SQLite per-namespace adapter: use separate `_migrations` table for seed tracking instead of inserting a marker row into the data table, preventing it from appearing in `all`/`filter` queries.
2772
+ - effect-app@4.0.0-beta.114
2773
+
2774
+ ## 4.0.0-beta.113
2775
+
2776
+ ### Minor Changes
2777
+
2778
+ - ddc5492: Add RepositoryRegistry service that tracks all repositories by modelName, with `seedNamespace` to seed all registered repos in parallel and `entries` to inspect the registry.
2779
+
2780
+ Make non-primary namespace seeding explicit: Store and Repository now expose `seedNamespace` instead of auto-seeding on access. Primary namespace is still seeded eagerly on initialization.
2781
+
2782
+ SQL stores: table creation (`CREATE TABLE IF NOT EXISTS`) is now part of `seedNamespace` instead of running eagerly at store construction, ensuring tables for non-primary namespaces are only created when explicitly seeded.
2783
+
2784
+ ### Patch Changes
2785
+
2786
+ - effect-app@4.0.0-beta.113
2787
+
2788
+ ## 4.0.0-beta.112
2789
+
2790
+ ### Patch Changes
2791
+
2792
+ - 8a4a6d2: fup
2793
+ - effect-app@4.0.0-beta.112
2794
+
2795
+ ## 4.0.0-beta.111
2796
+
2797
+ ### Patch Changes
2798
+
2799
+ - ca94edf: fix typo
2800
+ - Updated dependencies [ca94edf]
2801
+ - effect-app@4.0.0-beta.111
2802
+
2803
+ ## 4.0.0-beta.110
2804
+
2805
+ ### Minor Changes
2806
+
2807
+ - c313c07: Add per-namespace in-memory SQLite adapter via LayerMap. When `makeSqlClientLayer` option is provided to `SQLiteStoreLayer`, each namespace gets its own SQLite database instance managed by a `LayerMap`. Introduces `WithNsTransaction` service for namespace-aware SQL transactions, used by `makeSqlTransactionMiddleware`.
2808
+
2809
+ ### Patch Changes
2810
+
2811
+ - effect-app@4.0.0-beta.110
2812
+
2813
+ ## 4.0.0-beta.109
2814
+
2815
+ ### Patch Changes
2816
+
2817
+ - 82f66f1: use uninterruptiple
2818
+ - effect-app@4.0.0-beta.109
2819
+
2820
+ ## 4.0.0-beta.108
2821
+
2822
+ ### Patch Changes
2823
+
2824
+ - Updated dependencies [3e46e7b]
2825
+ - effect-app@4.0.0-beta.108
2826
+
2827
+ ## 4.0.0-beta.107
2828
+
2829
+ ### Patch Changes
2830
+
2831
+ - 902ca1b: fix
2832
+ - effect-app@4.0.0-beta.107
2833
+
2834
+ ## 4.0.0-beta.106
2835
+
2836
+ ### Patch Changes
2837
+
2838
+ - f22a026: Use `Effect.cached` in `getOrCreateStoreEffect` for proper memoization of the resolver effect.
2839
+ - effect-app@4.0.0-beta.106
2840
+
2841
+ ## 4.0.0-beta.105
2842
+
2843
+ ### Minor Changes
2844
+
2845
+ - 3d732b1: Rewrite `withRequestResolverCache` to use official `RequestResolver.withCache`, creating a cached resolver per ContextMap via `getOrCreateStoreEffect` with semaphore-guarded initialization.
2846
+
2847
+ ### Patch Changes
2848
+
2849
+ - 47e53f5: Fix `withRequestResolverCache` causing "RequestResolver did not complete request" errors by using the `preCheck` hook instead of handling cache in `runAll`. Cache hits for in-flight or completed requests are now handled before entries enter the batch, preventing uncompleted entries.
2850
+ - 5773159: Add `itemType` annotation to all repository spans
2851
+ - effect-app@4.0.0-beta.105
2852
+
2853
+ ## 4.0.0-beta.104
2854
+
2855
+ ### Patch Changes
2856
+
2857
+ - Updated dependencies [e944bca]
2858
+ - effect-app@4.0.0-beta.104
2859
+
2860
+ ## 4.0.0-beta.103
2861
+
2862
+ ### Patch Changes
2863
+
2864
+ - Updated dependencies [7119320]
2865
+ - effect-app@4.0.0-beta.103
2866
+
2867
+ ## 4.0.0-beta.102
2868
+
2869
+ ### Patch Changes
2870
+
2871
+ - 62627e9: Fix boolean handling in SQL SELECT and WHERE
2872
+ - effect-app@4.0.0-beta.102
2873
+
2874
+ ## 4.0.0-beta.101
2875
+
2876
+ ### Patch Changes
2877
+
2878
+ - effect-app@4.0.0-beta.101
2879
+
2880
+ ## 4.0.0-beta.100
2881
+
2882
+ ### Patch Changes
2883
+
2884
+ - 43611c7: enable cosmosdb large partition key hashes
2885
+ - effect-app@4.0.0-beta.100
2886
+
3
2887
  ## 4.0.0-beta.99
4
2888
 
5
2889
  ### Patch Changes