effect 4.0.0-beta.4 → 4.0.0-beta.6
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.
- package/dist/Cause.d.ts +1 -1
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +6 -4
- package/dist/Channel.js.map +1 -1
- package/dist/Config.d.ts +1 -1
- package/dist/Data.d.ts +3 -2
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +9 -8
- package/dist/Data.js.map +1 -1
- package/dist/Effect.d.ts +0 -226
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +0 -118
- package/dist/Effect.js.map +1 -1
- package/dist/Encoding.d.ts +194 -0
- package/dist/Encoding.d.ts.map +1 -0
- package/dist/Encoding.js +352 -0
- package/dist/Encoding.js.map +1 -0
- package/dist/Equal.js.map +1 -1
- package/dist/FileSystem.d.ts +1 -1
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +5 -5
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +30 -1
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +15 -0
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.js +1 -1
- package/dist/Formatter.js.map +1 -1
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +2 -2
- package/dist/Graph.js.map +1 -1
- package/dist/Latch.d.ts +109 -0
- package/dist/Latch.d.ts.map +1 -0
- package/dist/Latch.js +72 -0
- package/dist/Latch.js.map +1 -0
- package/dist/Pipeable.d.ts +17 -0
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +19 -1
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +8 -7
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +2 -2
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +5 -3
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +6 -4
- package/dist/Pool.js.map +1 -1
- package/dist/PubSub.d.ts +3 -2
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +3 -2
- package/dist/PubSub.js.map +1 -1
- package/dist/Request.d.ts +1 -1
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +2 -1
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +0 -20
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +0 -20
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Schedule.d.ts +2 -2
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +30 -16
- package/dist/Schedule.js.map +1 -1
- package/dist/Schema.d.ts +192 -42
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +385 -71
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaGetter.d.ts +2 -2
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +12 -14
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +44 -43
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +5 -2
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +37 -0
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +80 -0
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Semaphore.d.ts +211 -0
- package/dist/Semaphore.d.ts.map +1 -0
- package/dist/{PartitionedSemaphore.js → Semaphore.js} +97 -13
- package/dist/Semaphore.js.map +1 -0
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +9 -8
- package/dist/Stream.js.map +1 -1
- package/dist/Struct.d.ts +16 -0
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +22 -0
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +2 -1
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +2 -1
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +2 -1
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +2 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Types.d.ts +14 -6
- package/dist/Types.d.ts.map +1 -1
- package/dist/index.d.ts +14 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/core.js +11 -3
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/rcRef.js +2 -1
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/testing/TestClock.d.ts +3 -2
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +5 -3
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +39 -39
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +2 -1
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +51 -51
- package/dist/unstable/ai/Prompt.d.ts +20 -20
- package/dist/unstable/ai/Response.d.ts +25 -25
- package/dist/unstable/cli/CliError.d.ts +5 -5
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +2 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +2 -1
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +1 -1
- package/dist/unstable/cluster/Message.d.ts +5 -5
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +2 -1
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +3 -3
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +4 -3
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +7 -5
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +4 -3
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/entityReaper.js +2 -1
- package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js +2 -1
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +36 -36
- package/dist/unstable/encoding/Sse.d.ts +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +2 -1
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +5 -5
- package/dist/unstable/http/Cookies.d.ts +1 -1
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +18 -26
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +2 -2
- package/dist/unstable/http/UrlParams.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +2 -2
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +6 -0
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +6 -6
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +6 -5
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +2 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +6 -5
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +6 -0
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +12 -9
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +39 -0
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -0
- package/dist/unstable/reactivity/Hydration.js +76 -0
- package/dist/unstable/reactivity/Hydration.js.map +1 -0
- package/dist/unstable/reactivity/index.d.ts +4 -0
- package/dist/unstable/reactivity/index.d.ts.map +1 -1
- package/dist/unstable/reactivity/index.js +4 -0
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +3 -2
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +5 -3
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +2 -1
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +3 -2
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/sql/Statement.js +0 -1
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +2 -1
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +2 -2
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +2 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +2 -1
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +1 -2
- package/src/Cause.ts +1 -1
- package/src/Channel.ts +6 -4
- package/src/Data.ts +10 -9
- package/src/Effect.ts +0 -246
- package/src/Encoding.ts +879 -0
- package/src/Equal.ts +2 -2
- package/src/FileSystem.ts +7 -8
- package/src/Filter.ts +48 -1
- package/src/Formatter.ts +1 -1
- package/src/Graph.ts +8 -5
- package/src/Latch.ts +112 -0
- package/src/Pipeable.ts +32 -1
- package/src/PlatformError.ts +5 -5
- package/src/Pool.ts +9 -7
- package/src/PubSub.ts +10 -9
- package/src/Request.ts +3 -2
- package/src/RequestResolver.ts +0 -20
- package/src/Schedule.ts +217 -115
- package/src/Schema.ts +567 -105
- package/src/SchemaGetter.ts +12 -14
- package/src/SchemaRepresentation.ts +5 -2
- package/src/SchemaTransformation.ts +104 -0
- package/src/Semaphore.ts +356 -0
- package/src/Stream.ts +9 -8
- package/src/Struct.ts +26 -0
- package/src/SubscriptionRef.ts +3 -2
- package/src/SynchronizedRef.ts +3 -2
- package/src/Types.ts +12 -2
- package/src/index.ts +17 -6
- package/src/internal/core.ts +10 -2
- package/src/internal/effect.ts +3 -2
- package/src/internal/rcRef.ts +2 -1
- package/src/testing/TestClock.ts +8 -6
- package/src/unstable/ai/AiError.ts +1 -1
- package/src/unstable/ai/Chat.ts +2 -1
- package/src/unstable/ai/Prompt.ts +20 -20
- package/src/unstable/ai/Response.ts +22 -22
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +3 -2
- package/src/unstable/cluster/Entity.ts +2 -1
- package/src/unstable/cluster/Envelope.ts +1 -1
- package/src/unstable/cluster/MessageStorage.ts +2 -1
- package/src/unstable/cluster/Runners.ts +6 -5
- package/src/unstable/cluster/Sharding.ts +8 -6
- package/src/unstable/cluster/internal/entityManager.ts +6 -5
- package/src/unstable/cluster/internal/entityReaper.ts +2 -1
- package/src/unstable/cluster/internal/resourceRef.ts +2 -1
- package/src/unstable/eventlog/EventLog.ts +2 -1
- package/src/unstable/http/HttpEffect.ts +17 -25
- package/src/unstable/http/Multipart.ts +2 -2
- package/src/unstable/http/UrlParams.ts +1 -1
- package/src/unstable/httpapi/HttpApiBuilder.ts +2 -2
- package/src/unstable/httpapi/HttpApiScalar.ts +6 -0
- package/src/unstable/persistence/KeyValueStore.ts +6 -6
- package/src/unstable/persistence/PersistedCache.ts +20 -9
- package/src/unstable/persistence/PersistedQueue.ts +7 -6
- package/src/unstable/process/ChildProcessSpawner.ts +6 -0
- package/src/unstable/reactivity/Atom.ts +7 -5
- package/src/unstable/reactivity/Hydration.ts +112 -0
- package/src/unstable/reactivity/index.ts +5 -0
- package/src/unstable/rpc/RpcClient.ts +4 -3
- package/src/unstable/rpc/RpcServer.ts +6 -4
- package/src/unstable/rpc/Utils.ts +2 -1
- package/src/unstable/socket/Socket.ts +3 -2
- package/src/unstable/sql/Statement.ts +0 -1
- package/src/unstable/workers/Worker.ts +2 -1
- package/src/unstable/workflow/DurableDeferred.ts +2 -2
- package/src/unstable/workflow/WorkflowEngine.ts +3 -2
- package/dist/PartitionedSemaphore.d.ts +0 -52
- package/dist/PartitionedSemaphore.d.ts.map +0 -1
- package/dist/PartitionedSemaphore.js.map +0 -1
- package/dist/encoding/Base64.d.ts +0 -67
- package/dist/encoding/Base64.d.ts.map +0 -1
- package/dist/encoding/Base64.js +0 -146
- package/dist/encoding/Base64.js.map +0 -1
- package/dist/encoding/Base64Url.d.ts +0 -60
- package/dist/encoding/Base64Url.d.ts.map +0 -1
- package/dist/encoding/Base64Url.js +0 -89
- package/dist/encoding/Base64Url.js.map +0 -1
- package/dist/encoding/EncodingError.d.ts +0 -31
- package/dist/encoding/EncodingError.d.ts.map +0 -1
- package/dist/encoding/EncodingError.js +0 -22
- package/dist/encoding/EncodingError.js.map +0 -1
- package/dist/encoding/Hex.d.ts +0 -61
- package/dist/encoding/Hex.d.ts.map +0 -1
- package/dist/encoding/Hex.js +0 -115
- package/dist/encoding/Hex.js.map +0 -1
- package/dist/encoding/index.d.ts +0 -26
- package/dist/encoding/index.d.ts.map +0 -1
- package/dist/encoding/index.js +0 -27
- package/dist/encoding/index.js.map +0 -1
- package/src/PartitionedSemaphore.ts +0 -182
- package/src/encoding/Base64.ts +0 -366
- package/src/encoding/Base64Url.ts +0 -104
- package/src/encoding/EncodingError.ts +0 -35
- package/src/encoding/Hex.ts +0 -390
- package/src/encoding/index.ts +0 -31
package/src/SubscriptionRef.ts
CHANGED
|
@@ -8,6 +8,7 @@ import * as Option from "./Option.ts"
|
|
|
8
8
|
import type { Pipeable } from "./Pipeable.ts"
|
|
9
9
|
import * as PubSub from "./PubSub.ts"
|
|
10
10
|
import * as Ref from "./Ref.ts"
|
|
11
|
+
import * as Semaphore from "./Semaphore.ts"
|
|
11
12
|
import * as Stream from "./Stream.ts"
|
|
12
13
|
import type { Invariant } from "./Types.ts"
|
|
13
14
|
|
|
@@ -19,7 +20,7 @@ const TypeId = "~effect/SubscriptionRef"
|
|
|
19
20
|
*/
|
|
20
21
|
export interface SubscriptionRef<in out A> extends SubscriptionRef.Variance<A>, Pipeable {
|
|
21
22
|
readonly backing: Ref.Ref<A>
|
|
22
|
-
readonly semaphore:
|
|
23
|
+
readonly semaphore: Semaphore.Semaphore
|
|
23
24
|
readonly pubsub: PubSub.PubSub<A>
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -70,7 +71,7 @@ const Proto = {
|
|
|
70
71
|
export const make = <A>(value: A): Effect.Effect<SubscriptionRef<A>> =>
|
|
71
72
|
Effect.map(PubSub.unbounded<A>({ replay: 1 }), (pubsub) => {
|
|
72
73
|
const self = Object.create(Proto)
|
|
73
|
-
self.semaphore =
|
|
74
|
+
self.semaphore = Semaphore.makeUnsafe(1)
|
|
74
75
|
self.backing = Ref.makeUnsafe(value)
|
|
75
76
|
self.pubsub = pubsub
|
|
76
77
|
PubSub.publishUnsafe(self.pubsub, value)
|
package/src/SynchronizedRef.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { dual } from "./Function.ts"
|
|
|
6
6
|
import { PipeInspectableProto } from "./internal/core.ts"
|
|
7
7
|
import * as Option from "./Option.ts"
|
|
8
8
|
import * as Ref from "./Ref.ts"
|
|
9
|
+
import * as Semaphore from "./Semaphore.ts"
|
|
9
10
|
|
|
10
11
|
const TypeId = "~effect/SynchronizedRef"
|
|
11
12
|
|
|
@@ -16,7 +17,7 @@ const TypeId = "~effect/SynchronizedRef"
|
|
|
16
17
|
export interface SynchronizedRef<in out A> extends Ref.Ref<A> {
|
|
17
18
|
readonly [TypeId]: typeof TypeId
|
|
18
19
|
readonly backing: Ref.Ref<A>
|
|
19
|
-
readonly semaphore:
|
|
20
|
+
readonly semaphore: Semaphore.Semaphore
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
const Proto = {
|
|
@@ -36,7 +37,7 @@ const Proto = {
|
|
|
36
37
|
*/
|
|
37
38
|
export const makeUnsafe = <A>(value: A): SynchronizedRef<A> => {
|
|
38
39
|
const self = Object.create(Proto)
|
|
39
|
-
self.semaphore =
|
|
40
|
+
self.semaphore = Semaphore.makeUnsafe(1)
|
|
40
41
|
self.backing = Ref.makeUnsafe(value)
|
|
41
42
|
return self
|
|
42
43
|
}
|
package/src/Types.ts
CHANGED
|
@@ -205,7 +205,7 @@ export type ExcludeTag<E, K extends string> = Exclude<E, { readonly _tag: K }>
|
|
|
205
205
|
* @category types
|
|
206
206
|
* @since 2.0.0
|
|
207
207
|
*/
|
|
208
|
-
export type ExtractTag<E, K extends string> =
|
|
208
|
+
export type ExtractTag<E, K extends string> = E extends { readonly _tag: infer T } ? K extends T ? E : never : never
|
|
209
209
|
|
|
210
210
|
/**
|
|
211
211
|
* Transforms a union type into an intersection type.
|
|
@@ -729,6 +729,15 @@ export declare namespace Contravariant {
|
|
|
729
729
|
*/
|
|
730
730
|
export type MatchRecord<S, onTrue, onFalse> = {} extends S ? onTrue : onFalse
|
|
731
731
|
|
|
732
|
+
/**
|
|
733
|
+
* Conditional type that returns `void` if `S` is an empty object type,
|
|
734
|
+
* otherwise returns `S`.
|
|
735
|
+
*
|
|
736
|
+
* @since 4.0.0
|
|
737
|
+
* @category types
|
|
738
|
+
*/
|
|
739
|
+
export type VoidIfEmpty<S> = MatchRecord<S, void, S>
|
|
740
|
+
|
|
732
741
|
/**
|
|
733
742
|
* Excludes function types from a union, keeping only non-function members.
|
|
734
743
|
*
|
|
@@ -914,7 +923,8 @@ export type ReasonTags<E> = E extends { readonly reason: { readonly _tag: string
|
|
|
914
923
|
* @category types
|
|
915
924
|
*/
|
|
916
925
|
export type ExtractReason<E, K extends string> = E extends { readonly reason: infer R }
|
|
917
|
-
?
|
|
926
|
+
? R extends { readonly _tag: infer T } ? K extends T ? R : never
|
|
927
|
+
: never
|
|
918
928
|
: never
|
|
919
929
|
|
|
920
930
|
/**
|
package/src/index.ts
CHANGED
|
@@ -865,6 +865,13 @@ export * as Duration from "./Duration.ts"
|
|
|
865
865
|
*/
|
|
866
866
|
export * as Effect from "./Effect.ts"
|
|
867
867
|
|
|
868
|
+
/**
|
|
869
|
+
* Encoding & decoding for Base64 (RFC4648), Base64Url, and Hex.
|
|
870
|
+
*
|
|
871
|
+
* @since 4.0.0
|
|
872
|
+
*/
|
|
873
|
+
export * as Encoding from "./Encoding.ts"
|
|
874
|
+
|
|
868
875
|
/**
|
|
869
876
|
* This module provides functionality for defining and working with equality between values.
|
|
870
877
|
* It includes the `Equal` interface for types that can determine equality with other values
|
|
@@ -1398,6 +1405,11 @@ export * as JsonPointer from "./JsonPointer.ts"
|
|
|
1398
1405
|
*/
|
|
1399
1406
|
export * as JsonSchema from "./JsonSchema.ts"
|
|
1400
1407
|
|
|
1408
|
+
/**
|
|
1409
|
+
* @since 3.8.0
|
|
1410
|
+
*/
|
|
1411
|
+
export * as Latch from "./Latch.ts"
|
|
1412
|
+
|
|
1401
1413
|
/**
|
|
1402
1414
|
* A `Layer<ROut, E, RIn>` describes how to build one or more services in your
|
|
1403
1415
|
* application. Services can be injected into effects via
|
|
@@ -2269,12 +2281,6 @@ export * as Order from "./Order.ts"
|
|
|
2269
2281
|
*/
|
|
2270
2282
|
export * as Ordering from "./Ordering.ts"
|
|
2271
2283
|
|
|
2272
|
-
/**
|
|
2273
|
-
* @since 3.19.4
|
|
2274
|
-
* @experimental
|
|
2275
|
-
*/
|
|
2276
|
-
export * as PartitionedSemaphore from "./PartitionedSemaphore.ts"
|
|
2277
|
-
|
|
2278
2284
|
/**
|
|
2279
2285
|
* @since 4.0.0
|
|
2280
2286
|
*/
|
|
@@ -3137,6 +3143,11 @@ export * as ScopedCache from "./ScopedCache.ts"
|
|
|
3137
3143
|
*/
|
|
3138
3144
|
export * as ScopedRef from "./ScopedRef.ts"
|
|
3139
3145
|
|
|
3146
|
+
/**
|
|
3147
|
+
* @since 2.0.0
|
|
3148
|
+
*/
|
|
3149
|
+
export * as Semaphore from "./Semaphore.ts"
|
|
3150
|
+
|
|
3140
3151
|
/**
|
|
3141
3152
|
* This module provides a data structure called `ServiceMap` that can be used
|
|
3142
3153
|
* for dependency injection in effectful programs. It is essentially a table
|
package/src/internal/core.ts
CHANGED
|
@@ -70,7 +70,7 @@ export const PipeInspectableProto = {
|
|
|
70
70
|
return { ...this }
|
|
71
71
|
},
|
|
72
72
|
toString() {
|
|
73
|
-
return format(this, { ignoreToString: true })
|
|
73
|
+
return format(this.toJSON(), { ignoreToString: true, space: 2 })
|
|
74
74
|
},
|
|
75
75
|
[NodeInspectSymbol]() {
|
|
76
76
|
return this.toJSON()
|
|
@@ -102,6 +102,14 @@ export const YieldableProto = {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const YieldableErrorProto = {
|
|
107
|
+
...YieldableProto,
|
|
108
|
+
pipe() {
|
|
109
|
+
return pipeArguments(this, arguments)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
105
113
|
/** @internal */
|
|
106
114
|
export const EffectProto = {
|
|
107
115
|
[EffectTypeId]: effectVariance,
|
|
@@ -581,7 +589,7 @@ export const YieldableError: new(
|
|
|
581
589
|
return exitFail(this)
|
|
582
590
|
}
|
|
583
591
|
}
|
|
584
|
-
Object.assign(YieldableError.prototype,
|
|
592
|
+
Object.assign(YieldableError.prototype, YieldableErrorProto)
|
|
585
593
|
return YieldableError as any
|
|
586
594
|
})()
|
|
587
595
|
|
package/src/internal/effect.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { constant, constFalse, constTrue, constUndefined, constVoid, dual, ident
|
|
|
14
14
|
import * as Hash from "../Hash.ts"
|
|
15
15
|
import { toJson, toStringUnknown } from "../Inspectable.ts"
|
|
16
16
|
import * as Iterable from "../Iterable.ts"
|
|
17
|
+
import type * as _Latch from "../Latch.ts"
|
|
17
18
|
import type * as Logger from "../Logger.ts"
|
|
18
19
|
import type * as LogLevel from "../LogLevel.ts"
|
|
19
20
|
import type * as Metric from "../Metric.ts"
|
|
@@ -4854,7 +4855,7 @@ export const makeSemaphore = (permits: number) => sync(() => makeSemaphoreUnsafe
|
|
|
4854
4855
|
const succeedTrue = succeed(true)
|
|
4855
4856
|
const succeedFalse = succeed(false)
|
|
4856
4857
|
|
|
4857
|
-
class Latch implements
|
|
4858
|
+
class Latch implements _Latch.Latch {
|
|
4858
4859
|
waiters: Array<(_: Effect.Effect<void>) => void> = []
|
|
4859
4860
|
scheduled = false
|
|
4860
4861
|
private isOpen: boolean
|
|
@@ -4914,7 +4915,7 @@ class Latch implements Effect.Latch {
|
|
|
4914
4915
|
}
|
|
4915
4916
|
|
|
4916
4917
|
/** @internal */
|
|
4917
|
-
export const makeLatchUnsafe = (open?: boolean | undefined):
|
|
4918
|
+
export const makeLatchUnsafe = (open?: boolean | undefined): _Latch.Latch => new Latch(open ?? false)
|
|
4918
4919
|
|
|
4919
4920
|
/** @internal */
|
|
4920
4921
|
export const makeLatch = (open?: boolean | undefined) => sync(() => makeLatchUnsafe(open))
|
package/src/internal/rcRef.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { identity } from "../Function.ts"
|
|
|
6
6
|
import { pipeArguments } from "../Pipeable.ts"
|
|
7
7
|
import type * as RcRef from "../RcRef.ts"
|
|
8
8
|
import * as Scope from "../Scope.ts"
|
|
9
|
+
import * as Semaphore from "../Semaphore.ts"
|
|
9
10
|
import * as ServiceMap from "../ServiceMap.ts"
|
|
10
11
|
|
|
11
12
|
const TypeId = "~effect/RcRef"
|
|
@@ -47,7 +48,7 @@ class RcRefImpl<A, E> implements RcRef.RcRef<A, E> {
|
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
state: State<A> = stateEmpty
|
|
50
|
-
readonly semaphore =
|
|
51
|
+
readonly semaphore = Semaphore.makeUnsafe(1)
|
|
51
52
|
readonly acquire: Effect.Effect<A, E>
|
|
52
53
|
readonly services: ServiceMap.ServiceMap<never>
|
|
53
54
|
readonly scope: Scope.Scope
|
package/src/testing/TestClock.ts
CHANGED
|
@@ -8,8 +8,10 @@ import * as Duration from "../Duration.ts"
|
|
|
8
8
|
import * as Effect from "../Effect.ts"
|
|
9
9
|
import * as Fiber from "../Fiber.ts"
|
|
10
10
|
import { flow } from "../Function.ts"
|
|
11
|
+
import * as Latch from "../Latch.ts"
|
|
11
12
|
import * as Layer from "../Layer.ts"
|
|
12
13
|
import * as Order from "../Order.ts"
|
|
14
|
+
import * as Semaphore from "../Semaphore.ts"
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* A `TestClock` simplifies deterministically and efficiently testing effects
|
|
@@ -155,7 +157,7 @@ export declare namespace TestClock {
|
|
|
155
157
|
* const timestamp = testClock.currentTimeMillisUnsafe()
|
|
156
158
|
* console.log(timestamp) // Current test time
|
|
157
159
|
*
|
|
158
|
-
* // Internal state structure: { timestamp: number, sleeps: Array<[number,
|
|
160
|
+
* // Internal state structure: { timestamp: number, sleeps: Array<[number, Latch.Latch]> }
|
|
159
161
|
* })
|
|
160
162
|
* ```
|
|
161
163
|
*
|
|
@@ -164,7 +166,7 @@ export declare namespace TestClock {
|
|
|
164
166
|
*/
|
|
165
167
|
export interface State {
|
|
166
168
|
readonly timestamp: number
|
|
167
|
-
readonly sleeps: ReadonlyArray<[number,
|
|
169
|
+
readonly sleeps: ReadonlyArray<[number, Latch.Latch]>
|
|
168
170
|
}
|
|
169
171
|
}
|
|
170
172
|
|
|
@@ -220,10 +222,10 @@ export const make = Effect.fnUntraced(function*(
|
|
|
220
222
|
const sleeps: Array<{
|
|
221
223
|
readonly sequence: number
|
|
222
224
|
readonly timestamp: number
|
|
223
|
-
readonly latch:
|
|
225
|
+
readonly latch: Latch.Latch
|
|
224
226
|
}> = []
|
|
225
227
|
const liveClock = yield* Clock.clockWith(Effect.succeed)
|
|
226
|
-
const warningSemaphore = yield*
|
|
228
|
+
const warningSemaphore = yield* Semaphore.make(1)
|
|
227
229
|
|
|
228
230
|
let currentTimestamp: number = new Date(0).getTime()
|
|
229
231
|
let warningState: WarningState = WarningState.Start()
|
|
@@ -292,7 +294,7 @@ export const make = Effect.fnUntraced(function*(
|
|
|
292
294
|
const millis = Duration.toMillis(duration)
|
|
293
295
|
const end = currentTimestamp + millis
|
|
294
296
|
if (end <= currentTimestamp) return
|
|
295
|
-
const latch =
|
|
297
|
+
const latch = Latch.makeUnsafe()
|
|
296
298
|
sleeps.push({
|
|
297
299
|
sequence: sequence++,
|
|
298
300
|
timestamp: end,
|
|
@@ -303,7 +305,7 @@ export const make = Effect.fnUntraced(function*(
|
|
|
303
305
|
yield* latch.await
|
|
304
306
|
})
|
|
305
307
|
|
|
306
|
-
const runSemaphore = yield*
|
|
308
|
+
const runSemaphore = yield* Semaphore.make(1)
|
|
307
309
|
const run = Effect.fnUntraced(function*(step: (currentTimestamp: number) => number) {
|
|
308
310
|
yield* Fiber.await(yield* Effect.forkScoped(Effect.yieldNow))
|
|
309
311
|
const endTimestamp = step(currentTimestamp)
|
|
@@ -247,7 +247,7 @@ export class NetworkError extends Schema.ErrorClass<NetworkError>(
|
|
|
247
247
|
* @since 1.0.0
|
|
248
248
|
* @category schemas
|
|
249
249
|
*/
|
|
250
|
-
export const ProviderMetadata: Schema
|
|
250
|
+
export const ProviderMetadata: Schema.$Record<
|
|
251
251
|
Schema.String,
|
|
252
252
|
Schema.NullOr<Schema.Codec<Schema.MutableJson, Schema.MutableJson, never, never>>
|
|
253
253
|
> = Schema.Record(Schema.String, Schema.NullOr(Schema.MutableJson))
|
package/src/unstable/ai/Chat.ts
CHANGED
|
@@ -53,6 +53,7 @@ import * as Option from "../../Option.ts"
|
|
|
53
53
|
import * as Predicate from "../../Predicate.ts"
|
|
54
54
|
import * as Ref from "../../Ref.ts"
|
|
55
55
|
import * as Schema from "../../Schema.ts"
|
|
56
|
+
import * as Semaphore from "../../Semaphore.ts"
|
|
56
57
|
import * as ServiceMap from "../../ServiceMap.ts"
|
|
57
58
|
import * as Stream from "../../Stream.ts"
|
|
58
59
|
import type { NoExcessProperties } from "../../Types.ts"
|
|
@@ -325,7 +326,7 @@ const encodeHistoryJson = Schema.encodeUnknownEffect(Schema.fromJsonString(Promp
|
|
|
325
326
|
export const empty: Effect.Effect<Service> = Effect.gen(function*() {
|
|
326
327
|
const history = yield* Ref.make(Prompt.empty)
|
|
327
328
|
const services = yield* Effect.services<never>()
|
|
328
|
-
const semaphore = yield*
|
|
329
|
+
const semaphore = yield* Semaphore.make(1)
|
|
329
330
|
|
|
330
331
|
const provideContext = <A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
|
|
331
332
|
Effect.updateServices(effect, (existing) => ServiceMap.merge(services, existing))
|
|
@@ -86,7 +86,7 @@ const constEmptyObject = () => ({})
|
|
|
86
86
|
* @since 4.0.0
|
|
87
87
|
* @category models
|
|
88
88
|
*/
|
|
89
|
-
export const ProviderOptions: Schema
|
|
89
|
+
export const ProviderOptions: Schema.$Record<
|
|
90
90
|
Schema.String,
|
|
91
91
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
92
92
|
> = Schema.Record(Schema.String, Schema.NullOr(Schema.Json))
|
|
@@ -309,7 +309,7 @@ export const TextPart: Schema.Struct<
|
|
|
309
309
|
readonly text: Schema.String
|
|
310
310
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
311
311
|
readonly options: Schema.withDecodingDefault<
|
|
312
|
-
Schema
|
|
312
|
+
Schema.$Record<
|
|
313
313
|
Schema.String,
|
|
314
314
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
315
315
|
>
|
|
@@ -389,7 +389,7 @@ export const ReasoningPart: Schema.Struct<{
|
|
|
389
389
|
readonly text: Schema.String
|
|
390
390
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
391
391
|
readonly options: Schema.withDecodingDefault<
|
|
392
|
-
Schema
|
|
392
|
+
Schema.$Record<
|
|
393
393
|
Schema.String,
|
|
394
394
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
395
395
|
>
|
|
@@ -497,7 +497,7 @@ export const FilePart: Schema.Struct<{
|
|
|
497
497
|
readonly data: Schema.Union<readonly [Schema.String, Schema.Uint8Array, Schema.URL]>
|
|
498
498
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
499
499
|
readonly options: Schema.withDecodingDefault<
|
|
500
|
-
Schema
|
|
500
|
+
Schema.$Record<
|
|
501
501
|
Schema.String,
|
|
502
502
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
503
503
|
>
|
|
@@ -607,7 +607,7 @@ export const ToolCallPart: Schema.Struct<{
|
|
|
607
607
|
readonly providerExecuted: Schema.withDecodingDefault<Schema.Boolean>
|
|
608
608
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
609
609
|
readonly options: Schema.withDecodingDefault<
|
|
610
|
-
Schema
|
|
610
|
+
Schema.$Record<
|
|
611
611
|
Schema.String,
|
|
612
612
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
613
613
|
>
|
|
@@ -723,7 +723,7 @@ export const ToolResultPart: Schema.Struct<{
|
|
|
723
723
|
readonly result: Schema.Unknown
|
|
724
724
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
725
725
|
readonly options: Schema.withDecodingDefault<
|
|
726
|
-
Schema
|
|
726
|
+
Schema.$Record<
|
|
727
727
|
Schema.String,
|
|
728
728
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
729
729
|
>
|
|
@@ -841,7 +841,7 @@ export const ToolApprovalResponsePart: Schema.Struct<{
|
|
|
841
841
|
readonly reason: Schema.optional<Schema.String>
|
|
842
842
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
843
843
|
readonly options: Schema.withDecodingDefault<
|
|
844
|
-
Schema
|
|
844
|
+
Schema.$Record<
|
|
845
845
|
Schema.String,
|
|
846
846
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
847
847
|
>
|
|
@@ -942,7 +942,7 @@ export const ToolApprovalRequestPart: Schema.Struct<{
|
|
|
942
942
|
readonly toolCallId: Schema.String
|
|
943
943
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
944
944
|
readonly options: Schema.withDecodingDefault<
|
|
945
|
-
Schema
|
|
945
|
+
Schema.$Record<
|
|
946
946
|
Schema.String,
|
|
947
947
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
948
948
|
>
|
|
@@ -1087,7 +1087,7 @@ export const ContentFromString: Schema.decodeTo<
|
|
|
1087
1087
|
readonly text: Schema.String
|
|
1088
1088
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
1089
1089
|
readonly options: Schema.withDecodingDefault<
|
|
1090
|
-
Schema
|
|
1090
|
+
Schema.$Record<
|
|
1091
1091
|
Schema.String,
|
|
1092
1092
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
1093
1093
|
>
|
|
@@ -1166,7 +1166,7 @@ export const SystemMessage: Schema.Struct<{
|
|
|
1166
1166
|
readonly content: Schema.String
|
|
1167
1167
|
readonly "~effect/ai/Prompt/Message": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Message">>
|
|
1168
1168
|
readonly options: Schema.withDecodingDefault<
|
|
1169
|
-
Schema
|
|
1169
|
+
Schema.$Record<
|
|
1170
1170
|
Schema.String,
|
|
1171
1171
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
1172
1172
|
>
|
|
@@ -1285,7 +1285,7 @@ export const UserMessage: Schema.Struct<{
|
|
|
1285
1285
|
readonly text: Schema.String
|
|
1286
1286
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
1287
1287
|
readonly options: Schema.withDecodingDefault<
|
|
1288
|
-
Schema
|
|
1288
|
+
Schema.$Record<
|
|
1289
1289
|
Schema.String,
|
|
1290
1290
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
1291
1291
|
>
|
|
@@ -1297,7 +1297,7 @@ export const UserMessage: Schema.Struct<{
|
|
|
1297
1297
|
never,
|
|
1298
1298
|
never
|
|
1299
1299
|
>,
|
|
1300
|
-
Schema
|
|
1300
|
+
Schema.$Array<
|
|
1301
1301
|
Schema.Union<
|
|
1302
1302
|
readonly [
|
|
1303
1303
|
Schema.Struct<{
|
|
@@ -1305,7 +1305,7 @@ export const UserMessage: Schema.Struct<{
|
|
|
1305
1305
|
readonly text: Schema.String
|
|
1306
1306
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
1307
1307
|
readonly options: Schema.withDecodingDefault<
|
|
1308
|
-
Schema
|
|
1308
|
+
Schema.$Record<
|
|
1309
1309
|
Schema.String,
|
|
1310
1310
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
1311
1311
|
>
|
|
@@ -1318,7 +1318,7 @@ export const UserMessage: Schema.Struct<{
|
|
|
1318
1318
|
readonly data: Schema.Union<readonly [Schema.String, Schema.Uint8Array, Schema.URL]>
|
|
1319
1319
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
1320
1320
|
readonly options: Schema.withDecodingDefault<
|
|
1321
|
-
Schema
|
|
1321
|
+
Schema.$Record<
|
|
1322
1322
|
Schema.String,
|
|
1323
1323
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
1324
1324
|
>
|
|
@@ -1331,7 +1331,7 @@ export const UserMessage: Schema.Struct<{
|
|
|
1331
1331
|
>
|
|
1332
1332
|
readonly "~effect/ai/Prompt/Message": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Message">>
|
|
1333
1333
|
readonly options: Schema.withDecodingDefault<
|
|
1334
|
-
Schema
|
|
1334
|
+
Schema.$Record<
|
|
1335
1335
|
Schema.String,
|
|
1336
1336
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
1337
1337
|
>
|
|
@@ -1470,7 +1470,7 @@ export const AssistantMessage: Schema.Struct<{
|
|
|
1470
1470
|
readonly text: Schema.String
|
|
1471
1471
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
1472
1472
|
readonly options: Schema.withDecodingDefault<
|
|
1473
|
-
Schema
|
|
1473
|
+
Schema.$Record<
|
|
1474
1474
|
Schema.String,
|
|
1475
1475
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
1476
1476
|
>
|
|
@@ -1482,7 +1482,7 @@ export const AssistantMessage: Schema.Struct<{
|
|
|
1482
1482
|
never,
|
|
1483
1483
|
never
|
|
1484
1484
|
>,
|
|
1485
|
-
Schema
|
|
1485
|
+
Schema.$Array<
|
|
1486
1486
|
Schema.Union<
|
|
1487
1487
|
readonly [
|
|
1488
1488
|
typeof TextPart,
|
|
@@ -1498,7 +1498,7 @@ export const AssistantMessage: Schema.Struct<{
|
|
|
1498
1498
|
>
|
|
1499
1499
|
readonly "~effect/ai/Prompt/Message": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Message">>
|
|
1500
1500
|
readonly options: Schema.withDecodingDefault<
|
|
1501
|
-
Schema
|
|
1501
|
+
Schema.$Record<
|
|
1502
1502
|
Schema.String,
|
|
1503
1503
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
1504
1504
|
>
|
|
@@ -1613,12 +1613,12 @@ export interface ToolMessageOptions extends ProviderOptions {}
|
|
|
1613
1613
|
*/
|
|
1614
1614
|
export const ToolMessage: Schema.Struct<{
|
|
1615
1615
|
readonly role: Schema.Literal<"tool">
|
|
1616
|
-
readonly content: Schema
|
|
1616
|
+
readonly content: Schema.$Array<
|
|
1617
1617
|
Schema.Union<readonly [typeof ToolResultPart, typeof ToolApprovalResponsePart]>
|
|
1618
1618
|
>
|
|
1619
1619
|
readonly "~effect/ai/Prompt/Message": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Message">>
|
|
1620
1620
|
readonly options: Schema.withDecodingDefault<
|
|
1621
|
-
Schema
|
|
1621
|
+
Schema.$Record<
|
|
1622
1622
|
Schema.String,
|
|
1623
1623
|
Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json>>
|
|
1624
1624
|
>
|