effect 4.0.0-beta.67 → 4.0.0-beta.69

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 (1196) hide show
  1. package/dist/Array.d.ts +41 -42
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +23 -23
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +265 -265
  6. package/dist/BigDecimal.js +128 -128
  7. package/dist/BigInt.d.ts +175 -177
  8. package/dist/BigInt.d.ts.map +1 -1
  9. package/dist/BigInt.js +81 -79
  10. package/dist/BigInt.js.map +1 -1
  11. package/dist/Boolean.d.ts +127 -125
  12. package/dist/Boolean.d.ts.map +1 -1
  13. package/dist/Boolean.js +55 -53
  14. package/dist/Boolean.js.map +1 -1
  15. package/dist/Brand.d.ts +10 -4
  16. package/dist/Brand.d.ts.map +1 -1
  17. package/dist/Brand.js +3 -2
  18. package/dist/Brand.js.map +1 -1
  19. package/dist/Cache.d.ts +36 -36
  20. package/dist/Cache.js +17 -17
  21. package/dist/Cause.d.ts +17 -18
  22. package/dist/Cause.d.ts.map +1 -1
  23. package/dist/Cause.js +12 -12
  24. package/dist/Cause.js.map +1 -1
  25. package/dist/Channel.d.ts +234 -241
  26. package/dist/Channel.d.ts.map +1 -1
  27. package/dist/Channel.js +98 -102
  28. package/dist/Channel.js.map +1 -1
  29. package/dist/Chunk.d.ts +33 -56
  30. package/dist/Chunk.d.ts.map +1 -1
  31. package/dist/Chunk.js +17 -26
  32. package/dist/Chunk.js.map +1 -1
  33. package/dist/Clock.d.ts +1 -1
  34. package/dist/Clock.js +1 -1
  35. package/dist/Combiner.d.ts +9 -1
  36. package/dist/Combiner.d.ts.map +1 -1
  37. package/dist/Combiner.js +8 -0
  38. package/dist/Combiner.js.map +1 -1
  39. package/dist/Config.d.ts +78 -68
  40. package/dist/Config.d.ts.map +1 -1
  41. package/dist/Config.js +53 -49
  42. package/dist/Config.js.map +1 -1
  43. package/dist/ConfigProvider.d.ts +33 -32
  44. package/dist/ConfigProvider.d.ts.map +1 -1
  45. package/dist/ConfigProvider.js +19 -18
  46. package/dist/ConfigProvider.js.map +1 -1
  47. package/dist/Console.d.ts +19 -19
  48. package/dist/Console.js +19 -19
  49. package/dist/Context.d.ts +70 -108
  50. package/dist/Context.d.ts.map +1 -1
  51. package/dist/Context.js +30 -44
  52. package/dist/Context.js.map +1 -1
  53. package/dist/Cron.d.ts +3 -5
  54. package/dist/Cron.d.ts.map +1 -1
  55. package/dist/Cron.js +3 -5
  56. package/dist/Cron.js.map +1 -1
  57. package/dist/Crypto.d.ts +208 -0
  58. package/dist/Crypto.d.ts.map +1 -0
  59. package/dist/Crypto.js +157 -0
  60. package/dist/Crypto.js.map +1 -0
  61. package/dist/Data.d.ts +6 -1
  62. package/dist/Data.d.ts.map +1 -1
  63. package/dist/Data.js.map +1 -1
  64. package/dist/DateTime.d.ts +29 -31
  65. package/dist/DateTime.d.ts.map +1 -1
  66. package/dist/DateTime.js +19 -19
  67. package/dist/DateTime.js.map +1 -1
  68. package/dist/Deferred.d.ts +8 -9
  69. package/dist/Deferred.d.ts.map +1 -1
  70. package/dist/Deferred.js +6 -6
  71. package/dist/Deferred.js.map +1 -1
  72. package/dist/Differ.d.ts +2 -2
  73. package/dist/Duration.d.ts +30 -27
  74. package/dist/Duration.d.ts.map +1 -1
  75. package/dist/Duration.js +15 -12
  76. package/dist/Duration.js.map +1 -1
  77. package/dist/Effect.d.ts +879 -1137
  78. package/dist/Effect.d.ts.map +1 -1
  79. package/dist/Effect.js +375 -465
  80. package/dist/Effect.js.map +1 -1
  81. package/dist/Effectable.d.ts +2 -2
  82. package/dist/Effectable.js +2 -2
  83. package/dist/Encoding.d.ts +9 -9
  84. package/dist/Encoding.js +9 -9
  85. package/dist/Equal.d.ts +4 -3
  86. package/dist/Equal.d.ts.map +1 -1
  87. package/dist/Equal.js +4 -3
  88. package/dist/Equal.js.map +1 -1
  89. package/dist/Equivalence.d.ts +4 -5
  90. package/dist/Equivalence.d.ts.map +1 -1
  91. package/dist/Equivalence.js +2 -2
  92. package/dist/Equivalence.js.map +1 -1
  93. package/dist/ErrorReporter.d.ts +14 -14
  94. package/dist/ErrorReporter.js +9 -9
  95. package/dist/ExecutionPlan.d.ts +18 -9
  96. package/dist/ExecutionPlan.d.ts.map +1 -1
  97. package/dist/ExecutionPlan.js +6 -4
  98. package/dist/ExecutionPlan.js.map +1 -1
  99. package/dist/Exit.d.ts +0 -1
  100. package/dist/Exit.d.ts.map +1 -1
  101. package/dist/Exit.js.map +1 -1
  102. package/dist/Fiber.d.ts +1 -2
  103. package/dist/Fiber.d.ts.map +1 -1
  104. package/dist/Fiber.js +1 -1
  105. package/dist/Fiber.js.map +1 -1
  106. package/dist/FiberHandle.d.ts +5 -5
  107. package/dist/FiberHandle.js +3 -3
  108. package/dist/FiberMap.d.ts +10 -10
  109. package/dist/FiberMap.js +4 -4
  110. package/dist/FiberSet.d.ts +4 -4
  111. package/dist/FiberSet.js +2 -2
  112. package/dist/FileSystem.d.ts +10 -12
  113. package/dist/FileSystem.d.ts.map +1 -1
  114. package/dist/FileSystem.js +3 -3
  115. package/dist/FileSystem.js.map +1 -1
  116. package/dist/Filter.d.ts +54 -54
  117. package/dist/Filter.js +28 -28
  118. package/dist/Formatter.d.ts +4 -2
  119. package/dist/Formatter.d.ts.map +1 -1
  120. package/dist/Formatter.js +3 -69
  121. package/dist/Formatter.js.map +1 -1
  122. package/dist/Function.d.ts +64 -65
  123. package/dist/Function.d.ts.map +1 -1
  124. package/dist/Function.js +41 -41
  125. package/dist/Function.js.map +1 -1
  126. package/dist/Graph.d.ts +157 -175
  127. package/dist/Graph.d.ts.map +1 -1
  128. package/dist/Graph.js +72 -80
  129. package/dist/Graph.js.map +1 -1
  130. package/dist/Hash.d.ts +4 -6
  131. package/dist/Hash.d.ts.map +1 -1
  132. package/dist/Hash.js +2 -2
  133. package/dist/Hash.js.map +1 -1
  134. package/dist/HashMap.d.ts +121 -157
  135. package/dist/HashMap.d.ts.map +1 -1
  136. package/dist/HashMap.js +47 -59
  137. package/dist/HashMap.js.map +1 -1
  138. package/dist/HashRing.d.ts +34 -34
  139. package/dist/HashRing.js +16 -16
  140. package/dist/HashSet.d.ts +51 -55
  141. package/dist/HashSet.d.ts.map +1 -1
  142. package/dist/HashSet.js +19 -20
  143. package/dist/HashSet.js.map +1 -1
  144. package/dist/Inspectable.d.ts +6 -4
  145. package/dist/Inspectable.d.ts.map +1 -1
  146. package/dist/Inspectable.js +6 -4
  147. package/dist/Inspectable.js.map +1 -1
  148. package/dist/Iterable.d.ts +37 -83
  149. package/dist/Iterable.d.ts.map +1 -1
  150. package/dist/Iterable.js +21 -39
  151. package/dist/Iterable.js.map +1 -1
  152. package/dist/JsonPatch.d.ts +8 -6
  153. package/dist/JsonPatch.d.ts.map +1 -1
  154. package/dist/JsonPatch.js +5 -3
  155. package/dist/JsonPatch.js.map +1 -1
  156. package/dist/JsonPointer.d.ts +13 -11
  157. package/dist/JsonPointer.d.ts.map +1 -1
  158. package/dist/JsonPointer.js +13 -11
  159. package/dist/JsonPointer.js.map +1 -1
  160. package/dist/JsonSchema.d.ts +16 -0
  161. package/dist/JsonSchema.d.ts.map +1 -1
  162. package/dist/JsonSchema.js +10 -0
  163. package/dist/JsonSchema.js.map +1 -1
  164. package/dist/Latch.d.ts +4 -16
  165. package/dist/Latch.d.ts.map +1 -1
  166. package/dist/Latch.js +2 -14
  167. package/dist/Latch.js.map +1 -1
  168. package/dist/Layer.d.ts +94 -135
  169. package/dist/Layer.d.ts.map +1 -1
  170. package/dist/Layer.js +44 -61
  171. package/dist/Layer.js.map +1 -1
  172. package/dist/LayerMap.d.ts +15 -16
  173. package/dist/LayerMap.d.ts.map +1 -1
  174. package/dist/LayerMap.js +6 -6
  175. package/dist/LogLevel.d.ts +13 -13
  176. package/dist/LogLevel.js +4 -4
  177. package/dist/Logger.d.ts +10 -11
  178. package/dist/Logger.d.ts.map +1 -1
  179. package/dist/Logger.js +10 -11
  180. package/dist/Logger.js.map +1 -1
  181. package/dist/ManagedRuntime.d.ts +5 -4
  182. package/dist/ManagedRuntime.d.ts.map +1 -1
  183. package/dist/ManagedRuntime.js +4 -3
  184. package/dist/ManagedRuntime.js.map +1 -1
  185. package/dist/Match.d.ts +2 -4
  186. package/dist/Match.d.ts.map +1 -1
  187. package/dist/Match.js +1 -2
  188. package/dist/Match.js.map +1 -1
  189. package/dist/Metric.d.ts +48 -50
  190. package/dist/Metric.d.ts.map +1 -1
  191. package/dist/Metric.js +22 -22
  192. package/dist/Metric.js.map +1 -1
  193. package/dist/MutableHashMap.d.ts +30 -30
  194. package/dist/MutableHashMap.d.ts.map +1 -1
  195. package/dist/MutableHashMap.js +15 -14
  196. package/dist/MutableHashMap.js.map +1 -1
  197. package/dist/MutableHashSet.d.ts.map +1 -1
  198. package/dist/MutableHashSet.js +0 -2
  199. package/dist/MutableHashSet.js.map +1 -1
  200. package/dist/MutableList.d.ts +23 -24
  201. package/dist/MutableList.d.ts.map +1 -1
  202. package/dist/MutableList.js +17 -19
  203. package/dist/MutableList.js.map +1 -1
  204. package/dist/MutableRef.d.ts.map +1 -1
  205. package/dist/MutableRef.js +0 -1
  206. package/dist/MutableRef.js.map +1 -1
  207. package/dist/Newtype.d.ts +12 -2
  208. package/dist/Newtype.d.ts.map +1 -1
  209. package/dist/Newtype.js +8 -2
  210. package/dist/Newtype.js.map +1 -1
  211. package/dist/NonEmptyIterable.d.ts +5 -12
  212. package/dist/NonEmptyIterable.d.ts.map +1 -1
  213. package/dist/NonEmptyIterable.js +3 -8
  214. package/dist/NonEmptyIterable.js.map +1 -1
  215. package/dist/Number.d.ts +145 -141
  216. package/dist/Number.d.ts.map +1 -1
  217. package/dist/Number.js +65 -61
  218. package/dist/Number.js.map +1 -1
  219. package/dist/Optic.d.ts +5 -5
  220. package/dist/Optic.js +5 -5
  221. package/dist/Option.d.ts +105 -109
  222. package/dist/Option.d.ts.map +1 -1
  223. package/dist/Option.js +50 -52
  224. package/dist/Option.js.map +1 -1
  225. package/dist/Order.d.ts +6 -6
  226. package/dist/Order.js +6 -6
  227. package/dist/Ordering.d.ts +15 -19
  228. package/dist/Ordering.d.ts.map +1 -1
  229. package/dist/Ordering.js +6 -6
  230. package/dist/Ordering.js.map +1 -1
  231. package/dist/PartitionedSemaphore.d.ts +3 -3
  232. package/dist/PartitionedSemaphore.js +2 -2
  233. package/dist/Path.d.ts +4 -4
  234. package/dist/Path.d.ts.map +1 -1
  235. package/dist/Path.js +2 -1
  236. package/dist/Path.js.map +1 -1
  237. package/dist/Pipeable.d.ts +10 -7
  238. package/dist/Pipeable.d.ts.map +1 -1
  239. package/dist/Pipeable.js +6 -4
  240. package/dist/Pipeable.js.map +1 -1
  241. package/dist/PlatformError.d.ts +3 -3
  242. package/dist/PlatformError.js +2 -2
  243. package/dist/Predicate.d.ts +2 -4
  244. package/dist/Predicate.d.ts.map +1 -1
  245. package/dist/Predicate.js +3 -3
  246. package/dist/Predicate.js.map +1 -1
  247. package/dist/PrimaryKey.d.ts +2 -1
  248. package/dist/PrimaryKey.d.ts.map +1 -1
  249. package/dist/PrimaryKey.js +2 -1
  250. package/dist/PrimaryKey.js.map +1 -1
  251. package/dist/PubSub.d.ts +25 -51
  252. package/dist/PubSub.d.ts.map +1 -1
  253. package/dist/PubSub.js +17 -35
  254. package/dist/PubSub.js.map +1 -1
  255. package/dist/Queue.d.ts +45 -60
  256. package/dist/Queue.d.ts.map +1 -1
  257. package/dist/Queue.js +27 -33
  258. package/dist/Queue.js.map +1 -1
  259. package/dist/Random.d.ts +27 -38
  260. package/dist/Random.d.ts.map +1 -1
  261. package/dist/Random.js +17 -54
  262. package/dist/Random.js.map +1 -1
  263. package/dist/RcMap.d.ts +11 -11
  264. package/dist/RcMap.js +3 -3
  265. package/dist/RcRef.d.ts +0 -1
  266. package/dist/RcRef.d.ts.map +1 -1
  267. package/dist/RcRef.js.map +1 -1
  268. package/dist/Record.d.ts +9 -8
  269. package/dist/Record.d.ts.map +1 -1
  270. package/dist/Record.js +7 -5
  271. package/dist/Record.js.map +1 -1
  272. package/dist/Redactable.d.ts +7 -5
  273. package/dist/Redactable.d.ts.map +1 -1
  274. package/dist/Redactable.js +5 -3
  275. package/dist/Redactable.js.map +1 -1
  276. package/dist/Redacted.d.ts +2 -3
  277. package/dist/Redacted.d.ts.map +1 -1
  278. package/dist/Redacted.js +2 -2
  279. package/dist/Redacted.js.map +1 -1
  280. package/dist/Reducer.d.ts +3 -1
  281. package/dist/Reducer.d.ts.map +1 -1
  282. package/dist/Reducer.js +2 -0
  283. package/dist/Reducer.js.map +1 -1
  284. package/dist/Ref.d.ts +7 -17
  285. package/dist/Ref.d.ts.map +1 -1
  286. package/dist/Ref.js +5 -12
  287. package/dist/Ref.js.map +1 -1
  288. package/dist/RegExp.d.ts +1 -1
  289. package/dist/RegExp.js +1 -1
  290. package/dist/Request.d.ts +2 -1
  291. package/dist/Request.d.ts.map +1 -1
  292. package/dist/Request.js +1 -0
  293. package/dist/Request.js.map +1 -1
  294. package/dist/RequestResolver.d.ts +2 -3
  295. package/dist/RequestResolver.d.ts.map +1 -1
  296. package/dist/RequestResolver.js +1 -1
  297. package/dist/RequestResolver.js.map +1 -1
  298. package/dist/Resource.d.ts +1 -1
  299. package/dist/Resource.js +1 -1
  300. package/dist/Result.d.ts +124 -142
  301. package/dist/Result.d.ts.map +1 -1
  302. package/dist/Result.js +51 -63
  303. package/dist/Result.js.map +1 -1
  304. package/dist/Runtime.d.ts +2 -7
  305. package/dist/Runtime.d.ts.map +1 -1
  306. package/dist/Runtime.js +1 -3
  307. package/dist/Runtime.js.map +1 -1
  308. package/dist/Schedule.d.ts +69 -72
  309. package/dist/Schedule.d.ts.map +1 -1
  310. package/dist/Schedule.js +31 -33
  311. package/dist/Schedule.js.map +1 -1
  312. package/dist/Scheduler.d.ts +2 -2
  313. package/dist/Scheduler.js +2 -2
  314. package/dist/Schema.d.ts +491 -321
  315. package/dist/Schema.d.ts.map +1 -1
  316. package/dist/Schema.js +220 -172
  317. package/dist/Schema.js.map +1 -1
  318. package/dist/SchemaAST.d.ts +98 -77
  319. package/dist/SchemaAST.d.ts.map +1 -1
  320. package/dist/SchemaAST.js +89 -68
  321. package/dist/SchemaAST.js.map +1 -1
  322. package/dist/SchemaGetter.d.ts +23 -23
  323. package/dist/SchemaGetter.js +20 -20
  324. package/dist/SchemaIssue.d.ts +18 -16
  325. package/dist/SchemaIssue.d.ts.map +1 -1
  326. package/dist/SchemaIssue.js +16 -14
  327. package/dist/SchemaIssue.js.map +1 -1
  328. package/dist/SchemaParser.d.ts +39 -40
  329. package/dist/SchemaParser.d.ts.map +1 -1
  330. package/dist/SchemaParser.js +48 -51
  331. package/dist/SchemaParser.js.map +1 -1
  332. package/dist/SchemaRepresentation.d.ts +89 -77
  333. package/dist/SchemaRepresentation.d.ts.map +1 -1
  334. package/dist/SchemaRepresentation.js +47 -37
  335. package/dist/SchemaRepresentation.js.map +1 -1
  336. package/dist/SchemaTransformation.d.ts +36 -5
  337. package/dist/SchemaTransformation.d.ts.map +1 -1
  338. package/dist/SchemaTransformation.js +33 -5
  339. package/dist/SchemaTransformation.js.map +1 -1
  340. package/dist/SchemaUtils.d.ts +1 -1
  341. package/dist/SchemaUtils.js +1 -1
  342. package/dist/Scope.d.ts +12 -29
  343. package/dist/Scope.d.ts.map +1 -1
  344. package/dist/Scope.js +6 -11
  345. package/dist/Scope.js.map +1 -1
  346. package/dist/ScopedCache.d.ts +37 -37
  347. package/dist/ScopedCache.js +17 -17
  348. package/dist/Semaphore.d.ts +4 -16
  349. package/dist/Semaphore.d.ts.map +1 -1
  350. package/dist/Semaphore.js +2 -14
  351. package/dist/Semaphore.js.map +1 -1
  352. package/dist/Sink.d.ts +36 -39
  353. package/dist/Sink.d.ts.map +1 -1
  354. package/dist/Sink.js +18 -18
  355. package/dist/Sink.js.map +1 -1
  356. package/dist/Stdio.d.ts +6 -6
  357. package/dist/Stdio.js +4 -4
  358. package/dist/Stream.d.ts +671 -808
  359. package/dist/Stream.d.ts.map +1 -1
  360. package/dist/Stream.js +289 -363
  361. package/dist/Stream.js.map +1 -1
  362. package/dist/String.d.ts +3 -2
  363. package/dist/String.d.ts.map +1 -1
  364. package/dist/String.js +3 -2
  365. package/dist/String.js.map +1 -1
  366. package/dist/Struct.d.ts +20 -18
  367. package/dist/Struct.d.ts.map +1 -1
  368. package/dist/Struct.js +10 -8
  369. package/dist/Struct.js.map +1 -1
  370. package/dist/SubscriptionRef.d.ts +2 -2
  371. package/dist/SubscriptionRef.js +2 -2
  372. package/dist/Symbol.d.ts +3 -3
  373. package/dist/Symbol.js +3 -3
  374. package/dist/SynchronizedRef.d.ts +1 -1
  375. package/dist/SynchronizedRef.js +1 -1
  376. package/dist/Take.d.ts +2 -2
  377. package/dist/Take.js +1 -1
  378. package/dist/Terminal.d.ts +5 -5
  379. package/dist/Terminal.js +2 -2
  380. package/dist/Tracer.d.ts +9 -9
  381. package/dist/Tracer.js +2 -2
  382. package/dist/Trie.d.ts +70 -106
  383. package/dist/Trie.d.ts.map +1 -1
  384. package/dist/Trie.js +29 -43
  385. package/dist/Trie.js.map +1 -1
  386. package/dist/Tuple.d.ts +34 -32
  387. package/dist/Tuple.d.ts.map +1 -1
  388. package/dist/Tuple.js +16 -14
  389. package/dist/Tuple.js.map +1 -1
  390. package/dist/TxChunk.d.ts +27 -18
  391. package/dist/TxChunk.d.ts.map +1 -1
  392. package/dist/TxChunk.js +15 -10
  393. package/dist/TxChunk.js.map +1 -1
  394. package/dist/TxDeferred.d.ts +11 -11
  395. package/dist/TxDeferred.js +5 -5
  396. package/dist/TxHashMap.d.ts +60 -61
  397. package/dist/TxHashMap.d.ts.map +1 -1
  398. package/dist/TxHashMap.js +23 -23
  399. package/dist/TxHashMap.js.map +1 -1
  400. package/dist/TxHashSet.d.ts +28 -32
  401. package/dist/TxHashSet.d.ts.map +1 -1
  402. package/dist/TxHashSet.js +13 -16
  403. package/dist/TxHashSet.js.map +1 -1
  404. package/dist/TxPriorityQueue.d.ts +30 -30
  405. package/dist/TxPriorityQueue.js +18 -18
  406. package/dist/TxPubSub.d.ts +18 -18
  407. package/dist/TxPubSub.js +14 -14
  408. package/dist/TxQueue.d.ts +26 -29
  409. package/dist/TxQueue.d.ts.map +1 -1
  410. package/dist/TxQueue.js +17 -17
  411. package/dist/TxQueue.js.map +1 -1
  412. package/dist/TxReentrantLock.d.ts +21 -21
  413. package/dist/TxReentrantLock.js +15 -15
  414. package/dist/TxRef.d.ts +24 -24
  415. package/dist/TxRef.js +11 -11
  416. package/dist/TxSemaphore.d.ts +13 -74
  417. package/dist/TxSemaphore.d.ts.map +1 -1
  418. package/dist/TxSemaphore.js +9 -52
  419. package/dist/TxSemaphore.js.map +1 -1
  420. package/dist/TxSubscriptionRef.d.ts +24 -24
  421. package/dist/TxSubscriptionRef.js +11 -11
  422. package/dist/Types.d.ts +1 -4
  423. package/dist/Types.d.ts.map +1 -1
  424. package/dist/UndefinedOr.d.ts +14 -0
  425. package/dist/UndefinedOr.d.ts.map +1 -1
  426. package/dist/UndefinedOr.js +8 -0
  427. package/dist/UndefinedOr.js.map +1 -1
  428. package/dist/Unify.d.ts +8 -8
  429. package/dist/Unify.js +1 -1
  430. package/dist/Utils.d.ts +1 -2
  431. package/dist/Utils.d.ts.map +1 -1
  432. package/dist/Utils.js.map +1 -1
  433. package/dist/index.d.ts +1934 -436
  434. package/dist/index.d.ts.map +1 -1
  435. package/dist/index.js +1934 -436
  436. package/dist/index.js.map +1 -1
  437. package/dist/testing/FastCheck.d.ts +3 -3
  438. package/dist/testing/FastCheck.js +3 -3
  439. package/dist/testing/TestClock.d.ts +2 -3
  440. package/dist/testing/TestClock.d.ts.map +1 -1
  441. package/dist/testing/TestClock.js +1 -1
  442. package/dist/testing/TestClock.js.map +1 -1
  443. package/dist/testing/TestConsole.d.ts +8 -9
  444. package/dist/testing/TestConsole.d.ts.map +1 -1
  445. package/dist/testing/TestConsole.js +5 -5
  446. package/dist/testing/TestConsole.js.map +1 -1
  447. package/dist/testing/TestSchema.d.ts +2 -0
  448. package/dist/testing/TestSchema.d.ts.map +1 -1
  449. package/dist/testing/TestSchema.js +2 -0
  450. package/dist/testing/TestSchema.js.map +1 -1
  451. package/dist/testing/index.d.ts +34 -0
  452. package/dist/testing/index.d.ts.map +1 -1
  453. package/dist/testing/index.js +34 -0
  454. package/dist/testing/index.js.map +1 -1
  455. package/dist/unstable/ai/AiError.d.ts +10 -19
  456. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  457. package/dist/unstable/ai/AiError.js +0 -9
  458. package/dist/unstable/ai/AiError.js.map +1 -1
  459. package/dist/unstable/ai/Chat.d.ts +0 -1
  460. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  461. package/dist/unstable/ai/Chat.js.map +1 -1
  462. package/dist/unstable/ai/McpSchema.d.ts +3 -0
  463. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  464. package/dist/unstable/ai/McpSchema.js +2 -0
  465. package/dist/unstable/ai/McpSchema.js.map +1 -1
  466. package/dist/unstable/ai/McpServer.d.ts +3 -1
  467. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  468. package/dist/unstable/ai/McpServer.js +1 -1
  469. package/dist/unstable/ai/McpServer.js.map +1 -1
  470. package/dist/unstable/ai/Model.d.ts +2 -6
  471. package/dist/unstable/ai/Model.d.ts.map +1 -1
  472. package/dist/unstable/ai/Model.js +2 -2
  473. package/dist/unstable/ai/Model.js.map +1 -1
  474. package/dist/unstable/ai/Prompt.d.ts +8 -10
  475. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  476. package/dist/unstable/ai/Prompt.js +4 -4
  477. package/dist/unstable/ai/Prompt.js.map +1 -1
  478. package/dist/unstable/ai/Response.d.ts +20 -20
  479. package/dist/unstable/ai/ResponseIdTracker.d.ts +1 -1
  480. package/dist/unstable/ai/ResponseIdTracker.js +1 -1
  481. package/dist/unstable/ai/Telemetry.d.ts +5 -5
  482. package/dist/unstable/ai/Telemetry.js +3 -3
  483. package/dist/unstable/ai/Tokenizer.d.ts +1 -1
  484. package/dist/unstable/ai/Tool.d.ts +14 -12
  485. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  486. package/dist/unstable/ai/Tool.js +10 -9
  487. package/dist/unstable/ai/Tool.js.map +1 -1
  488. package/dist/unstable/ai/index.d.ts +80 -6
  489. package/dist/unstable/ai/index.d.ts.map +1 -1
  490. package/dist/unstable/ai/index.js +80 -6
  491. package/dist/unstable/ai/index.js.map +1 -1
  492. package/dist/unstable/cli/CliOutput.d.ts +5 -6
  493. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  494. package/dist/unstable/cli/CliOutput.js +2 -3
  495. package/dist/unstable/cli/CliOutput.js.map +1 -1
  496. package/dist/unstable/cli/Command.d.ts +3 -3
  497. package/dist/unstable/cli/Command.js +1 -1
  498. package/dist/unstable/cli/Flag.d.ts +23 -0
  499. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  500. package/dist/unstable/cli/Flag.js +23 -0
  501. package/dist/unstable/cli/Flag.js.map +1 -1
  502. package/dist/unstable/cli/HelpDoc.d.ts +4 -4
  503. package/dist/unstable/cli/Param.d.ts +33 -1
  504. package/dist/unstable/cli/Param.d.ts.map +1 -1
  505. package/dist/unstable/cli/Param.js +64 -38
  506. package/dist/unstable/cli/Param.js.map +1 -1
  507. package/dist/unstable/cli/Primitive.d.ts +1 -1
  508. package/dist/unstable/cli/Primitive.js +1 -1
  509. package/dist/unstable/cli/Prompt.d.ts +6 -14
  510. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  511. package/dist/unstable/cli/Prompt.js +2 -2
  512. package/dist/unstable/cli/Prompt.js.map +1 -1
  513. package/dist/unstable/cli/index.d.ts +212 -0
  514. package/dist/unstable/cli/index.d.ts.map +1 -1
  515. package/dist/unstable/cli/index.js +205 -6
  516. package/dist/unstable/cli/index.js.map +1 -1
  517. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  518. package/dist/unstable/cli/internal/command.js +3 -0
  519. package/dist/unstable/cli/internal/command.js.map +1 -1
  520. package/dist/unstable/cli/internal/completions/descriptor.js +3 -0
  521. package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
  522. package/dist/unstable/cli/internal/help.d.ts.map +1 -1
  523. package/dist/unstable/cli/internal/help.js +10 -0
  524. package/dist/unstable/cli/internal/help.js.map +1 -1
  525. package/dist/unstable/cli/internal/parser.js +3 -1
  526. package/dist/unstable/cli/internal/parser.js.map +1 -1
  527. package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
  528. package/dist/unstable/cluster/ClusterCron.js +1 -1
  529. package/dist/unstable/cluster/ClusterSchema.d.ts +8 -8
  530. package/dist/unstable/cluster/ClusterSchema.js +8 -8
  531. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +2 -2
  532. package/dist/unstable/cluster/ClusterWorkflowEngine.js +2 -2
  533. package/dist/unstable/cluster/Entity.d.ts +0 -1
  534. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  535. package/dist/unstable/cluster/Entity.js.map +1 -1
  536. package/dist/unstable/cluster/EntityProxy.d.ts +10 -14
  537. package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
  538. package/dist/unstable/cluster/EntityProxy.js +8 -14
  539. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  540. package/dist/unstable/cluster/EntityProxyServer.d.ts +3 -2
  541. package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
  542. package/dist/unstable/cluster/EntityProxyServer.js +2 -2
  543. package/dist/unstable/cluster/EntityResource.d.ts +2 -2
  544. package/dist/unstable/cluster/EntityResource.js +1 -1
  545. package/dist/unstable/cluster/Envelope.d.ts +1 -1
  546. package/dist/unstable/cluster/Envelope.js +1 -1
  547. package/dist/unstable/cluster/HttpRunner.d.ts +11 -11
  548. package/dist/unstable/cluster/HttpRunner.js +11 -11
  549. package/dist/unstable/cluster/K8sHttpClient.d.ts +5 -5
  550. package/dist/unstable/cluster/K8sHttpClient.js +5 -5
  551. package/dist/unstable/cluster/MachineId.d.ts +1 -1
  552. package/dist/unstable/cluster/MachineId.js +1 -1
  553. package/dist/unstable/cluster/MessageStorage.d.ts +1 -2
  554. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  555. package/dist/unstable/cluster/MessageStorage.js +1 -1
  556. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  557. package/dist/unstable/cluster/Runner.d.ts +1 -1
  558. package/dist/unstable/cluster/Runner.js +1 -1
  559. package/dist/unstable/cluster/RunnerHealth.d.ts +2 -2
  560. package/dist/unstable/cluster/RunnerHealth.js +2 -2
  561. package/dist/unstable/cluster/RunnerServer.d.ts +4 -4
  562. package/dist/unstable/cluster/RunnerServer.js +4 -4
  563. package/dist/unstable/cluster/Runners.d.ts +3 -3
  564. package/dist/unstable/cluster/Runners.js +3 -3
  565. package/dist/unstable/cluster/ShardId.d.ts +7 -5
  566. package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
  567. package/dist/unstable/cluster/ShardId.js +6 -4
  568. package/dist/unstable/cluster/ShardId.js.map +1 -1
  569. package/dist/unstable/cluster/Sharding.js +1 -1
  570. package/dist/unstable/cluster/ShardingConfig.d.ts +2 -2
  571. package/dist/unstable/cluster/ShardingConfig.js +2 -2
  572. package/dist/unstable/cluster/SingleRunner.d.ts +1 -1
  573. package/dist/unstable/cluster/SingleRunner.js +1 -1
  574. package/dist/unstable/cluster/Snowflake.d.ts +10 -9
  575. package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
  576. package/dist/unstable/cluster/Snowflake.js +4 -3
  577. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  578. package/dist/unstable/cluster/SocketRunner.d.ts +2 -2
  579. package/dist/unstable/cluster/SocketRunner.js +2 -2
  580. package/dist/unstable/cluster/SqlMessageStorage.d.ts +3 -3
  581. package/dist/unstable/cluster/SqlMessageStorage.js +3 -3
  582. package/dist/unstable/cluster/SqlRunnerStorage.d.ts +3 -3
  583. package/dist/unstable/cluster/SqlRunnerStorage.js +3 -3
  584. package/dist/unstable/cluster/TestRunner.d.ts +1 -1
  585. package/dist/unstable/cluster/TestRunner.js +1 -1
  586. package/dist/unstable/cluster/index.d.ts +790 -0
  587. package/dist/unstable/cluster/index.d.ts.map +1 -1
  588. package/dist/unstable/cluster/index.js +790 -0
  589. package/dist/unstable/cluster/index.js.map +1 -1
  590. package/dist/unstable/devtools/index.d.ts +58 -0
  591. package/dist/unstable/devtools/index.d.ts.map +1 -1
  592. package/dist/unstable/devtools/index.js +58 -0
  593. package/dist/unstable/devtools/index.js.map +1 -1
  594. package/dist/unstable/encoding/Sse.d.ts +16 -16
  595. package/dist/unstable/encoding/Sse.js +11 -11
  596. package/dist/unstable/encoding/index.d.ts +49 -0
  597. package/dist/unstable/encoding/index.d.ts.map +1 -1
  598. package/dist/unstable/encoding/index.js +49 -0
  599. package/dist/unstable/encoding/index.js.map +1 -1
  600. package/dist/unstable/eventlog/Event.d.ts +2 -2
  601. package/dist/unstable/eventlog/Event.js +1 -1
  602. package/dist/unstable/eventlog/EventGroup.d.ts +2 -2
  603. package/dist/unstable/eventlog/EventGroup.js +1 -1
  604. package/dist/unstable/eventlog/EventLog.d.ts +6 -7
  605. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  606. package/dist/unstable/eventlog/EventLog.js +4 -4
  607. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  608. package/dist/unstable/eventlog/EventLogRemote.d.ts +2 -2
  609. package/dist/unstable/eventlog/EventLogRemote.js +2 -2
  610. package/dist/unstable/eventlog/EventLogServer.d.ts +2 -2
  611. package/dist/unstable/eventlog/EventLogServer.js +2 -2
  612. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +2 -2
  613. package/dist/unstable/eventlog/EventLogServerEncrypted.js +2 -2
  614. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +1 -1
  615. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +1 -1
  616. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +1 -1
  617. package/dist/unstable/eventlog/index.d.ts +240 -0
  618. package/dist/unstable/eventlog/index.d.ts.map +1 -1
  619. package/dist/unstable/eventlog/index.js +240 -0
  620. package/dist/unstable/eventlog/index.js.map +1 -1
  621. package/dist/unstable/http/Cookies.d.ts +6 -6
  622. package/dist/unstable/http/Cookies.js +4 -4
  623. package/dist/unstable/http/Etag.d.ts +2 -2
  624. package/dist/unstable/http/Etag.js +2 -2
  625. package/dist/unstable/http/Headers.d.ts +2 -2
  626. package/dist/unstable/http/Headers.js +1 -1
  627. package/dist/unstable/http/HttpClient.d.ts +5 -6
  628. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  629. package/dist/unstable/http/HttpClient.js +5 -4
  630. package/dist/unstable/http/HttpClient.js.map +1 -1
  631. package/dist/unstable/http/HttpClientError.d.ts +1 -1
  632. package/dist/unstable/http/HttpClientError.js +1 -1
  633. package/dist/unstable/http/HttpClientRequest.d.ts +4 -4
  634. package/dist/unstable/http/HttpClientRequest.js +4 -4
  635. package/dist/unstable/http/HttpClientResponse.d.ts +6 -6
  636. package/dist/unstable/http/HttpClientResponse.js +6 -6
  637. package/dist/unstable/http/HttpEffect.d.ts +5 -5
  638. package/dist/unstable/http/HttpEffect.js +5 -5
  639. package/dist/unstable/http/HttpIncomingMessage.d.ts +7 -6
  640. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  641. package/dist/unstable/http/HttpIncomingMessage.js +7 -6
  642. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  643. package/dist/unstable/http/HttpMethod.d.ts +4 -2
  644. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  645. package/dist/unstable/http/HttpMethod.js +4 -1
  646. package/dist/unstable/http/HttpMethod.js.map +1 -1
  647. package/dist/unstable/http/HttpMiddleware.d.ts +1 -0
  648. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  649. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  650. package/dist/unstable/http/HttpRouter.d.ts +23 -25
  651. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  652. package/dist/unstable/http/HttpRouter.js +23 -22
  653. package/dist/unstable/http/HttpRouter.js.map +1 -1
  654. package/dist/unstable/http/HttpServerError.d.ts +4 -1
  655. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  656. package/dist/unstable/http/HttpServerError.js +4 -1
  657. package/dist/unstable/http/HttpServerError.js.map +1 -1
  658. package/dist/unstable/http/HttpServerRequest.d.ts +15 -15
  659. package/dist/unstable/http/HttpServerRequest.js +15 -15
  660. package/dist/unstable/http/HttpServerRespondable.d.ts +1 -1
  661. package/dist/unstable/http/HttpServerRespondable.js +1 -1
  662. package/dist/unstable/http/HttpServerResponse.d.ts +5 -4
  663. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  664. package/dist/unstable/http/HttpServerResponse.js +5 -4
  665. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  666. package/dist/unstable/http/HttpStaticServer.d.ts +2 -4
  667. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
  668. package/dist/unstable/http/HttpStaticServer.js +2 -4
  669. package/dist/unstable/http/HttpStaticServer.js.map +1 -1
  670. package/dist/unstable/http/Multipart.d.ts +20 -19
  671. package/dist/unstable/http/Multipart.d.ts.map +1 -1
  672. package/dist/unstable/http/Multipart.js +19 -17
  673. package/dist/unstable/http/Multipart.js.map +1 -1
  674. package/dist/unstable/http/Template.d.ts +0 -1
  675. package/dist/unstable/http/Template.d.ts.map +1 -1
  676. package/dist/unstable/http/Template.js.map +1 -1
  677. package/dist/unstable/http/Url.d.ts +17 -17
  678. package/dist/unstable/http/Url.js +8 -8
  679. package/dist/unstable/http/UrlParams.d.ts +14 -12
  680. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  681. package/dist/unstable/http/UrlParams.js +12 -10
  682. package/dist/unstable/http/UrlParams.js.map +1 -1
  683. package/dist/unstable/http/index.d.ts +452 -0
  684. package/dist/unstable/http/index.d.ts.map +1 -1
  685. package/dist/unstable/http/index.js +452 -0
  686. package/dist/unstable/http/index.js.map +1 -1
  687. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +0 -1
  688. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  689. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  690. package/dist/unstable/httpapi/HttpApiClient.d.ts +0 -1
  691. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  692. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  693. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +4 -2
  694. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  695. package/dist/unstable/httpapi/HttpApiMiddleware.js +3 -1
  696. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  697. package/dist/unstable/httpapi/HttpApiScalar.d.ts +2 -2
  698. package/dist/unstable/httpapi/HttpApiSchema.d.ts +19 -8
  699. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  700. package/dist/unstable/httpapi/HttpApiSchema.js +11 -8
  701. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  702. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +0 -1
  703. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  704. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  705. package/dist/unstable/httpapi/HttpApiSwagger.d.ts +0 -2
  706. package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
  707. package/dist/unstable/httpapi/HttpApiSwagger.js +0 -2
  708. package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
  709. package/dist/unstable/httpapi/index.d.ts +310 -25
  710. package/dist/unstable/httpapi/index.d.ts.map +1 -1
  711. package/dist/unstable/httpapi/index.js +310 -25
  712. package/dist/unstable/httpapi/index.js.map +1 -1
  713. package/dist/unstable/observability/Otlp.d.ts +3 -3
  714. package/dist/unstable/observability/Otlp.js +3 -3
  715. package/dist/unstable/observability/OtlpExporter.d.ts +1 -1
  716. package/dist/unstable/observability/OtlpExporter.js +1 -1
  717. package/dist/unstable/observability/OtlpLogger.d.ts +3 -2
  718. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  719. package/dist/unstable/observability/OtlpLogger.js +2 -2
  720. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  721. package/dist/unstable/observability/OtlpMetrics.d.ts +5 -4
  722. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  723. package/dist/unstable/observability/OtlpMetrics.js +2 -2
  724. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  725. package/dist/unstable/observability/OtlpResource.d.ts +9 -9
  726. package/dist/unstable/observability/OtlpResource.js +2 -2
  727. package/dist/unstable/observability/OtlpSerialization.d.ts +3 -3
  728. package/dist/unstable/observability/OtlpSerialization.js +3 -3
  729. package/dist/unstable/observability/OtlpTracer.d.ts +5 -2
  730. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  731. package/dist/unstable/observability/OtlpTracer.js +2 -2
  732. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  733. package/dist/unstable/observability/PrometheusMetrics.d.ts +7 -7
  734. package/dist/unstable/observability/PrometheusMetrics.js +2 -2
  735. package/dist/unstable/observability/index.d.ts +159 -3
  736. package/dist/unstable/observability/index.d.ts.map +1 -1
  737. package/dist/unstable/observability/index.js +159 -3
  738. package/dist/unstable/observability/index.js.map +1 -1
  739. package/dist/unstable/persistence/KeyValueStore.d.ts +4 -4
  740. package/dist/unstable/persistence/KeyValueStore.js +1 -1
  741. package/dist/unstable/persistence/Persistable.d.ts +11 -11
  742. package/dist/unstable/persistence/Persistable.js +1 -1
  743. package/dist/unstable/persistence/PersistedCache.d.ts +2 -2
  744. package/dist/unstable/persistence/PersistedCache.js +1 -1
  745. package/dist/unstable/persistence/PersistedQueue.d.ts +6 -6
  746. package/dist/unstable/persistence/PersistedQueue.js +3 -3
  747. package/dist/unstable/persistence/Persistence.d.ts +2 -1
  748. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  749. package/dist/unstable/persistence/Persistence.js +2 -1
  750. package/dist/unstable/persistence/Persistence.js.map +1 -1
  751. package/dist/unstable/persistence/RateLimiter.d.ts +19 -15
  752. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  753. package/dist/unstable/persistence/RateLimiter.js +14 -10
  754. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  755. package/dist/unstable/persistence/Redis.d.ts +3 -3
  756. package/dist/unstable/persistence/Redis.js +3 -3
  757. package/dist/unstable/persistence/index.d.ts +147 -0
  758. package/dist/unstable/persistence/index.d.ts.map +1 -1
  759. package/dist/unstable/persistence/index.js +147 -0
  760. package/dist/unstable/persistence/index.js.map +1 -1
  761. package/dist/unstable/process/ChildProcess.d.ts +41 -41
  762. package/dist/unstable/process/ChildProcess.js +11 -11
  763. package/dist/unstable/process/ChildProcessSpawner.d.ts +10 -10
  764. package/dist/unstable/process/ChildProcessSpawner.js +5 -5
  765. package/dist/unstable/process/index.d.ts +1 -1
  766. package/dist/unstable/process/index.js +1 -1
  767. package/dist/unstable/reactivity/AsyncResult.d.ts +8 -6
  768. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  769. package/dist/unstable/reactivity/AsyncResult.js +3 -3
  770. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  771. package/dist/unstable/reactivity/Atom.d.ts +25 -20
  772. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  773. package/dist/unstable/reactivity/Atom.js +12 -12
  774. package/dist/unstable/reactivity/Atom.js.map +1 -1
  775. package/dist/unstable/reactivity/AtomHttpApi.d.ts +2 -2
  776. package/dist/unstable/reactivity/AtomHttpApi.js +1 -1
  777. package/dist/unstable/reactivity/AtomRef.d.ts +2 -2
  778. package/dist/unstable/reactivity/AtomRef.js +1 -1
  779. package/dist/unstable/reactivity/AtomRegistry.d.ts +16 -16
  780. package/dist/unstable/reactivity/AtomRegistry.js +7 -7
  781. package/dist/unstable/reactivity/AtomRpc.d.ts +2 -2
  782. package/dist/unstable/reactivity/AtomRpc.js +1 -1
  783. package/dist/unstable/reactivity/Reactivity.d.ts +2 -3
  784. package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
  785. package/dist/unstable/reactivity/Reactivity.js +2 -3
  786. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  787. package/dist/unstable/reactivity/index.d.ts +166 -0
  788. package/dist/unstable/reactivity/index.d.ts.map +1 -1
  789. package/dist/unstable/reactivity/index.js +166 -0
  790. package/dist/unstable/reactivity/index.js.map +1 -1
  791. package/dist/unstable/rpc/Rpc.d.ts +0 -1
  792. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  793. package/dist/unstable/rpc/Rpc.js.map +1 -1
  794. package/dist/unstable/rpc/RpcClient.d.ts +0 -1
  795. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  796. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  797. package/dist/unstable/rpc/RpcClientError.d.ts +2 -2
  798. package/dist/unstable/rpc/RpcClientError.js +2 -2
  799. package/dist/unstable/rpc/RpcMiddleware.d.ts +2 -2
  800. package/dist/unstable/rpc/RpcMiddleware.js +1 -1
  801. package/dist/unstable/rpc/RpcWorker.d.ts +0 -1
  802. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  803. package/dist/unstable/rpc/RpcWorker.js +1 -1
  804. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  805. package/dist/unstable/rpc/Utils.d.ts +2 -0
  806. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  807. package/dist/unstable/rpc/Utils.js +2 -0
  808. package/dist/unstable/rpc/Utils.js.map +1 -1
  809. package/dist/unstable/rpc/index.d.ts +272 -0
  810. package/dist/unstable/rpc/index.d.ts.map +1 -1
  811. package/dist/unstable/rpc/index.js +272 -0
  812. package/dist/unstable/rpc/index.js.map +1 -1
  813. package/dist/unstable/schema/Model.d.ts +63 -8
  814. package/dist/unstable/schema/Model.d.ts.map +1 -1
  815. package/dist/unstable/schema/Model.js +44 -5
  816. package/dist/unstable/schema/Model.js.map +1 -1
  817. package/dist/unstable/schema/VariantSchema.d.ts +1 -4
  818. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  819. package/dist/unstable/schema/VariantSchema.js +1 -1
  820. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  821. package/dist/unstable/schema/index.d.ts +37 -0
  822. package/dist/unstable/schema/index.d.ts.map +1 -1
  823. package/dist/unstable/schema/index.js +37 -0
  824. package/dist/unstable/schema/index.js.map +1 -1
  825. package/dist/unstable/socket/Socket.d.ts +5 -4
  826. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  827. package/dist/unstable/socket/Socket.js +4 -3
  828. package/dist/unstable/socket/Socket.js.map +1 -1
  829. package/dist/unstable/socket/index.d.ts +44 -0
  830. package/dist/unstable/socket/index.d.ts.map +1 -1
  831. package/dist/unstable/socket/index.js +44 -0
  832. package/dist/unstable/socket/index.js.map +1 -1
  833. package/dist/unstable/sql/Migrator.d.ts +11 -9
  834. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  835. package/dist/unstable/sql/Migrator.js +10 -8
  836. package/dist/unstable/sql/Migrator.js.map +1 -1
  837. package/dist/unstable/sql/SqlClient.d.ts +4 -0
  838. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  839. package/dist/unstable/sql/SqlClient.js +2 -0
  840. package/dist/unstable/sql/SqlClient.js.map +1 -1
  841. package/dist/unstable/sql/SqlConnection.d.ts +3 -3
  842. package/dist/unstable/sql/SqlError.d.ts +18 -0
  843. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  844. package/dist/unstable/sql/SqlError.js +17 -0
  845. package/dist/unstable/sql/SqlError.js.map +1 -1
  846. package/dist/unstable/sql/SqlModel.d.ts +0 -1
  847. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  848. package/dist/unstable/sql/SqlModel.js.map +1 -1
  849. package/dist/unstable/sql/SqlSchema.d.ts +5 -5
  850. package/dist/unstable/sql/SqlSchema.js +5 -5
  851. package/dist/unstable/sql/SqlStream.d.ts +1 -0
  852. package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
  853. package/dist/unstable/sql/SqlStream.js +1 -0
  854. package/dist/unstable/sql/SqlStream.js.map +1 -1
  855. package/dist/unstable/sql/Statement.d.ts +27 -24
  856. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  857. package/dist/unstable/sql/Statement.js +9 -6
  858. package/dist/unstable/sql/Statement.js.map +1 -1
  859. package/dist/unstable/sql/index.d.ts +178 -1
  860. package/dist/unstable/sql/index.d.ts.map +1 -1
  861. package/dist/unstable/sql/index.js +178 -1
  862. package/dist/unstable/sql/index.js.map +1 -1
  863. package/dist/unstable/workers/Transferable.d.ts +7 -7
  864. package/dist/unstable/workers/Transferable.js +4 -4
  865. package/dist/unstable/workers/Worker.d.ts +1 -0
  866. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  867. package/dist/unstable/workers/Worker.js +1 -0
  868. package/dist/unstable/workers/Worker.js.map +1 -1
  869. package/dist/unstable/workers/WorkerError.d.ts +8 -8
  870. package/dist/unstable/workers/WorkerError.js +7 -7
  871. package/dist/unstable/workers/index.d.ts +80 -0
  872. package/dist/unstable/workers/index.d.ts.map +1 -1
  873. package/dist/unstable/workers/index.js +80 -0
  874. package/dist/unstable/workers/index.js.map +1 -1
  875. package/dist/unstable/workflow/Activity.d.ts +7 -7
  876. package/dist/unstable/workflow/Activity.js +2 -2
  877. package/dist/unstable/workflow/DurableClock.d.ts +2 -2
  878. package/dist/unstable/workflow/DurableClock.js +1 -1
  879. package/dist/unstable/workflow/DurableDeferred.d.ts +22 -20
  880. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  881. package/dist/unstable/workflow/DurableDeferred.js +8 -7
  882. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  883. package/dist/unstable/workflow/DurableQueue.d.ts +7 -5
  884. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  885. package/dist/unstable/workflow/DurableQueue.js +5 -3
  886. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  887. package/dist/unstable/workflow/Workflow.d.ts +12 -10
  888. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  889. package/dist/unstable/workflow/Workflow.js +3 -3
  890. package/dist/unstable/workflow/Workflow.js.map +1 -1
  891. package/dist/unstable/workflow/WorkflowEngine.d.ts +4 -4
  892. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  893. package/dist/unstable/workflow/WorkflowEngine.js +9 -13
  894. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  895. package/dist/unstable/workflow/WorkflowProxy.d.ts +10 -12
  896. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  897. package/dist/unstable/workflow/WorkflowProxy.js +8 -12
  898. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  899. package/dist/unstable/workflow/WorkflowProxyServer.d.ts +3 -2
  900. package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
  901. package/dist/unstable/workflow/WorkflowProxyServer.js +2 -2
  902. package/dist/unstable/workflow/index.d.ts +160 -0
  903. package/dist/unstable/workflow/index.d.ts.map +1 -1
  904. package/dist/unstable/workflow/index.js +160 -0
  905. package/dist/unstable/workflow/index.js.map +1 -1
  906. package/package.json +3 -3
  907. package/src/Array.ts +41 -42
  908. package/src/BigDecimal.ts +265 -265
  909. package/src/BigInt.ts +175 -177
  910. package/src/Boolean.ts +127 -125
  911. package/src/Brand.ts +10 -4
  912. package/src/Cache.ts +42 -42
  913. package/src/Cause.ts +17 -18
  914. package/src/Channel.ts +256 -257
  915. package/src/Chunk.ts +33 -56
  916. package/src/Clock.ts +1 -1
  917. package/src/Combiner.ts +9 -1
  918. package/src/Config.ts +78 -68
  919. package/src/ConfigProvider.ts +33 -32
  920. package/src/Console.ts +23 -23
  921. package/src/Context.ts +70 -108
  922. package/src/Cron.ts +3 -5
  923. package/src/Crypto.ts +327 -0
  924. package/src/Data.ts +6 -1
  925. package/src/DateTime.ts +29 -31
  926. package/src/Deferred.ts +8 -9
  927. package/src/Differ.ts +2 -2
  928. package/src/Duration.ts +30 -27
  929. package/src/Effect.ts +893 -1151
  930. package/src/Effectable.ts +2 -2
  931. package/src/Encoding.ts +9 -9
  932. package/src/Equal.ts +4 -3
  933. package/src/Equivalence.ts +4 -5
  934. package/src/ErrorReporter.ts +14 -14
  935. package/src/ExecutionPlan.ts +18 -9
  936. package/src/Exit.ts +0 -1
  937. package/src/Fiber.ts +1 -2
  938. package/src/FiberHandle.ts +5 -5
  939. package/src/FiberMap.ts +10 -10
  940. package/src/FiberSet.ts +4 -4
  941. package/src/FileSystem.ts +10 -12
  942. package/src/Filter.ts +54 -54
  943. package/src/Formatter.ts +4 -70
  944. package/src/Function.ts +64 -65
  945. package/src/Graph.ts +157 -175
  946. package/src/Hash.ts +4 -6
  947. package/src/HashMap.ts +121 -157
  948. package/src/HashRing.ts +34 -34
  949. package/src/HashSet.ts +51 -55
  950. package/src/Inspectable.ts +8 -7
  951. package/src/Iterable.ts +37 -83
  952. package/src/JsonPatch.ts +9 -7
  953. package/src/JsonPointer.ts +13 -11
  954. package/src/JsonSchema.ts +16 -0
  955. package/src/Latch.ts +4 -16
  956. package/src/Layer.ts +94 -135
  957. package/src/LayerMap.ts +15 -16
  958. package/src/LogLevel.ts +13 -13
  959. package/src/Logger.ts +16 -17
  960. package/src/ManagedRuntime.ts +5 -4
  961. package/src/Match.ts +2 -4
  962. package/src/Metric.ts +56 -58
  963. package/src/MutableHashMap.ts +42 -44
  964. package/src/MutableHashSet.ts +0 -2
  965. package/src/MutableList.ts +23 -26
  966. package/src/MutableRef.ts +0 -1
  967. package/src/Newtype.ts +12 -2
  968. package/src/NonEmptyIterable.ts +5 -12
  969. package/src/Number.ts +145 -141
  970. package/src/Optic.ts +5 -5
  971. package/src/Option.ts +105 -109
  972. package/src/Order.ts +6 -6
  973. package/src/Ordering.ts +15 -19
  974. package/src/PartitionedSemaphore.ts +3 -3
  975. package/src/Path.ts +4 -4
  976. package/src/Pipeable.ts +10 -7
  977. package/src/PlatformError.ts +3 -3
  978. package/src/Predicate.ts +3 -5
  979. package/src/PrimaryKey.ts +2 -1
  980. package/src/PubSub.ts +25 -51
  981. package/src/Queue.ts +45 -60
  982. package/src/Random.ts +31 -74
  983. package/src/RcMap.ts +11 -11
  984. package/src/RcRef.ts +0 -1
  985. package/src/Record.ts +9 -8
  986. package/src/Redactable.ts +7 -5
  987. package/src/Redacted.ts +2 -3
  988. package/src/Reducer.ts +3 -1
  989. package/src/Ref.ts +15 -33
  990. package/src/RegExp.ts +1 -1
  991. package/src/Request.ts +2 -1
  992. package/src/RequestResolver.ts +2 -3
  993. package/src/Resource.ts +1 -1
  994. package/src/Result.ts +124 -142
  995. package/src/Runtime.ts +2 -7
  996. package/src/Schedule.ts +74 -77
  997. package/src/Scheduler.ts +2 -2
  998. package/src/Schema.ts +491 -321
  999. package/src/SchemaAST.ts +98 -77
  1000. package/src/SchemaGetter.ts +23 -23
  1001. package/src/SchemaIssue.ts +18 -16
  1002. package/src/SchemaParser.ts +46 -49
  1003. package/src/SchemaRepresentation.ts +89 -77
  1004. package/src/SchemaTransformation.ts +36 -5
  1005. package/src/SchemaUtils.ts +1 -1
  1006. package/src/Scope.ts +12 -29
  1007. package/src/ScopedCache.ts +43 -43
  1008. package/src/Semaphore.ts +4 -16
  1009. package/src/Sink.ts +36 -39
  1010. package/src/Stdio.ts +6 -6
  1011. package/src/Stream.ts +789 -828
  1012. package/src/String.ts +3 -2
  1013. package/src/Struct.ts +20 -18
  1014. package/src/SubscriptionRef.ts +2 -2
  1015. package/src/Symbol.ts +3 -3
  1016. package/src/SynchronizedRef.ts +1 -1
  1017. package/src/Take.ts +2 -2
  1018. package/src/Terminal.ts +5 -5
  1019. package/src/Tracer.ts +9 -9
  1020. package/src/Trie.ts +70 -106
  1021. package/src/Tuple.ts +34 -32
  1022. package/src/TxChunk.ts +27 -18
  1023. package/src/TxDeferred.ts +11 -11
  1024. package/src/TxHashMap.ts +62 -63
  1025. package/src/TxHashSet.ts +38 -42
  1026. package/src/TxPriorityQueue.ts +31 -31
  1027. package/src/TxPubSub.ts +18 -18
  1028. package/src/TxQueue.ts +26 -29
  1029. package/src/TxReentrantLock.ts +21 -21
  1030. package/src/TxRef.ts +24 -24
  1031. package/src/TxSemaphore.ts +13 -74
  1032. package/src/TxSubscriptionRef.ts +24 -24
  1033. package/src/Types.ts +1 -4
  1034. package/src/UndefinedOr.ts +14 -0
  1035. package/src/Unify.ts +8 -8
  1036. package/src/Utils.ts +1 -2
  1037. package/src/index.ts +1932 -433
  1038. package/src/testing/FastCheck.ts +3 -3
  1039. package/src/testing/TestClock.ts +2 -3
  1040. package/src/testing/TestConsole.ts +8 -9
  1041. package/src/testing/TestSchema.ts +2 -0
  1042. package/src/testing/index.ts +34 -0
  1043. package/src/unstable/ai/AiError.ts +10 -19
  1044. package/src/unstable/ai/Chat.ts +0 -1
  1045. package/src/unstable/ai/McpSchema.ts +3 -0
  1046. package/src/unstable/ai/McpServer.ts +3 -1
  1047. package/src/unstable/ai/Model.ts +2 -6
  1048. package/src/unstable/ai/Prompt.ts +8 -10
  1049. package/src/unstable/ai/Response.ts +20 -20
  1050. package/src/unstable/ai/ResponseIdTracker.ts +1 -1
  1051. package/src/unstable/ai/Telemetry.ts +5 -5
  1052. package/src/unstable/ai/Tokenizer.ts +1 -1
  1053. package/src/unstable/ai/Tool.ts +14 -12
  1054. package/src/unstable/ai/index.ts +80 -6
  1055. package/src/unstable/cli/CliOutput.ts +5 -6
  1056. package/src/unstable/cli/Command.ts +3 -3
  1057. package/src/unstable/cli/Flag.ts +24 -0
  1058. package/src/unstable/cli/HelpDoc.ts +4 -4
  1059. package/src/unstable/cli/Param.ts +101 -72
  1060. package/src/unstable/cli/Primitive.ts +1 -1
  1061. package/src/unstable/cli/Prompt.ts +6 -14
  1062. package/src/unstable/cli/index.ts +205 -6
  1063. package/src/unstable/cli/internal/command.ts +3 -0
  1064. package/src/unstable/cli/internal/completions/descriptor.ts +3 -0
  1065. package/src/unstable/cli/internal/help.ts +10 -0
  1066. package/src/unstable/cli/internal/parser.ts +3 -1
  1067. package/src/unstable/cluster/ClusterCron.ts +1 -1
  1068. package/src/unstable/cluster/ClusterSchema.ts +8 -8
  1069. package/src/unstable/cluster/ClusterWorkflowEngine.ts +2 -2
  1070. package/src/unstable/cluster/Entity.ts +0 -1
  1071. package/src/unstable/cluster/EntityProxy.ts +10 -14
  1072. package/src/unstable/cluster/EntityProxyServer.ts +3 -2
  1073. package/src/unstable/cluster/EntityResource.ts +2 -2
  1074. package/src/unstable/cluster/Envelope.ts +1 -1
  1075. package/src/unstable/cluster/HttpRunner.ts +11 -11
  1076. package/src/unstable/cluster/K8sHttpClient.ts +5 -5
  1077. package/src/unstable/cluster/MachineId.ts +1 -1
  1078. package/src/unstable/cluster/MessageStorage.ts +1 -2
  1079. package/src/unstable/cluster/Runner.ts +1 -1
  1080. package/src/unstable/cluster/RunnerHealth.ts +2 -2
  1081. package/src/unstable/cluster/RunnerServer.ts +4 -4
  1082. package/src/unstable/cluster/Runners.ts +3 -3
  1083. package/src/unstable/cluster/ShardId.ts +7 -5
  1084. package/src/unstable/cluster/Sharding.ts +1 -1
  1085. package/src/unstable/cluster/ShardingConfig.ts +2 -2
  1086. package/src/unstable/cluster/SingleRunner.ts +1 -1
  1087. package/src/unstable/cluster/Snowflake.ts +10 -9
  1088. package/src/unstable/cluster/SocketRunner.ts +2 -2
  1089. package/src/unstable/cluster/SqlMessageStorage.ts +3 -3
  1090. package/src/unstable/cluster/SqlRunnerStorage.ts +3 -3
  1091. package/src/unstable/cluster/TestRunner.ts +1 -1
  1092. package/src/unstable/cluster/index.ts +790 -0
  1093. package/src/unstable/devtools/index.ts +58 -0
  1094. package/src/unstable/encoding/Sse.ts +16 -16
  1095. package/src/unstable/encoding/index.ts +49 -0
  1096. package/src/unstable/eventlog/Event.ts +2 -2
  1097. package/src/unstable/eventlog/EventGroup.ts +2 -2
  1098. package/src/unstable/eventlog/EventLog.ts +6 -7
  1099. package/src/unstable/eventlog/EventLogRemote.ts +2 -2
  1100. package/src/unstable/eventlog/EventLogServer.ts +2 -2
  1101. package/src/unstable/eventlog/EventLogServerEncrypted.ts +2 -2
  1102. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +1 -1
  1103. package/src/unstable/eventlog/EventLogSessionAuth.ts +1 -1
  1104. package/src/unstable/eventlog/index.ts +240 -0
  1105. package/src/unstable/http/Cookies.ts +6 -6
  1106. package/src/unstable/http/Etag.ts +2 -2
  1107. package/src/unstable/http/Headers.ts +2 -2
  1108. package/src/unstable/http/HttpClient.ts +5 -6
  1109. package/src/unstable/http/HttpClientError.ts +1 -1
  1110. package/src/unstable/http/HttpClientRequest.ts +4 -4
  1111. package/src/unstable/http/HttpClientResponse.ts +6 -6
  1112. package/src/unstable/http/HttpEffect.ts +5 -5
  1113. package/src/unstable/http/HttpIncomingMessage.ts +7 -6
  1114. package/src/unstable/http/HttpMethod.ts +4 -2
  1115. package/src/unstable/http/HttpMiddleware.ts +1 -0
  1116. package/src/unstable/http/HttpRouter.ts +23 -25
  1117. package/src/unstable/http/HttpServerError.ts +4 -1
  1118. package/src/unstable/http/HttpServerRequest.ts +15 -15
  1119. package/src/unstable/http/HttpServerRespondable.ts +1 -1
  1120. package/src/unstable/http/HttpServerResponse.ts +5 -4
  1121. package/src/unstable/http/HttpStaticServer.ts +2 -4
  1122. package/src/unstable/http/Multipart.ts +20 -19
  1123. package/src/unstable/http/Template.ts +0 -1
  1124. package/src/unstable/http/Url.ts +17 -17
  1125. package/src/unstable/http/UrlParams.ts +14 -12
  1126. package/src/unstable/http/index.ts +452 -0
  1127. package/src/unstable/httpapi/HttpApiBuilder.ts +0 -1
  1128. package/src/unstable/httpapi/HttpApiClient.ts +0 -1
  1129. package/src/unstable/httpapi/HttpApiMiddleware.ts +4 -2
  1130. package/src/unstable/httpapi/HttpApiScalar.ts +2 -2
  1131. package/src/unstable/httpapi/HttpApiSchema.ts +19 -8
  1132. package/src/unstable/httpapi/HttpApiSecurity.ts +0 -1
  1133. package/src/unstable/httpapi/HttpApiSwagger.ts +0 -2
  1134. package/src/unstable/httpapi/index.ts +310 -25
  1135. package/src/unstable/observability/Otlp.ts +3 -3
  1136. package/src/unstable/observability/OtlpExporter.ts +1 -1
  1137. package/src/unstable/observability/OtlpLogger.ts +3 -2
  1138. package/src/unstable/observability/OtlpMetrics.ts +5 -4
  1139. package/src/unstable/observability/OtlpResource.ts +9 -9
  1140. package/src/unstable/observability/OtlpSerialization.ts +3 -3
  1141. package/src/unstable/observability/OtlpTracer.ts +5 -2
  1142. package/src/unstable/observability/PrometheusMetrics.ts +7 -7
  1143. package/src/unstable/observability/index.ts +159 -3
  1144. package/src/unstable/persistence/KeyValueStore.ts +4 -4
  1145. package/src/unstable/persistence/Persistable.ts +11 -11
  1146. package/src/unstable/persistence/PersistedCache.ts +2 -2
  1147. package/src/unstable/persistence/PersistedQueue.ts +6 -6
  1148. package/src/unstable/persistence/Persistence.ts +2 -1
  1149. package/src/unstable/persistence/RateLimiter.ts +19 -15
  1150. package/src/unstable/persistence/Redis.ts +3 -3
  1151. package/src/unstable/persistence/index.ts +147 -0
  1152. package/src/unstable/process/ChildProcess.ts +42 -42
  1153. package/src/unstable/process/ChildProcessSpawner.ts +10 -10
  1154. package/src/unstable/process/index.ts +1 -1
  1155. package/src/unstable/reactivity/AsyncResult.ts +8 -6
  1156. package/src/unstable/reactivity/Atom.ts +25 -20
  1157. package/src/unstable/reactivity/AtomHttpApi.ts +2 -2
  1158. package/src/unstable/reactivity/AtomRef.ts +2 -2
  1159. package/src/unstable/reactivity/AtomRegistry.ts +17 -17
  1160. package/src/unstable/reactivity/AtomRpc.ts +2 -2
  1161. package/src/unstable/reactivity/Reactivity.ts +2 -3
  1162. package/src/unstable/reactivity/index.ts +166 -0
  1163. package/src/unstable/rpc/Rpc.ts +0 -1
  1164. package/src/unstable/rpc/RpcClient.ts +0 -1
  1165. package/src/unstable/rpc/RpcClientError.ts +2 -2
  1166. package/src/unstable/rpc/RpcMiddleware.ts +2 -2
  1167. package/src/unstable/rpc/RpcWorker.ts +3 -2
  1168. package/src/unstable/rpc/Utils.ts +2 -0
  1169. package/src/unstable/rpc/index.ts +272 -0
  1170. package/src/unstable/schema/Model.ts +98 -10
  1171. package/src/unstable/schema/VariantSchema.ts +1 -4
  1172. package/src/unstable/schema/index.ts +37 -0
  1173. package/src/unstable/socket/Socket.ts +5 -4
  1174. package/src/unstable/socket/index.ts +44 -0
  1175. package/src/unstable/sql/Migrator.ts +14 -12
  1176. package/src/unstable/sql/SqlClient.ts +4 -0
  1177. package/src/unstable/sql/SqlConnection.ts +3 -3
  1178. package/src/unstable/sql/SqlError.ts +18 -0
  1179. package/src/unstable/sql/SqlModel.ts +0 -1
  1180. package/src/unstable/sql/SqlSchema.ts +5 -5
  1181. package/src/unstable/sql/SqlStream.ts +1 -0
  1182. package/src/unstable/sql/Statement.ts +27 -24
  1183. package/src/unstable/sql/index.ts +178 -1
  1184. package/src/unstable/workers/Transferable.ts +7 -7
  1185. package/src/unstable/workers/Worker.ts +1 -0
  1186. package/src/unstable/workers/WorkerError.ts +8 -8
  1187. package/src/unstable/workers/index.ts +80 -0
  1188. package/src/unstable/workflow/Activity.ts +7 -7
  1189. package/src/unstable/workflow/DurableClock.ts +2 -2
  1190. package/src/unstable/workflow/DurableDeferred.ts +22 -20
  1191. package/src/unstable/workflow/DurableQueue.ts +7 -5
  1192. package/src/unstable/workflow/Workflow.ts +12 -10
  1193. package/src/unstable/workflow/WorkflowEngine.ts +11 -15
  1194. package/src/unstable/workflow/WorkflowProxy.ts +10 -12
  1195. package/src/unstable/workflow/WorkflowProxyServer.ts +3 -2
  1196. package/src/unstable/workflow/index.ts +160 -0
