effect 4.0.0-beta.6 → 4.0.0-beta.60

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 (1475) 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 +82 -45
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +105 -52
  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 +36 -33
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Brand.d.ts +3 -5
  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 +14 -45
  18. package/dist/Cache.d.ts.map +1 -1
  19. package/dist/Cache.js +21 -47
  20. package/dist/Cache.js.map +1 -1
  21. package/dist/Cause.d.ts +53 -22
  22. package/dist/Cause.d.ts.map +1 -1
  23. package/dist/Cause.js +108 -10
  24. package/dist/Cause.js.map +1 -1
  25. package/dist/Channel.d.ts +166 -48
  26. package/dist/Channel.d.ts.map +1 -1
  27. package/dist/Channel.js +176 -87
  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/Clock.d.ts +2 -2
  34. package/dist/Clock.d.ts.map +1 -1
  35. package/dist/Clock.js.map +1 -1
  36. package/dist/Combiner.d.ts +280 -13
  37. package/dist/Combiner.d.ts.map +1 -1
  38. package/dist/Combiner.js +198 -7
  39. package/dist/Combiner.js.map +1 -1
  40. package/dist/Config.d.ts +189 -29
  41. package/dist/Config.d.ts.map +1 -1
  42. package/dist/Config.js +85 -35
  43. package/dist/Config.js.map +1 -1
  44. package/dist/ConfigProvider.d.ts +6 -6
  45. package/dist/ConfigProvider.d.ts.map +1 -1
  46. package/dist/ConfigProvider.js +5 -5
  47. package/dist/ConfigProvider.js.map +1 -1
  48. package/dist/Console.d.ts +2 -2
  49. package/dist/Console.d.ts.map +1 -1
  50. package/dist/Console.js.map +1 -1
  51. package/dist/Context.d.ts +1150 -0
  52. package/dist/Context.d.ts.map +1 -0
  53. package/dist/{ServiceMap.js → Context.js} +181 -165
  54. package/dist/Context.js.map +1 -0
  55. package/dist/Cron.d.ts +11 -7
  56. package/dist/Cron.d.ts.map +1 -1
  57. package/dist/Cron.js +120 -63
  58. package/dist/Cron.js.map +1 -1
  59. package/dist/Data.d.ts +533 -365
  60. package/dist/Data.d.ts.map +1 -1
  61. package/dist/Data.js +125 -73
  62. package/dist/Data.js.map +1 -1
  63. package/dist/DateTime.d.ts +74 -255
  64. package/dist/DateTime.d.ts.map +1 -1
  65. package/dist/DateTime.js +17 -62
  66. package/dist/DateTime.js.map +1 -1
  67. package/dist/Deferred.d.ts +12 -5
  68. package/dist/Deferred.d.ts.map +1 -1
  69. package/dist/Deferred.js +13 -5
  70. package/dist/Deferred.js.map +1 -1
  71. package/dist/Duration.d.ts +74 -40
  72. package/dist/Duration.d.ts.map +1 -1
  73. package/dist/Duration.js +126 -87
  74. package/dist/Duration.js.map +1 -1
  75. package/dist/Effect.d.ts +1391 -927
  76. package/dist/Effect.d.ts.map +1 -1
  77. package/dist/Effect.js +472 -328
  78. package/dist/Effect.js.map +1 -1
  79. package/dist/Effectable.d.ts +29 -0
  80. package/dist/Effectable.d.ts.map +1 -0
  81. package/dist/Effectable.js +31 -0
  82. package/dist/Effectable.js.map +1 -0
  83. package/dist/Encoding.d.ts +1 -1
  84. package/dist/Equal.d.ts +276 -109
  85. package/dist/Equal.d.ts.map +1 -1
  86. package/dist/Equal.js +140 -48
  87. package/dist/Equal.js.map +1 -1
  88. package/dist/Equivalence.d.ts +60 -3
  89. package/dist/Equivalence.d.ts.map +1 -1
  90. package/dist/Equivalence.js +70 -13
  91. package/dist/Equivalence.js.map +1 -1
  92. package/dist/ErrorReporter.d.ts +374 -0
  93. package/dist/ErrorReporter.d.ts.map +1 -0
  94. package/dist/ErrorReporter.js +245 -0
  95. package/dist/ErrorReporter.js.map +1 -0
  96. package/dist/ExecutionPlan.d.ts +6 -6
  97. package/dist/ExecutionPlan.d.ts.map +1 -1
  98. package/dist/ExecutionPlan.js +4 -4
  99. package/dist/ExecutionPlan.js.map +1 -1
  100. package/dist/Exit.d.ts +24 -12
  101. package/dist/Exit.d.ts.map +1 -1
  102. package/dist/Exit.js +8 -4
  103. package/dist/Exit.js.map +1 -1
  104. package/dist/Fiber.d.ts +10 -8
  105. package/dist/Fiber.d.ts.map +1 -1
  106. package/dist/Fiber.js.map +1 -1
  107. package/dist/FiberHandle.d.ts +11 -10
  108. package/dist/FiberHandle.d.ts.map +1 -1
  109. package/dist/FiberHandle.js +12 -11
  110. package/dist/FiberHandle.js.map +1 -1
  111. package/dist/FiberMap.d.ts +22 -21
  112. package/dist/FiberMap.d.ts.map +1 -1
  113. package/dist/FiberMap.js +10 -10
  114. package/dist/FiberMap.js.map +1 -1
  115. package/dist/FiberSet.d.ts +2 -2
  116. package/dist/FiberSet.d.ts.map +1 -1
  117. package/dist/FiberSet.js +4 -4
  118. package/dist/FiberSet.js.map +1 -1
  119. package/dist/FileSystem.d.ts +20 -19
  120. package/dist/FileSystem.d.ts.map +1 -1
  121. package/dist/FileSystem.js +15 -11
  122. package/dist/FileSystem.js.map +1 -1
  123. package/dist/Filter.d.ts +4 -37
  124. package/dist/Filter.d.ts.map +1 -1
  125. package/dist/Filter.js +0 -13
  126. package/dist/Filter.js.map +1 -1
  127. package/dist/Formatter.d.ts +131 -47
  128. package/dist/Formatter.d.ts.map +1 -1
  129. package/dist/Formatter.js +243 -55
  130. package/dist/Formatter.js.map +1 -1
  131. package/dist/Function.d.ts +1 -9
  132. package/dist/Function.d.ts.map +1 -1
  133. package/dist/Function.js +2 -10
  134. package/dist/Function.js.map +1 -1
  135. package/dist/Graph.d.ts +65 -65
  136. package/dist/Graph.d.ts.map +1 -1
  137. package/dist/Graph.js +58 -60
  138. package/dist/Graph.js.map +1 -1
  139. package/dist/Hash.js +1 -1
  140. package/dist/Hash.js.map +1 -1
  141. package/dist/HashMap.d.ts +26 -19
  142. package/dist/HashMap.d.ts.map +1 -1
  143. package/dist/HashMap.js +7 -5
  144. package/dist/HashMap.js.map +1 -1
  145. package/dist/Inspectable.d.ts +0 -4
  146. package/dist/Inspectable.d.ts.map +1 -1
  147. package/dist/Inspectable.js +4 -13
  148. package/dist/Inspectable.js.map +1 -1
  149. package/dist/Iterable.d.ts +50 -50
  150. package/dist/Iterable.d.ts.map +1 -1
  151. package/dist/Iterable.js +106 -34
  152. package/dist/Iterable.js.map +1 -1
  153. package/dist/JsonSchema.d.ts +299 -10
  154. package/dist/JsonSchema.d.ts.map +1 -1
  155. package/dist/JsonSchema.js +323 -4
  156. package/dist/JsonSchema.js.map +1 -1
  157. package/dist/Latch.d.ts +69 -3
  158. package/dist/Latch.d.ts.map +1 -1
  159. package/dist/Latch.js +58 -0
  160. package/dist/Latch.js.map +1 -1
  161. package/dist/Layer.d.ts +599 -379
  162. package/dist/Layer.d.ts.map +1 -1
  163. package/dist/Layer.js +249 -180
  164. package/dist/Layer.js.map +1 -1
  165. package/dist/LayerMap.d.ts +27 -26
  166. package/dist/LayerMap.d.ts.map +1 -1
  167. package/dist/LayerMap.js +21 -18
  168. package/dist/LayerMap.js.map +1 -1
  169. package/dist/LogLevel.d.ts +32 -0
  170. package/dist/LogLevel.d.ts.map +1 -1
  171. package/dist/LogLevel.js +28 -100
  172. package/dist/LogLevel.js.map +1 -1
  173. package/dist/Logger.d.ts +31 -97
  174. package/dist/Logger.d.ts.map +1 -1
  175. package/dist/Logger.js +2 -3
  176. package/dist/Logger.js.map +1 -1
  177. package/dist/ManagedRuntime.d.ts +8 -8
  178. package/dist/ManagedRuntime.d.ts.map +1 -1
  179. package/dist/ManagedRuntime.js +34 -25
  180. package/dist/ManagedRuntime.js.map +1 -1
  181. package/dist/Metric.d.ts +23 -25
  182. package/dist/Metric.d.ts.map +1 -1
  183. package/dist/Metric.js +24 -26
  184. package/dist/Metric.js.map +1 -1
  185. package/dist/MutableHashMap.d.ts +7 -0
  186. package/dist/MutableHashMap.d.ts.map +1 -1
  187. package/dist/MutableHashMap.js +8 -0
  188. package/dist/MutableHashMap.js.map +1 -1
  189. package/dist/MutableHashSet.d.ts +7 -0
  190. package/dist/MutableHashSet.d.ts.map +1 -1
  191. package/dist/MutableHashSet.js +8 -0
  192. package/dist/MutableHashSet.js.map +1 -1
  193. package/dist/MutableList.d.ts.map +1 -1
  194. package/dist/MutableList.js +3 -0
  195. package/dist/MutableList.js.map +1 -1
  196. package/dist/Newtype.d.ts +291 -0
  197. package/dist/Newtype.d.ts.map +1 -0
  198. package/dist/Newtype.js +161 -0
  199. package/dist/Newtype.js.map +1 -0
  200. package/dist/Number.d.ts +74 -18
  201. package/dist/Number.d.ts.map +1 -1
  202. package/dist/Number.js +46 -18
  203. package/dist/Number.js.map +1 -1
  204. package/dist/Optic.d.ts +947 -18
  205. package/dist/Optic.d.ts.map +1 -1
  206. package/dist/Optic.js +454 -5
  207. package/dist/Optic.js.map +1 -1
  208. package/dist/Option.d.ts +25 -16
  209. package/dist/Option.d.ts.map +1 -1
  210. package/dist/Option.js +15 -9
  211. package/dist/Option.js.map +1 -1
  212. package/dist/Order.d.ts +6 -1
  213. package/dist/Order.d.ts.map +1 -1
  214. package/dist/Order.js +19 -14
  215. package/dist/Order.js.map +1 -1
  216. package/dist/PartitionedSemaphore.d.ts +183 -0
  217. package/dist/PartitionedSemaphore.d.ts.map +1 -0
  218. package/dist/PartitionedSemaphore.js +231 -0
  219. package/dist/PartitionedSemaphore.js.map +1 -0
  220. package/dist/Path.d.ts +2 -2
  221. package/dist/Path.d.ts.map +1 -1
  222. package/dist/Path.js +2 -2
  223. package/dist/Path.js.map +1 -1
  224. package/dist/PlatformError.d.ts +2 -2
  225. package/dist/Pool.d.ts +1 -1
  226. package/dist/Pool.d.ts.map +1 -1
  227. package/dist/Pool.js +5 -5
  228. package/dist/Pool.js.map +1 -1
  229. package/dist/Predicate.d.ts +1 -1
  230. package/dist/Predicate.d.ts.map +1 -1
  231. package/dist/PubSub.d.ts +5 -4
  232. package/dist/PubSub.d.ts.map +1 -1
  233. package/dist/PubSub.js +15 -8
  234. package/dist/PubSub.js.map +1 -1
  235. package/dist/Pull.d.ts.map +1 -1
  236. package/dist/Pull.js +1 -1
  237. package/dist/Pull.js.map +1 -1
  238. package/dist/Queue.d.ts +9 -6
  239. package/dist/Queue.d.ts.map +1 -1
  240. package/dist/Queue.js +7 -5
  241. package/dist/Queue.js.map +1 -1
  242. package/dist/Random.d.ts +36 -2
  243. package/dist/Random.d.ts.map +1 -1
  244. package/dist/Random.js +46 -35
  245. package/dist/Random.js.map +1 -1
  246. package/dist/RcMap.d.ts +4 -4
  247. package/dist/RcMap.d.ts.map +1 -1
  248. package/dist/RcMap.js +13 -13
  249. package/dist/RcMap.js.map +1 -1
  250. package/dist/RcRef.d.ts +1 -1
  251. package/dist/RcRef.d.ts.map +1 -1
  252. package/dist/Record.d.ts +63 -160
  253. package/dist/Record.d.ts.map +1 -1
  254. package/dist/Record.js +37 -56
  255. package/dist/Record.js.map +1 -1
  256. package/dist/Redactable.d.ts +139 -62
  257. package/dist/Redactable.d.ts.map +1 -1
  258. package/dist/Redactable.js +59 -55
  259. package/dist/Redactable.js.map +1 -1
  260. package/dist/Reducer.d.ts +166 -7
  261. package/dist/Reducer.d.ts.map +1 -1
  262. package/dist/Reducer.js +135 -1
  263. package/dist/Reducer.js.map +1 -1
  264. package/dist/References.d.ts +257 -229
  265. package/dist/References.d.ts.map +1 -1
  266. package/dist/References.js +240 -259
  267. package/dist/References.js.map +1 -1
  268. package/dist/Request.d.ts +5 -5
  269. package/dist/Request.d.ts.map +1 -1
  270. package/dist/Request.js.map +1 -1
  271. package/dist/RequestResolver.d.ts +25 -25
  272. package/dist/RequestResolver.d.ts.map +1 -1
  273. package/dist/RequestResolver.js +15 -16
  274. package/dist/RequestResolver.js.map +1 -1
  275. package/dist/Resource.d.ts +0 -3
  276. package/dist/Resource.d.ts.map +1 -1
  277. package/dist/Resource.js +5 -4
  278. package/dist/Resource.js.map +1 -1
  279. package/dist/Result.d.ts +1 -1
  280. package/dist/Result.d.ts.map +1 -1
  281. package/dist/Result.js +1 -2
  282. package/dist/Result.js.map +1 -1
  283. package/dist/Runtime.d.ts +66 -0
  284. package/dist/Runtime.d.ts.map +1 -1
  285. package/dist/Runtime.js +79 -6
  286. package/dist/Runtime.js.map +1 -1
  287. package/dist/Schedule.d.ts +174 -291
  288. package/dist/Schedule.d.ts.map +1 -1
  289. package/dist/Schedule.js +132 -120
  290. package/dist/Schedule.js.map +1 -1
  291. package/dist/Scheduler.d.ts +36 -125
  292. package/dist/Scheduler.d.ts.map +1 -1
  293. package/dist/Scheduler.js +37 -126
  294. package/dist/Scheduler.js.map +1 -1
  295. package/dist/Schema.d.ts +3213 -392
  296. package/dist/Schema.d.ts.map +1 -1
  297. package/dist/Schema.js +2058 -252
  298. package/dist/Schema.js.map +1 -1
  299. package/dist/SchemaAST.d.ts +13 -2
  300. package/dist/SchemaAST.d.ts.map +1 -1
  301. package/dist/SchemaAST.js +340 -257
  302. package/dist/SchemaAST.js.map +1 -1
  303. package/dist/SchemaGetter.d.ts +55 -13
  304. package/dist/SchemaGetter.d.ts.map +1 -1
  305. package/dist/SchemaGetter.js +73 -11
  306. package/dist/SchemaGetter.js.map +1 -1
  307. package/dist/SchemaIssue.d.ts.map +1 -1
  308. package/dist/SchemaIssue.js +29 -11
  309. package/dist/SchemaIssue.js.map +1 -1
  310. package/dist/SchemaParser.d.ts +44 -54
  311. package/dist/SchemaParser.d.ts.map +1 -1
  312. package/dist/SchemaParser.js +69 -4
  313. package/dist/SchemaParser.js.map +1 -1
  314. package/dist/SchemaRepresentation.d.ts +2 -2
  315. package/dist/SchemaRepresentation.d.ts.map +1 -1
  316. package/dist/SchemaRepresentation.js +63 -39
  317. package/dist/SchemaRepresentation.js.map +1 -1
  318. package/dist/SchemaTransformation.d.ts +245 -3
  319. package/dist/SchemaTransformation.d.ts.map +1 -1
  320. package/dist/SchemaTransformation.js +297 -33
  321. package/dist/SchemaTransformation.js.map +1 -1
  322. package/dist/Scope.d.ts +2 -2
  323. package/dist/Scope.d.ts.map +1 -1
  324. package/dist/Scope.js.map +1 -1
  325. package/dist/ScopedCache.d.ts +2 -2
  326. package/dist/ScopedCache.d.ts.map +1 -1
  327. package/dist/ScopedCache.js +5 -5
  328. package/dist/ScopedCache.js.map +1 -1
  329. package/dist/Semaphore.d.ts +148 -52
  330. package/dist/Semaphore.d.ts.map +1 -1
  331. package/dist/Semaphore.js +135 -117
  332. package/dist/Semaphore.js.map +1 -1
  333. package/dist/Sink.d.ts +22 -19
  334. package/dist/Sink.d.ts.map +1 -1
  335. package/dist/Sink.js +54 -7
  336. package/dist/Sink.js.map +1 -1
  337. package/dist/Stdio.d.ts +18 -6
  338. package/dist/Stdio.d.ts.map +1 -1
  339. package/dist/Stdio.js +20 -2
  340. package/dist/Stdio.js.map +1 -1
  341. package/dist/Stream.d.ts +465 -542
  342. package/dist/Stream.d.ts.map +1 -1
  343. package/dist/Stream.js +329 -145
  344. package/dist/Stream.js.map +1 -1
  345. package/dist/String.d.ts +114 -47
  346. package/dist/String.d.ts.map +1 -1
  347. package/dist/String.js +29 -47
  348. package/dist/String.js.map +1 -1
  349. package/dist/Struct.d.ts +7 -7
  350. package/dist/Struct.d.ts.map +1 -1
  351. package/dist/SubscriptionRef.d.ts +1 -2
  352. package/dist/SubscriptionRef.d.ts.map +1 -1
  353. package/dist/SubscriptionRef.js +83 -116
  354. package/dist/SubscriptionRef.js.map +1 -1
  355. package/dist/Terminal.d.ts +5 -4
  356. package/dist/Terminal.d.ts.map +1 -1
  357. package/dist/Terminal.js +2 -2
  358. package/dist/Terminal.js.map +1 -1
  359. package/dist/Tracer.d.ts +21 -20
  360. package/dist/Tracer.d.ts.map +1 -1
  361. package/dist/Tracer.js +13 -9
  362. package/dist/Tracer.js.map +1 -1
  363. package/dist/Trie.d.ts +44 -31
  364. package/dist/Trie.d.ts.map +1 -1
  365. package/dist/Trie.js +13 -9
  366. package/dist/Trie.js.map +1 -1
  367. package/dist/TxChunk.d.ts +4 -4
  368. package/dist/TxChunk.d.ts.map +1 -1
  369. package/dist/TxChunk.js +4 -4
  370. package/dist/TxChunk.js.map +1 -1
  371. package/dist/TxDeferred.d.ts +328 -0
  372. package/dist/TxDeferred.d.ts.map +1 -0
  373. package/dist/TxDeferred.js +197 -0
  374. package/dist/TxDeferred.js.map +1 -0
  375. package/dist/TxHashMap.d.ts +105 -86
  376. package/dist/TxHashMap.d.ts.map +1 -1
  377. package/dist/TxHashMap.js +51 -44
  378. package/dist/TxHashMap.js.map +1 -1
  379. package/dist/TxHashSet.d.ts +2 -2
  380. package/dist/TxHashSet.d.ts.map +1 -1
  381. package/dist/TxHashSet.js +16 -15
  382. package/dist/TxHashSet.js.map +1 -1
  383. package/dist/TxPriorityQueue.d.ts +609 -0
  384. package/dist/TxPriorityQueue.d.ts.map +1 -0
  385. package/dist/TxPriorityQueue.js +416 -0
  386. package/dist/TxPriorityQueue.js.map +1 -0
  387. package/dist/TxPubSub.d.ts +585 -0
  388. package/dist/TxPubSub.d.ts.map +1 -0
  389. package/dist/TxPubSub.js +521 -0
  390. package/dist/TxPubSub.js.map +1 -0
  391. package/dist/TxQueue.d.ts +1 -1
  392. package/dist/TxQueue.d.ts.map +1 -1
  393. package/dist/TxQueue.js +42 -57
  394. package/dist/TxQueue.js.map +1 -1
  395. package/dist/TxReentrantLock.d.ts +500 -0
  396. package/dist/TxReentrantLock.d.ts.map +1 -0
  397. package/dist/TxReentrantLock.js +481 -0
  398. package/dist/TxReentrantLock.js.map +1 -0
  399. package/dist/TxRef.d.ts +14 -20
  400. package/dist/TxRef.d.ts.map +1 -1
  401. package/dist/TxRef.js +8 -10
  402. package/dist/TxRef.js.map +1 -1
  403. package/dist/TxSemaphore.d.ts +162 -2
  404. package/dist/TxSemaphore.d.ts.map +1 -1
  405. package/dist/TxSemaphore.js +25 -10
  406. package/dist/TxSemaphore.js.map +1 -1
  407. package/dist/TxSubscriptionRef.d.ts +508 -0
  408. package/dist/TxSubscriptionRef.d.ts.map +1 -0
  409. package/dist/TxSubscriptionRef.js +293 -0
  410. package/dist/TxSubscriptionRef.js.map +1 -0
  411. package/dist/Types.d.ts +80 -22
  412. package/dist/Types.d.ts.map +1 -1
  413. package/dist/Unify.d.ts +8 -2
  414. package/dist/Unify.d.ts.map +1 -1
  415. package/dist/Unify.js.map +1 -1
  416. package/dist/Utils.d.ts +137 -65
  417. package/dist/Utils.d.ts.map +1 -1
  418. package/dist/Utils.js +38 -66
  419. package/dist/Utils.js.map +1 -1
  420. package/dist/index.d.ts +886 -71
  421. package/dist/index.d.ts.map +1 -1
  422. package/dist/index.js +886 -71
  423. package/dist/index.js.map +1 -1
  424. package/dist/internal/core.js.map +1 -1
  425. package/dist/internal/dateTime.js +77 -71
  426. package/dist/internal/dateTime.js.map +1 -1
  427. package/dist/internal/effect.js +488 -326
  428. package/dist/internal/effect.js.map +1 -1
  429. package/dist/internal/hashMap.js +7 -5
  430. package/dist/internal/hashMap.js.map +1 -1
  431. package/dist/internal/layer.js +3 -3
  432. package/dist/internal/layer.js.map +1 -1
  433. package/dist/internal/option.js +6 -0
  434. package/dist/internal/option.js.map +1 -1
  435. package/dist/internal/random.d.ts +2 -0
  436. package/dist/internal/random.d.ts.map +1 -0
  437. package/dist/internal/random.js +13 -0
  438. package/dist/internal/random.js.map +1 -0
  439. package/dist/internal/rcRef.js +9 -9
  440. package/dist/internal/rcRef.js.map +1 -1
  441. package/dist/internal/references.d.ts +2 -0
  442. package/dist/internal/references.d.ts.map +1 -0
  443. package/dist/internal/references.js +51 -0
  444. package/dist/internal/references.js.map +1 -0
  445. package/dist/internal/request.js +6 -6
  446. package/dist/internal/request.js.map +1 -1
  447. package/dist/internal/schedule.js +1 -1
  448. package/dist/internal/schedule.js.map +1 -1
  449. package/dist/internal/schema/annotations.js +2 -0
  450. package/dist/internal/schema/annotations.js.map +1 -1
  451. package/dist/internal/schema/representation.js +87 -109
  452. package/dist/internal/schema/representation.js.map +1 -1
  453. package/dist/internal/schema/schema.d.ts +10 -1
  454. package/dist/internal/schema/schema.d.ts.map +1 -1
  455. package/dist/internal/schema/schema.js +59 -1
  456. package/dist/internal/schema/schema.js.map +1 -1
  457. package/dist/internal/trie.js +8 -7
  458. package/dist/internal/trie.js.map +1 -1
  459. package/dist/testing/TestClock.d.ts +5 -5
  460. package/dist/testing/TestClock.d.ts.map +1 -1
  461. package/dist/testing/TestClock.js +2 -2
  462. package/dist/testing/TestClock.js.map +1 -1
  463. package/dist/testing/TestSchema.d.ts +267 -33
  464. package/dist/testing/TestSchema.d.ts.map +1 -1
  465. package/dist/testing/TestSchema.js +296 -23
  466. package/dist/testing/TestSchema.js.map +1 -1
  467. package/dist/testing/index.d.ts +64 -1
  468. package/dist/testing/index.d.ts.map +1 -1
  469. package/dist/testing/index.js +64 -1
  470. package/dist/testing/index.js.map +1 -1
  471. package/dist/unstable/ai/AiError.d.ts +127 -45
  472. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  473. package/dist/unstable/ai/AiError.js +29 -23
  474. package/dist/unstable/ai/AiError.js.map +1 -1
  475. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  476. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
  477. package/dist/unstable/ai/AnthropicStructuredOutput.js +9 -2
  478. package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
  479. package/dist/unstable/ai/Chat.d.ts +39 -11
  480. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  481. package/dist/unstable/ai/Chat.js +40 -47
  482. package/dist/unstable/ai/Chat.js.map +1 -1
  483. package/dist/unstable/ai/EmbeddingModel.d.ts +130 -0
  484. package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -0
  485. package/dist/unstable/ai/EmbeddingModel.js +127 -0
  486. package/dist/unstable/ai/EmbeddingModel.js.map +1 -0
  487. package/dist/unstable/ai/IdGenerator.d.ts +2 -2
  488. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  489. package/dist/unstable/ai/IdGenerator.js +2 -2
  490. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  491. package/dist/unstable/ai/LanguageModel.d.ts +119 -49
  492. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  493. package/dist/unstable/ai/LanguageModel.js +260 -61
  494. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  495. package/dist/unstable/ai/McpSchema.d.ts +207 -112
  496. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  497. package/dist/unstable/ai/McpSchema.js +71 -19
  498. package/dist/unstable/ai/McpSchema.js.map +1 -1
  499. package/dist/unstable/ai/McpServer.d.ts +68 -15
  500. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  501. package/dist/unstable/ai/McpServer.js +225 -73
  502. package/dist/unstable/ai/McpServer.js.map +1 -1
  503. package/dist/unstable/ai/Model.d.ts +27 -9
  504. package/dist/unstable/ai/Model.d.ts.map +1 -1
  505. package/dist/unstable/ai/Model.js +25 -9
  506. package/dist/unstable/ai/Model.js.map +1 -1
  507. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  508. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
  509. package/dist/unstable/ai/OpenAiStructuredOutput.js +9 -1
  510. package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
  511. package/dist/unstable/ai/Prompt.d.ts +17 -17
  512. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  513. package/dist/unstable/ai/Prompt.js +6 -9
  514. package/dist/unstable/ai/Prompt.js.map +1 -1
  515. package/dist/unstable/ai/Response.d.ts +24 -24
  516. package/dist/unstable/ai/Response.d.ts.map +1 -1
  517. package/dist/unstable/ai/Response.js +7 -8
  518. package/dist/unstable/ai/Response.js.map +1 -1
  519. package/dist/unstable/ai/ResponseIdTracker.d.ts +38 -0
  520. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -0
  521. package/dist/unstable/ai/ResponseIdTracker.js +68 -0
  522. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -0
  523. package/dist/unstable/ai/Telemetry.d.ts +35 -2
  524. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  525. package/dist/unstable/ai/Telemetry.js +2 -2
  526. package/dist/unstable/ai/Telemetry.js.map +1 -1
  527. package/dist/unstable/ai/Tokenizer.d.ts +2 -2
  528. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  529. package/dist/unstable/ai/Tokenizer.js +2 -2
  530. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  531. package/dist/unstable/ai/Tool.d.ts +46 -16
  532. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  533. package/dist/unstable/ai/Tool.js +68 -22
  534. package/dist/unstable/ai/Tool.js.map +1 -1
  535. package/dist/unstable/ai/Toolkit.d.ts +4 -4
  536. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  537. package/dist/unstable/ai/Toolkit.js +14 -21
  538. package/dist/unstable/ai/Toolkit.js.map +1 -1
  539. package/dist/unstable/ai/index.d.ts +22 -1
  540. package/dist/unstable/ai/index.d.ts.map +1 -1
  541. package/dist/unstable/ai/index.js +22 -1
  542. package/dist/unstable/ai/index.js.map +1 -1
  543. package/dist/unstable/ai/internal/codec-transformer.js +5 -7
  544. package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
  545. package/dist/unstable/cli/Argument.d.ts +4 -7
  546. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  547. package/dist/unstable/cli/Argument.js +1 -3
  548. package/dist/unstable/cli/Argument.js.map +1 -1
  549. package/dist/unstable/cli/CliError.d.ts +51 -63
  550. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  551. package/dist/unstable/cli/CliError.js +32 -57
  552. package/dist/unstable/cli/CliError.js.map +1 -1
  553. package/dist/unstable/cli/CliOutput.d.ts +5 -4
  554. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  555. package/dist/unstable/cli/CliOutput.js +67 -12
  556. package/dist/unstable/cli/CliOutput.js.map +1 -1
  557. package/dist/unstable/cli/Command.d.ts +372 -59
  558. package/dist/unstable/cli/Command.d.ts.map +1 -1
  559. package/dist/unstable/cli/Command.js +328 -66
  560. package/dist/unstable/cli/Command.js.map +1 -1
  561. package/dist/unstable/cli/Completions.d.ts +97 -0
  562. package/dist/unstable/cli/Completions.d.ts.map +1 -0
  563. package/dist/unstable/cli/Completions.js +25 -0
  564. package/dist/unstable/cli/Completions.js.map +1 -0
  565. package/dist/unstable/cli/Flag.d.ts +4 -5
  566. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  567. package/dist/unstable/cli/Flag.js +1 -1
  568. package/dist/unstable/cli/Flag.js.map +1 -1
  569. package/dist/unstable/cli/GlobalFlag.d.ts +125 -0
  570. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -0
  571. package/dist/unstable/cli/GlobalFlag.js +118 -0
  572. package/dist/unstable/cli/GlobalFlag.js.map +1 -0
  573. package/dist/unstable/cli/HelpDoc.d.ts +81 -11
  574. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  575. package/dist/unstable/cli/Param.d.ts +34 -6
  576. package/dist/unstable/cli/Param.d.ts.map +1 -1
  577. package/dist/unstable/cli/Param.js +24 -14
  578. package/dist/unstable/cli/Param.js.map +1 -1
  579. package/dist/unstable/cli/Primitive.d.ts +2 -2
  580. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  581. package/dist/unstable/cli/Primitive.js +1 -1
  582. package/dist/unstable/cli/Primitive.js.map +1 -1
  583. package/dist/unstable/cli/Prompt.js +266 -86
  584. package/dist/unstable/cli/Prompt.js.map +1 -1
  585. package/dist/unstable/cli/index.d.ts +10 -0
  586. package/dist/unstable/cli/index.d.ts.map +1 -1
  587. package/dist/unstable/cli/index.js +10 -0
  588. package/dist/unstable/cli/index.js.map +1 -1
  589. package/dist/unstable/cli/internal/command.d.ts +41 -15
  590. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  591. package/dist/unstable/cli/internal/command.js +84 -47
  592. package/dist/unstable/cli/internal/command.js.map +1 -1
  593. package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
  594. package/dist/unstable/cli/internal/completions/descriptor.d.ts +2 -0
  595. package/dist/unstable/cli/internal/completions/descriptor.d.ts.map +1 -0
  596. package/dist/unstable/cli/internal/completions/{CommandDescriptor.js → descriptor.js} +17 -5
  597. package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -0
  598. package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
  599. package/dist/unstable/cli/internal/completions/zsh.js.map +1 -1
  600. package/dist/unstable/cli/internal/config.js +42 -0
  601. package/dist/unstable/cli/internal/config.js.map +1 -1
  602. package/dist/unstable/cli/internal/help.d.ts +33 -0
  603. package/dist/unstable/cli/internal/help.d.ts.map +1 -0
  604. package/dist/unstable/cli/internal/help.js +125 -0
  605. package/dist/unstable/cli/internal/help.js.map +1 -0
  606. package/dist/unstable/cli/internal/parser.js +155 -58
  607. package/dist/unstable/cli/internal/parser.js.map +1 -1
  608. package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
  609. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  610. package/dist/unstable/cluster/ClusterCron.js +1 -1
  611. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  612. package/dist/unstable/cluster/ClusterError.d.ts +7 -7
  613. package/dist/unstable/cluster/ClusterSchema.d.ts +28 -7
  614. package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
  615. package/dist/unstable/cluster/ClusterSchema.js +28 -8
  616. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  617. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +4 -2
  618. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  619. package/dist/unstable/cluster/ClusterWorkflowEngine.js +96 -63
  620. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  621. package/dist/unstable/cluster/DeliverAt.js +1 -1
  622. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  623. package/dist/unstable/cluster/Entity.d.ts +17 -16
  624. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  625. package/dist/unstable/cluster/Entity.js +31 -25
  626. package/dist/unstable/cluster/Entity.js.map +1 -1
  627. package/dist/unstable/cluster/EntityAddress.d.ts +2 -2
  628. package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
  629. package/dist/unstable/cluster/EntityAddress.js +1 -1
  630. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  631. package/dist/unstable/cluster/EntityProxy.js +3 -3
  632. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  633. package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
  634. package/dist/unstable/cluster/EntityProxyServer.js +6 -6
  635. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  636. package/dist/unstable/cluster/EntityResource.d.ts +4 -4
  637. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  638. package/dist/unstable/cluster/EntityResource.js +2 -2
  639. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  640. package/dist/unstable/cluster/Envelope.d.ts +3 -3
  641. package/dist/unstable/cluster/HttpRunner.js +2 -2
  642. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  643. package/dist/unstable/cluster/K8sHttpClient.d.ts +4 -4
  644. package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
  645. package/dist/unstable/cluster/K8sHttpClient.js +6 -6
  646. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  647. package/dist/unstable/cluster/Message.d.ts +16 -10
  648. package/dist/unstable/cluster/Message.d.ts.map +1 -1
  649. package/dist/unstable/cluster/Message.js +16 -8
  650. package/dist/unstable/cluster/Message.js.map +1 -1
  651. package/dist/unstable/cluster/MessageStorage.d.ts +46 -23
  652. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  653. package/dist/unstable/cluster/MessageStorage.js +40 -25
  654. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  655. package/dist/unstable/cluster/Reply.d.ts +7 -6
  656. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  657. package/dist/unstable/cluster/Reply.js +8 -7
  658. package/dist/unstable/cluster/Reply.js.map +1 -1
  659. package/dist/unstable/cluster/Runner.d.ts +1 -1
  660. package/dist/unstable/cluster/Runner.d.ts.map +1 -1
  661. package/dist/unstable/cluster/Runner.js +1 -1
  662. package/dist/unstable/cluster/Runner.js.map +1 -1
  663. package/dist/unstable/cluster/RunnerAddress.d.ts +1 -1
  664. package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
  665. package/dist/unstable/cluster/RunnerAddress.js +1 -1
  666. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  667. package/dist/unstable/cluster/RunnerHealth.d.ts +2 -2
  668. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  669. package/dist/unstable/cluster/RunnerHealth.js +2 -2
  670. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  671. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  672. package/dist/unstable/cluster/RunnerServer.js +10 -9
  673. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  674. package/dist/unstable/cluster/RunnerStorage.d.ts +12 -12
  675. package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
  676. package/dist/unstable/cluster/RunnerStorage.js +3 -3
  677. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  678. package/dist/unstable/cluster/Runners.d.ts +5 -4
  679. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  680. package/dist/unstable/cluster/Runners.js +16 -14
  681. package/dist/unstable/cluster/Runners.js.map +1 -1
  682. package/dist/unstable/cluster/ShardId.d.ts +35 -49
  683. package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
  684. package/dist/unstable/cluster/ShardId.js +65 -67
  685. package/dist/unstable/cluster/ShardId.js.map +1 -1
  686. package/dist/unstable/cluster/Sharding.d.ts +4 -4
  687. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  688. package/dist/unstable/cluster/Sharding.js +59 -49
  689. package/dist/unstable/cluster/Sharding.js.map +1 -1
  690. package/dist/unstable/cluster/ShardingConfig.d.ts +28 -27
  691. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  692. package/dist/unstable/cluster/ShardingConfig.js +27 -27
  693. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  694. package/dist/unstable/cluster/SingletonAddress.d.ts +2 -2
  695. package/dist/unstable/cluster/Snowflake.d.ts +2 -2
  696. package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
  697. package/dist/unstable/cluster/Snowflake.js +2 -2
  698. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  699. package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
  700. package/dist/unstable/cluster/SqlMessageStorage.js +24 -20
  701. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  702. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  703. package/dist/unstable/cluster/SqlRunnerStorage.js +7 -7
  704. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  705. package/dist/unstable/cluster/internal/entityManager.js +30 -24
  706. package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
  707. package/dist/unstable/cluster/internal/entityReaper.js +2 -2
  708. package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
  709. package/dist/unstable/cluster/internal/resourceMap.js +3 -3
  710. package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
  711. package/dist/unstable/devtools/DevToolsClient.d.ts +2 -2
  712. package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
  713. package/dist/unstable/devtools/DevToolsClient.js +9 -8
  714. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  715. package/dist/unstable/devtools/DevToolsSchema.d.ts +4 -4
  716. package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
  717. package/dist/unstable/devtools/DevToolsSchema.js +9 -2
  718. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  719. package/dist/unstable/encoding/Msgpack.d.ts +1 -1
  720. package/dist/unstable/encoding/Ndjson.d.ts +9 -9
  721. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  722. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  723. package/dist/unstable/encoding/Sse.d.ts +3 -3
  724. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  725. package/dist/unstable/encoding/Sse.js +1 -1
  726. package/dist/unstable/encoding/Sse.js.map +1 -1
  727. package/dist/unstable/eventlog/Event.d.ts +0 -6
  728. package/dist/unstable/eventlog/Event.d.ts.map +1 -1
  729. package/dist/unstable/eventlog/Event.js +0 -5
  730. package/dist/unstable/eventlog/Event.js.map +1 -1
  731. package/dist/unstable/eventlog/EventGroup.d.ts +0 -2
  732. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  733. package/dist/unstable/eventlog/EventGroup.js +0 -2
  734. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  735. package/dist/unstable/eventlog/EventJournal.d.ts +27 -10
  736. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  737. package/dist/unstable/eventlog/EventJournal.js +130 -71
  738. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  739. package/dist/unstable/eventlog/EventLog.d.ts +94 -37
  740. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  741. package/dist/unstable/eventlog/EventLog.js +225 -151
  742. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  743. package/dist/unstable/eventlog/EventLogEncryption.d.ts +11 -9
  744. package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
  745. package/dist/unstable/eventlog/EventLogEncryption.js +15 -17
  746. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  747. package/dist/unstable/eventlog/EventLogMessage.d.ts +228 -0
  748. package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -0
  749. package/dist/unstable/eventlog/EventLogMessage.js +214 -0
  750. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -0
  751. package/dist/unstable/eventlog/EventLogRemote.d.ts +112 -194
  752. package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
  753. package/dist/unstable/eventlog/EventLogRemote.js +168 -322
  754. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  755. package/dist/unstable/eventlog/EventLogServer.d.ts +26 -48
  756. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  757. package/dist/unstable/eventlog/EventLogServer.js +128 -199
  758. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  759. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +60 -0
  760. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -0
  761. package/dist/unstable/eventlog/EventLogServerEncrypted.js +166 -0
  762. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -0
  763. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +183 -0
  764. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -0
  765. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +461 -0
  766. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -0
  767. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +117 -0
  768. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -0
  769. package/dist/unstable/eventlog/EventLogSessionAuth.js +284 -0
  770. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -0
  771. package/dist/unstable/eventlog/{SqlEventLogJournal.d.ts → SqlEventJournal.d.ts} +2 -2
  772. package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -0
  773. package/dist/unstable/eventlog/{SqlEventLogJournal.js → SqlEventJournal.js} +28 -21
  774. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -0
  775. package/dist/unstable/eventlog/{SqlEventLogServer.d.ts → SqlEventLogServerEncrypted.d.ts} +5 -5
  776. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -0
  777. package/dist/unstable/eventlog/{SqlEventLogServer.js → SqlEventLogServerEncrypted.js} +69 -27
  778. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -0
  779. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +25 -0
  780. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -0
  781. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +355 -0
  782. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -0
  783. package/dist/unstable/eventlog/index.d.ts +22 -2
  784. package/dist/unstable/eventlog/index.d.ts.map +1 -1
  785. package/dist/unstable/eventlog/index.js +22 -2
  786. package/dist/unstable/eventlog/index.js.map +1 -1
  787. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.d.ts +2 -0
  788. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.d.ts.map +1 -0
  789. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js +89 -0
  790. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js.map +1 -0
  791. package/dist/unstable/http/Cookies.d.ts +51 -6
  792. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  793. package/dist/unstable/http/Cookies.js +27 -6
  794. package/dist/unstable/http/Cookies.js.map +1 -1
  795. package/dist/unstable/http/Etag.d.ts +2 -2
  796. package/dist/unstable/http/Etag.d.ts.map +1 -1
  797. package/dist/unstable/http/Etag.js +7 -3
  798. package/dist/unstable/http/Etag.js.map +1 -1
  799. package/dist/unstable/http/FetchHttpClient.d.ts +6 -3
  800. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  801. package/dist/unstable/http/FetchHttpClient.js +5 -5
  802. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  803. package/dist/unstable/http/Headers.d.ts +24 -4
  804. package/dist/unstable/http/Headers.d.ts.map +1 -1
  805. package/dist/unstable/http/Headers.js +42 -13
  806. package/dist/unstable/http/Headers.js.map +1 -1
  807. package/dist/unstable/http/HttpBody.d.ts +1 -1
  808. package/dist/unstable/http/HttpClient.d.ts +125 -21
  809. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  810. package/dist/unstable/http/HttpClient.js +197 -19
  811. package/dist/unstable/http/HttpClient.js.map +1 -1
  812. package/dist/unstable/http/HttpClientError.d.ts +8 -8
  813. package/dist/unstable/http/HttpClientRequest.d.ts +43 -15
  814. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  815. package/dist/unstable/http/HttpClientRequest.js +131 -21
  816. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  817. package/dist/unstable/http/HttpClientResponse.d.ts +2 -1
  818. package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
  819. package/dist/unstable/http/HttpClientResponse.js +18 -3
  820. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  821. package/dist/unstable/http/HttpEffect.d.ts +13 -11
  822. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  823. package/dist/unstable/http/HttpEffect.js +51 -51
  824. package/dist/unstable/http/HttpEffect.js.map +1 -1
  825. package/dist/unstable/http/HttpIncomingMessage.d.ts +5 -4
  826. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  827. package/dist/unstable/http/HttpIncomingMessage.js +6 -10
  828. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  829. package/dist/unstable/http/HttpMethod.d.ts +4 -4
  830. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  831. package/dist/unstable/http/HttpMethod.js +3 -3
  832. package/dist/unstable/http/HttpMethod.js.map +1 -1
  833. package/dist/unstable/http/HttpMiddleware.d.ts +4 -9
  834. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  835. package/dist/unstable/http/HttpMiddleware.js +47 -43
  836. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  837. package/dist/unstable/http/HttpPlatform.d.ts +2 -2
  838. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  839. package/dist/unstable/http/HttpPlatform.js +5 -4
  840. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  841. package/dist/unstable/http/HttpRouter.d.ts +9 -8
  842. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  843. package/dist/unstable/http/HttpRouter.js +36 -36
  844. package/dist/unstable/http/HttpRouter.js.map +1 -1
  845. package/dist/unstable/http/HttpServer.d.ts +2 -2
  846. package/dist/unstable/http/HttpServer.d.ts.map +1 -1
  847. package/dist/unstable/http/HttpServer.js +4 -4
  848. package/dist/unstable/http/HttpServer.js.map +1 -1
  849. package/dist/unstable/http/HttpServerError.d.ts +22 -34
  850. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  851. package/dist/unstable/http/HttpServerError.js +39 -45
  852. package/dist/unstable/http/HttpServerError.js.map +1 -1
  853. package/dist/unstable/http/HttpServerRequest.d.ts +19 -7
  854. package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
  855. package/dist/unstable/http/HttpServerRequest.js +307 -13
  856. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  857. package/dist/unstable/http/HttpServerRespondable.d.ts +2 -2
  858. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  859. package/dist/unstable/http/HttpServerRespondable.js +5 -5
  860. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  861. package/dist/unstable/http/HttpServerResponse.d.ts +52 -5
  862. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  863. package/dist/unstable/http/HttpServerResponse.js +240 -5
  864. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  865. package/dist/unstable/http/HttpStaticServer.d.ts +69 -0
  866. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -0
  867. package/dist/unstable/http/HttpStaticServer.js +353 -0
  868. package/dist/unstable/http/HttpStaticServer.js.map +1 -0
  869. package/dist/unstable/http/HttpTraceContext.d.ts +3 -2
  870. package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
  871. package/dist/unstable/http/HttpTraceContext.js +27 -15
  872. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  873. package/dist/unstable/http/Multipart.d.ts +7 -7
  874. package/dist/unstable/http/Multipart.d.ts.map +1 -1
  875. package/dist/unstable/http/Multipart.js +7 -7
  876. package/dist/unstable/http/Multipart.js.map +1 -1
  877. package/dist/unstable/http/Url.d.ts +604 -0
  878. package/dist/unstable/http/Url.d.ts.map +1 -0
  879. package/dist/unstable/http/Url.js +256 -0
  880. package/dist/unstable/http/Url.js.map +1 -0
  881. package/dist/unstable/http/UrlParams.d.ts +18 -9
  882. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  883. package/dist/unstable/http/UrlParams.js +6 -7
  884. package/dist/unstable/http/UrlParams.js.map +1 -1
  885. package/dist/unstable/http/index.d.ts +8 -0
  886. package/dist/unstable/http/index.d.ts.map +1 -1
  887. package/dist/unstable/http/index.js +8 -0
  888. package/dist/unstable/http/index.js.map +1 -1
  889. package/dist/unstable/http/internal/preResponseHandler.d.ts +2 -0
  890. package/dist/unstable/http/internal/preResponseHandler.d.ts.map +1 -0
  891. package/dist/unstable/http/internal/preResponseHandler.js +10 -0
  892. package/dist/unstable/http/internal/preResponseHandler.js.map +1 -0
  893. package/dist/unstable/httpapi/HttpApi.d.ts +11 -11
  894. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  895. package/dist/unstable/httpapi/HttpApi.js +8 -8
  896. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  897. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +12 -9
  898. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  899. package/dist/unstable/httpapi/HttpApiBuilder.js +59 -40
  900. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  901. package/dist/unstable/httpapi/HttpApiClient.d.ts +82 -7
  902. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  903. package/dist/unstable/httpapi/HttpApiClient.js +79 -11
  904. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  905. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +210 -105
  906. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  907. package/dist/unstable/httpapi/HttpApiEndpoint.js +52 -47
  908. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  909. package/dist/unstable/httpapi/HttpApiError.d.ts +66 -29
  910. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  911. package/dist/unstable/httpapi/HttpApiError.js +138 -32
  912. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  913. package/dist/unstable/httpapi/HttpApiGroup.d.ts +9 -8
  914. package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
  915. package/dist/unstable/httpapi/HttpApiGroup.js +4 -4
  916. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  917. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +49 -17
  918. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  919. package/dist/unstable/httpapi/HttpApiMiddleware.js +38 -8
  920. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  921. package/dist/unstable/httpapi/HttpApiSchema.d.ts +88 -9
  922. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  923. package/dist/unstable/httpapi/HttpApiSchema.js +86 -11
  924. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  925. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +9 -6
  926. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  927. package/dist/unstable/httpapi/HttpApiSecurity.js +6 -6
  928. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  929. package/dist/unstable/httpapi/OpenApi.d.ts +17 -25
  930. package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
  931. package/dist/unstable/httpapi/OpenApi.js +59 -60
  932. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  933. package/dist/unstable/observability/Otlp.d.ts +12 -12
  934. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  935. package/dist/unstable/observability/OtlpExporter.d.ts +2 -2
  936. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  937. package/dist/unstable/observability/OtlpExporter.js +8 -8
  938. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  939. package/dist/unstable/observability/OtlpLogger.d.ts +4 -4
  940. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  941. package/dist/unstable/observability/OtlpLogger.js +7 -4
  942. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  943. package/dist/unstable/observability/OtlpMetrics.d.ts +4 -4
  944. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  945. package/dist/unstable/observability/OtlpMetrics.js +2 -2
  946. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  947. package/dist/unstable/observability/OtlpSerialization.d.ts +2 -2
  948. package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
  949. package/dist/unstable/observability/OtlpSerialization.js +2 -2
  950. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  951. package/dist/unstable/observability/OtlpTracer.d.ts +4 -4
  952. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  953. package/dist/unstable/observability/OtlpTracer.js +7 -3
  954. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  955. package/dist/unstable/observability/PrometheusMetrics.d.ts +3 -3
  956. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  957. package/dist/unstable/observability/PrometheusMetrics.js +4 -33
  958. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  959. package/dist/unstable/observability/internal/protobuf.js +4 -4
  960. package/dist/unstable/observability/internal/protobuf.js.map +1 -1
  961. package/dist/unstable/persistence/KeyValueStore.d.ts +24 -3
  962. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  963. package/dist/unstable/persistence/KeyValueStore.js +144 -2
  964. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  965. package/dist/unstable/persistence/Persistable.d.ts +2 -2
  966. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  967. package/dist/unstable/persistence/Persistable.js +1 -1
  968. package/dist/unstable/persistence/Persistable.js.map +1 -1
  969. package/dist/unstable/persistence/PersistedCache.d.ts +1 -2
  970. package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
  971. package/dist/unstable/persistence/PersistedCache.js +10 -11
  972. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  973. package/dist/unstable/persistence/PersistedQueue.d.ts +16 -16
  974. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  975. package/dist/unstable/persistence/PersistedQueue.js +9 -9
  976. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  977. package/dist/unstable/persistence/Persistence.d.ts +5 -5
  978. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  979. package/dist/unstable/persistence/Persistence.js +5 -5
  980. package/dist/unstable/persistence/Persistence.js.map +1 -1
  981. package/dist/unstable/persistence/RateLimiter.d.ts +9 -9
  982. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  983. package/dist/unstable/persistence/RateLimiter.js +4 -4
  984. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  985. package/dist/unstable/persistence/Redis.d.ts +3 -3
  986. package/dist/unstable/persistence/Redis.d.ts.map +1 -1
  987. package/dist/unstable/persistence/Redis.js +2 -2
  988. package/dist/unstable/persistence/Redis.js.map +1 -1
  989. package/dist/unstable/process/ChildProcess.d.ts +5 -128
  990. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  991. package/dist/unstable/process/ChildProcess.js +1 -65
  992. package/dist/unstable/process/ChildProcess.js.map +1 -1
  993. package/dist/unstable/process/ChildProcessSpawner.d.ts +83 -8
  994. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  995. package/dist/unstable/process/ChildProcessSpawner.js +22 -2
  996. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  997. package/dist/unstable/reactivity/AsyncResult.d.ts +37 -17
  998. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  999. package/dist/unstable/reactivity/AsyncResult.js +9 -0
  1000. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  1001. package/dist/unstable/reactivity/Atom.d.ts +108 -47
  1002. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1003. package/dist/unstable/reactivity/Atom.js +105 -25
  1004. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1005. package/dist/unstable/reactivity/AtomHttpApi.d.ts +25 -20
  1006. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1007. package/dist/unstable/reactivity/AtomHttpApi.js +58 -26
  1008. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1009. package/dist/unstable/reactivity/AtomRegistry.d.ts +8 -2
  1010. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  1011. package/dist/unstable/reactivity/AtomRegistry.js +57 -14
  1012. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1013. package/dist/unstable/reactivity/AtomRpc.d.ts +12 -12
  1014. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1015. package/dist/unstable/reactivity/AtomRpc.js +59 -31
  1016. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1017. package/dist/unstable/reactivity/Reactivity.d.ts +2 -2
  1018. package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
  1019. package/dist/unstable/reactivity/Reactivity.js +6 -6
  1020. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1021. package/dist/unstable/rpc/Rpc.d.ts +137 -19
  1022. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1023. package/dist/unstable/rpc/Rpc.js +99 -7
  1024. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1025. package/dist/unstable/rpc/RpcClient.d.ts +26 -47
  1026. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1027. package/dist/unstable/rpc/RpcClient.js +117 -75
  1028. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1029. package/dist/unstable/rpc/RpcClientError.d.ts +2 -2
  1030. package/dist/unstable/rpc/RpcGroup.d.ts +15 -11
  1031. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  1032. package/dist/unstable/rpc/RpcGroup.js +30 -20
  1033. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1034. package/dist/unstable/rpc/RpcMiddleware.d.ts +12 -12
  1035. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  1036. package/dist/unstable/rpc/RpcMiddleware.js +5 -5
  1037. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1038. package/dist/unstable/rpc/RpcSchema.d.ts +14 -1
  1039. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  1040. package/dist/unstable/rpc/RpcSchema.js +17 -2
  1041. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1042. package/dist/unstable/rpc/RpcSerialization.d.ts +13 -2
  1043. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1044. package/dist/unstable/rpc/RpcSerialization.js +60 -27
  1045. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1046. package/dist/unstable/rpc/RpcServer.d.ts +8 -12
  1047. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  1048. package/dist/unstable/rpc/RpcServer.js +73 -43
  1049. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1050. package/dist/unstable/rpc/RpcWorker.d.ts +2 -2
  1051. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  1052. package/dist/unstable/rpc/RpcWorker.js +4 -4
  1053. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1054. package/dist/unstable/rpc/Utils.d.ts +6 -3
  1055. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  1056. package/dist/unstable/rpc/Utils.js +46 -5
  1057. package/dist/unstable/rpc/Utils.js.map +1 -1
  1058. package/dist/unstable/schema/Model.d.ts +24 -3
  1059. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1060. package/dist/unstable/schema/Model.js +17 -4
  1061. package/dist/unstable/schema/Model.js.map +1 -1
  1062. package/dist/unstable/schema/VariantSchema.d.ts +7 -7
  1063. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  1064. package/dist/unstable/schema/VariantSchema.js +7 -18
  1065. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1066. package/dist/unstable/socket/Socket.d.ts +35 -15
  1067. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1068. package/dist/unstable/socket/Socket.js +34 -27
  1069. package/dist/unstable/socket/Socket.js.map +1 -1
  1070. package/dist/unstable/socket/SocketServer.d.ts +8 -5
  1071. package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
  1072. package/dist/unstable/socket/SocketServer.js +2 -2
  1073. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1074. package/dist/unstable/sql/Migrator.d.ts +1 -1
  1075. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  1076. package/dist/unstable/sql/Migrator.js +2 -2
  1077. package/dist/unstable/sql/Migrator.js.map +1 -1
  1078. package/dist/unstable/sql/SqlClient.d.ts +24 -6
  1079. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1080. package/dist/unstable/sql/SqlClient.js +37 -32
  1081. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1082. package/dist/unstable/sql/SqlConnection.d.ts +2 -2
  1083. package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
  1084. package/dist/unstable/sql/SqlConnection.js +5 -2
  1085. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1086. package/dist/unstable/sql/SqlError.d.ts +237 -17
  1087. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  1088. package/dist/unstable/sql/SqlError.js +260 -4
  1089. package/dist/unstable/sql/SqlError.js.map +1 -1
  1090. package/dist/unstable/sql/SqlModel.d.ts +8 -9
  1091. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  1092. package/dist/unstable/sql/SqlModel.js +12 -38
  1093. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1094. package/dist/unstable/sql/SqlResolver.js +24 -17
  1095. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1096. package/dist/unstable/sql/SqlSchema.d.ts +17 -6
  1097. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  1098. package/dist/unstable/sql/SqlSchema.js +17 -7
  1099. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1100. package/dist/unstable/sql/Statement.d.ts +3 -5
  1101. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  1102. package/dist/unstable/sql/Statement.js +14 -13
  1103. package/dist/unstable/sql/Statement.js.map +1 -1
  1104. package/dist/unstable/workers/Transferable.d.ts +4 -4
  1105. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  1106. package/dist/unstable/workers/Transferable.js +7 -7
  1107. package/dist/unstable/workers/Transferable.js.map +1 -1
  1108. package/dist/unstable/workers/Worker.d.ts +3 -3
  1109. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  1110. package/dist/unstable/workers/Worker.js +6 -3
  1111. package/dist/unstable/workers/Worker.js.map +1 -1
  1112. package/dist/unstable/workers/WorkerError.d.ts +5 -5
  1113. package/dist/unstable/workers/WorkerRunner.d.ts +2 -2
  1114. package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
  1115. package/dist/unstable/workers/WorkerRunner.js +5 -2
  1116. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1117. package/dist/unstable/workflow/Activity.d.ts +8 -3
  1118. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  1119. package/dist/unstable/workflow/Activity.js +25 -11
  1120. package/dist/unstable/workflow/Activity.js.map +1 -1
  1121. package/dist/unstable/workflow/DurableClock.d.ts +3 -6
  1122. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  1123. package/dist/unstable/workflow/DurableClock.js +6 -6
  1124. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1125. package/dist/unstable/workflow/DurableDeferred.d.ts +2 -5
  1126. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  1127. package/dist/unstable/workflow/DurableDeferred.js +33 -15
  1128. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1129. package/dist/unstable/workflow/Workflow.d.ts +12 -14
  1130. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1131. package/dist/unstable/workflow/Workflow.js +30 -26
  1132. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1133. package/dist/unstable/workflow/WorkflowEngine.d.ts +24 -7
  1134. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  1135. package/dist/unstable/workflow/WorkflowEngine.js +165 -16
  1136. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1137. package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
  1138. package/dist/unstable/workflow/WorkflowProxyServer.js +4 -4
  1139. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1140. package/package.json +11 -10
  1141. package/src/Array.ts +304 -447
  1142. package/src/BigDecimal.ts +137 -82
  1143. package/src/BigInt.ts +53 -45
  1144. package/src/Brand.ts +3 -5
  1145. package/src/Cache.ts +27 -54
  1146. package/src/Cause.ts +57 -22
  1147. package/src/Channel.ts +687 -220
  1148. package/src/Chunk.ts +149 -331
  1149. package/src/Clock.ts +2 -2
  1150. package/src/Combiner.ts +280 -13
  1151. package/src/Config.ts +214 -52
  1152. package/src/ConfigProvider.ts +5 -5
  1153. package/src/Console.ts +2 -2
  1154. package/src/Context.ts +1454 -0
  1155. package/src/Cron.ts +155 -63
  1156. package/src/Data.ts +530 -368
  1157. package/src/DateTime.ts +77 -258
  1158. package/src/Deferred.ts +15 -6
  1159. package/src/Duration.ts +151 -81
  1160. package/src/Effect.ts +1581 -1050
  1161. package/src/Effectable.ts +47 -0
  1162. package/src/Equal.ts +293 -109
  1163. package/src/Equivalence.ts +114 -52
  1164. package/src/ErrorReporter.ts +458 -0
  1165. package/src/ExecutionPlan.ts +8 -9
  1166. package/src/Exit.ts +24 -12
  1167. package/src/Fiber.ts +17 -8
  1168. package/src/FiberHandle.ts +15 -14
  1169. package/src/FiberMap.ts +27 -27
  1170. package/src/FiberSet.ts +5 -5
  1171. package/src/FileSystem.ts +30 -26
  1172. package/src/Filter.ts +4 -62
  1173. package/src/Formatter.ts +268 -60
  1174. package/src/Function.ts +2 -10
  1175. package/src/Graph.ts +123 -112
  1176. package/src/Hash.ts +2 -2
  1177. package/src/HashMap.ts +26 -19
  1178. package/src/Inspectable.ts +2 -22
  1179. package/src/Iterable.ts +117 -63
  1180. package/src/JsonSchema.ts +383 -10
  1181. package/src/Latch.ts +85 -3
  1182. package/src/Layer.ts +728 -441
  1183. package/src/LayerMap.ts +38 -35
  1184. package/src/LogLevel.ts +37 -0
  1185. package/src/Logger.ts +35 -102
  1186. package/src/ManagedRuntime.ts +61 -48
  1187. package/src/Metric.ts +64 -66
  1188. package/src/MutableHashMap.ts +9 -0
  1189. package/src/MutableHashSet.ts +9 -0
  1190. package/src/MutableList.ts +3 -0
  1191. package/src/Newtype.ts +308 -0
  1192. package/src/Number.ts +98 -29
  1193. package/src/Optic.ts +948 -19
  1194. package/src/Option.ts +34 -24
  1195. package/src/Order.ts +39 -32
  1196. package/src/PartitionedSemaphore.ts +414 -0
  1197. package/src/Path.ts +2 -2
  1198. package/src/Pool.ts +9 -9
  1199. package/src/Predicate.ts +1 -1
  1200. package/src/PubSub.ts +20 -11
  1201. package/src/Pull.ts +1 -1
  1202. package/src/Queue.ts +11 -9
  1203. package/src/Random.ts +51 -14
  1204. package/src/RcMap.ts +19 -19
  1205. package/src/RcRef.ts +1 -1
  1206. package/src/Record.ts +94 -199
  1207. package/src/Redactable.ts +146 -72
  1208. package/src/Reducer.ts +166 -7
  1209. package/src/References.ts +283 -287
  1210. package/src/Request.ts +5 -5
  1211. package/src/RequestResolver.ts +34 -35
  1212. package/src/Resource.ts +6 -5
  1213. package/src/Result.ts +2 -4
  1214. package/src/Runtime.ts +102 -6
  1215. package/src/Schedule.ts +243 -336
  1216. package/src/Scheduler.ts +52 -129
  1217. package/src/Schema.ts +3769 -597
  1218. package/src/SchemaAST.ts +480 -302
  1219. package/src/SchemaGetter.ts +80 -24
  1220. package/src/SchemaIssue.ts +28 -15
  1221. package/src/SchemaParser.ts +100 -29
  1222. package/src/SchemaRepresentation.ts +57 -33
  1223. package/src/SchemaTransformation.ts +321 -32
  1224. package/src/Scope.ts +2 -2
  1225. package/src/ScopedCache.ts +8 -8
  1226. package/src/Semaphore.ts +268 -182
  1227. package/src/Sink.ts +89 -34
  1228. package/src/Stdio.ts +29 -6
  1229. package/src/Stream.ts +908 -752
  1230. package/src/String.ts +122 -69
  1231. package/src/Struct.ts +7 -7
  1232. package/src/SubscriptionRef.ts +98 -118
  1233. package/src/Terminal.ts +5 -4
  1234. package/src/Tracer.ts +23 -22
  1235. package/src/Trie.ts +44 -31
  1236. package/src/TxChunk.ts +26 -16
  1237. package/src/TxDeferred.ts +391 -0
  1238. package/src/TxHashMap.ts +347 -291
  1239. package/src/TxHashSet.ts +54 -61
  1240. package/src/TxPriorityQueue.ts +762 -0
  1241. package/src/TxPubSub.ts +787 -0
  1242. package/src/TxQueue.ts +221 -245
  1243. package/src/TxReentrantLock.ts +729 -0
  1244. package/src/TxRef.ts +31 -31
  1245. package/src/TxSemaphore.ts +203 -31
  1246. package/src/TxSubscriptionRef.ts +637 -0
  1247. package/src/Types.ts +75 -23
  1248. package/src/Unify.ts +26 -2
  1249. package/src/Utils.ts +137 -111
  1250. package/src/index.ts +896 -73
  1251. package/src/internal/core.ts +9 -10
  1252. package/src/internal/dateTime.ts +91 -96
  1253. package/src/internal/effect.ts +1168 -621
  1254. package/src/internal/hashMap.ts +12 -10
  1255. package/src/internal/layer.ts +7 -7
  1256. package/src/internal/option.ts +7 -0
  1257. package/src/internal/random.ts +20 -0
  1258. package/src/internal/rcRef.ts +12 -12
  1259. package/src/internal/references.ts +72 -0
  1260. package/src/internal/request.ts +8 -8
  1261. package/src/internal/schedule.ts +3 -1
  1262. package/src/internal/schema/annotations.ts +2 -0
  1263. package/src/internal/schema/representation.ts +82 -97
  1264. package/src/internal/schema/schema.ts +68 -1
  1265. package/src/internal/trie.ts +21 -15
  1266. package/src/testing/TestClock.ts +6 -6
  1267. package/src/testing/TestSchema.ts +333 -36
  1268. package/src/testing/index.ts +64 -1
  1269. package/src/unstable/ai/AiError.ts +111 -53
  1270. package/src/unstable/ai/AnthropicStructuredOutput.ts +7 -3
  1271. package/src/unstable/ai/Chat.ts +136 -88
  1272. package/src/unstable/ai/EmbeddingModel.ts +209 -0
  1273. package/src/unstable/ai/IdGenerator.ts +2 -2
  1274. package/src/unstable/ai/LanguageModel.ts +685 -255
  1275. package/src/unstable/ai/McpSchema.ts +84 -22
  1276. package/src/unstable/ai/McpServer.ts +307 -87
  1277. package/src/unstable/ai/Model.ts +44 -13
  1278. package/src/unstable/ai/OpenAiStructuredOutput.ts +9 -2
  1279. package/src/unstable/ai/Prompt.ts +23 -29
  1280. package/src/unstable/ai/Response.ts +29 -31
  1281. package/src/unstable/ai/ResponseIdTracker.ts +95 -0
  1282. package/src/unstable/ai/Telemetry.ts +2 -2
  1283. package/src/unstable/ai/Tokenizer.ts +2 -2
  1284. package/src/unstable/ai/Tool.ts +62 -36
  1285. package/src/unstable/ai/Toolkit.ts +17 -26
  1286. package/src/unstable/ai/index.ts +24 -1
  1287. package/src/unstable/ai/internal/codec-transformer.ts +3 -9
  1288. package/src/unstable/cli/Argument.ts +5 -8
  1289. package/src/unstable/cli/CliError.ts +67 -66
  1290. package/src/unstable/cli/CliOutput.ts +87 -15
  1291. package/src/unstable/cli/Command.ts +808 -193
  1292. package/src/unstable/cli/Completions.ts +107 -0
  1293. package/src/unstable/cli/Flag.ts +5 -6
  1294. package/src/unstable/cli/GlobalFlag.ts +242 -0
  1295. package/src/unstable/cli/HelpDoc.ts +91 -11
  1296. package/src/unstable/cli/Param.ts +54 -27
  1297. package/src/unstable/cli/Primitive.ts +2 -2
  1298. package/src/unstable/cli/Prompt.ts +275 -104
  1299. package/src/unstable/cli/index.ts +12 -0
  1300. package/src/unstable/cli/internal/command.ts +125 -64
  1301. package/src/unstable/cli/internal/completions/bash.ts +7 -7
  1302. package/src/unstable/cli/internal/completions/{CommandDescriptor.ts → descriptor.ts} +16 -58
  1303. package/src/unstable/cli/internal/completions/fish.ts +7 -7
  1304. package/src/unstable/cli/internal/completions/zsh.ts +8 -14
  1305. package/src/unstable/cli/internal/config.ts +49 -0
  1306. package/src/unstable/cli/internal/help.ts +171 -0
  1307. package/src/unstable/cli/internal/parser.ts +201 -84
  1308. package/src/unstable/cluster/ClusterCron.ts +2 -2
  1309. package/src/unstable/cluster/ClusterSchema.ts +38 -10
  1310. package/src/unstable/cluster/ClusterWorkflowEngine.ts +142 -80
  1311. package/src/unstable/cluster/DeliverAt.ts +1 -1
  1312. package/src/unstable/cluster/Entity.ts +58 -45
  1313. package/src/unstable/cluster/EntityAddress.ts +1 -1
  1314. package/src/unstable/cluster/EntityProxy.ts +3 -3
  1315. package/src/unstable/cluster/EntityProxyServer.ts +6 -6
  1316. package/src/unstable/cluster/EntityResource.ts +6 -6
  1317. package/src/unstable/cluster/HttpRunner.ts +2 -2
  1318. package/src/unstable/cluster/K8sHttpClient.ts +7 -7
  1319. package/src/unstable/cluster/Message.ts +30 -17
  1320. package/src/unstable/cluster/MessageStorage.ts +74 -45
  1321. package/src/unstable/cluster/Reply.ts +13 -10
  1322. package/src/unstable/cluster/Runner.ts +1 -1
  1323. package/src/unstable/cluster/RunnerAddress.ts +1 -1
  1324. package/src/unstable/cluster/RunnerHealth.ts +2 -2
  1325. package/src/unstable/cluster/RunnerServer.ts +11 -14
  1326. package/src/unstable/cluster/RunnerStorage.ts +9 -9
  1327. package/src/unstable/cluster/Runners.ts +22 -18
  1328. package/src/unstable/cluster/ShardId.ts +84 -74
  1329. package/src/unstable/cluster/Sharding.ts +75 -60
  1330. package/src/unstable/cluster/ShardingConfig.ts +39 -40
  1331. package/src/unstable/cluster/Snowflake.ts +2 -2
  1332. package/src/unstable/cluster/SqlMessageStorage.ts +29 -20
  1333. package/src/unstable/cluster/SqlRunnerStorage.ts +13 -7
  1334. package/src/unstable/cluster/internal/entityManager.ts +60 -41
  1335. package/src/unstable/cluster/internal/entityReaper.ts +2 -2
  1336. package/src/unstable/cluster/internal/resourceMap.ts +3 -3
  1337. package/src/unstable/devtools/DevToolsClient.ts +26 -21
  1338. package/src/unstable/devtools/DevToolsSchema.ts +16 -3
  1339. package/src/unstable/encoding/Ndjson.ts +17 -17
  1340. package/src/unstable/encoding/Sse.ts +3 -5
  1341. package/src/unstable/eventlog/Event.ts +0 -8
  1342. package/src/unstable/eventlog/EventGroup.ts +0 -4
  1343. package/src/unstable/eventlog/EventJournal.ts +148 -80
  1344. package/src/unstable/eventlog/EventLog.ts +360 -234
  1345. package/src/unstable/eventlog/EventLogEncryption.ts +18 -32
  1346. package/src/unstable/eventlog/EventLogMessage.ts +277 -0
  1347. package/src/unstable/eventlog/EventLogRemote.ts +264 -410
  1348. package/src/unstable/eventlog/EventLogServer.ts +183 -275
  1349. package/src/unstable/eventlog/EventLogServerEncrypted.ts +206 -0
  1350. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +749 -0
  1351. package/src/unstable/eventlog/EventLogSessionAuth.ts +437 -0
  1352. package/src/unstable/eventlog/{SqlEventLogJournal.ts → SqlEventJournal.ts} +38 -22
  1353. package/src/unstable/eventlog/{SqlEventLogServer.ts → SqlEventLogServerEncrypted.ts} +110 -43
  1354. package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +506 -0
  1355. package/src/unstable/eventlog/index.ts +27 -2
  1356. package/src/unstable/eventlog/internal/identityRootSecretDerivation.ts +153 -0
  1357. package/src/unstable/http/Cookies.ts +94 -11
  1358. package/src/unstable/http/Etag.ts +7 -5
  1359. package/src/unstable/http/FetchHttpClient.ts +5 -5
  1360. package/src/unstable/http/Headers.ts +70 -20
  1361. package/src/unstable/http/HttpClient.ts +385 -42
  1362. package/src/unstable/http/HttpClientRequest.ts +151 -39
  1363. package/src/unstable/http/HttpClientResponse.ts +24 -8
  1364. package/src/unstable/http/HttpEffect.ts +71 -77
  1365. package/src/unstable/http/HttpIncomingMessage.ts +9 -8
  1366. package/src/unstable/http/HttpMethod.ts +16 -4
  1367. package/src/unstable/http/HttpMiddleware.ts +50 -50
  1368. package/src/unstable/http/HttpPlatform.ts +5 -4
  1369. package/src/unstable/http/HttpRouter.ts +46 -46
  1370. package/src/unstable/http/HttpServer.ts +5 -11
  1371. package/src/unstable/http/HttpServerError.ts +45 -47
  1372. package/src/unstable/http/HttpServerRequest.ts +414 -23
  1373. package/src/unstable/http/HttpServerRespondable.ts +6 -6
  1374. package/src/unstable/http/HttpServerResponse.ts +351 -13
  1375. package/src/unstable/http/HttpStaticServer.ts +456 -0
  1376. package/src/unstable/http/HttpTraceContext.ts +31 -17
  1377. package/src/unstable/http/Multipart.ts +8 -8
  1378. package/src/unstable/http/Url.ts +650 -0
  1379. package/src/unstable/http/UrlParams.ts +30 -18
  1380. package/src/unstable/http/index.ts +10 -0
  1381. package/src/unstable/http/internal/preResponseHandler.ts +15 -0
  1382. package/src/unstable/httpapi/HttpApi.ts +22 -22
  1383. package/src/unstable/httpapi/HttpApiBuilder.ts +134 -54
  1384. package/src/unstable/httpapi/HttpApiClient.ts +185 -34
  1385. package/src/unstable/httpapi/HttpApiEndpoint.ts +225 -114
  1386. package/src/unstable/httpapi/HttpApiError.ts +129 -30
  1387. package/src/unstable/httpapi/HttpApiGroup.ts +18 -17
  1388. package/src/unstable/httpapi/HttpApiMiddleware.ts +95 -32
  1389. package/src/unstable/httpapi/HttpApiSchema.ts +106 -11
  1390. package/src/unstable/httpapi/HttpApiSecurity.ts +13 -13
  1391. package/src/unstable/httpapi/OpenApi.ts +74 -73
  1392. package/src/unstable/observability/Otlp.ts +12 -12
  1393. package/src/unstable/observability/OtlpExporter.ts +14 -10
  1394. package/src/unstable/observability/OtlpLogger.ts +13 -9
  1395. package/src/unstable/observability/OtlpMetrics.ts +6 -6
  1396. package/src/unstable/observability/OtlpSerialization.ts +2 -2
  1397. package/src/unstable/observability/OtlpTracer.ts +14 -10
  1398. package/src/unstable/observability/PrometheusMetrics.ts +5 -5
  1399. package/src/unstable/observability/internal/protobuf.ts +4 -4
  1400. package/src/unstable/persistence/KeyValueStore.ts +226 -3
  1401. package/src/unstable/persistence/Persistable.ts +3 -3
  1402. package/src/unstable/persistence/PersistedCache.ts +20 -17
  1403. package/src/unstable/persistence/PersistedQueue.ts +21 -21
  1404. package/src/unstable/persistence/Persistence.ts +7 -7
  1405. package/src/unstable/persistence/RateLimiter.ts +7 -7
  1406. package/src/unstable/persistence/Redis.ts +2 -2
  1407. package/src/unstable/process/ChildProcess.ts +6 -208
  1408. package/src/unstable/process/ChildProcessSpawner.ts +114 -15
  1409. package/src/unstable/reactivity/AsyncResult.ts +59 -17
  1410. package/src/unstable/reactivity/Atom.ts +280 -124
  1411. package/src/unstable/reactivity/AtomHttpApi.ts +127 -61
  1412. package/src/unstable/reactivity/AtomRegistry.ts +70 -16
  1413. package/src/unstable/reactivity/AtomRpc.ts +82 -37
  1414. package/src/unstable/reactivity/Reactivity.ts +6 -6
  1415. package/src/unstable/rpc/Rpc.ts +212 -32
  1416. package/src/unstable/rpc/RpcClient.ts +161 -142
  1417. package/src/unstable/rpc/RpcGroup.ts +51 -34
  1418. package/src/unstable/rpc/RpcMiddleware.ts +28 -22
  1419. package/src/unstable/rpc/RpcSchema.ts +24 -6
  1420. package/src/unstable/rpc/RpcSerialization.ts +97 -54
  1421. package/src/unstable/rpc/RpcServer.ts +91 -65
  1422. package/src/unstable/rpc/RpcWorker.ts +5 -5
  1423. package/src/unstable/rpc/Utils.ts +63 -4
  1424. package/src/unstable/schema/Model.ts +35 -6
  1425. package/src/unstable/schema/VariantSchema.ts +14 -27
  1426. package/src/unstable/socket/Socket.ts +102 -62
  1427. package/src/unstable/socket/SocketServer.ts +2 -2
  1428. package/src/unstable/sql/Migrator.ts +7 -5
  1429. package/src/unstable/sql/SqlClient.ts +48 -19
  1430. package/src/unstable/sql/SqlConnection.ts +2 -2
  1431. package/src/unstable/sql/SqlError.ts +365 -11
  1432. package/src/unstable/sql/SqlModel.ts +57 -85
  1433. package/src/unstable/sql/SqlResolver.ts +28 -20
  1434. package/src/unstable/sql/SqlSchema.ts +42 -26
  1435. package/src/unstable/sql/Statement.ts +21 -25
  1436. package/src/unstable/workers/Transferable.ts +17 -19
  1437. package/src/unstable/workers/Worker.ts +4 -4
  1438. package/src/unstable/workers/WorkerRunner.ts +2 -2
  1439. package/src/unstable/workflow/Activity.ts +36 -13
  1440. package/src/unstable/workflow/DurableClock.ts +11 -11
  1441. package/src/unstable/workflow/DurableDeferred.ts +36 -18
  1442. package/src/unstable/workflow/Workflow.ts +46 -35
  1443. package/src/unstable/workflow/WorkflowEngine.ts +236 -23
  1444. package/src/unstable/workflow/WorkflowProxyServer.ts +4 -4
  1445. package/dist/NullOr.d.ts +0 -149
  1446. package/dist/NullOr.d.ts.map +0 -1
  1447. package/dist/NullOr.js +0 -152
  1448. package/dist/NullOr.js.map +0 -1
  1449. package/dist/ServiceMap.d.ts +0 -1126
  1450. package/dist/ServiceMap.d.ts.map +0 -1
  1451. package/dist/ServiceMap.js.map +0 -1
  1452. package/dist/internal/schema/to-codec.d.ts +0 -2
  1453. package/dist/internal/schema/to-codec.d.ts.map +0 -1
  1454. package/dist/internal/schema/to-codec.js +0 -129
  1455. package/dist/internal/schema/to-codec.js.map +0 -1
  1456. package/dist/unstable/cli/internal/builtInFlags.d.ts +0 -7
  1457. package/dist/unstable/cli/internal/builtInFlags.d.ts.map +0 -1
  1458. package/dist/unstable/cli/internal/builtInFlags.js +0 -44
  1459. package/dist/unstable/cli/internal/builtInFlags.js.map +0 -1
  1460. package/dist/unstable/cli/internal/completions/CommandDescriptor.d.ts +0 -2
  1461. package/dist/unstable/cli/internal/completions/CommandDescriptor.d.ts.map +0 -1
  1462. package/dist/unstable/cli/internal/completions/CommandDescriptor.js.map +0 -1
  1463. package/dist/unstable/cli/internal/completions/Completions.d.ts +0 -2
  1464. package/dist/unstable/cli/internal/completions/Completions.d.ts.map +0 -1
  1465. package/dist/unstable/cli/internal/completions/Completions.js +0 -23
  1466. package/dist/unstable/cli/internal/completions/Completions.js.map +0 -1
  1467. package/dist/unstable/eventlog/SqlEventLogJournal.d.ts.map +0 -1
  1468. package/dist/unstable/eventlog/SqlEventLogJournal.js.map +0 -1
  1469. package/dist/unstable/eventlog/SqlEventLogServer.d.ts.map +0 -1
  1470. package/dist/unstable/eventlog/SqlEventLogServer.js.map +0 -1
  1471. package/src/NullOr.ts +0 -204
  1472. package/src/ServiceMap.ts +0 -1410
  1473. package/src/internal/schema/to-codec.ts +0 -148
  1474. package/src/unstable/cli/internal/builtInFlags.ts +0 -78
  1475. package/src/unstable/cli/internal/completions/Completions.ts +0 -31
