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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1633) hide show
  1. package/dist/Array.d.ts +113 -67
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +28 -18
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +404 -337
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +190 -146
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +167 -97
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +87 -47
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +62 -31
  14. package/dist/Boolean.d.ts.map +1 -1
  15. package/dist/Boolean.js +30 -15
  16. package/dist/Boolean.js.map +1 -1
  17. package/dist/Brand.d.ts +20 -1
  18. package/dist/Brand.d.ts.map +1 -1
  19. package/dist/Brand.js +16 -0
  20. package/dist/Brand.js.map +1 -1
  21. package/dist/Cache.d.ts +236 -132
  22. package/dist/Cache.d.ts.map +1 -1
  23. package/dist/Cache.js +133 -57
  24. package/dist/Cache.js.map +1 -1
  25. package/dist/Cause.d.ts +74 -62
  26. package/dist/Cause.d.ts.map +1 -1
  27. package/dist/Cause.js +43 -36
  28. package/dist/Cause.js.map +1 -1
  29. package/dist/Channel.d.ts +1518 -575
  30. package/dist/Channel.d.ts.map +1 -1
  31. package/dist/Channel.js +661 -287
  32. package/dist/Channel.js.map +1 -1
  33. package/dist/ChannelSchema.d.ts +119 -10
  34. package/dist/ChannelSchema.d.ts.map +1 -1
  35. package/dist/ChannelSchema.js +45 -6
  36. package/dist/ChannelSchema.js.map +1 -1
  37. package/dist/Chunk.d.ts +548 -379
  38. package/dist/Chunk.d.ts.map +1 -1
  39. package/dist/Chunk.js +238 -170
  40. package/dist/Chunk.js.map +1 -1
  41. package/dist/Clock.d.ts +15 -8
  42. package/dist/Clock.d.ts.map +1 -1
  43. package/dist/Clock.js +8 -4
  44. package/dist/Clock.js.map +1 -1
  45. package/dist/Combiner.d.ts +2 -4
  46. package/dist/Combiner.d.ts.map +1 -1
  47. package/dist/Combiner.js +2 -4
  48. package/dist/Combiner.js.map +1 -1
  49. package/dist/Config.d.ts +4 -2
  50. package/dist/Config.d.ts.map +1 -1
  51. package/dist/Config.js +2 -2
  52. package/dist/Config.js.map +1 -1
  53. package/dist/ConfigProvider.d.ts +1 -1
  54. package/dist/ConfigProvider.js +1 -1
  55. package/dist/Console.d.ts +76 -50
  56. package/dist/Console.d.ts.map +1 -1
  57. package/dist/Console.js +69 -46
  58. package/dist/Console.js.map +1 -1
  59. package/dist/Context.d.ts +383 -134
  60. package/dist/Context.d.ts.map +1 -1
  61. package/dist/Context.js +134 -54
  62. package/dist/Context.js.map +1 -1
  63. package/dist/Cron.d.ts +69 -48
  64. package/dist/Cron.d.ts.map +1 -1
  65. package/dist/Cron.js +96 -36
  66. package/dist/Cron.js.map +1 -1
  67. package/dist/Data.d.ts +3 -2
  68. package/dist/Data.d.ts.map +1 -1
  69. package/dist/Data.js.map +1 -1
  70. package/dist/DateTime.d.ts +874 -443
  71. package/dist/DateTime.d.ts.map +1 -1
  72. package/dist/DateTime.js +374 -215
  73. package/dist/DateTime.js.map +1 -1
  74. package/dist/Deferred.d.ts +367 -174
  75. package/dist/Deferred.d.ts.map +1 -1
  76. package/dist/Deferred.js +145 -71
  77. package/dist/Deferred.js.map +1 -1
  78. package/dist/Differ.d.ts +42 -0
  79. package/dist/Differ.d.ts.map +1 -1
  80. package/dist/Differ.js +36 -0
  81. package/dist/Duration.d.ts +329 -185
  82. package/dist/Duration.d.ts.map +1 -1
  83. package/dist/Duration.js +174 -106
  84. package/dist/Duration.js.map +1 -1
  85. package/dist/Effect.d.ts +2109 -1945
  86. package/dist/Effect.d.ts.map +1 -1
  87. package/dist/Effect.js +901 -726
  88. package/dist/Effect.js.map +1 -1
  89. package/dist/Effectable.d.ts +37 -2
  90. package/dist/Effectable.d.ts.map +1 -1
  91. package/dist/Effectable.js +2 -2
  92. package/dist/Effectable.js.map +1 -1
  93. package/dist/Encoding.d.ts +78 -28
  94. package/dist/Encoding.d.ts.map +1 -1
  95. package/dist/Encoding.js +75 -27
  96. package/dist/Encoding.js.map +1 -1
  97. package/dist/Equivalence.d.ts +14 -19
  98. package/dist/Equivalence.d.ts.map +1 -1
  99. package/dist/Equivalence.js +14 -19
  100. package/dist/Equivalence.js.map +1 -1
  101. package/dist/ErrorReporter.d.ts +66 -82
  102. package/dist/ErrorReporter.d.ts.map +1 -1
  103. package/dist/ErrorReporter.js +38 -29
  104. package/dist/ErrorReporter.js.map +1 -1
  105. package/dist/ExecutionPlan.d.ts +94 -9
  106. package/dist/ExecutionPlan.d.ts.map +1 -1
  107. package/dist/ExecutionPlan.js +20 -5
  108. package/dist/ExecutionPlan.js.map +1 -1
  109. package/dist/Exit.d.ts +7 -5
  110. package/dist/Exit.d.ts.map +1 -1
  111. package/dist/Exit.js.map +1 -1
  112. package/dist/Fiber.d.ts +72 -40
  113. package/dist/Fiber.d.ts.map +1 -1
  114. package/dist/Fiber.js +39 -21
  115. package/dist/Fiber.js.map +1 -1
  116. package/dist/FiberHandle.d.ts +117 -56
  117. package/dist/FiberHandle.d.ts.map +1 -1
  118. package/dist/FiberHandle.js +120 -38
  119. package/dist/FiberHandle.js.map +1 -1
  120. package/dist/FiberMap.d.ts +286 -158
  121. package/dist/FiberMap.d.ts.map +1 -1
  122. package/dist/FiberMap.js +174 -72
  123. package/dist/FiberMap.js.map +1 -1
  124. package/dist/FiberSet.d.ts +92 -51
  125. package/dist/FiberSet.d.ts.map +1 -1
  126. package/dist/FiberSet.js +96 -33
  127. package/dist/FiberSet.js.map +1 -1
  128. package/dist/FileSystem.d.ts +104 -73
  129. package/dist/FileSystem.d.ts.map +1 -1
  130. package/dist/FileSystem.js +53 -39
  131. package/dist/FileSystem.js.map +1 -1
  132. package/dist/Filter.d.ts +166 -88
  133. package/dist/Filter.d.ts.map +1 -1
  134. package/dist/Filter.js +68 -42
  135. package/dist/Filter.js.map +1 -1
  136. package/dist/Function.d.ts +154 -86
  137. package/dist/Function.d.ts.map +1 -1
  138. package/dist/Function.js +53 -37
  139. package/dist/Function.js.map +1 -1
  140. package/dist/Graph.d.ts +682 -365
  141. package/dist/Graph.d.ts.map +1 -1
  142. package/dist/Graph.js +308 -157
  143. package/dist/Graph.js.map +1 -1
  144. package/dist/HKT.d.ts +29 -13
  145. package/dist/HKT.d.ts.map +1 -1
  146. package/dist/Hash.d.ts +31 -18
  147. package/dist/Hash.d.ts.map +1 -1
  148. package/dist/Hash.js +25 -15
  149. package/dist/Hash.js.map +1 -1
  150. package/dist/HashMap.d.ts +444 -256
  151. package/dist/HashMap.d.ts.map +1 -1
  152. package/dist/HashMap.js +223 -105
  153. package/dist/HashMap.js.map +1 -1
  154. package/dist/HashRing.d.ts +36 -17
  155. package/dist/HashRing.d.ts.map +1 -1
  156. package/dist/HashRing.js +75 -8
  157. package/dist/HashRing.js.map +1 -1
  158. package/dist/HashSet.d.ts +194 -104
  159. package/dist/HashSet.d.ts.map +1 -1
  160. package/dist/HashSet.js +93 -38
  161. package/dist/HashSet.js.map +1 -1
  162. package/dist/Inspectable.d.ts +20 -9
  163. package/dist/Inspectable.d.ts.map +1 -1
  164. package/dist/Inspectable.js +16 -6
  165. package/dist/Inspectable.js.map +1 -1
  166. package/dist/Iterable.d.ts +309 -149
  167. package/dist/Iterable.d.ts.map +1 -1
  168. package/dist/Iterable.js +129 -65
  169. package/dist/Iterable.js.map +1 -1
  170. package/dist/JsonPatch.d.ts +4 -3
  171. package/dist/JsonPatch.d.ts.map +1 -1
  172. package/dist/JsonPatch.js +4 -3
  173. package/dist/JsonPatch.js.map +1 -1
  174. package/dist/Latch.d.ts +98 -15
  175. package/dist/Latch.d.ts.map +1 -1
  176. package/dist/Latch.js +41 -10
  177. package/dist/Latch.js.map +1 -1
  178. package/dist/Layer.d.ts +412 -309
  179. package/dist/Layer.d.ts.map +1 -1
  180. package/dist/Layer.js +261 -180
  181. package/dist/Layer.js.map +1 -1
  182. package/dist/LayerMap.d.ts +95 -21
  183. package/dist/LayerMap.d.ts.map +1 -1
  184. package/dist/LayerMap.js +55 -11
  185. package/dist/LayerMap.js.map +1 -1
  186. package/dist/LogLevel.d.ts +92 -131
  187. package/dist/LogLevel.d.ts.map +1 -1
  188. package/dist/LogLevel.js +25 -15
  189. package/dist/LogLevel.js.map +1 -1
  190. package/dist/Logger.d.ts +155 -99
  191. package/dist/Logger.d.ts.map +1 -1
  192. package/dist/Logger.js +211 -184
  193. package/dist/Logger.js.map +1 -1
  194. package/dist/ManagedRuntime.d.ts +75 -17
  195. package/dist/ManagedRuntime.d.ts.map +1 -1
  196. package/dist/ManagedRuntime.js +22 -16
  197. package/dist/ManagedRuntime.js.map +1 -1
  198. package/dist/Match.d.ts +133 -157
  199. package/dist/Match.d.ts.map +1 -1
  200. package/dist/Match.js +85 -76
  201. package/dist/Match.js.map +1 -1
  202. package/dist/Metric.d.ts +325 -284
  203. package/dist/Metric.d.ts.map +1 -1
  204. package/dist/Metric.js +217 -212
  205. package/dist/Metric.js.map +1 -1
  206. package/dist/MutableHashMap.d.ts +117 -58
  207. package/dist/MutableHashMap.d.ts.map +1 -1
  208. package/dist/MutableHashMap.js +52 -29
  209. package/dist/MutableHashMap.js.map +1 -1
  210. package/dist/MutableHashSet.d.ts +52 -30
  211. package/dist/MutableHashSet.d.ts.map +1 -1
  212. package/dist/MutableHashSet.js +94 -38
  213. package/dist/MutableHashSet.js.map +1 -1
  214. package/dist/MutableList.d.ts +92 -49
  215. package/dist/MutableList.d.ts.map +1 -1
  216. package/dist/MutableList.js +123 -71
  217. package/dist/MutableList.js.map +1 -1
  218. package/dist/MutableRef.d.ts +99 -62
  219. package/dist/MutableRef.d.ts.map +1 -1
  220. package/dist/MutableRef.js +79 -60
  221. package/dist/MutableRef.js.map +1 -1
  222. package/dist/Newtype.d.ts +3 -0
  223. package/dist/Newtype.d.ts.map +1 -1
  224. package/dist/Newtype.js.map +1 -1
  225. package/dist/NonEmptyIterable.d.ts +36 -39
  226. package/dist/NonEmptyIterable.d.ts.map +1 -1
  227. package/dist/NonEmptyIterable.js +34 -20
  228. package/dist/NonEmptyIterable.js.map +1 -1
  229. package/dist/Number.d.ts +116 -64
  230. package/dist/Number.d.ts.map +1 -1
  231. package/dist/Number.js +54 -30
  232. package/dist/Number.js.map +1 -1
  233. package/dist/Optic.d.ts +1 -2
  234. package/dist/Optic.d.ts.map +1 -1
  235. package/dist/Optic.js +0 -1
  236. package/dist/Optic.js.map +1 -1
  237. package/dist/Option.d.ts +28 -47
  238. package/dist/Option.d.ts.map +1 -1
  239. package/dist/Option.js +14 -12
  240. package/dist/Option.js.map +1 -1
  241. package/dist/Ordering.d.ts +43 -28
  242. package/dist/Ordering.d.ts.map +1 -1
  243. package/dist/Ordering.js +4 -2
  244. package/dist/Ordering.js.map +1 -1
  245. package/dist/PartitionedSemaphore.d.ts +225 -40
  246. package/dist/PartitionedSemaphore.d.ts.map +1 -1
  247. package/dist/PartitionedSemaphore.js +113 -17
  248. package/dist/PartitionedSemaphore.js.map +1 -1
  249. package/dist/Path.d.ts +77 -13
  250. package/dist/Path.d.ts.map +1 -1
  251. package/dist/Path.js +48 -4
  252. package/dist/Path.js.map +1 -1
  253. package/dist/Pipeable.d.ts +71 -15
  254. package/dist/Pipeable.d.ts.map +1 -1
  255. package/dist/Pipeable.js +59 -12
  256. package/dist/Pipeable.js.map +1 -1
  257. package/dist/PlatformError.d.ts +74 -6
  258. package/dist/PlatformError.d.ts.map +1 -1
  259. package/dist/PlatformError.js +68 -5
  260. package/dist/PlatformError.js.map +1 -1
  261. package/dist/Pool.d.ts +66 -31
  262. package/dist/Pool.d.ts.map +1 -1
  263. package/dist/Pool.js +26 -24
  264. package/dist/Pool.js.map +1 -1
  265. package/dist/Predicate.d.ts +16 -21
  266. package/dist/Predicate.d.ts.map +1 -1
  267. package/dist/Predicate.js +9 -14
  268. package/dist/Predicate.js.map +1 -1
  269. package/dist/PrimaryKey.d.ts +9 -2
  270. package/dist/PrimaryKey.d.ts.map +1 -1
  271. package/dist/PrimaryKey.js +7 -1
  272. package/dist/PrimaryKey.js.map +1 -1
  273. package/dist/PubSub.d.ts +364 -262
  274. package/dist/PubSub.d.ts.map +1 -1
  275. package/dist/PubSub.js +245 -174
  276. package/dist/PubSub.js.map +1 -1
  277. package/dist/Pull.d.ts +94 -25
  278. package/dist/Pull.d.ts.map +1 -1
  279. package/dist/Pull.js +61 -13
  280. package/dist/Pull.js.map +1 -1
  281. package/dist/Queue.d.ts +284 -150
  282. package/dist/Queue.d.ts.map +1 -1
  283. package/dist/Queue.js +216 -113
  284. package/dist/Queue.js.map +1 -1
  285. package/dist/Random.d.ts +54 -35
  286. package/dist/Random.d.ts.map +1 -1
  287. package/dist/Random.js +36 -24
  288. package/dist/Random.js.map +1 -1
  289. package/dist/RcMap.d.ts +151 -141
  290. package/dist/RcMap.d.ts.map +1 -1
  291. package/dist/RcMap.js +66 -20
  292. package/dist/RcMap.js.map +1 -1
  293. package/dist/RcRef.d.ts +69 -32
  294. package/dist/RcRef.d.ts.map +1 -1
  295. package/dist/RcRef.js +33 -16
  296. package/dist/RcRef.js.map +1 -1
  297. package/dist/Record.d.ts +273 -129
  298. package/dist/Record.d.ts.map +1 -1
  299. package/dist/Record.js +117 -57
  300. package/dist/Record.js.map +1 -1
  301. package/dist/Redactable.d.ts +3 -3
  302. package/dist/Redactable.js +2 -2
  303. package/dist/Redacted.d.ts +63 -33
  304. package/dist/Redacted.d.ts.map +1 -1
  305. package/dist/Redacted.js +30 -14
  306. package/dist/Redacted.js.map +1 -1
  307. package/dist/Ref.d.ts +81 -52
  308. package/dist/Ref.d.ts.map +1 -1
  309. package/dist/Ref.js +54 -35
  310. package/dist/Ref.js.map +1 -1
  311. package/dist/References.d.ts +73 -31
  312. package/dist/References.d.ts.map +1 -1
  313. package/dist/References.js +66 -30
  314. package/dist/References.js.map +1 -1
  315. package/dist/RegExp.d.ts +11 -5
  316. package/dist/RegExp.d.ts.map +1 -1
  317. package/dist/RegExp.js +11 -5
  318. package/dist/RegExp.js.map +1 -1
  319. package/dist/Request.d.ts +158 -34
  320. package/dist/Request.d.ts.map +1 -1
  321. package/dist/Request.js +67 -12
  322. package/dist/Request.js.map +1 -1
  323. package/dist/RequestResolver.d.ts +261 -116
  324. package/dist/RequestResolver.d.ts.map +1 -1
  325. package/dist/RequestResolver.js +77 -41
  326. package/dist/RequestResolver.js.map +1 -1
  327. package/dist/Resource.d.ts +13 -7
  328. package/dist/Resource.d.ts.map +1 -1
  329. package/dist/Resource.js +44 -6
  330. package/dist/Resource.js.map +1 -1
  331. package/dist/Result.d.ts +16 -14
  332. package/dist/Result.d.ts.map +1 -1
  333. package/dist/Result.js +6 -6
  334. package/dist/Result.js.map +1 -1
  335. package/dist/Runtime.d.ts +43 -18
  336. package/dist/Runtime.d.ts.map +1 -1
  337. package/dist/Runtime.js +35 -16
  338. package/dist/Runtime.js.map +1 -1
  339. package/dist/Schedule.d.ts +545 -576
  340. package/dist/Schedule.d.ts.map +1 -1
  341. package/dist/Schedule.js +260 -246
  342. package/dist/Schedule.js.map +1 -1
  343. package/dist/Scheduler.d.ts +43 -6
  344. package/dist/Scheduler.d.ts.map +1 -1
  345. package/dist/Scheduler.js +33 -4
  346. package/dist/Scheduler.js.map +1 -1
  347. package/dist/Schema.d.ts +803 -282
  348. package/dist/Schema.d.ts.map +1 -1
  349. package/dist/Schema.js +281 -189
  350. package/dist/Schema.js.map +1 -1
  351. package/dist/SchemaAST.d.ts +24 -15
  352. package/dist/SchemaAST.d.ts.map +1 -1
  353. package/dist/SchemaAST.js +13 -9
  354. package/dist/SchemaAST.js.map +1 -1
  355. package/dist/SchemaGetter.d.ts +26 -13
  356. package/dist/SchemaGetter.d.ts.map +1 -1
  357. package/dist/SchemaGetter.js +22 -9
  358. package/dist/SchemaGetter.js.map +1 -1
  359. package/dist/SchemaIssue.d.ts +1 -8
  360. package/dist/SchemaIssue.d.ts.map +1 -1
  361. package/dist/SchemaIssue.js.map +1 -1
  362. package/dist/SchemaParser.d.ts +194 -25
  363. package/dist/SchemaParser.d.ts.map +1 -1
  364. package/dist/SchemaParser.js +220 -26
  365. package/dist/SchemaParser.js.map +1 -1
  366. package/dist/SchemaTransformation.d.ts +61 -41
  367. package/dist/SchemaTransformation.d.ts.map +1 -1
  368. package/dist/SchemaTransformation.js +56 -33
  369. package/dist/SchemaTransformation.js.map +1 -1
  370. package/dist/SchemaUtils.d.ts +7 -0
  371. package/dist/SchemaUtils.d.ts.map +1 -1
  372. package/dist/SchemaUtils.js +23 -0
  373. package/dist/SchemaUtils.js.map +1 -1
  374. package/dist/Scope.d.ts +102 -43
  375. package/dist/Scope.d.ts.map +1 -1
  376. package/dist/Scope.js +57 -23
  377. package/dist/Scope.js.map +1 -1
  378. package/dist/ScopedCache.d.ts +138 -46
  379. package/dist/ScopedCache.d.ts.map +1 -1
  380. package/dist/ScopedCache.js +80 -19
  381. package/dist/ScopedCache.js.map +1 -1
  382. package/dist/ScopedRef.d.ts +28 -8
  383. package/dist/ScopedRef.d.ts.map +1 -1
  384. package/dist/ScopedRef.js +25 -5
  385. package/dist/ScopedRef.js.map +1 -1
  386. package/dist/Semaphore.d.ts +64 -28
  387. package/dist/Semaphore.d.ts.map +1 -1
  388. package/dist/Semaphore.js +22 -13
  389. package/dist/Semaphore.js.map +1 -1
  390. package/dist/Sink.d.ts +458 -200
  391. package/dist/Sink.d.ts.map +1 -1
  392. package/dist/Sink.js +240 -89
  393. package/dist/Sink.js.map +1 -1
  394. package/dist/Stdio.d.ts +43 -6
  395. package/dist/Stdio.d.ts.map +1 -1
  396. package/dist/Stdio.js +33 -4
  397. package/dist/Stdio.js.map +1 -1
  398. package/dist/Stream.d.ts +1896 -1183
  399. package/dist/Stream.d.ts.map +1 -1
  400. package/dist/Stream.js +867 -524
  401. package/dist/Stream.js.map +1 -1
  402. package/dist/String.d.ts +171 -95
  403. package/dist/String.d.ts.map +1 -1
  404. package/dist/String.js +125 -67
  405. package/dist/String.js.map +1 -1
  406. package/dist/SubscriptionRef.d.ts +308 -203
  407. package/dist/SubscriptionRef.d.ts.map +1 -1
  408. package/dist/SubscriptionRef.js +125 -76
  409. package/dist/SubscriptionRef.js.map +1 -1
  410. package/dist/Symbol.d.ts +13 -5
  411. package/dist/Symbol.d.ts.map +1 -1
  412. package/dist/Symbol.js +13 -5
  413. package/dist/Symbol.js.map +1 -1
  414. package/dist/SynchronizedRef.d.ts +278 -62
  415. package/dist/SynchronizedRef.d.ts.map +1 -1
  416. package/dist/SynchronizedRef.js +116 -23
  417. package/dist/SynchronizedRef.js.map +1 -1
  418. package/dist/Take.d.ts +26 -2
  419. package/dist/Take.d.ts.map +1 -1
  420. package/dist/Take.js +4 -1
  421. package/dist/Take.js.map +1 -1
  422. package/dist/Terminal.d.ts +39 -7
  423. package/dist/Terminal.d.ts.map +1 -1
  424. package/dist/Terminal.js +10 -4
  425. package/dist/Terminal.js.map +1 -1
  426. package/dist/Tracer.d.ts +229 -55
  427. package/dist/Tracer.d.ts.map +1 -1
  428. package/dist/Tracer.js +94 -18
  429. package/dist/Tracer.js.map +1 -1
  430. package/dist/Trie.d.ts +213 -142
  431. package/dist/Trie.d.ts.map +1 -1
  432. package/dist/Trie.js +88 -60
  433. package/dist/Trie.js.map +1 -1
  434. package/dist/TxChunk.d.ts +182 -146
  435. package/dist/TxChunk.d.ts.map +1 -1
  436. package/dist/TxChunk.js +73 -56
  437. package/dist/TxChunk.js.map +1 -1
  438. package/dist/TxDeferred.d.ts +43 -29
  439. package/dist/TxDeferred.d.ts.map +1 -1
  440. package/dist/TxDeferred.js +22 -15
  441. package/dist/TxDeferred.js.map +1 -1
  442. package/dist/TxHashMap.d.ts +362 -222
  443. package/dist/TxHashMap.d.ts.map +1 -1
  444. package/dist/TxHashMap.js +171 -98
  445. package/dist/TxHashMap.js.map +1 -1
  446. package/dist/TxHashSet.d.ts +178 -104
  447. package/dist/TxHashSet.d.ts.map +1 -1
  448. package/dist/TxHashSet.js +84 -43
  449. package/dist/TxHashSet.js.map +1 -1
  450. package/dist/TxPriorityQueue.d.ts +93 -62
  451. package/dist/TxPriorityQueue.d.ts.map +1 -1
  452. package/dist/TxPriorityQueue.js +54 -36
  453. package/dist/TxPriorityQueue.js.map +1 -1
  454. package/dist/TxPubSub.d.ts +77 -49
  455. package/dist/TxPubSub.d.ts.map +1 -1
  456. package/dist/TxPubSub.js +60 -37
  457. package/dist/TxPubSub.js.map +1 -1
  458. package/dist/TxQueue.d.ts +279 -241
  459. package/dist/TxQueue.d.ts.map +1 -1
  460. package/dist/TxQueue.js +147 -101
  461. package/dist/TxQueue.js.map +1 -1
  462. package/dist/TxReentrantLock.d.ts +69 -46
  463. package/dist/TxReentrantLock.d.ts.map +1 -1
  464. package/dist/TxReentrantLock.js +48 -32
  465. package/dist/TxReentrantLock.js.map +1 -1
  466. package/dist/TxRef.d.ts +69 -40
  467. package/dist/TxRef.d.ts.map +1 -1
  468. package/dist/TxRef.js +34 -19
  469. package/dist/TxRef.js.map +1 -1
  470. package/dist/TxSemaphore.d.ts +101 -54
  471. package/dist/TxSemaphore.d.ts.map +1 -1
  472. package/dist/TxSemaphore.js +76 -34
  473. package/dist/TxSemaphore.js.map +1 -1
  474. package/dist/TxSubscriptionRef.d.ts +72 -48
  475. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  476. package/dist/TxSubscriptionRef.js +33 -22
  477. package/dist/TxSubscriptionRef.js.map +1 -1
  478. package/dist/Types.d.ts +34 -34
  479. package/dist/UndefinedOr.d.ts +48 -25
  480. package/dist/UndefinedOr.d.ts.map +1 -1
  481. package/dist/UndefinedOr.js +28 -25
  482. package/dist/UndefinedOr.js.map +1 -1
  483. package/dist/Unify.d.ts +71 -116
  484. package/dist/Unify.d.ts.map +1 -1
  485. package/dist/Unify.js +20 -6
  486. package/dist/Unify.js.map +1 -1
  487. package/dist/Utils.d.ts +4 -0
  488. package/dist/Utils.d.ts.map +1 -1
  489. package/dist/Utils.js +4 -0
  490. package/dist/Utils.js.map +1 -1
  491. package/dist/index.d.ts +81 -32
  492. package/dist/index.d.ts.map +1 -1
  493. package/dist/index.js +81 -32
  494. package/dist/index.js.map +1 -1
  495. package/dist/internal/schema/schema.js +1 -1
  496. package/dist/internal/schema/schema.js.map +1 -1
  497. package/dist/testing/FastCheck.d.ts +6 -3
  498. package/dist/testing/FastCheck.d.ts.map +1 -1
  499. package/dist/testing/FastCheck.js +6 -3
  500. package/dist/testing/FastCheck.js.map +1 -1
  501. package/dist/testing/TestClock.d.ts +39 -34
  502. package/dist/testing/TestClock.d.ts.map +1 -1
  503. package/dist/testing/TestClock.js +42 -12
  504. package/dist/testing/TestClock.js.map +1 -1
  505. package/dist/testing/TestConsole.d.ts +39 -30
  506. package/dist/testing/TestConsole.d.ts.map +1 -1
  507. package/dist/testing/TestConsole.js +25 -10
  508. package/dist/testing/TestConsole.js.map +1 -1
  509. package/dist/testing/TestSchema.js +7 -7
  510. package/dist/testing/TestSchema.js.map +1 -1
  511. package/dist/unstable/ai/AiError.d.ts +197 -130
  512. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  513. package/dist/unstable/ai/AiError.js +166 -102
  514. package/dist/unstable/ai/AiError.js.map +1 -1
  515. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  516. package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
  517. package/dist/unstable/ai/Chat.d.ts +65 -41
  518. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  519. package/dist/unstable/ai/Chat.js +51 -33
  520. package/dist/unstable/ai/Chat.js.map +1 -1
  521. package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
  522. package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
  523. package/dist/unstable/ai/EmbeddingModel.js +9 -8
  524. package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
  525. package/dist/unstable/ai/IdGenerator.d.ts +28 -18
  526. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  527. package/dist/unstable/ai/IdGenerator.js +18 -11
  528. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  529. package/dist/unstable/ai/LanguageModel.d.ts +31 -25
  530. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  531. package/dist/unstable/ai/LanguageModel.js +20 -14
  532. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  533. package/dist/unstable/ai/McpSchema.d.ts +339 -119
  534. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  535. package/dist/unstable/ai/McpSchema.js +264 -98
  536. package/dist/unstable/ai/McpSchema.js.map +1 -1
  537. package/dist/unstable/ai/McpServer.d.ts +53 -19
  538. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  539. package/dist/unstable/ai/McpServer.js +63 -15
  540. package/dist/unstable/ai/McpServer.js.map +1 -1
  541. package/dist/unstable/ai/Model.d.ts +8 -6
  542. package/dist/unstable/ai/Model.d.ts.map +1 -1
  543. package/dist/unstable/ai/Model.js +7 -5
  544. package/dist/unstable/ai/Model.js.map +1 -1
  545. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  546. package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
  547. package/dist/unstable/ai/Prompt.d.ts +194 -168
  548. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  549. package/dist/unstable/ai/Prompt.js +75 -66
  550. package/dist/unstable/ai/Prompt.js.map +1 -1
  551. package/dist/unstable/ai/Response.d.ts +153 -140
  552. package/dist/unstable/ai/Response.d.ts.map +1 -1
  553. package/dist/unstable/ai/Response.js +43 -48
  554. package/dist/unstable/ai/Response.js.map +1 -1
  555. package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
  556. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
  557. package/dist/unstable/ai/ResponseIdTracker.js +27 -2
  558. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  559. package/dist/unstable/ai/Telemetry.d.ts +42 -32
  560. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  561. package/dist/unstable/ai/Telemetry.js +14 -10
  562. package/dist/unstable/ai/Telemetry.js.map +1 -1
  563. package/dist/unstable/ai/Tokenizer.d.ts +13 -8
  564. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  565. package/dist/unstable/ai/Tokenizer.js +10 -6
  566. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  567. package/dist/unstable/ai/Tool.d.ts +153 -84
  568. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  569. package/dist/unstable/ai/Tool.js +97 -44
  570. package/dist/unstable/ai/Tool.js.map +1 -1
  571. package/dist/unstable/ai/Toolkit.d.ts +32 -39
  572. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  573. package/dist/unstable/ai/Toolkit.js +7 -5
  574. package/dist/unstable/ai/Toolkit.js.map +1 -1
  575. package/dist/unstable/ai/index.d.ts +42 -24
  576. package/dist/unstable/ai/index.d.ts.map +1 -1
  577. package/dist/unstable/ai/index.js +42 -24
  578. package/dist/unstable/ai/index.js.map +1 -1
  579. package/dist/unstable/cli/Argument.d.ts +226 -134
  580. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  581. package/dist/unstable/cli/Argument.js +101 -65
  582. package/dist/unstable/cli/Argument.js.map +1 -1
  583. package/dist/unstable/cli/CliError.d.ts +72 -26
  584. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  585. package/dist/unstable/cli/CliError.js +86 -23
  586. package/dist/unstable/cli/CliError.js.map +1 -1
  587. package/dist/unstable/cli/CliOutput.d.ts +43 -13
  588. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  589. package/dist/unstable/cli/CliOutput.js +30 -6
  590. package/dist/unstable/cli/CliOutput.js.map +1 -1
  591. package/dist/unstable/cli/Command.d.ts +194 -113
  592. package/dist/unstable/cli/Command.d.ts.map +1 -1
  593. package/dist/unstable/cli/Command.js +45 -31
  594. package/dist/unstable/cli/Command.js.map +1 -1
  595. package/dist/unstable/cli/Completions.d.ts +7 -7
  596. package/dist/unstable/cli/Completions.js +1 -1
  597. package/dist/unstable/cli/Flag.d.ts +235 -142
  598. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  599. package/dist/unstable/cli/Flag.js +111 -71
  600. package/dist/unstable/cli/Flag.js.map +1 -1
  601. package/dist/unstable/cli/GlobalFlag.d.ts +41 -13
  602. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
  603. package/dist/unstable/cli/GlobalFlag.js +30 -7
  604. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  605. package/dist/unstable/cli/HelpDoc.d.ts +35 -10
  606. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  607. package/dist/unstable/cli/HelpDoc.js +21 -0
  608. package/dist/unstable/cli/Param.d.ts +79 -31
  609. package/dist/unstable/cli/Param.d.ts.map +1 -1
  610. package/dist/unstable/cli/Param.js +160 -98
  611. package/dist/unstable/cli/Param.js.map +1 -1
  612. package/dist/unstable/cli/Primitive.d.ts +79 -42
  613. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  614. package/dist/unstable/cli/Primitive.js +66 -35
  615. package/dist/unstable/cli/Primitive.js.map +1 -1
  616. package/dist/unstable/cli/Prompt.d.ts +177 -45
  617. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  618. package/dist/unstable/cli/Prompt.js +103 -21
  619. package/dist/unstable/cli/Prompt.js.map +1 -1
  620. package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
  621. package/dist/unstable/cli/internal/ansi.js +13 -0
  622. package/dist/unstable/cli/internal/ansi.js.map +1 -1
  623. package/dist/unstable/cli/internal/command.d.ts +5 -1
  624. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  625. package/dist/unstable/cli/internal/command.js +5 -1
  626. package/dist/unstable/cli/internal/command.js.map +1 -1
  627. package/dist/unstable/cli/internal/config.d.ts +3 -0
  628. package/dist/unstable/cli/internal/config.d.ts.map +1 -1
  629. package/dist/unstable/cli/internal/config.js.map +1 -1
  630. package/dist/unstable/cli/internal/lexer.js.map +1 -1
  631. package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
  632. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  633. package/dist/unstable/cluster/ClusterCron.js +35 -1
  634. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  635. package/dist/unstable/cluster/ClusterError.d.ts +56 -7
  636. package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
  637. package/dist/unstable/cluster/ClusterError.js +56 -7
  638. package/dist/unstable/cluster/ClusterError.js.map +1 -1
  639. package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
  640. package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
  641. package/dist/unstable/cluster/ClusterMetrics.js +39 -5
  642. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  643. package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
  644. package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
  645. package/dist/unstable/cluster/ClusterSchema.js +61 -8
  646. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  647. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
  648. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  649. package/dist/unstable/cluster/ClusterWorkflowEngine.js +35 -2
  650. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  651. package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
  652. package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
  653. package/dist/unstable/cluster/DeliverAt.js +11 -3
  654. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  655. package/dist/unstable/cluster/Entity.d.ts +75 -16
  656. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  657. package/dist/unstable/cluster/Entity.js +75 -10
  658. package/dist/unstable/cluster/Entity.js.map +1 -1
  659. package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
  660. package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
  661. package/dist/unstable/cluster/EntityAddress.js +30 -2
  662. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  663. package/dist/unstable/cluster/EntityId.d.ts +18 -3
  664. package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
  665. package/dist/unstable/cluster/EntityId.js +15 -2
  666. package/dist/unstable/cluster/EntityId.js.map +1 -1
  667. package/dist/unstable/cluster/EntityProxy.d.ts +34 -2
  668. package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
  669. package/dist/unstable/cluster/EntityProxy.js +24 -2
  670. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  671. package/dist/unstable/cluster/EntityProxyServer.d.ts +17 -2
  672. package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
  673. package/dist/unstable/cluster/EntityProxyServer.js +40 -8
  674. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  675. package/dist/unstable/cluster/EntityResource.d.ts +43 -6
  676. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  677. package/dist/unstable/cluster/EntityResource.js +11 -4
  678. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  679. package/dist/unstable/cluster/EntityType.d.ts +27 -3
  680. package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
  681. package/dist/unstable/cluster/EntityType.js +24 -2
  682. package/dist/unstable/cluster/EntityType.js.map +1 -1
  683. package/dist/unstable/cluster/Envelope.d.ts +105 -23
  684. package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
  685. package/dist/unstable/cluster/Envelope.js +88 -14
  686. package/dist/unstable/cluster/Envelope.js.map +1 -1
  687. package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
  688. package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
  689. package/dist/unstable/cluster/HttpRunner.js +88 -13
  690. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  691. package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
  692. package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
  693. package/dist/unstable/cluster/K8sHttpClient.js +31 -6
  694. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  695. package/dist/unstable/cluster/MachineId.d.ts +24 -3
  696. package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
  697. package/dist/unstable/cluster/MachineId.js +21 -2
  698. package/dist/unstable/cluster/MachineId.js.map +1 -1
  699. package/dist/unstable/cluster/Message.d.ts +102 -13
  700. package/dist/unstable/cluster/Message.d.ts.map +1 -1
  701. package/dist/unstable/cluster/Message.js +86 -10
  702. package/dist/unstable/cluster/Message.js.map +1 -1
  703. package/dist/unstable/cluster/MessageStorage.d.ts +127 -21
  704. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  705. package/dist/unstable/cluster/MessageStorage.js +70 -10
  706. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  707. package/dist/unstable/cluster/Reply.d.ts +101 -12
  708. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  709. package/dist/unstable/cluster/Reply.js +64 -8
  710. package/dist/unstable/cluster/Reply.js.map +1 -1
  711. package/dist/unstable/cluster/Runner.d.ts +47 -17
  712. package/dist/unstable/cluster/Runner.d.ts.map +1 -1
  713. package/dist/unstable/cluster/Runner.js +47 -17
  714. package/dist/unstable/cluster/Runner.js.map +1 -1
  715. package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
  716. package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
  717. package/dist/unstable/cluster/RunnerAddress.js +34 -2
  718. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  719. package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
  720. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  721. package/dist/unstable/cluster/RunnerHealth.js +40 -12
  722. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  723. package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
  724. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  725. package/dist/unstable/cluster/RunnerServer.js +31 -4
  726. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  727. package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
  728. package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
  729. package/dist/unstable/cluster/RunnerStorage.js +38 -4
  730. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  731. package/dist/unstable/cluster/Runners.d.ts +73 -10
  732. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  733. package/dist/unstable/cluster/Runners.js +70 -9
  734. package/dist/unstable/cluster/Runners.js.map +1 -1
  735. package/dist/unstable/cluster/ShardId.d.ts +51 -5
  736. package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
  737. package/dist/unstable/cluster/ShardId.js +47 -4
  738. package/dist/unstable/cluster/ShardId.js.map +1 -1
  739. package/dist/unstable/cluster/Sharding.d.ts +10 -2
  740. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  741. package/dist/unstable/cluster/Sharding.js +35 -4
  742. package/dist/unstable/cluster/Sharding.js.map +1 -1
  743. package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
  744. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  745. package/dist/unstable/cluster/ShardingConfig.js +66 -9
  746. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  747. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
  748. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
  749. package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
  750. package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
  751. package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
  752. package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
  753. package/dist/unstable/cluster/SingleRunner.js +23 -1
  754. package/dist/unstable/cluster/SingleRunner.js.map +1 -1
  755. package/dist/unstable/cluster/Singleton.d.ts +15 -1
  756. package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
  757. package/dist/unstable/cluster/Singleton.js +15 -1
  758. package/dist/unstable/cluster/Singleton.js.map +1 -1
  759. package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
  760. package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
  761. package/dist/unstable/cluster/SingletonAddress.js +21 -1
  762. package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
  763. package/dist/unstable/cluster/Snowflake.d.ts +89 -19
  764. package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
  765. package/dist/unstable/cluster/Snowflake.js +48 -13
  766. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  767. package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
  768. package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
  769. package/dist/unstable/cluster/SocketRunner.js +29 -2
  770. package/dist/unstable/cluster/SocketRunner.js.map +1 -1
  771. package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
  772. package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
  773. package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
  774. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  775. package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
  776. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  777. package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
  778. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  779. package/dist/unstable/cluster/TestRunner.d.ts +18 -1
  780. package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
  781. package/dist/unstable/cluster/TestRunner.js +18 -1
  782. package/dist/unstable/cluster/TestRunner.js.map +1 -1
  783. package/dist/unstable/cluster/internal/hash.js +12 -0
  784. package/dist/unstable/cluster/internal/hash.js.map +1 -1
  785. package/dist/unstable/devtools/DevTools.d.ts +26 -3
  786. package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
  787. package/dist/unstable/devtools/DevTools.js +26 -3
  788. package/dist/unstable/devtools/DevTools.js.map +1 -1
  789. package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
  790. package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
  791. package/dist/unstable/devtools/DevToolsClient.js +32 -5
  792. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  793. package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
  794. package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
  795. package/dist/unstable/devtools/DevToolsSchema.js +102 -20
  796. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  797. package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
  798. package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
  799. package/dist/unstable/devtools/DevToolsServer.js +21 -1
  800. package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
  801. package/dist/unstable/encoding/Msgpack.d.ts +81 -12
  802. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  803. package/dist/unstable/encoding/Msgpack.js +75 -9
  804. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  805. package/dist/unstable/encoding/Ndjson.d.ts +149 -21
  806. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  807. package/dist/unstable/encoding/Ndjson.js +97 -13
  808. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  809. package/dist/unstable/encoding/Sse.d.ts +109 -18
  810. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  811. package/dist/unstable/encoding/Sse.js +69 -13
  812. package/dist/unstable/encoding/Sse.js.map +1 -1
  813. package/dist/unstable/eventlog/Event.d.ts +115 -30
  814. package/dist/unstable/eventlog/Event.d.ts.map +1 -1
  815. package/dist/unstable/eventlog/Event.js +22 -2
  816. package/dist/unstable/eventlog/Event.js.map +1 -1
  817. package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
  818. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  819. package/dist/unstable/eventlog/EventGroup.js +24 -6
  820. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  821. package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
  822. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  823. package/dist/unstable/eventlog/EventJournal.js +108 -16
  824. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  825. package/dist/unstable/eventlog/EventLog.d.ts +151 -31
  826. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  827. package/dist/unstable/eventlog/EventLog.js +111 -20
  828. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  829. package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
  830. package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
  831. package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
  832. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  833. package/dist/unstable/eventlog/EventLogMessage.d.ts +92 -18
  834. package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
  835. package/dist/unstable/eventlog/EventLogMessage.js +72 -16
  836. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
  837. package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
  838. package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
  839. package/dist/unstable/eventlog/EventLogRemote.js +54 -8
  840. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  841. package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
  842. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  843. package/dist/unstable/eventlog/EventLogServer.js +17 -3
  844. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  845. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
  846. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  847. package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
  848. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  849. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
  850. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  851. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
  852. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  853. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
  854. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
  855. package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
  856. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
  857. package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
  858. package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
  859. package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
  860. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
  861. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
  862. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
  863. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
  864. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
  865. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
  866. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
  867. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
  868. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
  869. package/dist/unstable/http/Cookies.d.ts +156 -77
  870. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  871. package/dist/unstable/http/Cookies.js +93 -39
  872. package/dist/unstable/http/Cookies.js.map +1 -1
  873. package/dist/unstable/http/Etag.d.ts +40 -7
  874. package/dist/unstable/http/Etag.d.ts.map +1 -1
  875. package/dist/unstable/http/Etag.js +27 -4
  876. package/dist/unstable/http/Etag.js.map +1 -1
  877. package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
  878. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  879. package/dist/unstable/http/FetchHttpClient.js +33 -4
  880. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  881. package/dist/unstable/http/FindMyWay.d.ts +1 -1
  882. package/dist/unstable/http/FindMyWay.js +1 -1
  883. package/dist/unstable/http/Headers.d.ts +182 -36
  884. package/dist/unstable/http/Headers.d.ts.map +1 -1
  885. package/dist/unstable/http/Headers.js +86 -16
  886. package/dist/unstable/http/Headers.js.map +1 -1
  887. package/dist/unstable/http/HttpBody.d.ts +114 -26
  888. package/dist/unstable/http/HttpBody.d.ts.map +1 -1
  889. package/dist/unstable/http/HttpBody.js +98 -20
  890. package/dist/unstable/http/HttpBody.js.map +1 -1
  891. package/dist/unstable/http/HttpClient.d.ts +205 -96
  892. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  893. package/dist/unstable/http/HttpClient.js +84 -38
  894. package/dist/unstable/http/HttpClient.js.map +1 -1
  895. package/dist/unstable/http/HttpClientError.d.ts +68 -12
  896. package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
  897. package/dist/unstable/http/HttpClientError.js +71 -9
  898. package/dist/unstable/http/HttpClientError.js.map +1 -1
  899. package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
  900. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  901. package/dist/unstable/http/HttpClientRequest.js +151 -45
  902. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  903. package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
  904. package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
  905. package/dist/unstable/http/HttpClientResponse.js +44 -11
  906. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  907. package/dist/unstable/http/HttpEffect.d.ts +42 -16
  908. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  909. package/dist/unstable/http/HttpEffect.js +33 -13
  910. package/dist/unstable/http/HttpEffect.js.map +1 -1
  911. package/dist/unstable/http/HttpIncomingMessage.d.ts +47 -7
  912. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  913. package/dist/unstable/http/HttpIncomingMessage.js +44 -6
  914. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  915. package/dist/unstable/http/HttpMethod.d.ts +35 -5
  916. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  917. package/dist/unstable/http/HttpMethod.js +23 -1
  918. package/dist/unstable/http/HttpMethod.js.map +1 -1
  919. package/dist/unstable/http/HttpMiddleware.d.ts +37 -11
  920. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  921. package/dist/unstable/http/HttpMiddleware.js +52 -10
  922. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  923. package/dist/unstable/http/HttpPlatform.d.ts +34 -3
  924. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  925. package/dist/unstable/http/HttpPlatform.js +34 -3
  926. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  927. package/dist/unstable/http/HttpRouter.d.ts +194 -45
  928. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  929. package/dist/unstable/http/HttpRouter.js +118 -24
  930. package/dist/unstable/http/HttpRouter.js.map +1 -1
  931. package/dist/unstable/http/HttpServer.d.ts +151 -22
  932. package/dist/unstable/http/HttpServer.d.ts.map +1 -1
  933. package/dist/unstable/http/HttpServer.js +76 -11
  934. package/dist/unstable/http/HttpServer.js.map +1 -1
  935. package/dist/unstable/http/HttpServerError.d.ts +90 -10
  936. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  937. package/dist/unstable/http/HttpServerError.js +82 -8
  938. package/dist/unstable/http/HttpServerError.js.map +1 -1
  939. package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
  940. package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
  941. package/dist/unstable/http/HttpServerRequest.js +101 -20
  942. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  943. package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
  944. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  945. package/dist/unstable/http/HttpServerRespondable.js +43 -5
  946. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  947. package/dist/unstable/http/HttpServerResponse.d.ts +390 -67
  948. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  949. package/dist/unstable/http/HttpServerResponse.js +204 -33
  950. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  951. package/dist/unstable/http/HttpStaticServer.d.ts +22 -4
  952. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
  953. package/dist/unstable/http/HttpStaticServer.js +22 -4
  954. package/dist/unstable/http/HttpStaticServer.js.map +1 -1
  955. package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
  956. package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
  957. package/dist/unstable/http/HttpTraceContext.js +47 -5
  958. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  959. package/dist/unstable/http/Multipart.d.ts +178 -28
  960. package/dist/unstable/http/Multipart.d.ts.map +1 -1
  961. package/dist/unstable/http/Multipart.js +129 -19
  962. package/dist/unstable/http/Multipart.js.map +1 -1
  963. package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
  964. package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
  965. package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
  966. package/dist/unstable/http/Multipasta/Node.js +1 -1
  967. package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
  968. package/dist/unstable/http/Multipasta/Search.js +1 -1
  969. package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
  970. package/dist/unstable/http/Multipasta/Web.js +1 -1
  971. package/dist/unstable/http/Multipasta.d.ts +1 -1
  972. package/dist/unstable/http/Multipasta.js +1 -1
  973. package/dist/unstable/http/Template.d.ts +53 -0
  974. package/dist/unstable/http/Template.d.ts.map +1 -1
  975. package/dist/unstable/http/Template.js +26 -0
  976. package/dist/unstable/http/Template.js.map +1 -1
  977. package/dist/unstable/http/Url.d.ts +56 -42
  978. package/dist/unstable/http/Url.d.ts.map +1 -1
  979. package/dist/unstable/http/Url.js +29 -15
  980. package/dist/unstable/http/Url.js.map +1 -1
  981. package/dist/unstable/http/UrlParams.d.ts +233 -49
  982. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  983. package/dist/unstable/http/UrlParams.js +116 -23
  984. package/dist/unstable/http/UrlParams.js.map +1 -1
  985. package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
  986. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  987. package/dist/unstable/httpapi/HttpApi.js +14 -8
  988. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  989. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +55 -16
  990. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  991. package/dist/unstable/httpapi/HttpApiBuilder.js +44 -6
  992. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  993. package/dist/unstable/httpapi/HttpApiClient.d.ts +58 -15
  994. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  995. package/dist/unstable/httpapi/HttpApiClient.js +42 -6
  996. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  997. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
  998. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  999. package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
  1000. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  1001. package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
  1002. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  1003. package/dist/unstable/httpapi/HttpApiError.js +98 -1
  1004. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  1005. package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
  1006. package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
  1007. package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
  1008. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  1009. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +111 -22
  1010. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  1011. package/dist/unstable/httpapi/HttpApiMiddleware.js +47 -5
  1012. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  1013. package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
  1014. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  1015. package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
  1016. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  1017. package/dist/unstable/httpapi/HttpApiSchema.d.ts +67 -30
  1018. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  1019. package/dist/unstable/httpapi/HttpApiSchema.js +48 -27
  1020. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  1021. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +74 -17
  1022. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  1023. package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
  1024. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  1025. package/dist/unstable/httpapi/HttpApiSwagger.d.ts +5 -2
  1026. package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
  1027. package/dist/unstable/httpapi/HttpApiSwagger.js +24 -2
  1028. package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
  1029. package/dist/unstable/httpapi/HttpApiTest.d.ts +6 -1
  1030. package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
  1031. package/dist/unstable/httpapi/HttpApiTest.js +26 -1
  1032. package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
  1033. package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
  1034. package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
  1035. package/dist/unstable/httpapi/OpenApi.js +73 -15
  1036. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  1037. package/dist/unstable/observability/Otlp.d.ts +33 -3
  1038. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  1039. package/dist/unstable/observability/Otlp.js +14 -3
  1040. package/dist/unstable/observability/Otlp.js.map +1 -1
  1041. package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
  1042. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  1043. package/dist/unstable/observability/OtlpExporter.js +32 -1
  1044. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  1045. package/dist/unstable/observability/OtlpLogger.d.ts +14 -2
  1046. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  1047. package/dist/unstable/observability/OtlpLogger.js +29 -2
  1048. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  1049. package/dist/unstable/observability/OtlpMetrics.d.ts +15 -4
  1050. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  1051. package/dist/unstable/observability/OtlpMetrics.js +32 -2
  1052. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  1053. package/dist/unstable/observability/OtlpResource.d.ts +49 -12
  1054. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  1055. package/dist/unstable/observability/OtlpResource.js +47 -5
  1056. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  1057. package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
  1058. package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
  1059. package/dist/unstable/observability/OtlpSerialization.js +28 -3
  1060. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  1061. package/dist/unstable/observability/OtlpTracer.d.ts +16 -2
  1062. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  1063. package/dist/unstable/observability/OtlpTracer.js +32 -2
  1064. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  1065. package/dist/unstable/observability/PrometheusMetrics.d.ts +32 -12
  1066. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  1067. package/dist/unstable/observability/PrometheusMetrics.js +7 -5
  1068. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  1069. package/dist/unstable/observability/index.d.ts +2 -1
  1070. package/dist/unstable/observability/index.d.ts.map +1 -1
  1071. package/dist/unstable/observability/index.js +2 -1
  1072. package/dist/unstable/observability/index.js.map +1 -1
  1073. package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
  1074. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  1075. package/dist/unstable/persistence/KeyValueStore.js +81 -21
  1076. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  1077. package/dist/unstable/persistence/Persistable.d.ts +76 -15
  1078. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  1079. package/dist/unstable/persistence/Persistable.js +22 -5
  1080. package/dist/unstable/persistence/Persistable.js.map +1 -1
  1081. package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
  1082. package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
  1083. package/dist/unstable/persistence/PersistedCache.js +24 -1
  1084. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  1085. package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
  1086. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  1087. package/dist/unstable/persistence/PersistedQueue.js +60 -13
  1088. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  1089. package/dist/unstable/persistence/Persistence.d.ts +97 -16
  1090. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  1091. package/dist/unstable/persistence/Persistence.js +90 -14
  1092. package/dist/unstable/persistence/Persistence.js.map +1 -1
  1093. package/dist/unstable/persistence/RateLimiter.d.ts +97 -21
  1094. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  1095. package/dist/unstable/persistence/RateLimiter.js +81 -16
  1096. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  1097. package/dist/unstable/persistence/Redis.d.ts +26 -5
  1098. package/dist/unstable/persistence/Redis.d.ts.map +1 -1
  1099. package/dist/unstable/persistence/Redis.js +36 -4
  1100. package/dist/unstable/persistence/Redis.js.map +1 -1
  1101. package/dist/unstable/process/ChildProcess.d.ts +87 -64
  1102. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  1103. package/dist/unstable/process/ChildProcess.js +24 -17
  1104. package/dist/unstable/process/ChildProcess.js.map +1 -1
  1105. package/dist/unstable/process/ChildProcessSpawner.d.ts +22 -11
  1106. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  1107. package/dist/unstable/process/ChildProcessSpawner.js +11 -6
  1108. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  1109. package/dist/unstable/process/index.d.ts +2 -1
  1110. package/dist/unstable/process/index.d.ts.map +1 -1
  1111. package/dist/unstable/process/index.js +2 -1
  1112. package/dist/unstable/process/index.js.map +1 -1
  1113. package/dist/unstable/reactivity/AsyncResult.d.ts +196 -59
  1114. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  1115. package/dist/unstable/reactivity/AsyncResult.js +121 -36
  1116. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  1117. package/dist/unstable/reactivity/Atom.d.ts +539 -130
  1118. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1119. package/dist/unstable/reactivity/Atom.js +252 -58
  1120. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1121. package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
  1122. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1123. package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
  1124. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1125. package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
  1126. package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
  1127. package/dist/unstable/reactivity/AtomRef.js +29 -3
  1128. package/dist/unstable/reactivity/AtomRef.js.map +1 -1
  1129. package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
  1130. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  1131. package/dist/unstable/reactivity/AtomRegistry.js +69 -10
  1132. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1133. package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
  1134. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1135. package/dist/unstable/reactivity/AtomRpc.js +29 -1
  1136. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1137. package/dist/unstable/reactivity/Hydration.d.ts +28 -5
  1138. package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
  1139. package/dist/unstable/reactivity/Hydration.js +35 -3
  1140. package/dist/unstable/reactivity/Hydration.js.map +1 -1
  1141. package/dist/unstable/reactivity/Reactivity.d.ts +95 -13
  1142. package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
  1143. package/dist/unstable/reactivity/Reactivity.js +61 -7
  1144. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1145. package/dist/unstable/rpc/Rpc.d.ts +255 -56
  1146. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1147. package/dist/unstable/rpc/Rpc.js +44 -11
  1148. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1149. package/dist/unstable/rpc/RpcClient.d.ts +81 -19
  1150. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1151. package/dist/unstable/rpc/RpcClient.js +52 -12
  1152. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1153. package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
  1154. package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
  1155. package/dist/unstable/rpc/RpcClientError.js +26 -2
  1156. package/dist/unstable/rpc/RpcClientError.js.map +1 -1
  1157. package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
  1158. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  1159. package/dist/unstable/rpc/RpcGroup.js +3 -1
  1160. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1161. package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
  1162. package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
  1163. package/dist/unstable/rpc/RpcMessage.js +23 -7
  1164. package/dist/unstable/rpc/RpcMessage.js.map +1 -1
  1165. package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
  1166. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  1167. package/dist/unstable/rpc/RpcMiddleware.js +39 -3
  1168. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1169. package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
  1170. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  1171. package/dist/unstable/rpc/RpcSchema.js +34 -3
  1172. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1173. package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
  1174. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1175. package/dist/unstable/rpc/RpcSerialization.js +56 -12
  1176. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1177. package/dist/unstable/rpc/RpcServer.d.ts +73 -23
  1178. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  1179. package/dist/unstable/rpc/RpcServer.js +69 -22
  1180. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1181. package/dist/unstable/rpc/RpcTest.d.ts +20 -1
  1182. package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
  1183. package/dist/unstable/rpc/RpcTest.js +20 -1
  1184. package/dist/unstable/rpc/RpcTest.js.map +1 -1
  1185. package/dist/unstable/rpc/RpcWorker.d.ts +40 -6
  1186. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  1187. package/dist/unstable/rpc/RpcWorker.js +16 -4
  1188. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1189. package/dist/unstable/rpc/Utils.d.ts +8 -0
  1190. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  1191. package/dist/unstable/rpc/Utils.js +8 -0
  1192. package/dist/unstable/rpc/Utils.js.map +1 -1
  1193. package/dist/unstable/schema/Model.d.ts +130 -52
  1194. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1195. package/dist/unstable/schema/Model.js +79 -34
  1196. package/dist/unstable/schema/Model.js.map +1 -1
  1197. package/dist/unstable/schema/VariantSchema.d.ts +104 -24
  1198. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  1199. package/dist/unstable/schema/VariantSchema.js +22 -6
  1200. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1201. package/dist/unstable/socket/Socket.d.ts +167 -34
  1202. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1203. package/dist/unstable/socket/Socket.js +123 -28
  1204. package/dist/unstable/socket/Socket.js.map +1 -1
  1205. package/dist/unstable/socket/SocketServer.d.ts +58 -10
  1206. package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
  1207. package/dist/unstable/socket/SocketServer.js +43 -5
  1208. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1209. package/dist/unstable/sql/Migrator.d.ts +35 -4
  1210. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  1211. package/dist/unstable/sql/Migrator.js +44 -4
  1212. package/dist/unstable/sql/Migrator.js.map +1 -1
  1213. package/dist/unstable/sql/SqlClient.d.ts +34 -2
  1214. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1215. package/dist/unstable/sql/SqlClient.js +38 -1
  1216. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1217. package/dist/unstable/sql/SqlConnection.d.ts +31 -0
  1218. package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
  1219. package/dist/unstable/sql/SqlConnection.js +22 -0
  1220. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1221. package/dist/unstable/sql/SqlError.d.ts +99 -0
  1222. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  1223. package/dist/unstable/sql/SqlError.js +114 -0
  1224. package/dist/unstable/sql/SqlError.js.map +1 -1
  1225. package/dist/unstable/sql/SqlModel.d.ts +26 -5
  1226. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  1227. package/dist/unstable/sql/SqlModel.js +8 -4
  1228. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1229. package/dist/unstable/sql/SqlResolver.d.ts +56 -13
  1230. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  1231. package/dist/unstable/sql/SqlResolver.js +44 -10
  1232. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1233. package/dist/unstable/sql/SqlSchema.d.ts +29 -8
  1234. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  1235. package/dist/unstable/sql/SqlSchema.js +29 -8
  1236. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1237. package/dist/unstable/sql/SqlStream.d.ts +3 -0
  1238. package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
  1239. package/dist/unstable/sql/SqlStream.js +23 -0
  1240. package/dist/unstable/sql/SqlStream.js.map +1 -1
  1241. package/dist/unstable/sql/Statement.d.ts +124 -0
  1242. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  1243. package/dist/unstable/sql/Statement.js +82 -0
  1244. package/dist/unstable/sql/Statement.js.map +1 -1
  1245. package/dist/unstable/sql/index.d.ts +1 -1
  1246. package/dist/unstable/sql/index.js +1 -1
  1247. package/dist/unstable/workers/Transferable.d.ts +65 -13
  1248. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  1249. package/dist/unstable/workers/Transferable.js +53 -10
  1250. package/dist/unstable/workers/Transferable.js.map +1 -1
  1251. package/dist/unstable/workers/Worker.d.ts +60 -8
  1252. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  1253. package/dist/unstable/workers/Worker.js +43 -4
  1254. package/dist/unstable/workers/Worker.js.map +1 -1
  1255. package/dist/unstable/workers/WorkerError.d.ts +31 -9
  1256. package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
  1257. package/dist/unstable/workers/WorkerError.js +44 -7
  1258. package/dist/unstable/workers/WorkerError.js.map +1 -1
  1259. package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
  1260. package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
  1261. package/dist/unstable/workers/WorkerRunner.js +24 -1
  1262. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1263. package/dist/unstable/workers/index.d.ts +1 -1
  1264. package/dist/unstable/workers/index.js +1 -1
  1265. package/dist/unstable/workflow/Activity.d.ts +61 -10
  1266. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  1267. package/dist/unstable/workflow/Activity.js +20 -5
  1268. package/dist/unstable/workflow/Activity.js.map +1 -1
  1269. package/dist/unstable/workflow/DurableClock.d.ts +12 -3
  1270. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  1271. package/dist/unstable/workflow/DurableClock.js +22 -2
  1272. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1273. package/dist/unstable/workflow/DurableDeferred.d.ts +126 -31
  1274. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  1275. package/dist/unstable/workflow/DurableDeferred.js +76 -13
  1276. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1277. package/dist/unstable/workflow/DurableQueue.d.ts +30 -7
  1278. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  1279. package/dist/unstable/workflow/DurableQueue.js +23 -5
  1280. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  1281. package/dist/unstable/workflow/Workflow.d.ts +100 -31
  1282. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1283. package/dist/unstable/workflow/Workflow.js +75 -19
  1284. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1285. package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
  1286. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  1287. package/dist/unstable/workflow/WorkflowEngine.js +16 -4
  1288. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1289. package/dist/unstable/workflow/WorkflowProxy.d.ts +32 -2
  1290. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  1291. package/dist/unstable/workflow/WorkflowProxy.js +2 -2
  1292. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  1293. package/dist/unstable/workflow/WorkflowProxyServer.d.ts +36 -2
  1294. package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
  1295. package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
  1296. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1297. package/package.json +11 -11
  1298. package/src/Array.ts +113 -67
  1299. package/src/BigDecimal.ts +404 -337
  1300. package/src/BigInt.ts +167 -97
  1301. package/src/Boolean.ts +62 -31
  1302. package/src/Brand.ts +20 -1
  1303. package/src/Cache.ts +331 -164
  1304. package/src/Cause.ts +74 -62
  1305. package/src/Channel.ts +1585 -607
  1306. package/src/ChannelSchema.ts +137 -12
  1307. package/src/Chunk.ts +549 -380
  1308. package/src/Clock.ts +15 -8
  1309. package/src/Combiner.ts +2 -4
  1310. package/src/Config.ts +4 -2
  1311. package/src/ConfigProvider.ts +1 -1
  1312. package/src/Console.ts +88 -58
  1313. package/src/Context.ts +384 -135
  1314. package/src/Cron.ts +111 -48
  1315. package/src/Data.ts +3 -2
  1316. package/src/DateTime.ts +874 -443
  1317. package/src/Deferred.ts +367 -174
  1318. package/src/Differ.ts +42 -0
  1319. package/src/Duration.ts +329 -185
  1320. package/src/Effect.ts +2127 -1957
  1321. package/src/Effectable.ts +37 -2
  1322. package/src/Encoding.ts +78 -28
  1323. package/src/Equivalence.ts +14 -19
  1324. package/src/ErrorReporter.ts +66 -82
  1325. package/src/ExecutionPlan.ts +94 -9
  1326. package/src/Exit.ts +7 -5
  1327. package/src/Fiber.ts +72 -40
  1328. package/src/FiberHandle.ts +156 -56
  1329. package/src/FiberMap.ts +327 -162
  1330. package/src/FiberSet.ts +129 -51
  1331. package/src/FileSystem.ts +106 -74
  1332. package/src/Filter.ts +166 -88
  1333. package/src/Function.ts +154 -86
  1334. package/src/Graph.ts +682 -365
  1335. package/src/HKT.ts +29 -13
  1336. package/src/Hash.ts +31 -18
  1337. package/src/HashMap.ts +444 -256
  1338. package/src/HashRing.ts +94 -17
  1339. package/src/HashSet.ts +194 -104
  1340. package/src/Inspectable.ts +22 -10
  1341. package/src/Iterable.ts +309 -149
  1342. package/src/JsonPatch.ts +4 -3
  1343. package/src/Latch.ts +98 -15
  1344. package/src/Layer.ts +487 -344
  1345. package/src/LayerMap.ts +95 -21
  1346. package/src/LogLevel.ts +92 -131
  1347. package/src/Logger.ts +357 -288
  1348. package/src/ManagedRuntime.ts +75 -17
  1349. package/src/Match.ts +133 -157
  1350. package/src/Metric.ts +355 -304
  1351. package/src/MutableHashMap.ts +161 -84
  1352. package/src/MutableHashSet.ts +122 -52
  1353. package/src/MutableList.ts +141 -81
  1354. package/src/MutableRef.ts +130 -90
  1355. package/src/Newtype.ts +3 -0
  1356. package/src/NonEmptyIterable.ts +36 -39
  1357. package/src/Number.ts +116 -64
  1358. package/src/Optic.ts +1 -2
  1359. package/src/Option.ts +28 -47
  1360. package/src/Ordering.ts +43 -28
  1361. package/src/PartitionedSemaphore.ts +225 -40
  1362. package/src/Path.ts +77 -13
  1363. package/src/Pipeable.ts +76 -21
  1364. package/src/PlatformError.ts +74 -6
  1365. package/src/Pool.ts +94 -31
  1366. package/src/Predicate.ts +16 -21
  1367. package/src/PrimaryKey.ts +9 -2
  1368. package/src/PubSub.ts +364 -262
  1369. package/src/Pull.ts +94 -25
  1370. package/src/Queue.ts +284 -150
  1371. package/src/Random.ts +54 -35
  1372. package/src/RcMap.ts +151 -141
  1373. package/src/RcRef.ts +69 -32
  1374. package/src/Record.ts +273 -129
  1375. package/src/Redactable.ts +3 -3
  1376. package/src/Redacted.ts +63 -33
  1377. package/src/Ref.ts +161 -104
  1378. package/src/References.ts +73 -31
  1379. package/src/RegExp.ts +11 -5
  1380. package/src/Request.ts +158 -34
  1381. package/src/RequestResolver.ts +277 -119
  1382. package/src/Resource.ts +45 -7
  1383. package/src/Result.ts +18 -16
  1384. package/src/Runtime.ts +45 -19
  1385. package/src/Schedule.ts +574 -599
  1386. package/src/Scheduler.ts +43 -6
  1387. package/src/Schema.ts +819 -295
  1388. package/src/SchemaAST.ts +25 -16
  1389. package/src/SchemaGetter.ts +29 -14
  1390. package/src/SchemaIssue.ts +1 -8
  1391. package/src/SchemaParser.ts +262 -38
  1392. package/src/SchemaTransformation.ts +61 -41
  1393. package/src/SchemaUtils.ts +23 -0
  1394. package/src/Scope.ts +102 -43
  1395. package/src/ScopedCache.ts +192 -56
  1396. package/src/ScopedRef.ts +28 -8
  1397. package/src/Semaphore.ts +64 -28
  1398. package/src/Sink.ts +458 -200
  1399. package/src/Stdio.ts +43 -6
  1400. package/src/Stream.ts +2039 -1252
  1401. package/src/String.ts +171 -95
  1402. package/src/SubscriptionRef.ts +308 -203
  1403. package/src/Symbol.ts +13 -5
  1404. package/src/SynchronizedRef.ts +278 -62
  1405. package/src/Take.ts +26 -2
  1406. package/src/Terminal.ts +40 -7
  1407. package/src/Tracer.ts +229 -55
  1408. package/src/Trie.ts +213 -142
  1409. package/src/TxChunk.ts +182 -146
  1410. package/src/TxDeferred.ts +43 -29
  1411. package/src/TxHashMap.ts +370 -230
  1412. package/src/TxHashSet.ts +250 -152
  1413. package/src/TxPriorityQueue.ts +96 -64
  1414. package/src/TxPubSub.ts +77 -49
  1415. package/src/TxQueue.ts +279 -241
  1416. package/src/TxReentrantLock.ts +70 -47
  1417. package/src/TxRef.ts +69 -40
  1418. package/src/TxSemaphore.ts +101 -54
  1419. package/src/TxSubscriptionRef.ts +72 -48
  1420. package/src/Types.ts +34 -34
  1421. package/src/UndefinedOr.ts +48 -25
  1422. package/src/Unify.ts +71 -116
  1423. package/src/Utils.ts +4 -0
  1424. package/src/index.ts +81 -32
  1425. package/src/internal/schema/schema.ts +1 -1
  1426. package/src/testing/FastCheck.ts +6 -3
  1427. package/src/testing/TestClock.ts +63 -34
  1428. package/src/testing/TestConsole.ts +49 -30
  1429. package/src/testing/TestSchema.ts +8 -8
  1430. package/src/unstable/ai/AiError.ts +187 -120
  1431. package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
  1432. package/src/unstable/ai/Chat.ts +69 -43
  1433. package/src/unstable/ai/EmbeddingModel.ts +12 -11
  1434. package/src/unstable/ai/IdGenerator.ts +28 -18
  1435. package/src/unstable/ai/LanguageModel.ts +35 -27
  1436. package/src/unstable/ai/McpSchema.ts +339 -119
  1437. package/src/unstable/ai/McpServer.ts +76 -19
  1438. package/src/unstable/ai/Model.ts +8 -6
  1439. package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
  1440. package/src/unstable/ai/Prompt.ts +210 -184
  1441. package/src/unstable/ai/Response.ts +159 -147
  1442. package/src/unstable/ai/ResponseIdTracker.ts +43 -4
  1443. package/src/unstable/ai/Telemetry.ts +42 -32
  1444. package/src/unstable/ai/Tokenizer.ts +13 -8
  1445. package/src/unstable/ai/Tool.ts +154 -85
  1446. package/src/unstable/ai/Toolkit.ts +51 -46
  1447. package/src/unstable/ai/index.ts +42 -24
  1448. package/src/unstable/cli/Argument.ts +226 -134
  1449. package/src/unstable/cli/CliError.ts +96 -26
  1450. package/src/unstable/cli/CliOutput.ts +43 -13
  1451. package/src/unstable/cli/Command.ts +194 -113
  1452. package/src/unstable/cli/Completions.ts +7 -7
  1453. package/src/unstable/cli/Flag.ts +235 -142
  1454. package/src/unstable/cli/GlobalFlag.ts +41 -13
  1455. package/src/unstable/cli/HelpDoc.ts +35 -10
  1456. package/src/unstable/cli/Param.ts +327 -189
  1457. package/src/unstable/cli/Primitive.ts +79 -42
  1458. package/src/unstable/cli/Prompt.ts +201 -45
  1459. package/src/unstable/cli/internal/ansi.ts +13 -0
  1460. package/src/unstable/cli/internal/command.ts +5 -1
  1461. package/src/unstable/cli/internal/config.ts +3 -0
  1462. package/src/unstable/cli/internal/lexer.ts +11 -0
  1463. package/src/unstable/cluster/ClusterCron.ts +35 -1
  1464. package/src/unstable/cluster/ClusterError.ts +56 -7
  1465. package/src/unstable/cluster/ClusterMetrics.ts +39 -5
  1466. package/src/unstable/cluster/ClusterSchema.ts +61 -8
  1467. package/src/unstable/cluster/ClusterWorkflowEngine.ts +35 -2
  1468. package/src/unstable/cluster/DeliverAt.ts +39 -4
  1469. package/src/unstable/cluster/Entity.ts +107 -16
  1470. package/src/unstable/cluster/EntityAddress.ts +30 -2
  1471. package/src/unstable/cluster/EntityId.ts +18 -3
  1472. package/src/unstable/cluster/EntityProxy.ts +34 -2
  1473. package/src/unstable/cluster/EntityProxyServer.ts +44 -8
  1474. package/src/unstable/cluster/EntityResource.ts +43 -6
  1475. package/src/unstable/cluster/EntityType.ts +27 -3
  1476. package/src/unstable/cluster/Envelope.ts +128 -23
  1477. package/src/unstable/cluster/HttpRunner.ts +88 -13
  1478. package/src/unstable/cluster/K8sHttpClient.ts +49 -6
  1479. package/src/unstable/cluster/MachineId.ts +24 -3
  1480. package/src/unstable/cluster/Message.ts +102 -13
  1481. package/src/unstable/cluster/MessageStorage.ts +127 -21
  1482. package/src/unstable/cluster/Reply.ts +101 -12
  1483. package/src/unstable/cluster/Runner.ts +47 -17
  1484. package/src/unstable/cluster/RunnerAddress.ts +34 -2
  1485. package/src/unstable/cluster/RunnerHealth.ts +40 -12
  1486. package/src/unstable/cluster/RunnerServer.ts +31 -4
  1487. package/src/unstable/cluster/RunnerStorage.ts +42 -5
  1488. package/src/unstable/cluster/Runners.ts +73 -10
  1489. package/src/unstable/cluster/ShardId.ts +51 -5
  1490. package/src/unstable/cluster/Sharding.ts +35 -4
  1491. package/src/unstable/cluster/ShardingConfig.ts +75 -10
  1492. package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
  1493. package/src/unstable/cluster/SingleRunner.ts +23 -1
  1494. package/src/unstable/cluster/Singleton.ts +15 -1
  1495. package/src/unstable/cluster/SingletonAddress.ts +21 -1
  1496. package/src/unstable/cluster/Snowflake.ts +89 -19
  1497. package/src/unstable/cluster/SocketRunner.ts +29 -2
  1498. package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
  1499. package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
  1500. package/src/unstable/cluster/TestRunner.ts +18 -1
  1501. package/src/unstable/cluster/internal/hash.ts +12 -0
  1502. package/src/unstable/devtools/DevTools.ts +26 -3
  1503. package/src/unstable/devtools/DevToolsClient.ts +32 -5
  1504. package/src/unstable/devtools/DevToolsSchema.ts +201 -44
  1505. package/src/unstable/devtools/DevToolsServer.ts +27 -2
  1506. package/src/unstable/encoding/Msgpack.ts +97 -12
  1507. package/src/unstable/encoding/Ndjson.ts +149 -21
  1508. package/src/unstable/encoding/Sse.ts +109 -18
  1509. package/src/unstable/eventlog/Event.ts +131 -30
  1510. package/src/unstable/eventlog/EventGroup.ts +50 -17
  1511. package/src/unstable/eventlog/EventJournal.ts +120 -20
  1512. package/src/unstable/eventlog/EventLog.ts +151 -31
  1513. package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
  1514. package/src/unstable/eventlog/EventLogMessage.ts +92 -18
  1515. package/src/unstable/eventlog/EventLogRemote.ts +54 -8
  1516. package/src/unstable/eventlog/EventLogServer.ts +33 -3
  1517. package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
  1518. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
  1519. package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
  1520. package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
  1521. package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
  1522. package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
  1523. package/src/unstable/http/Cookies.ts +156 -77
  1524. package/src/unstable/http/Etag.ts +40 -7
  1525. package/src/unstable/http/FetchHttpClient.ts +33 -4
  1526. package/src/unstable/http/FindMyWay.ts +1 -1
  1527. package/src/unstable/http/Headers.ts +252 -50
  1528. package/src/unstable/http/HttpBody.ts +128 -26
  1529. package/src/unstable/http/HttpClient.ts +205 -96
  1530. package/src/unstable/http/HttpClientError.ts +80 -12
  1531. package/src/unstable/http/HttpClientRequest.ts +318 -100
  1532. package/src/unstable/http/HttpClientResponse.ts +59 -16
  1533. package/src/unstable/http/HttpEffect.ts +66 -18
  1534. package/src/unstable/http/HttpIncomingMessage.ts +47 -7
  1535. package/src/unstable/http/HttpMethod.ts +35 -5
  1536. package/src/unstable/http/HttpMiddleware.ts +59 -11
  1537. package/src/unstable/http/HttpPlatform.ts +34 -3
  1538. package/src/unstable/http/HttpRouter.ts +217 -52
  1539. package/src/unstable/http/HttpServer.ts +151 -22
  1540. package/src/unstable/http/HttpServerError.ts +90 -10
  1541. package/src/unstable/http/HttpServerRequest.ts +125 -21
  1542. package/src/unstable/http/HttpServerRespondable.ts +49 -6
  1543. package/src/unstable/http/HttpServerResponse.ts +390 -67
  1544. package/src/unstable/http/HttpStaticServer.ts +22 -4
  1545. package/src/unstable/http/HttpTraceContext.ts +53 -6
  1546. package/src/unstable/http/Multipart.ts +178 -28
  1547. package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
  1548. package/src/unstable/http/Multipasta/Node.ts +1 -1
  1549. package/src/unstable/http/Multipasta/Search.ts +1 -1
  1550. package/src/unstable/http/Multipasta/Web.ts +1 -1
  1551. package/src/unstable/http/Multipasta.ts +1 -1
  1552. package/src/unstable/http/Template.ts +53 -0
  1553. package/src/unstable/http/Url.ts +56 -42
  1554. package/src/unstable/http/UrlParams.ts +233 -49
  1555. package/src/unstable/httpapi/HttpApi.ts +49 -14
  1556. package/src/unstable/httpapi/HttpApiBuilder.ts +82 -16
  1557. package/src/unstable/httpapi/HttpApiClient.ts +79 -15
  1558. package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
  1559. package/src/unstable/httpapi/HttpApiError.ts +100 -1
  1560. package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
  1561. package/src/unstable/httpapi/HttpApiMiddleware.ts +111 -22
  1562. package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
  1563. package/src/unstable/httpapi/HttpApiSchema.ts +67 -30
  1564. package/src/unstable/httpapi/HttpApiSecurity.ts +74 -17
  1565. package/src/unstable/httpapi/HttpApiSwagger.ts +24 -2
  1566. package/src/unstable/httpapi/HttpApiTest.ts +26 -1
  1567. package/src/unstable/httpapi/OpenApi.ts +115 -15
  1568. package/src/unstable/observability/Otlp.ts +33 -3
  1569. package/src/unstable/observability/OtlpExporter.ts +32 -1
  1570. package/src/unstable/observability/OtlpLogger.ts +31 -2
  1571. package/src/unstable/observability/OtlpMetrics.ts +37 -4
  1572. package/src/unstable/observability/OtlpResource.ts +68 -12
  1573. package/src/unstable/observability/OtlpSerialization.ts +28 -3
  1574. package/src/unstable/observability/OtlpTracer.ts +38 -2
  1575. package/src/unstable/observability/PrometheusMetrics.ts +32 -12
  1576. package/src/unstable/observability/index.ts +2 -1
  1577. package/src/unstable/persistence/KeyValueStore.ts +108 -28
  1578. package/src/unstable/persistence/Persistable.ts +76 -15
  1579. package/src/unstable/persistence/PersistedCache.ts +27 -2
  1580. package/src/unstable/persistence/PersistedQueue.ts +98 -16
  1581. package/src/unstable/persistence/Persistence.ts +97 -16
  1582. package/src/unstable/persistence/RateLimiter.ts +97 -21
  1583. package/src/unstable/persistence/Redis.ts +42 -5
  1584. package/src/unstable/process/ChildProcess.ts +89 -65
  1585. package/src/unstable/process/ChildProcessSpawner.ts +22 -11
  1586. package/src/unstable/process/index.ts +2 -1
  1587. package/src/unstable/reactivity/AsyncResult.ts +202 -61
  1588. package/src/unstable/reactivity/Atom.ts +593 -139
  1589. package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
  1590. package/src/unstable/reactivity/AtomRef.ts +51 -7
  1591. package/src/unstable/reactivity/AtomRegistry.ts +141 -22
  1592. package/src/unstable/reactivity/AtomRpc.ts +36 -2
  1593. package/src/unstable/reactivity/Hydration.ts +45 -5
  1594. package/src/unstable/reactivity/Reactivity.ts +95 -13
  1595. package/src/unstable/rpc/Rpc.ts +255 -56
  1596. package/src/unstable/rpc/RpcClient.ts +107 -19
  1597. package/src/unstable/rpc/RpcClientError.ts +26 -2
  1598. package/src/unstable/rpc/RpcGroup.ts +51 -8
  1599. package/src/unstable/rpc/RpcMessage.ts +128 -32
  1600. package/src/unstable/rpc/RpcMiddleware.ts +100 -20
  1601. package/src/unstable/rpc/RpcSchema.ts +38 -4
  1602. package/src/unstable/rpc/RpcSerialization.ts +60 -13
  1603. package/src/unstable/rpc/RpcServer.ts +107 -23
  1604. package/src/unstable/rpc/RpcTest.ts +20 -1
  1605. package/src/unstable/rpc/RpcWorker.ts +40 -6
  1606. package/src/unstable/rpc/Utils.ts +31 -0
  1607. package/src/unstable/schema/Model.ts +148 -52
  1608. package/src/unstable/schema/VariantSchema.ts +104 -24
  1609. package/src/unstable/socket/Socket.ts +167 -34
  1610. package/src/unstable/socket/SocketServer.ts +58 -10
  1611. package/src/unstable/sql/Migrator.ts +56 -4
  1612. package/src/unstable/sql/SqlClient.ts +55 -2
  1613. package/src/unstable/sql/SqlConnection.ts +31 -0
  1614. package/src/unstable/sql/SqlError.ts +117 -0
  1615. package/src/unstable/sql/SqlModel.ts +26 -5
  1616. package/src/unstable/sql/SqlResolver.ts +56 -13
  1617. package/src/unstable/sql/SqlSchema.ts +29 -8
  1618. package/src/unstable/sql/SqlStream.ts +23 -0
  1619. package/src/unstable/sql/Statement.ts +141 -0
  1620. package/src/unstable/sql/index.ts +1 -1
  1621. package/src/unstable/workers/Transferable.ts +65 -13
  1622. package/src/unstable/workers/Worker.ts +60 -8
  1623. package/src/unstable/workers/WorkerError.ts +50 -9
  1624. package/src/unstable/workers/WorkerRunner.ts +32 -3
  1625. package/src/unstable/workers/index.ts +1 -1
  1626. package/src/unstable/workflow/Activity.ts +61 -10
  1627. package/src/unstable/workflow/DurableClock.ts +26 -3
  1628. package/src/unstable/workflow/DurableDeferred.ts +146 -31
  1629. package/src/unstable/workflow/DurableQueue.ts +30 -7
  1630. package/src/unstable/workflow/Workflow.ts +121 -31
  1631. package/src/unstable/workflow/WorkflowEngine.ts +40 -5
  1632. package/src/unstable/workflow/WorkflowProxy.ts +32 -2
  1633. package/src/unstable/workflow/WorkflowProxyServer.ts +40 -6