package/dist/Stream.js CHANGED
@@ -60,6 +60,7 @@ import * as MutableHashMap from "./MutableHashMap.js";
60
60
  import * as MutableList from "./MutableList.js";
61
61
  import * as Option from "./Option.js";
62
62
  import { hasProperty, isNotUndefined, isTagged } from "./Predicate.js";
63
+ import * as PubSub from "./PubSub.js";
63
64
  import * as Pull from "./Pull.js";
64
65
  import * as Queue from "./Queue.js";
65
66
  import * as RcMap from "./RcMap.js";
@@ -98,8 +99,8 @@ export const TypeId = "~effect/Stream";
98
99
  * Effect.runPromise(program)
99
100
  * ```
100
101
  *
101
- * @category Guards
102
- * @since 2.0.0
102
+ * @category guards
103
+ * @since 4.0.0
103
104
  */
104
105
  export const isStream = u => hasProperty(u, TypeId);
105
106
  /**
@@ -140,7 +141,7 @@ export const DefaultChunkSize = Channel.DefaultChunkSize;
140
141
  * // Output: [ 1, 2, 3 ]
141
142
  * ```
142
143
  *
143
- * @category Constructors
144
+ * @category constructors
144
145
  * @since 2.0.0
145
146
  */
146
147
  export const fromChannel = internal.fromChannel;
