effect 4.0.0-beta.5 → 4.0.0-beta.51

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 (1512) hide show
  1. package/dist/Array.d.ts +213 -385
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +149 -102
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +82 -45
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +105 -52
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +39 -32
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +36 -33
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Brand.d.ts +3 -5
  14. package/dist/Brand.d.ts.map +1 -1
  15. package/dist/Brand.js +1 -1
  16. package/dist/Brand.js.map +1 -1
  17. package/dist/Cache.d.ts +14 -45
  18. package/dist/Cache.d.ts.map +1 -1
  19. package/dist/Cache.js +21 -47
  20. package/dist/Cache.js.map +1 -1
  21. package/dist/Cause.d.ts +54 -23
  22. package/dist/Cause.d.ts.map +1 -1
  23. package/dist/Cause.js +108 -10
  24. package/dist/Cause.js.map +1 -1
  25. package/dist/Channel.d.ts +166 -48
  26. package/dist/Channel.d.ts.map +1 -1
  27. package/dist/Channel.js +182 -91
  28. package/dist/Channel.js.map +1 -1
  29. package/dist/Chunk.d.ts +112 -304
  30. package/dist/Chunk.d.ts.map +1 -1
  31. package/dist/Chunk.js +56 -88
  32. package/dist/Chunk.js.map +1 -1
  33. package/dist/Clock.d.ts +2 -2
  34. package/dist/Clock.d.ts.map +1 -1
  35. package/dist/Clock.js.map +1 -1
  36. package/dist/Combiner.d.ts +280 -13
  37. package/dist/Combiner.d.ts.map +1 -1
  38. package/dist/Combiner.js +198 -7
  39. package/dist/Combiner.js.map +1 -1
  40. package/dist/Config.d.ts +171 -11
  41. package/dist/Config.d.ts.map +1 -1
  42. package/dist/Config.js +69 -11
  43. package/dist/Config.js.map +1 -1
  44. package/dist/ConfigProvider.d.ts +6 -6
  45. package/dist/ConfigProvider.d.ts.map +1 -1
  46. package/dist/ConfigProvider.js +5 -5
  47. package/dist/ConfigProvider.js.map +1 -1
  48. package/dist/Console.d.ts +2 -2
  49. package/dist/Console.d.ts.map +1 -1
  50. package/dist/Console.js.map +1 -1
  51. package/dist/Context.d.ts +1150 -0
  52. package/dist/Context.d.ts.map +1 -0
  53. package/dist/{ServiceMap.js → Context.js} +181 -165
  54. package/dist/Context.js.map +1 -0
  55. package/dist/Cron.d.ts +11 -7
  56. package/dist/Cron.d.ts.map +1 -1
  57. package/dist/Cron.js +120 -63
  58. package/dist/Cron.js.map +1 -1
  59. package/dist/Data.d.ts +535 -366
  60. package/dist/Data.d.ts.map +1 -1
  61. package/dist/Data.js +132 -79
  62. package/dist/Data.js.map +1 -1
  63. package/dist/DateTime.d.ts +74 -255
  64. package/dist/DateTime.d.ts.map +1 -1
  65. package/dist/DateTime.js +17 -62
  66. package/dist/DateTime.js.map +1 -1
  67. package/dist/Deferred.d.ts +12 -5
  68. package/dist/Deferred.d.ts.map +1 -1
  69. package/dist/Deferred.js +13 -5
  70. package/dist/Deferred.js.map +1 -1
  71. package/dist/Duration.d.ts +62 -32
  72. package/dist/Duration.d.ts.map +1 -1
  73. package/dist/Duration.js +109 -79
  74. package/dist/Duration.js.map +1 -1
  75. package/dist/Effect.d.ts +1377 -1147
  76. package/dist/Effect.d.ts.map +1 -1
  77. package/dist/Effect.js +465 -446
  78. package/dist/Effect.js.map +1 -1
  79. package/dist/Encoding.d.ts +194 -0
  80. package/dist/Encoding.d.ts.map +1 -0
  81. package/dist/Encoding.js +352 -0
  82. package/dist/Encoding.js.map +1 -0
  83. package/dist/Equal.d.ts +276 -109
  84. package/dist/Equal.d.ts.map +1 -1
  85. package/dist/Equal.js +140 -48
  86. package/dist/Equal.js.map +1 -1
  87. package/dist/Equivalence.d.ts +60 -3
  88. package/dist/Equivalence.d.ts.map +1 -1
  89. package/dist/Equivalence.js +70 -13
  90. package/dist/Equivalence.js.map +1 -1
  91. package/dist/ErrorReporter.d.ts +374 -0
  92. package/dist/ErrorReporter.d.ts.map +1 -0
  93. package/dist/ErrorReporter.js +245 -0
  94. package/dist/ErrorReporter.js.map +1 -0
  95. package/dist/ExecutionPlan.d.ts +6 -6
  96. package/dist/ExecutionPlan.d.ts.map +1 -1
  97. package/dist/ExecutionPlan.js +4 -4
  98. package/dist/ExecutionPlan.js.map +1 -1
  99. package/dist/Exit.d.ts +24 -12
  100. package/dist/Exit.d.ts.map +1 -1
  101. package/dist/Exit.js +8 -4
  102. package/dist/Exit.js.map +1 -1
  103. package/dist/Fiber.d.ts +10 -8
  104. package/dist/Fiber.d.ts.map +1 -1
  105. package/dist/Fiber.js.map +1 -1
  106. package/dist/FiberHandle.d.ts +11 -10
  107. package/dist/FiberHandle.d.ts.map +1 -1
  108. package/dist/FiberHandle.js +12 -11
  109. package/dist/FiberHandle.js.map +1 -1
  110. package/dist/FiberMap.d.ts +22 -21
  111. package/dist/FiberMap.d.ts.map +1 -1
  112. package/dist/FiberMap.js +10 -10
  113. package/dist/FiberMap.js.map +1 -1
  114. package/dist/FiberSet.d.ts +2 -2
  115. package/dist/FiberSet.d.ts.map +1 -1
  116. package/dist/FiberSet.js +4 -4
  117. package/dist/FiberSet.js.map +1 -1
  118. package/dist/FileSystem.d.ts +20 -19
  119. package/dist/FileSystem.d.ts.map +1 -1
  120. package/dist/FileSystem.js +17 -13
  121. package/dist/FileSystem.js.map +1 -1
  122. package/dist/Filter.d.ts +4 -37
  123. package/dist/Filter.d.ts.map +1 -1
  124. package/dist/Filter.js +0 -13
  125. package/dist/Filter.js.map +1 -1
  126. package/dist/Formatter.d.ts +131 -47
  127. package/dist/Formatter.d.ts.map +1 -1
  128. package/dist/Formatter.js +229 -51
  129. package/dist/Formatter.js.map +1 -1
  130. package/dist/Function.d.ts +1 -9
  131. package/dist/Function.d.ts.map +1 -1
  132. package/dist/Function.js +2 -10
  133. package/dist/Function.js.map +1 -1
  134. package/dist/Graph.d.ts +65 -65
  135. package/dist/Graph.d.ts.map +1 -1
  136. package/dist/Graph.js +60 -62
  137. package/dist/Graph.js.map +1 -1
  138. package/dist/Hash.js +1 -1
  139. package/dist/Hash.js.map +1 -1
  140. package/dist/HashMap.d.ts +26 -19
  141. package/dist/HashMap.d.ts.map +1 -1
  142. package/dist/HashMap.js +7 -5
  143. package/dist/HashMap.js.map +1 -1
  144. package/dist/Iterable.d.ts +50 -50
  145. package/dist/Iterable.d.ts.map +1 -1
  146. package/dist/Iterable.js +106 -34
  147. package/dist/Iterable.js.map +1 -1
  148. package/dist/JsonSchema.d.ts +299 -10
  149. package/dist/JsonSchema.d.ts.map +1 -1
  150. package/dist/JsonSchema.js +323 -4
  151. package/dist/JsonSchema.js.map +1 -1
  152. package/dist/Latch.d.ts +175 -0
  153. package/dist/Latch.d.ts.map +1 -0
  154. package/dist/Latch.js +130 -0
  155. package/dist/Latch.js.map +1 -0
  156. package/dist/Layer.d.ts +599 -379
  157. package/dist/Layer.d.ts.map +1 -1
  158. package/dist/Layer.js +249 -180
  159. package/dist/Layer.js.map +1 -1
  160. package/dist/LayerMap.d.ts +27 -26
  161. package/dist/LayerMap.d.ts.map +1 -1
  162. package/dist/LayerMap.js +21 -18
  163. package/dist/LayerMap.js.map +1 -1
  164. package/dist/LogLevel.d.ts +32 -0
  165. package/dist/LogLevel.d.ts.map +1 -1
  166. package/dist/LogLevel.js +28 -100
  167. package/dist/LogLevel.js.map +1 -1
  168. package/dist/Logger.d.ts +31 -97
  169. package/dist/Logger.d.ts.map +1 -1
  170. package/dist/Logger.js +2 -3
  171. package/dist/Logger.js.map +1 -1
  172. package/dist/ManagedRuntime.d.ts +8 -8
  173. package/dist/ManagedRuntime.d.ts.map +1 -1
  174. package/dist/ManagedRuntime.js +34 -25
  175. package/dist/ManagedRuntime.js.map +1 -1
  176. package/dist/Metric.d.ts +23 -25
  177. package/dist/Metric.d.ts.map +1 -1
  178. package/dist/Metric.js +24 -26
  179. package/dist/Metric.js.map +1 -1
  180. package/dist/MutableHashMap.d.ts +7 -0
  181. package/dist/MutableHashMap.d.ts.map +1 -1
  182. package/dist/MutableHashMap.js +8 -0
  183. package/dist/MutableHashMap.js.map +1 -1
  184. package/dist/MutableHashSet.d.ts +7 -0
  185. package/dist/MutableHashSet.d.ts.map +1 -1
  186. package/dist/MutableHashSet.js +8 -0
  187. package/dist/MutableHashSet.js.map +1 -1
  188. package/dist/MutableList.d.ts.map +1 -1
  189. package/dist/MutableList.js +3 -0
  190. package/dist/MutableList.js.map +1 -1
  191. package/dist/Newtype.d.ts +291 -0
  192. package/dist/Newtype.d.ts.map +1 -0
  193. package/dist/Newtype.js +161 -0
  194. package/dist/Newtype.js.map +1 -0
  195. package/dist/Number.d.ts +74 -18
  196. package/dist/Number.d.ts.map +1 -1
  197. package/dist/Number.js +46 -18
  198. package/dist/Number.js.map +1 -1
  199. package/dist/Optic.d.ts +947 -18
  200. package/dist/Optic.d.ts.map +1 -1
  201. package/dist/Optic.js +454 -5
  202. package/dist/Optic.js.map +1 -1
  203. package/dist/Option.d.ts +25 -16
  204. package/dist/Option.d.ts.map +1 -1
  205. package/dist/Option.js +15 -9
  206. package/dist/Option.js.map +1 -1
  207. package/dist/Order.d.ts +6 -1
  208. package/dist/Order.d.ts.map +1 -1
  209. package/dist/Order.js +19 -14
  210. package/dist/Order.js.map +1 -1
  211. package/dist/PartitionedSemaphore.d.ts +146 -15
  212. package/dist/PartitionedSemaphore.d.ts.map +1 -1
  213. package/dist/PartitionedSemaphore.js +174 -61
  214. package/dist/PartitionedSemaphore.js.map +1 -1
  215. package/dist/Path.d.ts +2 -2
  216. package/dist/Path.d.ts.map +1 -1
  217. package/dist/Path.js +2 -2
  218. package/dist/Path.js.map +1 -1
  219. package/dist/Pipeable.d.ts +17 -0
  220. package/dist/Pipeable.d.ts.map +1 -1
  221. package/dist/Pipeable.js +19 -1
  222. package/dist/Pipeable.js.map +1 -1
  223. package/dist/PlatformError.d.ts +2 -2
  224. package/dist/Pool.d.ts +6 -4
  225. package/dist/Pool.d.ts.map +1 -1
  226. package/dist/Pool.js +11 -9
  227. package/dist/Pool.js.map +1 -1
  228. package/dist/PubSub.d.ts +8 -6
  229. package/dist/PubSub.d.ts.map +1 -1
  230. package/dist/PubSub.js +18 -10
  231. package/dist/PubSub.js.map +1 -1
  232. package/dist/Pull.d.ts.map +1 -1
  233. package/dist/Pull.js +1 -1
  234. package/dist/Pull.js.map +1 -1
  235. package/dist/Queue.d.ts +9 -6
  236. package/dist/Queue.d.ts.map +1 -1
  237. package/dist/Queue.js +7 -5
  238. package/dist/Queue.js.map +1 -1
  239. package/dist/Random.d.ts +36 -2
  240. package/dist/Random.d.ts.map +1 -1
  241. package/dist/Random.js +46 -35
  242. package/dist/Random.js.map +1 -1
  243. package/dist/RcMap.d.ts +4 -4
  244. package/dist/RcMap.d.ts.map +1 -1
  245. package/dist/RcMap.js +13 -13
  246. package/dist/RcMap.js.map +1 -1
  247. package/dist/RcRef.d.ts +1 -1
  248. package/dist/RcRef.d.ts.map +1 -1
  249. package/dist/Record.d.ts +63 -160
  250. package/dist/Record.d.ts.map +1 -1
  251. package/dist/Record.js +37 -56
  252. package/dist/Record.js.map +1 -1
  253. package/dist/Redactable.d.ts +139 -62
  254. package/dist/Redactable.d.ts.map +1 -1
  255. package/dist/Redactable.js +59 -55
  256. package/dist/Redactable.js.map +1 -1
  257. package/dist/Reducer.d.ts +166 -7
  258. package/dist/Reducer.d.ts.map +1 -1
  259. package/dist/Reducer.js +135 -1
  260. package/dist/Reducer.js.map +1 -1
  261. package/dist/References.d.ts +257 -229
  262. package/dist/References.d.ts.map +1 -1
  263. package/dist/References.js +240 -259
  264. package/dist/References.js.map +1 -1
  265. package/dist/Request.d.ts +6 -6
  266. package/dist/Request.d.ts.map +1 -1
  267. package/dist/Request.js +2 -1
  268. package/dist/Request.js.map +1 -1
  269. package/dist/RequestResolver.d.ts +25 -45
  270. package/dist/RequestResolver.d.ts.map +1 -1
  271. package/dist/RequestResolver.js +15 -36
  272. package/dist/RequestResolver.js.map +1 -1
  273. package/dist/Resource.d.ts +0 -3
  274. package/dist/Resource.d.ts.map +1 -1
  275. package/dist/Resource.js +5 -4
  276. package/dist/Resource.js.map +1 -1
  277. package/dist/Result.d.ts +1 -1
  278. package/dist/Result.d.ts.map +1 -1
  279. package/dist/Result.js +1 -2
  280. package/dist/Result.js.map +1 -1
  281. package/dist/Runtime.d.ts +66 -0
  282. package/dist/Runtime.d.ts.map +1 -1
  283. package/dist/Runtime.js +79 -6
  284. package/dist/Runtime.js.map +1 -1
  285. package/dist/Schedule.d.ts +176 -293
  286. package/dist/Schedule.d.ts.map +1 -1
  287. package/dist/Schedule.js +162 -136
  288. package/dist/Schedule.js.map +1 -1
  289. package/dist/Scheduler.d.ts +36 -125
  290. package/dist/Scheduler.d.ts.map +1 -1
  291. package/dist/Scheduler.js +37 -126
  292. package/dist/Scheduler.js.map +1 -1
  293. package/dist/Schema.d.ts +3326 -383
  294. package/dist/Schema.d.ts.map +1 -1
  295. package/dist/Schema.js +2315 -283
  296. package/dist/Schema.js.map +1 -1
  297. package/dist/SchemaAST.d.ts +13 -2
  298. package/dist/SchemaAST.d.ts.map +1 -1
  299. package/dist/SchemaAST.js +340 -257
  300. package/dist/SchemaAST.js.map +1 -1
  301. package/dist/SchemaGetter.d.ts +57 -15
  302. package/dist/SchemaGetter.d.ts.map +1 -1
  303. package/dist/SchemaGetter.js +85 -25
  304. package/dist/SchemaGetter.js.map +1 -1
  305. package/dist/SchemaIssue.d.ts.map +1 -1
  306. package/dist/SchemaIssue.js +29 -11
  307. package/dist/SchemaIssue.js.map +1 -1
  308. package/dist/SchemaParser.d.ts +44 -54
  309. package/dist/SchemaParser.d.ts.map +1 -1
  310. package/dist/SchemaParser.js +69 -4
  311. package/dist/SchemaParser.js.map +1 -1
  312. package/dist/SchemaRepresentation.d.ts +46 -45
  313. package/dist/SchemaRepresentation.d.ts.map +1 -1
  314. package/dist/SchemaRepresentation.js +65 -38
  315. package/dist/SchemaRepresentation.js.map +1 -1
  316. package/dist/SchemaTransformation.d.ts +252 -3
  317. package/dist/SchemaTransformation.d.ts.map +1 -1
  318. package/dist/SchemaTransformation.js +319 -13
  319. package/dist/SchemaTransformation.js.map +1 -1
  320. package/dist/Scope.d.ts +2 -2
  321. package/dist/Scope.d.ts.map +1 -1
  322. package/dist/Scope.js.map +1 -1
  323. package/dist/ScopedCache.d.ts +2 -2
  324. package/dist/ScopedCache.d.ts.map +1 -1
  325. package/dist/ScopedCache.js +5 -5
  326. package/dist/ScopedCache.js.map +1 -1
  327. package/dist/Semaphore.d.ts +307 -0
  328. package/dist/Semaphore.d.ts.map +1 -0
  329. package/dist/Semaphore.js +220 -0
  330. package/dist/Semaphore.js.map +1 -0
  331. package/dist/Sink.d.ts +22 -19
  332. package/dist/Sink.d.ts.map +1 -1
  333. package/dist/Sink.js +54 -7
  334. package/dist/Sink.js.map +1 -1
  335. package/dist/Stdio.d.ts +18 -6
  336. package/dist/Stdio.d.ts.map +1 -1
  337. package/dist/Stdio.js +20 -2
  338. package/dist/Stdio.js.map +1 -1
  339. package/dist/Stream.d.ts +465 -542
  340. package/dist/Stream.d.ts.map +1 -1
  341. package/dist/Stream.js +321 -144
  342. package/dist/Stream.js.map +1 -1
  343. package/dist/String.d.ts +114 -47
  344. package/dist/String.d.ts.map +1 -1
  345. package/dist/String.js +29 -47
  346. package/dist/String.js.map +1 -1
  347. package/dist/Struct.d.ts +23 -7
  348. package/dist/Struct.d.ts.map +1 -1
  349. package/dist/Struct.js +22 -0
  350. package/dist/Struct.js.map +1 -1
  351. package/dist/SubscriptionRef.d.ts +3 -3
  352. package/dist/SubscriptionRef.d.ts.map +1 -1
  353. package/dist/SubscriptionRef.js +85 -117
  354. package/dist/SubscriptionRef.js.map +1 -1
  355. package/dist/SynchronizedRef.d.ts +2 -1
  356. package/dist/SynchronizedRef.d.ts.map +1 -1
  357. package/dist/SynchronizedRef.js +2 -1
  358. package/dist/SynchronizedRef.js.map +1 -1
  359. package/dist/Terminal.d.ts +5 -4
  360. package/dist/Terminal.d.ts.map +1 -1
  361. package/dist/Terminal.js +2 -2
  362. package/dist/Terminal.js.map +1 -1
  363. package/dist/Tracer.d.ts +21 -20
  364. package/dist/Tracer.d.ts.map +1 -1
  365. package/dist/Tracer.js +13 -9
  366. package/dist/Tracer.js.map +1 -1
  367. package/dist/Trie.d.ts +44 -31
  368. package/dist/Trie.d.ts.map +1 -1
  369. package/dist/Trie.js +13 -9
  370. package/dist/Trie.js.map +1 -1
  371. package/dist/TxChunk.d.ts +4 -4
  372. package/dist/TxChunk.d.ts.map +1 -1
  373. package/dist/TxChunk.js +4 -4
  374. package/dist/TxChunk.js.map +1 -1
  375. package/dist/TxDeferred.d.ts +328 -0
  376. package/dist/TxDeferred.d.ts.map +1 -0
  377. package/dist/TxDeferred.js +197 -0
  378. package/dist/TxDeferred.js.map +1 -0
  379. package/dist/TxHashMap.d.ts +105 -86
  380. package/dist/TxHashMap.d.ts.map +1 -1
  381. package/dist/TxHashMap.js +51 -44
  382. package/dist/TxHashMap.js.map +1 -1
  383. package/dist/TxHashSet.d.ts +2 -2
  384. package/dist/TxHashSet.d.ts.map +1 -1
  385. package/dist/TxHashSet.js +16 -15
  386. package/dist/TxHashSet.js.map +1 -1
  387. package/dist/TxPriorityQueue.d.ts +609 -0
  388. package/dist/TxPriorityQueue.d.ts.map +1 -0
  389. package/dist/TxPriorityQueue.js +416 -0
  390. package/dist/TxPriorityQueue.js.map +1 -0
  391. package/dist/TxPubSub.d.ts +585 -0
  392. package/dist/TxPubSub.d.ts.map +1 -0
  393. package/dist/TxPubSub.js +521 -0
  394. package/dist/TxPubSub.js.map +1 -0
  395. package/dist/TxQueue.d.ts +1 -1
  396. package/dist/TxQueue.d.ts.map +1 -1
  397. package/dist/TxQueue.js +42 -57
  398. package/dist/TxQueue.js.map +1 -1
  399. package/dist/TxReentrantLock.d.ts +500 -0
  400. package/dist/TxReentrantLock.d.ts.map +1 -0
  401. package/dist/TxReentrantLock.js +481 -0
  402. package/dist/TxReentrantLock.js.map +1 -0
  403. package/dist/TxRef.d.ts +14 -20
  404. package/dist/TxRef.d.ts.map +1 -1
  405. package/dist/TxRef.js +8 -10
  406. package/dist/TxRef.js.map +1 -1
  407. package/dist/TxSemaphore.d.ts +162 -2
  408. package/dist/TxSemaphore.d.ts.map +1 -1
  409. package/dist/TxSemaphore.js +25 -10
  410. package/dist/TxSemaphore.js.map +1 -1
  411. package/dist/TxSubscriptionRef.d.ts +508 -0
  412. package/dist/TxSubscriptionRef.d.ts.map +1 -0
  413. package/dist/TxSubscriptionRef.js +293 -0
  414. package/dist/TxSubscriptionRef.js.map +1 -0
  415. package/dist/Types.d.ts +83 -17
  416. package/dist/Types.d.ts.map +1 -1
  417. package/dist/Unify.d.ts +8 -2
  418. package/dist/Unify.d.ts.map +1 -1
  419. package/dist/Unify.js.map +1 -1
  420. package/dist/Utils.d.ts +137 -65
  421. package/dist/Utils.d.ts.map +1 -1
  422. package/dist/Utils.js +38 -66
  423. package/dist/Utils.js.map +1 -1
  424. package/dist/index.d.ts +888 -71
  425. package/dist/index.d.ts.map +1 -1
  426. package/dist/index.js +888 -71
  427. package/dist/index.js.map +1 -1
  428. package/dist/internal/core.js +11 -3
  429. package/dist/internal/core.js.map +1 -1
  430. package/dist/internal/dateTime.js +77 -71
  431. package/dist/internal/dateTime.js.map +1 -1
  432. package/dist/internal/effect.js +485 -325
  433. package/dist/internal/effect.js.map +1 -1
  434. package/dist/internal/hashMap.js +7 -5
  435. package/dist/internal/hashMap.js.map +1 -1
  436. package/dist/internal/layer.js +3 -3
  437. package/dist/internal/layer.js.map +1 -1
  438. package/dist/internal/option.js +6 -0
  439. package/dist/internal/option.js.map +1 -1
  440. package/dist/internal/random.d.ts +2 -0
  441. package/dist/internal/random.d.ts.map +1 -0
  442. package/dist/internal/random.js +13 -0
  443. package/dist/internal/random.js.map +1 -0
  444. package/dist/internal/rcRef.js +11 -10
  445. package/dist/internal/rcRef.js.map +1 -1
  446. package/dist/internal/references.d.ts +2 -0
  447. package/dist/internal/references.d.ts.map +1 -0
  448. package/dist/internal/references.js +51 -0
  449. package/dist/internal/references.js.map +1 -0
  450. package/dist/internal/request.js +6 -6
  451. package/dist/internal/request.js.map +1 -1
  452. package/dist/internal/schedule.js +1 -1
  453. package/dist/internal/schedule.js.map +1 -1
  454. package/dist/internal/schema/annotations.js +2 -0
  455. package/dist/internal/schema/annotations.js.map +1 -1
  456. package/dist/internal/schema/representation.js +86 -107
  457. package/dist/internal/schema/representation.js.map +1 -1
  458. package/dist/internal/schema/schema.d.ts +10 -1
  459. package/dist/internal/schema/schema.d.ts.map +1 -1
  460. package/dist/internal/schema/schema.js +22 -1
  461. package/dist/internal/schema/schema.js.map +1 -1
  462. package/dist/internal/schema/to-codec.js +7 -10
  463. package/dist/internal/schema/to-codec.js.map +1 -1
  464. package/dist/internal/trie.js +8 -7
  465. package/dist/internal/trie.js.map +1 -1
  466. package/dist/testing/TestClock.d.ts +8 -7
  467. package/dist/testing/TestClock.d.ts.map +1 -1
  468. package/dist/testing/TestClock.js +6 -4
  469. package/dist/testing/TestClock.js.map +1 -1
  470. package/dist/testing/TestSchema.d.ts +267 -33
  471. package/dist/testing/TestSchema.d.ts.map +1 -1
  472. package/dist/testing/TestSchema.js +296 -23
  473. package/dist/testing/TestSchema.js.map +1 -1
  474. package/dist/testing/index.d.ts +64 -1
  475. package/dist/testing/index.d.ts.map +1 -1
  476. package/dist/testing/index.js +64 -1
  477. package/dist/testing/index.js.map +1 -1
  478. package/dist/unstable/ai/AiError.d.ts +155 -73
  479. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  480. package/dist/unstable/ai/AiError.js +29 -23
  481. package/dist/unstable/ai/AiError.js.map +1 -1
  482. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  483. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
  484. package/dist/unstable/ai/AnthropicStructuredOutput.js +9 -2
  485. package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
  486. package/dist/unstable/ai/Chat.d.ts +39 -11
  487. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  488. package/dist/unstable/ai/Chat.js +41 -47
  489. package/dist/unstable/ai/Chat.js.map +1 -1
  490. package/dist/unstable/ai/EmbeddingModel.d.ts +130 -0
  491. package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -0
  492. package/dist/unstable/ai/EmbeddingModel.js +127 -0
  493. package/dist/unstable/ai/EmbeddingModel.js.map +1 -0
  494. package/dist/unstable/ai/IdGenerator.d.ts +2 -2
  495. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  496. package/dist/unstable/ai/IdGenerator.js +2 -2
  497. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  498. package/dist/unstable/ai/LanguageModel.d.ts +119 -49
  499. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  500. package/dist/unstable/ai/LanguageModel.js +260 -61
  501. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  502. package/dist/unstable/ai/McpSchema.d.ts +236 -141
  503. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  504. package/dist/unstable/ai/McpSchema.js +71 -19
  505. package/dist/unstable/ai/McpSchema.js.map +1 -1
  506. package/dist/unstable/ai/McpServer.d.ts +68 -15
  507. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  508. package/dist/unstable/ai/McpServer.js +218 -73
  509. package/dist/unstable/ai/McpServer.js.map +1 -1
  510. package/dist/unstable/ai/Model.d.ts +27 -9
  511. package/dist/unstable/ai/Model.d.ts.map +1 -1
  512. package/dist/unstable/ai/Model.js +25 -9
  513. package/dist/unstable/ai/Model.js.map +1 -1
  514. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  515. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
  516. package/dist/unstable/ai/OpenAiStructuredOutput.js +9 -1
  517. package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
  518. package/dist/unstable/ai/Prompt.d.ts +20 -20
  519. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  520. package/dist/unstable/ai/Prompt.js +6 -9
  521. package/dist/unstable/ai/Prompt.js.map +1 -1
  522. package/dist/unstable/ai/Response.d.ts +27 -27
  523. package/dist/unstable/ai/Response.d.ts.map +1 -1
  524. package/dist/unstable/ai/Response.js +7 -8
  525. package/dist/unstable/ai/Response.js.map +1 -1
  526. package/dist/unstable/ai/ResponseIdTracker.d.ts +38 -0
  527. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -0
  528. package/dist/unstable/ai/ResponseIdTracker.js +68 -0
  529. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -0
  530. package/dist/unstable/ai/Telemetry.d.ts +35 -2
  531. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  532. package/dist/unstable/ai/Telemetry.js +2 -2
  533. package/dist/unstable/ai/Telemetry.js.map +1 -1
  534. package/dist/unstable/ai/Tokenizer.d.ts +2 -2
  535. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  536. package/dist/unstable/ai/Tokenizer.js +2 -2
  537. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  538. package/dist/unstable/ai/Tool.d.ts +46 -16
  539. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  540. package/dist/unstable/ai/Tool.js +68 -22
  541. package/dist/unstable/ai/Tool.js.map +1 -1
  542. package/dist/unstable/ai/Toolkit.d.ts +4 -4
  543. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  544. package/dist/unstable/ai/Toolkit.js +14 -21
  545. package/dist/unstable/ai/Toolkit.js.map +1 -1
  546. package/dist/unstable/ai/index.d.ts +22 -1
  547. package/dist/unstable/ai/index.d.ts.map +1 -1
  548. package/dist/unstable/ai/index.js +22 -1
  549. package/dist/unstable/ai/index.js.map +1 -1
  550. package/dist/unstable/ai/internal/codec-transformer.js +5 -7
  551. package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
  552. package/dist/unstable/cli/Argument.d.ts +4 -7
  553. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  554. package/dist/unstable/cli/Argument.js +1 -3
  555. package/dist/unstable/cli/Argument.js.map +1 -1
  556. package/dist/unstable/cli/CliError.d.ts +55 -67
  557. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  558. package/dist/unstable/cli/CliError.js +32 -57
  559. package/dist/unstable/cli/CliError.js.map +1 -1
  560. package/dist/unstable/cli/CliOutput.d.ts +5 -4
  561. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  562. package/dist/unstable/cli/CliOutput.js +67 -12
  563. package/dist/unstable/cli/CliOutput.js.map +1 -1
  564. package/dist/unstable/cli/Command.d.ts +372 -59
  565. package/dist/unstable/cli/Command.d.ts.map +1 -1
  566. package/dist/unstable/cli/Command.js +328 -66
  567. package/dist/unstable/cli/Command.js.map +1 -1
  568. package/dist/unstable/cli/Completions.d.ts +97 -0
  569. package/dist/unstable/cli/Completions.d.ts.map +1 -0
  570. package/dist/unstable/cli/Completions.js +25 -0
  571. package/dist/unstable/cli/Completions.js.map +1 -0
  572. package/dist/unstable/cli/Flag.d.ts +4 -5
  573. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  574. package/dist/unstable/cli/Flag.js +1 -1
  575. package/dist/unstable/cli/Flag.js.map +1 -1
  576. package/dist/unstable/cli/GlobalFlag.d.ts +125 -0
  577. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -0
  578. package/dist/unstable/cli/GlobalFlag.js +118 -0
  579. package/dist/unstable/cli/GlobalFlag.js.map +1 -0
  580. package/dist/unstable/cli/HelpDoc.d.ts +81 -11
  581. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  582. package/dist/unstable/cli/Param.d.ts +34 -6
  583. package/dist/unstable/cli/Param.d.ts.map +1 -1
  584. package/dist/unstable/cli/Param.js +24 -14
  585. package/dist/unstable/cli/Param.js.map +1 -1
  586. package/dist/unstable/cli/Primitive.d.ts +2 -2
  587. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  588. package/dist/unstable/cli/Primitive.js +1 -1
  589. package/dist/unstable/cli/Primitive.js.map +1 -1
  590. package/dist/unstable/cli/Prompt.js +266 -86
  591. package/dist/unstable/cli/Prompt.js.map +1 -1
  592. package/dist/unstable/cli/index.d.ts +8 -0
  593. package/dist/unstable/cli/index.d.ts.map +1 -1
  594. package/dist/unstable/cli/index.js +8 -0
  595. package/dist/unstable/cli/index.js.map +1 -1
  596. package/dist/unstable/cli/internal/command.d.ts +41 -15
  597. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  598. package/dist/unstable/cli/internal/command.js +84 -47
  599. package/dist/unstable/cli/internal/command.js.map +1 -1
  600. package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
  601. package/dist/unstable/cli/internal/completions/descriptor.d.ts +2 -0
  602. package/dist/unstable/cli/internal/completions/descriptor.d.ts.map +1 -0
  603. package/dist/unstable/cli/internal/completions/{CommandDescriptor.js → descriptor.js} +17 -5
  604. package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -0
  605. package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
  606. package/dist/unstable/cli/internal/completions/zsh.js.map +1 -1
  607. package/dist/unstable/cli/internal/config.js +42 -0
  608. package/dist/unstable/cli/internal/config.js.map +1 -1
  609. package/dist/unstable/cli/internal/help.d.ts +33 -0
  610. package/dist/unstable/cli/internal/help.d.ts.map +1 -0
  611. package/dist/unstable/cli/internal/help.js +125 -0
  612. package/dist/unstable/cli/internal/help.js.map +1 -0
  613. package/dist/unstable/cli/internal/parser.js +155 -58
  614. package/dist/unstable/cli/internal/parser.js.map +1 -1
  615. package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
  616. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  617. package/dist/unstable/cluster/ClusterCron.js +1 -1
  618. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  619. package/dist/unstable/cluster/ClusterError.d.ts +7 -7
  620. package/dist/unstable/cluster/ClusterSchema.d.ts +28 -7
  621. package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
  622. package/dist/unstable/cluster/ClusterSchema.js +28 -8
  623. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  624. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +4 -2
  625. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  626. package/dist/unstable/cluster/ClusterWorkflowEngine.js +97 -63
  627. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  628. package/dist/unstable/cluster/DeliverAt.js +1 -1
  629. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  630. package/dist/unstable/cluster/Entity.d.ts +18 -16
  631. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  632. package/dist/unstable/cluster/Entity.js +31 -25
  633. package/dist/unstable/cluster/Entity.js.map +1 -1
  634. package/dist/unstable/cluster/EntityAddress.d.ts +2 -2
  635. package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
  636. package/dist/unstable/cluster/EntityAddress.js +1 -1
  637. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  638. package/dist/unstable/cluster/EntityProxy.js +3 -3
  639. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  640. package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
  641. package/dist/unstable/cluster/EntityProxyServer.js +4 -4
  642. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  643. package/dist/unstable/cluster/EntityResource.d.ts +4 -4
  644. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  645. package/dist/unstable/cluster/EntityResource.js +2 -2
  646. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  647. package/dist/unstable/cluster/Envelope.d.ts +4 -4
  648. package/dist/unstable/cluster/HttpRunner.js +2 -2
  649. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  650. package/dist/unstable/cluster/K8sHttpClient.d.ts +5 -5
  651. package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
  652. package/dist/unstable/cluster/K8sHttpClient.js +6 -6
  653. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  654. package/dist/unstable/cluster/Message.d.ts +21 -15
  655. package/dist/unstable/cluster/Message.d.ts.map +1 -1
  656. package/dist/unstable/cluster/Message.js +16 -8
  657. package/dist/unstable/cluster/Message.js.map +1 -1
  658. package/dist/unstable/cluster/MessageStorage.d.ts +46 -23
  659. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  660. package/dist/unstable/cluster/MessageStorage.js +42 -26
  661. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  662. package/dist/unstable/cluster/Reply.d.ts +10 -9
  663. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  664. package/dist/unstable/cluster/Reply.js +8 -7
  665. package/dist/unstable/cluster/Reply.js.map +1 -1
  666. package/dist/unstable/cluster/Runner.d.ts +2 -2
  667. package/dist/unstable/cluster/Runner.d.ts.map +1 -1
  668. package/dist/unstable/cluster/Runner.js +1 -1
  669. package/dist/unstable/cluster/Runner.js.map +1 -1
  670. package/dist/unstable/cluster/RunnerAddress.d.ts +1 -1
  671. package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
  672. package/dist/unstable/cluster/RunnerAddress.js +1 -1
  673. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  674. package/dist/unstable/cluster/RunnerHealth.d.ts +2 -2
  675. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  676. package/dist/unstable/cluster/RunnerHealth.js +2 -2
  677. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  678. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  679. package/dist/unstable/cluster/RunnerServer.js +10 -9
  680. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  681. package/dist/unstable/cluster/RunnerStorage.d.ts +12 -12
  682. package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
  683. package/dist/unstable/cluster/RunnerStorage.js +3 -3
  684. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  685. package/dist/unstable/cluster/Runners.d.ts +5 -4
  686. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  687. package/dist/unstable/cluster/Runners.js +20 -17
  688. package/dist/unstable/cluster/Runners.js.map +1 -1
  689. package/dist/unstable/cluster/ShardId.d.ts +35 -49
  690. package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
  691. package/dist/unstable/cluster/ShardId.js +65 -67
  692. package/dist/unstable/cluster/ShardId.js.map +1 -1
  693. package/dist/unstable/cluster/Sharding.d.ts +4 -4
  694. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  695. package/dist/unstable/cluster/Sharding.js +66 -54
  696. package/dist/unstable/cluster/Sharding.js.map +1 -1
  697. package/dist/unstable/cluster/ShardingConfig.d.ts +28 -27
  698. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  699. package/dist/unstable/cluster/ShardingConfig.js +27 -27
  700. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  701. package/dist/unstable/cluster/SingletonAddress.d.ts +2 -2
  702. package/dist/unstable/cluster/Snowflake.d.ts +2 -2
  703. package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
  704. package/dist/unstable/cluster/Snowflake.js +2 -2
  705. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  706. package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
  707. package/dist/unstable/cluster/SqlMessageStorage.js +24 -20
  708. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  709. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  710. package/dist/unstable/cluster/SqlRunnerStorage.js +7 -7
  711. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  712. package/dist/unstable/cluster/internal/entityManager.js +34 -27
  713. package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
  714. package/dist/unstable/cluster/internal/entityReaper.js +4 -3
  715. package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
  716. package/dist/unstable/cluster/internal/resourceMap.js +3 -3
  717. package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
  718. package/dist/unstable/cluster/internal/resourceRef.js +2 -1
  719. package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
  720. package/dist/unstable/devtools/DevToolsClient.d.ts +2 -2
  721. package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
  722. package/dist/unstable/devtools/DevToolsClient.js +9 -8
  723. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  724. package/dist/unstable/devtools/DevToolsSchema.d.ts +40 -40
  725. package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
  726. package/dist/unstable/devtools/DevToolsSchema.js +9 -2
  727. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  728. package/dist/unstable/encoding/Msgpack.d.ts +1 -1
  729. package/dist/unstable/encoding/Ndjson.d.ts +9 -9
  730. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  731. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  732. package/dist/unstable/encoding/Sse.d.ts +4 -4
  733. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  734. package/dist/unstable/encoding/Sse.js +1 -1
  735. package/dist/unstable/encoding/Sse.js.map +1 -1
  736. package/dist/unstable/eventlog/Event.d.ts +0 -6
  737. package/dist/unstable/eventlog/Event.d.ts.map +1 -1
  738. package/dist/unstable/eventlog/Event.js +0 -5
  739. package/dist/unstable/eventlog/Event.js.map +1 -1
  740. package/dist/unstable/eventlog/EventGroup.d.ts +0 -2
  741. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  742. package/dist/unstable/eventlog/EventGroup.js +0 -2
  743. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  744. package/dist/unstable/eventlog/EventJournal.d.ts +28 -11
  745. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  746. package/dist/unstable/eventlog/EventJournal.js +130 -71
  747. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  748. package/dist/unstable/eventlog/EventLog.d.ts +94 -37
  749. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  750. package/dist/unstable/eventlog/EventLog.js +225 -150
  751. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  752. package/dist/unstable/eventlog/EventLogEncryption.d.ts +11 -9
  753. package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
  754. package/dist/unstable/eventlog/EventLogEncryption.js +15 -17
  755. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  756. package/dist/unstable/eventlog/EventLogMessage.d.ts +228 -0
  757. package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -0
  758. package/dist/unstable/eventlog/EventLogMessage.js +214 -0
  759. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -0
  760. package/dist/unstable/eventlog/EventLogRemote.d.ts +112 -194
  761. package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
  762. package/dist/unstable/eventlog/EventLogRemote.js +168 -322
  763. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  764. package/dist/unstable/eventlog/EventLogServer.d.ts +26 -48
  765. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  766. package/dist/unstable/eventlog/EventLogServer.js +128 -199
  767. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  768. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +60 -0
  769. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -0
  770. package/dist/unstable/eventlog/EventLogServerEncrypted.js +166 -0
  771. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -0
  772. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +183 -0
  773. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -0
  774. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +461 -0
  775. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -0
  776. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +117 -0
  777. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -0
  778. package/dist/unstable/eventlog/EventLogSessionAuth.js +284 -0
  779. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -0
  780. package/dist/unstable/eventlog/{SqlEventLogJournal.d.ts → SqlEventJournal.d.ts} +2 -2
  781. package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -0
  782. package/dist/unstable/eventlog/{SqlEventLogJournal.js → SqlEventJournal.js} +28 -21
  783. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -0
  784. package/dist/unstable/eventlog/{SqlEventLogServer.d.ts → SqlEventLogServerEncrypted.d.ts} +5 -5
  785. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -0
  786. package/dist/unstable/eventlog/{SqlEventLogServer.js → SqlEventLogServerEncrypted.js} +69 -27
  787. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -0
  788. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +25 -0
  789. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -0
  790. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +355 -0
  791. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -0
  792. package/dist/unstable/eventlog/index.d.ts +22 -2
  793. package/dist/unstable/eventlog/index.d.ts.map +1 -1
  794. package/dist/unstable/eventlog/index.js +22 -2
  795. package/dist/unstable/eventlog/index.js.map +1 -1
  796. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.d.ts +2 -0
  797. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.d.ts.map +1 -0
  798. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js +89 -0
  799. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js.map +1 -0
  800. package/dist/unstable/http/Cookies.d.ts +52 -7
  801. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  802. package/dist/unstable/http/Cookies.js +27 -6
  803. package/dist/unstable/http/Cookies.js.map +1 -1
  804. package/dist/unstable/http/Etag.d.ts +2 -2
  805. package/dist/unstable/http/Etag.d.ts.map +1 -1
  806. package/dist/unstable/http/Etag.js +7 -3
  807. package/dist/unstable/http/Etag.js.map +1 -1
  808. package/dist/unstable/http/FetchHttpClient.d.ts +6 -3
  809. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  810. package/dist/unstable/http/FetchHttpClient.js +5 -5
  811. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  812. package/dist/unstable/http/Headers.d.ts +24 -4
  813. package/dist/unstable/http/Headers.d.ts.map +1 -1
  814. package/dist/unstable/http/Headers.js +42 -13
  815. package/dist/unstable/http/Headers.js.map +1 -1
  816. package/dist/unstable/http/HttpBody.d.ts +1 -1
  817. package/dist/unstable/http/HttpClient.d.ts +125 -21
  818. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  819. package/dist/unstable/http/HttpClient.js +197 -19
  820. package/dist/unstable/http/HttpClient.js.map +1 -1
  821. package/dist/unstable/http/HttpClientError.d.ts +8 -8
  822. package/dist/unstable/http/HttpClientRequest.d.ts +43 -15
  823. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  824. package/dist/unstable/http/HttpClientRequest.js +131 -21
  825. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  826. package/dist/unstable/http/HttpClientResponse.d.ts +2 -1
  827. package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
  828. package/dist/unstable/http/HttpClientResponse.js +6 -1
  829. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  830. package/dist/unstable/http/HttpEffect.d.ts +13 -11
  831. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  832. package/dist/unstable/http/HttpEffect.js +67 -75
  833. package/dist/unstable/http/HttpEffect.js.map +1 -1
  834. package/dist/unstable/http/HttpIncomingMessage.d.ts +5 -4
  835. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  836. package/dist/unstable/http/HttpIncomingMessage.js +2 -2
  837. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  838. package/dist/unstable/http/HttpMethod.d.ts +4 -4
  839. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  840. package/dist/unstable/http/HttpMethod.js +3 -3
  841. package/dist/unstable/http/HttpMethod.js.map +1 -1
  842. package/dist/unstable/http/HttpMiddleware.d.ts +4 -9
  843. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  844. package/dist/unstable/http/HttpMiddleware.js +47 -43
  845. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  846. package/dist/unstable/http/HttpPlatform.d.ts +2 -2
  847. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  848. package/dist/unstable/http/HttpPlatform.js +5 -4
  849. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  850. package/dist/unstable/http/HttpRouter.d.ts +9 -8
  851. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  852. package/dist/unstable/http/HttpRouter.js +36 -36
  853. package/dist/unstable/http/HttpRouter.js.map +1 -1
  854. package/dist/unstable/http/HttpServer.d.ts +2 -2
  855. package/dist/unstable/http/HttpServer.d.ts.map +1 -1
  856. package/dist/unstable/http/HttpServer.js +4 -4
  857. package/dist/unstable/http/HttpServer.js.map +1 -1
  858. package/dist/unstable/http/HttpServerError.d.ts +22 -34
  859. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  860. package/dist/unstable/http/HttpServerError.js +39 -45
  861. package/dist/unstable/http/HttpServerError.js.map +1 -1
  862. package/dist/unstable/http/HttpServerRequest.d.ts +19 -7
  863. package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
  864. package/dist/unstable/http/HttpServerRequest.js +307 -13
  865. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  866. package/dist/unstable/http/HttpServerRespondable.d.ts +2 -2
  867. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  868. package/dist/unstable/http/HttpServerRespondable.js +5 -5
  869. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  870. package/dist/unstable/http/HttpServerResponse.d.ts +52 -5
  871. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  872. package/dist/unstable/http/HttpServerResponse.js +240 -5
  873. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  874. package/dist/unstable/http/HttpStaticServer.d.ts +69 -0
  875. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -0
  876. package/dist/unstable/http/HttpStaticServer.js +353 -0
  877. package/dist/unstable/http/HttpStaticServer.js.map +1 -0
  878. package/dist/unstable/http/HttpTraceContext.d.ts +3 -2
  879. package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
  880. package/dist/unstable/http/HttpTraceContext.js +27 -15
  881. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  882. package/dist/unstable/http/Multipart.d.ts +9 -9
  883. package/dist/unstable/http/Multipart.d.ts.map +1 -1
  884. package/dist/unstable/http/Multipart.js +7 -7
  885. package/dist/unstable/http/Multipart.js.map +1 -1
  886. package/dist/unstable/http/Url.d.ts +604 -0
  887. package/dist/unstable/http/Url.d.ts.map +1 -0
  888. package/dist/unstable/http/Url.js +256 -0
  889. package/dist/unstable/http/Url.js.map +1 -0
  890. package/dist/unstable/http/UrlParams.d.ts +19 -10
  891. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  892. package/dist/unstable/http/UrlParams.js +6 -7
  893. package/dist/unstable/http/UrlParams.js.map +1 -1
  894. package/dist/unstable/http/index.d.ts +8 -0
  895. package/dist/unstable/http/index.d.ts.map +1 -1
  896. package/dist/unstable/http/index.js +8 -0
  897. package/dist/unstable/http/index.js.map +1 -1
  898. package/dist/unstable/http/internal/preResponseHandler.d.ts +2 -0
  899. package/dist/unstable/http/internal/preResponseHandler.d.ts.map +1 -0
  900. package/dist/unstable/http/internal/preResponseHandler.js +10 -0
  901. package/dist/unstable/http/internal/preResponseHandler.js.map +1 -0
  902. package/dist/unstable/httpapi/HttpApi.d.ts +11 -11
  903. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  904. package/dist/unstable/httpapi/HttpApi.js +8 -8
  905. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  906. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +12 -9
  907. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  908. package/dist/unstable/httpapi/HttpApiBuilder.js +53 -39
  909. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  910. package/dist/unstable/httpapi/HttpApiClient.d.ts +83 -7
  911. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  912. package/dist/unstable/httpapi/HttpApiClient.js +79 -11
  913. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  914. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +211 -105
  915. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  916. package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -47
  917. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  918. package/dist/unstable/httpapi/HttpApiError.d.ts +43 -26
  919. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  920. package/dist/unstable/httpapi/HttpApiError.js +125 -32
  921. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  922. package/dist/unstable/httpapi/HttpApiGroup.d.ts +9 -8
  923. package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
  924. package/dist/unstable/httpapi/HttpApiGroup.js +4 -4
  925. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  926. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +49 -18
  927. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  928. package/dist/unstable/httpapi/HttpApiMiddleware.js +38 -8
  929. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  930. package/dist/unstable/httpapi/HttpApiScalar.d.ts +6 -0
  931. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  932. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  933. package/dist/unstable/httpapi/HttpApiSchema.d.ts +88 -9
  934. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  935. package/dist/unstable/httpapi/HttpApiSchema.js +86 -11
  936. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  937. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +9 -6
  938. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  939. package/dist/unstable/httpapi/HttpApiSecurity.js +6 -6
  940. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  941. package/dist/unstable/httpapi/OpenApi.d.ts +17 -25
  942. package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
  943. package/dist/unstable/httpapi/OpenApi.js +59 -60
  944. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  945. package/dist/unstable/observability/Otlp.d.ts +12 -12
  946. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  947. package/dist/unstable/observability/OtlpExporter.d.ts +2 -2
  948. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  949. package/dist/unstable/observability/OtlpExporter.js +8 -8
  950. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  951. package/dist/unstable/observability/OtlpLogger.d.ts +4 -4
  952. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  953. package/dist/unstable/observability/OtlpLogger.js +7 -4
  954. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  955. package/dist/unstable/observability/OtlpMetrics.d.ts +4 -4
  956. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  957. package/dist/unstable/observability/OtlpMetrics.js +2 -2
  958. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  959. package/dist/unstable/observability/OtlpSerialization.d.ts +2 -2
  960. package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
  961. package/dist/unstable/observability/OtlpSerialization.js +2 -2
  962. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  963. package/dist/unstable/observability/OtlpTracer.d.ts +4 -4
  964. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  965. package/dist/unstable/observability/OtlpTracer.js +7 -3
  966. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  967. package/dist/unstable/observability/PrometheusMetrics.d.ts +3 -3
  968. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  969. package/dist/unstable/observability/PrometheusMetrics.js +4 -33
  970. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  971. package/dist/unstable/observability/internal/protobuf.js +4 -4
  972. package/dist/unstable/observability/internal/protobuf.js.map +1 -1
  973. package/dist/unstable/persistence/KeyValueStore.d.ts +24 -3
  974. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  975. package/dist/unstable/persistence/KeyValueStore.js +148 -6
  976. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  977. package/dist/unstable/persistence/Persistable.d.ts +2 -2
  978. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  979. package/dist/unstable/persistence/Persistable.js +1 -1
  980. package/dist/unstable/persistence/Persistable.js.map +1 -1
  981. package/dist/unstable/persistence/PersistedCache.d.ts +6 -6
  982. package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
  983. package/dist/unstable/persistence/PersistedCache.js +12 -12
  984. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  985. package/dist/unstable/persistence/PersistedQueue.d.ts +16 -16
  986. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  987. package/dist/unstable/persistence/PersistedQueue.js +15 -14
  988. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  989. package/dist/unstable/persistence/Persistence.d.ts +5 -5
  990. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  991. package/dist/unstable/persistence/Persistence.js +5 -5
  992. package/dist/unstable/persistence/Persistence.js.map +1 -1
  993. package/dist/unstable/persistence/RateLimiter.d.ts +9 -9
  994. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  995. package/dist/unstable/persistence/RateLimiter.js +4 -4
  996. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  997. package/dist/unstable/persistence/Redis.d.ts +3 -3
  998. package/dist/unstable/persistence/Redis.d.ts.map +1 -1
  999. package/dist/unstable/persistence/Redis.js +2 -2
  1000. package/dist/unstable/persistence/Redis.js.map +1 -1
  1001. package/dist/unstable/process/ChildProcess.d.ts +5 -128
  1002. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  1003. package/dist/unstable/process/ChildProcess.js +1 -65
  1004. package/dist/unstable/process/ChildProcess.js.map +1 -1
  1005. package/dist/unstable/process/ChildProcessSpawner.d.ts +89 -8
  1006. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  1007. package/dist/unstable/process/ChildProcessSpawner.js +22 -2
  1008. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  1009. package/dist/unstable/reactivity/Atom.d.ts +108 -47
  1010. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1011. package/dist/unstable/reactivity/Atom.js +105 -25
  1012. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1013. package/dist/unstable/reactivity/AtomHttpApi.d.ts +22 -20
  1014. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1015. package/dist/unstable/reactivity/AtomHttpApi.js +58 -26
  1016. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1017. package/dist/unstable/reactivity/AtomRegistry.d.ts +8 -2
  1018. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  1019. package/dist/unstable/reactivity/AtomRegistry.js +57 -14
  1020. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1021. package/dist/unstable/reactivity/AtomRpc.d.ts +12 -12
  1022. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1023. package/dist/unstable/reactivity/AtomRpc.js +59 -31
  1024. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1025. package/dist/unstable/reactivity/Reactivity.d.ts +2 -2
  1026. package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
  1027. package/dist/unstable/reactivity/Reactivity.js +6 -6
  1028. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1029. package/dist/unstable/reactivity/index.d.ts +2 -2
  1030. package/dist/unstable/reactivity/index.d.ts.map +1 -1
  1031. package/dist/unstable/reactivity/index.js +2 -2
  1032. package/dist/unstable/reactivity/index.js.map +1 -1
  1033. package/dist/unstable/rpc/Rpc.d.ts +47 -19
  1034. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1035. package/dist/unstable/rpc/Rpc.js +39 -7
  1036. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1037. package/dist/unstable/rpc/RpcClient.d.ts +26 -47
  1038. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1039. package/dist/unstable/rpc/RpcClient.js +120 -77
  1040. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1041. package/dist/unstable/rpc/RpcClientError.d.ts +2 -2
  1042. package/dist/unstable/rpc/RpcGroup.d.ts +15 -11
  1043. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  1044. package/dist/unstable/rpc/RpcGroup.js +30 -20
  1045. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1046. package/dist/unstable/rpc/RpcMiddleware.d.ts +12 -12
  1047. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  1048. package/dist/unstable/rpc/RpcMiddleware.js +5 -5
  1049. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1050. package/dist/unstable/rpc/RpcSchema.d.ts +14 -1
  1051. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  1052. package/dist/unstable/rpc/RpcSchema.js +17 -2
  1053. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1054. package/dist/unstable/rpc/RpcSerialization.d.ts +13 -2
  1055. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1056. package/dist/unstable/rpc/RpcSerialization.js +60 -27
  1057. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1058. package/dist/unstable/rpc/RpcServer.d.ts +8 -12
  1059. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  1060. package/dist/unstable/rpc/RpcServer.js +78 -46
  1061. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1062. package/dist/unstable/rpc/RpcWorker.d.ts +2 -2
  1063. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  1064. package/dist/unstable/rpc/RpcWorker.js +4 -4
  1065. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1066. package/dist/unstable/rpc/Utils.d.ts +6 -3
  1067. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  1068. package/dist/unstable/rpc/Utils.js +48 -6
  1069. package/dist/unstable/rpc/Utils.js.map +1 -1
  1070. package/dist/unstable/schema/Model.d.ts +24 -3
  1071. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1072. package/dist/unstable/schema/Model.js +17 -4
  1073. package/dist/unstable/schema/Model.js.map +1 -1
  1074. package/dist/unstable/schema/VariantSchema.d.ts +7 -7
  1075. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  1076. package/dist/unstable/schema/VariantSchema.js +7 -18
  1077. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1078. package/dist/unstable/socket/Socket.d.ts +16 -15
  1079. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1080. package/dist/unstable/socket/Socket.js +22 -19
  1081. package/dist/unstable/socket/Socket.js.map +1 -1
  1082. package/dist/unstable/socket/SocketServer.d.ts +8 -5
  1083. package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
  1084. package/dist/unstable/socket/SocketServer.js +2 -2
  1085. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1086. package/dist/unstable/sql/Migrator.d.ts +1 -1
  1087. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  1088. package/dist/unstable/sql/Migrator.js +2 -2
  1089. package/dist/unstable/sql/Migrator.js.map +1 -1
  1090. package/dist/unstable/sql/SqlClient.d.ts +5 -5
  1091. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1092. package/dist/unstable/sql/SqlClient.js +7 -7
  1093. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1094. package/dist/unstable/sql/SqlConnection.d.ts +2 -2
  1095. package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
  1096. package/dist/unstable/sql/SqlConnection.js +5 -2
  1097. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1098. package/dist/unstable/sql/SqlError.d.ts +237 -17
  1099. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  1100. package/dist/unstable/sql/SqlError.js +260 -4
  1101. package/dist/unstable/sql/SqlError.js.map +1 -1
  1102. package/dist/unstable/sql/SqlModel.d.ts +8 -9
  1103. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  1104. package/dist/unstable/sql/SqlModel.js +12 -38
  1105. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1106. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  1107. package/dist/unstable/sql/SqlResolver.js +26 -17
  1108. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1109. package/dist/unstable/sql/SqlSchema.d.ts +17 -6
  1110. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  1111. package/dist/unstable/sql/SqlSchema.js +17 -7
  1112. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1113. package/dist/unstable/sql/Statement.d.ts +2 -2
  1114. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  1115. package/dist/unstable/sql/Statement.js +2 -3
  1116. package/dist/unstable/sql/Statement.js.map +1 -1
  1117. package/dist/unstable/workers/Transferable.d.ts +4 -4
  1118. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  1119. package/dist/unstable/workers/Transferable.js +7 -7
  1120. package/dist/unstable/workers/Transferable.js.map +1 -1
  1121. package/dist/unstable/workers/Worker.d.ts +3 -3
  1122. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  1123. package/dist/unstable/workers/Worker.js +8 -4
  1124. package/dist/unstable/workers/Worker.js.map +1 -1
  1125. package/dist/unstable/workers/WorkerError.d.ts +5 -5
  1126. package/dist/unstable/workers/WorkerRunner.d.ts +2 -2
  1127. package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
  1128. package/dist/unstable/workers/WorkerRunner.js +5 -2
  1129. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1130. package/dist/unstable/workflow/Activity.d.ts +7 -2
  1131. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  1132. package/dist/unstable/workflow/Activity.js +17 -4
  1133. package/dist/unstable/workflow/Activity.js.map +1 -1
  1134. package/dist/unstable/workflow/DurableClock.d.ts +3 -6
  1135. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  1136. package/dist/unstable/workflow/DurableClock.js +6 -6
  1137. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1138. package/dist/unstable/workflow/DurableDeferred.d.ts +1 -1
  1139. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  1140. package/dist/unstable/workflow/DurableDeferred.js +15 -15
  1141. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1142. package/dist/unstable/workflow/Workflow.d.ts +13 -12
  1143. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1144. package/dist/unstable/workflow/Workflow.js +18 -18
  1145. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1146. package/dist/unstable/workflow/WorkflowEngine.d.ts +26 -8
  1147. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  1148. package/dist/unstable/workflow/WorkflowEngine.js +167 -17
  1149. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1150. package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
  1151. package/dist/unstable/workflow/WorkflowProxyServer.js +4 -4
  1152. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1153. package/package.json +11 -11
  1154. package/src/Array.ts +304 -447
  1155. package/src/BigDecimal.ts +137 -82
  1156. package/src/BigInt.ts +53 -45
  1157. package/src/Brand.ts +3 -5
  1158. package/src/Cache.ts +27 -54
  1159. package/src/Cause.ts +58 -23
  1160. package/src/Channel.ts +693 -224
  1161. package/src/Chunk.ts +149 -331
  1162. package/src/Clock.ts +2 -2
  1163. package/src/Combiner.ts +280 -13
  1164. package/src/Config.ts +197 -27
  1165. package/src/ConfigProvider.ts +5 -5
  1166. package/src/Console.ts +2 -2
  1167. package/src/Context.ts +1454 -0
  1168. package/src/Cron.ts +155 -63
  1169. package/src/Data.ts +539 -376
  1170. package/src/DateTime.ts +77 -258
  1171. package/src/Deferred.ts +15 -6
  1172. package/src/Duration.ts +123 -67
  1173. package/src/Effect.ts +1629 -1355
  1174. package/src/Encoding.ts +879 -0
  1175. package/src/Equal.ts +295 -111
  1176. package/src/Equivalence.ts +114 -52
  1177. package/src/ErrorReporter.ts +458 -0
  1178. package/src/ExecutionPlan.ts +8 -9
  1179. package/src/Exit.ts +24 -12
  1180. package/src/Fiber.ts +17 -8
  1181. package/src/FiberHandle.ts +15 -14
  1182. package/src/FiberMap.ts +27 -27
  1183. package/src/FiberSet.ts +5 -5
  1184. package/src/FileSystem.ts +34 -30
  1185. package/src/Filter.ts +4 -62
  1186. package/src/Formatter.ts +253 -51
  1187. package/src/Function.ts +2 -10
  1188. package/src/Graph.ts +131 -117
  1189. package/src/Hash.ts +2 -2
  1190. package/src/HashMap.ts +26 -19
  1191. package/src/Iterable.ts +117 -63
  1192. package/src/JsonSchema.ts +383 -10
  1193. package/src/Latch.ts +194 -0
  1194. package/src/Layer.ts +728 -441
  1195. package/src/LayerMap.ts +38 -35
  1196. package/src/LogLevel.ts +37 -0
  1197. package/src/Logger.ts +35 -102
  1198. package/src/ManagedRuntime.ts +61 -48
  1199. package/src/Metric.ts +64 -66
  1200. package/src/MutableHashMap.ts +9 -0
  1201. package/src/MutableHashSet.ts +9 -0
  1202. package/src/MutableList.ts +3 -0
  1203. package/src/Newtype.ts +308 -0
  1204. package/src/Number.ts +98 -29
  1205. package/src/Optic.ts +948 -19
  1206. package/src/Option.ts +34 -24
  1207. package/src/Order.ts +39 -32
  1208. package/src/PartitionedSemaphore.ts +288 -56
  1209. package/src/Path.ts +2 -2
  1210. package/src/Pipeable.ts +32 -1
  1211. package/src/Pool.ts +18 -16
  1212. package/src/PubSub.ts +30 -20
  1213. package/src/Pull.ts +1 -1
  1214. package/src/Queue.ts +11 -9
  1215. package/src/Random.ts +51 -14
  1216. package/src/RcMap.ts +19 -19
  1217. package/src/RcRef.ts +1 -1
  1218. package/src/Record.ts +94 -199
  1219. package/src/Redactable.ts +146 -72
  1220. package/src/Reducer.ts +166 -7
  1221. package/src/References.ts +283 -287
  1222. package/src/Request.ts +8 -7
  1223. package/src/RequestResolver.ts +34 -55
  1224. package/src/Resource.ts +6 -5
  1225. package/src/Result.ts +2 -4
  1226. package/src/Runtime.ts +102 -6
  1227. package/src/Schedule.ts +460 -451
  1228. package/src/Scheduler.ts +52 -129
  1229. package/src/Schema.ts +4267 -752
  1230. package/src/SchemaAST.ts +480 -302
  1231. package/src/SchemaGetter.ts +92 -38
  1232. package/src/SchemaIssue.ts +28 -15
  1233. package/src/SchemaParser.ts +100 -29
  1234. package/src/SchemaRepresentation.ts +59 -32
  1235. package/src/SchemaTransformation.ts +364 -13
  1236. package/src/Scope.ts +2 -2
  1237. package/src/ScopedCache.ts +8 -8
  1238. package/src/Semaphore.ts +442 -0
  1239. package/src/Sink.ts +89 -34
  1240. package/src/Stdio.ts +29 -6
  1241. package/src/Stream.ts +898 -752
  1242. package/src/String.ts +122 -69
  1243. package/src/Struct.ts +33 -7
  1244. package/src/SubscriptionRef.ts +101 -120
  1245. package/src/SynchronizedRef.ts +3 -2
  1246. package/src/Terminal.ts +5 -4
  1247. package/src/Tracer.ts +23 -22
  1248. package/src/Trie.ts +44 -31
  1249. package/src/TxChunk.ts +26 -16
  1250. package/src/TxDeferred.ts +391 -0
  1251. package/src/TxHashMap.ts +347 -291
  1252. package/src/TxHashSet.ts +54 -61
  1253. package/src/TxPriorityQueue.ts +762 -0
  1254. package/src/TxPubSub.ts +787 -0
  1255. package/src/TxQueue.ts +221 -245
  1256. package/src/TxReentrantLock.ts +729 -0
  1257. package/src/TxRef.ts +31 -31
  1258. package/src/TxSemaphore.ts +203 -31
  1259. package/src/TxSubscriptionRef.ts +637 -0
  1260. package/src/Types.ts +78 -17
  1261. package/src/Unify.ts +26 -2
  1262. package/src/Utils.ts +137 -111
  1263. package/src/index.ts +898 -72
  1264. package/src/internal/core.ts +19 -12
  1265. package/src/internal/dateTime.ts +91 -96
  1266. package/src/internal/effect.ts +1150 -611
  1267. package/src/internal/hashMap.ts +12 -10
  1268. package/src/internal/layer.ts +7 -7
  1269. package/src/internal/option.ts +7 -0
  1270. package/src/internal/random.ts +20 -0
  1271. package/src/internal/rcRef.ts +14 -13
  1272. package/src/internal/references.ts +72 -0
  1273. package/src/internal/request.ts +8 -8
  1274. package/src/internal/schedule.ts +3 -1
  1275. package/src/internal/schema/annotations.ts +2 -0
  1276. package/src/internal/schema/representation.ts +81 -95
  1277. package/src/internal/schema/schema.ts +25 -1
  1278. package/src/internal/schema/to-codec.ts +7 -17
  1279. package/src/internal/trie.ts +21 -15
  1280. package/src/testing/TestClock.ts +13 -11
  1281. package/src/testing/TestSchema.ts +333 -36
  1282. package/src/testing/index.ts +64 -1
  1283. package/src/unstable/ai/AiError.ts +112 -54
  1284. package/src/unstable/ai/AnthropicStructuredOutput.ts +7 -3
  1285. package/src/unstable/ai/Chat.ts +137 -88
  1286. package/src/unstable/ai/EmbeddingModel.ts +209 -0
  1287. package/src/unstable/ai/IdGenerator.ts +2 -2
  1288. package/src/unstable/ai/LanguageModel.ts +685 -255
  1289. package/src/unstable/ai/McpSchema.ts +84 -22
  1290. package/src/unstable/ai/McpServer.ts +299 -87
  1291. package/src/unstable/ai/Model.ts +44 -13
  1292. package/src/unstable/ai/OpenAiStructuredOutput.ts +9 -2
  1293. package/src/unstable/ai/Prompt.ts +43 -49
  1294. package/src/unstable/ai/Response.ts +31 -33
  1295. package/src/unstable/ai/ResponseIdTracker.ts +95 -0
  1296. package/src/unstable/ai/Telemetry.ts +2 -2
  1297. package/src/unstable/ai/Tokenizer.ts +2 -2
  1298. package/src/unstable/ai/Tool.ts +62 -36
  1299. package/src/unstable/ai/Toolkit.ts +17 -26
  1300. package/src/unstable/ai/index.ts +24 -1
  1301. package/src/unstable/ai/internal/codec-transformer.ts +3 -9
  1302. package/src/unstable/cli/Argument.ts +5 -8
  1303. package/src/unstable/cli/CliError.ts +67 -66
  1304. package/src/unstable/cli/CliOutput.ts +87 -15
  1305. package/src/unstable/cli/Command.ts +808 -193
  1306. package/src/unstable/cli/Completions.ts +107 -0
  1307. package/src/unstable/cli/Flag.ts +5 -6
  1308. package/src/unstable/cli/GlobalFlag.ts +242 -0
  1309. package/src/unstable/cli/HelpDoc.ts +91 -11
  1310. package/src/unstable/cli/Param.ts +54 -27
  1311. package/src/unstable/cli/Primitive.ts +2 -2
  1312. package/src/unstable/cli/Prompt.ts +275 -104
  1313. package/src/unstable/cli/index.ts +10 -0
  1314. package/src/unstable/cli/internal/command.ts +125 -64
  1315. package/src/unstable/cli/internal/completions/bash.ts +7 -7
  1316. package/src/unstable/cli/internal/completions/{CommandDescriptor.ts → descriptor.ts} +16 -58
  1317. package/src/unstable/cli/internal/completions/fish.ts +7 -7
  1318. package/src/unstable/cli/internal/completions/zsh.ts +8 -14
  1319. package/src/unstable/cli/internal/config.ts +49 -0
  1320. package/src/unstable/cli/internal/help.ts +171 -0
  1321. package/src/unstable/cli/internal/parser.ts +201 -84
  1322. package/src/unstable/cluster/ClusterCron.ts +2 -2
  1323. package/src/unstable/cluster/ClusterSchema.ts +38 -10
  1324. package/src/unstable/cluster/ClusterWorkflowEngine.ts +144 -81
  1325. package/src/unstable/cluster/DeliverAt.ts +1 -1
  1326. package/src/unstable/cluster/Entity.ts +59 -45
  1327. package/src/unstable/cluster/EntityAddress.ts +1 -1
  1328. package/src/unstable/cluster/EntityProxy.ts +3 -3
  1329. package/src/unstable/cluster/EntityProxyServer.ts +4 -4
  1330. package/src/unstable/cluster/EntityResource.ts +6 -6
  1331. package/src/unstable/cluster/Envelope.ts +1 -1
  1332. package/src/unstable/cluster/HttpRunner.ts +2 -2
  1333. package/src/unstable/cluster/K8sHttpClient.ts +7 -7
  1334. package/src/unstable/cluster/Message.ts +30 -17
  1335. package/src/unstable/cluster/MessageStorage.ts +76 -46
  1336. package/src/unstable/cluster/Reply.ts +13 -10
  1337. package/src/unstable/cluster/Runner.ts +1 -1
  1338. package/src/unstable/cluster/RunnerAddress.ts +1 -1
  1339. package/src/unstable/cluster/RunnerHealth.ts +2 -2
  1340. package/src/unstable/cluster/RunnerServer.ts +11 -14
  1341. package/src/unstable/cluster/RunnerStorage.ts +9 -9
  1342. package/src/unstable/cluster/Runners.ts +28 -23
  1343. package/src/unstable/cluster/ShardId.ts +84 -74
  1344. package/src/unstable/cluster/Sharding.ts +83 -66
  1345. package/src/unstable/cluster/ShardingConfig.ts +39 -40
  1346. package/src/unstable/cluster/Snowflake.ts +2 -2
  1347. package/src/unstable/cluster/SqlMessageStorage.ts +29 -20
  1348. package/src/unstable/cluster/SqlRunnerStorage.ts +13 -7
  1349. package/src/unstable/cluster/internal/entityManager.ts +66 -46
  1350. package/src/unstable/cluster/internal/entityReaper.ts +4 -3
  1351. package/src/unstable/cluster/internal/resourceMap.ts +3 -3
  1352. package/src/unstable/cluster/internal/resourceRef.ts +2 -1
  1353. package/src/unstable/devtools/DevToolsClient.ts +26 -21
  1354. package/src/unstable/devtools/DevToolsSchema.ts +16 -3
  1355. package/src/unstable/encoding/Ndjson.ts +17 -17
  1356. package/src/unstable/encoding/Sse.ts +3 -5
  1357. package/src/unstable/eventlog/Event.ts +0 -8
  1358. package/src/unstable/eventlog/EventGroup.ts +0 -4
  1359. package/src/unstable/eventlog/EventJournal.ts +148 -80
  1360. package/src/unstable/eventlog/EventLog.ts +360 -233
  1361. package/src/unstable/eventlog/EventLogEncryption.ts +18 -32
  1362. package/src/unstable/eventlog/EventLogMessage.ts +277 -0
  1363. package/src/unstable/eventlog/EventLogRemote.ts +264 -410
  1364. package/src/unstable/eventlog/EventLogServer.ts +183 -275
  1365. package/src/unstable/eventlog/EventLogServerEncrypted.ts +206 -0
  1366. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +749 -0
  1367. package/src/unstable/eventlog/EventLogSessionAuth.ts +437 -0
  1368. package/src/unstable/eventlog/{SqlEventLogJournal.ts → SqlEventJournal.ts} +38 -22
  1369. package/src/unstable/eventlog/{SqlEventLogServer.ts → SqlEventLogServerEncrypted.ts} +110 -43
  1370. package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +506 -0
  1371. package/src/unstable/eventlog/index.ts +27 -2
  1372. package/src/unstable/eventlog/internal/identityRootSecretDerivation.ts +153 -0
  1373. package/src/unstable/http/Cookies.ts +94 -11
  1374. package/src/unstable/http/Etag.ts +7 -5
  1375. package/src/unstable/http/FetchHttpClient.ts +5 -5
  1376. package/src/unstable/http/Headers.ts +70 -20
  1377. package/src/unstable/http/HttpClient.ts +385 -42
  1378. package/src/unstable/http/HttpClientRequest.ts +151 -39
  1379. package/src/unstable/http/HttpClientResponse.ts +12 -6
  1380. package/src/unstable/http/HttpEffect.ts +86 -100
  1381. package/src/unstable/http/HttpIncomingMessage.ts +5 -4
  1382. package/src/unstable/http/HttpMethod.ts +16 -4
  1383. package/src/unstable/http/HttpMiddleware.ts +50 -50
  1384. package/src/unstable/http/HttpPlatform.ts +5 -4
  1385. package/src/unstable/http/HttpRouter.ts +46 -46
  1386. package/src/unstable/http/HttpServer.ts +5 -11
  1387. package/src/unstable/http/HttpServerError.ts +45 -47
  1388. package/src/unstable/http/HttpServerRequest.ts +414 -23
  1389. package/src/unstable/http/HttpServerRespondable.ts +6 -6
  1390. package/src/unstable/http/HttpServerResponse.ts +351 -13
  1391. package/src/unstable/http/HttpStaticServer.ts +456 -0
  1392. package/src/unstable/http/HttpTraceContext.ts +31 -17
  1393. package/src/unstable/http/Multipart.ts +10 -10
  1394. package/src/unstable/http/Url.ts +650 -0
  1395. package/src/unstable/http/UrlParams.ts +31 -19
  1396. package/src/unstable/http/index.ts +10 -0
  1397. package/src/unstable/http/internal/preResponseHandler.ts +15 -0
  1398. package/src/unstable/httpapi/HttpApi.ts +21 -21
  1399. package/src/unstable/httpapi/HttpApiBuilder.ts +128 -55
  1400. package/src/unstable/httpapi/HttpApiClient.ts +186 -34
  1401. package/src/unstable/httpapi/HttpApiEndpoint.ts +225 -113
  1402. package/src/unstable/httpapi/HttpApiError.ts +108 -30
  1403. package/src/unstable/httpapi/HttpApiGroup.ts +18 -17
  1404. package/src/unstable/httpapi/HttpApiMiddleware.ts +95 -33
  1405. package/src/unstable/httpapi/HttpApiScalar.ts +6 -0
  1406. package/src/unstable/httpapi/HttpApiSchema.ts +106 -11
  1407. package/src/unstable/httpapi/HttpApiSecurity.ts +13 -13
  1408. package/src/unstable/httpapi/OpenApi.ts +73 -72
  1409. package/src/unstable/observability/Otlp.ts +12 -12
  1410. package/src/unstable/observability/OtlpExporter.ts +14 -10
  1411. package/src/unstable/observability/OtlpLogger.ts +13 -9
  1412. package/src/unstable/observability/OtlpMetrics.ts +6 -6
  1413. package/src/unstable/observability/OtlpSerialization.ts +2 -2
  1414. package/src/unstable/observability/OtlpTracer.ts +14 -10
  1415. package/src/unstable/observability/PrometheusMetrics.ts +5 -5
  1416. package/src/unstable/observability/internal/protobuf.ts +4 -4
  1417. package/src/unstable/persistence/KeyValueStore.ts +230 -7
  1418. package/src/unstable/persistence/Persistable.ts +3 -3
  1419. package/src/unstable/persistence/PersistedCache.ts +35 -21
  1420. package/src/unstable/persistence/PersistedQueue.ts +28 -27
  1421. package/src/unstable/persistence/Persistence.ts +7 -7
  1422. package/src/unstable/persistence/RateLimiter.ts +7 -7
  1423. package/src/unstable/persistence/Redis.ts +2 -2
  1424. package/src/unstable/process/ChildProcess.ts +6 -208
  1425. package/src/unstable/process/ChildProcessSpawner.ts +120 -15
  1426. package/src/unstable/reactivity/Atom.ts +280 -124
  1427. package/src/unstable/reactivity/AtomHttpApi.ts +115 -59
  1428. package/src/unstable/reactivity/AtomRegistry.ts +70 -16
  1429. package/src/unstable/reactivity/AtomRpc.ts +82 -37
  1430. package/src/unstable/reactivity/Reactivity.ts +6 -6
  1431. package/src/unstable/reactivity/index.ts +2 -2
  1432. package/src/unstable/rpc/Rpc.ts +77 -32
  1433. package/src/unstable/rpc/RpcClient.ts +165 -145
  1434. package/src/unstable/rpc/RpcGroup.ts +51 -34
  1435. package/src/unstable/rpc/RpcMiddleware.ts +28 -22
  1436. package/src/unstable/rpc/RpcSchema.ts +24 -6
  1437. package/src/unstable/rpc/RpcSerialization.ts +97 -54
  1438. package/src/unstable/rpc/RpcServer.ts +97 -69
  1439. package/src/unstable/rpc/RpcWorker.ts +5 -5
  1440. package/src/unstable/rpc/Utils.ts +65 -5
  1441. package/src/unstable/schema/Model.ts +35 -6
  1442. package/src/unstable/schema/VariantSchema.ts +14 -27
  1443. package/src/unstable/socket/Socket.ts +42 -38
  1444. package/src/unstable/socket/SocketServer.ts +2 -2
  1445. package/src/unstable/sql/Migrator.ts +7 -5
  1446. package/src/unstable/sql/SqlClient.ts +13 -11
  1447. package/src/unstable/sql/SqlConnection.ts +2 -2
  1448. package/src/unstable/sql/SqlError.ts +365 -11
  1449. package/src/unstable/sql/SqlModel.ts +57 -85
  1450. package/src/unstable/sql/SqlResolver.ts +26 -16
  1451. package/src/unstable/sql/SqlSchema.ts +42 -26
  1452. package/src/unstable/sql/Statement.ts +2 -3
  1453. package/src/unstable/workers/Transferable.ts +17 -19
  1454. package/src/unstable/workers/Worker.ts +6 -5
  1455. package/src/unstable/workers/WorkerRunner.ts +2 -2
  1456. package/src/unstable/workflow/Activity.ts +27 -4
  1457. package/src/unstable/workflow/DurableClock.ts +11 -11
  1458. package/src/unstable/workflow/DurableDeferred.ts +16 -16
  1459. package/src/unstable/workflow/Workflow.ts +32 -25
  1460. package/src/unstable/workflow/WorkflowEngine.ts +239 -25
  1461. package/src/unstable/workflow/WorkflowProxyServer.ts +4 -4
  1462. package/dist/NullOr.d.ts +0 -149
  1463. package/dist/NullOr.d.ts.map +0 -1
  1464. package/dist/NullOr.js +0 -152
  1465. package/dist/NullOr.js.map +0 -1
  1466. package/dist/ServiceMap.d.ts +0 -1126
  1467. package/dist/ServiceMap.d.ts.map +0 -1
  1468. package/dist/ServiceMap.js.map +0 -1
  1469. package/dist/encoding/Base64.d.ts +0 -67
  1470. package/dist/encoding/Base64.d.ts.map +0 -1
  1471. package/dist/encoding/Base64.js +0 -146
  1472. package/dist/encoding/Base64.js.map +0 -1
  1473. package/dist/encoding/Base64Url.d.ts +0 -60
  1474. package/dist/encoding/Base64Url.d.ts.map +0 -1
  1475. package/dist/encoding/Base64Url.js +0 -89
  1476. package/dist/encoding/Base64Url.js.map +0 -1
  1477. package/dist/encoding/EncodingError.d.ts +0 -31
  1478. package/dist/encoding/EncodingError.d.ts.map +0 -1
  1479. package/dist/encoding/EncodingError.js +0 -22
  1480. package/dist/encoding/EncodingError.js.map +0 -1
  1481. package/dist/encoding/Hex.d.ts +0 -61
  1482. package/dist/encoding/Hex.d.ts.map +0 -1
  1483. package/dist/encoding/Hex.js +0 -115
  1484. package/dist/encoding/Hex.js.map +0 -1
  1485. package/dist/encoding/index.d.ts +0 -26
  1486. package/dist/encoding/index.d.ts.map +0 -1
  1487. package/dist/encoding/index.js +0 -27
  1488. package/dist/encoding/index.js.map +0 -1
  1489. package/dist/unstable/cli/internal/builtInFlags.d.ts +0 -7
  1490. package/dist/unstable/cli/internal/builtInFlags.d.ts.map +0 -1
  1491. package/dist/unstable/cli/internal/builtInFlags.js +0 -44
  1492. package/dist/unstable/cli/internal/builtInFlags.js.map +0 -1
  1493. package/dist/unstable/cli/internal/completions/CommandDescriptor.d.ts +0 -2
  1494. package/dist/unstable/cli/internal/completions/CommandDescriptor.d.ts.map +0 -1
  1495. package/dist/unstable/cli/internal/completions/CommandDescriptor.js.map +0 -1
  1496. package/dist/unstable/cli/internal/completions/Completions.d.ts +0 -2
  1497. package/dist/unstable/cli/internal/completions/Completions.d.ts.map +0 -1
  1498. package/dist/unstable/cli/internal/completions/Completions.js +0 -23
  1499. package/dist/unstable/cli/internal/completions/Completions.js.map +0 -1
  1500. package/dist/unstable/eventlog/SqlEventLogJournal.d.ts.map +0 -1
  1501. package/dist/unstable/eventlog/SqlEventLogJournal.js.map +0 -1
  1502. package/dist/unstable/eventlog/SqlEventLogServer.d.ts.map +0 -1
  1503. package/dist/unstable/eventlog/SqlEventLogServer.js.map +0 -1
  1504. package/src/NullOr.ts +0 -204
  1505. package/src/ServiceMap.ts +0 -1410
  1506. package/src/encoding/Base64.ts +0 -366
  1507. package/src/encoding/Base64Url.ts +0 -104
  1508. package/src/encoding/EncodingError.ts +0 -35
  1509. package/src/encoding/Hex.ts +0 -390
  1510. package/src/encoding/index.ts +0 -31
  1511. package/src/unstable/cli/internal/builtInFlags.ts +0 -78
  1512. package/src/unstable/cli/internal/completions/Completions.ts +0 -31