package/dist/Graph.d.ts CHANGED
@@ -1,4 +1,54 @@
1
1
  /**
2
+ * The `Graph` module provides immutable and scoped-mutable graph data
3
+ * structures for modeling relationships between indexed nodes and edges. A
4
+ * graph can be directed or undirected, stores user-defined data on both nodes
5
+ * and edges, and exposes traversal, analysis, path finding, transformation, and
6
+ * diagram export utilities.
7
+ *
8
+ * **Mental model**
9
+ *
10
+ * - Nodes and edges are addressed by stable numeric indices: {@link NodeIndex}
11
+ * and {@link EdgeIndex}
12
+ * - Node data has type `N`; edge data has type `E`
13
+ * - {@link Graph} values are immutable snapshots; use {@link MutableGraph}
14
+ * through {@link mutate}, {@link beginMutation}, or constructor callbacks to
15
+ * add, remove, or update nodes and edges
16
+ * - Directed graphs follow edge direction for neighbors and traversals, while
17
+ * undirected graphs treat each edge as connecting both endpoints
18
+ * - Missing lookups return `Option`, while structurally invalid operations such
19
+ * as adding an edge to a missing node throw {@link GraphError}
20
+ *
21
+ * **Common tasks**
22
+ *
23
+ * - Create graphs: {@link directed}, {@link undirected}
24
+ * - Mutate safely: {@link mutate}, {@link addNode}, {@link addEdge},
25
+ * {@link removeNode}, {@link removeEdge}
26
+ * - Query contents: {@link getNode}, {@link getEdge}, {@link hasNode},
27
+ * {@link hasEdge}, {@link nodeCount}, {@link edgeCount}, {@link neighbors}
28
+ * - Transform data: {@link updateNode}, {@link updateEdge}, {@link mapNodes},
29
+ * {@link mapEdges}, {@link filterNodes}, {@link filterEdges},
30
+ * {@link filterMapNodes}, {@link filterMapEdges}
31
+ * - Traverse lazily: {@link dfs}, {@link bfs}, {@link topo},
32
+ * {@link dfsPostOrder}, {@link nodes}, {@link edges}, {@link Walker}
33
+ * - Analyze structure: {@link isAcyclic}, {@link isBipartite},
34
+ * {@link connectedComponents}, {@link stronglyConnectedComponents},
35
+ * {@link externals}
36
+ * - Find paths: {@link dijkstra}, {@link astar}, {@link bellmanFord},
37
+ * {@link floydWarshall}
38
+ * - Export diagrams: {@link toGraphViz}, {@link toMermaid}
39
+ *
40
+ * **Gotchas**
41
+ *
42
+ * - Only mutable graphs can be changed. Create one with {@link mutate} or by
43
+ * passing a callback to {@link directed} / {@link undirected}.
44
+ * - Traversal APIs return lazy {@link Walker} values. Use {@link indices},
45
+ * {@link values}, or {@link entries} to choose what each iteration yields.
46
+ * - `NodeIndex` and `EdgeIndex` values are identifiers, not array offsets. They
47
+ * are not reused after removals.
48
+ * - Shortest-path algorithms require a cost function. {@link dijkstra} and
49
+ * {@link astar} reject negative weights; use {@link bellmanFord} or
50
+ * {@link floydWarshall} when negative weights are part of the model.
51
+ *
2
52
  * @since 4.0.0
3
53
  */
