effect 4.0.0-beta.72 → 4.0.0-beta.74
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/Array.d.ts +16 -16
- package/dist/Array.js +4 -4
- package/dist/Boolean.d.ts +2 -2
- package/dist/Boolean.js +2 -2
- package/dist/Channel.d.ts +63 -63
- package/dist/Channel.js +25 -25
- package/dist/Chunk.d.ts +17 -17
- package/dist/Chunk.js +5 -5
- package/dist/Context.d.ts +3 -3
- package/dist/Context.js +1 -1
- package/dist/Cron.d.ts +4 -4
- package/dist/Cron.js +4 -4
- package/dist/Deferred.d.ts +37 -37
- package/dist/Deferred.js +13 -13
- package/dist/Duration.d.ts +6 -6
- package/dist/Duration.js +2 -2
- package/dist/Effect.d.ts +58 -58
- package/dist/Effect.js +39 -39
- package/dist/Equal.d.ts +2 -2
- package/dist/Equal.js +2 -2
- package/dist/Equivalence.d.ts +1 -1
- package/dist/Equivalence.js +1 -1
- package/dist/ExecutionPlan.d.ts +2 -2
- package/dist/ExecutionPlan.js +1 -1
- package/dist/FileSystem.d.ts +6 -6
- package/dist/FileSystem.js +2 -2
- package/dist/Function.d.ts +5 -5
- package/dist/Function.js +5 -5
- package/dist/Graph.d.ts +11 -11
- package/dist/Graph.js +5 -5
- package/dist/HKT.d.ts +1 -1
- package/dist/HashMap.d.ts +3 -3
- package/dist/HashSet.d.ts +1 -1
- package/dist/Iterable.d.ts +15 -15
- package/dist/Iterable.js +5 -5
- package/dist/Layer.d.ts +16 -16
- package/dist/Layer.js +5 -5
- package/dist/Logger.d.ts +5 -5
- package/dist/Logger.js +4 -4
- package/dist/ManagedRuntime.d.ts +2 -2
- package/dist/Match.d.ts +20 -20
- package/dist/Match.js +16 -16
- package/dist/Metric.d.ts +16 -16
- package/dist/Metric.js +3 -3
- package/dist/Option.d.ts +36 -36
- package/dist/Option.js +17 -17
- package/dist/Order.d.ts +1 -1
- package/dist/Order.js +1 -1
- package/dist/Path.d.ts +1 -1
- package/dist/Path.js +1 -1
- package/dist/Pipeable.d.ts +1 -1
- package/dist/Pipeable.js +1 -1
- package/dist/Predicate.d.ts +5 -5
- package/dist/PubSub.d.ts +9 -9
- package/dist/PubSub.js +5 -5
- package/dist/Queue.d.ts +24 -24
- package/dist/Queue.js +20 -20
- package/dist/Record.d.ts +15 -15
- package/dist/Record.js +5 -5
- package/dist/Redacted.d.ts +2 -2
- package/dist/Redacted.js +1 -1
- package/dist/Ref.d.ts +6 -6
- package/dist/Ref.js +6 -6
- package/dist/RegExp.d.ts +1 -1
- package/dist/RegExp.js +1 -1
- package/dist/Request.d.ts +4 -4
- package/dist/RequestResolver.d.ts +6 -6
- package/dist/RequestResolver.js +2 -2
- package/dist/Resource.d.ts +1 -1
- package/dist/Resource.js +1 -1
- package/dist/Result.d.ts +18 -18
- package/dist/Result.js +11 -11
- package/dist/Schedule.d.ts +44 -44
- package/dist/Schedule.js +18 -18
- package/dist/Schema.d.ts +177 -459
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +25 -25
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +1 -1
- package/dist/SchemaGetter.d.ts +13 -13
- package/dist/SchemaGetter.js +12 -12
- package/dist/SchemaParser.d.ts +3 -3
- package/dist/SchemaParser.js +3 -3
- package/dist/Scope.d.ts +1 -1
- package/dist/Scope.js +1 -1
- package/dist/Sink.d.ts +5 -5
- package/dist/Sink.js +3 -3
- package/dist/Stream.d.ts +55 -55
- package/dist/Stream.js +21 -21
- package/dist/String.d.ts +5 -5
- package/dist/String.js +3 -3
- package/dist/Struct.d.ts +8 -8
- package/dist/Struct.js +3 -3
- package/dist/SynchronizedRef.d.ts +57 -57
- package/dist/SynchronizedRef.js +19 -19
- package/dist/Terminal.d.ts +1 -1
- package/dist/Terminal.js +1 -1
- package/dist/Tracer.d.ts +5 -5
- package/dist/Tracer.js +2 -2
- package/dist/Tuple.d.ts +14 -14
- package/dist/Tuple.js +6 -6
- package/dist/TxHashMap.d.ts +3 -3
- package/dist/TxHashSet.d.ts +1 -1
- package/dist/Unify.d.ts +7 -7
- package/dist/Unify.js +1 -1
- package/dist/testing/TestClock.d.ts +5 -5
- package/dist/testing/TestClock.js +4 -4
- package/dist/testing/TestConsole.d.ts +3 -3
- package/dist/testing/TestConsole.js +3 -3
- package/dist/unstable/ai/Chat.d.ts +2 -2
- package/dist/unstable/ai/Chat.js +2 -2
- package/dist/unstable/ai/EmbeddingModel.d.ts +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +2 -2
- package/dist/unstable/ai/IdGenerator.js +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +4 -4
- package/dist/unstable/ai/LanguageModel.js +1 -1
- package/dist/unstable/ai/Prompt.d.ts +15 -15
- package/dist/unstable/ai/Prompt.js +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +5 -5
- package/dist/unstable/ai/Telemetry.js +2 -2
- package/dist/unstable/ai/Tokenizer.d.ts +1 -1
- package/dist/unstable/ai/Tokenizer.js +1 -1
- package/dist/unstable/ai/Tool.d.ts +6 -6
- package/dist/unstable/ai/Tool.js +6 -6
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +1 -1
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +1 -1
- package/dist/unstable/cli/Primitive.d.ts +3 -3
- package/dist/unstable/cli/Primitive.js +1 -1
- package/dist/unstable/cli/Prompt.d.ts +11 -11
- package/dist/unstable/cli/internal/parser.js +145 -10
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +1 -1
- package/dist/unstable/cluster/Entity.js +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +1 -0
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +5 -3
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
- package/dist/unstable/cluster/HttpRunner.js +2 -2
- package/dist/unstable/cluster/K8sHttpClient.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +1 -1
- package/dist/unstable/cluster/Runners.d.ts +1 -1
- package/dist/unstable/cluster/Runners.js +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +1 -1
- package/dist/unstable/cluster/Sharding.js +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +5 -5
- package/dist/unstable/cluster/Snowflake.js +5 -5
- package/dist/unstable/devtools/DevToolsClient.d.ts +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +1 -1
- package/dist/unstable/eventlog/EventLog.js +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +3 -3
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +3 -3
- package/dist/unstable/http/Cookies.d.ts +1 -1
- package/dist/unstable/http/Etag.d.ts +1 -1
- package/dist/unstable/http/Etag.js +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +2 -2
- package/dist/unstable/http/FetchHttpClient.js +2 -2
- package/dist/unstable/http/HttpClient.d.ts +1 -1
- package/dist/unstable/http/HttpClient.js +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +2 -2
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -1
- package/dist/unstable/http/HttpMiddleware.js +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +1 -1
- package/dist/unstable/http/HttpPlatform.js +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +4 -4
- package/dist/unstable/http/HttpRouter.js +4 -4
- package/dist/unstable/http/HttpServerResponse.d.ts +3 -3
- package/dist/unstable/http/Url.d.ts +33 -33
- package/dist/unstable/http/Url.js +11 -11
- package/dist/unstable/httpapi/HttpApi.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApi.js +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +2 -3
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.js +13 -13
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +27 -5
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +26 -3
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +2 -2
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +4 -4
- package/dist/unstable/observability/PrometheusMetrics.js +2 -2
- package/dist/unstable/persistence/KeyValueStore.d.ts +3 -3
- package/dist/unstable/persistence/KeyValueStore.js +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +2 -2
- package/dist/unstable/persistence/Persistable.js +2 -2
- package/dist/unstable/persistence/PersistedQueue.d.ts +8 -8
- package/dist/unstable/persistence/PersistedQueue.js +8 -8
- package/dist/unstable/persistence/RateLimiter.d.ts +1 -1
- package/dist/unstable/persistence/RateLimiter.js +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +5 -5
- package/dist/unstable/process/ChildProcess.js +2 -2
- package/dist/unstable/reactivity/AsyncResult.d.ts +4 -4
- package/dist/unstable/reactivity/AsyncResult.js +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +1 -1
- package/dist/unstable/reactivity/Atom.js +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +1 -1
- package/dist/unstable/reactivity/Reactivity.js +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +5 -5
- package/dist/unstable/rpc/Rpc.js +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +3 -3
- package/dist/unstable/rpc/RpcSchema.js +2 -2
- package/dist/unstable/schema/Model.d.ts +2 -2
- package/dist/unstable/schema/Model.js +1 -1
- package/dist/unstable/socket/Socket.d.ts +3 -3
- package/dist/unstable/socket/Socket.js +3 -3
- package/dist/unstable/socket/SocketServer.d.ts +1 -1
- package/dist/unstable/socket/SocketServer.js +1 -1
- package/dist/unstable/sql/Migrator.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +3 -3
- package/dist/unstable/sql/SqlClient.js +2 -2
- package/dist/unstable/sql/SqlConnection.d.ts +1 -1
- package/dist/unstable/sql/SqlConnection.js +1 -1
- package/dist/unstable/sql/Statement.d.ts +2 -2
- package/dist/unstable/sql/Statement.js +2 -2
- package/dist/unstable/workers/Transferable.d.ts +1 -1
- package/dist/unstable/workers/Transferable.js +1 -1
- package/dist/unstable/workers/Worker.d.ts +1 -1
- package/dist/unstable/workers/Worker.js +1 -1
- package/dist/unstable/workflow/Activity.d.ts +1 -1
- package/dist/unstable/workflow/Activity.js +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +1 -1
- package/package.json +1 -1
- package/src/Array.ts +16 -16
- package/src/Boolean.ts +2 -2
- package/src/Channel.ts +67 -67
- package/src/Chunk.ts +18 -18
- package/src/Context.ts +4 -4
- package/src/Cron.ts +4 -4
- package/src/Deferred.ts +37 -37
- package/src/Duration.ts +6 -6
- package/src/Effect.ts +58 -58
- package/src/Equal.ts +2 -2
- package/src/Equivalence.ts +1 -1
- package/src/ExecutionPlan.ts +2 -2
- package/src/FileSystem.ts +6 -6
- package/src/Function.ts +5 -5
- package/src/Graph.ts +11 -11
- package/src/HKT.ts +1 -1
- package/src/HashMap.ts +3 -3
- package/src/HashSet.ts +1 -1
- package/src/Iterable.ts +15 -15
- package/src/Layer.ts +16 -16
- package/src/Logger.ts +7 -7
- package/src/ManagedRuntime.ts +2 -2
- package/src/Match.ts +20 -20
- package/src/Metric.ts +20 -20
- package/src/Option.ts +36 -36
- package/src/Order.ts +1 -1
- package/src/Path.ts +1 -1
- package/src/Pipeable.ts +1 -1
- package/src/Predicate.ts +5 -5
- package/src/PubSub.ts +9 -9
- package/src/Queue.ts +24 -24
- package/src/Record.ts +15 -15
- package/src/Redacted.ts +2 -2
- package/src/Ref.ts +18 -18
- package/src/RegExp.ts +1 -1
- package/src/Request.ts +4 -4
- package/src/RequestResolver.ts +8 -8
- package/src/Resource.ts +1 -1
- package/src/Result.ts +18 -18
- package/src/Schedule.ts +45 -45
- package/src/Schema.ts +177 -459
- package/src/SchemaAST.ts +1 -1
- package/src/SchemaGetter.ts +13 -13
- package/src/SchemaParser.ts +3 -3
- package/src/Scope.ts +1 -1
- package/src/Sink.ts +5 -5
- package/src/Stream.ts +57 -57
- package/src/String.ts +5 -5
- package/src/Struct.ts +8 -8
- package/src/SynchronizedRef.ts +57 -57
- package/src/Terminal.ts +1 -1
- package/src/Tracer.ts +5 -5
- package/src/Tuple.ts +14 -14
- package/src/TxHashMap.ts +3 -3
- package/src/TxHashSet.ts +1 -1
- package/src/Unify.ts +7 -7
- package/src/testing/TestClock.ts +5 -5
- package/src/testing/TestConsole.ts +3 -3
- package/src/unstable/ai/Chat.ts +2 -2
- package/src/unstable/ai/EmbeddingModel.ts +1 -1
- package/src/unstable/ai/IdGenerator.ts +2 -2
- package/src/unstable/ai/LanguageModel.ts +4 -4
- package/src/unstable/ai/Prompt.ts +15 -15
- package/src/unstable/ai/Telemetry.ts +5 -5
- package/src/unstable/ai/Tokenizer.ts +1 -1
- package/src/unstable/ai/Tool.ts +6 -6
- package/src/unstable/cli/Command.ts +5 -1
- package/src/unstable/cli/Param.ts +1 -1
- package/src/unstable/cli/Primitive.ts +3 -3
- package/src/unstable/cli/Prompt.ts +11 -11
- package/src/unstable/cli/internal/parser.ts +204 -10
- package/src/unstable/cluster/Entity.ts +1 -1
- package/src/unstable/cluster/EntityResource.ts +8 -4
- package/src/unstable/cluster/HttpRunner.ts +2 -2
- package/src/unstable/cluster/K8sHttpClient.ts +1 -1
- package/src/unstable/cluster/Runners.ts +1 -1
- package/src/unstable/cluster/Sharding.ts +1 -1
- package/src/unstable/cluster/SingletonAddress.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +5 -5
- package/src/unstable/devtools/DevToolsClient.ts +1 -1
- package/src/unstable/eventlog/EventLog.ts +1 -1
- package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
- package/src/unstable/eventlog/EventLogRemote.ts +1 -1
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +3 -3
- package/src/unstable/http/Cookies.ts +1 -1
- package/src/unstable/http/Etag.ts +1 -1
- package/src/unstable/http/FetchHttpClient.ts +2 -2
- package/src/unstable/http/HttpClient.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +2 -2
- package/src/unstable/http/HttpMiddleware.ts +1 -1
- package/src/unstable/http/HttpPlatform.ts +1 -1
- package/src/unstable/http/HttpRouter.ts +4 -4
- package/src/unstable/http/HttpServerResponse.ts +3 -3
- package/src/unstable/http/Url.ts +33 -33
- package/src/unstable/httpapi/HttpApi.ts +1 -1
- package/src/unstable/httpapi/HttpApiBuilder.ts +2 -3
- package/src/unstable/httpapi/HttpApiError.ts +13 -13
- package/src/unstable/httpapi/HttpApiSecurity.ts +36 -8
- package/src/unstable/httpapi/OpenApi.ts +2 -2
- package/src/unstable/observability/PrometheusMetrics.ts +4 -4
- package/src/unstable/persistence/KeyValueStore.ts +3 -3
- package/src/unstable/persistence/Persistable.ts +2 -2
- package/src/unstable/persistence/PersistedQueue.ts +8 -8
- package/src/unstable/persistence/RateLimiter.ts +1 -1
- package/src/unstable/process/ChildProcess.ts +5 -5
- package/src/unstable/reactivity/AsyncResult.ts +4 -4
- package/src/unstable/reactivity/Atom.ts +1 -1
- package/src/unstable/reactivity/AtomRegistry.ts +1 -1
- package/src/unstable/reactivity/Reactivity.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +5 -5
- package/src/unstable/rpc/RpcMiddleware.ts +1 -1
- package/src/unstable/rpc/RpcSchema.ts +3 -3
- package/src/unstable/schema/Model.ts +2 -2
- package/src/unstable/socket/Socket.ts +3 -3
- package/src/unstable/socket/SocketServer.ts +1 -1
- package/src/unstable/sql/Migrator.ts +1 -1
- package/src/unstable/sql/SqlClient.ts +3 -3
- package/src/unstable/sql/SqlConnection.ts +1 -1
- package/src/unstable/sql/Statement.ts +2 -2
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +1 -1
- package/src/unstable/workflow/Activity.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +1 -1
package/src/Tuple.ts
CHANGED
|
@@ -224,7 +224,7 @@ type PickTuple<T extends ReadonlyArray<unknown>, K> = _BuildTuple<T, K>
|
|
|
224
224
|
*
|
|
225
225
|
* @see {@link omit} – the inverse (exclude indices instead)
|
|
226
226
|
* @see {@link get} – extract a single element
|
|
227
|
-
* @category
|
|
227
|
+
* @category filtering
|
|
228
228
|
* @since 4.0.0
|
|
229
229
|
*/
|
|
230
230
|
export const pick: {
|
|
@@ -250,7 +250,7 @@ export const pick: {
|
|
|
250
250
|
*
|
|
251
251
|
* @see {@link omit} – the inverse (exclude indices instead)
|
|
252
252
|
* @see {@link get} – extract a single element
|
|
253
|
-
* @category
|
|
253
|
+
* @category filtering
|
|
254
254
|
* @since 4.0.0
|
|
255
255
|
*/
|
|
256
256
|
<const T extends ReadonlyArray<unknown>, const I extends ReadonlyArray<Indices<T>>>(indices: I): (self: T) => PickTuple<T, I[number]>
|
|
@@ -276,7 +276,7 @@ export const pick: {
|
|
|
276
276
|
*
|
|
277
277
|
* @see {@link omit} – the inverse (exclude indices instead)
|
|
278
278
|
* @see {@link get} – extract a single element
|
|
279
|
-
* @category
|
|
279
|
+
* @category filtering
|
|
280
280
|
* @since 4.0.0
|
|
281
281
|
*/
|
|
282
282
|
<const T extends ReadonlyArray<unknown>, const I extends ReadonlyArray<Indices<T>>>(self: T, indices: I): PickTuple<T, I[number]>
|
|
@@ -313,7 +313,7 @@ type OmitTuple<T extends ReadonlyArray<unknown>, K> = _BuildTuple<T, Exclude<Ind
|
|
|
313
313
|
* ```
|
|
314
314
|
*
|
|
315
315
|
* @see {@link pick} – the inverse (keep only specified indices)
|
|
316
|
-
* @category
|
|
316
|
+
* @category filtering
|
|
317
317
|
* @since 4.0.0
|
|
318
318
|
*/
|
|
319
319
|
export const omit: {
|
|
@@ -338,7 +338,7 @@ export const omit: {
|
|
|
338
338
|
* ```
|
|
339
339
|
*
|
|
340
340
|
* @see {@link pick} – the inverse (keep only specified indices)
|
|
341
|
-
* @category
|
|
341
|
+
* @category filtering
|
|
342
342
|
* @since 4.0.0
|
|
343
343
|
*/
|
|
344
344
|
<const T extends ReadonlyArray<unknown>, const I extends ReadonlyArray<Indices<T>>>(indices: I): (self: T) => OmitTuple<T, I[number]>
|
|
@@ -363,7 +363,7 @@ export const omit: {
|
|
|
363
363
|
* ```
|
|
364
364
|
*
|
|
365
365
|
* @see {@link pick} – the inverse (keep only specified indices)
|
|
366
|
-
* @category
|
|
366
|
+
* @category filtering
|
|
367
367
|
* @since 4.0.0
|
|
368
368
|
*/
|
|
369
369
|
<const T extends ReadonlyArray<unknown>, const I extends ReadonlyArray<Indices<T>>>(self: T, indices: I): OmitTuple<T, I[number]>
|
|
@@ -399,7 +399,7 @@ export const omit: {
|
|
|
399
399
|
* ```
|
|
400
400
|
*
|
|
401
401
|
* @see {@link appendElements} – append multiple elements (another tuple)
|
|
402
|
-
* @category
|
|
402
|
+
* @category combining
|
|
403
403
|
* @since 2.0.0
|
|
404
404
|
*/
|
|
405
405
|
export const appendElement: {
|
|
@@ -424,7 +424,7 @@ export const appendElement: {
|
|
|
424
424
|
* ```
|
|
425
425
|
*
|
|
426
426
|
* @see {@link appendElements} – append multiple elements (another tuple)
|
|
427
|
-
* @category
|
|
427
|
+
* @category combining
|
|
428
428
|
* @since 2.0.0
|
|
429
429
|
*/
|
|
430
430
|
<const E>(element: E): <const T extends ReadonlyArray<unknown>>(self: T) => [...T, E]
|
|
@@ -449,7 +449,7 @@ export const appendElement: {
|
|
|
449
449
|
* ```
|
|
450
450
|
*
|
|
451
451
|
* @see {@link appendElements} – append multiple elements (another tuple)
|
|
452
|
-
* @category
|
|
452
|
+
* @category combining
|
|
453
453
|
* @since 2.0.0
|
|
454
454
|
*/
|
|
455
455
|
<const T extends ReadonlyArray<unknown>, const E>(self: T, element: E): [...T, E]
|
|
@@ -477,7 +477,7 @@ export const appendElement: {
|
|
|
477
477
|
* ```
|
|
478
478
|
*
|
|
479
479
|
* @see {@link appendElement} – append a single element
|
|
480
|
-
* @category
|
|
480
|
+
* @category combining
|
|
481
481
|
* @since 4.0.0
|
|
482
482
|
*/
|
|
483
483
|
export const appendElements: {
|
|
@@ -503,7 +503,7 @@ export const appendElements: {
|
|
|
503
503
|
* ```
|
|
504
504
|
*
|
|
505
505
|
* @see {@link appendElement} – append a single element
|
|
506
|
-
* @category
|
|
506
|
+
* @category combining
|
|
507
507
|
* @since 4.0.0
|
|
508
508
|
*/
|
|
509
509
|
<const T2 extends ReadonlyArray<unknown>>(that: T2): <const T1 extends ReadonlyArray<unknown>>(self: T1) => [...T1, ...T2]
|
|
@@ -529,7 +529,7 @@ export const appendElements: {
|
|
|
529
529
|
* ```
|
|
530
530
|
*
|
|
531
531
|
* @see {@link appendElement} – append a single element
|
|
532
|
-
* @category
|
|
532
|
+
* @category combining
|
|
533
533
|
* @since 4.0.0
|
|
534
534
|
*/
|
|
535
535
|
<const T1 extends ReadonlyArray<unknown>, const T2 extends ReadonlyArray<unknown>>(self: T1, that: T2): [...T1, ...T2]
|
|
@@ -1146,7 +1146,7 @@ export const mapOmit: {
|
|
|
1146
1146
|
* ```
|
|
1147
1147
|
*
|
|
1148
1148
|
* @see {@link makeOrder} – create an `Order` for tuples
|
|
1149
|
-
* @category
|
|
1149
|
+
* @category instances
|
|
1150
1150
|
* @since 4.0.0
|
|
1151
1151
|
*/
|
|
1152
1152
|
export const makeEquivalence = Equivalence.Tuple
|
|
@@ -1176,7 +1176,7 @@ export const makeEquivalence = Equivalence.Tuple
|
|
|
1176
1176
|
* ```
|
|
1177
1177
|
*
|
|
1178
1178
|
* @see {@link makeEquivalence} – create an `Equivalence` for tuples
|
|
1179
|
-
* @category
|
|
1179
|
+
* @category ordering
|
|
1180
1180
|
* @since 4.0.0
|
|
1181
1181
|
*/
|
|
1182
1182
|
export const makeOrder = order.Tuple
|
package/src/TxHashMap.ts
CHANGED
|
@@ -164,7 +164,7 @@ export declare namespace TxHashMap {
|
|
|
164
164
|
* })
|
|
165
165
|
* ```
|
|
166
166
|
*
|
|
167
|
-
* @category
|
|
167
|
+
* @category utility types
|
|
168
168
|
* @since 4.0.0
|
|
169
169
|
*/
|
|
170
170
|
export type Key<T extends TxHashMap<any, any>> = T extends TxHashMap<infer K, any> ? K : never
|
|
@@ -197,7 +197,7 @@ export declare namespace TxHashMap {
|
|
|
197
197
|
* })
|
|
198
198
|
* ```
|
|
199
199
|
*
|
|
200
|
-
* @category
|
|
200
|
+
* @category utility types
|
|
201
201
|
* @since 4.0.0
|
|
202
202
|
*/
|
|
203
203
|
export type Value<T extends TxHashMap<any, any>> = T extends TxHashMap<any, infer V> ? V : never
|
|
@@ -233,7 +233,7 @@ export declare namespace TxHashMap {
|
|
|
233
233
|
* })
|
|
234
234
|
* ```
|
|
235
235
|
*
|
|
236
|
-
* @category
|
|
236
|
+
* @category utility types
|
|
237
237
|
* @since 4.0.0
|
|
238
238
|
*/
|
|
239
239
|
export type Entry<T extends TxHashMap<any, any>> = T extends TxHashMap<infer K, infer V> ? readonly [K, V] : never
|
package/src/TxHashSet.ts
CHANGED
|
@@ -146,7 +146,7 @@ export declare namespace TxHashSet {
|
|
|
146
146
|
* console.log(processFruit("apple")) // Processing apple
|
|
147
147
|
* ```
|
|
148
148
|
*
|
|
149
|
-
* @category
|
|
149
|
+
* @category utility types
|
|
150
150
|
* @since 4.0.0
|
|
151
151
|
*/
|
|
152
152
|
export type Value<T> = T extends TxHashSet<infer V> ? V : never
|
package/src/Unify.ts
CHANGED
|
@@ -289,7 +289,7 @@ export type Unify<A> = Values<
|
|
|
289
289
|
*
|
|
290
290
|
* @see {@link Unify} for the type-level normalization applied by this helper
|
|
291
291
|
*
|
|
292
|
-
* @category
|
|
292
|
+
* @category utility types
|
|
293
293
|
* @since 2.0.0
|
|
294
294
|
*/
|
|
295
295
|
export const unify: {
|
|
@@ -334,7 +334,7 @@ export const unify: {
|
|
|
334
334
|
*
|
|
335
335
|
* @see {@link Unify} for the type-level normalization applied by this helper
|
|
336
336
|
*
|
|
337
|
-
* @category
|
|
337
|
+
* @category utility types
|
|
338
338
|
* @since 2.0.0
|
|
339
339
|
*/
|
|
340
340
|
<
|
|
@@ -388,7 +388,7 @@ export const unify: {
|
|
|
388
388
|
*
|
|
389
389
|
* @see {@link Unify} for the type-level normalization applied by this helper
|
|
390
390
|
*
|
|
391
|
-
* @category
|
|
391
|
+
* @category utility types
|
|
392
392
|
* @since 2.0.0
|
|
393
393
|
*/
|
|
394
394
|
<
|
|
@@ -441,7 +441,7 @@ export const unify: {
|
|
|
441
441
|
*
|
|
442
442
|
* @see {@link Unify} for the type-level normalization applied by this helper
|
|
443
443
|
*
|
|
444
|
-
* @category
|
|
444
|
+
* @category utility types
|
|
445
445
|
* @since 2.0.0
|
|
446
446
|
*/
|
|
447
447
|
<
|
|
@@ -491,7 +491,7 @@ export const unify: {
|
|
|
491
491
|
*
|
|
492
492
|
* @see {@link Unify} for the type-level normalization applied by this helper
|
|
493
493
|
*
|
|
494
|
-
* @category
|
|
494
|
+
* @category utility types
|
|
495
495
|
* @since 2.0.0
|
|
496
496
|
*/
|
|
497
497
|
<
|
|
@@ -540,7 +540,7 @@ export const unify: {
|
|
|
540
540
|
*
|
|
541
541
|
* @see {@link Unify} for the type-level normalization applied by this helper
|
|
542
542
|
*
|
|
543
|
-
* @category
|
|
543
|
+
* @category utility types
|
|
544
544
|
* @since 2.0.0
|
|
545
545
|
*/
|
|
546
546
|
<
|
|
@@ -588,7 +588,7 @@ export const unify: {
|
|
|
588
588
|
*
|
|
589
589
|
* @see {@link Unify} for the type-level normalization applied by this helper
|
|
590
590
|
*
|
|
591
|
-
* @category
|
|
591
|
+
* @category utility types
|
|
592
592
|
* @since 2.0.0
|
|
593
593
|
*/
|
|
594
594
|
<T>(x: T): Unify<T>
|
package/src/testing/TestClock.ts
CHANGED
|
@@ -167,7 +167,7 @@ export declare namespace TestClock {
|
|
|
167
167
|
* })
|
|
168
168
|
* ```
|
|
169
169
|
*
|
|
170
|
-
* @category
|
|
170
|
+
* @category options
|
|
171
171
|
* @since 4.0.0
|
|
172
172
|
*/
|
|
173
173
|
export interface Options {
|
|
@@ -419,7 +419,7 @@ export const layer: (options?: TestClock.Options) => Layer.Layer<TestClock> = fl
|
|
|
419
419
|
* })
|
|
420
420
|
* ```
|
|
421
421
|
*
|
|
422
|
-
* @category
|
|
422
|
+
* @category testing
|
|
423
423
|
* @since 2.0.0
|
|
424
424
|
*/
|
|
425
425
|
export const testClockWith = <A, E, R>(
|
|
@@ -454,7 +454,7 @@ export const testClockWith = <A, E, R>(
|
|
|
454
454
|
* })
|
|
455
455
|
* ```
|
|
456
456
|
*
|
|
457
|
-
* @category
|
|
457
|
+
* @category testing
|
|
458
458
|
* @since 2.0.0
|
|
459
459
|
*/
|
|
460
460
|
export const adjust = (duration: Duration.Input): Effect.Effect<void> =>
|
|
@@ -488,7 +488,7 @@ export const adjust = (duration: Duration.Input): Effect.Effect<void> =>
|
|
|
488
488
|
* })
|
|
489
489
|
* ```
|
|
490
490
|
*
|
|
491
|
-
* @category
|
|
491
|
+
* @category testing
|
|
492
492
|
* @since 2.0.0
|
|
493
493
|
*/
|
|
494
494
|
export const setTime = (timestamp: number): Effect.Effect<void> =>
|
|
@@ -522,7 +522,7 @@ export const setTime = (timestamp: number): Effect.Effect<void> =>
|
|
|
522
522
|
* })
|
|
523
523
|
* ```
|
|
524
524
|
*
|
|
525
|
-
* @category
|
|
525
|
+
* @category testing
|
|
526
526
|
* @since 4.0.0
|
|
527
527
|
*/
|
|
528
528
|
export const withLive = <A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
|
|
@@ -276,7 +276,7 @@ export const make = Effect.gen(function*() {
|
|
|
276
276
|
* @see {@link logLines} for reading captured `Console.log` calls directly
|
|
277
277
|
* @see {@link errorLines} for reading captured `Console.error` calls directly
|
|
278
278
|
*
|
|
279
|
-
* @category
|
|
279
|
+
* @category testing
|
|
280
280
|
* @since 4.0.0
|
|
281
281
|
*/
|
|
282
282
|
export const testConsoleWith = <A, E, R>(f: (console: TestConsole) => Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
|
|
@@ -351,7 +351,7 @@ export const layer: Layer.Layer<TestConsole> = Layer.effect(Console.Console)(mak
|
|
|
351
351
|
* @see {@link errorLines} for reading captured `Console.error` output
|
|
352
352
|
* @see {@link layer} for capturing console calls during a test
|
|
353
353
|
*
|
|
354
|
-
* @category
|
|
354
|
+
* @category testing
|
|
355
355
|
* @since 4.0.0
|
|
356
356
|
*/
|
|
357
357
|
export const logLines: Effect.Effect<ReadonlyArray<unknown>, never, never> = testConsoleWith(
|
|
@@ -390,7 +390,7 @@ export const logLines: Effect.Effect<ReadonlyArray<unknown>, never, never> = tes
|
|
|
390
390
|
* @see {@link logLines} for reading captured `Console.log` output
|
|
391
391
|
* @see {@link layer} for capturing console calls during a test
|
|
392
392
|
*
|
|
393
|
-
* @category
|
|
393
|
+
* @category testing
|
|
394
394
|
* @since 4.0.0
|
|
395
395
|
*/
|
|
396
396
|
export const errorLines: Effect.Effect<ReadonlyArray<unknown>, never, never> = testConsoleWith(
|
package/src/unstable/ai/Chat.ts
CHANGED
|
@@ -107,7 +107,7 @@ import type * as Tool from "./Tool.ts"
|
|
|
107
107
|
* })
|
|
108
108
|
* ```
|
|
109
109
|
*
|
|
110
|
-
* @category
|
|
110
|
+
* @category services
|
|
111
111
|
* @since 4.0.0
|
|
112
112
|
*/
|
|
113
113
|
export class Chat extends Context.Service<Chat, Service>()(
|
|
@@ -725,7 +725,7 @@ export class ChatNotFoundError extends Schema.ErrorClass<ChatNotFoundError>(
|
|
|
725
725
|
* Use to provide the storage operations needed by persisted conversation
|
|
726
726
|
* sessions.
|
|
727
727
|
*
|
|
728
|
-
* @category
|
|
728
|
+
* @category services
|
|
729
729
|
* @since 4.0.0
|
|
730
730
|
*/
|
|
731
731
|
// @effect-diagnostics effect/leakingRequirements:off
|
|
@@ -81,7 +81,7 @@ import * as Random from "../../Random.ts"
|
|
|
81
81
|
* })
|
|
82
82
|
* ```
|
|
83
83
|
*
|
|
84
|
-
* @category
|
|
84
|
+
* @category services
|
|
85
85
|
* @since 4.0.0
|
|
86
86
|
*/
|
|
87
87
|
export class IdGenerator extends Context.Service<IdGenerator, Service>()(
|
|
@@ -142,7 +142,7 @@ export interface Service {
|
|
|
142
142
|
* // This will generate IDs like: "tool_A1B2C3D4"
|
|
143
143
|
* ```
|
|
144
144
|
*
|
|
145
|
-
* @category
|
|
145
|
+
* @category options
|
|
146
146
|
* @since 4.0.0
|
|
147
147
|
*/
|
|
148
148
|
export interface MakeOptions {
|
|
@@ -104,7 +104,7 @@ import * as Toolkit from "./Toolkit.ts"
|
|
|
104
104
|
* })
|
|
105
105
|
* ```
|
|
106
106
|
*
|
|
107
|
-
* @category
|
|
107
|
+
* @category services
|
|
108
108
|
* @since 4.0.0
|
|
109
109
|
*/
|
|
110
110
|
export class LanguageModel extends Context.Service<LanguageModel, Service>()(
|
|
@@ -261,7 +261,7 @@ export const defaultCodecTransformer: CodecTransformer = InternalCodecTransforme
|
|
|
261
261
|
/**
|
|
262
262
|
* Configuration options for text generation.
|
|
263
263
|
*
|
|
264
|
-
* @category
|
|
264
|
+
* @category options
|
|
265
265
|
* @since 4.0.0
|
|
266
266
|
*/
|
|
267
267
|
export interface GenerateTextOptions<Tools extends Record<string, Tool.Any>> {
|
|
@@ -319,7 +319,7 @@ type GenerateTextOptionsWithoutToolkit = Omit<GenerateTextOptions<{}>, "toolkit"
|
|
|
319
319
|
/**
|
|
320
320
|
* Configuration options for structured object generation.
|
|
321
321
|
*
|
|
322
|
-
* @category
|
|
322
|
+
* @category options
|
|
323
323
|
* @since 4.0.0
|
|
324
324
|
*/
|
|
325
325
|
export interface GenerateObjectOptions<
|
|
@@ -684,7 +684,7 @@ export type ExtractServices<Options> = Options extends {
|
|
|
684
684
|
* underlying provider implementation, regardless of the specific provider being
|
|
685
685
|
* used.
|
|
686
686
|
*
|
|
687
|
-
* @category
|
|
687
|
+
* @category options
|
|
688
688
|
* @since 4.0.0
|
|
689
689
|
*/
|
|
690
690
|
export interface ProviderOptions {
|
|
@@ -78,7 +78,7 @@ import type * as Response from "./Response.ts"
|
|
|
78
78
|
* Provider-specific options are keyed by provider-specific names, and each
|
|
79
79
|
* value is JSON or `null`.
|
|
80
80
|
*
|
|
81
|
-
* @category
|
|
81
|
+
* @category options
|
|
82
82
|
* @since 4.0.0
|
|
83
83
|
*/
|
|
84
84
|
export const ProviderOptions: Schema.$Record<
|
|
@@ -90,7 +90,7 @@ export const ProviderOptions: Schema.$Record<
|
|
|
90
90
|
* Type of provider-specific options that can be attached to prompt messages
|
|
91
91
|
* and content parts.
|
|
92
92
|
*
|
|
93
|
-
* @category
|
|
93
|
+
* @category options
|
|
94
94
|
* @since 4.0.0
|
|
95
95
|
*/
|
|
96
96
|
export type ProviderOptions = typeof ProviderOptions.Type
|
|
@@ -239,7 +239,7 @@ export const makePart = <const Type extends Part["type"]>(
|
|
|
239
239
|
* A utility type for specifying the parameters required to construct a
|
|
240
240
|
* specific part of a prompt.
|
|
241
241
|
*
|
|
242
|
-
* @category
|
|
242
|
+
* @category utility types
|
|
243
243
|
* @since 4.0.0
|
|
244
244
|
*/
|
|
245
245
|
export type PartConstructorParams<P extends Part> = Omit<P, typeof PartTypeId | "type" | "options"> & {
|
|
@@ -298,7 +298,7 @@ export interface TextPartEncoded extends BasePartEncoded<"text", TextPartOptions
|
|
|
298
298
|
* Represents provider-specific options that can be associated with a
|
|
299
299
|
* `TextPart` through module augmentation.
|
|
300
300
|
*
|
|
301
|
-
* @category
|
|
301
|
+
* @category options
|
|
302
302
|
* @since 4.0.0
|
|
303
303
|
*/
|
|
304
304
|
export interface TextPartOptions extends ProviderOptions {}
|
|
@@ -381,7 +381,7 @@ export interface ReasoningPartEncoded extends BasePartEncoded<"reasoning", Reaso
|
|
|
381
381
|
* Represents provider-specific options that can be associated with a
|
|
382
382
|
* `ReasoningPart` through module augmentation.
|
|
383
383
|
*
|
|
384
|
-
* @category
|
|
384
|
+
* @category options
|
|
385
385
|
* @since 4.0.0
|
|
386
386
|
*/
|
|
387
387
|
export interface ReasoningPartOptions extends ProviderOptions {}
|
|
@@ -490,7 +490,7 @@ export interface FilePartEncoded extends BasePartEncoded<"file", FilePartOptions
|
|
|
490
490
|
* Represents provider-specific options that can be associated with a
|
|
491
491
|
* `FilePart` through module augmentation.
|
|
492
492
|
*
|
|
493
|
-
* @category
|
|
493
|
+
* @category options
|
|
494
494
|
* @since 4.0.0
|
|
495
495
|
*/
|
|
496
496
|
export interface FilePartOptions extends ProviderOptions {}
|
|
@@ -607,7 +607,7 @@ export interface ToolCallPartEncoded extends BasePartEncoded<"tool-call", ToolCa
|
|
|
607
607
|
* Represents provider-specific options that can be associated with a
|
|
608
608
|
* `ToolCallPart` through module augmentation.
|
|
609
609
|
*
|
|
610
|
-
* @category
|
|
610
|
+
* @category options
|
|
611
611
|
* @since 4.0.0
|
|
612
612
|
*/
|
|
613
613
|
export interface ToolCallPartOptions extends ProviderOptions {}
|
|
@@ -724,7 +724,7 @@ export interface ToolResultPartEncoded extends BasePartEncoded<"tool-result", To
|
|
|
724
724
|
* Represents provider-specific options that can be associated with a
|
|
725
725
|
* `ToolResultPart` through module augmentation.
|
|
726
726
|
*
|
|
727
|
-
* @category
|
|
727
|
+
* @category options
|
|
728
728
|
* @since 4.0.0
|
|
729
729
|
*/
|
|
730
730
|
export interface ToolResultPartOptions extends ProviderOptions {}
|
|
@@ -846,7 +846,7 @@ export interface ToolApprovalResponsePartEncoded
|
|
|
846
846
|
* Represents provider-specific options that can be associated with a
|
|
847
847
|
* `ToolApprovalResponsePart` through module augmentation.
|
|
848
848
|
*
|
|
849
|
-
* @category
|
|
849
|
+
* @category options
|
|
850
850
|
* @since 4.0.0
|
|
851
851
|
*/
|
|
852
852
|
export interface ToolApprovalResponsePartOptions extends ProviderOptions {}
|
|
@@ -951,7 +951,7 @@ export interface ToolApprovalRequestPartEncoded
|
|
|
951
951
|
* Represents provider-specific options that can be associated with a
|
|
952
952
|
* `ToolApprovalRequestPart` through module augmentation.
|
|
953
953
|
*
|
|
954
|
-
* @category
|
|
954
|
+
* @category options
|
|
955
955
|
* @since 4.0.0
|
|
956
956
|
*/
|
|
957
957
|
export interface ToolApprovalRequestPartOptions extends ProviderOptions {}
|
|
@@ -1087,7 +1087,7 @@ export const makeMessage = <const Role extends Message["role"]>(
|
|
|
1087
1087
|
* A utility type for specifying the parameters required to construct a
|
|
1088
1088
|
* specific message for a prompt.
|
|
1089
1089
|
*
|
|
1090
|
-
* @category
|
|
1090
|
+
* @category utility types
|
|
1091
1091
|
* @since 4.0.0
|
|
1092
1092
|
*/
|
|
1093
1093
|
export type MessageConstructorParams<M extends Message> = Omit<M, typeof MessageTypeId | "role" | "options"> & {
|
|
@@ -1176,7 +1176,7 @@ export interface SystemMessageEncoded extends BaseMessageEncoded<"system", Syste
|
|
|
1176
1176
|
* Represents provider-specific options that can be associated with a
|
|
1177
1177
|
* `SystemMessage` through module augmentation.
|
|
1178
1178
|
*
|
|
1179
|
-
* @category
|
|
1179
|
+
* @category options
|
|
1180
1180
|
* @since 4.0.0
|
|
1181
1181
|
*/
|
|
1182
1182
|
export interface SystemMessageOptions extends ProviderOptions {}
|
|
@@ -1289,7 +1289,7 @@ export type UserMessagePartEncoded = TextPartEncoded | FilePartEncoded
|
|
|
1289
1289
|
* Represents provider-specific options that can be associated with a
|
|
1290
1290
|
* `UserMessage` through module augmentation.
|
|
1291
1291
|
*
|
|
1292
|
-
* @category
|
|
1292
|
+
* @category options
|
|
1293
1293
|
* @since 4.0.0
|
|
1294
1294
|
*/
|
|
1295
1295
|
export interface UserMessageOptions extends ProviderOptions {}
|
|
@@ -1475,7 +1475,7 @@ export type AssistantMessagePartEncoded =
|
|
|
1475
1475
|
* Represents provider-specific options that can be associated with a
|
|
1476
1476
|
* `AssistantMessage` through module augmentation.
|
|
1477
1477
|
*
|
|
1478
|
-
* @category
|
|
1478
|
+
* @category options
|
|
1479
1479
|
* @since 4.0.0
|
|
1480
1480
|
*/
|
|
1481
1481
|
export interface AssistantMessageOptions extends ProviderOptions {}
|
|
@@ -1644,7 +1644,7 @@ export type ToolMessagePartEncoded = ToolResultPartEncoded | ToolApprovalRespons
|
|
|
1644
1644
|
* Represents provider-specific options that can be associated with a
|
|
1645
1645
|
* `ToolMessage` through module augmentation.
|
|
1646
1646
|
*
|
|
1647
|
-
* @category
|
|
1647
|
+
* @category options
|
|
1648
1648
|
* @since 4.0.0
|
|
1649
1649
|
*/
|
|
1650
1650
|
export interface ToolMessageOptions extends ProviderOptions {}
|
|
@@ -335,7 +335,7 @@ export type FormatAttributeName<T extends string | number | symbol> = T extends
|
|
|
335
335
|
* // Results in attributes: "custom.ai.model_name" and "custom.ai.max_tokens"
|
|
336
336
|
* ```
|
|
337
337
|
*
|
|
338
|
-
* @category
|
|
338
|
+
* @category annotations
|
|
339
339
|
* @since 4.0.0
|
|
340
340
|
*/
|
|
341
341
|
export const addSpanAttributes = (
|
|
@@ -407,7 +407,7 @@ const addSpanUsageAttributes = addSpanAttributes("gen_ai.usage", String.camelToS
|
|
|
407
407
|
* }
|
|
408
408
|
* ```
|
|
409
409
|
*
|
|
410
|
-
* @category
|
|
410
|
+
* @category options
|
|
411
411
|
* @since 4.0.0
|
|
412
412
|
*/
|
|
413
413
|
export type GenAITelemetryAttributeOptions = BaseAttributes & {
|
|
@@ -462,7 +462,7 @@ export type GenAITelemetryAttributeOptions = BaseAttributes & {
|
|
|
462
462
|
* })
|
|
463
463
|
* ```
|
|
464
464
|
*
|
|
465
|
-
* @category
|
|
465
|
+
* @category annotations
|
|
466
466
|
* @since 4.0.0
|
|
467
467
|
*/
|
|
468
468
|
export const addGenAIAnnotations: {
|
|
@@ -495,7 +495,7 @@ export const addGenAIAnnotations: {
|
|
|
495
495
|
* })
|
|
496
496
|
* ```
|
|
497
497
|
*
|
|
498
|
-
* @category
|
|
498
|
+
* @category annotations
|
|
499
499
|
* @since 4.0.0
|
|
500
500
|
*/
|
|
501
501
|
(options: GenAITelemetryAttributeOptions): (span: Span) => void
|
|
@@ -528,7 +528,7 @@ export const addGenAIAnnotations: {
|
|
|
528
528
|
* })
|
|
529
529
|
* ```
|
|
530
530
|
*
|
|
531
|
-
* @category
|
|
531
|
+
* @category annotations
|
|
532
532
|
* @since 4.0.0
|
|
533
533
|
*/
|
|
534
534
|
(span: Span, options: GenAITelemetryAttributeOptions): void
|
package/src/unstable/ai/Tool.ts
CHANGED
|
@@ -1595,7 +1595,7 @@ export const providerDefined = <
|
|
|
1595
1595
|
* naming conflicts (i.e. `"web_search"`) to instead use custom names (i.e.
|
|
1596
1596
|
* `"OpenAiWebSearch"`).
|
|
1597
1597
|
*
|
|
1598
|
-
* @category
|
|
1598
|
+
* @category models
|
|
1599
1599
|
* @since 4.0.0
|
|
1600
1600
|
*/
|
|
1601
1601
|
export class NameMapper<Tools extends ReadonlyArray<Any>> {
|
|
@@ -1673,7 +1673,7 @@ export class NameMapper<Tools extends ReadonlyArray<Any>> {
|
|
|
1673
1673
|
* console.log(description) // "This is an example tool"
|
|
1674
1674
|
* ```
|
|
1675
1675
|
*
|
|
1676
|
-
* @category
|
|
1676
|
+
* @category getters
|
|
1677
1677
|
* @since 4.0.0
|
|
1678
1678
|
*/
|
|
1679
1679
|
export const getDescription = <Tool extends Any>(tool: Tool): string | undefined => {
|
|
@@ -1724,7 +1724,7 @@ export const getDescription = <Tool extends Any>(tool: Tool): string | undefined
|
|
|
1724
1724
|
* // }
|
|
1725
1725
|
* ```
|
|
1726
1726
|
*
|
|
1727
|
-
* @category
|
|
1727
|
+
* @category getters
|
|
1728
1728
|
* @since 4.0.0
|
|
1729
1729
|
*/
|
|
1730
1730
|
export const getJsonSchema = <Tool extends Any>(tool: Tool, options?: {
|
|
@@ -1746,7 +1746,7 @@ export const getJsonSchema = <Tool extends Any>(tool: Tool, options?: {
|
|
|
1746
1746
|
* `Schema.toJsonSchemaDocument` and any generated definitions are attached as
|
|
1747
1747
|
* `$defs`.
|
|
1748
1748
|
*
|
|
1749
|
-
* @category
|
|
1749
|
+
* @category converting
|
|
1750
1750
|
* @since 4.0.0
|
|
1751
1751
|
*/
|
|
1752
1752
|
export const getJsonSchemaFromSchema = <S extends Schema.Top>(schema: S, options?: {
|
|
@@ -1942,7 +1942,7 @@ export const Strict = Context.Reference<boolean | undefined>("effect/ai/Tool/Str
|
|
|
1942
1942
|
*
|
|
1943
1943
|
* @see {@link Strict} for the annotation read by this helper
|
|
1944
1944
|
*
|
|
1945
|
-
* @category
|
|
1945
|
+
* @category getters
|
|
1946
1946
|
* @since 4.0.0
|
|
1947
1947
|
*/
|
|
1948
1948
|
export const getStrictMode = <T extends Any>(tool: T): boolean | undefined => Context.get(tool.annotations, Strict)
|
|
@@ -2036,7 +2036,7 @@ function filter(obj: any) {
|
|
|
2036
2036
|
* `__proto__` property or a dangerous `constructor.prototype` shape throw a
|
|
2037
2037
|
* `SyntaxError`.
|
|
2038
2038
|
*
|
|
2039
|
-
* @category
|
|
2039
|
+
* @category unsafe
|
|
2040
2040
|
* @since 4.0.0
|
|
2041
2041
|
*/
|
|
2042
2042
|
export const unsafeSecureJsonParse = (text: string): unknown => {
|
|
@@ -2299,7 +2299,11 @@ export const runWith = <const Name extends string, Input, E, R, ContextInput>(
|
|
|
2299
2299
|
// 2. Extract global flag tokens
|
|
2300
2300
|
const allFlagParams = allFlags.flatMap((f) => Param.extractSingleParams(f.flag))
|
|
2301
2301
|
const globalRegistry = Parser.createFlagRegistry(allFlagParams.filter(Param.isFlagParam))
|
|
2302
|
-
const { flagMap, remainder, errors: globalFlagErrors } = Parser.
|
|
2302
|
+
const { flagMap, remainder, errors: globalFlagErrors } = Parser.consumeGlobalFlags(
|
|
2303
|
+
tokens,
|
|
2304
|
+
command,
|
|
2305
|
+
globalRegistry
|
|
2306
|
+
)
|
|
2303
2307
|
const emptyArgs: Param.ParsedArgs = { flags: flagMap, arguments: [] }
|
|
2304
2308
|
|
|
2305
2309
|
// 3. Parse command arguments from remaining tokens
|
|
@@ -1866,7 +1866,7 @@ export const withFallbackPrompt: {
|
|
|
1866
1866
|
/**
|
|
1867
1867
|
* Represent options which can be used to configure variadic parameters.
|
|
1868
1868
|
*
|
|
1869
|
-
* @category
|
|
1869
|
+
* @category options
|
|
1870
1870
|
* @since 4.0.0
|
|
1871
1871
|
*/
|
|
1872
1872
|
export type VariadicParamOptions = {
|
|
@@ -561,7 +561,7 @@ export const fileText: Primitive<string> = makePrimitive(
|
|
|
561
561
|
* Represents options which can be provided to methods that deal with parsing
|
|
562
562
|
* file content.
|
|
563
563
|
*
|
|
564
|
-
* @category
|
|
564
|
+
* @category options
|
|
565
565
|
* @since 4.0.0
|
|
566
566
|
*/
|
|
567
567
|
export type FileParseOptions = {
|
|
@@ -625,7 +625,7 @@ export const fileParse = (options?: FileParseOptions): Primitive<unknown> => {
|
|
|
625
625
|
* Represents options which can be provided to methods that deal with parsing
|
|
626
626
|
* file content and decoding the file content with a `Schema`.
|
|
627
627
|
*
|
|
628
|
-
* @category
|
|
628
|
+
* @category options
|
|
629
629
|
* @since 4.0.0
|
|
630
630
|
*/
|
|
631
631
|
export type FileSchemaOptions = Struct.Simplify<
|
|
@@ -774,7 +774,7 @@ export const none: Primitive<never> = makePrimitive("None", () => Effect.fail("T
|
|
|
774
774
|
* console.log(Primitive.getTypeName(logLevelChoice)) // "choice"
|
|
775
775
|
* ```
|
|
776
776
|
*
|
|
777
|
-
* @category
|
|
777
|
+
* @category getters
|
|
778
778
|
* @since 4.0.0
|
|
779
779
|
*/
|
|
780
780
|
export const getTypeName = <A>(primitive: Primitive<A>): string => {
|