effect 4.0.0-beta.66 → 4.0.0-beta.68

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 (1767) hide show
  1. package/dist/Array.d.ts +151 -106
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +50 -40
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +620 -553
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +298 -254
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +342 -274
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +168 -126
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +189 -156
  14. package/dist/Boolean.d.ts.map +1 -1
  15. package/dist/Boolean.js +85 -68
  16. package/dist/Boolean.js.map +1 -1
  17. package/dist/Brand.d.ts +30 -5
  18. package/dist/Brand.d.ts.map +1 -1
  19. package/dist/Brand.js +19 -2
  20. package/dist/Brand.js.map +1 -1
  21. package/dist/Cache.d.ts +239 -135
  22. package/dist/Cache.d.ts.map +1 -1
  23. package/dist/Cache.js +135 -59
  24. package/dist/Cache.js.map +1 -1
  25. package/dist/Cause.d.ts +84 -73
  26. package/dist/Cause.d.ts.map +1 -1
  27. package/dist/Cause.js +51 -44
  28. package/dist/Cause.js.map +1 -1
  29. package/dist/Channel.d.ts +1568 -632
  30. package/dist/Channel.d.ts.map +1 -1
  31. package/dist/Channel.js +685 -315
  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 +574 -428
  38. package/dist/Chunk.d.ts.map +1 -1
  39. package/dist/Chunk.js +250 -191
  40. package/dist/Chunk.js.map +1 -1
  41. package/dist/Clock.d.ts +16 -9
  42. package/dist/Clock.d.ts.map +1 -1
  43. package/dist/Clock.js +9 -5
  44. package/dist/Clock.js.map +1 -1
  45. package/dist/Combiner.d.ts +11 -5
  46. package/dist/Combiner.d.ts.map +1 -1
  47. package/dist/Combiner.js +10 -4
  48. package/dist/Combiner.js.map +1 -1
  49. package/dist/Config.d.ts +80 -68
  50. package/dist/Config.d.ts.map +1 -1
  51. package/dist/Config.js +53 -49
  52. package/dist/Config.js.map +1 -1
  53. package/dist/ConfigProvider.d.ts +33 -32
  54. package/dist/ConfigProvider.d.ts.map +1 -1
  55. package/dist/ConfigProvider.js +19 -18
  56. package/dist/ConfigProvider.js.map +1 -1
  57. package/dist/Console.d.ts +76 -50
  58. package/dist/Console.d.ts.map +1 -1
  59. package/dist/Console.js +69 -46
  60. package/dist/Console.js.map +1 -1
  61. package/dist/Context.d.ts +400 -189
  62. package/dist/Context.d.ts.map +1 -1
  63. package/dist/Context.js +143 -77
  64. package/dist/Context.js.map +1 -1
  65. package/dist/Cron.d.ts +67 -48
  66. package/dist/Cron.d.ts.map +1 -1
  67. package/dist/Cron.js +94 -36
  68. package/dist/Cron.js.map +1 -1
  69. package/dist/Crypto.d.ts +208 -0
  70. package/dist/Crypto.d.ts.map +1 -0
  71. package/dist/Crypto.js +157 -0
  72. package/dist/Crypto.js.map +1 -0
  73. package/dist/Data.d.ts +9 -3
  74. package/dist/Data.d.ts.map +1 -1
  75. package/dist/Data.js.map +1 -1
  76. package/dist/DateTime.d.ts +893 -464
  77. package/dist/DateTime.d.ts.map +1 -1
  78. package/dist/DateTime.js +387 -228
  79. package/dist/DateTime.js.map +1 -1
  80. package/dist/Deferred.d.ts +367 -175
  81. package/dist/Deferred.d.ts.map +1 -1
  82. package/dist/Deferred.js +146 -72
  83. package/dist/Deferred.js.map +1 -1
  84. package/dist/Differ.d.ts +44 -2
  85. package/dist/Differ.d.ts.map +1 -1
  86. package/dist/Differ.js +36 -0
  87. package/dist/Duration.d.ts +333 -186
  88. package/dist/Duration.d.ts.map +1 -1
  89. package/dist/Duration.js +178 -107
  90. package/dist/Duration.js.map +1 -1
  91. package/dist/Effect.d.ts +2181 -2275
  92. package/dist/Effect.d.ts.map +1 -1
  93. package/dist/Effect.js +935 -850
  94. package/dist/Effect.js.map +1 -1
  95. package/dist/Effectable.d.ts +38 -3
  96. package/dist/Effectable.d.ts.map +1 -1
  97. package/dist/Effectable.js +3 -3
  98. package/dist/Effectable.js.map +1 -1
  99. package/dist/Encoding.d.ts +78 -28
  100. package/dist/Encoding.d.ts.map +1 -1
  101. package/dist/Encoding.js +75 -27
  102. package/dist/Encoding.js.map +1 -1
  103. package/dist/Equal.d.ts +4 -3
  104. package/dist/Equal.d.ts.map +1 -1
  105. package/dist/Equal.js +4 -3
  106. package/dist/Equal.js.map +1 -1
  107. package/dist/Equivalence.d.ts +18 -24
  108. package/dist/Equivalence.d.ts.map +1 -1
  109. package/dist/Equivalence.js +16 -21
  110. package/dist/Equivalence.js.map +1 -1
  111. package/dist/ErrorReporter.d.ts +66 -82
  112. package/dist/ErrorReporter.d.ts.map +1 -1
  113. package/dist/ErrorReporter.js +38 -29
  114. package/dist/ErrorReporter.js.map +1 -1
  115. package/dist/ExecutionPlan.d.ts +106 -12
  116. package/dist/ExecutionPlan.d.ts.map +1 -1
  117. package/dist/ExecutionPlan.js +23 -6
  118. package/dist/ExecutionPlan.js.map +1 -1
  119. package/dist/Exit.d.ts +6 -5
  120. package/dist/Exit.d.ts.map +1 -1
  121. package/dist/Exit.js.map +1 -1
  122. package/dist/Fiber.d.ts +71 -40
  123. package/dist/Fiber.d.ts.map +1 -1
  124. package/dist/Fiber.js +39 -21
  125. package/dist/Fiber.js.map +1 -1
  126. package/dist/FiberHandle.d.ts +118 -57
  127. package/dist/FiberHandle.d.ts.map +1 -1
  128. package/dist/FiberHandle.js +121 -39
  129. package/dist/FiberHandle.js.map +1 -1
  130. package/dist/FiberMap.d.ts +287 -159
  131. package/dist/FiberMap.d.ts.map +1 -1
  132. package/dist/FiberMap.js +175 -73
  133. package/dist/FiberMap.js.map +1 -1
  134. package/dist/FiberSet.d.ts +93 -52
  135. package/dist/FiberSet.d.ts.map +1 -1
  136. package/dist/FiberSet.js +97 -34
  137. package/dist/FiberSet.js.map +1 -1
  138. package/dist/FileSystem.d.ts +102 -73
  139. package/dist/FileSystem.d.ts.map +1 -1
  140. package/dist/FileSystem.js +53 -39
  141. package/dist/FileSystem.js.map +1 -1
  142. package/dist/Filter.d.ts +166 -88
  143. package/dist/Filter.d.ts.map +1 -1
  144. package/dist/Filter.js +68 -42
  145. package/dist/Filter.js.map +1 -1
  146. package/dist/Formatter.d.ts +4 -2
  147. package/dist/Formatter.d.ts.map +1 -1
  148. package/dist/Formatter.js +3 -69
  149. package/dist/Formatter.js.map +1 -1
  150. package/dist/Function.d.ts +218 -151
  151. package/dist/Function.d.ts.map +1 -1
  152. package/dist/Function.js +94 -78
  153. package/dist/Function.js.map +1 -1
  154. package/dist/Graph.d.ts +714 -415
  155. package/dist/Graph.d.ts.map +1 -1
  156. package/dist/Graph.js +325 -182
  157. package/dist/Graph.js.map +1 -1
  158. package/dist/HKT.d.ts +29 -13
  159. package/dist/HKT.d.ts.map +1 -1
  160. package/dist/Hash.d.ts +35 -24
  161. package/dist/Hash.d.ts.map +1 -1
  162. package/dist/Hash.js +27 -17
  163. package/dist/Hash.js.map +1 -1
  164. package/dist/HashMap.d.ts +540 -388
  165. package/dist/HashMap.d.ts.map +1 -1
  166. package/dist/HashMap.js +262 -156
  167. package/dist/HashMap.js.map +1 -1
  168. package/dist/HashRing.d.ts +53 -34
  169. package/dist/HashRing.d.ts.map +1 -1
  170. package/dist/HashRing.js +83 -16
  171. package/dist/HashRing.js.map +1 -1
  172. package/dist/HashSet.d.ts +239 -153
  173. package/dist/HashSet.d.ts.map +1 -1
  174. package/dist/HashSet.js +110 -56
  175. package/dist/HashSet.js.map +1 -1
  176. package/dist/Inspectable.d.ts +26 -13
  177. package/dist/Inspectable.d.ts.map +1 -1
  178. package/dist/Inspectable.js +22 -10
  179. package/dist/Inspectable.js.map +1 -1
  180. package/dist/Iterable.d.ts +336 -222
  181. package/dist/Iterable.d.ts.map +1 -1
  182. package/dist/Iterable.js +146 -100
  183. package/dist/Iterable.js.map +1 -1
  184. package/dist/JsonPatch.d.ts +12 -9
  185. package/dist/JsonPatch.d.ts.map +1 -1
  186. package/dist/JsonPatch.js +9 -6
  187. package/dist/JsonPatch.js.map +1 -1
  188. package/dist/JsonPointer.d.ts +13 -11
  189. package/dist/JsonPointer.d.ts.map +1 -1
  190. package/dist/JsonPointer.js +13 -11
  191. package/dist/JsonPointer.js.map +1 -1
  192. package/dist/JsonSchema.d.ts +16 -0
  193. package/dist/JsonSchema.d.ts.map +1 -1
  194. package/dist/JsonSchema.js +10 -0
  195. package/dist/JsonSchema.js.map +1 -1
  196. package/dist/Latch.d.ts +97 -26
  197. package/dist/Latch.d.ts.map +1 -1
  198. package/dist/Latch.js +39 -20
  199. package/dist/Latch.js.map +1 -1
  200. package/dist/Layer.d.ts +472 -410
  201. package/dist/Layer.d.ts.map +1 -1
  202. package/dist/Layer.js +290 -226
  203. package/dist/Layer.js.map +1 -1
  204. package/dist/LayerMap.d.ts +99 -26
  205. package/dist/LayerMap.d.ts.map +1 -1
  206. package/dist/LayerMap.js +58 -14
  207. package/dist/LayerMap.js.map +1 -1
  208. package/dist/LogLevel.d.ts +92 -131
  209. package/dist/LogLevel.d.ts.map +1 -1
  210. package/dist/LogLevel.js +25 -15
  211. package/dist/LogLevel.js.map +1 -1
  212. package/dist/Logger.d.ts +159 -104
  213. package/dist/Logger.d.ts.map +1 -1
  214. package/dist/Logger.js +215 -189
  215. package/dist/Logger.js.map +1 -1
  216. package/dist/ManagedRuntime.d.ts +78 -19
  217. package/dist/ManagedRuntime.d.ts.map +1 -1
  218. package/dist/ManagedRuntime.js +24 -17
  219. package/dist/ManagedRuntime.js.map +1 -1
  220. package/dist/Match.d.ts +135 -161
  221. package/dist/Match.d.ts.map +1 -1
  222. package/dist/Match.js +86 -78
  223. package/dist/Match.js.map +1 -1
  224. package/dist/Metric.d.ts +330 -291
  225. package/dist/Metric.d.ts.map +1 -1
  226. package/dist/Metric.js +219 -214
  227. package/dist/Metric.js.map +1 -1
  228. package/dist/MutableHashMap.d.ts +146 -87
  229. package/dist/MutableHashMap.d.ts.map +1 -1
  230. package/dist/MutableHashMap.js +67 -43
  231. package/dist/MutableHashMap.js.map +1 -1
  232. package/dist/MutableHashSet.d.ts +52 -30
  233. package/dist/MutableHashSet.d.ts.map +1 -1
  234. package/dist/MutableHashSet.js +92 -38
  235. package/dist/MutableHashSet.js.map +1 -1
  236. package/dist/MutableList.d.ts +110 -68
  237. package/dist/MutableList.d.ts.map +1 -1
  238. package/dist/MutableList.js +135 -85
  239. package/dist/MutableList.js.map +1 -1
  240. package/dist/MutableRef.d.ts +99 -62
  241. package/dist/MutableRef.d.ts.map +1 -1
  242. package/dist/MutableRef.js +78 -60
  243. package/dist/MutableRef.js.map +1 -1
  244. package/dist/Newtype.d.ts +15 -2
  245. package/dist/Newtype.d.ts.map +1 -1
  246. package/dist/Newtype.js +8 -2
  247. package/dist/Newtype.js.map +1 -1
  248. package/dist/NonEmptyIterable.d.ts +38 -48
  249. package/dist/NonEmptyIterable.d.ts.map +1 -1
  250. package/dist/NonEmptyIterable.js +34 -25
  251. package/dist/NonEmptyIterable.js.map +1 -1
  252. package/dist/Number.d.ts +261 -205
  253. package/dist/Number.d.ts.map +1 -1
  254. package/dist/Number.js +119 -91
  255. package/dist/Number.js.map +1 -1
  256. package/dist/Optic.d.ts +6 -7
  257. package/dist/Optic.d.ts.map +1 -1
  258. package/dist/Optic.js +5 -6
  259. package/dist/Optic.js.map +1 -1
  260. package/dist/Option.d.ts +133 -156
  261. package/dist/Option.d.ts.map +1 -1
  262. package/dist/Option.js +64 -64
  263. package/dist/Option.js.map +1 -1
  264. package/dist/Order.d.ts +6 -6
  265. package/dist/Order.js +6 -6
  266. package/dist/Ordering.d.ts +56 -45
  267. package/dist/Ordering.d.ts.map +1 -1
  268. package/dist/Ordering.js +10 -8
  269. package/dist/Ordering.js.map +1 -1
  270. package/dist/PartitionedSemaphore.d.ts +225 -40
  271. package/dist/PartitionedSemaphore.d.ts.map +1 -1
  272. package/dist/PartitionedSemaphore.js +113 -17
  273. package/dist/PartitionedSemaphore.js.map +1 -1
  274. package/dist/Path.d.ts +77 -13
  275. package/dist/Path.d.ts.map +1 -1
  276. package/dist/Path.js +49 -4
  277. package/dist/Path.js.map +1 -1
  278. package/dist/Pipeable.d.ts +77 -18
  279. package/dist/Pipeable.d.ts.map +1 -1
  280. package/dist/Pipeable.js +63 -14
  281. package/dist/Pipeable.js.map +1 -1
  282. package/dist/PlatformError.d.ts +74 -6
  283. package/dist/PlatformError.d.ts.map +1 -1
  284. package/dist/PlatformError.js +68 -5
  285. package/dist/PlatformError.js.map +1 -1
  286. package/dist/Pool.d.ts +66 -31
  287. package/dist/Pool.d.ts.map +1 -1
  288. package/dist/Pool.js +26 -24
  289. package/dist/Pool.js.map +1 -1
  290. package/dist/Predicate.d.ts +16 -23
  291. package/dist/Predicate.d.ts.map +1 -1
  292. package/dist/Predicate.js +12 -17
  293. package/dist/Predicate.js.map +1 -1
  294. package/dist/PrimaryKey.d.ts +11 -3
  295. package/dist/PrimaryKey.d.ts.map +1 -1
  296. package/dist/PrimaryKey.js +9 -2
  297. package/dist/PrimaryKey.js.map +1 -1
  298. package/dist/PubSub.d.ts +385 -309
  299. package/dist/PubSub.d.ts.map +1 -1
  300. package/dist/PubSub.js +260 -207
  301. package/dist/PubSub.js.map +1 -1
  302. package/dist/Pull.d.ts +94 -25
  303. package/dist/Pull.d.ts.map +1 -1
  304. package/dist/Pull.js +61 -13
  305. package/dist/Pull.js.map +1 -1
  306. package/dist/Queue.d.ts +303 -184
  307. package/dist/Queue.d.ts.map +1 -1
  308. package/dist/Queue.js +231 -134
  309. package/dist/Queue.js.map +1 -1
  310. package/dist/Random.d.ts +65 -57
  311. package/dist/Random.d.ts.map +1 -1
  312. package/dist/Random.js +41 -66
  313. package/dist/Random.js.map +1 -1
  314. package/dist/RcMap.d.ts +151 -141
  315. package/dist/RcMap.d.ts.map +1 -1
  316. package/dist/RcMap.js +66 -20
  317. package/dist/RcMap.js.map +1 -1
  318. package/dist/RcRef.d.ts +68 -32
  319. package/dist/RcRef.d.ts.map +1 -1
  320. package/dist/RcRef.js +33 -16
  321. package/dist/RcRef.js.map +1 -1
  322. package/dist/Record.d.ts +282 -137
  323. package/dist/Record.d.ts.map +1 -1
  324. package/dist/Record.js +124 -62
  325. package/dist/Record.js.map +1 -1
  326. package/dist/Redactable.d.ts +7 -5
  327. package/dist/Redactable.d.ts.map +1 -1
  328. package/dist/Redactable.js +5 -3
  329. package/dist/Redactable.js.map +1 -1
  330. package/dist/Redacted.d.ts +63 -34
  331. package/dist/Redacted.d.ts.map +1 -1
  332. package/dist/Redacted.js +31 -15
  333. package/dist/Redacted.js.map +1 -1
  334. package/dist/Reducer.d.ts +3 -1
  335. package/dist/Reducer.d.ts.map +1 -1
  336. package/dist/Reducer.js +2 -0
  337. package/dist/Reducer.js.map +1 -1
  338. package/dist/Ref.d.ts +85 -66
  339. package/dist/Ref.d.ts.map +1 -1
  340. package/dist/Ref.js +57 -45
  341. package/dist/Ref.js.map +1 -1
  342. package/dist/References.d.ts +73 -31
  343. package/dist/References.d.ts.map +1 -1
  344. package/dist/References.js +66 -30
  345. package/dist/References.js.map +1 -1
  346. package/dist/RegExp.d.ts +12 -6
  347. package/dist/RegExp.d.ts.map +1 -1
  348. package/dist/RegExp.js +12 -6
  349. package/dist/RegExp.js.map +1 -1
  350. package/dist/Request.d.ts +159 -34
  351. package/dist/Request.d.ts.map +1 -1
  352. package/dist/Request.js +68 -12
  353. package/dist/Request.js.map +1 -1
  354. package/dist/RequestResolver.d.ts +262 -118
  355. package/dist/RequestResolver.d.ts.map +1 -1
  356. package/dist/RequestResolver.js +78 -42
  357. package/dist/RequestResolver.js.map +1 -1
  358. package/dist/Resource.d.ts +13 -7
  359. package/dist/Resource.d.ts.map +1 -1
  360. package/dist/Resource.js +44 -6
  361. package/dist/Resource.js.map +1 -1
  362. package/dist/Result.d.ts +135 -151
  363. package/dist/Result.d.ts.map +1 -1
  364. package/dist/Result.js +56 -68
  365. package/dist/Result.js.map +1 -1
  366. package/dist/Runtime.d.ts +40 -20
  367. package/dist/Runtime.d.ts.map +1 -1
  368. package/dist/Runtime.js +34 -17
  369. package/dist/Runtime.js.map +1 -1
  370. package/dist/Schedule.d.ts +556 -590
  371. package/dist/Schedule.d.ts.map +1 -1
  372. package/dist/Schedule.js +265 -253
  373. package/dist/Schedule.js.map +1 -1
  374. package/dist/Scheduler.d.ts +44 -7
  375. package/dist/Scheduler.d.ts.map +1 -1
  376. package/dist/Scheduler.js +34 -5
  377. package/dist/Scheduler.js.map +1 -1
  378. package/dist/Schema.d.ts +1293 -602
  379. package/dist/Schema.d.ts.map +1 -1
  380. package/dist/Schema.js +501 -361
  381. package/dist/Schema.js.map +1 -1
  382. package/dist/SchemaAST.d.ts +122 -92
  383. package/dist/SchemaAST.d.ts.map +1 -1
  384. package/dist/SchemaAST.js +102 -77
  385. package/dist/SchemaAST.js.map +1 -1
  386. package/dist/SchemaGetter.d.ts +49 -36
  387. package/dist/SchemaGetter.d.ts.map +1 -1
  388. package/dist/SchemaGetter.js +42 -29
  389. package/dist/SchemaGetter.js.map +1 -1
  390. package/dist/SchemaIssue.d.ts +19 -24
  391. package/dist/SchemaIssue.d.ts.map +1 -1
  392. package/dist/SchemaIssue.js +16 -14
  393. package/dist/SchemaIssue.js.map +1 -1
  394. package/dist/SchemaParser.d.ts +231 -63
  395. package/dist/SchemaParser.d.ts.map +1 -1
  396. package/dist/SchemaParser.js +266 -75
  397. package/dist/SchemaParser.js.map +1 -1
  398. package/dist/SchemaRepresentation.d.ts +89 -77
  399. package/dist/SchemaRepresentation.d.ts.map +1 -1
  400. package/dist/SchemaRepresentation.js +47 -37
  401. package/dist/SchemaRepresentation.js.map +1 -1
  402. package/dist/SchemaTransformation.d.ts +97 -46
  403. package/dist/SchemaTransformation.d.ts.map +1 -1
  404. package/dist/SchemaTransformation.js +89 -38
  405. package/dist/SchemaTransformation.js.map +1 -1
  406. package/dist/SchemaUtils.d.ts +8 -1
  407. package/dist/SchemaUtils.d.ts.map +1 -1
  408. package/dist/SchemaUtils.js +24 -1
  409. package/dist/SchemaUtils.js.map +1 -1
  410. package/dist/Scope.d.ts +107 -65
  411. package/dist/Scope.d.ts.map +1 -1
  412. package/dist/Scope.js +61 -32
  413. package/dist/Scope.js.map +1 -1
  414. package/dist/ScopedCache.d.ts +141 -49
  415. package/dist/ScopedCache.d.ts.map +1 -1
  416. package/dist/ScopedCache.js +82 -21
  417. package/dist/ScopedCache.js.map +1 -1
  418. package/dist/ScopedRef.d.ts +28 -8
  419. package/dist/ScopedRef.d.ts.map +1 -1
  420. package/dist/ScopedRef.js +25 -5
  421. package/dist/ScopedRef.js.map +1 -1
  422. package/dist/Semaphore.d.ts +61 -37
  423. package/dist/Semaphore.d.ts.map +1 -1
  424. package/dist/Semaphore.js +18 -21
  425. package/dist/Semaphore.js.map +1 -1
  426. package/dist/Sink.d.ts +461 -206
  427. package/dist/Sink.d.ts.map +1 -1
  428. package/dist/Sink.js +241 -90
  429. package/dist/Sink.js.map +1 -1
  430. package/dist/Stdio.d.ts +43 -6
  431. package/dist/Stdio.d.ts.map +1 -1
  432. package/dist/Stdio.js +33 -4
  433. package/dist/Stdio.js.map +1 -1
  434. package/dist/Stream.d.ts +2117 -1541
  435. package/dist/Stream.d.ts.map +1 -1
  436. package/dist/Stream.js +951 -682
  437. package/dist/Stream.js.map +1 -1
  438. package/dist/String.d.ts +174 -97
  439. package/dist/String.d.ts.map +1 -1
  440. package/dist/String.js +128 -69
  441. package/dist/String.js.map +1 -1
  442. package/dist/Struct.d.ts +20 -18
  443. package/dist/Struct.d.ts.map +1 -1
  444. package/dist/Struct.js +10 -8
  445. package/dist/Struct.js.map +1 -1
  446. package/dist/SubscriptionRef.d.ts +309 -204
  447. package/dist/SubscriptionRef.d.ts.map +1 -1
  448. package/dist/SubscriptionRef.js +126 -77
  449. package/dist/SubscriptionRef.js.map +1 -1
  450. package/dist/Symbol.d.ts +13 -5
  451. package/dist/Symbol.d.ts.map +1 -1
  452. package/dist/Symbol.js +13 -5
  453. package/dist/Symbol.js.map +1 -1
  454. package/dist/SynchronizedRef.d.ts +278 -62
  455. package/dist/SynchronizedRef.d.ts.map +1 -1
  456. package/dist/SynchronizedRef.js +116 -23
  457. package/dist/SynchronizedRef.js.map +1 -1
  458. package/dist/Take.d.ts +26 -2
  459. package/dist/Take.d.ts.map +1 -1
  460. package/dist/Take.js +4 -1
  461. package/dist/Take.js.map +1 -1
  462. package/dist/Terminal.d.ts +39 -7
  463. package/dist/Terminal.d.ts.map +1 -1
  464. package/dist/Terminal.js +10 -4
  465. package/dist/Terminal.js.map +1 -1
  466. package/dist/Tracer.d.ts +233 -59
  467. package/dist/Tracer.d.ts.map +1 -1
  468. package/dist/Tracer.js +94 -18
  469. package/dist/Tracer.js.map +1 -1
  470. package/dist/Trie.d.ts +280 -245
  471. package/dist/Trie.d.ts.map +1 -1
  472. package/dist/Trie.js +116 -102
  473. package/dist/Trie.js.map +1 -1
  474. package/dist/Tuple.d.ts +34 -32
  475. package/dist/Tuple.d.ts.map +1 -1
  476. package/dist/Tuple.js +16 -14
  477. package/dist/Tuple.js.map +1 -1
  478. package/dist/TxChunk.d.ts +200 -155
  479. package/dist/TxChunk.d.ts.map +1 -1
  480. package/dist/TxChunk.js +83 -61
  481. package/dist/TxChunk.js.map +1 -1
  482. package/dist/TxDeferred.d.ts +43 -29
  483. package/dist/TxDeferred.d.ts.map +1 -1
  484. package/dist/TxDeferred.js +22 -15
  485. package/dist/TxDeferred.js.map +1 -1
  486. package/dist/TxHashMap.d.ts +362 -223
  487. package/dist/TxHashMap.d.ts.map +1 -1
  488. package/dist/TxHashMap.js +171 -98
  489. package/dist/TxHashMap.js.map +1 -1
  490. package/dist/TxHashSet.d.ts +181 -111
  491. package/dist/TxHashSet.d.ts.map +1 -1
  492. package/dist/TxHashSet.js +87 -49
  493. package/dist/TxHashSet.js.map +1 -1
  494. package/dist/TxPriorityQueue.d.ts +94 -63
  495. package/dist/TxPriorityQueue.d.ts.map +1 -1
  496. package/dist/TxPriorityQueue.js +55 -37
  497. package/dist/TxPriorityQueue.js.map +1 -1
  498. package/dist/TxPubSub.d.ts +77 -49
  499. package/dist/TxPubSub.d.ts.map +1 -1
  500. package/dist/TxPubSub.js +60 -37
  501. package/dist/TxPubSub.js.map +1 -1
  502. package/dist/TxQueue.d.ts +277 -242
  503. package/dist/TxQueue.d.ts.map +1 -1
  504. package/dist/TxQueue.js +147 -101
  505. package/dist/TxQueue.js.map +1 -1
  506. package/dist/TxReentrantLock.d.ts +69 -46
  507. package/dist/TxReentrantLock.d.ts.map +1 -1
  508. package/dist/TxReentrantLock.js +48 -32
  509. package/dist/TxReentrantLock.js.map +1 -1
  510. package/dist/TxRef.d.ts +69 -40
  511. package/dist/TxRef.d.ts.map +1 -1
  512. package/dist/TxRef.js +34 -19
  513. package/dist/TxRef.js.map +1 -1
  514. package/dist/TxSemaphore.d.ts +101 -115
  515. package/dist/TxSemaphore.d.ts.map +1 -1
  516. package/dist/TxSemaphore.js +76 -77
  517. package/dist/TxSemaphore.js.map +1 -1
  518. package/dist/TxSubscriptionRef.d.ts +74 -50
  519. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  520. package/dist/TxSubscriptionRef.js +34 -23
  521. package/dist/TxSubscriptionRef.js.map +1 -1
  522. package/dist/Types.d.ts +31 -34
  523. package/dist/Types.d.ts.map +1 -1
  524. package/dist/UndefinedOr.d.ts +62 -25
  525. package/dist/UndefinedOr.d.ts.map +1 -1
  526. package/dist/UndefinedOr.js +36 -25
  527. package/dist/UndefinedOr.js.map +1 -1
  528. package/dist/Unify.d.ts +72 -117
  529. package/dist/Unify.d.ts.map +1 -1
  530. package/dist/Unify.js +20 -6
  531. package/dist/Unify.js.map +1 -1
  532. package/dist/Utils.d.ts +5 -2
  533. package/dist/Utils.d.ts.map +1 -1
  534. package/dist/Utils.js +4 -0
  535. package/dist/Utils.js.map +1 -1
  536. package/dist/index.d.ts +1973 -418
  537. package/dist/index.d.ts.map +1 -1
  538. package/dist/index.js +1973 -418
  539. package/dist/index.js.map +1 -1
  540. package/dist/internal/schema/schema.js +1 -1
  541. package/dist/internal/schema/schema.js.map +1 -1
  542. package/dist/testing/FastCheck.d.ts +9 -6
  543. package/dist/testing/FastCheck.d.ts.map +1 -1
  544. package/dist/testing/FastCheck.js +9 -6
  545. package/dist/testing/FastCheck.js.map +1 -1
  546. package/dist/testing/TestClock.d.ts +39 -35
  547. package/dist/testing/TestClock.d.ts.map +1 -1
  548. package/dist/testing/TestClock.js +42 -12
  549. package/dist/testing/TestClock.js.map +1 -1
  550. package/dist/testing/TestConsole.d.ts +44 -36
  551. package/dist/testing/TestConsole.d.ts.map +1 -1
  552. package/dist/testing/TestConsole.js +30 -15
  553. package/dist/testing/TestConsole.js.map +1 -1
  554. package/dist/testing/TestSchema.d.ts +2 -0
  555. package/dist/testing/TestSchema.d.ts.map +1 -1
  556. package/dist/testing/TestSchema.js +9 -7
  557. package/dist/testing/TestSchema.js.map +1 -1
  558. package/dist/testing/index.d.ts +34 -0
  559. package/dist/testing/index.d.ts.map +1 -1
  560. package/dist/testing/index.js +34 -0
  561. package/dist/testing/index.js.map +1 -1
  562. package/dist/unstable/ai/AiError.d.ts +205 -147
  563. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  564. package/dist/unstable/ai/AiError.js +164 -109
  565. package/dist/unstable/ai/AiError.js.map +1 -1
  566. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  567. package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
  568. package/dist/unstable/ai/Chat.d.ts +64 -41
  569. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  570. package/dist/unstable/ai/Chat.js +51 -33
  571. package/dist/unstable/ai/Chat.js.map +1 -1
  572. package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
  573. package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
  574. package/dist/unstable/ai/EmbeddingModel.js +9 -8
  575. package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
  576. package/dist/unstable/ai/IdGenerator.d.ts +28 -18
  577. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  578. package/dist/unstable/ai/IdGenerator.js +18 -11
  579. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  580. package/dist/unstable/ai/LanguageModel.d.ts +31 -25
  581. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  582. package/dist/unstable/ai/LanguageModel.js +20 -14
  583. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  584. package/dist/unstable/ai/McpSchema.d.ts +342 -119
  585. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  586. package/dist/unstable/ai/McpSchema.js +266 -98
  587. package/dist/unstable/ai/McpSchema.js.map +1 -1
  588. package/dist/unstable/ai/McpServer.d.ts +56 -20
  589. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  590. package/dist/unstable/ai/McpServer.js +64 -16
  591. package/dist/unstable/ai/McpServer.js.map +1 -1
  592. package/dist/unstable/ai/Model.d.ts +10 -12
  593. package/dist/unstable/ai/Model.d.ts.map +1 -1
  594. package/dist/unstable/ai/Model.js +9 -7
  595. package/dist/unstable/ai/Model.js.map +1 -1
  596. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  597. package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
  598. package/dist/unstable/ai/Prompt.d.ts +200 -176
  599. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  600. package/dist/unstable/ai/Prompt.js +77 -68
  601. package/dist/unstable/ai/Prompt.js.map +1 -1
  602. package/dist/unstable/ai/Response.d.ts +173 -160
  603. package/dist/unstable/ai/Response.d.ts.map +1 -1
  604. package/dist/unstable/ai/Response.js +43 -48
  605. package/dist/unstable/ai/Response.js.map +1 -1
  606. package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
  607. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
  608. package/dist/unstable/ai/ResponseIdTracker.js +27 -2
  609. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  610. package/dist/unstable/ai/Telemetry.d.ts +43 -33
  611. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  612. package/dist/unstable/ai/Telemetry.js +15 -11
  613. package/dist/unstable/ai/Telemetry.js.map +1 -1
  614. package/dist/unstable/ai/Tokenizer.d.ts +14 -9
  615. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  616. package/dist/unstable/ai/Tokenizer.js +10 -6
  617. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  618. package/dist/unstable/ai/Tool.d.ts +167 -96
  619. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  620. package/dist/unstable/ai/Tool.js +107 -53
  621. package/dist/unstable/ai/Tool.js.map +1 -1
  622. package/dist/unstable/ai/Toolkit.d.ts +32 -39
  623. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  624. package/dist/unstable/ai/Toolkit.js +7 -5
  625. package/dist/unstable/ai/Toolkit.js.map +1 -1
  626. package/dist/unstable/ai/index.d.ts +121 -29
  627. package/dist/unstable/ai/index.d.ts.map +1 -1
  628. package/dist/unstable/ai/index.js +121 -29
  629. package/dist/unstable/ai/index.js.map +1 -1
  630. package/dist/unstable/cli/Argument.d.ts +226 -134
  631. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  632. package/dist/unstable/cli/Argument.js +101 -65
  633. package/dist/unstable/cli/Argument.js.map +1 -1
  634. package/dist/unstable/cli/CliError.d.ts +72 -26
  635. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  636. package/dist/unstable/cli/CliError.js +86 -23
  637. package/dist/unstable/cli/CliError.js.map +1 -1
  638. package/dist/unstable/cli/CliOutput.d.ts +48 -19
  639. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  640. package/dist/unstable/cli/CliOutput.js +32 -9
  641. package/dist/unstable/cli/CliOutput.js.map +1 -1
  642. package/dist/unstable/cli/Command.d.ts +196 -115
  643. package/dist/unstable/cli/Command.d.ts.map +1 -1
  644. package/dist/unstable/cli/Command.js +45 -31
  645. package/dist/unstable/cli/Command.js.map +1 -1
  646. package/dist/unstable/cli/Completions.d.ts +7 -7
  647. package/dist/unstable/cli/Completions.js +1 -1
  648. package/dist/unstable/cli/Flag.d.ts +235 -142
  649. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  650. package/dist/unstable/cli/Flag.js +111 -71
  651. package/dist/unstable/cli/Flag.js.map +1 -1
  652. package/dist/unstable/cli/GlobalFlag.d.ts +41 -13
  653. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
  654. package/dist/unstable/cli/GlobalFlag.js +30 -7
  655. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  656. package/dist/unstable/cli/HelpDoc.d.ts +39 -14
  657. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  658. package/dist/unstable/cli/HelpDoc.js +21 -0
  659. package/dist/unstable/cli/Param.d.ts +110 -32
  660. package/dist/unstable/cli/Param.d.ts.map +1 -1
  661. package/dist/unstable/cli/Param.js +196 -135
  662. package/dist/unstable/cli/Param.js.map +1 -1
  663. package/dist/unstable/cli/Primitive.d.ts +79 -42
  664. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  665. package/dist/unstable/cli/Primitive.js +66 -35
  666. package/dist/unstable/cli/Primitive.js.map +1 -1
  667. package/dist/unstable/cli/Prompt.d.ts +183 -59
  668. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  669. package/dist/unstable/cli/Prompt.js +105 -23
  670. package/dist/unstable/cli/Prompt.js.map +1 -1
  671. package/dist/unstable/cli/index.d.ts +182 -0
  672. package/dist/unstable/cli/index.d.ts.map +1 -1
  673. package/dist/unstable/cli/index.js +205 -6
  674. package/dist/unstable/cli/index.js.map +1 -1
  675. package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
  676. package/dist/unstable/cli/internal/ansi.js +13 -0
  677. package/dist/unstable/cli/internal/ansi.js.map +1 -1
  678. package/dist/unstable/cli/internal/command.d.ts +5 -1
  679. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  680. package/dist/unstable/cli/internal/command.js +5 -1
  681. package/dist/unstable/cli/internal/command.js.map +1 -1
  682. package/dist/unstable/cli/internal/config.d.ts +3 -0
  683. package/dist/unstable/cli/internal/config.d.ts.map +1 -1
  684. package/dist/unstable/cli/internal/config.js.map +1 -1
  685. package/dist/unstable/cli/internal/lexer.js.map +1 -1
  686. package/dist/unstable/cli/internal/parser.js +0 -1
  687. package/dist/unstable/cli/internal/parser.js.map +1 -1
  688. package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
  689. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  690. package/dist/unstable/cluster/ClusterCron.js +35 -1
  691. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  692. package/dist/unstable/cluster/ClusterError.d.ts +56 -7
  693. package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
  694. package/dist/unstable/cluster/ClusterError.js +56 -7
  695. package/dist/unstable/cluster/ClusterError.js.map +1 -1
  696. package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
  697. package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
  698. package/dist/unstable/cluster/ClusterMetrics.js +39 -5
  699. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  700. package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
  701. package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
  702. package/dist/unstable/cluster/ClusterSchema.js +61 -8
  703. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  704. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
  705. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  706. package/dist/unstable/cluster/ClusterWorkflowEngine.js +35 -2
  707. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  708. package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
  709. package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
  710. package/dist/unstable/cluster/DeliverAt.js +11 -3
  711. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  712. package/dist/unstable/cluster/Entity.d.ts +74 -16
  713. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  714. package/dist/unstable/cluster/Entity.js +75 -10
  715. package/dist/unstable/cluster/Entity.js.map +1 -1
  716. package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
  717. package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
  718. package/dist/unstable/cluster/EntityAddress.js +30 -2
  719. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  720. package/dist/unstable/cluster/EntityId.d.ts +18 -3
  721. package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
  722. package/dist/unstable/cluster/EntityId.js +15 -2
  723. package/dist/unstable/cluster/EntityId.js.map +1 -1
  724. package/dist/unstable/cluster/EntityProxy.d.ts +42 -14
  725. package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
  726. package/dist/unstable/cluster/EntityProxy.js +30 -14
  727. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  728. package/dist/unstable/cluster/EntityProxyServer.d.ts +18 -2
  729. package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
  730. package/dist/unstable/cluster/EntityProxyServer.js +40 -8
  731. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  732. package/dist/unstable/cluster/EntityResource.d.ts +43 -6
  733. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  734. package/dist/unstable/cluster/EntityResource.js +11 -4
  735. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  736. package/dist/unstable/cluster/EntityType.d.ts +27 -3
  737. package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
  738. package/dist/unstable/cluster/EntityType.js +24 -2
  739. package/dist/unstable/cluster/EntityType.js.map +1 -1
  740. package/dist/unstable/cluster/Envelope.d.ts +105 -23
  741. package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
  742. package/dist/unstable/cluster/Envelope.js +88 -14
  743. package/dist/unstable/cluster/Envelope.js.map +1 -1
  744. package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
  745. package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
  746. package/dist/unstable/cluster/HttpRunner.js +88 -13
  747. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  748. package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
  749. package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
  750. package/dist/unstable/cluster/K8sHttpClient.js +31 -6
  751. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  752. package/dist/unstable/cluster/MachineId.d.ts +24 -3
  753. package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
  754. package/dist/unstable/cluster/MachineId.js +21 -2
  755. package/dist/unstable/cluster/MachineId.js.map +1 -1
  756. package/dist/unstable/cluster/Message.d.ts +102 -13
  757. package/dist/unstable/cluster/Message.d.ts.map +1 -1
  758. package/dist/unstable/cluster/Message.js +86 -10
  759. package/dist/unstable/cluster/Message.js.map +1 -1
  760. package/dist/unstable/cluster/MessageStorage.d.ts +126 -21
  761. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  762. package/dist/unstable/cluster/MessageStorage.js +70 -10
  763. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  764. package/dist/unstable/cluster/Reply.d.ts +101 -12
  765. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  766. package/dist/unstable/cluster/Reply.js +64 -8
  767. package/dist/unstable/cluster/Reply.js.map +1 -1
  768. package/dist/unstable/cluster/Runner.d.ts +47 -17
  769. package/dist/unstable/cluster/Runner.d.ts.map +1 -1
  770. package/dist/unstable/cluster/Runner.js +47 -17
  771. package/dist/unstable/cluster/Runner.js.map +1 -1
  772. package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
  773. package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
  774. package/dist/unstable/cluster/RunnerAddress.js +34 -2
  775. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  776. package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
  777. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  778. package/dist/unstable/cluster/RunnerHealth.js +40 -12
  779. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  780. package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
  781. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  782. package/dist/unstable/cluster/RunnerServer.js +31 -4
  783. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  784. package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
  785. package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
  786. package/dist/unstable/cluster/RunnerStorage.js +38 -4
  787. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  788. package/dist/unstable/cluster/Runners.d.ts +76 -13
  789. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  790. package/dist/unstable/cluster/Runners.js +73 -12
  791. package/dist/unstable/cluster/Runners.js.map +1 -1
  792. package/dist/unstable/cluster/ShardId.d.ts +53 -5
  793. package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
  794. package/dist/unstable/cluster/ShardId.js +49 -4
  795. package/dist/unstable/cluster/ShardId.js.map +1 -1
  796. package/dist/unstable/cluster/Sharding.d.ts +10 -2
  797. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  798. package/dist/unstable/cluster/Sharding.js +35 -4
  799. package/dist/unstable/cluster/Sharding.js.map +1 -1
  800. package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
  801. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  802. package/dist/unstable/cluster/ShardingConfig.js +66 -9
  803. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  804. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
  805. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
  806. package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
  807. package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
  808. package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
  809. package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
  810. package/dist/unstable/cluster/SingleRunner.js +23 -1
  811. package/dist/unstable/cluster/SingleRunner.js.map +1 -1
  812. package/dist/unstable/cluster/Singleton.d.ts +15 -1
  813. package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
  814. package/dist/unstable/cluster/Singleton.js +15 -1
  815. package/dist/unstable/cluster/Singleton.js.map +1 -1
  816. package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
  817. package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
  818. package/dist/unstable/cluster/SingletonAddress.js +21 -1
  819. package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
  820. package/dist/unstable/cluster/Snowflake.d.ts +90 -19
  821. package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
  822. package/dist/unstable/cluster/Snowflake.js +49 -13
  823. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  824. package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
  825. package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
  826. package/dist/unstable/cluster/SocketRunner.js +29 -2
  827. package/dist/unstable/cluster/SocketRunner.js.map +1 -1
  828. package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
  829. package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
  830. package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
  831. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  832. package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
  833. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  834. package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
  835. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  836. package/dist/unstable/cluster/TestRunner.d.ts +18 -1
  837. package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
  838. package/dist/unstable/cluster/TestRunner.js +18 -1
  839. package/dist/unstable/cluster/TestRunner.js.map +1 -1
  840. package/dist/unstable/cluster/index.d.ts +790 -0
  841. package/dist/unstable/cluster/index.d.ts.map +1 -1
  842. package/dist/unstable/cluster/index.js +790 -0
  843. package/dist/unstable/cluster/index.js.map +1 -1
  844. package/dist/unstable/cluster/internal/hash.js +12 -0
  845. package/dist/unstable/cluster/internal/hash.js.map +1 -1
  846. package/dist/unstable/devtools/DevTools.d.ts +26 -3
  847. package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
  848. package/dist/unstable/devtools/DevTools.js +26 -3
  849. package/dist/unstable/devtools/DevTools.js.map +1 -1
  850. package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
  851. package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
  852. package/dist/unstable/devtools/DevToolsClient.js +32 -5
  853. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  854. package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
  855. package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
  856. package/dist/unstable/devtools/DevToolsSchema.js +102 -20
  857. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  858. package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
  859. package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
  860. package/dist/unstable/devtools/DevToolsServer.js +21 -1
  861. package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
  862. package/dist/unstable/devtools/index.d.ts +58 -0
  863. package/dist/unstable/devtools/index.d.ts.map +1 -1
  864. package/dist/unstable/devtools/index.js +58 -0
  865. package/dist/unstable/devtools/index.js.map +1 -1
  866. package/dist/unstable/encoding/Msgpack.d.ts +81 -12
  867. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  868. package/dist/unstable/encoding/Msgpack.js +75 -9
  869. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  870. package/dist/unstable/encoding/Ndjson.d.ts +149 -21
  871. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  872. package/dist/unstable/encoding/Ndjson.js +97 -13
  873. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  874. package/dist/unstable/encoding/Sse.d.ts +109 -18
  875. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  876. package/dist/unstable/encoding/Sse.js +69 -13
  877. package/dist/unstable/encoding/Sse.js.map +1 -1
  878. package/dist/unstable/encoding/index.d.ts +49 -0
  879. package/dist/unstable/encoding/index.d.ts.map +1 -1
  880. package/dist/unstable/encoding/index.js +49 -0
  881. package/dist/unstable/encoding/index.js.map +1 -1
  882. package/dist/unstable/eventlog/Event.d.ts +115 -30
  883. package/dist/unstable/eventlog/Event.d.ts.map +1 -1
  884. package/dist/unstable/eventlog/Event.js +22 -2
  885. package/dist/unstable/eventlog/Event.js.map +1 -1
  886. package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
  887. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  888. package/dist/unstable/eventlog/EventGroup.js +24 -6
  889. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  890. package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
  891. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  892. package/dist/unstable/eventlog/EventJournal.js +108 -16
  893. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  894. package/dist/unstable/eventlog/EventLog.d.ts +150 -31
  895. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  896. package/dist/unstable/eventlog/EventLog.js +111 -20
  897. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  898. package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
  899. package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
  900. package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
  901. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  902. package/dist/unstable/eventlog/EventLogMessage.d.ts +92 -18
  903. package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
  904. package/dist/unstable/eventlog/EventLogMessage.js +72 -16
  905. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
  906. package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
  907. package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
  908. package/dist/unstable/eventlog/EventLogRemote.js +54 -8
  909. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  910. package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
  911. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  912. package/dist/unstable/eventlog/EventLogServer.js +17 -3
  913. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  914. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
  915. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  916. package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
  917. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  918. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
  919. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  920. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
  921. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  922. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
  923. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
  924. package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
  925. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
  926. package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
  927. package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
  928. package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
  929. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
  930. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
  931. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
  932. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
  933. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
  934. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
  935. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
  936. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
  937. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
  938. package/dist/unstable/eventlog/index.d.ts +240 -0
  939. package/dist/unstable/eventlog/index.d.ts.map +1 -1
  940. package/dist/unstable/eventlog/index.js +240 -0
  941. package/dist/unstable/eventlog/index.js.map +1 -1
  942. package/dist/unstable/http/Cookies.d.ts +156 -77
  943. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  944. package/dist/unstable/http/Cookies.js +93 -39
  945. package/dist/unstable/http/Cookies.js.map +1 -1
  946. package/dist/unstable/http/Etag.d.ts +40 -7
  947. package/dist/unstable/http/Etag.d.ts.map +1 -1
  948. package/dist/unstable/http/Etag.js +27 -4
  949. package/dist/unstable/http/Etag.js.map +1 -1
  950. package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
  951. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  952. package/dist/unstable/http/FetchHttpClient.js +33 -4
  953. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  954. package/dist/unstable/http/FindMyWay.d.ts +1 -1
  955. package/dist/unstable/http/FindMyWay.js +1 -1
  956. package/dist/unstable/http/Headers.d.ts +182 -36
  957. package/dist/unstable/http/Headers.d.ts.map +1 -1
  958. package/dist/unstable/http/Headers.js +86 -16
  959. package/dist/unstable/http/Headers.js.map +1 -1
  960. package/dist/unstable/http/HttpBody.d.ts +114 -26
  961. package/dist/unstable/http/HttpBody.d.ts.map +1 -1
  962. package/dist/unstable/http/HttpBody.js +98 -20
  963. package/dist/unstable/http/HttpBody.js.map +1 -1
  964. package/dist/unstable/http/HttpClient.d.ts +204 -96
  965. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  966. package/dist/unstable/http/HttpClient.js +85 -38
  967. package/dist/unstable/http/HttpClient.js.map +1 -1
  968. package/dist/unstable/http/HttpClientError.d.ts +68 -12
  969. package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
  970. package/dist/unstable/http/HttpClientError.js +71 -9
  971. package/dist/unstable/http/HttpClientError.js.map +1 -1
  972. package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
  973. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  974. package/dist/unstable/http/HttpClientRequest.js +151 -45
  975. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  976. package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
  977. package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
  978. package/dist/unstable/http/HttpClientResponse.js +44 -11
  979. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  980. package/dist/unstable/http/HttpEffect.d.ts +42 -16
  981. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  982. package/dist/unstable/http/HttpEffect.js +33 -13
  983. package/dist/unstable/http/HttpEffect.js.map +1 -1
  984. package/dist/unstable/http/HttpIncomingMessage.d.ts +48 -7
  985. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  986. package/dist/unstable/http/HttpIncomingMessage.js +45 -6
  987. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  988. package/dist/unstable/http/HttpMethod.d.ts +38 -6
  989. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  990. package/dist/unstable/http/HttpMethod.js +27 -2
  991. package/dist/unstable/http/HttpMethod.js.map +1 -1
  992. package/dist/unstable/http/HttpMiddleware.d.ts +38 -11
  993. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  994. package/dist/unstable/http/HttpMiddleware.js +52 -10
  995. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  996. package/dist/unstable/http/HttpPlatform.d.ts +34 -3
  997. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  998. package/dist/unstable/http/HttpPlatform.js +34 -3
  999. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  1000. package/dist/unstable/http/HttpRouter.d.ts +209 -62
  1001. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  1002. package/dist/unstable/http/HttpRouter.js +136 -41
  1003. package/dist/unstable/http/HttpRouter.js.map +1 -1
  1004. package/dist/unstable/http/HttpServer.d.ts +151 -22
  1005. package/dist/unstable/http/HttpServer.d.ts.map +1 -1
  1006. package/dist/unstable/http/HttpServer.js +76 -11
  1007. package/dist/unstable/http/HttpServer.js.map +1 -1
  1008. package/dist/unstable/http/HttpServerError.d.ts +93 -10
  1009. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  1010. package/dist/unstable/http/HttpServerError.js +85 -8
  1011. package/dist/unstable/http/HttpServerError.js.map +1 -1
  1012. package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
  1013. package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
  1014. package/dist/unstable/http/HttpServerRequest.js +101 -20
  1015. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  1016. package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
  1017. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  1018. package/dist/unstable/http/HttpServerRespondable.js +43 -5
  1019. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  1020. package/dist/unstable/http/HttpServerResponse.d.ts +391 -67
  1021. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  1022. package/dist/unstable/http/HttpServerResponse.js +205 -33
  1023. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  1024. package/dist/unstable/http/HttpStaticServer.d.ts +24 -8
  1025. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
  1026. package/dist/unstable/http/HttpStaticServer.js +24 -8
  1027. package/dist/unstable/http/HttpStaticServer.js.map +1 -1
  1028. package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
  1029. package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
  1030. package/dist/unstable/http/HttpTraceContext.js +47 -5
  1031. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  1032. package/dist/unstable/http/Multipart.d.ts +179 -28
  1033. package/dist/unstable/http/Multipart.d.ts.map +1 -1
  1034. package/dist/unstable/http/Multipart.js +131 -19
  1035. package/dist/unstable/http/Multipart.js.map +1 -1
  1036. package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
  1037. package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
  1038. package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
  1039. package/dist/unstable/http/Multipasta/Node.js +1 -1
  1040. package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
  1041. package/dist/unstable/http/Multipasta/Search.js +1 -1
  1042. package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
  1043. package/dist/unstable/http/Multipasta/Web.js +1 -1
  1044. package/dist/unstable/http/Multipasta.d.ts +1 -1
  1045. package/dist/unstable/http/Multipasta.js +1 -1
  1046. package/dist/unstable/http/Template.d.ts +53 -1
  1047. package/dist/unstable/http/Template.d.ts.map +1 -1
  1048. package/dist/unstable/http/Template.js +26 -0
  1049. package/dist/unstable/http/Template.js.map +1 -1
  1050. package/dist/unstable/http/Url.d.ts +70 -56
  1051. package/dist/unstable/http/Url.d.ts.map +1 -1
  1052. package/dist/unstable/http/Url.js +35 -21
  1053. package/dist/unstable/http/Url.js.map +1 -1
  1054. package/dist/unstable/http/UrlParams.d.ts +237 -51
  1055. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  1056. package/dist/unstable/http/UrlParams.js +120 -25
  1057. package/dist/unstable/http/UrlParams.js.map +1 -1
  1058. package/dist/unstable/http/index.d.ts +452 -0
  1059. package/dist/unstable/http/index.d.ts.map +1 -1
  1060. package/dist/unstable/http/index.js +452 -0
  1061. package/dist/unstable/http/index.js.map +1 -1
  1062. package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
  1063. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  1064. package/dist/unstable/httpapi/HttpApi.js +14 -8
  1065. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  1066. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +54 -16
  1067. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  1068. package/dist/unstable/httpapi/HttpApiBuilder.js +44 -6
  1069. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  1070. package/dist/unstable/httpapi/HttpApiClient.d.ts +57 -15
  1071. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  1072. package/dist/unstable/httpapi/HttpApiClient.js +42 -6
  1073. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  1074. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
  1075. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  1076. package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
  1077. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  1078. package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
  1079. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  1080. package/dist/unstable/httpapi/HttpApiError.js +98 -1
  1081. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  1082. package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
  1083. package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
  1084. package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
  1085. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  1086. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +113 -22
  1087. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  1088. package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -5
  1089. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  1090. package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
  1091. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  1092. package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
  1093. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  1094. package/dist/unstable/httpapi/HttpApiSchema.d.ts +86 -38
  1095. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  1096. package/dist/unstable/httpapi/HttpApiSchema.js +59 -35
  1097. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  1098. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +73 -17
  1099. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  1100. package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
  1101. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  1102. package/dist/unstable/httpapi/HttpApiSwagger.d.ts +4 -3
  1103. package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
  1104. package/dist/unstable/httpapi/HttpApiSwagger.js +23 -3
  1105. package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
  1106. package/dist/unstable/httpapi/HttpApiTest.d.ts +6 -1
  1107. package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
  1108. package/dist/unstable/httpapi/HttpApiTest.js +26 -1
  1109. package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
  1110. package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
  1111. package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
  1112. package/dist/unstable/httpapi/OpenApi.js +73 -15
  1113. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  1114. package/dist/unstable/httpapi/index.d.ts +310 -25
  1115. package/dist/unstable/httpapi/index.d.ts.map +1 -1
  1116. package/dist/unstable/httpapi/index.js +310 -25
  1117. package/dist/unstable/httpapi/index.js.map +1 -1
  1118. package/dist/unstable/observability/Otlp.d.ts +33 -3
  1119. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  1120. package/dist/unstable/observability/Otlp.js +14 -3
  1121. package/dist/unstable/observability/Otlp.js.map +1 -1
  1122. package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
  1123. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  1124. package/dist/unstable/observability/OtlpExporter.js +32 -1
  1125. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  1126. package/dist/unstable/observability/OtlpLogger.d.ts +15 -2
  1127. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  1128. package/dist/unstable/observability/OtlpLogger.js +29 -2
  1129. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  1130. package/dist/unstable/observability/OtlpMetrics.d.ts +17 -5
  1131. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  1132. package/dist/unstable/observability/OtlpMetrics.js +32 -2
  1133. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  1134. package/dist/unstable/observability/OtlpResource.d.ts +49 -12
  1135. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  1136. package/dist/unstable/observability/OtlpResource.js +47 -5
  1137. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  1138. package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
  1139. package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
  1140. package/dist/unstable/observability/OtlpSerialization.js +28 -3
  1141. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  1142. package/dist/unstable/observability/OtlpTracer.d.ts +19 -2
  1143. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  1144. package/dist/unstable/observability/OtlpTracer.js +32 -2
  1145. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  1146. package/dist/unstable/observability/PrometheusMetrics.d.ts +36 -16
  1147. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  1148. package/dist/unstable/observability/PrometheusMetrics.js +9 -7
  1149. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  1150. package/dist/unstable/observability/index.d.ts +160 -3
  1151. package/dist/unstable/observability/index.d.ts.map +1 -1
  1152. package/dist/unstable/observability/index.js +160 -3
  1153. package/dist/unstable/observability/index.js.map +1 -1
  1154. package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
  1155. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  1156. package/dist/unstable/persistence/KeyValueStore.js +81 -21
  1157. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  1158. package/dist/unstable/persistence/Persistable.d.ts +76 -15
  1159. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  1160. package/dist/unstable/persistence/Persistable.js +22 -5
  1161. package/dist/unstable/persistence/Persistable.js.map +1 -1
  1162. package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
  1163. package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
  1164. package/dist/unstable/persistence/PersistedCache.js +24 -1
  1165. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  1166. package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
  1167. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  1168. package/dist/unstable/persistence/PersistedQueue.js +60 -13
  1169. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  1170. package/dist/unstable/persistence/Persistence.d.ts +98 -16
  1171. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  1172. package/dist/unstable/persistence/Persistence.js +91 -14
  1173. package/dist/unstable/persistence/Persistence.js.map +1 -1
  1174. package/dist/unstable/persistence/RateLimiter.d.ts +101 -21
  1175. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  1176. package/dist/unstable/persistence/RateLimiter.js +85 -16
  1177. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  1178. package/dist/unstable/persistence/Redis.d.ts +26 -5
  1179. package/dist/unstable/persistence/Redis.d.ts.map +1 -1
  1180. package/dist/unstable/persistence/Redis.js +36 -4
  1181. package/dist/unstable/persistence/Redis.js.map +1 -1
  1182. package/dist/unstable/persistence/index.d.ts +147 -0
  1183. package/dist/unstable/persistence/index.d.ts.map +1 -1
  1184. package/dist/unstable/persistence/index.js +147 -0
  1185. package/dist/unstable/persistence/index.js.map +1 -1
  1186. package/dist/unstable/process/ChildProcess.d.ts +87 -64
  1187. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  1188. package/dist/unstable/process/ChildProcess.js +25 -18
  1189. package/dist/unstable/process/ChildProcess.js.map +1 -1
  1190. package/dist/unstable/process/ChildProcessSpawner.d.ts +23 -12
  1191. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  1192. package/dist/unstable/process/ChildProcessSpawner.js +11 -6
  1193. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  1194. package/dist/unstable/process/index.d.ts +2 -1
  1195. package/dist/unstable/process/index.d.ts.map +1 -1
  1196. package/dist/unstable/process/index.js +2 -1
  1197. package/dist/unstable/process/index.js.map +1 -1
  1198. package/dist/unstable/reactivity/AsyncResult.d.ts +198 -59
  1199. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  1200. package/dist/unstable/reactivity/AsyncResult.js +121 -36
  1201. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  1202. package/dist/unstable/reactivity/Atom.d.ts +544 -130
  1203. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1204. package/dist/unstable/reactivity/Atom.js +252 -58
  1205. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1206. package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
  1207. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1208. package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
  1209. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1210. package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
  1211. package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
  1212. package/dist/unstable/reactivity/AtomRef.js +29 -3
  1213. package/dist/unstable/reactivity/AtomRef.js.map +1 -1
  1214. package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
  1215. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  1216. package/dist/unstable/reactivity/AtomRegistry.js +69 -10
  1217. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1218. package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
  1219. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1220. package/dist/unstable/reactivity/AtomRpc.js +29 -1
  1221. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1222. package/dist/unstable/reactivity/Hydration.d.ts +28 -5
  1223. package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
  1224. package/dist/unstable/reactivity/Hydration.js +35 -3
  1225. package/dist/unstable/reactivity/Hydration.js.map +1 -1
  1226. package/dist/unstable/reactivity/Reactivity.d.ts +94 -13
  1227. package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
  1228. package/dist/unstable/reactivity/Reactivity.js +60 -7
  1229. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1230. package/dist/unstable/reactivity/index.d.ts +167 -0
  1231. package/dist/unstable/reactivity/index.d.ts.map +1 -1
  1232. package/dist/unstable/reactivity/index.js +167 -0
  1233. package/dist/unstable/reactivity/index.js.map +1 -1
  1234. package/dist/unstable/rpc/Rpc.d.ts +254 -56
  1235. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1236. package/dist/unstable/rpc/Rpc.js +44 -11
  1237. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1238. package/dist/unstable/rpc/RpcClient.d.ts +80 -19
  1239. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1240. package/dist/unstable/rpc/RpcClient.js +52 -12
  1241. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1242. package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
  1243. package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
  1244. package/dist/unstable/rpc/RpcClientError.js +26 -2
  1245. package/dist/unstable/rpc/RpcClientError.js.map +1 -1
  1246. package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
  1247. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  1248. package/dist/unstable/rpc/RpcGroup.js +3 -1
  1249. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1250. package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
  1251. package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
  1252. package/dist/unstable/rpc/RpcMessage.js +23 -7
  1253. package/dist/unstable/rpc/RpcMessage.js.map +1 -1
  1254. package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
  1255. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  1256. package/dist/unstable/rpc/RpcMiddleware.js +39 -3
  1257. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1258. package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
  1259. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  1260. package/dist/unstable/rpc/RpcSchema.js +34 -3
  1261. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1262. package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
  1263. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1264. package/dist/unstable/rpc/RpcSerialization.js +56 -12
  1265. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1266. package/dist/unstable/rpc/RpcServer.d.ts +73 -23
  1267. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  1268. package/dist/unstable/rpc/RpcServer.js +69 -22
  1269. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1270. package/dist/unstable/rpc/RpcTest.d.ts +20 -1
  1271. package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
  1272. package/dist/unstable/rpc/RpcTest.js +20 -1
  1273. package/dist/unstable/rpc/RpcTest.js.map +1 -1
  1274. package/dist/unstable/rpc/RpcWorker.d.ts +39 -6
  1275. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  1276. package/dist/unstable/rpc/RpcWorker.js +16 -4
  1277. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1278. package/dist/unstable/rpc/Utils.d.ts +10 -0
  1279. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  1280. package/dist/unstable/rpc/Utils.js +10 -0
  1281. package/dist/unstable/rpc/Utils.js.map +1 -1
  1282. package/dist/unstable/rpc/index.d.ts +272 -0
  1283. package/dist/unstable/rpc/index.d.ts.map +1 -1
  1284. package/dist/unstable/rpc/index.js +272 -0
  1285. package/dist/unstable/rpc/index.js.map +1 -1
  1286. package/dist/unstable/schema/Model.d.ts +192 -59
  1287. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1288. package/dist/unstable/schema/Model.js +122 -38
  1289. package/dist/unstable/schema/Model.js.map +1 -1
  1290. package/dist/unstable/schema/VariantSchema.d.ts +101 -24
  1291. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  1292. package/dist/unstable/schema/VariantSchema.js +22 -6
  1293. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1294. package/dist/unstable/schema/index.d.ts +37 -0
  1295. package/dist/unstable/schema/index.d.ts.map +1 -1
  1296. package/dist/unstable/schema/index.js +37 -0
  1297. package/dist/unstable/schema/index.js.map +1 -1
  1298. package/dist/unstable/socket/Socket.d.ts +168 -34
  1299. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1300. package/dist/unstable/socket/Socket.js +124 -28
  1301. package/dist/unstable/socket/Socket.js.map +1 -1
  1302. package/dist/unstable/socket/SocketServer.d.ts +58 -10
  1303. package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
  1304. package/dist/unstable/socket/SocketServer.js +43 -5
  1305. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1306. package/dist/unstable/socket/index.d.ts +44 -0
  1307. package/dist/unstable/socket/index.d.ts.map +1 -1
  1308. package/dist/unstable/socket/index.js +44 -0
  1309. package/dist/unstable/socket/index.js.map +1 -1
  1310. package/dist/unstable/sql/Migrator.d.ts +40 -9
  1311. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  1312. package/dist/unstable/sql/Migrator.js +45 -5
  1313. package/dist/unstable/sql/Migrator.js.map +1 -1
  1314. package/dist/unstable/sql/SqlClient.d.ts +38 -2
  1315. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1316. package/dist/unstable/sql/SqlClient.js +40 -1
  1317. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1318. package/dist/unstable/sql/SqlConnection.d.ts +34 -3
  1319. package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
  1320. package/dist/unstable/sql/SqlConnection.js +22 -0
  1321. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1322. package/dist/unstable/sql/SqlError.d.ts +117 -0
  1323. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  1324. package/dist/unstable/sql/SqlError.js +131 -0
  1325. package/dist/unstable/sql/SqlError.js.map +1 -1
  1326. package/dist/unstable/sql/SqlModel.d.ts +25 -5
  1327. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  1328. package/dist/unstable/sql/SqlModel.js +8 -4
  1329. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1330. package/dist/unstable/sql/SqlResolver.d.ts +56 -13
  1331. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  1332. package/dist/unstable/sql/SqlResolver.js +44 -10
  1333. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1334. package/dist/unstable/sql/SqlSchema.d.ts +29 -8
  1335. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  1336. package/dist/unstable/sql/SqlSchema.js +29 -8
  1337. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1338. package/dist/unstable/sql/SqlStream.d.ts +4 -0
  1339. package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
  1340. package/dist/unstable/sql/SqlStream.js +24 -0
  1341. package/dist/unstable/sql/SqlStream.js.map +1 -1
  1342. package/dist/unstable/sql/Statement.d.ts +151 -24
  1343. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  1344. package/dist/unstable/sql/Statement.js +91 -6
  1345. package/dist/unstable/sql/Statement.js.map +1 -1
  1346. package/dist/unstable/sql/index.d.ts +179 -1
  1347. package/dist/unstable/sql/index.d.ts.map +1 -1
  1348. package/dist/unstable/sql/index.js +179 -1
  1349. package/dist/unstable/sql/index.js.map +1 -1
  1350. package/dist/unstable/workers/Transferable.d.ts +72 -20
  1351. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  1352. package/dist/unstable/workers/Transferable.js +57 -14
  1353. package/dist/unstable/workers/Transferable.js.map +1 -1
  1354. package/dist/unstable/workers/Worker.d.ts +61 -8
  1355. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  1356. package/dist/unstable/workers/Worker.js +44 -4
  1357. package/dist/unstable/workers/Worker.js.map +1 -1
  1358. package/dist/unstable/workers/WorkerError.d.ts +31 -9
  1359. package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
  1360. package/dist/unstable/workers/WorkerError.js +44 -7
  1361. package/dist/unstable/workers/WorkerError.js.map +1 -1
  1362. package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
  1363. package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
  1364. package/dist/unstable/workers/WorkerRunner.js +24 -1
  1365. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1366. package/dist/unstable/workers/index.d.ts +81 -1
  1367. package/dist/unstable/workers/index.d.ts.map +1 -1
  1368. package/dist/unstable/workers/index.js +81 -1
  1369. package/dist/unstable/workers/index.js.map +1 -1
  1370. package/dist/unstable/workflow/Activity.d.ts +61 -10
  1371. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  1372. package/dist/unstable/workflow/Activity.js +20 -5
  1373. package/dist/unstable/workflow/Activity.js.map +1 -1
  1374. package/dist/unstable/workflow/DurableClock.d.ts +12 -3
  1375. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  1376. package/dist/unstable/workflow/DurableClock.js +22 -2
  1377. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1378. package/dist/unstable/workflow/DurableDeferred.d.ts +128 -31
  1379. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  1380. package/dist/unstable/workflow/DurableDeferred.js +77 -13
  1381. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1382. package/dist/unstable/workflow/DurableQueue.d.ts +33 -8
  1383. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  1384. package/dist/unstable/workflow/DurableQueue.js +26 -6
  1385. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  1386. package/dist/unstable/workflow/Workflow.d.ts +102 -31
  1387. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1388. package/dist/unstable/workflow/Workflow.js +75 -19
  1389. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1390. package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
  1391. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  1392. package/dist/unstable/workflow/WorkflowEngine.js +16 -4
  1393. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1394. package/dist/unstable/workflow/WorkflowProxy.d.ts +40 -12
  1395. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  1396. package/dist/unstable/workflow/WorkflowProxy.js +8 -12
  1397. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  1398. package/dist/unstable/workflow/WorkflowProxyServer.d.ts +37 -2
  1399. package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
  1400. package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
  1401. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1402. package/dist/unstable/workflow/index.d.ts +160 -0
  1403. package/dist/unstable/workflow/index.d.ts.map +1 -1
  1404. package/dist/unstable/workflow/index.js +160 -0
  1405. package/dist/unstable/workflow/index.js.map +1 -1
  1406. package/package.json +11 -11
  1407. package/src/Array.ts +151 -106
  1408. package/src/BigDecimal.ts +620 -553
  1409. package/src/BigInt.ts +342 -274
  1410. package/src/Boolean.ts +189 -156
  1411. package/src/Brand.ts +30 -5
  1412. package/src/Cache.ts +334 -167
  1413. package/src/Cause.ts +84 -73
  1414. package/src/Channel.ts +1639 -667
  1415. package/src/ChannelSchema.ts +137 -12
  1416. package/src/Chunk.ts +575 -429
  1417. package/src/Clock.ts +16 -9
  1418. package/src/Combiner.ts +11 -5
  1419. package/src/Config.ts +80 -68
  1420. package/src/ConfigProvider.ts +33 -32
  1421. package/src/Console.ts +88 -58
  1422. package/src/Context.ts +401 -190
  1423. package/src/Cron.ts +109 -48
  1424. package/src/Crypto.ts +327 -0
  1425. package/src/Data.ts +9 -3
  1426. package/src/DateTime.ts +893 -464
  1427. package/src/Deferred.ts +367 -175
  1428. package/src/Differ.ts +44 -2
  1429. package/src/Duration.ts +333 -186
  1430. package/src/Effect.ts +2201 -2289
  1431. package/src/Effectable.ts +38 -3
  1432. package/src/Encoding.ts +78 -28
  1433. package/src/Equal.ts +4 -3
  1434. package/src/Equivalence.ts +18 -24
  1435. package/src/ErrorReporter.ts +66 -82
  1436. package/src/ExecutionPlan.ts +106 -12
  1437. package/src/Exit.ts +6 -5
  1438. package/src/Fiber.ts +71 -40
  1439. package/src/FiberHandle.ts +157 -57
  1440. package/src/FiberMap.ts +328 -163
  1441. package/src/FiberSet.ts +130 -52
  1442. package/src/FileSystem.ts +104 -74
  1443. package/src/Filter.ts +166 -88
  1444. package/src/Formatter.ts +4 -70
  1445. package/src/Function.ts +218 -151
  1446. package/src/Graph.ts +714 -415
  1447. package/src/HKT.ts +29 -13
  1448. package/src/Hash.ts +35 -24
  1449. package/src/HashMap.ts +540 -388
  1450. package/src/HashRing.ts +111 -34
  1451. package/src/HashSet.ts +239 -153
  1452. package/src/Inspectable.ts +30 -17
  1453. package/src/Iterable.ts +336 -222
  1454. package/src/JsonPatch.ts +13 -10
  1455. package/src/JsonPointer.ts +13 -11
  1456. package/src/JsonSchema.ts +16 -0
  1457. package/src/Latch.ts +97 -26
  1458. package/src/Layer.ts +547 -445
  1459. package/src/LayerMap.ts +99 -26
  1460. package/src/LogLevel.ts +92 -131
  1461. package/src/Logger.ts +365 -297
  1462. package/src/ManagedRuntime.ts +78 -19
  1463. package/src/Match.ts +135 -161
  1464. package/src/Metric.ts +362 -313
  1465. package/src/MutableHashMap.ts +202 -127
  1466. package/src/MutableHashSet.ts +120 -52
  1467. package/src/MutableList.ts +157 -100
  1468. package/src/MutableRef.ts +129 -90
  1469. package/src/Newtype.ts +15 -2
  1470. package/src/NonEmptyIterable.ts +38 -48
  1471. package/src/Number.ts +261 -205
  1472. package/src/Optic.ts +6 -7
  1473. package/src/Option.ts +133 -156
  1474. package/src/Order.ts +6 -6
  1475. package/src/Ordering.ts +56 -45
  1476. package/src/PartitionedSemaphore.ts +225 -40
  1477. package/src/Path.ts +77 -13
  1478. package/src/Pipeable.ts +82 -24
  1479. package/src/PlatformError.ts +74 -6
  1480. package/src/Pool.ts +94 -31
  1481. package/src/Predicate.ts +17 -24
  1482. package/src/PrimaryKey.ts +11 -3
  1483. package/src/PubSub.ts +385 -309
  1484. package/src/Pull.ts +94 -25
  1485. package/src/Queue.ts +303 -184
  1486. package/src/Random.ts +69 -93
  1487. package/src/RcMap.ts +151 -141
  1488. package/src/RcRef.ts +68 -32
  1489. package/src/Record.ts +282 -137
  1490. package/src/Redactable.ts +7 -5
  1491. package/src/Redacted.ts +63 -34
  1492. package/src/Reducer.ts +3 -1
  1493. package/src/Ref.ts +173 -134
  1494. package/src/References.ts +73 -31
  1495. package/src/RegExp.ts +12 -6
  1496. package/src/Request.ts +159 -34
  1497. package/src/RequestResolver.ts +278 -121
  1498. package/src/Resource.ts +45 -7
  1499. package/src/Result.ts +137 -153
  1500. package/src/Runtime.ts +42 -21
  1501. package/src/Schedule.ts +585 -613
  1502. package/src/Scheduler.ts +44 -7
  1503. package/src/Schema.ts +1309 -615
  1504. package/src/SchemaAST.ts +123 -93
  1505. package/src/SchemaGetter.ts +52 -37
  1506. package/src/SchemaIssue.ts +19 -24
  1507. package/src/SchemaParser.ts +306 -85
  1508. package/src/SchemaRepresentation.ts +89 -77
  1509. package/src/SchemaTransformation.ts +97 -46
  1510. package/src/SchemaUtils.ts +24 -1
  1511. package/src/Scope.ts +107 -65
  1512. package/src/ScopedCache.ts +195 -59
  1513. package/src/ScopedRef.ts +28 -8
  1514. package/src/Semaphore.ts +61 -37
  1515. package/src/Sink.ts +461 -206
  1516. package/src/Stdio.ts +43 -6
  1517. package/src/Stream.ts +2361 -1613
  1518. package/src/String.ts +174 -97
  1519. package/src/Struct.ts +20 -18
  1520. package/src/SubscriptionRef.ts +309 -204
  1521. package/src/Symbol.ts +13 -5
  1522. package/src/SynchronizedRef.ts +278 -62
  1523. package/src/Take.ts +26 -2
  1524. package/src/Terminal.ts +40 -7
  1525. package/src/Tracer.ts +233 -59
  1526. package/src/Trie.ts +280 -245
  1527. package/src/Tuple.ts +34 -32
  1528. package/src/TxChunk.ts +200 -155
  1529. package/src/TxDeferred.ts +43 -29
  1530. package/src/TxHashMap.ts +370 -231
  1531. package/src/TxHashSet.ts +253 -159
  1532. package/src/TxPriorityQueue.ts +97 -65
  1533. package/src/TxPubSub.ts +77 -49
  1534. package/src/TxQueue.ts +277 -242
  1535. package/src/TxReentrantLock.ts +70 -47
  1536. package/src/TxRef.ts +69 -40
  1537. package/src/TxSemaphore.ts +101 -115
  1538. package/src/TxSubscriptionRef.ts +74 -50
  1539. package/src/Types.ts +31 -34
  1540. package/src/UndefinedOr.ts +62 -25
  1541. package/src/Unify.ts +72 -117
  1542. package/src/Utils.ts +5 -2
  1543. package/src/index.ts +1976 -420
  1544. package/src/internal/schema/schema.ts +1 -1
  1545. package/src/testing/FastCheck.ts +9 -6
  1546. package/src/testing/TestClock.ts +63 -35
  1547. package/src/testing/TestConsole.ts +54 -36
  1548. package/src/testing/TestSchema.ts +10 -8
  1549. package/src/testing/index.ts +34 -0
  1550. package/src/unstable/ai/AiError.ts +195 -137
  1551. package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
  1552. package/src/unstable/ai/Chat.ts +68 -43
  1553. package/src/unstable/ai/EmbeddingModel.ts +12 -11
  1554. package/src/unstable/ai/IdGenerator.ts +28 -18
  1555. package/src/unstable/ai/LanguageModel.ts +35 -27
  1556. package/src/unstable/ai/McpSchema.ts +342 -119
  1557. package/src/unstable/ai/McpServer.ts +79 -20
  1558. package/src/unstable/ai/Model.ts +10 -12
  1559. package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
  1560. package/src/unstable/ai/Prompt.ts +216 -192
  1561. package/src/unstable/ai/Response.ts +179 -167
  1562. package/src/unstable/ai/ResponseIdTracker.ts +43 -4
  1563. package/src/unstable/ai/Telemetry.ts +43 -33
  1564. package/src/unstable/ai/Tokenizer.ts +14 -9
  1565. package/src/unstable/ai/Tool.ts +168 -97
  1566. package/src/unstable/ai/Toolkit.ts +51 -46
  1567. package/src/unstable/ai/index.ts +121 -29
  1568. package/src/unstable/cli/Argument.ts +226 -134
  1569. package/src/unstable/cli/CliError.ts +96 -26
  1570. package/src/unstable/cli/CliOutput.ts +48 -19
  1571. package/src/unstable/cli/Command.ts +196 -115
  1572. package/src/unstable/cli/Completions.ts +7 -7
  1573. package/src/unstable/cli/Flag.ts +235 -142
  1574. package/src/unstable/cli/GlobalFlag.ts +41 -13
  1575. package/src/unstable/cli/HelpDoc.ts +39 -14
  1576. package/src/unstable/cli/Param.ts +395 -260
  1577. package/src/unstable/cli/Primitive.ts +79 -42
  1578. package/src/unstable/cli/Prompt.ts +207 -59
  1579. package/src/unstable/cli/index.ts +205 -6
  1580. package/src/unstable/cli/internal/ansi.ts +13 -0
  1581. package/src/unstable/cli/internal/command.ts +5 -1
  1582. package/src/unstable/cli/internal/config.ts +3 -0
  1583. package/src/unstable/cli/internal/lexer.ts +11 -0
  1584. package/src/unstable/cli/internal/parser.ts +0 -1
  1585. package/src/unstable/cluster/ClusterCron.ts +35 -1
  1586. package/src/unstable/cluster/ClusterError.ts +56 -7
  1587. package/src/unstable/cluster/ClusterMetrics.ts +39 -5
  1588. package/src/unstable/cluster/ClusterSchema.ts +61 -8
  1589. package/src/unstable/cluster/ClusterWorkflowEngine.ts +35 -2
  1590. package/src/unstable/cluster/DeliverAt.ts +39 -4
  1591. package/src/unstable/cluster/Entity.ts +106 -16
  1592. package/src/unstable/cluster/EntityAddress.ts +30 -2
  1593. package/src/unstable/cluster/EntityId.ts +18 -3
  1594. package/src/unstable/cluster/EntityProxy.ts +42 -14
  1595. package/src/unstable/cluster/EntityProxyServer.ts +45 -8
  1596. package/src/unstable/cluster/EntityResource.ts +43 -6
  1597. package/src/unstable/cluster/EntityType.ts +27 -3
  1598. package/src/unstable/cluster/Envelope.ts +128 -23
  1599. package/src/unstable/cluster/HttpRunner.ts +88 -13
  1600. package/src/unstable/cluster/K8sHttpClient.ts +49 -6
  1601. package/src/unstable/cluster/MachineId.ts +24 -3
  1602. package/src/unstable/cluster/Message.ts +102 -13
  1603. package/src/unstable/cluster/MessageStorage.ts +126 -21
  1604. package/src/unstable/cluster/Reply.ts +101 -12
  1605. package/src/unstable/cluster/Runner.ts +47 -17
  1606. package/src/unstable/cluster/RunnerAddress.ts +34 -2
  1607. package/src/unstable/cluster/RunnerHealth.ts +40 -12
  1608. package/src/unstable/cluster/RunnerServer.ts +31 -4
  1609. package/src/unstable/cluster/RunnerStorage.ts +42 -5
  1610. package/src/unstable/cluster/Runners.ts +76 -13
  1611. package/src/unstable/cluster/ShardId.ts +53 -5
  1612. package/src/unstable/cluster/Sharding.ts +35 -4
  1613. package/src/unstable/cluster/ShardingConfig.ts +75 -10
  1614. package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
  1615. package/src/unstable/cluster/SingleRunner.ts +23 -1
  1616. package/src/unstable/cluster/Singleton.ts +15 -1
  1617. package/src/unstable/cluster/SingletonAddress.ts +21 -1
  1618. package/src/unstable/cluster/Snowflake.ts +90 -19
  1619. package/src/unstable/cluster/SocketRunner.ts +29 -2
  1620. package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
  1621. package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
  1622. package/src/unstable/cluster/TestRunner.ts +18 -1
  1623. package/src/unstable/cluster/index.ts +790 -0
  1624. package/src/unstable/cluster/internal/hash.ts +12 -0
  1625. package/src/unstable/devtools/DevTools.ts +26 -3
  1626. package/src/unstable/devtools/DevToolsClient.ts +32 -5
  1627. package/src/unstable/devtools/DevToolsSchema.ts +201 -44
  1628. package/src/unstable/devtools/DevToolsServer.ts +27 -2
  1629. package/src/unstable/devtools/index.ts +58 -0
  1630. package/src/unstable/encoding/Msgpack.ts +97 -12
  1631. package/src/unstable/encoding/Ndjson.ts +149 -21
  1632. package/src/unstable/encoding/Sse.ts +109 -18
  1633. package/src/unstable/encoding/index.ts +49 -0
  1634. package/src/unstable/eventlog/Event.ts +131 -30
  1635. package/src/unstable/eventlog/EventGroup.ts +50 -17
  1636. package/src/unstable/eventlog/EventJournal.ts +120 -20
  1637. package/src/unstable/eventlog/EventLog.ts +150 -31
  1638. package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
  1639. package/src/unstable/eventlog/EventLogMessage.ts +92 -18
  1640. package/src/unstable/eventlog/EventLogRemote.ts +54 -8
  1641. package/src/unstable/eventlog/EventLogServer.ts +33 -3
  1642. package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
  1643. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
  1644. package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
  1645. package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
  1646. package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
  1647. package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
  1648. package/src/unstable/eventlog/index.ts +240 -0
  1649. package/src/unstable/http/Cookies.ts +156 -77
  1650. package/src/unstable/http/Etag.ts +40 -7
  1651. package/src/unstable/http/FetchHttpClient.ts +33 -4
  1652. package/src/unstable/http/FindMyWay.ts +1 -1
  1653. package/src/unstable/http/Headers.ts +252 -50
  1654. package/src/unstable/http/HttpBody.ts +128 -26
  1655. package/src/unstable/http/HttpClient.ts +204 -96
  1656. package/src/unstable/http/HttpClientError.ts +80 -12
  1657. package/src/unstable/http/HttpClientRequest.ts +318 -100
  1658. package/src/unstable/http/HttpClientResponse.ts +59 -16
  1659. package/src/unstable/http/HttpEffect.ts +66 -18
  1660. package/src/unstable/http/HttpIncomingMessage.ts +48 -7
  1661. package/src/unstable/http/HttpMethod.ts +38 -6
  1662. package/src/unstable/http/HttpMiddleware.ts +60 -11
  1663. package/src/unstable/http/HttpPlatform.ts +34 -3
  1664. package/src/unstable/http/HttpRouter.ts +232 -69
  1665. package/src/unstable/http/HttpServer.ts +151 -22
  1666. package/src/unstable/http/HttpServerError.ts +93 -10
  1667. package/src/unstable/http/HttpServerRequest.ts +125 -21
  1668. package/src/unstable/http/HttpServerRespondable.ts +49 -6
  1669. package/src/unstable/http/HttpServerResponse.ts +391 -67
  1670. package/src/unstable/http/HttpStaticServer.ts +24 -8
  1671. package/src/unstable/http/HttpTraceContext.ts +53 -6
  1672. package/src/unstable/http/Multipart.ts +179 -28
  1673. package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
  1674. package/src/unstable/http/Multipasta/Node.ts +1 -1
  1675. package/src/unstable/http/Multipasta/Search.ts +1 -1
  1676. package/src/unstable/http/Multipasta/Web.ts +1 -1
  1677. package/src/unstable/http/Multipasta.ts +1 -1
  1678. package/src/unstable/http/Template.ts +53 -1
  1679. package/src/unstable/http/Url.ts +70 -56
  1680. package/src/unstable/http/UrlParams.ts +237 -51
  1681. package/src/unstable/http/index.ts +452 -0
  1682. package/src/unstable/httpapi/HttpApi.ts +49 -14
  1683. package/src/unstable/httpapi/HttpApiBuilder.ts +81 -16
  1684. package/src/unstable/httpapi/HttpApiClient.ts +78 -15
  1685. package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
  1686. package/src/unstable/httpapi/HttpApiError.ts +100 -1
  1687. package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
  1688. package/src/unstable/httpapi/HttpApiMiddleware.ts +113 -22
  1689. package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
  1690. package/src/unstable/httpapi/HttpApiSchema.ts +86 -38
  1691. package/src/unstable/httpapi/HttpApiSecurity.ts +73 -17
  1692. package/src/unstable/httpapi/HttpApiSwagger.ts +23 -3
  1693. package/src/unstable/httpapi/HttpApiTest.ts +26 -1
  1694. package/src/unstable/httpapi/OpenApi.ts +115 -15
  1695. package/src/unstable/httpapi/index.ts +310 -25
  1696. package/src/unstable/observability/Otlp.ts +33 -3
  1697. package/src/unstable/observability/OtlpExporter.ts +32 -1
  1698. package/src/unstable/observability/OtlpLogger.ts +32 -2
  1699. package/src/unstable/observability/OtlpMetrics.ts +39 -5
  1700. package/src/unstable/observability/OtlpResource.ts +68 -12
  1701. package/src/unstable/observability/OtlpSerialization.ts +28 -3
  1702. package/src/unstable/observability/OtlpTracer.ts +41 -2
  1703. package/src/unstable/observability/PrometheusMetrics.ts +36 -16
  1704. package/src/unstable/observability/index.ts +160 -3
  1705. package/src/unstable/persistence/KeyValueStore.ts +108 -28
  1706. package/src/unstable/persistence/Persistable.ts +76 -15
  1707. package/src/unstable/persistence/PersistedCache.ts +27 -2
  1708. package/src/unstable/persistence/PersistedQueue.ts +98 -16
  1709. package/src/unstable/persistence/Persistence.ts +98 -16
  1710. package/src/unstable/persistence/RateLimiter.ts +101 -21
  1711. package/src/unstable/persistence/Redis.ts +42 -5
  1712. package/src/unstable/persistence/index.ts +147 -0
  1713. package/src/unstable/process/ChildProcess.ts +90 -66
  1714. package/src/unstable/process/ChildProcessSpawner.ts +23 -12
  1715. package/src/unstable/process/index.ts +2 -1
  1716. package/src/unstable/reactivity/AsyncResult.ts +204 -61
  1717. package/src/unstable/reactivity/Atom.ts +598 -139
  1718. package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
  1719. package/src/unstable/reactivity/AtomRef.ts +51 -7
  1720. package/src/unstable/reactivity/AtomRegistry.ts +141 -22
  1721. package/src/unstable/reactivity/AtomRpc.ts +36 -2
  1722. package/src/unstable/reactivity/Hydration.ts +45 -5
  1723. package/src/unstable/reactivity/Reactivity.ts +94 -13
  1724. package/src/unstable/reactivity/index.ts +167 -0
  1725. package/src/unstable/rpc/Rpc.ts +254 -56
  1726. package/src/unstable/rpc/RpcClient.ts +106 -19
  1727. package/src/unstable/rpc/RpcClientError.ts +26 -2
  1728. package/src/unstable/rpc/RpcGroup.ts +51 -8
  1729. package/src/unstable/rpc/RpcMessage.ts +128 -32
  1730. package/src/unstable/rpc/RpcMiddleware.ts +100 -20
  1731. package/src/unstable/rpc/RpcSchema.ts +38 -4
  1732. package/src/unstable/rpc/RpcSerialization.ts +60 -13
  1733. package/src/unstable/rpc/RpcServer.ts +107 -23
  1734. package/src/unstable/rpc/RpcTest.ts +20 -1
  1735. package/src/unstable/rpc/RpcWorker.ts +39 -6
  1736. package/src/unstable/rpc/Utils.ts +33 -0
  1737. package/src/unstable/rpc/index.ts +272 -0
  1738. package/src/unstable/schema/Model.ts +245 -61
  1739. package/src/unstable/schema/VariantSchema.ts +101 -24
  1740. package/src/unstable/schema/index.ts +37 -0
  1741. package/src/unstable/socket/Socket.ts +168 -34
  1742. package/src/unstable/socket/SocketServer.ts +58 -10
  1743. package/src/unstable/socket/index.ts +44 -0
  1744. package/src/unstable/sql/Migrator.ts +61 -9
  1745. package/src/unstable/sql/SqlClient.ts +59 -2
  1746. package/src/unstable/sql/SqlConnection.ts +34 -3
  1747. package/src/unstable/sql/SqlError.ts +135 -0
  1748. package/src/unstable/sql/SqlModel.ts +25 -5
  1749. package/src/unstable/sql/SqlResolver.ts +56 -13
  1750. package/src/unstable/sql/SqlSchema.ts +29 -8
  1751. package/src/unstable/sql/SqlStream.ts +24 -0
  1752. package/src/unstable/sql/Statement.ts +168 -24
  1753. package/src/unstable/sql/index.ts +179 -1
  1754. package/src/unstable/workers/Transferable.ts +72 -20
  1755. package/src/unstable/workers/Worker.ts +61 -8
  1756. package/src/unstable/workers/WorkerError.ts +50 -9
  1757. package/src/unstable/workers/WorkerRunner.ts +32 -3
  1758. package/src/unstable/workers/index.ts +81 -1
  1759. package/src/unstable/workflow/Activity.ts +61 -10
  1760. package/src/unstable/workflow/DurableClock.ts +26 -3
  1761. package/src/unstable/workflow/DurableDeferred.ts +148 -31
  1762. package/src/unstable/workflow/DurableQueue.ts +33 -8
  1763. package/src/unstable/workflow/Workflow.ts +123 -31
  1764. package/src/unstable/workflow/WorkflowEngine.ts +40 -5
  1765. package/src/unstable/workflow/WorkflowProxy.ts +40 -12
  1766. package/src/unstable/workflow/WorkflowProxyServer.ts +41 -6
  1767. package/src/unstable/workflow/index.ts +160 -0
