effect 4.0.0-beta.4 → 4.0.0-beta.40

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 (1222) hide show
  1. package/dist/Array.d.ts +213 -385
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +149 -102
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +46 -45
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +35 -38
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +39 -32
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +32 -29
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Brand.d.ts +1 -1
  14. package/dist/Brand.d.ts.map +1 -1
  15. package/dist/Brand.js +1 -1
  16. package/dist/Brand.js.map +1 -1
  17. package/dist/Cache.d.ts +2 -2
  18. package/dist/Cache.d.ts.map +1 -1
  19. package/dist/Cache.js +6 -5
  20. package/dist/Cache.js.map +1 -1
  21. package/dist/Cause.d.ts +33 -2
  22. package/dist/Cause.d.ts.map +1 -1
  23. package/dist/Cause.js +19 -0
  24. package/dist/Cause.js.map +1 -1
  25. package/dist/Channel.d.ts +130 -35
  26. package/dist/Channel.d.ts.map +1 -1
  27. package/dist/Channel.js +96 -45
  28. package/dist/Channel.js.map +1 -1
  29. package/dist/Chunk.d.ts +112 -304
  30. package/dist/Chunk.d.ts.map +1 -1
  31. package/dist/Chunk.js +56 -88
  32. package/dist/Chunk.js.map +1 -1
  33. package/dist/Combiner.d.ts +280 -13
  34. package/dist/Combiner.d.ts.map +1 -1
  35. package/dist/Combiner.js +198 -7
  36. package/dist/Combiner.js.map +1 -1
  37. package/dist/Config.d.ts +169 -9
  38. package/dist/Config.d.ts.map +1 -1
  39. package/dist/Config.js +69 -11
  40. package/dist/Config.js.map +1 -1
  41. package/dist/ConfigProvider.d.ts +1 -1
  42. package/dist/Cron.d.ts +11 -7
  43. package/dist/Cron.d.ts.map +1 -1
  44. package/dist/Cron.js +120 -63
  45. package/dist/Cron.js.map +1 -1
  46. package/dist/Data.d.ts +535 -366
  47. package/dist/Data.d.ts.map +1 -1
  48. package/dist/Data.js +132 -79
  49. package/dist/Data.js.map +1 -1
  50. package/dist/DateTime.d.ts +72 -253
  51. package/dist/DateTime.d.ts.map +1 -1
  52. package/dist/DateTime.js +15 -60
  53. package/dist/DateTime.js.map +1 -1
  54. package/dist/Deferred.d.ts +7 -5
  55. package/dist/Deferred.d.ts.map +1 -1
  56. package/dist/Deferred.js +7 -5
  57. package/dist/Deferred.js.map +1 -1
  58. package/dist/Duration.d.ts +62 -32
  59. package/dist/Duration.d.ts.map +1 -1
  60. package/dist/Duration.js +108 -78
  61. package/dist/Duration.js.map +1 -1
  62. package/dist/Effect.d.ts +1224 -951
  63. package/dist/Effect.d.ts.map +1 -1
  64. package/dist/Effect.js +398 -338
  65. package/dist/Effect.js.map +1 -1
  66. package/dist/Encoding.d.ts +194 -0
  67. package/dist/Encoding.d.ts.map +1 -0
  68. package/dist/Encoding.js +352 -0
  69. package/dist/Encoding.js.map +1 -0
  70. package/dist/Equal.d.ts +276 -109
  71. package/dist/Equal.d.ts.map +1 -1
  72. package/dist/Equal.js +124 -48
  73. package/dist/Equal.js.map +1 -1
  74. package/dist/Equivalence.d.ts +60 -3
  75. package/dist/Equivalence.d.ts.map +1 -1
  76. package/dist/Equivalence.js +70 -13
  77. package/dist/Equivalence.js.map +1 -1
  78. package/dist/ErrorReporter.d.ts +374 -0
  79. package/dist/ErrorReporter.d.ts.map +1 -0
  80. package/dist/ErrorReporter.js +245 -0
  81. package/dist/ErrorReporter.js.map +1 -0
  82. package/dist/Exit.d.ts +24 -12
  83. package/dist/Exit.d.ts.map +1 -1
  84. package/dist/Exit.js +8 -4
  85. package/dist/Exit.js.map +1 -1
  86. package/dist/Fiber.d.ts +5 -3
  87. package/dist/Fiber.d.ts.map +1 -1
  88. package/dist/Fiber.js.map +1 -1
  89. package/dist/FiberHandle.d.ts +9 -8
  90. package/dist/FiberHandle.d.ts.map +1 -1
  91. package/dist/FiberHandle.js +8 -7
  92. package/dist/FiberHandle.js.map +1 -1
  93. package/dist/FiberMap.d.ts +20 -19
  94. package/dist/FiberMap.d.ts.map +1 -1
  95. package/dist/FiberMap.js +6 -6
  96. package/dist/FiberMap.js.map +1 -1
  97. package/dist/FileSystem.d.ts +18 -17
  98. package/dist/FileSystem.d.ts.map +1 -1
  99. package/dist/FileSystem.js +17 -13
  100. package/dist/FileSystem.js.map +1 -1
  101. package/dist/Filter.d.ts +34 -38
  102. package/dist/Filter.d.ts.map +1 -1
  103. package/dist/Filter.js +15 -13
  104. package/dist/Filter.js.map +1 -1
  105. package/dist/Formatter.d.ts +131 -47
  106. package/dist/Formatter.d.ts.map +1 -1
  107. package/dist/Formatter.js +229 -51
  108. package/dist/Formatter.js.map +1 -1
  109. package/dist/Function.d.ts +1 -9
  110. package/dist/Function.d.ts.map +1 -1
  111. package/dist/Function.js +2 -10
  112. package/dist/Function.js.map +1 -1
  113. package/dist/Graph.d.ts +65 -65
  114. package/dist/Graph.d.ts.map +1 -1
  115. package/dist/Graph.js +60 -62
  116. package/dist/Graph.js.map +1 -1
  117. package/dist/HashMap.d.ts +26 -19
  118. package/dist/HashMap.d.ts.map +1 -1
  119. package/dist/HashMap.js +7 -5
  120. package/dist/HashMap.js.map +1 -1
  121. package/dist/Iterable.d.ts +50 -50
  122. package/dist/Iterable.d.ts.map +1 -1
  123. package/dist/Iterable.js +106 -34
  124. package/dist/Iterable.js.map +1 -1
  125. package/dist/JsonSchema.d.ts +299 -10
  126. package/dist/JsonSchema.d.ts.map +1 -1
  127. package/dist/JsonSchema.js +323 -4
  128. package/dist/JsonSchema.js.map +1 -1
  129. package/dist/Latch.d.ts +175 -0
  130. package/dist/Latch.d.ts.map +1 -0
  131. package/dist/Latch.js +130 -0
  132. package/dist/Latch.js.map +1 -0
  133. package/dist/Layer.d.ts +306 -129
  134. package/dist/Layer.d.ts.map +1 -1
  135. package/dist/Layer.js +92 -47
  136. package/dist/Layer.js.map +1 -1
  137. package/dist/LayerMap.d.ts +9 -8
  138. package/dist/LayerMap.d.ts.map +1 -1
  139. package/dist/LayerMap.js +3 -3
  140. package/dist/LayerMap.js.map +1 -1
  141. package/dist/LogLevel.d.ts +32 -0
  142. package/dist/LogLevel.d.ts.map +1 -1
  143. package/dist/LogLevel.js +28 -100
  144. package/dist/LogLevel.js.map +1 -1
  145. package/dist/Logger.d.ts +29 -95
  146. package/dist/Logger.d.ts.map +1 -1
  147. package/dist/Logger.js +2 -3
  148. package/dist/Logger.js.map +1 -1
  149. package/dist/ManagedRuntime.d.ts +2 -2
  150. package/dist/ManagedRuntime.js +2 -2
  151. package/dist/Metric.d.ts +4 -6
  152. package/dist/Metric.d.ts.map +1 -1
  153. package/dist/Metric.js +3 -5
  154. package/dist/Metric.js.map +1 -1
  155. package/dist/MutableHashMap.d.ts +7 -0
  156. package/dist/MutableHashMap.d.ts.map +1 -1
  157. package/dist/MutableHashMap.js +8 -0
  158. package/dist/MutableHashMap.js.map +1 -1
  159. package/dist/MutableHashSet.d.ts +7 -0
  160. package/dist/MutableHashSet.d.ts.map +1 -1
  161. package/dist/MutableHashSet.js +8 -0
  162. package/dist/MutableHashSet.js.map +1 -1
  163. package/dist/Newtype.d.ts +291 -0
  164. package/dist/Newtype.d.ts.map +1 -0
  165. package/dist/Newtype.js +161 -0
  166. package/dist/Newtype.js.map +1 -0
  167. package/dist/Number.d.ts +74 -18
  168. package/dist/Number.d.ts.map +1 -1
  169. package/dist/Number.js +34 -15
  170. package/dist/Number.js.map +1 -1
  171. package/dist/Optic.d.ts +947 -18
  172. package/dist/Optic.d.ts.map +1 -1
  173. package/dist/Optic.js +454 -5
  174. package/dist/Optic.js.map +1 -1
  175. package/dist/Option.d.ts +25 -16
  176. package/dist/Option.d.ts.map +1 -1
  177. package/dist/Option.js +15 -9
  178. package/dist/Option.js.map +1 -1
  179. package/dist/Order.d.ts +6 -1
  180. package/dist/Order.d.ts.map +1 -1
  181. package/dist/Order.js +19 -14
  182. package/dist/Order.js.map +1 -1
  183. package/dist/PartitionedSemaphore.d.ts +146 -15
  184. package/dist/PartitionedSemaphore.d.ts.map +1 -1
  185. package/dist/PartitionedSemaphore.js +174 -61
  186. package/dist/PartitionedSemaphore.js.map +1 -1
  187. package/dist/Pipeable.d.ts +17 -0
  188. package/dist/Pipeable.d.ts.map +1 -1
  189. package/dist/Pipeable.js +19 -1
  190. package/dist/Pipeable.js.map +1 -1
  191. package/dist/PlatformError.d.ts +10 -9
  192. package/dist/PlatformError.d.ts.map +1 -1
  193. package/dist/PlatformError.js +2 -2
  194. package/dist/PlatformError.js.map +1 -1
  195. package/dist/Pool.d.ts +6 -4
  196. package/dist/Pool.d.ts.map +1 -1
  197. package/dist/Pool.js +7 -5
  198. package/dist/Pool.js.map +1 -1
  199. package/dist/PubSub.d.ts +8 -6
  200. package/dist/PubSub.d.ts.map +1 -1
  201. package/dist/PubSub.js +18 -10
  202. package/dist/PubSub.js.map +1 -1
  203. package/dist/Pull.d.ts.map +1 -1
  204. package/dist/Pull.js +1 -1
  205. package/dist/Pull.js.map +1 -1
  206. package/dist/Queue.d.ts +9 -6
  207. package/dist/Queue.d.ts.map +1 -1
  208. package/dist/Queue.js +7 -5
  209. package/dist/Queue.js.map +1 -1
  210. package/dist/Random.d.ts +35 -1
  211. package/dist/Random.d.ts.map +1 -1
  212. package/dist/Random.js +46 -12
  213. package/dist/Random.js.map +1 -1
  214. package/dist/RcMap.d.ts +2 -2
  215. package/dist/RcMap.d.ts.map +1 -1
  216. package/dist/RcMap.js +1 -1
  217. package/dist/RcMap.js.map +1 -1
  218. package/dist/RcRef.d.ts +1 -1
  219. package/dist/RcRef.d.ts.map +1 -1
  220. package/dist/Record.d.ts +63 -160
  221. package/dist/Record.d.ts.map +1 -1
  222. package/dist/Record.js +37 -56
  223. package/dist/Record.js.map +1 -1
  224. package/dist/Reducer.d.ts +166 -7
  225. package/dist/Reducer.d.ts.map +1 -1
  226. package/dist/Reducer.js +135 -1
  227. package/dist/Reducer.js.map +1 -1
  228. package/dist/References.d.ts +242 -226
  229. package/dist/References.d.ts.map +1 -1
  230. package/dist/References.js +240 -247
  231. package/dist/References.js.map +1 -1
  232. package/dist/Request.d.ts +1 -1
  233. package/dist/Request.d.ts.map +1 -1
  234. package/dist/Request.js +2 -1
  235. package/dist/Request.js.map +1 -1
  236. package/dist/RequestResolver.d.ts +25 -45
  237. package/dist/RequestResolver.d.ts.map +1 -1
  238. package/dist/RequestResolver.js +10 -30
  239. package/dist/RequestResolver.js.map +1 -1
  240. package/dist/Resource.d.ts.map +1 -1
  241. package/dist/Resource.js +2 -1
  242. package/dist/Resource.js.map +1 -1
  243. package/dist/Result.d.ts +1 -1
  244. package/dist/Result.d.ts.map +1 -1
  245. package/dist/Result.js +1 -2
  246. package/dist/Result.js.map +1 -1
  247. package/dist/Runtime.d.ts +66 -0
  248. package/dist/Runtime.d.ts.map +1 -1
  249. package/dist/Runtime.js +79 -6
  250. package/dist/Runtime.js.map +1 -1
  251. package/dist/Schedule.d.ts +174 -291
  252. package/dist/Schedule.d.ts.map +1 -1
  253. package/dist/Schedule.js +160 -134
  254. package/dist/Schedule.js.map +1 -1
  255. package/dist/Scheduler.d.ts +34 -123
  256. package/dist/Scheduler.d.ts.map +1 -1
  257. package/dist/Scheduler.js +31 -123
  258. package/dist/Scheduler.js.map +1 -1
  259. package/dist/Schema.d.ts +2722 -247
  260. package/dist/Schema.d.ts.map +1 -1
  261. package/dist/Schema.js +1947 -224
  262. package/dist/Schema.js.map +1 -1
  263. package/dist/SchemaAST.d.ts +7 -2
  264. package/dist/SchemaAST.d.ts.map +1 -1
  265. package/dist/SchemaAST.js +131 -25
  266. package/dist/SchemaAST.js.map +1 -1
  267. package/dist/SchemaGetter.d.ts +5 -5
  268. package/dist/SchemaGetter.d.ts.map +1 -1
  269. package/dist/SchemaGetter.js +18 -18
  270. package/dist/SchemaGetter.js.map +1 -1
  271. package/dist/SchemaParser.d.ts +44 -54
  272. package/dist/SchemaParser.d.ts.map +1 -1
  273. package/dist/SchemaParser.js +55 -2
  274. package/dist/SchemaParser.js.map +1 -1
  275. package/dist/SchemaRepresentation.d.ts +46 -45
  276. package/dist/SchemaRepresentation.d.ts.map +1 -1
  277. package/dist/SchemaRepresentation.js +49 -24
  278. package/dist/SchemaRepresentation.js.map +1 -1
  279. package/dist/SchemaTransformation.d.ts +107 -3
  280. package/dist/SchemaTransformation.d.ts.map +1 -1
  281. package/dist/SchemaTransformation.js +173 -13
  282. package/dist/SchemaTransformation.js.map +1 -1
  283. package/dist/ScopedCache.d.ts +2 -2
  284. package/dist/ScopedCache.d.ts.map +1 -1
  285. package/dist/ScopedCache.js +1 -1
  286. package/dist/ScopedCache.js.map +1 -1
  287. package/dist/Semaphore.d.ts +307 -0
  288. package/dist/Semaphore.d.ts.map +1 -0
  289. package/dist/Semaphore.js +222 -0
  290. package/dist/Semaphore.js.map +1 -0
  291. package/dist/ServiceMap.d.ts +67 -31
  292. package/dist/ServiceMap.d.ts.map +1 -1
  293. package/dist/ServiceMap.js +39 -24
  294. package/dist/ServiceMap.js.map +1 -1
  295. package/dist/Sink.d.ts +18 -15
  296. package/dist/Sink.d.ts.map +1 -1
  297. package/dist/Sink.js +53 -6
  298. package/dist/Sink.js.map +1 -1
  299. package/dist/Stdio.d.ts +16 -4
  300. package/dist/Stdio.d.ts.map +1 -1
  301. package/dist/Stdio.js +18 -0
  302. package/dist/Stdio.js.map +1 -1
  303. package/dist/Stream.d.ts +284 -431
  304. package/dist/Stream.d.ts.map +1 -1
  305. package/dist/Stream.js +189 -88
  306. package/dist/Stream.js.map +1 -1
  307. package/dist/String.d.ts +114 -47
  308. package/dist/String.d.ts.map +1 -1
  309. package/dist/String.js +29 -47
  310. package/dist/String.js.map +1 -1
  311. package/dist/Struct.d.ts +23 -7
  312. package/dist/Struct.d.ts.map +1 -1
  313. package/dist/Struct.js +22 -0
  314. package/dist/Struct.js.map +1 -1
  315. package/dist/SubscriptionRef.d.ts +3 -3
  316. package/dist/SubscriptionRef.d.ts.map +1 -1
  317. package/dist/SubscriptionRef.js +85 -117
  318. package/dist/SubscriptionRef.js.map +1 -1
  319. package/dist/SynchronizedRef.d.ts +2 -1
  320. package/dist/SynchronizedRef.d.ts.map +1 -1
  321. package/dist/SynchronizedRef.js +2 -1
  322. package/dist/SynchronizedRef.js.map +1 -1
  323. package/dist/Terminal.d.ts +2 -1
  324. package/dist/Terminal.d.ts.map +1 -1
  325. package/dist/Terminal.js.map +1 -1
  326. package/dist/Tracer.d.ts +5 -4
  327. package/dist/Tracer.d.ts.map +1 -1
  328. package/dist/Tracer.js +2 -1
  329. package/dist/Tracer.js.map +1 -1
  330. package/dist/Trie.d.ts +44 -31
  331. package/dist/Trie.d.ts.map +1 -1
  332. package/dist/Trie.js +13 -9
  333. package/dist/Trie.js.map +1 -1
  334. package/dist/TxChunk.d.ts +37 -37
  335. package/dist/TxChunk.d.ts.map +1 -1
  336. package/dist/TxChunk.js +3 -3
  337. package/dist/TxChunk.js.map +1 -1
  338. package/dist/TxDeferred.d.ts +328 -0
  339. package/dist/TxDeferred.d.ts.map +1 -0
  340. package/dist/TxDeferred.js +197 -0
  341. package/dist/TxDeferred.js.map +1 -0
  342. package/dist/TxHashMap.d.ts +159 -140
  343. package/dist/TxHashMap.d.ts.map +1 -1
  344. package/dist/TxHashMap.js +51 -44
  345. package/dist/TxHashMap.js.map +1 -1
  346. package/dist/TxHashSet.d.ts +36 -36
  347. package/dist/TxHashSet.d.ts.map +1 -1
  348. package/dist/TxHashSet.js +16 -15
  349. package/dist/TxHashSet.js.map +1 -1
  350. package/dist/TxPriorityQueue.d.ts +609 -0
  351. package/dist/TxPriorityQueue.d.ts.map +1 -0
  352. package/dist/TxPriorityQueue.js +416 -0
  353. package/dist/TxPriorityQueue.js.map +1 -0
  354. package/dist/TxPubSub.d.ts +585 -0
  355. package/dist/TxPubSub.d.ts.map +1 -0
  356. package/dist/TxPubSub.js +521 -0
  357. package/dist/TxPubSub.js.map +1 -0
  358. package/dist/TxQueue.d.ts +32 -32
  359. package/dist/TxQueue.d.ts.map +1 -1
  360. package/dist/TxQueue.js +26 -26
  361. package/dist/TxQueue.js.map +1 -1
  362. package/dist/TxReentrantLock.d.ts +523 -0
  363. package/dist/TxReentrantLock.d.ts.map +1 -0
  364. package/dist/TxReentrantLock.js +504 -0
  365. package/dist/TxReentrantLock.js.map +1 -0
  366. package/dist/TxRef.d.ts +34 -34
  367. package/dist/TxRef.d.ts.map +1 -1
  368. package/dist/TxRef.js +21 -14
  369. package/dist/TxRef.js.map +1 -1
  370. package/dist/TxSemaphore.d.ts +170 -10
  371. package/dist/TxSemaphore.d.ts.map +1 -1
  372. package/dist/TxSemaphore.js +23 -8
  373. package/dist/TxSemaphore.js.map +1 -1
  374. package/dist/TxSubscriptionRef.d.ts +508 -0
  375. package/dist/TxSubscriptionRef.d.ts.map +1 -0
  376. package/dist/TxSubscriptionRef.js +293 -0
  377. package/dist/TxSubscriptionRef.js.map +1 -0
  378. package/dist/Types.d.ts +80 -23
  379. package/dist/Types.d.ts.map +1 -1
  380. package/dist/Utils.d.ts +137 -65
  381. package/dist/Utils.d.ts.map +1 -1
  382. package/dist/Utils.js +38 -66
  383. package/dist/Utils.js.map +1 -1
  384. package/dist/index.d.ts +804 -53
  385. package/dist/index.d.ts.map +1 -1
  386. package/dist/index.js +804 -53
  387. package/dist/index.js.map +1 -1
  388. package/dist/internal/core.js +11 -3
  389. package/dist/internal/core.js.map +1 -1
  390. package/dist/internal/dateTime.js +77 -71
  391. package/dist/internal/dateTime.js.map +1 -1
  392. package/dist/internal/effect.js +281 -201
  393. package/dist/internal/effect.js.map +1 -1
  394. package/dist/internal/hashMap.js +7 -5
  395. package/dist/internal/hashMap.js.map +1 -1
  396. package/dist/internal/option.js +6 -0
  397. package/dist/internal/option.js.map +1 -1
  398. package/dist/internal/random.d.ts +2 -0
  399. package/dist/internal/random.d.ts.map +1 -0
  400. package/dist/internal/random.js +13 -0
  401. package/dist/internal/random.js.map +1 -0
  402. package/dist/internal/rcRef.js +3 -2
  403. package/dist/internal/rcRef.js.map +1 -1
  404. package/dist/internal/references.d.ts +2 -0
  405. package/dist/internal/references.d.ts.map +1 -0
  406. package/dist/internal/references.js +51 -0
  407. package/dist/internal/references.js.map +1 -0
  408. package/dist/internal/request.js +2 -2
  409. package/dist/internal/request.js.map +1 -1
  410. package/dist/internal/schema/annotations.js +2 -0
  411. package/dist/internal/schema/annotations.js.map +1 -1
  412. package/dist/internal/schema/representation.js +47 -106
  413. package/dist/internal/schema/representation.js.map +1 -1
  414. package/dist/internal/schema/schema.js +1 -0
  415. package/dist/internal/schema/schema.js.map +1 -1
  416. package/dist/internal/schema/to-codec.js +7 -10
  417. package/dist/internal/schema/to-codec.js.map +1 -1
  418. package/dist/internal/trie.js +8 -7
  419. package/dist/internal/trie.js.map +1 -1
  420. package/dist/testing/TestClock.d.ts +8 -7
  421. package/dist/testing/TestClock.d.ts.map +1 -1
  422. package/dist/testing/TestClock.js +6 -4
  423. package/dist/testing/TestClock.js.map +1 -1
  424. package/dist/testing/TestSchema.d.ts +266 -32
  425. package/dist/testing/TestSchema.d.ts.map +1 -1
  426. package/dist/testing/TestSchema.js +296 -23
  427. package/dist/testing/TestSchema.js.map +1 -1
  428. package/dist/testing/index.d.ts +64 -1
  429. package/dist/testing/index.d.ts.map +1 -1
  430. package/dist/testing/index.js +64 -1
  431. package/dist/testing/index.js.map +1 -1
  432. package/dist/unstable/ai/AiError.d.ts +136 -54
  433. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  434. package/dist/unstable/ai/AiError.js +28 -23
  435. package/dist/unstable/ai/AiError.js.map +1 -1
  436. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
  437. package/dist/unstable/ai/AnthropicStructuredOutput.js +4 -0
  438. package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
  439. package/dist/unstable/ai/Chat.d.ts +7 -8
  440. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  441. package/dist/unstable/ai/Chat.js +38 -44
  442. package/dist/unstable/ai/Chat.js.map +1 -1
  443. package/dist/unstable/ai/EmbeddingModel.d.ts +130 -0
  444. package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -0
  445. package/dist/unstable/ai/EmbeddingModel.js +127 -0
  446. package/dist/unstable/ai/EmbeddingModel.js.map +1 -0
  447. package/dist/unstable/ai/LanguageModel.d.ts +53 -45
  448. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  449. package/dist/unstable/ai/LanguageModel.js +265 -143
  450. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  451. package/dist/unstable/ai/McpSchema.d.ts +183 -88
  452. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  453. package/dist/unstable/ai/McpSchema.js +57 -12
  454. package/dist/unstable/ai/McpSchema.js.map +1 -1
  455. package/dist/unstable/ai/McpServer.d.ts +66 -13
  456. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  457. package/dist/unstable/ai/McpServer.js +193 -51
  458. package/dist/unstable/ai/McpServer.js.map +1 -1
  459. package/dist/unstable/ai/Model.d.ts +25 -7
  460. package/dist/unstable/ai/Model.d.ts.map +1 -1
  461. package/dist/unstable/ai/Model.js +22 -6
  462. package/dist/unstable/ai/Model.js.map +1 -1
  463. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
  464. package/dist/unstable/ai/OpenAiStructuredOutput.js +4 -0
  465. package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
  466. package/dist/unstable/ai/Prompt.d.ts +20 -20
  467. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  468. package/dist/unstable/ai/Response.d.ts +26 -26
  469. package/dist/unstable/ai/Response.d.ts.map +1 -1
  470. package/dist/unstable/ai/Response.js +1 -1
  471. package/dist/unstable/ai/Response.js.map +1 -1
  472. package/dist/unstable/ai/ResponseIdTracker.d.ts +38 -0
  473. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -0
  474. package/dist/unstable/ai/ResponseIdTracker.js +68 -0
  475. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -0
  476. package/dist/unstable/ai/Tool.d.ts +34 -4
  477. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  478. package/dist/unstable/ai/Tool.js +28 -10
  479. package/dist/unstable/ai/Tool.js.map +1 -1
  480. package/dist/unstable/ai/Toolkit.d.ts +1 -1
  481. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  482. package/dist/unstable/ai/Toolkit.js +4 -11
  483. package/dist/unstable/ai/Toolkit.js.map +1 -1
  484. package/dist/unstable/ai/index.d.ts +22 -1
  485. package/dist/unstable/ai/index.d.ts.map +1 -1
  486. package/dist/unstable/ai/index.js +22 -1
  487. package/dist/unstable/ai/index.js.map +1 -1
  488. package/dist/unstable/ai/internal/codec-transformer.js +0 -5
  489. package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
  490. package/dist/unstable/cli/Argument.d.ts +2 -4
  491. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  492. package/dist/unstable/cli/Argument.js +1 -3
  493. package/dist/unstable/cli/Argument.js.map +1 -1
  494. package/dist/unstable/cli/CliError.d.ts +27 -60
  495. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  496. package/dist/unstable/cli/CliError.js +25 -57
  497. package/dist/unstable/cli/CliError.js.map +1 -1
  498. package/dist/unstable/cli/CliOutput.d.ts +3 -2
  499. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  500. package/dist/unstable/cli/CliOutput.js +65 -10
  501. package/dist/unstable/cli/CliOutput.js.map +1 -1
  502. package/dist/unstable/cli/Command.d.ts +371 -58
  503. package/dist/unstable/cli/Command.d.ts.map +1 -1
  504. package/dist/unstable/cli/Command.js +328 -67
  505. package/dist/unstable/cli/Command.js.map +1 -1
  506. package/dist/unstable/cli/Completions.d.ts +16 -0
  507. package/dist/unstable/cli/Completions.d.ts.map +1 -0
  508. package/dist/unstable/cli/Completions.js +23 -0
  509. package/dist/unstable/cli/Completions.js.map +1 -0
  510. package/dist/unstable/cli/Flag.d.ts +2 -2
  511. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  512. package/dist/unstable/cli/Flag.js +1 -1
  513. package/dist/unstable/cli/Flag.js.map +1 -1
  514. package/dist/unstable/cli/GlobalFlag.d.ts +125 -0
  515. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -0
  516. package/dist/unstable/cli/GlobalFlag.js +118 -0
  517. package/dist/unstable/cli/GlobalFlag.js.map +1 -0
  518. package/dist/unstable/cli/HelpDoc.d.ts +81 -11
  519. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  520. package/dist/unstable/cli/Param.d.ts +4 -4
  521. package/dist/unstable/cli/Param.d.ts.map +1 -1
  522. package/dist/unstable/cli/Param.js +7 -7
  523. package/dist/unstable/cli/Param.js.map +1 -1
  524. package/dist/unstable/cli/Primitive.d.ts +2 -2
  525. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  526. package/dist/unstable/cli/Primitive.js +1 -1
  527. package/dist/unstable/cli/Primitive.js.map +1 -1
  528. package/dist/unstable/cli/Prompt.js +258 -84
  529. package/dist/unstable/cli/Prompt.js.map +1 -1
  530. package/dist/unstable/cli/index.d.ts +8 -0
  531. package/dist/unstable/cli/index.d.ts.map +1 -1
  532. package/dist/unstable/cli/index.js +8 -0
  533. package/dist/unstable/cli/index.js.map +1 -1
  534. package/dist/unstable/cli/internal/command.d.ts +40 -14
  535. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  536. package/dist/unstable/cli/internal/command.js +72 -46
  537. package/dist/unstable/cli/internal/command.js.map +1 -1
  538. package/dist/unstable/cli/internal/completions/CommandDescriptor.js +16 -4
  539. package/dist/unstable/cli/internal/completions/CommandDescriptor.js.map +1 -1
  540. package/dist/unstable/cli/internal/config.js +42 -0
  541. package/dist/unstable/cli/internal/config.js.map +1 -1
  542. package/dist/unstable/cli/internal/help.d.ts +33 -0
  543. package/dist/unstable/cli/internal/help.d.ts.map +1 -0
  544. package/dist/unstable/cli/internal/help.js +125 -0
  545. package/dist/unstable/cli/internal/help.js.map +1 -0
  546. package/dist/unstable/cli/internal/parser.js +61 -43
  547. package/dist/unstable/cli/internal/parser.js.map +1 -1
  548. package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
  549. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  550. package/dist/unstable/cluster/ClusterCron.js +1 -1
  551. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  552. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +3 -2
  553. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  554. package/dist/unstable/cluster/ClusterWorkflowEngine.js +29 -26
  555. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  556. package/dist/unstable/cluster/DeliverAt.js +1 -1
  557. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  558. package/dist/unstable/cluster/Entity.d.ts +10 -8
  559. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  560. package/dist/unstable/cluster/Entity.js +7 -7
  561. package/dist/unstable/cluster/Entity.js.map +1 -1
  562. package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
  563. package/dist/unstable/cluster/EntityAddress.js +1 -1
  564. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  565. package/dist/unstable/cluster/EntityResource.d.ts +2 -2
  566. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  567. package/dist/unstable/cluster/Envelope.d.ts +1 -1
  568. package/dist/unstable/cluster/K8sHttpClient.d.ts +1 -1
  569. package/dist/unstable/cluster/K8sHttpClient.js +4 -4
  570. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  571. package/dist/unstable/cluster/Message.d.ts +14 -13
  572. package/dist/unstable/cluster/Message.d.ts.map +1 -1
  573. package/dist/unstable/cluster/Message.js +3 -2
  574. package/dist/unstable/cluster/Message.js.map +1 -1
  575. package/dist/unstable/cluster/MessageStorage.d.ts +10 -10
  576. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  577. package/dist/unstable/cluster/MessageStorage.js +14 -13
  578. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  579. package/dist/unstable/cluster/Reply.d.ts +8 -7
  580. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  581. package/dist/unstable/cluster/Reply.js +4 -3
  582. package/dist/unstable/cluster/Reply.js.map +1 -1
  583. package/dist/unstable/cluster/Runner.d.ts +1 -1
  584. package/dist/unstable/cluster/Runner.d.ts.map +1 -1
  585. package/dist/unstable/cluster/Runner.js +1 -1
  586. package/dist/unstable/cluster/Runner.js.map +1 -1
  587. package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
  588. package/dist/unstable/cluster/RunnerAddress.js +1 -1
  589. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  590. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  591. package/dist/unstable/cluster/RunnerServer.js +9 -8
  592. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  593. package/dist/unstable/cluster/Runners.d.ts +2 -1
  594. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  595. package/dist/unstable/cluster/Runners.js +11 -9
  596. package/dist/unstable/cluster/Runners.js.map +1 -1
  597. package/dist/unstable/cluster/ShardId.js +3 -3
  598. package/dist/unstable/cluster/ShardId.js.map +1 -1
  599. package/dist/unstable/cluster/Sharding.d.ts +2 -2
  600. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  601. package/dist/unstable/cluster/Sharding.js +28 -20
  602. package/dist/unstable/cluster/Sharding.js.map +1 -1
  603. package/dist/unstable/cluster/ShardingConfig.d.ts +26 -25
  604. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  605. package/dist/unstable/cluster/ShardingConfig.js +24 -24
  606. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  607. package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
  608. package/dist/unstable/cluster/SqlMessageStorage.js +19 -18
  609. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  610. package/dist/unstable/cluster/SqlRunnerStorage.js +1 -1
  611. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  612. package/dist/unstable/cluster/internal/entityManager.js +14 -14
  613. package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
  614. package/dist/unstable/cluster/internal/entityReaper.js +2 -1
  615. package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
  616. package/dist/unstable/cluster/internal/resourceRef.js +2 -1
  617. package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
  618. package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
  619. package/dist/unstable/devtools/DevToolsClient.js +4 -3
  620. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  621. package/dist/unstable/devtools/DevToolsSchema.d.ts +40 -40
  622. package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
  623. package/dist/unstable/devtools/DevToolsSchema.js +9 -2
  624. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  625. package/dist/unstable/encoding/Msgpack.d.ts +1 -1
  626. package/dist/unstable/encoding/Ndjson.d.ts +9 -9
  627. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  628. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  629. package/dist/unstable/encoding/Sse.d.ts +4 -4
  630. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  631. package/dist/unstable/encoding/Sse.js +1 -1
  632. package/dist/unstable/encoding/Sse.js.map +1 -1
  633. package/dist/unstable/eventlog/EventJournal.d.ts +2 -2
  634. package/dist/unstable/eventlog/EventJournal.js +2 -2
  635. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  636. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  637. package/dist/unstable/eventlog/EventLog.js +3 -2
  638. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  639. package/dist/unstable/eventlog/EventLogRemote.d.ts +6 -6
  640. package/dist/unstable/eventlog/SqlEventLogJournal.js +2 -2
  641. package/dist/unstable/eventlog/SqlEventLogJournal.js.map +1 -1
  642. package/dist/unstable/http/Cookies.d.ts +52 -7
  643. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  644. package/dist/unstable/http/Cookies.js +27 -6
  645. package/dist/unstable/http/Cookies.js.map +1 -1
  646. package/dist/unstable/http/Etag.d.ts.map +1 -1
  647. package/dist/unstable/http/Etag.js +5 -1
  648. package/dist/unstable/http/Etag.js.map +1 -1
  649. package/dist/unstable/http/Headers.d.ts +19 -2
  650. package/dist/unstable/http/Headers.d.ts.map +1 -1
  651. package/dist/unstable/http/Headers.js +40 -11
  652. package/dist/unstable/http/Headers.js.map +1 -1
  653. package/dist/unstable/http/HttpBody.d.ts +1 -1
  654. package/dist/unstable/http/HttpClient.d.ts +117 -15
  655. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  656. package/dist/unstable/http/HttpClient.js +191 -13
  657. package/dist/unstable/http/HttpClient.js.map +1 -1
  658. package/dist/unstable/http/HttpClientError.d.ts +7 -7
  659. package/dist/unstable/http/HttpClientRequest.d.ts +43 -15
  660. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  661. package/dist/unstable/http/HttpClientRequest.js +131 -21
  662. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  663. package/dist/unstable/http/HttpClientResponse.d.ts +2 -1
  664. package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
  665. package/dist/unstable/http/HttpClientResponse.js +6 -1
  666. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  667. package/dist/unstable/http/HttpEffect.d.ts +7 -5
  668. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  669. package/dist/unstable/http/HttpEffect.js +46 -54
  670. package/dist/unstable/http/HttpEffect.js.map +1 -1
  671. package/dist/unstable/http/HttpIncomingMessage.d.ts +3 -2
  672. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  673. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  674. package/dist/unstable/http/HttpMethod.d.ts +4 -4
  675. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  676. package/dist/unstable/http/HttpMethod.js +3 -3
  677. package/dist/unstable/http/HttpMethod.js.map +1 -1
  678. package/dist/unstable/http/HttpMiddleware.d.ts +1 -6
  679. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  680. package/dist/unstable/http/HttpMiddleware.js +24 -32
  681. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  682. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  683. package/dist/unstable/http/HttpPlatform.js +3 -2
  684. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  685. package/dist/unstable/http/HttpRouter.d.ts +2 -1
  686. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  687. package/dist/unstable/http/HttpRouter.js +7 -7
  688. package/dist/unstable/http/HttpRouter.js.map +1 -1
  689. package/dist/unstable/http/HttpServer.d.ts.map +1 -1
  690. package/dist/unstable/http/HttpServer.js +2 -2
  691. package/dist/unstable/http/HttpServer.js.map +1 -1
  692. package/dist/unstable/http/HttpServerError.d.ts +22 -34
  693. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  694. package/dist/unstable/http/HttpServerError.js +39 -45
  695. package/dist/unstable/http/HttpServerError.js.map +1 -1
  696. package/dist/unstable/http/HttpServerRequest.d.ts +15 -3
  697. package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
  698. package/dist/unstable/http/HttpServerRequest.js +301 -7
  699. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  700. package/dist/unstable/http/HttpServerRespondable.d.ts +2 -2
  701. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  702. package/dist/unstable/http/HttpServerRespondable.js +5 -5
  703. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  704. package/dist/unstable/http/HttpServerResponse.d.ts +50 -3
  705. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  706. package/dist/unstable/http/HttpServerResponse.js +236 -1
  707. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  708. package/dist/unstable/http/HttpStaticServer.d.ts +69 -0
  709. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -0
  710. package/dist/unstable/http/HttpStaticServer.js +353 -0
  711. package/dist/unstable/http/HttpStaticServer.js.map +1 -0
  712. package/dist/unstable/http/HttpTraceContext.d.ts +3 -2
  713. package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
  714. package/dist/unstable/http/HttpTraceContext.js +27 -15
  715. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  716. package/dist/unstable/http/Multipart.d.ts +3 -3
  717. package/dist/unstable/http/Url.d.ts +604 -0
  718. package/dist/unstable/http/Url.d.ts.map +1 -0
  719. package/dist/unstable/http/Url.js +256 -0
  720. package/dist/unstable/http/Url.js.map +1 -0
  721. package/dist/unstable/http/UrlParams.d.ts +19 -10
  722. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  723. package/dist/unstable/http/UrlParams.js +6 -7
  724. package/dist/unstable/http/UrlParams.js.map +1 -1
  725. package/dist/unstable/http/index.d.ts +8 -0
  726. package/dist/unstable/http/index.d.ts.map +1 -1
  727. package/dist/unstable/http/index.js +8 -0
  728. package/dist/unstable/http/index.js.map +1 -1
  729. package/dist/unstable/http/internal/preResponseHandler.d.ts +2 -0
  730. package/dist/unstable/http/internal/preResponseHandler.d.ts.map +1 -0
  731. package/dist/unstable/http/internal/preResponseHandler.js +10 -0
  732. package/dist/unstable/http/internal/preResponseHandler.js.map +1 -0
  733. package/dist/unstable/httpapi/HttpApi.d.ts +4 -4
  734. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  735. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  736. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +11 -5
  737. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  738. package/dist/unstable/httpapi/HttpApiBuilder.js +40 -27
  739. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  740. package/dist/unstable/httpapi/HttpApiClient.d.ts +83 -7
  741. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  742. package/dist/unstable/httpapi/HttpApiClient.js +78 -10
  743. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  744. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +207 -101
  745. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  746. package/dist/unstable/httpapi/HttpApiEndpoint.js +49 -43
  747. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  748. package/dist/unstable/httpapi/HttpApiError.d.ts +31 -14
  749. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  750. package/dist/unstable/httpapi/HttpApiError.js +125 -32
  751. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  752. package/dist/unstable/httpapi/HttpApiGroup.d.ts +4 -3
  753. package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
  754. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  755. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +46 -15
  756. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  757. package/dist/unstable/httpapi/HttpApiMiddleware.js +32 -3
  758. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  759. package/dist/unstable/httpapi/HttpApiScalar.d.ts +6 -0
  760. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  761. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  762. package/dist/unstable/httpapi/HttpApiSchema.d.ts +5 -0
  763. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  764. package/dist/unstable/httpapi/HttpApiSchema.js +20 -2
  765. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  766. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +2 -2
  767. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  768. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  769. package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
  770. package/dist/unstable/httpapi/OpenApi.js +34 -26
  771. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  772. package/dist/unstable/observability/Otlp.d.ts +12 -12
  773. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  774. package/dist/unstable/observability/OtlpExporter.d.ts +2 -2
  775. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  776. package/dist/unstable/observability/OtlpExporter.js +3 -3
  777. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  778. package/dist/unstable/observability/OtlpLogger.d.ts +4 -4
  779. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  780. package/dist/unstable/observability/OtlpLogger.js +7 -4
  781. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  782. package/dist/unstable/observability/OtlpMetrics.d.ts +4 -4
  783. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  784. package/dist/unstable/observability/OtlpTracer.d.ts +4 -4
  785. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  786. package/dist/unstable/observability/OtlpTracer.js +7 -3
  787. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  788. package/dist/unstable/persistence/KeyValueStore.d.ts +1 -1
  789. package/dist/unstable/persistence/KeyValueStore.js +6 -6
  790. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  791. package/dist/unstable/persistence/Persistable.d.ts +2 -2
  792. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  793. package/dist/unstable/persistence/Persistable.js +1 -1
  794. package/dist/unstable/persistence/Persistable.js.map +1 -1
  795. package/dist/unstable/persistence/PersistedCache.d.ts +6 -5
  796. package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
  797. package/dist/unstable/persistence/PersistedCache.js +2 -1
  798. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  799. package/dist/unstable/persistence/PersistedQueue.d.ts +12 -12
  800. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  801. package/dist/unstable/persistence/PersistedQueue.js +12 -11
  802. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  803. package/dist/unstable/persistence/Persistence.d.ts +1 -1
  804. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  805. package/dist/unstable/persistence/Persistence.js +2 -2
  806. package/dist/unstable/persistence/Persistence.js.map +1 -1
  807. package/dist/unstable/persistence/RateLimiter.d.ts +3 -3
  808. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  809. package/dist/unstable/persistence/RateLimiter.js +1 -1
  810. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  811. package/dist/unstable/process/ChildProcess.d.ts +5 -128
  812. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  813. package/dist/unstable/process/ChildProcess.js +1 -65
  814. package/dist/unstable/process/ChildProcess.js.map +1 -1
  815. package/dist/unstable/process/ChildProcessSpawner.d.ts +45 -7
  816. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  817. package/dist/unstable/process/ChildProcessSpawner.js +21 -1
  818. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  819. package/dist/unstable/reactivity/Atom.d.ts +73 -12
  820. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  821. package/dist/unstable/reactivity/Atom.js +108 -25
  822. package/dist/unstable/reactivity/Atom.js.map +1 -1
  823. package/dist/unstable/reactivity/AtomHttpApi.d.ts +17 -15
  824. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  825. package/dist/unstable/reactivity/AtomHttpApi.js +45 -15
  826. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  827. package/dist/unstable/reactivity/AtomRegistry.d.ts +6 -0
  828. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  829. package/dist/unstable/reactivity/AtomRegistry.js +54 -11
  830. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  831. package/dist/unstable/reactivity/AtomRpc.d.ts +9 -9
  832. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  833. package/dist/unstable/reactivity/AtomRpc.js +47 -21
  834. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  835. package/dist/unstable/reactivity/Hydration.d.ts +39 -0
  836. package/dist/unstable/reactivity/Hydration.d.ts.map +1 -0
  837. package/dist/unstable/reactivity/Hydration.js +76 -0
  838. package/dist/unstable/reactivity/Hydration.js.map +1 -0
  839. package/dist/unstable/reactivity/index.d.ts +4 -0
  840. package/dist/unstable/reactivity/index.d.ts.map +1 -1
  841. package/dist/unstable/reactivity/index.js +4 -0
  842. package/dist/unstable/reactivity/index.js.map +1 -1
  843. package/dist/unstable/rpc/Rpc.d.ts +5 -5
  844. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  845. package/dist/unstable/rpc/Rpc.js +4 -3
  846. package/dist/unstable/rpc/Rpc.js.map +1 -1
  847. package/dist/unstable/rpc/RpcClient.d.ts +5 -26
  848. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  849. package/dist/unstable/rpc/RpcClient.js +10 -17
  850. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  851. package/dist/unstable/rpc/RpcGroup.d.ts +3 -5
  852. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  853. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  854. package/dist/unstable/rpc/RpcMiddleware.d.ts +8 -8
  855. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  856. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  857. package/dist/unstable/rpc/RpcSchema.d.ts +13 -0
  858. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  859. package/dist/unstable/rpc/RpcSchema.js +17 -2
  860. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  861. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  862. package/dist/unstable/rpc/RpcSerialization.js +39 -11
  863. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  864. package/dist/unstable/rpc/RpcServer.d.ts +6 -10
  865. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  866. package/dist/unstable/rpc/RpcServer.js +20 -19
  867. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  868. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  869. package/dist/unstable/rpc/Utils.js +3 -2
  870. package/dist/unstable/rpc/Utils.js.map +1 -1
  871. package/dist/unstable/schema/Model.d.ts +22 -1
  872. package/dist/unstable/schema/Model.d.ts.map +1 -1
  873. package/dist/unstable/schema/Model.js +15 -0
  874. package/dist/unstable/schema/Model.js.map +1 -1
  875. package/dist/unstable/schema/VariantSchema.d.ts +6 -6
  876. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  877. package/dist/unstable/schema/VariantSchema.js +6 -6
  878. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  879. package/dist/unstable/socket/Socket.d.ts +6 -5
  880. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  881. package/dist/unstable/socket/Socket.js +12 -9
  882. package/dist/unstable/socket/Socket.js.map +1 -1
  883. package/dist/unstable/socket/SocketServer.d.ts +3 -3
  884. package/dist/unstable/sql/Migrator.d.ts +1 -1
  885. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  886. package/dist/unstable/sql/Migrator.js +2 -2
  887. package/dist/unstable/sql/Migrator.js.map +1 -1
  888. package/dist/unstable/sql/SqlClient.d.ts +1 -1
  889. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  890. package/dist/unstable/sql/SqlClient.js +1 -1
  891. package/dist/unstable/sql/SqlClient.js.map +1 -1
  892. package/dist/unstable/sql/SqlError.d.ts +237 -17
  893. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  894. package/dist/unstable/sql/SqlError.js +260 -4
  895. package/dist/unstable/sql/SqlError.js.map +1 -1
  896. package/dist/unstable/sql/SqlModel.d.ts +2 -2
  897. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  898. package/dist/unstable/sql/SqlModel.js +3 -3
  899. package/dist/unstable/sql/SqlModel.js.map +1 -1
  900. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  901. package/dist/unstable/sql/SqlResolver.js +17 -8
  902. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  903. package/dist/unstable/sql/SqlSchema.d.ts +17 -6
  904. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  905. package/dist/unstable/sql/SqlSchema.js +17 -7
  906. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  907. package/dist/unstable/sql/Statement.js +0 -1
  908. package/dist/unstable/sql/Statement.js.map +1 -1
  909. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  910. package/dist/unstable/workers/Worker.js +2 -1
  911. package/dist/unstable/workers/Worker.js.map +1 -1
  912. package/dist/unstable/workflow/DurableClock.d.ts +3 -3
  913. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  914. package/dist/unstable/workflow/DurableClock.js +3 -3
  915. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  916. package/dist/unstable/workflow/DurableDeferred.js +8 -8
  917. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  918. package/dist/unstable/workflow/Workflow.d.ts +5 -4
  919. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  920. package/dist/unstable/workflow/Workflow.js +1 -1
  921. package/dist/unstable/workflow/Workflow.js.map +1 -1
  922. package/dist/unstable/workflow/WorkflowEngine.d.ts +17 -5
  923. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  924. package/dist/unstable/workflow/WorkflowEngine.js +153 -12
  925. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  926. package/package.json +2 -2
  927. package/src/Array.ts +304 -447
  928. package/src/BigDecimal.ts +63 -66
  929. package/src/BigInt.ts +49 -41
  930. package/src/Brand.ts +1 -1
  931. package/src/Cache.ts +9 -8
  932. package/src/Cause.ts +37 -2
  933. package/src/Channel.ts +582 -154
  934. package/src/Chunk.ts +149 -331
  935. package/src/Combiner.ts +280 -13
  936. package/src/Config.ts +195 -25
  937. package/src/Cron.ts +155 -63
  938. package/src/Data.ts +539 -376
  939. package/src/DateTime.ts +75 -256
  940. package/src/Deferred.ts +8 -6
  941. package/src/Duration.ts +122 -66
  942. package/src/Effect.ts +1483 -1157
  943. package/src/Encoding.ts +879 -0
  944. package/src/Equal.ts +278 -111
  945. package/src/Equivalence.ts +114 -52
  946. package/src/ErrorReporter.ts +458 -0
  947. package/src/Exit.ts +24 -12
  948. package/src/Fiber.ts +12 -3
  949. package/src/FiberHandle.ts +10 -9
  950. package/src/FiberMap.ts +22 -22
  951. package/src/FileSystem.ts +34 -31
  952. package/src/Filter.ts +52 -63
  953. package/src/Formatter.ts +253 -51
  954. package/src/Function.ts +2 -10
  955. package/src/Graph.ts +131 -117
  956. package/src/HashMap.ts +26 -19
  957. package/src/Iterable.ts +117 -63
  958. package/src/JsonSchema.ts +383 -10
  959. package/src/Latch.ts +194 -0
  960. package/src/Layer.ts +393 -159
  961. package/src/LayerMap.ts +11 -9
  962. package/src/LogLevel.ts +37 -0
  963. package/src/Logger.ts +33 -100
  964. package/src/ManagedRuntime.ts +2 -2
  965. package/src/Metric.ts +6 -8
  966. package/src/MutableHashMap.ts +9 -0
  967. package/src/MutableHashSet.ts +9 -0
  968. package/src/Newtype.ts +308 -0
  969. package/src/Number.ts +85 -26
  970. package/src/Optic.ts +948 -19
  971. package/src/Option.ts +34 -24
  972. package/src/Order.ts +39 -32
  973. package/src/PartitionedSemaphore.ts +288 -56
  974. package/src/Pipeable.ts +32 -1
  975. package/src/PlatformError.ts +5 -5
  976. package/src/Pool.ts +13 -11
  977. package/src/PubSub.ts +30 -20
  978. package/src/Pull.ts +1 -1
  979. package/src/Queue.ts +11 -9
  980. package/src/Random.ts +51 -14
  981. package/src/RcMap.ts +5 -5
  982. package/src/RcRef.ts +1 -1
  983. package/src/Record.ts +94 -199
  984. package/src/Reducer.ts +166 -7
  985. package/src/References.ts +283 -287
  986. package/src/Request.ts +3 -2
  987. package/src/RequestResolver.ts +29 -49
  988. package/src/Resource.ts +2 -1
  989. package/src/Result.ts +2 -4
  990. package/src/Runtime.ts +102 -6
  991. package/src/Schedule.ts +458 -449
  992. package/src/Scheduler.ts +49 -126
  993. package/src/Schema.ts +3298 -392
  994. package/src/SchemaAST.ts +172 -33
  995. package/src/SchemaGetter.ts +19 -21
  996. package/src/SchemaParser.ts +92 -27
  997. package/src/SchemaRepresentation.ts +51 -26
  998. package/src/SchemaTransformation.ts +198 -13
  999. package/src/ScopedCache.ts +3 -3
  1000. package/src/Semaphore.ts +444 -0
  1001. package/src/ServiceMap.ts +133 -71
  1002. package/src/Sink.ts +83 -28
  1003. package/src/Stdio.ts +27 -4
  1004. package/src/Stream.ts +687 -617
  1005. package/src/String.ts +122 -69
  1006. package/src/Struct.ts +33 -7
  1007. package/src/SubscriptionRef.ts +101 -120
  1008. package/src/SynchronizedRef.ts +3 -2
  1009. package/src/Terminal.ts +2 -1
  1010. package/src/Tracer.ts +6 -5
  1011. package/src/Trie.ts +44 -31
  1012. package/src/TxChunk.ts +72 -53
  1013. package/src/TxDeferred.ts +394 -0
  1014. package/src/TxHashMap.ts +409 -343
  1015. package/src/TxHashSet.ts +113 -118
  1016. package/src/TxPriorityQueue.ts +766 -0
  1017. package/src/TxPubSub.ts +789 -0
  1018. package/src/TxQueue.ts +241 -251
  1019. package/src/TxReentrantLock.ts +753 -0
  1020. package/src/TxRef.ts +50 -38
  1021. package/src/TxSemaphore.ts +217 -44
  1022. package/src/TxSubscriptionRef.ts +639 -0
  1023. package/src/Types.ts +73 -19
  1024. package/src/Utils.ts +137 -111
  1025. package/src/index.ts +814 -54
  1026. package/src/internal/core.ts +12 -5
  1027. package/src/internal/dateTime.ts +91 -96
  1028. package/src/internal/effect.ts +841 -432
  1029. package/src/internal/hashMap.ts +12 -10
  1030. package/src/internal/option.ts +7 -0
  1031. package/src/internal/random.ts +20 -0
  1032. package/src/internal/rcRef.ts +4 -3
  1033. package/src/internal/references.ts +72 -0
  1034. package/src/internal/request.ts +2 -2
  1035. package/src/internal/schema/annotations.ts +2 -0
  1036. package/src/internal/schema/representation.ts +45 -94
  1037. package/src/internal/schema/schema.ts +1 -0
  1038. package/src/internal/schema/to-codec.ts +7 -17
  1039. package/src/internal/trie.ts +21 -15
  1040. package/src/testing/TestClock.ts +13 -11
  1041. package/src/testing/TestSchema.ts +332 -35
  1042. package/src/testing/index.ts +64 -1
  1043. package/src/unstable/ai/AiError.ts +111 -54
  1044. package/src/unstable/ai/AnthropicStructuredOutput.ts +4 -0
  1045. package/src/unstable/ai/Chat.ts +62 -74
  1046. package/src/unstable/ai/EmbeddingModel.ts +209 -0
  1047. package/src/unstable/ai/LanguageModel.ts +544 -230
  1048. package/src/unstable/ai/McpSchema.ts +73 -13
  1049. package/src/unstable/ai/McpServer.ts +271 -61
  1050. package/src/unstable/ai/Model.ts +40 -9
  1051. package/src/unstable/ai/OpenAiStructuredOutput.ts +4 -0
  1052. package/src/unstable/ai/Prompt.ts +37 -37
  1053. package/src/unstable/ai/Response.ts +25 -25
  1054. package/src/unstable/ai/ResponseIdTracker.ts +97 -0
  1055. package/src/unstable/ai/Tool.ts +42 -16
  1056. package/src/unstable/ai/Toolkit.ts +5 -14
  1057. package/src/unstable/ai/index.ts +24 -1
  1058. package/src/unstable/ai/internal/codec-transformer.ts +0 -7
  1059. package/src/unstable/cli/Argument.ts +2 -4
  1060. package/src/unstable/cli/CliError.ts +47 -59
  1061. package/src/unstable/cli/CliOutput.ts +85 -13
  1062. package/src/unstable/cli/Command.ts +801 -192
  1063. package/src/unstable/cli/Completions.ts +36 -0
  1064. package/src/unstable/cli/Flag.ts +2 -2
  1065. package/src/unstable/cli/GlobalFlag.ts +242 -0
  1066. package/src/unstable/cli/HelpDoc.ts +91 -11
  1067. package/src/unstable/cli/Param.ts +15 -11
  1068. package/src/unstable/cli/Primitive.ts +2 -2
  1069. package/src/unstable/cli/Prompt.ts +262 -100
  1070. package/src/unstable/cli/index.ts +10 -0
  1071. package/src/unstable/cli/internal/command.ts +109 -63
  1072. package/src/unstable/cli/internal/completions/CommandDescriptor.ts +10 -4
  1073. package/src/unstable/cli/internal/config.ts +49 -0
  1074. package/src/unstable/cli/internal/help.ts +171 -0
  1075. package/src/unstable/cli/internal/parser.ts +71 -63
  1076. package/src/unstable/cluster/ClusterCron.ts +2 -2
  1077. package/src/unstable/cluster/ClusterWorkflowEngine.ts +40 -34
  1078. package/src/unstable/cluster/DeliverAt.ts +1 -1
  1079. package/src/unstable/cluster/Entity.ts +24 -22
  1080. package/src/unstable/cluster/EntityAddress.ts +1 -1
  1081. package/src/unstable/cluster/EntityResource.ts +4 -4
  1082. package/src/unstable/cluster/Envelope.ts +1 -1
  1083. package/src/unstable/cluster/K8sHttpClient.ts +5 -5
  1084. package/src/unstable/cluster/Message.ts +6 -5
  1085. package/src/unstable/cluster/MessageStorage.ts +29 -30
  1086. package/src/unstable/cluster/Reply.ts +7 -4
  1087. package/src/unstable/cluster/Runner.ts +1 -1
  1088. package/src/unstable/cluster/RunnerAddress.ts +1 -1
  1089. package/src/unstable/cluster/RunnerServer.ts +10 -13
  1090. package/src/unstable/cluster/Runners.ts +14 -12
  1091. package/src/unstable/cluster/ShardId.ts +2 -2
  1092. package/src/unstable/cluster/Sharding.ts +36 -27
  1093. package/src/unstable/cluster/ShardingConfig.ts +36 -37
  1094. package/src/unstable/cluster/SqlMessageStorage.ts +21 -18
  1095. package/src/unstable/cluster/SqlRunnerStorage.ts +1 -1
  1096. package/src/unstable/cluster/internal/entityManager.ts +36 -29
  1097. package/src/unstable/cluster/internal/entityReaper.ts +2 -1
  1098. package/src/unstable/cluster/internal/resourceRef.ts +2 -1
  1099. package/src/unstable/devtools/DevToolsClient.ts +23 -18
  1100. package/src/unstable/devtools/DevToolsSchema.ts +16 -3
  1101. package/src/unstable/encoding/Ndjson.ts +17 -17
  1102. package/src/unstable/encoding/Sse.ts +3 -5
  1103. package/src/unstable/eventlog/EventJournal.ts +2 -2
  1104. package/src/unstable/eventlog/EventLog.ts +3 -2
  1105. package/src/unstable/eventlog/SqlEventLogJournal.ts +2 -2
  1106. package/src/unstable/http/Cookies.ts +94 -11
  1107. package/src/unstable/http/Etag.ts +5 -3
  1108. package/src/unstable/http/Headers.ts +68 -18
  1109. package/src/unstable/http/HttpClient.ts +376 -34
  1110. package/src/unstable/http/HttpClientRequest.ts +151 -39
  1111. package/src/unstable/http/HttpClientResponse.ts +12 -6
  1112. package/src/unstable/http/HttpEffect.ts +54 -68
  1113. package/src/unstable/http/HttpIncomingMessage.ts +3 -2
  1114. package/src/unstable/http/HttpMethod.ts +16 -4
  1115. package/src/unstable/http/HttpMiddleware.ts +25 -39
  1116. package/src/unstable/http/HttpPlatform.ts +3 -2
  1117. package/src/unstable/http/HttpRouter.ts +9 -9
  1118. package/src/unstable/http/HttpServer.ts +3 -9
  1119. package/src/unstable/http/HttpServerError.ts +45 -47
  1120. package/src/unstable/http/HttpServerRequest.ts +407 -16
  1121. package/src/unstable/http/HttpServerRespondable.ts +6 -6
  1122. package/src/unstable/http/HttpServerResponse.ts +345 -7
  1123. package/src/unstable/http/HttpStaticServer.ts +456 -0
  1124. package/src/unstable/http/HttpTraceContext.ts +31 -17
  1125. package/src/unstable/http/Multipart.ts +2 -2
  1126. package/src/unstable/http/Url.ts +650 -0
  1127. package/src/unstable/http/UrlParams.ts +31 -19
  1128. package/src/unstable/http/index.ts +10 -0
  1129. package/src/unstable/http/internal/preResponseHandler.ts +15 -0
  1130. package/src/unstable/httpapi/HttpApi.ts +6 -6
  1131. package/src/unstable/httpapi/HttpApiBuilder.ts +106 -41
  1132. package/src/unstable/httpapi/HttpApiClient.ts +180 -28
  1133. package/src/unstable/httpapi/HttpApiEndpoint.ts +216 -104
  1134. package/src/unstable/httpapi/HttpApiError.ts +108 -30
  1135. package/src/unstable/httpapi/HttpApiGroup.ts +7 -6
  1136. package/src/unstable/httpapi/HttpApiMiddleware.ts +83 -22
  1137. package/src/unstable/httpapi/HttpApiScalar.ts +6 -0
  1138. package/src/unstable/httpapi/HttpApiSchema.ts +20 -2
  1139. package/src/unstable/httpapi/HttpApiSecurity.ts +3 -3
  1140. package/src/unstable/httpapi/OpenApi.ts +43 -29
  1141. package/src/unstable/observability/Otlp.ts +12 -12
  1142. package/src/unstable/observability/OtlpExporter.ts +8 -5
  1143. package/src/unstable/observability/OtlpLogger.ts +13 -9
  1144. package/src/unstable/observability/OtlpMetrics.ts +4 -4
  1145. package/src/unstable/observability/OtlpTracer.ts +12 -8
  1146. package/src/unstable/persistence/KeyValueStore.ts +6 -6
  1147. package/src/unstable/persistence/Persistable.ts +3 -3
  1148. package/src/unstable/persistence/PersistedCache.ts +20 -9
  1149. package/src/unstable/persistence/PersistedQueue.ts +25 -24
  1150. package/src/unstable/persistence/Persistence.ts +3 -3
  1151. package/src/unstable/persistence/RateLimiter.ts +4 -4
  1152. package/src/unstable/process/ChildProcess.ts +6 -208
  1153. package/src/unstable/process/ChildProcessSpawner.ts +75 -14
  1154. package/src/unstable/reactivity/Atom.ts +212 -54
  1155. package/src/unstable/reactivity/AtomHttpApi.ts +81 -41
  1156. package/src/unstable/reactivity/AtomRegistry.ts +66 -12
  1157. package/src/unstable/reactivity/AtomRpc.ts +51 -20
  1158. package/src/unstable/reactivity/Hydration.ts +112 -0
  1159. package/src/unstable/reactivity/index.ts +5 -0
  1160. package/src/unstable/rpc/Rpc.ts +11 -12
  1161. package/src/unstable/rpc/RpcClient.ts +22 -63
  1162. package/src/unstable/rpc/RpcGroup.ts +7 -7
  1163. package/src/unstable/rpc/RpcMiddleware.ts +15 -9
  1164. package/src/unstable/rpc/RpcSchema.ts +23 -5
  1165. package/src/unstable/rpc/RpcSerialization.ts +49 -11
  1166. package/src/unstable/rpc/RpcServer.ts +31 -35
  1167. package/src/unstable/rpc/Utils.ts +3 -2
  1168. package/src/unstable/schema/Model.ts +31 -0
  1169. package/src/unstable/schema/VariantSchema.ts +10 -10
  1170. package/src/unstable/socket/Socket.ts +31 -27
  1171. package/src/unstable/sql/Migrator.ts +7 -5
  1172. package/src/unstable/sql/SqlClient.ts +6 -4
  1173. package/src/unstable/sql/SqlError.ts +365 -11
  1174. package/src/unstable/sql/SqlModel.ts +5 -5
  1175. package/src/unstable/sql/SqlResolver.ts +17 -7
  1176. package/src/unstable/sql/SqlSchema.ts +42 -26
  1177. package/src/unstable/sql/Statement.ts +0 -1
  1178. package/src/unstable/workers/Worker.ts +2 -1
  1179. package/src/unstable/workflow/DurableClock.ts +8 -8
  1180. package/src/unstable/workflow/DurableDeferred.ts +8 -8
  1181. package/src/unstable/workflow/Workflow.ts +7 -3
  1182. package/src/unstable/workflow/WorkflowEngine.ts +211 -19
  1183. package/dist/NullOr.d.ts +0 -149
  1184. package/dist/NullOr.d.ts.map +0 -1
  1185. package/dist/NullOr.js +0 -152
  1186. package/dist/NullOr.js.map +0 -1
  1187. package/dist/encoding/Base64.d.ts +0 -67
  1188. package/dist/encoding/Base64.d.ts.map +0 -1
  1189. package/dist/encoding/Base64.js +0 -146
  1190. package/dist/encoding/Base64.js.map +0 -1
  1191. package/dist/encoding/Base64Url.d.ts +0 -60
  1192. package/dist/encoding/Base64Url.d.ts.map +0 -1
  1193. package/dist/encoding/Base64Url.js +0 -89
  1194. package/dist/encoding/Base64Url.js.map +0 -1
  1195. package/dist/encoding/EncodingError.d.ts +0 -31
  1196. package/dist/encoding/EncodingError.d.ts.map +0 -1
  1197. package/dist/encoding/EncodingError.js +0 -22
  1198. package/dist/encoding/EncodingError.js.map +0 -1
  1199. package/dist/encoding/Hex.d.ts +0 -61
  1200. package/dist/encoding/Hex.d.ts.map +0 -1
  1201. package/dist/encoding/Hex.js +0 -115
  1202. package/dist/encoding/Hex.js.map +0 -1
  1203. package/dist/encoding/index.d.ts +0 -26
  1204. package/dist/encoding/index.d.ts.map +0 -1
  1205. package/dist/encoding/index.js +0 -27
  1206. package/dist/encoding/index.js.map +0 -1
  1207. package/dist/unstable/cli/internal/builtInFlags.d.ts +0 -7
  1208. package/dist/unstable/cli/internal/builtInFlags.d.ts.map +0 -1
  1209. package/dist/unstable/cli/internal/builtInFlags.js +0 -44
  1210. package/dist/unstable/cli/internal/builtInFlags.js.map +0 -1
  1211. package/dist/unstable/cli/internal/completions/Completions.d.ts +0 -2
  1212. package/dist/unstable/cli/internal/completions/Completions.d.ts.map +0 -1
  1213. package/dist/unstable/cli/internal/completions/Completions.js +0 -23
  1214. package/dist/unstable/cli/internal/completions/Completions.js.map +0 -1
  1215. package/src/NullOr.ts +0 -204
  1216. package/src/encoding/Base64.ts +0 -366
  1217. package/src/encoding/Base64Url.ts +0 -104
  1218. package/src/encoding/EncodingError.ts +0 -35
  1219. package/src/encoding/Hex.ts +0 -390
  1220. package/src/encoding/index.ts +0 -31
  1221. package/src/unstable/cli/internal/builtInFlags.ts +0 -78
  1222. package/src/unstable/cli/internal/completions/Completions.ts +0 -31