4
54
  import * as Data from "./Data.ts";
@@ -10,22 +60,22 @@ declare const TypeId = "~effect/collections/Graph";
10
60
  /**
11
61
  * Node index for node identification using plain numbers.
12
62
  *
13
- * @since 4.0.0
14
63
  * @category models
64
+ * @since 4.0.0
15
65
  */
16
66
  export type NodeIndex = number;
17
67
  /**
18
68
  * Edge index for edge identification using plain numbers.
19
69
  *
20
- * @since 4.0.0
21
70
  * @category models
71
+ * @since 4.0.0
22
72
  */
23
73
  export type EdgeIndex = number;
24
74
  /**
25
75
  * Edge data containing source, target, and user data.
26
76
  *
27
- * @since 4.0.0
28
77
  * @category models
78
+ * @since 4.0.0
29
79
  */
30
80
  export declare class Edge<E> extends Data.Class<{
31
81
  readonly source: NodeIndex;
@@ -36,15 +86,20 @@ export declare class Edge<E> extends Data.Class<{
36
86
  /**
37
87
  * Graph type for distinguishing directed and undirected graphs.
38
88
  *
39
- * @since 4.0.0
40
89
  * @category models
90
+ * @since 4.0.0
41
91
  */
42
92
  export type Kind = "directed" | "undirected";
43
93
  /**
44
- * Graph prototype interface.
94
+ * Common structural interface shared by immutable and mutable graphs.
95
+ *
96
+ * **Details**
97
+ *
98
+ * Contains the node and edge maps, adjacency indexes, allocation counters, and
99
+ * shared protocols used by both `Graph` and `MutableGraph`.
45
100
  *
46
- * @since 4.0.0
47
101
  * @category models
102
+ * @since 4.0.0
48
103
  */
49
104
  export interface Proto<out N, out E> extends Iterable<readonly [NodeIndex, N]>, Equal.Equal, Pipeable, Inspectable {
50
105
  readonly [TypeId]: typeof TypeId;
@@ -59,8 +114,8 @@ export interface Proto<out N, out E> extends Iterable<readonly [NodeIndex, N]>,
59
114
  /**
60
115
  * Immutable graph interface.
61
116
  *
62
- * @since 4.0.0
63
117
  * @category models
118
+ * @since 4.0.0
64
119
  */
65
120
  export interface Graph<out N, out E, T extends Kind = "directed"> extends Proto<N, E> {
66
121
  readonly type: T;
@@ -69,8 +124,8 @@ export interface Graph<out N, out E, T extends Kind = "directed"> extends Proto<
69
124
  /**
70
125
  * Mutable graph interface.
71
126
  *
72
- * @since 4.0.0
73
127
  * @category models
128
+ * @since 4.0.0
74
129
  */
75
130
  export interface MutableGraph<out N, out E, T extends Kind = "directed"> extends Proto<N, E> {
76
131
  readonly type: T;
@@ -79,51 +134,59 @@ export interface MutableGraph<out N, out E, T extends Kind = "directed"> extends
79
134
  /**
80
135
  * Directed graph type alias.
81
136
  *
82
- * @since 4.0.0
83
137
  * @category models
138
+ * @since 4.0.0
84
139
  */
85
140
  export type DirectedGraph<N, E> = Graph<N, E, "directed">;
86
141
  /**
87
142
  * Undirected graph type alias.
88
143
  *
89
- * @since 4.0.0
90
144
  * @category models
145
+ * @since 4.0.0
91
146
  */
92
147
  export type UndirectedGraph<N, E> = Graph<N, E, "undirected">;
93
148
  /**
94
149
  * Mutable directed graph type alias.
95
150
  *
96
- * @since 4.0.0
97
151
  * @category models
152
+ * @since 4.0.0
98
153
  */
99
154
  export type MutableDirectedGraph<N, E> = MutableGraph<N, E, "directed">;
100
155
  /**
101
156
  * Mutable undirected graph type alias.
102
157
  *
103
- * @since 4.0.0
104
158
  * @category models
159
+ * @since 4.0.0
105
160
  */
106
161
  export type MutableUndirectedGraph<N, E> = MutableGraph<N, E, "undirected">;
107
162
  declare const GraphError_base: new <A extends Record<string, any> = {}>(args: import("./Types.ts").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("./Cause.ts").YieldableError & {
108
163
  readonly _tag: "GraphError";
109
164
  } & Readonly<A>;
110
165
  /**
111
- * @since 4.0.0
166
+ * Error thrown by graph operations when the requested graph structure is
167
+ * invalid, such as referencing a missing node or using unsupported edge
168
+ * weights.
169
+ *
112
170
  * @category errors
171
+ * @since 4.0.0
113
172
  */
114
173
  export declare class GraphError extends GraphError_base<{
115
174
  readonly message: string;
116
175
  }> {
117
176
  }
118
177
  /**
119
- * @since 4.0.0
178
+ * Returns `true` if a value has the graph runtime type identifier, narrowing
179
+ * it to a `Graph`.
180
+ *
120
181
  * @category Guards
182
+ * @since 4.0.0
121
183
  */
122
184
  export declare const isGraph: (u: unknown) => u is Graph<unknown, unknown>;
123
185
  /**
124
186
  * Creates a directed graph, optionally with initial mutations.
125
187
  *
126
- * @example
188
+ * **Example** (Creating a directed graph)
189
+ *
127
190
  * ```ts
128
191
  * import { Graph } from "effect"
129
192
  *
@@ -137,14 +200,15 @@ export declare const isGraph: (u: unknown) => u is Graph<unknown, unknown>;
137
200
  * })
138
201
  * ```
139
202
  *
140
- * @since 4.0.0
141
203
  * @category constructors
204
+ * @since 4.0.0
142
205
  */
143
206
  export declare const directed: <N, E>(mutate?: (mutable: MutableDirectedGraph<N, E>) => void) => DirectedGraph<N, E>;
144
207
  /**
145
208
  * Creates an undirected graph, optionally with initial mutations.
146
209
  *
147
- * @example
210
+ * **Example** (Creating an undirected graph)
211
+ *
148
212
  * ```ts
149
213
  * import { Graph } from "effect"
150
214
  *
@@ -158,14 +222,15 @@ export declare const directed: <N, E>(mutate?: (mutable: MutableDirectedGraph<N,
158
222
  * })
159
223
  * ```
160
224
  *
161
- * @since 4.0.0
162
225
  * @category constructors
226
+ * @since 4.0.0
163
227
  */
164
228
  export declare const undirected: <N, E>(mutate?: (mutable: MutableUndirectedGraph<N, E>) => void) => UndirectedGraph<N, E>;
165
229
  /**
166
230
  * Creates a mutable scope for safe graph mutations by copying the data structure.
167
231
  *
168
- * @example
232
+ * **Example** (Beginning a mutation scope)
233
+ *
169
234
  * ```ts
170
235
  * import { Graph } from "effect"
171
236
  *
@@ -174,14 +239,15 @@ export declare const undirected: <N, E>(mutate?: (mutable: MutableUndirectedGrap
174
239
  * // Now mutable can be safely modified without affecting original graph
175
240
  * ```
176
241
  *
177
- * @since 4.0.0
178
242
  * @category mutations
243
+ * @since 4.0.0
179
244
  */
180
245
  export declare const beginMutation: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T>) => MutableGraph<N, E, T>;
181
246
  /**
182
247
  * Converts a mutable graph back to an immutable graph, ending the mutation scope.
183
248
  *
184
- * @example
249
+ * **Example** (Ending a mutation scope)
250
+ *
185
251
  * ```ts
186
252
  * import { Graph } from "effect"
187
253
  *
@@ -191,69 +257,85 @@ export declare const beginMutation: <N, E, T extends Kind = "directed">(graph: G
191
257
  * const newGraph = Graph.endMutation(mutable)
192
258
  * ```
193
259
  *
194
- * @since 4.0.0
195
260
  * @category mutations
261
+ * @since 4.0.0
196
262
  */
197
263
  export declare const endMutation: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>) => Graph<N, E, T>;
198
264
  /**
199
265
  * Performs scoped mutations on a graph, automatically managing the mutation lifecycle.
200
266
  *
201
- * @example
267
+ * **Example** (Applying scoped mutations)
268
+ *
202
269
  * ```ts
203
270
  * import { Graph } from "effect"
204
271
  *
205
272
  * const graph = Graph.directed<string, number>()
206
273
  * const newGraph = Graph.mutate(graph, (mutable) => {
207
- * // Safe mutations go here
208
- * // mutable gets automatically converted back to immutable
274
+ * const nodeA = Graph.addNode(mutable, "A")
275
+ * const nodeB = Graph.addNode(mutable, "B")
276
+ * Graph.addEdge(mutable, nodeA, nodeB, 1)
209
277
  * })
278
+ *
279
+ * console.log(Graph.nodeCount(newGraph)) // 2
280
+ * console.log(Graph.edgeCount(newGraph)) // 1
210
281
  * ```
211
282
  *
212
- * @since 4.0.0
213
283
  * @category mutations
284
+ * @since 4.0.0
214
285
  */
215
286
  export declare const mutate: {
216
287
  /**
217
288
  * Performs scoped mutations on a graph, automatically managing the mutation lifecycle.
218
289
  *
219
- * @example
290
+ * **Example** (Applying scoped mutations)
291
+ *
220
292
  * ```ts
221
293
  * import { Graph } from "effect"
222
294
  *
223
295
  * const graph = Graph.directed<string, number>()
224
296
  * const newGraph = Graph.mutate(graph, (mutable) => {
225
- * // Safe mutations go here
226
- * // mutable gets automatically converted back to immutable
297
+ * const nodeA = Graph.addNode(mutable, "A")
298
+ * const nodeB = Graph.addNode(mutable, "B")
299
+ * Graph.addEdge(mutable, nodeA, nodeB, 1)
227
300
  * })
301
+ *
302
+ * console.log(Graph.nodeCount(newGraph)) // 2
303
+ * console.log(Graph.edgeCount(newGraph)) // 1
228
304
  * ```
229
305
  *
230
- * @since 4.0.0
231
306
  * @category mutations
307
+ * @since 4.0.0
232
308
  */
233
309
  <N, E, T extends Kind = "directed">(f: (mutable: MutableGraph<N, E, T>) => void): (graph: Graph<N, E, T>) => Graph<N, E, T>;
234
310
  /**
235
311
  * Performs scoped mutations on a graph, automatically managing the mutation lifecycle.
236
312
  *
237
- * @example
313
+ * **Example** (Applying scoped mutations)
314
+ *
238
315
  * ```ts
239
316
  * import { Graph } from "effect"
240
317
  *
241
318
  * const graph = Graph.directed<string, number>()
242
319
  * const newGraph = Graph.mutate(graph, (mutable) => {
243
- * // Safe mutations go here
244
- * // mutable gets automatically converted back to immutable
320
+ * const nodeA = Graph.addNode(mutable, "A")
321
+ * const nodeB = Graph.addNode(mutable, "B")
322
+ * Graph.addEdge(mutable, nodeA, nodeB, 1)
245
323
  * })
324
+ *
325
+ * console.log(Graph.nodeCount(newGraph)) // 2
326
+ * console.log(Graph.edgeCount(newGraph)) // 1
246
327
  * ```
247
328
  *
248
- * @since 4.0.0
249
329
  * @category mutations
330
+ * @since 4.0.0
250
331
  */
251
332
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T>, f: (mutable: MutableGraph<N, E, T>) => void): Graph<N, E, T>;
252
333
  };
253
334
  /**
254
335
  * Adds a new node to a mutable graph and returns its index.
255
336
  *
256
- * @example
337
+ * **Example** (Adding nodes)
338
+ *
257
339
  * ```ts
258
340
  * import { Graph } from "effect"
259
341
  *
@@ -265,14 +347,15 @@ export declare const mutate: {
265
347
  * })
266
348
  * ```
267
349
  *
268
- * @since 4.0.0
269
350
  * @category mutations
351
+ * @since 4.0.0
270
352
  */
271
353
  export declare const addNode: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, data: N) => NodeIndex;
272
354
  /**
273
355
  * Gets the data associated with a node index, if it exists.
274
356
  *
275
- * @example
357
+ * **Example** (Getting node data)
358
+ *
276
359
  * ```ts
277
360
  * import { Graph } from "effect"
278
361
  * import * as Option from "effect/Option"
@@ -289,14 +372,15 @@ export declare const addNode: <N, E, T extends Kind = "directed">(mutable: Mutab
289
372
  * }
290
373
  * ```
291
374
  *
292
- * @since 4.0.0
293
375
  * @category getters
376
+ * @since 4.0.0
294
377
  */
295
378
  export declare const getNode: {
296
379
  /**
297
380
  * Gets the data associated with a node index, if it exists.
298
381
  *
299
- * @example
382
+ * **Example** (Getting node data)
383
+ *
300
384
  * ```ts
301
385
  * import { Graph } from "effect"
302
386
  * import * as Option from "effect/Option"
@@ -313,14 +397,15 @@ export declare const getNode: {
313
397
  * }
314
398
  * ```
315
399
  *
316
- * @since 4.0.0
317
400
  * @category getters
401
+ * @since 4.0.0
318
402
  */
319
403
  <N, E, T extends Kind = "directed">(nodeIndex: NodeIndex): (graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<N>;
320
404
  /**
321
405
  * Gets the data associated with a node index, if it exists.
322
406
  *
323
- * @example
407
+ * **Example** (Getting node data)
408
+ *
324
409
  * ```ts
325
410
  * import { Graph } from "effect"
326
411
  * import * as Option from "effect/Option"
@@ -337,15 +422,16 @@ export declare const getNode: {
337
422
  * }
338
423
  * ```
339
424
  *
340
- * @since 4.0.0
341
425
  * @category getters
426
+ * @since 4.0.0
342
427
  */
343
428
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, nodeIndex: NodeIndex): Option.Option<N>;
344
429
  };
345
430
  /**
346
431
  * Checks if a node with the given index exists in the graph.
347
432
  *
348
- * @example
433
+ * **Example** (Checking node existence)
434
+ *
349
435
  * ```ts
350
436
  * import { Graph } from "effect"
351
437
  *
@@ -362,14 +448,15 @@ export declare const getNode: {
362
448
  * console.log(notExists) // false
363
449
  * ```
364
450
  *
365
- * @since 4.0.0
366
451
  * @category getters
452
+ * @since 4.0.0
367
453
  */
368
454
  export declare const hasNode: {
369
455
  /**
370
456
  * Checks if a node with the given index exists in the graph.
371
457
  *
372
- * @example
458
+ * **Example** (Checking node existence)
459
+ *
373
460
  * ```ts
374
461
  * import { Graph } from "effect"
375
462
  *
@@ -386,14 +473,15 @@ export declare const hasNode: {
386
473
  * console.log(notExists) // false
387
474
  * ```
388
475
  *
389
- * @since 4.0.0
390
476
  * @category getters
477
+ * @since 4.0.0
391
478
  */
392
479
  (nodeIndex: NodeIndex): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => boolean;
393
480
  /**
394
481
  * Checks if a node with the given index exists in the graph.
395
482
  *
396
- * @example
483
+ * **Example** (Checking node existence)
484
+ *
397
485
  * ```ts
398
486
  * import { Graph } from "effect"
399
487
  *
@@ -410,15 +498,16 @@ export declare const hasNode: {
410
498
  * console.log(notExists) // false
411
499
  * ```
412
500
  *
413
- * @since 4.0.0
414
501
  * @category getters
502
+ * @since 4.0.0
415
503
  */
416
504
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, nodeIndex: NodeIndex): boolean;
417
505
  };
418
506
  /**
419
507
  * Returns the number of nodes in the graph.
420
508
  *
421
- * @example
509
+ * **Example** (Counting nodes)
510
+ *
422
511
  * ```ts
423
512
  * import { Graph } from "effect"
424
513
  *
@@ -434,14 +523,15 @@ export declare const hasNode: {
434
523
  * console.log(Graph.nodeCount(graphWithNodes)) // 3
435
524
  * ```
436
525
  *
437
- * @since 4.0.0
438
526
  * @category getters
527
+ * @since 4.0.0
439
528
  */
440
529
  export declare const nodeCount: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => number;
441
530
  /**
442
531
  * Finds the first node that matches the given predicate.
443
532
  *
444
- * @example
533
+ * **Example** (Finding the first matching node)
534
+ *
445
535
  * ```ts
446
536
  * import { Graph } from "effect"
447
537
  *
@@ -458,14 +548,15 @@ export declare const nodeCount: <N, E, T extends Kind = "directed">(graph: Graph
458
548
  * console.log(notFound) // Option.none()
459
549
  * ```
460
550
  *
461
- * @since 4.0.0
462
551
  * @category getters
552
+ * @since 4.0.0
463
553
  */
464
554
  export declare const findNode: {
465
555
  /**
466
556
  * Finds the first node that matches the given predicate.
467
557
  *
468
- * @example
558
+ * **Example** (Finding the first matching node)
559
+ *
469
560
  * ```ts
470
561
  * import { Graph } from "effect"
471
562
  *
@@ -482,14 +573,15 @@ export declare const findNode: {
482
573
  * console.log(notFound) // Option.none()
483
574
  * ```
484
575
  *
485
- * @since 4.0.0
486
576
  * @category getters
577
+ * @since 4.0.0
487
578
  */
488
579
  <N>(predicate: (data: N) => boolean): <E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<NodeIndex>;
489
580
  /**
490
581
  * Finds the first node that matches the given predicate.
491
582
  *
492
- * @example
583
+ * **Example** (Finding the first matching node)
584
+ *
493
585
  * ```ts
494
586
  * import { Graph } from "effect"
495
587
  *
@@ -506,15 +598,16 @@ export declare const findNode: {
506
598
  * console.log(notFound) // Option.none()
507
599
  * ```
508
600
  *
509
- * @since 4.0.0
510
601
  * @category getters
602
+ * @since 4.0.0
511
603
  */
512
604
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, predicate: (data: N) => boolean): Option.Option<NodeIndex>;
513
605
  };