@@ -12,9 +12,14 @@ declare const TypeId = "~effect/Schedule";
12
12
  /**
13
13
  * A Schedule defines a strategy for repeating or retrying effects based on some policy.
14
14
  *
15
- * @example
15
+ * **Example** (Defining retry and repeat schedules)
16
+ *
16
17
  * ```ts
17
- * import { Console, Effect, Schedule } from "effect"
18
+ * import { Console, Data, Effect, Schedule } from "effect"
19
+ *
20
+ * class NetworkError extends Data.TaggedError("NetworkError")<{
21
+ * readonly attempt: number
22
+ * }> {}
18
23
  *
19
24
  * // Basic retry schedule - retry up to 3 times with exponential backoff
20
25
  * const retrySchedule = Schedule.exponential("100 millis").pipe(
@@ -25,32 +30,37 @@ declare const TypeId = "~effect/Schedule";
25
30
  * const repeatSchedule: Schedule.Schedule<number, unknown, never> = Schedule
26
31
  * .spaced("30 seconds")
27
32
  *
28
- * // Advanced schedule with custom logic
29
- * const smartRetry = Schedule.exponential("1 second")
30
- *
31
33
  * const program = Effect.gen(function*() {
32
- * // Using retry schedule
34
+ * let attempts = 0
35
+ *
33
36
  * const result1 = yield* Effect.retry(
34
- * Effect.suspend(() => Math.random() > 0.5 ? Effect.fail("temporary error") : Effect.succeed("Success")),
37
+ * Effect.gen(function*() {
38
+ * attempts++
39
+ * if (attempts < 3) {
40
+ * return yield* Effect.fail(new NetworkError({ attempt: attempts }))
41
+ * }
42
+ * return "Success"
43
+ * }),
35
44
  * retrySchedule
36
45
  * )
46
+ * console.log(result1) // "Success"
37
47
  *
38
- * // Using repeat schedule
39
48
  * yield* Console.log("heartbeat").pipe(
40
49
  * Effect.repeat(repeatSchedule.pipe(Schedule.take(5)))
41
50
  * )
42
51
  * })
43
52
  * ```
44
53
  *
54
+ * @category models
45
55
  * @since 2.0.0
46
- * @category Models
47
56
  */