package/dist/Stream.d.ts CHANGED
@@ -4,15 +4,16 @@
4
4
  import * as Arr from "./Array.ts";
5
5
  import * as Cause from "./Cause.ts";
6
6
  import * as Channel from "./Channel.ts";
7
+ import * as Context from "./Context.ts";
7
8
  import * as Duration from "./Duration.ts";
8
9
  import * as Effect from "./Effect.ts";
9
10
  import * as ExecutionPlan from "./ExecutionPlan.ts";
10
11
  import * as Exit from "./Exit.ts";
11
- import * as Filter from "./Filter.ts";
12
+ import type * as Filter from "./Filter.ts";
12
13
  import type { LazyArg } from "./Function.ts";
13
14
  import type { TypeLambda } from "./HKT.ts";
14
15
  import type * as Layer from "./Layer.ts";
15
- import type { LogLevel } from "./LogLevel.ts";
16
+ import type { Severity } from "./LogLevel.ts";
16
17
  import * as Option from "./Option.ts";
17
18
  import type { Pipeable } from "./Pipeable.ts";
18
19
  import type { Predicate, Refinement } from "./Predicate.ts";
@@ -22,13 +23,21 @@ import * as Queue from "./Queue.ts";
22
23
  import * as Result from "./Result.ts";
23
24
  import * as Schedule from "./Schedule.ts";