514
606
  /**
515
607
  * Finds all nodes that match the given predicate.
516
608
  *
517
- * @example
609
+ * **Example** (Finding matching nodes)
610
+ *
518
611
  * ```ts
519
612
  * import { Graph } from "effect"
520
613
  *
@@ -531,14 +624,15 @@ export declare const findNode: {
531
624
  * console.log(empty) // []
532
625
  * ```
533
626
  *
534
- * @since 4.0.0
535
627
  * @category getters
628
+ * @since 4.0.0
536
629
  */
537
630
  export declare const findNodes: {
538
631
  /**
539
632
  * Finds all nodes that match the given predicate.
540
633
  *
541
- * @example
634
+ * **Example** (Finding matching nodes)
635
+ *
542
636
  * ```ts
543
637
  * import { Graph } from "effect"
544
638
  *
@@ -555,14 +649,15 @@ export declare const findNodes: {
555
649
  * console.log(empty) // []
556
650
  * ```
557
651
  *
558
- * @since 4.0.0
559
652
  * @category getters
653
+ * @since 4.0.0
560
654
  */
561
655
  <N>(predicate: (data: N) => boolean): <E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<NodeIndex>;
562
656
  /**
563
657
  * Finds all nodes that match the given predicate.
564
658
  *
565
- * @example
659
+ * **Example** (Finding matching nodes)
660
+ *
566
661
  * ```ts
567
662
  * import { Graph } from "effect"
568
663
  *
@@ -579,15 +674,16 @@ export declare const findNodes: {
579
674
  * console.log(empty) // []
580
675
  * ```
581
676
  *
582
- * @since 4.0.0
583
677
  * @category getters
678
+ * @since 4.0.0
584
679
  */
585
680
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, predicate: (data: N) => boolean): Array<NodeIndex>;
586
681
  };
