effect 4.0.0-beta.6 → 4.0.0-beta.7

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 (273) hide show
  1. package/dist/Cache.d.ts +2 -2
  2. package/dist/Cache.d.ts.map +1 -1
  3. package/dist/Cache.js +1 -1
  4. package/dist/Cache.js.map +1 -1
  5. package/dist/Config.d.ts +2 -2
  6. package/dist/Config.js +3 -3
  7. package/dist/Config.js.map +1 -1
  8. package/dist/DateTime.d.ts +23 -161
  9. package/dist/DateTime.d.ts.map +1 -1
  10. package/dist/DateTime.js +6 -51
  11. package/dist/DateTime.js.map +1 -1
  12. package/dist/Duration.d.ts +12 -12
  13. package/dist/Duration.d.ts.map +1 -1
  14. package/dist/Duration.js +12 -12
  15. package/dist/Duration.js.map +1 -1
  16. package/dist/Effect.d.ts +13 -13
  17. package/dist/Effect.d.ts.map +1 -1
  18. package/dist/Effect.js +1 -1
  19. package/dist/Effect.js.map +1 -1
  20. package/dist/Formatter.d.ts +131 -47
  21. package/dist/Formatter.d.ts.map +1 -1
  22. package/dist/Formatter.js +228 -50
  23. package/dist/Formatter.js.map +1 -1
  24. package/dist/JsonSchema.d.ts +299 -10
  25. package/dist/JsonSchema.d.ts.map +1 -1
  26. package/dist/JsonSchema.js +323 -4
  27. package/dist/JsonSchema.js.map +1 -1
  28. package/dist/LayerMap.d.ts +4 -4
  29. package/dist/LayerMap.d.ts.map +1 -1
  30. package/dist/LogLevel.d.ts +27 -0
  31. package/dist/LogLevel.d.ts.map +1 -1
  32. package/dist/LogLevel.js +28 -100
  33. package/dist/LogLevel.js.map +1 -1
  34. package/dist/Logger.d.ts +4 -4
  35. package/dist/Logger.d.ts.map +1 -1
  36. package/dist/Metric.d.ts +2 -2
  37. package/dist/Metric.d.ts.map +1 -1
  38. package/dist/Metric.js +1 -1
  39. package/dist/Metric.js.map +1 -1
  40. package/dist/Pool.d.ts +1 -1
  41. package/dist/Pool.d.ts.map +1 -1
  42. package/dist/Pool.js +1 -1
  43. package/dist/Pool.js.map +1 -1
  44. package/dist/Random.d.ts +1 -1
  45. package/dist/Random.d.ts.map +1 -1
  46. package/dist/Random.js +3 -12
  47. package/dist/Random.js.map +1 -1
  48. package/dist/RcMap.d.ts +2 -2
  49. package/dist/RcMap.d.ts.map +1 -1
  50. package/dist/RcMap.js +1 -1
  51. package/dist/RcMap.js.map +1 -1
  52. package/dist/RcRef.d.ts +1 -1
  53. package/dist/RcRef.d.ts.map +1 -1
  54. package/dist/RequestResolver.d.ts +6 -6
  55. package/dist/RequestResolver.d.ts.map +1 -1
  56. package/dist/RequestResolver.js.map +1 -1
  57. package/dist/Schedule.d.ts +20 -11
  58. package/dist/Schedule.d.ts.map +1 -1
  59. package/dist/Schedule.js +23 -9
  60. package/dist/Schedule.js.map +1 -1
  61. package/dist/Schema.d.ts +4 -4
  62. package/dist/Schema.d.ts.map +1 -1
  63. package/dist/ScopedCache.d.ts +2 -2
  64. package/dist/ScopedCache.d.ts.map +1 -1
  65. package/dist/ScopedCache.js +1 -1
  66. package/dist/ScopedCache.js.map +1 -1
  67. package/dist/Stream.d.ts +19 -19
  68. package/dist/Stream.d.ts.map +1 -1
  69. package/dist/Stream.js +3 -3
  70. package/dist/Stream.js.map +1 -1
  71. package/dist/index.d.ts +134 -0
  72. package/dist/index.d.ts.map +1 -1
  73. package/dist/index.js +134 -0
  74. package/dist/index.js.map +1 -1
  75. package/dist/internal/dateTime.js +3 -11
  76. package/dist/internal/dateTime.js.map +1 -1
  77. package/dist/internal/effect.js +2 -2
  78. package/dist/internal/effect.js.map +1 -1
  79. package/dist/internal/random.d.ts +2 -0
  80. package/dist/internal/random.d.ts.map +1 -0
  81. package/dist/internal/random.js +13 -0
  82. package/dist/internal/random.js.map +1 -0
  83. package/dist/internal/rcRef.js +1 -1
  84. package/dist/internal/rcRef.js.map +1 -1
  85. package/dist/testing/TestClock.d.ts +4 -4
  86. package/dist/testing/TestClock.d.ts.map +1 -1
  87. package/dist/testing/TestClock.js +1 -1
  88. package/dist/testing/TestClock.js.map +1 -1
  89. package/dist/testing/TestSchema.d.ts +6 -6
  90. package/dist/testing/TestSchema.d.ts.map +1 -1
  91. package/dist/unstable/ai/AiError.d.ts +10 -10
  92. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  93. package/dist/unstable/ai/Chat.d.ts +3 -3
  94. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  95. package/dist/unstable/ai/Chat.js +2 -2
  96. package/dist/unstable/ai/Chat.js.map +1 -1
  97. package/dist/unstable/ai/LanguageModel.d.ts +2 -2
  98. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  99. package/dist/unstable/ai/McpServer.d.ts +1 -1
  100. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  101. package/dist/unstable/ai/McpServer.js.map +1 -1
  102. package/dist/unstable/ai/Prompt.d.ts +17 -17
  103. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  104. package/dist/unstable/ai/Response.d.ts +23 -23
  105. package/dist/unstable/ai/Response.d.ts.map +1 -1
  106. package/dist/unstable/ai/Response.js +1 -1
  107. package/dist/unstable/ai/Response.js.map +1 -1
  108. package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
  109. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  110. package/dist/unstable/cluster/ClusterCron.js +1 -1
  111. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  112. package/dist/unstable/cluster/Entity.d.ts +3 -3
  113. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  114. package/dist/unstable/cluster/EntityResource.d.ts +2 -2
  115. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  116. package/dist/unstable/cluster/K8sHttpClient.js +1 -1
  117. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  118. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  119. package/dist/unstable/cluster/Sharding.d.ts +2 -2
  120. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  121. package/dist/unstable/cluster/Sharding.js +1 -1
  122. package/dist/unstable/cluster/Sharding.js.map +1 -1
  123. package/dist/unstable/cluster/ShardingConfig.d.ts +21 -21
  124. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  125. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  126. package/dist/unstable/cluster/SqlRunnerStorage.js +1 -1
  127. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  128. package/dist/unstable/cluster/internal/entityManager.js +1 -1
  129. package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
  130. package/dist/unstable/encoding/Sse.d.ts +2 -2
  131. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  132. package/dist/unstable/encoding/Sse.js.map +1 -1
  133. package/dist/unstable/http/Cookies.d.ts +1 -1
  134. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  135. package/dist/unstable/http/Cookies.js +2 -2
  136. package/dist/unstable/http/Cookies.js.map +1 -1
  137. package/dist/unstable/http/HttpClient.d.ts +4 -4
  138. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  139. package/dist/unstable/http/HttpClientRequest.d.ts +11 -11
  140. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  141. package/dist/unstable/http/HttpClientRequest.js +8 -1
  142. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  143. package/dist/unstable/http/HttpMethod.d.ts +4 -4
  144. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  145. package/dist/unstable/http/HttpMethod.js +3 -3
  146. package/dist/unstable/http/HttpMethod.js.map +1 -1
  147. package/dist/unstable/observability/Otlp.d.ts +12 -12
  148. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  149. package/dist/unstable/observability/OtlpExporter.d.ts +2 -2
  150. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  151. package/dist/unstable/observability/OtlpExporter.js +1 -1
  152. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  153. package/dist/unstable/observability/OtlpLogger.d.ts +4 -4
  154. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  155. package/dist/unstable/observability/OtlpMetrics.d.ts +4 -4
  156. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  157. package/dist/unstable/observability/OtlpTracer.d.ts +4 -4
  158. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  159. package/dist/unstable/persistence/Persistable.d.ts +2 -2
  160. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  161. package/dist/unstable/persistence/PersistedQueue.d.ts +12 -12
  162. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  163. package/dist/unstable/persistence/PersistedQueue.js +6 -6
  164. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  165. package/dist/unstable/persistence/Persistence.d.ts +1 -1
  166. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  167. package/dist/unstable/persistence/Persistence.js +2 -2
  168. package/dist/unstable/persistence/Persistence.js.map +1 -1
  169. package/dist/unstable/persistence/RateLimiter.d.ts +3 -3
  170. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  171. package/dist/unstable/persistence/RateLimiter.js +1 -1
  172. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  173. package/dist/unstable/process/ChildProcess.d.ts +1 -1
  174. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  175. package/dist/unstable/reactivity/Atom.d.ts +6 -6
  176. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  177. package/dist/unstable/reactivity/Atom.js +3 -3
  178. package/dist/unstable/reactivity/Atom.js.map +1 -1
  179. package/dist/unstable/reactivity/AtomHttpApi.d.ts +1 -1
  180. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  181. package/dist/unstable/reactivity/AtomHttpApi.js +1 -1
  182. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  183. package/dist/unstable/reactivity/AtomRpc.d.ts +1 -1
  184. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  185. package/dist/unstable/reactivity/AtomRpc.js +1 -1
  186. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  187. package/dist/unstable/rpc/Rpc.d.ts +2 -2
  188. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  189. package/dist/unstable/rpc/RpcClient.d.ts +5 -26
  190. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  191. package/dist/unstable/rpc/RpcClient.js +3 -11
  192. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  193. package/dist/unstable/socket/Socket.d.ts +4 -4
  194. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  195. package/dist/unstable/sql/SqlModel.d.ts +2 -2
  196. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  197. package/dist/unstable/sql/SqlModel.js +3 -3
  198. package/dist/unstable/sql/SqlModel.js.map +1 -1
  199. package/dist/unstable/sql/SqlSchema.d.ts +16 -5
  200. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  201. package/dist/unstable/sql/SqlSchema.js +17 -7
  202. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  203. package/dist/unstable/workflow/DurableClock.d.ts +3 -3
  204. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  205. package/dist/unstable/workflow/DurableClock.js +3 -3
  206. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  207. package/package.json +1 -1
  208. package/src/Cache.ts +3 -3
  209. package/src/Config.ts +3 -3
  210. package/src/DateTime.ts +24 -164
  211. package/src/Duration.ts +15 -15
  212. package/src/Effect.ts +15 -15
  213. package/src/Formatter.ts +252 -50
  214. package/src/JsonSchema.ts +383 -10
  215. package/src/LayerMap.ts +5 -5
  216. package/src/LogLevel.ts +31 -0
  217. package/src/Logger.ts +5 -5
  218. package/src/Metric.ts +4 -4
  219. package/src/Pool.ts +4 -4
  220. package/src/Random.ts +5 -14
  221. package/src/RcMap.ts +5 -5
  222. package/src/RcRef.ts +1 -1
  223. package/src/RequestResolver.ts +9 -9
  224. package/src/Schedule.ts +44 -25
  225. package/src/Schema.ts +4 -4
  226. package/src/ScopedCache.ts +3 -3
  227. package/src/Stream.ts +34 -34
  228. package/src/index.ts +134 -0
  229. package/src/internal/dateTime.ts +9 -30
  230. package/src/internal/effect.ts +21 -21
  231. package/src/internal/random.ts +20 -0
  232. package/src/internal/rcRef.ts +2 -2
  233. package/src/testing/TestClock.ts +5 -5
  234. package/src/testing/TestSchema.ts +8 -8
  235. package/src/unstable/ai/AiError.ts +1 -1
  236. package/src/unstable/ai/Chat.ts +10 -10
  237. package/src/unstable/ai/LanguageModel.ts +3 -3
  238. package/src/unstable/ai/McpServer.ts +2 -2
  239. package/src/unstable/ai/Prompt.ts +17 -17
  240. package/src/unstable/ai/Response.ts +23 -23
  241. package/src/unstable/cluster/ClusterCron.ts +2 -2
  242. package/src/unstable/cluster/Entity.ts +5 -5
  243. package/src/unstable/cluster/EntityResource.ts +4 -4
  244. package/src/unstable/cluster/K8sHttpClient.ts +1 -1
  245. package/src/unstable/cluster/MessageStorage.ts +1 -4
  246. package/src/unstable/cluster/Sharding.ts +3 -3
  247. package/src/unstable/cluster/ShardingConfig.ts +10 -11
  248. package/src/unstable/cluster/SqlRunnerStorage.ts +1 -1
  249. package/src/unstable/cluster/internal/entityManager.ts +3 -3
  250. package/src/unstable/encoding/Sse.ts +2 -4
  251. package/src/unstable/http/Cookies.ts +3 -3
  252. package/src/unstable/http/HttpClient.ts +4 -4
  253. package/src/unstable/http/HttpClientRequest.ts +15 -11
  254. package/src/unstable/http/HttpMethod.ts +16 -4
  255. package/src/unstable/observability/Otlp.ts +12 -12
  256. package/src/unstable/observability/OtlpExporter.ts +3 -3
  257. package/src/unstable/observability/OtlpLogger.ts +4 -4
  258. package/src/unstable/observability/OtlpMetrics.ts +4 -4
  259. package/src/unstable/observability/OtlpTracer.ts +4 -4
  260. package/src/unstable/persistence/Persistable.ts +2 -2
  261. package/src/unstable/persistence/PersistedQueue.ts +18 -18
  262. package/src/unstable/persistence/Persistence.ts +3 -3
  263. package/src/unstable/persistence/RateLimiter.ts +4 -4
  264. package/src/unstable/process/ChildProcess.ts +1 -1
  265. package/src/unstable/reactivity/Atom.ts +13 -13
  266. package/src/unstable/reactivity/AtomHttpApi.ts +3 -3
  267. package/src/unstable/reactivity/AtomRpc.ts +3 -3
  268. package/src/unstable/rpc/Rpc.ts +3 -3
  269. package/src/unstable/rpc/RpcClient.ts +8 -51
  270. package/src/unstable/socket/Socket.ts +4 -4
  271. package/src/unstable/sql/SqlModel.ts +5 -5
  272. package/src/unstable/sql/SqlSchema.ts +41 -25
  273. package/src/unstable/workflow/DurableClock.ts +8 -8
