effect 4.0.0-beta.66 → 4.0.0-beta.67

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 (1633) hide show
  1. package/dist/Array.d.ts +113 -67
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +28 -18
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +404 -337
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +190 -146
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +167 -97
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +87 -47
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +62 -31
  14. package/dist/Boolean.d.ts.map +1 -1
  15. package/dist/Boolean.js +30 -15
  16. package/dist/Boolean.js.map +1 -1
  17. package/dist/Brand.d.ts +20 -1
  18. package/dist/Brand.d.ts.map +1 -1
  19. package/dist/Brand.js +16 -0
  20. package/dist/Brand.js.map +1 -1
  21. package/dist/Cache.d.ts +236 -132
  22. package/dist/Cache.d.ts.map +1 -1
  23. package/dist/Cache.js +133 -57
  24. package/dist/Cache.js.map +1 -1
  25. package/dist/Cause.d.ts +74 -62
  26. package/dist/Cause.d.ts.map +1 -1
  27. package/dist/Cause.js +43 -36
  28. package/dist/Cause.js.map +1 -1
  29. package/dist/Channel.d.ts +1518 -575
  30. package/dist/Channel.d.ts.map +1 -1
  31. package/dist/Channel.js +661 -287
  32. package/dist/Channel.js.map +1 -1
  33. package/dist/ChannelSchema.d.ts +119 -10
  34. package/dist/ChannelSchema.d.ts.map +1 -1
  35. package/dist/ChannelSchema.js +45 -6
  36. package/dist/ChannelSchema.js.map +1 -1
  37. package/dist/Chunk.d.ts +548 -379
  38. package/dist/Chunk.d.ts.map +1 -1
  39. package/dist/Chunk.js +238 -170
  40. package/dist/Chunk.js.map +1 -1
  41. package/dist/Clock.d.ts +15 -8
  42. package/dist/Clock.d.ts.map +1 -1
  43. package/dist/Clock.js +8 -4
  44. package/dist/Clock.js.map +1 -1
  45. package/dist/Combiner.d.ts +2 -4
  46. package/dist/Combiner.d.ts.map +1 -1
  47. package/dist/Combiner.js +2 -4
  48. package/dist/Combiner.js.map +1 -1
  49. package/dist/Config.d.ts +4 -2
  50. package/dist/Config.d.ts.map +1 -1
  51. package/dist/Config.js +2 -2
  52. package/dist/Config.js.map +1 -1
  53. package/dist/ConfigProvider.d.ts +1 -1
  54. package/dist/ConfigProvider.js +1 -1
  55. package/dist/Console.d.ts +76 -50
  56. package/dist/Console.d.ts.map +1 -1
  57. package/dist/Console.js +69 -46
  58. package/dist/Console.js.map +1 -1
  59. package/dist/Context.d.ts +383 -134
  60. package/dist/Context.d.ts.map +1 -1
  61. package/dist/Context.js +134 -54
  62. package/dist/Context.js.map +1 -1
  63. package/dist/Cron.d.ts +69 -48
  64. package/dist/Cron.d.ts.map +1 -1
  65. package/dist/Cron.js +96 -36
  66. package/dist/Cron.js.map +1 -1
  67. package/dist/Data.d.ts +3 -2
  68. package/dist/Data.d.ts.map +1 -1
  69. package/dist/Data.js.map +1 -1
  70. package/dist/DateTime.d.ts +874 -443
  71. package/dist/DateTime.d.ts.map +1 -1
  72. package/dist/DateTime.js +374 -215
  73. package/dist/DateTime.js.map +1 -1
  74. package/dist/Deferred.d.ts +367 -174
  75. package/dist/Deferred.d.ts.map +1 -1
  76. package/dist/Deferred.js +145 -71
  77. package/dist/Deferred.js.map +1 -1
  78. package/dist/Differ.d.ts +42 -0
  79. package/dist/Differ.d.ts.map +1 -1
  80. package/dist/Differ.js +36 -0
  81. package/dist/Duration.d.ts +329 -185
  82. package/dist/Duration.d.ts.map +1 -1
  83. package/dist/Duration.js +174 -106
  84. package/dist/Duration.js.map +1 -1
  85. package/dist/Effect.d.ts +2109 -1945
  86. package/dist/Effect.d.ts.map +1 -1
  87. package/dist/Effect.js +901 -726
  88. package/dist/Effect.js.map +1 -1
  89. package/dist/Effectable.d.ts +37 -2
  90. package/dist/Effectable.d.ts.map +1 -1
  91. package/dist/Effectable.js +2 -2
  92. package/dist/Effectable.js.map +1 -1
  93. package/dist/Encoding.d.ts +78 -28
  94. package/dist/Encoding.d.ts.map +1 -1
  95. package/dist/Encoding.js +75 -27
  96. package/dist/Encoding.js.map +1 -1
  97. package/dist/Equivalence.d.ts +14 -19
  98. package/dist/Equivalence.d.ts.map +1 -1
  99. package/dist/Equivalence.js +14 -19
  100. package/dist/Equivalence.js.map +1 -1
  101. package/dist/ErrorReporter.d.ts +66 -82
  102. package/dist/ErrorReporter.d.ts.map +1 -1
  103. package/dist/ErrorReporter.js +38 -29
  104. package/dist/ErrorReporter.js.map +1 -1
  105. package/dist/ExecutionPlan.d.ts +94 -9
  106. package/dist/ExecutionPlan.d.ts.map +1 -1
  107. package/dist/ExecutionPlan.js +20 -5
  108. package/dist/ExecutionPlan.js.map +1 -1
  109. package/dist/Exit.d.ts +7 -5
  110. package/dist/Exit.d.ts.map +1 -1
  111. package/dist/Exit.js.map +1 -1
  112. package/dist/Fiber.d.ts +72 -40
  113. package/dist/Fiber.d.ts.map +1 -1
  114. package/dist/Fiber.js +39 -21
  115. package/dist/Fiber.js.map +1 -1
  116. package/dist/FiberHandle.d.ts +117 -56
  117. package/dist/FiberHandle.d.ts.map +1 -1
  118. package/dist/FiberHandle.js +120 -38
  119. package/dist/FiberHandle.js.map +1 -1
  120. package/dist/FiberMap.d.ts +286 -158
  121. package/dist/FiberMap.d.ts.map +1 -1
  122. package/dist/FiberMap.js +174 -72
  123. package/dist/FiberMap.js.map +1 -1
  124. package/dist/FiberSet.d.ts +92 -51
  125. package/dist/FiberSet.d.ts.map +1 -1
  126. package/dist/FiberSet.js +96 -33
  127. package/dist/FiberSet.js.map +1 -1
  128. package/dist/FileSystem.d.ts +104 -73
  129. package/dist/FileSystem.d.ts.map +1 -1
  130. package/dist/FileSystem.js +53 -39
  131. package/dist/FileSystem.js.map +1 -1
  132. package/dist/Filter.d.ts +166 -88
  133. package/dist/Filter.d.ts.map +1 -1
  134. package/dist/Filter.js +68 -42
  135. package/dist/Filter.js.map +1 -1
  136. package/dist/Function.d.ts +154 -86
  137. package/dist/Function.d.ts.map +1 -1
  138. package/dist/Function.js +53 -37
  139. package/dist/Function.js.map +1 -1
  140. package/dist/Graph.d.ts +682 -365
  141. package/dist/Graph.d.ts.map +1 -1
  142. package/dist/Graph.js +308 -157
  143. package/dist/Graph.js.map +1 -1
  144. package/dist/HKT.d.ts +29 -13
  145. package/dist/HKT.d.ts.map +1 -1
  146. package/dist/Hash.d.ts +31 -18
  147. package/dist/Hash.d.ts.map +1 -1
  148. package/dist/Hash.js +25 -15
  149. package/dist/Hash.js.map +1 -1
  150. package/dist/HashMap.d.ts +444 -256
  151. package/dist/HashMap.d.ts.map +1 -1
  152. package/dist/HashMap.js +223 -105
  153. package/dist/HashMap.js.map +1 -1
  154. package/dist/HashRing.d.ts +36 -17
  155. package/dist/HashRing.d.ts.map +1 -1
  156. package/dist/HashRing.js +75 -8
  157. package/dist/HashRing.js.map +1 -1
  158. package/dist/HashSet.d.ts +194 -104
  159. package/dist/HashSet.d.ts.map +1 -1
  160. package/dist/HashSet.js +93 -38
  161. package/dist/HashSet.js.map +1 -1
  162. package/dist/Inspectable.d.ts +20 -9
  163. package/dist/Inspectable.d.ts.map +1 -1
  164. package/dist/Inspectable.js +16 -6
  165. package/dist/Inspectable.js.map +1 -1
  166. package/dist/Iterable.d.ts +309 -149
  167. package/dist/Iterable.d.ts.map +1 -1
  168. package/dist/Iterable.js +129 -65
  169. package/dist/Iterable.js.map +1 -1
  170. package/dist/JsonPatch.d.ts +4 -3
  171. package/dist/JsonPatch.d.ts.map +1 -1
  172. package/dist/JsonPatch.js +4 -3
  173. package/dist/JsonPatch.js.map +1 -1
  174. package/dist/Latch.d.ts +98 -15
  175. package/dist/Latch.d.ts.map +1 -1
  176. package/dist/Latch.js +41 -10
  177. package/dist/Latch.js.map +1 -1
  178. package/dist/Layer.d.ts +412 -309
  179. package/dist/Layer.d.ts.map +1 -1
  180. package/dist/Layer.js +261 -180
  181. package/dist/Layer.js.map +1 -1
  182. package/dist/LayerMap.d.ts +95 -21
  183. package/dist/LayerMap.d.ts.map +1 -1
  184. package/dist/LayerMap.js +55 -11
  185. package/dist/LayerMap.js.map +1 -1
  186. package/dist/LogLevel.d.ts +92 -131
  187. package/dist/LogLevel.d.ts.map +1 -1
  188. package/dist/LogLevel.js +25 -15
  189. package/dist/LogLevel.js.map +1 -1
  190. package/dist/Logger.d.ts +155 -99
  191. package/dist/Logger.d.ts.map +1 -1
  192. package/dist/Logger.js +211 -184
  193. package/dist/Logger.js.map +1 -1
  194. package/dist/ManagedRuntime.d.ts +75 -17
  195. package/dist/ManagedRuntime.d.ts.map +1 -1
  196. package/dist/ManagedRuntime.js +22 -16
  197. package/dist/ManagedRuntime.js.map +1 -1
  198. package/dist/Match.d.ts +133 -157
  199. package/dist/Match.d.ts.map +1 -1
  200. package/dist/Match.js +85 -76
  201. package/dist/Match.js.map +1 -1
  202. package/dist/Metric.d.ts +325 -284
  203. package/dist/Metric.d.ts.map +1 -1
  204. package/dist/Metric.js +217 -212
  205. package/dist/Metric.js.map +1 -1
  206. package/dist/MutableHashMap.d.ts +117 -58
  207. package/dist/MutableHashMap.d.ts.map +1 -1
  208. package/dist/MutableHashMap.js +52 -29
  209. package/dist/MutableHashMap.js.map +1 -1
  210. package/dist/MutableHashSet.d.ts +52 -30
  211. package/dist/MutableHashSet.d.ts.map +1 -1
  212. package/dist/MutableHashSet.js +94 -38
  213. package/dist/MutableHashSet.js.map +1 -1
  214. package/dist/MutableList.d.ts +92 -49
  215. package/dist/MutableList.d.ts.map +1 -1
  216. package/dist/MutableList.js +123 -71
  217. package/dist/MutableList.js.map +1 -1
  218. package/dist/MutableRef.d.ts +99 -62
  219. package/dist/MutableRef.d.ts.map +1 -1
  220. package/dist/MutableRef.js +79 -60
  221. package/dist/MutableRef.js.map +1 -1
  222. package/dist/Newtype.d.ts +3 -0
  223. package/dist/Newtype.d.ts.map +1 -1
  224. package/dist/Newtype.js.map +1 -1
  225. package/dist/NonEmptyIterable.d.ts +36 -39
  226. package/dist/NonEmptyIterable.d.ts.map +1 -1
  227. package/dist/NonEmptyIterable.js +34 -20
  228. package/dist/NonEmptyIterable.js.map +1 -1
  229. package/dist/Number.d.ts +116 -64
  230. package/dist/Number.d.ts.map +1 -1
  231. package/dist/Number.js +54 -30
  232. package/dist/Number.js.map +1 -1
  233. package/dist/Optic.d.ts +1 -2
  234. package/dist/Optic.d.ts.map +1 -1
  235. package/dist/Optic.js +0 -1
  236. package/dist/Optic.js.map +1 -1
  237. package/dist/Option.d.ts +28 -47
  238. package/dist/Option.d.ts.map +1 -1
  239. package/dist/Option.js +14 -12
  240. package/dist/Option.js.map +1 -1
  241. package/dist/Ordering.d.ts +43 -28
  242. package/dist/Ordering.d.ts.map +1 -1
  243. package/dist/Ordering.js +4 -2
  244. package/dist/Ordering.js.map +1 -1
  245. package/dist/PartitionedSemaphore.d.ts +225 -40
  246. package/dist/PartitionedSemaphore.d.ts.map +1 -1
  247. package/dist/PartitionedSemaphore.js +113 -17
  248. package/dist/PartitionedSemaphore.js.map +1 -1
  249. package/dist/Path.d.ts +77 -13
  250. package/dist/Path.d.ts.map +1 -1
  251. package/dist/Path.js +48 -4
  252. package/dist/Path.js.map +1 -1
  253. package/dist/Pipeable.d.ts +71 -15
  254. package/dist/Pipeable.d.ts.map +1 -1
  255. package/dist/Pipeable.js +59 -12
  256. package/dist/Pipeable.js.map +1 -1
  257. package/dist/PlatformError.d.ts +74 -6
  258. package/dist/PlatformError.d.ts.map +1 -1
  259. package/dist/PlatformError.js +68 -5
  260. package/dist/PlatformError.js.map +1 -1
  261. package/dist/Pool.d.ts +66 -31
  262. package/dist/Pool.d.ts.map +1 -1
  263. package/dist/Pool.js +26 -24
  264. package/dist/Pool.js.map +1 -1
  265. package/dist/Predicate.d.ts +16 -21
  266. package/dist/Predicate.d.ts.map +1 -1
  267. package/dist/Predicate.js +9 -14
  268. package/dist/Predicate.js.map +1 -1
  269. package/dist/PrimaryKey.d.ts +9 -2
  270. package/dist/PrimaryKey.d.ts.map +1 -1
  271. package/dist/PrimaryKey.js +7 -1
  272. package/dist/PrimaryKey.js.map +1 -1
  273. package/dist/PubSub.d.ts +364 -262
  274. package/dist/PubSub.d.ts.map +1 -1
  275. package/dist/PubSub.js +245 -174
  276. package/dist/PubSub.js.map +1 -1
  277. package/dist/Pull.d.ts +94 -25
  278. package/dist/Pull.d.ts.map +1 -1
  279. package/dist/Pull.js +61 -13
  280. package/dist/Pull.js.map +1 -1
  281. package/dist/Queue.d.ts +284 -150
  282. package/dist/Queue.d.ts.map +1 -1
  283. package/dist/Queue.js +216 -113
  284. package/dist/Queue.js.map +1 -1
  285. package/dist/Random.d.ts +54 -35
  286. package/dist/Random.d.ts.map +1 -1
  287. package/dist/Random.js +36 -24
  288. package/dist/Random.js.map +1 -1
  289. package/dist/RcMap.d.ts +151 -141
  290. package/dist/RcMap.d.ts.map +1 -1
  291. package/dist/RcMap.js +66 -20
  292. package/dist/RcMap.js.map +1 -1
  293. package/dist/RcRef.d.ts +69 -32
  294. package/dist/RcRef.d.ts.map +1 -1
  295. package/dist/RcRef.js +33 -16
  296. package/dist/RcRef.js.map +1 -1
  297. package/dist/Record.d.ts +273 -129
  298. package/dist/Record.d.ts.map +1 -1
  299. package/dist/Record.js +117 -57
  300. package/dist/Record.js.map +1 -1
  301. package/dist/Redactable.d.ts +3 -3
  302. package/dist/Redactable.js +2 -2
  303. package/dist/Redacted.d.ts +63 -33
  304. package/dist/Redacted.d.ts.map +1 -1
  305. package/dist/Redacted.js +30 -14
  306. package/dist/Redacted.js.map +1 -1
  307. package/dist/Ref.d.ts +81 -52
  308. package/dist/Ref.d.ts.map +1 -1
  309. package/dist/Ref.js +54 -35
  310. package/dist/Ref.js.map +1 -1
  311. package/dist/References.d.ts +73 -31
  312. package/dist/References.d.ts.map +1 -1
  313. package/dist/References.js +66 -30
  314. package/dist/References.js.map +1 -1
  315. package/dist/RegExp.d.ts +11 -5
  316. package/dist/RegExp.d.ts.map +1 -1
  317. package/dist/RegExp.js +11 -5
  318. package/dist/RegExp.js.map +1 -1
  319. package/dist/Request.d.ts +158 -34
  320. package/dist/Request.d.ts.map +1 -1
  321. package/dist/Request.js +67 -12
  322. package/dist/Request.js.map +1 -1
  323. package/dist/RequestResolver.d.ts +261 -116
  324. package/dist/RequestResolver.d.ts.map +1 -1
  325. package/dist/RequestResolver.js +77 -41
  326. package/dist/RequestResolver.js.map +1 -1
  327. package/dist/Resource.d.ts +13 -7
  328. package/dist/Resource.d.ts.map +1 -1
  329. package/dist/Resource.js +44 -6
  330. package/dist/Resource.js.map +1 -1
  331. package/dist/Result.d.ts +16 -14
  332. package/dist/Result.d.ts.map +1 -1
  333. package/dist/Result.js +6 -6
  334. package/dist/Result.js.map +1 -1
  335. package/dist/Runtime.d.ts +43 -18
  336. package/dist/Runtime.d.ts.map +1 -1
  337. package/dist/Runtime.js +35 -16
  338. package/dist/Runtime.js.map +1 -1
  339. package/dist/Schedule.d.ts +545 -576
  340. package/dist/Schedule.d.ts.map +1 -1
  341. package/dist/Schedule.js +260 -246
  342. package/dist/Schedule.js.map +1 -1
  343. package/dist/Scheduler.d.ts +43 -6
  344. package/dist/Scheduler.d.ts.map +1 -1
  345. package/dist/Scheduler.js +33 -4
  346. package/dist/Scheduler.js.map +1 -1
  347. package/dist/Schema.d.ts +803 -282
  348. package/dist/Schema.d.ts.map +1 -1
  349. package/dist/Schema.js +281 -189
  350. package/dist/Schema.js.map +1 -1
  351. package/dist/SchemaAST.d.ts +24 -15
  352. package/dist/SchemaAST.d.ts.map +1 -1
  353. package/dist/SchemaAST.js +13 -9
  354. package/dist/SchemaAST.js.map +1 -1
  355. package/dist/SchemaGetter.d.ts +26 -13
  356. package/dist/SchemaGetter.d.ts.map +1 -1
  357. package/dist/SchemaGetter.js +22 -9
  358. package/dist/SchemaGetter.js.map +1 -1
  359. package/dist/SchemaIssue.d.ts +1 -8
  360. package/dist/SchemaIssue.d.ts.map +1 -1
  361. package/dist/SchemaIssue.js.map +1 -1
  362. package/dist/SchemaParser.d.ts +194 -25
  363. package/dist/SchemaParser.d.ts.map +1 -1
  364. package/dist/SchemaParser.js +220 -26
  365. package/dist/SchemaParser.js.map +1 -1
  366. package/dist/SchemaTransformation.d.ts +61 -41
  367. package/dist/SchemaTransformation.d.ts.map +1 -1
  368. package/dist/SchemaTransformation.js +56 -33
  369. package/dist/SchemaTransformation.js.map +1 -1
  370. package/dist/SchemaUtils.d.ts +7 -0
  371. package/dist/SchemaUtils.d.ts.map +1 -1
  372. package/dist/SchemaUtils.js +23 -0
  373. package/dist/SchemaUtils.js.map +1 -1
  374. package/dist/Scope.d.ts +102 -43
  375. package/dist/Scope.d.ts.map +1 -1
  376. package/dist/Scope.js +57 -23
  377. package/dist/Scope.js.map +1 -1
  378. package/dist/ScopedCache.d.ts +138 -46
  379. package/dist/ScopedCache.d.ts.map +1 -1
  380. package/dist/ScopedCache.js +80 -19
  381. package/dist/ScopedCache.js.map +1 -1
  382. package/dist/ScopedRef.d.ts +28 -8
  383. package/dist/ScopedRef.d.ts.map +1 -1
  384. package/dist/ScopedRef.js +25 -5
  385. package/dist/ScopedRef.js.map +1 -1
  386. package/dist/Semaphore.d.ts +64 -28
  387. package/dist/Semaphore.d.ts.map +1 -1
  388. package/dist/Semaphore.js +22 -13
  389. package/dist/Semaphore.js.map +1 -1
  390. package/dist/Sink.d.ts +458 -200
  391. package/dist/Sink.d.ts.map +1 -1
  392. package/dist/Sink.js +240 -89
  393. package/dist/Sink.js.map +1 -1
  394. package/dist/Stdio.d.ts +43 -6
  395. package/dist/Stdio.d.ts.map +1 -1
  396. package/dist/Stdio.js +33 -4
  397. package/dist/Stdio.js.map +1 -1
  398. package/dist/Stream.d.ts +1896 -1183
  399. package/dist/Stream.d.ts.map +1 -1
  400. package/dist/Stream.js +867 -524
  401. package/dist/Stream.js.map +1 -1
  402. package/dist/String.d.ts +171 -95
  403. package/dist/String.d.ts.map +1 -1
  404. package/dist/String.js +125 -67
  405. package/dist/String.js.map +1 -1
  406. package/dist/SubscriptionRef.d.ts +308 -203
  407. package/dist/SubscriptionRef.d.ts.map +1 -1
  408. package/dist/SubscriptionRef.js +125 -76
  409. package/dist/SubscriptionRef.js.map +1 -1
  410. package/dist/Symbol.d.ts +13 -5
  411. package/dist/Symbol.d.ts.map +1 -1
  412. package/dist/Symbol.js +13 -5
  413. package/dist/Symbol.js.map +1 -1
  414. package/dist/SynchronizedRef.d.ts +278 -62
  415. package/dist/SynchronizedRef.d.ts.map +1 -1
  416. package/dist/SynchronizedRef.js +116 -23
  417. package/dist/SynchronizedRef.js.map +1 -1
  418. package/dist/Take.d.ts +26 -2
  419. package/dist/Take.d.ts.map +1 -1
  420. package/dist/Take.js +4 -1
  421. package/dist/Take.js.map +1 -1
  422. package/dist/Terminal.d.ts +39 -7
  423. package/dist/Terminal.d.ts.map +1 -1
  424. package/dist/Terminal.js +10 -4
  425. package/dist/Terminal.js.map +1 -1
  426. package/dist/Tracer.d.ts +229 -55
  427. package/dist/Tracer.d.ts.map +1 -1
  428. package/dist/Tracer.js +94 -18
  429. package/dist/Tracer.js.map +1 -1
  430. package/dist/Trie.d.ts +213 -142
  431. package/dist/Trie.d.ts.map +1 -1
  432. package/dist/Trie.js +88 -60
  433. package/dist/Trie.js.map +1 -1
  434. package/dist/TxChunk.d.ts +182 -146
  435. package/dist/TxChunk.d.ts.map +1 -1
  436. package/dist/TxChunk.js +73 -56
  437. package/dist/TxChunk.js.map +1 -1
  438. package/dist/TxDeferred.d.ts +43 -29
  439. package/dist/TxDeferred.d.ts.map +1 -1
  440. package/dist/TxDeferred.js +22 -15
  441. package/dist/TxDeferred.js.map +1 -1
  442. package/dist/TxHashMap.d.ts +362 -222
  443. package/dist/TxHashMap.d.ts.map +1 -1
  444. package/dist/TxHashMap.js +171 -98
  445. package/dist/TxHashMap.js.map +1 -1
  446. package/dist/TxHashSet.d.ts +178 -104
  447. package/dist/TxHashSet.d.ts.map +1 -1
  448. package/dist/TxHashSet.js +84 -43
  449. package/dist/TxHashSet.js.map +1 -1
  450. package/dist/TxPriorityQueue.d.ts +93 -62
  451. package/dist/TxPriorityQueue.d.ts.map +1 -1
  452. package/dist/TxPriorityQueue.js +54 -36
  453. package/dist/TxPriorityQueue.js.map +1 -1
  454. package/dist/TxPubSub.d.ts +77 -49
  455. package/dist/TxPubSub.d.ts.map +1 -1
  456. package/dist/TxPubSub.js +60 -37
  457. package/dist/TxPubSub.js.map +1 -1
  458. package/dist/TxQueue.d.ts +279 -241
  459. package/dist/TxQueue.d.ts.map +1 -1
  460. package/dist/TxQueue.js +147 -101
  461. package/dist/TxQueue.js.map +1 -1
  462. package/dist/TxReentrantLock.d.ts +69 -46
  463. package/dist/TxReentrantLock.d.ts.map +1 -1
  464. package/dist/TxReentrantLock.js +48 -32
  465. package/dist/TxReentrantLock.js.map +1 -1
  466. package/dist/TxRef.d.ts +69 -40
  467. package/dist/TxRef.d.ts.map +1 -1
  468. package/dist/TxRef.js +34 -19
  469. package/dist/TxRef.js.map +1 -1
  470. package/dist/TxSemaphore.d.ts +101 -54
  471. package/dist/TxSemaphore.d.ts.map +1 -1
  472. package/dist/TxSemaphore.js +76 -34
  473. package/dist/TxSemaphore.js.map +1 -1
  474. package/dist/TxSubscriptionRef.d.ts +72 -48
  475. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  476. package/dist/TxSubscriptionRef.js +33 -22
  477. package/dist/TxSubscriptionRef.js.map +1 -1
  478. package/dist/Types.d.ts +34 -34
  479. package/dist/UndefinedOr.d.ts +48 -25
  480. package/dist/UndefinedOr.d.ts.map +1 -1
  481. package/dist/UndefinedOr.js +28 -25
  482. package/dist/UndefinedOr.js.map +1 -1
  483. package/dist/Unify.d.ts +71 -116
  484. package/dist/Unify.d.ts.map +1 -1
  485. package/dist/Unify.js +20 -6
  486. package/dist/Unify.js.map +1 -1
  487. package/dist/Utils.d.ts +4 -0
  488. package/dist/Utils.d.ts.map +1 -1
  489. package/dist/Utils.js +4 -0
  490. package/dist/Utils.js.map +1 -1
  491. package/dist/index.d.ts +81 -32
  492. package/dist/index.d.ts.map +1 -1
  493. package/dist/index.js +81 -32
  494. package/dist/index.js.map +1 -1
  495. package/dist/internal/schema/schema.js +1 -1
  496. package/dist/internal/schema/schema.js.map +1 -1
  497. package/dist/testing/FastCheck.d.ts +6 -3
  498. package/dist/testing/FastCheck.d.ts.map +1 -1
  499. package/dist/testing/FastCheck.js +6 -3
  500. package/dist/testing/FastCheck.js.map +1 -1
  501. package/dist/testing/TestClock.d.ts +39 -34
  502. package/dist/testing/TestClock.d.ts.map +1 -1
  503. package/dist/testing/TestClock.js +42 -12
  504. package/dist/testing/TestClock.js.map +1 -1
  505. package/dist/testing/TestConsole.d.ts +39 -30
  506. package/dist/testing/TestConsole.d.ts.map +1 -1
  507. package/dist/testing/TestConsole.js +25 -10
  508. package/dist/testing/TestConsole.js.map +1 -1
  509. package/dist/testing/TestSchema.js +7 -7
  510. package/dist/testing/TestSchema.js.map +1 -1
  511. package/dist/unstable/ai/AiError.d.ts +197 -130
  512. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  513. package/dist/unstable/ai/AiError.js +166 -102
  514. package/dist/unstable/ai/AiError.js.map +1 -1
  515. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  516. package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
  517. package/dist/unstable/ai/Chat.d.ts +65 -41
  518. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  519. package/dist/unstable/ai/Chat.js +51 -33
  520. package/dist/unstable/ai/Chat.js.map +1 -1
  521. package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
  522. package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
  523. package/dist/unstable/ai/EmbeddingModel.js +9 -8
  524. package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
  525. package/dist/unstable/ai/IdGenerator.d.ts +28 -18
  526. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  527. package/dist/unstable/ai/IdGenerator.js +18 -11
  528. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  529. package/dist/unstable/ai/LanguageModel.d.ts +31 -25
  530. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  531. package/dist/unstable/ai/LanguageModel.js +20 -14
  532. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  533. package/dist/unstable/ai/McpSchema.d.ts +339 -119
  534. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  535. package/dist/unstable/ai/McpSchema.js +264 -98
  536. package/dist/unstable/ai/McpSchema.js.map +1 -1
  537. package/dist/unstable/ai/McpServer.d.ts +53 -19
  538. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  539. package/dist/unstable/ai/McpServer.js +63 -15
  540. package/dist/unstable/ai/McpServer.js.map +1 -1
  541. package/dist/unstable/ai/Model.d.ts +8 -6
  542. package/dist/unstable/ai/Model.d.ts.map +1 -1
  543. package/dist/unstable/ai/Model.js +7 -5
  544. package/dist/unstable/ai/Model.js.map +1 -1
  545. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  546. package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
  547. package/dist/unstable/ai/Prompt.d.ts +194 -168
  548. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  549. package/dist/unstable/ai/Prompt.js +75 -66
  550. package/dist/unstable/ai/Prompt.js.map +1 -1
  551. package/dist/unstable/ai/Response.d.ts +153 -140
  552. package/dist/unstable/ai/Response.d.ts.map +1 -1
  553. package/dist/unstable/ai/Response.js +43 -48
  554. package/dist/unstable/ai/Response.js.map +1 -1
  555. package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
  556. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
  557. package/dist/unstable/ai/ResponseIdTracker.js +27 -2
  558. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  559. package/dist/unstable/ai/Telemetry.d.ts +42 -32
  560. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  561. package/dist/unstable/ai/Telemetry.js +14 -10
  562. package/dist/unstable/ai/Telemetry.js.map +1 -1
  563. package/dist/unstable/ai/Tokenizer.d.ts +13 -8
  564. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  565. package/dist/unstable/ai/Tokenizer.js +10 -6
  566. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  567. package/dist/unstable/ai/Tool.d.ts +153 -84
  568. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  569. package/dist/unstable/ai/Tool.js +97 -44
  570. package/dist/unstable/ai/Tool.js.map +1 -1
  571. package/dist/unstable/ai/Toolkit.d.ts +32 -39
  572. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  573. package/dist/unstable/ai/Toolkit.js +7 -5
  574. package/dist/unstable/ai/Toolkit.js.map +1 -1
  575. package/dist/unstable/ai/index.d.ts +42 -24
  576. package/dist/unstable/ai/index.d.ts.map +1 -1
  577. package/dist/unstable/ai/index.js +42 -24
  578. package/dist/unstable/ai/index.js.map +1 -1
  579. package/dist/unstable/cli/Argument.d.ts +226 -134
  580. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  581. package/dist/unstable/cli/Argument.js +101 -65
  582. package/dist/unstable/cli/Argument.js.map +1 -1
  583. package/dist/unstable/cli/CliError.d.ts +72 -26
  584. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  585. package/dist/unstable/cli/CliError.js +86 -23
  586. package/dist/unstable/cli/CliError.js.map +1 -1
  587. package/dist/unstable/cli/CliOutput.d.ts +43 -13
  588. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  589. package/dist/unstable/cli/CliOutput.js +30 -6
  590. package/dist/unstable/cli/CliOutput.js.map +1 -1
  591. package/dist/unstable/cli/Command.d.ts +194 -113
  592. package/dist/unstable/cli/Command.d.ts.map +1 -1
  593. package/dist/unstable/cli/Command.js +45 -31
  594. package/dist/unstable/cli/Command.js.map +1 -1
  595. package/dist/unstable/cli/Completions.d.ts +7 -7
  596. package/dist/unstable/cli/Completions.js +1 -1
  597. package/dist/unstable/cli/Flag.d.ts +235 -142
  598. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  599. package/dist/unstable/cli/Flag.js +111 -71
  600. package/dist/unstable/cli/Flag.js.map +1 -1
  601. package/dist/unstable/cli/GlobalFlag.d.ts +41 -13
  602. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
  603. package/dist/unstable/cli/GlobalFlag.js +30 -7
  604. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  605. package/dist/unstable/cli/HelpDoc.d.ts +35 -10
  606. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  607. package/dist/unstable/cli/HelpDoc.js +21 -0
  608. package/dist/unstable/cli/Param.d.ts +79 -31
  609. package/dist/unstable/cli/Param.d.ts.map +1 -1
  610. package/dist/unstable/cli/Param.js +160 -98
  611. package/dist/unstable/cli/Param.js.map +1 -1
  612. package/dist/unstable/cli/Primitive.d.ts +79 -42
  613. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  614. package/dist/unstable/cli/Primitive.js +66 -35
  615. package/dist/unstable/cli/Primitive.js.map +1 -1
  616. package/dist/unstable/cli/Prompt.d.ts +177 -45
  617. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  618. package/dist/unstable/cli/Prompt.js +103 -21
  619. package/dist/unstable/cli/Prompt.js.map +1 -1
  620. package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
  621. package/dist/unstable/cli/internal/ansi.js +13 -0
  622. package/dist/unstable/cli/internal/ansi.js.map +1 -1
  623. package/dist/unstable/cli/internal/command.d.ts +5 -1
  624. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  625. package/dist/unstable/cli/internal/command.js +5 -1
  626. package/dist/unstable/cli/internal/command.js.map +1 -1
  627. package/dist/unstable/cli/internal/config.d.ts +3 -0
  628. package/dist/unstable/cli/internal/config.d.ts.map +1 -1
  629. package/dist/unstable/cli/internal/config.js.map +1 -1
  630. package/dist/unstable/cli/internal/lexer.js.map +1 -1
  631. package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
  632. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  633. package/dist/unstable/cluster/ClusterCron.js +35 -1
  634. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  635. package/dist/unstable/cluster/ClusterError.d.ts +56 -7
  636. package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
  637. package/dist/unstable/cluster/ClusterError.js +56 -7
  638. package/dist/unstable/cluster/ClusterError.js.map +1 -1
  639. package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
  640. package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
  641. package/dist/unstable/cluster/ClusterMetrics.js +39 -5
  642. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  643. package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
  644. package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
  645. package/dist/unstable/cluster/ClusterSchema.js +61 -8
  646. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  647. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
  648. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  649. package/dist/unstable/cluster/ClusterWorkflowEngine.js +35 -2
  650. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  651. package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
  652. package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
  653. package/dist/unstable/cluster/DeliverAt.js +11 -3
  654. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  655. package/dist/unstable/cluster/Entity.d.ts +75 -16
  656. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  657. package/dist/unstable/cluster/Entity.js +75 -10
  658. package/dist/unstable/cluster/Entity.js.map +1 -1
  659. package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
  660. package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
  661. package/dist/unstable/cluster/EntityAddress.js +30 -2
  662. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  663. package/dist/unstable/cluster/EntityId.d.ts +18 -3
  664. package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
  665. package/dist/unstable/cluster/EntityId.js +15 -2
  666. package/dist/unstable/cluster/EntityId.js.map +1 -1
  667. package/dist/unstable/cluster/EntityProxy.d.ts +34 -2
  668. package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
  669. package/dist/unstable/cluster/EntityProxy.js +24 -2
  670. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  671. package/dist/unstable/cluster/EntityProxyServer.d.ts +17 -2
  672. package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
  673. package/dist/unstable/cluster/EntityProxyServer.js +40 -8
  674. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  675. package/dist/unstable/cluster/EntityResource.d.ts +43 -6
  676. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  677. package/dist/unstable/cluster/EntityResource.js +11 -4
  678. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  679. package/dist/unstable/cluster/EntityType.d.ts +27 -3
  680. package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
  681. package/dist/unstable/cluster/EntityType.js +24 -2
  682. package/dist/unstable/cluster/EntityType.js.map +1 -1
  683. package/dist/unstable/cluster/Envelope.d.ts +105 -23
  684. package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
  685. package/dist/unstable/cluster/Envelope.js +88 -14
  686. package/dist/unstable/cluster/Envelope.js.map +1 -1
  687. package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
  688. package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
  689. package/dist/unstable/cluster/HttpRunner.js +88 -13
  690. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  691. package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
  692. package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
  693. package/dist/unstable/cluster/K8sHttpClient.js +31 -6
  694. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  695. package/dist/unstable/cluster/MachineId.d.ts +24 -3
  696. package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
  697. package/dist/unstable/cluster/MachineId.js +21 -2
  698. package/dist/unstable/cluster/MachineId.js.map +1 -1
  699. package/dist/unstable/cluster/Message.d.ts +102 -13
  700. package/dist/unstable/cluster/Message.d.ts.map +1 -1
  701. package/dist/unstable/cluster/Message.js +86 -10
  702. package/dist/unstable/cluster/Message.js.map +1 -1
  703. package/dist/unstable/cluster/MessageStorage.d.ts +127 -21
  704. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  705. package/dist/unstable/cluster/MessageStorage.js +70 -10
  706. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  707. package/dist/unstable/cluster/Reply.d.ts +101 -12
  708. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  709. package/dist/unstable/cluster/Reply.js +64 -8
  710. package/dist/unstable/cluster/Reply.js.map +1 -1
  711. package/dist/unstable/cluster/Runner.d.ts +47 -17
  712. package/dist/unstable/cluster/Runner.d.ts.map +1 -1
  713. package/dist/unstable/cluster/Runner.js +47 -17
  714. package/dist/unstable/cluster/Runner.js.map +1 -1
  715. package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
  716. package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
  717. package/dist/unstable/cluster/RunnerAddress.js +34 -2
  718. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  719. package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
  720. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  721. package/dist/unstable/cluster/RunnerHealth.js +40 -12
  722. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  723. package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
  724. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  725. package/dist/unstable/cluster/RunnerServer.js +31 -4
  726. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  727. package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
  728. package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
  729. package/dist/unstable/cluster/RunnerStorage.js +38 -4
  730. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  731. package/dist/unstable/cluster/Runners.d.ts +73 -10
  732. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  733. package/dist/unstable/cluster/Runners.js +70 -9
  734. package/dist/unstable/cluster/Runners.js.map +1 -1
  735. package/dist/unstable/cluster/ShardId.d.ts +51 -5
  736. package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
  737. package/dist/unstable/cluster/ShardId.js +47 -4
  738. package/dist/unstable/cluster/ShardId.js.map +1 -1
  739. package/dist/unstable/cluster/Sharding.d.ts +10 -2
  740. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  741. package/dist/unstable/cluster/Sharding.js +35 -4
  742. package/dist/unstable/cluster/Sharding.js.map +1 -1
  743. package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
  744. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  745. package/dist/unstable/cluster/ShardingConfig.js +66 -9
  746. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  747. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
  748. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
  749. package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
  750. package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
  751. package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
  752. package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
  753. package/dist/unstable/cluster/SingleRunner.js +23 -1
  754. package/dist/unstable/cluster/SingleRunner.js.map +1 -1
  755. package/dist/unstable/cluster/Singleton.d.ts +15 -1
  756. package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
  757. package/dist/unstable/cluster/Singleton.js +15 -1
  758. package/dist/unstable/cluster/Singleton.js.map +1 -1
  759. package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
  760. package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
  761. package/dist/unstable/cluster/SingletonAddress.js +21 -1
  762. package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
  763. package/dist/unstable/cluster/Snowflake.d.ts +89 -19
  764. package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
  765. package/dist/unstable/cluster/Snowflake.js +48 -13
  766. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  767. package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
  768. package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
  769. package/dist/unstable/cluster/SocketRunner.js +29 -2
  770. package/dist/unstable/cluster/SocketRunner.js.map +1 -1
  771. package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
  772. package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
  773. package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
  774. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  775. package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
  776. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  777. package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
  778. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  779. package/dist/unstable/cluster/TestRunner.d.ts +18 -1
  780. package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
  781. package/dist/unstable/cluster/TestRunner.js +18 -1
  782. package/dist/unstable/cluster/TestRunner.js.map +1 -1
  783. package/dist/unstable/cluster/internal/hash.js +12 -0
  784. package/dist/unstable/cluster/internal/hash.js.map +1 -1
  785. package/dist/unstable/devtools/DevTools.d.ts +26 -3
  786. package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
  787. package/dist/unstable/devtools/DevTools.js +26 -3
  788. package/dist/unstable/devtools/DevTools.js.map +1 -1
  789. package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
  790. package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
  791. package/dist/unstable/devtools/DevToolsClient.js +32 -5
  792. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  793. package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
  794. package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
  795. package/dist/unstable/devtools/DevToolsSchema.js +102 -20
  796. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  797. package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
  798. package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
  799. package/dist/unstable/devtools/DevToolsServer.js +21 -1
  800. package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
  801. package/dist/unstable/encoding/Msgpack.d.ts +81 -12
  802. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  803. package/dist/unstable/encoding/Msgpack.js +75 -9
  804. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  805. package/dist/unstable/encoding/Ndjson.d.ts +149 -21
  806. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  807. package/dist/unstable/encoding/Ndjson.js +97 -13
  808. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  809. package/dist/unstable/encoding/Sse.d.ts +109 -18
  810. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  811. package/dist/unstable/encoding/Sse.js +69 -13
  812. package/dist/unstable/encoding/Sse.js.map +1 -1
  813. package/dist/unstable/eventlog/Event.d.ts +115 -30
  814. package/dist/unstable/eventlog/Event.d.ts.map +1 -1
  815. package/dist/unstable/eventlog/Event.js +22 -2
  816. package/dist/unstable/eventlog/Event.js.map +1 -1
  817. package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
  818. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  819. package/dist/unstable/eventlog/EventGroup.js +24 -6
  820. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  821. package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
  822. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  823. package/dist/unstable/eventlog/EventJournal.js +108 -16
  824. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  825. package/dist/unstable/eventlog/EventLog.d.ts +151 -31
  826. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  827. package/dist/unstable/eventlog/EventLog.js +111 -20
  828. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  829. package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
  830. package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
  831. package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
  832. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  833. package/dist/unstable/eventlog/EventLogMessage.d.ts +92 -18
  834. package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
  835. package/dist/unstable/eventlog/EventLogMessage.js +72 -16
  836. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
  837. package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
  838. package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
  839. package/dist/unstable/eventlog/EventLogRemote.js +54 -8
  840. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  841. package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
  842. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  843. package/dist/unstable/eventlog/EventLogServer.js +17 -3
  844. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  845. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
  846. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  847. package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
  848. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  849. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
  850. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  851. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
  852. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  853. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
  854. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
  855. package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
  856. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
  857. package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
  858. package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
  859. package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
  860. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
  861. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
  862. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
  863. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
  864. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
  865. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
  866. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
  867. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
  868. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
  869. package/dist/unstable/http/Cookies.d.ts +156 -77
  870. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  871. package/dist/unstable/http/Cookies.js +93 -39
  872. package/dist/unstable/http/Cookies.js.map +1 -1
  873. package/dist/unstable/http/Etag.d.ts +40 -7
  874. package/dist/unstable/http/Etag.d.ts.map +1 -1
  875. package/dist/unstable/http/Etag.js +27 -4
  876. package/dist/unstable/http/Etag.js.map +1 -1
  877. package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
  878. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  879. package/dist/unstable/http/FetchHttpClient.js +33 -4
  880. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  881. package/dist/unstable/http/FindMyWay.d.ts +1 -1
  882. package/dist/unstable/http/FindMyWay.js +1 -1
  883. package/dist/unstable/http/Headers.d.ts +182 -36
  884. package/dist/unstable/http/Headers.d.ts.map +1 -1
  885. package/dist/unstable/http/Headers.js +86 -16
  886. package/dist/unstable/http/Headers.js.map +1 -1
  887. package/dist/unstable/http/HttpBody.d.ts +114 -26
  888. package/dist/unstable/http/HttpBody.d.ts.map +1 -1
  889. package/dist/unstable/http/HttpBody.js +98 -20
  890. package/dist/unstable/http/HttpBody.js.map +1 -1
  891. package/dist/unstable/http/HttpClient.d.ts +205 -96
  892. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  893. package/dist/unstable/http/HttpClient.js +84 -38
  894. package/dist/unstable/http/HttpClient.js.map +1 -1
  895. package/dist/unstable/http/HttpClientError.d.ts +68 -12
  896. package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
  897. package/dist/unstable/http/HttpClientError.js +71 -9
  898. package/dist/unstable/http/HttpClientError.js.map +1 -1
  899. package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
  900. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  901. package/dist/unstable/http/HttpClientRequest.js +151 -45
  902. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  903. package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
  904. package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
  905. package/dist/unstable/http/HttpClientResponse.js +44 -11
  906. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  907. package/dist/unstable/http/HttpEffect.d.ts +42 -16
  908. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  909. package/dist/unstable/http/HttpEffect.js +33 -13
  910. package/dist/unstable/http/HttpEffect.js.map +1 -1
  911. package/dist/unstable/http/HttpIncomingMessage.d.ts +47 -7
  912. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  913. package/dist/unstable/http/HttpIncomingMessage.js +44 -6
  914. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  915. package/dist/unstable/http/HttpMethod.d.ts +35 -5
  916. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  917. package/dist/unstable/http/HttpMethod.js +23 -1
  918. package/dist/unstable/http/HttpMethod.js.map +1 -1
  919. package/dist/unstable/http/HttpMiddleware.d.ts +37 -11
  920. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  921. package/dist/unstable/http/HttpMiddleware.js +52 -10
  922. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  923. package/dist/unstable/http/HttpPlatform.d.ts +34 -3
  924. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  925. package/dist/unstable/http/HttpPlatform.js +34 -3
  926. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  927. package/dist/unstable/http/HttpRouter.d.ts +194 -45
  928. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  929. package/dist/unstable/http/HttpRouter.js +118 -24
  930. package/dist/unstable/http/HttpRouter.js.map +1 -1
  931. package/dist/unstable/http/HttpServer.d.ts +151 -22
  932. package/dist/unstable/http/HttpServer.d.ts.map +1 -1
  933. package/dist/unstable/http/HttpServer.js +76 -11
  934. package/dist/unstable/http/HttpServer.js.map +1 -1
  935. package/dist/unstable/http/HttpServerError.d.ts +90 -10
  936. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  937. package/dist/unstable/http/HttpServerError.js +82 -8
  938. package/dist/unstable/http/HttpServerError.js.map +1 -1
  939. package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
  940. package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
  941. package/dist/unstable/http/HttpServerRequest.js +101 -20
  942. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  943. package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
  944. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  945. package/dist/unstable/http/HttpServerRespondable.js +43 -5
  946. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  947. package/dist/unstable/http/HttpServerResponse.d.ts +390 -67
  948. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  949. package/dist/unstable/http/HttpServerResponse.js +204 -33
  950. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  951. package/dist/unstable/http/HttpStaticServer.d.ts +22 -4
  952. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
  953. package/dist/unstable/http/HttpStaticServer.js +22 -4
  954. package/dist/unstable/http/HttpStaticServer.js.map +1 -1
  955. package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
  956. package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
  957. package/dist/unstable/http/HttpTraceContext.js +47 -5
  958. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  959. package/dist/unstable/http/Multipart.d.ts +178 -28
  960. package/dist/unstable/http/Multipart.d.ts.map +1 -1
  961. package/dist/unstable/http/Multipart.js +129 -19
  962. package/dist/unstable/http/Multipart.js.map +1 -1
  963. package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
  964. package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
  965. package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
  966. package/dist/unstable/http/Multipasta/Node.js +1 -1
  967. package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
  968. package/dist/unstable/http/Multipasta/Search.js +1 -1
  969. package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
  970. package/dist/unstable/http/Multipasta/Web.js +1 -1
  971. package/dist/unstable/http/Multipasta.d.ts +1 -1
  972. package/dist/unstable/http/Multipasta.js +1 -1
  973. package/dist/unstable/http/Template.d.ts +53 -0
  974. package/dist/unstable/http/Template.d.ts.map +1 -1
  975. package/dist/unstable/http/Template.js +26 -0
  976. package/dist/unstable/http/Template.js.map +1 -1
  977. package/dist/unstable/http/Url.d.ts +56 -42
  978. package/dist/unstable/http/Url.d.ts.map +1 -1
  979. package/dist/unstable/http/Url.js +29 -15
  980. package/dist/unstable/http/Url.js.map +1 -1
  981. package/dist/unstable/http/UrlParams.d.ts +233 -49
  982. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  983. package/dist/unstable/http/UrlParams.js +116 -23
  984. package/dist/unstable/http/UrlParams.js.map +1 -1
  985. package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
  986. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  987. package/dist/unstable/httpapi/HttpApi.js +14 -8
  988. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  989. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +55 -16
  990. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  991. package/dist/unstable/httpapi/HttpApiBuilder.js +44 -6
  992. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  993. package/dist/unstable/httpapi/HttpApiClient.d.ts +58 -15
  994. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  995. package/dist/unstable/httpapi/HttpApiClient.js +42 -6
  996. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  997. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
  998. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  999. package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
  1000. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  1001. package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
  1002. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  1003. package/dist/unstable/httpapi/HttpApiError.js +98 -1
  1004. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  1005. package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
  1006. package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
  1007. package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
  1008. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  1009. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +111 -22
  1010. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  1011. package/dist/unstable/httpapi/HttpApiMiddleware.js +47 -5
  1012. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  1013. package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
  1014. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  1015. package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
  1016. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  1017. package/dist/unstable/httpapi/HttpApiSchema.d.ts +67 -30
  1018. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  1019. package/dist/unstable/httpapi/HttpApiSchema.js +48 -27
  1020. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  1021. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +74 -17
  1022. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  1023. package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
  1024. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  1025. package/dist/unstable/httpapi/HttpApiSwagger.d.ts +5 -2
  1026. package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
  1027. package/dist/unstable/httpapi/HttpApiSwagger.js +24 -2
  1028. package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
  1029. package/dist/unstable/httpapi/HttpApiTest.d.ts +6 -1
  1030. package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
  1031. package/dist/unstable/httpapi/HttpApiTest.js +26 -1
  1032. package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
  1033. package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
  1034. package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
  1035. package/dist/unstable/httpapi/OpenApi.js +73 -15
  1036. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  1037. package/dist/unstable/observability/Otlp.d.ts +33 -3
  1038. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  1039. package/dist/unstable/observability/Otlp.js +14 -3
  1040. package/dist/unstable/observability/Otlp.js.map +1 -1
  1041. package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
  1042. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  1043. package/dist/unstable/observability/OtlpExporter.js +32 -1
  1044. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  1045. package/dist/unstable/observability/OtlpLogger.d.ts +14 -2
  1046. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  1047. package/dist/unstable/observability/OtlpLogger.js +29 -2
  1048. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  1049. package/dist/unstable/observability/OtlpMetrics.d.ts +15 -4
  1050. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  1051. package/dist/unstable/observability/OtlpMetrics.js +32 -2
  1052. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  1053. package/dist/unstable/observability/OtlpResource.d.ts +49 -12
  1054. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  1055. package/dist/unstable/observability/OtlpResource.js +47 -5
  1056. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  1057. package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
  1058. package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
  1059. package/dist/unstable/observability/OtlpSerialization.js +28 -3
  1060. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  1061. package/dist/unstable/observability/OtlpTracer.d.ts +16 -2
  1062. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  1063. package/dist/unstable/observability/OtlpTracer.js +32 -2
  1064. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  1065. package/dist/unstable/observability/PrometheusMetrics.d.ts +32 -12
  1066. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  1067. package/dist/unstable/observability/PrometheusMetrics.js +7 -5
  1068. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  1069. package/dist/unstable/observability/index.d.ts +2 -1
  1070. package/dist/unstable/observability/index.d.ts.map +1 -1
  1071. package/dist/unstable/observability/index.js +2 -1
  1072. package/dist/unstable/observability/index.js.map +1 -1
  1073. package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
  1074. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  1075. package/dist/unstable/persistence/KeyValueStore.js +81 -21
  1076. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  1077. package/dist/unstable/persistence/Persistable.d.ts +76 -15
  1078. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  1079. package/dist/unstable/persistence/Persistable.js +22 -5
  1080. package/dist/unstable/persistence/Persistable.js.map +1 -1
  1081. package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
  1082. package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
  1083. package/dist/unstable/persistence/PersistedCache.js +24 -1
  1084. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  1085. package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
  1086. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  1087. package/dist/unstable/persistence/PersistedQueue.js +60 -13
  1088. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  1089. package/dist/unstable/persistence/Persistence.d.ts +97 -16
  1090. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  1091. package/dist/unstable/persistence/Persistence.js +90 -14
  1092. package/dist/unstable/persistence/Persistence.js.map +1 -1
  1093. package/dist/unstable/persistence/RateLimiter.d.ts +97 -21
  1094. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  1095. package/dist/unstable/persistence/RateLimiter.js +81 -16
  1096. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  1097. package/dist/unstable/persistence/Redis.d.ts +26 -5
  1098. package/dist/unstable/persistence/Redis.d.ts.map +1 -1
  1099. package/dist/unstable/persistence/Redis.js +36 -4
  1100. package/dist/unstable/persistence/Redis.js.map +1 -1
  1101. package/dist/unstable/process/ChildProcess.d.ts +87 -64
  1102. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  1103. package/dist/unstable/process/ChildProcess.js +24 -17
  1104. package/dist/unstable/process/ChildProcess.js.map +1 -1
  1105. package/dist/unstable/process/ChildProcessSpawner.d.ts +22 -11
  1106. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  1107. package/dist/unstable/process/ChildProcessSpawner.js +11 -6
  1108. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  1109. package/dist/unstable/process/index.d.ts +2 -1
  1110. package/dist/unstable/process/index.d.ts.map +1 -1
  1111. package/dist/unstable/process/index.js +2 -1
  1112. package/dist/unstable/process/index.js.map +1 -1
  1113. package/dist/unstable/reactivity/AsyncResult.d.ts +196 -59
  1114. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  1115. package/dist/unstable/reactivity/AsyncResult.js +121 -36
  1116. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  1117. package/dist/unstable/reactivity/Atom.d.ts +539 -130
  1118. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1119. package/dist/unstable/reactivity/Atom.js +252 -58
  1120. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1121. package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
  1122. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1123. package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
  1124. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1125. package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
  1126. package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
  1127. package/dist/unstable/reactivity/AtomRef.js +29 -3
  1128. package/dist/unstable/reactivity/AtomRef.js.map +1 -1
  1129. package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
  1130. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  1131. package/dist/unstable/reactivity/AtomRegistry.js +69 -10
  1132. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1133. package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
  1134. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1135. package/dist/unstable/reactivity/AtomRpc.js +29 -1
  1136. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1137. package/dist/unstable/reactivity/Hydration.d.ts +28 -5
  1138. package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
  1139. package/dist/unstable/reactivity/Hydration.js +35 -3
  1140. package/dist/unstable/reactivity/Hydration.js.map +1 -1
  1141. package/dist/unstable/reactivity/Reactivity.d.ts +95 -13
  1142. package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
  1143. package/dist/unstable/reactivity/Reactivity.js +61 -7
  1144. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1145. package/dist/unstable/rpc/Rpc.d.ts +255 -56
  1146. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1147. package/dist/unstable/rpc/Rpc.js +44 -11
  1148. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1149. package/dist/unstable/rpc/RpcClient.d.ts +81 -19
  1150. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1151. package/dist/unstable/rpc/RpcClient.js +52 -12
  1152. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1153. package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
  1154. package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
  1155. package/dist/unstable/rpc/RpcClientError.js +26 -2
  1156. package/dist/unstable/rpc/RpcClientError.js.map +1 -1
  1157. package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
  1158. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  1159. package/dist/unstable/rpc/RpcGroup.js +3 -1
  1160. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1161. package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
  1162. package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
  1163. package/dist/unstable/rpc/RpcMessage.js +23 -7
  1164. package/dist/unstable/rpc/RpcMessage.js.map +1 -1
  1165. package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
  1166. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  1167. package/dist/unstable/rpc/RpcMiddleware.js +39 -3
  1168. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1169. package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
  1170. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  1171. package/dist/unstable/rpc/RpcSchema.js +34 -3
  1172. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1173. package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
  1174. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1175. package/dist/unstable/rpc/RpcSerialization.js +56 -12
  1176. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1177. package/dist/unstable/rpc/RpcServer.d.ts +73 -23
  1178. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  1179. package/dist/unstable/rpc/RpcServer.js +69 -22
  1180. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1181. package/dist/unstable/rpc/RpcTest.d.ts +20 -1
  1182. package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
  1183. package/dist/unstable/rpc/RpcTest.js +20 -1
  1184. package/dist/unstable/rpc/RpcTest.js.map +1 -1
  1185. package/dist/unstable/rpc/RpcWorker.d.ts +40 -6
  1186. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  1187. package/dist/unstable/rpc/RpcWorker.js +16 -4
  1188. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1189. package/dist/unstable/rpc/Utils.d.ts +8 -0
  1190. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  1191. package/dist/unstable/rpc/Utils.js +8 -0
  1192. package/dist/unstable/rpc/Utils.js.map +1 -1
  1193. package/dist/unstable/schema/Model.d.ts +130 -52
  1194. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1195. package/dist/unstable/schema/Model.js +79 -34
  1196. package/dist/unstable/schema/Model.js.map +1 -1
  1197. package/dist/unstable/schema/VariantSchema.d.ts +104 -24
  1198. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  1199. package/dist/unstable/schema/VariantSchema.js +22 -6
  1200. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1201. package/dist/unstable/socket/Socket.d.ts +167 -34
  1202. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1203. package/dist/unstable/socket/Socket.js +123 -28
  1204. package/dist/unstable/socket/Socket.js.map +1 -1
  1205. package/dist/unstable/socket/SocketServer.d.ts +58 -10
  1206. package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
  1207. package/dist/unstable/socket/SocketServer.js +43 -5
  1208. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1209. package/dist/unstable/sql/Migrator.d.ts +35 -4
  1210. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  1211. package/dist/unstable/sql/Migrator.js +44 -4
  1212. package/dist/unstable/sql/Migrator.js.map +1 -1
  1213. package/dist/unstable/sql/SqlClient.d.ts +34 -2
  1214. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1215. package/dist/unstable/sql/SqlClient.js +38 -1
  1216. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1217. package/dist/unstable/sql/SqlConnection.d.ts +31 -0
  1218. package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
  1219. package/dist/unstable/sql/SqlConnection.js +22 -0
  1220. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1221. package/dist/unstable/sql/SqlError.d.ts +99 -0
  1222. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  1223. package/dist/unstable/sql/SqlError.js +114 -0
  1224. package/dist/unstable/sql/SqlError.js.map +1 -1
  1225. package/dist/unstable/sql/SqlModel.d.ts +26 -5
  1226. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  1227. package/dist/unstable/sql/SqlModel.js +8 -4
  1228. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1229. package/dist/unstable/sql/SqlResolver.d.ts +56 -13
  1230. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  1231. package/dist/unstable/sql/SqlResolver.js +44 -10
  1232. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1233. package/dist/unstable/sql/SqlSchema.d.ts +29 -8
  1234. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  1235. package/dist/unstable/sql/SqlSchema.js +29 -8
  1236. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1237. package/dist/unstable/sql/SqlStream.d.ts +3 -0
  1238. package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
  1239. package/dist/unstable/sql/SqlStream.js +23 -0
  1240. package/dist/unstable/sql/SqlStream.js.map +1 -1
  1241. package/dist/unstable/sql/Statement.d.ts +124 -0
  1242. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  1243. package/dist/unstable/sql/Statement.js +82 -0
  1244. package/dist/unstable/sql/Statement.js.map +1 -1
  1245. package/dist/unstable/sql/index.d.ts +1 -1
  1246. package/dist/unstable/sql/index.js +1 -1
  1247. package/dist/unstable/workers/Transferable.d.ts +65 -13
  1248. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  1249. package/dist/unstable/workers/Transferable.js +53 -10
  1250. package/dist/unstable/workers/Transferable.js.map +1 -1
  1251. package/dist/unstable/workers/Worker.d.ts +60 -8
  1252. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  1253. package/dist/unstable/workers/Worker.js +43 -4
  1254. package/dist/unstable/workers/Worker.js.map +1 -1
  1255. package/dist/unstable/workers/WorkerError.d.ts +31 -9
  1256. package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
  1257. package/dist/unstable/workers/WorkerError.js +44 -7
  1258. package/dist/unstable/workers/WorkerError.js.map +1 -1
  1259. package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
  1260. package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
  1261. package/dist/unstable/workers/WorkerRunner.js +24 -1
  1262. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1263. package/dist/unstable/workers/index.d.ts +1 -1
  1264. package/dist/unstable/workers/index.js +1 -1
  1265. package/dist/unstable/workflow/Activity.d.ts +61 -10
  1266. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  1267. package/dist/unstable/workflow/Activity.js +20 -5
  1268. package/dist/unstable/workflow/Activity.js.map +1 -1
  1269. package/dist/unstable/workflow/DurableClock.d.ts +12 -3
  1270. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  1271. package/dist/unstable/workflow/DurableClock.js +22 -2
  1272. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1273. package/dist/unstable/workflow/DurableDeferred.d.ts +126 -31
  1274. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  1275. package/dist/unstable/workflow/DurableDeferred.js +76 -13
  1276. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1277. package/dist/unstable/workflow/DurableQueue.d.ts +30 -7
  1278. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  1279. package/dist/unstable/workflow/DurableQueue.js +23 -5
  1280. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  1281. package/dist/unstable/workflow/Workflow.d.ts +100 -31
  1282. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1283. package/dist/unstable/workflow/Workflow.js +75 -19
  1284. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1285. package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
  1286. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  1287. package/dist/unstable/workflow/WorkflowEngine.js +16 -4
  1288. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1289. package/dist/unstable/workflow/WorkflowProxy.d.ts +32 -2
  1290. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  1291. package/dist/unstable/workflow/WorkflowProxy.js +2 -2
  1292. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  1293. package/dist/unstable/workflow/WorkflowProxyServer.d.ts +36 -2
  1294. package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
  1295. package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
  1296. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1297. package/package.json +11 -11
  1298. package/src/Array.ts +113 -67
  1299. package/src/BigDecimal.ts +404 -337
  1300. package/src/BigInt.ts +167 -97
  1301. package/src/Boolean.ts +62 -31
  1302. package/src/Brand.ts +20 -1
  1303. package/src/Cache.ts +331 -164
  1304. package/src/Cause.ts +74 -62
  1305. package/src/Channel.ts +1585 -607
  1306. package/src/ChannelSchema.ts +137 -12
  1307. package/src/Chunk.ts +549 -380
  1308. package/src/Clock.ts +15 -8
  1309. package/src/Combiner.ts +2 -4
  1310. package/src/Config.ts +4 -2
  1311. package/src/ConfigProvider.ts +1 -1
  1312. package/src/Console.ts +88 -58
  1313. package/src/Context.ts +384 -135
  1314. package/src/Cron.ts +111 -48
  1315. package/src/Data.ts +3 -2
  1316. package/src/DateTime.ts +874 -443
  1317. package/src/Deferred.ts +367 -174
  1318. package/src/Differ.ts +42 -0
  1319. package/src/Duration.ts +329 -185
  1320. package/src/Effect.ts +2127 -1957
  1321. package/src/Effectable.ts +37 -2
  1322. package/src/Encoding.ts +78 -28
  1323. package/src/Equivalence.ts +14 -19
  1324. package/src/ErrorReporter.ts +66 -82
  1325. package/src/ExecutionPlan.ts +94 -9
  1326. package/src/Exit.ts +7 -5
  1327. package/src/Fiber.ts +72 -40
  1328. package/src/FiberHandle.ts +156 -56
  1329. package/src/FiberMap.ts +327 -162
  1330. package/src/FiberSet.ts +129 -51
  1331. package/src/FileSystem.ts +106 -74
  1332. package/src/Filter.ts +166 -88
  1333. package/src/Function.ts +154 -86
  1334. package/src/Graph.ts +682 -365
  1335. package/src/HKT.ts +29 -13
  1336. package/src/Hash.ts +31 -18
  1337. package/src/HashMap.ts +444 -256
  1338. package/src/HashRing.ts +94 -17
  1339. package/src/HashSet.ts +194 -104
  1340. package/src/Inspectable.ts +22 -10
  1341. package/src/Iterable.ts +309 -149
  1342. package/src/JsonPatch.ts +4 -3
  1343. package/src/Latch.ts +98 -15
  1344. package/src/Layer.ts +487 -344
  1345. package/src/LayerMap.ts +95 -21
  1346. package/src/LogLevel.ts +92 -131
  1347. package/src/Logger.ts +357 -288
  1348. package/src/ManagedRuntime.ts +75 -17
  1349. package/src/Match.ts +133 -157
  1350. package/src/Metric.ts +355 -304
  1351. package/src/MutableHashMap.ts +161 -84
  1352. package/src/MutableHashSet.ts +122 -52
  1353. package/src/MutableList.ts +141 -81
  1354. package/src/MutableRef.ts +130 -90
  1355. package/src/Newtype.ts +3 -0
  1356. package/src/NonEmptyIterable.ts +36 -39
  1357. package/src/Number.ts +116 -64
  1358. package/src/Optic.ts +1 -2
  1359. package/src/Option.ts +28 -47
  1360. package/src/Ordering.ts +43 -28
  1361. package/src/PartitionedSemaphore.ts +225 -40
  1362. package/src/Path.ts +77 -13
  1363. package/src/Pipeable.ts +76 -21
  1364. package/src/PlatformError.ts +74 -6
  1365. package/src/Pool.ts +94 -31
  1366. package/src/Predicate.ts +16 -21
  1367. package/src/PrimaryKey.ts +9 -2
  1368. package/src/PubSub.ts +364 -262
  1369. package/src/Pull.ts +94 -25
  1370. package/src/Queue.ts +284 -150
  1371. package/src/Random.ts +54 -35
  1372. package/src/RcMap.ts +151 -141
  1373. package/src/RcRef.ts +69 -32
  1374. package/src/Record.ts +273 -129
  1375. package/src/Redactable.ts +3 -3
  1376. package/src/Redacted.ts +63 -33
  1377. package/src/Ref.ts +161 -104
  1378. package/src/References.ts +73 -31
  1379. package/src/RegExp.ts +11 -5
  1380. package/src/Request.ts +158 -34
  1381. package/src/RequestResolver.ts +277 -119
  1382. package/src/Resource.ts +45 -7
  1383. package/src/Result.ts +18 -16
  1384. package/src/Runtime.ts +45 -19
  1385. package/src/Schedule.ts +574 -599
  1386. package/src/Scheduler.ts +43 -6
  1387. package/src/Schema.ts +819 -295
  1388. package/src/SchemaAST.ts +25 -16
  1389. package/src/SchemaGetter.ts +29 -14
  1390. package/src/SchemaIssue.ts +1 -8
  1391. package/src/SchemaParser.ts +262 -38
  1392. package/src/SchemaTransformation.ts +61 -41
  1393. package/src/SchemaUtils.ts +23 -0
  1394. package/src/Scope.ts +102 -43
  1395. package/src/ScopedCache.ts +192 -56
  1396. package/src/ScopedRef.ts +28 -8
  1397. package/src/Semaphore.ts +64 -28
  1398. package/src/Sink.ts +458 -200
  1399. package/src/Stdio.ts +43 -6
  1400. package/src/Stream.ts +2039 -1252
  1401. package/src/String.ts +171 -95
  1402. package/src/SubscriptionRef.ts +308 -203
  1403. package/src/Symbol.ts +13 -5
  1404. package/src/SynchronizedRef.ts +278 -62
  1405. package/src/Take.ts +26 -2
  1406. package/src/Terminal.ts +40 -7
  1407. package/src/Tracer.ts +229 -55
  1408. package/src/Trie.ts +213 -142
  1409. package/src/TxChunk.ts +182 -146
  1410. package/src/TxDeferred.ts +43 -29
  1411. package/src/TxHashMap.ts +370 -230
  1412. package/src/TxHashSet.ts +250 -152
  1413. package/src/TxPriorityQueue.ts +96 -64
  1414. package/src/TxPubSub.ts +77 -49
  1415. package/src/TxQueue.ts +279 -241
  1416. package/src/TxReentrantLock.ts +70 -47
  1417. package/src/TxRef.ts +69 -40
  1418. package/src/TxSemaphore.ts +101 -54
  1419. package/src/TxSubscriptionRef.ts +72 -48
  1420. package/src/Types.ts +34 -34
  1421. package/src/UndefinedOr.ts +48 -25
  1422. package/src/Unify.ts +71 -116
  1423. package/src/Utils.ts +4 -0
  1424. package/src/index.ts +81 -32
  1425. package/src/internal/schema/schema.ts +1 -1
  1426. package/src/testing/FastCheck.ts +6 -3
  1427. package/src/testing/TestClock.ts +63 -34
  1428. package/src/testing/TestConsole.ts +49 -30
  1429. package/src/testing/TestSchema.ts +8 -8
  1430. package/src/unstable/ai/AiError.ts +187 -120
  1431. package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
  1432. package/src/unstable/ai/Chat.ts +69 -43
  1433. package/src/unstable/ai/EmbeddingModel.ts +12 -11
  1434. package/src/unstable/ai/IdGenerator.ts +28 -18
  1435. package/src/unstable/ai/LanguageModel.ts +35 -27
  1436. package/src/unstable/ai/McpSchema.ts +339 -119
  1437. package/src/unstable/ai/McpServer.ts +76 -19
  1438. package/src/unstable/ai/Model.ts +8 -6
  1439. package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
  1440. package/src/unstable/ai/Prompt.ts +210 -184
  1441. package/src/unstable/ai/Response.ts +159 -147
  1442. package/src/unstable/ai/ResponseIdTracker.ts +43 -4
  1443. package/src/unstable/ai/Telemetry.ts +42 -32
  1444. package/src/unstable/ai/Tokenizer.ts +13 -8
  1445. package/src/unstable/ai/Tool.ts +154 -85
  1446. package/src/unstable/ai/Toolkit.ts +51 -46
  1447. package/src/unstable/ai/index.ts +42 -24
  1448. package/src/unstable/cli/Argument.ts +226 -134
  1449. package/src/unstable/cli/CliError.ts +96 -26
  1450. package/src/unstable/cli/CliOutput.ts +43 -13
  1451. package/src/unstable/cli/Command.ts +194 -113
  1452. package/src/unstable/cli/Completions.ts +7 -7
  1453. package/src/unstable/cli/Flag.ts +235 -142
  1454. package/src/unstable/cli/GlobalFlag.ts +41 -13
  1455. package/src/unstable/cli/HelpDoc.ts +35 -10
  1456. package/src/unstable/cli/Param.ts +327 -189
  1457. package/src/unstable/cli/Primitive.ts +79 -42
  1458. package/src/unstable/cli/Prompt.ts +201 -45
  1459. package/src/unstable/cli/internal/ansi.ts +13 -0
  1460. package/src/unstable/cli/internal/command.ts +5 -1
  1461. package/src/unstable/cli/internal/config.ts +3 -0
  1462. package/src/unstable/cli/internal/lexer.ts +11 -0
  1463. package/src/unstable/cluster/ClusterCron.ts +35 -1
  1464. package/src/unstable/cluster/ClusterError.ts +56 -7
  1465. package/src/unstable/cluster/ClusterMetrics.ts +39 -5
  1466. package/src/unstable/cluster/ClusterSchema.ts +61 -8
  1467. package/src/unstable/cluster/ClusterWorkflowEngine.ts +35 -2
  1468. package/src/unstable/cluster/DeliverAt.ts +39 -4
  1469. package/src/unstable/cluster/Entity.ts +107 -16
  1470. package/src/unstable/cluster/EntityAddress.ts +30 -2
  1471. package/src/unstable/cluster/EntityId.ts +18 -3
  1472. package/src/unstable/cluster/EntityProxy.ts +34 -2
  1473. package/src/unstable/cluster/EntityProxyServer.ts +44 -8
  1474. package/src/unstable/cluster/EntityResource.ts +43 -6
  1475. package/src/unstable/cluster/EntityType.ts +27 -3
  1476. package/src/unstable/cluster/Envelope.ts +128 -23
  1477. package/src/unstable/cluster/HttpRunner.ts +88 -13
  1478. package/src/unstable/cluster/K8sHttpClient.ts +49 -6
  1479. package/src/unstable/cluster/MachineId.ts +24 -3
  1480. package/src/unstable/cluster/Message.ts +102 -13
  1481. package/src/unstable/cluster/MessageStorage.ts +127 -21
  1482. package/src/unstable/cluster/Reply.ts +101 -12
  1483. package/src/unstable/cluster/Runner.ts +47 -17
  1484. package/src/unstable/cluster/RunnerAddress.ts +34 -2
  1485. package/src/unstable/cluster/RunnerHealth.ts +40 -12
  1486. package/src/unstable/cluster/RunnerServer.ts +31 -4
  1487. package/src/unstable/cluster/RunnerStorage.ts +42 -5
  1488. package/src/unstable/cluster/Runners.ts +73 -10
  1489. package/src/unstable/cluster/ShardId.ts +51 -5
  1490. package/src/unstable/cluster/Sharding.ts +35 -4
  1491. package/src/unstable/cluster/ShardingConfig.ts +75 -10
  1492. package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
  1493. package/src/unstable/cluster/SingleRunner.ts +23 -1
  1494. package/src/unstable/cluster/Singleton.ts +15 -1
  1495. package/src/unstable/cluster/SingletonAddress.ts +21 -1
  1496. package/src/unstable/cluster/Snowflake.ts +89 -19
  1497. package/src/unstable/cluster/SocketRunner.ts +29 -2
  1498. package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
  1499. package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
  1500. package/src/unstable/cluster/TestRunner.ts +18 -1
  1501. package/src/unstable/cluster/internal/hash.ts +12 -0
  1502. package/src/unstable/devtools/DevTools.ts +26 -3
  1503. package/src/unstable/devtools/DevToolsClient.ts +32 -5
  1504. package/src/unstable/devtools/DevToolsSchema.ts +201 -44
  1505. package/src/unstable/devtools/DevToolsServer.ts +27 -2
  1506. package/src/unstable/encoding/Msgpack.ts +97 -12
  1507. package/src/unstable/encoding/Ndjson.ts +149 -21
  1508. package/src/unstable/encoding/Sse.ts +109 -18
  1509. package/src/unstable/eventlog/Event.ts +131 -30
  1510. package/src/unstable/eventlog/EventGroup.ts +50 -17
  1511. package/src/unstable/eventlog/EventJournal.ts +120 -20
  1512. package/src/unstable/eventlog/EventLog.ts +151 -31
  1513. package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
  1514. package/src/unstable/eventlog/EventLogMessage.ts +92 -18
  1515. package/src/unstable/eventlog/EventLogRemote.ts +54 -8
  1516. package/src/unstable/eventlog/EventLogServer.ts +33 -3
  1517. package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
  1518. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
  1519. package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
  1520. package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
  1521. package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
  1522. package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
  1523. package/src/unstable/http/Cookies.ts +156 -77
  1524. package/src/unstable/http/Etag.ts +40 -7
  1525. package/src/unstable/http/FetchHttpClient.ts +33 -4
  1526. package/src/unstable/http/FindMyWay.ts +1 -1
  1527. package/src/unstable/http/Headers.ts +252 -50
  1528. package/src/unstable/http/HttpBody.ts +128 -26
  1529. package/src/unstable/http/HttpClient.ts +205 -96
  1530. package/src/unstable/http/HttpClientError.ts +80 -12
  1531. package/src/unstable/http/HttpClientRequest.ts +318 -100
  1532. package/src/unstable/http/HttpClientResponse.ts +59 -16
  1533. package/src/unstable/http/HttpEffect.ts +66 -18
  1534. package/src/unstable/http/HttpIncomingMessage.ts +47 -7
  1535. package/src/unstable/http/HttpMethod.ts +35 -5
  1536. package/src/unstable/http/HttpMiddleware.ts +59 -11
  1537. package/src/unstable/http/HttpPlatform.ts +34 -3
  1538. package/src/unstable/http/HttpRouter.ts +217 -52
  1539. package/src/unstable/http/HttpServer.ts +151 -22
  1540. package/src/unstable/http/HttpServerError.ts +90 -10
  1541. package/src/unstable/http/HttpServerRequest.ts +125 -21
  1542. package/src/unstable/http/HttpServerRespondable.ts +49 -6
  1543. package/src/unstable/http/HttpServerResponse.ts +390 -67
  1544. package/src/unstable/http/HttpStaticServer.ts +22 -4
  1545. package/src/unstable/http/HttpTraceContext.ts +53 -6
  1546. package/src/unstable/http/Multipart.ts +178 -28
  1547. package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
  1548. package/src/unstable/http/Multipasta/Node.ts +1 -1
  1549. package/src/unstable/http/Multipasta/Search.ts +1 -1
  1550. package/src/unstable/http/Multipasta/Web.ts +1 -1
  1551. package/src/unstable/http/Multipasta.ts +1 -1
  1552. package/src/unstable/http/Template.ts +53 -0
  1553. package/src/unstable/http/Url.ts +56 -42
  1554. package/src/unstable/http/UrlParams.ts +233 -49
  1555. package/src/unstable/httpapi/HttpApi.ts +49 -14
  1556. package/src/unstable/httpapi/HttpApiBuilder.ts +82 -16
  1557. package/src/unstable/httpapi/HttpApiClient.ts +79 -15
  1558. package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
  1559. package/src/unstable/httpapi/HttpApiError.ts +100 -1
  1560. package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
  1561. package/src/unstable/httpapi/HttpApiMiddleware.ts +111 -22
  1562. package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
  1563. package/src/unstable/httpapi/HttpApiSchema.ts +67 -30
  1564. package/src/unstable/httpapi/HttpApiSecurity.ts +74 -17
  1565. package/src/unstable/httpapi/HttpApiSwagger.ts +24 -2
  1566. package/src/unstable/httpapi/HttpApiTest.ts +26 -1
  1567. package/src/unstable/httpapi/OpenApi.ts +115 -15
  1568. package/src/unstable/observability/Otlp.ts +33 -3
  1569. package/src/unstable/observability/OtlpExporter.ts +32 -1
  1570. package/src/unstable/observability/OtlpLogger.ts +31 -2
  1571. package/src/unstable/observability/OtlpMetrics.ts +37 -4
  1572. package/src/unstable/observability/OtlpResource.ts +68 -12
  1573. package/src/unstable/observability/OtlpSerialization.ts +28 -3
  1574. package/src/unstable/observability/OtlpTracer.ts +38 -2
  1575. package/src/unstable/observability/PrometheusMetrics.ts +32 -12
  1576. package/src/unstable/observability/index.ts +2 -1
  1577. package/src/unstable/persistence/KeyValueStore.ts +108 -28
  1578. package/src/unstable/persistence/Persistable.ts +76 -15
  1579. package/src/unstable/persistence/PersistedCache.ts +27 -2
  1580. package/src/unstable/persistence/PersistedQueue.ts +98 -16
  1581. package/src/unstable/persistence/Persistence.ts +97 -16
  1582. package/src/unstable/persistence/RateLimiter.ts +97 -21
  1583. package/src/unstable/persistence/Redis.ts +42 -5
  1584. package/src/unstable/process/ChildProcess.ts +89 -65
  1585. package/src/unstable/process/ChildProcessSpawner.ts +22 -11
  1586. package/src/unstable/process/index.ts +2 -1
  1587. package/src/unstable/reactivity/AsyncResult.ts +202 -61
  1588. package/src/unstable/reactivity/Atom.ts +593 -139
  1589. package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
  1590. package/src/unstable/reactivity/AtomRef.ts +51 -7
  1591. package/src/unstable/reactivity/AtomRegistry.ts +141 -22
  1592. package/src/unstable/reactivity/AtomRpc.ts +36 -2
  1593. package/src/unstable/reactivity/Hydration.ts +45 -5
  1594. package/src/unstable/reactivity/Reactivity.ts +95 -13
  1595. package/src/unstable/rpc/Rpc.ts +255 -56
  1596. package/src/unstable/rpc/RpcClient.ts +107 -19
  1597. package/src/unstable/rpc/RpcClientError.ts +26 -2
  1598. package/src/unstable/rpc/RpcGroup.ts +51 -8
  1599. package/src/unstable/rpc/RpcMessage.ts +128 -32
  1600. package/src/unstable/rpc/RpcMiddleware.ts +100 -20
  1601. package/src/unstable/rpc/RpcSchema.ts +38 -4
  1602. package/src/unstable/rpc/RpcSerialization.ts +60 -13
  1603. package/src/unstable/rpc/RpcServer.ts +107 -23
  1604. package/src/unstable/rpc/RpcTest.ts +20 -1
  1605. package/src/unstable/rpc/RpcWorker.ts +40 -6
  1606. package/src/unstable/rpc/Utils.ts +31 -0
  1607. package/src/unstable/schema/Model.ts +148 -52
  1608. package/src/unstable/schema/VariantSchema.ts +104 -24
  1609. package/src/unstable/socket/Socket.ts +167 -34
  1610. package/src/unstable/socket/SocketServer.ts +58 -10
  1611. package/src/unstable/sql/Migrator.ts +56 -4
  1612. package/src/unstable/sql/SqlClient.ts +55 -2
  1613. package/src/unstable/sql/SqlConnection.ts +31 -0
  1614. package/src/unstable/sql/SqlError.ts +117 -0
  1615. package/src/unstable/sql/SqlModel.ts +26 -5
  1616. package/src/unstable/sql/SqlResolver.ts +56 -13
  1617. package/src/unstable/sql/SqlSchema.ts +29 -8
  1618. package/src/unstable/sql/SqlStream.ts +23 -0
  1619. package/src/unstable/sql/Statement.ts +141 -0
  1620. package/src/unstable/sql/index.ts +1 -1
  1621. package/src/unstable/workers/Transferable.ts +65 -13
  1622. package/src/unstable/workers/Worker.ts +60 -8
  1623. package/src/unstable/workers/WorkerError.ts +50 -9
  1624. package/src/unstable/workers/WorkerRunner.ts +32 -3
  1625. package/src/unstable/workers/index.ts +1 -1
  1626. package/src/unstable/workflow/Activity.ts +61 -10
  1627. package/src/unstable/workflow/DurableClock.ts +26 -3
  1628. package/src/unstable/workflow/DurableDeferred.ts +146 -31
  1629. package/src/unstable/workflow/DurableQueue.ts +30 -7
  1630. package/src/unstable/workflow/Workflow.ts +121 -31
  1631. package/src/unstable/workflow/WorkflowEngine.ts +40 -5
  1632. package/src/unstable/workflow/WorkflowProxy.ts +32 -2
  1633. package/src/unstable/workflow/WorkflowProxyServer.ts +40 -6