@@ -0,0 +1,374 @@
1
+ /**
2
+ * Pluggable error reporting for Effect programs.
3
+ *
4
+ * Reporting is triggered by `Effect.withErrorReporting`,
5
+ * `ErrorReporter.report`, or built-in reporting boundaries in the HTTP and
6
+ * RPC server modules.
7
+ *
8
+ * Each reporter receives a structured callback with the failing `Cause`, a
9
+ * pretty-printed `Error`, severity, and any extra attributes attached to the
10
+ * original error — making it straightforward to forward failures to Sentry,
11
+ * Datadog, or a custom logging backend.
12
+ *
13
+ * Use the annotation symbols (`ignore`, `severity`, `attributes`) on your
14
+ * error classes to control reporting behavior per-error.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * import { Data, Effect, ErrorReporter } from "effect"
19
+ *
20
+ * // A reporter that logs to the console
21
+ * const consoleReporter = ErrorReporter.make(({ error, severity }) => {
22
+ * console.error(`[${severity}]`, error.message)
23
+ * })
24
+ *
25
+ * // An error that should be ignored by reporters
26
+ * class NotFoundError extends Data.TaggedError("NotFoundError")<{}> {
27
+ * readonly [ErrorReporter.ignore] = true
28
+ * }
29
+ *
30
+ * // An error with custom severity and attributes
31
+ * class RateLimitError extends Data.TaggedError("RateLimitError")<{
32
+ * readonly retryAfter: number
33
+ * }> {
34
+ * readonly [ErrorReporter.severity] = "Warn" as const
35
+ * readonly [ErrorReporter.attributes] = {
36
+ * retryAfter: this.retryAfter
37
+ * }
38
+ * }
39
+ *
40
+ * // Opt in to error reporting with Effect.withErrorReporting
41
+ * const program = Effect.gen(function*() {
42
+ * return yield* new RateLimitError({ retryAfter: 60 })
43
+ * }).pipe(
44
+ * Effect.withErrorReporting,
45
+ * Effect.provide(ErrorReporter.layer([consoleReporter]))
46
+ * )
47
+ * ```
48
+ *
49
+ * @since 4.0.0
50
+ */
51
+ import type * as Cause from "./Cause.ts";
52
+ import type * as Context from "./Context.ts";
53
+ import * as Effect from "./Effect.ts";
54
+ import type * as Fiber from "./Fiber.ts";
55
+ import * as Layer from "./Layer.ts";
56
+ import type { Severity } from "./LogLevel.ts";
57
+ import type { ReadonlyRecord } from "./Record.ts";
58
+ import type * as Scope from "./Scope.ts";
59
+ /**
60
+ * @since 4.0.0
61
+ * @category Type Identifiers
62
+ */
63
+ export type TypeId = "~effect/ErrorReporter";
64
+ /**
65
+ * @since 4.0.0
66
+ * @category Type Identifiers
67
+ */
68
+ export declare const TypeId: TypeId;
69
+ /**
70
+ * An `ErrorReporter` receives reported failures and forwards them to an
71
+ * external system (logging service, error tracker, etc.).
72
+ *
73
+ * Reporting is triggered by `Effect.withErrorReporting`,
74
+ * `ErrorReporter.report`, or built-in boundaries in the HTTP and RPC server
75
+ * modules. Use {@link make} to create a reporter — it handles deduplication
76
+ * and per-error annotation extraction automatically.
77
+ *
78
+ * @since 4.0.0
79
+ * @category Models
80
+ */
81
+ export interface ErrorReporter {
82
+ readonly [TypeId]: TypeId;
83
+ report(options: {
84
+ readonly cause: Cause.Cause<unknown>;
85
+ readonly fiber: Fiber.Fiber<unknown, unknown>;
86
+ readonly timestamp: bigint;
87
+ }): void;
88
+ }
89
+ /**
90
+ * Creates an `ErrorReporter` from a callback.
91
+ *
92
+ * The returned reporter automatically deduplicates causes and individual
93
+ * errors (the same object is never reported twice), skips interruptions,
94
+ * and resolves the `ignore`, `severity`, and `attributes` annotations on
95
+ * each error before invoking your callback.
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * import { ErrorReporter } from "effect"
100
+ *
101
+ * // Forward every failure to the console
102
+ * const consoleReporter = ErrorReporter.make(
103
+ * ({ error, severity, attributes }) => {
104
+ * console.error(`[${severity}]`, error.message, attributes)
105
+ * }
106
+ * )
107
+ * ```
108
+ *
109
+ * @since 4.0.0
110
+ * @category Constructors
111
+ */
112
+ export declare const make: (report: (options: {
113
+ readonly cause: Cause.Cause<unknown>;
114
+ readonly error: Error;
115
+ readonly attributes: ReadonlyRecord<string, unknown>;
116
+ readonly severity: Severity;
117
+ readonly fiber: Fiber.Fiber<unknown, unknown>;
118
+ readonly timestamp: bigint;
119
+ }) => void) => ErrorReporter;
120
+ /**
121
+ * A `Context.Reference` holding the set of active `ErrorReporter`s for the
122
+ * current fiber. Defaults to an empty set (no reporting).
123
+ *
124
+ * Prefer {@link layer} to configure reporters via the `Layer` API. Use this
125
+ * reference directly only when you need low-level control (e.g. reading the
126
+ * current reporters or swapping them inside a `FiberRef`).
127
+ *
128
+ * @since 4.0.0
129
+ * @category References
130
+ */
131
+ export declare const CurrentErrorReporters: Context.Reference<ReadonlySet<ErrorReporter>>;
132
+ /**
133
+ * Creates a `Layer` that registers one or more `ErrorReporter`s.
134
+ *
135
+ * Reporters can be plain `ErrorReporter` values or effectful
136
+ * `Effect<ErrorReporter>` values that are resolved when the layer is built.
137
+ *
138
+ * By default the provided reporters **replace** any previously registered
139
+ * reporters. Set `mergeWithExisting: true` to add them alongside existing
140
+ * ones.
141
+ *
142
+ * @example
143
+ * ```ts
144
+ * import { Effect, ErrorReporter } from "effect"
145
+ *
146
+ * const consoleReporter = ErrorReporter.make(({ error, severity }) => {
147
+ * console.error(`[${severity}]`, error.message)
148
+ * })
149
+ *
150
+ * const metricsReporter = ErrorReporter.make(({ severity }) => {
151
+ * // increment an error counter by severity
152
+ * })
153
+ *
154
+ * // Replace all existing reporters
155
+ * const ReporterLive = ErrorReporter.layer([
156
+ * consoleReporter,
157
+ * metricsReporter
158
+ * ])
159
+ *
160
+ * // Add to existing reporters instead of replacing
161
+ * const ReporterMerged = ErrorReporter.layer(
162
+ * [metricsReporter],
163
+ * { mergeWithExisting: true }
164
+ * )
165
+ *
166
+ * const program = Effect.fail("boom").pipe(
167
+ * Effect.withErrorReporting,
168
+ * Effect.provide(ReporterLive)
169
+ * )
170
+ * ```
171
+ *
172
+ * @since 4.0.0
173
+ * @category Layers
174
+ */
175
+ export declare const layer: <const Reporters extends ReadonlyArray<ErrorReporter | Effect.Effect<ErrorReporter, any, any>>>(reporters: Reporters, options?: {
176
+ readonly mergeWithExisting?: boolean | undefined;
177
+ } | undefined) => Layer.Layer<never, Reporters extends readonly [] ? never : Effect.Error<Reporters[number]>, Exclude<Reporters extends readonly [] ? never : Effect.Services<Reporters[number]>, Scope.Scope>>;
178
+ /**
179
+ * Manually report a `Cause` to all registered `ErrorReporter`s on the
180
+ * current fiber.
181
+ *
182
+ * This is useful when you want to report an error for observability without
183
+ * actually failing the fiber.
184
+ *
185
+ * @example
186
+ * ```ts
187
+ * import { Cause, Effect, ErrorReporter } from "effect"
188
+ *
189
+ * // Log the cause for monitoring, then continue with a fallback
190
+ * const program = Effect.gen(function*() {
191
+ * const cause = Cause.fail("something went wrong")
192
+ * yield* ErrorReporter.report(cause)
193
+ * return "fallback value"
194
+ * })
195
+ * ```
196
+ *
197
+ * @since 4.0.0
198
+ * @category Reporting
199
+ */
200
+ export declare const report: <E>(cause: Cause.Cause<E>) => Effect.Effect<void>;
201
+ /**
202
+ * Interface that errors can implement to control reporting behavior.
203
+ *
204
+ * All three annotation properties are optional:
205
+ * - `[ErrorReporter.ignore]` — when `true`, the error is never reported
206
+ * - `[ErrorReporter.severity]` — overrides the default `"Error"` severity
207
+ * - `[ErrorReporter.attributes]` — extra key/value pairs forwarded to reporters
208
+ *
209
+ * The global `Error` interface is augmented with `Reportable`, so these
210
+ * properties are available on all `Error` instances.
211
+ *
212
+ * @since 4.0.0
213
+ * @category Annotations
214
+ */
215
+ export interface Reportable {
216
+ readonly [ignore]?: boolean;
217
+ readonly [severity]?: Severity;
218
+ readonly [attributes]?: ReadonlyRecord<string, unknown>;
219
+ }
220
+ declare global {
221
+ interface Error extends Reportable {
222
+ }
223
+ }
224
+ /**
225
+ * Symbol key used to mark an error as unreportable.
226
+ *
227
+ * Set this property to `true` on any error class to prevent it from being
228
+ * forwarded to reporters. Useful for expected errors such as HTTP 404s.
229
+ *
230
+ * @example
231
+ * ```ts
232
+ * import { Data, ErrorReporter } from "effect"
233
+ *
234
+ * class NotFoundError extends Data.TaggedError("NotFoundError")<{}> {
235
+ * readonly [ErrorReporter.ignore] = true
236
+ * }
237
+ * ```
238
+ *
239
+ * @since 4.0.0
240
+ * @category Annotations
241
+ */
242
+ export type ignore = "~effect/ErrorReporter/ignore";
243
+ /**
244
+ * Symbol key used to mark an error as unreportable.
245
+ *
246
+ * Set this property to `true` on any error class to prevent it from being
247
+ * forwarded to reporters. Useful for expected errors such as HTTP 404s.
248
+ *
249
+ * @example
250
+ * ```ts
251
+ * import { Data, ErrorReporter } from "effect"
252
+ *
253
+ * class NotFoundError extends Data.TaggedError("NotFoundError")<{}> {
254
+ * readonly [ErrorReporter.ignore] = true
255
+ * }
256
+ * ```
257
+ *
258
+ * @since 4.0.0
259
+ * @category Annotations
260
+ */
261
+ export declare const ignore: ignore;
262
+ /**
263
+ * Returns `true` if the given value has the `ErrorReporter.ignore` annotation
264
+ * set to `true`.
265
+ *
266
+ * @since 4.0.0
267
+ * @category Annotations
268
+ */
269
+ export declare const isIgnored: (u: unknown) => boolean;
270
+ /**
271
+ * Symbol key used to override the severity level of an error.
272
+ *
273
+ * When set, the reporter callback receives this value as `severity` instead
274
+ * of the default `"Error"`. Accepted values are the `LogLevel.Severity`
275
+ * literals: `"Trace"`, `"Debug"`, `"Info"`, `"Warn"`, `"Error"`, `"Fatal"`.
276
+ *
277
+ * @example
278
+ * ```ts
279
+ * import { Data, ErrorReporter } from "effect"
280
+ *
281
+ * class DeprecationWarning extends Data.TaggedError("DeprecationWarning")<{}> {
282
+ * readonly [ErrorReporter.severity] = "Warn" as const
283
+ * }
284
+ * ```
285
+ *
286
+ * @since 4.0.0
287
+ * @category Annotations
288
+ */
289
+ export type severity = "~effect/ErrorReporter/severity";
290
+ /**
291
+ * Symbol key used to override the severity level of an error.
292
+ *
293
+ * When set, the reporter callback receives this value as `severity` instead
294
+ * of the default `"Error"`. Accepted values are the `LogLevel.Severity`
295
+ * literals: `"Trace"`, `"Debug"`, `"Info"`, `"Warn"`, `"Error"`, `"Fatal"`.
296
+ *
297
+ * @example
298
+ * ```ts
299
+ * import { Data, ErrorReporter } from "effect"
300
+ *
301
+ * class DeprecationWarning extends Data.TaggedError("DeprecationWarning")<{}> {
302
+ * readonly [ErrorReporter.severity] = "Warn" as const
303
+ * }
304
+ * ```
305
+ *
306
+ * @since 4.0.0
307
+ * @category Annotations
308
+ */
309
+ export declare const severity: severity;
310
+ /**
311
+ * Reads the `ErrorReporter.severity` annotation from an error object,
312
+ * falling back to `"Error"` when unset or invalid.
313
+ *
314
+ * @since 4.0.0
315
+ * @category Annotations
316
+ */
317
+ export declare const getSeverity: (error: object) => Severity;
318
+ /**
319
+ * Symbol key used to attach extra key/value metadata to an error report.
320
+ *
321
+ * Reporters receive these attributes alongside the error, making it easy to
322
+ * include contextual information such as user IDs, request IDs, or any
323
+ * domain-specific data useful for debugging.
324
+ *
325
+ * @example
326
+ * ```ts
327
+ * import { Data, ErrorReporter } from "effect"
328
+ *
329
+ * class PaymentError extends Data.TaggedError("PaymentError")<{
330
+ * readonly orderId: string
331
+ * }> {
332
+ * readonly [ErrorReporter.attributes] = {
333
+ * orderId: this.orderId
334
+ * }
335
+ * }
336
+ * ```
337
+ *
338
+ * @since 4.0.0
339
+ * @category Annotations
340
+ */
341
+ export type attributes = "~effect/ErrorReporter/attributes";
342
+ /**
343
+ * Symbol key used to attach extra key/value metadata to an error report.
344
+ *
345
+ * Reporters receive these attributes alongside the error, making it easy to
346
+ * include contextual information such as user IDs, request IDs, or any
347
+ * domain-specific data useful for debugging.
348
+ *
349
+ * @example
350
+ * ```ts
351
+ * import { Data, ErrorReporter } from "effect"
352
+ *
353
+ * class PaymentError extends Data.TaggedError("PaymentError")<{
354
+ * readonly orderId: string
355
+ * }> {
356
+ * readonly [ErrorReporter.attributes] = {
357
+ * orderId: this.orderId
358
+ * }
359
+ * }
360
+ * ```
361
+ *
362
+ * @since 4.0.0
363
+ * @category Annotations
364
+ */
365
+ export declare const attributes: attributes;
366
+ /**
367
+ * Reads the `ErrorReporter.attributes` annotation from an error object,
368
+ * returning an empty record when unset.
369
+ *
370
+ * @since 4.0.0
371
+ * @category Annotations
372
+ */
373
+ export declare const getAttributes: (error: object) => ReadonlyRecord<string, unknown>;
374
+ //# sourceMappingURL=ErrorReporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorReporter.d.ts","sourceRoot":"","sources":["../src/ErrorReporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAGxC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,uBAAuB,CAAA;AAE5C;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,MAAgC,CAAA;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,CAAC,OAAO,EAAE;QACd,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QACpC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAC3B,GAAG,IAAI,CAAA;CACT;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,IAAI,GACf,QAAQ,CAAC,OAAO,EAAE;IAChB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACpC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;IACrB,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B,KAAK,IAAI,KACT,aA2BF,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,CAAoC,CAAA;AAEpH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,KAAK,GAChB,KAAK,CAAC,SAAS,SAAS,aAAa,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAE7F,WAAW,SAAS,EACpB,UAAU;IAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GAAG,SAAS,KACzE,KAAK,CAAC,KAAK,CACZ,KAAK,EACL,SAAS,SAAS,SAAS,EAAE,GAAG,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EACvE,OAAO,CACL,SAAS,SAAS,SAAS,EAAE,GAAG,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAC1E,KAAK,CAAC,KAAK,CACZ,CAaA,CAAA;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAIhE,CAAA;AAEJ;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAA;IAC9B,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACxD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAM,SAAQ,UAAU;KAAG;CACtC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,MAAM,GAAG,8BAA8B,CAAA;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,MAAM,EAAE,MAAuC,CAAA;AAE5D;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GAAI,GAAG,OAAO,KAAG,OACmC,CAAA;AAE1E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,QAAQ,GAAG,gCAAgC,CAAA;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,QAAQ,EAAE,QAA2C,CAAA;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,QAK3C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,UAAU,GAAG,kCAAkC,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,UAAU,EAAE,UAA+C,CAAA;AAExE;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,cAAc,CAAC,MAAM,EAAE,OAAO,CAE3E,CAAA"}
@@ -0,0 +1,245 @@
1
+ import * as Effect from "./Effect.js";
2
+ import * as effect from "./internal/effect.js";
3
+ import * as references from "./internal/references.js";
4
+ import * as Layer from "./Layer.js";
5
+ import * as LogLevel from "./LogLevel.js";
6
+ /**
7
+ * @since 4.0.0
8
+ * @category Type Identifiers
9
+ */
10
+ export const TypeId = "~effect/ErrorReporter";
11
+ /**
12
+ * Creates an `ErrorReporter` from a callback.
13
+ *
14
+ * The returned reporter automatically deduplicates causes and individual
15
+ * errors (the same object is never reported twice), skips interruptions,
16
+ * and resolves the `ignore`, `severity`, and `attributes` annotations on
17
+ * each error before invoking your callback.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * import { ErrorReporter } from "effect"
22
+ *
23
+ * // Forward every failure to the console
24
+ * const consoleReporter = ErrorReporter.make(
25
+ * ({ error, severity, attributes }) => {
26
+ * console.error(`[${severity}]`, error.message, attributes)
27
+ * }
28
+ * )
29
+ * ```
30
+ *
31
+ * @since 4.0.0
32
+ * @category Constructors
33
+ */
34
+ export const make = report => {
35
+ const reported = new WeakSet();
36
+ return {
37
+ [TypeId]: TypeId,
38
+ report(options) {
39
+ if (reported.has(options.cause)) return;
40
+ reported.add(options.cause);
41
+ for (let i = 0; i < options.cause.reasons.length; i++) {
42
+ const reason = options.cause.reasons[i];
43
+ if (reason._tag === "Interrupt") continue;
44
+ const original = reason._tag === "Fail" ? reason.error : reason.defect;
45
+ const isObject = typeof original === "object" && original !== null;
46
+ if (isObject) {
47
+ if (reported.has(original)) continue;
48
+ reported.add(original);
49
+ }
50
+ if (isIgnored(original)) continue;
51
+ const pretty = effect.causePrettyError(original, reason.annotations);
52
+ report({
53
+ ...options,
54
+ error: pretty,
55
+ severity: isObject ? getSeverity(original) : "Info",
56
+ attributes: isObject ? getAttributes(original) : emptyAttributes
57
+ });
58
+ }
59
+ }
60
+ };
61
+ };
62
+ /**
63
+ * A `Context.Reference` holding the set of active `ErrorReporter`s for the
64
+ * current fiber. Defaults to an empty set (no reporting).
65
+ *
66
+ * Prefer {@link layer} to configure reporters via the `Layer` API. Use this
67
+ * reference directly only when you need low-level control (e.g. reading the
68
+ * current reporters or swapping them inside a `FiberRef`).
69
+ *
70
+ * @since 4.0.0
71
+ * @category References
72
+ */
73
+ export const CurrentErrorReporters = references.CurrentErrorReporters;
74
+ /**
75
+ * Creates a `Layer` that registers one or more `ErrorReporter`s.
76
+ *
77
+ * Reporters can be plain `ErrorReporter` values or effectful
78
+ * `Effect<ErrorReporter>` values that are resolved when the layer is built.
79
+ *
80
+ * By default the provided reporters **replace** any previously registered
81
+ * reporters. Set `mergeWithExisting: true` to add them alongside existing
82
+ * ones.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * import { Effect, ErrorReporter } from "effect"
87
+ *
88
+ * const consoleReporter = ErrorReporter.make(({ error, severity }) => {
89
+ * console.error(`[${severity}]`, error.message)
90
+ * })
91
+ *
92
+ * const metricsReporter = ErrorReporter.make(({ severity }) => {
93
+ * // increment an error counter by severity
94
+ * })
95
+ *
96
+ * // Replace all existing reporters
97
+ * const ReporterLive = ErrorReporter.layer([
98
+ * consoleReporter,
99
+ * metricsReporter
100
+ * ])
101
+ *
102
+ * // Add to existing reporters instead of replacing
103
+ * const ReporterMerged = ErrorReporter.layer(
104
+ * [metricsReporter],
105
+ * { mergeWithExisting: true }
106
+ * )
107
+ *
108
+ * const program = Effect.fail("boom").pipe(
109
+ * Effect.withErrorReporting,
110
+ * Effect.provide(ReporterLive)
111
+ * )
112
+ * ```
113
+ *
114
+ * @since 4.0.0
115
+ * @category Layers
116
+ */
117
+ export const layer = (reporters, options) => Layer.effect(CurrentErrorReporters, Effect.withFiber(Effect.fnUntraced(function* (fiber) {
118
+ const currentReporters = new Set(options?.mergeWithExisting === true ? fiber.getRef(references.CurrentErrorReporters) : []);
119
+ for (const reporter of reporters) {
120
+ currentReporters.add(Effect.isEffect(reporter) ? yield* reporter : reporter);
121
+ }
122
+ return currentReporters;
123
+ })));
124
+ /**
125
+ * Manually report a `Cause` to all registered `ErrorReporter`s on the
126
+ * current fiber.
127
+ *
128
+ * This is useful when you want to report an error for observability without
129
+ * actually failing the fiber.
130
+ *
131
+ * @example
132
+ * ```ts
133
+ * import { Cause, Effect, ErrorReporter } from "effect"
134
+ *
135
+ * // Log the cause for monitoring, then continue with a fallback
136
+ * const program = Effect.gen(function*() {
137
+ * const cause = Cause.fail("something went wrong")
138
+ * yield* ErrorReporter.report(cause)
139
+ * return "fallback value"
140
+ * })
141
+ * ```
142
+ *
143
+ * @since 4.0.0
144
+ * @category Reporting
145
+ */
146
+ export const report = cause => Effect.withFiber(fiber => {
147
+ effect.reportCauseUnsafe(fiber, cause);
148
+ return Effect.void;
149
+ });
150
+ /**
151
+ * Symbol key used to mark an error as unreportable.
152
+ *
153
+ * Set this property to `true` on any error class to prevent it from being
154
+ * forwarded to reporters. Useful for expected errors such as HTTP 404s.
155
+ *
156
+ * @example
157
+ * ```ts
158
+ * import { Data, ErrorReporter } from "effect"
159
+ *
160
+ * class NotFoundError extends Data.TaggedError("NotFoundError")<{}> {
161
+ * readonly [ErrorReporter.ignore] = true
162
+ * }
163
+ * ```
164
+ *
165
+ * @since 4.0.0
166
+ * @category Annotations
167
+ */
168
+ export const ignore = "~effect/ErrorReporter/ignore";
169
+ /**
170
+ * Returns `true` if the given value has the `ErrorReporter.ignore` annotation
171
+ * set to `true`.
172
+ *
173
+ * @since 4.0.0
174
+ * @category Annotations
175
+ */
176
+ export const isIgnored = u => typeof u === "object" && u !== null && ignore in u && u[ignore] === true;
177
+ /**
178
+ * Symbol key used to override the severity level of an error.
179
+ *
180
+ * When set, the reporter callback receives this value as `severity` instead
181
+ * of the default `"Error"`. Accepted values are the `LogLevel.Severity`
182
+ * literals: `"Trace"`, `"Debug"`, `"Info"`, `"Warn"`, `"Error"`, `"Fatal"`.
183
+ *
184
+ * @example
185
+ * ```ts
186
+ * import { Data, ErrorReporter } from "effect"
187
+ *
188
+ * class DeprecationWarning extends Data.TaggedError("DeprecationWarning")<{}> {
189
+ * readonly [ErrorReporter.severity] = "Warn" as const
190
+ * }
191
+ * ```
192
+ *
193
+ * @since 4.0.0
194
+ * @category Annotations
195
+ */
196
+ export const severity = "~effect/ErrorReporter/severity";
197
+ /**
198
+ * Reads the `ErrorReporter.severity` annotation from an error object,
199
+ * falling back to `"Error"` when unset or invalid.
200
+ *
201
+ * @since 4.0.0
202
+ * @category Annotations
203
+ */
204
+ export const getSeverity = error => {
205
+ if (severity in error && LogLevel.values.includes(error[severity])) {
206
+ return error[severity];
207
+ }
208
+ return "Info";
209
+ };
210
+ /**
211
+ * Symbol key used to attach extra key/value metadata to an error report.
212
+ *
213
+ * Reporters receive these attributes alongside the error, making it easy to
214
+ * include contextual information such as user IDs, request IDs, or any
215
+ * domain-specific data useful for debugging.
216
+ *
217
+ * @example
218
+ * ```ts
219
+ * import { Data, ErrorReporter } from "effect"
220
+ *
221
+ * class PaymentError extends Data.TaggedError("PaymentError")<{
222
+ * readonly orderId: string
223
+ * }> {
224
+ * readonly [ErrorReporter.attributes] = {
225
+ * orderId: this.orderId
226
+ * }
227
+ * }
228
+ * ```
229
+ *
230
+ * @since 4.0.0
231
+ * @category Annotations
232
+ */
233
+ export const attributes = "~effect/ErrorReporter/attributes";
234
+ /**
235
+ * Reads the `ErrorReporter.attributes` annotation from an error object,
236
+ * returning an empty record when unset.
237
+ *
238
+ * @since 4.0.0
239
+ * @category Annotations
240
+ */
241
+ export const getAttributes = error => {
242
+ return attributes in error ? error[attributes] : emptyAttributes;
243
+ };
244
+ const emptyAttributes = {};
245
+ //# sourceMappingURL=ErrorReporter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorReporter.js","names":["Effect","effect","references","Layer","LogLevel","TypeId","make","report","reported","WeakSet","options","has","cause","add","i","reasons","length","reason","_tag","original","error","defect","isObject","isIgnored","pretty","causePrettyError","annotations","severity","getSeverity","attributes","getAttributes","emptyAttributes","CurrentErrorReporters","layer","reporters","withFiber","fnUntraced","fiber","currentReporters","Set","mergeWithExisting","getRef","reporter","isEffect","reportCauseUnsafe","void","ignore","u","values","includes"],"sources":["../src/ErrorReporter.ts"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
@@ -2,11 +2,11 @@
2
2
  * @since 3.16.0