24
25
  import * as Scope from "./Scope.ts";
25
- 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
  /**
@@ -298,6 +307,76 @@ export declare const fromChannel: <Arr extends Arr.NonEmptyReadonlyArray<any>, E
298
307
  * @category Constructors
299
308
  */
300
309
  export declare const fromEffect: <A, E, R>(effect: Effect.Effect<A, E, R>) => Stream<A, E, R>;
310
+ /**
311
+ * Accesses a service from the context and emits it as a single element.
312
+ *
313
+ * @example
314
+ * ```ts
315
+ * import { Effect, Context, Stream } from "effect"
316
+ *
317
+ * class Greeter extends Context.Service<Greeter, {
318
+ * readonly greet: (name: string) => string
319
+ * }>()("Greeter") {}
320
+ *
321
+ * const stream = Stream.service(Greeter).pipe(
322
+ * Stream.map((greeter) => greeter.greet("World"))
323
+ * )
324
+ *
325
+ * const program = Effect.gen(function*() {
326
+ * return yield* stream.pipe(
327
+ * Stream.provideService(Greeter, {
328
+ * greet: (name) => `Hello, ${name}!`
329
+ * }),
330
+ * Stream.runCollect
331
+ * )
332
+ * })
333
+ *
334
+ * Effect.runPromise(program)
335
+ * // Output: [ "Hello, World!" ]
336
+ * ```
337
+ *
338
+ * @since 4.0.0
339
+ * @category Context
340
+ */
341
+ export declare const service: <I, S>(service: Context.Key<I, S>) => Stream<S, never, I>;
342
+ /**
343
+ * Optionally accesses a service from the context and emits the result as a
344
+ * single element.
345
+ *
346
+ * @example
347
+ * ```ts
348
+ * import { Effect, Option, Context, Stream } from "effect"
349
+ *
350
+ * class Greeter extends Context.Service<Greeter, {
351
+ * readonly greet: (name: string) => string
352
+ * }>()("Greeter") {}
353
+ *
354
+ * const stream = Stream.serviceOption(Greeter).pipe(
355
+ * Stream.map((maybeGreeter) =>
356
+ * Option.match(maybeGreeter, {
357
+ * onNone: () => "No greeter",
358
+ * onSome: (greeter) => greeter.greet("World")
359
+ * })
360
+ * )
361
+ * )
362
+ *
363
+ * const program = Effect.gen(function*() {
364
+ * return yield* stream.pipe(
365
+ * Stream.provideService(Greeter, {
366
+ * greet: (name) => `Hello, ${name}!`
367
+ * }),
368
+ * Stream.runCollect
369
+ * )
370
+ * })
371
+ *
372
+ * Effect.runPromise(program)
373
+ * // Output: [ "Hello, World!" ]
374
+ * ```
375
+ *
376
+ * @since 4.0.0
377
+ * @category Context
378
+ */
379
+ export declare const serviceOption: <I, S>(service: Context.Key<I, S>) => Stream<Option.Option<S>>;
301
380
  /**
302
381
  * Creates a stream that runs the effect and emits no elements.
303
382
  *
@@ -401,7 +480,7 @@ export declare const fromEffectSchedule: <A, E, R, X, AS extends A, ES, RS>(effe
401
480
  * @since 2.0.0
402
481
  * @category Constructors
403
482
  */