package/src/Sink.ts CHANGED
@@ -1,4 +1,36 @@
1
1
  /**
2
+ * The `Sink` module provides composable consumers for `Stream` values. A
3
+ * `Sink<A, In, L, E, R>` pulls input elements of type `In`, may require
4
+ * services `R`, may fail with `E`, and eventually produces a result `A` plus
5
+ * any leftover input `L` that was read but not consumed.
6
+ *
7
+ * **Mental model**
8
+ *
9
+ * - A sink is the terminal consumer used by `Stream.run`
10
+ * - Sinks can consume zero, one, many, or all input elements before finishing
11
+ * - Leftovers allow one sink to stop early without losing already-pulled input
12
+ * - Sink composition preserves typed errors and service requirements
13
+ * - Most sinks are built from `Channel` internally, but users compose them with
14
+ * the higher-level APIs in this module
15
+ *
16
+ * **Common tasks**
17
+ *
18
+ * - Create simple sinks: {@link succeed}, {@link fail}, {@link fromEffect}
19
+ * - Fold input: {@link fold}, {@link foldEffect}, {@link foldLeft}
20
+ * - Collect values: {@link collectAll}, {@link collectAllN}, {@link collectAllWhile}
21
+ * - Count or drain input: {@link count}, {@link drain}
22
+ * - Transform results: {@link map}, {@link mapEffect}, {@link as}
23
+ * - Combine sinks: {@link zip}, {@link zipWith}, {@link race}
24
+ * - Filter and refine input: {@link filterInput}, {@link filterInputEffect}
25
+ *
26
+ * **Gotchas**
27
+ *
28
+ * - A sink can finish before the stream is exhausted; check leftover-aware
29
+ * combinators when composing parsers or protocol decoders
30
+ * - `In` is contravariant, so a sink that accepts broader input can be used
31
+ * where narrower input is expected
32
+ * - Resource and service requirements are tracked in the `R` type parameter
33
+ *
2
34
  * @since 2.0.0
3
35
  */