3
3
  */
4
4
  import type { NonEmptyReadonlyArray } from "./Array.ts";
5
+ import * as Context from "./Context.ts";
5
6
  import type * as Effect from "./Effect.ts";
6
7
  import * as Layer from "./Layer.ts";
7
8
  import type { Pipeable } from "./Pipeable.ts";
8
9
  import type * as Schedule from "./Schedule.ts";
9
- import * as ServiceMap from "./ServiceMap.ts";
10
10
  /**
11
11
  * @since 3.16.0
12
12
  * @category Type IDs
@@ -73,7 +73,7 @@ export interface ExecutionPlan<Config extends {
73
73
  }> extends Pipeable {
74
74
  readonly [TypeId]: TypeId;
75
75
  readonly steps: NonEmptyReadonlyArray<{
76
- readonly provide: ServiceMap.ServiceMap<Config["provides"]> | Layer.Layer<Config["provides"], Config["error"], Config["requirements"]>;
76
+ readonly provide: Context.Context<Config["provides"]> | Layer.Layer<Config["provides"], Config["error"], Config["requirements"]>;
77
77
  readonly attempts?: number | undefined;
78
78
  readonly while?: ((input: Config["input"]) => Effect.Effect<boolean, Config["error"], Config["requirements"]>) | undefined;
79
79
  readonly schedule?: Schedule.Schedule<any, Config["input"], Config["requirements"]> | undefined;
@@ -145,7 +145,7 @@ export type ConfigBase = {
145
145
  export declare const make: <const Steps extends NonEmptyReadonlyArray<make.Step>>(...steps: Steps & { [K in keyof Steps]: make.Step; }) => ExecutionPlan<{
146
146
  provides: make.StepProvides<Steps>;
147
147
  input: make.StepInput<Steps>;
148
- error: (Steps[number]["provide"] extends ServiceMap.ServiceMap<infer _P> | Layer.Layer<infer _P, infer E, infer _R> ? E : never) | (Steps[number]["while"] extends (input: infer _I) => Effect.Effect<infer _A, infer _E, infer _R_1> ? _E : never);
148
+ error: (Steps[number]["provide"] extends Context.Context<infer _P> | Layer.Layer<infer _P, infer E, infer _R> ? E : never) | (Steps[number]["while"] extends (input: infer _I) => Effect.Effect<infer _A, infer _E, infer _R_1> ? _E : never);
149
149
  requirements: (Steps[number]["provide"] extends Layer.Layer<infer _A_1, infer _E_1, infer R> ? R : never) | (Steps[number]["while"] extends (input: infer _I) => Effect.Effect<infer _A_1, infer _E_2, infer R_1> ? R_1 : never) | (Steps[number]["schedule"] extends Schedule.Schedule<infer _O, infer _I, infer R_2> ? R_2 : never);
150
150
  }>;
151
151
  /**
@@ -156,7 +156,7 @@ export declare namespace make {
156
156
  * @since 3.16.0
157
157
  */