587
682
  /**
588
683
  * Finds the first edge that matches the given predicate.
589
684
  *
590
- * @example
685
+ * **Example** (Finding the first matching edge)
686
+ *
591
687
  * ```ts
592
688
  * import { Graph } from "effect"
593
689
  *
@@ -606,14 +702,15 @@ export declare const findNodes: {
606
702
  * console.log(notFound) // Option.none()
607
703
  * ```
608
704
  *
609
- * @since 4.0.0
610
705
  * @category getters
706
+ * @since 4.0.0
611
707
  */
612
708
  export declare const findEdge: {
613
709
  /**
614
710
  * Finds the first edge that matches the given predicate.
615
711
  *
616
- * @example
712
+ * **Example** (Finding the first matching edge)
713
+ *
617
714
  * ```ts
618
715
  * import { Graph } from "effect"
619
716
  *
@@ -632,14 +729,15 @@ export declare const findEdge: {
632
729
  * console.log(notFound) // Option.none()
633
730
  * ```
634
731
  *
635
- * @since 4.0.0
636
732
  * @category getters
733
+ * @since 4.0.0
637
734
  */
638
735
  <E>(predicate: (data: E, source: NodeIndex, target: NodeIndex) => boolean): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<EdgeIndex>;
639
736
  /**
640
737
  * Finds the first edge that matches the given predicate.
641
738
  *
642
- * @example
739
+ * **Example** (Finding the first matching edge)
740
+ *
643
741
  * ```ts
644
742
  * import { Graph } from "effect"
645
743
  *
@@ -658,15 +756,16 @@ export declare const findEdge: {
658
756
  * console.log(notFound) // Option.none()
659
757
  * ```
660
758
  *
661
- * @since 4.0.0
662
759
  * @category getters
760
+ * @since 4.0.0
663
761
  */
664
762
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, predicate: (data: E, source: NodeIndex, target: NodeIndex) => boolean): Option.Option<EdgeIndex>;
665
763
  };
666
764
  /**
667
765
  * Finds all edges that match the given predicate.
668
766
  *
669
- * @example
767
+ * **Example** (Finding matching edges)
768
+ *
670
769
  * ```ts
671
770
  * import { Graph } from "effect"
672
771
  *
@@ -686,14 +785,15 @@ export declare const findEdge: {
686
785
  * console.log(empty) // []
687
786
  * ```
688
787
  *
689
- * @since 4.0.0
690
788
  * @category getters
789
+ * @since 4.0.0
691
790
  */
692
791
  export declare const findEdges: {
693
792
  /**
694
793
  * Finds all edges that match the given predicate.
695
794
  *
696
- * @example
795
+ * **Example** (Finding matching edges)
796
+ *
697
797
  * ```ts
698
798
  * import { Graph } from "effect"
699
799
  *
@@ -713,14 +813,15 @@ export declare const findEdges: {
713
813
  * console.log(empty) // []
714
814
  * ```
715
815
  *
716
- * @since 4.0.0
717
816
  * @category getters
817
+ * @since 4.0.0
718
818
  */
719
819
  <E>(predicate: (data: E, source: NodeIndex, target: NodeIndex) => boolean): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<EdgeIndex>;
720
820
  /**
721
821
  * Finds all edges that match the given predicate.
722
822
  *
723
- * @example
823
+ * **Example** (Finding matching edges)
824
+ *
724
825
  * ```ts
725
826
  * import { Graph } from "effect"
726
827
  *
@@ -740,15 +841,16 @@ export declare const findEdges: {
740
841
  * console.log(empty) // []
741
842
  * ```
742
843
  *
743
- * @since 4.0.0
744
844
  * @category getters
845
+ * @since 4.0.0
745
846
  */
746
847
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, predicate: (data: E, source: NodeIndex, target: NodeIndex) => boolean): Array<EdgeIndex>;
747
848
  };
748
849
  /**
749
850
  * Updates a single node's data by applying a transformation function.
750
851
  *
751
- * @example
852
+ * **Example** (Updating node data)
853
+ *
752
854
  * ```ts
753
855
  * import { Graph } from "effect"
754
856
  *
@@ -762,14 +864,15 @@ export declare const findEdges: {
762
864
  * console.log(nodeData) // Option.some("NODE A")
763
865
  * ```
764
866
  *
765
- * @since 4.0.0
766
867
  * @category transformations
868
+ * @since 4.0.0
767
869
  */
768
870
  export declare const updateNode: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, index: NodeIndex, f: (data: N) => N) => void;
769
871
  /**
770
872
  * Updates a single edge's data by applying a transformation function.
771
873
  *
772
- * @example
874
+ * **Example** (Updating edge data)
875
+ *
773
876
  * ```ts
774
877
  * import { Graph } from "effect"
775
878
  *
@@ -781,17 +884,23 @@ export declare const updateNode: <N, E, T extends Kind = "directed">(mutable: Mu
781
884
  * })
782
885
  *
783
886
  * const edgeData = Graph.getEdge(result, 0)
784
- * console.log(edgeData) // new Graph.Edge({ source: 0, target: 1, data: 20 })
887
+ * console.log(edgeData) // Option.some(new Graph.Edge({ source: 0, target: 1, data: 20 }))
785
888
  * ```
786
889
  *
787
- * @since 4.0.0
788
890
  * @category mutations
891
+ * @since 4.0.0
789
892
  */
790
893
  export declare const updateEdge: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, edgeIndex: EdgeIndex, f: (data: E) => E) => void;
791
894
  /**
792
- * Creates a new graph with transformed node data using the provided mapping function.
895
+ * Transforms every node's data in a mutable graph in place using the provided
896
+ * mapping function.
897
+ *
898
+ * **Details**
899
+ *
900
+ * Node indices and edges are preserved; only the stored node data is replaced.
901
+ *
902
+ * **Example** (Mapping node data)
793
903
  *
794
- * @example
795
904
  * ```ts
796
905
  * import { Graph } from "effect"
797
906
  *
@@ -803,17 +912,18 @@ export declare const updateEdge: <N, E, T extends Kind = "directed">(mutable: Mu
803
912
  * })
804
913
  *
805
914
  * const nodeData = Graph.getNode(graph, 0)
806
- * console.log(nodeData) // new Graph.Node("NODE A")
915
+ * console.log(nodeData) // Option.some("NODE A")
807
916
  * ```
808
917
  *
809
- * @since 4.0.0
810
918
  * @category transformations
919
+ * @since 4.0.0
811
920
  */
812
921
  export declare const mapNodes: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, f: (data: N) => N) => void;
813
922
  /**
814
923
  * Transforms all edge data in a mutable graph using the provided mapping function.
815
924
  *
816
- * @example
925
+ * **Example** (Mapping edge data)
926
+ *
817
927
  * ```ts
818
928
  * import { Graph } from "effect"
819
929
  *
@@ -827,17 +937,18 @@ export declare const mapNodes: <N, E, T extends Kind = "directed">(mutable: Muta
827
937
  * })
828
938
  *
829
939
  * const edgeData = Graph.getEdge(graph, 0)
830
- * console.log(edgeData) // new Graph.Edge({ source: 0, target: 1, data: 20 })
940
+ * console.log(edgeData) // Option.some(new Graph.Edge({ source: 0, target: 1, data: 20 }))
831
941
  * ```
832
942
  *
833
- * @since 4.0.0
834
943
  * @category transformations
944
+ * @since 4.0.0
835
945
  */
836
946
  export declare const mapEdges: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, f: (data: E) => E) => void;
837
947
  /**
838
948
  * Reverses all edge directions in a mutable graph by swapping source and target nodes.
839
949
  *
840
- * @example
950
+ * **Example** (Reversing edge directions)
951
+ *
841
952
  * ```ts
842
953
  * import { Graph } from "effect"
843
954
  *
@@ -851,18 +962,19 @@ export declare const mapEdges: <N, E, T extends Kind = "directed">(mutable: Muta
851
962
  * })
852
963
  *
853
964
  * const edge0 = Graph.getEdge(graph, 0)
854
- * console.log(edge0) // new Graph.Edge({ source: 1, target: 0, data: 1 }) - B -> A
965
+ * console.log(edge0) // Option.some(new Graph.Edge({ source: 1, target: 0, data: 1 }))
855
966
  * ```
856
967
  *
857
- * @since 4.0.0
858
968
  * @category transformations
969
+ * @since 4.0.0
859
970
  */
860
971
  export declare const reverse: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>) => void;
861
972
  /**
862
973
  * Filters and optionally transforms nodes in a mutable graph using a predicate function.
863
974
  * Nodes that return Option.none are removed along with all their connected edges.
864
975
  *
865
- * @example
976
+ * **Example** (Filtering and mapping nodes)
977
+ *
866
978
  * ```ts
867
979
  * import { Graph } from "effect"
868
980
  * import * as Option from "effect/Option"
@@ -885,15 +997,16 @@ export declare const reverse: <N, E, T extends Kind = "directed">(mutable: Mutab
885
997
  * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain)
886
998
  * ```
887
999
  *
888
- * @since 4.0.0
889
1000
  * @category transformations
1001
+ * @since 4.0.0
890
1002
  */
891
1003
  export declare const filterMapNodes: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, f: (data: N) => Option.Option<N>) => void;
892
1004
  /**
893
1005
  * Filters and optionally transforms edges in a mutable graph using a predicate function.
894
1006
  * Edges that return Option.none are removed from the graph.
895
1007
  *
896
- * @example
1008
+ * **Example** (Filtering and mapping edges)
1009
+ *
897
1010
  * ```ts
898
1011
  * import { Graph } from "effect"
899
1012
  * import * as Option from "effect/Option"
@@ -916,15 +1029,16 @@ export declare const filterMapNodes: <N, E, T extends Kind = "directed">(mutable
916
1029
  * console.log(Graph.edgeCount(graph)) // 2 (edges with weight 5 removed)
917
1030
  * ```
918
1031
  *
919
- * @since 4.0.0
920
1032
  * @category transformations
1033
+ * @since 4.0.0
921
1034
  */
922
1035
  export declare const filterMapEdges: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, f: (data: E) => Option.Option<E>) => void;
923
1036
  /**
924
1037
  * Filters nodes by removing those that don't match the predicate.
925
1038
  * This function modifies the mutable graph in place.
926
1039
  *
927
- * @example
1040
+ * **Example** (Filtering nodes)
1041
+ *
928
1042
  * ```ts
929
1043
  * import { Graph } from "effect"
930
1044
  *
@@ -941,15 +1055,16 @@ export declare const filterMapEdges: <N, E, T extends Kind = "directed">(mutable
941
1055
  * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain)
942
1056
  * ```
943
1057
  *
944
- * @since 4.0.0
945
1058
  * @category transformations
1059
+ * @since 4.0.0
946
1060
  */
947
1061
  export declare const filterNodes: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, predicate: (data: N) => boolean) => void;
948
1062
  /**
949
1063
  * Filters edges by removing those that don't match the predicate.
950
1064
  * This function modifies the mutable graph in place.
951
1065
  *
952
- * @example
1066
+ * **Example** (Filtering edges)
1067
+ *
953
1068
  * ```ts
954
1069
  * import { Graph } from "effect"
955
1070
  *
@@ -969,14 +1084,15 @@ export declare const filterNodes: <N, E, T extends Kind = "directed">(mutable: M
969
1084
  * console.log(Graph.edgeCount(graph)) // 2 (edge with weight 5 removed)
970
1085
  * ```
971
1086
  *
972
- * @since 4.0.0
973
1087
  * @category transformations
1088
+ * @since 4.0.0
974
1089
  */
975
1090
  export declare const filterEdges: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, predicate: (data: E) => boolean) => void;
976
1091
  /**
977
1092
  * Adds a new edge to a mutable graph and returns its index.
978
1093
  *
979
- * @example
1094
+ * **Example** (Adding edges)
1095
+ *
980
1096
  * ```ts
981
1097
  * import { Graph } from "effect"
982
1098
  *
@@ -988,14 +1104,15 @@ export declare const filterEdges: <N, E, T extends Kind = "directed">(mutable: M
988
1104
  * })
989
1105
  * ```
990
1106
  *
991
- * @since 4.0.0
992
1107
  * @category mutations
1108
+ * @since 4.0.0
993
1109
  */
994
1110
  export declare const addEdge: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, source: NodeIndex, target: NodeIndex, data: E) => EdgeIndex;
995
1111
  /**
996
1112
  * Removes a node and all its incident edges from a mutable graph.
997
1113
  *
998
- * @example
1114
+ * **Example** (Removing a node)
1115
+ *
999
1116
  * ```ts
1000
1117
  * import { Graph } from "effect"
1001
1118
  *
@@ -1009,14 +1126,15 @@ export declare const addEdge: <N, E, T extends Kind = "directed">(mutable: Mutab
1009
1126
  * })
1010
1127
  * ```
1011
1128
  *
1012
- * @since 4.0.0
1013
1129
  * @category mutations
1130
+ * @since 4.0.0
1014
1131
  */
1015
1132
  export declare const removeNode: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, nodeIndex: NodeIndex) => void;
1016
1133
  /**
1017
1134
  * Removes an edge from a mutable graph.
1018
1135
  *
1019
- * @example
1136
+ * **Example** (Removing an edge)
1137
+ *
1020
1138
  * ```ts
1021
1139
  * import { Graph } from "effect"
1022
1140
  *
@@ -1030,14 +1148,15 @@ export declare const removeNode: <N, E, T extends Kind = "directed">(mutable: Mu
1030
1148
  * })
1031
1149
  * ```
1032
1150
  *
1033
- * @since 4.0.0
1034
1151
  * @category mutations
1152
+ * @since 4.0.0
1035
1153
  */
1036
1154
  export declare const removeEdge: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, edgeIndex: EdgeIndex) => void;
1037
1155
  /**
1038
1156
  * Gets the edge data associated with an edge index, if it exists.
1039
1157
  *
1040
- * @example
1158
+ * **Example** (Getting edge data)
1159
+ *
1041
1160
  * ```ts
1042
1161
  * import { Graph } from "effect"
1043
1162
  *
@@ -1052,19 +1171,20 @@ export declare const removeEdge: <N, E, T extends Kind = "directed">(mutable: Mu
1052
1171
  *
1053
1172
  * if (edgeData._tag === "Some") {
1054
1173
  * console.log(edgeData.value.data) // 42
1055
- * console.log(edgeData.value.source) // NodeIndex(0)
1056
- * console.log(edgeData.value.target) // NodeIndex(1)
1174
+ * console.log(edgeData.value.source) // 0
1175
+ * console.log(edgeData.value.target) // 1
1057
1176
  * }
1058
1177
  * ```
1059
1178
  *
1060
- * @since 4.0.0
1061
1179
  * @category getters
1180
+ * @since 4.0.0
1062
1181
  */
1063
1182
  export declare const getEdge: {
1064
1183
  /**
1065
1184
  * Gets the edge data associated with an edge index, if it exists.
1066
1185
  *
1067
- * @example
1186
+ * **Example** (Getting edge data)
1187
+ *
1068
1188
  * ```ts
1069
1189
  * import { Graph } from "effect"
1070
1190
  *
@@ -1079,19 +1199,20 @@ export declare const getEdge: {
1079
1199
  *
1080
1200
  * if (edgeData._tag === "Some") {
1081
1201
  * console.log(edgeData.value.data) // 42
1082
- * console.log(edgeData.value.source) // NodeIndex(0)
1083
- * console.log(edgeData.value.target) // NodeIndex(1)
1202
+ * console.log(edgeData.value.source) // 0
1203
+ * console.log(edgeData.value.target) // 1
1084
1204
  * }
1085
1205
  * ```
1086
1206
  *
1087
- * @since 4.0.0
1088
1207
  * @category getters
1208
+ * @since 4.0.0
1089
1209
  */
1090
1210
  <E>(edgeIndex: EdgeIndex): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<Edge<E>>;
1091
1211
  /**
1092
1212
  * Gets the edge data associated with an edge index, if it exists.
1093
1213
  *
1094
- * @example
1214
+ * **Example** (Getting edge data)
1215
+ *
1095
1216
  * ```ts
1096
1217
  * import { Graph } from "effect"
1097
1218
  *
@@ -1106,20 +1227,21 @@ export declare const getEdge: {
1106
1227
  *
1107
1228
  * if (edgeData._tag === "Some") {
1108
1229
  * console.log(edgeData.value.data) // 42
1109
- * console.log(edgeData.value.source) // NodeIndex(0)
1110
- * console.log(edgeData.value.target) // NodeIndex(1)
1230
+ * console.log(edgeData.value.source) // 0
1231
+ * console.log(edgeData.value.target) // 1
1111
1232
  * }
1112
1233
  * ```
1113
1234
  *
1114
- * @since 4.0.0
1115
1235
  * @category getters
1236
+ * @since 4.0.0
1116
1237
  */
1117
1238
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, edgeIndex: EdgeIndex): Option.Option<Edge<E>>;
1118
1239
  };