4
36
  import type { NonEmptyReadonlyArray } from "./Array.ts"
@@ -36,7 +68,8 @@ const TypeId = "~effect/Sink"
36
68
  * and will eventually yield a value of type `A` together with a remainder of
37
69
  * type `L` (i.e. any leftovers).
38
70
  *
39
- * @example
71
+ * **Example** (Running a sink with a stream)
72
+ *
40
73
  * ```ts
41
74
  * import { Effect } from "effect"
42
75
  * import * as Sink from "effect/Sink"
@@ -53,8 +86,8 @@ const TypeId = "~effect/Sink"
53
86
  * // Output: 42
54
87
  * ```
55
88
  *
56
- * @since 2.0.0
57
89
  * @category models
90
+ * @since 2.0.0
58
91
  */
59
92
  export interface Sink<out A, in In = unknown, out L = never, out E = never, out R = never>
60
93
  extends Sink.Variance<A, In, L, E, R>, Pipeable
@@ -69,33 +102,28 @@ export interface Sink<out A, in In = unknown, out L = never, out E = never, out
69
102
  }
70
103
 
71
104
  /**
72
- * @since 2.0.0
105
+ * Tuple returned when a `Sink` finishes.
106
+ *
107
+ * The first element is the sink result. The optional second element contains a
108
+ * non-empty array of leftover input that was pulled but not consumed.
109
+ *
73
110
  * @category models
111
+ * @since 2.0.0
74
112
  */