404
- export declare const tick: (interval: Duration.DurationInput) => Stream<void>;
483
+ export declare const tick: (interval: Duration.Input) => Stream<void>;
405
484
  /**
406
485
  * Creates a stream from a pull effect, such as one produced by `Stream.toPull`.
407
486
  *
@@ -823,6 +902,10 @@ export declare const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, max
823
902
  /**
824
903
  * Creates a new `Stream` from an iterable collection of values.
825
904
  *
905
+ * **Options**
906
+ *
907
+ * - `chunkSize`: Maximum number of values emitted per chunk.
908
+ *
826
909
  * @example
827
910
  * ```ts
828
911
  * import { Console, Effect, Stream } from "effect"
@@ -842,15 +925,17 @@ export declare const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, max
842
925
  * @since 2.0.0
843
926
  * @category Constructors
844
927
  */
845
- export declare const fromIterable: <A>(iterable: Iterable<A>) => Stream<A>;
928
+ export declare const fromIterable: <A>(iterable: Iterable<A>, options?: {
929
+ readonly chunkSize?: number | undefined;
930
+ }) => Stream<A>;
846
931
  /**
847
932
  * Creates a stream from an effect producing an iterable of values.
848
933
  *
849
934
  * @example
850
935
  * ```ts
851
- * import { Console, Effect, ServiceMap, Stream } from "effect"
936
+ * import { Console, Effect, Context, Stream } from "effect"
852
937
  *
853
- * class UserRepo extends ServiceMap.Service<UserRepo, {
938
+ * class UserRepo extends Context.Service<UserRepo, {
854
939
  * readonly list: Effect.Effect<ReadonlyArray<string>>
855
940
  * }>()("UserRepo") {}
856
941
  *
@@ -1083,7 +1168,9 @@ export declare const fromPubSubTake: <A, E>(pubsub: PubSub.PubSub<Take.Take<A, E
1083
1168
  *
1084
1169
  * @example
1085
1170
  * ```ts
1086
- * import { Console, Effect, Stream } from "effect"
1171
+ * import { Console, Data, Effect, Stream } from "effect"
1172
+ *
1173
+ * class StreamError extends Data.TaggedError("StreamError")<{ readonly cause: unknown }> {}
1087
1174
  *
1088
1175
  * const readableStream = new ReadableStream({
1089
1176
  * start(controller) {
@@ -1097,7 +1184,7 @@ export declare const fromPubSubTake: <A, E>(pubsub: PubSub.PubSub<Take.Take<A, E
1097
1184
  * const program = Effect.gen(function*() {
1098
1185
  * const stream = Stream.fromReadableStream({
1099
1186
  * evaluate: () => readableStream,
1100
- * onError: (error) => new Error(String(error))
1187
+ * onError: (cause) => new StreamError({ cause })
1101
1188
  * })
1102
1189
  * const values = yield* Stream.runCollect(stream)
1103
1190
  * yield* Console.log(values)
@@ -1120,7 +1207,9 @@ export declare const fromReadableStream: <A, E>(options: {
1120
1207
  *
1121
1208
  * @example
1122
1209
  * ```ts
1123
- * import { Console, Effect, Stream } from "effect"
1210
+ * import { Console, Data, Effect, Stream } from "effect"
1211
+ *
1212
+ * class StreamError extends Data.TaggedError("StreamError")<{ readonly cause: unknown }> {}
1124
1213
  *
1125
1214
  * const iterable = (async function*() {
1126
1215
  * yield 1
@@ -1129,7 +1218,7 @@ export declare const fromReadableStream: <A, E>(options: {
1129
1218
  * })()
1130
1219
  *
1131
1220
  * const program = Effect.gen(function*() {
1132
- * const stream = Stream.fromAsyncIterable(iterable, (error) => new Error(String(error)))
1221
+ * const stream = Stream.fromAsyncIterable(iterable, (cause) => new StreamError({ cause }))
1133
1222
  * const values = yield* Stream.runCollect(stream)
1134
1223
  * yield* Console.log(values)
1135
1224
  * })
@@ -1152,7 +1241,7 @@ export declare const fromAsyncIterable: <A, E>(iterable: AsyncIterable<A>, onErr
1152
1241
  *
1153
1242
  * const program = Effect.gen(function*() {
1154
1243
  * const schedule = Schedule.spaced("50 millis").pipe(
1155
- * Schedule.compose(Schedule.recurs(2))
1244
+ * Schedule.both(Schedule.recurs(2))
1156
1245
  * )
1157
1246
  * const stream = Stream.fromSchedule(schedule)
1158
1247
  * const values = yield* Stream.runCollect(stream)
@@ -2767,7 +2856,7 @@ export declare const timeout: {
2767
2856
  * @since 2.0.0
2768
2857
  * @category Rate Limiting
2769
2858
  */