@@ -163,7 +164,7 @@ export const fromChannel = internal.fromChannel;
163
164
  * // Output: [ 42 ]
164
165
  * ```
165
166
  *
166
- * @category Constructors
167
+ * @category constructors
167
168
  * @since 2.0.0
168
169
  */
169
170
  export const fromEffect = effect => fromChannel(Channel.fromEffect(Effect.map(effect, Arr.of)));
@@ -173,7 +174,7 @@ export const fromEffect = effect => fromChannel(Channel.fromEffect(Effect.map(ef
173
174
  * **Example** (Accessing a service as a stream)
174
175
  *
175
176
  * ```ts
176
- * import { Effect, Context, Stream } from "effect"
177
+ * import { Context, Effect, Stream } from "effect"
177
178
  *
178
179
  * class Greeter extends Context.Service<Greeter, {
179
180
  * readonly greet: (name: string) => string
@@ -207,7 +208,7 @@ export const service = service => fromEffect(Effect.service(service));
207
208
  * **Example** (Accessing an optional service as a stream)
208
209
  *
209
210
  * ```ts
210
- * import { Effect, Option, Context, Stream } from "effect"
211
+ * import { Context, Effect, Option, Stream } from "effect"
211
212
  *
212
213
  * class Greeter extends Context.Service<Greeter, {
213
214
  * readonly greet: (name: string) => string
@@ -257,19 +258,13 @@ export const serviceOption = service => fromEffect(Effect.serviceOption(service)
257
258
  * // Output: Draining side effect
258
259
  * ```
259
260
  *
260
- * @category Constructors
261
+ * @category constructors
261
262
  * @since 4.0.0
262
263
  */
263
264
  export const fromEffectDrain = effect => fromPull(Effect.succeed(Effect.flatMap(effect, () => Cause.done())));
264
265
  /**
265
266
  * Creates a stream from an effect producing a value of type `A` which repeats forever.
266
267
  *
267
- * **Previously Known As**
268
- *
269
- * This API replaces the following from Effect 3.x:
270
- *
271
- * - `Stream.repeatEffect`
272
- *
273
268
  * **Example** (Repeating an effect forever)
274
269
  *
275
270
  * ```ts
@@ -287,7 +282,7 @@ export const fromEffectDrain = effect => fromPull(Effect.succeed(Effect.flatMap(
287
282
  * // Output: [ 3891571149, 4239494205, 2352981603, 2339111046, 1488052210 ]
288
283
  * ```
289
284
  *
290
- * @category Constructors
285
+ * @category constructors
291
286
  * @since 4.0.0
292
287
  */
293
288
  export const fromEffectRepeat = effect => fromPull(Effect.succeed(Effect.map(effect, Arr.of)));
@@ -295,12 +290,6 @@ export const fromEffectRepeat = effect => fromPull(Effect.succeed(Effect.map(eff
295
290
  * Creates a stream from an effect producing a value of type `A`, which is
296
291
  * repeated using the specified schedule.
297
292
  *
298
- * **Previously Known As**
299
- *
300
- * This API replaces the following from Effect 3.x:
301
- *
302
- * - `Stream.repeatEffectWithSchedule`
303
- *
304
293
  * **Example** (Repeating an effect with a schedule)
305
294
  *
306
295
  * ```ts
@@ -319,8 +308,8 @@ export const fromEffectRepeat = effect => fromPull(Effect.succeed(Effect.map(eff
319
308
  * // Output: [ "ping", "ping", "ping" ]
320
309
  * ```
321
310
  *
322
- * @category Constructors
323
- * @since 2.0.0
311
+ * @category constructors
312
+ * @since 4.0.0
324
313
  */
325
314
  export const fromEffectSchedule = (effect, schedule) => fromPull(Effect.gen(function* () {
326
315
  const step = yield* Schedule.toStepWithMetadata(schedule);
@@ -359,7 +348,7 @@ export const fromEffectSchedule = (effect, schedule) => fromPull(Effect.gen(func
359
348
  * // Output: [ undefined, undefined, undefined ]
360
349
  * ```
361
350
  *
362
- * @category Constructors
351
+ * @category constructors
363
352
  * @since 2.0.0
364
353
  */
365
354
  export const tick = interval => fromPull(Effect.sync(() => {
@@ -399,7 +388,7 @@ export const tick = interval => fromPull(Effect.sync(() => {
399
388
  * // Output: [1, 2, 3]
400
389
  * ```
401
390
  *
402
- * @category Constructors
391
+ * @category constructors
403
392
  * @since 2.0.0
404
393
  */
405
394
  export const fromPull = pull => fromChannel(Channel.fromPull(pull));
@@ -424,7 +413,7 @@ export const fromPull = pull => fromChannel(Channel.fromPull(pull));
424
413
  * // Output: [ 1, 2, 3 ]
425
414
  * ```
426
415
  *
427
- * @category Constructors
416
+ * @category constructors
428
417
  * @since 4.0.0
429
418
  */
430
419
  export const transformPull = (self, f) => fromChannel(Channel.fromTransform((_, scope) => Effect.flatMap(Channel.toPullScoped(self.channel, scope), pull => f(pull, scope))));
@@ -460,7 +449,7 @@ export const transformPull = (self, f) => fromChannel(Channel.fromTransform((_,
460
449
  * // Releasing scope
461
450
  * ```
462
451
  *
463
- * @category Constructors
452
+ * @category constructors
464
453
  * @since 4.0.0
465
454
  */
466
455
  export const transformPullBracket = (self, f) => fromChannel(Channel.fromTransformBracket((_, scope, forkedScope) => Effect.flatMap(Channel.toPullScoped(self.channel, scope), pull => f(pull, scope, forkedScope))));
@@ -483,7 +472,7 @@ export const transformPullBracket = (self, f) => fromChannel(Channel.fromTransfo
483
472
  * // Output: [ 1, 2, 3 ]
484
473
  * ```
485
474
  *
486
- * @category Constructors
475
+ * @category constructors
487
476
  * @since 2.0.0
488
477
  */
489
478
  export const toChannel = stream => stream.channel;
@@ -497,15 +486,6 @@ export const toChannel = stream => stream.channel;
497
486
  * You can customize the buffer size and strategy by passing an object as the
498
487
  * second argument with the `bufferSize` and `strategy` fields.
499
488
  *
500
- * **Previously Known As**
501
- *
502
- * This API replaces the following from Effect 3.x:
503
- *
504
- * - `Stream.async`
505
- * - `Stream.asyncEffect`
506
- * - `Stream.asyncPush`
507
- * - `Stream.asyncScoped`
508
- *
509
489
  * **Example** (Creating a stream from a callback that can emit values into a queue)
510
490
  *
511
491
  * ```ts
@@ -531,8 +511,8 @@ export const toChannel = stream => stream.channel;
531
511
  * Effect.runPromise(program)
532
512
  * ```
533
513
  *
534
- * @category Constructors
535
- * @since 2.0.0
514
+ * @category constructors
515
+ * @since 4.0.0
536
516
  */
537
517
  export const callback = (f, options) => fromChannel(Channel.callbackArray(f, options));
538
518
  /**
@@ -552,8 +532,8 @@ export const callback = (f, options) => fromChannel(Channel.callbackArray(f, opt
552
532
  * // []
553
533
  * ```
554
534
  *
555
- * @category Constructors
556
- * @since 4.0.0
535
+ * @category constructors
536
+ * @since 2.0.0
557
537
  */
558
538
  export const empty = /*#__PURE__*/fromChannel(Channel.empty);
559
539
  /**
@@ -573,7 +553,7 @@ export const empty = /*#__PURE__*/fromChannel(Channel.empty);
573
553
  * // [ 3 ]
574
554
  * ```
575
555
  *
576
- * @category Constructors
556
+ * @category constructors
577
557
  * @since 2.0.0
578
558
  */
579
559
  export const succeed = value => fromChannel(Channel.succeed(Arr.of(value)));
@@ -595,7 +575,7 @@ export const succeed = value => fromChannel(Channel.succeed(Arr.of(value)));
595
575
  * Effect.runPromise(program)
596
576
  * ```
597
577
  *
598
- * @category Constructors
578
+ * @category constructors
599
579
  * @since 2.0.0
600
580
  */
601
581
  export const make = (...values) => fromArray(values);
@@ -618,7 +598,7 @@ export const make = (...values) => fromArray(values);
618
598
  * // Output: [ 3 ]
619
599
  * ```
620
600
  *
621
- * @category Constructors
601
+ * @category constructors
622
602
  * @since 2.0.0
623
603
  */
624
604
  export const sync = evaluate => fromChannel(Channel.sync(() => Arr.of(evaluate())));
@@ -641,7 +621,7 @@ export const sync = evaluate => fromChannel(Channel.sync(() => Arr.of(evaluate()
641
621
  * // Output: [ 1, 2, 3 ]
642
622
  * ```
643
623
  *
644
- * @category Constructors
624
+ * @category constructors
645
625
  * @since 2.0.0
646
626
  */
647
627
  export const suspend = stream => fromChannel(Channel.suspend(() => stream().channel));
@@ -663,7 +643,7 @@ export const suspend = stream => fromChannel(Channel.suspend(() => stream().chan
663
643
  * Effect.runPromise(program)
664
644
  * ```
665
645
  *
666
- * @category Constructors
646
+ * @category constructors
667
647
  * @since 2.0.0
668
648
  */
669
649
  export const fail = error => fromChannel(Channel.fail(error));
@@ -687,7 +667,7 @@ export const fail = error => fromChannel(Channel.fail(error));
687
667
  * // { _id: 'Exit', _tag: 'Failure', cause: { _id: 'Cause', _tag: 'Fail', failure: 'Uh oh!' } }
688
668
  * ```
689
669
  *
690
- * @category Constructors
670
+ * @category constructors
691
671
  * @since 2.0.0
692
672
  */
693
673
  export const failSync = evaluate => fromChannel(Channel.failSync(evaluate));
@@ -712,7 +692,7 @@ export const failSync = evaluate => fromChannel(Channel.failSync(evaluate));
712
692
  * Effect.runPromise(program)
713
693
  * ```
714
694
  *
715
- * @category Constructors
695
+ * @category constructors
716
696
  * @since 2.0.0
717
697
  */
718
698
  export const failCause = cause => fromChannel(Channel.failCause(cause));
@@ -744,7 +724,7 @@ export const failCause = cause => fromChannel(Channel.failCause(cause));
744
724
  * // Output: Exit.Failure(Error: Boom)
745
725
  * ```
746
726
  *
747
- * @category Constructors
727
+ * @category constructors
748
728
  * @since 2.0.0
749
729
  */
750
730
  export const die = defect => fromChannel(Channel.die(defect));
@@ -770,7 +750,7 @@ export const die = defect => fromChannel(Channel.die(defect));
770
750
  * // { _id: 'Exit', _tag: 'Failure', cause: { _id: 'Cause', _tag: 'Fail', failure: 'Connection timeout after retries' } }
771
751
  * ```
772
752
  *
773
- * @category Constructors
753
+ * @category constructors
774
754
  * @since 2.0.0
775
755
  */
776
756
  export const failCauseSync = evaluate => fromChannel(Channel.failCauseSync(evaluate));
@@ -801,7 +781,7 @@ export const failCauseSync = evaluate => fromChannel(Channel.failCauseSync(evalu
801
781
  * // Output: [ 1, 2, 3 ]
802
782
  * ```
803
783
  *
804
- * @category Constructors
784
+ * @category constructors
805
785
  * @since 2.0.0
806
786
  */
807
787
  export const fromIteratorSucceed = (iterator, maxChunkSize) => fromChannel(Channel.fromIteratorArray(() => iterator, maxChunkSize));
@@ -829,7 +809,7 @@ export const fromIteratorSucceed = (iterator, maxChunkSize) => fromChannel(Chann
829
809
  * // Output: [ 1, 2, 3 ]
830
810
  * ```
831
811
  *
832
- * @category Constructors
812
+ * @category constructors
833
813
  * @since 2.0.0
834
814
  */
835
815
  export const fromIterable = (iterable, options) => Array.isArray(iterable) && options?.chunkSize === undefined ? fromArray(iterable) : fromChannel(Channel.fromIterableArray(iterable, options?.chunkSize));
@@ -839,7 +819,7 @@ export const fromIterable = (iterable, options) => Array.isArray(iterable) && op
839
819
  * **Example** (Creating a stream from an iterable effect)
840
820
  *
841
821
  * ```ts
842
- * import { Console, Effect, Context, Stream } from "effect"
822
+ * import { Console, Context, Effect, Stream } from "effect"
843
823
  *
844
824
  * class UserRepo extends Context.Service<UserRepo, {
845
825
  * readonly list: Effect.Effect<ReadonlyArray<string>>
@@ -865,19 +845,13 @@ export const fromIterable = (iterable, options) => Array.isArray(iterable) && op
865
845
  * // Output: [ "user1", "user2" ]
866
846
  * ```
867
847
  *
868
- * @category Constructors
848
+ * @category constructors
869
849
  * @since 2.0.0
870
850
  */
871
851
  export const fromIterableEffect = iterable => unwrap(Effect.map(iterable, fromIterable));
872
852
  /**
873
853
  * Creates a stream by repeatedly running an effect that yields an iterable of values.
874
854
  *
875
- * **Previously Known As**
876
- *
877
- * This API replaces the following from Effect 3.x:
878
- *
879
- * - `Stream.repeatEffectChunk`
880
- *
881
855
  * **Example** (Repeating an iterable effect)
882
856
  *
883
857
  * ```ts
@@ -895,19 +869,13 @@ export const fromIterableEffect = iterable => unwrap(Effect.map(iterable, fromIt
895
869
  * // Output: [ 1, 2, 1, 2, 1 ]
896
870
  * ```
897
871
  *
898
- * @category Constructors
872
+ * @category constructors
899
873
  * @since 4.0.0
900
874
  */
901
875
  export const fromIterableEffectRepeat = iterable => flatMap(fromEffectRepeat(iterable), fromIterable);
902
876
  /**
903
877
  * Creates a stream from an array of values.
904
878
  *
905
- * **Previously Known As**
906
- *
907
- * This API replaces the following from Effect 3.x:
908
- *
909
- * - `Stream.fromChunk`
910
- *
911
879
  * **Example** (Creating a stream from an array of values)
912
880
  *
913
881
  * ```ts
@@ -923,7 +891,7 @@ export const fromIterableEffectRepeat = iterable => flatMap(fromEffectRepeat(ite
923
891
  * // Output: [ 1, 2, 3 ]
924
892
  * ```
925
893
  *
926
- * @category Constructors
894
+ * @category constructors
927
895
  * @since 4.0.0
928
896
  */
929
897
  export const fromArray = array => Arr.isReadonlyArrayNonEmpty(array) ? fromChannel(Channel.succeed(array)) : empty;
@@ -945,19 +913,13 @@ export const fromArray = array => Arr.isReadonlyArrayNonEmpty(array) ? fromChann
945
913
  * // Output: [ "Ada", "Grace" ]
946
914
  * ```
947
915
  *
948
- * @category Constructors
916
+ * @category constructors
949
917
  * @since 4.0.0
950
918
  */
951
919
  export const fromArrayEffect = effect => unwrap(Effect.map(effect, fromArray));
952
920
  /**
953
921
  * Creates a stream from an arbitrary number of arrays.
954
922
  *
955
- * **Previously Known As**
956
- *
957
- * This API replaces the following from Effect 3.x:
958
- *
959
- * - `Stream.fromChunks`
960
- *
961
923
  * **Example** (Creating a stream from an arbitrary number of arrays)
962
924
  *
963
925
  * ```ts
@@ -973,7 +935,7 @@ export const fromArrayEffect = effect => unwrap(Effect.map(effect, fromArray));
973
935
  * // Output: [ 1, 2, 3, 4 ]
974
936
  * ```
975
937
  *
976
- * @category Constructors
938
+ * @category constructors
977
939
  * @since 4.0.0
978
940
  */
979
941
  export const fromArrays = (...arrays) => fromChannel(Channel.fromArray(Arr.filter(arrays, Arr.isReadonlyArrayNonEmpty)));
@@ -1004,8 +966,8 @@ export const fromArrays = (...arrays) => fromChannel(Channel.fromArray(Arr.filte
1004
966
  * // Output: [ 1, 2, 3 ]
1005
967
  * ```
1006
968
  *
1007
- * @category Constructors
1008
- * @since 4.0.0
969
+ * @category constructors
970
+ * @since 2.0.0
1009
971
  */
1010
972
  export const fromQueue = queue => fromChannel(Channel.fromQueueArray(queue));
1011
973
  /**
@@ -1037,8 +999,8 @@ export const fromQueue = queue => fromChannel(Channel.fromQueueArray(queue));
1037
999
  * // Output: [ 1, 2, 3 ]
1038
1000
  * ```
1039
1001
  *
1040
- * @category Constructors
1041
- * @since 4.0.0
1002
+ * @category constructors
1003
+ * @since 2.0.0
1042
1004
  */
1043
1005
  export const fromPubSub = pubsub => fromChannel(Channel.fromPubSubArray(pubsub));
1044
1006
  /**
@@ -1068,7 +1030,7 @@ export const fromPubSub = pubsub => fromChannel(Channel.fromPubSubArray(pubsub))
1068
1030
  * // Output: [ 1, 2 ]
1069
1031
  * ```
1070
1032
  *
1071
- * @category Constructors
1033
+ * @category constructors
1072
1034
  * @since 4.0.0
1073
1035
  */
1074
1036
  export const fromPubSubTake = pubsub => fromChannel(Channel.fromPubSubTake(pubsub));
@@ -1108,7 +1070,7 @@ export const fromPubSubTake = pubsub => fromChannel(Channel.fromPubSubTake(pubsu
1108
1070
  * // Output: [ 1, 2, 3 ]
1109
1071
  * ```
1110
1072
  *
1111
- * @category Constructors
1073
+ * @category constructors
1112
1074
  * @since 2.0.0
1113
1075
  */
1114
1076
  export const fromReadableStream = options => fromChannel(Channel.fromTransform(Effect.fnUntraced(function* (_, scope) {
@@ -1147,7 +1109,7 @@ export const fromReadableStream = options => fromChannel(Channel.fromTransform(E
1147
1109
  * // [ 1, 2, 3 ]
1148
1110
  * ```
1149
1111
  *
1150
- * @category Constructors
1112
+ * @category constructors
1151
1113
  * @since 2.0.0
1152
1114
  */
1153
1115
  export const fromAsyncIterable = (iterable, onError) => fromChannel(Channel.fromAsyncIterableArray(iterable, onError));
@@ -1173,7 +1135,7 @@ export const fromAsyncIterable = (iterable, onError) => fromChannel(Channel.from
1173
1135
  * // Output: [ 0, 1, 2 ]
1174
1136
  * ```
1175
1137
  *
1176
- * @category Constructors
1138
+ * @category constructors
1177
1139
  * @since 2.0.0
1178
1140
  */
1179
1141
  export const fromSchedule = schedule => fromPull(Effect.map(Schedule.toStepWithSleep(schedule), step => Pull.catchDone(Effect.map(step(void 0), Arr.of), () => Cause.done())));
@@ -1204,7 +1166,7 @@ export const fromSchedule = schedule => fromPull(Effect.map(Schedule.toStepWithS
1204
1166
  * // Output: [ 1, 2 ]
1205
1167
  * ```
1206
1168
  *
1207
- * @category Constructors
1169
+ * @category constructors
1208
1170
  * @since 4.0.0
1209
1171
  */
1210
1172
  export const fromSubscription = pubsub => fromChannel(Channel.fromSubscriptionArray(pubsub));
@@ -1238,7 +1200,7 @@ export const fromSubscription = pubsub => fromChannel(Channel.fromSubscriptionAr
1238
1200
  * // [ 1, 2, 3 ]
1239
1201
  * ```
1240
1202
  *
1241
- * @category Constructors
1203
+ * @category constructors
1242
1204
  * @since 3.1.0
1243
1205
  */
1244
1206
  export const fromEventListener = (target, type, options) => callback(queue => {
@@ -1271,7 +1233,7 @@ export const fromEventListener = (target, type, options) => callback(queue => {
1271
1233
  * // Output: [ 1, 2, 3, 4, 5 ]
1272
1234
  * ```
1273
1235
  *
1274
- * @category Constructors
1236
+ * @category constructors
1275
1237
  * @since 2.0.0
1276
1238
  */
1277
1239
  export const unfold = (s, f) => fromPull(Effect.sync(() => {
@@ -1290,8 +1252,7 @@ export const unfold = (s, f) => fromPull(Effect.sync(() => {
1290
1252
  * **Example** (Paginating stream state)
1291
1253
  *
1292
1254
  * ```ts
1293
- * import { Console, Effect, Stream } from "effect"
1294
- * import * as Option from "effect/Option"
1255
+ * import { Console, Effect, Option, Stream } from "effect"
1295
1256
  *
1296
1257
  * const stream = Stream.paginate(0, (n: number) =>
1297
1258
  * Effect.succeed(
@@ -1305,7 +1266,7 @@ export const unfold = (s, f) => fromPull(Effect.sync(() => {
1305
1266
  * // Output: [ 0, 1, 2, 3 ]
1306
1267
  * ```
1307
1268
  *
1308
- * @category Constructors
1269
+ * @category constructors
1309
1270
  * @since 2.0.0
1310
1271
  */
1311
1272
  export const paginate = (s, f) => fromPull(Effect.sync(() => {
@@ -1343,7 +1304,7 @@ export const paginate = (s, f) => fromPull(Effect.sync(() => {
1343
1304
  * // Output: [ 1, 2, 3 ]
1344
1305
  * ```
1345
1306
  *
1346
- * @category Constructors
1307
+ * @category constructors
1347
1308
  * @since 2.0.0
1348
1309
  */
1349
1310
  export const iterate = (value, next) => unfold(value, a => Effect.succeed([a, next(a)]));
@@ -1366,8 +1327,8 @@ export const iterate = (value, next) => unfold(value, a => Effect.succeed([a, ne
1366
1327
  * Effect.runPromise(program)
1367
1328
  * // Output: [ 1, 2, 3, 4, 5 ]
1368
1329
  * ```
1369
- * @category Constructors
1370
- * @since 4.0.0
1330
+ * @category constructors
1331
+ * @since 2.0.0
1371
1332
  */
1372
1333
  export const range = (min, max, chunkSize = Channel.DefaultChunkSize) => min > max ? empty : fromPull(Effect.sync(() => {
1373
1334
  let start = min;
@@ -1402,8 +1363,8 @@ export const range = (min, max, chunkSize = Channel.DefaultChunkSize) => min > m
1402
1363
  * // []
1403
1364
  * ```
1404
1365
  *
1405
- * @category Constructors
1406
- * @since 4.0.0
1366
+ * @category constructors
1367
+ * @since 2.0.0
1407
1368
  */
1408
1369
  export const never = /*#__PURE__*/fromChannel(Channel.never);
1409
1370
  /**
@@ -1425,7 +1386,7 @@ export const never = /*#__PURE__*/fromChannel(Channel.never);
1425
1386
  * // [1, 2, 3]
1426
1387
  * ```
1427
1388
  *
1428
- * @category Constructors
1389
+ * @category constructors
1429
1390
  * @since 2.0.0
1430
1391
  */
1431
1392
  export const unwrap = effect => fromChannel(Channel.unwrap(Effect.map(effect, toChannel)));
@@ -1453,7 +1414,7 @@ export const unwrap = effect => fromChannel(Channel.unwrap(Effect.map(effect, to
1453
1414
  * // [ "resource" ]
1454
1415
  * ```
1455
1416
  *
1456
- * @category Constructors
1417
+ * @category constructors
1457
1418
  * @since 2.0.0
1458
1419
  */
1459
1420
  export const scoped = self => fromChannel(Channel.scoped(self.channel));
@@ -1474,7 +1435,7 @@ export const scoped = self => fromChannel(Channel.scoped(self.channel));
1474
1435
  * // [ 1, 3, 5 ]
1475
1436
  * ```
1476
1437
  *
1477
- * @category Mapping
1438
+ * @category mapping
1478
1439
  * @since 2.0.0
1479
1440
  */
1480
1441
  export const map = /*#__PURE__*/dual(2, (self, f) => suspend(() => {
@@ -1514,19 +1475,13 @@ export const map = /*#__PURE__*/dual(2, (self, f) => suspend(() => {
1514
1475
  * // Output: [ "error: boom" ]
1515
1476
  * ```
1516
1477
  *
1517
- * @category Mapping
1478
+ * @category mapping
1518
1479
  * @since 2.0.0
1519
1480
  */
1520
1481
  export const mapBoth = /*#__PURE__*/dual(2, (self, options) => self.pipe(map(options.onSuccess), mapError(options.onFailure)));
1521
1482
  /**
1522
1483
  * Transforms each emitted chunk using the provided function, which receives the chunk and its index.
1523
1484
  *
1524
- * **Previously Known As**
1525
- *
1526
- * This API replaces the following from Effect 3.x:
1527
- *
1528
- * - `Stream.mapChunks`
1529
- *
1530
1485
  * **Example** (Mapping stream chunks)
1531
1486
  *
1532
1487
  * ```ts
@@ -1545,8 +1500,8 @@ export const mapBoth = /*#__PURE__*/dual(2, (self, options) => self.pipe(map(opt
1545
1500
  * // Output: [ 1, 2, 4, 5 ]
1546
1501
  * ```
1547
1502
  *
1548
- * @category Mapping
1549
- * @since 2.0.0
1503
+ * @category mapping
1504
+ * @since 4.0.0
1550
1505
  */
1551
1506
  export const mapArray = /*#__PURE__*/dual(2, (self, f) => fromChannel(Channel.map(self.channel, f)));
1552
1507
  /**
@@ -1581,7 +1536,7 @@ export const mapArray = /*#__PURE__*/dual(2, (self, f) => fromChannel(Channel.ma
1581
1536
  * // [2, 4, 6]
1582
1537
  * ```
1583
1538
  *
1584
- * @category Mapping
1539
+ * @category mapping
1585
1540
  * @since 2.0.0
1586
1541
  */
1587
1542
  export const mapEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, f, options) => self.channel.pipe(Channel.flattenArray, Channel.mapEffect(f, options), Channel.map(Arr.of), fromChannel));
@@ -1604,19 +1559,13 @@ export const mapEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, f,
1604
1559
  * // Output: [1, 2, 3]
1605
1560
  * ```
1606
1561
  *
1607
- * @category Mapping
1562
+ * @category mapping
1608
1563
  * @since 2.0.0
1609
1564
  */
1610
1565
  export const flattenEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => mapEffect(self, identity, options));
1611
1566
  /**
1612
1567
  * Effectfully maps over non-empty array chunks emitted by the stream.
1613
1568
  *
1614
- * **Previously Known As**
1615
- *
1616
- * This API replaces the following from Effect 3.x:
1617
- *
1618
- * - `Stream.mapChunksEffect`
1619
- *
1620
1569
  * **Example** (Effectfully mapping stream chunks)
1621
1570
  *
1622
1571
  * ```ts
@@ -1637,7 +1586,7 @@ export const flattenEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self,
1637
1586
  * // Output: [1, 2, 13, 14]
1638
1587
  * ```
1639
1588
  *
1640
- * @category Mapping
1589
+ * @category mapping
1641
1590
  * @since 4.0.0
1642
1591
  */
1643
1592
  export const mapArrayEffect = /*#__PURE__*/dual(2, (self, f) => fromChannel(Channel.mapEffect(self.channel, f)));
@@ -1646,12 +1595,6 @@ export const mapArrayEffect = /*#__PURE__*/dual(2, (self, f) => fromChannel(Chan
1646
1595
  *
1647
1596
  * The stream ends after the first failure, emitting a `Result.fail` value.
1648
1597
  *
1649
- * **Previously Known As:**
1650
- *
1651
- * This API replaces the following from Effect 3.x:
1652
- *
1653
- * - `Stream.either`
1654
- *
1655
1598
  * **Example** (Converting failures to results)
1656
1599
  *
1657
1600
  * ```ts
@@ -1674,7 +1617,7 @@ export const mapArrayEffect = /*#__PURE__*/dual(2, (self, f) => fromChannel(Chan
1674
1617
  * // Output: [ "success: 1", "success: 2", "failure: boom" ]
1675
1618
  * ```
1676
1619
  *
1677
- * @category Error Handling
1620
+ * @category error handling
1678
1621
  * @since 4.0.0
1679
1622
  */
1680
1623
  export const result = self => self.pipe(map(Result.succeed), catch_(e => succeed(Result.fail(e))));
@@ -1708,7 +1651,7 @@ export const result = self => self.pipe(map(Result.succeed), catch_(e => succeed
1708
1651
  * // [ 2, 4, 6 ]
1709
1652
  * ```
1710
1653
  *
1711
- * @category Sequencing
1654
+ * @category sequencing
1712
1655
  * @since 2.0.0
1713
1656
  */
1714
1657
  export const tap = /*#__PURE__*/dual(args => isStream(args[0]), (self, f, options) => mapEffect(self, a => Effect.as(f(a), a), options));
@@ -1741,7 +1684,7 @@ export const tap = /*#__PURE__*/dual(args => isStream(args[0]), (self, f, option
1741
1684
  * // [ 1, 2, 3 ]
1742
1685
  * ```
1743
1686
  *
1744
- * @category Sequencing
1687
+ * @category sequencing
1745
1688
  * @since 2.0.0
1746
1689
  */
1747
1690
  export const tapBoth = /*#__PURE__*/dual(2, (self, options) => self.pipe(tapError(options.onError), tap(options.onElement, {
@@ -1775,7 +1718,7 @@ export const tapBoth = /*#__PURE__*/dual(2, (self, options) => self.pipe(tapErro
1775
1718
  * // Output: [1, 2, 3]
1776
1719
  * ```
1777
1720
  *
1778
- * @category Sequencing
1721
+ * @category sequencing
1779
1722
  * @since 2.0.0
1780
1723
  */
1781
1724
  export const tapSink = /*#__PURE__*/dual(2, (self, sink) => transformPullBracket(self, Effect.fnUntraced(function* (pull, _, scope) {
@@ -1846,7 +1789,7 @@ export const tapSink = /*#__PURE__*/dual(2, (self, sink) => transformPullBracket
1846
1789
  * // Output: [ 1, 2, 2, 4, 3, 6 ]
1847
1790
  * ```
1848
1791
  *
1849
- * @category Mapping
1792
+ * @category mapping
1850
1793
  * @since 2.0.0
1851
1794
  */
1852
1795
  export const flatMap = /*#__PURE__*/dual(args => isStream(args[0]), (self, f, options) => self.channel.pipe(Channel.flattenArray, Channel.flatMap(a => f(a).channel, options), fromChannel));
@@ -1871,7 +1814,7 @@ export const flatMap = /*#__PURE__*/dual(args => isStream(args[0]), (self, f, op
1871
1814
  * })
1872
1815
  * ```
1873
1816
  *
1874
- * @category Sequencing
1817
+ * @category sequencing
1875
1818
  * @since 4.0.0
1876
1819
  */
1877
1820
  export const switchMap = /*#__PURE__*/dual(args => isStream(args[0]), (self, f, options) => self.channel.pipe(Channel.flattenArray, Channel.switchMap(a => f(a).channel, options), fromChannel));
@@ -1903,19 +1846,13 @@ export const switchMap = /*#__PURE__*/dual(args => isStream(args[0]), (self, f,
1903
1846
  * // Output: [ 1, 2, 3, 4, 5, 6 ]
1904
1847
  * ```
1905
1848
  *
1906
- * @category Mapping
1849
+ * @category mapping
1907
1850
  * @since 2.0.0
1908
1851
  */
1909
1852
  export const flatten = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => flatMap(self, identity, options));
1910
1853
  /**
1911
1854
  * Flattens a stream of non-empty arrays into a stream of elements.
1912
1855
  *
1913
- * **Previously Known As**
1914
- *
1915
- * This API replaces the following from Effect 3.x:
1916
- *
1917
- * - `Stream.flattenChunks`
1918
- *
1919
1856
  * **Example** (Flattening a stream of non-empty arrays into a stream of elements)
1920
1857
  *
1921
1858
  * ```ts
@@ -1932,7 +1869,7 @@ export const flatten = /*#__PURE__*/dual(args => isStream(args[0]), (self, optio
1932
1869
  * // Output: [ 1, 2, 3 ]
1933
1870
  * ```
1934
1871
  *
1935
- * @category Sequencing
1872
+ * @category sequencing
1936
1873
  * @since 4.0.0
1937
1874
  */
1938
1875
  export const flattenArray = self => fromChannel(Channel.flattenArray(self.channel));
@@ -1953,7 +1890,7 @@ export const flattenArray = self => fromChannel(Channel.flattenArray(self.channe
1953
1890
  * // Output: []
1954
1891
  * ```
1955
1892
  *
1956
- * @category Sequencing
1893
+ * @category sequencing
1957
1894
  * @since 2.0.0
1958
1895
  */
1959
1896
  export const drain = self => fromChannel(Channel.drain(self.channel));
@@ -1982,7 +1919,7 @@ export const drain = self => fromChannel(Channel.drain(self.channel));
1982
1919
  * // Output: [ 1, 2 ]
1983
1920
  * ```
1984
1921
  *
1985
- * @category Sequencing
1922
+ * @category sequencing
1986
1923
  * @since 2.0.0
1987
1924
  */
1988
1925
  export const drainFork = /*#__PURE__*/dual(2, (self, that) => mergeEffect(self, runDrain(that)));
@@ -2007,7 +1944,7 @@ export const drainFork = /*#__PURE__*/dual(2, (self, that) => mergeEffect(self,
2007
1944
  * // Output: [ 1, 1, 1, 1, 1 ]
2008
1945
  * ```
2009
1946
  *
2010
- * @category Sequencing
1947
+ * @category sequencing
2011
1948
  * @since 2.0.0
2012
1949
  */
2013
1950
  export const repeat = /*#__PURE__*/dual(2, (self, schedule) => fromChannel(Channel.repeat(self.channel, schedule)));
@@ -2073,7 +2010,7 @@ export const timeout = /*#__PURE__*/dual(2, (self, duration) => timeoutOrElse(se
2073
2010
  * unchanged.
2074
2011
  *
2075
2012
  * @category Rate Limiting
2076
- * @since 2.0.0
2013
+ * @since 4.0.0
2077
2014
  */
2078
2015
  export const timeoutOrElse = /*#__PURE__*/dual(2, (self, options) => {
2079
2016
  const duration = Duration.fromInputUnsafe(options.duration);
@@ -2117,8 +2054,6 @@ export const timeoutOrElse = /*#__PURE__*/dual(2, (self, options) => {
2117
2054
  * Repeats each element of the stream according to the provided schedule,
2118
2055
  * including the original emission.
2119
2056
  *
2120
- * @category Sequencing
2121
- * @since 2.0.0
2122
2057
  * **Example** (Repeating stream elements)
2123
2058
  *
2124
2059
  * ```ts
@@ -2135,6 +2070,9 @@ export const timeoutOrElse = /*#__PURE__*/dual(2, (self, options) => {
2135
2070
  * Effect.runPromise(program)
2136
2071
  * // Output: [ "A", "A", "B", "B", "C", "C" ]
2137
2072
  * ```
2073
+ *
2074
+ * @category sequencing
2075
+ * @since 2.0.0
2138
2076
  */
2139
2077
  export const repeatElements = /*#__PURE__*/dual(2, (self, schedule) => fromChannel(Channel.fromTransform((upstream, scope) => Effect.map(Channel.toTransform(Channel.flattenArray(self.channel))(upstream, scope), pullElement => {
2140
2078
  let pullRepeat = undefined;
@@ -2172,19 +2110,13 @@ export const repeatElements = /*#__PURE__*/dual(2, (self, schedule) => fromChann
2172
2110
  * // Output: [ "A", "B", "A", "B", "A" ]
2173
2111
  * ```
2174
2112
  *
2175
- * @category Sequencing
2113
+ * @category sequencing
2176
2114
  * @since 2.0.0
2177
2115
  */
2178
2116
  export const forever = self => fromChannel(Channel.forever(self.channel));
2179
2117
  /**
2180
2118
  * Submerges the iterables emitted by this stream into the stream's structure.
2181
2119
  *
2182
- * **Previously Known As**
2183
- *
2184
- * This API replaces the following from Effect 3.x:
2185
- *
2186
- * - `Stream.flattenIterables`
2187
- *
2188
2120
  * **Example** (Flattening iterable values)
2189
2121
  *
2190
2122
  * ```ts
@@ -2200,7 +2132,7 @@ export const forever = self => fromChannel(Channel.forever(self.channel));
2200
2132
  * // Output: [ 1, 2, 3, 4 ]
2201
2133
  * ```
2202
2134
  *
2203
- * @category Mapping
2135
+ * @category mapping
2204
2136
  * @since 4.0.0
2205
2137
  */
2206
2138
  export const flattenIterable = self => flatMap(self, fromIterable);
@@ -2228,8 +2160,8 @@ export const flattenIterable = self => flatMap(self, fromIterable);
2228
2160
  * // Output: [ 1, 2, 3 ]
2229
2161
  * ```
2230
2162
  *
2231
- * @category Sequencing
2232
- * @since 4.0.0
2163
+ * @category sequencing
2164
+ * @since 2.0.0
2233
2165
  */
2234
2166
  export const flattenTake = self => self.channel.pipe(Channel.flattenArray, Channel.flattenTake, fromChannel);
2235
2167
  /**
@@ -2250,7 +2182,7 @@ export const flattenTake = self => self.channel.pipe(Channel.flattenArray, Chann
2250
2182
  * // Output: [ 1, 2, 3, 4, 5, 6 ]
2251
2183
  * ```
2252
2184
  *
2253
- * @category Sequencing
2185
+ * @category sequencing
2254
2186
  * @since 2.0.0
2255
2187
  */
2256
2188
  export const concat = /*#__PURE__*/dual(2, (self, that) => flatten(fromArray([self, that])));
@@ -2275,7 +2207,7 @@ export const concat = /*#__PURE__*/dual(2, (self, that) => flatten(fromArray([se
2275
2207
  * Effect.runPromise(program)
2276
2208
  * ```
2277
2209
  *
2278
- * @category Sequencing
2210
+ * @category sequencing
2279
2211
  * @since 2.0.0
2280
2212
  */
2281
2213
  export const prepend = /*#__PURE__*/dual(2, (self, values) => concat(fromIterable(values), self));
@@ -2312,8 +2244,6 @@ export const merge = /*#__PURE__*/dual(args => isStream(args[0]) && isStream(arg
2312
2244
  * The effect runs concurrently, fails the stream if it fails, and is interrupted
2313
2245
  * when the stream completes.
2314
2246
  *
2315
- * @category Merging
2316
- * @since 4.0.0
2317
2247
  * **Example** (Merging with a background effect)
2318
2248
  *
2319
2249
  * ```ts
@@ -2332,18 +2262,15 @@ export const merge = /*#__PURE__*/dual(args => isStream(args[0]) && isStream(arg
2332
2262
  * // Output: side task
2333
2263
  * // Output: [ 1, 2, 3 ]
2334
2264
  * ```
2265
+ *
2266
+ * @category Merging
2267
+ * @since 4.0.0
2335
2268
  */
2336
2269
  export const mergeEffect = /*#__PURE__*/dual(2, (self, effect) => self.channel.pipe(Channel.mergeEffect(effect), fromChannel));
2337
2270
  /**
2338
2271
  * Merges this stream and the specified stream together, tagging values from the
2339
2272
  * left stream as `Result.succeed` and values from the right stream as `Result.fail`.
2340
2273
  *
2341
- * **Previously Known As**
2342
- *
2343
- * This API replaces the following from Effect 3.x:
2344
- *
2345
- * - `Stream.mergeEither`
2346
- *
2347
2274
  * **Example** (Merging streams into results)
2348
2275
  *
2349
2276
  * ```ts
@@ -2372,7 +2299,7 @@ export const mergeEffect = /*#__PURE__*/dual(2, (self, effect) => self.channel.p
2372
2299
  * ```
2373
2300
  *
2374
2301
  * @category Merging
2375
- * @since 2.0.0
2302
+ * @since 4.0.0
2376
2303
  */
2377
2304
  export const mergeResult = /*#__PURE__*/dual(2, (self, that) => merge(map(self, Result.succeed), map(that, Result.fail)));
2378
2305
  /**
@@ -2484,7 +2411,7 @@ export const mergeAll = /*#__PURE__*/dual(2, (streams, options) => flatten(fromI
2484
2411
  * // Output: [ [ 1, "a" ], [ 1, "b" ], [ 2, "a" ], [ 2, "b" ] ]
2485
2412
  * ```
2486
2413
  *
2487
- * @category Zipping
2414
+ * @category zipping
2488
2415
  * @since 2.0.0
2489
2416
  */
2490
2417
  export const cross = /*#__PURE__*/dual(2, (left, right) => crossWith(left, right, (l, r) => [l, r]));
@@ -2512,7 +2439,7 @@ export const cross = /*#__PURE__*/dual(2, (left, right) => crossWith(left, right
2512
2439
  * // Output: [ "1-a", "1-b", "2-a", "2-b" ]
2513
2440
  * ```
2514
2441
  *
2515
- * @category Zipping
2442
+ * @category zipping
2516
2443
  * @since 2.0.0
2517
2444
  */
2518
2445
  export const crossWith = /*#__PURE__*/dual(3, (left, right, f) => flatMap(left, l => map(right, r => f(l, r))));
@@ -2538,7 +2465,7 @@ export const crossWith = /*#__PURE__*/dual(3, (left, right, f) => flatMap(left,
2538
2465
  * // Output: [ "1-a", "2-b", "3-c" ]
2539
2466
  * ```
2540
2467
  *
2541
- * @category Zipping
2468
+ * @category zipping
2542
2469
  * @since 2.0.0
2543
2470
  */
2544
2471
  export const zipWith = /*#__PURE__*/dual(3, (left, right, f) => zipWithArray(left, right, zipArrays(f)));
@@ -2555,12 +2482,6 @@ const zipArrays = f => (leftArr, rightArr) => {
2555
2482
  *
2556
2483
  * The function returns output plus leftover arrays that carry into the next pull.
2557
2484
  *
2558
- * **Previously Known As**
2559
- *
2560
- * This API replaces the following from Effect 3.x:
2561
- *
2562
- * - `Stream.zipWithChunks`
2563
- *
2564
2485
  * **Example** (Zipping stream chunks)
2565
2486
  *
2566
2487
  * ```ts
@@ -2585,8 +2506,8 @@ const zipArrays = f => (leftArr, rightArr) => {
2585
2506
  * // Output: [[1, "a"], [2, "b"], [3, "c"], [4, "d"], [5, "e"]]
2586
2507
  * ```
2587
2508
  *
2588
- * @category Zipping
2589
- * @since 2.0.0
2509
+ * @category zipping
2510
+ * @since 4.0.0
2590
2511
  */
2591
2512
  export const zipWithArray = /*#__PURE__*/dual(3, (left, right, f) => fromChannel(Channel.fromTransformBracket(Effect.fnUntraced(function* (_, scope) {
2592
2513
  const pullLeft = yield* Channel.toPullScoped(left.channel, scope);
@@ -2644,7 +2565,7 @@ export const zipWithArray = /*#__PURE__*/dual(3, (left, right, f) => fromChannel
2644
2565
  * // Output: [[1, "a"], [2, "b"], [3, "c"]]
2645
2566
  * ```
2646
2567
  *
2647
- * @category Zipping
2568
+ * @category zipping
2648
2569
  * @since 2.0.0
2649
2570
  */
2650
2571
  export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (a, a2) => [a, a2]));
@@ -2671,7 +2592,7 @@ export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (a,
2671
2592
  * // Output: [1, 2]
2672
2593
  * ```
2673
2594
  *
2674
- * @category Zipping
2595
+ * @category zipping
2675
2596
  * @since 2.0.0
2676
2597
  */
2677
2598
  export const zipLeft = /*#__PURE__*/dual(2, (left, right) => zipWithArray(left, right, (leftArr, rightArr) => {
@@ -2701,7 +2622,7 @@ export const zipLeft = /*#__PURE__*/dual(2, (left, right) => zipWithArray(left,
2701
2622
  * // Output: ["a", "b"]
2702
2623
  * ```
2703
2624
  *
2704
- * @category Zipping
2625
+ * @category zipping
2705
2626
  * @since 2.0.0
2706
2627
  */
2707
2628
  export const zipRight = /*#__PURE__*/dual(2, (left, right) => zipWithArray(left, right, (leftArr, rightArr) => {
@@ -2738,7 +2659,7 @@ export const zipRight = /*#__PURE__*/dual(2, (left, right) => zipWithArray(left,
2738
2659
  * // Output: [[1, "a", "x"], [2, "b", "y"], [3, "c", "z"]]
2739
2660
  * ```
2740
2661
  *
2741
- * @category Zipping
2662
+ * @category zipping
2742
2663
  * @since 2.0.0
2743
2664
  */
2744
2665
  export const zipFlatten = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (a, a2) => [...a, a2]));
@@ -2762,7 +2683,7 @@ export const zipFlatten = /*#__PURE__*/dual(2, (self, that) => zipWith(self, tha
2762
2683
  * // Output: [["a", 0], ["b", 1], ["c", 2], ["d", 3]]
2763
2684
  * ```
2764
2685
  *
2765
- * @category Zipping
2686
+ * @category zipping
2766
2687
  * @since 2.0.0
2767
2688
  */
2768
2689
  export const zipWithIndex = self => map(self, (a, i) => [a, i]);
@@ -2789,7 +2710,7 @@ export const zipWithIndex = self => map(self, (a, i) => [a, i]);
2789
2710
  * // ]
2790
2711
  * ```
2791
2712
  *
2792
- * @category Zipping
2713
+ * @category zipping
2793
2714
  * @since 2.0.0
2794
2715
  */
2795
2716
  export const zipWithNext = self => mapAccumArray(self, Option.none, (acc, arr) => {
@@ -2834,7 +2755,7 @@ export const zipWithNext = self => mapAccumArray(self, Option.none, (acc, arr) =
2834
2755
  * // ]
2835
2756
  * ```
2836
2757
  *
2837
- * @category Zipping
2758
+ * @category zipping
2838
2759
  * @since 2.0.0
2839
2760
  */
2840
2761
  export const zipWithPrevious = self => mapAccumArray(self, Option.none, (acc, arr) => {
@@ -2866,7 +2787,7 @@ export const zipWithPrevious = self => mapAccumArray(self, Option.none, (acc, ar
2866
2787
  * // Output: [ [Option.none(), 1, Option.some(2)], [Option.some(1), 2, Option.some(3)], [Option.some(2), 3, Option.none()] ]
2867
2788
  * ```
2868
2789
  *
2869
- * @category Zipping
2790
+ * @category zipping
2870
2791
  * @since 2.0.0
2871
2792
  */
2872
2793
  export const zipWithPreviousAndNext = self => mapAccumArray(self, () => ({
@@ -2924,8 +2845,8 @@ export const zipWithPreviousAndNext = self => mapAccumArray(self, () => ({
2924
2845
  * // Output: [ [ 1, "a", true ], [ 2, "a", true ], [ 3, "a", true ], [ 3, "b", true ], [ 3, "c", true ], [ 3, "c", false ], [ 3, "c", true ] ]
2925
2846
  * ```
2926
2847
  *
2927
- * @category Zipping
2928
- * @since 2.0.0
2848
+ * @category zipping
2849
+ * @since 3.3.0
2929
2850
  */
2930
2851
  export const zipLatestAll = (...streams) => fromChannel(Channel.suspend(() => {
2931
2852
  const latest = [];
@@ -2969,7 +2890,7 @@ export const zipLatestAll = (...streams) => fromChannel(Channel.suspend(() => {
2969
2890
  * // Output: [ [1, "a"] ]
2970
2891
  * ```
2971
2892
  *
2972
- * @category Zipping
2893
+ * @category zipping
2973
2894
  * @since 2.0.0
2974
2895
  */
2975
2896
  export const zipLatest = /*#__PURE__*/dual(2, (left, right) => zipLatestAll(left, right));
@@ -3001,7 +2922,7 @@ export const zipLatest = /*#__PURE__*/dual(2, (left, right) => zipLatestAll(left
3001
2922
  * })
3002
2923
  * ```
3003
2924
  *
3004
- * @category Zipping
2925
+ * @category zipping
3005
2926
  * @since 2.0.0
3006
2927
  */
3007
2928
  export const zipLatestWith = /*#__PURE__*/dual(3, (left, right, f) => map(zipLatestAll(left, right), ([a, a2]) => f(a, a2)));
@@ -3014,7 +2935,7 @@ export const zipLatestWith = /*#__PURE__*/dual(3, (left, right, f) => map(zipLat
3014
2935
  * winner is chosen, that stream's later failures are propagated.
3015
2936
  *
3016
2937
  * @category Racing
3017
- * @since 3.7.0
2938
+ * @since 3.5.0
3018
2939
  *
3019
2940
  * **Example** (Racing multiple streams)
3020
2941
  *
@@ -3101,15 +3022,15 @@ export const race = /*#__PURE__*/dual(2, (left, right) => raceAll(left, right));
3101
3022
  * // Output: [ 2, 4 ]
3102
3023
  * ```
3103
3024
  *
3104
- * @category Filtering
3025
+ * @category filtering
3105
3026
  * @since 2.0.0
3106
3027
  */
3107
3028
  export const filter = /*#__PURE__*/dual(2, (self, predicate) => fromChannel(Channel.filterArray(toChannel(self), predicate)));
3108
3029
  /**
3109
3030
  * Filters and maps stream elements in one pass using a `Filter`.
3110
3031
  *
3111
- * @category Filtering
3112
- * @since 4.0.0
3032
+ * @category filtering
3033
+ * @since 2.0.0
3113
3034
  */
3114
3035
  export const filterMap = /*#__PURE__*/dual(2, (self, filter) => fromChannel(Channel.filterMapArray(toChannel(self), filter)));
3115
3036
  /**
@@ -3131,15 +3052,15 @@ export const filterMap = /*#__PURE__*/dual(2, (self, filter) => fromChannel(Chan
3131
3052
  * // Output: [ 3, 4 ]
3132
3053
  * ```
3133
3054
  *
3134
- * @category Filtering
3055
+ * @category filtering
3135
3056
  * @since 2.0.0
3136
3057
  */
3137
3058
  export const filterEffect = /*#__PURE__*/dual(2, (self, predicate) => fromChannel(Channel.filterArrayEffect(toChannel(self), predicate)));
3138
3059
  /**
3139
3060
  * Effectfully filters and maps elements in a single pass.
3140
3061
  *
3141
- * @category Filtering
3142
- * @since 4.0.0
3062
+ * @category filtering
3063
+ * @since 2.0.0
3143
3064
  */
3144
3065
  export const filterMapEffect = /*#__PURE__*/dual(2, (self, filter) => fromChannel(Channel.filterMapArrayEffect(toChannel(self), filter)));
3145
3066
  /**
@@ -3172,7 +3093,7 @@ export const filterMapEffect = /*#__PURE__*/dual(2, (self, filter) => fromChanne
3172
3093
  * Effect.runPromise(Effect.scoped(program))
3173
3094
  * ```
3174
3095
  *
3175
- * @category Filtering
3096
+ * @category filtering
3176
3097
  * @since 4.0.0
3177
3098
  */
3178
3099
  export const partitionQueue = /*#__PURE__*/dual(args => isStream(args[0]), /*#__PURE__*/Effect.fnUntraced(function* (self, filter, options) {
@@ -3228,7 +3149,7 @@ export const partitionQueue = /*#__PURE__*/dual(args => isStream(args[0]), /*#__
3228
3149
  * consumed while that scope remains open. The first stream emits success values
3229
3150
  * from the filter, and the second emits failure values.
3230
3151
  *
3231
- * @category Filtering
3152
+ * @category filtering
3232
3153
  * @since 4.0.0
3233
3154
  */
3234
3155
  export const partitionEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, filter, options) => Effect.map(partitionQueue(mapEffect(self, a => filter(a), options), result => result, options), ([passes, fails]) => [fromQueue(passes), fromQueue(fails)]));
@@ -3240,8 +3161,8 @@ export const partitionEffect = /*#__PURE__*/dual(args => isStream(args[0]), (sel
3240
3161
  * consumed while that scope remains open. The faster stream may advance up to
3241
3162
  * `bufferSize` elements ahead of the slower one.
3242
3163
  *
3243
- * @category Filtering
3244
- * @since 4.0.0
3164
+ * @category filtering
3165
+ * @since 2.0.0
3245
3166
  *
3246
3167
  * **Example** (Partitioning a stream)
3247
3168
  *
@@ -3285,7 +3206,7 @@ export const partition = /*#__PURE__*/dual(args => isStream(args[0]), (self, fil
3285
3206
  * // Output: []
3286
3207
  * ```
3287
3208
  *
3288
- * @category Filtering
3209
+ * @category filtering
3289
3210
  * @since 2.0.0
3290
3211
  */
3291
3212
  export const when = /*#__PURE__*/dual(2, (self, test) => test.pipe(Effect.map(pass => pass ? self : empty), unwrap));
@@ -3315,7 +3236,7 @@ export const when = /*#__PURE__*/dual(2, (self, test) => test.pipe(Effect.map(pa
3315
3236
  * // Output: [ [1, 2, 3], [4, 5, 6] ]
3316
3237
  * ```
3317
3238
  *
3318
- * @category Destructors
3239
+ * @category destructors
3319
3240
  * @since 2.0.0
3320
3241
  */
3321
3242
  export const peel = /*#__PURE__*/dual(2, /*#__PURE__*/Effect.fnUntraced(function* (self, sink) {
@@ -3370,12 +3291,6 @@ export const buffer = /*#__PURE__*/dual(2, (self, options) => fromChannel(Channe
3370
3291
  * buffer is full. This combinator preserves chunking and is best with
3371
3292
  * power-of-2 capacities.
3372
3293
  *
3373
- * **Previously Known As**
3374
- *
3375
- * This API replaces the following from Effect 3.x:
3376
- *
3377
- * - `Stream.bufferChunks`
3378
- *
3379
3294
  * **Example** (Buffering stream chunks)
3380
3295
  *
3381
3296
  * ```ts
@@ -3393,7 +3308,7 @@ export const buffer = /*#__PURE__*/dual(2, (self, options) => fromChannel(Channe
3393
3308
  * ```
3394
3309
  *
3395
3310
  * @category Rate Limiting
3396
- * @since 2.0.0
3311
+ * @since 4.0.0
3397
3312
  */
3398
3313
  export const bufferArray = /*#__PURE__*/dual(2, (self, options) => fromChannel(Channel.buffer(self.channel, options)));
3399
3314
  /**
@@ -3401,12 +3316,6 @@ export const bufferArray = /*#__PURE__*/dual(2, (self, options) => fromChannel(C
3401
3316
  * one fails. Allows recovery from all causes of failure, including
3402
3317
  * interruption if the stream is uninterruptible.
3403
3318
  *
3404
- * **Previously Known As**
3405
- *
3406
- * This API replaces the following from Effect 3.x:
3407
- *
3408
- * - `Stream.catchAllCause`
3409
- *
3410
3319
  * **Example** (Catching stream causes)
3411
3320
  *
3412
3321
  * ```ts
@@ -3430,20 +3339,14 @@ export const bufferArray = /*#__PURE__*/dual(2, (self, options) => fromChannel(C
3430
3339
  * // Output: [ 1, 2, 999 ]
3431
3340
  * ```
3432
3341
  *
3433
- * @category Error Handling
3434
- * @since 4.0.0
3342
+ * @category error handling
3343
+ * @since 2.0.0
3435
3344
  */
3436
3345
  export const catchCause = /*#__PURE__*/dual(2, (self, f) => self.channel.pipe(Channel.catchCause(cause => f(cause).channel), fromChannel));
3437
3346
  /**
3438
3347
  * Runs an effect when the stream fails without changing its values or error,
3439
3348
  * unless the tap effect itself fails.
3440
3349
  *
3441
- * **Previously Known As**
3442
- *
3443
- * This API replaces the following from Effect 3.x:
3444
- *
3445
- * - `Stream.tapErrorCause`
3446
- *
3447
3350
  * **Example** (Tapping stream causes)
3448
3351
  *
3449
3352
  * ```ts
@@ -3465,8 +3368,8 @@ export const catchCause = /*#__PURE__*/dual(2, (self, f) => self.channel.pipe(Ch
3465
3368
  * // Output: [ 1, 2, 0 ]
3466
3369
  * ```
3467
3370
  *
3468
- * @category Error Handling
3469
- * @since 4.0.0
3371
+ * @category error handling
3372
+ * @since 2.0.0
3470
3373
  */
3471
3374
  export const tapCause = /*#__PURE__*/dual(2, (self, f) => self.channel.pipe(Channel.tapCause(f), fromChannel));
3472
3375
  const catch_ = /*#__PURE__*/dual(2, (self, f) => fromChannel(Channel.catch(self.channel, error => f(error).channel)));
@@ -3474,12 +3377,6 @@ export {
3474
3377
  /**
3475
3378
  * Switches over to the stream produced by the provided function if this one fails.
3476
3379
  *
3477
- * **Previously Known As**
3478
- *
3479
- * This API replaces the following from Effect 3.x:
3480
- *
3481
- * - `Stream.catchAll`
3482
- *
3483
3380
  * **Example** (Catching stream failures)
3484
3381
  *
3485
3382
  * ```ts
@@ -3499,7 +3396,7 @@ export {
3499
3396
  * // Output: [ 1, 2, 999 ]
3500
3397
  * ```
3501
3398
  *
3502
- * @category Error Handling
3399
+ * @category error handling
3503
3400
  * @since 4.0.0
3504
3401
  */
3505
3402
  catch_ as catch };
@@ -3528,8 +3425,8 @@ catch_ as catch };
3528
3425
  * // [ 1, 2, 999 ]
3529
3426
  * ```
3530
3427
  *
3531
- * @category Error Handling
3532
- * @since 4.0.0
3428
+ * @category error handling
3429
+ * @since 2.0.0
3533
3430
  */
3534
3431
  export const tapError = /*#__PURE__*/dual(2, (self, f) => self.channel.pipe(Channel.tapError(f), fromChannel));
3535
3432
  /**
@@ -3539,12 +3436,6 @@ export const tapError = /*#__PURE__*/dual(2, (self, f) => self.channel.pipe(Chan
3539
3436
  * stream. Non-matching failures propagate downstream, so the error type is
3540
3437
  * preserved unless the filter narrows it.
3541
3438
  *
3542
- * **Previously Known As**
3543
- *
3544
- * This API replaces the following from Effect 3.x:
3545
- *
3546
- * - `Stream.catchSome`
3547
- *
3548
3439
  * **Example** (Catching matching failures)
3549
3440
  *
3550
3441
  * ```ts
@@ -3567,7 +3458,7 @@ export const tapError = /*#__PURE__*/dual(2, (self, f) => self.channel.pipe(Chan
3567
3458
  * Effect.runPromise(program)
3568
3459
  * ```
3569
3460
  *
3570
- * @category Error Handling
3461
+ * @category error handling
3571
3462
  * @since 4.0.0
3572
3463
  */
3573
3464
  export const catchIf = /*#__PURE__*/dual(args => isStream(args[0]), (self, predicate, f, orElse) => fromChannel(Channel.catchIf(toChannel(self), predicate, e => f(e).channel, orElse && (e => orElse(e).channel))));
@@ -3575,7 +3466,7 @@ export const catchIf = /*#__PURE__*/dual(args => isStream(args[0]), (self, predi
3575
3466
  * Recovers from errors that match a `Filter` by switching to a recovery
3576
3467
  * stream.
3577
3468
  *
3578
- * @category Error Handling
3469
+ * @category error handling
3579
3470
  * @since 4.0.0
3580
3471
  */
3581
3472
  export const catchFilter = /*#__PURE__*/dual(args => isStream(args[0]), (self, filter, f, orElse) => fromChannel(Channel.catchFilter(toChannel(self), filter, e => f(e).channel, orElse && (e => orElse(e).channel))));
@@ -3610,8 +3501,8 @@ export const catchFilter = /*#__PURE__*/dual(args => isStream(args[0]), (self, f
3610
3501
  * Effect.runPromise(program)
3611
3502
  * ```
3612
3503
  *
3613
- * @category Error Handling
3614
- * @since 4.0.0
3504
+ * @category error handling
3505
+ * @since 2.0.0
3615
3506
  */
3616
3507
  export const catchTag = /*#__PURE__*/dual(args => isStream(args[0]), (self, k, f, orElse) => {
3617
3508
  const pred = Array.isArray(k) ? e => hasProperty(e, "_tag") && k.includes(e._tag) : isTagged(k);
@@ -3651,8 +3542,8 @@ export const catchTag = /*#__PURE__*/dual(args => isStream(args[0]), (self, k, f
3651
3542
  * // Output: [ "fallback" ]
3652
3543
  * ```
3653
3544
  *
3654
- * @category Error Handling
3655
- * @since 4.0.0
3545
+ * @category error handling
3546
+ * @since 2.0.0
3656
3547
  */
3657
3548
  export const catchTags = /*#__PURE__*/dual(args => isStream(args[0]), (self, cases, orElse) => {
3658
3549
  let keys;
@@ -3702,7 +3593,7 @@ export const catchTags = /*#__PURE__*/dual(args => isStream(args[0]), (self, cas
3702
3593
  * // Output: [ "retry: 60" ]
3703
3594
  * ```
3704
3595
  *
3705
- * @category Error Handling
3596
+ * @category error handling
3706
3597
  * @since 4.0.0
3707
3598
  */
3708
3599
  export const catchReason = /*#__PURE__*/dual(args => isStream(args[0]), (self, errorTag, reasonTag, f, orElse) => fromChannel(Channel.catchReason(toChannel(self), errorTag, reasonTag, (reason, error) => f(reason, error).channel, orElse && ((reason, error) => orElse(reason, error).channel))));
@@ -3745,7 +3636,7 @@ export const catchReason = /*#__PURE__*/dual(args => isStream(args[0]), (self, e
3745
3636
  * // Output: [ "retry: 60" ]
3746
3637
  * ```
3747
3638
  *
3748
- * @category Error Handling
3639
+ * @category error handling
3749
3640
  * @since 4.0.0
3750
3641
  */
3751
3642
  export const catchReasons = /*#__PURE__*/dual(args => isStream(args[0]), (self, errorTag, cases, orElse) => {
@@ -3778,7 +3669,7 @@ export const catchReasons = /*#__PURE__*/dual(args => isStream(args[0]), (self,
3778
3669
  * // Output: [ "recovered from mapped: bad" ]
3779
3670
  * ```
3780
3671
  *
3781
- * @category Error Handling
3672
+ * @category error handling
3782
3673
  * @since 2.0.0
3783
3674
  */
3784
3675
  export const mapError = /*#__PURE__*/dual(2, (self, f) => fromChannel(Channel.mapError(self.channel, f)));
@@ -3786,12 +3677,6 @@ export const mapError = /*#__PURE__*/dual(2, (self, f) => fromChannel(Channel.ma
3786
3677
  * Recovers from stream failures by filtering the `Cause` and switching to a recovery stream.
3787
3678
  * Non-matching causes are re-emitted as failures.
3788
3679
  *
3789
- * **Previously Known As**
3790
- *
3791
- * This API replaces the following from Effect 3.x:
3792
- *
3793
- * - `Stream.catchSomeCause`
3794
- *
3795
3680
  * **Example** (Catching matching causes)
3796
3681
  *
3797
3682
  * ```ts
@@ -3813,7 +3698,7 @@ export const mapError = /*#__PURE__*/dual(2, (self, f) => fromChannel(Channel.ma
3813
3698
  * // Output: [ "Recovered: NetworkError" ]
3814
3699
  * ```
3815
3700
  *
3816
- * @category Error Handling
3701
+ * @category error handling
3817
3702
  * @since 4.0.0
3818
3703
  */
3819
3704
  export const catchCauseIf = /*#__PURE__*/dual(3, (self, predicate, f) => fromChannel(Channel.catchCauseIf(self.channel, predicate, cause => f(cause).channel)));
@@ -3821,7 +3706,7 @@ export const catchCauseIf = /*#__PURE__*/dual(3, (self, predicate, f) => fromCha
3821
3706
  * Recovers from stream failures by filtering the `Cause` and switching to a
3822
3707
  * recovery stream.
3823
3708
  *
3824
- * @category Error Handling
3709
+ * @category error handling
3825
3710
  * @since 4.0.0
3826
3711
  */
3827
3712
  export const catchCauseFilter = /*#__PURE__*/dual(3, (self, filter, f) => fromChannel(Channel.catchCauseFilter(self.channel, filter, (failure, cause) => f(failure, cause).channel)));
@@ -3845,7 +3730,7 @@ export const catchCauseFilter = /*#__PURE__*/dual(3, (self, filter, f) => fromCh
3845
3730
  * // Output: [ 1, 2 ]
3846
3731
  * ```
3847
3732
  *
3848
- * @category Error Handling
3733
+ * @category error handling
3849
3734
  * @since 2.0.0
3850
3735
  */
3851
3736
  export const orElseIfEmpty = /*#__PURE__*/dual(2, (self, orElse) => fromChannel(Channel.orElseIfEmpty(self.channel, _ => toChannel(orElse()))));
@@ -3870,7 +3755,7 @@ export const orElseIfEmpty = /*#__PURE__*/dual(2, (self, orElse) => fromChannel(
3870
3755
  * // Output: [ "Recovered: NetworkError" ]
3871
3756
  * ```
3872
3757
  *
3873
- * @category Error Handling
3758
+ * @category error handling
3874
3759
  * @since 2.0.0
3875
3760
  */
3876
3761
  export const orElseSucceed = /*#__PURE__*/dual(2, (self, f) => catch_(self, e => succeed(f(e))));
@@ -3895,7 +3780,7 @@ export const orElseSucceed = /*#__PURE__*/dual(2, (self, f) => catch_(self, e =>
3895
3780
  * // Output: [ 1, 2, 3 ]
3896
3781
  * ```
3897
3782
  *
3898
- * @category Error Handling
3783
+ * @category error handling
3899
3784
  * @since 2.0.0
3900
3785
  */
3901
3786
  export const orDie = self => fromChannel(Channel.orDie(self.channel));
@@ -3938,7 +3823,7 @@ export const orDie = self => fromChannel(Channel.orDie(self.channel));
3938
3823
  * // []
3939
3824
  * ```
3940
3825
  *
3941
- * @category Error Handling
3826
+ * @category error handling
3942
3827
  * @since 4.0.0
3943
3828
  */
3944
3829
  export const ignore = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => fromChannel(Channel.ignore(self.channel, options)));
@@ -3964,7 +3849,7 @@ export const ignore = /*#__PURE__*/dual(args => isStream(args[0]), (self, option
3964
3849
  * // [ 1, 2 ]
3965
3850
  * ```
3966
3851
  *
3967
- * @category Error Handling
3852
+ * @category error handling
3968
3853
  * @since 4.0.0
3969
3854
  */
3970
3855
  export const ignoreCause = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => fromChannel(Channel.ignoreCause(self.channel, options)));
@@ -3997,7 +3882,7 @@ export const ignoreCause = /*#__PURE__*/dual(args => isStream(args[0]), (self, o
3997
3882
  * // Output: [ 1, 1 ]
3998
3883
  * ```
3999
3884
  *
4000
- * @category Error Handling
3885
+ * @category error handling
4001
3886
  * @since 2.0.0
4002
3887
  */
4003
3888
  export const retry = /*#__PURE__*/dual(2, (self, policy) => fromChannel(Channel.retry(self.channel, policy)));
@@ -4012,7 +3897,7 @@ export const retry = /*#__PURE__*/dual(2, (self, policy) => fromChannel(Channel.
4012
3897
  * **Example** (Applying an execution plan)
4013
3898
  *
4014
3899
  * ```ts
4015
- * import { Console, Effect, ExecutionPlan, Layer, Context, Stream } from "effect"
3900
+ * import { Console, Context, Effect, ExecutionPlan, Layer, Stream } from "effect"
4016
3901
  *
4017
3902
  * class Service extends Context.Service<Service>()("Service", {
4018
3903
  * make: Effect.succeed({
@@ -4039,9 +3924,8 @@ export const retry = /*#__PURE__*/dual(2, (self, policy) => fromChannel(Channel.
4039
3924
  * // Output: [ 1, 2, 3 ]
4040
3925
  * ```
4041
3926
  *
4042
- * @category Error Handling
3927
+ * @category error handling
4043
3928
  * @since 3.16.0
4044
- * @experimental
4045
3929
  */
4046
3930
  export const withExecutionPlan = /*#__PURE__*/dual(args => isStream(args[0]), (self, policy, options) => suspend(() => {
4047
3931
  const preventFallbackOnPartialStream = options?.preventFallbackOnPartialStream ?? false;
@@ -4114,7 +3998,7 @@ export const withExecutionPlan = /*#__PURE__*/dual(args => isStream(args[0]), (s
4114
3998
  * // Output: [ 1, 2, 3 ]
4115
3999
  * ```
4116
4000
  *
4117
- * @category Filtering
4001
+ * @category filtering
4118
4002
  * @since 2.0.0
4119
4003
  */
4120
4004
  export const take = /*#__PURE__*/dual(2, (self, n) => n < 1 ? empty : takeUntil(self, (_, i) => i === n - 1));
@@ -4138,7 +4022,7 @@ export const take = /*#__PURE__*/dual(2, (self, n) => n < 1 ? empty : takeUntil(
4138
4022
  * // Output: [ 4, 5, 6 ]
4139
4023
  * ```
4140
4024
  *
4141
- * @category Filtering
4025
+ * @category filtering
4142
4026
  * @since 2.0.0
4143
4027
  */
4144
4028
  export const takeRight = /*#__PURE__*/dual(2, (self, n) => mapAccumArray(self, MutableList.make, (list, arr) => {
@@ -4181,7 +4065,7 @@ export const takeRight = /*#__PURE__*/dual(2, (self, n) => mapAccumArray(self, M
4181
4065
  * })
4182
4066
  * ```
4183
4067
  *
4184
- * @category Filtering
4068
+ * @category filtering
4185
4069
  * @since 2.0.0
4186
4070
  */
4187
4071
  export const takeUntil = /*#__PURE__*/dual(args => isStream(args[0]), (self, predicate, options) => transformPull(self, (pull, _scope) => Effect.sync(() => {
@@ -4218,7 +4102,7 @@ export const takeUntil = /*#__PURE__*/dual(args => isStream(args[0]), (self, pre
4218
4102
  * // Output: [ 1, 2, 3 ]
4219
4103
  * ```
4220
4104
  *
4221
- * @category Filtering
4105
+ * @category filtering
4222
4106
  * @since 2.0.0
4223
4107
  */
4224
4108
  export const takeUntilEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, predicate, options) => transformPull(self, (pull, _scope) => Effect.sync(() => {
@@ -4258,7 +4142,7 @@ export const takeUntilEffect = /*#__PURE__*/dual(args => isStream(args[0]), (sel
4258
4142
  * // Output: [ 1, 2 ]
4259
4143
  * ```
4260
4144
  *
4261
- * @category Filtering
4145
+ * @category filtering
4262
4146
  * @since 2.0.0
4263
4147
  */
4264
4148
  export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => transformPull(self, (pull, _scope) => Effect.sync(() => {
@@ -4283,7 +4167,7 @@ export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => transformPull
4283
4167
  *
4284
4168
  * The stream stops at the first `Result.fail` returned by the filter.
4285
4169
  *
4286
- * @category Filtering
4170
+ * @category filtering
4287
4171
  * @since 4.0.0
4288
4172
  */
4289
4173
  export const takeWhileFilter = /*#__PURE__*/dual(2, (self, filter) => transformPull(self, (pull, _scope) => Effect.sync(() => {
@@ -4322,8 +4206,8 @@ export const takeWhileFilter = /*#__PURE__*/dual(2, (self, filter) => transformP
4322
4206
  * // Output: [ 1, 2 ]
4323
4207
  * ```
4324
4208
  *
4325
- * @category Filtering
4326
- * @since 2.0.0
4209
+ * @category filtering
4210
+ * @since 4.0.0
4327
4211
  */
4328
4212
  export const takeWhileEffect = /*#__PURE__*/dual(2, (self, predicate) => takeUntilEffect(self, (a, n) => Effect.map(predicate(a, n), b => !b), {
4329
4213
  excludeLast: true
@@ -4348,7 +4232,7 @@ export const takeWhileEffect = /*#__PURE__*/dual(2, (self, predicate) => takeUnt
4348
4232
  * // Output: [ 3, 4, 5 ]
4349
4233
  * ```
4350
4234
  *
4351
- * @category Filtering
4235
+ * @category filtering
4352
4236
  * @since 2.0.0
4353
4237
  */
4354
4238
  export const drop = /*#__PURE__*/dual(2, (self, n) => transformPull(self, (pull, _scope) => Effect.sync(() => {
@@ -4379,7 +4263,7 @@ export const drop = /*#__PURE__*/dual(2, (self, n) => transformPull(self, (pull,
4379
4263
  * })
4380
4264
  * ```
4381
4265
  *
4382
- * @category Filtering
4266
+ * @category filtering
4383
4267
  * @since 2.0.0
4384
4268
  */
4385
4269
  export const dropUntil = /*#__PURE__*/dual(2, (self, predicate) => drop(dropWhile(self, (a, i) => !predicate(a, i)), 1));
@@ -4406,7 +4290,7 @@ export const dropUntil = /*#__PURE__*/dual(2, (self, predicate) => drop(dropWhil
4406
4290
  * // Output: [ 4, 5 ]
4407
4291
  * ```
4408
4292
  *
4409
- * @category Filtering
4293
+ * @category filtering
4410
4294
  * @since 2.0.0
4411
4295
  */
4412
4296
  export const dropUntilEffect = /*#__PURE__*/dual(2, (self, predicate) => drop(dropWhileEffect(self, (a, i) => Effect.map(predicate(a, i), b => !b)), 1));
@@ -4430,7 +4314,7 @@ export const dropUntilEffect = /*#__PURE__*/dual(2, (self, predicate) => drop(dr
4430
4314
  * // Output: [ 3, 4, 5 ]
4431
4315
  * ```
4432
4316
  *
4433
- * @category Filtering
4317
+ * @category filtering
4434
4318
  * @since 2.0.0
4435
4319
  */
4436
4320
  export const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => transformPull(self, (pull, _scope) => Effect.sync(() => {
@@ -4447,7 +4331,7 @@ export const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => transformPull
4447
4331
  /**
4448
4332
  * Drops elements while the filter succeeds.
4449
4333
  *
4450
- * @category Filtering
4334
+ * @category filtering
4451
4335
  * @since 4.0.0
4452
4336
  */
4453
4337
  export const dropWhileFilter = /*#__PURE__*/dual(2, (self, filter) => transformPull(self, (pull, _scope) => Effect.sync(() => {
@@ -4480,7 +4364,7 @@ export const dropWhileFilter = /*#__PURE__*/dual(2, (self, filter) => transformP
4480
4364
  * // Output: [ 3, 4, 5 ]
4481
4365
  * ```
4482
4366
  *
4483
- * @category Filtering
4367
+ * @category filtering
4484
4368
  * @since 2.0.0
4485
4369
  */
4486
4370
  export const dropWhileEffect = /*#__PURE__*/dual(2, (self, predicate) => transformPull(self, (pull, _scope) => Effect.sync(() => {
@@ -4521,7 +4405,7 @@ export const dropWhileEffect = /*#__PURE__*/dual(2, (self, predicate) => transfo
4521
4405
  * // Output: [ 1, 2, 3 ]
4522
4406
  * ```
4523
4407
  *
4524
- * @category Filtering
4408
+ * @category filtering
4525
4409
  * @since 2.0.0
4526
4410
  */
4527
4411
  export const dropRight = /*#__PURE__*/dual(2, (self, n) => {
@@ -4634,7 +4518,7 @@ export const rechunk = /*#__PURE__*/dual(2, (self, target) => {
4634
4518
  * **Example** (Emitting sliding windows)
4635
4519
  *
4636
4520
  * ```ts
4637
- * import { Console, Effect, Stream, pipe } from "effect"
4521
+ * import { Console, Effect, pipe, Stream } from "effect"
4638
4522
  *
4639
4523
  * Effect.gen(function*() {
4640
4524
  * const result = yield* pipe(
@@ -4792,12 +4676,6 @@ export const combine = /*#__PURE__*/dual(4, (self, that, s, f) => Channel.combin
4792
4676
  * internal state to control the combining process, with the initial state
4793
4677
  * being specified by `s`.
4794
4678
  *
4795
- * **Previously Known As**
4796
- *
4797
- * This API replaces the following from Effect 3.x:
4798
- *
4799
- * - `Stream.combineChunks`
4800
- *
4801
4679
  * **Example** (Combining stream chunks with state)
4802
4680
  *
4803
4681
  * ```ts
@@ -4824,8 +4702,8 @@ export const combine = /*#__PURE__*/dual(4, (self, that, s, f) => Channel.combin
4824
4702
  * // Output: [ 1, 2, 10, 20 ]
4825
4703
  * ```
4826
4704
  *
4827
- * @category Sequencing
4828
- * @since 2.0.0
4705
+ * @category sequencing
4706
+ * @since 4.0.0
4829
4707
  */
4830
4708
  export const combineArray = /*#__PURE__*/dual(4, (self, that, s, f) => fromChannel(Channel.combine(self.channel, that.channel, s, f)));
4831
4709
  /**
@@ -4852,7 +4730,7 @@ export const combineArray = /*#__PURE__*/dual(4, (self, that, s, f) => fromChann
4852
4730
  * // Output: [ 0, 1, 3, 6, 10, 15, 21 ]
4853
4731
  * ```
4854
4732
  *
4855
- * @category Mapping
4733
+ * @category mapping
4856
4734
  * @since 2.0.0
4857
4735
  */
4858
4736
  export const mapAccum = /*#__PURE__*/dual(args => isStream(args[0]), (self, initial, f, options) => fromChannel(Channel.mapAccum(self.channel, initial, (state, arr) => {
@@ -4895,8 +4773,8 @@ export const mapAccum = /*#__PURE__*/dual(args => isStream(args[0]), (self, init
4895
4773
  * // Output: [ 3, 10, 21 ]
4896
4774
  * ```
4897
4775
  *
4898
- * @category Mapping
4899
- * @since 2.0.0
4776
+ * @category mapping
4777
+ * @since 4.0.0
4900
4778
  */
4901
4779
  export const mapAccumArray = /*#__PURE__*/dual(args => isStream(args[0]), (self, initial, f, options) => fromChannel(Channel.mapAccum(self.channel, initial, (state, arr) => {
4902
4780
  const [newState, values] = f(state, arr);
@@ -4937,7 +4815,7 @@ const emptyArr = /*#__PURE__*/Arr.empty();
4937
4815
  * // Output: [ 1, 2, 3 ]
4938
4816
  * ```
4939
4817
  *
4940
- * @category Mapping
4818
+ * @category mapping
4941
4819
  * @since 2.0.0
4942
4820
  */
4943
4821
  export const mapAccumEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, initial, f, options) => self.channel.pipe(Channel.flattenArray, Channel.mapAccum(initial, (state, a) => Effect.map(f(state, a), ([state, values]) => [state, Arr.isReadonlyArrayNonEmpty(values) ? Arr.of(values) : Arr.empty()]), options?.onHalt ? {
@@ -4976,8 +4854,8 @@ export const mapAccumEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self
4976
4854
  * // Output: [ 3, 10 ]
4977
4855
  * ```
4978
4856
  *
4979
- * @category Mapping
4980
- * @since 2.0.0
4857
+ * @category mapping
4858
+ * @since 4.0.0
4981
4859
  */
4982
4860
  export const mapAccumArrayEffect = /*#__PURE__*/dual(args => isStream(args), (self, initial, f, options) => self.channel.pipe(Channel.mapAccum(initial, (state, a) => Effect.map(f(state, a), ([state, values]) => [state, Arr.isReadonlyArrayNonEmpty(values) ? Arr.of(values) : emptyArr]), options?.onHalt ? {
4983
4861
  onHalt(state) {
@@ -5626,6 +5504,56 @@ export const aggregateWithin = /*#__PURE__*/dual(3, (self, sink, schedule) => fr
5626
5504
  return Effect.succeed(Effect.suspend(() => sink.transform(sinkUpstream, scope)));
5627
5505
  }).pipe(Effect.flatMap(pull => Effect.raceFirst(catchSinkHalt(pull), stepToBuffer)));
5628
5506
  }))));
5507
+ /**
5508
+ * Fan out the stream, producing a fixed-size tuple of streams that each emit
5509
+ * the same elements as the source stream.
5510
+ *
5511
+ * The source stream starts after all downstream streams have been subscribed.
5512
+ * With the default suspend strategy, the source can only advance `capacity`
5513
+ * chunks ahead of the slowest downstream stream. If a downstream stream is
5514
+ * interrupted, it unsubscribes from the broadcast so it no longer contributes
5515
+ * backpressure.
5516
+ *
5517
+ * **Example** (Broadcasting to two consumers)
5518
+ *
5519
+ * ```ts
5520
+ * import { Console, Effect, Stream } from "effect"
5521
+ *
5522
+ * const program = Effect.scoped(
5523
+ * Effect.gen(function*() {
5524
+ * const [left, right] = yield* Stream.make(1, 2, 3).pipe(
5525
+ * Stream.broadcastN({ n: 2, capacity: 8 })
5526
+ * )
5527
+ *
5528
+ * const values = yield* Effect.all([
5529
+ * Stream.runCollect(left),
5530
+ * Stream.runCollect(right)
5531
+ * ], { concurrency: "unbounded" })
5532
+ *
5533
+ * yield* Console.log(values)
5534
+ * })
5535
+ * )
5536
+ *
5537
+ * Effect.runPromise(program)
5538
+ * // Output: [[1, 2, 3], [1, 2, 3]]
5539
+ * ```
5540
+ *
5541
+ * @category Broadcast
5542
+ * @since 4.0.0
5543
+ */
5544
+ export const broadcastN = /*#__PURE__*/dual(2, /*#__PURE__*/Effect.fnUntraced(function* (self, options) {
5545
+ const pubsub = yield* makePubSub(options);
5546
+ const streams = new Array(options.n);
5547
+ const parentScope = yield* Scope.Scope;
5548
+ for (let i = 0; i < options.n; i++) {
5549
+ const scope = Scope.forkUnsafe(parentScope);
5550
+ const subscription = yield* PubSub.subscribe(pubsub).pipe(Effect.provideService(Scope.Scope, scope));
5551
+ streams[i] = Channel.fromEffectTake(PubSub.take(subscription)).pipe(Channel.onExit(exit => Scope.close(scope, exit)), fromChannel);
5552
+ }
5553
+ yield* Channel.runForEach(self.channel, value => PubSub.publish(pubsub, value)).pipe(Effect.onExit(exit => PubSub.publish(pubsub, exit)), Effect.forkScoped);
5554
+ return streams;
5555
+ }));
5556
+ const makePubSub = options => Effect.acquireRelease(options.capacity === "unbounded" ? PubSub.unbounded(options) : options.strategy === "dropping" ? PubSub.dropping(options) : options.strategy === "sliding" ? PubSub.sliding(options) : PubSub.bounded(options), PubSub.shutdown);
5629
5557
  /**
5630
5558
  * Creates a PubSub-backed stream that multicasts the source to all subscribers.
5631
5559
  *
@@ -5690,7 +5618,7 @@ export const broadcast = /*#__PURE__*/dual(2, (self, options) => Effect.map(toPu
5690
5618
  * ```
5691
5619
  *
5692
5620
  * @category Broadcast
5693
- * @since 2.0.0
5621
+ * @since 3.8.0
5694
5622
  */
5695
5623
  export const share = /*#__PURE__*/dual(2, (self, options) => Effect.map(RcRef.make({
5696
5624
  acquire: broadcast(self, options),
@@ -5811,7 +5739,7 @@ export const pipeThrough = /*#__PURE__*/dual(2, (self, sink) => self.channel.pip
5811
5739
  * ```
5812
5740
  *
5813
5741
  * @category Accumulation
5814
- * @since 2.0.0
5742
+ * @since 4.0.0
5815
5743
  */
5816
5744
  export const collect = self => fromEffect(runCollect(self));
5817
5745
  /**
@@ -5985,7 +5913,7 @@ export const changesWithEffect = /*#__PURE__*/dual(2, (self, f) => transformPull
5985
5913
  * // ["Hello", " World"]
5986
5914
  * ```
5987
5915
  *
5988
- * @category Encoding
5916
+ * @category encoding
5989
5917
  * @since 2.0.0
5990
5918
  */
5991
5919
  export const decodeText = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => suspend(() => {
@@ -6014,7 +5942,7 @@ export const decodeText = /*#__PURE__*/dual(args => isStream(args[0]), (self, op
6014
5942
  * // [[72, 101, 108, 108, 111], [32], [87, 111, 114, 108, 100]]
6015
5943
  * ```
6016
5944
  *
6017
- * @category Encoding
5945
+ * @category encoding
6018
5946
  * @since 2.0.0
6019
5947
  */
6020
5948
  export const encodeText = self => suspend(() => {
@@ -6038,7 +5966,7 @@ export const encodeText = self => suspend(() => {
6038
5966
  * // ["a", "b", "c"]
6039
5967
  * ```
6040
5968
  *
6041
- * @category Encoding
5969
+ * @category encoding
6042
5970
  * @since 2.0.0
6043
5971
  */
6044
5972
  export const splitLines = self => self.channel.pipe(Channel.pipeTo(Channel.splitLines()), fromChannel);
@@ -6060,7 +5988,7 @@ export const splitLines = self => self.channel.pipe(Channel.pipeTo(Channel.split
6060
5988
  * // [1, 0, 2, 0, 3, 0, 4]
6061
5989
  * ```
6062
5990
  *
6063
- * @category Sequencing
5991
+ * @category sequencing
6064
5992
  * @since 2.0.0
6065
5993
  */
6066
5994
  export const intersperse = /*#__PURE__*/dual(2, (self, element) => mapArray(self, (arr, i) => {
@@ -6098,7 +6026,7 @@ export const intersperse = /*#__PURE__*/dual(2, (self, element) => mapArray(self
6098
6026
  * // [ "[", "a", ",", "b", ",", "c", "]" ]
6099
6027
  * ```
6100
6028
  *
6101
- * @category Sequencing
6029
+ * @category sequencing
6102
6030
  * @since 2.0.0
6103
6031
  */
6104
6032
  export const intersperseAffixes = /*#__PURE__*/dual(2, (self, options) => succeed(options.start).pipe(concat(intersperse(self, options.middle)), concat(succeed(options.end))));
@@ -6302,7 +6230,7 @@ export const onExit = /*#__PURE__*/dual(2, (self, finalizer) => fromChannel(Chan
6302
6230
  * // Stream failed: boom
6303
6231
  * ```
6304
6232
  *
6305
- * @category Error Handling
6233
+ * @category error handling
6306
6234
  * @since 2.0.0
6307
6235
  */
6308
6236
  export const onError = /*#__PURE__*/dual(2, (self, cleanup) => fromChannel(Channel.onError(self.channel, cleanup)));
@@ -6329,8 +6257,8 @@ export const onError = /*#__PURE__*/dual(2, (self, cleanup) => fromChannel(Chann
6329
6257
  * // [1, 2, 3]
6330
6258
  * ```
6331
6259
  *
6332
- * @category Sequencing
6333
- * @since 4.0.0
6260
+ * @category sequencing
6261
+ * @since 3.6.0
6334
6262
  */
6335
6263
  export const onStart = /*#__PURE__*/dual(2, (self, onStart) => fromChannel(Channel.onStart(self.channel, onStart)));
6336
6264
  /**
@@ -6350,7 +6278,7 @@ export const onStart = /*#__PURE__*/dual(2, (self, onStart) => fromChannel(Chann
6350
6278
  * // Output: first=1
6351
6279
  * ```
6352
6280
  *
6353
- * @category Sequencing
6281
+ * @category sequencing
6354
6282
  * @since 4.0.0
6355
6283
  */
6356
6284
  export const onFirst = /*#__PURE__*/dual(2, (self, onFirst) => fromChannel(Channel.onFirst(self.channel, arr => onFirst(arr[0]))));
@@ -6375,8 +6303,8 @@ export const onFirst = /*#__PURE__*/dual(2, (self, onFirst) => fromChannel(Chann
6375
6303
  * // [1, 2, 3]
6376
6304
  * ```
6377
6305
  *
6378
- * @category Sequencing
6379
- * @since 4.0.0
6306
+ * @category sequencing
6307
+ * @since 3.6.0
6380
6308
  */
6381
6309
  export const onEnd = /*#__PURE__*/dual(2, (self, onEnd) => fromChannel(Channel.onEnd(self.channel, onEnd)));
6382
6310
  /**
@@ -6402,7 +6330,7 @@ export const onEnd = /*#__PURE__*/dual(2, (self, onEnd) => fromChannel(Channel.o
6402
6330
  * ```
6403
6331
  *
6404
6332
  * @category Finalization
6405
- * @since 4.0.0
6333
+ * @since 2.0.0
6406
6334
  */
6407
6335
  export const ensuring = /*#__PURE__*/dual(2, (self, finalizer) => fromChannel(Channel.ensuring(self.channel, finalizer)));
6408
6336
  /**
@@ -6410,12 +6338,10 @@ export const ensuring = /*#__PURE__*/dual(2, (self, finalizer) => fromChannel(Ch
6410
6338
  * service requirements. Use `options.local` to build the layer every time; by
6411
6339
  * default, layers are shared between provide calls.
6412
6340
  *
6413
- * **Previously Known As:** `provideSomeLayer`, `provideSomeContext`.
6414
- *
6415
6341
  * **Example** (Providing stream requirements)
6416
6342
  *
6417
6343
  * ```ts
6418
- * import { Console, Effect, Layer, Context, Stream } from "effect"
6344
+ * import { Console, Context, Effect, Layer, Stream } from "effect"
6419
6345
  *
6420
6346
  * class Env extends Context.Service<Env, { readonly name: string }>()("Env") {}
6421
6347
  *
@@ -6439,7 +6365,7 @@ export const ensuring = /*#__PURE__*/dual(2, (self, finalizer) => fromChannel(Ch
6439
6365
  * // ["Hello, Ada"]
6440
6366
  * ```
6441
6367
  *
6442
- * @category Services
6368
+ * @category services
6443
6369
  * @since 4.0.0
6444
6370
  */
6445
6371
  export const provide = /*#__PURE__*/dual(args => isStream(args[0]), (self, layer, options) => fromChannel(Channel.provide(self.channel, layer, options)));
@@ -6449,7 +6375,7 @@ export const provide = /*#__PURE__*/dual(args => isStream(args[0]), (self, layer
6449
6375
  * **Example** (Providing multiple services to the stream using a context)
6450
6376
  *
6451
6377
  * ```ts
6452
- * import { Console, Effect, Context, Stream } from "effect"
6378
+ * import { Console, Context, Effect, Stream } from "effect"
6453
6379
  *
6454
6380
  * class Config extends Context.Service<Config, { readonly prefix: string }>()("Config") {}
6455
6381
  * class Greeter extends Context.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
@@ -6475,8 +6401,8 @@ export const provide = /*#__PURE__*/dual(args => isStream(args[0]), (self, layer
6475
6401
  * // ["Hello!"]
6476
6402
  * ```
6477
6403
  *
6478
- * @category Services
6479
- * @since 4.0.0
6404
+ * @category services
6405
+ * @since 2.0.0
6480
6406
  */
6481
6407
  export const provideContext = /*#__PURE__*/dual(2, (self, context) => fromChannel(Channel.provideContext(self.channel, context)));
6482
6408
  /**
@@ -6486,7 +6412,7 @@ export const provideContext = /*#__PURE__*/dual(2, (self, context) => fromChanne
6486
6412
  * **Example** (Providing a stream service)
6487
6413
  *
6488
6414
  * ```ts
6489
- * import { Console, Effect, Context, Stream } from "effect"
6415
+ * import { Console, Context, Effect, Stream } from "effect"
6490
6416
  *
6491
6417
  * class Greeter extends Context.Service<Greeter, {
6492
6418
  * greet: (name: string) => string
@@ -6513,8 +6439,8 @@ export const provideContext = /*#__PURE__*/dual(2, (self, context) => fromChanne
6513
6439
  * //=> ["Hello, Ada"]
6514
6440
  * ```
6515
6441
  *
6516
- * @category Services
6517
- * @since 4.0.0
6442
+ * @category services
6443
+ * @since 2.0.0
6518
6444
  */
6519
6445
  export const provideService = /*#__PURE__*/dual(3, (self, key, service) => fromChannel(Channel.provideService(self.channel, key, service)));
6520
6446
  /**
@@ -6523,7 +6449,7 @@ export const provideService = /*#__PURE__*/dual(3, (self, key, service) => fromC
6523
6449
  * **Example** (Providing a stream service effectfully)
6524
6450
  *
6525
6451
  * ```ts
6526
- * import { Console, Effect, Context, Stream } from "effect"
6452
+ * import { Console, Context, Effect, Stream } from "effect"
6527
6453
  *
6528
6454
  * class ApiConfig extends Context.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
6529
6455
  *
@@ -6553,8 +6479,8 @@ export const provideService = /*#__PURE__*/dual(3, (self, key, service) => fromC
6553
6479
  * // ["https://example.com"]
6554
6480
  * ```
6555
6481
  *
6556
- * @category Services
6557
- * @since 4.0.0
6482
+ * @category services
6483
+ * @since 2.0.0
6558
6484
  */
6559
6485
  export const provideServiceEffect = /*#__PURE__*/dual(3, (self, key, service) => fromChannel(Channel.provideServiceEffect(self.channel, key, service)));
6560
6486
  /**
@@ -6564,7 +6490,7 @@ export const provideServiceEffect = /*#__PURE__*/dual(3, (self, key, service) =>
6564
6490
  * **Example** (Updating the stream context)
6565
6491
  *
6566
6492
  * ```ts
6567
- * import { Console, Effect, Context, Stream } from "effect"
6493
+ * import { Console, Context, Effect, Stream } from "effect"
6568
6494
  *
6569
6495
  * class Logger extends Context.Service<Logger, { prefix: string }>()("Logger") {}
6570
6496
  * class Config extends Context.Service<Config, { name: string }>()("Config") {}
@@ -6594,8 +6520,8 @@ export const provideServiceEffect = /*#__PURE__*/dual(3, (self, key, service) =>
6594
6520
  * //=> [ "Hello World" ]
6595
6521
  * ```
6596
6522
  *
6597
- * @category Services
6598
- * @since 2.0.0
6523
+ * @category services
6524
+ * @since 4.0.0
6599
6525
  */
6600
6526
  export const updateContext = /*#__PURE__*/dual(2, (self, f) => fromChannel(Channel.updateContext(self.channel, f)));
6601
6527
  /**
@@ -6604,7 +6530,7 @@ export const updateContext = /*#__PURE__*/dual(2, (self, f) => fromChannel(Chann
6604
6530
  * **Example** (Updating a stream service)
6605
6531
  *
6606
6532
  * ```ts
6607
- * import { Console, Effect, Context, Stream } from "effect"
6533
+ * import { Console, Context, Effect, Stream } from "effect"
6608
6534
  *
6609
6535
  * class Counter extends Context.Service<Counter, { count: number }>()("Counter") {}
6610
6536
  *
@@ -6621,7 +6547,7 @@ export const updateContext = /*#__PURE__*/dual(2, (self, f) => fromChannel(Chann
6621
6547
  * // Output: Updated count: 1
6622
6548
  * ```
6623
6549
  *
6624
- * @category Services
6550
+ * @category services
6625
6551
  * @since 2.0.0
6626
6552
  */
6627
6553
  export const updateService = /*#__PURE__*/dual(3, (self, service, f) => updateContext(self, context => Context.add(context, service, f(Context.get(context, service)))));
@@ -6644,8 +6570,8 @@ export const updateService = /*#__PURE__*/dual(3, (self, service, f) => updateCo
6644
6570
  * // [1, 2, 3]
6645
6571
  * ```
6646
6572
  *
6647
- * @category Tracing
6648
- * @since 4.0.0
6573
+ * @category tracing
6574
+ * @since 2.0.0
6649
6575
  */
6650
6576
  export const withSpan = function () {
6651
6577
  const dataFirst = isStream(arguments[0]);
@@ -6663,7 +6589,7 @@ export const withSpan = function () {
6663
6589
  * **Example** (Starting stream do notation)
6664
6590
  *
6665
6591
  * ```ts
6666
- * import { Console, Effect, Stream, pipe } from "effect"
6592
+ * import { Console, Effect, pipe, Stream } from "effect"
6667
6593
  *
6668
6594
  * const program = pipe(
6669
6595
  * Stream.Do,
@@ -6681,7 +6607,7 @@ export const withSpan = function () {
6681
6607
  * ```
6682
6608
  *
6683
6609
  * @category Do Notation
6684
- * @since 4.0.0
6610
+ * @since 2.0.0
6685
6611
  */
6686
6612
  export const Do = /*#__PURE__*/succeed({});
6687
6613
  const let_ = /*#__PURE__*/dual(3, (self, name, f) => map(self, a => ({
@@ -6712,7 +6638,7 @@ export {
6712
6638
  * ```
6713
6639
  *
6714
6640
  * @category Do Notation
6715
- * @since 4.0.0
6641
+ * @since 2.0.0
6716
6642
  */
6717
6643
  let_ as let };
6718
6644
  /**
@@ -6735,7 +6661,7 @@ let_ as let };
6735
6661
  * ```
6736
6662
  *
6737
6663
  * @category Do Notation
6738
- * @since 4.0.0
6664
+ * @since 2.0.0
6739
6665
  */
6740
6666
  export const bind = /*#__PURE__*/dual(args => isStream(args[0]), (self, tag, f, options) => flatMap(self, a => map(f(a), b => ({
6741
6667
  ...a,
@@ -6764,7 +6690,7 @@ export const bind = /*#__PURE__*/dual(args => isStream(args[0]), (self, tag, f,
6764
6690
  * ```
6765
6691
  *
6766
6692
  * @category Do Notation
6767
- * @since 4.0.0
6693
+ * @since 2.0.0
6768
6694
  */
6769
6695
  export const bindEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, tag, f, options) => mapEffect(self, a => Effect.map(f(a), b => ({
6770
6696
  ...a,
@@ -6787,7 +6713,7 @@ export const bindEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, ta
6787
6713
  * ```
6788
6714
  *
6789
6715
  * @category Do Notation
6790
- * @since 4.0.0
6716
+ * @since 2.0.0
6791
6717
  */
6792
6718
  export const bindTo = /*#__PURE__*/dual(2, (self, name) => map(self, a => ({
6793
6719
  [name]: a
@@ -6806,7 +6732,7 @@ export const bindTo = /*#__PURE__*/dual(2, (self, name) => map(self, a => ({
6806
6732
  * // 6
6807
6733
  * ```
6808
6734
  *
6809
- * @category Destructors
6735
+ * @category destructors
6810
6736
  * @since 2.0.0
6811
6737
  */
6812
6738
  export const run = /*#__PURE__*/dual(2, (self, sink) => Effect.scopedWith(scope => Channel.toPullScoped(self.channel, scope).pipe(Effect.flatMap(upstream => sink.transform(upstream, scope)), Effect.map(([a]) => a))));
@@ -6829,7 +6755,7 @@ export const run = /*#__PURE__*/dual(2, (self, sink) => Effect.scopedWith(scope
6829
6755
  * // [1, 2, 3, 4, 5]
6830
6756
  * ```
6831
6757
  *
6832
- * @category Destructors
6758
+ * @category destructors
6833
6759
  * @since 2.0.0
6834
6760
  */
6835
6761
  export const runCollect = self => Channel.runFold(self.channel, () => [], (acc, chunk) => {
@@ -6857,7 +6783,7 @@ export const runCollect = self => Channel.runFold(self.channel, () => [], (acc,
6857
6783
  * // 5
6858
6784
  * ```
6859
6785
  *
6860
- * @category Destructors
6786
+ * @category destructors
6861
6787
  * @since 2.0.0
6862
6788
  */
6863
6789
  export const runCount = self => Channel.runFold(self.channel, () => 0, (acc, chunk) => acc + chunk.length);
@@ -6878,7 +6804,7 @@ export const runCount = self => Channel.runFold(self.channel, () => 0, (acc, chu
6878
6804
  * // 6
6879
6805
  * ```
6880
6806
  *
6881
- * @category Destructors
6807
+ * @category destructors
6882
6808
  * @since 2.0.0
6883
6809
  */
6884
6810
  export const runSum = self => Channel.runFold(self.channel, () => 0, (acc, chunk) => {
@@ -6908,7 +6834,7 @@ export const runSum = self => Channel.runFold(self.channel, () => 0, (acc, chunk
6908
6834
  * // 6
6909
6835
  * ```
6910
6836
  *
6911
- * @category Destructors
6837
+ * @category destructors
6912
6838
  * @since 2.0.0
6913
6839
  */
6914
6840
  export const runFold = /*#__PURE__*/dual(3, (self, initial, f) => Channel.runFold(self.channel, initial, (acc, arr) => {
@@ -6938,7 +6864,7 @@ export const runFold = /*#__PURE__*/dual(3, (self, initial, f) => Channel.runFol
6938
6864
  * // 6
6939
6865
  * ```
6940
6866
  *
6941
- * @category Destructors
6867
+ * @category destructors
6942
6868
  * @since 2.0.0
6943
6869
  */
6944
6870
  export const runFoldEffect = /*#__PURE__*/dual(3, (self, initial, f) => Channel.runFoldEffect(self.channel, initial, (acc, arr) => {
@@ -6970,14 +6896,14 @@ export const runFoldEffect = /*#__PURE__*/dual(3, (self, initial, f) => Channel.
6970
6896
  * // 1
6971
6897
  * ```
6972
6898
  *
6973
- * @category Destructors
6899
+ * @category destructors
6974
6900
  * @since 2.0.0
6975
6901
  */
6976
6902
  export const runHead = self => Effect.map(Channel.runHead(self.channel), Option.map(Arr.getUnsafe(0)));
6977
6903
  /**
6978
6904
  * Runs the stream and returns the last element as an `Option`.
6979
6905
  *
6980
- * @category Destructors
6906
+ * @category destructors
6981
6907
  * @since 2.0.0
6982
6908
  */
6983
6909
  export const runLast = self => Effect.map(Channel.runLast(self.channel), Option.map(Arr.lastNonEmpty));
@@ -7001,7 +6927,7 @@ export const runLast = self => Effect.map(Channel.runLast(self.channel), Option.
7001
6927
  * // Processing: 3
7002
6928
  * ```
7003
6929
  *
7004
- * @category Destructors
6930
+ * @category destructors
7005
6931
  * @since 2.0.0
7006
6932
  */
7007
6933
  export const runForEach = /*#__PURE__*/dual(2, (self, f) => Channel.runForEach(self.channel, arr => {
@@ -7038,7 +6964,7 @@ export const runForEach = /*#__PURE__*/dual(2, (self, f) => Channel.runForEach(s
7038
6964
  * // Processing: 3
7039
6965
  * ```
7040
6966
  *
7041
- * @category Destructors
6967
+ * @category destructors
7042
6968
  * @since 2.0.0
7043
6969
  */
7044
6970
  export const runForEachWhile = /*#__PURE__*/dual(2, (self, f) => Channel.runForEachWhile(self.channel, arr => {
@@ -7073,8 +6999,8 @@ export const runForEachWhile = /*#__PURE__*/dual(2, (self, f) => Channel.runForE
7073
6999
  * // Processing chunk: 1, 2, 3, 4, 5
7074
7000
  * ```
7075
7001
  *
7076
- * @category Destructors
7077
- * @since 2.0.0
7002
+ * @category destructors
7003
+ * @since 4.0.0
7078
7004
  */
7079
7005
  export const runForEachArray = /*#__PURE__*/dual(2, (self, f) => Channel.runForEach(self.channel, f));
7080
7006
  /**
@@ -7099,7 +7025,7 @@ export const runForEachArray = /*#__PURE__*/dual(2, (self, f) => Channel.runForE
7099
7025
  * // Processing: 3
7100
7026
  * ```
7101
7027
  *
7102
- * @category Destructors
7028
+ * @category destructors
7103
7029
  * @since 2.0.0
7104
7030
  */
7105
7031
  export const runDrain = self => Channel.runDrain(self.channel);
@@ -7128,7 +7054,7 @@ export const runDrain = self => Channel.runDrain(self.channel);
7128
7054
  * // [1, 2, 3]
7129
7055
  * ```
7130
7056
  *
7131
- * @category Destructors
7057
+ * @category destructors
7132
7058
  * @since 2.0.0
7133
7059
  */
7134
7060
  export const toPull = self => Channel.toPull(self.channel);
@@ -7150,7 +7076,7 @@ export const toPull = self => Channel.toPull(self.channel);
7150
7076
  * // Hello World!
7151
7077
  * ```
7152
7078
  *
7153
- * @category Destructors
7079
+ * @category destructors
7154
7080
  * @since 2.0.0
7155
7081
  */
7156
7082
  export const mkString = self => Channel.runFold(self.channel, () => "", (acc, chunk) => acc + chunk.join(""));
@@ -7172,7 +7098,7 @@ export const mkString = self => Channel.runFold(self.channel, () => "", (acc, ch
7172
7098
  * // [1, 2, 3, 4]
7173
7099
  * ```
7174
7100
  *
7175
- * @category Destructors
7101
+ * @category destructors
7176
7102
  * @since 4.0.0
7177
7103
  */
7178
7104
  export const mkUint8Array = self => Effect.map(Channel.runFold(self.channel, () => ({
@@ -7211,8 +7137,8 @@ export const mkUint8Array = self => Effect.map(Channel.runFold(self.channel, ()
7211
7137
  * const readableStream = Stream.toReadableStreamWith(stream, Context.empty())
7212
7138
  * ```
7213
7139
  *
7214
- * @category Destructors
7215
- * @since 2.0.0
7140
+ * @category destructors
7141
+ * @since 4.0.0
7216
7142
  */
7217
7143
  export const toReadableStreamWith = /*#__PURE__*/dual(args => isStream(args[0]), (self, context, options) => {
7218
7144
  let currentResolve = undefined;
@@ -7262,7 +7188,7 @@ export const toReadableStreamWith = /*#__PURE__*/dual(args => isStream(args[0]),
7262
7188
  * const reader = readableStream.getReader()
7263
7189
  * ```
7264
7190
  *
7265
- * @category Destructors
7191
+ * @category destructors
7266
7192
  * @since 2.0.0
7267
7193
  */
7268
7194
  export const toReadableStream = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => toReadableStreamWith(self, Context.empty(), options));
@@ -7286,7 +7212,7 @@ export const toReadableStream = /*#__PURE__*/dual(args => isStream(args[0]), (se
7286
7212
  * Effect.runPromise(effect)
7287
7213
  * ```
7288
7214
  *
7289
- * @category Destructors
7215
+ * @category destructors
7290
7216
  * @since 2.0.0
7291
7217
  */
7292
7218
  export const toReadableStreamEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => Effect.map(Effect.context(), context => toReadableStreamWith(self, context, options)));
@@ -7313,8 +7239,8 @@ export const toReadableStreamEffect = /*#__PURE__*/dual(args => isStream(args[0]
7313
7239
  * // [ 1, 2, 3 ]
7314
7240
  * ```
7315
7241
  *
7316
- * @category Destructors
7317
- * @since 2.0.0
7242
+ * @category destructors
7243
+ * @since 4.0.0
7318
7244
  */
7319
7245
  export const toAsyncIterableWith = /*#__PURE__*/dual(2, (self, context) => ({
7320
7246
  [Symbol.asyncIterator]() {
@@ -7378,8 +7304,8 @@ export const toAsyncIterableWith = /*#__PURE__*/dual(2, (self, context) => ({
7378
7304
  * // [ 1, 2, 3 ]
7379
7305
  * ```
7380
7306
  *
7381
- * @category Destructors
7382
- * @since 2.0.0
7307
+ * @category destructors
7308
+ * @since 3.15.0
7383
7309
  */
7384
7310
  export const toAsyncIterableEffect = self => Effect.map(Effect.context(), context => toAsyncIterableWith(self, context));
7385
7311
  /**
@@ -7405,8 +7331,8 @@ export const toAsyncIterableEffect = self => Effect.map(Effect.context(), contex
7405
7331
  * // [ 1, 2, 3 ]
7406
7332
  * ```
7407
7333
  *
7408
- * @category Destructors
7409
- * @since 2.0.0
7334
+ * @category destructors
7335
+ * @since 3.15.0
7410
7336
  */
7411
7337
  export const toAsyncIterable = self => toAsyncIterableWith(self, Context.empty());
7412
7338
  /**
@@ -7438,7 +7364,7 @@ export const toAsyncIterable = self => toAsyncIterableWith(self, Context.empty()
7438
7364
  * //=> 2
7439
7365
  * ```
7440
7366
  *
7441
- * @category Destructors
7367
+ * @category destructors
7442
7368
  * @since 2.0.0
7443
7369
  */
7444
7370
  export const runIntoPubSub = /*#__PURE__*/dual(args => isStream(args[0]), (self, pubsub, options) => Channel.runIntoPubSubArray(self.channel, pubsub, options));
@@ -7464,7 +7390,7 @@ export const runIntoPubSub = /*#__PURE__*/dual(args => isStream(args[0]), (self,
7464
7390
  * }))
7465
7391
  * ```
7466
7392
  *
7467
- * @category Destructors
7393
+ * @category destructors
7468
7394
  * @since 2.0.0
7469
7395
  */
7470
7396
  export const toPubSub = /*#__PURE__*/dual(2, (self, options) => Channel.toPubSubArray(self.channel, options));
@@ -7491,7 +7417,7 @@ export const toPubSub = /*#__PURE__*/dual(2, (self, options) => Channel.toPubSub
7491
7417
  * })
7492
7418
  * ```
7493
7419
  *
7494
- * @category Destructors
7420
+ * @category destructors
7495
7421
  * @since 4.0.0
7496
7422
  */
7497
7423
  export const toPubSubTake = /*#__PURE__*/dual(2, (self, options) => Channel.toPubSubTake(self.channel, options));
@@ -7515,7 +7441,7 @@ export const toPubSubTake = /*#__PURE__*/dual(2, (self, options) => Channel.toPu
7515
7441
  * })
7516
7442
  * ```
7517
7443
  *
7518
- * @category Destructors
7444
+ * @category destructors
7519
7445
  * @since 2.0.0
7520
7446
  */
7521
7447
  export const toQueue = /*#__PURE__*/dual(2, (self, options) => Channel.toQueueArray(self.channel, options));
@@ -7546,7 +7472,7 @@ export const toQueue = /*#__PURE__*/dual(2, (self, options) => Channel.toQueueAr
7546
7472
  * })
7547
7473
  * ```
7548
7474
  *
7549
- * @category Destructors
7475
+ * @category destructors
7550
7476
  * @since 2.0.0
7551
7477
  */
7552
7478
  export const runIntoQueue = /*#__PURE__*/dual(2, (self, queue) => Channel.runIntoQueueArray(self.channel, queue));