@@ -81,7 +81,7 @@ export interface TestClock extends Clock.Clock {
81
81
  * that were scheduled to occur on or before the new time will be run in
82
82
  * order.
83
83
  */
84
- adjust(duration: Duration.DurationInput): Effect.Effect<void>
84
+ adjust(duration: Duration.Input): Effect.Effect<void>
85
85
  /**
86
86
  * Sets the current clock time to the specified `timestamp`. Any effects that
87
87
  * were scheduled to occur on or before the new time will be run in order.
@@ -141,7 +141,7 @@ export declare namespace TestClock {
141
141
  * The amount of time to wait before displaying a warning message when a
142
142
  * test is using time but is not advancing the `TestClock`.
143
143
  */
144
- readonly warningDelay?: Duration.DurationInput
144
+ readonly warningDelay?: Duration.Input
145
145
  }
146
146
 
147
147
  /**
@@ -319,8 +319,8 @@ export const make = Effect.fnUntraced(function*(
319
319
  currentTimestamp = endTimestamp
320
320
  }, runSemaphore.withPermits(1))
321
321
 
322
- function adjust(duration: Duration.DurationInput) {
323
- const millis = Duration.toMillis(Duration.fromDurationInputUnsafe(duration))
322
+ function adjust(duration: Duration.Input) {
323
+ const millis = Duration.toMillis(Duration.fromInputUnsafe(duration))
324
324
  return warningDone.pipe(Effect.andThen(run((timestamp) => timestamp + millis)))
325
325
  }
326
326
 
@@ -431,7 +431,7 @@ export const testClockWith = <A, E, R>(
431
431
  * @since 2.0.0
432
432
  * @category utils
433
433
  */