package/dist/Stream.d.ts CHANGED
@@ -8,11 +8,11 @@ import * as Duration from "./Duration.ts";
8
8
  import * as Effect from "./Effect.ts";
9
9
  import * as ExecutionPlan from "./ExecutionPlan.ts";
10
10
  import * as Exit from "./Exit.ts";
11
- import * as Filter from "./Filter.ts";
11
+ import type * as Filter from "./Filter.ts";
12
12
  import type { LazyArg } from "./Function.ts";
13
13
  import type { TypeLambda } from "./HKT.ts";
14
14
  import type * as Layer from "./Layer.ts";
15
- import type { LogLevel } from "./LogLevel.ts";
15
+ import type { Severity } from "./LogLevel.ts";
16
16
  import * as Option from "./Option.ts";
17
17
  import type { Pipeable } from "./Pipeable.ts";
18
18
  import type { Predicate, Refinement } from "./Predicate.ts";
@@ -26,9 +26,18 @@ import * as ServiceMap from "./ServiceMap.ts";
26
26
  import * as Sink from "./Sink.ts";
27
27
  import type * as Take from "./Take.ts";
28
28
  import type { ParentSpan, SpanOptions } from "./Tracer.ts";
29
- import type { Covariant, ExcludeReason, ExcludeTag, ExtractReason, ExtractTag, NoInfer, ReasonTags, Tags, unassigned } from "./Types.ts";
29
+ import type { Covariant, ExcludeReason, ExcludeTag, ExtractReason, ExtractTag, NarrowReason, NoInfer, OmitReason, ReasonTags, Tags, unassigned } from "./Types.ts";
30
30
  import type * as Unify from "./Unify.ts";