1119
1240
  /**
1120
1241
  * Checks if an edge exists between two nodes in the graph.
1121
1242
  *
1122
- * @example
1243
+ * **Example** (Checking edge existence)
1244
+ *
1123
1245
  * ```ts
1124
1246
  * import { Graph } from "effect"
1125
1247
  *
@@ -1141,14 +1263,15 @@ export declare const getEdge: {
1141
1263
  * console.log(hasAC) // false
1142
1264
  * ```
1143
1265
  *
1144
- * @since 4.0.0
1145
1266
  * @category getters
1267
+ * @since 4.0.0
1146
1268
  */
1147
1269
  export declare const hasEdge: {
1148
1270
  /**
1149
1271
  * Checks if an edge exists between two nodes in the graph.
1150
1272
  *
1151
- * @example
1273
+ * **Example** (Checking edge existence)
1274
+ *
1152
1275
  * ```ts
1153
1276
  * import { Graph } from "effect"
1154
1277
  *
@@ -1170,14 +1293,15 @@ export declare const hasEdge: {
1170
1293
  * console.log(hasAC) // false
1171
1294
  * ```
1172
1295
  *
1173
- * @since 4.0.0
1174
1296
  * @category getters
1297
+ * @since 4.0.0
1175
1298
  */
1176
1299
  (source: NodeIndex, target: NodeIndex): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => boolean;
1177
1300
  /**
1178
1301
  * Checks if an edge exists between two nodes in the graph.
1179
1302
  *
1180
- * @example
1303
+ * **Example** (Checking edge existence)
1304
+ *
1181
1305
  * ```ts
1182
1306
  * import { Graph } from "effect"
1183
1307
  *
@@ -1199,15 +1323,16 @@ export declare const hasEdge: {
1199
1323
  * console.log(hasAC) // false
1200
1324
  * ```
1201
1325
  *
1202
- * @since 4.0.0
1203
1326
  * @category getters
1327
+ * @since 4.0.0
1204
1328
  */
1205
1329
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, source: NodeIndex, target: NodeIndex): boolean;
1206
1330
  };
1207
1331
  /**
1208
1332
  * Returns the number of edges in the graph.
1209
1333
  *
1210
- * @example
1334
+ * **Example** (Counting edges)
1335
+ *
1211
1336
  * ```ts
1212
1337
  * import { Graph } from "effect"
1213
1338
  *
@@ -1226,14 +1351,20 @@ export declare const hasEdge: {
1226
1351
  * console.log(Graph.edgeCount(graphWithEdges)) // 3
1227
1352
  * ```
1228
1353
  *
1229
- * @since 4.0.0
1230
1354
  * @category getters
1355
+ * @since 4.0.0
1231
1356
  */
1232
1357
  export declare const edgeCount: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => number;
1233
1358
  /**
1234
- * Returns the neighboring nodes (targets of outgoing edges) for a given node.
1359
+ * Returns the neighboring node indices for a node.
1360
+ *
1361
+ * **Details**
1362
+ *
1363
+ * For directed graphs, neighbors are the targets of outgoing edges. For
1364
+ * undirected graphs, neighbors are the other endpoints of incident edges.
1365
+ *
1366
+ * **Example** (Getting outgoing neighbors)
1235
1367
  *
1236
- * @example
1237
1368
  * ```ts
1238
1369
  * import { Graph } from "effect"
1239
1370
  *
@@ -1250,20 +1381,26 @@ export declare const edgeCount: <N, E, T extends Kind = "directed">(graph: Graph
1250
1381
  * const nodeC = 2
1251
1382
  *
1252
1383
  * const neighborsA = Graph.neighbors(graph, nodeA)
1253
- * console.log(neighborsA) // [NodeIndex(1), NodeIndex(2)]
1384
+ * console.log(neighborsA) // [1, 2]
1254
1385
  *
1255
1386
  * const neighborsB = Graph.neighbors(graph, nodeB)
1256
1387
  * console.log(neighborsB) // []
1257
1388
  * ```
1258
1389
  *
1259
- * @since 4.0.0
1260
1390
  * @category getters
1391
+ * @since 4.0.0
1261
1392
  */
1262
1393
  export declare const neighbors: {
1263
1394
  /**
1264
- * Returns the neighboring nodes (targets of outgoing edges) for a given node.
1395
+ * Returns the neighboring node indices for a node.
1396
+ *
1397
+ * **Details**
1398
+ *
1399
+ * For directed graphs, neighbors are the targets of outgoing edges. For
1400
+ * undirected graphs, neighbors are the other endpoints of incident edges.
1401
+ *
1402
+ * **Example** (Getting outgoing neighbors)
1265
1403
  *
1266
- * @example
1267
1404
  * ```ts
1268
1405
  * import { Graph } from "effect"
1269
1406
  *
@@ -1280,20 +1417,26 @@ export declare const neighbors: {
1280
1417
  * const nodeC = 2
1281
1418
  *
1282
1419
  * const neighborsA = Graph.neighbors(graph, nodeA)
1283
- * console.log(neighborsA) // [NodeIndex(1), NodeIndex(2)]
1420
+ * console.log(neighborsA) // [1, 2]
1284
1421
  *
1285
1422
  * const neighborsB = Graph.neighbors(graph, nodeB)
1286
1423
  * console.log(neighborsB) // []
1287
1424
  * ```
1288
1425
  *
1289
- * @since 4.0.0
1290
1426
  * @category getters
1427
+ * @since 4.0.0
1291
1428
  */
1292
1429
  (nodeIndex: NodeIndex): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<NodeIndex>;
1293
1430
  /**
1294
- * Returns the neighboring nodes (targets of outgoing edges) for a given node.
1431
+ * Returns the neighboring node indices for a node.
1432
+ *
1433
+ * **Details**
1434
+ *
1435
+ * For directed graphs, neighbors are the targets of outgoing edges. For
1436
+ * undirected graphs, neighbors are the other endpoints of incident edges.
1437
+ *
1438
+ * **Example** (Getting outgoing neighbors)
1295
1439
  *
1296
- * @example
1297
1440
  * ```ts
1298
1441
  * import { Graph } from "effect"
1299
1442
  *
@@ -1310,21 +1453,22 @@ export declare const neighbors: {
1310
1453
  * const nodeC = 2
1311
1454
  *
1312
1455
  * const neighborsA = Graph.neighbors(graph, nodeA)
1313
- * console.log(neighborsA) // [NodeIndex(1), NodeIndex(2)]
1456
+ * console.log(neighborsA) // [1, 2]
1314
1457
  *
1315
1458
  * const neighborsB = Graph.neighbors(graph, nodeB)
1316
1459
  * console.log(neighborsB) // []
1317
1460
  * ```
1318
1461
  *
1319
- * @since 4.0.0
1320
1462
  * @category getters
1463
+ * @since 4.0.0
1321
1464
  */
1322
1465
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, nodeIndex: NodeIndex): Array<NodeIndex>;
1323
1466
  };
1324
1467
  /**
1325
1468
  * Get neighbors of a node in a specific direction for bidirectional traversal.
1326
1469
  *
1327
- * @example
1470
+ * **Example** (Traversing directed neighbors)
1471
+ *
1328
1472
  * ```ts
1329
1473
  * import { Graph } from "effect"
1330
1474
  *
@@ -1344,14 +1488,15 @@ export declare const neighbors: {
1344
1488
  * const incoming = Graph.neighborsDirected(graph, nodeB, "incoming")
1345
1489
  * ```
1346
1490
  *
1347
- * @since 4.0.0
1348
1491
  * @category queries
1492
+ * @since 4.0.0
1349
1493
  */
1350
1494
  export declare const neighborsDirected: {
1351
1495
  /**
1352
1496
  * Get neighbors of a node in a specific direction for bidirectional traversal.
1353
1497
  *
1354
- * @example
1498
+ * **Example** (Traversing directed neighbors)
1499
+ *
1355
1500
  * ```ts
1356
1501
  * import { Graph } from "effect"
1357
1502
  *
@@ -1371,14 +1516,15 @@ export declare const neighborsDirected: {
1371
1516
  * const incoming = Graph.neighborsDirected(graph, nodeB, "incoming")
1372
1517
  * ```
1373
1518
  *
1374
- * @since 4.0.0
1375
1519
  * @category queries
1520
+ * @since 4.0.0
1376
1521
  */
1377
1522
  (nodeIndex: NodeIndex, direction: Direction): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<NodeIndex>;
1378
1523
  /**
1379
1524
  * Get neighbors of a node in a specific direction for bidirectional traversal.
1380
1525
  *
1381
- * @example
1526
+ * **Example** (Traversing directed neighbors)
1527
+ *
1382
1528
  * ```ts
1383
1529
  * import { Graph } from "effect"
1384
1530
  *
@@ -1398,8 +1544,8 @@ export declare const neighborsDirected: {
1398
1544
  * const incoming = Graph.neighborsDirected(graph, nodeB, "incoming")
1399
1545
  * ```
1400
1546
  *
1401
- * @since 4.0.0
1402
1547
  * @category queries
1548
+ * @since 4.0.0
1403
1549
  */
1404
1550
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, nodeIndex: NodeIndex, direction: Direction): Array<NodeIndex>;
1405
1551
  };