2770
- (duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
2859
+ (duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
2771
2860
  /**
2772
2861
  * Ends the stream if it does not produce a value within the specified duration.
2773
2862
  *
@@ -2791,7 +2880,29 @@ export declare const timeout: {
2791
2880
  * @since 2.0.0
2792
2881
  * @category Rate Limiting
2793
2882
  */
2794
- <A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>;
2883
+ <A, E, R>(self: Stream<A, E, R>, duration: Duration.Input): Stream<A, E, R>;
2884
+ };
2885
+ /**
2886
+ * @since 2.0.0
2887
+ * @category Rate Limiting
2888
+ */
2889
+ export declare const timeoutOrElse: {
2890
+ /**
2891
+ * @since 2.0.0
2892
+ * @category Rate Limiting
2893
+ */
2894
+ <B, E2, R2>(options: {
2895
+ readonly duration: Duration.Input;
2896
+ readonly orElse: () => Stream<B, E2, R2>;
2897
+ }): <A, E, R>(self: Stream<A, E, R>) => Stream<A | B, E | E2, R | R2>;
2898
+ /**
2899
+ * @since 2.0.0
2900
+ * @category Rate Limiting
2901
+ */
2902
+ <A, E, R, B, E2, R2>(self: Stream<A, E, R>, options: {
2903
+ readonly duration: Duration.Input;
2904
+ readonly orElse: () => Stream<B, E2, R2>;
2905
+ }): Stream<A | B, E | E2, R | R2>;
2795
2906
  };
2796
2907
  /**
2797
2908
  * Repeats each element of the stream according to the provided schedule,
@@ -4775,7 +4886,7 @@ export declare const filter: {
4775
4886
  * @since 2.0.0
4776
4887
  * @category Filtering
4777
4888
  */
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>;
4889
+ <A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
4779
4890
  /**
4780
4891
  * Filters a stream to the elements that satisfy a predicate.
4781
4892
  *
@@ -4821,20 +4932,38 @@ export declare const filter: {
4821
4932
  * @since 2.0.0
4822
4933
  * @category Filtering
4823
4934
  */
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>;
4935
+ <A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
4825
4936
  };