31
- declare const TypeId = "~effect/Stream";
31
+ /**
32
+ * @since 4.0.0
33
+ * @category Type Identifiers
34
+ */
35
+ export type TypeId = "~effect/Stream";
36
+ /**
37
+ * @since 4.0.0
38
+ * @category Type Identifiers
39
+ */
40
+ export declare const TypeId: TypeId;
32
41
  /**
33
42
  * A `Stream<A, E, R>` describes a program that can emit many `A` values, fail
34
43
  * with `E`, and require `R`.
@@ -102,7 +111,7 @@ export interface StreamUnify<A extends {
102
111
  * @category Models
103
112
  * @since 2.0.0
104
113
  */
105
- export interface StreamUnifyIgnore extends Effect.EffectUnifyIgnore {
114
+ export interface StreamUnifyIgnore {
106
115
  Effect?: true;
107
116
  }
108
117
  /**
@@ -401,7 +410,7 @@ export declare const fromEffectSchedule: <A, E, R, X, AS extends A, ES, RS>(effe
401
410
  * @since 2.0.0
402
411
  * @category Constructors
403
412
  */
404
- export declare const tick: (interval: Duration.DurationInput) => Stream<void>;
413
+ export declare const tick: (interval: Duration.Input) => Stream<void>;
405
414
  /**
406
415
  * Creates a stream from a pull effect, such as one produced by `Stream.toPull`.
407
416
  *
@@ -823,6 +832,10 @@ export declare const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, max
823
832
  /**
824
833
  * Creates a new `Stream` from an iterable collection of values.
825
834
  *
835
+ * **Options**
836
+ *
837
+ * - `chunkSize`: Maximum number of values emitted per chunk.
838
+ *
826
839
  * @example
827
840
  * ```ts
828
841
  * import { Console, Effect, Stream } from "effect"
@@ -842,7 +855,9 @@ export declare const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, max
842
855
  * @since 2.0.0
843
856
  * @category Constructors
844
857
  */
845
- export declare const fromIterable: <A>(iterable: Iterable<A>) => Stream<A>;
858
+ export declare const fromIterable: <A>(iterable: Iterable<A>, options?: {
859
+ readonly chunkSize?: number | undefined;
860
+ }) => Stream<A>;
846
861
  /**
847
862
  * Creates a stream from an effect producing an iterable of values.
848
863
  *
@@ -1083,7 +1098,9 @@ export declare const fromPubSubTake: <A, E>(pubsub: PubSub.PubSub<Take.Take<A, E
1083
1098
  *
1084
1099
  * @example
1085
1100
  * ```ts
1086
- * import { Console, Effect, Stream } from "effect"
1101
+ * import { Console, Data, Effect, Stream } from "effect"
1102
+ *
1103
+ * class StreamError extends Data.TaggedError("StreamError")<{ readonly cause: unknown }> {}
1087
1104
  *
1088
1105
  * const readableStream = new ReadableStream({
1089
1106
  * start(controller) {
@@ -1097,7 +1114,7 @@ export declare const fromPubSubTake: <A, E>(pubsub: PubSub.PubSub<Take.Take<A, E
1097
1114
  * const program = Effect.gen(function*() {
1098
1115
  * const stream = Stream.fromReadableStream({
1099
1116
  * evaluate: () => readableStream,
1100
- * onError: (error) => new Error(String(error))
1117
+ * onError: (cause) => new StreamError({ cause })
1101
1118
  * })
1102
1119
  * const values = yield* Stream.runCollect(stream)
1103
1120
  * yield* Console.log(values)
@@ -1120,7 +1137,9 @@ export declare const fromReadableStream: <A, E>(options: {
1120
1137
  *
1121
1138
  * @example
1122
1139
  * ```ts
1123
- * import { Console, Effect, Stream } from "effect"
1140
+ * import { Console, Data, Effect, Stream } from "effect"
1141
+ *
1142
+ * class StreamError extends Data.TaggedError("StreamError")<{ readonly cause: unknown }> {}
1124
1143
  *
1125
1144
  * const iterable = (async function*() {
1126
1145
  * yield 1
@@ -1129,7 +1148,7 @@ export declare const fromReadableStream: <A, E>(options: {
1129
1148
  * })()
1130
1149
  *
1131
1150
  * const program = Effect.gen(function*() {
1132
- * const stream = Stream.fromAsyncIterable(iterable, (error) => new Error(String(error)))
1151
+ * const stream = Stream.fromAsyncIterable(iterable, (cause) => new StreamError({ cause }))
1133
1152
  * const values = yield* Stream.runCollect(stream)
1134
1153
  * yield* Console.log(values)
1135
1154
  * })
@@ -1152,7 +1171,7 @@ export declare const fromAsyncIterable: <A, E>(iterable: AsyncIterable<A>, onErr
1152
1171
  *
1153
1172
  * const program = Effect.gen(function*() {
1154
1173
  * const schedule = Schedule.spaced("50 millis").pipe(
1155
- * Schedule.compose(Schedule.recurs(2))
1174
+ * Schedule.both(Schedule.recurs(2))
1156
1175
  * )
1157
1176
  * const stream = Stream.fromSchedule(schedule)
1158
1177
  * const values = yield* Stream.runCollect(stream)
@@ -2767,7 +2786,7 @@ export declare const timeout: {
2767
2786
  * @since 2.0.0
2768
2787
  * @category Rate Limiting
2769
2788
  */
2770
- (duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
2789
+ (duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
2771
2790
  /**
2772
2791
  * Ends the stream if it does not produce a value within the specified duration.
2773
2792
  *
@@ -2791,7 +2810,29 @@ export declare const timeout: {
2791
2810
  * @since 2.0.0
2792
2811
  * @category Rate Limiting
2793
2812
  */
2794
- <A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>;
2813
+ <A, E, R>(self: Stream<A, E, R>, duration: Duration.Input): Stream<A, E, R>;
2814
+ };
2815
+ /**
2816
+ * @since 2.0.0
2817
+ * @category Rate Limiting
2818
+ */
2819
+ export declare const timeoutOrElse: {
2820
+ /**
2821
+ * @since 2.0.0
2822
+ * @category Rate Limiting
2823
+ */
2824
+ <B, E2, R2>(options: {
2825
+ readonly duration: Duration.Input;
2826
+ readonly orElse: () => Stream<B, E2, R2>;
2827
+ }): <A, E, R>(self: Stream<A, E, R>) => Stream<A | B, E | E2, R | R2>;
2828
+ /**
2829
+ * @since 2.0.0
2830
+ * @category Rate Limiting
2831
+ */
2832
+ <A, E, R, B, E2, R2>(self: Stream<A, E, R>, options: {
2833
+ readonly duration: Duration.Input;
2834
+ readonly orElse: () => Stream<B, E2, R2>;
2835
+ }): Stream<A | B, E | E2, R | R2>;
2795
2836
  };
2796
2837
  /**
2797
2838
  * Repeats each element of the stream according to the provided schedule,
@@ -4775,7 +4816,7 @@ export declare const filter: {
4775
4816
  * @since 2.0.0
4776
4817
  * @category Filtering
4777
4818
  */
4778
- <A, Result extends Filter.ResultOrBool>(filter: Filter.OrPredicate<NoInfer<A>, Result>): <E, R>(self: Stream<A, E, R>) => Stream<Filter.Pass<A, Result>, E, R>;
4819
+ <A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
4779
4820
  /**
4780
4821
  * Filters a stream to the elements that satisfy a predicate.
4781
4822
  *
@@ -4821,20 +4862,38 @@ export declare const filter: {
4821
4862
  * @since 2.0.0
4822
4863
  * @category Filtering
4823
4864
  */
4824
- <A, E, R, Result extends Filter.ResultOrBool>(self: Stream<A, E, R>, filter: Filter.OrPredicate<NoInfer<A>, Result>): Stream<Filter.Pass<A, Result>, E, R>;
4865
+ <A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
4825
4866
  };
4826
4867
  /**
4827
- * Effectfully filters and maps elements in a single pass.
4868
+ * Filters and maps stream elements in one pass using a `Filter`.
4869
+ *
4870
+ * @since 4.0.0
4871
+ * @category Filtering
4872
+ */
4873
+ export declare const filterMap: {
4874
+ /**
4875
+ * Filters and maps stream elements in one pass using a `Filter`.
4876
+ *
4877
+ * @since 4.0.0
4878
+ * @category Filtering
4879
+ */
4880
+ <A, B, X>(filter: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
4881
+ /**
4882
+ * Filters and maps stream elements in one pass using a `Filter`.
4883
+ *
4884
+ * @since 4.0.0
4885
+ * @category Filtering
4886
+ */
4887
+ <A, E, R, B, X>(self: Stream<A, E, R>, filter: Filter.Filter<A, B, X>): Stream<B, E, R>;
4888
+ };
4889
+ /**
4890
+ * Effectfully filters elements in a single pass.
4828
4891
  *
4829
4892
  * @example
4830
4893
  * ```ts
4831
- * import { Console, Effect, Filter, Result, Stream } from "effect"
4832
- *
4833
- * const filter = Filter.makeEffect((n: number) =>
4834
- * Effect.succeed(n > 2 ? Result.succeed(n + 1) : Result.fail(n))
4835
- * )
4894
+ * import { Console, Effect, Stream } from "effect"
4836
4895
  *
4837
- * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect(filter))
4896
+ * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect((n) => Effect.succeed(n > 2)))
4838
4897
  *
4839
4898
  * const program = Effect.gen(function*() {
4840
4899
  * const result = yield* Stream.runCollect(stream)
@@ -4842,7 +4901,7 @@ export declare const filter: {
4842
4901
  * })
4843
4902
  *
4844
4903
  * Effect.runPromise(program)
4845
- * // Output: [ 4, 5 ]
4904
+ * // Output: [ 3, 4 ]
4846
4905
  * ```
4847
4906
  *
4848
4907
  * @since 2.0.0
@@ -4850,17 +4909,13 @@ export declare const filter: {
4850
4909
  */
4851
4910
  export declare const filterEffect: {
4852
4911
  /**
4853
- * Effectfully filters and maps elements in a single pass.
4912
+ * Effectfully filters elements in a single pass.
4854
4913
  *
4855
4914
  * @example
4856
4915
  * ```ts
4857
- * import { Console, Effect, Filter, Result, Stream } from "effect"
4858
- *
4859
- * const filter = Filter.makeEffect((n: number) =>
4860
- * Effect.succeed(n > 2 ? Result.succeed(n + 1) : Result.fail(n))
4861
- * )
4916
+ * import { Console, Effect, Stream } from "effect"
4862
4917
  *
4863
- * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect(filter))
4918
+ * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect((n) => Effect.succeed(n > 2)))
4864
4919
  *
4865
4920
  * const program = Effect.gen(function*() {
4866
4921
  * const result = yield* Stream.runCollect(stream)
@@ -4868,25 +4923,21 @@ export declare const filterEffect: {
4868
4923
  * })
4869
4924
  *
4870
4925
  * Effect.runPromise(program)
4871
- * // Output: [ 4, 5 ]
4926
+ * // Output: [ 3, 4 ]
4872
4927
  * ```
4873
4928
  *
4874
4929
  * @since 2.0.0
4875
4930
  * @category Filtering
4876
4931
  */
4877
- <A, B, X, EX, RX>(filter: Filter.FilterEffect<A, B, X, EX, RX>): <E, R>(self: Stream<A, E, R>) => Stream<B, E | EX, R | RX>;
4932
+ <A, EX, RX>(predicate: (a: NoInfer<A>, i: number) => Effect.Effect<boolean, EX, RX>): <E, R>(self: Stream<A, E, R>) => Stream<A, E | EX, R | RX>;
4878
4933
  /**
4879
- * Effectfully filters and maps elements in a single pass.
4934
+ * Effectfully filters elements in a single pass.
4880
4935
  *
4881
4936
  * @example
4882
4937
  * ```ts
4883
- * import { Console, Effect, Filter, Result, Stream } from "effect"
4884
- *
4885
- * const filter = Filter.makeEffect((n: number) =>
4886
- * Effect.succeed(n > 2 ? Result.succeed(n + 1) : Result.fail(n))
4887
- * )
4938
+ * import { Console, Effect, Stream } from "effect"
4888
4939
  *
4889
- * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect(filter))
4940
+ * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect((n) => Effect.succeed(n > 2)))
4890
4941
  *
4891
4942
  * const program = Effect.gen(function*() {
4892
4943
  * const result = yield* Stream.runCollect(stream)
@@ -4894,28 +4945,48 @@ export declare const filterEffect: {
4894
4945
  * })
4895
4946
  *
4896
4947
  * Effect.runPromise(program)
4897
- * // Output: [ 4, 5 ]
4948
+ * // Output: [ 3, 4 ]
4898
4949
  * ```
4899
4950
  *
4900
4951
  * @since 2.0.0
4901
4952
  * @category Filtering
4902
4953
  */
4954
+ <A, E, R, EX, RX>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, i: number) => Effect.Effect<boolean, EX, RX>): Stream<A, E | EX, R | RX>;
4955
+ };
4956
+ /**
4957
+ * Effectfully filters and maps elements in a single pass.
4958
+ *
4959
+ * @since 4.0.0
4960
+ * @category Filtering
4961
+ */
4962
+ export declare const filterMapEffect: {
4963
+ /**
4964
+ * Effectfully filters and maps elements in a single pass.
4965
+ *
4966
+ * @since 4.0.0
4967
+ * @category Filtering
4968
+ */
4969
+ <A, B, X, EX, RX>(filter: Filter.FilterEffect<NoInfer<A>, B, X, EX, RX>): <E, R>(self: Stream<A, E, R>) => Stream<B, E | EX, R | RX>;
4970
+ /**
4971
+ * Effectfully filters and maps elements in a single pass.
4972
+ *
4973
+ * @since 4.0.0
4974
+ * @category Filtering
4975
+ */
4903
4976
  <A, E, R, B, X, EX, RX>(self: Stream<A, E, R>, filter: Filter.FilterEffect<A, B, X, EX, RX>): Stream<B, E | EX, R | RX>;
4904
4977
  };