75
113
  export type End<A, L = never> = readonly [value: A, leftover?: NonEmptyReadonlyArray<L> | undefined]
76
114
 
77
115
  const endVoid = Effect.succeed([void 0] as End<void, never>)
78
116
 
79
117
  /**
80
- * Interface for Sink unification, used internally by the Effect type system
81
- * to provide proper type inference when using Sink with other Effect types.
82
- *
83
- * @example
84
- * ```ts
85
- * import type { Effect } from "effect"
86
- * import type * as Sink from "effect/Sink"
87
- * import type * as Unify from "effect/Unify"
88
- *
89
- * // SinkUnify helps unify Sink and Effect types
90
- * declare const sink: Sink.Sink<number>
91
- * declare const effect: Effect.Effect<string>
118
+ * Type-level unification support for `Sink` values.
92
119
  *
93
- * // The unification system handles mixed operations
94
- * type Combined = Sink.SinkUnify<{ [Unify.typeSymbol]?: any }>
95
- * ```
120
+ * This preserves the result, input, leftover, error, and service type
121
+ * parameters when Effect's `Unify` machinery normalizes generic values that
122
+ * include sinks. Users normally do not need to reference this interface
123
+ * directly.
96
124
  *
97
- * @since 2.0.0
98
125
  * @category models
126
+ * @since 2.0.0
99
127
  */
