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

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