effect 4.0.0-beta.103 → 4.0.0-beta.104
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/Cache.js +1 -1
- package/dist/Cache.js.map +1 -1
- package/dist/Channel.d.ts +1 -1
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js.map +1 -1
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +28 -7
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +2 -1
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Context.d.ts +2 -2
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js.map +1 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +13 -5
- package/dist/Crypto.js.map +1 -1
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +12 -1
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +132 -14
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +38 -0
- package/dist/Effect.js.map +1 -1
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +10 -2
- package/dist/Equal.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +73 -0
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +1 -1
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/FiberSet.js +1 -1
- package/dist/FileSystem.d.ts +2 -2
- package/dist/Function.d.ts +4 -3
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +5 -5
- package/dist/Function.js.map +1 -1
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +11 -10
- package/dist/Iterable.js.map +1 -1
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +7 -5
- package/dist/Layer.js.map +1 -1
- package/dist/Schedule.d.ts +8 -8
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +4 -4
- package/dist/Schedule.js.map +1 -1
- package/dist/Schema.d.ts +32 -32
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +23 -18
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +3 -3
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +47 -31
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +35 -53
- package/dist/SchemaParser.js.map +1 -1
- package/dist/ScopedCache.js +1 -1
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Sink.d.ts +1 -1
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Stream.d.ts +27 -4
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +27 -2
- package/dist/Stream.js.map +1 -1
- package/dist/SynchronizedRef.js +1 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Terminal.js +1 -1
- package/dist/Terminal.js.map +1 -1
- package/dist/Tuple.d.ts +6 -4
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +0 -56
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +8 -8
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/internal/dateTime.js +1 -1
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/executionPlan.js +51 -3
- package/dist/internal/executionPlan.js.map +1 -1
- package/dist/internal/hashMap.js +12 -8
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/matcher.js +1 -1
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/annotations.js +2 -0
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/toArbitrary.js +1 -1
- package/dist/internal/schema/toArbitrary.js.map +1 -1
- package/dist/internal/trie.js +13 -3
- package/dist/internal/trie.js.map +1 -1
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +11 -1
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +1 -1
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +19 -19
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/Chat.js +1 -1
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +4 -2
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +132 -132
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +8 -8
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.js +1 -1
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +15 -3
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +6 -3
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +3 -3
- package/dist/unstable/cli/CliError.js +11 -11
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +9 -9
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +8 -6
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +7 -5
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +15 -11
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +31 -24
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +31 -17
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.js +2 -2
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +2 -2
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +10 -9
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/bash.js +69 -9
- package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js +24 -18
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/completions/fish.js +5 -5
- package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
- package/dist/unstable/cli/internal/help.d.ts.map +1 -1
- package/dist/unstable/cli/internal/help.js +4 -2
- package/dist/unstable/cli/internal/help.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +3 -3
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cli/internal/wizard.js +2 -2
- package/dist/unstable/cli/internal/wizard.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +7 -7
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +8 -1
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +8 -0
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +12 -0
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +4 -2
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +1 -2
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +7 -6
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +22 -4
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +1 -1
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceMap.js +2 -2
- package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js +17 -0
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +7 -2
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/encoding/Ini.d.ts +20 -0
- package/dist/unstable/encoding/Ini.d.ts.map +1 -0
- package/dist/unstable/encoding/Ini.js +153 -0
- package/dist/unstable/encoding/Ini.js.map +1 -0
- package/dist/unstable/encoding/Msgpack.d.ts +2 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +21 -7
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +7 -1
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +14 -23
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/Toml.d.ts +19 -0
- package/dist/unstable/encoding/Toml.d.ts.map +1 -0
- package/dist/unstable/encoding/Toml.js +434 -0
- package/dist/unstable/encoding/Toml.js.map +1 -0
- package/dist/unstable/encoding/Yaml.d.ts +19 -0
- package/dist/unstable/encoding/Yaml.d.ts.map +1 -0
- package/dist/unstable/encoding/Yaml.js +461 -0
- package/dist/unstable/encoding/Yaml.js.map +1 -0
- package/dist/unstable/encoding/index.d.ts +12 -0
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +12 -0
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +13 -5
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +1 -4
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/http/FindMyWay/internal/queryString.d.ts +11 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.d.ts.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.js +259 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.js.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/router.d.ts +2 -0
- package/dist/unstable/http/FindMyWay/internal/router.d.ts.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/router.js +665 -0
- package/dist/unstable/http/FindMyWay/internal/router.js.map +1 -0
- package/dist/unstable/http/FindMyWay.d.ts +33 -8
- package/dist/unstable/http/FindMyWay.d.ts.map +1 -1
- package/dist/unstable/http/FindMyWay.js +4 -7
- package/dist/unstable/http/FindMyWay.js.map +1 -1
- package/dist/unstable/http/HttpClientError.js +1 -1
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +2 -14
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +1 -16
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +21 -3
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +7 -6
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +8 -6
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +1 -1
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +9 -2
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/MultipartParser/HeadersParser.d.ts +53 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.js +14 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.js.map +1 -0
- package/dist/unstable/http/MultipartParser/Search.d.ts +11 -0
- package/dist/unstable/http/MultipartParser/Search.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/Search.js +14 -0
- package/dist/unstable/http/MultipartParser/Search.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.d.ts +5 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.js +82 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/headers.d.ts +3 -0
- package/dist/unstable/http/MultipartParser/internal/headers.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/headers.js +194 -0
- package/dist/unstable/http/MultipartParser/internal/headers.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts +8 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.js +226 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/search.d.ts +5 -0
- package/dist/unstable/http/MultipartParser/internal/search.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/search.js +120 -0
- package/dist/unstable/http/MultipartParser/internal/search.js.map +1 -0
- package/dist/unstable/http/MultipartParser.d.ts +98 -0
- package/dist/unstable/http/MultipartParser.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser.js +23 -0
- package/dist/unstable/http/MultipartParser.js.map +1 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +2 -2
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/index.d.ts +1 -1
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +1 -1
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/http/internal/httpBody.d.ts +2 -0
- package/dist/unstable/http/internal/httpBody.d.ts.map +1 -0
- package/dist/unstable/http/internal/httpBody.js +10 -0
- package/dist/unstable/http/internal/httpBody.js.map +1 -0
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +5 -5
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +68 -15
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +65 -25
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +6 -4
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +73 -16
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +5 -5
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +17 -17
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +219 -0
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +170 -0
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +8 -0
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +45 -18
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +2 -1
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +2 -2
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +2 -2
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +28 -15
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +1 -1
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +9 -9
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +17 -7
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +22 -12
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +15 -42
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.js +1 -1
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +14 -0
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +18 -9
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +2 -2
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +3 -1
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +1 -1
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +5 -5
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +17 -9
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +28 -12
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +7 -3
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlError.js +13 -13
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +8 -6
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +8 -6
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/WorkerError.js +5 -5
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +3 -3
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +2 -8
- package/src/Cache.ts +1 -1
- package/src/Channel.ts +1 -1
- package/src/Config.ts +28 -7
- package/src/ConfigProvider.ts +4 -1
- package/src/Context.ts +5 -5
- package/src/Crypto.ts +17 -8
- package/src/Duration.ts +16 -2
- package/src/Effect.ts +141 -17
- package/src/Equal.ts +10 -2
- package/src/ExecutionPlan.ts +78 -1
- package/src/FiberSet.ts +1 -1
- package/src/FileSystem.ts +2 -2
- package/src/Function.ts +6 -6
- package/src/Iterable.ts +11 -10
- package/src/Layer.ts +7 -5
- package/src/Schedule.ts +13 -13
- package/src/Schema.ts +50 -41
- package/src/SchemaAST.ts +69 -37
- package/src/SchemaParser.ts +75 -69
- package/src/ScopedCache.ts +1 -1
- package/src/Sink.ts +1 -1
- package/src/Stream.ts +77 -10
- package/src/SynchronizedRef.ts +1 -1
- package/src/Terminal.ts +1 -1
- package/src/Tuple.ts +7 -4
- package/src/TxReentrantLock.ts +39 -35
- package/src/internal/dateTime.ts +1 -1
- package/src/internal/executionPlan.ts +105 -10
- package/src/internal/hashMap.ts +20 -14
- package/src/internal/matcher.ts +2 -2
- package/src/internal/schedule.ts +4 -4
- package/src/internal/schema/annotations.ts +3 -0
- package/src/internal/schema/toArbitrary.ts +3 -1
- package/src/internal/trie.ts +12 -2
- package/src/testing/TestClock.ts +13 -1
- package/src/testing/TestSchema.ts +1 -1
- package/src/unstable/ai/AiError.ts +19 -19
- package/src/unstable/ai/Chat.ts +1 -1
- package/src/unstable/ai/LanguageModel.ts +4 -2
- package/src/unstable/ai/McpSchema.ts +17 -16
- package/src/unstable/ai/McpServer.ts +1 -1
- package/src/unstable/ai/Prompt.ts +21 -6
- package/src/unstable/cli/CliError.ts +12 -12
- package/src/unstable/cli/Command.ts +12 -10
- package/src/unstable/cli/Param.ts +41 -19
- package/src/unstable/cli/Primitive.ts +11 -5
- package/src/unstable/cli/Prompt.ts +36 -20
- package/src/unstable/cli/internal/ansi.ts +2 -2
- package/src/unstable/cli/internal/command.ts +15 -10
- package/src/unstable/cli/internal/completions/bash.ts +59 -9
- package/src/unstable/cli/internal/completions/descriptor.ts +14 -20
- package/src/unstable/cli/internal/completions/fish.ts +5 -7
- package/src/unstable/cli/internal/help.ts +4 -2
- package/src/unstable/cli/internal/parser.ts +3 -3
- package/src/unstable/cli/internal/wizard.ts +2 -2
- package/src/unstable/cluster/ClusterError.ts +7 -7
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +4 -1
- package/src/unstable/cluster/MessageStorage.ts +9 -5
- package/src/unstable/cluster/Reply.ts +21 -0
- package/src/unstable/cluster/RunnerServer.ts +4 -10
- package/src/unstable/cluster/RunnerStorage.ts +9 -7
- package/src/unstable/cluster/Sharding.ts +35 -7
- package/src/unstable/cluster/internal/entityManager.ts +1 -1
- package/src/unstable/cluster/internal/resourceMap.ts +5 -2
- package/src/unstable/cluster/internal/resourceRef.ts +27 -5
- package/src/unstable/devtools/DevToolsClient.ts +3 -2
- package/src/unstable/encoding/Ini.ts +174 -0
- package/src/unstable/encoding/Msgpack.ts +47 -28
- package/src/unstable/encoding/Ndjson.ts +9 -1
- package/src/unstable/encoding/Sse.ts +11 -21
- package/src/unstable/encoding/Toml.ts +504 -0
- package/src/unstable/encoding/Yaml.ts +541 -0
- package/src/unstable/encoding/index.ts +15 -0
- package/src/unstable/eventlog/EventJournal.ts +14 -6
- package/src/unstable/eventlog/EventLogMessage.ts +1 -1
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +1 -1
- package/src/unstable/eventlog/SqlEventJournal.ts +6 -4
- package/src/unstable/http/FindMyWay/internal/queryString.ts +420 -0
- package/src/unstable/http/FindMyWay/internal/router.ts +950 -0
- package/src/unstable/http/FindMyWay.ts +65 -6
- package/src/unstable/http/HttpClientError.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +2 -14
- package/src/unstable/http/HttpClientResponse.ts +1 -17
- package/src/unstable/http/HttpPlatform.ts +34 -6
- package/src/unstable/http/HttpServerRequest.ts +14 -6
- package/src/unstable/http/HttpServerResponse.ts +9 -7
- package/src/unstable/http/Multipart.ts +9 -2
- package/src/unstable/http/MultipartParser/HeadersParser.ts +68 -0
- package/src/unstable/http/MultipartParser/Search.ts +17 -0
- package/src/unstable/http/MultipartParser/internal/contentType.ts +103 -0
- package/src/unstable/http/MultipartParser/internal/headers.ts +615 -0
- package/src/unstable/http/MultipartParser/internal/multipart.ts +262 -0
- package/src/unstable/http/MultipartParser/internal/search.ts +167 -0
- package/src/unstable/http/MultipartParser.ts +115 -0
- package/src/unstable/http/Template.ts +6 -5
- package/src/unstable/http/index.ts +1 -1
- package/src/unstable/http/internal/httpBody.ts +15 -0
- package/src/unstable/httpapi/HttpApi.ts +6 -7
- package/src/unstable/httpapi/HttpApiBuilder.ts +119 -21
- package/src/unstable/httpapi/HttpApiClient.ts +104 -41
- package/src/unstable/httpapi/HttpApiEndpoint.ts +117 -29
- package/src/unstable/httpapi/HttpApiError.ts +33 -39
- package/src/unstable/httpapi/HttpApiMiddleware.ts +1 -1
- package/src/unstable/httpapi/HttpApiSchema.ts +353 -0
- package/src/unstable/httpapi/OpenApi.ts +70 -20
- package/src/unstable/observability/OtlpExporter.ts +4 -2
- package/src/unstable/observability/OtlpLogger.ts +3 -1
- package/src/unstable/observability/OtlpMetrics.ts +32 -18
- package/src/unstable/observability/OtlpTracer.ts +1 -1
- package/src/unstable/persistence/PersistedQueue.ts +12 -9
- package/src/unstable/persistence/Persistence.ts +27 -7
- package/src/unstable/persistence/RateLimiter.ts +54 -31
- package/src/unstable/persistence/Redis.ts +1 -1
- package/src/unstable/rpc/RpcClient.ts +38 -12
- package/src/unstable/rpc/RpcClientError.ts +2 -2
- package/src/unstable/rpc/RpcSerialization.ts +1 -1
- package/src/unstable/schema/VariantSchema.ts +36 -18
- package/src/unstable/socket/Socket.ts +24 -14
- package/src/unstable/sql/SqlClient.ts +65 -56
- package/src/unstable/sql/SqlError.ts +13 -13
- package/src/unstable/sql/SqlResolver.ts +8 -6
- package/src/unstable/sql/Statement.ts +13 -8
- package/src/unstable/workers/WorkerError.ts +5 -5
- package/src/unstable/workflow/WorkflowEngine.ts +8 -3
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts +0 -14
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/HeadersParser.js +0 -14
- package/dist/unstable/http/Multipasta/HeadersParser.js.map +0 -1
- package/dist/unstable/http/Multipasta/Node.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Node.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Node.js +0 -14
- package/dist/unstable/http/Multipasta/Node.js.map +0 -1
- package/dist/unstable/http/Multipasta/Search.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Search.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Search.js +0 -14
- package/dist/unstable/http/Multipasta/Search.js.map +0 -1
- package/dist/unstable/http/Multipasta/Web.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Web.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Web.js +0 -14
- package/dist/unstable/http/Multipasta/Web.js.map +0 -1
- package/dist/unstable/http/Multipasta.d.ts +0 -15
- package/dist/unstable/http/Multipasta.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta.js +0 -15
- package/dist/unstable/http/Multipasta.js.map +0 -1
- package/src/unstable/http/Multipasta/HeadersParser.ts +0 -14
- package/src/unstable/http/Multipasta/Node.ts +0 -14
- package/src/unstable/http/Multipasta/Search.ts +0 -14
- package/src/unstable/http/Multipasta/Web.ts +0 -14
- package/src/unstable/http/Multipasta.ts +0 -15
|
@@ -76,7 +76,7 @@ const redactHeaders = (headers: Record<string, string>): Record<string, string>
|
|
|
76
76
|
* @category errors
|
|
77
77
|
* @since 4.0.0
|
|
78
78
|
*/
|
|
79
|
-
export class NetworkError extends Schema.
|
|
79
|
+
export class NetworkError extends Schema.Error<NetworkError>(
|
|
80
80
|
"effect/ai/AiError/NetworkError"
|
|
81
81
|
)({
|
|
82
82
|
_tag: Schema.tag("NetworkError"),
|
|
@@ -369,7 +369,7 @@ export const HttpContext = Schema.Struct({
|
|
|
369
369
|
* @category errors
|
|
370
370
|
* @since 4.0.0
|
|
371
371
|
*/
|
|
372
|
-
export class RateLimitError extends Schema.
|
|
372
|
+
export class RateLimitError extends Schema.Error<RateLimitError>(
|
|
373
373
|
"effect/ai/AiError/RateLimitError"
|
|
374
374
|
)({
|
|
375
375
|
_tag: Schema.tag("RateLimitError"),
|
|
@@ -420,7 +420,7 @@ export class RateLimitError extends Schema.ErrorClass<RateLimitError>(
|
|
|
420
420
|
* @category errors
|
|
421
421
|
* @since 4.0.0
|
|
422
422
|
*/
|
|
423
|
-
export class QuotaExhaustedError extends Schema.
|
|
423
|
+
export class QuotaExhaustedError extends Schema.Error<QuotaExhaustedError>(
|
|
424
424
|
"effect/ai/AiError/QuotaExhaustedError"
|
|
425
425
|
)({
|
|
426
426
|
_tag: Schema.tag("QuotaExhaustedError"),
|
|
@@ -473,7 +473,7 @@ export class QuotaExhaustedError extends Schema.ErrorClass<QuotaExhaustedError>(
|
|
|
473
473
|
* @category errors
|
|
474
474
|
* @since 4.0.0
|
|
475
475
|
*/
|
|
476
|
-
export class AuthenticationError extends Schema.
|
|
476
|
+
export class AuthenticationError extends Schema.Error<AuthenticationError>(
|
|
477
477
|
"effect/ai/AiError/AuthenticationError"
|
|
478
478
|
)({
|
|
479
479
|
_tag: Schema.tag("AuthenticationError"),
|
|
@@ -531,7 +531,7 @@ export class AuthenticationError extends Schema.ErrorClass<AuthenticationError>(
|
|
|
531
531
|
* @category errors
|
|
532
532
|
* @since 4.0.0
|
|
533
533
|
*/
|
|
534
|
-
export class ContentPolicyError extends Schema.
|
|
534
|
+
export class ContentPolicyError extends Schema.Error<ContentPolicyError>(
|
|
535
535
|
"effect/ai/AiError/ContentPolicyError"
|
|
536
536
|
)({
|
|
537
537
|
_tag: Schema.tag("ContentPolicyError"),
|
|
@@ -584,7 +584,7 @@ export class ContentPolicyError extends Schema.ErrorClass<ContentPolicyError>(
|
|
|
584
584
|
* @category errors
|
|
585
585
|
* @since 4.0.0
|
|
586
586
|
*/
|
|
587
|
-
export class InvalidRequestError extends Schema.
|
|
587
|
+
export class InvalidRequestError extends Schema.Error<InvalidRequestError>(
|
|
588
588
|
"effect/ai/AiError/InvalidRequestError"
|
|
589
589
|
)({
|
|
590
590
|
_tag: Schema.tag("InvalidRequestError"),
|
|
@@ -641,7 +641,7 @@ export class InvalidRequestError extends Schema.ErrorClass<InvalidRequestError>(
|
|
|
641
641
|
* @category errors
|
|
642
642
|
* @since 4.0.0
|
|
643
643
|
*/
|
|
644
|
-
export class InternalProviderError extends Schema.
|
|
644
|
+
export class InternalProviderError extends Schema.Error<InternalProviderError>(
|
|
645
645
|
"effect/ai/AiError/InternalProviderError"
|
|
646
646
|
)({
|
|
647
647
|
_tag: Schema.tag("InternalProviderError"),
|
|
@@ -692,7 +692,7 @@ export class InternalProviderError extends Schema.ErrorClass<InternalProviderErr
|
|
|
692
692
|
* @category errors
|
|
693
693
|
* @since 4.0.0
|
|
694
694
|
*/
|
|
695
|
-
export class InvalidOutputError extends Schema.
|
|
695
|
+
export class InvalidOutputError extends Schema.Error<InvalidOutputError>(
|
|
696
696
|
"effect/ai/AiError/InvalidOutputError"
|
|
697
697
|
)({
|
|
698
698
|
_tag: Schema.tag("InvalidOutputError"),
|
|
@@ -769,7 +769,7 @@ export class InvalidOutputError extends Schema.ErrorClass<InvalidOutputError>(
|
|
|
769
769
|
* @category errors
|
|
770
770
|
* @since 4.0.0
|
|
771
771
|
*/
|
|
772
|
-
export class StructuredOutputError extends Schema.
|
|
772
|
+
export class StructuredOutputError extends Schema.Error<StructuredOutputError>(
|
|
773
773
|
"effect/ai/AiError/StructuredOutputError"
|
|
774
774
|
)({
|
|
775
775
|
_tag: Schema.tag("StructuredOutputError"),
|
|
@@ -848,7 +848,7 @@ export class StructuredOutputError extends Schema.ErrorClass<StructuredOutputErr
|
|
|
848
848
|
* @category errors
|
|
849
849
|
* @since 4.0.0
|
|
850
850
|
*/
|
|
851
|
-
export class UnsupportedSchemaError extends Schema.
|
|
851
|
+
export class UnsupportedSchemaError extends Schema.Error<UnsupportedSchemaError>(
|
|
852
852
|
"effect/ai/AiError/UnsupportedSchemaError"
|
|
853
853
|
)({
|
|
854
854
|
_tag: Schema.tag("UnsupportedSchemaError"),
|
|
@@ -898,7 +898,7 @@ export class UnsupportedSchemaError extends Schema.ErrorClass<UnsupportedSchemaE
|
|
|
898
898
|
* @category errors
|
|
899
899
|
* @since 4.0.0
|
|
900
900
|
*/
|
|
901
|
-
export class UnknownError extends Schema.
|
|
901
|
+
export class UnknownError extends Schema.Error<UnknownError>(
|
|
902
902
|
"effect/ai/AiError/UnknownError"
|
|
903
903
|
)({
|
|
904
904
|
_tag: Schema.tag("UnknownError"),
|
|
@@ -955,7 +955,7 @@ export class UnknownError extends Schema.ErrorClass<UnknownError>(
|
|
|
955
955
|
* @category errors
|
|
956
956
|
* @since 4.0.0
|
|
957
957
|
*/
|
|
958
|
-
export class ToolNotFoundError extends Schema.
|
|
958
|
+
export class ToolNotFoundError extends Schema.Error<ToolNotFoundError>(
|
|
959
959
|
"effect/ai/AiError/ToolNotFoundError"
|
|
960
960
|
)({
|
|
961
961
|
_tag: Schema.tag("ToolNotFoundError"),
|
|
@@ -1009,7 +1009,7 @@ export class ToolNotFoundError extends Schema.ErrorClass<ToolNotFoundError>(
|
|
|
1009
1009
|
* @category errors
|
|
1010
1010
|
* @since 4.0.0
|
|
1011
1011
|
*/
|
|
1012
|
-
export class ToolParameterValidationError extends Schema.
|
|
1012
|
+
export class ToolParameterValidationError extends Schema.Error<ToolParameterValidationError>(
|
|
1013
1013
|
"effect/ai/AiError/ToolParameterValidationError"
|
|
1014
1014
|
)({
|
|
1015
1015
|
_tag: Schema.tag("ToolParameterValidationError"),
|
|
@@ -1063,7 +1063,7 @@ export class ToolParameterValidationError extends Schema.ErrorClass<ToolParamete
|
|
|
1063
1063
|
* @category errors
|
|
1064
1064
|
* @since 4.0.0
|
|
1065
1065
|
*/
|
|
1066
|
-
export class InvalidToolResultError extends Schema.
|
|
1066
|
+
export class InvalidToolResultError extends Schema.Error<InvalidToolResultError>(
|
|
1067
1067
|
"effect/ai/AiError/InvalidToolResultError"
|
|
1068
1068
|
)({
|
|
1069
1069
|
_tag: Schema.tag("InvalidToolResultError"),
|
|
@@ -1116,7 +1116,7 @@ export class InvalidToolResultError extends Schema.ErrorClass<InvalidToolResultE
|
|
|
1116
1116
|
* @category errors
|
|
1117
1117
|
* @since 4.0.0
|
|
1118
1118
|
*/
|
|
1119
|
-
export class ToolResultEncodingError extends Schema.
|
|
1119
|
+
export class ToolResultEncodingError extends Schema.Error<ToolResultEncodingError>(
|
|
1120
1120
|
"effect/ai/AiError/ToolResultEncodingError"
|
|
1121
1121
|
)({
|
|
1122
1122
|
_tag: Schema.tag("ToolResultEncodingError"),
|
|
@@ -1169,7 +1169,7 @@ export class ToolResultEncodingError extends Schema.ErrorClass<ToolResultEncodin
|
|
|
1169
1169
|
* @category errors
|
|
1170
1170
|
* @since 4.0.0
|
|
1171
1171
|
*/
|
|
1172
|
-
export class ToolConfigurationError extends Schema.
|
|
1172
|
+
export class ToolConfigurationError extends Schema.Error<ToolConfigurationError>(
|
|
1173
1173
|
"effect/ai/AiError/ToolConfigurationError"
|
|
1174
1174
|
)({
|
|
1175
1175
|
_tag: Schema.tag("ToolConfigurationError"),
|
|
@@ -1220,7 +1220,7 @@ export class ToolConfigurationError extends Schema.ErrorClass<ToolConfigurationE
|
|
|
1220
1220
|
* @category errors
|
|
1221
1221
|
* @since 4.0.0
|
|
1222
1222
|
*/
|
|
1223
|
-
export class ToolkitRequiredError extends Schema.
|
|
1223
|
+
export class ToolkitRequiredError extends Schema.Error<ToolkitRequiredError>(
|
|
1224
1224
|
"effect/ai/AiError/ToolkitRequiredError"
|
|
1225
1225
|
)({
|
|
1226
1226
|
_tag: Schema.tag("ToolkitRequiredError"),
|
|
@@ -1273,7 +1273,7 @@ export class ToolkitRequiredError extends Schema.ErrorClass<ToolkitRequiredError
|
|
|
1273
1273
|
* @category errors
|
|
1274
1274
|
* @since 4.0.0
|
|
1275
1275
|
*/
|
|
1276
|
-
export class InvalidUserInputError extends Schema.
|
|
1276
|
+
export class InvalidUserInputError extends Schema.Error<InvalidUserInputError>(
|
|
1277
1277
|
"effect/ai/AiError/InvalidUserInputError"
|
|
1278
1278
|
)({
|
|
1279
1279
|
_tag: Schema.tag("InvalidUserInputError"),
|
|
@@ -1439,7 +1439,7 @@ const TypeId = "~effect/unstable/ai/AiError/AiError" as const
|
|
|
1439
1439
|
* @category schemas
|
|
1440
1440
|
* @since 4.0.0
|
|
1441
1441
|
*/
|
|
1442
|
-
export class AiError extends Schema.
|
|
1442
|
+
export class AiError extends Schema.Error<AiError>(
|
|
1443
1443
|
"effect/ai/AiError/AiError"
|
|
1444
1444
|
)({
|
|
1445
1445
|
_tag: Schema.tag("AiError"),
|
package/src/unstable/ai/Chat.ts
CHANGED
|
@@ -699,7 +699,7 @@ export const fromJson = (data: string): Effect.Effect<
|
|
|
699
699
|
* @category errors
|
|
700
700
|
* @since 4.0.0
|
|
701
701
|
*/
|
|
702
|
-
export class ChatNotFoundError extends Schema.
|
|
702
|
+
export class ChatNotFoundError extends Schema.Error<ChatNotFoundError>(
|
|
703
703
|
"effect/ai/Chat/ChatNotFoundError"
|
|
704
704
|
)({
|
|
705
705
|
_tag: Schema.tag("ChatNotFoundError"),
|
|
@@ -2055,7 +2055,8 @@ const executeApprovedToolCalls = <Tools extends Record<string, Tool.Any>>(
|
|
|
2055
2055
|
id: approval.toolCallId,
|
|
2056
2056
|
name: toolCall.name,
|
|
2057
2057
|
isFailure: terminalResult.isFailure,
|
|
2058
|
-
result: terminalResult.encodedResult
|
|
2058
|
+
result: terminalResult.encodedResult,
|
|
2059
|
+
providerExecuted: false
|
|
2059
2060
|
})
|
|
2060
2061
|
})
|
|
2061
2062
|
|
|
@@ -2075,7 +2076,8 @@ const createDenialResults = (
|
|
|
2075
2076
|
id: denial.toolCallId,
|
|
2076
2077
|
name: denial.toolCall.name,
|
|
2077
2078
|
isFailure: true,
|
|
2078
|
-
result: { type: "execution-denied", reason: denial.reason }
|
|
2079
|
+
result: { type: "execution-denied", reason: denial.reason },
|
|
2080
|
+
providerExecuted: false
|
|
2079
2081
|
})
|
|
2080
2082
|
)
|
|
2081
2083
|
}
|
|
@@ -540,7 +540,7 @@ export const PARSE_ERROR_CODE = -32700 as const
|
|
|
540
540
|
* @category errors
|
|
541
541
|
* @since 4.0.0
|
|
542
542
|
*/
|
|
543
|
-
export class ParseError extends Schema.
|
|
543
|
+
export class ParseError extends Schema.Error<ParseError>("effect/ai/McpSchema/ParseError")({
|
|
544
544
|
...McpErrorBase.fields,
|
|
545
545
|
_tag: Schema.tag("ParseError"),
|
|
546
546
|
code: Schema.tag(PARSE_ERROR_CODE)
|
|
@@ -561,7 +561,7 @@ export class ParseError extends Schema.ErrorClass<ParseError>("effect/ai/McpSche
|
|
|
561
561
|
* @category errors
|
|
562
562
|
* @since 4.0.0
|
|
563
563
|
*/
|
|
564
|
-
export class InvalidRequest extends Schema.
|
|
564
|
+
export class InvalidRequest extends Schema.Error<InvalidRequest>("effect/ai/McpSchema/InvalidRequest")({
|
|
565
565
|
...McpErrorBase.fields,
|
|
566
566
|
_tag: Schema.tag("InvalidRequest"),
|
|
567
567
|
code: Schema.tag(INVALID_REQUEST_ERROR_CODE)
|
|
@@ -581,7 +581,7 @@ export class InvalidRequest extends Schema.ErrorClass<InvalidRequest>("effect/ai
|
|
|
581
581
|
* @category errors
|
|
582
582
|
* @since 4.0.0
|
|
583
583
|
*/
|
|
584
|
-
export class MethodNotFound extends Schema.
|
|
584
|
+
export class MethodNotFound extends Schema.Error<MethodNotFound>("effect/ai/McpSchema/MethodNotFound")({
|
|
585
585
|
...McpErrorBase.fields,
|
|
586
586
|
_tag: Schema.tag("MethodNotFound"),
|
|
587
587
|
code: Schema.tag(METHOD_NOT_FOUND_ERROR_CODE)
|
|
@@ -602,7 +602,7 @@ export class MethodNotFound extends Schema.ErrorClass<MethodNotFound>("effect/ai
|
|
|
602
602
|
* @category errors
|
|
603
603
|
* @since 4.0.0
|
|
604
604
|
*/
|
|
605
|
-
export class InvalidParams extends Schema.
|
|
605
|
+
export class InvalidParams extends Schema.Error<InvalidParams>("effect/ai/McpSchema/InvalidParams")({
|
|
606
606
|
...McpErrorBase.fields,
|
|
607
607
|
_tag: Schema.tag("InvalidParams"),
|
|
608
608
|
code: Schema.tag(INVALID_PARAMS_ERROR_CODE)
|
|
@@ -624,7 +624,7 @@ export class InvalidParams extends Schema.ErrorClass<InvalidParams>("effect/ai/M
|
|
|
624
624
|
* @category errors
|
|
625
625
|
* @since 4.0.0
|
|
626
626
|
*/
|
|
627
|
-
export class InternalError extends Schema.
|
|
627
|
+
export class InternalError extends Schema.Error<InternalError>("effect/ai/McpSchema/InternalError")({
|
|
628
628
|
...McpErrorBase.fields,
|
|
629
629
|
_tag: Schema.tag("InternalError"),
|
|
630
630
|
code: Schema.tag(INTERNAL_ERROR_CODE)
|
|
@@ -1562,9 +1562,12 @@ export class CallTool extends Rpc.make("tools/call", {
|
|
|
1562
1562
|
payload: {
|
|
1563
1563
|
...RequestMeta.fields,
|
|
1564
1564
|
name: Schema.String,
|
|
1565
|
-
arguments:
|
|
1566
|
-
Schema.
|
|
1567
|
-
|
|
1565
|
+
arguments: optionalWithDefault(
|
|
1566
|
+
Schema.Record(
|
|
1567
|
+
Schema.String,
|
|
1568
|
+
Schema.Any
|
|
1569
|
+
),
|
|
1570
|
+
() => ({})
|
|
1568
1571
|
)
|
|
1569
1572
|
}
|
|
1570
1573
|
}) {}
|
|
@@ -1851,7 +1854,7 @@ export class CreateMessage extends Rpc.make("sampling/createMessage", {
|
|
|
1851
1854
|
* Optional metadata to pass through to the LLM provider. The format of
|
|
1852
1855
|
* this metadata is provider-specific.
|
|
1853
1856
|
*/
|
|
1854
|
-
metadata: Schema.
|
|
1857
|
+
metadata: optional(Schema.Record(Schema.String, Schema.Unknown))
|
|
1855
1858
|
}
|
|
1856
1859
|
}) {}
|
|
1857
1860
|
|
|
@@ -2149,13 +2152,11 @@ export class Elicit extends Rpc.make("elicitation/create", {
|
|
|
2149
2152
|
* @category schemas
|
|
2150
2153
|
* @since 4.0.0
|
|
2151
2154
|
*/
|
|
2152
|
-
export class ElicitationDeclined
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
})
|
|
2158
|
-
{}
|
|
2155
|
+
export class ElicitationDeclined extends Schema.Error<ElicitationDeclined>("@effect/ai/McpSchema/ElicitationDeclined")({
|
|
2156
|
+
_tag: Schema.tag("ElicitationDeclined"),
|
|
2157
|
+
request: Elicit.payloadSchema,
|
|
2158
|
+
cause: optional(Schema.Defect())
|
|
2159
|
+
}) {}
|
|
2159
2160
|
|
|
2160
2161
|
// =============================================================================
|
|
2161
2162
|
// McpServerClient
|
|
@@ -1299,7 +1299,7 @@ export const registerToolkit: <Tools extends Record<string, Tool.Any>>(
|
|
|
1299
1299
|
new CallToolResult({
|
|
1300
1300
|
isError: false,
|
|
1301
1301
|
structuredContent: typeof result.encodedResult === "object" ? result.encodedResult : undefined,
|
|
1302
|
-
content: [{
|
|
1302
|
+
content: result.encodedResult === undefined ? [] : [{
|
|
1303
1303
|
type: "text",
|
|
1304
1304
|
text: JSON.stringify(result.encodedResult)
|
|
1305
1305
|
}]
|
|
@@ -631,7 +631,8 @@ export const toolCallPart = (params: PartConstructorParams<ToolCallPart>): ToolC
|
|
|
631
631
|
* temperature: 22,
|
|
632
632
|
* condition: "sunny",
|
|
633
633
|
* humidity: 65
|
|
634
|
-
* }
|
|
634
|
+
* },
|
|
635
|
+
* providerExecuted: false
|
|
635
636
|
* })
|
|
636
637
|
* const result = [toolResultPart.name, toolResultPart.isFailure] // => ["get_weather", false]
|
|
637
638
|
* ```
|
|
@@ -656,6 +657,10 @@ export interface ToolResultPart extends BasePart<"tool-result", ToolResultPartOp
|
|
|
656
657
|
* The result returned by the tool execution.
|
|
657
658
|
*/
|
|
658
659
|
readonly result: unknown
|
|
660
|
+
/**
|
|
661
|
+
* Whether the tool was executed by the provider (true) or framework (false).
|
|
662
|
+
*/
|
|
663
|
+
readonly providerExecuted: boolean
|
|
659
664
|
}
|
|
660
665
|
|
|
661
666
|
/**
|
|
@@ -681,6 +686,10 @@ export interface ToolResultPartEncoded extends BasePartEncoded<"tool-result", To
|
|
|
681
686
|
* The result returned by the tool execution.
|
|
682
687
|
*/
|
|
683
688
|
readonly result: unknown
|
|
689
|
+
/**
|
|
690
|
+
* Whether the tool was executed by the provider (true) or framework (false).
|
|
691
|
+
*/
|
|
692
|
+
readonly providerExecuted?: boolean | undefined
|
|
684
693
|
}
|
|
685
694
|
|
|
686
695
|
/**
|
|
@@ -704,6 +713,7 @@ export const ToolResultPart: Schema.Struct<{
|
|
|
704
713
|
readonly name: Schema.String
|
|
705
714
|
readonly isFailure: Schema.Boolean
|
|
706
715
|
readonly result: Schema.Unknown
|
|
716
|
+
readonly providerExecuted: Schema.withDecodingDefault<Schema.Boolean>
|
|
707
717
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
708
718
|
readonly options: Schema.withDecodingDefault<
|
|
709
719
|
Schema.$Record<
|
|
@@ -717,7 +727,8 @@ export const ToolResultPart: Schema.Struct<{
|
|
|
717
727
|
id: Schema.String,
|
|
718
728
|
name: Schema.String,
|
|
719
729
|
isFailure: Schema.Boolean,
|
|
720
|
-
result: Schema.Unknown
|
|
730
|
+
result: Schema.Unknown,
|
|
731
|
+
providerExecuted: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false)))
|
|
721
732
|
}).annotate({ identifier: "ToolResultPart" })
|
|
722
733
|
|
|
723
734
|
/**
|
|
@@ -1420,7 +1431,8 @@ export const userMessage = (params: MessageConstructorParams<UserMessage>): User
|
|
|
1420
1431
|
* result: {
|
|
1421
1432
|
* temperature: 72,
|
|
1422
1433
|
* condition: "sunny"
|
|
1423
|
-
* }
|
|
1434
|
+
* },
|
|
1435
|
+
* providerExecuted: true
|
|
1424
1436
|
* }),
|
|
1425
1437
|
* Prompt.makePart("text", {
|
|
1426
1438
|
* text: "The weather in San Francisco is currently 72°F and sunny."
|
|
@@ -1627,7 +1639,8 @@ export const assistantMessage = (params: MessageConstructorParams<AssistantMessa
|
|
|
1627
1639
|
* { title: "TypeScript Handbook", url: "https://..." },
|
|
1628
1640
|
* { title: "Effective TypeScript", url: "https://..." }
|
|
1629
1641
|
* ]
|
|
1630
|
-
* }
|
|
1642
|
+
* },
|
|
1643
|
+
* providerExecuted: false
|
|
1631
1644
|
* })
|
|
1632
1645
|
* ]
|
|
1633
1646
|
* })
|
|
@@ -2096,11 +2109,13 @@ export const fromResponseParts = (parts: ReadonlyArray<Response.AnyPart>): Promp
|
|
|
2096
2109
|
// Tool Result Parts (skip preliminary results)
|
|
2097
2110
|
case "tool-result": {
|
|
2098
2111
|
if (part.preliminary !== true) {
|
|
2099
|
-
|
|
2112
|
+
const target = part.providerExecuted === true ? assistantParts : toolParts
|
|
2113
|
+
target.push(makePart("tool-result", {
|
|
2100
2114
|
id: part.id,
|
|
2101
2115
|
name: part.name,
|
|
2102
2116
|
isFailure: part.isFailure,
|
|
2103
|
-
result: part.encodedResult
|
|
2117
|
+
result: part.encodedResult,
|
|
2118
|
+
providerExecuted: part.providerExecuted ?? false
|
|
2104
2119
|
}))
|
|
2105
2120
|
}
|
|
2106
2121
|
break
|
|
@@ -115,7 +115,7 @@ export type CliError =
|
|
|
115
115
|
* @category errors
|
|
116
116
|
* @since 4.0.0
|
|
117
117
|
*/
|
|
118
|
-
export class UnrecognizedOption extends Schema.
|
|
118
|
+
export class UnrecognizedOption extends Schema.TaggedError<UnrecognizedOption>(
|
|
119
119
|
`${TypeId}/UnrecognizedOption`
|
|
120
120
|
)("UnrecognizedOption", {
|
|
121
121
|
option: Schema.String,
|
|
@@ -168,7 +168,7 @@ export class UnrecognizedOption extends Schema.TaggedErrorClass<UnrecognizedOpti
|
|
|
168
168
|
* @category errors
|
|
169
169
|
* @since 4.0.0
|
|
170
170
|
*/
|
|
171
|
-
export class DuplicateOption extends Schema.
|
|
171
|
+
export class DuplicateOption extends Schema.TaggedError<DuplicateOption>(
|
|
172
172
|
`${TypeId}/DuplicateOption`
|
|
173
173
|
)("DuplicateOption", {
|
|
174
174
|
option: Schema.String,
|
|
@@ -225,7 +225,7 @@ export class DuplicateOption extends Schema.TaggedErrorClass<DuplicateOption>(
|
|
|
225
225
|
* @category errors
|
|
226
226
|
* @since 4.0.0
|
|
227
227
|
*/
|
|
228
|
-
export class MissingOption extends Schema.
|
|
228
|
+
export class MissingOption extends Schema.TaggedError<MissingOption>(
|
|
229
229
|
`${TypeId}/MissingOption`
|
|
230
230
|
)("MissingOption", {
|
|
231
231
|
option: Schema.String
|
|
@@ -278,7 +278,7 @@ export class MissingOption extends Schema.TaggedErrorClass<MissingOption>(
|
|
|
278
278
|
* @category errors
|
|
279
279
|
* @since 4.0.0
|
|
280
280
|
*/
|
|
281
|
-
export class MissingArgument extends Schema.
|
|
281
|
+
export class MissingArgument extends Schema.TaggedError<MissingArgument>(
|
|
282
282
|
`${TypeId}/MissingArgument`
|
|
283
283
|
)("MissingArgument", {
|
|
284
284
|
argument: Schema.String
|
|
@@ -319,7 +319,7 @@ export class MissingArgument extends Schema.TaggedErrorClass<MissingArgument>(
|
|
|
319
319
|
* @category errors
|
|
320
320
|
* @since 4.0.0
|
|
321
321
|
*/
|
|
322
|
-
export class UnexpectedArgument extends Schema.
|
|
322
|
+
export class UnexpectedArgument extends Schema.TaggedError<UnexpectedArgument>(
|
|
323
323
|
`${TypeId}/UnexpectedArgument`
|
|
324
324
|
)("UnexpectedArgument", {
|
|
325
325
|
arguments: Schema.Array(Schema.String)
|
|
@@ -376,7 +376,7 @@ export class UnexpectedArgument extends Schema.TaggedErrorClass<UnexpectedArgume
|
|
|
376
376
|
* @category errors
|
|
377
377
|
* @since 4.0.0
|
|
378
378
|
*/
|
|
379
|
-
export class InvalidValue extends Schema.
|
|
379
|
+
export class InvalidValue extends Schema.TaggedError<InvalidValue>(
|
|
380
380
|
`${TypeId}/InvalidValue`
|
|
381
381
|
)("InvalidValue", {
|
|
382
382
|
option: Schema.String,
|
|
@@ -425,7 +425,7 @@ export class InvalidValue extends Schema.TaggedErrorClass<InvalidValue>(
|
|
|
425
425
|
* suggestions: ["deploy", "destroy"]
|
|
426
426
|
* })
|
|
427
427
|
*
|
|
428
|
-
* unknownSubcommandError._tag // => "
|
|
428
|
+
* unknownSubcommandError._tag // => "UnknownSubcommand"
|
|
429
429
|
* unknownSubcommandError.subcommand // => "deplyo"
|
|
430
430
|
* unknownSubcommandError.parent // => ["myapp"]
|
|
431
431
|
*
|
|
@@ -440,15 +440,15 @@ export class InvalidValue extends Schema.TaggedErrorClass<InvalidValue>(
|
|
|
440
440
|
* })
|
|
441
441
|
*
|
|
442
442
|
* const parseError = await Effect.runPromise(Effect.flip(parseSubcommand("deplyo")))
|
|
443
|
-
* parseError._tag // => "
|
|
443
|
+
* parseError._tag // => "UnknownSubcommand"
|
|
444
444
|
* ```
|
|
445
445
|
*
|
|
446
446
|
* @category errors
|
|
447
447
|
* @since 4.0.0
|
|
448
448
|
*/
|
|
449
|
-
export class UnknownSubcommand extends Schema.
|
|
449
|
+
export class UnknownSubcommand extends Schema.TaggedError<UnknownSubcommand>(
|
|
450
450
|
`${TypeId}/UnknownSubcommand`
|
|
451
|
-
)("
|
|
451
|
+
)("UnknownSubcommand", {
|
|
452
452
|
subcommand: Schema.String,
|
|
453
453
|
parent: Schema.optional(Schema.Array(Schema.String)),
|
|
454
454
|
suggestions: Schema.Array(Schema.String)
|
|
@@ -513,7 +513,7 @@ export class UnknownSubcommand extends Schema.TaggedErrorClass<UnknownSubcommand
|
|
|
513
513
|
* @category errors
|
|
514
514
|
* @since 4.0.0
|
|
515
515
|
*/
|
|
516
|
-
export class UserError extends Schema.
|
|
516
|
+
export class UserError extends Schema.TaggedError<UserError>(
|
|
517
517
|
`${TypeId}/UserError`
|
|
518
518
|
)("UserError", {
|
|
519
519
|
cause: Schema.Defect()
|
|
@@ -585,7 +585,7 @@ export type NonShowHelpErrors = typeof NonShowHelpErrors.Type
|
|
|
585
585
|
* @category errors
|
|
586
586
|
* @since 4.0.0
|
|
587
587
|
*/
|
|
588
|
-
export class ShowHelp extends Schema.
|
|
588
|
+
export class ShowHelp extends Schema.TaggedError<ShowHelp>(
|
|
589
589
|
`${TypeId}/ShowHelp`
|
|
590
590
|
)("ShowHelp", {
|
|
591
591
|
commandPath: Schema.Array(Schema.String),
|
|
@@ -165,11 +165,11 @@ export interface Command<in out Name extends string, in Input, out ContextInput
|
|
|
165
165
|
readonly annotations: Context.Context<never>
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
|
-
* Whether this command is
|
|
169
|
-
* completions, and unknown-subcommand suggestions.
|
|
168
|
+
* Whether this command is omitted from parent help output, shell
|
|
169
|
+
* completions, and unknown-subcommand suggestions. Unlisted commands still
|
|
170
170
|
* parse and execute normally when invoked by exact name.
|
|
171
171
|
*/
|
|
172
|
-
readonly
|
|
172
|
+
readonly unlisted: boolean
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
/**
|
|
@@ -352,7 +352,7 @@ export declare namespace Command {
|
|
|
352
352
|
readonly commands: NonEmptyReadonlyArray<Command.Any>
|
|
353
353
|
}>
|
|
354
354
|
readonly annotations: Context.Context<never>
|
|
355
|
-
readonly
|
|
355
|
+
readonly unlisted: boolean
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
/**
|
|
@@ -1430,6 +1430,7 @@ export const withSubcommands: {
|
|
|
1430
1430
|
description: impl.description,
|
|
1431
1431
|
shortDescription: impl.shortDescription,
|
|
1432
1432
|
alias: impl.alias,
|
|
1433
|
+
unlisted: impl.unlisted,
|
|
1433
1434
|
annotations: impl.annotations,
|
|
1434
1435
|
globalFlags: impl.globalFlags,
|
|
1435
1436
|
examples: impl.examples,
|
|
@@ -1548,6 +1549,7 @@ export const withSharedFlags: {
|
|
|
1548
1549
|
description: impl.description,
|
|
1549
1550
|
shortDescription: impl.shortDescription,
|
|
1550
1551
|
alias: impl.alias,
|
|
1552
|
+
unlisted: impl.unlisted,
|
|
1551
1553
|
annotations: impl.annotations,
|
|
1552
1554
|
globalFlags: impl.globalFlags,
|
|
1553
1555
|
examples: impl.examples,
|
|
@@ -1886,7 +1888,7 @@ export const withAlias: {
|
|
|
1886
1888
|
) => makeCommand({ ...toImpl(self), alias }))
|
|
1887
1889
|
|
|
1888
1890
|
/**
|
|
1889
|
-
*
|
|
1891
|
+
* Omits a subcommand from parent help output, shell completions, and
|
|
1890
1892
|
* "did you mean?" suggestions while keeping it fully invocable by exact name.
|
|
1891
1893
|
*
|
|
1892
1894
|
* **When to use**
|
|
@@ -1894,7 +1896,7 @@ export const withAlias: {
|
|
|
1894
1896
|
* Use when experimental or internal subcommands should be accepted but not advertised on
|
|
1895
1897
|
* the public CLI surface.
|
|
1896
1898
|
*
|
|
1897
|
-
* **Example** (
|
|
1899
|
+
* **Example** (Unlisting a subcommand)
|
|
1898
1900
|
*
|
|
1899
1901
|
* ```ts import.meta.vitest
|
|
1900
1902
|
* import { Command } from "effect/unstable/cli"
|
|
@@ -1902,23 +1904,23 @@ export const withAlias: {
|
|
|
1902
1904
|
* // `experimental` still runs when invoked as `mycli experimental`,
|
|
1903
1905
|
* // but it does not appear under SUBCOMMANDS in `mycli --help`.
|
|
1904
1906
|
* const experimental = Command.make("experimental").pipe(
|
|
1905
|
-
* Command.
|
|
1907
|
+
* Command.unlisted
|
|
1906
1908
|
* )
|
|
1907
1909
|
*
|
|
1908
1910
|
* const root = Command.make("mycli").pipe(
|
|
1909
1911
|
* Command.withSubcommands([experimental])
|
|
1910
1912
|
* )
|
|
1911
1913
|
*
|
|
1912
|
-
* root.subcommands[0].commands[0].
|
|
1914
|
+
* root.subcommands[0].commands[0].unlisted // => true
|
|
1913
1915
|
* ```
|
|
1914
1916
|
*
|
|
1915
1917
|
* @category combinators
|
|
1916
1918
|
* @since 4.0.0
|
|
1917
1919
|
*/
|
|
1918
|
-
export const
|
|
1920
|
+
export const unlisted = <const Name extends string, Input, E, R, ContextInput>(
|
|
1919
1921
|
self: Command<Name, Input, ContextInput, E, R>
|
|
1920
1922
|
): Command<Name, Input, ContextInput, E, R> =>
|
|
1921
|
-
makeCommand({ ...toImpl(self),
|
|
1923
|
+
makeCommand({ ...toImpl(self), unlisted: true }) as Command<Name, Input, ContextInput, E, R>
|
|
1922
1924
|
|
|
1923
1925
|
/**
|
|
1924
1926
|
* Adds a custom annotation to a command.
|