100
128
  export interface SinkUnify<A extends { [Unify.typeSymbol]?: any }> extends Effect.EffectUnify<A> {
101
129
  Sink?: () => A[Unify.typeSymbol] extends
@@ -111,16 +139,11 @@ export interface SinkUnify<A extends { [Unify.typeSymbol]?: any }> extends Effec
111
139
  }
112
140
 
113
141
  /**
114
- * Interface used to ignore certain types during Sink unification.
115
- * Part of the internal type system machinery.
116
- *
117
- * @example
118
- * ```ts
119
- * import type * as Sink from "effect/Sink"
142
+ * Marker used by Effect's `Unify` machinery for `Sink` values.
120
143
  *
121
- * // Used internally by the type system
122
- * type IgnoreConfig = Sink.SinkUnifyIgnore
123
- * ```
144
+ * It prevents the inherited `Effect` unifier from being selected when
145
+ * sink-specific unification should preserve the `Sink` type parameters. Users
146
+ * normally do not need to reference this interface directly.
124
147
  *
125
148
  * @category models
126
149
  * @since 2.0.0
@@ -132,53 +155,32 @@ export interface SinkUnifyIgnore {
132
155
  /**
133
156
  * Namespace containing types and interfaces for Sink variance and type relationships.
134
157
  *
135
- * @example
136
- * ```ts
137
- * import type * as Sink from "effect/Sink"
138
- *
139
- * // The Sink namespace contains internal type definitions
140
- * // These are used internally for type safety and variance
141
- * type SinkType<A, In, L, E, R> = Sink.Sink<A, In, L, E, R>
142
- * ```
143
- *
144
- * @since 2.0.0
145
158
  * @category models
159
+ * @since 2.0.0
146
160
  */