48
57
  export interface Schedule<out Output, in Input = unknown, out Error = never, out Env = never> extends Schedule.Variance<Output, Input, Error, Env>, Pipeable {
49
58
  }
50
59
  /**
51
60
  * Metadata provided to schedule functions containing timing and input information.
52
61
  *
53
- * @example
62
+ * **Example** (Reading schedule input metadata)
63
+ *
54
64
  * ```ts
55
65
  * import { Console, Effect, Schedule } from "effect"
56
66
  *
@@ -69,8 +79,8 @@ export interface Schedule<out Output, in Input = unknown, out Error = never, out
69
79
  * })
70
80
  * ```
71
81
  *
72
- * @since 4.0.0
73
82
  * @category Metadata
83
+ * @since 4.0.0
74
84
  */
75
85
  export interface InputMetadata<Input> {
76
86
  readonly input: Input;
@@ -83,18 +93,19 @@ export interface InputMetadata<Input> {
83
93
  /**
84
94
  * Extended metadata that includes both input metadata and the output value from the schedule.
85
95
  *
86
- * @example
96
+ * **Example** (Logging schedule output metadata)
97
+ *
87
98
  * ```ts
88
99
  * import { Console, Duration, Effect, Schedule } from "effect"
89
100
  *
90
- * // Custom schedule that logs metadata including output
101
+ * // Custom schedule that logs metadata and output for each recurrence
91
102
  * const loggingSchedule = Schedule.unfold(0, (n) => Effect.succeed(n + 1)).pipe(
92
103
  * Schedule.addDelay(() => Effect.succeed(Duration.millis(100))),
93
- * Schedule.tapOutput((output) => {
94
- * return Console.log(
95
- * `Output: ${output}`
96
- * )
97
- * })
104
+ * Schedule.collectWhile((metadata) =>
105
+ * Console.log(
106
+ * `Output: ${metadata.output}, attempt: ${metadata.attempt}, elapsed: ${metadata.elapsed}ms`
107
+ * ).pipe(Effect.as(metadata.attempt <= 3))
108
+ * )
98
109
  * )
99
110
  *
100
111
  * const program = Effect.gen(function*() {
@@ -105,27 +116,36 @@ export interface InputMetadata<Input> {
105
116
  * })
106
117
  *
107
118
  * // Output logs will show:
108
- * // "Output: 0, Attempt: 1, Elapsed: 0ms, Since previous: 0ms"
109
- * // "Output: 1, Attempt: 2, Elapsed: 100ms, Since previous: 100ms"
110
- * // "Output: 2, Attempt: 3, Elapsed: 200ms, Since previous: 100ms"
119
+ * // Output: 0, attempt: 1, elapsed: 0ms
120
+ * // Output: 1, attempt: 2, elapsed: 100ms
121
+ * // Output: 2, attempt: 3, elapsed: 200ms
111
122
  * ```
112
123
  *
113
- * @since 4.0.0
114
124
  * @category Metadata
125
+ * @since 4.0.0
115
126
  */
116
127
  export interface Metadata<Output = unknown, Input = unknown> extends InputMetadata<Input> {
117
128
  readonly output: Output;
118
129
  readonly duration: Duration.Duration;
119
130
  }
120
131
  /**
121
- * @since 4.0.0
132
+ * Context reference containing metadata for the currently running schedule step.
133
+ *
134
+ * **Details**
135
+ * Repeat, retry, stream, and channel scheduling operations provide this service
136
+ * to effects run between schedule steps. The default value contains undefined
137
+ * input and output values, zero duration, and zeroed timing fields before any
138
+ * schedule step has produced metadata.
139
+ *
122
140
  * @category Metadata
141
+ * @since 4.0.0
123
142
  */
124
143
  export declare const CurrentMetadata: Context.Reference<Metadata<unknown, unknown>>;
125
144
  /**
126
145
  * The Schedule namespace contains types and utilities for working with schedules.
127
146
  *
128
- * @example
147
+ * **Example** (Creating custom schedules with the namespace)
148
+ *
129
149
  * ```ts
130
150
  * import { Duration, Effect, Schedule } from "effect"
131
151
  *
@@ -153,13 +173,13 @@ export declare const CurrentMetadata: Context.Reference<Metadata<unknown, unknow
153
173
  * ```
154
174
  *
155
175
  * @since 2.0.0
156
- * @category models
157
176
  */
158
177
  export declare namespace Schedule {
159
178
  /**
160
179
  * Variance interface that defines the type parameter relationships for Schedule.
161
180
  *
162
- * @example
181
+ * **Example** (Understanding schedule variance)
182
+ *
163
183
  * ```ts
164
184
  * import { Effect, Schedule } from "effect"
165
185
  *
@@ -183,43 +203,22 @@ export declare namespace Schedule {
183
203
  * const serviceSchedule = Schedule.spaced("5 seconds")
184
204
  * ```
185
205
  *
206
+ * @category models
186
207
  * @since 2.0.0
187
- * @category Models
188
208
  */
189
209
  interface Variance<out Output, in Input, out Error, out Env> {
190
210
  readonly [TypeId]: VarianceStruct<Output, Input, Error, Env>;
191
211
  }
192
212
  /**
193
- * Internal structure that holds the variance annotations for Schedule type parameters.
194
- *
195
- * @example
196
- * ```ts
197
- * import { Effect, Schedule } from "effect"
213
+ * Type-level marker used by `Schedule.Variance` to record the variance of
214
+ * `Schedule` type parameters.
198
215
  *
199
- * // The variance struct defines how Schedule's type parameters behave
200
- * // This internal interface is used for type variance annotations
216
+ * **Notes**
217
+ * This interface exists for TypeScript inference and assignability. Users
218
+ * normally do not construct or inspect it directly.
201
219
  *
202
- * // Example showing variance relationships:
203
- * interface Animal {
204
- * name: string
205
- * }
206
- * interface Dog extends Animal {
207
- * breed: string
208
- * }
209
- *
210
- * // Output is covariant - more specific types can be substituted
211
- * const stringSchedule = Schedule.spaced("1 second").pipe(
212
- * Schedule.map(() => Effect.succeed("output"))
213
- * )
214
- *
215
- * // Input is contravariant - more general types can be accepted
216
- * const numberSchedule = Schedule.exponential("100 millis")
217
- *
218
- * // This enables proper type relationships where schedules can be composed safely
219
- * ```
220
- *
221
- * @since 2.0.0
222
- * @category Models
220
+ * @category models
221
+ * @since 4.0.0
223
222
  */
224
223
  interface VarianceStruct<out Output, in Input, out Error, out Env> {
225
224
  readonly _Out: Covariant<Output>;
@@ -231,7 +230,8 @@ export declare namespace Schedule {
231
230
  /**
232
231
  * Type guard that checks if a value is a Schedule.
233
232
  *
234
- * @example
233
+ * **Example** (Checking for schedules)
234
+ *
235
235
  * ```ts
236
236
  * import { Schedule } from "effect"
237
237
  *
@@ -244,64 +244,63 @@ export declare namespace Schedule {
244
244
  * console.log(Schedule.isSchedule(undefined)) // false
245
245
  * ```
246
246
  *
247
- * @since 2.0.0
248
247
  * @category guards
248
+ * @since 2.0.0
249
249
  */
250
250
  export declare const isSchedule: (u: unknown) => u is Schedule<unknown, never, unknown, unknown>;
251
251
  /**
252
252
  * Creates a Schedule from a step function that returns a Pull.
253
253
  *
254
- * @example
255
- * ```ts
256
- * import { Schedule } from "effect"
254
+ * **Example** (Creating a custom schedule from a step function)
257
255
  *
258
- * // fromStep is an advanced function for creating custom schedules
259
- * // It requires a step function that returns a Pull value
256
+ * ```ts
257
+ * import { Cause, Duration, Effect, Schedule } from "effect"
260
258
  *
261
- * // Most users should use simpler schedule constructors like:
262
- * const simpleSchedule = Schedule.exponential("100 millis")
263
- * const spacedSchedule = Schedule.spaced("1 second")
264
- * const recurringSchedule = Schedule.recurs(5)
259
+ * const schedule = Schedule.fromStep(Effect.sync(() => {
260
+ * let count = 0
265
261
  *
266
- * // These can be combined and transformed as needed
267
- * const complexSchedule = simpleSchedule.pipe(
268
- * Schedule.both(Schedule.recurs(3))
269
- * )
262
+ * return (_now: number, _input: string) => {
263
+ * if (count >= 3) {
264
+ * return Cause.done(count)
265
+ * }
266
+ * return Effect.succeed([count++, Duration.millis(100)] as [number, Duration.Duration])
267
+ * }
268
+ * }))
270
269
  * ```
271
270
  *
272
- * @since 4.0.0
273
271
  * @category constructors
272
+ * @since 4.0.0
274
273
  */
275
274
  export declare const fromStep: <Input, Output, EnvX, Error, ErrorX, Env>(step: Effect<(now: number, input: Input) => Pull.Pull<[Output, Duration.Duration], ErrorX, Output, EnvX>, Error, Env>) => Schedule<Output, Input, Error | Pull.ExcludeDone<ErrorX>, Env | EnvX>;
276
275
  /**
277
276
  * Creates a Schedule from a step function that receives metadata about the schedule's execution.
278
277
  *
279
- * @example
280
- * ```ts
281
- * import { Effect, Schedule } from "effect"
278
+ * **Example** (Creating a metadata-aware schedule)
282
279
  *
283
- * // fromStepWithMetadata is an advanced function for creating schedules
284
- * // that need access to execution metadata like timing and recurrence count
280
+ * ```ts
281
+ * import { Cause, Duration, Effect, Schedule } from "effect"
285
282
  *
286
- * // Most users should use simpler metadata-aware functions like:
287
- * const metadataSchedule = Schedule.spaced("1 second").pipe(
288
- * Schedule.collectWhile((metadata) => Effect.succeed(metadata.attempt <= 5))
289
- * )
283
+ * const firstThreeInputs = Schedule.fromStepWithMetadata(Effect.succeed((metadata: Schedule.InputMetadata<string>) => {
284
+ * if (metadata.attempt > 3) {
285
+ * return Cause.done("finished")
286
+ * }
290
287
  *
291
- * // Or use existing schedules with metadata transformations:
292
- * const conditionalSchedule = Schedule.exponential("100 millis").pipe(
293
- * Schedule.tapOutput((output) => Effect.log(`Output: ${output}`))
294
- * )
288
+ * return Effect.succeed([
289
+ * `attempt ${metadata.attempt}: ${metadata.input}`,
290
+ * Duration.millis(250)
291
+ * ] as [string, Duration.Duration])
292
+ * }))
295
293
  * ```
296
294
  *
297
- * @since 4.0.0
298
295
  * @category constructors
296
+ * @since 4.0.0
299
297
  */
300
298
  export declare const fromStepWithMetadata: <Input, Output, EnvX, ErrorX, Error, Env>(step: Effect<(options: InputMetadata<Input>) => Pull.Pull<[Output, Duration.Duration], ErrorX, Output, EnvX>, Error, Env>) => Schedule<Output, Input, Error | Pull.ExcludeDone<ErrorX>, Env | EnvX>;
301
299
  /**
302
300
  * Extracts the step function from a Schedule.
303
301
  *
304
- * @example
302
+ * **Example** (Extracting a schedule step function)
303
+ *
305
304
  * ```ts
306
305
  * import { Effect, Schedule } from "effect"
307
306
  *
@@ -311,30 +310,32 @@ export declare const fromStepWithMetadata: <Input, Output, EnvX, ErrorX, Error,
311
310
  * const program = Effect.gen(function*() {
312
311
  * const stepFn = yield* Schedule.toStep(schedule)
313
312
  *
314
- * // Use the step function directly for custom logic
315
- * const now = Date.now()
313
+ * // Use the step function directly for custom logic. The timestamp is
314
+ * // supplied by the caller, so tests can pass a deterministic value.
315
+ * const now = 0
316
316
  * const result = yield* stepFn(now, "input")
317
317
  *
318
318
  * console.log(`Step result: ${result}`)
319
319
  * })
320
320
  * ```
321
321
  *
322
- * @since 4.0.0
323
322
  * @category destructors
323
+ * @since 4.0.0
324
324
  */
325
325
  export declare const toStep: <Output, Input, Error, Env>(schedule: Schedule<Output, Input, Error, Env>) => Effect<(now: number, input: Input) => Pull.Pull<[Output, Duration.Duration], Error, Output, Env>, never, Env>;
326
326
  /**
327
327
  * Extracts a step function from a Schedule that provides metadata about each
328
328
  * execution. It will also handle sleeping for the computed delay.
329
329
  *
330
- * @since 4.0.0
331
330
  * @category destructors
331
+ * @since 4.0.0
332
332
  */
333
333
  export declare const toStepWithMetadata: <Output, Input, Error, Env>(schedule: Schedule<Output, Input, Error, Env>) => Effect<(input: Input) => Pull.Pull<Metadata<Output, Input>, Error, Output, Env>, never, Env>;
334
334
  /**
335
335
  * Extracts a step function from a Schedule that automatically handles sleep delays.
336
336
  *
337
- * @example
337
+ * **Example** (Extracting a sleeping step function)
338
+ *
338
339
  * ```ts
339
340
  * import { Effect, Schedule } from "effect"
340
341
  *
@@ -357,37 +358,34 @@ export declare const toStepWithMetadata: <Output, Input, Error, Env>(schedule: S
357
358
  * })
358
359
  * ```
359
360
  *
360
- * @since 4.0.0
361
361
  * @category destructors
362
+ * @since 4.0.0
362
363
  */
363
364
  export declare const toStepWithSleep: <Output, Input, Error, Env>(schedule: Schedule<Output, Input, Error, Env>) => Effect<(input: Input) => Pull.Pull<Output, Error, Output, Env>, never, Env>;
364
365
  /**
365
366
  * Returns a new `Schedule` that adds the delay computed by the specified
366
367
  * effectful function to the the next recurrence of the schedule.
367
368
  *
368
- * @example
369
+ * **Example** (Adding extra delay to a schedule)
370
+ *
369
371
  * ```ts
370
372
  * import { Console, Data, Duration, Effect, Schedule } from "effect"
371
373
  *
372
374
  * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {}
373
375
  *
374
- * // Add random jitter to schedule delays
375
- * const jitteredSchedule = Schedule.addDelay(
376
+ * // Add a deterministic extra delay based on the schedule output
377
+ * const delayedSchedule = Schedule.addDelay(
376
378
  * Schedule.exponential("100 millis").pipe(Schedule.take(5)),
377
379
  * (output) =>
378
- * // Add random jitter between 0-50ms
379
- * Effect.succeed(Duration.millis(Math.random() * 50))
380
+ * Effect.succeed(Duration.millis(Duration.toMillis(output) * 0.25))
380
381
  * )
381
382
  *
382
- * const jitterProgram = Effect.gen(function*() {
383
+ * const repeatProgram = Effect.gen(function*() {
383
384
  * yield* Effect.repeat(
384
- * Effect.gen(function*() {
385
- * yield* Console.log(`Task executed at ${new Date().toISOString()}`)
386
- * return "jittered task"
387
- * }),
388
- * jitteredSchedule.pipe(
385
+ * Effect.succeed("delayed task"),
386
+ * delayedSchedule.pipe(
389
387
  * Schedule.tapOutput((delay) =>
390
- * Console.log(`Base delay with jitter applied`)
388
+ * Console.log(`Base delay: ${delay}`)
391
389
  * )
392
390
  * )
393
391
  * )
@@ -415,12 +413,15 @@ export declare const toStepWithSleep: <Output, Input, Error, Env>(schedule: Sche
415
413
  * )
416
414
  * })
417
415
  *
418
- * // Add effectful delay computation
416
+ * // Add effectful delay computation from deterministic service data
417
+ * const loadByExecution = [1, 3, 2, 4] as const
418
+ *
419
419
  * const dynamicSchedule = Schedule.addDelay(
420
420
  * Schedule.spaced("1 second").pipe(Schedule.take(4)),
421
- * (executionNumber) =>
422
- * // Simulate checking system load and return additional delay
423
- * Effect.succeed(Duration.millis(Math.random() > 0.7 ? 2000 : 500))
421
+ * (executionNumber) => {
422
+ * const load = loadByExecution[executionNumber] ?? 1
423
+ * return Effect.succeed(Duration.millis(load * 100))
424
+ * }
424
425
  * )
425
426
  *
426
427
  * const dynamicProgram = Effect.gen(function*() {
@@ -433,25 +434,6 @@ export declare const toStepWithSleep: <Output, Input, Error, Env>(schedule: Sche
433
434
  * )
434
435
  * })
435
436
  *
436
- * // Add delay based on previous execution results (30% extra)
437
- * const resultBasedSchedule = Schedule.addDelay(
438
- * Schedule.fibonacci("200 millis").pipe(Schedule.take(5)),
439
- * (fibonacciDelay) =>
440
- * Effect.succeed(Duration.millis(Duration.toMillis(fibonacciDelay) * 0.3))
441
- * )
442
- *
443
- * const resultProgram = Effect.gen(function*() {
444
- * yield* Effect.repeat(
445
- * Effect.gen(function*() {
446
- * yield* Console.log("Result-based delay task")
447
- * return Math.random()
448
- * }),
449
- * resultBasedSchedule.pipe(
450
- * Schedule.tapOutput((delay) => Console.log(`Fibonacci delay: ${delay}`))
451
- * )
452
- * )
453
- * })
454
- *
455
437
  * // Combine with retry for progressive backoff
456
438
  * const progressiveRetrySchedule = Schedule.addDelay(
457
439
  * Schedule.exponential("50 millis").pipe(Schedule.take(4)),
@@ -476,37 +458,34 @@ export declare const toStepWithSleep: <Output, Input, Error, Env>(schedule: Sche
476
458
  * })
477
459
  * ```
478
460
  *
479
- * @since 2.0.0
480
461
  * @category utils
462
+ * @since 2.0.0
481
463
  */
482
464
  export declare const addDelay: {
483
465
  /**
484
466
  * Returns a new `Schedule` that adds the delay computed by the specified
485
467
  * effectful function to the the next recurrence of the schedule.
486
468
  *
487
- * @example
469
+ * **Example** (Adding extra delay to a schedule)
470
+ *
488
471
  * ```ts
489
472
  * import { Console, Data, Duration, Effect, Schedule } from "effect"
490
473
  *
491
474
  * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {}
492
475
  *
493
- * // Add random jitter to schedule delays
494
- * const jitteredSchedule = Schedule.addDelay(
476
+ * // Add a deterministic extra delay based on the schedule output
477
+ * const delayedSchedule = Schedule.addDelay(
495
478
  * Schedule.exponential("100 millis").pipe(Schedule.take(5)),
496
479
  * (output) =>
497
- * // Add random jitter between 0-50ms
498
- * Effect.succeed(Duration.millis(Math.random() * 50))
480
+ * Effect.succeed(Duration.millis(Duration.toMillis(output) * 0.25))
499
481
  * )
500
482
  *
501
- * const jitterProgram = Effect.gen(function*() {
483
+ * const repeatProgram = Effect.gen(function*() {
502
484
  * yield* Effect.repeat(
503
- * Effect.gen(function*() {
504
- * yield* Console.log(`Task executed at ${new Date().toISOString()}`)
505
- * return "jittered task"
506
- * }),
507
- * jitteredSchedule.pipe(
485
+ * Effect.succeed("delayed task"),
486
+ * delayedSchedule.pipe(
508
487
  * Schedule.tapOutput((delay) =>
509
- * Console.log(`Base delay with jitter applied`)
488
+ * Console.log(`Base delay: ${delay}`)
510
489
  * )
511
490
  * )
512
491
  * )
@@ -534,12 +513,15 @@ export declare const addDelay: {
534
513
  * )
535
514
  * })
536
515
  *
537
- * // Add effectful delay computation
516
+ * // Add effectful delay computation from deterministic service data
517
+ * const loadByExecution = [1, 3, 2, 4] as const
518
+ *
538
519
  * const dynamicSchedule = Schedule.addDelay(
539
520
  * Schedule.spaced("1 second").pipe(Schedule.take(4)),
540
- * (executionNumber) =>
541
- * // Simulate checking system load and return additional delay
542
- * Effect.succeed(Duration.millis(Math.random() > 0.7 ? 2000 : 500))
521
+ * (executionNumber) => {
522
+ * const load = loadByExecution[executionNumber] ?? 1
523
+ * return Effect.succeed(Duration.millis(load * 100))
524
+ * }
543
525
  * )
544
526
  *
545
527
  * const dynamicProgram = Effect.gen(function*() {
@@ -552,25 +534,6 @@ export declare const addDelay: {
552
534
  * )
553
535
  * })
554
536
  *
555
- * // Add delay based on previous execution results (30% extra)
556
- * const resultBasedSchedule = Schedule.addDelay(
557
- * Schedule.fibonacci("200 millis").pipe(Schedule.take(5)),
558
- * (fibonacciDelay) =>
559
- * Effect.succeed(Duration.millis(Duration.toMillis(fibonacciDelay) * 0.3))
560
- * )
561
- *
562
- * const resultProgram = Effect.gen(function*() {
563
- * yield* Effect.repeat(
564
- * Effect.gen(function*() {
565
- * yield* Console.log("Result-based delay task")
566
- * return Math.random()
567
- * }),
568
- * resultBasedSchedule.pipe(
569
- * Schedule.tapOutput((delay) => Console.log(`Fibonacci delay: ${delay}`))
570
- * )
571
- * )
572
- * })
573
- *
574
537
  * // Combine with retry for progressive backoff
575
538
  * const progressiveRetrySchedule = Schedule.addDelay(
576
539
  * Schedule.exponential("50 millis").pipe(Schedule.take(4)),
@@ -595,37 +558,34 @@ export declare const addDelay: {
595
558
  * })
596
559
  * ```
597
560
  *
598
- * @since 2.0.0
599
561
  * @category utils
562
+ * @since 2.0.0
600
563
  */
601
564
  <Output, Error2 = never, Env2 = never>(f: (output: Output) => Effect<Duration.Input, Error2, Env2>): <Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error | Error2, Env | Env2>;
602
565
  /**
603
566
  * Returns a new `Schedule` that adds the delay computed by the specified
604
567
  * effectful function to the the next recurrence of the schedule.
605
568
  *
606
- * @example
569
+ * **Example** (Adding extra delay to a schedule)
570
+ *
607
571
  * ```ts
608
572
  * import { Console, Data, Duration, Effect, Schedule } from "effect"
609
573
  *
610
574
  * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {}
611
575
  *
612
- * // Add random jitter to schedule delays
613
- * const jitteredSchedule = Schedule.addDelay(
576
+ * // Add a deterministic extra delay based on the schedule output
577
+ * const delayedSchedule = Schedule.addDelay(
614
578
  * Schedule.exponential("100 millis").pipe(Schedule.take(5)),
615
579
  * (output) =>
616
- * // Add random jitter between 0-50ms
617
- * Effect.succeed(Duration.millis(Math.random() * 50))
580
+ * Effect.succeed(Duration.millis(Duration.toMillis(output) * 0.25))
618
581
  * )
619
582
  *
620
- * const jitterProgram = Effect.gen(function*() {
583
+ * const repeatProgram = Effect.gen(function*() {
621
584
  * yield* Effect.repeat(
622
- * Effect.gen(function*() {
623
- * yield* Console.log(`Task executed at ${new Date().toISOString()}`)
624
- * return "jittered task"
625
- * }),
626
- * jitteredSchedule.pipe(
585
+ * Effect.succeed("delayed task"),
586
+ * delayedSchedule.pipe(
627
587
  * Schedule.tapOutput((delay) =>
628
- * Console.log(`Base delay with jitter applied`)
588
+ * Console.log(`Base delay: ${delay}`)
629
589
  * )
630
590
  * )
631
591
  * )
@@ -653,12 +613,15 @@ export declare const addDelay: {
653
613
  * )
654
614
  * })
655
615
  *
656
- * // Add effectful delay computation
616
+ * // Add effectful delay computation from deterministic service data
617
+ * const loadByExecution = [1, 3, 2, 4] as const
618
+ *
657
619
  * const dynamicSchedule = Schedule.addDelay(
658
620
  * Schedule.spaced("1 second").pipe(Schedule.take(4)),
659
- * (executionNumber) =>
660
- * // Simulate checking system load and return additional delay
661
- * Effect.succeed(Duration.millis(Math.random() > 0.7 ? 2000 : 500))
621
+ * (executionNumber) => {
622
+ * const load = loadByExecution[executionNumber] ?? 1
623
+ * return Effect.succeed(Duration.millis(load * 100))
624
+ * }
662
625
  * )
663
626
  *
664
627
  * const dynamicProgram = Effect.gen(function*() {
@@ -671,25 +634,6 @@ export declare const addDelay: {
671
634
  * )
672
635
  * })
673
636
  *
674
- * // Add delay based on previous execution results (30% extra)
675
- * const resultBasedSchedule = Schedule.addDelay(
676
- * Schedule.fibonacci("200 millis").pipe(Schedule.take(5)),
677
- * (fibonacciDelay) =>
678
- * Effect.succeed(Duration.millis(Duration.toMillis(fibonacciDelay) * 0.3))
679
- * )
680
- *
681
- * const resultProgram = Effect.gen(function*() {
682
- * yield* Effect.repeat(
683
- * Effect.gen(function*() {
684
- * yield* Console.log("Result-based delay task")
685
- * return Math.random()
686
- * }),
687
- * resultBasedSchedule.pipe(
688
- * Schedule.tapOutput((delay) => Console.log(`Fibonacci delay: ${delay}`))
689
- * )
690
- * )
691
- * })
692
- *
693
637
  * // Combine with retry for progressive backoff
694
638
  * const progressiveRetrySchedule = Schedule.addDelay(
695
639
  * Schedule.exponential("50 millis").pipe(Schedule.take(4)),
@@ -714,8 +658,8 @@ export declare const addDelay: {
714
658
  * })
715
659
  * ```
716
660
  *
717
- * @since 2.0.0
718
661
  * @category utils
662
+ * @since 2.0.0
719
663
  */
720
664
  <Output, Input, Error, Env, Error2 = never, Env2 = never>(self: Schedule<Output, Input, Error, Env>, f: (output: Output) => Effect<Duration.Input, Error2, Env2>): Schedule<Output, Input, Error | Error2, Env | Env2>;
721
665
  };
@@ -724,7 +668,8 @@ export declare const addDelay: {
724
668
  * schedule to completion. Once the left schedule is complete, the right (i.e.
725
669
  * `other`) schedule will be executed to completion.
726
670
  *
727
- * @example
671
+ * **Example** (Sequencing quick and slow retries)
672
+ *
728
673
  * ```ts
729
674
  * import { Console, Data, Effect, Schedule } from "effect"
730
675
  *
@@ -756,8 +701,8 @@ export declare const addDelay: {
756
701
  * })
757
702
  * ```
758
703
  *
759
- * @since 2.0.0
760
704
  * @category sequencing
705
+ * @since 2.0.0
761
706
  */
762
707
  export declare const andThen: {
763
708
  /**
@@ -765,7 +710,8 @@ export declare const andThen: {
765
710
  * schedule to completion. Once the left schedule is complete, the right (i.e.
766
711
  * `other`) schedule will be executed to completion.
767
712
  *
768
- * @example
713
+ * **Example** (Sequencing quick and slow retries)
714
+ *
769
715
  * ```ts
770
716
  * import { Console, Data, Effect, Schedule } from "effect"
771
717
  *
@@ -797,8 +743,8 @@ export declare const andThen: {
797
743
  * })
798
744
  * ```
799
745
  *
800
- * @since 2.0.0
801
746
  * @category sequencing
747
+ * @since 2.0.0
802
748
  */
803
749
  <Output2, Input2, Error2, Env2>(other: Schedule<Output2, Input2, Error2, Env2>): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output | Output2, Input & Input2, Error | Error2, Env | Env2>;
804
750
  /**
@@ -806,7 +752,8 @@ export declare const andThen: {
806
752
  * schedule to completion. Once the left schedule is complete, the right (i.e.
807
753
  * `other`) schedule will be executed to completion.
808
754
  *
809
- * @example
755
+ * **Example** (Sequencing quick and slow retries)
756
+ *
810
757
  * ```ts
811
758
  * import { Console, Data, Effect, Schedule } from "effect"
812
759
  *
@@ -838,8 +785,8 @@ export declare const andThen: {
838
785
  * })
839
786
  * ```
840
787
  *
841
- * @since 2.0.0
842
788
  * @category sequencing
789
+ * @since 2.0.0
843
790
  */
844
791
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<Output | Output2, Input & Input2, Error | Error2, Env | Env2>;
845
792
  };
@@ -848,11 +795,12 @@ export declare const andThen: {
848
795
  * schedule to completion. Once the left schedule is complete, the right (i.e.
849
796
  * `other`) schedule will be executed to completion.
850
797
  *
851
- * The output of the resulting schedule is a `Result` where outputs of the
852
- * left schedule are emitted as `Result.Err<Output>` and outputs of the right
853
- * schedule are emitted as `Result.Ok<Output>`.
798
+ * The resulting schedule emits a `Result` to indicate which phase produced
799
+ * each output: outputs from `self` are emitted as `Failure`, and outputs from
800
+ * `other` are emitted as `Success`.
801
+ *
802
+ * **Example** (Tracking sequential schedule phases)
854
803
  *
855
- * @example
856
804
  * ```ts
857
805
  * import { Console, Effect, Result, Schedule } from "effect"
858
806
  *
@@ -880,8 +828,8 @@ export declare const andThen: {
880
828
  * })
881
829
  * ```
882
830
  *
883
- * @since 2.0.0
884
831
  * @category sequencing
832
+ * @since 4.0.0
885
833
  */
886
834
  export declare const andThenResult: {
887
835
  /**
@@ -889,11 +837,12 @@ export declare const andThenResult: {
889
837
  * schedule to completion. Once the left schedule is complete, the right (i.e.
890
838
  * `other`) schedule will be executed to completion.
891
839
  *
892
- * The output of the resulting schedule is a `Result` where outputs of the
893
- * left schedule are emitted as `Result.Err<Output>` and outputs of the right
894
- * schedule are emitted as `Result.Ok<Output>`.
840
+ * The resulting schedule emits a `Result` to indicate which phase produced
841
+ * each output: outputs from `self` are emitted as `Failure`, and outputs from
842
+ * `other` are emitted as `Success`.
843
+ *
844
+ * **Example** (Tracking sequential schedule phases)
895
845
  *
896
- * @example
897
846
  * ```ts
898
847
  * import { Console, Effect, Result, Schedule } from "effect"
899
848
  *
@@ -921,8 +870,8 @@ export declare const andThenResult: {
921
870
  * })
922
871
  * ```
923
872
  *
924
- * @since 2.0.0
925
873
  * @category sequencing
874
+ * @since 4.0.0
926
875
  */
927
876
  <Output2, Input2, Error2, Env2>(other: Schedule<Output2, Input2, Error2, Env2>): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Result.Result<Output2, Output>, Input & Input2, Error | Error2, Env | Env2>;
928
877
  /**
@@ -930,11 +879,12 @@ export declare const andThenResult: {
930
879
  * schedule to completion. Once the left schedule is complete, the right (i.e.
931
880
  * `other`) schedule will be executed to completion.
932
881
  *
933
- * The output of the resulting schedule is a `Result` where outputs of the
934
- * left schedule are emitted as `Result.Err<Output>` and outputs of the right
935
- * schedule are emitted as `Result.Ok<Output>`.
882
+ * The resulting schedule emits a `Result` to indicate which phase produced
883
+ * each output: outputs from `self` are emitted as `Failure`, and outputs from
884
+ * `other` are emitted as `Success`.
885
+ *
886
+ * **Example** (Tracking sequential schedule phases)
936
887
  *
937
- * @example
938
888
  * ```ts
939
889
  * import { Console, Effect, Result, Schedule } from "effect"
940
890
  *
@@ -962,8 +912,8 @@ export declare const andThenResult: {
962
912
  * })
963
913
  * ```
964
914
  *
965
- * @since 2.0.0
966
915
  * @category sequencing
916
+ * @since 4.0.0
967
917
  */
968
918
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<Result.Result<Output2, Output>, Input & Input2, Error | Error2, Env | Env2>;
969
919
  };
@@ -972,7 +922,8 @@ export declare const andThenResult: {
972
922
  * to recur, using the maximum of the two durations between recurrences and
973
923
  * outputting a tuple of the outputs of both schedules.
974
924
  *
975
- * @example
925
+ * **Example** (Combining time and attempt limits)
926
+ *
976
927
  * ```ts
977
928
  * import { Console, Data, Effect, Schedule } from "effect"
978
929
  *
@@ -989,7 +940,7 @@ export declare const andThenResult: {
989
940
  * const program = Effect.gen(function*() {
990
941
  * const results = yield* Effect.repeat(
991
942
  * Effect.gen(function*() {
992
- * yield* Console.log(`Task executed at ${new Date().toISOString()}`)
943
+ * yield* Console.log("Task executed")
993
944
  * return "task completed"
994
945
  * }),
995
946
  * bothSchedule.pipe(
@@ -1033,8 +984,8 @@ export declare const andThenResult: {
1033
984
  * // Compare with either which provides union semantics (OR logic)
1034
985
  * ```
1035
986
  *
987
+ * @category utils
1036
988
  * @since 2.0.0
1037
- * @category utilities
1038
989
  */
1039
990
  export declare const both: {
1040
991
  /**
@@ -1042,7 +993,8 @@ export declare const both: {
1042
993
  * to recur, using the maximum of the two durations between recurrences and
1043
994
  * outputting a tuple of the outputs of both schedules.
1044
995
  *
1045
- * @example
996
+ * **Example** (Combining time and attempt limits)
997
+ *
1046
998
  * ```ts
1047
999
  * import { Console, Data, Effect, Schedule } from "effect"
1048
1000
  *
@@ -1059,7 +1011,7 @@ export declare const both: {
1059
1011
  * const program = Effect.gen(function*() {
1060
1012
  * const results = yield* Effect.repeat(
1061
1013
  * Effect.gen(function*() {
1062
- * yield* Console.log(`Task executed at ${new Date().toISOString()}`)
1014
+ * yield* Console.log("Task executed")
1063
1015
  * return "task completed"
1064
1016
  * }),
1065
1017
  * bothSchedule.pipe(
@@ -1103,8 +1055,8 @@ export declare const both: {
1103
1055
  * // Compare with either which provides union semantics (OR logic)
1104
1056
  * ```
1105
1057
  *
1058
+ * @category utils
1106
1059
  * @since 2.0.0
1107
- * @category utilities
1108
1060
  */
1109
1061
  <Output2, Input2, Error2, Env2, Output>(other: Schedule<Output2, Input2, Error2, Env2>): <Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<[Output, Output2], Input & Input2, Error | Error2, Env | Env2>;
1110
1062
  /**
@@ -1112,7 +1064,8 @@ export declare const both: {
1112
1064
  * to recur, using the maximum of the two durations between recurrences and
1113
1065
  * outputting a tuple of the outputs of both schedules.
1114
1066
  *
1115
- * @example
1067
+ * **Example** (Combining time and attempt limits)
1068
+ *
1116
1069
  * ```ts
1117
1070
  * import { Console, Data, Effect, Schedule } from "effect"
1118
1071
  *
@@ -1129,7 +1082,7 @@ export declare const both: {
1129
1082
  * const program = Effect.gen(function*() {
1130
1083
  * const results = yield* Effect.repeat(
1131
1084
  * Effect.gen(function*() {
1132
- * yield* Console.log(`Task executed at ${new Date().toISOString()}`)
1085
+ * yield* Console.log("Task executed")
1133
1086
  * return "task completed"
1134
1087
  * }),
1135
1088
  * bothSchedule.pipe(
@@ -1173,8 +1126,8 @@ export declare const both: {
1173
1126
  * // Compare with either which provides union semantics (OR logic)
1174
1127
  * ```
1175
1128
  *
1129
+ * @category utils
1176
1130
  * @since 2.0.0
1177
- * @category utilities
1178
1131
  */
1179
1132
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<[Output, Output2], Input & Input2, Error | Error2, Env | Env2>;
1180
1133
  };
@@ -1183,7 +1136,8 @@ export declare const both: {
1183
1136
  * to recur, using the maximum of the two durations between recurrences and
1184
1137
  * outputting the result of the left schedule (i.e. `self`).
1185
1138
  *
1186
- * @example
1139
+ * **Example** (Combining schedules and keeping the left output)
1140
+ *
1187
1141
  * ```ts
1188
1142
  * import { Console, Effect, Schedule } from "effect"
1189
1143
  *
@@ -1206,8 +1160,8 @@ export declare const both: {
1206
1160
  * })
1207
1161
  * ```
1208
1162
  *
1163
+ * @category utils
1209
1164
  * @since 2.0.0
1210
- * @category utilities
1211
1165
  */
1212
1166
  export declare const bothLeft: {
1213
1167
  /**
@@ -1215,7 +1169,8 @@ export declare const bothLeft: {
1215
1169
  * to recur, using the maximum of the two durations between recurrences and
1216
1170
  * outputting the result of the left schedule (i.e. `self`).
1217
1171
  *
1218
- * @example
1172
+ * **Example** (Combining schedules and keeping the left output)
1173
+ *
1219
1174
  * ```ts
1220
1175
  * import { Console, Effect, Schedule } from "effect"
1221
1176
  *
@@ -1238,8 +1193,8 @@ export declare const bothLeft: {
1238
1193
  * })
1239
1194
  * ```
1240
1195
  *
1196
+ * @category utils
1241
1197
  * @since 2.0.0
1242
- * @category utilities
1243
1198
  */
1244
1199
  <Output2, Input2, Error2, Env2>(other: Schedule<Output2, Input2, Error2, Env2>): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input & Input2, Error | Error2, Env | Env2>;
1245
1200
  /**
@@ -1247,7 +1202,8 @@ export declare const bothLeft: {
1247
1202
  * to recur, using the maximum of the two durations between recurrences and
1248
1203
  * outputting the result of the left schedule (i.e. `self`).
1249
1204
  *
1250
- * @example
1205
+ * **Example** (Combining schedules and keeping the left output)
1206
+ *
1251
1207
  * ```ts
1252
1208
  * import { Console, Effect, Schedule } from "effect"
1253
1209
  *
@@ -1270,8 +1226,8 @@ export declare const bothLeft: {
1270
1226
  * })
1271
1227
  * ```
1272
1228
  *
1229
+ * @category utils
1273
1230
  * @since 2.0.0
1274
- * @category utilities
1275
1231
  */
1276
1232
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<Output, Input & Input2, Error | Error2, Env | Env2>;
1277
1233
  };
@@ -1280,7 +1236,8 @@ export declare const bothLeft: {
1280
1236
  * to recur, using the maximum of the two durations between recurrences and
1281
1237
  * outputting the result of the right schedule (i.e. `other`).
1282
1238
  *
1283
- * @example
1239
+ * **Example** (Combining schedules and keeping the right output)
1240
+ *
1284
1241
  * ```ts
1285
1242
  * import { Console, Effect, Schedule } from "effect"
1286
1243
  *
@@ -1305,8 +1262,8 @@ export declare const bothLeft: {
1305
1262
  * })
1306
1263
  * ```
1307
1264
  *
1265
+ * @category utils
1308
1266
  * @since 2.0.0
1309
- * @category utilities
1310
1267
  */
1311
1268
  export declare const bothRight: {
1312
1269
  /**
@@ -1314,7 +1271,8 @@ export declare const bothRight: {
1314
1271
  * to recur, using the maximum of the two durations between recurrences and
1315
1272
  * outputting the result of the right schedule (i.e. `other`).
1316
1273
  *
1317
- * @example
1274
+ * **Example** (Combining schedules and keeping the right output)
1275
+ *
1318
1276
  * ```ts
1319
1277
  * import { Console, Effect, Schedule } from "effect"
1320
1278
  *
@@ -1339,8 +1297,8 @@ export declare const bothRight: {
1339
1297
  * })
1340
1298
  * ```
1341
1299
  *
1300
+ * @category utils
1342
1301
  * @since 2.0.0
1343
- * @category utilities
1344
1302
  */
1345
1303
  <Output2, Input2, Error2, Env2>(other: Schedule<Output2, Input2, Error2, Env2>): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input & Input2, Error | Error2, Env | Env2>;
1346
1304
  /**
@@ -1348,7 +1306,8 @@ export declare const bothRight: {
1348
1306
  * to recur, using the maximum of the two durations between recurrences and
1349
1307
  * outputting the result of the right schedule (i.e. `other`).
1350
1308
  *
1351
- * @example
1309
+ * **Example** (Combining schedules and keeping the right output)
1310
+ *
1352
1311
  * ```ts
1353
1312
  * import { Console, Effect, Schedule } from "effect"
1354
1313
  *
@@ -1373,8 +1332,8 @@ export declare const bothRight: {
1373
1332
  * })
1374
1333
  * ```
1375
1334
  *
1335
+ * @category utils
1376
1336
  * @since 2.0.0
1377
- * @category utilities
1378
1337
  */
1379
1338
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<Output, Input & Input2, Error | Error2, Env | Env2>;
1380
1339
  };
@@ -1384,7 +1343,8 @@ export declare const bothRight: {
1384
1343
  * outputting the result of the combination of both schedule outputs using the
1385
1344
  * specified `combine` function.
1386
1345
  *
1387
- * @example
1346
+ * **Example** (Combining schedule outputs)
1347
+ *
1388
1348
  * ```ts
1389
1349
  * import { Console, Effect, Schedule } from "effect"
1390
1350
  *
@@ -1413,8 +1373,8 @@ export declare const bothRight: {
1413
1373
  * })
1414
1374
  * ```
1415
1375
  *
1376
+ * @category utils
1416
1377
  * @since 2.0.0
1417
- * @category utilities
1418
1378
  */
1419
1379
  export declare const bothWith: {
1420
1380
  /**
@@ -1423,7 +1383,8 @@ export declare const bothWith: {
1423
1383
  * outputting the result of the combination of both schedule outputs using the
1424
1384
  * specified `combine` function.
1425
1385
  *
1426
- * @example
1386
+ * **Example** (Combining schedule outputs)
1387
+ *
1427
1388
  * ```ts
1428
1389
  * import { Console, Effect, Schedule } from "effect"
1429
1390
  *
@@ -1452,8 +1413,8 @@ export declare const bothWith: {
1452
1413
  * })
1453
1414
  * ```
1454
1415
  *
1416
+ * @category utils
1455
1417
  * @since 2.0.0
1456
- * @category utilities
1457
1418
  */
1458
1419
  <Output2, Input2, Error2, Env2, Output, Output3>(other: Schedule<Output2, Input2, Error2, Env2>, combine: (selfOutput: Output, otherOutput: Output2) => Output3): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output3, Input & Input2, Error | Error2, Env | Env2>;
1459
1420
  /**
@@ -1462,7 +1423,8 @@ export declare const bothWith: {
1462
1423
  * outputting the result of the combination of both schedule outputs using the
1463
1424
  * specified `combine` function.
1464
1425
  *
1465
- * @example
1426
+ * **Example** (Combining schedule outputs)
1427
+ *
1466
1428
  * ```ts
1467
1429
  * import { Console, Effect, Schedule } from "effect"
1468
1430
  *
@@ -1491,16 +1453,21 @@ export declare const bothWith: {
1491
1453
  * })
1492
1454
  * ```
1493
1455
  *
1456
+ * @category utils
1494
1457
  * @since 2.0.0
1495
- * @category utilities
1496
1458
  */
1497
1459
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2, Output3>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>, combine: (selfOutput: Output, otherOutput: Output2) => Output3): Schedule<Output3, Input & Input2, Error | Error2, Env | Env2>;
1498
1460
  };
1499
1461
  /**
1500
- * Returns a new `Schedule` that always recurs, collecting all inputs of the
1501
- * schedule into an array.
1462
+ * Returns a new `Schedule` that follows `self` and outputs the inputs seen so
1463
+ * far as an array.
1464
+ *
1465
+ * **Details**
1466
+ * This does not make the schedule run forever. The collected schedule stops
1467
+ * when `self` stops and fails when `self` fails.
1468
+ *
1469
+ * **Example** (Collecting schedule inputs)
1502
1470
  *
1503
- * @example
1504
1471
  * ```ts
1505
1472
  * import { Console, Effect, Schedule } from "effect"
1506
1473
  *
@@ -1522,15 +1489,20 @@ export declare const bothWith: {
1522
1489
  * })
1523
1490
  * ```
1524
1491
  *
1525
- * @since 2.0.0
1526
- * @category utilities
1492
+ * @category utils
1493
+ * @since 4.0.0
1527
1494
  */
1528
1495
  export declare const collectInputs: <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Array<Input>, Input, Error, Env>;
1529
1496
  /**
1530
- * Returns a new `Schedule` that always recurs, collecting all outputs of the
1531
- * schedule into an array.
1497
+ * Returns a new `Schedule` that follows `self` and outputs the schedule outputs
1498
+ * seen so far as an array.
1499
+ *
1500
+ * **Details**
1501
+ * This does not make the schedule run forever. The collected schedule stops
1502
+ * when `self` stops and fails when `self` fails.
1503
+ *
1504
+ * **Example** (Collecting schedule outputs)
1532
1505
  *
1533
- * @example
1534
1506
  * ```ts
1535
1507
  * import { Console, Effect, Schedule } from "effect"
1536
1508
  *
@@ -1550,39 +1522,19 @@ export declare const collectInputs: <Output, Input, Error, Env>(self: Schedule<O
1550
1522
  * })
1551
1523
  * ```
1552
1524
  *
1553
- * @since 2.0.0
1554
- * @category utilities
1525
+ * @category utils
1526
+ * @since 4.0.0
1555
1527
  */
1556
1528
  export declare const collectOutputs: <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Array<Output>, Input, Error, Env>;
1557
1529
  /**
1558
1530
  * Returns a new `Schedule` that recurs as long as the specified `predicate`
1559
1531
  * returns `true`, collecting all outputs of the schedule into an array.
1560
1532
  *
1561
- * @example
1533
+ * **Example** (Collecting outputs while a condition holds)
1534
+ *
1562
1535
  * ```ts
1563
1536
  * import { Console, Effect, Schedule } from "effect"
1564
1537
  *
1565
- * // Collect outputs while under time limit
1566
- * const collectForTime = Schedule.collectWhile(
1567
- * Schedule.spaced("500 millis"),
1568
- * (metadata) => Effect.succeed(metadata.elapsed < 3000) // Stop after 3 seconds
1569
- * )
1570
- *
1571
- * const timeBasedProgram = Effect.gen(function*() {
1572
- * const results = yield* Effect.repeat(
1573
- * Effect.gen(function*() {
1574
- * const value = Math.floor(Math.random() * 100)
1575
- * yield* Console.log(`Generated value: ${value}`)
1576
- * return value
1577
- * }),
1578
- * collectForTime
1579
- * )
1580
- *
1581
- * yield* Console.log(
1582
- * `Collected ${results.length} values: [${results.join(", ")}]`
1583
- * )
1584
- * })
1585
- *
1586
1538
  * // Collect outputs while condition is met
1587
1539
  * const collectWhileSmall = Schedule.collectWhile(
1588
1540
  * Schedule.exponential("100 millis"),
@@ -1593,16 +1545,16 @@ export declare const collectOutputs: <Output, Input, Error, Env>(self: Schedule<
1593
1545
  * const conditionalProgram = Effect.gen(function*() {
1594
1546
  * let attempt = 0
1595
1547
  *
1596
- * const delays = yield* Effect.repeat(
1548
+ * const attempts = yield* Effect.repeat(
1597
1549
  * Effect.gen(function*() {
1598
1550
  * attempt++
1599
1551
  * yield* Console.log(`Retry attempt ${attempt}`)
1600
- * return `${Date.now()}`
1552
+ * return `attempt-${attempt}`
1601
1553
  * }),
1602
1554
  * collectWhileSmall
1603
1555
  * )
1604
1556
  *
1605
- * yield* Console.log(`Collected attempts: [${delays.join(", ")}]`)
1557
+ * yield* Console.log(`Collected attempts: [${attempts.join(", ")}]`)
1606
1558
  * })
1607
1559
  *
1608
1560
  * // Collect with effectful predicate
@@ -1619,19 +1571,17 @@ export declare const collectOutputs: <Output, Input, Error, Env>(self: Schedule<
1619
1571
  * )
1620
1572
  *
1621
1573
  * const effectfulProgram = Effect.gen(function*() {
1622
- * const timestamps = yield* Effect.repeat(
1623
- * Effect.gen(function*() {
1624
- * const now = new Date().toISOString()
1625
- * yield* Console.log(`Task at ${now}`)
1626
- * return now
1627
- * }),
1574
+ * const results = yield* Effect.repeat(
1575
+ * Effect.succeed("checked"),
1628
1576
  * collectWithCheck
1629
1577
  * )
1630
1578
  *
1631
- * yield* Console.log(`Final collection: ${timestamps.length} items`)
1579
+ * yield* Console.log(`Final collection: ${results.length} items`)
1632
1580
  * })
1633
1581
  *
1634
1582
  * // Collect samples with condition
1583
+ * const samples = [12, 18, 24, 30, 36]
1584
+ *
1635
1585
  * const collectSamples = Schedule.collectWhile(
1636
1586
  * Schedule.spaced("200 millis"),
1637
1587
  * (metadata) =>
@@ -1639,55 +1589,36 @@ export declare const collectOutputs: <Output, Input, Error, Env>(self: Schedule<
1639
1589
  * )
1640
1590
  *
1641
1591
  * const samplingProgram = Effect.gen(function*() {
1642
- * const samples = yield* Effect.repeat(
1592
+ * let index = 0
1593
+ * const collected = yield* Effect.repeat(
1643
1594
  * Effect.gen(function*() {
1644
- * const sample = Math.random() * 100
1645
- * yield* Console.log(`Sample: ${sample.toFixed(1)}`)
1595
+ * const sample = samples[index++]
1596
+ * yield* Console.log(`Sample: ${sample}`)
1646
1597
  * return sample
1647
1598
  * }),
1648
1599
  * collectSamples
1649
1600
  * )
1650
1601
  *
1651
- * const average = samples.reduce((sum, s) => sum + s, 0) / samples.length
1602
+ * const average = collected.reduce((sum, s) => sum + s, 0) / collected.length
1652
1603
  * yield* Console.log(
1653
- * `Collected ${samples.length} samples, average: ${average.toFixed(1)}`
1604
+ * `Collected ${collected.length} samples, average: ${average.toFixed(1)}`
1654
1605
  * )
1655
1606
  * })
1656
1607
  * ```
1657
1608
  *
1609
+ * @category utils
1658
1610
  * @since 2.0.0
1659
- * @category utilities
1660
1611
  */
1661
1612
  export declare const collectWhile: {
1662
1613
  /**
1663
1614
  * Returns a new `Schedule` that recurs as long as the specified `predicate`
1664
1615
  * returns `true`, collecting all outputs of the schedule into an array.
1665
1616
  *
1666
- * @example
1617
+ * **Example** (Collecting outputs while a condition holds)
1618
+ *
1667
1619
  * ```ts
1668
1620
  * import { Console, Effect, Schedule } from "effect"
1669
1621
  *
1670
- * // Collect outputs while under time limit
1671
- * const collectForTime = Schedule.collectWhile(
1672
- * Schedule.spaced("500 millis"),
1673
- * (metadata) => Effect.succeed(metadata.elapsed < 3000) // Stop after 3 seconds
1674
- * )
1675
- *
1676
- * const timeBasedProgram = Effect.gen(function*() {
1677
- * const results = yield* Effect.repeat(
1678
- * Effect.gen(function*() {
1679
- * const value = Math.floor(Math.random() * 100)
1680
- * yield* Console.log(`Generated value: ${value}`)
1681
- * return value
1682
- * }),
1683
- * collectForTime
1684
- * )
1685
- *
1686
- * yield* Console.log(
1687
- * `Collected ${results.length} values: [${results.join(", ")}]`
1688
- * )
1689
- * })
1690
- *
1691
1622
  * // Collect outputs while condition is met
1692
1623
  * const collectWhileSmall = Schedule.collectWhile(
1693
1624
  * Schedule.exponential("100 millis"),
@@ -1698,16 +1629,16 @@ export declare const collectWhile: {
1698
1629
  * const conditionalProgram = Effect.gen(function*() {
1699
1630
  * let attempt = 0
1700
1631
  *
1701
- * const delays = yield* Effect.repeat(
1632
+ * const attempts = yield* Effect.repeat(
1702
1633
  * Effect.gen(function*() {
1703
1634
  * attempt++
1704
1635
  * yield* Console.log(`Retry attempt ${attempt}`)
1705
- * return `${Date.now()}`
1636
+ * return `attempt-${attempt}`
1706
1637
  * }),
1707
1638
  * collectWhileSmall
1708
1639
  * )
1709
1640
  *
1710
- * yield* Console.log(`Collected attempts: [${delays.join(", ")}]`)
1641
+ * yield* Console.log(`Collected attempts: [${attempts.join(", ")}]`)
1711
1642
  * })
1712
1643
  *
1713
1644
  * // Collect with effectful predicate
@@ -1724,19 +1655,17 @@ export declare const collectWhile: {
1724
1655
  * )
1725
1656
  *
1726
1657
  * const effectfulProgram = Effect.gen(function*() {
1727
- * const timestamps = yield* Effect.repeat(
1728
- * Effect.gen(function*() {
1729
- * const now = new Date().toISOString()
1730
- * yield* Console.log(`Task at ${now}`)
1731
- * return now
1732
- * }),
1658
+ * const results = yield* Effect.repeat(
1659
+ * Effect.succeed("checked"),
1733
1660
  * collectWithCheck
1734
1661
  * )
1735
1662
  *
1736
- * yield* Console.log(`Final collection: ${timestamps.length} items`)
1663
+ * yield* Console.log(`Final collection: ${results.length} items`)
1737
1664
  * })
1738
1665
  *
1739
1666
  * // Collect samples with condition
1667
+ * const samples = [12, 18, 24, 30, 36]
1668
+ *
1740
1669
  * const collectSamples = Schedule.collectWhile(
1741
1670
  * Schedule.spaced("200 millis"),
1742
1671
  * (metadata) =>
@@ -1744,55 +1673,36 @@ export declare const collectWhile: {
1744
1673
  * )
1745
1674
  *
1746
1675
  * const samplingProgram = Effect.gen(function*() {
1747
- * const samples = yield* Effect.repeat(
1676
+ * let index = 0
1677
+ * const collected = yield* Effect.repeat(
1748
1678
  * Effect.gen(function*() {
1749
- * const sample = Math.random() * 100
1750
- * yield* Console.log(`Sample: ${sample.toFixed(1)}`)
1679
+ * const sample = samples[index++]
1680
+ * yield* Console.log(`Sample: ${sample}`)
1751
1681
  * return sample
1752
1682
  * }),
1753
1683
  * collectSamples
1754
1684
  * )
1755
1685
  *
1756
- * const average = samples.reduce((sum, s) => sum + s, 0) / samples.length
1686
+ * const average = collected.reduce((sum, s) => sum + s, 0) / collected.length
1757
1687
  * yield* Console.log(
1758
- * `Collected ${samples.length} samples, average: ${average.toFixed(1)}`
1688
+ * `Collected ${collected.length} samples, average: ${average.toFixed(1)}`
1759
1689
  * )
1760
1690
  * })
1761
1691
  * ```
1762
1692
  *
1693
+ * @category utils
1763
1694
  * @since 2.0.0
1764
- * @category utilities
1765
1695
  */
1766
1696
  <Input, Output, Error2 = never, Env2 = never>(predicate: (metadata: Metadata<Output, Input>) => boolean | Effect<boolean, Error2, Env2>): <Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Array<Output>, Input, Error | Error2, Env | Env2>;
1767
1697
  /**
1768
1698
  * Returns a new `Schedule` that recurs as long as the specified `predicate`
1769
1699
  * returns `true`, collecting all outputs of the schedule into an array.
1770
1700
  *
1771
- * @example
1701
+ * **Example** (Collecting outputs while a condition holds)
1702
+ *
1772
1703
  * ```ts
1773
1704
  * import { Console, Effect, Schedule } from "effect"
1774
1705
  *
1775
- * // Collect outputs while under time limit
1776
- * const collectForTime = Schedule.collectWhile(
1777
- * Schedule.spaced("500 millis"),
1778
- * (metadata) => Effect.succeed(metadata.elapsed < 3000) // Stop after 3 seconds
1779
- * )
1780
- *
1781
- * const timeBasedProgram = Effect.gen(function*() {
1782
- * const results = yield* Effect.repeat(
1783
- * Effect.gen(function*() {
1784
- * const value = Math.floor(Math.random() * 100)
1785
- * yield* Console.log(`Generated value: ${value}`)
1786
- * return value
1787
- * }),
1788
- * collectForTime
1789
- * )
1790
- *
1791
- * yield* Console.log(
1792
- * `Collected ${results.length} values: [${results.join(", ")}]`
1793
- * )
1794
- * })
1795
- *
1796
1706
  * // Collect outputs while condition is met
1797
1707
  * const collectWhileSmall = Schedule.collectWhile(
1798
1708
  * Schedule.exponential("100 millis"),
@@ -1803,16 +1713,16 @@ export declare const collectWhile: {
1803
1713
  * const conditionalProgram = Effect.gen(function*() {
1804
1714
  * let attempt = 0
1805
1715
  *
1806
- * const delays = yield* Effect.repeat(
1716
+ * const attempts = yield* Effect.repeat(
1807
1717
  * Effect.gen(function*() {
1808
1718
  * attempt++
1809
1719
  * yield* Console.log(`Retry attempt ${attempt}`)
1810
- * return `${Date.now()}`
1720
+ * return `attempt-${attempt}`
1811
1721
  * }),
1812
1722
  * collectWhileSmall
1813
1723
  * )
1814
1724
  *
1815
- * yield* Console.log(`Collected attempts: [${delays.join(", ")}]`)
1725
+ * yield* Console.log(`Collected attempts: [${attempts.join(", ")}]`)
1816
1726
  * })
1817
1727
  *
1818
1728
  * // Collect with effectful predicate
@@ -1829,19 +1739,17 @@ export declare const collectWhile: {
1829
1739
  * )
1830
1740
  *
1831
1741
  * const effectfulProgram = Effect.gen(function*() {
1832
- * const timestamps = yield* Effect.repeat(
1833
- * Effect.gen(function*() {
1834
- * const now = new Date().toISOString()
1835
- * yield* Console.log(`Task at ${now}`)
1836
- * return now
1837
- * }),
1742
+ * const results = yield* Effect.repeat(
1743
+ * Effect.succeed("checked"),
1838
1744
  * collectWithCheck
1839
1745
  * )
1840
1746
  *
1841
- * yield* Console.log(`Final collection: ${timestamps.length} items`)
1747
+ * yield* Console.log(`Final collection: ${results.length} items`)
1842
1748
  * })
1843
1749
  *
1844
1750
  * // Collect samples with condition
1751
+ * const samples = [12, 18, 24, 30, 36]
1752
+ *
1845
1753
  * const collectSamples = Schedule.collectWhile(
1846
1754
  * Schedule.spaced("200 millis"),
1847
1755
  * (metadata) =>
@@ -1849,24 +1757,25 @@ export declare const collectWhile: {
1849
1757
  * )
1850
1758
  *
1851
1759
  * const samplingProgram = Effect.gen(function*() {
1852
- * const samples = yield* Effect.repeat(
1760
+ * let index = 0
1761
+ * const collected = yield* Effect.repeat(
1853
1762
  * Effect.gen(function*() {
1854
- * const sample = Math.random() * 100
1855
- * yield* Console.log(`Sample: ${sample.toFixed(1)}`)
1763
+ * const sample = samples[index++]
1764
+ * yield* Console.log(`Sample: ${sample}`)
1856
1765
  * return sample
1857
1766
  * }),
1858
1767
  * collectSamples
1859
1768
  * )
1860
1769
  *
1861
- * const average = samples.reduce((sum, s) => sum + s, 0) / samples.length
1770
+ * const average = collected.reduce((sum, s) => sum + s, 0) / collected.length
1862
1771
  * yield* Console.log(
1863
- * `Collected ${samples.length} samples, average: ${average.toFixed(1)}`
1772
+ * `Collected ${collected.length} samples, average: ${average.toFixed(1)}`
1864
1773
  * )
1865
1774
  * })
1866
1775
  * ```
1867
1776
  *
1777
+ * @category utils
1868
1778
  * @since 2.0.0
1869
- * @category utilities
1870
1779
  */
1871
1780
  <Output, Input, Error, Env, Error2 = never, Env2 = never>(self: Schedule<Output, Input, Error, Env>, predicate: (metadata: Metadata<Output, Input>) => boolean | Effect<boolean, Error2, Env2>): Schedule<Array<Output>, Input, Error | Error2, Env | Env2>;
1872
1781
  };
@@ -1874,7 +1783,8 @@ export declare const collectWhile: {
1874
1783
  * Returns a new `Schedule` that recurs on the specified `Cron` schedule and
1875
1784
  * outputs the duration between recurrences.
1876
1785
  *
1877
- * @example
1786
+ * **Example** (Scheduling work with cron expressions)
1787
+ *
1878
1788
  * ```ts
1879
1789
  * import { Console, Data, Effect, Schedule } from "effect"
1880
1790
  *
@@ -1886,7 +1796,7 @@ export declare const collectWhile: {
1886
1796
  * const minutelyProgram = Effect.gen(function*() {
1887
1797
  * yield* Effect.repeat(
1888
1798
  * Effect.gen(function*() {
1889
- * yield* Console.log(`Minutely task at ${new Date().toISOString()}`)
1799
+ * yield* Console.log("Running minutely task")
1890
1800
  * return "minute"
1891
1801
  * }),
1892
1802
  * everyMinute.pipe(
@@ -1924,8 +1834,8 @@ export declare const collectWhile: {
1924
1834
  * Effect.gen(function*() {
1925
1835
  * yield* Console.log("Generating weekly report...")
1926
1836
  * const report = {
1927
- * week: Math.floor(Date.now() / (7 * 24 * 60 * 60 * 1000)),
1928
- * timestamp: new Date().toISOString()
1837
+ * week: 42,
1838
+ * status: "ready" as const
1929
1839
  * }
1930
1840
  * yield* Console.log(`Report generated: ${JSON.stringify(report)}`)
1931
1841
  * return report
@@ -1938,10 +1848,13 @@ export declare const collectWhile: {
1938
1848
  * const businessHoursCheck = Schedule.cron("0,15,30,45 9-17 * * 1-5")
1939
1849
  *
1940
1850
  * const businessProgram = Effect.gen(function*() {
1851
+ * const statuses = ["healthy", "healthy", "degraded", "healthy"] as const
1852
+ * let index = 0
1853
+ *
1941
1854
  * yield* Effect.repeat(
1942
1855
  * Effect.gen(function*() {
1943
1856
  * yield* Console.log("Business hours health check...")
1944
- * const status = Math.random() > 0.1 ? "healthy" : "degraded"
1857
+ * const status = statuses[index++]
1945
1858
  * yield* Console.log(`System status: ${status}`)
1946
1859
  * return status
1947
1860
  * }),
@@ -1958,9 +1871,9 @@ export declare const collectWhile: {
1958
1871
  * yield* Effect.repeat(
1959
1872
  * Effect.gen(function*() {
1960
1873
  * yield* Console.log("Processing monthly invoices...")
1961
- * const invoiceCount = Math.floor(Math.random() * 100) + 50
1874
+ * const invoiceCount = 72
1962
1875
  * yield* Console.log(`Processed ${invoiceCount} invoices`)
1963
- * return { count: invoiceCount, date: new Date().toISOString() }
1876
+ * return { count: invoiceCount, batch: "2024-01-a" }
1964
1877
  * }),
1965
1878
  * monthlyInvoice.pipe(Schedule.take(1))
1966
1879
  * )
@@ -1974,11 +1887,13 @@ export declare const collectWhile: {
1974
1887
  * )
1975
1888
  *
1976
1889
  * const robustProgram = Effect.gen(function*() {
1890
+ * let attempt = 0
1891
+ *
1977
1892
  * yield* Effect.repeat(
1978
1893
  * Effect.gen(function*() {
1894
+ * attempt++
1979
1895
  * yield* Console.log("Complex scheduled task...")
1980
- * // Simulate occasional failures
1981
- * if (Math.random() < 0.3) {
1896
+ * if (attempt === 1) {
1982
1897
  * return yield* Effect.fail(new ScheduledTaskError({ message: "Scheduled task failed" }))
1983
1898
  * }
1984
1899
  * return "success"
@@ -1992,15 +1907,16 @@ export declare const collectWhile: {
1992
1907
  * })
1993
1908
  * ```
1994
1909
  *
1995
- * @since 4.0.0
1996
1910
  * @category constructors
1911
+ * @since 2.0.0
1997
1912
  */
1998
1913
  export declare const cron: {
1999
1914
  /**
2000
1915
  * Returns a new `Schedule` that recurs on the specified `Cron` schedule and
2001
1916
  * outputs the duration between recurrences.
2002
1917
  *
2003
- * @example
1918
+ * **Example** (Scheduling work with cron expressions)
1919
+ *
2004
1920
  * ```ts
2005
1921
  * import { Console, Data, Effect, Schedule } from "effect"
2006
1922
  *
@@ -2012,7 +1928,7 @@ export declare const cron: {
2012
1928
  * const minutelyProgram = Effect.gen(function*() {
2013
1929
  * yield* Effect.repeat(
2014
1930
  * Effect.gen(function*() {
2015
- * yield* Console.log(`Minutely task at ${new Date().toISOString()}`)
1931
+ * yield* Console.log("Running minutely task")
2016
1932
  * return "minute"
2017
1933
  * }),
2018
1934
  * everyMinute.pipe(
@@ -2050,8 +1966,8 @@ export declare const cron: {
2050
1966
  * Effect.gen(function*() {
2051
1967
  * yield* Console.log("Generating weekly report...")
2052
1968
  * const report = {
2053
- * week: Math.floor(Date.now() / (7 * 24 * 60 * 60 * 1000)),
2054
- * timestamp: new Date().toISOString()
1969
+ * week: 42,
1970
+ * status: "ready" as const
2055
1971
  * }
2056
1972
  * yield* Console.log(`Report generated: ${JSON.stringify(report)}`)
2057
1973
  * return report
@@ -2064,10 +1980,13 @@ export declare const cron: {
2064
1980
  * const businessHoursCheck = Schedule.cron("0,15,30,45 9-17 * * 1-5")
2065
1981
  *
2066
1982
  * const businessProgram = Effect.gen(function*() {
1983
+ * const statuses = ["healthy", "healthy", "degraded", "healthy"] as const
1984
+ * let index = 0
1985
+ *
2067
1986
  * yield* Effect.repeat(
2068
1987
  * Effect.gen(function*() {
2069
1988
  * yield* Console.log("Business hours health check...")
2070
- * const status = Math.random() > 0.1 ? "healthy" : "degraded"
1989
+ * const status = statuses[index++]
2071
1990
  * yield* Console.log(`System status: ${status}`)
2072
1991
  * return status
2073
1992
  * }),
@@ -2084,9 +2003,9 @@ export declare const cron: {
2084
2003
  * yield* Effect.repeat(
2085
2004
  * Effect.gen(function*() {
2086
2005
  * yield* Console.log("Processing monthly invoices...")
2087
- * const invoiceCount = Math.floor(Math.random() * 100) + 50
2006
+ * const invoiceCount = 72
2088
2007
  * yield* Console.log(`Processed ${invoiceCount} invoices`)
2089
- * return { count: invoiceCount, date: new Date().toISOString() }
2008
+ * return { count: invoiceCount, batch: "2024-01-a" }
2090
2009
  * }),
2091
2010
  * monthlyInvoice.pipe(Schedule.take(1))
2092
2011
  * )
@@ -2100,11 +2019,13 @@ export declare const cron: {
2100
2019
  * )
2101
2020
  *
2102
2021
  * const robustProgram = Effect.gen(function*() {
2022
+ * let attempt = 0
2023
+ *
2103
2024
  * yield* Effect.repeat(
2104
2025
  * Effect.gen(function*() {
2026
+ * attempt++
2105
2027
  * yield* Console.log("Complex scheduled task...")
2106
- * // Simulate occasional failures
2107
- * if (Math.random() < 0.3) {
2028
+ * if (attempt === 1) {
2108
2029
  * return yield* Effect.fail(new ScheduledTaskError({ message: "Scheduled task failed" }))
2109
2030
  * }
2110
2031
  * return "success"
@@ -2118,15 +2039,16 @@ export declare const cron: {
2118
2039
  * })
2119
2040
  * ```
2120
2041
  *
2121
- * @since 4.0.0
2122
2042
  * @category constructors
2043
+ * @since 2.0.0
2123
2044
  */
2124
2045
  (expression: Cron.Cron): Schedule<Duration.Duration, unknown, Cron.CronParseError>;
2125
2046
  /**
2126
2047
  * Returns a new `Schedule` that recurs on the specified `Cron` schedule and
2127
2048
  * outputs the duration between recurrences.
2128
2049
  *
2129
- * @example
2050
+ * **Example** (Scheduling work with cron expressions)
2051
+ *
2130
2052
  * ```ts
2131
2053
  * import { Console, Data, Effect, Schedule } from "effect"
2132
2054
  *
@@ -2138,7 +2060,7 @@ export declare const cron: {
2138
2060
  * const minutelyProgram = Effect.gen(function*() {
2139
2061
  * yield* Effect.repeat(
2140
2062
  * Effect.gen(function*() {
2141
- * yield* Console.log(`Minutely task at ${new Date().toISOString()}`)
2063
+ * yield* Console.log("Running minutely task")
2142
2064
  * return "minute"
2143
2065
  * }),
2144
2066
  * everyMinute.pipe(
@@ -2176,8 +2098,8 @@ export declare const cron: {
2176
2098
  * Effect.gen(function*() {
2177
2099
  * yield* Console.log("Generating weekly report...")
2178
2100
  * const report = {
2179
- * week: Math.floor(Date.now() / (7 * 24 * 60 * 60 * 1000)),
2180
- * timestamp: new Date().toISOString()
2101
+ * week: 42,
2102
+ * status: "ready" as const
2181
2103
  * }
2182
2104
  * yield* Console.log(`Report generated: ${JSON.stringify(report)}`)
2183
2105
  * return report
@@ -2190,10 +2112,13 @@ export declare const cron: {
2190
2112
  * const businessHoursCheck = Schedule.cron("0,15,30,45 9-17 * * 1-5")
2191
2113
  *
2192
2114
  * const businessProgram = Effect.gen(function*() {
2115
+ * const statuses = ["healthy", "healthy", "degraded", "healthy"] as const
2116
+ * let index = 0
2117
+ *
2193
2118
  * yield* Effect.repeat(
2194
2119
  * Effect.gen(function*() {
2195
2120
  * yield* Console.log("Business hours health check...")
2196
- * const status = Math.random() > 0.1 ? "healthy" : "degraded"
2121
+ * const status = statuses[index++]
2197
2122
  * yield* Console.log(`System status: ${status}`)
2198
2123
  * return status
2199
2124
  * }),
@@ -2210,9 +2135,9 @@ export declare const cron: {
2210
2135
  * yield* Effect.repeat(
2211
2136
  * Effect.gen(function*() {
2212
2137
  * yield* Console.log("Processing monthly invoices...")
2213
- * const invoiceCount = Math.floor(Math.random() * 100) + 50
2138
+ * const invoiceCount = 72
2214
2139
  * yield* Console.log(`Processed ${invoiceCount} invoices`)
2215
- * return { count: invoiceCount, date: new Date().toISOString() }
2140
+ * return { count: invoiceCount, batch: "2024-01-a" }
2216
2141
  * }),
2217
2142
  * monthlyInvoice.pipe(Schedule.take(1))
2218
2143
  * )
@@ -2226,11 +2151,13 @@ export declare const cron: {
2226
2151
  * )
2227
2152
  *
2228
2153
  * const robustProgram = Effect.gen(function*() {
2154
+ * let attempt = 0
2155
+ *
2229
2156
  * yield* Effect.repeat(
2230
2157
  * Effect.gen(function*() {
2158
+ * attempt++
2231
2159
  * yield* Console.log("Complex scheduled task...")
2232
- * // Simulate occasional failures
2233
- * if (Math.random() < 0.3) {
2160
+ * if (attempt === 1) {
2234
2161
  * return yield* Effect.fail(new ScheduledTaskError({ message: "Scheduled task failed" }))
2235
2162
  * }
2236
2163
  * return "success"
@@ -2244,15 +2171,16 @@ export declare const cron: {
2244
2171
  * })
2245
2172
  * ```
2246
2173
  *
2247
- * @since 4.0.0
2248
2174
  * @category constructors
2175
+ * @since 2.0.0
2249
2176
  */
2250
2177
  (expression: string, tz?: string | DateTime.TimeZone): Schedule<Duration.Duration, unknown, Cron.CronParseError>;
2251
2178
  };
2252
2179
  /**
2253
2180
  * Returns a new schedule that outputs the delay between each occurence.
2254
2181
  *
2255
- * @example
2182
+ * **Example** (Extracting schedule delays)
2183
+ *
2256
2184
  * ```ts
2257
2185
  * import { Console, Effect, Schedule } from "effect"
2258
2186
  *
@@ -2312,7 +2240,7 @@ export declare const cron: {
2312
2240
  * yield* Effect.repeat(
2313
2241
  * Effect.gen(function*() {
2314
2242
  * yield* Console.log("Adaptive task execution")
2315
- * return Date.now()
2243
+ * return "completed"
2316
2244
  * }),
2317
2245
  * adaptiveDelays.pipe(
2318
2246
  * Schedule.tapOutput((delay) => Console.log(`Adaptive delay: ${delay}`))
@@ -2329,8 +2257,8 @@ export declare const cron: {
2329
2257
  * )
2330
2258
  * ```
2331
2259
  *
2332
- * @since 2.0.0
2333
2260
  * @category constructors
2261
+ * @since 2.0.0
2334
2262
  */
2335
2263
  export declare const delays: <Out, In, E, R>(self: Schedule<Out, In, E, R>) => Schedule<Duration.Duration, In, E, R>;
2336
2264
  /**
@@ -2339,15 +2267,16 @@ export declare const delays: <Out, In, E, R>(self: Schedule<Out, In, E, R>) => S
2339
2267
  * The schedule outputs the configured duration for its first recurrence and
2340
2268
  * then completes.
2341
2269
  *
2342
- * @since 2.0.0
2343
2270
  * @category constructors
2271
+ * @since 2.0.0
2344
2272
  */
2345
2273
  export declare const duration: (durationInput: Duration.Input) => Schedule<Duration.Duration>;
2346
2274
  /**
2347
2275
  * Returns a new `Schedule` that will always recur, but only during the
2348
2276
  * specified `duration` of time.
2349
2277
  *
2350
- * @example
2278
+ * **Example** (Repeating work during a duration)
2279
+ *
2351
2280
  * ```ts
2352
2281
  * import { Console, Data, Effect, Schedule } from "effect"
2353
2282
  *
@@ -2357,12 +2286,9 @@ export declare const duration: (durationInput: Duration.Input) => Schedule<Durat
2357
2286
  * const fiveSecondSchedule = Schedule.during("5 seconds")
2358
2287
  *
2359
2288
  * const timedProgram = Effect.gen(function*() {
2360
- * const startTime = Date.now()
2361
- *
2362
2289
  * yield* Effect.repeat(
2363
2290
  * Effect.gen(function*() {
2364
- * const elapsed = Date.now() - startTime
2365
- * yield* Console.log(`Task executed after ${elapsed}ms`)
2291
+ * yield* Console.log("Task executed inside the time window")
2366
2292
  * yield* Effect.sleep("500 millis") // Each task takes 500ms
2367
2293
  * return "task done"
2368
2294
  * }),
@@ -2390,8 +2316,8 @@ export declare const duration: (durationInput: Duration.Input) => Schedule<Durat
2390
2316
  *
2391
2317
  * yield* Effect.repeat(
2392
2318
  * Effect.gen(function*() {
2393
- * yield* Console.log(`Burst task at ${new Date().toISOString()}`)
2394
- * return Math.random()
2319
+ * yield* Console.log("Burst task")
2320
+ * return "burst"
2395
2321
  * }),
2396
2322
  * burstWindow
2397
2323
  * )
@@ -2412,7 +2338,7 @@ export declare const duration: (durationInput: Duration.Input) => Schedule<Durat
2412
2338
  * attempt++
2413
2339
  * yield* Console.log(`Retry attempt ${attempt}`)
2414
2340
  *
2415
- * if (Math.random() < 0.8) { // 80% failure rate
2341
+ * if (attempt < 4) {
2416
2342
  * return yield* Effect.fail(new RetryAttemptError({ message: `Attempt ${attempt} failed` }))
2417
2343
  * }
2418
2344
  *
@@ -2427,8 +2353,8 @@ export declare const duration: (durationInput: Duration.Input) => Schedule<Durat
2427
2353
  * )
2428
2354
  * ```
2429
2355
  *
2430
- * @since 4.0.0
2431
2356
  * @category constructors
2357
+ * @since 4.0.0
2432
2358
  */
2433
2359
  export declare const during: (duration: Duration.Input) => Schedule<Duration.Duration>;
2434
2360
  /**
@@ -2436,7 +2362,8 @@ export declare const during: (duration: Duration.Input) => Schedule<Duration.Dur
2436
2362
  * to recur, using the minimum of the two durations between recurrences and
2437
2363
  * outputting a tuple of the outputs of both schedules.
2438
2364
  *
2439
- * @example
2365
+ * **Example** (Combining schedules with either semantics)
2366
+ *
2440
2367
  * ```ts
2441
2368
  * import { Console, Data, Effect, Schedule } from "effect"
2442
2369
  *
@@ -2453,7 +2380,7 @@ export declare const during: (duration: Duration.Input) => Schedule<Duration.Dur
2453
2380
  * const program = Effect.gen(function*() {
2454
2381
  * const results = yield* Effect.repeat(
2455
2382
  * Effect.gen(function*() {
2456
- * yield* Console.log(`Task executed at ${new Date().toISOString()}`)
2383
+ * yield* Console.log("Task executed")
2457
2384
  * return "task completed"
2458
2385
  * }),
2459
2386
  * eitherSchedule.pipe(
@@ -2499,8 +2426,8 @@ export declare const during: (duration: Duration.Input) => Schedule<Duration.Dur
2499
2426
  * // Compare with intersect which provides intersection semantics (AND logic)
2500
2427
  * ```
2501
2428
  *
2429
+ * @category utils
2502
2430
  * @since 2.0.0
2503
- * @category utilities
2504
2431
  */
2505
2432
  export declare const either: {
2506
2433
  /**
@@ -2508,7 +2435,8 @@ export declare const either: {
2508
2435
  * to recur, using the minimum of the two durations between recurrences and
2509
2436
  * outputting a tuple of the outputs of both schedules.
2510
2437
  *
2511
- * @example
2438
+ * **Example** (Combining schedules with either semantics)
2439
+ *
2512
2440
  * ```ts
2513
2441
  * import { Console, Data, Effect, Schedule } from "effect"
2514
2442
  *
@@ -2525,7 +2453,7 @@ export declare const either: {
2525
2453
  * const program = Effect.gen(function*() {
2526
2454
  * const results = yield* Effect.repeat(
2527
2455
  * Effect.gen(function*() {
2528
- * yield* Console.log(`Task executed at ${new Date().toISOString()}`)
2456
+ * yield* Console.log("Task executed")
2529
2457
  * return "task completed"
2530
2458
  * }),
2531
2459
  * eitherSchedule.pipe(
@@ -2571,8 +2499,8 @@ export declare const either: {
2571
2499
  * // Compare with intersect which provides intersection semantics (AND logic)
2572
2500
  * ```
2573
2501
  *
2502
+ * @category utils
2574
2503
  * @since 2.0.0
2575
- * @category utilities
2576
2504
  */
2577
2505
  <Output2, Input2, Error2, Env2>(other: Schedule<Output2, Input2, Error2, Env2>): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<[Output, Output2], Input & Input2, Error | Error2, Env | Env2>;
2578
2506
  /**
@@ -2580,7 +2508,8 @@ export declare const either: {
2580
2508
  * to recur, using the minimum of the two durations between recurrences and
2581
2509
  * outputting a tuple of the outputs of both schedules.
2582
2510
  *
2583
- * @example
2511
+ * **Example** (Combining schedules with either semantics)
2512
+ *
2584
2513
  * ```ts
2585
2514
  * import { Console, Data, Effect, Schedule } from "effect"
2586
2515
  *
@@ -2597,7 +2526,7 @@ export declare const either: {
2597
2526
  * const program = Effect.gen(function*() {
2598
2527
  * const results = yield* Effect.repeat(
2599
2528
  * Effect.gen(function*() {
2600
- * yield* Console.log(`Task executed at ${new Date().toISOString()}`)
2529
+ * yield* Console.log("Task executed")
2601
2530
  * return "task completed"
2602
2531
  * }),
2603
2532
  * eitherSchedule.pipe(
@@ -2643,8 +2572,8 @@ export declare const either: {
2643
2572
  * // Compare with intersect which provides intersection semantics (AND logic)
2644
2573
  * ```
2645
2574
  *
2575
+ * @category utils
2646
2576
  * @since 2.0.0
2647
- * @category utilities
2648
2577
  */
2649
2578
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<[Output, Output2], Input & Input2, Error | Error2, Env | Env2>;
2650
2579
  };
@@ -2653,7 +2582,8 @@ export declare const either: {
2653
2582
  * to recur, using the minimum of the two durations between recurrences and
2654
2583
  * outputting the result of the left schedule (i.e. `self`).
2655
2584
  *
2656
- * @example
2585
+ * **Example** (Combining either schedules and keeping the left output)
2586
+ *
2657
2587
  * ```ts
2658
2588
  * import { Console, Effect, Schedule } from "effect"
2659
2589
  *
@@ -2679,8 +2609,8 @@ export declare const either: {
2679
2609
  * })
2680
2610
  * ```
2681
2611
  *
2682
- * @since 2.0.0
2683
- * @category utilities
2612
+ * @category utils
2613
+ * @since 4.0.0
2684
2614
  */
2685
2615
  export declare const eitherLeft: {
2686
2616
  /**
@@ -2688,7 +2618,8 @@ export declare const eitherLeft: {
2688
2618
  * to recur, using the minimum of the two durations between recurrences and
2689
2619
  * outputting the result of the left schedule (i.e. `self`).
2690
2620
  *
2691
- * @example
2621
+ * **Example** (Combining either schedules and keeping the left output)
2622
+ *
2692
2623
  * ```ts
2693
2624
  * import { Console, Effect, Schedule } from "effect"
2694
2625
  *
@@ -2714,8 +2645,8 @@ export declare const eitherLeft: {
2714
2645
  * })
2715
2646
  * ```
2716
2647
  *
2717
- * @since 2.0.0
2718
- * @category utilities
2648
+ * @category utils
2649
+ * @since 4.0.0
2719
2650
  */
2720
2651
  <Output2, Input2, Error2, Env2>(other: Schedule<Output2, Input2, Error2, Env2>): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input & Input2, Error | Error2, Env | Env2>;
2721
2652
  /**
@@ -2723,7 +2654,8 @@ export declare const eitherLeft: {
2723
2654
  * to recur, using the minimum of the two durations between recurrences and
2724
2655
  * outputting the result of the left schedule (i.e. `self`).
2725
2656
  *
2726
- * @example
2657
+ * **Example** (Combining either schedules and keeping the left output)
2658
+ *
2727
2659
  * ```ts
2728
2660
  * import { Console, Effect, Schedule } from "effect"
2729
2661
  *
@@ -2749,8 +2681,8 @@ export declare const eitherLeft: {
2749
2681
  * })
2750
2682
  * ```
2751
2683
  *
2752
- * @since 2.0.0
2753
- * @category utilities
2684
+ * @category utils
2685
+ * @since 4.0.0
2754
2686
  */
2755
2687
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<Output, Input & Input2, Error | Error2, Env | Env2>;
2756
2688
  };
@@ -2759,7 +2691,8 @@ export declare const eitherLeft: {
2759
2691
  * to recur, using the minimum of the two durations between recurrences and
2760
2692
  * outputting the result of the right schedule (i.e. `other`).
2761
2693
  *
2762
- * @example
2694
+ * **Example** (Combining either schedules and keeping the right output)
2695
+ *
2763
2696
  * ```ts
2764
2697
  * import { Console, Effect, Schedule } from "effect"
2765
2698
  *
@@ -2785,8 +2718,8 @@ export declare const eitherLeft: {
2785
2718
  * })
2786
2719
  * ```
2787
2720
  *
2788
- * @since 2.0.0
2789
- * @category utilities
2721
+ * @category utils
2722
+ * @since 4.0.0
2790
2723
  */
2791
2724
  export declare const eitherRight: {
2792
2725
  /**
@@ -2794,7 +2727,8 @@ export declare const eitherRight: {
2794
2727
  * to recur, using the minimum of the two durations between recurrences and
2795
2728
  * outputting the result of the right schedule (i.e. `other`).
2796
2729
  *
2797
- * @example
2730
+ * **Example** (Combining either schedules and keeping the right output)
2731
+ *
2798
2732
  * ```ts
2799
2733
  * import { Console, Effect, Schedule } from "effect"
2800
2734
  *
@@ -2820,8 +2754,8 @@ export declare const eitherRight: {
2820
2754
  * })
2821
2755
  * ```
2822
2756
  *
2823
- * @since 2.0.0
2824
- * @category utilities
2757
+ * @category utils
2758
+ * @since 4.0.0
2825
2759
  */
2826
2760
  <Output2, Input2, Error2, Env2>(other: Schedule<Output2, Input2, Error2, Env2>): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output2, Input & Input2, Error | Error2, Env | Env2>;
2827
2761
  /**
@@ -2829,7 +2763,8 @@ export declare const eitherRight: {
2829
2763
  * to recur, using the minimum of the two durations between recurrences and
2830
2764
  * outputting the result of the right schedule (i.e. `other`).
2831
2765
  *
2832
- * @example
2766
+ * **Example** (Combining either schedules and keeping the right output)
2767
+ *
2833
2768
  * ```ts
2834
2769
  * import { Console, Effect, Schedule } from "effect"
2835
2770
  *
@@ -2855,8 +2790,8 @@ export declare const eitherRight: {
2855
2790
  * })
2856
2791
  * ```
2857
2792
  *
2858
- * @since 2.0.0
2859
- * @category utilities
2793
+ * @category utils
2794
+ * @since 4.0.0
2860
2795
  */
2861
2796
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<Output2, Input & Input2, Error | Error2, Env | Env2>;
2862
2797
  };
@@ -2866,7 +2801,8 @@ export declare const eitherRight: {
2866
2801
  * outputting the result of the combination of both schedule outputs using the
2867
2802
  * specified `combine` function.
2868
2803
  *
2869
- * @example
2804
+ * **Example** (Combining either schedule outputs)
2805
+ *
2870
2806
  * ```ts
2871
2807
  * import { Console, Effect, Schedule } from "effect"
2872
2808
  *
@@ -2896,8 +2832,8 @@ export declare const eitherRight: {
2896
2832
  * })
2897
2833
  * ```
2898
2834
  *
2835
+ * @category utils
2899
2836
  * @since 2.0.0
2900
- * @category utilities
2901
2837
  */
2902
2838
  export declare const eitherWith: {
2903
2839
  /**
@@ -2906,7 +2842,8 @@ export declare const eitherWith: {
2906
2842
  * outputting the result of the combination of both schedule outputs using the
2907
2843
  * specified `combine` function.
2908
2844
  *
2909
- * @example
2845
+ * **Example** (Combining either schedule outputs)
2846
+ *
2910
2847
  * ```ts
2911
2848
  * import { Console, Effect, Schedule } from "effect"
2912
2849
  *
@@ -2936,8 +2873,8 @@ export declare const eitherWith: {
2936
2873
  * })
2937
2874
  * ```
2938
2875
  *
2876
+ * @category utils
2939
2877
  * @since 2.0.0
2940
- * @category utilities
2941
2878
  */
2942
2879
  <Output2, Input2, Error2, Env2, Output, Output3>(other: Schedule<Output2, Input2, Error2, Env2>, combine: (selfOutput: Output, otherOutput: Output2) => Output3): <Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output3, Input & Input2, Error | Error2, Env | Env2>;
2943
2880
  /**
@@ -2946,7 +2883,8 @@ export declare const eitherWith: {
2946
2883
  * outputting the result of the combination of both schedule outputs using the
2947
2884
  * specified `combine` function.
2948
2885
  *
2949
- * @example
2886
+ * **Example** (Combining either schedule outputs)
2887
+ *
2950
2888
  * ```ts
2951
2889
  * import { Console, Effect, Schedule } from "effect"
2952
2890
  *
@@ -2976,8 +2914,8 @@ export declare const eitherWith: {
2976
2914
  * })
2977
2915
  * ```
2978
2916
  *
2917
+ * @category utils
2979
2918
  * @since 2.0.0
2980
- * @category utilities
2981
2919
  */
2982
2920
  <Output, Input, Error, Env, Output2, Input2, Error2, Env2, Output3>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>, combine: (selfOutput: Output, otherOutput: Output2) => Output3): Schedule<Output3, Input & Input2, Error | Error2, Env | Env2>;
2983
2921
  };
@@ -2987,9 +2925,8 @@ export declare const eitherWith: {
2987
2925
  * This schedule never stops and outputs the cumulative time that has passed since the schedule
2988
2926
  * started executing. Useful for tracking execution time or implementing time-based logic.
2989
2927
  *
2990
- * @returns A schedule that outputs the elapsed duration and never stops
2928
+ * **Example** (Measuring elapsed schedule time)
2991
2929
  *
2992
- * @example
2993
2930
  * ```ts
2994
2931
  * import { Console, Duration, Effect, Schedule } from "effect"
2995
2932
  *
@@ -3007,8 +2944,8 @@ export declare const eitherWith: {
3007
2944
  * })
3008
2945
  * ```
3009
2946
  *
3010
- * @since 2.0.0
3011
2947
  * @category constructors
2948
+ * @since 2.0.0
3012
2949
  */
3013
2950
  export declare const elapsed: Schedule<Duration.Duration>;
3014
2951
  /**
@@ -3016,7 +2953,8 @@ export declare const elapsed: Schedule<Duration.Duration>;
3016
2953
  * repetitions, given by `base * factor.pow(n)`, where `n` is the number of
3017
2954
  * repetitions so far. Returns the current duration between recurrences.
3018
2955
  *
3019
- * @example
2956
+ * **Example** (Retrying with exponential backoff)
2957
+ *
3020
2958
  * ```ts
3021
2959
  * import { Console, Data, Effect, Schedule } from "effect"
3022
2960
  *
@@ -3056,8 +2994,8 @@ export declare const elapsed: Schedule<Duration.Duration>;
3056
2994
  * // Will retry with delays: 50ms, 100ms, 200ms before success
3057
2995
  * ```
3058
2996
  *
3059
- * @since 2.0.0
3060
2997
  * @category constructors
2998
+ * @since 2.0.0
3061
2999
  */
3062
3000
  export declare const exponential: (base: Duration.Input, factor?: number) => Schedule<Duration.Duration>;
3063
3001
  /**
@@ -3065,7 +3003,8 @@ export declare const exponential: (base: Duration.Input, factor?: number) => Sch
3065
3003
  * two delays (similar to the fibonacci sequence). Returns the current
3066
3004
  * duration between recurrences.
3067
3005
  *
3068
- * @example
3006
+ * **Example** (Retrying with fibonacci backoff)
3007
+ *
3069
3008
  * ```ts
3070
3009
  * import { Console, Data, Effect, Schedule } from "effect"
3071
3010
  *
@@ -3101,7 +3040,7 @@ export declare const exponential: (base: Duration.Input, factor?: number) => Sch
3101
3040
  *
3102
3041
  * // Heartbeat with fibonacci intervals (starts fast, gets slower)
3103
3042
  * const adaptiveHeartbeat = Effect.gen(function*() {
3104
- * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`)
3043
+ * yield* Console.log("Heartbeat")
3105
3044
  * return "pulse"
3106
3045
  * }).pipe(
3107
3046
  * Effect.repeat(
@@ -3123,8 +3062,8 @@ export declare const exponential: (base: Duration.Input, factor?: number) => Sch
3123
3062
  * })
3124
3063
  * ```
3125
3064
  *
3126
- * @since 2.0.0
3127
3065
  * @category constructors
3066
+ * @since 2.0.0
3128
3067
  */
3129
3068
  export declare const fibonacci: (one: Duration.Input) => Schedule<Duration.Duration>;
3130
3069
  /**
@@ -3139,7 +3078,8 @@ export declare const fibonacci: (one: Duration.Input) => Schedule<Duration.Durat
3139
3078
  * |---------action--------||action|-----|action|-----------|
3140
3079
  * ```
3141
3080
  *
3142
- * @example
3081
+ * **Example** (Repeating on fixed intervals)
3082
+ *
3143
3083
  * ```ts
3144
3084
  * import { Console, Effect, Schedule } from "effect"
3145
3085
  *
@@ -3148,7 +3088,7 @@ export declare const fibonacci: (one: Duration.Input) => Schedule<Duration.Durat
3148
3088
  *
3149
3089
  * // Health check that runs at fixed intervals
3150
3090
  * const healthCheck = Effect.gen(function*() {
3151
- * yield* Console.log(`Health check at ${new Date().toISOString()}`)
3091
+ * yield* Console.log("Health check")
3152
3092
  * yield* Effect.sleep("200 millis") // simulate health check work
3153
3093
  * return "healthy"
3154
3094
  * }).pipe(
@@ -3186,15 +3126,16 @@ export declare const fibonacci: (one: Duration.Input) => Schedule<Duration.Durat
3186
3126
  * })
3187
3127
  * ```
3188
3128
  *
3189
- * @since 2.0.0
3190
3129
  * @category constructors
3130
+ * @since 2.0.0
3191
3131
  */
3192
3132
  export declare const fixed: (interval: Duration.Input) => Schedule<number>;
3193
3133
  /**
3194
3134
  * Returns a new `Schedule` that maps the output of this schedule using the
3195
3135
  * specified function.
3196
3136
  *
3197
- * @example
3137
+ * **Example** (Mapping schedule outputs)
3138
+ *
3198
3139
  * ```ts
3199
3140
  * import { Console, Effect, Schedule } from "effect"
3200
3141
  *
@@ -3212,7 +3153,6 @@ export declare const fixed: (interval: Duration.Input) => Schedule<number>;
3212
3153
  * const structuredSchedule = Schedule.spaced("1 second").pipe(
3213
3154
  * Schedule.map((recurrence) => Effect.succeed({
3214
3155
  * iteration: recurrence + 1,
3215
- * timestamp: new Date().toISOString(),
3216
3156
  * phase: recurrence < 5 ? "warmup" as const : "steady" as const
3217
3157
  * }))
3218
3158
  * )
@@ -3224,7 +3164,7 @@ export declare const fixed: (interval: Duration.Input) => Schedule<number>;
3224
3164
  * Schedule.take(8),
3225
3165
  * Schedule.tapOutput((info) =>
3226
3166
  * Console.log(
3227
- * `${info.phase} phase - iteration ${info.iteration} at ${info.timestamp}`
3167
+ * `${info.phase} phase - iteration ${info.iteration}`
3228
3168
  * )
3229
3169
  * )
3230
3170
  * )
@@ -3249,15 +3189,16 @@ export declare const fixed: (interval: Duration.Input) => Schedule<number>;
3249
3189
  * )
3250
3190
  * ```
3251
3191
  *
3252
- * @since 2.0.0
3253
3192
  * @category mapping
3193
+ * @since 2.0.0
3254
3194
  */
3255
3195
  export declare const map: {
3256
3196
  /**
3257
3197
  * Returns a new `Schedule` that maps the output of this schedule using the
3258
3198
  * specified function.
3259
3199
  *
3260
- * @example
3200
+ * **Example** (Mapping schedule outputs)
3201
+ *
3261
3202
  * ```ts
3262
3203
  * import { Console, Effect, Schedule } from "effect"
3263
3204
  *
@@ -3275,7 +3216,6 @@ export declare const map: {
3275
3216
  * const structuredSchedule = Schedule.spaced("1 second").pipe(
3276
3217
  * Schedule.map((recurrence) => Effect.succeed({
3277
3218
  * iteration: recurrence + 1,
3278
- * timestamp: new Date().toISOString(),
3279
3219
  * phase: recurrence < 5 ? "warmup" as const : "steady" as const
3280
3220
  * }))
3281
3221
  * )
@@ -3287,7 +3227,7 @@ export declare const map: {
3287
3227
  * Schedule.take(8),
3288
3228
  * Schedule.tapOutput((info) =>
3289
3229
  * Console.log(
3290
- * `${info.phase} phase - iteration ${info.iteration} at ${info.timestamp}`
3230
+ * `${info.phase} phase - iteration ${info.iteration}`
3291
3231
  * )
3292
3232
  * )
3293
3233
  * )
@@ -3312,15 +3252,16 @@ export declare const map: {
3312
3252
  * )
3313
3253
  * ```
3314
3254
  *
3315
- * @since 2.0.0
3316
3255
  * @category mapping
3256
+ * @since 2.0.0
3317
3257
  */
3318
3258
  <Output, Output2, Error2 = never, Env2 = never>(f: (output: Output) => Output2 | Effect<Output2, Error2, Env2>): <Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output2, Input, Error | Error2, Env | Env2>;
3319
3259
  /**
3320
3260
  * Returns a new `Schedule` that maps the output of this schedule using the
3321
3261
  * specified function.
3322
3262
  *
3323
- * @example
3263
+ * **Example** (Mapping schedule outputs)
3264
+ *
3324
3265
  * ```ts
3325
3266
  * import { Console, Effect, Schedule } from "effect"
3326
3267
  *
@@ -3338,7 +3279,6 @@ export declare const map: {
3338
3279
  * const structuredSchedule = Schedule.spaced("1 second").pipe(
3339
3280
  * Schedule.map((recurrence) => Effect.succeed({
3340
3281
  * iteration: recurrence + 1,
3341
- * timestamp: new Date().toISOString(),
3342
3282
  * phase: recurrence < 5 ? "warmup" as const : "steady" as const
3343
3283
  * }))
3344
3284
  * )
@@ -3350,7 +3290,7 @@ export declare const map: {
3350
3290
  * Schedule.take(8),
3351
3291
  * Schedule.tapOutput((info) =>
3352
3292
  * Console.log(
3353
- * `${info.phase} phase - iteration ${info.iteration} at ${info.timestamp}`
3293
+ * `${info.phase} phase - iteration ${info.iteration}`
3354
3294
  * )
3355
3295
  * )
3356
3296
  * )
@@ -3375,8 +3315,8 @@ export declare const map: {
3375
3315
  * )
3376
3316
  * ```
3377
3317
  *
3378
- * @since 2.0.0
3379
3318
  * @category mapping
3319
+ * @since 2.0.0
3380
3320
  */
3381
3321
  <Output, Input, Error, Env, Output2, Error2 = never, Env2 = never>(self: Schedule<Output, Input, Error, Env>, f: (output: Output) => Output2 | Effect<Output2, Error2, Env2>): Schedule<Output2, Input, Error | Error2, Env | Env2>;
3382
3322
  };
@@ -3384,7 +3324,8 @@ export declare const map: {
3384
3324
  * Returns a new `Schedule` that modifies the delay of the next recurrence
3385
3325
  * of the schedule using the specified effectual function.
3386
3326
  *
3387
- * @example
3327
+ * **Example** (Modifying delays from schedule output)
3328
+ *
3388
3329
  * ```ts
3389
3330
  * import { Console, Duration, Effect, Schedule } from "effect"
3390
3331
  *
@@ -3409,15 +3350,16 @@ export declare const map: {
3409
3350
  * })
3410
3351
  * ```
3411
3352
  *
3353
+ * @category utils
3412
3354
  * @since 2.0.0
3413
- * @category utilities
3414
3355
  */
3415
3356
  export declare const modifyDelay: {
3416
3357
  /**
3417
3358
  * Returns a new `Schedule` that modifies the delay of the next recurrence
3418
3359
  * of the schedule using the specified effectual function.
3419
3360
  *
3420
- * @example
3361
+ * **Example** (Modifying delays from schedule output)
3362
+ *
3421
3363
  * ```ts
3422
3364
  * import { Console, Duration, Effect, Schedule } from "effect"
3423
3365
  *
@@ -3442,15 +3384,16 @@ export declare const modifyDelay: {
3442
3384
  * })
3443
3385
  * ```
3444
3386
  *
3387
+ * @category utils
3445
3388
  * @since 2.0.0
3446
- * @category utilities
3447
3389
  */
3448
3390
  <Output, Error2 = never, Env2 = never>(f: (output: Output, delay: Duration.Duration) => Effect<Duration.Input, Error2, Env2>): <Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error | Error2, Env | Env2>;
3449
3391
  /**
3450
3392
  * Returns a new `Schedule` that modifies the delay of the next recurrence
3451
3393
  * of the schedule using the specified effectual function.
3452
3394
  *
3453
- * @example
3395
+ * **Example** (Modifying delays from schedule output)
3396
+ *
3454
3397
  * ```ts
3455
3398
  * import { Console, Duration, Effect, Schedule } from "effect"
3456
3399
  *
@@ -3475,8 +3418,8 @@ export declare const modifyDelay: {
3475
3418
  * })
3476
3419
  * ```
3477
3420
  *
3421
+ * @category utils
3478
3422
  * @since 2.0.0
3479
- * @category utilities
3480
3423
  */
3481
3424
  <Output, Input, Error, Env, Error2 = never, Env2 = never>(self: Schedule<Output, Input, Error, Env>, f: (output: Output, delay: Duration.Input) => Effect<Duration.Input, Error2, Env2>): Schedule<Output, Input, Error | Error2, Env | Env2>;
3482
3425
  };
@@ -3485,14 +3428,15 @@ export declare const modifyDelay: {
3485
3428
  *
3486
3429
  * Delays are jittered between `80%` and `120%` of the original delay.
3487
3430
  *
3431
+ * @category utils
3488
3432
  * @since 2.0.0
3489
- * @category utilities
3490
3433
  */
3491
3434
  export declare const jittered: <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error, Env>;
3492
3435
  /**
3493
3436
  * Returns a new `Schedule` that outputs the inputs of the specified schedule.
3494
3437
  *
3495
- * @example
3438
+ * **Example** (Passing inputs through as outputs)
3439
+ *
3496
3440
  * ```ts
3497
3441
  * import { Console, Effect, Schedule } from "effect"
3498
3442
  *
@@ -3514,15 +3458,16 @@ export declare const jittered: <Output, Input, Error, Env>(self: Schedule<Output
3514
3458
  * })
3515
3459
  * ```
3516
3460
  *
3461
+ * @category utils
3517
3462
  * @since 2.0.0
3518
- * @category utilities
3519
3463
  */
3520
3464
  export declare const passthrough: <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Input, Input, Error, Env>;
3521
3465
  /**
3522
3466
  * Returns a `Schedule` which can only be stepped the specified number of
3523
3467
  * `times` before it terminates.
3524
3468
  *
3525
- * @example
3469
+ * **Example** (Limiting recurrences)
3470
+ *
3526
3471
  * ```ts
3527
3472
  * import { Console, Data, Effect, Schedule } from "effect"
3528
3473
  *
@@ -3560,7 +3505,7 @@ export declare const passthrough: <Output, Input, Error, Env>(self: Schedule<Out
3560
3505
  * // Repeat an effect exactly 10 times
3561
3506
  * const exactlyTenTimes = Effect.gen(function*() {
3562
3507
  * yield* Console.log("Executing task...")
3563
- * return Math.random()
3508
+ * return "completed"
3564
3509
  * }).pipe(
3565
3510
  * Effect.repeat(Schedule.recurs(10))
3566
3511
  * )
@@ -3580,7 +3525,8 @@ export declare const recurs: (times: number) => Schedule<number>;
3580
3525
  * using the specified effectful `combine` function and starting from the
3581
3526
  * specified `initial` state.
3582
3527
  *
3583
- * @example
3528
+ * **Example** (Reducing schedule outputs)
3529
+ *
3584
3530
  * ```ts
3585
3531
  * import { Console, Effect, Schedule } from "effect"
3586
3532
  *
@@ -3605,24 +3551,24 @@ export declare const recurs: (times: number) => Schedule<number>;
3605
3551
  * yield* Console.log(`Final sum: ${finalSum}`)
3606
3552
  * })
3607
3553
  *
3608
- * // Build a history of execution times
3554
+ * // Build a history of execution counts
3609
3555
  * const historySchedule = Schedule.reduce(
3610
3556
  * Schedule.spaced("1 second").pipe(Schedule.take(4)),
3611
3557
  * () => [] as Array<number>, // Initial empty array
3612
- * (history, executionNumber) => Effect.succeed([...history, Date.now()])
3558
+ * (history, executionNumber) => Effect.succeed([...history, executionNumber])
3613
3559
  * )
3614
3560
  *
3615
3561
  * const historyProgram = Effect.gen(function*() {
3616
3562
  * const timeline = yield* Effect.repeat(
3617
3563
  * Effect.gen(function*() {
3618
- * yield* Console.log("Recording timestamp...")
3564
+ * yield* Console.log("Recording execution...")
3619
3565
  * return "recorded"
3620
3566
  * }),
3621
3567
  * historySchedule
3622
3568
  * )
3623
3569
  *
3624
3570
  * yield* Console.log(
3625
- * `Execution timeline: ${timeline.length} timestamps recorded`
3571
+ * `Execution timeline: ${timeline.join(", ")}`
3626
3572
  * )
3627
3573
  * })
3628
3574
  *
@@ -3683,8 +3629,8 @@ export declare const recurs: (times: number) => Schedule<number>;
3683
3629
  * })
3684
3630
  * ```
3685
3631
  *
3632
+ * @category utils
3686
3633
  * @since 2.0.0
3687
- * @category utilities
3688
3634
  */
3689
3635
  export declare const reduce: {
3690
3636
  /**
@@ -3692,7 +3638,8 @@ export declare const reduce: {
3692
3638
  * using the specified effectful `combine` function and starting from the
3693
3639
  * specified `initial` state.
3694
3640
  *
3695
- * @example
3641
+ * **Example** (Reducing schedule outputs)
3642
+ *
3696
3643
  * ```ts
3697
3644
  * import { Console, Effect, Schedule } from "effect"
3698
3645
  *
@@ -3717,24 +3664,24 @@ export declare const reduce: {
3717
3664
  * yield* Console.log(`Final sum: ${finalSum}`)
3718
3665
  * })
3719
3666
  *
3720
- * // Build a history of execution times
3667
+ * // Build a history of execution counts
3721
3668
  * const historySchedule = Schedule.reduce(
3722
3669
  * Schedule.spaced("1 second").pipe(Schedule.take(4)),
3723
3670
  * () => [] as Array<number>, // Initial empty array
3724
- * (history, executionNumber) => Effect.succeed([...history, Date.now()])
3671
+ * (history, executionNumber) => Effect.succeed([...history, executionNumber])
3725
3672
  * )
3726
3673
  *
3727
3674
  * const historyProgram = Effect.gen(function*() {
3728
3675
  * const timeline = yield* Effect.repeat(
3729
3676
  * Effect.gen(function*() {
3730
- * yield* Console.log("Recording timestamp...")
3677
+ * yield* Console.log("Recording execution...")
3731
3678
  * return "recorded"
3732
3679
  * }),
3733
3680
  * historySchedule
3734
3681
  * )
3735
3682
  *
3736
3683
  * yield* Console.log(
3737
- * `Execution timeline: ${timeline.length} timestamps recorded`
3684
+ * `Execution timeline: ${timeline.join(", ")}`
3738
3685
  * )
3739
3686
  * })
3740
3687
  *
@@ -3795,8 +3742,8 @@ export declare const reduce: {
3795
3742
  * })
3796
3743
  * ```
3797
3744
  *
3745
+ * @category utils
3798
3746
  * @since 2.0.0
3799
- * @category utilities
3800
3747
  */
3801
3748
  <State, Output, Error2 = never, Env2 = never>(initial: LazyArg<State>, combine: (state: State, output: Output) => State | Effect<State, Error2, Env2>): <Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<State, Input, Error | Error2, Env | Env2>;
3802
3749
  /**
@@ -3804,7 +3751,8 @@ export declare const reduce: {
3804
3751
  * using the specified effectful `combine` function and starting from the
3805
3752
  * specified `initial` state.
3806
3753
  *
3807
- * @example
3754
+ * **Example** (Reducing schedule outputs)
3755
+ *
3808
3756
  * ```ts
3809
3757
  * import { Console, Effect, Schedule } from "effect"
3810
3758
  *
@@ -3829,24 +3777,24 @@ export declare const reduce: {
3829
3777
  * yield* Console.log(`Final sum: ${finalSum}`)
3830
3778
  * })
3831
3779
  *
3832
- * // Build a history of execution times
3780
+ * // Build a history of execution counts
3833
3781
  * const historySchedule = Schedule.reduce(
3834
3782
  * Schedule.spaced("1 second").pipe(Schedule.take(4)),
3835
3783
  * () => [] as Array<number>, // Initial empty array
3836
- * (history, executionNumber) => Effect.succeed([...history, Date.now()])
3784
+ * (history, executionNumber) => Effect.succeed([...history, executionNumber])
3837
3785
  * )
3838
3786
  *
3839
3787
  * const historyProgram = Effect.gen(function*() {
3840
3788
  * const timeline = yield* Effect.repeat(
3841
3789
  * Effect.gen(function*() {
3842
- * yield* Console.log("Recording timestamp...")
3790
+ * yield* Console.log("Recording execution...")
3843
3791
  * return "recorded"
3844
3792
  * }),
3845
3793
  * historySchedule
3846
3794
  * )
3847
3795
  *
3848
3796
  * yield* Console.log(
3849
- * `Execution timeline: ${timeline.length} timestamps recorded`
3797
+ * `Execution timeline: ${timeline.join(", ")}`
3850
3798
  * )
3851
3799
  * })
3852
3800
  *
@@ -3907,8 +3855,8 @@ export declare const reduce: {
3907
3855
  * })
3908
3856
  * ```
3909
3857
  *
3858
+ * @category utils
3910
3859
  * @since 2.0.0
3911
- * @category utilities
3912
3860
  */
3913
3861
  <Output, Input, Error, Env, State, Error2 = never, Env2 = never>(self: Schedule<Output, Input, Error, Env>, initial: LazyArg<State>, combine: (state: State, output: Output) => State | Effect<State, Error2, Env2>): Schedule<State, Input, Error | Error2, Env | Env2>;
3914
3862
  };
@@ -3916,7 +3864,8 @@ export declare const reduce: {
3916
3864
  * Returns a schedule that recurs continuously, each repetition spaced the
3917
3865
  * specified duration from the last run.
3918
3866
  *
3919
- * @example
3867
+ * **Example** (Repeating with fixed spacing)
3868
+ *
3920
3869
  * ```ts
3921
3870
  * import { Console, Effect, Schedule } from "effect"
3922
3871
  *
@@ -3925,7 +3874,7 @@ export declare const reduce: {
3925
3874
  *
3926
3875
  * // Heartbeat that runs indefinitely with fixed spacing
3927
3876
  * const heartbeat = Effect.gen(function*() {
3928
- * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`)
3877
+ * yield* Console.log("Heartbeat")
3929
3878
  * }).pipe(
3930
3879
  * Effect.repeat(everyTwoSeconds)
3931
3880
  * )
@@ -3958,8 +3907,8 @@ export declare const reduce: {
3958
3907
  * })
3959
3908
  * ```
3960
3909
  *
3961
- * @since 2.0.0
3962
3910
  * @category constructors
3911
+ * @since 2.0.0
3963
3912
  */
3964
3913
  export declare const spaced: (duration: Duration.Input) => Schedule<number>;
3965
3914
  /**
@@ -3967,7 +3916,8 @@ export declare const spaced: (duration: Duration.Input) => Schedule<number>;
3967
3916
  * every input to the schedule, but does not alter the inputs and outputs of
3968
3917
  * the schedule.
3969
3918
  *
3970
- * @example
3919
+ * **Example** (Tapping retry inputs)
3920
+ *
3971
3921
  * ```ts
3972
3922
  * import { Console, Data, Effect, Schedule } from "effect"
3973
3923
  *
@@ -4003,7 +3953,6 @@ export declare const spaced: (duration: Duration.Input) => Schedule<number>;
4003
3953
  * Schedule.take(5),
4004
3954
  * Schedule.tapInput((input: unknown) =>
4005
3955
  * Effect.gen(function*() {
4006
- * yield* Console.log(`Processing input at ${new Date().toISOString()}`)
4007
3956
  * yield* Console.log(`Input type: ${typeof input}`)
4008
3957
  * // In real applications, might send metrics to monitoring system
4009
3958
  * })
@@ -4025,10 +3974,13 @@ export declare const spaced: (duration: Duration.Input) => Schedule<number>;
4025
3974
  * )
4026
3975
  *
4027
3976
  * const validationProgram = Effect.gen(function*() {
3977
+ * let count = 0
3978
+ *
4028
3979
  * yield* Effect.repeat(
4029
3980
  * Effect.gen(function*() {
3981
+ * count++
4030
3982
  * yield* Console.log("Task with validation")
4031
- * return { data: Math.random(), timestamp: Date.now() }
3983
+ * return { data: `sample-${count}` }
4032
3984
  * }),
4033
3985
  * validatingSchedule
4034
3986
  * )
@@ -4040,10 +3992,10 @@ export declare const spaced: (duration: Duration.Input) => Schedule<number>;
4040
3992
  * Schedule.tapInput((error: RetryError) =>
4041
3993
  * Effect.gen(function*() {
4042
3994
  * if (String(error).includes("critical")) {
4043
- * yield* Console.log(`🚨 CRITICAL ERROR: ${String(error)}`)
3995
+ * yield* Console.log(`Critical error: ${String(error)}`)
4044
3996
  * // In real applications, might trigger alerts or notifications
4045
3997
  * } else {
4046
- * yield* Console.log(`ℹ️ Regular error: ${String(error)}`)
3998
+ * yield* Console.log(`Regular error: ${String(error)}`)
4047
3999
  * }
4048
4000
  * })
4049
4001
  * )
@@ -4077,14 +4029,14 @@ export declare const spaced: (duration: Duration.Input) => Schedule<number>;
4077
4029
  * ),
4078
4030
  * Schedule.tapInput((error: RetryError) =>
4079
4031
  * String(error).length > 20
4080
- * ? Console.log("📝 Long error message detected")
4032
+ * ? Console.log("Long error message detected")
4081
4033
  * : Effect.void
4082
4034
  * )
4083
4035
  * )
4084
4036
  * ```
4085
4037
  *
4086
- * @since 2.0.0
4087
4038
  * @category sequencing
4039
+ * @since 2.0.0
4088
4040
  */
4089
4041
  export declare const tapInput: {
4090
4042
  /**
@@ -4092,7 +4044,8 @@ export declare const tapInput: {
4092
4044
  * every input to the schedule, but does not alter the inputs and outputs of
4093
4045
  * the schedule.
4094
4046
  *
4095
- * @example
4047
+ * **Example** (Tapping retry inputs)
4048
+ *
4096
4049
  * ```ts
4097
4050
  * import { Console, Data, Effect, Schedule } from "effect"
4098
4051
  *
@@ -4128,7 +4081,6 @@ export declare const tapInput: {
4128
4081
  * Schedule.take(5),
4129
4082
  * Schedule.tapInput((input: unknown) =>
4130
4083
  * Effect.gen(function*() {
4131
- * yield* Console.log(`Processing input at ${new Date().toISOString()}`)
4132
4084
  * yield* Console.log(`Input type: ${typeof input}`)
4133
4085
  * // In real applications, might send metrics to monitoring system
4134
4086
  * })
@@ -4150,10 +4102,13 @@ export declare const tapInput: {
4150
4102
  * )
4151
4103
  *
4152
4104
  * const validationProgram = Effect.gen(function*() {
4105
+ * let count = 0
4106
+ *
4153
4107
  * yield* Effect.repeat(
4154
4108
  * Effect.gen(function*() {
4109
+ * count++
4155
4110
  * yield* Console.log("Task with validation")
4156
- * return { data: Math.random(), timestamp: Date.now() }
4111
+ * return { data: `sample-${count}` }
4157
4112
  * }),
4158
4113
  * validatingSchedule
4159
4114
  * )
@@ -4165,10 +4120,10 @@ export declare const tapInput: {
4165
4120
  * Schedule.tapInput((error: RetryError) =>
4166
4121
  * Effect.gen(function*() {
4167
4122
  * if (String(error).includes("critical")) {
4168
- * yield* Console.log(`🚨 CRITICAL ERROR: ${String(error)}`)
4123
+ * yield* Console.log(`Critical error: ${String(error)}`)
4169
4124
  * // In real applications, might trigger alerts or notifications
4170
4125
  * } else {
4171
- * yield* Console.log(`ℹ️ Regular error: ${String(error)}`)
4126
+ * yield* Console.log(`Regular error: ${String(error)}`)
4172
4127
  * }
4173
4128
  * })
4174
4129
  * )
@@ -4202,14 +4157,14 @@ export declare const tapInput: {
4202
4157
  * ),
4203
4158
  * Schedule.tapInput((error: RetryError) =>
4204
4159
  * String(error).length > 20
4205
- * ? Console.log("📝 Long error message detected")
4160
+ * ? Console.log("Long error message detected")
4206
4161
  * : Effect.void
4207
4162
  * )
4208
4163
  * )
4209
4164
  * ```
4210
4165
  *
4211
- * @since 2.0.0
4212
4166
  * @category sequencing
4167
+ * @since 2.0.0
4213
4168
  */
4214
4169
  <Input, X, Error2, Env2>(f: (input: Input) => Effect<X, Error2, Env2>): <Output, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error | Error2, Env | Env2>;
4215
4170
  /**
@@ -4217,7 +4172,8 @@ export declare const tapInput: {
4217
4172
  * every input to the schedule, but does not alter the inputs and outputs of
4218
4173
  * the schedule.
4219
4174
  *
4220
- * @example
4175
+ * **Example** (Tapping retry inputs)
4176
+ *
4221
4177
  * ```ts
4222
4178
  * import { Console, Data, Effect, Schedule } from "effect"
4223
4179
  *
@@ -4253,7 +4209,6 @@ export declare const tapInput: {
4253
4209
  * Schedule.take(5),
4254
4210
  * Schedule.tapInput((input: unknown) =>
4255
4211
  * Effect.gen(function*() {
4256
- * yield* Console.log(`Processing input at ${new Date().toISOString()}`)
4257
4212
  * yield* Console.log(`Input type: ${typeof input}`)
4258
4213
  * // In real applications, might send metrics to monitoring system
4259
4214
  * })
@@ -4275,10 +4230,13 @@ export declare const tapInput: {
4275
4230
  * )
4276
4231
  *
4277
4232
  * const validationProgram = Effect.gen(function*() {
4233
+ * let count = 0
4234
+ *
4278
4235
  * yield* Effect.repeat(
4279
4236
  * Effect.gen(function*() {
4237
+ * count++
4280
4238
  * yield* Console.log("Task with validation")
4281
- * return { data: Math.random(), timestamp: Date.now() }
4239
+ * return { data: `sample-${count}` }
4282
4240
  * }),
4283
4241
  * validatingSchedule
4284
4242
  * )
@@ -4290,10 +4248,10 @@ export declare const tapInput: {
4290
4248
  * Schedule.tapInput((error: RetryError) =>
4291
4249
  * Effect.gen(function*() {
4292
4250
  * if (String(error).includes("critical")) {
4293
- * yield* Console.log(`🚨 CRITICAL ERROR: ${String(error)}`)
4251
+ * yield* Console.log(`Critical error: ${String(error)}`)
4294
4252
  * // In real applications, might trigger alerts or notifications
4295
4253
  * } else {
4296
- * yield* Console.log(`ℹ️ Regular error: ${String(error)}`)
4254
+ * yield* Console.log(`Regular error: ${String(error)}`)
4297
4255
  * }
4298
4256
  * })
4299
4257
  * )
@@ -4327,14 +4285,14 @@ export declare const tapInput: {
4327
4285
  * ),
4328
4286
  * Schedule.tapInput((error: RetryError) =>
4329
4287
  * String(error).length > 20
4330
- * ? Console.log("📝 Long error message detected")
4288
+ * ? Console.log("Long error message detected")
4331
4289
  * : Effect.void
4332
4290
  * )
4333
4291
  * )
4334
4292
  * ```
4335
4293
  *
4336
- * @since 2.0.0
4337
4294
  * @category sequencing
4295
+ * @since 2.0.0
4338
4296
  */
4339
4297
  <Output, Input, Error, Env, X, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, f: (input: Input) => Effect<X, Error2, Env2>): Schedule<Output, Input, Error | Error2, Env | Env2>;
4340
4298
  };
@@ -4343,7 +4301,8 @@ export declare const tapInput: {
4343
4301
  * every output of the schedule, but does not alter the inputs and outputs of
4344
4302
  * the schedule.
4345
4303
  *
4346
- * @example
4304
+ * **Example** (Tapping schedule outputs)
4305
+ *
4347
4306
  * ```ts
4348
4307
  * import { Console, Data, Effect, Schedule } from "effect"
4349
4308
  *
@@ -4391,7 +4350,7 @@ export declare const tapInput: {
4391
4350
  * Effect.gen(function*() {
4392
4351
  * const delayMs = delay.toString()
4393
4352
  * if (delayMs.includes("1000")) { // Alert on delays >= 1 second
4394
- * yield* Console.log(`🚨 High delay detected: ${delay}`)
4353
+ * yield* Console.log(`High delay detected: ${delay}`)
4395
4354
  * }
4396
4355
  * })
4397
4356
  * )
@@ -4401,8 +4360,7 @@ export declare const tapInput: {
4401
4360
  * yield* Effect.repeat(
4402
4361
  * Effect.gen(function*() {
4403
4362
  * yield* Console.log("Performing health check...")
4404
- * // Simulate health check
4405
- * return Math.random() > 0.7 ? "healthy" : "degraded"
4363
+ * return "healthy"
4406
4364
  * }),
4407
4365
  * alertingSchedule
4408
4366
  * )
@@ -4414,14 +4372,14 @@ export declare const tapInput: {
4414
4372
  * Schedule.tapOutput((count) => Console.log(`Execution ${count + 1}`)),
4415
4373
  * Schedule.tapOutput((count) =>
4416
4374
  * count % 3 === 0
4417
- * ? Console.log("🎯 Checkpoint reached!")
4375
+ * ? Console.log("Checkpoint reached")
4418
4376
  * : Effect.void
4419
4377
  * )
4420
4378
  * )
4421
4379
  * ```
4422
4380
  *
4423
- * @since 2.0.0
4424
4381
  * @category sequencing
4382
+ * @since 2.0.0
4425
4383
  */
4426
4384
  export declare const tapOutput: {
4427
4385
  /**
@@ -4429,7 +4387,8 @@ export declare const tapOutput: {
4429
4387
  * every output of the schedule, but does not alter the inputs and outputs of
4430
4388
  * the schedule.
4431
4389
  *
4432
- * @example
4390
+ * **Example** (Tapping schedule outputs)
4391
+ *
4433
4392
  * ```ts
4434
4393
  * import { Console, Data, Effect, Schedule } from "effect"
4435
4394
  *
@@ -4477,7 +4436,7 @@ export declare const tapOutput: {
4477
4436
  * Effect.gen(function*() {
4478
4437
  * const delayMs = delay.toString()
4479
4438
  * if (delayMs.includes("1000")) { // Alert on delays >= 1 second
4480
- * yield* Console.log(`🚨 High delay detected: ${delay}`)
4439
+ * yield* Console.log(`High delay detected: ${delay}`)
4481
4440
  * }
4482
4441
  * })
4483
4442
  * )
@@ -4487,8 +4446,7 @@ export declare const tapOutput: {
4487
4446
  * yield* Effect.repeat(
4488
4447
  * Effect.gen(function*() {
4489
4448
  * yield* Console.log("Performing health check...")
4490
- * // Simulate health check
4491
- * return Math.random() > 0.7 ? "healthy" : "degraded"
4449
+ * return "healthy"
4492
4450
  * }),
4493
4451
  * alertingSchedule
4494
4452
  * )
@@ -4500,14 +4458,14 @@ export declare const tapOutput: {
4500
4458
  * Schedule.tapOutput((count) => Console.log(`Execution ${count + 1}`)),
4501
4459
  * Schedule.tapOutput((count) =>
4502
4460
  * count % 3 === 0
4503
- * ? Console.log("🎯 Checkpoint reached!")
4461
+ * ? Console.log("Checkpoint reached")
4504
4462
  * : Effect.void
4505
4463
  * )
4506
4464
  * )
4507
4465
  * ```
4508
4466
  *
4509
- * @since 2.0.0
4510
4467
  * @category sequencing
4468
+ * @since 2.0.0
4511
4469
  */
4512
4470
  <Output, X, Error2, Env2>(f: (output: Output) => Effect<X, Error2, Env2>): <Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error | Error2, Env | Env2>;
4513
4471
  /**
@@ -4515,7 +4473,8 @@ export declare const tapOutput: {
4515
4473
  * every output of the schedule, but does not alter the inputs and outputs of
4516
4474
  * the schedule.
4517
4475
  *
4518
- * @example
4476
+ * **Example** (Tapping schedule outputs)
4477
+ *
4519
4478
  * ```ts
4520
4479
  * import { Console, Data, Effect, Schedule } from "effect"
4521
4480
  *
@@ -4563,7 +4522,7 @@ export declare const tapOutput: {
4563
4522
  * Effect.gen(function*() {
4564
4523
  * const delayMs = delay.toString()
4565
4524
  * if (delayMs.includes("1000")) { // Alert on delays >= 1 second
4566
- * yield* Console.log(`🚨 High delay detected: ${delay}`)
4525
+ * yield* Console.log(`High delay detected: ${delay}`)
4567
4526
  * }
4568
4527
  * })
4569
4528
  * )
@@ -4573,8 +4532,7 @@ export declare const tapOutput: {
4573
4532
  * yield* Effect.repeat(
4574
4533
  * Effect.gen(function*() {
4575
4534
  * yield* Console.log("Performing health check...")
4576
- * // Simulate health check
4577
- * return Math.random() > 0.7 ? "healthy" : "degraded"
4535
+ * return "healthy"
4578
4536
  * }),
4579
4537
  * alertingSchedule
4580
4538
  * )
@@ -4586,14 +4544,14 @@ export declare const tapOutput: {
4586
4544
  * Schedule.tapOutput((count) => Console.log(`Execution ${count + 1}`)),
4587
4545
  * Schedule.tapOutput((count) =>
4588
4546
  * count % 3 === 0
4589
- * ? Console.log("🎯 Checkpoint reached!")
4547
+ * ? Console.log("Checkpoint reached")
4590
4548
  * : Effect.void
4591
4549
  * )
4592
4550
  * )
4593
4551
  * ```
4594
4552
  *
4595
- * @since 2.0.0
4596
4553
  * @category sequencing
4554
+ * @since 2.0.0
4597
4555
  */
4598
4556
  <Output, Input, Error, Env, X, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, f: (output: Output) => Effect<X, Error2, Env2>): Schedule<Output, Input, Error | Error2, Env | Env2>;
4599
4557
  };
@@ -4602,7 +4560,8 @@ export declare const tapOutput: {
4602
4560
  * from the schedule. Once the specified number of outputs is reached, the
4603
4561
  * schedule will stop.
4604
4562
  *
4605
- * @example
4563
+ * **Example** (Taking a limited number of recurrences)
4564
+ *
4606
4565
  * ```ts
4607
4566
  * import { Console, Data, Effect, Schedule } from "effect"
4608
4567
  *
@@ -4616,7 +4575,7 @@ export declare const tapOutput: {
4616
4575
  * const heartbeatProgram = Effect.gen(function*() {
4617
4576
  * yield* Effect.repeat(
4618
4577
  * Effect.gen(function*() {
4619
- * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`)
4578
+ * yield* Console.log("Heartbeat")
4620
4579
  * return "pulse"
4621
4580
  * }),
4622
4581
  * limitedHeartbeat
@@ -4663,8 +4622,8 @@ export declare const tapOutput: {
4663
4622
  * const samplingProgram = Effect.gen(function*() {
4664
4623
  * yield* Effect.repeat(
4665
4624
  * Effect.gen(function*() {
4666
- * const value = Math.random()
4667
- * yield* Console.log(`Sampled value: ${value.toFixed(3)}`)
4625
+ * const value = "sample"
4626
+ * yield* Console.log(`Sampled value: ${value}`)
4668
4627
  * return value
4669
4628
  * }),
4670
4629
  * samplingSchedule.pipe(
@@ -4674,8 +4633,8 @@ export declare const tapOutput: {
4674
4633
  * })
4675
4634
  * ```
4676
4635
  *
4677
- * @since 2.0.0
4678
- * @category utilities
4636
+ * @category utils
4637
+ * @since 4.0.0
4679
4638
  */
4680
4639
  export declare const take: {
4681
4640
  /**
@@ -4683,7 +4642,8 @@ export declare const take: {
4683
4642
  * from the schedule. Once the specified number of outputs is reached, the
4684
4643
  * schedule will stop.
4685
4644
  *
4686
- * @example
4645
+ * **Example** (Taking a limited number of recurrences)
4646
+ *
4687
4647
  * ```ts
4688
4648
  * import { Console, Data, Effect, Schedule } from "effect"
4689
4649
  *
@@ -4697,7 +4657,7 @@ export declare const take: {
4697
4657
  * const heartbeatProgram = Effect.gen(function*() {
4698
4658
  * yield* Effect.repeat(
4699
4659
  * Effect.gen(function*() {
4700
- * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`)
4660
+ * yield* Console.log("Heartbeat")
4701
4661
  * return "pulse"
4702
4662
  * }),
4703
4663
  * limitedHeartbeat
@@ -4744,8 +4704,8 @@ export declare const take: {
4744
4704
  * const samplingProgram = Effect.gen(function*() {
4745
4705
  * yield* Effect.repeat(
4746
4706
  * Effect.gen(function*() {
4747
- * const value = Math.random()
4748
- * yield* Console.log(`Sampled value: ${value.toFixed(3)}`)
4707
+ * const value = "sample"
4708
+ * yield* Console.log(`Sampled value: ${value}`)
4749
4709
  * return value
4750
4710
  * }),
4751
4711
  * samplingSchedule.pipe(
@@ -4755,8 +4715,8 @@ export declare const take: {
4755
4715
  * })
4756
4716
  * ```
4757
4717
  *
4758
- * @since 2.0.0
4759
- * @category utilities
4718
+ * @category utils
4719
+ * @since 4.0.0
4760
4720
  */
4761
4721
  (n: number): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error, Env>;
4762
4722
  /**
@@ -4764,7 +4724,8 @@ export declare const take: {
4764
4724
  * from the schedule. Once the specified number of outputs is reached, the
4765
4725
  * schedule will stop.
4766
4726
  *
4767
- * @example
4727
+ * **Example** (Taking a limited number of recurrences)
4728
+ *
4768
4729
  * ```ts
4769
4730
  * import { Console, Data, Effect, Schedule } from "effect"
4770
4731
  *
@@ -4778,7 +4739,7 @@ export declare const take: {
4778
4739
  * const heartbeatProgram = Effect.gen(function*() {
4779
4740
  * yield* Effect.repeat(
4780
4741
  * Effect.gen(function*() {
4781
- * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`)
4742
+ * yield* Console.log("Heartbeat")
4782
4743
  * return "pulse"
4783
4744
  * }),
4784
4745
  * limitedHeartbeat
@@ -4825,8 +4786,8 @@ export declare const take: {
4825
4786
  * const samplingProgram = Effect.gen(function*() {
4826
4787
  * yield* Effect.repeat(
4827
4788
  * Effect.gen(function*() {
4828
- * const value = Math.random()
4829
- * yield* Console.log(`Sampled value: ${value.toFixed(3)}`)
4789
+ * const value = "sample"
4790
+ * yield* Console.log(`Sampled value: ${value}`)
4830
4791
  * return value
4831
4792
  * }),
4832
4793
  * samplingSchedule.pipe(
@@ -4836,8 +4797,8 @@ export declare const take: {
4836
4797
  * })
4837
4798
  * ```
4838
4799
  *
4839
- * @since 2.0.0
4840
- * @category utilities
4800
+ * @category utils
4801
+ * @since 4.0.0
4841
4802
  */
4842
4803
  <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>, n: number): Schedule<Output, Input, Error, Env>;
4843
4804
  };
@@ -4845,7 +4806,8 @@ export declare const take: {
4845
4806
  * Creates a schedule that unfolds a state by repeatedly applying a function,
4846
4807
  * outputting the current state and computing the next state.
4847
4808
  *
4848
- * @example
4809
+ * **Example** (Unfolding schedule state)
4810
+ *
4849
4811
  * ```ts
4850
4812
  * import { Console, Effect, Schedule } from "effect"
4851
4813
  *
@@ -4893,15 +4855,14 @@ export declare const take: {
4893
4855
  * })
4894
4856
  * )
4895
4857
  *
4896
- * // Random jitter schedule
4897
- * const jitteredSchedule = Schedule.unfold(
4898
- * 1000,
4899
- * (baseDelay) =>
4858
+ * // Deterministic delay adjustment schedule
4859
+ * const adjustedDelaySchedule = Schedule.unfold(
4860
+ * { delay: 1000, adjustment: 100 },
4861
+ * ({ delay, adjustment }) =>
4900
4862
  * Effect.gen(function*() {
4901
- * const jitter = Math.random() * 200 - 100 // ±100ms jitter
4902
- * const nextDelay = Math.max(100, baseDelay + jitter)
4903
- * yield* Console.log(`Jittered delay: ${nextDelay.toFixed(0)}ms`)
4904
- * return nextDelay
4863
+ * const nextDelay = Math.max(100, delay + adjustment)
4864
+ * yield* Console.log(`Adjusted delay: ${nextDelay}ms`)
4865
+ * return { delay: nextDelay, adjustment: adjustment * -1 }
4905
4866
  * })
4906
4867
  * )
4907
4868
  *
@@ -4934,8 +4895,8 @@ export declare const take: {
4934
4895
  * })
4935
4896
  * ```
4936
4897
  *
4937
- * @since 2.0.0
4938
4898
  * @category constructors
4899
+ * @since 2.0.0
4939
4900
  */
4940
4901
  export declare const unfold: <State, Error = never, Env = never>(initial: State, next: (state: State) => Effect<State, Error, Env>) => Schedule<State, unknown, Error, Env>;
4941
4902
  declare const while_: {
@@ -4950,8 +4911,8 @@ export {
4950
4911
  * If the `predicate` returns `true`, the schedule will continue, otherwise
4951
4912
  * the schedule will stop.
4952
4913
  *
4953
- * @since 2.0.0
4954
- * @category utilities
4914
+ * @category utils
4915
+ * @since 4.0.0
4955
4916
  */
4956
4917
  while_ as while };
4957
4918
  /**
@@ -4967,7 +4928,8 @@ while_ as while };
4967
4928
  * |action------|sleep---|act|-sleep|action----|
4968
4929
  * ```
4969
4930
  *
4970
- * @example
4931
+ * **Example** (Repeating on aligned windows)
4932
+ *
4971
4933
  * ```ts
4972
4934
  * import { Console, Effect, Schedule } from "effect"
4973
4935
  *
@@ -4977,8 +4939,7 @@ while_ as while };
4977
4939
  * const program = Effect.gen(function*() {
4978
4940
  * yield* Effect.repeat(
4979
4941
  * Effect.gen(function*() {
4980
- * const now = new Date().toISOString()
4981
- * yield* Console.log(`Window task executed at: ${now}`)
4942
+ * yield* Console.log("Window task executed")
4982
4943
  * return "window-task"
4983
4944
  * }),
4984
4945
  * windowSchedule.pipe(Schedule.take(4))
@@ -4986,8 +4947,8 @@ while_ as while };
4986
4947
  * })
4987
4948
  * ```
4988
4949
  *
4989
- * @since 2.0.0
4990
4950
  * @category constructors
4951
+ * @since 2.0.0
4991
4952
  */
4992
4953
  export declare const windowed: (interval: Duration.Input) => Schedule<number>;
4993
4954
  /**
@@ -4996,7 +4957,8 @@ export declare const windowed: (interval: Duration.Input) => Schedule<number>;
4996
4957
  * The output of the schedule is the current count of its repetitions thus far
4997
4958
  * (i.e. `0, 1, 2, ...`).
4998
4959
  *
4999
- * @example
4960
+ * **Example** (Repeating forever)
4961
+ *
5000
4962
  * ```ts
5001
4963
  * import { Console, Effect, Schedule } from "effect"
5002
4964
  *
@@ -5014,8 +4976,8 @@ export declare const windowed: (interval: Duration.Input) => Schedule<number>;
5014
4976
  * })
5015
4977
  * ```
5016
4978
  *
5017
- * @since 2.0.0
5018
4979
  * @category constructors
4980
+ * @since 2.0.0
5019
4981
  */
5020
4982
  export declare const forever: Schedule<number>;
5021
4983
  declare const identity_: <A>() => Schedule<A, A>;
@@ -5029,14 +4991,15 @@ export {
5029
4991
  * without modification. It effectively acts as a pass-through that simply
5030
4992
  * echoes its input values at each step.
5031
4993
  *
4994
+ * @category constructors
5032
4995
  * @since 2.0.0
5033
- * @category Constructors
5034
4996
  */
5035
4997
  identity_ as identity };
5036
4998
  /**
5037
4999
  * Ensures that the provided schedule respects a specified input type.
5038
5000
  *
5039
- * @example
5001
+ * **Example** (Constraining schedule input types)
5002
+ *
5040
5003
  * ```ts
5041
5004
  * import { Schedule } from "effect"
5042
5005
  *
@@ -5055,22 +5018,23 @@ identity_ as identity };
5055
5018
  * // where CustomType doesn't match the schedule's input type
5056
5019
  * ```
5057
5020
  *
5058
- * @since 2.0.0
5059
5021
  * @category ensuring types
5022
+ * @since 4.0.0
5060
5023
  */
5061
5024
  export declare const satisfiesInputType: <T>() => <Input extends T, Output = never, Error = never, Env = never>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error, Env>;
5062
5025
  /**
5063
5026
  * Sets the input type of the provided schedule to a specified type, without
5064
5027
  * altering the schedule's behavior.
5065
5028
  *
5066
- * @since 2.0.0
5067
5029
  * @category ensuring types
5030
+ * @since 4.0.0
5068
5031
  */
5069
5032
  export declare const setInputType: <T>() => <Output, Error, Env>(self: Schedule<Output, T, Error, Env>) => Schedule<Output, T, Error, Env>;
5070
5033
  /**
5071
5034
  * Ensures that the provided schedule respects a specified output type.
5072
5035
  *
5073
- * @example
5036
+ * **Example** (Constraining schedule output types)
5037
+ *
5074
5038
  * ```ts
5075
5039
  * import { Effect, Schedule } from "effect"
5076
5040
  *
@@ -5084,14 +5048,15 @@ export declare const setInputType: <T>() => <Output, Error, Env>(self: Schedule<
5084
5048
  * )
5085
5049
  * ```
5086
5050
  *
5087
- * @since 2.0.0
5088
5051
  * @category ensuring types
5052
+ * @since 4.0.0
5089
5053
  */
5090
5054
  export declare const satisfiesOutputType: <T>() => <Output extends T, Error = never, Input = unknown, Env = never>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error, Env>;
5091
5055
  /**
5092
5056
  * Ensures that the provided schedule respects a specified error type.
5093
5057
  *
5094
- * @example
5058
+ * **Example** (Constraining schedule error types)
5059
+ *
5095
5060
  * ```ts
5096
5061
  * import { Data, Schedule } from "effect"
5097
5062
  *
@@ -5111,16 +5076,17 @@ export declare const satisfiesOutputType: <T>() => <Output extends T, Error = ne
5111
5076
  * )
5112
5077
  * ```
5113
5078
  *
5114
- * @since 2.0.0
5115
5079
  * @category ensuring types
5080
+ * @since 4.0.0
5116
5081
  */
5117
5082
  export declare const satisfiesErrorType: <T>() => <Error extends T, Output = never, Input = unknown, Env = never>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error, Env>;
5118
5083
  /**
5119
5084
  * Ensures that the provided schedule respects a specified context type.
5120
5085
  *
5121
- * @example
5086
+ * **Example** (Constraining schedule service types)
5087
+ *
5122
5088
  * ```ts
5123
- * import { Schedule } from "effect"
5089
+ * import { Effect, Schedule } from "effect"
5124
5090
  *
5125
5091
  * // Define service interfaces (type-level only)
5126
5092
  * interface Logger {
@@ -5128,7 +5094,7 @@ export declare const satisfiesErrorType: <T>() => <Error extends T, Output = nev
5128
5094
  * }
5129
5095
  *
5130
5096
  * interface Database {
5131
- * readonly query: (sql: string) => Promise<unknown>
5097
+ * readonly query: (sql: string) => Effect.Effect<ReadonlyArray<unknown>>
5132
5098
  * }
5133
5099
  *
5134
5100
  * // Ensure schedule requires Logger service
@@ -5142,8 +5108,8 @@ export declare const satisfiesErrorType: <T>() => <Error extends T, Output = nev
5142
5108
  * )
5143
5109
  * ```
5144
5110
  *
5145
- * @since 2.0.0
5146
5111
  * @category ensuring types
5112
+ * @since 4.0.0
5147
5113
  */
5148
5114
  export declare const satisfiesServicesType: <T>() => <Env extends T, Output = never, Input = unknown, Error = never>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error, Env>;
5149
5115
  //# sourceMappingURL=Schedule.d.ts.map