@@ -1409,7 +1555,8 @@ export declare const neighborsDirected: {
1409
1555
  * Provides customization for node labels, edge labels, and graph naming
1410
1556
  * in DOT format compatible with GraphViz tools.
1411
1557
  *
1412
- * @example
1558
+ * **Example** (Configuring GraphViz labels)
1559
+ *
1413
1560
  * ```ts
1414
1561
  * import type * as Graph from "effect/Graph"
1415
1562
  *
@@ -1427,8 +1574,8 @@ export declare const neighborsDirected: {
1427
1574
  * }
1428
1575
  * ```
1429
1576
  *
1430
- * @since 4.0.0
1431
1577
  * @category models
1578
+ * @since 4.0.0
1432
1579
  */
1433
1580
  export interface GraphVizOptions<N, E> {
1434
1581
  /**
@@ -1450,7 +1597,8 @@ export interface GraphVizOptions<N, E> {
1450
1597
  /**
1451
1598
  * Exports a graph to GraphViz DOT format for visualization.
1452
1599
  *
1453
- * @example
1600
+ * **Example** (Exporting GraphViz DOT)
1601
+ *
1454
1602
  * ```ts
1455
1603
  * import { Graph } from "effect"
1456
1604
  *
@@ -1475,14 +1623,15 @@ export interface GraphVizOptions<N, E> {
1475
1623
  * // }
1476
1624
  * ```
1477
1625
  *
1478
- * @since 4.0.0
1479
1626
  * @category utils
1627
+ * @since 4.0.0
1480
1628
  */
1481
1629
  export declare const toGraphViz: {
1482
1630
  /**
1483
1631
  * Exports a graph to GraphViz DOT format for visualization.
1484
1632
  *
1485
- * @example
1633
+ * **Example** (Exporting GraphViz DOT)
1634
+ *
1486
1635
  * ```ts
1487
1636
  * import { Graph } from "effect"
1488
1637
  *
@@ -1507,14 +1656,15 @@ export declare const toGraphViz: {
1507
1656
  * // }
1508
1657
  * ```
1509
1658
  *
1510
- * @since 4.0.0
1511
1659
  * @category utils
1660
+ * @since 4.0.0
1512
1661
  */
1513
1662
  <N, E>(options?: GraphVizOptions<N, E>): <T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => string;
1514
1663
  /**
1515
1664
  * Exports a graph to GraphViz DOT format for visualization.
1516
1665
  *
1517
- * @example
1666
+ * **Example** (Exporting GraphViz DOT)
1667
+ *
1518
1668
  * ```ts
1519
1669
  * import { Graph } from "effect"
1520
1670
  *
@@ -1539,8 +1689,8 @@ export declare const toGraphViz: {
1539
1689
  * // }
1540
1690
  * ```
1541
1691
  *
1542
- * @since 4.0.0
1543
1692
  * @category utils
1693
+ * @since 4.0.0
1544
1694
  */
1545
1695
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, options?: GraphVizOptions<N, E>): string;
1546
1696
  };
@@ -1557,7 +1707,8 @@ export declare const toGraphViz: {
1557
1707
  * - `subroutine`: Subroutine-style nodes `A[["label"]]`
1558
1708
  * - `cylindrical`: Cylindrical database-style nodes `A[("label")]`
1559
1709
  *
1560
- * @example
1710
+ * **Example** (Selecting Mermaid node shapes)
1711
+ *
1561
1712
  * ```ts
1562
1713
  * import type * as Graph from "effect/Graph"
1563
1714
  *
@@ -1575,8 +1726,8 @@ export declare const toGraphViz: {
1575
1726
  * }
1576
1727
  * ```
1577
1728
  *
1578
- * @since 4.0.0
1579
1729
  * @category models
1730
+ * @since 4.0.0
1580
1731
  */
1581
1732
  export type MermaidNodeShape = "rectangle" | "rounded" | "circle" | "diamond" | "hexagon" | "stadium" | "subroutine" | "cylindrical";
1582
1733
  /**
@@ -1588,7 +1739,8 @@ export type MermaidNodeShape = "rectangle" | "rounded" | "circle" | "diamond" |
1588
1739
  * - `LR`: Left to Right (horizontal layout)
1589
1740
  * - `RL`: Right to Left (reverse horizontal)
1590
1741
  *
1591
- * @example
1742
+ * **Example** (Configuring Mermaid directions)
1743
+ *
1592
1744
  * ```ts
1593
1745
  * import type * as Graph from "effect/Graph"
1594
1746
  *
@@ -1608,8 +1760,8 @@ export type MermaidNodeShape = "rectangle" | "rounded" | "circle" | "diamond" |
1608
1760
  * }
1609
1761
  * ```
1610
1762
  *
1611
- * @since 4.0.0
1612
1763
  * @category models
1764
+ * @since 4.0.0
1613
1765
  */
1614
1766
  export type MermaidDirection = "TB" | "TD" | "BT" | "RL" | "LR";
1615
1767
  /**
@@ -1622,7 +1774,8 @@ export type MermaidDirection = "TB" | "TD" | "BT" | "RL" | "LR";
1622
1774
  * When not specified, automatically selects based on graph type:
1623
1775
  * directed graphs use "flowchart", undirected graphs use "graph".
1624
1776
  *
1625
- * @example
1777
+ * **Example** (Selecting Mermaid diagram types)
1778
+ *
1626
1779
  * ```ts
1627
1780
  * import type * as Graph from "effect/Graph"
1628
1781
  *
@@ -1640,15 +1793,15 @@ export type MermaidDirection = "TB" | "TD" | "BT" | "RL" | "LR";
1640
1793
  * const autoOptions: Graph.MermaidOptions<string, string> = {}
1641
1794
  * ```
1642
1795
  *
1643
- * @since 4.0.0
1644
1796
  * @category models
1797
+ * @since 4.0.0
1645
1798
  */
1646
1799
  export type MermaidDiagramType = "flowchart" | "graph";
1647
1800
  /**
1648
1801
  * Configuration options for Mermaid diagram generation, following GraphViz pattern.
1649
1802
  *
1650
- * @since 4.0.0
1651
1803
  * @category models
1804
+ * @since 4.0.0
1652
1805
  */
1653
1806
  /**
1654
1807
  * Configuration options for Mermaid diagram generation from graphs.
@@ -1656,7 +1809,8 @@ export type MermaidDiagramType = "flowchart" | "graph";
1656
1809
  * Provides customization for node labels, edge labels, diagram type,
1657
1810
  * layout direction, node shapes, and graph naming in Mermaid format.
1658
1811
  *
1659
- * @example
1812
+ * **Example** (Configuring Mermaid output)
1813
+ *
1660
1814
  * ```ts
1661
1815
  * import type * as Graph from "effect/Graph"
1662
1816
  *
@@ -1676,8 +1830,8 @@ export type MermaidDiagramType = "flowchart" | "graph";
1676
1830
  * }
1677
1831
  * ```
1678
1832
  *
1679
- * @since 4.0.0
1680
1833
  * @category models
1834
+ * @since 4.0.0
1681
1835
  */
1682
1836
  export interface MermaidOptions<N, E> {
1683
1837
  /**
@@ -1715,7 +1869,8 @@ export interface MermaidOptions<N, E> {
1715
1869
  * structures to valid Mermaid syntax for use in documentation, web applications,
1716
1870
  * and visualization tools.
1717
1871
  *
1718
- * @example
1872
+ * **Example** (Exporting a directed Mermaid diagram)
1873
+ *
1719
1874
  * ```ts
1720
1875
  * import * as Graph from "effect/Graph"
1721
1876
  *
@@ -1738,7 +1893,8 @@ export interface MermaidOptions<N, E> {
1738
1893
  * // 0 -->|"2"| 2
1739
1894
  * ```
1740
1895
  *
1741
- * @example
1896
+ * **Example** (Exporting an undirected Mermaid diagram)
1897
+ *
1742
1898
  * ```ts
1743
1899
  * import * as Graph from "effect/Graph"
1744
1900
  *
@@ -1765,7 +1921,8 @@ export interface MermaidOptions<N, E> {
1765
1921
  * // 1 ---|"colleagues"| 2
1766
1922
  * ```
1767
1923
  *
1768
- * @example
1924
+ * **Example** (Customizing Mermaid node shapes)
1925
+ *
1769
1926
  * ```ts
1770
1927
  * import * as Graph from "effect/Graph"
1771
1928
  *
@@ -1816,7 +1973,8 @@ export interface MermaidOptions<N, E> {
1816
1973
  * // 2 --> 3
1817
1974
  * ```
1818
1975
  *
1819
- * @example
1976
+ * **Example** (Visualizing dependency graphs)
1977
+ *
1820
1978
  * ```ts
1821
1979
  * import * as Graph from "effect/Graph"
1822
1980
  *
@@ -1881,8 +2039,8 @@ export interface MermaidOptions<N, E> {
1881
2039
  * @param options - Optional configuration for the Mermaid output
1882
2040
  * @returns Mermaid diagram syntax as a string
1883
2041
  *
1884
- * @since 4.0.0
1885
2042
  * @category utils
2043
+ * @since 4.0.0
1886
2044
  */
1887
2045
  export declare const toMermaid: {
1888
2046
  /**
@@ -1893,7 +2051,8 @@ export declare const toMermaid: {
1893
2051
  * structures to valid Mermaid syntax for use in documentation, web applications,
1894
2052
  * and visualization tools.
1895
2053
  *
1896
- * @example
2054
+ * **Example** (Exporting a directed Mermaid diagram)
2055
+ *
1897
2056
  * ```ts
1898
2057
  * import * as Graph from "effect/Graph"
1899
2058
  *
@@ -1916,7 +2075,8 @@ export declare const toMermaid: {
1916
2075
  * // 0 -->|"2"| 2
1917
2076
  * ```
1918
2077
  *
1919
- * @example
2078
+ * **Example** (Exporting an undirected Mermaid diagram)
2079
+ *
1920
2080
  * ```ts
1921
2081
  * import * as Graph from "effect/Graph"
1922
2082
  *
@@ -1943,7 +2103,8 @@ export declare const toMermaid: {
1943
2103
  * // 1 ---|"colleagues"| 2
1944
2104
  * ```
1945
2105
  *
1946
- * @example
2106
+ * **Example** (Customizing Mermaid node shapes)
2107
+ *
1947
2108
  * ```ts
1948
2109
  * import * as Graph from "effect/Graph"
1949
2110
  *
@@ -1994,7 +2155,8 @@ export declare const toMermaid: {
1994
2155
  * // 2 --> 3
1995
2156
  * ```
1996
2157
  *
1997
- * @example
2158
+ * **Example** (Visualizing dependency graphs)
2159
+ *
1998
2160
  * ```ts
1999
2161
  * import * as Graph from "effect/Graph"
2000
2162
  *
@@ -2059,8 +2221,8 @@ export declare const toMermaid: {
2059
2221
  * @param options - Optional configuration for the Mermaid output
2060
2222
  * @returns Mermaid diagram syntax as a string
2061
2223
  *
2062
- * @since 4.0.0
2063
2224
  * @category utils
2225
+ * @since 4.0.0
2064
2226
  */
2065
2227
  <N, E>(options?: MermaidOptions<N, E>): <T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => string;
2066
2228
  /**
@@ -2071,7 +2233,8 @@ export declare const toMermaid: {
2071
2233
  * structures to valid Mermaid syntax for use in documentation, web applications,
2072
2234
  * and visualization tools.
2073
2235
  *
2074
- * @example
2236
+ * **Example** (Exporting a directed Mermaid diagram)
2237
+ *
2075
2238
  * ```ts
2076
2239
  * import * as Graph from "effect/Graph"
2077
2240
  *
@@ -2094,7 +2257,8 @@ export declare const toMermaid: {
2094
2257
  * // 0 -->|"2"| 2
2095
2258
  * ```
2096
2259
  *
2097
- * @example
2260
+ * **Example** (Exporting an undirected Mermaid diagram)
2261
+ *
2098
2262
  * ```ts
2099
2263
  * import * as Graph from "effect/Graph"
2100
2264
  *
@@ -2121,7 +2285,8 @@ export declare const toMermaid: {
2121
2285
  * // 1 ---|"colleagues"| 2
2122
2286
  * ```
2123
2287
  *
2124
- * @example
2288
+ * **Example** (Customizing Mermaid node shapes)
2289
+ *
2125
2290
  * ```ts
2126
2291
  * import * as Graph from "effect/Graph"
2127
2292
  *
@@ -2172,7 +2337,8 @@ export declare const toMermaid: {
2172
2337
  * // 2 --> 3
2173
2338
  * ```
2174
2339
  *
2175
- * @example
2340
+ * **Example** (Visualizing dependency graphs)
2341
+ *
2176
2342
  * ```ts
2177
2343
  * import * as Graph from "effect/Graph"
2178
2344
  *
@@ -2237,15 +2403,16 @@ export declare const toMermaid: {
2237
2403
  * @param options - Optional configuration for the Mermaid output
2238
2404
  * @returns Mermaid diagram syntax as a string
2239
2405
  *
2240
- * @since 4.0.0
2241
2406
  * @category utils
2407
+ * @since 4.0.0
2242
2408
  */
2243
2409
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, options?: MermaidOptions<N, E>): string;
2244
2410
  };
2245
2411
  /**
2246
2412
  * Direction for graph traversal, indicating which edges to follow.
2247
2413
  *
2248
- * @example
2414
+ * **Example** (Traversing by direction)
2415
+ *
2249
2416
  * ```ts
2250
2417
  * import { Graph } from "effect"
2251
2418
  *
@@ -2266,8 +2433,8 @@ export declare const toMermaid: {
2266
2433
  * )
2267
2434
  * ```
2268
2435
  *
2269
- * @since 4.0.0
2270
2436
  * @category models
2437
+ * @since 4.0.0
2271
2438
  */
2272
2439
  export type Direction = "outgoing" | "incoming";
2273
2440
  /**
@@ -2277,7 +2444,8 @@ export type Direction = "outgoing" | "incoming";
2277
2444
  * For directed graphs, any back edge creates a cycle. For undirected graphs,
2278
2445
  * a back edge that doesn't go to the immediate parent creates a cycle.
2279
2446
  *
2280
- * @example
2447
+ * **Example** (Checking cycles)
2448
+ *
2281
2449
  * ```ts
2282
2450
  * import { Graph } from "effect"
2283
2451
  *
@@ -2301,8 +2469,8 @@ export type Direction = "outgoing" | "incoming";
2301
2469
  * console.log(Graph.isAcyclic(cyclic)) // false
2302
2470
  * ```
2303
2471
  *
2304
- * @since 4.0.0
2305
2472
  * @category algorithms
2473
+ * @since 4.0.0
2306
2474
  */
2307
2475
  export declare const isAcyclic: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => boolean;
2308
2476
  /**
@@ -2312,7 +2480,8 @@ export declare const isAcyclic: <N, E, T extends Kind = "directed">(graph: Graph
2312
2480
  * such that no two vertices within the same set are adjacent. Uses BFS coloring
2313
2481
  * to determine bipartiteness.
2314
2482
  *
2315
- * @example
2483
+ * **Example** (Checking bipartite graphs)
2484
+ *
2316
2485
  * ```ts
2317
2486
  * import { Graph } from "effect"
2318
2487
  *
@@ -2340,15 +2509,16 @@ export declare const isAcyclic: <N, E, T extends Kind = "directed">(graph: Graph
2340
2509
  * console.log(Graph.isBipartite(triangle)) // false
2341
2510
  * ```
2342
2511
  *
2343
- * @since 4.0.0
2344
2512
  * @category algorithms
2513
+ * @since 4.0.0
2345
2514
  */
2346
2515
  export declare const isBipartite: <N, E>(graph: Graph<N, E, "undirected"> | MutableGraph<N, E, "undirected">) => boolean;
2347
2516
  /**
2348
2517
  * Find connected components in an undirected graph.
2349
2518
  * Each component is represented as an array of node indices.
2350
2519
  *
2351
- * @example
2520
+ * **Example** (Finding connected components)
2521
+ *
2352
2522
  * ```ts
2353
2523
  * import { Graph } from "effect"
2354
2524
  *
@@ -2365,15 +2535,16 @@ export declare const isBipartite: <N, E>(graph: Graph<N, E, "undirected"> | Muta
2365
2535
  * console.log(components) // [[0, 1], [2, 3]]
2366
2536
  * ```
2367
2537
  *
2368
- * @since 4.0.0
2369
2538
  * @category algorithms
2539
+ * @since 4.0.0
2370
2540
  */
2371
2541
  export declare const connectedComponents: <N, E>(graph: Graph<N, E, "undirected"> | MutableGraph<N, E, "undirected">) => Array<Array<NodeIndex>>;
2372
2542
  /**
2373
2543
  * Find strongly connected components in a directed graph using Kosaraju's algorithm.
2374
2544
  * Each SCC is represented as an array of node indices.
2375
2545
  *
2376
- * @example
2546
+ * **Example** (Finding strongly connected components)
2547
+ *
2377
2548
  * ```ts
2378
2549
  * import { Graph } from "effect"
2379
2550
  *
@@ -2390,15 +2561,20 @@ export declare const connectedComponents: <N, E>(graph: Graph<N, E, "undirected"
2390
2561
  * console.log(sccs) // [[0, 1, 2]]
2391
2562
  * ```
2392
2563
  *
2393
- * @since 4.0.0
2394
2564
  * @category algorithms
2565
+ * @since 4.0.0
2395
2566
  */
2396
2567
  export declare const stronglyConnectedComponents: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<Array<NodeIndex>>;
2397
2568
  /**
2398
- * Result of a shortest path computation containing the path and total distance.
2569
+ * Result of a shortest path computation.
2570
+ *
2571
+ * **Details**
2572
+ *
2573
+ * Contains the node-index path, the total numeric distance, and the edge data
2574
+ * encountered along the path.
2399
2575
  *
2400
- * @since 4.0.0
2401
2576
  * @category models
2577
+ * @since 4.0.0
2402
2578
  */
2403
2579
  export interface PathResult<E> {
2404
2580
  readonly path: Array<NodeIndex>;
@@ -2406,10 +2582,15 @@ export interface PathResult<E> {
2406
2582
  readonly costs: Array<E>;
2407
2583
  }
2408
2584
  /**
2409
- * Configuration for Dijkstra's algorithm.
2585
+ * Configuration for finding a shortest path with Dijkstra's algorithm.
2586
+ *
2587
+ * **Details**
2588
+ *
2589
+ * Specifies the source and target node indices, plus a cost function that maps
2590
+ * each edge's data to a non-negative numeric weight.
2410
2591
  *
2411
- * @since 4.0.0
2412
2592
  * @category models
2593
+ * @since 4.0.0
2413
2594
  */
2414
2595
  export interface DijkstraConfig<E> {
2415
2596
  source: NodeIndex;
@@ -2417,12 +2598,17 @@ export interface DijkstraConfig<E> {
2417
2598
  cost: (edgeData: E) => number;
2418
2599
  }
2419
2600
  /**
2420
- * Find the shortest path between two nodes using Dijkstra's algorithm.
2601
+ * Finds the shortest path from the configured source node to the target node
2602
+ * using Dijkstra's algorithm.
2603
+ *
2604
+ * **Details**
2605
+ *
2606
+ * Edge costs must be non-negative. Returns `Option.none()` when the target is
2607
+ * not reachable, and throws a `GraphError` when either endpoint is missing or a
2608
+ * negative edge cost is encountered.
2421
2609
  *
2422
- * Dijkstra's algorithm works with non-negative edge weights and finds the shortest
2423
- * path from a source node to a target node in O((V + E) log V) time complexity.
2610
+ * **Example** (Finding shortest paths with Dijkstra)
2424
2611
  *
2425
- * @example
2426
2612
  * ```ts
2427
2613
  * import { Graph } from "effect"
2428
2614
  *
@@ -2447,17 +2633,22 @@ export interface DijkstraConfig<E> {
2447
2633
  * }
2448
2634
  * ```
2449
2635
  *
2450
- * @since 4.0.0
2451
2636
  * @category algorithms
2637
+ * @since 4.0.0
2452
2638
  */
2453
2639
  export declare const dijkstra: {
2454
2640
  /**
2455
- * Find the shortest path between two nodes using Dijkstra's algorithm.
2641
+ * Finds the shortest path from the configured source node to the target node
2642
+ * using Dijkstra's algorithm.
2643
+ *
2644
+ * **Details**
2456
2645
  *
2457
- * Dijkstra's algorithm works with non-negative edge weights and finds the shortest
2458
- * path from a source node to a target node in O((V + E) log V) time complexity.
2646
+ * Edge costs must be non-negative. Returns `Option.none()` when the target is
2647
+ * not reachable, and throws a `GraphError` when either endpoint is missing or a
2648
+ * negative edge cost is encountered.
2649
+ *
2650
+ * **Example** (Finding shortest paths with Dijkstra)
2459
2651
  *
2460
- * @example
2461
2652
  * ```ts
2462
2653
  * import { Graph } from "effect"
2463
2654
  *
@@ -2482,17 +2673,22 @@ export declare const dijkstra: {
2482
2673
  * }
2483
2674
  * ```
2484
2675
  *
2485
- * @since 4.0.0
2486
2676
  * @category algorithms
2677
+ * @since 4.0.0
2487
2678
  */
2488
2679
  <E>(config: DijkstraConfig<E>): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<PathResult<E>>;
2489
2680
  /**
2490
- * Find the shortest path between two nodes using Dijkstra's algorithm.
2681
+ * Finds the shortest path from the configured source node to the target node
2682
+ * using Dijkstra's algorithm.
2491
2683
  *
2492
- * Dijkstra's algorithm works with non-negative edge weights and finds the shortest
2493
- * path from a source node to a target node in O((V + E) log V) time complexity.
2684
+ * **Details**
2685
+ *
2686
+ * Edge costs must be non-negative. Returns `Option.none()` when the target is
2687
+ * not reachable, and throws a `GraphError` when either endpoint is missing or a
2688
+ * negative edge cost is encountered.
2689
+ *
2690
+ * **Example** (Finding shortest paths with Dijkstra)
2494
2691
  *
2495
- * @example
2496
2692
  * ```ts
2497
2693
  * import { Graph } from "effect"
2498
2694
  *
@@ -2517,16 +2713,21 @@ export declare const dijkstra: {
2517
2713
  * }
2518
2714
  * ```
2519
2715
  *
2520
- * @since 4.0.0
2521
2716
  * @category algorithms
2717
+ * @since 4.0.0
2522
2718
  */
2523
2719
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config: DijkstraConfig<E>): Option.Option<PathResult<E>>;
2524
2720
  };
2525
2721
  /**
2526
- * Result of all-pairs shortest path computation.
2722
+ * Result of an all-pairs shortest path computation.
2723
+ *
2724
+ * **Details**
2725
+ *
2726
+ * Contains distance, node-path, and edge-data maps keyed by source and target
2727
+ * node indices.
2527
2728
  *
2528
- * @since 4.0.0
2529
2729
  * @category models
2730
+ * @since 4.0.0
2530
2731
  */
2531
2732
  export interface AllPairsResult<E> {
2532
2733
  readonly distances: Map<NodeIndex, Map<NodeIndex, number>>;
@@ -2534,14 +2735,17 @@ export interface AllPairsResult<E> {
2534
2735
  readonly costs: Map<NodeIndex, Map<NodeIndex, Array<E>>>;
2535
2736
  }
2536
2737
  /**
2537
- * Find shortest paths between all pairs of nodes using Floyd-Warshall algorithm.
2738
+ * Finds shortest paths between all pairs of nodes using the Floyd-Warshall
2739
+ * algorithm.
2740
+ *
2741
+ * **Details**
2538
2742
  *
2539
- * Floyd-Warshall algorithm computes shortest paths between all pairs of nodes in O(V³) time.
2540
- * It can handle negative edge weights and detect negative cycles.
2743
+ * Computes distances, reconstructed node paths, and edge-data paths for every
2744
+ * source and target pair in O(V^3) time. Negative edge weights are allowed, but
2745
+ * a `GraphError` is thrown if any negative cycle is detected.
2541
2746
  *
2542
- * Throws if a negative cycle is detected that affects the path to target.
2747
+ * **Example** (Finding all-pairs shortest paths)
2543
2748
  *
2544
- * @example
2545
2749
  * ```ts
2546
2750
  * import { Graph } from "effect"
2547
2751
  *
@@ -2559,19 +2763,22 @@ export interface AllPairsResult<E> {
2559
2763
  * const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2]
2560
2764
  * ```
2561
2765
  *
2562
- * @since 4.0.0
2563
2766
  * @category algorithms
2767
+ * @since 4.0.0
2564
2768
  */
2565
2769
  export declare const floydWarshall: {
2566
2770
  /**
2567
- * Find shortest paths between all pairs of nodes using Floyd-Warshall algorithm.
2771
+ * Finds shortest paths between all pairs of nodes using the Floyd-Warshall
2772
+ * algorithm.
2773
+ *
2774
+ * **Details**
2568
2775
  *
2569
- * Floyd-Warshall algorithm computes shortest paths between all pairs of nodes in O(V³) time.
2570
- * It can handle negative edge weights and detect negative cycles.
2776
+ * Computes distances, reconstructed node paths, and edge-data paths for every
2777
+ * source and target pair in O(V^3) time. Negative edge weights are allowed, but
2778
+ * a `GraphError` is thrown if any negative cycle is detected.
2571
2779
  *
2572
- * Throws if a negative cycle is detected that affects the path to target.
2780
+ * **Example** (Finding all-pairs shortest paths)
2573
2781
  *
2574
- * @example
2575
2782
  * ```ts
2576
2783
  * import { Graph } from "effect"
2577
2784
  *
@@ -2589,19 +2796,22 @@ export declare const floydWarshall: {
2589
2796
  * const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2]
2590
2797
  * ```
2591
2798
  *
2592
- * @since 4.0.0
2593
2799
  * @category algorithms
2800
+ * @since 4.0.0
2594
2801
  */
2595
2802
  <E>(cost: (edgeData: E) => number): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => AllPairsResult<E>;
2596
2803
  /**
2597
- * Find shortest paths between all pairs of nodes using Floyd-Warshall algorithm.
2804
+ * Finds shortest paths between all pairs of nodes using the Floyd-Warshall
2805
+ * algorithm.
2806
+ *
2807
+ * **Details**
2598
2808
  *
2599
- * Floyd-Warshall algorithm computes shortest paths between all pairs of nodes in O(V³) time.
2600
- * It can handle negative edge weights and detect negative cycles.
2809
+ * Computes distances, reconstructed node paths, and edge-data paths for every
2810
+ * source and target pair in O(V^3) time. Negative edge weights are allowed, but
2811
+ * a `GraphError` is thrown if any negative cycle is detected.
2601
2812
  *
2602
- * Throws if a negative cycle is detected that affects the path to target.
2813
+ * **Example** (Finding all-pairs shortest paths)
2603
2814
  *
2604
- * @example
2605
2815
  * ```ts
2606
2816
  * import { Graph } from "effect"
2607
2817
  *
@@ -2619,16 +2829,21 @@ export declare const floydWarshall: {
2619
2829
  * const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2]
2620
2830
  * ```
2621
2831
  *
2622
- * @since 4.0.0
2623
2832
  * @category algorithms
2833
+ * @since 4.0.0
2624
2834
  */
2625
2835
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, cost: (edgeData: E) => number): AllPairsResult<E>;
2626
2836
  };
2627
2837
  /**
2628
- * Configuration for A* pathfinding algorithm.
2838
+ * Configuration for finding a shortest path with the A* algorithm.
2839
+ *
2840
+ * **Details**
2841
+ *
2842
+ * Specifies the source and target node indices, an edge-cost function, and a
2843
+ * heuristic that estimates the remaining cost from a node to the target.
2629
2844
  *
2630
- * @since 4.0.0
2631
2845
  * @category models
2846
+ * @since 4.0.0
2632
2847
  */
2633
2848
  export interface AstarConfig<E, N> {
2634
2849
  source: NodeIndex;
@@ -2637,13 +2852,18 @@ export interface AstarConfig<E, N> {
2637
2852
  heuristic: (sourceNodeData: N, targetNodeData: N) => number;
2638
2853
  }
2639
2854
  /**
2640
- * Find the shortest path between two nodes using A* pathfinding algorithm.
2855
+ * Finds the shortest path from the configured source node to the target node
2856
+ * using the A* pathfinding algorithm.
2857
+ *
2858
+ * **Details**
2859
+ *
2860
+ * The edge-cost function must return non-negative weights, and the heuristic
2861
+ * should be admissible to preserve shortest-path guarantees. Returns
2862
+ * `Option.none()` when the target is not reachable, and throws a `GraphError`
2863
+ * when either endpoint is missing or a negative edge cost is encountered.
2641
2864
  *
2642
- * A* is an extension of Dijkstra's algorithm that uses a heuristic function to guide
2643
- * the search towards the target, potentially finding paths faster than Dijkstra's.
2644
- * The heuristic must be admissible (never overestimate the actual cost).
2865
+ * **Example** (Finding shortest paths with A-star)
2645
2866
  *
2646
- * @example
2647
2867
  * ```ts
2648
2868
  * import { Graph } from "effect"
2649
2869
  *
@@ -2674,18 +2894,23 @@ export interface AstarConfig<E, N> {
2674
2894
  * }
2675
2895
  * ```
2676
2896
  *
2677
- * @since 4.0.0
2678
2897
  * @category algorithms
2898
+ * @since 4.0.0
2679
2899
  */
2680
2900
  export declare const astar: {
2681
2901
  /**
2682
- * Find the shortest path between two nodes using A* pathfinding algorithm.
2902
+ * Finds the shortest path from the configured source node to the target node
2903
+ * using the A* pathfinding algorithm.
2904
+ *
2905
+ * **Details**
2683
2906
  *
2684
- * A* is an extension of Dijkstra's algorithm that uses a heuristic function to guide
2685
- * the search towards the target, potentially finding paths faster than Dijkstra's.
2686
- * The heuristic must be admissible (never overestimate the actual cost).
2907
+ * The edge-cost function must return non-negative weights, and the heuristic
2908
+ * should be admissible to preserve shortest-path guarantees. Returns
2909
+ * `Option.none()` when the target is not reachable, and throws a `GraphError`
2910
+ * when either endpoint is missing or a negative edge cost is encountered.
2911
+ *
2912
+ * **Example** (Finding shortest paths with A-star)
2687
2913
  *
2688
- * @example
2689
2914
  * ```ts
2690
2915
  * import { Graph } from "effect"
2691
2916
  *
@@ -2716,18 +2941,23 @@ export declare const astar: {
2716
2941
  * }
2717
2942
  * ```
2718
2943
  *
2719
- * @since 4.0.0
2720
2944
  * @category algorithms
2945
+ * @since 4.0.0
2721
2946
  */
2722
2947
  <E, N>(config: AstarConfig<E, N>): <T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<PathResult<E>>;
2723
2948
  /**
2724
- * Find the shortest path between two nodes using A* pathfinding algorithm.
2949
+ * Finds the shortest path from the configured source node to the target node
2950
+ * using the A* pathfinding algorithm.
2951
+ *
2952
+ * **Details**
2725
2953
  *
2726
- * A* is an extension of Dijkstra's algorithm that uses a heuristic function to guide
2727
- * the search towards the target, potentially finding paths faster than Dijkstra's.
2728
- * The heuristic must be admissible (never overestimate the actual cost).
2954
+ * The edge-cost function must return non-negative weights, and the heuristic
2955
+ * should be admissible to preserve shortest-path guarantees. Returns
2956
+ * `Option.none()` when the target is not reachable, and throws a `GraphError`
2957
+ * when either endpoint is missing or a negative edge cost is encountered.
2958
+ *
2959
+ * **Example** (Finding shortest paths with A-star)
2729
2960
  *
2730
- * @example
2731
2961
  * ```ts
2732
2962
  * import { Graph } from "effect"
2733
2963
  *
@@ -2758,16 +2988,21 @@ export declare const astar: {
2758
2988
  * }
2759
2989
  * ```
2760
2990
  *
2761
- * @since 4.0.0
2762
2991
  * @category algorithms
2992
+ * @since 4.0.0
2763
2993
  */
2764
2994
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config: AstarConfig<E, N>): Option.Option<PathResult<E>>;
2765
2995
  };
2766
2996
  /**
2767
- * Configuration for Bellman-Ford algorithm.
2997
+ * Configuration for finding a shortest path with the Bellman-Ford algorithm.
2998
+ *
2999
+ * **Details**
3000
+ *
3001
+ * Specifies the source and target node indices, plus a cost function that maps
3002
+ * each edge's data to a numeric weight.
2768
3003
  *
2769
- * @since 4.0.0
2770
3004
  * @category models
3005
+ * @since 4.0.0
2771
3006
  */
2772
3007
  export interface BellmanFordConfig<E> {
2773
3008
  source: NodeIndex;
@@ -2775,13 +3010,17 @@ export interface BellmanFordConfig<E> {
2775
3010
  cost: (edgeData: E) => number;
2776
3011
  }
2777
3012
  /**
2778
- * Find the shortest path between two nodes using Bellman-Ford algorithm.
3013
+ * Finds the shortest path from the configured source node to the target node
3014
+ * using the Bellman-Ford algorithm.
3015
+ *
3016
+ * **Details**
3017
+ *
3018
+ * Negative edge weights are allowed. Returns `Option.none()` when the target is
3019
+ * unreachable or when a negative cycle affects the path to the target. Throws a
3020
+ * `GraphError` when either endpoint is missing.
2779
3021
  *
2780
- * Bellman-Ford algorithm can handle negative edge weights and detects negative cycles.
2781
- * It has O(VE) time complexity, slower than Dijkstra's but more versatile.
2782
- * Returns Option.none() if a negative cycle is detected that affects the path.
3022
+ * **Example** (Finding shortest paths with Bellman-Ford)
2783
3023
  *
2784
- * @example
2785
3024
  * ```ts
2786
3025
  * import { Graph } from "effect"
2787
3026
  *
@@ -2806,18 +3045,22 @@ export interface BellmanFordConfig<E> {
2806
3045
  * }
2807
3046
  * ```
2808
3047
  *
2809
- * @since 4.0.0
2810
3048
  * @category algorithms
3049
+ * @since 4.0.0
2811
3050
  */
2812
3051
  export declare const bellmanFord: {
2813
3052
  /**
2814
- * Find the shortest path between two nodes using Bellman-Ford algorithm.
3053
+ * Finds the shortest path from the configured source node to the target node
3054
+ * using the Bellman-Ford algorithm.
3055
+ *
3056
+ * **Details**
3057
+ *
3058
+ * Negative edge weights are allowed. Returns `Option.none()` when the target is
3059
+ * unreachable or when a negative cycle affects the path to the target. Throws a
3060
+ * `GraphError` when either endpoint is missing.
2815
3061
  *
2816
- * Bellman-Ford algorithm can handle negative edge weights and detects negative cycles.
2817
- * It has O(VE) time complexity, slower than Dijkstra's but more versatile.
2818
- * Returns Option.none() if a negative cycle is detected that affects the path.
3062
+ * **Example** (Finding shortest paths with Bellman-Ford)
2819
3063
  *
2820
- * @example
2821
3064
  * ```ts
2822
3065
  * import { Graph } from "effect"
2823
3066
  *
@@ -2842,18 +3085,22 @@ export declare const bellmanFord: {
2842
3085
  * }
2843
3086
  * ```
2844
3087
  *
2845
- * @since 4.0.0
2846
3088
  * @category algorithms
3089
+ * @since 4.0.0
2847
3090
  */
2848
3091
  <E>(config: BellmanFordConfig<E>): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<PathResult<E>>;
2849
3092
  /**
2850
- * Find the shortest path between two nodes using Bellman-Ford algorithm.
3093
+ * Finds the shortest path from the configured source node to the target node
3094
+ * using the Bellman-Ford algorithm.
3095
+ *
3096
+ * **Details**
2851
3097
  *
2852
- * Bellman-Ford algorithm can handle negative edge weights and detects negative cycles.
2853
- * It has O(VE) time complexity, slower than Dijkstra's but more versatile.
2854
- * Returns Option.none() if a negative cycle is detected that affects the path.
3098
+ * Negative edge weights are allowed. Returns `Option.none()` when the target is
3099
+ * unreachable or when a negative cycle affects the path to the target. Throws a
3100
+ * `GraphError` when either endpoint is missing.
3101
+ *
3102
+ * **Example** (Finding shortest paths with Bellman-Ford)
2855
3103
  *
2856
- * @example
2857
3104
  * ```ts
2858
3105
  * import { Graph } from "effect"
2859
3106
  *
@@ -2878,19 +3125,22 @@ export declare const bellmanFord: {
2878
3125
  * }
2879
3126
  * ```
2880
3127
  *
2881
- * @since 4.0.0
2882
3128
  * @category algorithms
3129
+ * @since 4.0.0
2883
3130
  */
2884
3131
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config: BellmanFordConfig<E>): Option.Option<PathResult<E>>;
2885
3132
  };
2886
3133
  /**
2887
- * Concrete class for iterables that produce [NodeIndex, NodeData] tuples.
3134
+ * Iterable wrapper used by graph traversal and listing APIs.
3135
+ *
3136
+ * **Details**
2888
3137
  *
2889
- * This class provides a common abstraction for all iterables that return node data,
2890
- * including traversal iterators (DFS, BFS, etc.) and element iterators (nodes, externals).
2891
- * It uses a mapEntry function pattern for flexible iteration and transformation.
3138
+ * A `Walker` yields `[index, data]` pairs lazily and can be viewed as just the
3139
+ * indices, just the values, or mapped entries with `indices`, `values`,
3140
+ * `entries`, and `visit`.
3141
+ *
3142
+ * **Example** (Working with node walkers)
2892
3143
  *
2893
- * @example
2894
3144
  * ```ts
2895
3145
  * import { Graph } from "effect"
2896
3146
  *
@@ -2914,8 +3164,8 @@ export declare const bellmanFord: {
2914
3164
  * const nodeEntries = Array.from(Graph.entries(allNodes)) // [[0, "A"], [1, "B"]]
2915
3165
  * ```
2916
3166
  *
2917
- * @since 4.0.0
2918
3167
  * @category models
3168
+ * @since 4.0.0
2919
3169
  */
2920
3170
  export declare class Walker<T, N> implements Iterable<[T, N]> {
2921
3171
  readonly [Symbol.iterator]: () => Iterator<[T, N]>;
@@ -2926,7 +3176,8 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
2926
3176
  * and returns an iterable of the mapped values. Skips elements that
2927
3177
  * no longer exist in the graph.
2928
3178
  *
2929
- * @example
3179
+ * **Example** (Visiting walker elements)
3180
+ *
2930
3181
  * ```ts
2931
3182
  * import { Graph } from "effect"
2932
3183
  *
@@ -2949,8 +3200,8 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
2949
3200
  * console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }]
2950
3201
  * ```
2951
3202
  *
2952
- * @since 4.0.0
2953
3203
  * @category iterators
3204
+ * @since 4.0.0
2954
3205
  */
2955
3206
  readonly visit: <U>(f: (index: T, data: N) => U) => Iterable<U>;
2956
3207
  constructor(
@@ -2961,7 +3212,8 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
2961
3212
  * and returns an iterable of the mapped values. Skips elements that
2962
3213
  * no longer exist in the graph.
2963
3214
  *
2964
- * @example
3215
+ * **Example** (Visiting walker elements)
3216
+ *
2965
3217
  * ```ts
2966
3218
  * import { Graph } from "effect"
2967
3219
  *
@@ -2984,8 +3236,8 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
2984
3236
  * console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }]
2985
3237
  * ```
2986
3238
  *
2987
- * @since 4.0.0
2988
3239
  * @category iterators
3240
+ * @since 4.0.0
2989
3241
  */
2990
3242
  visit: <U>(f: (index: T, data: N) => U) => Iterable<U>);
2991
3243
  }
@@ -2993,22 +3245,23 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
2993
3245
  * Type alias for node iteration using Walker.
2994
3246
  * NodeWalker is represented as Walker<NodeIndex, N>.
2995
3247
  *
2996
- * @since 4.0.0
2997
3248
  * @category models
3249
+ * @since 4.0.0
2998
3250
  */
2999
3251
  export type NodeWalker<N> = Walker<NodeIndex, N>;
3000
3252
  /**
3001
3253
  * Type alias for edge iteration using Walker.
3002
3254
  * EdgeWalker is represented as Walker<EdgeIndex, Edge<E>>.
3003
3255
  *
3004
- * @since 4.0.0
3005
3256
  * @category models
3257
+ * @since 4.0.0
3006
3258
  */
3007
3259
  export type EdgeWalker<E> = Walker<EdgeIndex, Edge<E>>;
3008
3260
  /**
3009
3261
  * Returns an iterator over the indices in the walker.
3010
3262
  *
3011
- * @example
3263
+ * **Example** (Iterating walker indices)
3264
+ *
3012
3265
  * ```ts
3013
3266
  * import { Graph } from "effect"
3014
3267
  *
@@ -3023,14 +3276,15 @@ export type EdgeWalker<E> = Walker<EdgeIndex, Edge<E>>;
3023
3276
  * console.log(indices) // [0, 1]
3024
3277
  * ```
3025
3278
  *
3026
- * @since 4.0.0
3027
3279
  * @category utilities
3280
+ * @since 4.0.0
3028
3281
  */
3029
3282
  export declare const indices: <T, N>(walker: Walker<T, N>) => Iterable<T>;
3030
3283
  /**
3031
3284
  * Returns an iterator over the values (data) in the walker.
3032
3285
  *
3033
- * @example
3286
+ * **Example** (Iterating walker values)
3287
+ *
3034
3288
  * ```ts
3035
3289
  * import { Graph } from "effect"
3036
3290
  *
@@ -3045,14 +3299,15 @@ export declare const indices: <T, N>(walker: Walker<T, N>) => Iterable<T>;
3045
3299
  * console.log(values) // ["A", "B"]
3046
3300
  * ```
3047
3301
  *
3048
- * @since 4.0.0
3049
3302
  * @category utilities
3303
+ * @since 4.0.0
3050
3304
  */
3051
3305
  export declare const values: <T, N>(walker: Walker<T, N>) => Iterable<N>;
3052
3306
  /**
3053
3307
  * Returns an iterator over [index, data] entries in the walker.
3054
3308
  *
3055
- * @example
3309
+ * **Example** (Iterating walker entries)
3310
+ *
3056
3311
  * ```ts
3057
3312
  * import { Graph } from "effect"
3058
3313
  *
@@ -3067,27 +3322,38 @@ export declare const values: <T, N>(walker: Walker<T, N>) => Iterable<N>;
3067
3322
  * console.log(entries) // [[0, "A"], [1, "B"]]
3068
3323
  * ```
3069
3324
  *
3070
- * @since 4.0.0
3071
3325
  * @category utilities
3326
+ * @since 4.0.0
3072
3327
  */
3073
3328
  export declare const entries: <T, N>(walker: Walker<T, N>) => Iterable<[T, N]>;
3074
3329
  /**
3075
- * Configuration options for search iterators.
3330
+ * Configuration for DFS, BFS, and postorder graph traversals.
3331
+ *
3332
+ * **Details**
3333
+ *
3334
+ * `start` supplies the node indices where traversal begins. If it is omitted,
3335
+ * the iterator is empty. `direction` chooses whether traversal follows
3336
+ * outgoing or incoming edges.
3076
3337
  *
3077
- * @since 4.0.0
3078
3338
  * @category models
3339
+ * @since 4.0.0
3079
3340
  */
3080
3341
  export interface SearchConfig {
3081
3342
  readonly start?: Array<NodeIndex>;
3082
3343
  readonly direction?: Direction;
3083
3344
  }
3084
3345
  /**
3085
- * Creates a new DFS iterator with optional configuration.
3346
+ * Creates a lazy depth-first traversal iterator from the configured start
3347
+ * nodes.
3086
3348
  *
3087
- * The iterator maintains a stack of nodes to visit and tracks discovered nodes.
3088
- * It provides lazy evaluation of the depth-first search.
3349
+ * **Details**
3350
+ *
3351
+ * If no start nodes are supplied, the iterator is empty. The `direction` option
3352
+ * chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
3353
+ * if any configured start node does not exist.
3354
+ *
3355
+ * **Example** (Traversing depth-first)
3089
3356
  *
3090
- * @example
3091
3357
  * ```ts
3092
3358
  * import { Graph } from "effect"
3093
3359
  *
@@ -3110,17 +3376,22 @@ export interface SearchConfig {
3110
3376
  * // Can be used programmatically
3111
3377
  * ```
3112
3378
  *
3113
- * @since 4.0.0
3114
3379
  * @category iterators
3380
+ * @since 4.0.0
3115
3381
  */
3116
3382
  export declare const dfs: {
3117
3383
  /**
3118
- * Creates a new DFS iterator with optional configuration.
3384
+ * Creates a lazy depth-first traversal iterator from the configured start
3385
+ * nodes.
3386
+ *
3387
+ * **Details**
3119
3388
  *
3120
- * The iterator maintains a stack of nodes to visit and tracks discovered nodes.
3121
- * It provides lazy evaluation of the depth-first search.
3389
+ * If no start nodes are supplied, the iterator is empty. The `direction` option
3390
+ * chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
3391
+ * if any configured start node does not exist.
3392
+ *
3393
+ * **Example** (Traversing depth-first)
3122
3394
  *
3123
- * @example
3124
3395
  * ```ts
3125
3396
  * import { Graph } from "effect"
3126
3397
  *
@@ -3143,17 +3414,22 @@ export declare const dfs: {
3143
3414
  * // Can be used programmatically
3144
3415
  * ```
3145
3416
  *
3146
- * @since 4.0.0
3147
3417
  * @category iterators
3418
+ * @since 4.0.0
3148
3419
  */
3149
3420
  (config?: SearchConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
3150
3421
  /**
3151
- * Creates a new DFS iterator with optional configuration.
3422
+ * Creates a lazy depth-first traversal iterator from the configured start
3423
+ * nodes.
3424
+ *
3425
+ * **Details**
3426
+ *
3427
+ * If no start nodes are supplied, the iterator is empty. The `direction` option
3428
+ * chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
3429
+ * if any configured start node does not exist.
3152
3430
  *
3153
- * The iterator maintains a stack of nodes to visit and tracks discovered nodes.
3154
- * It provides lazy evaluation of the depth-first search.
3431
+ * **Example** (Traversing depth-first)
3155
3432
  *
3156
- * @example
3157
3433
  * ```ts
3158
3434
  * import { Graph } from "effect"
3159
3435
  *
@@ -3176,18 +3452,23 @@ export declare const dfs: {
3176
3452
  * // Can be used programmatically
3177
3453
  * ```
3178
3454
  *
3179
- * @since 4.0.0
3180
3455
  * @category iterators
3456
+ * @since 4.0.0
3181
3457
  */
3182
3458
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: SearchConfig): NodeWalker<N>;
3183
3459
  };
3184
3460
  /**
3185
- * Creates a new BFS iterator with optional configuration.
3461
+ * Creates a lazy breadth-first traversal iterator from the configured start
3462
+ * nodes.
3463
+ *
3464
+ * **Details**
3186
3465
  *
3187
- * The iterator maintains a queue of nodes to visit and tracks discovered nodes.
3188
- * It provides lazy evaluation of the breadth-first search.
3466
+ * If no start nodes are supplied, the iterator is empty. The `direction` option
3467
+ * chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
3468
+ * if any configured start node does not exist.
3469
+ *
3470
+ * **Example** (Traversing breadth-first)
3189
3471
  *
3190
- * @example
3191
3472
  * ```ts
3192
3473
  * import { Graph } from "effect"
3193
3474
  *
@@ -3210,17 +3491,22 @@ export declare const dfs: {
3210
3491
  * // Can be used programmatically
3211
3492
  * ```
3212
3493
  *
3213
- * @since 4.0.0
3214
3494
  * @category iterators
3495
+ * @since 4.0.0
3215
3496
  */
3216
3497
  export declare const bfs: {
3217
3498
  /**
3218
- * Creates a new BFS iterator with optional configuration.
3499
+ * Creates a lazy breadth-first traversal iterator from the configured start
3500
+ * nodes.
3219
3501
  *
3220
- * The iterator maintains a queue of nodes to visit and tracks discovered nodes.
3221
- * It provides lazy evaluation of the breadth-first search.
3502
+ * **Details**
3503
+ *
3504
+ * If no start nodes are supplied, the iterator is empty. The `direction` option
3505
+ * chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
3506
+ * if any configured start node does not exist.
3507
+ *
3508
+ * **Example** (Traversing breadth-first)
3222
3509
  *
3223
- * @example
3224
3510
  * ```ts
3225
3511
  * import { Graph } from "effect"
3226
3512
  *
@@ -3243,17 +3529,22 @@ export declare const bfs: {
3243
3529
  * // Can be used programmatically
3244
3530
  * ```
3245
3531
  *
3246
- * @since 4.0.0
3247
3532
  * @category iterators
3533
+ * @since 4.0.0
3248
3534
  */
3249
3535
  (config?: SearchConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
3250
3536
  /**
3251
- * Creates a new BFS iterator with optional configuration.
3537
+ * Creates a lazy breadth-first traversal iterator from the configured start
3538
+ * nodes.
3252
3539
  *
3253
- * The iterator maintains a queue of nodes to visit and tracks discovered nodes.
3254
- * It provides lazy evaluation of the breadth-first search.
3540
+ * **Details**
3541
+ *
3542
+ * If no start nodes are supplied, the iterator is empty. The `direction` option
3543
+ * chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
3544
+ * if any configured start node does not exist.
3545
+ *
3546
+ * **Example** (Traversing breadth-first)
3255
3547
  *
3256
- * @example
3257
3548
  * ```ts
3258
3549
  * import { Graph } from "effect"
3259
3550
  *
@@ -3276,16 +3567,22 @@ export declare const bfs: {
3276
3567
  * // Can be used programmatically
3277
3568
  * ```
3278
3569
  *
3279
- * @since 4.0.0
3280
3570
  * @category iterators
3571
+ * @since 4.0.0
3281
3572
  */
3282
3573
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: SearchConfig): NodeWalker<N>;
3283
3574
  };
3284
3575
  /**
3285
- * Configuration options for topological sort iterator.
3576
+ * Configuration for the topological sort iterator.
3577
+ *
3578
+ * **Details**
3579
+ *
3580
+ * `initials` optionally supplies the node indices used as initial queue
3581
+ * entries. When omitted, topological sorting starts from all nodes with zero
3582
+ * in-degree.
3286
3583
  *
3287
- * @since 4.0.0
3288
3584
  * @category models
3585
+ * @since 4.0.0
3289
3586
  */
3290
3587
  export interface TopoConfig {
3291
3588
  readonly initials?: Array<NodeIndex>;
@@ -3296,7 +3593,8 @@ export interface TopoConfig {
3296
3593
  * The iterator uses Kahn's algorithm to lazily produce nodes in topological order.
3297
3594
  * Throws an error if the graph contains cycles.
3298
3595
  *
3299
- * @example
3596
+ * **Example** (Sorting topologically)
3597
+ *
3300
3598
  * ```ts
3301
3599
  * import { Graph } from "effect"
3302
3600
  *
@@ -3317,7 +3615,7 @@ export interface TopoConfig {
3317
3615
  * // With initial nodes
3318
3616
  * const topo2 = Graph.topo(graph, { initials: [0] })
3319
3617
  *
3320
- * // Throws error for cyclic graph
3618
+ * // Check before sorting a cyclic graph
3321
3619
  * const cyclicGraph = Graph.directed<string, number>((mutable) => {
3322
3620
  * const a = Graph.addNode(mutable, "A")
3323
3621
  * const b = Graph.addNode(mutable, "B")
@@ -3325,15 +3623,13 @@ export interface TopoConfig {
3325
3623
  * Graph.addEdge(mutable, b, a, 2) // Creates cycle
3326
3624
  * })
3327
3625
  *
3328
- * try {
3329
- * Graph.topo(cyclicGraph) // Throws: "Cannot perform topological sort on cyclic graph"
3330
- * } catch (error) {
3331
- * console.log((error as Error).message)
3626
+ * if (!Graph.isAcyclic(cyclicGraph)) {
3627
+ * console.log("cyclic graph") // cyclic graph
3332
3628
  * }
3333
3629
  * ```
3334
3630
  *
3335
- * @since 4.0.0
3336
3631
  * @category iterators
3632
+ * @since 4.0.0
3337
3633
  */
3338
3634
  export declare const topo: {
3339
3635
  /**
@@ -3342,7 +3638,8 @@ export declare const topo: {
3342
3638
  * The iterator uses Kahn's algorithm to lazily produce nodes in topological order.
3343
3639
  * Throws an error if the graph contains cycles.
3344
3640
  *
3345
- * @example
3641
+ * **Example** (Sorting topologically)
3642
+ *
3346
3643
  * ```ts
3347
3644
  * import { Graph } from "effect"
3348
3645
  *
@@ -3363,7 +3660,7 @@ export declare const topo: {
3363
3660
  * // With initial nodes
3364
3661
  * const topo2 = Graph.topo(graph, { initials: [0] })
3365
3662
  *
3366
- * // Throws error for cyclic graph
3663
+ * // Check before sorting a cyclic graph
3367
3664
  * const cyclicGraph = Graph.directed<string, number>((mutable) => {
3368
3665
  * const a = Graph.addNode(mutable, "A")
3369
3666
  * const b = Graph.addNode(mutable, "B")
@@ -3371,15 +3668,13 @@ export declare const topo: {
3371
3668
  * Graph.addEdge(mutable, b, a, 2) // Creates cycle
3372
3669
  * })
3373
3670
  *
3374
- * try {
3375
- * Graph.topo(cyclicGraph) // Throws: "Cannot perform topological sort on cyclic graph"
3376
- * } catch (error) {
3377
- * console.log((error as Error).message)
3671
+ * if (!Graph.isAcyclic(cyclicGraph)) {
3672
+ * console.log("cyclic graph") // cyclic graph
3378
3673
  * }
3379
3674
  * ```
3380
3675
  *
3381
- * @since 4.0.0
3382
3676
  * @category iterators
3677
+ * @since 4.0.0
3383
3678
  */
3384
3679
  (config?: TopoConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
3385
3680
  /**
@@ -3388,7 +3683,8 @@ export declare const topo: {
3388
3683
  * The iterator uses Kahn's algorithm to lazily produce nodes in topological order.
3389
3684
  * Throws an error if the graph contains cycles.
3390
3685
  *
3391
- * @example
3686
+ * **Example** (Sorting topologically)
3687
+ *
3392
3688
  * ```ts
3393
3689
  * import { Graph } from "effect"
3394
3690
  *
@@ -3409,7 +3705,7 @@ export declare const topo: {
3409
3705
  * // With initial nodes
3410
3706
  * const topo2 = Graph.topo(graph, { initials: [0] })
3411
3707
  *
3412
- * // Throws error for cyclic graph
3708
+ * // Check before sorting a cyclic graph
3413
3709
  * const cyclicGraph = Graph.directed<string, number>((mutable) => {
3414
3710
  * const a = Graph.addNode(mutable, "A")
3415
3711
  * const b = Graph.addNode(mutable, "B")
@@ -3417,26 +3713,28 @@ export declare const topo: {
3417
3713
  * Graph.addEdge(mutable, b, a, 2) // Creates cycle
3418
3714
  * })
3419
3715
  *
3420
- * try {
3421
- * Graph.topo(cyclicGraph) // Throws: "Cannot perform topological sort on cyclic graph"
3422
- * } catch (error) {
3423
- * console.log((error as Error).message)
3716
+ * if (!Graph.isAcyclic(cyclicGraph)) {
3717
+ * console.log("cyclic graph") // cyclic graph
3424
3718
  * }
3425
3719
  * ```
3426
3720
  *
3427
- * @since 4.0.0
3428
3721
  * @category iterators
3722
+ * @since 4.0.0
3429
3723
  */
3430
3724
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: TopoConfig): NodeWalker<N>;
3431
3725
  };
3432
3726
  /**
3433
- * Creates a new DFS postorder iterator with optional configuration.
3727
+ * Creates a lazy depth-first postorder traversal iterator from the configured
3728
+ * start nodes.
3729
+ *
3730
+ * **Details**
3731
+ *
3732
+ * Nodes are emitted after their reachable descendants have been processed. If
3733
+ * no start nodes are supplied, the iterator is empty. The `direction` option
3734
+ * chooses whether to follow outgoing or incoming edges.
3434
3735
  *
3435
- * The iterator maintains a stack with visit state tracking and emits nodes
3436
- * in postorder (after all descendants have been processed). Essential for
3437
- * dependency resolution and tree destruction algorithms.
3736
+ * **Example** (Traversing in postorder)
3438
3737
  *
3439
- * @example
3440
3738
  * ```ts
3441
3739
  * import { Graph } from "effect"
3442
3740
  *
@@ -3455,18 +3753,22 @@ export declare const topo: {
3455
3753
  * }
3456
3754
  * ```
3457
3755
  *
3458
- * @since 4.0.0
3459
3756
  * @category iterators
3757
+ * @since 4.0.0
3460
3758
  */
3461
3759
  export declare const dfsPostOrder: {
3462
3760
  /**
3463
- * Creates a new DFS postorder iterator with optional configuration.
3761
+ * Creates a lazy depth-first postorder traversal iterator from the configured
3762
+ * start nodes.
3763
+ *
3764
+ * **Details**
3464
3765
  *
3465
- * The iterator maintains a stack with visit state tracking and emits nodes
3466
- * in postorder (after all descendants have been processed). Essential for
3467
- * dependency resolution and tree destruction algorithms.
3766
+ * Nodes are emitted after their reachable descendants have been processed. If
3767
+ * no start nodes are supplied, the iterator is empty. The `direction` option
3768
+ * chooses whether to follow outgoing or incoming edges.
3769
+ *
3770
+ * **Example** (Traversing in postorder)
3468
3771
  *
3469
- * @example
3470
3772
  * ```ts
3471
3773
  * import { Graph } from "effect"
3472
3774
  *
@@ -3485,18 +3787,22 @@ export declare const dfsPostOrder: {
3485
3787
  * }
3486
3788
  * ```
3487
3789
  *
3488
- * @since 4.0.0
3489
3790
  * @category iterators
3791
+ * @since 4.0.0
3490
3792
  */
3491
3793
  (config?: SearchConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
3492
3794
  /**
3493
- * Creates a new DFS postorder iterator with optional configuration.
3795
+ * Creates a lazy depth-first postorder traversal iterator from the configured
3796
+ * start nodes.
3797
+ *
3798
+ * **Details**
3494
3799
  *
3495
- * The iterator maintains a stack with visit state tracking and emits nodes
3496
- * in postorder (after all descendants have been processed). Essential for
3497
- * dependency resolution and tree destruction algorithms.
3800
+ * Nodes are emitted after their reachable descendants have been processed. If
3801
+ * no start nodes are supplied, the iterator is empty. The `direction` option
3802
+ * chooses whether to follow outgoing or incoming edges.
3803
+ *
3804
+ * **Example** (Traversing in postorder)
3498
3805
  *
3499
- * @example
3500
3806
  * ```ts
3501
3807
  * import { Graph } from "effect"
3502
3808
  *
@@ -3515,8 +3821,8 @@ export declare const dfsPostOrder: {
3515
3821
  * }
3516
3822
  * ```
3517
3823
  *
3518
- * @since 4.0.0
3519
3824
  * @category iterators
3825
+ * @since 4.0.0
3520
3826
  */
3521
3827
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: SearchConfig): NodeWalker<N>;
3522
3828
  };
@@ -3526,7 +3832,8 @@ export declare const dfsPostOrder: {
3526
3832
  * The iterator produces node indices in the order they were added to the graph.
3527
3833
  * This provides access to all nodes regardless of connectivity.
3528
3834
  *
3529
- * @example
3835
+ * **Example** (Iterating all nodes)
3836
+ *
3530
3837
  * ```ts
3531
3838
  * import { Graph } from "effect"
3532
3839
  *
@@ -3541,8 +3848,8 @@ export declare const dfsPostOrder: {
3541
3848
  * console.log(indices) // [0, 1, 2]
3542
3849
  * ```
3543
3850
  *
3544
- * @since 4.0.0
3545
3851
  * @category iterators
3852
+ * @since 4.0.0
3546
3853
  */
3547
3854
  export declare const nodes: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
3548
3855
  /**
@@ -3551,7 +3858,8 @@ export declare const nodes: <N, E, T extends Kind = "directed">(graph: Graph<N,
3551
3858
  * The iterator produces edge indices in the order they were added to the graph.
3552
3859
  * This provides access to all edges regardless of connectivity.
3553
3860
  *
3554
- * @example
3861
+ * **Example** (Iterating all edges)
3862
+ *
3555
3863
  * ```ts
3556
3864
  * import { Graph } from "effect"
3557
3865
  *
@@ -3567,15 +3875,21 @@ export declare const nodes: <N, E, T extends Kind = "directed">(graph: Graph<N,
3567
3875
  * console.log(indices) // [0, 1]
3568
3876
  * ```
3569
3877
  *
3570
- * @since 4.0.0
3571
3878
  * @category iterators
3879
+ * @since 4.0.0
3572
3880
  */
3573
3881
  export declare const edges: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => EdgeWalker<E>;
3574
3882
  /**
3575
- * Configuration for externals iterator.
3883
+ * Configuration for selecting external nodes.
3884
+ *
3885
+ * **Details**
3886
+ *
3887
+ * `direction` chooses which missing edge direction makes a node external:
3888
+ * `"outgoing"` selects nodes with no outgoing edges, and `"incoming"` selects
3889
+ * nodes with no incoming edges.
3576
3890
  *
3577
- * @since 4.0.0
3578
3891
  * @category models
3892
+ * @since 4.0.0
3579
3893
  */
3580
3894
  export interface ExternalsConfig {
3581
3895
  readonly direction?: Direction;
@@ -3587,7 +3901,8 @@ export interface ExternalsConfig {
3587
3901
  * no incoming edges (direction="incoming"). These are useful for finding
3588
3902
  * sources, sinks, or isolated nodes.
3589
3903
  *
3590
- * @example
3904
+ * **Example** (Iterating external nodes)
3905
+ *
3591
3906
  * ```ts
3592
3907
  * import { Graph } from "effect"
3593
3908
  *
@@ -3614,8 +3929,8 @@ export interface ExternalsConfig {
3614
3929
  * console.log(sources) // [0, 3]
3615
3930
  * ```
3616
3931
  *
3617
- * @since 4.0.0
3618
3932
  * @category iterators
3933
+ * @since 4.0.0
3619
3934
  */
3620
3935
  export declare const externals: {
3621
3936
  /**
@@ -3625,7 +3940,8 @@ export declare const externals: {
3625
3940
  * no incoming edges (direction="incoming"). These are useful for finding
3626
3941
  * sources, sinks, or isolated nodes.
3627
3942
  *
3628
- * @example
3943
+ * **Example** (Iterating external nodes)
3944
+ *
3629
3945
  * ```ts
3630
3946
  * import { Graph } from "effect"
3631
3947
  *
@@ -3652,8 +3968,8 @@ export declare const externals: {
3652
3968
  * console.log(sources) // [0, 3]
3653
3969
  * ```
3654
3970
  *
3655
- * @since 4.0.0
3656
3971
  * @category iterators
3972
+ * @since 4.0.0
3657
3973
  */
3658
3974
  (config?: ExternalsConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
3659
3975
  /**
@@ -3663,7 +3979,8 @@ export declare const externals: {
3663
3979
  * no incoming edges (direction="incoming"). These are useful for finding
3664
3980
  * sources, sinks, or isolated nodes.
3665
3981
  *
3666
- * @example
3982
+ * **Example** (Iterating external nodes)
3983
+ *
3667
3984
  * ```ts
3668
3985
  * import { Graph } from "effect"
3669
3986
  *
@@ -3690,8 +4007,8 @@ export declare const externals: {
3690
4007
  * console.log(sources) // [0, 3]
3691
4008
  * ```
3692
4009
  *
3693
- * @since 4.0.0
3694
4010
  * @category iterators
4011
+ * @since 4.0.0
3695
4012
  */
3696
4013
  <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: ExternalsConfig): NodeWalker<N>;
3697
4014
  };