effect 4.1.5 → 4.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai-docs/package.json +2 -2
- package/dist/Channel.d.ts +104 -7
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +73 -4
- package/dist/Channel.js.map +1 -1
- package/dist/Codegen.d.ts +7 -2
- package/dist/Codegen.d.ts.map +1 -1
- package/dist/Codegen.js +7 -2
- package/dist/Codegen.js.map +1 -1
- package/dist/Config.d.ts +1 -1
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +5 -3
- package/dist/Config.js.map +1 -1
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +79 -31
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +10 -9
- package/dist/Cron.js.map +1 -1
- package/dist/Effect.d.ts +139 -18
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +10 -2
- package/dist/Effect.js.map +1 -1
- package/dist/Equal.d.ts +4 -4
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +78 -66
- package/dist/Equal.js.map +1 -1
- package/dist/Formatter.js +4 -4
- package/dist/Formatter.js.map +1 -1
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +34 -41
- package/dist/Hash.js.map +1 -1
- package/dist/LayerRef.d.ts +1 -1
- package/dist/LayerRef.d.ts.map +1 -1
- package/dist/LayerRef.js +3 -3
- package/dist/LayerRef.js.map +1 -1
- package/dist/Logger.d.ts +37 -13
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +39 -10
- package/dist/Logger.js.map +1 -1
- package/dist/Match.d.ts +23 -23
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +3 -4
- package/dist/Metric.js.map +1 -1
- package/dist/Order.js +1 -1
- package/dist/Order.js.map +1 -1
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +49 -21
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +2 -1
- package/dist/Predicate.js.map +1 -1
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +15 -9
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +41 -0
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +51 -390
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +2 -2
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +199 -98
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +29 -50
- package/dist/SchemaParser.js.map +1 -1
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +6 -4
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Stream.d.ts +128 -5
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +124 -29
- package/dist/Stream.js.map +1 -1
- package/dist/String.js +1 -1
- package/dist/String.js.map +1 -1
- package/dist/Tracer.d.ts +10 -0
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +3 -4
- package/dist/Tracer.js.map +1 -1
- package/dist/ai/McpClient.d.ts +68 -4
- package/dist/ai/McpClient.d.ts.map +1 -1
- package/dist/ai/McpClient.js +100 -17
- package/dist/ai/McpClient.js.map +1 -1
- package/dist/ai/McpClientError.d.ts +46 -4
- package/dist/ai/McpClientError.d.ts.map +1 -1
- package/dist/ai/McpClientError.js +38 -3
- package/dist/ai/McpClientError.js.map +1 -1
- package/dist/ai/McpServer.d.ts +158 -7
- package/dist/ai/McpServer.d.ts.map +1 -1
- package/dist/ai/McpServer.js +103 -49
- package/dist/ai/McpServer.js.map +1 -1
- package/dist/ai/Prompt.d.ts +3 -1
- package/dist/ai/Prompt.d.ts.map +1 -1
- package/dist/ai/Prompt.js +17 -3
- package/dist/ai/Prompt.js.map +1 -1
- package/dist/ai/Skill.d.ts +172 -0
- package/dist/ai/Skill.d.ts.map +1 -0
- package/dist/ai/Skill.js +209 -0
- package/dist/ai/Skill.js.map +1 -0
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +5 -0
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2024_11_05.js +9 -7
- package/dist/ai/internal/mcpProtocol/v2024_11_05.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_03_26.js +12 -11
- package/dist/ai/internal/mcpProtocol/v2025_03_26.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_06_18.js +18 -17
- package/dist/ai/internal/mcpProtocol/v2025_06_18.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_11_25.js +19 -18
- package/dist/ai/internal/mcpProtocol/v2025_11_25.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2026_07_28.js +1 -1
- package/dist/ai/internal/mcpProtocol/v2026_07_28.js.map +1 -1
- package/dist/ai/internal/mcpProtocol.js +11 -0
- package/dist/ai/internal/mcpProtocol.js.map +1 -1
- package/dist/ai/internal/mcpRuntime.js +29 -17
- package/dist/ai/internal/mcpRuntime.js.map +1 -1
- package/dist/ai/internal/mcpSchema/v2024_11_05.js +2 -1
- package/dist/ai/internal/mcpSchema/v2024_11_05.js.map +1 -1
- package/dist/ai/internal/mcpSchema/v2025_03_26.js +1 -8
- package/dist/ai/internal/mcpSchema/v2025_03_26.js.map +1 -1
- package/dist/ai/internal/mcpSchema/v2025_06_18.js +5 -9
- package/dist/ai/internal/mcpSchema/v2025_06_18.js.map +1 -1
- package/dist/ai/internal/mcpSchema/v2025_11_25.js +1 -8
- package/dist/ai/internal/mcpSchema/v2025_11_25.js.map +1 -1
- package/dist/ai/internal/mcpSchema/v2026_07_28.js +4 -3
- package/dist/ai/internal/mcpSchema/v2026_07_28.js.map +1 -1
- package/dist/cluster/ClusterCron.d.ts +5 -20
- package/dist/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/cluster/ClusterCron.js +16 -4
- package/dist/cluster/ClusterCron.js.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.js +155 -83
- package/dist/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/cluster/MessageStorage.d.ts +56 -0
- package/dist/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/cluster/MessageStorage.js +18 -2
- package/dist/cluster/MessageStorage.js.map +1 -1
- package/dist/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/cluster/SqlMessageStorage.js +48 -23
- package/dist/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/cluster/internal/entityActivation.js +2 -0
- package/dist/cluster/internal/entityActivation.js.map +1 -1
- package/dist/cluster/internal/entityManager.js +8 -5
- package/dist/cluster/internal/entityManager.js.map +1 -1
- package/dist/encoding/Base64.js +5 -1
- package/dist/encoding/Base64.js.map +1 -1
- package/dist/encoding/Base64Url.d.ts.map +1 -1
- package/dist/encoding/Base64Url.js +6 -1
- package/dist/encoding/Base64Url.js.map +1 -1
- package/dist/encoding/Hex.js +7 -5
- package/dist/encoding/Hex.js.map +1 -1
- package/dist/encoding/Xml.d.ts +38 -9
- package/dist/encoding/Xml.d.ts.map +1 -1
- package/dist/encoding/Xml.js +63 -31
- package/dist/encoding/Xml.js.map +1 -1
- package/dist/http/FetchHttpClient.d.ts +2 -1
- package/dist/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/http/FetchHttpClient.js +14 -10
- package/dist/http/FetchHttpClient.js.map +1 -1
- package/dist/http/Headers.d.ts +201 -3
- package/dist/http/Headers.d.ts.map +1 -1
- package/dist/http/Headers.js +205 -3
- package/dist/http/Headers.js.map +1 -1
- package/dist/http/HttpClient.d.ts.map +1 -1
- package/dist/http/HttpClient.js +11 -7
- package/dist/http/HttpClient.js.map +1 -1
- package/dist/http/HttpClientError.d.ts +1 -0
- package/dist/http/HttpClientError.d.ts.map +1 -1
- package/dist/http/HttpClientError.js +32 -9
- package/dist/http/HttpClientError.js.map +1 -1
- package/dist/http/HttpClientRequest.d.ts +46 -0
- package/dist/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/http/HttpClientRequest.js +15 -0
- package/dist/http/HttpClientRequest.js.map +1 -1
- package/dist/http/HttpClientResponse.d.ts +132 -0
- package/dist/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/http/HttpClientResponse.js +83 -0
- package/dist/http/HttpClientResponse.js.map +1 -1
- package/dist/http/HttpEffect.d.ts.map +1 -1
- package/dist/http/HttpEffect.js +31 -2
- package/dist/http/HttpEffect.js.map +1 -1
- package/dist/http/HttpMiddleware.js +1 -1
- package/dist/http/HttpMiddleware.js.map +1 -1
- package/dist/http/HttpServerError.d.ts +1 -1
- package/dist/http/HttpServerError.js +1 -1
- package/dist/http/HttpServerResponse.d.ts +118 -0
- package/dist/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/http/HttpServerResponse.js +43 -0
- package/dist/http/HttpServerResponse.js.map +1 -1
- package/dist/http/Multipart.d.ts.map +1 -1
- package/dist/http/Multipart.js +0 -5
- package/dist/http/Multipart.js.map +1 -1
- package/dist/http/MultipartParser/internal/contentType.d.ts +6 -0
- package/dist/http/MultipartParser/internal/contentType.d.ts.map +1 -1
- package/dist/http/MultipartParser/internal/contentType.js +1 -1
- package/dist/http/MultipartParser/internal/contentType.js.map +1 -1
- package/dist/http/internal/clientPath.d.ts +2 -0
- package/dist/http/internal/clientPath.d.ts.map +1 -0
- package/dist/http/internal/clientPath.js +24 -0
- package/dist/http/internal/clientPath.js.map +1 -0
- package/dist/http/internal/redactedPath.js +2 -0
- package/dist/http/internal/redactedPath.js.map +1 -1
- package/dist/http/internal/tracing.js +5 -3
- package/dist/http/internal/tracing.js.map +1 -1
- package/dist/http-api/HttpApi.d.ts +2 -2
- package/dist/http-api/HttpApi.d.ts.map +1 -1
- package/dist/http-api/HttpApi.js +30 -7
- package/dist/http-api/HttpApi.js.map +1 -1
- package/dist/http-api/HttpApiBuilder.d.ts.map +1 -1
- package/dist/http-api/HttpApiBuilder.js +5 -2
- package/dist/http-api/HttpApiBuilder.js.map +1 -1
- package/dist/http-api/HttpApiClient.d.ts.map +1 -1
- package/dist/http-api/HttpApiClient.js +23 -6
- package/dist/http-api/HttpApiClient.js.map +1 -1
- package/dist/http-api/internal/redactedKeys.d.ts +2 -0
- package/dist/http-api/internal/redactedKeys.d.ts.map +1 -0
- package/dist/http-api/internal/redactedKeys.js +37 -0
- package/dist/http-api/internal/redactedKeys.js.map +1 -0
- package/dist/internal/base64.js +34 -2
- package/dist/internal/base64.js.map +1 -1
- package/dist/internal/core.js +60 -43
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/dateTime.js +35 -17
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/effect.js +60 -52
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/equal.js +44 -13
- package/dist/internal/equal.js.map +1 -1
- package/dist/internal/fiberCachedKeys.d.ts +2 -0
- package/dist/internal/fiberCachedKeys.d.ts.map +1 -0
- package/dist/internal/fiberCachedKeys.js +48 -0
- package/dist/internal/fiberCachedKeys.js.map +1 -0
- package/dist/internal/hashMap.js +1 -1
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/matcher.js +17 -17
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/predicate.d.ts +2 -0
- package/dist/internal/predicate.d.ts.map +1 -0
- package/dist/internal/predicate.js +10 -0
- package/dist/internal/predicate.js.map +1 -0
- package/dist/internal/references.js +8 -11
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/schema/schemaCodegen.js +3 -2
- package/dist/internal/schema/schemaCodegen.js.map +1 -1
- package/dist/internal/schema/schemaCodegenBuiltIns.d.ts +2 -0
- package/dist/internal/schema/schemaCodegenBuiltIns.d.ts.map +1 -0
- package/dist/internal/schema/schemaCodegenBuiltIns.js +425 -0
- package/dist/internal/schema/schemaCodegenBuiltIns.js.map +1 -0
- package/dist/internal/schema/toEquivalence.js +3 -4
- package/dist/internal/schema/toEquivalence.js.map +1 -1
- package/dist/internal/version.js +1 -1
- package/dist/jose/JoseError.d.ts +51 -1
- package/dist/jose/JoseError.d.ts.map +1 -1
- package/dist/jose/JoseError.js +25 -18
- package/dist/jose/JoseError.js.map +1 -1
- package/dist/jose/internal/compact.js +10 -5
- package/dist/jose/internal/compact.js.map +1 -1
- package/dist/observability/Otlp.d.ts +19 -0
- package/dist/observability/Otlp.d.ts.map +1 -1
- package/dist/observability/Otlp.js +10 -0
- package/dist/observability/Otlp.js.map +1 -1
- package/dist/observability/OtlpExporter.d.ts +49 -13
- package/dist/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/observability/OtlpExporter.js +135 -54
- package/dist/observability/OtlpExporter.js.map +1 -1
- package/dist/observability/OtlpLogger.d.ts +14 -0
- package/dist/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/observability/OtlpLogger.js +10 -2
- package/dist/observability/OtlpLogger.js.map +1 -1
- package/dist/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/observability/OtlpMetrics.js +2 -0
- package/dist/observability/OtlpMetrics.js.map +1 -1
- package/dist/observability/OtlpTracer.d.ts +14 -0
- package/dist/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/observability/OtlpTracer.js +10 -2
- package/dist/observability/OtlpTracer.js.map +1 -1
- package/dist/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/persistence/KeyValueStore.js +6 -4
- package/dist/persistence/KeyValueStore.js.map +1 -1
- package/dist/reactivity/Atom.d.ts.map +1 -1
- package/dist/reactivity/Atom.js +10 -9
- package/dist/reactivity/Atom.js.map +1 -1
- package/dist/rpc/RpcClient.d.ts.map +1 -1
- package/dist/rpc/RpcClient.js +32 -1
- package/dist/rpc/RpcClient.js.map +1 -1
- package/dist/rpc/RpcGroup.d.ts +1 -1
- package/dist/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/rpc/RpcGroup.js +4 -0
- package/dist/rpc/RpcGroup.js.map +1 -1
- package/dist/sql/Migrator.d.ts.map +1 -1
- package/dist/sql/Migrator.js +2 -5
- package/dist/sql/Migrator.js.map +1 -1
- package/dist/sql/SqlClient.d.ts.map +1 -1
- package/dist/sql/SqlClient.js +5 -1
- package/dist/sql/SqlClient.js.map +1 -1
- package/dist/sql/Statement.d.ts +23 -0
- package/dist/sql/Statement.d.ts.map +1 -1
- package/dist/sql/Statement.js +30 -5
- package/dist/sql/Statement.js.map +1 -1
- package/dist/workers/Worker.d.ts +21 -0
- package/dist/workers/Worker.d.ts.map +1 -1
- package/dist/workers/Worker.js +23 -0
- package/dist/workers/Worker.js.map +1 -1
- package/dist/workflow/Activity.d.ts +18 -0
- package/dist/workflow/Activity.d.ts.map +1 -1
- package/dist/workflow/Activity.js +13 -4
- package/dist/workflow/Activity.js.map +1 -1
- package/dist/workflow/Workflow.d.ts +10 -9
- package/dist/workflow/Workflow.d.ts.map +1 -1
- package/dist/workflow/Workflow.js +33 -22
- package/dist/workflow/Workflow.js.map +1 -1
- package/dist/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/workflow/WorkflowEngine.js +26 -12
- package/dist/workflow/WorkflowEngine.js.map +1 -1
- package/dist/workflow/internal/retry.d.ts +2 -0
- package/dist/workflow/internal/retry.d.ts.map +1 -0
- package/dist/workflow/internal/retry.js +11 -0
- package/dist/workflow/internal/retry.js.map +1 -0
- package/dist/workflow/internal/scope.d.ts +2 -0
- package/dist/workflow/internal/scope.d.ts.map +1 -0
- package/dist/workflow/internal/scope.js +26 -0
- package/dist/workflow/internal/scope.js.map +1 -0
- package/package.json +3 -3
- package/src/Channel.ts +105 -8
- package/src/Codegen.ts +7 -2
- package/src/Config.ts +6 -3
- package/src/Context.ts +108 -50
- package/src/Cron.ts +11 -10
- package/src/Effect.ts +224 -48
- package/src/Equal.ts +93 -80
- package/src/Formatter.ts +4 -4
- package/src/Hash.ts +49 -48
- package/src/LayerRef.ts +6 -4
- package/src/Logger.ts +68 -25
- package/src/Match.ts +78 -50
- package/src/Metric.ts +4 -4
- package/src/Order.ts +1 -1
- package/src/Pool.ts +62 -33
- package/src/Predicate.ts +2 -5
- package/src/Scheduler.ts +27 -10
- package/src/Schema.ts +79 -296
- package/src/SchemaAST.ts +231 -157
- package/src/SchemaParser.ts +40 -57
- package/src/ScopedCache.ts +6 -4
- package/src/Stream.ts +167 -33
- package/src/String.ts +1 -1
- package/src/Tracer.ts +11 -2
- package/src/ai/McpClient.ts +157 -15
- package/src/ai/McpClientError.ts +55 -4
- package/src/ai/McpServer.ts +318 -91
- package/src/ai/Prompt.ts +20 -3
- package/src/ai/Skill.ts +236 -0
- package/src/ai/index.ts +6 -0
- package/src/ai/internal/mcpProtocol/v2024_11_05.ts +8 -13
- package/src/ai/internal/mcpProtocol/v2025_03_26.ts +13 -15
- package/src/ai/internal/mcpProtocol/v2025_06_18.ts +21 -23
- package/src/ai/internal/mcpProtocol/v2025_11_25.ts +22 -24
- package/src/ai/internal/mcpProtocol/v2026_07_28.ts +1 -1
- package/src/ai/internal/mcpProtocol.ts +15 -0
- package/src/ai/internal/mcpRuntime.ts +36 -13
- package/src/ai/internal/mcpSchema/v2024_11_05.ts +2 -1
- package/src/ai/internal/mcpSchema/v2025_03_26.ts +1 -9
- package/src/ai/internal/mcpSchema/v2025_06_18.ts +3 -10
- package/src/ai/internal/mcpSchema/v2025_11_25.ts +1 -9
- package/src/ai/internal/mcpSchema/v2026_07_28.ts +6 -8
- package/src/cluster/ClusterCron.ts +31 -20
- package/src/cluster/ClusterWorkflowEngine.ts +172 -96
- package/src/cluster/MessageStorage.ts +51 -2
- package/src/cluster/SqlMessageStorage.ts +88 -36
- package/src/cluster/internal/entityActivation.ts +6 -0
- package/src/cluster/internal/entityManager.ts +8 -4
- package/src/encoding/Base64.ts +5 -1
- package/src/encoding/Base64Url.ts +6 -1
- package/src/encoding/Hex.ts +5 -5
- package/src/encoding/Xml.ts +96 -26
- package/src/http/FetchHttpClient.ts +8 -5
- package/src/http/Headers.ts +309 -3
- package/src/http/HttpClient.ts +19 -7
- package/src/http/HttpClientError.ts +42 -9
- package/src/http/HttpClientRequest.ts +51 -0
- package/src/http/HttpClientResponse.ts +156 -0
- package/src/http/HttpEffect.ts +23 -3
- package/src/http/HttpMiddleware.ts +1 -1
- package/src/http/HttpServerError.ts +1 -1
- package/src/http/HttpServerResponse.ts +126 -0
- package/src/http/Multipart.ts +0 -5
- package/src/http/MultipartParser/internal/contentType.ts +1 -1
- package/src/http/internal/clientPath.ts +39 -0
- package/src/http/internal/redactedPath.ts +4 -0
- package/src/http/internal/tracing.ts +6 -3
- package/src/http-api/HttpApi.ts +29 -8
- package/src/http-api/HttpApiBuilder.ts +7 -2
- package/src/http-api/HttpApiClient.ts +30 -7
- package/src/http-api/internal/redactedKeys.ts +40 -0
- package/src/internal/base64.ts +57 -2
- package/src/internal/core.ts +80 -44
- package/src/internal/dateTime.ts +43 -24
- package/src/internal/effect.ts +115 -157
- package/src/internal/equal.ts +73 -17
- package/src/internal/fiberCachedKeys.ts +81 -0
- package/src/internal/hashMap.ts +1 -1
- package/src/internal/matcher.ts +34 -113
- package/src/internal/predicate.ts +10 -0
- package/src/internal/references.ts +21 -14
- package/src/internal/schema/schemaCodegen.ts +5 -4
- package/src/internal/schema/schemaCodegenBuiltIns.ts +343 -0
- package/src/internal/schema/toEquivalence.ts +3 -5
- package/src/internal/version.ts +1 -1
- package/src/jose/JoseError.ts +34 -0
- package/src/jose/internal/compact.ts +14 -5
- package/src/observability/Otlp.ts +29 -0
- package/src/observability/OtlpExporter.ts +206 -75
- package/src/observability/OtlpLogger.ts +24 -2
- package/src/observability/OtlpMetrics.ts +2 -0
- package/src/observability/OtlpTracer.ts +24 -3
- package/src/persistence/KeyValueStore.ts +17 -14
- package/src/reactivity/Atom.ts +12 -18
- package/src/rpc/RpcClient.ts +26 -1
- package/src/rpc/RpcGroup.ts +4 -1
- package/src/sql/Migrator.ts +2 -11
- package/src/sql/SqlClient.ts +14 -8
- package/src/sql/Statement.ts +48 -12
- package/src/workers/Worker.ts +25 -0
- package/src/workflow/Activity.ts +28 -4
- package/src/workflow/Workflow.ts +68 -44
- package/src/workflow/WorkflowEngine.ts +38 -15
- package/src/workflow/internal/retry.ts +12 -0
- package/src/workflow/internal/scope.ts +36 -0
- package/dist/internal/hash.d.ts +0 -2
- package/dist/internal/hash.d.ts.map +0 -1
- package/dist/internal/hash.js +0 -11
- package/dist/internal/hash.js.map +0 -1
- package/dist/internal/metric.d.ts +0 -2
- package/dist/internal/metric.d.ts.map +0 -1
- package/dist/internal/metric.js +0 -3
- package/dist/internal/metric.js.map +0 -1
- package/src/internal/hash.ts +0 -11
- package/src/internal/metric.ts +0 -2
package/ai-docs/package.json
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@effect/sql-sqlite-wasm": "workspace:*",
|
|
28
28
|
"@effect/vitest": "workspace:*",
|
|
29
29
|
"effect": "workspace:*",
|
|
30
|
-
"hono": "^4.13.
|
|
31
|
-
"nodemailer": "^10.
|
|
30
|
+
"hono": "^4.13.19",
|
|
31
|
+
"nodemailer": "^10.6.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/nodemailer": "^8.0.2"
|
package/dist/Channel.d.ts
CHANGED
|
@@ -7,6 +7,23 @@
|
|
|
7
7
|
* higher-level modules instead. This module is useful when implementing stream
|
|
8
8
|
* operators or specialized streaming workflows.
|
|
9
9
|
*
|
|
10
|
+
* Every channel runs in a scope supplied by its consumer, called the channel
|
|
11
|
+
* scope. The run functions create that scope and close it before they return,
|
|
12
|
+
* however the channel ends: completion, failure, defect, an early stop by a
|
|
13
|
+
* downstream operator, or interruption. `toPull` and `toPullScoped` use the
|
|
14
|
+
* scope they are given and leave closing it to its owner. Operators that run
|
|
15
|
+
* inner channels, such as `flatMap` and `concat`, may give each inner channel
|
|
16
|
+
* a child scope that closes sooner.
|
|
17
|
+
*
|
|
18
|
+
* `acquireUseRelease`, `ensuring`, `onExit`, and `scoped` finalize when their
|
|
19
|
+
* channel ends on its own (completion, failure, or defect), before downstream
|
|
20
|
+
* observes that end. `callback`, `callbackArray`, `unwrap`, and
|
|
21
|
+
* `acquireRelease` register finalizers in the channel scope, so they run when
|
|
22
|
+
* that scope closes. A channel that is abandoned because a downstream operator
|
|
23
|
+
* stopped pulling from it is finalized no later than when its channel scope
|
|
24
|
+
* closes. Under `toPull`, that can be after the pull has returned its final
|
|
25
|
+
* result, so close the scope to release what the channel still holds.
|
|
26
|
+
*
|
|
10
27
|
* @stability stable
|
|
11
28
|
* @since 2.0.0
|
|
12
29
|
*/
|
|
@@ -329,6 +346,12 @@ export declare const DefaultChunkSize: number;
|
|
|
329
346
|
/**
|
|
330
347
|
* Creates a `Channel` that interacts with a callback function using a queue.
|
|
331
348
|
*
|
|
349
|
+
* **Details**
|
|
350
|
+
*
|
|
351
|
+
* The callback effect runs in the channel scope. Finalizers it registers, for
|
|
352
|
+
* example with `Effect.acquireRelease`, run when that scope closes, not when
|
|
353
|
+
* the queue ends.
|
|
354
|
+
*
|
|
332
355
|
* **Example** (Creating channels from callbacks)
|
|
333
356
|
*
|
|
334
357
|
* ```ts import.meta.vitest
|
|
@@ -356,6 +379,12 @@ export declare const callback: <A, E = never, R = never>(f: (queue: Queue.Queue<
|
|
|
356
379
|
/**
|
|
357
380
|
* Creates a `Channel` that interacts with a callback function using a queue, emitting arrays.
|
|
358
381
|
*
|
|
382
|
+
* **Details**
|
|
383
|
+
*
|
|
384
|
+
* The callback effect runs in the channel scope. Finalizers it registers, for
|
|
385
|
+
* example with `Effect.acquireRelease`, run when that scope closes, not when
|
|
386
|
+
* the queue ends.
|
|
387
|
+
*
|
|
359
388
|
* **Example** (Creating array channels from callbacks)
|
|
360
389
|
*
|
|
361
390
|
* ```ts import.meta.vitest
|
|
@@ -404,6 +433,10 @@ export declare const suspend: <OutElem, OutErr, OutDone, InElem, InErr, InDone,
|
|
|
404
433
|
* Acquisition is uninterruptible. If acquisition fails, `use` is not run and
|
|
405
434
|
* `release` is not registered.
|
|
406
435
|
*
|
|
436
|
+
* The finalizer runs when the channel ends on its own (completion, failure, or
|
|
437
|
+
* defect), before downstream observes that end. If a downstream operator stops
|
|
438
|
+
* pulling first, it runs no later than when the channel scope closes.
|
|
439
|
+
*
|
|
407
440
|
* **Example** (Managing resources with acquire-use-release)
|
|
408
441
|
*
|
|
409
442
|
* ```ts import.meta.vitest
|
|
@@ -430,8 +463,9 @@ export declare const acquireUseRelease: <A, E, R, OutElem, OutErr, OutDone, InEl
|
|
|
430
463
|
* **Details**
|
|
431
464
|
*
|
|
432
465
|
* The release action runs when the channel scope closes and receives the scope
|
|
433
|
-
* exit.
|
|
434
|
-
*
|
|
466
|
+
* exit. The channel scope is the scope supplied by whatever consumes this
|
|
467
|
+
* channel: a run function, `toPull`, or an enclosing operator. If acquisition
|
|
468
|
+
* fails, no element is emitted and `release` is not registered.
|
|
435
469
|
*
|
|
436
470
|
* **Example** (Managing resources with acquire-release)
|
|
437
471
|
*
|
|
@@ -446,6 +480,8 @@ export declare const acquireUseRelease: <A, E, R, OutElem, OutErr, OutDone, InEl
|
|
|
446
480
|
* const observed = [await Effect.runPromise(Channel.runCollect(channel)), released] // => [["resource"], ["resource"]]
|
|
447
481
|
* ```
|
|
448
482
|
*
|
|
483
|
+
* @see {@link acquireUseRelease} for releasing when the channel itself ends
|
|
484
|
+
*
|
|
449
485
|
* @stability stable
|
|
450
486
|
* @category constructors
|
|
451
487
|
* @since 4.0.0
|
|
@@ -458,8 +494,9 @@ export declare const acquireRelease: {
|
|
|
458
494
|
* **Details**
|
|
459
495
|
*
|
|
460
496
|
* The release action runs when the channel scope closes and receives the scope
|
|
461
|
-
* exit.
|
|
462
|
-
*
|
|
497
|
+
* exit. The channel scope is the scope supplied by whatever consumes this
|
|
498
|
+
* channel: a run function, `toPull`, or an enclosing operator. If acquisition
|
|
499
|
+
* fails, no element is emitted and `release` is not registered.
|
|
463
500
|
*
|
|
464
501
|
* **Example** (Managing resources with acquire-release)
|
|
465
502
|
*
|
|
@@ -474,6 +511,8 @@ export declare const acquireRelease: {
|
|
|
474
511
|
* const observed = [await Effect.runPromise(Channel.runCollect(channel)), released] // => [["resource"], ["resource"]]
|
|
475
512
|
* ```
|
|
476
513
|
*
|
|
514
|
+
* @see {@link acquireUseRelease} for releasing when the channel itself ends
|
|
515
|
+
*
|
|
477
516
|
* @stability stable
|
|
478
517
|
* @category constructors
|
|
479
518
|
* @since 4.0.0
|
|
@@ -486,8 +525,9 @@ export declare const acquireRelease: {
|
|
|
486
525
|
* **Details**
|
|
487
526
|
*
|
|
488
527
|
* The release action runs when the channel scope closes and receives the scope
|
|
489
|
-
* exit.
|
|
490
|
-
*
|
|
528
|
+
* exit. The channel scope is the scope supplied by whatever consumes this
|
|
529
|
+
* channel: a run function, `toPull`, or an enclosing operator. If acquisition
|
|
530
|
+
* fails, no element is emitted and `release` is not registered.
|
|
491
531
|
*
|
|
492
532
|
* **Example** (Managing resources with acquire-release)
|
|
493
533
|
*
|
|
@@ -502,6 +542,8 @@ export declare const acquireRelease: {
|
|
|
502
542
|
* const observed = [await Effect.runPromise(Channel.runCollect(channel)), released] // => [["resource"], ["resource"]]
|
|
503
543
|
* ```
|
|
504
544
|
*
|
|
545
|
+
* @see {@link acquireUseRelease} for releasing when the channel itself ends
|
|
546
|
+
*
|
|
505
547
|
* @stability stable
|
|
506
548
|
* @category constructors
|
|
507
549
|
* @since 4.0.0
|
|
@@ -5570,6 +5612,11 @@ export declare const pipeToOrFail: {
|
|
|
5570
5612
|
* Constructs a `Channel` from a scoped effect that will result in a
|
|
5571
5613
|
* `Channel` if successful.
|
|
5572
5614
|
*
|
|
5615
|
+
* **Details**
|
|
5616
|
+
*
|
|
5617
|
+
* The effect runs in the channel scope, so finalizers it registers run when
|
|
5618
|
+
* that scope closes.
|
|
5619
|
+
*
|
|
5573
5620
|
* **Example** (Unwrapping channel effects)
|
|
5574
5621
|
*
|
|
5575
5622
|
* ```ts import.meta.vitest
|
|
@@ -5599,6 +5646,14 @@ export declare const unwrap: <OutElem, OutErr, OutDone, InElem, InErr, InDone, R
|
|
|
5599
5646
|
* Runs a channel with a scope provided for the duration of the channel
|
|
5600
5647
|
* execution, removing the channel's `Scope` requirement.
|
|
5601
5648
|
*
|
|
5649
|
+
* **Details**
|
|
5650
|
+
*
|
|
5651
|
+
* The provided scope closes when the channel ends on its own (completion,
|
|
5652
|
+
* failure, or defect), before downstream observes that end. If a downstream
|
|
5653
|
+
* operator stops pulling first, it closes no later than when the channel scope
|
|
5654
|
+
* closes. It satisfies the `Scope` service requirement only; constructors that
|
|
5655
|
+
* register finalizers in the channel scope, such as `callback`, keep using it.
|
|
5656
|
+
*
|
|
5602
5657
|
* @stability stable
|
|
5603
5658
|
* @category resource management
|
|
5604
5659
|
* @since 2.0.0
|
|
@@ -6045,6 +6100,12 @@ export declare const onError: {
|
|
|
6045
6100
|
* Returns a channel with an exit-aware finalizer that is guaranteed to run once
|
|
6046
6101
|
* the channel begins execution, whether it succeeds or fails.
|
|
6047
6102
|
*
|
|
6103
|
+
* **Details**
|
|
6104
|
+
*
|
|
6105
|
+
* The finalizer runs when the channel ends on its own (completion, failure, or
|
|
6106
|
+
* defect), before downstream observes that end. If a downstream operator stops
|
|
6107
|
+
* pulling first, it runs no later than when the channel scope closes.
|
|
6108
|
+
*
|
|
6048
6109
|
* **Example** (Running exit finalizers)
|
|
6049
6110
|
*
|
|
6050
6111
|
* ```ts import.meta.vitest
|
|
@@ -6075,6 +6136,12 @@ export declare const onExit: {
|
|
|
6075
6136
|
* Returns a channel with an exit-aware finalizer that is guaranteed to run once
|
|
6076
6137
|
* the channel begins execution, whether it succeeds or fails.
|
|
6077
6138
|
*
|
|
6139
|
+
* **Details**
|
|
6140
|
+
*
|
|
6141
|
+
* The finalizer runs when the channel ends on its own (completion, failure, or
|
|
6142
|
+
* defect), before downstream observes that end. If a downstream operator stops
|
|
6143
|
+
* pulling first, it runs no later than when the channel scope closes.
|
|
6144
|
+
*
|
|
6078
6145
|
* **Example** (Running exit finalizers)
|
|
6079
6146
|
*
|
|
6080
6147
|
* ```ts import.meta.vitest
|
|
@@ -6105,6 +6172,12 @@ export declare const onExit: {
|
|
|
6105
6172
|
* Returns a channel with an exit-aware finalizer that is guaranteed to run once
|
|
6106
6173
|
* the channel begins execution, whether it succeeds or fails.
|
|
6107
6174
|
*
|
|
6175
|
+
* **Details**
|
|
6176
|
+
*
|
|
6177
|
+
* The finalizer runs when the channel ends on its own (completion, failure, or
|
|
6178
|
+
* defect), before downstream observes that end. If a downstream operator stops
|
|
6179
|
+
* pulling first, it runs no later than when the channel scope closes.
|
|
6180
|
+
*
|
|
6108
6181
|
* **Example** (Running exit finalizers)
|
|
6109
6182
|
*
|
|
6110
6183
|
* ```ts import.meta.vitest
|
|
@@ -6277,6 +6350,12 @@ export declare const onEnd: {
|
|
|
6277
6350
|
* Returns a channel with a finalizer effect that is guaranteed to run once the
|
|
6278
6351
|
* channel begins execution, whether it succeeds or fails.
|
|
6279
6352
|
*
|
|
6353
|
+
* **Details**
|
|
6354
|
+
*
|
|
6355
|
+
* The finalizer runs when the channel ends on its own (completion, failure, or
|
|
6356
|
+
* defect), before downstream observes that end. If a downstream operator stops
|
|
6357
|
+
* pulling first, it runs no later than when the channel scope closes.
|
|
6358
|
+
*
|
|
6280
6359
|
* **Example** (Ensuring cleanup runs)
|
|
6281
6360
|
*
|
|
6282
6361
|
* ```ts import.meta.vitest
|
|
@@ -6307,6 +6386,12 @@ export declare const ensuring: {
|
|
|
6307
6386
|
* Returns a channel with a finalizer effect that is guaranteed to run once the
|
|
6308
6387
|
* channel begins execution, whether it succeeds or fails.
|
|
6309
6388
|
*
|
|
6389
|
+
* **Details**
|
|
6390
|
+
*
|
|
6391
|
+
* The finalizer runs when the channel ends on its own (completion, failure, or
|
|
6392
|
+
* defect), before downstream observes that end. If a downstream operator stops
|
|
6393
|
+
* pulling first, it runs no later than when the channel scope closes.
|
|
6394
|
+
*
|
|
6310
6395
|
* **Example** (Ensuring cleanup runs)
|
|
6311
6396
|
*
|
|
6312
6397
|
* ```ts import.meta.vitest
|
|
@@ -6337,6 +6422,12 @@ export declare const ensuring: {
|
|
|
6337
6422
|
* Returns a channel with a finalizer effect that is guaranteed to run once the
|
|
6338
6423
|
* channel begins execution, whether it succeeds or fails.
|
|
6339
6424
|
*
|
|
6425
|
+
* **Details**
|
|
6426
|
+
*
|
|
6427
|
+
* The finalizer runs when the channel ends on its own (completion, failure, or
|
|
6428
|
+
* defect), before downstream observes that end. If a downstream operator stops
|
|
6429
|
+
* pulling first, it runs no later than when the channel scope closes.
|
|
6430
|
+
*
|
|
6340
6431
|
* **Example** (Ensuring cleanup runs)
|
|
6341
6432
|
*
|
|
6342
6433
|
* ```ts import.meta.vitest
|
|
@@ -7206,7 +7297,8 @@ export declare const runFoldEffect: {
|
|
|
7206
7297
|
*
|
|
7207
7298
|
* **Details**
|
|
7208
7299
|
*
|
|
7209
|
-
* The
|
|
7300
|
+
* The channel runs in the provided `Scope`, which the pull leaves open; close
|
|
7301
|
+
* it to release any resources the channel still holds. Consume the pull only
|
|
7210
7302
|
* while that scope remains open. Pulls are serialized so only one pull is
|
|
7211
7303
|
* evaluated at a time.
|
|
7212
7304
|
*
|
|
@@ -7237,6 +7329,11 @@ export declare const toPull: <OutElem, OutErr, OutDone, Env>(self: Channel<OutEl
|
|
|
7237
7329
|
/**
|
|
7238
7330
|
* Converts a channel to a Pull within an existing scope.
|
|
7239
7331
|
*
|
|
7332
|
+
* **Details**
|
|
7333
|
+
*
|
|
7334
|
+
* The channel runs in the provided scope, which the pull leaves open; close it
|
|
7335
|
+
* to release any resources the channel still holds.
|
|
7336
|
+
*
|
|
7240
7337
|
* **Example** (Converting channels to scoped pulls)
|
|
7241
7338
|
*
|
|
7242
7339
|
* ```ts import.meta.vitest
|