434
- export const adjust = (duration: Duration.DurationInput): Effect.Effect<void> =>
434
+ export const adjust = (duration: Duration.Input): Effect.Effect<void> =>
435
435
  testClockWith((testClock) => testClock.adjust(duration))
436
436
 
437
437
  /**
@@ -156,16 +156,16 @@ export class Decoding<S extends Schema.Top> {
156
156
  /**
157
157
  * Asserts that decoding succeeds with the expected value.
158
158
  */
159
- async succeed<S extends Schema.Codec<unknown, unknown, never, unknown>>(
159
+ async succeed<S extends Schema.Decoder<unknown, never>>(
160
160
  this: Decoding<S>,
161
161
  input: unknown
162
162
  ): Promise<void>
163
- async succeed<S extends Schema.Codec<unknown, unknown, never, unknown>>(
163
+ async succeed<S extends Schema.Decoder<unknown, never>>(
164
164
  this: Decoding<S>,
165
165
  input: unknown,
166
166
  expected: S["Type"]
167
167
  ): Promise<void>
168
- async succeed<S extends Schema.Codec<unknown, unknown, never, unknown>>(
168
+ async succeed<S extends Schema.Decoder<unknown, never>>(
169
169
  this: Decoding<S>,
170
170
  input: unknown,
171
171
  expected?: S["Type"]
@@ -182,7 +182,7 @@ export class Decoding<S extends Schema.Top> {
182
182
  /**
183
183
  * Asserts that decoding fails with the expected error message.
184
184
  */
185
- async fail<S extends Schema.Codec<unknown, unknown, never, unknown>>(
185
+ async fail<S extends Schema.Decoder<unknown, never>>(
186
186
  this: Decoding<S>,
187
187
  input: unknown,
188
188
  message: string
@@ -232,16 +232,16 @@ class Encoding<S extends Schema.Top> {
232
232
  /**
233
233
  * Asserts that encoding succeeds with the expected value.
234
234
  */
235
- async succeed<S extends Schema.Codec<unknown, unknown, unknown, never>>(
235
+ async succeed<S extends Schema.Encoder<unknown, never>>(
236
236
  this: Encoding<S>,
237
237
  input: unknown
238
238
  ): Promise<void>
239
- async succeed<S extends Schema.Codec<unknown, unknown, unknown, never>>(
239
+ async succeed<S extends Schema.Encoder<unknown, never>>(
240
240
  this: Encoding<S>,
241
241
  input: unknown,
242
242
  expected: S["Encoded"]
243
243
  ): Promise<void>
244
- async succeed<S extends Schema.Codec<unknown, unknown, unknown, never>>(
244
+ async succeed<S extends Schema.Encoder<unknown, never>>(
245
245
  this: Encoding<S>,
246
246
  input: unknown,
247
247
  expected?: S["Encoded"]
@@ -258,7 +258,7 @@ class Encoding<S extends Schema.Top> {
258
258
  /**
259
259
  * Asserts that encoding fails with the expected error message.
260
260
  */
261
- async fail<S extends Schema.Codec<unknown, unknown, unknown, never>>(
261
+ async fail<S extends Schema.Encoder<unknown, never>>(
262
262
  this: Encoding<S>,
263
263
  input: unknown,
264
264
  message: string
@@ -249,7 +249,7 @@ export class NetworkError extends Schema.ErrorClass<NetworkError>(
249
249
  */
250
250
  export const ProviderMetadata: Schema.$Record<
251
251
  Schema.String,
252
- Schema.NullOr<Schema.Codec<Schema.MutableJson, Schema.MutableJson, never, never>>
252
+ Schema.NullOr<Schema.Codec<Schema.MutableJson>>
253
253
  > = Schema.Record(Schema.String, Schema.NullOr(Schema.MutableJson))
254
254
 
255
255
  /**
@@ -277,7 +277,7 @@ export interface Service {
277
277
  */
278
278
  readonly generateObject: <
279
279
  ObjectEncoded extends Record<string, any>,
280
- ObjectSchema extends Schema.Codec<any, ObjectEncoded, any, any>,
280
+ ObjectSchema extends Schema.Encoder<ObjectEncoded, unknown>,
281
281
  Options extends NoExcessProperties<LanguageModel.GenerateObjectOptions<any, ObjectSchema>, Options>,
282
282
  Tools extends Record<string, Tool.Any> = {}
283
283
  >(options: Options & LanguageModel.GenerateObjectOptions<Tools, ObjectSchema>) => Effect.Effect<
@@ -628,7 +628,7 @@ export declare namespace Persistence {
628
628
  * the persistence store, a `ChatNotFoundError` will be returned.
629
629
  */
630
630
  readonly get: (chatId: string, options?: {
631
- readonly timeToLive?: Duration.DurationInput | undefined
631
+ readonly timeToLive?: Duration.Input | undefined
632
632
  }) => Effect.Effect<Persisted, ChatNotFoundError | PersistenceError>
633
633
 
634
634
  /**
@@ -638,7 +638,7 @@ export declare namespace Persistence {
638
638
  * returned.
639
639
  */
640
640
  readonly getOrCreate: (chatId: string, options?: {
641
- readonly timeToLive?: Duration.DurationInput | undefined
641
+ readonly timeToLive?: Duration.Input | undefined
642
642
  }) => Effect.Effect<Persisted, AiError.AiError | PersistenceError>
643
643
  }
644
644
  }
@@ -681,7 +681,7 @@ export const makePersisted = Effect.fnUntraced(function*(options: {
681
681
  const store = yield* persistence.make(options.storeId)
682
682
 
683
683
  const toPersisted = Effect.fnUntraced(
684
- function*(chatId: string, chat: Service, ttl: Duration.DurationInput | undefined) {
684
+ function*(chatId: string, chat: Service, ttl: Duration.Input | undefined) {
685
685
  const idGenerator = yield* Effect.serviceOption(IdGenerator.IdGenerator).pipe(
686
686
  Effect.map(Option.getOrElse(() => IdGenerator.defaultIdGenerator))
687
687
  )
@@ -713,7 +713,7 @@ export const makePersisted = Effect.fnUntraced(function*(options: {
713
713
  yield* Ref.set(chat.history, history)
714
714
  // Export the chat history
715
715
  const exported = yield* Effect.orDie(chat.export)
716
- const timeToLive = Predicate.isNotUndefined(ttl) ? Duration.fromDurationInput(ttl) : undefined
716
+ const timeToLive = Predicate.isNotUndefined(ttl) ? Duration.fromInput(ttl) : undefined
717
717
  // Save the chat to the backing store
718
718
  yield* store.set(chatId, exported as object, timeToLive)
719
719
  }
@@ -749,13 +749,13 @@ export const makePersisted = Effect.fnUntraced(function*(options: {
749
749
  )
750
750
 
751
751
  const createChat = Effect.fnUntraced(
752
- function*(chatId: string, ttl: Duration.DurationInput | undefined) {
752
+ function*(chatId: string, ttl: Duration.Input | undefined) {
753
753
  // Create an empty chat
754
754
  const chat = yield* empty
755
755
  // Export the chat history
756
756
  const history = yield* Effect.orDie(chat.export)
757
757
  // Save the history for the newly created chat
758
- const timeToLive = Predicate.isNotUndefined(ttl) ? Duration.fromDurationInput(ttl) : undefined
758
+ const timeToLive = Predicate.isNotUndefined(ttl) ? Duration.fromInput(ttl) : undefined
759
759
  yield* store.set(chatId, history as object, timeToLive)
760
760
  // Convert the chat to a persisted chat
761
761
  return yield* toPersisted(chatId, chat, ttl)
@@ -763,7 +763,7 @@ export const makePersisted = Effect.fnUntraced(function*(options: {
763
763
  )
764
764
 
765
765
  const getChat = Effect.fnUntraced(
766
- function*(chatId: string, ttl: Duration.DurationInput | undefined) {
766
+ function*(chatId: string, ttl: Duration.Input | undefined) {
767
767
  // Create an empty chat
768
768
  const chat = yield* empty
769
769
  // Attempt to retrieve the previous history from the store
@@ -784,7 +784,7 @@ export const makePersisted = Effect.fnUntraced(function*(options: {
784
784
 
785
785
  const get = Effect.fnUntraced(
786
786
  function*(chatId: string, options?: {
787
- readonly timeToLive?: Duration.DurationInput | undefined
787
+ readonly timeToLive?: Duration.Input | undefined
788
788
  }) {
789
789
  return yield* getChat(chatId, options?.timeToLive)
790
790
  },
@@ -796,7 +796,7 @@ export const makePersisted = Effect.fnUntraced(function*(options: {
796
796
 
797
797
  const getOrCreate = Effect.fnUntraced(
798
798
  function*(chatId: string, options?: {
799
- readonly timeToLive?: Duration.DurationInput | undefined
799
+ readonly timeToLive?: Duration.Input | undefined
800
800
  }) {
801
801
  return yield* getChat(chatId, options?.timeToLive).pipe(
802
802
  Effect.catchTag("ChatNotFoundError", () => createChat(chatId, options?.timeToLive))
@@ -135,7 +135,7 @@ export interface Service {
135
135
  */
136
136
  readonly generateObject: <
137
137
  ObjectEncoded extends Record<string, any>,
138
- StructuredOutputSchema extends Schema.Codec<any, ObjectEncoded, any, any>,
138
+ StructuredOutputSchema extends Schema.Encoder<ObjectEncoded, unknown>,
139
139
  Options extends NoExcessProperties<
140
140
  GenerateObjectOptions<any, StructuredOutputSchema>,
141
141
  Options
@@ -728,7 +728,7 @@ export const make: (params: ConstructorParams) => Effect.Effect<Service> = Effec
728
728
 
729
729
  const generateObject = <
730
730
  ObjectEncoded extends Record<string, any>,
731
- StructuredOutputSchema extends Schema.Codec<any, ObjectEncoded, any, any>,
731
+ StructuredOutputSchema extends Schema.Encoder<ObjectEncoded, unknown>,
732
732
  Options extends NoExcessProperties<
733
733
  GenerateObjectOptions<any, StructuredOutputSchema>,
734
734
  Options
@@ -1359,7 +1359,7 @@ export const generateText = <
1359
1359
  */
1360
1360
  export const generateObject = <
1361
1361
  ObjectEncoded extends Record<string, any>,
1362
- StructuredOutputSchema extends Schema.Codec<any, ObjectEncoded, any, any>,
1362
+ StructuredOutputSchema extends Schema.Encoder<ObjectEncoded, unknown>,
1363
1363
  Options extends NoExcessProperties<
1364
1364
  GenerateObjectOptions<any, StructuredOutputSchema>,
1365
1365
  Options
@@ -992,14 +992,14 @@ export const prompt = <
992
992
  * @since 4.0.0
993
993
  * @category elicitation
994
994
  */
995
- export const elicit: <S extends Schema.Codec<any, Record<string, unknown>, any, any>>(options: {
995
+ export const elicit: <S extends Schema.Encoder<Record<string, unknown>, unknown>>(options: {
996
996
  readonly message: string
997
997
  readonly schema: S
998
998
  }) => Effect.Effect<
999
999
  S["Type"],
1000
1000
  ElicitationDeclined,
1001
1001
  McpServerClient | S["DecodingServices"]
1002
- > = Effect.fnUntraced(function*<S extends Schema.Codec<any, Record<string, unknown>, any, any>>(options: {
1002
+ > = Effect.fnUntraced(function*<S extends Schema.Encoder<Record<string, unknown>, unknown>>(options: {
1003
1003
  readonly message: string
1004
1004
  readonly schema: S
1005
1005
  }) {
@@ -88,7 +88,7 @@ const constEmptyObject = () => ({})
88
88
  */
89
89
  export const ProviderOptions: Schema.$Record<
90
90
  Schema.String,
91
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
91
+ Schema.NullOr<Schema.Codec<Schema.Json>>
92
92
  > = Schema.Record(Schema.String, Schema.NullOr(Schema.Json))
93
93
 
94
94
  /**
@@ -311,7 +311,7 @@ export const TextPart: Schema.Struct<
311
311
  readonly options: Schema.withDecodingDefault<
312
312
  Schema.$Record<
313
313
  Schema.String,
314
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
314
+ Schema.NullOr<Schema.Codec<Schema.Json>>
315
315
  >
316
316
  >
317
317
  }
@@ -391,7 +391,7 @@ export const ReasoningPart: Schema.Struct<{
391
391
  readonly options: Schema.withDecodingDefault<
392
392
  Schema.$Record<
393
393
  Schema.String,
394
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
394
+ Schema.NullOr<Schema.Codec<Schema.Json>>
395
395
  >
396
396
  >
397
397
  }> = Schema.Struct({
@@ -499,7 +499,7 @@ export const FilePart: Schema.Struct<{
499
499
  readonly options: Schema.withDecodingDefault<
500
500
  Schema.$Record<
501
501
  Schema.String,
502
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
502
+ Schema.NullOr<Schema.Codec<Schema.Json>>
503
503
  >
504
504
  >
505
505
  }> = Schema.Struct({
@@ -609,7 +609,7 @@ export const ToolCallPart: Schema.Struct<{
609
609
  readonly options: Schema.withDecodingDefault<
610
610
  Schema.$Record<
611
611
  Schema.String,
612
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
612
+ Schema.NullOr<Schema.Codec<Schema.Json>>
613
613
  >
614
614
  >
615
615
  }> = Schema.Struct({
@@ -725,7 +725,7 @@ export const ToolResultPart: Schema.Struct<{
725
725
  readonly options: Schema.withDecodingDefault<
726
726
  Schema.$Record<
727
727
  Schema.String,
728
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
728
+ Schema.NullOr<Schema.Codec<Schema.Json>>
729
729
  >
730
730
  >
731
731
  }> = Schema.Struct({
@@ -843,7 +843,7 @@ export const ToolApprovalResponsePart: Schema.Struct<{
843
843
  readonly options: Schema.withDecodingDefault<
844
844
  Schema.$Record<
845
845
  Schema.String,
846
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
846
+ Schema.NullOr<Schema.Codec<Schema.Json>>
847
847
  >
848
848
  >
849
849
  }> = Schema.Struct({
@@ -944,7 +944,7 @@ export const ToolApprovalRequestPart: Schema.Struct<{
944
944
  readonly options: Schema.withDecodingDefault<
945
945
  Schema.$Record<
946
946
  Schema.String,
947
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
947
+ Schema.NullOr<Schema.Codec<Schema.Json>>
948
948
  >
949
949
  >
950
950
  }> = Schema.Struct({
@@ -1089,7 +1089,7 @@ export const ContentFromString: Schema.decodeTo<
1089
1089
  readonly options: Schema.withDecodingDefault<
1090
1090
  Schema.$Record<
1091
1091
  Schema.String,
1092
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
1092
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1093
1093
  >
1094
1094
  >
1095
1095
  }>
@@ -1168,7 +1168,7 @@ export const SystemMessage: Schema.Struct<{
1168
1168
  readonly options: Schema.withDecodingDefault<
1169
1169
  Schema.$Record<
1170
1170
  Schema.String,
1171
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
1171
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1172
1172
  >
1173
1173
  >
1174
1174
  }> = Schema.Struct({
@@ -1287,7 +1287,7 @@ export const UserMessage: Schema.Struct<{
1287
1287
  readonly options: Schema.withDecodingDefault<
1288
1288
  Schema.$Record<
1289
1289
  Schema.String,
1290
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
1290
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1291
1291
  >
1292
1292
  >
1293
1293
  }>
@@ -1307,7 +1307,7 @@ export const UserMessage: Schema.Struct<{
1307
1307
  readonly options: Schema.withDecodingDefault<
1308
1308
  Schema.$Record<
1309
1309
  Schema.String,
1310
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
1310
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1311
1311
  >
1312
1312
  >
1313
1313
  }>,
@@ -1320,7 +1320,7 @@ export const UserMessage: Schema.Struct<{
1320
1320
  readonly options: Schema.withDecodingDefault<
1321
1321
  Schema.$Record<
1322
1322
  Schema.String,
1323
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
1323
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1324
1324
  >
1325
1325
  >
1326
1326
  }>
@@ -1333,7 +1333,7 @@ export const UserMessage: Schema.Struct<{
1333
1333
  readonly options: Schema.withDecodingDefault<
1334
1334
  Schema.$Record<
1335
1335
  Schema.String,
1336
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
1336
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1337
1337
  >
1338
1338
  >
1339
1339
  }> = Schema.Struct({
@@ -1472,7 +1472,7 @@ export const AssistantMessage: Schema.Struct<{
1472
1472
  readonly options: Schema.withDecodingDefault<
1473
1473
  Schema.$Record<
1474
1474
  Schema.String,
1475
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
1475
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1476
1476
  >
1477
1477
  >
1478
1478
  }>
@@ -1500,7 +1500,7 @@ export const AssistantMessage: Schema.Struct<{
1500
1500
  readonly options: Schema.withDecodingDefault<
1501
1501
  Schema.$Record<
1502
1502
  Schema.String,
1503
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
1503
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1504
1504
  >
1505
1505
  >
1506
1506
  }> = Schema.Struct({
@@ -1620,7 +1620,7 @@ export const ToolMessage: Schema.Struct<{
1620
1620
  readonly options: Schema.withDecodingDefault<
1621
1621
  Schema.$Record<
1622
1622
  Schema.String,
1623
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
1623
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1624
1624
  >
1625
1625
  >
1626
1626
  }> = Schema.Struct({
@@ -455,7 +455,7 @@ export type ToolResultParts<Tools extends Record<string, Tool.Any>> = {
455
455
  */
456
456
  export const ProviderMetadata: Schema.$Record<
457
457
  Schema.String,
458
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
458
+ Schema.NullOr<Schema.Codec<Schema.Json>>
459
459
  > = Schema.Record(Schema.String, Schema.NullOr(Schema.Json))
460
460
 
461
461
  /**
@@ -629,7 +629,7 @@ export const TextPart: Schema.Struct<{
629
629
  readonly text: Schema.String
630
630
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
631
631
  readonly metadata: Schema.withDecodingDefault<
632
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
632
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
633
633
  >
634
634
  }> = Schema.Struct({
635
635
  ...BasePart.fields,
@@ -689,7 +689,7 @@ export const TextStartPart: Schema.Struct<{
689
689
  readonly id: Schema.String
690
690
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
691
691
  readonly metadata: Schema.withDecodingDefault<
692
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
692
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
693
693
  >
694
694
  }> = Schema.Struct({
695
695
  ...BasePart.fields,
@@ -757,7 +757,7 @@ export const TextDeltaPart: Schema.Struct<{
757
757
  readonly delta: Schema.String
758
758
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
759
759
  readonly metadata: Schema.withDecodingDefault<
760
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
760
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
761
761
  >
762
762
  }> = Schema.Struct({
763
763
  ...BasePart.fields,
@@ -818,7 +818,7 @@ export const TextEndPart: Schema.Struct<{
818
818
  readonly id: Schema.String
819
819
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
820
820
  readonly metadata: Schema.withDecodingDefault<
821
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
821
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
822
822
  >
823
823
  }> = Schema.Struct({
824
824
  ...BasePart.fields,
@@ -889,7 +889,7 @@ export const ReasoningPart: Schema.Struct<{
889
889
  readonly text: Schema.String
890
890
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
891
891
  readonly metadata: Schema.withDecodingDefault<
892
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
892
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
893
893
  >
894
894
  }> = Schema.Struct({
895
895
  ...BasePart.fields,
@@ -949,7 +949,7 @@ export const ReasoningStartPart: Schema.Struct<{
949
949
  readonly id: Schema.String
950
950
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
951
951
  readonly metadata: Schema.withDecodingDefault<
952
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
952
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
953
953
  >
954
954
  }> = Schema.Struct({
955
955
  ...BasePart.fields,
@@ -1017,7 +1017,7 @@ export const ReasoningDeltaPart: Schema.Struct<{
1017
1017
  readonly delta: Schema.String
1018
1018
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
1019
1019
  readonly metadata: Schema.withDecodingDefault<
1020
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
1020
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
1021
1021
  >
1022
1022
  }> = Schema.Struct({
1023
1023
  ...BasePart.fields,
@@ -1078,7 +1078,7 @@ export const ReasoningEndPart: Schema.Struct<{
1078
1078
  readonly id: Schema.String
1079
1079
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
1080
1080
  readonly metadata: Schema.withDecodingDefault<
1081
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
1081
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
1082
1082
  >
1083
1083
  }> = Schema.Struct({
1084
1084
  ...BasePart.fields,
@@ -1159,7 +1159,7 @@ export const ToolParamsStartPart: Schema.Struct<{
1159
1159
  readonly providerExecuted: Schema.withDecodingDefaultKey<Schema.Boolean>
1160
1160
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
1161
1161
  readonly metadata: Schema.withDecodingDefault<
1162
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
1162
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
1163
1163
  >
1164
1164
  }> = Schema.Struct({
1165
1165
  ...BasePart.fields,
@@ -1234,7 +1234,7 @@ export const ToolParamsDeltaPart: Schema.Struct<{
1234
1234
  readonly delta: Schema.String
1235
1235
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
1236
1236
  readonly metadata: Schema.withDecodingDefault<
1237
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
1237
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
1238
1238
  >
1239
1239
  }> = Schema.Struct({
1240
1240
  ...BasePart.fields,
@@ -1299,7 +1299,7 @@ export const ToolParamsEndPart: Schema.Struct<{
1299
1299
  readonly id: Schema.String
1300
1300
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
1301
1301
  readonly metadata: Schema.withDecodingDefault<
1302
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
1302
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
1303
1303
  >
1304
1304
  }> = Schema.Struct({
1305
1305
  ...BasePart.fields,
@@ -1414,7 +1414,7 @@ export const ToolCallPart: <const Name extends string, Params extends Schema.Top
1414
1414
  readonly providerExecuted: Schema.withDecodingDefaultKey<Schema.Boolean>
1415
1415
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
1416
1416
  readonly metadata: Schema.withDecodingDefault<
1417
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
1417
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
1418
1418
  >
1419
1419
  }
1420
1420
  > = <const Name extends string, Params extends Schema.Top>(
@@ -1620,7 +1620,7 @@ export const ToolResultPart: <const Name extends string, Success extends Schema.
1620
1620
  readonly providerExecuted: Schema.Boolean
1621
1621
  readonly metadata: Schema.$Record<
1622
1622
  Schema.String,
1623
- Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>
1623
+ Schema.NullOr<Schema.Codec<Schema.Json>>
1624
1624
  >
1625
1625
  readonly encodedResult: Schema.toEncoded<Schema.Union<readonly [Success, Failure]>>
1626
1626
  readonly preliminary: Schema.Boolean
@@ -1635,7 +1635,7 @@ export const ToolResultPart: <const Name extends string, Success extends Schema.
1635
1635
  readonly result: Schema.toEncoded<Schema.Union<readonly [Success, Failure]>>
1636
1636
  readonly providerExecuted: Schema.optional<Schema.Boolean>
1637
1637
  readonly metadata: Schema.optional<
1638
- Schema.$Record<Schema.String, Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>
1638
+ Schema.$Record<Schema.String, Schema.NullOr<Schema.Codec<Schema.Json>>>
1639
1639
  >
1640
1640
  readonly preliminary: Schema.optional<Schema.Boolean>
1641
1641
  readonly id: Schema.String
@@ -1795,7 +1795,7 @@ export const ToolApprovalRequestPart: Schema.Struct<{
1795
1795
  readonly toolCallId: Schema.String
1796
1796
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
1797
1797
  readonly metadata: Schema.withDecodingDefault<
1798
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
1798
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
1799
1799
  >
1800
1800
  }> = Schema.Struct({
1801
1801
  ...BasePart.fields,
@@ -1888,7 +1888,7 @@ export const FilePart: Schema.Struct<{
1888
1888
  readonly data: Schema.Uint8ArrayFromBase64
1889
1889
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
1890
1890
  readonly metadata: Schema.withDecodingDefault<
1891
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
1891
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
1892
1892
  >
1893
1893
  }> = Schema.Struct({
1894
1894
  ...BasePart.fields,
@@ -1985,7 +1985,7 @@ export const DocumentSourcePart: Schema.Struct<{
1985
1985
  readonly fileName: Schema.optionalKey<Schema.String>
1986
1986
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
1987
1987
  readonly metadata: Schema.withDecodingDefault<
1988
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
1988
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
1989
1989
  >
1990
1990
  }> = Schema.Struct({
1991
1991
  ...BasePart.fields,
@@ -2076,7 +2076,7 @@ export const UrlSourcePart: Schema.Struct<{
2076
2076
  readonly title: Schema.String
2077
2077
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
2078
2078
  readonly metadata: Schema.withDecodingDefault<
2079
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
2079
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
2080
2080
  >
2081
2081
  }> = Schema.Struct({
2082
2082
  ...BasePart.fields,
@@ -2115,7 +2115,7 @@ export const UrlSourcePart: Schema.Struct<{
2115
2115
  * @category schemas
2116
2116
  */
2117
2117
  export const HttpRequestDetails = Schema.Struct({
2118
- method: Schema.Literals(["GET", "POST", "PATCH", "PUT", "DELETE", "HEAD", "OPTIONS"]),
2118
+ method: Schema.Literals(["GET", "POST", "PATCH", "PUT", "DELETE", "HEAD", "OPTIONS", "TRACE"]),
2119
2119
  url: Schema.String,
2120
2120
  urlParams: Schema.Array(Schema.Tuple([Schema.String, Schema.String])),
2121
2121
  hash: Schema.UndefinedOr(Schema.String),
@@ -2257,7 +2257,7 @@ export const ResponseMetadataPart: Schema.Struct<{
2257
2257
  readonly request: Schema.UndefinedOr<typeof HttpRequestDetails>
2258
2258
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
2259
2259
  readonly metadata: Schema.withDecodingDefault<
2260
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
2260
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
2261
2261
  >
2262
2262
  }> = Schema.Struct({
2263
2263
  ...BasePart.fields,
@@ -2464,7 +2464,7 @@ export const FinishPart: Schema.Struct<{
2464
2464
  readonly response: Schema.UndefinedOr<typeof HttpResponseDetails>
2465
2465
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
2466
2466
  readonly metadata: Schema.withDecodingDefault<
2467
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
2467
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
2468
2468
  >
2469
2469
  }> = Schema.Struct({
2470
2470
  ...BasePart.fields,
@@ -2527,7 +2527,7 @@ export const ErrorPart: Schema.Struct<{
2527
2527
  readonly error: Schema.Unknown
2528
2528
  readonly "~effect/ai/Content/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Content/Part">>
2529
2529
  readonly metadata: Schema.withDecodingDefault<
2530
- Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json>>
2530
+ Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
2531
2531
  >
2532
2532
  }> = Schema.Struct({
2533
2533
  ...BasePart.fields,
@@ -51,7 +51,7 @@ export const make = <E, R>(options: {
51
51
  *
52
52
  * Defaults to "1 day".
53
53
  */
54
- readonly skipIfOlderThan?: Duration.DurationInput | undefined
54
+ readonly skipIfOlderThan?: Duration.Input | undefined
55
55
  }): Layer.Layer<never, never, Sharding | Exclude<R, Scope>> => {
56
56
  const CronEntity = Entity.make(`ClusterCron/${options.name}`, [
57
57
  Rpc.make("run", {
@@ -76,7 +76,7 @@ export const make = <E, R>(options: {
76
76
  )
77
77
 
78
78
  const skipIfOlderThan = Option.fromUndefinedOr(options.skipIfOlderThan).pipe(
79
- Option.map(Duration.fromDurationInputUnsafe),
79
+ Option.map(Duration.fromInputUnsafe),
80
80
  Option.getOrElse(() => Duration.days(1))
81
81
  )
82
82
 
@@ -4,7 +4,7 @@
4
4
  import * as Arr from "../../Array.ts"
5
5
  import type * as Cause from "../../Cause.ts"
6
6
  import * as Data from "../../Data.ts"
7
- import type { DurationInput } from "../../Duration.ts"
7
+ import type * as Duration from "../../Duration.ts"
8
8
  import * as Effect from "../../Effect.ts"
9
9
  import * as Equal from "../../Equal.ts"
10
10
  import * as Exit from "../../Exit.ts"
@@ -117,7 +117,7 @@ export interface Entity<
117
117
  >(
118
118
  build: Handlers | Effect.Effect<Handlers, never, RX>,
119
119
  options?: {
120
- readonly maxIdleTime?: DurationInput | undefined
120
+ readonly maxIdleTime?: Duration.Input | undefined
121
121
  readonly concurrency?: number | "unbounded" | undefined
122
122
  readonly mailboxCapacity?: number | "unbounded" | undefined
123
123
  readonly disableFatalDefects?: boolean | undefined
@@ -160,7 +160,7 @@ export interface Entity<
160
160
  RX
161
161
  >,
162
162
  options?: {
163
- readonly maxIdleTime?: DurationInput | undefined
163
+ readonly maxIdleTime?: Duration.Input | undefined
164
164
  readonly mailboxCapacity?: number | "unbounded" | undefined
165
165
  readonly disableFatalDefects?: boolean | undefined
166
166
  readonly defectRetryPolicy?: Schedule.Schedule<any, unknown> | undefined
@@ -235,7 +235,7 @@ const Proto = {
235
235
  this: Entity<string, Rpcs>,
236
236
  build: Handlers | Effect.Effect<Handlers, never, RX>,
237
237
  options?: {
238
- readonly maxIdleTime?: DurationInput | undefined
238
+ readonly maxIdleTime?: Duration.Input | undefined
239
239
  readonly concurrency?: number | "unbounded" | undefined
240
240
  readonly mailboxCapacity?: number | "unbounded" | undefined
241
241
  readonly disableFatalDefects?: boolean | undefined
@@ -284,7 +284,7 @@ const Proto = {
284
284
  RX
285
285
  >,
286
286
  options?: {
287
- readonly maxIdleTime?: DurationInput | undefined
287
+ readonly maxIdleTime?: Duration.Input | undefined
288
288
  readonly mailboxCapacity?: number | "unbounded" | undefined
289
289
  readonly disableFatalDefects?: boolean | undefined
290
290
  readonly defectRetryPolicy?: Schedule.Schedule<any, unknown> | undefined