147
161
  export declare namespace Sink {
148
162
  /**
149
- * Represents the variance annotations for a Sink type.
150
- * Used internally to track how type parameters flow through the Sink.
151
- *
152
- * @example
153
- * ```ts
154
- * import type * as Sink from "effect/Sink"
163
+ * Type-level variance marker for `Sink`.
155
164
  *
156
- * // The variance interface is used internally
157
- * // It defines how type parameters behave in Sink
158
- * type SinkWithVariance = Sink.Sink<string> & { variance: "internal" }
159
- * ```
165
+ * The result `A`, leftovers `L`, errors `E`, and services `R` are
166
+ * covariant. The input type `In` is contravariant because values flow into
167
+ * the sink.
160
168
  *
161
- * @since 2.0.0
162
169
  * @category models
170
+ * @since 2.0.0
163
171
  */
164
172
  export interface Variance<out A, in In, out L, out E, out R> {
165
173
  readonly [TypeId]: VarianceStruct<A, In, L, E, R>
166
174
  }
167
175
  /**
168
- * The internal structure representing Sink variance annotations.
169
- * Contains the actual variance markers for each type parameter.
170
- *
171
- * @example
172
- * ```ts
173
- * import type * as Sink from "effect/Sink"
176
+ * Structural encoding used by `Sink.Variance` to record each `Sink` type
177
+ * parameter's variance.
174
178
  *
175
- * // The variance structure is used internally by the type system
176
- * // It ensures proper type safety for Sink operations
177
- * type SinkInstance = Sink.Sink<number, string>
178
- * ```
179
+ * `_A`, `_L`, `_E`, and `_R` are covariant markers. `_In` is a
180
+ * contravariant marker.
179
181
  *
180
- * @since 2.0.0
181
182
  * @category models
183
+ * @since 2.0.0
182
184
  */
183
185
  export interface VarianceStruct<out A, in In, out L, out E, out R> {
184
186
  _A: Types.Covariant<A>
@@ -207,7 +209,8 @@ const SinkProto = {
207
209
  /**
208
210
  * Checks if a value is a Sink.
209
211
  *
210
- * @example
212
+ * **Example** (Checking for a sink)
213
+ *
211
214
  * ```ts
212
215
  * import { Sink } from "effect"
213
216
  *
@@ -218,16 +221,16 @@ const SinkProto = {
218
221
  * console.log(Sink.isSink(notStream)) // false
219
222
  * ```
220
223
  *
221
- * @since 2.0.0
222
224
  * @category guards
225
+ * @since 2.0.0
223
226
  */
224
227
  export const isSink = (u: unknown): u is Sink<unknown, never, unknown, unknown, unknown> => hasProperty(u, TypeId)
225
228
 
226
229
  /**
227
230
  * Creates a sink from a `Channel`.
228
231
  *
229
- * @since 2.0.0
230
232
  * @category constructors
233
+ * @since 2.0.0
231
234
  */
232
235
  export const fromChannel = <L, In, E, A, R>(
233
236
  channel: Channel.Channel<
@@ -248,8 +251,14 @@ export const fromChannel = <L, In, E, A, R>(
248
251
  )
249
252
 
250
253
  /**
251
- * @since 4.0.0
254
+ * Creates a `Sink` from a low-level transform function.
255
+ *
256
+ * The transform receives the upstream pull of non-empty input arrays and the
257
+ * active scope, and returns an effect that completes with the sink's `End`
258
+ * value.
259
+ *
252
260
  * @category constructors
261
+ * @since 4.0.0
253
262
  */
254
263
  export const fromTransform = <In, A, E, R, L = never>(
255
264
  transform: (
@@ -265,7 +274,8 @@ export const fromTransform = <In, A, E, R, L = never>(
265
274
  /**
266
275
  * Creates a `Channel` from a Sink.
267
276
  *
268
- * @example
277
+ * **Example** (Converting a sink to a channel)
278
+ *
269
279
  * ```ts
270
280
  * import { Sink } from "effect"
271
281
  *
@@ -274,8 +284,8 @@ export const fromTransform = <In, A, E, R, L = never>(
274
284
  * const channel = Sink.toChannel(sink)
275
285
  * ```
276
286
  *
277
- * @since 2.0.0
278
287
  * @category constructors
288
+ * @since 2.0.0
279
289
  */
280
290
  export const toChannel = <A, In, L, E, R>(
281
291
  self: Sink<A, In, L, E, R>
@@ -288,8 +298,14 @@ export const toChannel = <A, In, L, E, R>(
288
298
  )
289
299
 
290
300
  /**
291
- * @since 4.0.0
301
+ * Creates a pipe-style constructor for sinks over input type `In`.
302
+ *
303
+ * The returned function exposes the sink input as a `Stream<In>`, applies the
304
+ * provided pipeline, and uses the final effect's success value as the sink
305
+ * result.
306
+ *
292
307
  * @category constructors
308
+ * @since 4.0.0
293
309
  */
294
310
  export const make = <In>(): make.Constructor<In> => (...fns: []) =>
295
311
  fromTransform((upstream, scope) =>
@@ -302,10 +318,19 @@ export const make = <In>(): make.Constructor<In> => (...fns: []) =>
302
318
  )
303
319
 
304
320
  /**
321
+ * Companion namespace containing overload types for the pipe-style sink
322
+ * constructor returned by `Sink.make`.
323
+ *
305
324
  * @since 4.0.0
306
325
  */
307
326
  export declare namespace make {
308
327
  /**
328
+ * Overloaded function type returned by `Sink.make`.
329
+ *
330
+ * The first pipeline function receives the sink input as a `Stream<In>`. The
331
+ * final pipeline step must return an `Effect`, whose success value becomes
332
+ * the sink result.
333
+ *
309
334
  * @since 4.0.0
310
335
  */
311
336
  export interface Constructor<In> {
@@ -399,24 +424,40 @@ export declare namespace make {
399
424
  }
400
425
 
401
426
  /**
402
- * @since 4.0.0
427
+ * Creates a sink that ignores upstream input and completes from an effect that
428
+ * already returns an `End`.
429
+ *
430
+ * Use this when the effect needs to provide both the result value and optional
431
+ * leftovers.
432
+ *
403
433
  * @category constructors
434
+ * @since 4.0.0
404
435
  */
405
436
  export const fromEffectEnd = <A, E, R, L = never>(
406
437
  effect: Effect.Effect<End<A, L>, E, R>
407
438
  ): Sink<A, unknown, L, E, R> => fromTransform(() => effect)
408
439
 
409
440
  /**
410
- * @since 4.0.0
441
+ * Creates a sink that ignores upstream input and completes with the success
442
+ * value of the provided effect.
443
+ *
444
+ * If the effect fails, the sink fails with the same error.
445
+ *
411
446
  * @category constructors
447
+ * @since 4.0.0
412
448
  */
413
449
  export const fromEffect = <A, E, R>(
414
450
  effect: Effect.Effect<A, E, R>
415
451
  ): Sink<A, unknown, never, E, R> => fromEffectEnd(Effect.map(effect, (a) => [a]))
416
452
 
417
453
  /**
418
- * @since 2.0.0
454
+ * Creates a sink that offers every consumed input element to a queue.
455
+ *
456
+ * When the upstream stream ends, the sink ends the queue and completes with
457
+ * `void`.
458
+ *
419
459
  * @category constructors
460
+ * @since 2.0.0
420
461
  */
421
462
  export const fromQueue = <A>(
422
463
  queue: Queue.Queue<A, Cause.Done>
@@ -433,8 +474,12 @@ export const fromQueue = <A>(
433
474
  )
434
475
 
435
476
  /**
436
- * @since 2.0.0
477
+ * Creates a sink that publishes every consumed input element to a `PubSub`.
478
+ *
479
+ * The sink completes with `void` when the upstream stream ends.
480
+ *
437
481
  * @category constructors
482
+ * @since 2.0.0
438
483
  */
439
484
  export const fromPubSub = <A>(
440
485
  pubsub: PubSub.PubSub<A>
@@ -443,7 +488,8 @@ export const fromPubSub = <A>(
443
488
  /**
444
489
  * A sink that immediately ends with the specified value.
445
490
  *
446
- * @example
491
+ * **Example** (Succeeding with a value)
492
+ *
447
493
  * ```ts
448
494
  * import { Effect, Sink, Stream } from "effect"
449
495
  *
@@ -458,8 +504,8 @@ export const fromPubSub = <A>(
458
504
  * // Output: 42
459
505
  * ```
460
506
  *
461
- * @since 2.0.0
462
507
  * @category constructors
508
+ * @since 2.0.0
463
509
  */
464
510
  export const succeed = <A, L = never>(a: A, leftovers?: NonEmptyReadonlyArray<L> | undefined): Sink<A, unknown, L> =>
465
511
  fromEffectEnd(Effect.succeed([a, leftovers]))
@@ -467,16 +513,16 @@ export const succeed = <A, L = never>(a: A, leftovers?: NonEmptyReadonlyArray<L>
467
513
  /**
468
514
  * A sink that immediately ends with the specified lazily evaluated value.
469
515
  *
470
- * @since 2.0.0
471
516
  * @category constructors
517
+ * @since 2.0.0
472
518
  */
473
519
  export const sync = <A>(a: LazyArg<A>): Sink<A> => fromEffect(Effect.sync(a))
474
520
 
475
521
  /**
476
522
  * A sink that is created from a lazily evaluated sink.
477
523
  *
478
- * @since 2.0.0
479
524
  * @category constructors
525
+ * @since 2.0.0
480
526
  */
481
527
  export const suspend = <A, In, L, E, R>(evaluate: LazyArg<Sink<A, In, L, E, R>>): Sink<A, In, L, E, R> =>
482
528
  fromTransform((upstream, scope) => evaluate().transform(upstream, scope))
@@ -484,7 +530,8 @@ export const suspend = <A, In, L, E, R>(evaluate: LazyArg<Sink<A, In, L, E, R>>)
484
530
  /**
485
531
  * A sink that always fails with the specified error.
486
532
  *
487
- * @example
533
+ * **Example** (Failing with an error)
534
+ *
488
535
  * ```ts
489
536
  * import { Effect, Sink, Stream } from "effect"
490
537
  *
@@ -499,15 +546,16 @@ export const suspend = <A, In, L, E, R>(evaluate: LazyArg<Sink<A, In, L, E, R>>)
499
546
  * // Output: Error: Sink failed
500
547
  * ```
501
548
  *
502
- * @since 2.0.0
503
549
  * @category constructors
550
+ * @since 2.0.0
504
551
  */
505
552
  export const fail = <E>(e: E): Sink<never, unknown, never, E> => fromEffectEnd(Effect.fail(e))
506
553
 
507
554
  /**
508
555
  * A sink that always fails with the specified lazily evaluated error.
509
556
  *
510
- * @example
557
+ * **Example** (Failing with a lazy error)
558
+ *
511
559
  * ```ts
512
560
  * import { Effect, Sink, Stream } from "effect"
513
561
  *
@@ -522,8 +570,8 @@ export const fail = <E>(e: E): Sink<never, unknown, never, E> => fromEffectEnd(E
522
570
  * // Output: Error: Lazy error
523
571
  * ```
524
572
  *
525
- * @since 2.0.0
526
573
  * @category constructors
574
+ * @since 2.0.0
527
575
  */
528
576
  export const failSync = <E>(evaluate: LazyArg<E>): Sink<never, unknown, never, E> =>
529
577
  fromEffectEnd(Effect.failSync(evaluate))
@@ -531,7 +579,8 @@ export const failSync = <E>(evaluate: LazyArg<E>): Sink<never, unknown, never, E
531
579
  /**
532
580
  * Creates a sink halting with a specified `Cause`.
533
581
  *
534
- * @example
582
+ * **Example** (Failing with a cause)
583
+ *
535
584
  * ```ts
536
585
  * import { Cause, Effect, Sink, Stream } from "effect"
537
586
  *
@@ -546,8 +595,8 @@ export const failSync = <E>(evaluate: LazyArg<E>): Sink<never, unknown, never, E
546
595
  * // Output: Error: Custom cause
547
596
  * ```
548
597
  *
549
- * @since 2.0.0
550
598
  * @category constructors
599
+ * @since 2.0.0
551
600
  */
552
601
  export const failCause = <E>(cause: Cause.Cause<E>): Sink<never, unknown, never, E> =>
553
602
  fromEffectEnd(Effect.failCause(cause))
@@ -555,7 +604,8 @@ export const failCause = <E>(cause: Cause.Cause<E>): Sink<never, unknown, never,
555
604
  /**
556
605
  * Creates a sink halting with a specified lazily evaluated `Cause`.
557
606
  *
558
- * @example
607
+ * **Example** (Failing with a lazy cause)
608
+ *
559
609
  * ```ts
560
610
  * import { Cause, Effect, Sink, Stream } from "effect"
561
611
  *
@@ -570,8 +620,8 @@ export const failCause = <E>(cause: Cause.Cause<E>): Sink<never, unknown, never,
570
620
  * // Output: Error: Lazy cause
571
621
  * ```
572
622
  *
573
- * @since 2.0.0
574
623
  * @category constructors
624
+ * @since 2.0.0
575
625
  */
576
626
  export const failCauseSync = <E>(evaluate: LazyArg<Cause.Cause<E>>): Sink<never, unknown, never, E> =>
577
627
  fromEffectEnd(Effect.failCauseSync(evaluate))
@@ -579,7 +629,8 @@ export const failCauseSync = <E>(evaluate: LazyArg<Cause.Cause<E>>): Sink<never,
579
629
  /**
580
630
  * Creates a sink halting with a specified defect.
581
631
  *
582
- * @example
632
+ * **Example** (Dying with a defect)
633
+ *
583
634
  * ```ts
584
635
  * import { Effect, Sink, Stream } from "effect"
585
636
  *
@@ -594,24 +645,28 @@ export const failCauseSync = <E>(evaluate: LazyArg<Cause.Cause<E>>): Sink<never,
594
645
  * // Output: Error: Defect error
595
646
  * ```
596
647
  *
597
- * @since 2.0.0
598
648
  * @category constructors
649
+ * @since 2.0.0
599
650
  */
600
651
  export const die = (defect: unknown): Sink<never> => fromEffectEnd(Effect.die(defect))
601
652
 
602
653
  /**
603
654
  * A sink that never completes.
604
655
  *
605
- * @since 2.0.0
606
656
  * @category constructors
657
+ * @since 2.0.0
607
658
  */
608
659
  export const never: Sink<unknown> = fromEffectEnd(Effect.never)
609
660
 
610
661
  /**
611
- * Drains the remaining elements from the stream after the sink finishes
662
+ * Drops leftovers produced by a sink.
663
+ *
664
+ * The sink result is preserved, but any leftover elements are discarded
665
+ * instead of being returned to downstream sink composition. This does not
666
+ * continue pulling additional elements from the upstream stream.
612
667
  *
613
- * @since 2.0.0
614
668
  * @category utils
669
+ * @since 2.0.0
615
670
  */
616
671
  export const ignoreLeftover = <A, In, L, E, R>(self: Sink<A, In, L, E, R>): Sink<A, In, never, E, R> =>
617
672
  mapEnd(self, ([a]) => [a])
@@ -619,8 +674,8 @@ export const ignoreLeftover = <A, In, L, E, R>(self: Sink<A, In, L, E, R>): Sink
619
674
  /**
620
675
  * Drains elements from the stream by ignoring all inputs.
621
676
  *
622
- * @since 2.0.0
623
677
  * @category constructors
678
+ * @since 2.0.0
624
679
  */
625
680
  export const drain: Sink<void, unknown> = fromTransform((upstream) =>
626
681
  Pull.catchDone(
@@ -633,8 +688,8 @@ export const drain: Sink<void, unknown> = fromTransform((upstream) =>
633
688
  * A sink that folds its inputs with the provided function, termination
634
689
  * predicate and initial state.
635
690
  *
636
- * @since 2.0.0
637
691
  * @category folding
692
+ * @since 2.0.0
638
693
  */
639
694
  export const fold = <S, In, E = never, R = never>(
640
695
  s: LazyArg<S>,
@@ -661,8 +716,14 @@ export const fold = <S, In, E = never, R = never>(
661
716
  })
662
717
 
663
718
  /**
664
- * @since 2.0.0
719
+ * Folds non-empty input arrays into state with an effectful function.
720
+ *
721
+ * The initial state is evaluated lazily. After each pulled array is folded,
722
+ * the sink continues while `contFn` returns `true`; otherwise it completes
723
+ * with the current state.
724
+ *
665
725
  * @category folding
726
+ * @since 2.0.0
666
727
  */
667
728
  export const foldArray = <S, In, E = never, R = never>(
668
729
  s: LazyArg<S>,
@@ -684,8 +745,14 @@ export const foldArray = <S, In, E = never, R = never>(
684
745
  })
685
746
 
686
747
  /**
687
- * @since 2.0.0
748
+ * Folds input elements into state until the specified maximum number of
749
+ * elements has been consumed or the upstream stream ends.
750
+ *
751
+ * If the sink stops in the middle of a pulled array, the remaining elements
752
+ * from that array are returned as leftovers.
753
+ *
688
754
  * @category folding
755
+ * @since 2.0.0
689
756
  */
690
757
  export const foldUntil = <S, In, E = never, R = never>(
691
758
  s: LazyArg<S>,
@@ -703,8 +770,8 @@ export const foldUntil = <S, In, E = never, R = never>(
703
770
  /**
704
771
  * A sink that returns whether all elements satisfy the specified predicate.
705
772
  *
706
- * @since 2.0.0
707
773
  * @category constructors
774
+ * @since 2.0.0
708
775
  */
709
776
  export const every = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
710
777
  fold(
@@ -716,8 +783,8 @@ export const every = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
716
783
  /**
717
784
  * A sink that returns whether an element satisfies the specified predicate.
718
785
  *
719
- * @since 2.0.0
720
786
  * @category constructors
787
+ * @since 2.0.0
721
788
  */
722
789
  export const some = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
723
790
  fold(
@@ -729,22 +796,22 @@ export const some = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
729
796
  /**
730
797
  * Transforms this sink's result.
731
798
  *
732
- * @since 2.0.0
733
799
  * @category mapping
800
+ * @since 2.0.0
734
801
  */
735
802
  export const map: {
736
803
  /**
737
804
  * Transforms this sink's result.
738
805
  *
739
- * @since 2.0.0
740
806
  * @category mapping
807
+ * @since 2.0.0
741
808
  */
742
809
  <A, A2>(f: (a: A) => A2): <In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L, E, R>
743
810
  /**
744
811
  * Transforms this sink's result.
745
812
  *
746
- * @since 2.0.0
747
813
  * @category mapping
814
+ * @since 2.0.0
748
815
  */
749
816
  <A, In, L, E, R, A2>(self: Sink<A, In, L, E, R>, f: (a: A) => A2): Sink<A2, In, L, E, R>
750
817
  } = dual(
@@ -756,22 +823,22 @@ export const map: {
756
823
  /**
757
824
  * Set the sink's result to a constant value.
758
825
  *
759
- * @since 2.0.0
760
826
  * @category mapping
827
+ * @since 2.0.0
761
828
  */
762
829
  export const as: {
763
830
  /**
764
831
  * Set the sink's result to a constant value.
765
832
  *
766
- * @since 2.0.0
767
833
  * @category mapping
834
+ * @since 2.0.0
768
835
  */
769
836
  <A2>(a2: A2): <A, In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L, E, R>
770
837
  /**
771
838
  * Set the sink's result to a constant value.
772
839
  *
773
- * @since 2.0.0
774
840
  * @category mapping
841
+ * @since 2.0.0
775
842
  */
776
843
  <A, In, L, E, R, A2>(self: Sink<A, In, L, E, R>, a2: A2): Sink<A2, In, L, E, R>
777
844
  } = dual(
@@ -782,22 +849,22 @@ export const as: {
782
849
  /**
783
850
  * Transforms this sink's input elements.
784
851
  *
785
- * @since 2.0.0
786
852
  * @category mapping
853
+ * @since 2.0.0
787
854
  */
788
855
  export const mapInput: {
789
856
  /**
790
857
  * Transforms this sink's input elements.
791
858
  *
792
- * @since 2.0.0
793
859
  * @category mapping
860
+ * @since 2.0.0
794
861
  */
795
862
  <In0, In>(f: (input: In0) => In): <A, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In0, L, E, R>
796
863
  /**
797
864
  * Transforms this sink's input elements.
798
865
  *
799
- * @since 2.0.0
800
866
  * @category mapping
867
+ * @since 2.0.0
801
868
  */
802
869
  <A, In, L, E, R, In0>(self: Sink<A, In, L, E, R>, f: (input: In0) => In): Sink<A, In0, L, E, R>
803
870
  } = dual(
@@ -809,22 +876,22 @@ export const mapInput: {
809
876
  /**
810
877
  * Effectfully transforms this sink's input elements.
811
878
  *
812
- * @since 2.0.0
813
879
  * @category mapping
880
+ * @since 2.0.0
814
881
  */
815
882
  export const mapInputEffect: {
816
883
  /**
817
884
  * Effectfully transforms this sink's input elements.
818
885
  *
819
- * @since 2.0.0
820
886
  * @category mapping
887
+ * @since 2.0.0
821
888
  */
822
889
  <In0, In, E2, R2>(f: (input: In0) => Effect.Effect<In, E2, R2>): <A, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In0, L, E2 | E, R2 | R>
823
890
  /**
824
891
  * Effectfully transforms this sink's input elements.
825
892
  *
826
- * @since 2.0.0
827
893
  * @category mapping
894
+ * @since 2.0.0
828
895
  */
829
896
  <A, In, L, E, R, In0, E2, R2>(self: Sink<A, In, L, E, R>, f: (input: In0) => Effect.Effect<In, E2, R2>): Sink<A, In0, L, E | E2, R | R2>
830
897
  } = dual(
@@ -836,26 +903,29 @@ export const mapInputEffect: {
836
903
  )
837
904
 
838
905
  /**
839
- * Transforms this sink's input elements.
906
+ * Transforms each non-empty array of upstream input before it is fed to this
907
+ * sink.
840
908
  *
841
- * @since 4.0.0
842
909
  * @category mapping
910
+ * @since 4.0.0
843
911
  */
844
912
  export const mapInputArray: {
845
913
  /**
846
- * Transforms this sink's input elements.
914
+ * Transforms each non-empty array of upstream input before it is fed to this
915
+ * sink.
847
916
  *
848
- * @since 4.0.0
849
917
  * @category mapping
918
+ * @since 4.0.0
850
919
  */
851
920
  <In0, In>(
852
921
  f: (input: Arr.NonEmptyReadonlyArray<In0>) => Arr.NonEmptyReadonlyArray<In>
853
922
  ): <A, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In0, L, E, R>
854
923
  /**
855
- * Transforms this sink's input elements.
924
+ * Transforms each non-empty array of upstream input before it is fed to this
925
+ * sink.
856
926
  *
857
- * @since 4.0.0
858
927
  * @category mapping
928
+ * @since 4.0.0
859
929
  */
860
930
  <A, In, L, E, R, In0>(
861
931
  self: Sink<A, In, L, E, R>,
@@ -870,26 +940,29 @@ export const mapInputArray: {
870
940
  )
871
941
 
872
942
  /**
873
- * Effectfully transforms this sink's input elements.
943
+ * Effectfully transforms each non-empty array of upstream input before it is
944
+ * fed to this sink.
874
945
  *
875
- * @since 4.0.0
876
946
  * @category mapping
947
+ * @since 4.0.0
877
948
  */
878
949
  export const mapInputArrayEffect: {
879
950
  /**
880
- * Effectfully transforms this sink's input elements.
951
+ * Effectfully transforms each non-empty array of upstream input before it is
952
+ * fed to this sink.
881
953
  *
882
- * @since 4.0.0
883
954
  * @category mapping
955
+ * @since 4.0.0
884
956
  */
885
957
  <In0, In, E2, R2>(
886
958
  f: (input: Arr.NonEmptyReadonlyArray<In0>) => Effect.Effect<Arr.NonEmptyReadonlyArray<In>, E2, R2>
887
959
  ): <A, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In0, L, E2 | E, R2 | R>
888
960
  /**
889
- * Effectfully transforms this sink's input elements.
961
+ * Effectfully transforms each non-empty array of upstream input before it is
962
+ * fed to this sink.
890
963
  *
891
- * @since 4.0.0
892
964
  * @category mapping
965
+ * @since 4.0.0
893
966
  */
894
967
  <A, In, L, E, R, In0, E2, R2>(
895
968
  self: Sink<A, In, L, E, R>,
@@ -910,24 +983,30 @@ export const mapInputArrayEffect: {
910
983
  )
911
984
 
912
985
  /**
913
- * Transforms this sink's result.
986
+ * Transforms the full `End` produced by this sink.
987
+ *
988
+ * This can change both the result value and the optional leftovers.
914
989
  *
915
- * @since 4.0.0
916
990
  * @category mapping
991
+ * @since 4.0.0
917
992
  */
918
993
  export const mapEnd: {
919
994
  /**
920
- * Transforms this sink's result.
995
+ * Transforms the full `End` produced by this sink.
996
+ *
997
+ * This can change both the result value and the optional leftovers.
921
998
  *
922
- * @since 4.0.0
923
999
  * @category mapping
1000
+ * @since 4.0.0
924
1001
  */
925
1002
  <A, L, A2, L2 = never>(f: (a: End<A, L>) => End<A2, L2>): <In, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L2, E, R>
926
1003
  /**
927
- * Transforms this sink's result.
1004
+ * Transforms the full `End` produced by this sink.
1005
+ *
1006
+ * This can change both the result value and the optional leftovers.
928
1007
  *
929
- * @since 4.0.0
930
1008
  * @category mapping
1009
+ * @since 4.0.0
931
1010
  */
932
1011
  <A, In, L, E, R, A2, L2 = never>(self: Sink<A, In, L, E, R>, f: (a: End<A, L>) => End<A2, L2>): Sink<A2, In, L2, E, R>
933
1012
  } = dual(
@@ -950,24 +1029,33 @@ const transformEffect = <A, In, L, E, R, A2, E2, R2, L2 = never>(
950
1029
  ): Sink<A2, In, L2, E2, R2> => fromTransform((upstream, scope) => f(self.transform(upstream, scope)))
951
1030
 
952
1031
  /**
953
- * Effectfully transforms this sink's result.
1032
+ * Effectfully transforms the full `End` produced by this sink.
1033
+ *
1034
+ * This can change both the result value and the optional leftovers, and the
1035
+ * transformation can fail or require services.
954
1036
  *
955
- * @since 4.0.0
956
1037
  * @category mapping
1038
+ * @since 4.0.0
957
1039
  */
958
1040
  export const mapEffectEnd: {
959
1041
  /**
960
- * Effectfully transforms this sink's result.
1042
+ * Effectfully transforms the full `End` produced by this sink.
1043
+ *
1044
+ * This can change both the result value and the optional leftovers, and the
1045
+ * transformation can fail or require services.
961
1046
  *
962
- * @since 4.0.0
963
1047
  * @category mapping
1048
+ * @since 4.0.0
964
1049
  */
965
1050
  <A, L, A2, E2, R2, L2 = never>(f: (end: End<A, L>) => Effect.Effect<End<A2, L2>, E2, R2>): <In, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L2, E2 | E, R2 | R>
966
1051
  /**
967
- * Effectfully transforms this sink's result.
1052
+ * Effectfully transforms the full `End` produced by this sink.
1053
+ *
1054
+ * This can change both the result value and the optional leftovers, and the
1055
+ * transformation can fail or require services.
968
1056
  *
969
- * @since 4.0.0
970
1057
  * @category mapping
1058
+ * @since 4.0.0
971
1059
  */
972
1060
  <A, In, L, E, R, A2, E2, R2, L2 = never>(
973
1061
  self: Sink<A, In, L, E, R>,
@@ -981,22 +1069,22 @@ export const mapEffectEnd: {
981
1069
  /**
982
1070
  * Effectfully transforms this sink's result.
983
1071
  *
984
- * @since 2.0.0
985
1072
  * @category mapping
1073
+ * @since 2.0.0
986
1074
  */
987
1075
  export const mapEffect: {
988
1076
  /**
989
1077
  * Effectfully transforms this sink's result.
990
1078
  *
991
- * @since 2.0.0
992
1079
  * @category mapping
1080
+ * @since 2.0.0
993
1081
  */
994
1082
  <A, A2, E2, R2>(f: (a: A) => Effect.Effect<A2, E2, R2>): <In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L, E2 | E, R2 | R>
995
1083
  /**
996
1084
  * Effectfully transforms this sink's result.
997
1085
  *
998
- * @since 2.0.0
999
1086
  * @category mapping
1087
+ * @since 2.0.0
1000
1088
  */
1001
1089
  <A, In, L, E, R, A2, E2, R2>(self: Sink<A, In, L, E, R>, f: (a: A) => Effect.Effect<A2, E2, R2>): Sink<A2, In, L, E | E2, R | R2>
1002
1090
  } = dual(2, <A, In, L, E, R, A2, E2, R2>(
@@ -1007,22 +1095,22 @@ export const mapEffect: {
1007
1095
  /**
1008
1096
  * Transforms the errors emitted by this sink using `f`.
1009
1097
  *
1010
- * @since 2.0.0
1011
1098
  * @category mapping
1099
+ * @since 2.0.0
1012
1100
  */
1013
1101
  export const mapError: {
1014
1102
  /**
1015
1103
  * Transforms the errors emitted by this sink using `f`.
1016
1104
  *
1017
- * @since 2.0.0
1018
1105
  * @category mapping
1106
+ * @since 2.0.0
1019
1107
  */
1020
1108
  <E, E2>(f: (error: E) => E2): <A, In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E2, R>
1021
1109
  /**
1022
1110
  * Transforms the errors emitted by this sink using `f`.
1023
1111
  *
1024
- * @since 2.0.0
1025
1112
  * @category mapping
1113
+ * @since 2.0.0
1026
1114
  */
1027
1115
  <A, In, L, E, R, E2>(self: Sink<A, In, L, E, R>, f: (error: E) => E2): Sink<A, In, L, E2, R>
1028
1116
  } = dual(2, <A, In, L, E, R, E2>(
@@ -1033,22 +1121,22 @@ export const mapError: {
1033
1121
  /**
1034
1122
  * Transforms the leftovers emitted by this sink using `f`.
1035
1123
  *
1036
- * @since 2.0.0
1037
1124
  * @category mapping
1125
+ * @since 2.0.0
1038
1126
  */
1039
1127
  export const mapLeftover: {
1040
1128
  /**
1041
1129
  * Transforms the leftovers emitted by this sink using `f`.
1042
1130
  *
1043
- * @since 2.0.0
1044
1131
  * @category mapping
1132
+ * @since 2.0.0
1045
1133
  */
1046
1134
  <L, L2>(f: (leftover: L) => L2): <A, In, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L2, E, R>
1047
1135
  /**
1048
1136
  * Transforms the leftovers emitted by this sink using `f`.
1049
1137
  *
1050
- * @since 2.0.0
1051
1138
  * @category mapping
1139
+ * @since 2.0.0
1052
1140
  */
1053
1141
  <A, In, L, E, R, L2>(self: Sink<A, In, L, E, R>, f: (leftover: L) => L2): Sink<A, In, L2, E, R>
1054
1142
  } = dual(2, <A, In, L, E, R, L2>(
@@ -1057,8 +1145,14 @@ export const mapLeftover: {
1057
1145
  ): Sink<A, In, L2, E, R> => mapEnd(self, ([a, l]) => [a, l && Arr.map(l, f)]))
1058
1146
 
1059
1147
  /**
1060
- * @since 2.0.0
1148
+ * Collects up to `n` input elements into an array.
1149
+ *
1150
+ * If `n` is less than or equal to zero, the sink completes with an empty array.
1151
+ * If more elements are pulled than needed, the remaining elements from the same
1152
+ * array are returned as leftovers.
1153
+ *
1061
1154
  * @category collecting
1155
+ * @since 2.0.0
1062
1156
  */
1063
1157
  export const take = <In>(n: number): Sink<Array<In>, In, In> =>
1064
1158
  fromTransform((upstream) => {
@@ -1099,8 +1193,8 @@ export const take = <In>(n: number): Sink<Array<In>, In, In> =>
1099
1193
  *
1100
1194
  * This function essentially runs sinks in sequence.
1101
1195
  *
1102
- * @since 2.0.0
1103
1196
  * @category sequencing
1197
+ * @since 2.0.0
1104
1198
  */
1105
1199
  export const flatMap: {
1106
1200
  /**
@@ -1110,8 +1204,8 @@ export const flatMap: {
1110
1204
  *
1111
1205
  * This function essentially runs sinks in sequence.
1112
1206
  *
1113
- * @since 2.0.0
1114
1207
  * @category sequencing
1208
+ * @since 2.0.0
1115
1209
  */
1116
1210
  <A, A1, L, In1 extends L, L1, E1, R1>(f: (a: A) => Sink<A1, In1, L1, E1, R1>): <In, E, R>(self: Sink<A, In, L, E, R>) => Sink<A1, In & In1, L1 | L, E1 | E, R1 | R>
1117
1211
  /**
@@ -1121,8 +1215,8 @@ export const flatMap: {
1121
1215
  *
1122
1216
  * This function essentially runs sinks in sequence.
1123
1217
  *
1124
- * @since 2.0.0
1125
1218
  * @category sequencing
1219
+ * @since 2.0.0
1126
1220
  */
1127
1221
  <A, In, L, E, R, A1, In1 extends L, L1, E1, R1>(self: Sink<A, In, L, E, R>, f: (a: A) => Sink<A1, In1, L1, E1, R1>): Sink<A1, In & In1, L | L1, E | E1, R | R1>
1128
1222
  } = dual(2, <A, In, L, E, R, A1, In1 extends L, L1, E1, R1>(
@@ -1158,8 +1252,8 @@ export const flatMap: {
1158
1252
  * A sink that reduces its inputs using the provided function `f` starting from
1159
1253
  * the provided `initial` state while the specified `predicate` returns `true`.
1160
1254
  *
1161
- * @since 2.0.0
1162
1255
  * @category reducing
1256
+ * @since 2.0.0
1163
1257
  */
1164
1258
  export const reduceWhile = <S, In>(
1165
1259
  initial: LazyArg<S>,
@@ -1195,8 +1289,8 @@ export const reduceWhile = <S, In>(
1195
1289
  * starting from the provided `initial` state while the specified `predicate`
1196
1290
  * returns `true`.
1197
1291
  *
1198
- * @since 2.0.0
1199
1292
  * @category reducing
1293
+ * @since 2.0.0
1200
1294
  */
1201
1295
  export const reduceWhileEffect = <S, In, E, R>(
1202
1296
  initial: LazyArg<S>,
@@ -1236,8 +1330,8 @@ export const reduceWhileEffect = <S, In, E, R>(
1236
1330
  * A sink that reduces its inputs using the provided function `f` starting from
1237
1331
  * the provided `initial` state while the specified `predicate` returns `true`.
1238
1332
  *
1239
- * @since 4.0.0
1240
1333
  * @category reducing
1334
+ * @since 4.0.0
1241
1335
  */
1242
1336
  export const reduceWhileArray = <S, In>(
1243
1337
  initial: LazyArg<S>,
@@ -1269,8 +1363,8 @@ export const reduceWhileArray = <S, In>(
1269
1363
  * starting from the provided `initial` state while the specified `predicate`
1270
1364
  * returns `true`.
1271
1365
  *
1272
- * @since 4.0.0
1273
1366
  * @category reducing
1367
+ * @since 4.0.0
1274
1368
  */
1275
1369
  export const reduceWhileArrayEffect = <S, In, E, R>(
1276
1370
  initial: LazyArg<S>,
@@ -1300,8 +1394,8 @@ export const reduceWhileArrayEffect = <S, In, E, R>(
1300
1394
  * A sink that reduces its inputs using the provided function `f` starting from
1301
1395
  * the provided `initial` state.
1302
1396
  *
1303
- * @since 2.0.0
1304
1397
  * @category reducing
1398
+ * @since 2.0.0
1305
1399
  */
1306
1400
  export const reduce = <S, In>(initial: LazyArg<S>, f: (s: S, input: In) => S): Sink<S, In> =>
1307
1401
  reduceArray(initial, (s, arr) => {
@@ -1315,8 +1409,8 @@ export const reduce = <S, In>(initial: LazyArg<S>, f: (s: S, input: In) => S): S
1315
1409
  * A sink that reduces its inputs using the provided function `f` starting from
1316
1410
  * the specified `initial` state.
1317
1411
  *
1318
- * @since 2.0.0
1319
1412
  * @category reducing
1413
+ * @since 2.0.0
1320
1414
  */
1321
1415
  export const reduceArray = <S, In>(
1322
1416
  initial: LazyArg<S>,
@@ -1338,8 +1432,8 @@ export const reduceArray = <S, In>(
1338
1432
  * A sink that reduces its inputs using the provided effectful function `f`
1339
1433
  * starting from the specified `initial` state.
1340
1434
  *
1341
- * @since 2.0.0
1342
1435
  * @category reducing
1436
+ * @since 2.0.0
1343
1437
  */
1344
1438
  export const reduceEffect = <S, In, E, R>(
1345
1439
  initial: LazyArg<S>,
@@ -1351,8 +1445,8 @@ const head_ = reduceWhile(Option.none<unknown>, Option.isNone, (_, in_) => Optio
1351
1445
  /**
1352
1446
  * Creates a sink containing the first value.
1353
1447
  *
1354
- * @since 2.0.0
1355
1448
  * @category constructors
1449
+ * @since 2.0.0
1356
1450
  */
1357
1451
  export const head = <In>(): Sink<Option.Option<In>, In, In> => head_ as any
1358
1452
 
@@ -1361,30 +1455,30 @@ const last_ = reduceArray(Option.none<unknown>, (_, arr) => Arr.last(arr))
1361
1455
  /**
1362
1456
  * Creates a sink containing the last value.
1363
1457
  *
1364
- * @since 2.0.0
1365
1458
  * @category constructors
1459
+ * @since 2.0.0
1366
1460
  */
1367
1461
  export const last = <In>(): Sink<Option.Option<In>, In> => last_ as any
1368
1462
 
1369
1463
  /**
1370
1464
  * Creates a sink containing the first matching value.
1371
1465
  *
1372
- * @since 4.0.0
1373
1466
  * @category constructors
1467
+ * @since 4.0.0
1374
1468
  */
1375
1469
  export const find: {
1376
1470
  /**
1377
1471
  * Creates a sink containing the first matching value.
1378
1472
  *
1379
- * @since 4.0.0
1380
1473
  * @category constructors
1474
+ * @since 4.0.0
1381
1475
  */
1382
1476
  <In, Out extends In>(refinement: Refinement<In, Out>): Sink<Option.Option<Out>, In, In>
1383
1477
  /**
1384
1478
  * Creates a sink containing the first matching value.
1385
1479
  *
1386
- * @since 4.0.0
1387
1480
  * @category constructors
1481
+ * @since 4.0.0
1388
1482
  */
1389
1483
  <In>(predicate: Predicate<In>): Sink<Option.Option<In>, In, In>
1390
1484
  } = <In>(predicate: Predicate<In>): Sink<Option.Option<In>, In, In> =>
@@ -1397,8 +1491,8 @@ export const find: {
1397
1491
  /**
1398
1492
  * Creates a sink containing the first matching value.
1399
1493
  *
1400
- * @since 4.0.0
1401
1494
  * @category constructors
1495
+ * @since 4.0.0
1402
1496
  */
1403
1497
  export const findEffect = <In, E, R>(
1404
1498
  predicate: (input: In) => Effect.Effect<boolean, E, R>
@@ -1412,8 +1506,8 @@ export const findEffect = <In, E, R>(
1412
1506
  /**
1413
1507
  * Creates a sink which sums up its inputs.
1414
1508
  *
1415
- * @since 2.0.0
1416
1509
  * @category constructors
1510
+ * @since 2.0.0
1417
1511
  */
1418
1512
  export const sum: Sink<number, number> = reduceArray(() => 0, (s, arr) => {
1419
1513
  for (let i = 0; i < arr.length; i++) {
@@ -1425,16 +1519,16 @@ export const sum: Sink<number, number> = reduceArray(() => 0, (s, arr) => {
1425
1519
  /**
1426
1520
  * A sink that counts the number of elements fed to it.
1427
1521
  *
1428
- * @since 2.0.0
1429
1522
  * @category constructors
1523
+ * @since 2.0.0
1430
1524
  */
1431
1525
  export const count: Sink<number, unknown> = reduceArray(() => 0, (s, arr) => s + arr.length)
1432
1526
 
1433
1527
  /**
1434
1528
  * Accumulates incoming elements into an array.
1435
1529
  *
1436
- * @since 2.0.0
1437
1530
  * @category constructors
1531
+ * @since 2.0.0
1438
1532
  */
1439
1533
  export const collect = <In>(): Sink<Array<In>, In> =>
1440
1534
  reduceArray(Arr.empty<In>, (s, arr) => {
@@ -1443,18 +1537,36 @@ export const collect = <In>(): Sink<Array<In>, In> =>
1443
1537
  })
1444
1538
 
1445
1539
  /**
1446
- * @since 4.0.0
1540
+ * Collects the longest input prefix whose elements satisfy the predicate or
1541
+ * refinement.
1542
+ *
1543
+ * The first failing input is consumed and excluded from the result. Any later
1544
+ * elements from the same pulled array are returned as leftovers.
1545
+ *
1447
1546
  * @category constructors
1547
+ * @since 4.0.0
1448
1548
  */
1449
1549
  export const takeWhile: {
1450
1550
  /**
1451
- * @since 4.0.0
1551
+ * Collects the longest input prefix whose elements satisfy the predicate or
1552
+ * refinement.
1553
+ *
1554
+ * The first failing input is consumed and excluded from the result. Any later
1555
+ * elements from the same pulled array are returned as leftovers.
1556
+ *
1452
1557
  * @category constructors
1558
+ * @since 4.0.0
1453
1559
  */
1454
1560
  <In, Out extends In>(refinement: Refinement<In, Out>): Sink<Array<Out>, In, In>
1455
1561
  /**
1456
- * @since 4.0.0
1562
+ * Collects the longest input prefix whose elements satisfy the predicate or
1563
+ * refinement.
1564
+ *
1565
+ * The first failing input is consumed and excluded from the result. Any later
1566
+ * elements from the same pulled array are returned as leftovers.
1567
+ *
1457
1568
  * @category constructors
1569
+ * @since 4.0.0
1458
1570
  */
1459
1571
  <In>(predicate: Predicate<In>): Sink<Array<In>, In, In>
1460
1572
  } = <In>(predicate: Predicate<In>): Sink<Array<In>, In, In> =>
@@ -1479,8 +1591,15 @@ export const takeWhile: {
1479
1591
  })
1480
1592
 
1481
1593
  /**
1482
- * @since 4.0.0
1594
+ * Applies a `Filter` to input elements while it succeeds, collecting each
1595
+ * successful output.
1596
+ *
1597
+ * The first input for which the filter fails is consumed and excluded from the
1598
+ * result. Any later elements from the same pulled array are returned as
1599
+ * leftovers.
1600
+ *
1483
1601
  * @category constructors
1602
+ * @since 4.0.0
1484
1603
  */
1485
1604
  export const takeWhileFilter = <In, Out, X>(
1486
1605
  filter: Filter.Filter<In, Out, X>
@@ -1507,13 +1626,25 @@ export const takeWhileFilter = <In, Out, X>(
1507
1626
  })
1508
1627
 
1509
1628
  /**
1510
- * @since 4.0.0
1629
+ * Effectfully collects input elements while the predicate succeeds.
1630
+ *
1631
+ * The first input for which the predicate returns `false` is consumed and
1632
+ * excluded from the result. Any later elements from the same pulled array are
1633
+ * returned as leftovers.
1634
+ *
1511
1635
  * @category constructors
1636
+ * @since 4.0.0
1512
1637
  */
1513
1638
  export const takeWhileEffect: {
1514
1639
  /**
1515
- * @since 4.0.0
1640
+ * Effectfully collects input elements while the predicate succeeds.
1641
+ *
1642
+ * The first input for which the predicate returns `false` is consumed and
1643
+ * excluded from the result. Any later elements from the same pulled array are
1644
+ * returned as leftovers.
1645
+ *
1516
1646
  * @category constructors
1647
+ * @since 4.0.0
1517
1648
  */
1518
1649
  <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>
1519
1650
  } = <In, E, R>(
@@ -1552,8 +1683,15 @@ export const takeWhileEffect: {
1552
1683
  })
1553
1684
 
1554
1685
  /**
1555
- * @since 4.0.0
1686
+ * Effectfully applies a `FilterEffect` to input elements while it succeeds,
1687
+ * collecting each successful output.
1688
+ *
1689
+ * The first input for which the filter fails is consumed and excluded from the
1690
+ * result. Any later elements from the same pulled array are returned as
1691
+ * leftovers.
1692
+ *
1556
1693
  * @category constructors
1694
+ * @since 4.0.0
1557
1695
  */
1558
1696
  export const takeWhileFilterEffect = <In, Out, X, E, R>(
1559
1697
  filter: Filter.FilterEffect<In, Out, X, E, R>
@@ -1585,8 +1723,11 @@ export const takeWhileFilterEffect = <In, Out, X, E, R>(
1585
1723
  })
1586
1724
 
1587
1725
  /**
1588
- * @since 4.0.0
1726
+ * Collects input elements until the predicate returns `true`, including the
1727
+ * matching element in the result.
1728
+ *
1589
1729
  * @category constructors
1730
+ * @since 4.0.0
1590
1731
  */
1591
1732
  export const takeUntil = <In>(predicate: Predicate<In>): Sink<Array<In>, In, In> =>
1592
1733
  suspend(() => {
@@ -1599,8 +1740,13 @@ export const takeUntil = <In>(predicate: Predicate<In>): Sink<Array<In>, In, In>
1599
1740
  })
1600
1741
 
1601
1742
  /**
1602
- * @since 4.0.0
1743
+ * Effectfully collects input elements until the predicate returns `true`,
1744
+ * including the matching element in the result.
1745
+ *
1746
+ * If the predicate effect fails, the sink fails with the same error.
1747
+ *
1603
1748
  * @category constructors
1749
+ * @since 4.0.0
1604
1750
  */
1605
1751
  export const takeUntilEffect = <In, E, R>(
1606
1752
  predicate: (input: In) => Effect.Effect<boolean, E, R>
@@ -1622,7 +1768,8 @@ export const takeUntilEffect = <In, E, R>(
1622
1768
  * A sink that executes the provided effectful function for every item fed
1623
1769
  * to it.
1624
1770
  *
1625
- * @example
1771
+ * **Example** (Running effects for each item)
1772
+ *
1626
1773
  * ```ts
1627
1774
  * import { Console, Effect, Sink, Stream } from "effect"
1628
1775
  *
@@ -1640,8 +1787,8 @@ export const takeUntilEffect = <In, E, R>(
1640
1787
  * // Processing: 3
1641
1788
  * ```
1642
1789
  *
1643
- * @since 2.0.0
1644
1790
  * @category constructors
1791
+ * @since 2.0.0
1645
1792
  */
1646
1793
  export const forEach = <In, X, E, R>(
1647
1794
  f: (input: In) => Effect.Effect<X, E, R>
@@ -1651,7 +1798,8 @@ export const forEach = <In, X, E, R>(
1651
1798
  * A sink that executes the provided effectful function for every Chunk fed
1652
1799
  * to it.
1653
1800
  *
1654
- * @example
1801
+ * **Example** (Running effects for each chunk)
1802
+ *
1655
1803
  * ```ts
1656
1804
  * import { Console, Effect, Sink, Stream } from "effect"
1657
1805
  *
@@ -1670,8 +1818,8 @@ export const forEach = <In, X, E, R>(
1670
1818
  * // Output: Processing chunk of 5 items: [1, 2, 3, 4, 5]
1671
1819
  * ```
1672
1820
  *
1673
- * @since 4.0.0
1674
1821
  * @category constructors
1822
+ * @since 4.0.0
1675
1823
  */
1676
1824
  export const forEachArray = <In, X, E, R>(
1677
1825
  f: (input: NonEmptyReadonlyArray<In>) => Effect.Effect<X, E, R>
@@ -1685,8 +1833,13 @@ export const forEachArray = <In, X, E, R>(
1685
1833
  )
1686
1834
 
1687
1835
  /**
1688
- * @since 2.0.0
1836
+ * Runs an effectful function for each input element while it returns `true`.
1837
+ *
1838
+ * The sink stops consuming input when the function returns `false` or when the
1839
+ * upstream stream ends, and completes with `void`.
1840
+ *
1689
1841
  * @category constructors
1842
+ * @since 2.0.0
1690
1843
  */
1691
1844
  export const forEachWhile = <In, E, R>(
1692
1845
  f: (input: In) => Effect.Effect<boolean, E, R>
@@ -1700,8 +1853,14 @@ export const forEachWhile = <In, E, R>(
1700
1853
  }))
1701
1854
 
1702
1855
  /**
1703
- * @since 2.0.0
1856
+ * Runs an effectful function for each non-empty input array while it returns
1857
+ * `true`.
1858
+ *
1859
+ * The sink stops consuming input when the function returns `false` or when the
1860
+ * upstream stream ends, and completes with `void`.
1861
+ *
1704
1862
  * @category constructors
1863
+ * @since 2.0.0
1705
1864
  */
1706
1865
  export const forEachWhileArray = <In, E, R>(
1707
1866
  f: (input: NonEmptyReadonlyArray<In>) => Effect.Effect<boolean, E, R>
@@ -1718,7 +1877,8 @@ export const forEachWhileArray = <In, E, R>(
1718
1877
  /**
1719
1878
  * Creates a sink produced from a scoped effect.
1720
1879
  *
1721
- * @example
1880
+ * **Example** (Unwrapping a sink effect)
1881
+ *
1722
1882
  * ```ts
1723
1883
  * import { Console, Effect, Sink, Stream } from "effect"
1724
1884
  *
@@ -1739,8 +1899,8 @@ export const forEachWhileArray = <In, E, R>(
1739
1899
  * // Item: 3
1740
1900
  * ```
1741
1901
  *
1742
- * @since 2.0.0
1743
1902
  * @category constructors
1903
+ * @since 2.0.0
1744
1904
  */
1745
1905
  export const unwrap = <A, In, L, E, R, R2>(
1746
1906
  effect: Effect.Effect<Sink<A, In, L, E, R2>, E, R>
@@ -1750,24 +1910,24 @@ export const unwrap = <A, In, L, E, R, R2>(
1750
1910
  * Summarize a sink by running an effect when the sink starts and again when
1751
1911
  * it completes.
1752
1912
  *
1753
- * @since 2.0.0
1754
1913
  * @category utils
1914
+ * @since 2.0.0
1755
1915
  */
1756
1916
  export const summarized: {
1757
1917
  /**
1758
1918
  * Summarize a sink by running an effect when the sink starts and again when
1759
1919
  * it completes.
1760
1920
  *
1761
- * @since 2.0.0
1762
1921
  * @category utils
1922
+ * @since 2.0.0
1763
1923
  */
1764
1924
  <A2, E2, R2, A3>(summary: Effect.Effect<A2, E2, R2>, f: (start: A2, end: A2) => A3): <A, In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<[A, A3], In, L, E2 | E, R2 | R>
1765
1925
  /**
1766
1926
  * Summarize a sink by running an effect when the sink starts and again when
1767
1927
  * it completes.
1768
1928
  *
1769
- * @since 2.0.0
1770
1929
  * @category utils
1930
+ * @since 2.0.0
1771
1931
  */
1772
1932
  <A, In, L, E, R, A2, E2, R2, A3>(
1773
1933
  self: Sink<A, In, L, E, R>,
@@ -1789,8 +1949,8 @@ export const summarized: {
1789
1949
  /**
1790
1950
  * Returns the sink that executes this one and times its execution.
1791
1951
  *
1792
- * @since 2.0.0
1793
1952
  * @category utils
1953
+ * @since 2.0.0
1794
1954
  */
1795
1955
  export const withDuration = <A, In, L, E, R>(
1796
1956
  self: Sink<A, In, L, E, R>
@@ -1798,24 +1958,41 @@ export const withDuration = <A, In, L, E, R>(
1798
1958
  summarized(self, Clock.currentTimeNanos, (start, end) => Duration.nanos(end - start))
1799
1959
 
1800
1960
  /**
1801
- * @since 2.0.0
1961
+ * A sink that drains all input and returns the elapsed duration.
1962
+ *
1802
1963
  * @category constructors
1964
+ * @since 2.0.0
1803
1965
  */
1804
1966
  export const timed: Sink<Duration.Duration, unknown> = map(withDuration(drain), ([, duration]) => duration)
1805
1967
 
1806
1968
  /**
1807
- * @since 4.0.0
1969
+ * Provides a `Context` to this sink.
1970
+ *
1971
+ * Services contained in the provided context are removed from the sink's
1972
+ * service requirements.
1973
+ *
1808
1974
  * @category Services
1975
+ * @since 4.0.0
1809
1976
  */
1810
1977
  export const provideContext: {
1811
1978
  /**
1812
- * @since 4.0.0
1979
+ * Provides a `Context` to this sink.
1980
+ *
1981
+ * Services contained in the provided context are removed from the sink's
1982
+ * service requirements.
1983
+ *
1813
1984
  * @category Services
1985
+ * @since 4.0.0
1814
1986
  */
1815
1987
  <Provided>(context: Context.Context<Provided>): <A, In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E, Exclude<R, Provided>>
1816
1988
  /**
1817
- * @since 4.0.0
1989
+ * Provides a `Context` to this sink.
1990
+ *
1991
+ * Services contained in the provided context are removed from the sink's
1992
+ * service requirements.
1993
+ *
1818
1994
  * @category Services
1995
+ * @since 4.0.0
1819
1996
  */
1820
1997
  <A, In, L, E, R, Provided>(self: Sink<A, In, L, E, R>, context: Context.Context<Provided>): Sink<A, In, L, E, Exclude<R, Provided>>
1821
1998
  } = dual(2, <A, In, L, E, R, Provided>(
@@ -1829,18 +2006,33 @@ export const provideContext: {
1829
2006
  ))
1830
2007
 
1831
2008
  /**
1832
- * @since 4.0.0
2009
+ * Provides a single service implementation to this sink.
2010
+ *
2011
+ * The service identified by `key` is removed from the sink's service
2012
+ * requirements.
2013
+ *
1833
2014
  * @category Services
2015
+ * @since 4.0.0
1834
2016
  */
1835
2017
  export const provideService: {
1836
2018
  /**
1837
- * @since 4.0.0
2019
+ * Provides a single service implementation to this sink.
2020
+ *
2021
+ * The service identified by `key` is removed from the sink's service
2022
+ * requirements.
2023
+ *
1838
2024
  * @category Services
2025
+ * @since 4.0.0
1839
2026
  */
1840
2027
  <I, S>(key: Context.Key<I, S>, value: Types.NoInfer<S>): <A, In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E, Exclude<R, I>>
1841
2028
  /**
1842
- * @since 4.0.0
2029
+ * Provides a single service implementation to this sink.
2030
+ *
2031
+ * The service identified by `key` is removed from the sink's service
2032
+ * requirements.
2033
+ *
1843
2034
  * @category Services
2035
+ * @since 4.0.0
1844
2036
  */
1845
2037
  <A, In, L, E, R, I, S>(
1846
2038
  self: Sink<A, In, L, E, R>,
@@ -1859,18 +2051,36 @@ export const provideService: {
1859
2051
  ))
1860
2052
 
1861
2053
  /**
1862
- * @since 2.0.0
2054
+ * Runs a fallback sink if this sink fails with a typed error.
2055
+ *
2056
+ * The fallback is built from the error and continues consuming from the same
2057
+ * upstream stream. If the upstream stream had already ended, the fallback sees
2058
+ * the upstream end instead.
2059
+ *
1863
2060
  * @category Error handling
2061
+ * @since 2.0.0
1864
2062
  */
1865
2063
  export const orElse: {
1866
2064
  /**
1867
- * @since 2.0.0
2065
+ * Runs a fallback sink if this sink fails with a typed error.
2066
+ *
2067
+ * The fallback is built from the error and continues consuming from the same
2068
+ * upstream stream. If the upstream stream had already ended, the fallback sees
2069
+ * the upstream end instead.
2070
+ *
1868
2071
  * @category Error handling
2072
+ * @since 2.0.0
1869
2073
  */
1870
2074
  <E, A2, In2, L2, E2, R2>(f: (error: Types.NoInfer<E>) => Sink<A2, In2, L2, E2, R2>): <A, In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A2 | A, In & In2, L2 | L, E2 | E, R2 | R>
1871
2075
  /**
1872
- * @since 2.0.0
2076
+ * Runs a fallback sink if this sink fails with a typed error.
2077
+ *
2078
+ * The fallback is built from the error and continues consuming from the same
2079
+ * upstream stream. If the upstream stream had already ended, the fallback sees
2080
+ * the upstream end instead.
2081
+ *
1873
2082
  * @category Error handling
2083
+ * @since 2.0.0
1874
2084
  */
1875
2085
  <A, In, L, E, R, A2, In2, L2, E2, R2>(self: Sink<A, In, L, E, R>, f: (error: E) => Sink<A2, In2, L2, E2, R2>): Sink<A | A2, In & In2, L | L2, E | E2, R | R2>
1876
2086
  } = dual(2, <A, In, L, E, R, A2, In2, L2, E2, R2>(
@@ -1899,18 +2109,36 @@ export const orElse: {
1899
2109
  }))
1900
2110
 
1901
2111
  /**
1902
- * @since 4.0.0
2112
+ * Handles failures from this sink by inspecting the full `Cause`.
2113
+ *
2114
+ * When this sink fails, the handler effect is run and its success value
2115
+ * becomes the sink result. If the handler fails, the returned sink fails with
2116
+ * that error.
2117
+ *
1903
2118
  * @category Error handling
2119
+ * @since 4.0.0
1904
2120
  */
1905
2121
  export const catchCause: {
1906
2122
  /**
1907
- * @since 4.0.0
2123
+ * Handles failures from this sink by inspecting the full `Cause`.
2124
+ *
2125
+ * When this sink fails, the handler effect is run and its success value
2126
+ * becomes the sink result. If the handler fails, the returned sink fails with
2127
+ * that error.
2128
+ *
1908
2129
  * @category Error handling
2130
+ * @since 4.0.0
1909
2131
  */
1910
2132
  <E, A2, E2, R2>(f: (error: Cause.Cause<Types.NoInfer<E>>) => Effect.Effect<A2, E2, R2>): <A, In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A2 | A, In, L, E, R2 | R>
1911
2133
  /**
1912
- * @since 4.0.0
2134
+ * Handles failures from this sink by inspecting the full `Cause`.
2135
+ *
2136
+ * When this sink fails, the handler effect is run and its success value
2137
+ * becomes the sink result. If the handler fails, the returned sink fails with
2138
+ * that error.
2139
+ *
1913
2140
  * @category Error handling
2141
+ * @since 4.0.0
1914
2142
  */
1915
2143
  <A, In, L, E, R, A2, E2, R2>(
1916
2144
  self: Sink<A, In, L, E, R>,
@@ -1944,25 +2172,40 @@ const catch_: {
1944
2172
 
1945
2173
  export {
1946
2174
  /**
1947
- * @since 4.0.0
1948
2175
  * @category Error handling
2176
+ * @since 4.0.0
1949
2177
  */
1950
2178
  catch_ as catch
1951
2179
  }
1952
2180
 
1953
2181
  /**
1954
- * @since 4.0.0
2182
+ * Runs an effect after this sink completes, fails, or is interrupted.
2183
+ *
2184
+ * The effect receives the sink's `Exit` for the result value. The original
2185
+ * sink result and leftovers are preserved unless the finalizer itself fails.
2186
+ *
1955
2187
  * @category Finalization
2188
+ * @since 4.0.0
1956
2189
  */
1957
2190
  export const onExit: {
1958
2191
  /**
1959
- * @since 4.0.0
2192
+ * Runs an effect after this sink completes, fails, or is interrupted.
2193
+ *
2194
+ * The effect receives the sink's `Exit` for the result value. The original
2195
+ * sink result and leftovers are preserved unless the finalizer itself fails.
2196
+ *
1960
2197
  * @category Finalization
2198
+ * @since 4.0.0
1961
2199
  */
1962
2200
  <A, E, X, E2, R2>(f: (exit: Exit.Exit<A, E>) => Effect.Effect<X, E2, R2>): <In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E | E2, R2 | R>
1963
2201
  /**
1964
- * @since 4.0.0
2202
+ * Runs an effect after this sink completes, fails, or is interrupted.
2203
+ *
2204
+ * The effect receives the sink's `Exit` for the result value. The original
2205
+ * sink result and leftovers are preserved unless the finalizer itself fails.
2206
+ *
1965
2207
  * @category Finalization
2208
+ * @since 4.0.0
1966
2209
  */
1967
2210
  <A, In, L, E, R, X, E2, R2>(
1968
2211
  self: Sink<A, In, L, E, R>,
@@ -1978,18 +2221,33 @@ export const onExit: {
1978
2221
  ))
1979
2222
 
1980
2223
  /**
1981
- * @since 4.0.0
2224
+ * Runs a finalizer effect after this sink completes, fails, or is interrupted.
2225
+ *
2226
+ * The original sink result and leftovers are preserved unless the finalizer
2227
+ * itself fails.
2228
+ *
1982
2229
  * @category Finalization
2230
+ * @since 4.0.0
1983
2231
  */
1984
2232
  export const ensuring: {
1985
2233
  /**
1986
- * @since 4.0.0
2234
+ * Runs a finalizer effect after this sink completes, fails, or is interrupted.
2235
+ *
2236
+ * The original sink result and leftovers are preserved unless the finalizer
2237
+ * itself fails.
2238
+ *
1987
2239
  * @category Finalization
2240
+ * @since 4.0.0
1988
2241
  */
1989
2242
  <X, E2, R2>(effect: Effect.Effect<X, E2, R2>): <A, E, In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E | E2, R2 | R>
1990
2243
  /**
1991
- * @since 4.0.0
2244
+ * Runs a finalizer effect after this sink completes, fails, or is interrupted.
2245
+ *
2246
+ * The original sink result and leftovers are preserved unless the finalizer
2247
+ * itself fails.
2248
+ *
1992
2249
  * @category Finalization
2250
+ * @since 4.0.0
1993
2251
  */
1994
2252
  <A, In, L, E, R, X, E2, R2>(self: Sink<A, In, L, E, R>, effect: Effect.Effect<X, E2, R2>): Sink<A, In, L, E | E2, R | R2>
1995
2253
  } = dual(2, <A, In, L, E, R, X, E2, R2>(