4826
4937
  /**
4827
- * Effectfully filters and maps elements in a single pass.
4938
+ * Filters and maps stream elements in one pass using a `Filter`.
4939
+ *
4940
+ * @since 4.0.0
4941
+ * @category Filtering
4942
+ */
4943
+ export declare const filterMap: {
4944
+ /**
4945
+ * Filters and maps stream elements in one pass using a `Filter`.
4946
+ *
4947
+ * @since 4.0.0
4948
+ * @category Filtering
4949
+ */
4950
+ <A, B, X>(filter: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
4951
+ /**
4952
+ * Filters and maps stream elements in one pass using a `Filter`.
4953
+ *
4954
+ * @since 4.0.0
4955
+ * @category Filtering
4956
+ */
4957
+ <A, E, R, B, X>(self: Stream<A, E, R>, filter: Filter.Filter<A, B, X>): Stream<B, E, R>;
4958
+ };
4959
+ /**
4960
+ * Effectfully filters elements in a single pass.
4828
4961
  *
4829
4962
  * @example
4830
4963
  * ```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
- * )
4964
+ * import { Console, Effect, Stream } from "effect"
4836
4965
  *
4837
- * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect(filter))
4966
+ * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect((n) => Effect.succeed(n > 2)))
4838
4967
  *
4839
4968
  * const program = Effect.gen(function*() {
4840
4969
  * const result = yield* Stream.runCollect(stream)
@@ -4842,7 +4971,7 @@ export declare const filter: {
4842
4971
  * })
4843
4972
  *
4844
4973
  * Effect.runPromise(program)
4845
- * // Output: [ 4, 5 ]
4974
+ * // Output: [ 3, 4 ]
4846
4975
  * ```
4847
4976
  *
4848
4977
  * @since 2.0.0
@@ -4850,17 +4979,13 @@ export declare const filter: {
4850
4979
  */
4851
4980
  export declare const filterEffect: {
4852
4981
  /**
4853
- * Effectfully filters and maps elements in a single pass.
4982
+ * Effectfully filters elements in a single pass.
4854
4983
  *
4855
4984
  * @example
4856
4985
  * ```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
- * )
4986
+ * import { Console, Effect, Stream } from "effect"
4862
4987
  *
4863
- * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect(filter))
4988
+ * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect((n) => Effect.succeed(n > 2)))
4864
4989
  *
4865
4990
  * const program = Effect.gen(function*() {
4866
4991
  * const result = yield* Stream.runCollect(stream)
@@ -4868,25 +4993,21 @@ export declare const filterEffect: {
4868
4993
  * })
4869
4994
  *
4870
4995
  * Effect.runPromise(program)
4871
- * // Output: [ 4, 5 ]
4996
+ * // Output: [ 3, 4 ]
4872
4997
  * ```
4873
4998
  *
4874
4999
  * @since 2.0.0
4875
5000
  * @category Filtering
4876
5001
  */
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>;
5002
+ <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
5003
  /**
4879
- * Effectfully filters and maps elements in a single pass.
5004
+ * Effectfully filters elements in a single pass.
4880
5005
  *
4881
5006
  * @example
4882
5007
  * ```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
- * )
5008
+ * import { Console, Effect, Stream } from "effect"
4888
5009
  *
4889
- * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect(filter))
5010
+ * const stream = Stream.make(1, 2, 3, 4).pipe(Stream.filterEffect((n) => Effect.succeed(n > 2)))
4890
5011
  *
4891
5012
  * const program = Effect.gen(function*() {
4892
5013
  * const result = yield* Stream.runCollect(stream)
@@ -4894,28 +5015,48 @@ export declare const filterEffect: {
4894
5015
  * })
4895
5016
  *
4896
5017
  * Effect.runPromise(program)
4897
- * // Output: [ 4, 5 ]
5018
+ * // Output: [ 3, 4 ]
4898
5019
  * ```
4899
5020
  *
4900
5021
  * @since 2.0.0
4901
5022
  * @category Filtering
4902
5023
  */
5024
+ <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>;
5025
+ };
5026
+ /**
5027
+ * Effectfully filters and maps elements in a single pass.
5028
+ *
5029
+ * @since 4.0.0
5030
+ * @category Filtering
5031
+ */
5032
+ export declare const filterMapEffect: {
5033
+ /**
5034
+ * Effectfully filters and maps elements in a single pass.
5035
+ *
5036
+ * @since 4.0.0
5037
+ * @category Filtering
5038
+ */
5039
+ <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>;
5040
+ /**
5041
+ * Effectfully filters and maps elements in a single pass.
5042
+ *
5043
+ * @since 4.0.0
5044
+ * @category Filtering
5045
+ */
4903
5046
  <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
5047
  };
4905
5048
  /**
4906
- * Partitions a stream using a Filter and exposes passing and failing values as queues.
5049
+ * Partitions a stream using a `Filter` and exposes passing and failing values as queues.
4907
5050
  *
4908
5051
  * Each queue fails with the stream error or `Cause.Done` when the source ends.
4909
5052
  *
4910
5053
  * @example
4911
5054
  * ```ts
4912
- * import { Console, Effect, Filter, Result, Stream } from "effect"
5055
+ * import { Console, Effect, Result, Stream } from "effect"
4913
5056
  *
4914
5057
  * const program = Effect.gen(function*() {
4915
5058
  * 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
- * )
5059
+ * Stream.partitionQueue((n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
4919
5060
  * )
4920
5061
  *
4921
5062
  * const passValues = yield* Stream.fromQueue(passes).pipe(Stream.runCollect)
@@ -4935,56 +5076,17 @@ export declare const filterEffect: {
4935
5076
  */
4936
5077
  export declare const partitionQueue: {
4937
5078
  /**
4938
- * Partitions a stream using a Filter and exposes passing and failing values as queues.
4939
- *
4940
- * Each queue fails with the stream error or `Cause.Done` when the source ends.
4941
- *
4942
- * @example
4943
- * ```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.
5079
+ * Partitions a stream using a `Filter` and exposes passing and failing values as queues.
4976
5080
  *
4977
5081
  * Each queue fails with the stream error or `Cause.Done` when the source ends.
4978
5082
  *
4979
5083
  * @example
4980
5084
  * ```ts
4981
- * import { Console, Effect, Filter, Result, Stream } from "effect"
5085
+ * import { Console, Effect, Result, Stream } from "effect"
4982
5086
  *
4983
5087
  * const program = Effect.gen(function*() {
4984
5088
  * 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
- * )
5089
+ * Stream.partitionQueue((n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
4988
5090
  * )
4989
5091
  *
4990
5092
  * const passValues = yield* Stream.fromQueue(passes).pipe(Stream.runCollect)
@@ -5002,63 +5104,24 @@ export declare const partitionQueue: {
5002
5104
  * @since 4.0.0
5003
5105
  * @category Filtering
5004
5106
  */
5005
- <A, Result extends Filter.ResultOrBool>(filter: Filter.OrPredicate<NoInfer<A>, Result>, options?: {
5107
+ <A, Pass, Fail>(filter: Filter.Filter<NoInfer<A>, Pass, Fail>, options?: {
5006
5108
  readonly capacity?: number | "unbounded" | undefined;
5007
5109
  }): <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>
5110
+ passes: Queue.Dequeue<Pass, E | Cause.Done>,
5111
+ fails: Queue.Dequeue<Fail, E | Cause.Done>
5047
5112
  ], never, R | Scope.Scope>;
5048
5113
  /**
5049
- * Partitions a stream using a Filter and exposes passing and failing values as queues.
5114
+ * Partitions a stream using a `Filter` and exposes passing and failing values as queues.
5050
5115
  *
5051
5116
  * Each queue fails with the stream error or `Cause.Done` when the source ends.
5052
5117
  *
5053
5118
  * @example
5054
5119
  * ```ts
5055
- * import { Console, Effect, Filter, Result, Stream } from "effect"
5120
+ * import { Console, Effect, Result, Stream } from "effect"
5056
5121
  *
5057
5122
  * const program = Effect.gen(function*() {
5058
5123
  * 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
- * )
5124
+ * Stream.partitionQueue((n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
5062
5125
  * )
5063
5126
  *
5064
5127
  * const passValues = yield* Stream.fromQueue(passes).pipe(Stream.runCollect)
@@ -5076,119 +5139,49 @@ export declare const partitionQueue: {
5076
5139
  * @since 4.0.0
5077
5140
  * @category Filtering
5078
5141
  */
5079
- <A, E, R, Result extends Filter.ResultOrBool>(self: Stream<A, E, R>, filter: Filter.OrPredicate<NoInfer<A>, Result>, options?: {
5142
+ <A, E, R, Pass, Fail>(self: Stream<A, E, R>, filter: Filter.Filter<NoInfer<A>, Pass, Fail>, options?: {
5080
5143
  readonly capacity?: number | "unbounded" | undefined;
5081
5144
  }): Effect.Effect<[
5082
- passes: Queue.Dequeue<Filter.Pass<A, Result>, E | Cause.Done>,
5083
- fails: Queue.Dequeue<Filter.Fail<A, Result>, E | Cause.Done>
5145
+ passes: Queue.Dequeue<Pass, E | Cause.Done>,
5146
+ fails: Queue.Dequeue<Fail, E | Cause.Done>
5084
5147
  ], never, R | Scope.Scope>;
5085
5148
  };
5086
5149
  /**
5087
- * Splits a stream using an effectful filter, producing pass and fail streams.
5150
+ * Splits a stream using an effectful `Filter`, producing pass and fail streams.
5088
5151
  *
5089
5152
  * @since 4.0.0
5090
5153
  * @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
5154
  */
5115
5155
  export declare const partitionEffect: {
5116
5156
  /**
5117
- * Splits a stream using an effectful filter, producing pass and fail streams.
5157
+ * Splits a stream using an effectful `Filter`, producing pass and fail streams.
5118
5158
  *
5119
5159
  * @since 4.0.0
5120
5160
  * @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
5161
  */
5145
- <A, B, X, EX, RX>(filter: Filter.FilterEffect<A, B, X, EX, RX>, options?: {
5162
+ <A, Pass, Fail, EX, RX>(filter: Filter.FilterEffect<NoInfer<A>, Pass, Fail, EX, RX>, options?: {
5146
5163
  readonly capacity?: number | "unbounded" | undefined;
5147
5164
  readonly concurrency?: number | "unbounded" | undefined;
5148
5165
  }): <E, R>(self: Stream<A, E, R>) => Effect.Effect<[
5149
- passes: Stream<B, E | EX>,
5150
- fails: Stream<X, E | EX>
5166
+ passes: Stream<Pass, E | EX>,
5167
+ fails: Stream<Fail, E | EX>
5151
5168
  ], never, R | RX | Scope.Scope>;
5152
5169
  /**
5153
- * Splits a stream using an effectful filter, producing pass and fail streams.
5170
+ * Splits a stream using an effectful `Filter`, producing pass and fail streams.
5154
5171
  *
5155
5172
  * @since 4.0.0
5156
5173
  * @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
5174
  */
5181
- <A, E, R, B, X, EX, RX>(self: Stream<A, E, R>, filter: Filter.FilterEffect<A, B, X, EX, RX>, options?: {
5175
+ <A, E, R, Pass, Fail, EX, RX>(self: Stream<A, E, R>, filter: Filter.FilterEffect<NoInfer<A>, Pass, Fail, EX, RX>, options?: {
5182
5176
  readonly capacity?: number | "unbounded" | undefined;
5183
5177
  readonly concurrency?: number | "unbounded" | undefined;
5184
5178
  }): Effect.Effect<[
5185
- passes: Stream<B, E | EX>,
5186
- fails: Stream<X, E | EX>
5179
+ passes: Stream<Pass, E | EX>,
5180
+ fails: Stream<Fail, E | EX>
5187
5181
  ], never, R | RX | Scope.Scope>;
5188
5182
  };
5189
5183
  /**
5190
- * Splits a stream into excluded and satisfying substreams using a predicate,
5191
- * refinement, or Filter.
5184
+ * Splits a stream into excluded and satisfying substreams using a `Filter`.
5192
5185
  *
5193
5186
  * The faster stream may advance up to `bufferSize` elements ahead of the slower
5194
5187
  * one.
@@ -5198,12 +5191,12 @@ export declare const partitionEffect: {
5198
5191
  *
5199
5192
  * @example
5200
5193
  * ```ts
5201
- * import { Console, Effect, Stream } from "effect"
5194
+ * import { Console, Effect, Result, Stream } from "effect"
5202
5195
  *
5203
5196
  * const program = Effect.gen(function*() {
5204
5197
  * const [excluded, satisfying] = yield* Stream.partition(
5205
5198
  * Stream.make(1, 2, 3, 4),
5206
- * (n) => n % 2 === 0
5199
+ * (n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n)
5207
5200
  * )
5208
5201
  * const left = yield* Stream.runCollect(excluded)
5209
5202
  * const right = yield* Stream.runCollect(satisfying)
@@ -5216,42 +5209,7 @@ export declare const partitionEffect: {
5216
5209
  */
5217
5210
  export declare const partition: {
5218
5211
  /**
5219
- * Splits a stream into excluded and satisfying substreams using a predicate,
5220
- * refinement, or Filter.
5221
- *
5222
- * The faster stream may advance up to `bufferSize` elements ahead of the slower
5223
- * one.
5224
- *
5225
- * @since 4.0.0
5226
- * @category Filtering
5227
- *
5228
- * @example
5229
- * ```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.
5212
+ * Splits a stream into excluded and satisfying substreams using a `Filter`.
5255
5213
  *
5256
5214
  * The faster stream may advance up to `bufferSize` elements ahead of the slower
5257
5215
  * one.
@@ -5261,12 +5219,12 @@ export declare const partition: {
5261
5219
  *
5262
5220
  * @example
5263
5221
  * ```ts
5264
- * import { Console, Effect, Stream } from "effect"
5222
+ * import { Console, Effect, Result, Stream } from "effect"
5265
5223
  *
5266
5224
  * const program = Effect.gen(function*() {
5267
5225
  * const [excluded, satisfying] = yield* Stream.partition(
5268
5226
  * Stream.make(1, 2, 3, 4),
5269
- * (n) => n % 2 === 0
5227
+ * (n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n)
5270
5228
  * )
5271
5229
  * const left = yield* Stream.runCollect(excluded)
5272
5230
  * const right = yield* Stream.runCollect(satisfying)
@@ -5277,49 +5235,14 @@ export declare const partition: {
5277
5235
  * })
5278
5236
  * ```
5279
5237
  */
5280
- <A, Result extends Filter.ResultOrBool>(filter: Filter.OrPredicate<NoInfer<A>, Result>, options?: {
5238
+ <A, Pass, Fail>(filter: Filter.Filter<NoInfer<A>, Pass, Fail>, options?: {
5281
5239
  readonly bufferSize?: number | undefined;
5282
5240
  }): <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>
5241
+ excluded: Stream<Fail, E>,
5242
+ satisfying: Stream<Pass, E>
5319
5243
  ], never, R | Scope.Scope>;
5320
5244
  /**
5321
- * Splits a stream into excluded and satisfying substreams using a predicate,
5322
- * refinement, or Filter.
5245
+ * Splits a stream into excluded and satisfying substreams using a `Filter`.
5323
5246
  *
5324
5247
  * The faster stream may advance up to `bufferSize` elements ahead of the slower
5325
5248
  * one.
@@ -5329,12 +5252,12 @@ export declare const partition: {
5329
5252
  *
5330
5253
  * @example
5331
5254
  * ```ts
5332
- * import { Console, Effect, Stream } from "effect"
5255
+ * import { Console, Effect, Result, Stream } from "effect"
5333
5256
  *
5334
5257
  * const program = Effect.gen(function*() {
5335
5258
  * const [excluded, satisfying] = yield* Stream.partition(
5336
5259
  * Stream.make(1, 2, 3, 4),
5337
- * (n) => n % 2 === 0
5260
+ * (n) => n % 2 === 0 ? Result.succeed(n) : Result.fail(n)
5338
5261
  * )
5339
5262
  * const left = yield* Stream.runCollect(excluded)
5340
5263
  * const right = yield* Stream.runCollect(satisfying)
@@ -5345,11 +5268,11 @@ export declare const partition: {
5345
5268
  * })
5346
5269
  * ```
5347
5270
  */
5348
- <A, E, R, Result extends Filter.ResultOrBool>(self: Stream<A, E, R>, filter: Filter.OrPredicate<NoInfer<A>, Result>, options?: {
5271
+ <A, E, R, Pass, Fail>(self: Stream<A, E, R>, filter: Filter.Filter<NoInfer<A>, Pass, Fail>, options?: {
5349
5272
  readonly bufferSize?: number | undefined;
5350
5273
  }): Effect.Effect<[
5351
- excluded: Stream<Filter.Fail<A, Result>, E>,
5352
- satisfying: Stream<Filter.Pass<A, Result>, E>
5274
+ excluded: Stream<Fail, E>,
5275
+ satisfying: Stream<Pass, E>
5353
5276
  ], never, R | Scope.Scope>;
5354
5277
  };
5355
5278
  /**
@@ -6043,7 +5966,7 @@ export declare const tapError: {
6043
5966
  <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
5967
  };
6045
5968
  /**
6046
- * Recovers from errors that match a filter by switching to a recovery stream.
5969
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6047
5970
  *
6048
5971
  * When a failure matches the filter, the stream switches to the recovery
6049
5972
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6057,12 +5980,12 @@ export declare const tapError: {
6057
5980
  *
6058
5981
  * @example
6059
5982
  * ```ts
6060
- * import { Console, Effect, Filter, Stream } from "effect"
5983
+ * import { Console, Effect, Stream } from "effect"
6061
5984
  *
6062
5985
  * const stream = Stream.make(1, 2).pipe(
6063
5986
  * Stream.concat(Stream.fail(42)),
6064
5987
  * Stream.catchIf(
6065
- * Filter.fromPredicate((error): error is 42 => error === 42),
5988
+ * (error): error is 42 => error === 42,
6066
5989
  * () => Stream.make(999)
6067
5990
  * )
6068
5991
  * )
@@ -6081,7 +6004,7 @@ export declare const tapError: {
6081
6004
  */
6082
6005
  export declare const catchIf: {
6083
6006
  /**
6084
- * Recovers from errors that match a filter by switching to a recovery stream.
6007
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6085
6008
  *
6086
6009
  * When a failure matches the filter, the stream switches to the recovery
6087
6010
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6095,12 +6018,12 @@ export declare const catchIf: {
6095
6018
  *
6096
6019
  * @example
6097
6020
  * ```ts
6098
- * import { Console, Effect, Filter, Stream } from "effect"
6021
+ * import { Console, Effect, Stream } from "effect"
6099
6022
  *
6100
6023
  * const stream = Stream.make(1, 2).pipe(
6101
6024
  * Stream.concat(Stream.fail(42)),
6102
6025
  * Stream.catchIf(
6103
- * Filter.fromPredicate((error): error is 42 => error === 42),
6026
+ * (error): error is 42 => error === 42,
6104
6027
  * () => Stream.make(999)
6105
6028
  * )
6106
6029
  * )
@@ -6119,7 +6042,7 @@ export declare const catchIf: {
6119
6042
  */
6120
6043
  <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
6044
  /**
6122
- * Recovers from errors that match a filter by switching to a recovery stream.
6045
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6123
6046
  *
6124
6047
  * When a failure matches the filter, the stream switches to the recovery
6125
6048
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6133,12 +6056,12 @@ export declare const catchIf: {
6133
6056
  *
6134
6057
  * @example
6135
6058
  * ```ts
6136
- * import { Console, Effect, Filter, Stream } from "effect"
6059
+ * import { Console, Effect, Stream } from "effect"
6137
6060
  *
6138
6061
  * const stream = Stream.make(1, 2).pipe(
6139
6062
  * Stream.concat(Stream.fail(42)),
6140
6063
  * Stream.catchIf(
6141
- * Filter.fromPredicate((error): error is 42 => error === 42),
6064
+ * (error): error is 42 => error === 42,
6142
6065
  * () => Stream.make(999)
6143
6066
  * )
6144
6067
  * )
@@ -6155,9 +6078,9 @@ export declare const catchIf: {
6155
6078
  * @since 4.0.0
6156
6079
  * @category Error Handling
6157
6080
  */
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>;
6081
+ <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
6082
  /**
6160
- * Recovers from errors that match a filter by switching to a recovery stream.
6083
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6161
6084
  *
6162
6085
  * When a failure matches the filter, the stream switches to the recovery
6163
6086
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6171,12 +6094,12 @@ export declare const catchIf: {
6171
6094
  *
6172
6095
  * @example
6173
6096
  * ```ts
6174
- * import { Console, Effect, Filter, Stream } from "effect"
6097
+ * import { Console, Effect, Stream } from "effect"
6175
6098
  *
6176
6099
  * const stream = Stream.make(1, 2).pipe(
6177
6100
  * Stream.concat(Stream.fail(42)),
6178
6101
  * Stream.catchIf(
6179
- * Filter.fromPredicate((error): error is 42 => error === 42),
6102
+ * (error): error is 42 => error === 42,
6180
6103
  * () => Stream.make(999)
6181
6104
  * )
6182
6105
  * )
@@ -6195,7 +6118,7 @@ export declare const catchIf: {
6195
6118
  */
6196
6119
  <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
6120
  /**
6198
- * Recovers from errors that match a filter by switching to a recovery stream.
6121
+ * Recovers from errors that match a predicate by switching to a recovery stream.
6199
6122
  *
6200
6123
  * When a failure matches the filter, the stream switches to the recovery
6201
6124
  * stream. Non-matching failures propagate downstream, so the error type is
@@ -6209,12 +6132,12 @@ export declare const catchIf: {
6209
6132
  *
6210
6133
  * @example
6211
6134
  * ```ts
6212
- * import { Console, Effect, Filter, Stream } from "effect"
6135
+ * import { Console, Effect, Stream } from "effect"
6213
6136
  *
6214
6137
  * const stream = Stream.make(1, 2).pipe(
6215
6138
  * Stream.concat(Stream.fail(42)),
6216
6139
  * Stream.catchIf(
6217
- * Filter.fromPredicate((error): error is 42 => error === 42),
6140
+ * (error): error is 42 => error === 42,
6218
6141
  * () => Stream.make(999)
6219
6142
  * )
6220
6143
  * )
@@ -6231,7 +6154,32 @@ export declare const catchIf: {
6231
6154
  * @since 4.0.0
6232
6155
  * @category Error Handling
6233
6156
  */
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>;
6157
+ <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>;
6158
+ };
6159
+ /**
6160
+ * Recovers from errors that match a `Filter` by switching to a recovery
6161
+ * stream.
6162
+ *
6163
+ * @since 4.0.0
6164
+ * @category Error Handling
6165
+ */
6166
+ export declare const catchFilter: {
6167
+ /**
6168
+ * Recovers from errors that match a `Filter` by switching to a recovery
6169
+ * stream.
6170
+ *
6171
+ * @since 4.0.0
6172
+ * @category Error Handling
6173
+ */
6174
+ <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>;
6175
+ /**
6176
+ * Recovers from errors that match a `Filter` by switching to a recovery
6177
+ * stream.
6178
+ *
6179
+ * @since 4.0.0
6180
+ * @category Error Handling
6181
+ */
6182
+ <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
6183
  };
6236
6184
  /**
6237
6185
  * Recovers from failures whose `_tag` matches the provided value by switching to
@@ -6567,7 +6515,7 @@ export declare const catchReason: {
6567
6515
  * @since 4.0.0
6568
6516
  * @category Error Handling
6569
6517
  */
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>;
6518
+ <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
6519
  /**
6572
6520
  * Catches a specific reason within a tagged error.
6573
6521
  *
@@ -6611,7 +6559,7 @@ export declare const catchReason: {
6611
6559
  * @since 4.0.0
6612
6560
  * @category Error Handling
6613
6561
  */
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>;
6562
+ <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
6563
  };
6616
6564
  /**
6617
6565
  * Catches multiple reasons within a tagged error using an object of handlers.
@@ -6697,8 +6645,8 @@ export declare const catchReasons: {
6697
6645
  * @category Error Handling
6698
6646
  */
6699
6647
  <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> | {
6648
+ [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>;
6649
+ }, 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
6650
  [RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<infer A, any, any> ? A : never;
6703
6651
  }[keyof Cases], (A2 extends unassigned ? E : ExcludeTag<E, K>) | E2 | {
6704
6652
  [RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, infer E, any> ? E : never;
@@ -6747,8 +6695,8 @@ export declare const catchReasons: {
6747
6695
  * @category Error Handling
6748
6696
  */
6749
6697
  <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> | {
6698
+ [RK in ReasonTags<ExtractTag<E, K>>]+?: (reason: ExtractReason<ExtractTag<E, K>, RK>, error: NarrowReason<ExtractTag<E, K>, RK>) => Stream<any, any, any>;
6699
+ }, 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
6700
  [RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<infer A, any, any> ? A : never;
6753
6701
  }[keyof Cases], (A2 extends unassigned ? E : ExcludeTag<E, K>) | E2 | {
6754
6702
  [RK in keyof Cases]: Cases[RK] extends (...args: Array<any>) => Stream<any, infer E, any> ? E : never;
@@ -6896,7 +6844,7 @@ export declare const catchCauseIf: {
6896
6844
  * @since 4.0.0
6897
6845
  * @category Error Handling
6898
6846
  */
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>;
6847
+ <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
6848
  /**
6901
6849
  * Recovers from stream failures by filtering the `Cause` and switching to a recovery stream.
6902
6850
  * Non-matching causes are re-emitted as failures.
@@ -6930,7 +6878,32 @@ export declare const catchCauseIf: {
6930
6878
  * @since 4.0.0
6931
6879
  * @category Error Handling
6932
6880
  */
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>;
6881
+ <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>;
6882
+ };
6883
+ /**
6884
+ * Recovers from stream failures by filtering the `Cause` and switching to a
6885
+ * recovery stream.
6886
+ *
6887
+ * @since 4.0.0
6888
+ * @category Error Handling
6889
+ */
6890
+ export declare const catchCauseFilter: {
6891
+ /**
6892
+ * Recovers from stream failures by filtering the `Cause` and switching to a
6893
+ * recovery stream.
6894
+ *
6895
+ * @since 4.0.0
6896
+ * @category Error Handling
6897
+ */
6898
+ <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>;
6899
+ /**
6900
+ * Recovers from stream failures by filtering the `Cause` and switching to a
6901
+ * recovery stream.
6902
+ *
6903
+ * @since 4.0.0
6904
+ * @category Error Handling
6905
+ */
6906
+ <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
6907
  };
6935
6908
  /**
6936
6909
  * Switches to a fallback stream if this stream is empty.
@@ -7134,9 +7107,9 @@ export declare const orDie: <A, E, R>(self: Stream<A, E, R>) => Stream<A, never,
7134
7107
  * @category Error Handling
7135
7108
  */
7136
7109
  export declare const ignore: <Arg extends Stream<any, any, any> | {
7137
- readonly log?: boolean | LogLevel | undefined;
7110
+ readonly log?: boolean | Severity | undefined;
7138
7111
  } | undefined>(selfOrOptions: Arg, options?: {
7139
- readonly log?: boolean | LogLevel | undefined;
7112
+ readonly log?: boolean | Severity | undefined;
7140
7113
  } | 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
7114
  /**
7142
7115
  * Ignores the stream's failure cause, including defects, and ends the stream.
@@ -7159,9 +7132,9 @@ export declare const ignore: <Arg extends Stream<any, any, any> | {
7159
7132
  * @category Error Handling
7160
7133
  */
7161
7134
  export declare const ignoreCause: <Arg extends Stream<any, any, any> | {
7162
- readonly log?: boolean | LogLevel | undefined;
7135
+ readonly log?: boolean | Severity | undefined;
7163
7136
  } | undefined>(streamOrOptions: Arg, options?: {
7164
- readonly log?: boolean | LogLevel | undefined;
7137
+ readonly log?: boolean | Severity | undefined;
7165
7138
  } | 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
7139
  /**
7167
7140
  * When the stream fails, retry it according to the given schedule.
@@ -7270,9 +7243,9 @@ export declare const retry: {
7270
7243
  *
7271
7244
  * @example
7272
7245
  * ```ts
7273
- * import { Console, Effect, ExecutionPlan, Layer, ServiceMap, Stream } from "effect"
7246
+ * import { Console, Effect, ExecutionPlan, Layer, Context, Stream } from "effect"
7274
7247
  *
7275
- * class Service extends ServiceMap.Service<Service>()("Service", {
7248
+ * class Service extends Context.Service<Service>()("Service", {
7276
7249
  * make: Effect.succeed({
7277
7250
  * stream: Stream.fail("A") as Stream.Stream<number, string>
7278
7251
  * })
@@ -7312,9 +7285,9 @@ export declare const withExecutionPlan: {
7312
7285
  *
7313
7286
  * @example
7314
7287
  * ```ts
7315
- * import { Console, Effect, ExecutionPlan, Layer, ServiceMap, Stream } from "effect"
7288
+ * import { Console, Effect, ExecutionPlan, Layer, Context, Stream } from "effect"
7316
7289
  *
7317
- * class Service extends ServiceMap.Service<Service>()("Service", {
7290
+ * class Service extends Context.Service<Service>()("Service", {
7318
7291
  * make: Effect.succeed({
7319
7292
  * stream: Stream.fail("A") as Stream.Stream<number, string>
7320
7293
  * })
@@ -7361,9 +7334,9 @@ export declare const withExecutionPlan: {
7361
7334
  *
7362
7335
  * @example
7363
7336
  * ```ts
7364
- * import { Console, Effect, ExecutionPlan, Layer, ServiceMap, Stream } from "effect"
7337
+ * import { Console, Effect, ExecutionPlan, Layer, Context, Stream } from "effect"
7365
7338
  *
7366
- * class Service extends ServiceMap.Service<Service>()("Service", {
7339
+ * class Service extends Context.Service<Service>()("Service", {
7367
7340
  * make: Effect.succeed({
7368
7341
  * stream: Stream.fail("A") as Stream.Stream<number, string>
7369
7342
  * })
@@ -7811,7 +7784,7 @@ export declare const takeWhile: {
7811
7784
  * @since 2.0.0
7812
7785
  * @category Filtering
7813
7786
  */
7814
- <A, B, X>(f: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
7787
+ <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
7788
  /**
7816
7789
  * Takes the longest initial prefix of elements that satisfy the predicate.
7817
7790
  *
@@ -7835,52 +7808,26 @@ export declare const takeWhile: {
7835
7808
  * @since 2.0.0
7836
7809
  * @category Filtering
7837
7810
  */
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>;
7811
+ <A, E, R>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, n: number) => boolean): Stream<A, E, R>;
7812
+ };
7813
+ /**
7814
+ * Takes the longest initial prefix of elements that satisfy the filter.
7815
+ *
7816
+ * @since 4.0.0
7817
+ * @category Filtering
7818
+ */
7819
+ export declare const takeWhileFilter: {
7839
7820
  /**
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
- * })
7821
+ * Takes the longest initial prefix of elements that satisfy the filter.
7854
7822
  *
7855
- * Effect.runPromise(program)
7856
- * // Output: [ 1, 2 ]
7857
- * ```
7858
- *
7859
- * @since 2.0.0
7823
+ * @since 4.0.0
7860
7824
  * @category Filtering
7861
7825
  */
7862
- <A, E, R>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, n: number) => boolean): Stream<A, E, R>;
7826
+ <A, B, X>(f: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
7863
7827
  /**
7864
- * Takes the longest initial prefix of elements that satisfy the predicate.
7828
+ * Takes the longest initial prefix of elements that satisfy the filter.
7865
7829
  *
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
- * ```
7882
- *
7883
- * @since 2.0.0
7830
+ * @since 4.0.0
7884
7831
  * @category Filtering
7885
7832
  */
7886
7833
  <A, E, R, B, X>(self: Stream<A, E, R>, f: Filter.Filter<NoInfer<A>, B, X>): Stream<B, E, R>;
@@ -8236,53 +8183,29 @@ export declare const dropWhile: {
8236
8183
  * @since 2.0.0
8237
8184
  * @category Filtering
8238
8185
  */
8239
- <A, B, X>(f: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
8186
+ <A, E, R>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, index: number) => boolean): Stream<A, E, R>;
8187
+ };
8188
+ /**
8189
+ * Drops elements while the filter succeeds.
8190
+ *
8191
+ * @since 4.0.0
8192
+ * @category Filtering
8193
+ */
8194
+ export declare const dropWhileFilter: {
8240
8195
  /**
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
- * ```
8196
+ * Drops elements while the filter succeeds.
8258
8197
  *
8259
- * @since 2.0.0
8198
+ * @since 4.0.0
8260
8199
  * @category Filtering
8261
8200
  */
8262
- <A, E, R>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>, index: number) => boolean): Stream<A, E, R>;
8201
+ <A, B, X>(filter: Filter.Filter<NoInfer<A>, B, X>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
8263
8202
  /**
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
- * })
8277
- *
8278
- * Effect.runPromise(program)
8279
- * // Output: [ 3, 4, 5 ]
8280
- * ```
8203
+ * Drops elements while the filter succeeds.
8281
8204
  *
8282
- * @since 2.0.0
8205
+ * @since 4.0.0
8283
8206
  * @category Filtering
8284
8207
  */
8285
- <A, E, R, B, X>(self: Stream<A, E, R>, f: Filter.Filter<NoInfer<A>, B, X>): Stream<A, E, R>;
8208
+ <A, E, R, B, X>(self: Stream<A, E, R>, filter: Filter.Filter<NoInfer<A>, B, X>): Stream<A, E, R>;
8286
8209
  };
8287
8210
  /**
8288
8211
  * Drops elements while the specified effectful predicate evaluates to `true`.
@@ -9557,7 +9480,7 @@ export declare const debounce: {
9557
9480
  * @since 2.0.0
9558
9481
  * @category Rate Limiting
9559
9482
  */
9560
- (duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
9483
+ (duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
9561
9484
  /**
9562
9485
  * Drops earlier elements within the debounce window and emits only the latest element after the pause.
9563
9486
  *
@@ -9581,7 +9504,7 @@ export declare const debounce: {
9581
9504
  * @since 2.0.0
9582
9505
  * @category Rate Limiting
9583
9506
  */
9584
- <A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>;
9507
+ <A, E, R>(self: Stream<A, E, R>, duration: Duration.Input): Stream<A, E, R>;
9585
9508
  };
9586
9509
  /**
9587
9510
  * Delays the arrays of this stream according to the given bandwidth
@@ -9659,7 +9582,7 @@ export declare const throttleEffect: {
9659
9582
  <A, E2, R2>(options: {
9660
9583
  readonly cost: (arr: Arr.NonEmptyReadonlyArray<A>) => Effect.Effect<number, E2, R2>;
9661
9584
  readonly units: number;
9662
- readonly duration: Duration.DurationInput;
9585
+ readonly duration: Duration.Input;
9663
9586
  readonly burst?: number | undefined;
9664
9587
  readonly strategy?: "enforce" | "shape" | undefined;
9665
9588
  }): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
@@ -9702,7 +9625,7 @@ export declare const throttleEffect: {
9702
9625
  <A, E, R, E2, R2>(self: Stream<A, E, R>, options: {
9703
9626
  readonly cost: (arr: Arr.NonEmptyReadonlyArray<A>) => Effect.Effect<number, E2, R2>;
9704
9627
  readonly units: number;
9705
- readonly duration: Duration.DurationInput;
9628
+ readonly duration: Duration.Input;
9706
9629
  readonly burst?: number | undefined;
9707
9630
  readonly strategy?: "enforce" | "shape" | undefined;
9708
9631
  }): Stream<A, E | E2, R | R2>;
@@ -9781,7 +9704,7 @@ export declare const throttle: {
9781
9704
  <A>(options: {
9782
9705
  readonly cost: (arr: Arr.NonEmptyReadonlyArray<A>) => number;
9783
9706
  readonly units: number;
9784
- readonly duration: Duration.DurationInput;
9707
+ readonly duration: Duration.Input;
9785
9708
  readonly burst?: number | undefined;
9786
9709
  readonly strategy?: "enforce" | "shape" | undefined;
9787
9710
  }): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
@@ -9823,7 +9746,7 @@ export declare const throttle: {
9823
9746
  <A, E, R>(self: Stream<A, E, R>, options: {
9824
9747
  readonly cost: (arr: Arr.NonEmptyReadonlyArray<A>) => number;
9825
9748
  readonly units: number;
9826
- readonly duration: Duration.DurationInput;
9749
+ readonly duration: Duration.Input;
9827
9750
  readonly burst?: number | undefined;
9828
9751
  readonly strategy?: "enforce" | "shape" | undefined;
9829
9752
  }): Stream<A, E, R>;
@@ -9951,7 +9874,7 @@ export declare const groupedWithin: {
9951
9874
  * @since 2.0.0
9952
9875
  * @category Grouping
9953
9876
  */
9954
- (chunkSize: number, duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<Array<A>, E, R>;
9877
+ (chunkSize: number, duration: Duration.Input): <A, E, R>(self: Stream<A, E, R>) => Stream<Array<A>, E, R>;
9955
9878
  /**
9956
9879
  * Partitions the stream into arrays, emitting when the chunk size is reached
9957
9880
  * or the duration passes.
@@ -9975,7 +9898,7 @@ export declare const groupedWithin: {
9975
9898
  * @since 2.0.0
9976
9899
  * @category Grouping
9977
9900
  */
9978
- <A, E, R>(self: Stream<A, E, R>, chunkSize: number, duration: Duration.DurationInput): Stream<Array<A>, E, R>;
9901
+ <A, E, R>(self: Stream<A, E, R>, chunkSize: number, duration: Duration.Input): Stream<Array<A>, E, R>;
9979
9902
  };
9980
9903
  /**
9981
9904
  * Groups elements into keyed substreams using an effectful classifier.
@@ -10042,7 +9965,7 @@ export declare const groupBy: {
10042
9965
  */
10043
9966
  <A, K, V, E2, R2>(f: (a: NoInfer<A>) => Effect.Effect<readonly [K, V], E2, R2>, options?: {
10044
9967
  readonly bufferSize?: number | undefined;
10045
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
9968
+ readonly idleTimeToLive?: Duration.Input | undefined;
10046
9969
  }): <E, R>(self: Stream<A, E, R>) => Stream<readonly [K, Stream<V>], E | E2, R | R2>;
10047
9970
  /**
10048
9971
  * Groups elements into keyed substreams using an effectful classifier.
@@ -10077,7 +10000,7 @@ export declare const groupBy: {
10077
10000
  */
10078
10001
  <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
10002
  readonly bufferSize?: number | undefined;
10080
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10003
+ readonly idleTimeToLive?: Duration.Input | undefined;
10081
10004
  }): Stream<readonly [K, Stream<V>], E | E2, R | R2>;
10082
10005
  };
10083
10006
  /**
@@ -10141,7 +10064,7 @@ export declare const groupByKey: {
10141
10064
  */
10142
10065
  <A, K>(f: (a: NoInfer<A>) => K, options?: {
10143
10066
  readonly bufferSize?: number | undefined;
10144
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10067
+ readonly idleTimeToLive?: Duration.Input | undefined;
10145
10068
  }): <E, R>(self: Stream<A, E, R>) => Stream<readonly [K, Stream<A>], E, R>;
10146
10069
  /**
10147
10070
  * Groups elements by a key and emits a stream per key.
@@ -10174,7 +10097,7 @@ export declare const groupByKey: {
10174
10097
  */
10175
10098
  <A, E, R, K>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => K, options?: {
10176
10099
  readonly bufferSize?: number | undefined;
10177
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10100
+ readonly idleTimeToLive?: Duration.Input | undefined;
10178
10101
  }): Stream<readonly [K, Stream<A>], E, R>;
10179
10102
  };
10180
10103
  /**
@@ -10559,12 +10482,12 @@ export declare const share: {
10559
10482
  (options: {
10560
10483
  readonly capacity: "unbounded";
10561
10484
  readonly replay?: number | undefined;
10562
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10485
+ readonly idleTimeToLive?: Duration.Input | undefined;
10563
10486
  } | {
10564
10487
  readonly capacity: number;
10565
10488
  readonly strategy?: "sliding" | "dropping" | "suspend" | undefined;
10566
10489
  readonly replay?: number | undefined;
10567
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10490
+ readonly idleTimeToLive?: Duration.Input | undefined;
10568
10491
  }): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Stream<A, E>, never, Scope.Scope | R>;
10569
10492
  /**
10570
10493
  * Returns a new Stream that multicasts the original stream, subscribing when the first consumer starts.
@@ -10600,12 +10523,12 @@ export declare const share: {
10600
10523
  <A, E, R>(self: Stream<A, E, R>, options: {
10601
10524
  readonly capacity: "unbounded";
10602
10525
  readonly replay?: number | undefined;
10603
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10526
+ readonly idleTimeToLive?: Duration.Input | undefined;
10604
10527
  } | {
10605
10528
  readonly capacity: number;
10606
10529
  readonly strategy?: "sliding" | "dropping" | "suspend" | undefined;
10607
10530
  readonly replay?: number | undefined;
10608
- readonly idleTimeToLive?: Duration.DurationInput | undefined;
10531
+ readonly idleTimeToLive?: Duration.Input | undefined;
10609
10532
  }): Effect.Effect<Stream<A, E>, never, Scope.Scope | R>;
10610
10533
  };
10611
10534
  /**
@@ -12163,7 +12086,7 @@ export declare const ensuring: {
12163
12086
  <A, E, R, R2>(self: Stream<A, E, R>, finalizer: Effect.Effect<unknown, never, R2>): Stream<A, E, R | R2>;
12164
12087
  };
12165
12088
  /**
12166
- * Provides a layer or service map to the stream, removing the corresponding
12089
+ * Provides a layer or context to the stream, removing the corresponding
12167
12090
  * service requirements. Use `options.local` to build the layer every time; by
12168
12091
  * default, layers are shared between provide calls.
12169
12092
  *
@@ -12171,9 +12094,9 @@ export declare const ensuring: {
12171
12094
  *
12172
12095
  * @example
12173
12096
  * ```ts
12174
- * import { Console, Effect, Layer, ServiceMap, Stream } from "effect"
12097
+ * import { Console, Effect, Layer, Context, Stream } from "effect"
12175
12098
  *
12176
- * class Env extends ServiceMap.Service<Env, { readonly name: string }>()("Env") {}
12099
+ * class Env extends Context.Service<Env, { readonly name: string }>()("Env") {}
12177
12100
  *
12178
12101
  * const layer = Layer.succeed(Env)({ name: "Ada" })
12179
12102
  *
@@ -12200,7 +12123,7 @@ export declare const ensuring: {
12200
12123
  */
12201
12124
  export declare const provide: {
12202
12125
  /**
12203
- * Provides a layer or service map to the stream, removing the corresponding
12126
+ * Provides a layer or context to the stream, removing the corresponding
12204
12127
  * service requirements. Use `options.local` to build the layer every time; by
12205
12128
  * default, layers are shared between provide calls.
12206
12129
  *
@@ -12208,9 +12131,9 @@ export declare const provide: {
12208
12131
  *
12209
12132
  * @example
12210
12133
  * ```ts
12211
- * import { Console, Effect, Layer, ServiceMap, Stream } from "effect"
12134
+ * import { Console, Effect, Layer, Context, Stream } from "effect"
12212
12135
  *
12213
- * class Env extends ServiceMap.Service<Env, { readonly name: string }>()("Env") {}
12136
+ * class Env extends Context.Service<Env, { readonly name: string }>()("Env") {}
12214
12137
  *
12215
12138
  * const layer = Layer.succeed(Env)({ name: "Ada" })
12216
12139
  *
@@ -12235,11 +12158,11 @@ export declare const provide: {
12235
12158
  * @since 4.0.0
12236
12159
  * @category Services
12237
12160
  */
12238
- <AL, EL = never, RL = never>(layer: Layer.Layer<AL, EL, RL> | ServiceMap.ServiceMap<AL>, options?: {
12161
+ <AL, EL = never, RL = never>(layer: Layer.Layer<AL, EL, RL> | Context.Context<AL>, options?: {
12239
12162
  readonly local?: boolean | undefined;
12240
12163
  } | undefined): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E | EL, Exclude<R, AL> | RL>;
12241
12164
  /**
12242
- * Provides a layer or service map to the stream, removing the corresponding
12165
+ * Provides a layer or context to the stream, removing the corresponding
12243
12166
  * service requirements. Use `options.local` to build the layer every time; by
12244
12167
  * default, layers are shared between provide calls.
12245
12168
  *
@@ -12247,9 +12170,9 @@ export declare const provide: {
12247
12170
  *
12248
12171
  * @example
12249
12172
  * ```ts
12250
- * import { Console, Effect, Layer, ServiceMap, Stream } from "effect"
12173
+ * import { Console, Effect, Layer, Context, Stream } from "effect"
12251
12174
  *
12252
- * class Env extends ServiceMap.Service<Env, { readonly name: string }>()("Env") {}
12175
+ * class Env extends Context.Service<Env, { readonly name: string }>()("Env") {}
12253
12176
  *
12254
12177
  * const layer = Layer.succeed(Env)({ name: "Ada" })
12255
12178
  *
@@ -12274,22 +12197,22 @@ export declare const provide: {
12274
12197
  * @since 4.0.0
12275
12198
  * @category Services
12276
12199
  */
12277
- <A, E, R, AL, EL = never, RL = never>(self: Stream<A, E, R>, layer: Layer.Layer<AL, EL, RL> | ServiceMap.ServiceMap<AL>, options?: {
12200
+ <A, E, R, AL, EL = never, RL = never>(self: Stream<A, E, R>, layer: Layer.Layer<AL, EL, RL> | Context.Context<AL>, options?: {
12278
12201
  readonly local?: boolean | undefined;
12279
12202
  } | undefined): Stream<A, E | EL, Exclude<R, AL> | RL>;
12280
12203
  };
12281
12204
  /**
12282
- * Provides multiple services to the stream using a service map.
12205
+ * Provides multiple services to the stream using a context.
12283
12206
  *
12284
12207
  * @example
12285
12208
  * ```ts
12286
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12209
+ * import { Console, Effect, Context, Stream } from "effect"
12287
12210
  *
12288
- * class Config extends ServiceMap.Service<Config, { readonly prefix: string }>()("Config") {}
12289
- * class Greeter extends ServiceMap.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
12211
+ * class Config extends Context.Service<Config, { readonly prefix: string }>()("Config") {}
12212
+ * class Greeter extends Context.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
12290
12213
  *
12291
- * const services = ServiceMap.make(Config, { prefix: "Hello" }).pipe(
12292
- * ServiceMap.add(Greeter, { greet: (name: string) => `${name}!` })
12214
+ * const context = Context.make(Config, { prefix: "Hello" }).pipe(
12215
+ * Context.add(Greeter, { greet: (name: string) => `${name}!` })
12293
12216
  * )
12294
12217
  *
12295
12218
  * const stream = Stream.fromEffect(
@@ -12301,7 +12224,7 @@ export declare const provide: {
12301
12224
  * )
12302
12225
  *
12303
12226
  * const program = Effect.gen(function*() {
12304
- * const result = yield* Stream.runCollect(Stream.provideServices(stream, services))
12227
+ * const result = yield* Stream.runCollect(Stream.provideContext(stream, context))
12305
12228
  * yield* Console.log(result)
12306
12229
  * })
12307
12230
  *
@@ -12312,19 +12235,19 @@ export declare const provide: {
12312
12235
  * @since 4.0.0
12313
12236
  * @category Services
12314
12237
  */
12315
- export declare const provideServices: {
12238
+ export declare const provideContext: {
12316
12239
  /**
12317
- * Provides multiple services to the stream using a service map.
12240
+ * Provides multiple services to the stream using a context.
12318
12241
  *
12319
12242
  * @example
12320
12243
  * ```ts
12321
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12244
+ * import { Console, Effect, Context, Stream } from "effect"
12322
12245
  *
12323
- * class Config extends ServiceMap.Service<Config, { readonly prefix: string }>()("Config") {}
12324
- * class Greeter extends ServiceMap.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
12246
+ * class Config extends Context.Service<Config, { readonly prefix: string }>()("Config") {}
12247
+ * class Greeter extends Context.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
12325
12248
  *
12326
- * const services = ServiceMap.make(Config, { prefix: "Hello" }).pipe(
12327
- * ServiceMap.add(Greeter, { greet: (name: string) => `${name}!` })
12249
+ * const context = Context.make(Config, { prefix: "Hello" }).pipe(
12250
+ * Context.add(Greeter, { greet: (name: string) => `${name}!` })
12328
12251
  * )
12329
12252
  *
12330
12253
  * const stream = Stream.fromEffect(
@@ -12336,7 +12259,7 @@ export declare const provideServices: {
12336
12259
  * )
12337
12260
  *
12338
12261
  * const program = Effect.gen(function*() {
12339
- * const result = yield* Stream.runCollect(Stream.provideServices(stream, services))
12262
+ * const result = yield* Stream.runCollect(Stream.provideContext(stream, context))
12340
12263
  * yield* Console.log(result)
12341
12264
  * })
12342
12265
  *
@@ -12347,19 +12270,19 @@ export declare const provideServices: {
12347
12270
  * @since 4.0.0
12348
12271
  * @category Services
12349
12272
  */
12350
- <R2>(services: ServiceMap.ServiceMap<R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, R2>>;
12273
+ <R2>(context: Context.Context<R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, R2>>;
12351
12274
  /**
12352
- * Provides multiple services to the stream using a service map.
12275
+ * Provides multiple services to the stream using a context.
12353
12276
  *
12354
12277
  * @example
12355
12278
  * ```ts
12356
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12279
+ * import { Console, Effect, Context, Stream } from "effect"
12357
12280
  *
12358
- * class Config extends ServiceMap.Service<Config, { readonly prefix: string }>()("Config") {}
12359
- * class Greeter extends ServiceMap.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
12281
+ * class Config extends Context.Service<Config, { readonly prefix: string }>()("Config") {}
12282
+ * class Greeter extends Context.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
12360
12283
  *
12361
- * const services = ServiceMap.make(Config, { prefix: "Hello" }).pipe(
12362
- * ServiceMap.add(Greeter, { greet: (name: string) => `${name}!` })
12284
+ * const context = Context.make(Config, { prefix: "Hello" }).pipe(
12285
+ * Context.add(Greeter, { greet: (name: string) => `${name}!` })
12363
12286
  * )
12364
12287
  *
12365
12288
  * const stream = Stream.fromEffect(
@@ -12371,7 +12294,7 @@ export declare const provideServices: {
12371
12294
  * )
12372
12295
  *
12373
12296
  * const program = Effect.gen(function*() {
12374
- * const result = yield* Stream.runCollect(Stream.provideServices(stream, services))
12297
+ * const result = yield* Stream.runCollect(Stream.provideContext(stream, context))
12375
12298
  * yield* Console.log(result)
12376
12299
  * })
12377
12300
  *
@@ -12382,7 +12305,7 @@ export declare const provideServices: {
12382
12305
  * @since 4.0.0
12383
12306
  * @category Services
12384
12307
  */
12385
- <A, E, R, R2>(self: Stream<A, E, R>, services: ServiceMap.ServiceMap<R2>): Stream<A, E, Exclude<R, R2>>;
12308
+ <A, E, R, R2>(self: Stream<A, E, R>, context: Context.Context<R2>): Stream<A, E, Exclude<R, R2>>;
12386
12309
  };
12387
12310
  /**
12388
12311
  * Provides the stream with a single required service, eliminating that
@@ -12390,9 +12313,9 @@ export declare const provideServices: {
12390
12313
  *
12391
12314
  * @example
12392
12315
  * ```ts
12393
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12316
+ * import { Console, Effect, Context, Stream } from "effect"
12394
12317
  *
12395
- * class Greeter extends ServiceMap.Service<Greeter, {
12318
+ * class Greeter extends Context.Service<Greeter, {
12396
12319
  * greet: (name: string) => string
12397
12320
  * }>()("Greeter") {}
12398
12321
  *
@@ -12427,9 +12350,9 @@ export declare const provideService: {
12427
12350
  *
12428
12351
  * @example
12429
12352
  * ```ts
12430
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12353
+ * import { Console, Effect, Context, Stream } from "effect"
12431
12354
  *
12432
- * class Greeter extends ServiceMap.Service<Greeter, {
12355
+ * class Greeter extends Context.Service<Greeter, {
12433
12356
  * greet: (name: string) => string
12434
12357
  * }>()("Greeter") {}
12435
12358
  *
@@ -12457,16 +12380,16 @@ export declare const provideService: {
12457
12380
  * @since 4.0.0
12458
12381
  * @category Services
12459
12382
  */
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>>;
12383
+ <I, S>(key: Context.Key<I, S>, service: NoInfer<S>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, I>>;
12461
12384
  /**
12462
12385
  * Provides the stream with a single required service, eliminating that
12463
12386
  * requirement from its environment.
12464
12387
  *
12465
12388
  * @example
12466
12389
  * ```ts
12467
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12390
+ * import { Console, Effect, Context, Stream } from "effect"
12468
12391
  *
12469
- * class Greeter extends ServiceMap.Service<Greeter, {
12392
+ * class Greeter extends Context.Service<Greeter, {
12470
12393
  * greet: (name: string) => string
12471
12394
  * }>()("Greeter") {}
12472
12395
  *
@@ -12494,16 +12417,16 @@ export declare const provideService: {
12494
12417
  * @since 4.0.0
12495
12418
  * @category Services
12496
12419
  */
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>>;
12420
+ <A, E, R, I, S>(self: Stream<A, E, R>, key: Context.Key<I, S>, service: NoInfer<S>): Stream<A, E, Exclude<R, I>>;
12498
12421
  };
12499
12422
  /**
12500
12423
  * Provides a service to the stream using an effect, removing the requirement and adding the effect's error and environment.
12501
12424
  *
12502
12425
  * @example
12503
12426
  * ```ts
12504
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12427
+ * import { Console, Effect, Context, Stream } from "effect"
12505
12428
  *
12506
- * class ApiConfig extends ServiceMap.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
12429
+ * class ApiConfig extends Context.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
12507
12430
  *
12508
12431
  * const stream = Stream.fromEffect(
12509
12432
  * Effect.gen(function*() {
@@ -12540,9 +12463,9 @@ export declare const provideServiceEffect: {
12540
12463
  *
12541
12464
  * @example
12542
12465
  * ```ts
12543
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12466
+ * import { Console, Effect, Context, Stream } from "effect"
12544
12467
  *
12545
- * class ApiConfig extends ServiceMap.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
12468
+ * class ApiConfig extends Context.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
12546
12469
  *
12547
12470
  * const stream = Stream.fromEffect(
12548
12471
  * Effect.gen(function*() {
@@ -12573,15 +12496,15 @@ export declare const provideServiceEffect: {
12573
12496
  * @since 4.0.0
12574
12497
  * @category Services
12575
12498
  */
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>;
12499
+ <I, S, ES, RS>(key: Context.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
12500
  /**
12578
12501
  * Provides a service to the stream using an effect, removing the requirement and adding the effect's error and environment.
12579
12502
  *
12580
12503
  * @example
12581
12504
  * ```ts
12582
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12505
+ * import { Console, Effect, Context, Stream } from "effect"
12583
12506
  *
12584
- * class ApiConfig extends ServiceMap.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
12507
+ * class ApiConfig extends Context.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
12585
12508
  *
12586
12509
  * const stream = Stream.fromEffect(
12587
12510
  * Effect.gen(function*() {
@@ -12612,18 +12535,18 @@ export declare const provideServiceEffect: {
12612
12535
  * @since 4.0.0
12613
12536
  * @category Services
12614
12537
  */
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>;
12538
+ <A, E, R, I, S, ES, RS>(self: Stream<A, E, R>, key: Context.Key<I, S>, service: Effect.Effect<NoInfer<S>, ES, RS>): Stream<A, E | ES, Exclude<R, I> | RS>;
12616
12539
  };
12617
12540
  /**
12618
- * Transforms the stream's required services by mapping the current service map
12541
+ * Transforms the stream's required services by mapping the current context
12619
12542
  * to a new one.
12620
12543
  *
12621
12544
  * @example
12622
12545
  * ```ts
12623
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12546
+ * import { Console, Effect, Context, Stream } from "effect"
12624
12547
  *
12625
- * class Logger extends ServiceMap.Service<Logger, { prefix: string }>()("Logger") {}
12626
- * class Config extends ServiceMap.Service<Config, { name: string }>()("Config") {}
12548
+ * class Logger extends Context.Service<Logger, { prefix: string }>()("Logger") {}
12549
+ * class Config extends Context.Service<Config, { name: string }>()("Config") {}
12627
12550
  *
12628
12551
  * const stream = Stream.fromEffect(
12629
12552
  * Effect.gen(function*() {
@@ -12634,8 +12557,8 @@ export declare const provideServiceEffect: {
12634
12557
  * )
12635
12558
  *
12636
12559
  * const updated = stream.pipe(
12637
- * Stream.updateServices((services: ServiceMap.ServiceMap<Logger>) =>
12638
- * ServiceMap.add(services, Config, { name: "World" })
12560
+ * Stream.updateContext((context: Context.Context<Logger>) =>
12561
+ * Context.add(context, Config, { name: "World" })
12639
12562
  * )
12640
12563
  * )
12641
12564
  *
@@ -12653,17 +12576,17 @@ export declare const provideServiceEffect: {
12653
12576
  * @since 2.0.0
12654
12577
  * @category Services
12655
12578
  */
12656
- export declare const updateServices: {
12579
+ export declare const updateContext: {
12657
12580
  /**
12658
- * Transforms the stream's required services by mapping the current service map
12581
+ * Transforms the stream's required services by mapping the current context
12659
12582
  * to a new one.
12660
12583
  *
12661
12584
  * @example
12662
12585
  * ```ts
12663
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12586
+ * import { Console, Effect, Context, Stream } from "effect"
12664
12587
  *
12665
- * class Logger extends ServiceMap.Service<Logger, { prefix: string }>()("Logger") {}
12666
- * class Config extends ServiceMap.Service<Config, { name: string }>()("Config") {}
12588
+ * class Logger extends Context.Service<Logger, { prefix: string }>()("Logger") {}
12589
+ * class Config extends Context.Service<Config, { name: string }>()("Config") {}
12667
12590
  *
12668
12591
  * const stream = Stream.fromEffect(
12669
12592
  * Effect.gen(function*() {
@@ -12674,8 +12597,8 @@ export declare const updateServices: {
12674
12597
  * )
12675
12598
  *
12676
12599
  * const updated = stream.pipe(
12677
- * Stream.updateServices((services: ServiceMap.ServiceMap<Logger>) =>
12678
- * ServiceMap.add(services, Config, { name: "World" })
12600
+ * Stream.updateContext((context: Context.Context<Logger>) =>
12601
+ * Context.add(context, Config, { name: "World" })
12679
12602
  * )
12680
12603
  * )
12681
12604
  *
@@ -12693,17 +12616,17 @@ export declare const updateServices: {
12693
12616
  * @since 2.0.0
12694
12617
  * @category Services
12695
12618
  */
12696
- <R, R2>(f: (services: ServiceMap.ServiceMap<R2>) => ServiceMap.ServiceMap<R>): <A, E>(self: Stream<A, E, R>) => Stream<A, E, R2>;
12619
+ <R, R2>(f: (context: Context.Context<R2>) => Context.Context<R>): <A, E>(self: Stream<A, E, R>) => Stream<A, E, R2>;
12697
12620
  /**
12698
- * Transforms the stream's required services by mapping the current service map
12621
+ * Transforms the stream's required services by mapping the current context
12699
12622
  * to a new one.
12700
12623
  *
12701
12624
  * @example
12702
12625
  * ```ts
12703
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12626
+ * import { Console, Effect, Context, Stream } from "effect"
12704
12627
  *
12705
- * class Logger extends ServiceMap.Service<Logger, { prefix: string }>()("Logger") {}
12706
- * class Config extends ServiceMap.Service<Config, { name: string }>()("Config") {}
12628
+ * class Logger extends Context.Service<Logger, { prefix: string }>()("Logger") {}
12629
+ * class Config extends Context.Service<Config, { name: string }>()("Config") {}
12707
12630
  *
12708
12631
  * const stream = Stream.fromEffect(
12709
12632
  * Effect.gen(function*() {
@@ -12714,8 +12637,8 @@ export declare const updateServices: {
12714
12637
  * )
12715
12638
  *
12716
12639
  * const updated = stream.pipe(
12717
- * Stream.updateServices((services: ServiceMap.ServiceMap<Logger>) =>
12718
- * ServiceMap.add(services, Config, { name: "World" })
12640
+ * Stream.updateContext((context: Context.Context<Logger>) =>
12641
+ * Context.add(context, Config, { name: "World" })
12719
12642
  * )
12720
12643
  * )
12721
12644
  *
@@ -12733,16 +12656,16 @@ export declare const updateServices: {
12733
12656
  * @since 2.0.0
12734
12657
  * @category Services
12735
12658
  */
12736
- <A, E, R, R2>(self: Stream<A, E, R>, f: (services: ServiceMap.ServiceMap<R2>) => ServiceMap.ServiceMap<R>): Stream<A, E, R2>;
12659
+ <A, E, R, R2>(self: Stream<A, E, R>, f: (context: Context.Context<R2>) => Context.Context<R>): Stream<A, E, R2>;
12737
12660
  };
12738
12661
  /**
12739
12662
  * Updates a single service in the stream environment by applying a function.
12740
12663
  *
12741
12664
  * @example
12742
12665
  * ```ts
12743
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12666
+ * import { Console, Effect, Context, Stream } from "effect"
12744
12667
  *
12745
- * class Counter extends ServiceMap.Service<Counter, { count: number }>()("Counter") {}
12668
+ * class Counter extends Context.Service<Counter, { count: number }>()("Counter") {}
12746
12669
  *
12747
12670
  * const stream = Stream.fromEffect(Effect.service(Counter)).pipe(
12748
12671
  * Stream.updateService(Counter, (counter) => ({ count: counter.count + 1 }))
@@ -12766,9 +12689,9 @@ export declare const updateService: {
12766
12689
  *
12767
12690
  * @example
12768
12691
  * ```ts
12769
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12692
+ * import { Console, Effect, Context, Stream } from "effect"
12770
12693
  *
12771
- * class Counter extends ServiceMap.Service<Counter, { count: number }>()("Counter") {}
12694
+ * class Counter extends Context.Service<Counter, { count: number }>()("Counter") {}
12772
12695
  *
12773
12696
  * const stream = Stream.fromEffect(Effect.service(Counter)).pipe(
12774
12697
  * Stream.updateService(Counter, (counter) => ({ count: counter.count + 1 }))
@@ -12786,15 +12709,15 @@ export declare const updateService: {
12786
12709
  * @since 2.0.0
12787
12710
  * @category Services
12788
12711
  */
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>;
12712
+ <I, S>(key: Context.Key<I, S>, f: (service: NoInfer<S>) => S): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R | I>;
12790
12713
  /**
12791
12714
  * Updates a single service in the stream environment by applying a function.
12792
12715
  *
12793
12716
  * @example
12794
12717
  * ```ts
12795
- * import { Console, Effect, ServiceMap, Stream } from "effect"
12718
+ * import { Console, Effect, Context, Stream } from "effect"
12796
12719
  *
12797
- * class Counter extends ServiceMap.Service<Counter, { count: number }>()("Counter") {}
12720
+ * class Counter extends Context.Service<Counter, { count: number }>()("Counter") {}
12798
12721
  *
12799
12722
  * const stream = Stream.fromEffect(Effect.service(Counter)).pipe(
12800
12723
  * Stream.updateService(Counter, (counter) => ({ count: counter.count + 1 }))
@@ -12812,7 +12735,7 @@ export declare const updateService: {
12812
12735
  * @since 2.0.0
12813
12736
  * @category Services
12814
12737
  */
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>;
12738
+ <A, E, R, I, S>(self: Stream<A, E, R>, key: Context.Key<I, S>, f: (service: NoInfer<S>) => S): Stream<A, E, R | I>;
12816
12739
  };
12817
12740
  /**
12818
12741
  * Wraps the stream with a new span for tracing.
@@ -13787,18 +13710,18 @@ export declare const mkUint8Array: <E, R>(self: Stream<Uint8Array, E, R>) => Eff
13787
13710
  *
13788
13711
  * @example
13789
13712
  * ```ts
13790
- * import { ServiceMap, Stream } from "effect"
13713
+ * import { Context, Stream } from "effect"
13791
13714
  *
13792
13715
  * const stream = Stream.make(1, 2, 3, 4, 5)
13793
- * const readableStream = Stream.toReadableStreamWith(stream, ServiceMap.empty())
13716
+ * const readableStream = Stream.toReadableStreamWith(stream, Context.empty())
13794
13717
  * ```
13795
13718
  *
13796
13719
  * @since 2.0.0
13797
13720
  * @category Destructors
13798
13721
  */
13799
- export declare const toReadableStreamWith: (<A, XR>(services: ServiceMap.ServiceMap<XR>, options?: {
13722
+ export declare const toReadableStreamWith: (<A, XR>(context: Context.Context<XR>, options?: {
13800
13723
  readonly strategy?: QueuingStrategy<A> | undefined;
13801
- }) => <E, R extends XR>(self: Stream<A, E, R>) => ReadableStream<A>) & (<A, E, XR, R extends XR>(self: Stream<A, E, R>, services: ServiceMap.ServiceMap<XR>, options?: {
13724
+ }) => <E, R extends XR>(self: Stream<A, E, R>) => ReadableStream<A>) & (<A, E, XR, R extends XR>(self: Stream<A, E, R>, context: Context.Context<XR>, options?: {
13802
13725
  readonly strategy?: QueuingStrategy<A> | undefined;
13803
13726
  }) => ReadableStream<A>);
13804
13727
  /**
@@ -13936,10 +13859,10 @@ export declare const toReadableStreamEffect: {
13936
13859
  *
13937
13860
  * @example
13938
13861
  * ```ts
13939
- * import { ServiceMap, Stream } from "effect"
13862
+ * import { Context, Stream } from "effect"
13940
13863
  *
13941
13864
  * const stream = Stream.make(1, 2, 3)
13942
- * const iterable = Stream.toAsyncIterableWith(stream, ServiceMap.empty())
13865
+ * const iterable = Stream.toAsyncIterableWith(stream, Context.empty())
13943
13866
  *
13944
13867
  * const collect = async () => {
13945
13868
  * const results: Array<number> = []
@@ -13959,10 +13882,10 @@ export declare const toAsyncIterableWith: {
13959
13882
  *
13960
13883
  * @example
13961
13884
  * ```ts
13962
- * import { ServiceMap, Stream } from "effect"
13885
+ * import { Context, Stream } from "effect"
13963
13886
  *
13964
13887
  * const stream = Stream.make(1, 2, 3)
13965
- * const iterable = Stream.toAsyncIterableWith(stream, ServiceMap.empty())
13888
+ * const iterable = Stream.toAsyncIterableWith(stream, Context.empty())
13966
13889
  *
13967
13890
  * const collect = async () => {
13968
13891
  * const results: Array<number> = []
@@ -13976,16 +13899,16 @@ export declare const toAsyncIterableWith: {
13976
13899
  * @since 2.0.0
13977
13900
  * @category Destructors
13978
13901
  */
13979
- <XR>(services: ServiceMap.ServiceMap<XR>): <A, E, R extends XR>(self: Stream<A, E, R>) => AsyncIterable<A>;
13902
+ <XR>(context: Context.Context<XR>): <A, E, R extends XR>(self: Stream<A, E, R>) => AsyncIterable<A>;
13980
13903
  /**
13981
13904
  * Converts the stream to an `AsyncIterable` using the provided services.
13982
13905
  *
13983
13906
  * @example
13984
13907
  * ```ts
13985
- * import { ServiceMap, Stream } from "effect"
13908
+ * import { Context, Stream } from "effect"
13986
13909
  *
13987
13910
  * const stream = Stream.make(1, 2, 3)
13988
- * const iterable = Stream.toAsyncIterableWith(stream, ServiceMap.empty())
13911
+ * const iterable = Stream.toAsyncIterableWith(stream, Context.empty())
13989
13912
  *
13990
13913
  * const collect = async () => {
13991
13914
  * const results: Array<number> = []
@@ -13999,7 +13922,7 @@ export declare const toAsyncIterableWith: {
13999
13922
  * @since 2.0.0
14000
13923
  * @category Destructors
14001
13924
  */
14002
- <A, E, XR, R extends XR>(self: Stream<A, E, R>, services: ServiceMap.ServiceMap<XR>): AsyncIterable<A>;
13925
+ <A, E, XR, R extends XR>(self: Stream<A, E, R>, context: Context.Context<XR>): AsyncIterable<A>;
14003
13926
  };
14004
13927
  /**
14005
13928
  * Creates an effect that yields an `AsyncIterable` using the current services.
@@ -14345,16 +14268,16 @@ export declare const toPubSubTake: {
14345
14268
  }): Effect.Effect<PubSub.PubSub<Take.Take<A, E>>, never, R | Scope.Scope>;
14346
14269
  };
14347
14270
  /**
14348
- * Converts a stream to a PubSub for concurrent consumption.
14271
+ * Converts a stream to a Queue for concurrent consumption.
14349
14272
  *
14350
14273
  * @example
14351
14274
  * ```ts
14352
- * import { Effect, PubSub, Stream } from "effect"
14275
+ * import { Effect, Queue, Stream } from "effect"
14353
14276
  *
14354
14277
  * const program = Effect.gen(function* () {
14355
- * const pubSub = yield* Stream.toQueue(Stream.fromIterable([1, 2, 3]), { capacity: 8 })
14356
- * const subscription = yield* PubSub.subscribe(pubSub)
14357
- * return subscription
14278
+ * const queue = yield* Stream.toQueue(Stream.fromIterable([1, 2, 3]), { capacity: 8 })
14279
+ * const chunk = yield* Queue.takeBetween(queue, 1, 3)
14280
+ * return chunk
14358
14281
  * })
14359
14282
  * ```
14360
14283
  *
@@ -14363,16 +14286,16 @@ export declare const toPubSubTake: {
14363
14286
  */
14364
14287
  export declare const toQueue: {
14365
14288
  /**
14366
- * Converts a stream to a PubSub for concurrent consumption.
14289
+ * Converts a stream to a Queue for concurrent consumption.
14367
14290
  *
14368
14291
  * @example
14369
14292
  * ```ts
14370
- * import { Effect, PubSub, Stream } from "effect"
14293
+ * import { Effect, Queue, Stream } from "effect"
14371
14294
  *
14372
14295
  * const program = Effect.gen(function* () {
14373
- * const pubSub = yield* Stream.toQueue(Stream.fromIterable([1, 2, 3]), { capacity: 8 })
14374
- * const subscription = yield* PubSub.subscribe(pubSub)
14375
- * return subscription
14296
+ * const queue = yield* Stream.toQueue(Stream.fromIterable([1, 2, 3]), { capacity: 8 })
14297
+ * const chunk = yield* Queue.takeBetween(queue, 1, 3)
14298
+ * return chunk
14376
14299
  * })
14377
14300
  * ```
14378
14301
  *
@@ -14386,16 +14309,16 @@ export declare const toQueue: {
14386
14309
  readonly strategy?: "dropping" | "sliding" | "suspend" | undefined;
14387
14310
  }): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Queue.Dequeue<A, E | Cause.Done>, never, R | Scope.Scope>;
14388
14311
  /**
14389
- * Converts a stream to a PubSub for concurrent consumption.
14312
+ * Converts a stream to a Queue for concurrent consumption.
14390
14313
  *
14391
14314
  * @example
14392
14315
  * ```ts
14393
- * import { Effect, PubSub, Stream } from "effect"
14316
+ * import { Effect, Queue, Stream } from "effect"
14394
14317
  *
14395
14318
  * const program = Effect.gen(function* () {
14396
- * const pubSub = yield* Stream.toQueue(Stream.fromIterable([1, 2, 3]), { capacity: 8 })
14397
- * const subscription = yield* PubSub.subscribe(pubSub)
14398
- * return subscription
14319
+ * const queue = yield* Stream.toQueue(Stream.fromIterable([1, 2, 3]), { capacity: 8 })
14320
+ * const chunk = yield* Queue.takeBetween(queue, 1, 3)
14321
+ * return chunk
14399
14322
  * })
14400
14323
  * ```
14401
14324
  *
@@ -14407,7 +14330,7 @@ export declare const toQueue: {
14407
14330
  } | {
14408
14331
  readonly capacity: number;
14409
14332
  readonly strategy?: "dropping" | "sliding" | "suspend" | undefined;
14410
- }): Effect.Effect<PubSub.PubSub<A>, never, R | Scope.Scope>;
14333
+ }): Effect.Effect<Queue.Dequeue<A, E | Cause.Done>, never, R | Scope.Scope>;
14411
14334
  };
14412
14335
  /**
14413
14336
  * Runs the stream, offering each element to the provided queue and ending it