4905
4978
  /**
4906
- * Partitions a stream using a Filter and exposes passing and failing values as queues.
4979
+ * Partitions a stream using a `Filter` and exposes passing and failing values as queues.
4907
4980
  *
4908
4981
  * Each queue fails with the stream error or `Cause.Done` when the source ends.
4909
4982
  *
4910
4983
  * @example
4911
4984
  * ```ts
4912
- * import { Console, Effect, Filter, Result, Stream } from "effect"
4985
+ * import { Console, Effect, Result, Stream } from "effect"
4913
4986
  *
4914
4987
  * const program = Effect.gen(function*() {
4915
4988
  * const [passes, fails] = yield* Stream.make(1, 2, 3, 4).pipe(
4916
- * Stream.partitionQueue(
4917
- * Filter.make((n) => (n % 2 === 0 ? Result.succeed(n) : Result.fail(n)))
4918
- * )
4989
+ * Stream.partitionQueue((n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
4919
4990
  * )
4920
4991
  *
4921
4992
  * const passValues = yield* Stream.fromQueue(passes).pipe(Stream.runCollect)
@@ -4935,56 +5006,17 @@ export declare const filterEffect: {
4935
5006
  */
4936
5007
  export declare const partitionQueue: {
4937
5008
  /**
4938
- * Partitions a stream using a Filter and exposes passing and failing values as queues.
5009
+ * Partitions a stream using a `Filter` and exposes passing and failing values as queues.
4939
5010
  *
4940
5011
  * Each queue fails with the stream error or `Cause.Done` when the source ends.
4941
5012
  *
4942
5013
  * @example
4943
5014
  * ```ts
4944
- * import { Console, Effect, Filter, Result, Stream } from "effect"
4945
- *
4946
- * const program = Effect.gen(function*() {
4947
- * const [passes, fails] = yield* Stream.make(1, 2, 3, 4).pipe(
4948
- * Stream.partitionQueue(
4949
- * Filter.make((n) => (n % 2 === 0 ? Result.succeed(n) : Result.fail(n)))
4950
- * )
4951
- * )
4952
- *
4953
- * const passValues = yield* Stream.fromQueue(passes).pipe(Stream.runCollect)
4954
- * const failValues = yield* Stream.fromQueue(fails).pipe(Stream.runCollect)
4955
- *
4956
- * yield* Console.log(passValues)
4957
- * // Output: [ 2, 4 ]
4958
- * yield* Console.log(failValues)
4959
- * // Output: [ 1, 3 ]
4960
- * })
4961
- *
4962
- * Effect.runPromise(Effect.scoped(program))
4963
- * ```
4964
- *
4965
- * @since 4.0.0
4966
- * @category Filtering
4967
- */
4968
- <A, B extends A>(refinement: Refinement<NoInfer<A>, B>, options?: {
4969
- readonly capacity?: number | "unbounded" | undefined;
4970
- }): <E, R>(self: Stream<A, E, R>) => Effect.Effect<[
4971
- passes: Queue.Dequeue<B, E | Cause.Done>,
4972
- fails: Queue.Dequeue<Exclude<A, B>, E | Cause.Done>
4973
- ], never, R | Scope.Scope>;
4974
- /**
4975
- * Partitions a stream using a Filter and exposes passing and failing values as queues.
4976
- *
4977
- * Each queue fails with the stream error or `Cause.Done` when the source ends.
4978
- *
4979
- * @example
4980
- * ```ts
4981
- * import { Console, Effect, Filter, Result, Stream } from "effect"
5015
+ * import { Console, Effect, Result, Stream } from "effect"
4982
5016
  *
4983
5017
  * const program = Effect.gen(function*() {
4984
5018
  * const [passes, fails] = yield* Stream.make(1, 2, 3, 4).pipe(
4985
- * Stream.partitionQueue(
4986
- * Filter.make((n) => (n % 2 === 0 ? Result.succeed(n) : Result.fail(n)))
4987
- * )
5019
+ * Stream.partitionQueue((n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
4988
5020
  * )
4989
5021
  *
4990
5022
  * const passValues = yield* Stream.fromQueue(passes).pipe(Stream.runCollect)
@@ -5002,63 +5034,24 @@ export declare const partitionQueue: {
5002
5034
  * @since 4.0.0
5003
5035
  * @category Filtering
5004
5036
  */
5005
- <A, Result extends Filter.ResultOrBool>(filter: Filter.OrPredicate<NoInfer<A>, Result>, options?: {
5037
+ <A, Pass, Fail>(filter: Filter.Filter<NoInfer<A>, Pass, Fail>, options?: {
5006
5038
  readonly capacity?: number | "unbounded" | undefined;
5007
5039
  }): <E, R>(self: Stream<A, E, R>) => Effect.Effect<[
5008
- passes: Queue.Dequeue<Filter.Pass<A, Result>, E | Cause.Done>,
5009
- fails: Queue.Dequeue<Filter.Fail<A, Result>, E | Cause.Done>
5010
- ], never, R | Scope.Scope>;
5011
- /**
5012
- * Partitions a stream using a Filter and exposes passing and failing values as queues.
5013
- *
5014
- * Each queue fails with the stream error or `Cause.Done` when the source ends.
5015
- *
5016
- * @example
5017
- * ```ts
5018
- * import { Console, Effect, Filter, Result, Stream } from "effect"
5019
- *
5020
- * const program = Effect.gen(function*() {
5021
- * const [passes, fails] = yield* Stream.make(1, 2, 3, 4).pipe(
5022
- * Stream.partitionQueue(
5023
- * Filter.make((n) => (n % 2 === 0 ? Result.succeed(n) : Result.fail(n)))
5024
- * )
5025
- * )
5026
- *
5027
- * const passValues = yield* Stream.fromQueue(passes).pipe(Stream.runCollect)
5028
- * const failValues = yield* Stream.fromQueue(fails).pipe(Stream.runCollect)
5029
- *
5030
- * yield* Console.log(passValues)
5031
- * // Output: [ 2, 4 ]
5032
- * yield* Console.log(failValues)
5033
- * // Output: [ 1, 3 ]
5034
- * })
5035
- *
5036
- * Effect.runPromise(Effect.scoped(program))
5037
- * ```
5038
- *
5039
- * @since 4.0.0
5040
- * @category Filtering
5041
- */
5042
- <A, E, R, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>, options?: {
5043
- readonly capacity?: number | "unbounded" | undefined;
5044
- }): Effect.Effect<[
5045
- passes: Queue.Dequeue<B, E | Cause.Done>,
5046
- fails: Queue.Dequeue<Exclude<A, B>, E | Cause.Done>
5040
+ passes: Queue.Dequeue<Pass, E | Cause.Done>,
5041
+ fails: Queue.Dequeue<Fail, E | Cause.Done>
5047
5042
  ], never, R | Scope.Scope>;
5048
5043
  /**
5049
- * Partitions a stream using a Filter and exposes passing and failing values as queues.
5044
+ * Partitions a stream using a `Filter` and exposes passing and failing values as queues.
5050
5045
  *
5051
5046
  * Each queue fails with the stream error or `Cause.Done` when the source ends.
5052
5047
  *
5053
5048
  * @example
5054
5049
  * ```ts
5055
- * import { Console, Effect, Filter, Result, Stream } from "effect"
5050
+ * import { Console, Effect, Result, Stream } from "effect"
5056
5051
  *
5057
5052
  * const program = Effect.gen(function*() {
5058
5053
  * const [passes, fails] = yield* Stream.make(1, 2, 3, 4).pipe(
5059
- * Stream.partitionQueue(
5060
- * Filter.make((n) => (n % 2 === 0 ? Result.succeed(n) : Result.fail(n)))
5061
- * )
5054
+ * Stream.partitionQueue((n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
5062
5055
  * )
5063
5056
  *
5064
5057
  * const passValues = yield* Stream.fromQueue(passes).pipe(Stream.runCollect)
@@ -5076,119 +5069,49 @@ export declare const partitionQueue: {
5076
5069
  * @since 4.0.0
5077
5070
  * @category Filtering
5078
5071
  */
5079
- <A, E, R, Result extends Filter.ResultOrBool>(self: Stream<A, E, R>, filter: Filter.OrPredicate<NoInfer<A>, Result>, options?: {
5072
+ <A, E, R, Pass, Fail>(self: Stream<A, E, R>, filter: Filter.Filter<NoInfer<A>, Pass, Fail>, options?: {
5080
5073
  readonly capacity?: number | "unbounded" | undefined;
5081
5074
  }): Effect.Effect<[
5082
- passes: Queue.Dequeue<Filter.Pass<A, Result>, E | Cause.Done>,
5083
- fails: Queue.Dequeue<Filter.Fail<A, Result>, E | Cause.Done>
5075
+ passes: Queue.Dequeue<Pass, E | Cause.Done>,
5076
+ fails: Queue.Dequeue<Fail, E | Cause.Done>
5084
5077
  ], never, R | Scope.Scope>;
5085
5078
  };
5086
5079
  /**
5087
- * Splits a stream using an effectful filter, producing pass and fail streams.
5080
+ * Splits a stream using an effectful `Filter`, producing pass and fail streams.
5088
5081
  *
5089
5082
  * @since 4.0.0
5090
5083
  * @category Filtering
5091
- *
5092
- * @example
5093
- * ```ts
5094
- * import { Console, Effect, Result, Stream } from "effect"
5095
- *
5096
- * const program = Effect.scoped(
5097
- * Effect.gen(function*() {
5098
- * const [evens, odds] = yield* Stream.make(1, 2, 3, 4).pipe(
5099
- * Stream.partitionEffect((n) =>
5100
- * Effect.succeed(n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
5101
- * )
5102
- * )
5103
- * const result = yield* Effect.all({
5104
- * evens: Stream.runCollect(evens),
5105
- * odds: Stream.runCollect(odds)
5106
- * })
5107
- * yield* Console.log(result)
5108
- * })
5109
- * )
5110
- *
5111
- * Effect.runPromise(program)
5112
- * // Output: { evens: [ 2, 4 ], odds: [ 1, 3 ] }
5113
- * ```
5114
5084
  */
5115
5085
  export declare const partitionEffect: {
5116
5086
  /**
5117
- * Splits a stream using an effectful filter, producing pass and fail streams.
5087
+ * Splits a stream using an effectful `Filter`, producing pass and fail streams.
5118
5088
  *
5119
5089
  * @since 4.0.0
5120
5090
  * @category Filtering
5121
- *
5122
- * @example
5123
- * ```ts
5124
- * import { Console, Effect, Result, Stream } from "effect"
5125
- *
5126
- * const program = Effect.scoped(
5127
- * Effect.gen(function*() {
5128
- * const [evens, odds] = yield* Stream.make(1, 2, 3, 4).pipe(
5129
- * Stream.partitionEffect((n) =>
5130
- * Effect.succeed(n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
5131
- * )
5132
- * )
5133
- * const result = yield* Effect.all({
5134
- * evens: Stream.runCollect(evens),
5135
- * odds: Stream.runCollect(odds)
5136
- * })
5137
- * yield* Console.log(result)
5138
- * })
5139
- * )
5140
- *
5141
- * Effect.runPromise(program)
5142
- * // Output: { evens: [ 2, 4 ], odds: [ 1, 3 ] }
5143
- * ```
5144
5091
  */
5145
- <A, B, X, EX, RX>(filter: Filter.FilterEffect<A, B, X, EX, RX>, options?: {
5092
+ <A, Pass, Fail, EX, RX>(filter: Filter.FilterEffect<NoInfer<A>, Pass, Fail, EX, RX>, options?: {
5146
5093
  readonly capacity?: number | "unbounded" | undefined;
5147
5094
  readonly concurrency?: number | "unbounded" | undefined;
5148
5095
  }): <E, R>(self: Stream<A, E, R>) => Effect.Effect<[
5149
- passes: Stream<B, E | EX>,
5150
- fails: Stream<X, E | EX>
5096
+ passes: Stream<Pass, E | EX>,
5097
+ fails: Stream<Fail, E | EX>
5151
5098
  ], never, R | RX | Scope.Scope>;
5152
5099
  /**
5153
- * Splits a stream using an effectful filter, producing pass and fail streams.
5100
+ * Splits a stream using an effectful `Filter`, producing pass and fail streams.
5154
5101
  *
5155
5102
  * @since 4.0.0
5156
5103
  * @category Filtering
5157
- *
5158
- * @example
5159
- * ```ts
5160
- * import { Console, Effect, Result, Stream } from "effect"
5161
- *
5162
- * const program = Effect.scoped(
5163
- * Effect.gen(function*() {
5164
- * const [evens, odds] = yield* Stream.make(1, 2, 3, 4).pipe(
5165
- * Stream.partitionEffect((n) =>
5166
- * Effect.succeed(n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
5167
- * )
5168
- * )
5169
- * const result = yield* Effect.all({
5170
- * evens: Stream.runCollect(evens),
5171
- * odds: Stream.runCollect(odds)
5172
- * })
5173
- * yield* Console.log(result)
5174
- * })
5175
- * )
5176
- *
5177
- * Effect.runPromise(program)
5178
- * // Output: { evens: [ 2, 4 ], odds: [ 1, 3 ] }
5179
- * ```
5180
5104
  */
5181
- <A, E, R, B, X, EX, RX>(self: Stream<A, E, R>, filter: Filter.FilterEffect<A, B, X, EX, RX>, options?: {
5105
+ <A, E, R, Pass, Fail, EX, RX>(self: Stream<A, E, R>, filter: Filter.FilterEffect<NoInfer<A>, Pass, Fail, EX, RX>, options?: {
5182
5106
  readonly capacity?: number | "unbounded" | undefined;
5183
5107
  readonly concurrency?: number | "unbounded" | undefined;
5184
5108
  }): Effect.Effect<[
5185
- passes: Stream<B, E | EX>,
5186
- fails: Stream<X, E | EX>
5109
+ passes: Stream<Pass, E | EX>,
5110
+ fails: Stream<Fail, E | EX>
5187
5111
  ], never, R | RX | Scope.Scope>;
5188
5112
  };
5189
5113
  /**
5190
- * Splits a stream into excluded and satisfying substreams using a predicate,
5191
- * refinement, or Filter.
5114
+ * Splits a stream into excluded and satisfying substreams using a `Filter`.
5192
5115
  *
5193
5116
  * The faster stream may advance up to `bufferSize` elements ahead of the slower
5194
5117
  * one.
@@ -5198,12 +5121,12 @@ export declare const partitionEffect: {
5198
5121
  *
5199
5122
  * @example
5200
5123
  * ```ts
5201
- * import { Console, Effect, Stream } from "effect"
5124
+ * import { Console, Effect, Result, Stream } from "effect"
5202
5125
  *
5203
5126
  * const program = Effect.gen(function*() {
5204
5127
  * const [excluded, satisfying] = yield* Stream.partition(
5205
5128
  * Stream.make(1, 2, 3, 4),
5206
- * (n) => n % 2 === 0
5129
+ * (n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n)
5207
5130
  * )
5208
5131
  * const left = yield* Stream.runCollect(excluded)
5209
5132
  * const right = yield* Stream.runCollect(satisfying)
@@ -5216,8 +5139,7 @@ export declare const partitionEffect: {
5216
5139
  */
5217
5140
  export declare const partition: {
5218
5141
  /**
5219
- * Splits a stream into excluded and satisfying substreams using a predicate,
5220
- * refinement, or Filter.
5142
+ * Splits a stream into excluded and satisfying substreams using a `Filter`.
5221
5143
  *
5222
5144
  * The faster stream may advance up to `bufferSize` elements ahead of the slower
5223
5145
  * one.
@@ -5227,46 +5149,12 @@ export declare const partition: {
5227
5149
  *
5228
5150
  * @example
5229
5151
  * ```ts
5230
- * import { Console, Effect, Stream } from "effect"
5231
- *
5232
- * const program = Effect.gen(function*() {
5233
- * const [excluded, satisfying] = yield* Stream.partition(
5234
- * Stream.make(1, 2, 3, 4),
5235
- * (n) => n % 2 === 0
5236
- * )
5237
- * const left = yield* Stream.runCollect(excluded)
5238
- * const right = yield* Stream.runCollect(satisfying)
5239
- * yield* Console.log(left)
5240
- * // Output: [ 1, 3 ]
5241
- * yield* Console.log(right)
5242
- * // Output: [ 2, 4 ]
5243
- * })
5244
- * ```
5245
- */
5246
- <C extends A, B extends A, A = C>(refinement: Refinement<NoInfer<A>, B>, options?: {
5247
- readonly bufferSize?: number | undefined;
5248
- }): <E, R>(self: Stream<C, E, R>) => Effect.Effect<[
5249
- excluded: Stream<Exclude<C, B>, E>,
5250
- satisfying: Stream<B, E>
5251
- ], never, R | Scope.Scope>;
5252
- /**
5253
- * Splits a stream into excluded and satisfying substreams using a predicate,
5254
- * refinement, or Filter.
5255
- *
5256
- * The faster stream may advance up to `bufferSize` elements ahead of the slower
5257
- * one.
5258
- *
5259
- * @since 4.0.0
5260
- * @category Filtering
5261
- *
5262
- * @example
5263
- * ```ts
5264
- * import { Console, Effect, Stream } from "effect"
5152
+ * import { Console, Effect, Result, Stream } from "effect"
5265
5153
  *
5266
5154
  * const program = Effect.gen(function*() {
5267
5155
  * const [excluded, satisfying] = yield* Stream.partition(
5268
5156
  * Stream.make(1, 2, 3, 4),
5269
- * (n) => n % 2 === 0
5157
+ * (n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n)
5270
5158
  * )
5271
5159
  * const left = yield* Stream.runCollect(excluded)
5272
5160
  * const right = yield* Stream.runCollect(satisfying)
@@ -5277,49 +5165,14 @@ export declare const partition: {
5277
5165
  * })
5278
5166
  * ```
5279
5167
  */
5280
- <A, Result extends Filter.ResultOrBool>(filter: Filter.OrPredicate<NoInfer<A>, Result>, options?: {
5168
+ <A, Pass, Fail>(filter: Filter.Filter<NoInfer<A>, Pass, Fail>, options?: {
5281
5169
  readonly bufferSize?: number | undefined;
5282
5170
  }): <E, R>(self: Stream<A, E, R>) => Effect.Effect<[
5283
- excluded: Stream<Filter.Fail<A, Result>, E>,
5284
- satisfying: Stream<Filter.Pass<A, Result>, E>
5285
- ], never, R | Scope.Scope>;
5286
- /**
5287
- * Splits a stream into excluded and satisfying substreams using a predicate,
5288
- * refinement, or Filter.
5289
- *
5290
- * The faster stream may advance up to `bufferSize` elements ahead of the slower
5291
- * one.
5292
- *
5293
- * @since 4.0.0
5294
- * @category Filtering
5295
- *
5296
- * @example
5297
- * ```ts
5298
- * import { Console, Effect, Stream } from "effect"
5299
- *
5300
- * const program = Effect.gen(function*() {
5301
- * const [excluded, satisfying] = yield* Stream.partition(
5302
- * Stream.make(1, 2, 3, 4),
5303
- * (n) => n % 2 === 0
5304
- * )
5305
- * const left = yield* Stream.runCollect(excluded)
5306
- * const right = yield* Stream.runCollect(satisfying)
5307
- * yield* Console.log(left)
5308
- * // Output: [ 1, 3 ]
5309
- * yield* Console.log(right)
5310
- * // Output: [ 2, 4 ]
5311
- * })
5312
- * ```
5313
- */
5314
- <C extends A, E, R, B extends A, A = C>(self: Stream<C, E, R>, refinement: Refinement<A, B>, options?: {
5315
- readonly bufferSize?: number | undefined;
5316
- }): Effect.Effect<[
5317
- excluded: Stream<Exclude<C, B>, E>,
5318
- satisfying: Stream<B, E>
5171
+ excluded: Stream<Fail, E>,
5172
+ satisfying: Stream<Pass, E>
5319
5173
  ], never, R | Scope.Scope>;
5320
5174
  /**
5321
- * Splits a stream into excluded and satisfying substreams using a predicate,
5322
- * refinement, or Filter.
5175
+ * Splits a stream into excluded and satisfying substreams using a `Filter`.
5323
5176
  *
5324
5177
  * The faster stream may advance up to `bufferSize` elements ahead of the slower
5325
5178
  * one.
@@ -5329,12 +5182,12 @@ export declare const partition: {
5329
5182
  *
5330
5183
  * @example
5331
5184
  * ```ts
5332
- * import { Console, Effect, Stream } from "effect"
5185
+ * import { Console, Effect, Result, Stream } from "effect"
5333
5186
  *
5334
5187
  * const program = Effect.gen(function*() {
5335
5188
  * const [excluded, satisfying] = yield* Stream.partition(
5336
5189
  * Stream.make(1, 2, 3, 4),
5337
- * (n) => n % 2 === 0
5190
+ * (n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n)
5338
5191
  * )
5339
5192
  * const left = yield* Stream.runCollect(excluded)
5340
5193
  * const right = yield* Stream.runCollect(satisfying)
@@ -5345,11 +5198,11 @@ export declare const partition: {
5345
5198
  * })
5346
5199
  * ```
5347
5200
  */
5348
- <A, E, R, Result extends Filter.ResultOrBool>(self: Stream<A, E, R>, filter: Filter.OrPredicate<NoInfer<A>, Result>, options?: {
5201
+ <A, E, R, Pass, Fail>(self: Stream<A, E, R>, filter: Filter.Filter<NoInfer<A>, Pass, Fail>, options?: {
5349
5202
  readonly bufferSize?: number | undefined;
5350
5203
  }): Effect.Effect<[
5351
- excluded: Stream<Filter.Fail<A, Result>, E>,
5352
- satisfying: Stream<Filter.Pass<A, Result>, E>
5204
+ excluded: Stream<Fail, E>,
5205
+ satisfying: Stream<Pass, E>
5353
5206
  ], never, R | Scope.Scope>;
5354
5207
  };
5355
5208
  /**
@@ -6043,7 +5896,7 @@ export declare const tapError: {
6043
5896
  <A, E, R, A2, E2, R2>(self: Stream<A, E, R>, f: (error: E) => Effect.Effect<A2, E2, R2>): Stream<A, E | E2, R | R2>;
6044
5897
  };
6045
5898
  /**
6046
- * Recovers from errors that match a filter by switching to a recovery stream.
5899
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6047
5900
  *
6048
5901
  * When a failure matches the filter, the stream switches to the recovery
6049
5902
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6057,12 +5910,12 @@ export declare const tapError: {
6057
5910
  *
6058
5911
  * @example
6059
5912
  * ```ts
6060
- * import { Console, Effect, Filter, Stream } from "effect"
5913
+ * import { Console, Effect, Stream } from "effect"
6061
5914
  *
6062
5915
  * const stream = Stream.make(1, 2).pipe(
6063
5916
  * Stream.concat(Stream.fail(42)),
6064
5917
  * Stream.catchIf(
6065
- * Filter.fromPredicate((error): error is 42 => error === 42),
5918
+ * (error): error is 42 => error === 42,
6066
5919
  * () => Stream.make(999)
6067
5920
  * )
6068
5921
  * )
@@ -6081,7 +5934,7 @@ export declare const tapError: {
6081
5934
  */
6082
5935
  export declare const catchIf: {
6083
5936
  /**
6084
- * Recovers from errors that match a filter by switching to a recovery stream.
5937
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6085
5938
  *
6086
5939
  * When a failure matches the filter, the stream switches to the recovery
6087
5940
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6095,12 +5948,12 @@ export declare const catchIf: {
6095
5948
  *
6096
5949
  * @example
6097
5950
  * ```ts
6098
- * import { Console, Effect, Filter, Stream } from "effect"
5951
+ * import { Console, Effect, Stream } from "effect"
6099
5952
  *
6100
5953
  * const stream = Stream.make(1, 2).pipe(
6101
5954
  * Stream.concat(Stream.fail(42)),
6102
5955
  * Stream.catchIf(
6103
- * Filter.fromPredicate((error): error is 42 => error === 42),
5956
+ * (error): error is 42 => error === 42,
6104
5957
  * () => Stream.make(999)
6105
5958
  * )
6106
5959
  * )
@@ -6119,7 +5972,7 @@ export declare const catchIf: {
6119
5972
  */
6120
5973
  <E, EB extends E, A2, E2, R2, A3 = never, E3 = Exclude<E, EB>, R3 = never>(refinement: Refinement<NoInfer<E>, EB>, f: (e: EB) => Stream<A2, E2, R2>, orElse?: ((e: Exclude<E, EB>) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A2 | A | A3, E2 | E3, R2 | R | R3>;
6121
5974
  /**
6122
- * Recovers from errors that match a filter by switching to a recovery stream.
5975
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6123
5976
  *
6124
5977
  * When a failure matches the filter, the stream switches to the recovery
6125
5978
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6133,12 +5986,12 @@ export declare const catchIf: {
6133
5986
  *
6134
5987
  * @example
6135
5988
  * ```ts
6136
- * import { Console, Effect, Filter, Stream } from "effect"
5989
+ * import { Console, Effect, Stream } from "effect"
6137
5990
  *
6138
5991
  * const stream = Stream.make(1, 2).pipe(
6139
5992
  * Stream.concat(Stream.fail(42)),
6140
5993
  * Stream.catchIf(
6141
- * Filter.fromPredicate((error): error is 42 => error === 42),
5994
+ * (error): error is 42 => error === 42,
6142
5995
  * () => Stream.make(999)
6143
5996
  * )
6144
5997
  * )
@@ -6155,9 +6008,9 @@ export declare const catchIf: {
6155
6008
  * @since 4.0.0
6156
6009
  * @category Error Handling
6157
6010
  */
6158
- <E, Result extends Filter.ResultOrBool, A2, E2, R2, A3 = never, E3 = Filter.Fail<E, Result>, R3 = never>(filter: Filter.OrPredicate<NoInfer<E>, Result>, f: (failure: Filter.Pass<E, Result>) => Stream<A2, E2, R2>, orElse?: ((failure: Filter.Fail<E, Result>) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | A3, E2 | E3, R | R2 | R3>;
6011
+ <E, A2, E2, R2, A3 = never, E3 = E, R3 = never>(predicate: Predicate<NoInfer<E>>, f: (e: NoInfer<E>) => Stream<A2, E2, R2>, orElse?: ((e: NoInfer<E>) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A2 | A | A3, E2 | E3, R2 | R | R3>;
6159
6012
  /**
6160
- * Recovers from errors that match a filter by switching to a recovery stream.
6013
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6161
6014
  *
6162
6015
  * When a failure matches the filter, the stream switches to the recovery
6163
6016
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6171,12 +6024,12 @@ export declare const catchIf: {
6171
6024
  *
6172
6025
  * @example
6173
6026
  * ```ts
6174
- * import { Console, Effect, Filter, Stream } from "effect"
6027
+ * import { Console, Effect, Stream } from "effect"
6175
6028
  *
6176
6029
  * const stream = Stream.make(1, 2).pipe(
6177
6030
  * Stream.concat(Stream.fail(42)),
6178
6031
  * Stream.catchIf(
6179
- * Filter.fromPredicate((error): error is 42 => error === 42),
6032
+ * (error): error is 42 => error === 42,
6180
6033
  * () => Stream.make(999)
6181
6034
  * )
6182
6035
  * )
@@ -6195,7 +6048,7 @@ export declare const catchIf: {
6195
6048
  */
6196
6049
  <A, E, R, EB extends E, A2, E2, R2, A3 = never, E3 = Exclude<E, EB>, R3 = never>(self: Stream<A, E, R>, refinement: Refinement<E, EB>, f: (e: EB) => Stream<A2, E2, R2>, orElse?: ((e: Exclude<E, EB>) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | A3, E2 | E3, R | R2 | R3>;
6197
6050
  /**
6198
- * Recovers from errors that match a filter by switching to a recovery stream.
6051
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6199
6052
  *
6200
6053
  * When a failure matches the filter, the stream switches to the recovery
6201
6054
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6209,12 +6062,12 @@ export declare const catchIf: {
6209
6062
  *
6210
6063
  * @example
6211
6064
  * ```ts
6212
- * import { Console, Effect, Filter, Stream } from "effect"
6065
+ * import { Console, Effect, Stream } from "effect"
6213
6066
  *
6214
6067
  * const stream = Stream.make(1, 2).pipe(
6215
6068
  * Stream.concat(Stream.fail(42)),
6216
6069
  * Stream.catchIf(
6217
- * Filter.fromPredicate((error): error is 42 => error === 42),
6070
+ * (error): error is 42 => error === 42,
6218
6071
  * () => Stream.make(999)
6219
6072
  * )
6220
6073
  * )
@@ -6231,7 +6084,32 @@ export declare const catchIf: {
6231
6084
  * @since 4.0.0
6232
6085
  * @category Error Handling
6233
6086
  */
6234
- <A, E, R, Result extends Filter.ResultOrBool, A2, E2, R2, A3 = never, E3 = Filter.Fail<E, Result>, R3 = never>(self: Stream<A, E, R>, filter: Filter.OrPredicate<NoInfer<E>, Result>, f: (failure: Filter.Pass<E, Result>) => Stream<A2, E2, R2>, orElse?: ((failure: Filter.Fail<E, Result>) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | A3, E2 | E3, R | R2 | R3>;
6087
+ <A, E, R, A2, E2, R2, A3 = never, E3 = E, R3 = never>(self: Stream<A, E, R>, predicate: Predicate<E>, f: (e: E) => Stream<A2, E2, R2>, orElse?: ((e: E) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | A3, E2 | E3, R | R2 | R3>;
6088
+ };
6089
+ /**
6090
+ * Recovers from errors that match a `Filter` by switching to a recovery
6091
+ * stream.
6092
+ *
6093
+ * @since 4.0.0
6094
+ * @category Error Handling
6095
+ */
6096
+ export declare const catchFilter: {
6097
+ /**
6098
+ * Recovers from errors that match a `Filter` by switching to a recovery
6099
+ * stream.
6100
+ *
6101
+ * @since 4.0.0
6102
+ * @category Error Handling
6103
+ */
6104
+ <E, EB, A2, E2, R2, X, A3 = never, E3 = X, R3 = never>(filter: Filter.Filter<NoInfer<E>, EB, X>, f: (failure: EB) => Stream<A2, E2, R2>, orElse?: ((failure: X) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | A3, E2 | E3, R | R2 | R3>;
6105
+ /**
6106
+ * Recovers from errors that match a `Filter` by switching to a recovery
6107
+ * stream.
6108
+ *
6109
+ * @since 4.0.0
6110
+ * @category Error Handling
6111
+ */
6112
+ <A, E, R, EB, A2, E2, R2, X, A3 = never, E3 = X, R3 = never>(self: Stream<A, E, R>, filter: Filter.Filter<NoInfer<E>, EB, X>, f: (failure: EB) => Stream<A2, E2, R2>, orElse?: ((failure: X) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | A3, E2 | E3, R | R2 | R3>;
6235
6113
  };
6236
6114
  /**
6237
6115
  * Recovers from failures whose `_tag` matches the provided value by switching to
@@ -6567,7 +6445,7 @@ export declare const catchReason: {
6567
6445
  * @since 4.0.0
6568
6446
  * @category Error Handling
6569
6447
  */
6570
- <K extends Tags<E>, E, RK extends ReasonTags<ExtractTag<NoInfer<E>, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<A2, E2, R2>, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | Exclude<A3, unassigned>, (A3 extends unassigned ? E : ExcludeTag<E, K>) | E2 | E3, R | R2 | R3>;
6448
+ <K extends Tags<E>, E, RK extends ReasonTags<ExtractTag<NoInfer<E>, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<NoInfer<E>, K>, RK>, error: NarrowReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<A2, E2, R2>, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, RK>, error: OmitReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<A3, E3, R3>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | A2 | Exclude<A3, unassigned>, (A3 extends unassigned ? E : ExcludeTag<E, K>) | E2 | E3, R | R2 | R3>;
6571
6449
  /**
6572
6450
  * Catches a specific reason within a tagged error.
6573
6451
  *
@@ -6611,7 +6489,7 @@ export declare const catchReason: {
6611
6489
  * @since 4.0.0
6612
6490
  * @category Error Handling
6613
6491
  */
6614
- <A, E, R, K extends Tags<E>, RK extends ReasonTags<ExtractTag<E, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(self: Stream<A, E, R>, errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<E, K>, RK>) => Stream<A2, E2, R2>, orElse?: ((reason: ExcludeReason<ExtractTag<E, K>, RK>) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | Exclude<A3, unassigned>, (A3 extends unassigned ? E : ExcludeTag<E, K>) | E2 | E3, R | R2 | R3>;
6492
+ <A, E, R, K extends Tags<E>, RK extends ReasonTags<ExtractTag<E, K>>, A2, E2, R2, A3 = unassigned, E3 = never, R3 = never>(self: Stream<A, E, R>, errorTag: K, reasonTag: RK, f: (reason: ExtractReason<ExtractTag<E, K>, RK>, error: NarrowReason<ExtractTag<E, K>, RK>) => Stream<A2, E2, R2>, orElse?: ((reason: ExcludeReason<ExtractTag<E, K>, RK>, error: OmitReason<ExtractTag<E, K>, RK>) => Stream<A3, E3, R3>) | undefined): Stream<A | A2 | Exclude<A3, unassigned>, (A3 extends unassigned ? E : ExcludeTag<E, K>) | E2 | E3, R | R2 | R3>;
6615
6493
  };
6616
6494
  /**
6617
6495
  * Catches multiple reasons within a tagged error using an object of handlers.
@@ -6697,8 +6575,8 @@ export declare const catchReasons: {
6697
6575
  * @category Error Handling
6698
6576
  */
6699
6577
  <K extends Tags<E>, E, Cases extends {
6700
- [RK in ReasonTags<ExtractTag<NoInfer<E>, K>>]+?: (reason: ExtractReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<any, any, any>;
6701
- }, A2 = unassigned, E2 = never, R2 = never>(errorTag: K, cases: Cases, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>) => Stream<A2, E2, R2>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | Exclude<A2, unassigned> | {
6578
+ [RK in ReasonTags<ExtractTag<NoInfer<E>, K>>]+?: (reason: ExtractReason<ExtractTag<NoInfer<E>, K>, RK>, error: NarrowReason<ExtractTag<NoInfer<E>, K>, RK>) => Stream<any, any, any>;
6579
+ }, A2 = unassigned, E2 = never, R2 = never>(errorTag: K, cases: Cases, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>, error: OmitReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>) => Stream<A2, E2, R2>) | undefined): <A, R>(self: Stream<A, E, R>) => Stream<A | Exclude<A2, unassigned> | {
6702
6580
  [RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<infer A, any, any> ? A : never;
6703
6581
  }[keyof Cases], (A2 extends unassigned ? E : ExcludeTag<E, K>) | E2 | {
6704
6582
  [RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, infer E, any> ? E : never;
@@ -6747,8 +6625,8 @@ export declare const catchReasons: {
6747
6625
  * @category Error Handling
6748
6626
  */
6749
6627
  <A, E, R, K extends Tags<E>, Cases extends {
6750
- [RK in ReasonTags<ExtractTag<E, K>>]+?: (reason: ExtractReason<ExtractTag<E, K>, RK>) => Stream<any, any, any>;
6751
- }, A2 = unassigned, E2 = never, R2 = never>(self: Stream<A, E, R>, errorTag: K, cases: Cases, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>) => Stream<A2, E2, R2>) | undefined): Stream<A | Exclude<A2, unassigned> | {
6628
+ [RK in ReasonTags<ExtractTag<E, K>>]+?: (reason: ExtractReason<ExtractTag<E, K>, RK>, error: NarrowReason<ExtractTag<E, K>, RK>) => Stream<any, any, any>;
6629
+ }, A2 = unassigned, E2 = never, R2 = never>(self: Stream<A, E, R>, errorTag: K, cases: Cases, orElse?: ((reason: ExcludeReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>, error: OmitReason<ExtractTag<NoInfer<E>, K>, Extract<keyof Cases, string>>) => Stream<A2, E2, R2>) | undefined): Stream<A | Exclude<A2, unassigned> | {
6752
6630
  [RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<infer A, any, any> ? A : never;
6753
6631
  }[keyof Cases], (A2 extends unassigned ? E : ExcludeTag<E, K>) | E2 | {
6754
6632
  [RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, infer E, any> ? E : never;
@@ -6896,7 +6774,7 @@ export declare const catchCauseIf: {
6896
6774
  * @since 4.0.0
6897
6775
  * @category Error Handling
6898
6776
  */
6899
- <E, Result extends Filter.ResultOrBool<Cause.Cause<any>>, A2, E2, R2>(filter: Filter.OrPredicate<Cause.Cause<E>, Result>, f: (failure: Filter.Pass<Cause.Cause<E>, Result>, cause: Cause.Cause<E>) => Stream<A2, E2, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A | A2, Cause.Cause.Error<Filter.Fail<Cause.Cause<E>, Result>> | E2, R2 | R>;
6777
+ <E, A2, E2, R2>(predicate: Predicate<Cause.Cause<E>>, f: (cause: Cause.Cause<E>) => Stream<A2, E2, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A | A2, E | E2, R2 | R>;
6900
6778
  /**
6901
6779
  * Recovers from stream failures by filtering the `Cause` and switching to a recovery stream.
6902
6780
  * Non-matching causes are re-emitted as failures.
@@ -6930,7 +6808,32 @@ export declare const catchCauseIf: {
6930
6808
  * @since 4.0.0
6931
6809
  * @category Error Handling
6932
6810
  */
6933
- <A, E, R, A2, E2, R2, Result extends Filter.ResultOrBool<Cause.Cause<any>>>(self: Stream<A, E, R>, filter: Filter.OrPredicate<Cause.Cause<E>, Result>, f: (failure: Filter.Pass<Cause.Cause<E>, Result>, cause: Cause.Cause<E>) => Stream<A2, E2, R2>): Stream<A | A2, Cause.Cause.Error<Filter.Fail<Cause.Cause<E>, Result>> | E2, R | R2>;
6811
+ <A, E, R, A2, E2, R2>(self: Stream<A, E, R>, predicate: Predicate<Cause.Cause<E>>, f: (cause: Cause.Cause<E>) => Stream<A2, E2, R2>): Stream<A | A2, E | E2, R | R2>;
6812
+ };
6813
+ /**
6814
+ * Recovers from stream failures by filtering the `Cause` and switching to a
6815
+ * recovery stream.
6816
+ *
6817
+ * @since 4.0.0
6818
+ * @category Error Handling
6819
+ */
6820
+ export declare const catchCauseFilter: {
6821
+ /**
6822
+ * Recovers from stream failures by filtering the `Cause` and switching to a
6823
+ * recovery stream.
6824
+ *
6825
+ * @since 4.0.0
6826
+ * @category Error Handling
6827
+ */
6828
+ <E, EB, A2, E2, R2, X extends Cause.Cause<any>>(filter: Filter.Filter<Cause.Cause<E>, EB, X>, f: (failure: EB, cause: Cause.Cause<E>) => Stream<A2, E2, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A | A2, Cause.Cause.Error<X> | E2, R2 | R>;
6829
+ /**
6830
+ * Recovers from stream failures by filtering the `Cause` and switching to a
6831
+ * recovery stream.
6832
+ *
6833
+ * @since 4.0.0
6834
+ * @category Error Handling
6835
+ */
6836
+ <A, E, R, EB, A2, E2, R2, X extends Cause.Cause<any>>(self: Stream<A, E, R>, filter: Filter.Filter<Cause.Cause<E>, EB, X>, f: (failure: EB, cause: Cause.Cause<E>) => Stream<A2, E2, R2>): Stream<A | A2, Cause.Cause.Error<X> | E2, R | R2>;
6934
6837
  };
6935
6838
  /**
6936
6839
  * Switches to a fallback stream if this stream is empty.
@@ -7134,9 +7037,9 @@ export declare const orDie: <A, E, R>(self: Stream<A, E, R>) => Stream<A, never,
7134
7037
  * @category Error Handling
7135
7038
  */
7136
7039
  export declare const ignore: <Arg extends Stream<any, any, any> | {
7137
- readonly log?: boolean | LogLevel | undefined;
7040
+ readonly log?: boolean | Severity | undefined;
7138
7041
  } | undefined>(selfOrOptions: Arg, options?: {
7139
- readonly log?: boolean | LogLevel | undefined;
7042
+ readonly log?: boolean | Severity | undefined;
7140
7043
  } | undefined) => [Arg] extends [Stream<infer A, infer _E, infer R>] ? Stream<A, never, R> : <A, E, R>(self: Stream<A, E, R>) => Stream<A, never, R>;
7141
7044
  /**
7142
7045
  * Ignores the stream's failure cause, including defects, and ends the stream.
@@ -7159,9 +7062,9 @@ export declare const ignore: <Arg extends Stream<any, any, any> | {
7159
7062
  * @category Error Handling
7160
7063
  */
7161
7064
  export declare const ignoreCause: <Arg extends Stream<any, any, any> | {
7162
- readonly log?: boolean | LogLevel | undefined;
7065
+ readonly log?: boolean | Severity | undefined;
7163
7066
  } | undefined>(streamOrOptions: Arg, options?: {
7164
- readonly log?: boolean | LogLevel | undefined;
7067
+ readonly log?: boolean | Severity | undefined;
7165
7068
  } | undefined) => [Arg] extends [Stream<infer A, infer _E, infer R>] ? Stream<A, never, R> : <A, E, R>(self: Stream<A, E, R>) => Stream<A, never, R>;
7166
7069
  /**
7167
7070
  * When the stream fails, retry it according to the given schedule.
@@ -7811,7 +7714,7 @@ export declare const takeWhile: {
7811
7714
  * @since 2.0.0
7812
7715
  * @category Filtering
7813
7716
  */
7814
- <A, B, X>(f: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
7717
+ <A, E, R, B extends A>(self: Stream<A, E, R>, refinement: (a: NoInfer<A>, n: number) => a is B): Stream<B, E, R>;
7815
7718
  /**
7816
7719
  * Takes the longest initial prefix of elements that satisfy the predicate.
7817
7720
  *
@@ -7835,52 +7738,26 @@ export declare const takeWhile: {
7835
7738
  * @since 2.0.0
7836
7739
  * @category Filtering
7837
7740
  */
7838
- <A, E, R, B extends A>(self: Stream<A, E, R>, refinement: (a: NoInfer<A>, n: number) => a is B): Stream<B, E, R>;
7741
+ <A, E, R>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, n: number) => boolean): Stream<A, E, R>;
7742
+ };
7743
+ /**
7744
+ * Takes the longest initial prefix of elements that satisfy the filter.
7745
+ *
7746
+ * @since 4.0.0
7747
+ * @category Filtering
7748
+ */
7749
+ export declare const takeWhileFilter: {
7839
7750
  /**
7840
- * Takes the longest initial prefix of elements that satisfy the predicate.
7841
- *
7842
- * @example
7843
- * ```ts
7844
- * import { Console, Effect, Stream } from "effect"
7845
- *
7846
- * const stream = Stream.range(1, 5).pipe(
7847
- * Stream.takeWhile((n) => n % 3 !== 0)
7848
- * )
7849
- *
7850
- * const program = Effect.gen(function*() {
7851
- * const result = yield* Stream.runCollect(stream)
7852
- * yield* Console.log(result)
7853
- * })
7854
- *
7855
- * Effect.runPromise(program)
7856
- * // Output: [ 1, 2 ]
7857
- * ```
7751
+ * Takes the longest initial prefix of elements that satisfy the filter.
7858
7752
  *
7859
- * @since 2.0.0
7753
+ * @since 4.0.0
7860
7754
  * @category Filtering
7861
7755
  */
7862
- <A, E, R>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, n: number) => boolean): Stream<A, E, R>;
7756
+ <A, B, X>(f: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
7863
7757
  /**
7864
- * Takes the longest initial prefix of elements that satisfy the predicate.
7865
- *
7866
- * @example
7867
- * ```ts
7868
- * import { Console, Effect, Stream } from "effect"
7869
- *
7870
- * const stream = Stream.range(1, 5).pipe(
7871
- * Stream.takeWhile((n) => n % 3 !== 0)
7872
- * )
7873
- *
7874
- * const program = Effect.gen(function*() {
7875
- * const result = yield* Stream.runCollect(stream)
7876
- * yield* Console.log(result)
7877
- * })
7878
- *
7879
- * Effect.runPromise(program)
7880
- * // Output: [ 1, 2 ]
7881
- * ```
7758
+ * Takes the longest initial prefix of elements that satisfy the filter.
7882
7759
  *
7883
- * @since 2.0.0
7760
+ * @since 4.0.0
7884
7761
  * @category Filtering
7885
7762
  */
7886
7763
  <A, E, R, B, X>(self: Stream<A, E, R>, f: Filter.Filter<NoInfer<A>, B, X>): Stream<B, E, R>;
@@ -8236,53 +8113,29 @@ export declare const dropWhile: {
8236
8113
  * @since 2.0.0
8237
8114
  * @category Filtering
8238
8115
  */
8239
- <A, B, X>(f: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
8116
+ <A, E, R>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, index: number) => boolean): Stream<A, E, R>;
8117
+ };
8118
+ /**
8119
+ * Drops elements while the filter succeeds.
8120
+ *
8121
+ * @since 4.0.0
8122
+ * @category Filtering
8123
+ */
8124
+ export declare const dropWhileFilter: {
8240
8125
  /**
8241
- * Drops elements from the stream while the specified predicate evaluates to `true`.
8242
- *
8243
- * @example
8244
- * ```ts
8245
- * import { Console, Effect, Stream } from "effect"
8246
- *
8247
- * const program = Effect.gen(function*() {
8248
- * const values = yield* Stream.make(1, 2, 3, 4, 5).pipe(
8249
- * Stream.dropWhile((n) => n < 3),
8250
- * Stream.runCollect
8251
- * )
8252
- * yield* Console.log(values)
8253
- * })
8254
- *
8255
- * Effect.runPromise(program)
8256
- * // Output: [ 3, 4, 5 ]
8257
- * ```
8126
+ * Drops elements while the filter succeeds.
8258
8127
  *
8259
- * @since 2.0.0
8128
+ * @since 4.0.0
8260
8129
  * @category Filtering
8261
8130
  */
8262
- <A, E, R>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, index: number) => boolean): Stream<A, E, R>;
8131
+ <A, B, X>(filter: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
8263
8132
  /**
8264
- * Drops elements from the stream while the specified predicate evaluates to `true`.
8265
- *
8266
- * @example
8267
- * ```ts
8268
- * import { Console, Effect, Stream } from "effect"
8269
- *
8270
- * const program = Effect.gen(function*() {
8271
- * const values = yield* Stream.make(1, 2, 3, 4, 5).pipe(
8272
- * Stream.dropWhile((n) => n < 3),
8273
- * Stream.runCollect
8274
- * )
8275
- * yield* Console.log(values)
8276
- * })
8133
+ * Drops elements while the filter succeeds.
8277
8134
  *
8278
- * Effect.runPromise(program)
8279
- * // Output: [ 3, 4, 5 ]
8280
- * ```
8281
- *
8282
- * @since 2.0.0
8135
+ * @since 4.0.0
8283
8136
  * @category Filtering
8284
8137
  */
8285
- <A, E, R, B, X>(self: Stream<A, E, R>, f: Filter.Filter<NoInfer<A>, B, X>): Stream<A, E, R>;
8138
+ <A, E, R, B, X>(self: Stream<A, E, R>, filter: Filter.Filter<NoInfer<A>, B, X>): Stream<A, E, R>;
8286
8139
  };
8287
8140
  /**
8288
8141
  * Drops elements while the specified effectful predicate evaluates to `true`.
@@ -9557,7 +9410,7 @@ export declare const debounce: {
9557
9410
  * @since 2.0.0
9558
9411
  * @category Rate Limiting
9559
9412
  */
9560
- (duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
9413
+ (duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
9561
9414
  /**
9562
9415
  * Drops earlier elements within the debounce window and emits only the latest element after the pause.
9563
9416
  *
@@ -9581,7 +9434,7 @@ export declare const debounce: {
9581
9434
  * @since 2.0.0
9582
9435
  * @category Rate Limiting
9583
9436
  */
9584
- <A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>;
9437
+ <A, E, R>(self: Stream<A, E, R>, duration: Duration.Input): Stream<A, E, R>;
9585
9438
  };
9586
9439
  /**
9587
9440
  * Delays the arrays of this stream according to the given bandwidth
@@ -9659,7 +9512,7 @@ export declare const throttleEffect: {
9659
9512
  <A, E2, R2>(options: {
9660
9513
  readonly cost: (arr: Arr.NonEmptyReadonlyArray<A>) => Effect.Effect<number, E2, R2>;
9661
9514
  readonly units: number;
9662
- readonly duration: Duration.DurationInput;
9515
+ readonly duration: Duration.Input;
9663
9516
  readonly burst?: number | undefined;
9664
9517
  readonly strategy?: "enforce" | "shape" | undefined;
9665
9518
  }): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
@@ -9702,7 +9555,7 @@ export declare const throttleEffect: {
9702
9555
  <A, E, R, E2, R2>(self: Stream<A, E, R>, options: {
9703
9556
  readonly cost: (arr: Arr.NonEmptyReadonlyArray<A>) => Effect.Effect<number, E2, R2>;
9704
9557
  readonly units: number;
9705
- readonly duration: Duration.DurationInput;
9558
+ readonly duration: Duration.Input;
9706
9559
  readonly burst?: number | undefined;
9707
9560
  readonly strategy?: "enforce" | "shape" | undefined;
9708
9561
  }): Stream<A, E | E2, R | R2>;
@@ -9781,7 +9634,7 @@ export declare const throttle: {
9781
9634
  <A>(options: {
9782
9635
  readonly cost: (arr: Arr.NonEmptyReadonlyArray<A>) => number;
9783
9636
  readonly units: number;
9784
- readonly duration: Duration.DurationInput;
9637
+ readonly duration: Duration.Input;
9785
9638
  readonly burst?: number | undefined;
9786
9639
  readonly strategy?: "enforce" | "shape" | undefined;
9787
9640
  }): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
@@ -9823,7 +9676,7 @@ export declare const throttle: {
9823
9676
  <A, E, R>(self: Stream<A, E, R>, options: {
9824
9677
  readonly cost: (arr: Arr.NonEmptyReadonlyArray<A>) => number;
9825
9678
  readonly units: number;
9826
- readonly duration: Duration.DurationInput;
9679
+ readonly duration: Duration.Input;
9827
9680
  readonly burst?: number | undefined;
9828
9681
  readonly strategy?: "enforce" | "shape" | undefined;
9829
9682
  }): Stream<A, E, R>;
@@ -9951,7 +9804,7 @@ export declare const groupedWithin: {
9951
9804
  * @since 2.0.0
9952
9805
  * @category Grouping
9953
9806
  */
9954
- (chunkSize: number, duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<Array<A>, E, R>;
9807
+ (chunkSize: number, duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<Array<A>, E, R>;
9955
9808
  /**
9956
9809
  * Partitions the stream into arrays, emitting when the chunk size is reached
9957
9810
  * or the duration passes.
@@ -9975,7 +9828,7 @@ export declare const groupedWithin: {
9975
9828
  * @since 2.0.0
9976
9829
  * @category Grouping
9977
9830
  */
9978
- <A, E, R>(self: Stream<A, E, R>, chunkSize: number, duration: Duration.DurationInput): Stream<Array<A>, E, R>;
9831
+ <A, E, R>(self: Stream<A, E, R>, chunkSize: number, duration: Duration.Input): Stream<Array<A>, E, R>;
9979
9832
  };
9980
9833
  /**
9981
9834
  * Groups elements into keyed substreams using an effectful classifier.
@@ -10042,7 +9895,7 @@ export declare const groupBy: {
10042
9895
  */
10043
9896
  <A, K, V, E2, R2>(f: (a: NoInfer<A>) => Effect.Effect<readonly [K, V], E2, R2>, options?: {
10044
9897
  readonly bufferSize?: number | undefined;
10045
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
9898
+ readonly idleTimeToLive?: Duration.Input | undefined;
10046
9899
  }): <E, R>(self: Stream<A, E, R>) => Stream<readonly [K, Stream<V>], E | E2, R | R2>;
10047
9900
  /**
10048
9901
  * Groups elements into keyed substreams using an effectful classifier.
@@ -10077,7 +9930,7 @@ export declare const groupBy: {
10077
9930
  */
10078
9931
  <A, E, R, K, V, E2, R2>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => Effect.Effect<readonly [K, V], E2, R2>, options?: {
10079
9932
  readonly bufferSize?: number | undefined;
10080
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
9933
+ readonly idleTimeToLive?: Duration.Input | undefined;
10081
9934
  }): Stream<readonly [K, Stream<V>], E | E2, R | R2>;
10082
9935
  };
10083
9936
  /**
@@ -10141,7 +9994,7 @@ export declare const groupByKey: {
10141
9994
  */
10142
9995
  <A, K>(f: (a: NoInfer<A>) => K, options?: {
10143
9996
  readonly bufferSize?: number | undefined;
10144
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
9997
+ readonly idleTimeToLive?: Duration.Input | undefined;
10145
9998
  }): <E, R>(self: Stream<A, E, R>) => Stream<readonly [K, Stream<A>], E, R>;
10146
9999
  /**
10147
10000
  * Groups elements by a key and emits a stream per key.
@@ -10174,7 +10027,7 @@ export declare const groupByKey: {
10174
10027
  */
10175
10028
  <A, E, R, K>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => K, options?: {
10176
10029
  readonly bufferSize?: number | undefined;
10177
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10030
+ readonly idleTimeToLive?: Duration.Input | undefined;
10178
10031
  }): Stream<readonly [K, Stream<A>], E, R>;
10179
10032
  };
10180
10033
  /**
@@ -10559,12 +10412,12 @@ export declare const share: {
10559
10412
  (options: {
10560
10413
  readonly capacity: "unbounded";
10561
10414
  readonly replay?: number | undefined;
10562
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10415
+ readonly idleTimeToLive?: Duration.Input | undefined;
10563
10416
  } | {
10564
10417
  readonly capacity: number;
10565
10418
  readonly strategy?: "sliding" | "dropping" | "suspend" | undefined;
10566
10419
  readonly replay?: number | undefined;
10567
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10420
+ readonly idleTimeToLive?: Duration.Input | undefined;
10568
10421
  }): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Stream<A, E>, never, Scope.Scope | R>;
10569
10422
  /**
10570
10423
  * Returns a new Stream that multicasts the original stream, subscribing when the first consumer starts.
@@ -10600,12 +10453,12 @@ export declare const share: {
10600
10453
  <A, E, R>(self: Stream<A, E, R>, options: {
10601
10454
  readonly capacity: "unbounded";
10602
10455
  readonly replay?: number | undefined;
10603
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10456
+ readonly idleTimeToLive?: Duration.Input | undefined;
10604
10457
  } | {
10605
10458
  readonly capacity: number;
10606
10459
  readonly strategy?: "sliding" | "dropping" | "suspend" | undefined;
10607
10460
  readonly replay?: number | undefined;
10608
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10461
+ readonly idleTimeToLive?: Duration.Input | undefined;
10609
10462
  }): Effect.Effect<Stream<A, E>, never, Scope.Scope | R>;
10610
10463
  };
10611
10464
  /**
@@ -12457,7 +12310,7 @@ export declare const provideService: {
12457
12310
  * @since 4.0.0
12458
12311
  * @category Services
12459
12312
  */
12460
- <I, S>(key: ServiceMap.Service<I, S>, service: NoInfer<S>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, I>>;
12313
+ <I, S>(key: ServiceMap.Key<I, S>, service: NoInfer<S>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, I>>;
12461
12314
  /**
12462
12315
  * Provides the stream with a single required service, eliminating that
12463
12316
  * requirement from its environment.
@@ -12494,7 +12347,7 @@ export declare const provideService: {
12494
12347
  * @since 4.0.0
12495
12348
  * @category Services
12496
12349
  */
12497
- <A, E, R, I, S>(self: Stream<A, E, R>, key: ServiceMap.Service<I, S>, service: NoInfer<S>): Stream<A, E, Exclude<R, I>>;
12350
+ <A, E, R, I, S>(self: Stream<A, E, R>, key: ServiceMap.Key<I, S>, service: NoInfer<S>): Stream<A, E, Exclude<R, I>>;
12498
12351
  };
12499
12352
  /**
12500
12353
  * Provides a service to the stream using an effect, removing the requirement and adding the effect's error and environment.
@@ -12573,7 +12426,7 @@ export declare const provideServiceEffect: {
12573
12426
  * @since 4.0.0
12574
12427
  * @category Services
12575
12428
  */
12576
- <I, S, ES, RS>(key: ServiceMap.Service<I, S>, service: Effect.Effect<NoInfer<S>, ES, RS>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E | ES, Exclude<R, I> | RS>;
12429
+ <I, S, ES, RS>(key: ServiceMap.Key<I, S>, service: Effect.Effect<NoInfer<S>, ES, RS>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E | ES, Exclude<R, I> | RS>;
12577
12430
  /**
12578
12431
  * Provides a service to the stream using an effect, removing the requirement and adding the effect's error and environment.
12579
12432
  *
@@ -12612,7 +12465,7 @@ export declare const provideServiceEffect: {
12612
12465
  * @since 4.0.0
12613
12466
  * @category Services
12614
12467
  */
12615
- <A, E, R, I, S, ES, RS>(self: Stream<A, E, R>, key: ServiceMap.Service<I, S>, service: Effect.Effect<NoInfer<S>, ES, RS>): Stream<A, E | ES, Exclude<R, I> | RS>;
12468
+ <A, E, R, I, S, ES, RS>(self: Stream<A, E, R>, key: ServiceMap.Key<I, S>, service: Effect.Effect<NoInfer<S>, ES, RS>): Stream<A, E | ES, Exclude<R, I> | RS>;
12616
12469
  };
12617
12470
  /**
12618
12471
  * Transforms the stream's required services by mapping the current service map
@@ -12786,7 +12639,7 @@ export declare const updateService: {
12786
12639
  * @since 2.0.0
12787
12640
  * @category Services
12788
12641
  */
12789
- <I, S>(key: ServiceMap.Service<I, S>, f: (service: NoInfer<S>) => S): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R | I>;
12642
+ <I, S>(key: ServiceMap.Key<I, S>, f: (service: NoInfer<S>) => S): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R | I>;
12790
12643
  /**
12791
12644
  * Updates a single service in the stream environment by applying a function.
12792
12645
  *
@@ -12812,7 +12665,7 @@ export declare const updateService: {
12812
12665
  * @since 2.0.0
12813
12666
  * @category Services
12814
12667
  */
12815
- <A, E, R, I, S>(self: Stream<A, E, R>, key: ServiceMap.Service<I, S>, f: (service: NoInfer<S>) => S): Stream<A, E, R | I>;
12668
+ <A, E, R, I, S>(self: Stream<A, E, R>, key: ServiceMap.Key<I, S>, f: (service: NoInfer<S>) => S): Stream<A, E, R | I>;
12816
12669
  };
12817
12670
  /**
12818
12671
  * Wraps the stream with a new span for tracing.