158
158
  type Step = {
159
- readonly provide: ServiceMap.ServiceMap<any> | ServiceMap.ServiceMap<never> | Layer.Any;
159
+ readonly provide: Context.Context<any> | Context.Context<never> | Layer.Any;
160
160
  readonly attempts?: number | undefined;
161
161
  readonly while?: ((input: any) => boolean | Effect.Effect<boolean, any, any>) | undefined;
162
162
  readonly schedule?: Schedule.Schedule<any, any, any> | undefined;
@@ -165,7 +165,7 @@ export declare namespace make {
165
165
  * @since 3.16.1
166
166
  */
167
167
  type StepProvides<Steps extends ReadonlyArray<any>, Out = unknown> = Steps extends readonly [infer Step, ...infer Rest] ? StepProvides<Rest, Out & ((Step extends {
168
- readonly provide: ServiceMap.ServiceMap<infer P> | Layer.Layer<infer P, infer _E, infer _R>;
168
+ readonly provide: Context.Context<infer P> | Layer.Layer<infer P, infer _E, infer _R>;
169
169
  } ? P : unknown))> : Out;
170
170
  /**
171
171
  * @since 3.16.1
@@ -206,5 +206,5 @@ export interface Metadata {
206
206
  * @since 4.0.0
207
207
  * @category Metadata
208
208
  */
209
- export declare const CurrentMetadata: ServiceMap.Reference<Metadata>;
209
+ export declare const CurrentMetadata: Context.Reference<Metadata>;
210
210
  //# sourceMappingURL=ExecutionPlan.d.ts.map