effect 4.0.0-beta.43 → 4.0.0-beta.45
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.d.ts +12 -43
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +15 -42
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +21 -21
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +89 -10
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +42 -19
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +86 -46
- package/dist/Channel.js.map +1 -1
- package/dist/Clock.d.ts +2 -2
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js.map +1 -1
- package/dist/Config.d.ts +2 -2
- package/dist/ConfigProvider.d.ts +5 -5
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +5 -5
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +2 -2
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +1150 -0
- package/dist/Context.d.ts.map +1 -0
- package/dist/{ServiceMap.js → Context.js} +139 -139
- package/dist/Context.js.map +1 -0
- package/dist/DateTime.d.ts +2 -2
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +2 -2
- package/dist/DateTime.js.map +1 -1
- package/dist/Effect.d.ts +177 -177
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +81 -81
- package/dist/Effect.js.map +1 -1
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +16 -0
- package/dist/Equal.js.map +1 -1
- package/dist/ErrorReporter.d.ts +3 -3
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +1 -1
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +6 -6
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +4 -4
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Fiber.d.ts +7 -7
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +2 -2
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +4 -4
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +2 -2
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +4 -4
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +2 -2
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +4 -4
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +3 -3
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +3 -3
- package/dist/FileSystem.js.map +1 -1
- package/dist/Hash.js +1 -1
- package/dist/Hash.js.map +1 -1
- package/dist/Layer.d.ts +286 -268
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +133 -134
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +18 -18
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +18 -15
- package/dist/LayerMap.js.map +1 -1
- package/dist/Logger.d.ts +3 -3
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +6 -6
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +18 -21
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Metric.d.ts +19 -19
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +21 -21
- package/dist/Metric.js.map +1 -1
- package/dist/Path.d.ts +2 -2
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +2 -2
- package/dist/Path.js.map +1 -1
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +4 -4
- package/dist/Pool.js.map +1 -1
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +3 -3
- package/dist/PubSub.js.map +1 -1
- package/dist/Random.d.ts +2 -2
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +0 -23
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +2 -2
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +12 -12
- package/dist/RcMap.js.map +1 -1
- package/dist/Redactable.d.ts +139 -62
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +59 -55
- package/dist/Redactable.js.map +1 -1
- package/dist/References.d.ts +26 -14
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +0 -12
- package/dist/References.js.map +1 -1
- package/dist/Request.d.ts +5 -5
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +6 -7
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +0 -3
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +3 -3
- package/dist/Resource.js.map +1 -1
- package/dist/Schedule.d.ts +2 -2
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +2 -2
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +4 -4
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +7 -4
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +531 -214
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +304 -103
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +5 -15
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +49 -5
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +64 -5
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +145 -0
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +146 -0
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +2 -2
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +4 -4
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Semaphore.d.ts +1 -1
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +1 -3
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +6 -6
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +1 -1
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +2 -2
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +2 -2
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +187 -117
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +133 -57
- package/dist/Stream.js.map +1 -1
- package/dist/Terminal.d.ts +3 -3
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +2 -2
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +16 -16
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +11 -8
- package/dist/Tracer.js.map +1 -1
- package/dist/Unify.d.ts +8 -2
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js.map +1 -1
- package/dist/index.d.ts +81 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -15
- package/dist/index.js.map +1 -1
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/effect.js +74 -74
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/layer.js +3 -3
- package/dist/internal/layer.js.map +1 -1
- package/dist/internal/random.js +2 -2
- package/dist/internal/random.js.map +1 -1
- package/dist/internal/rcRef.js +9 -9
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/references.js +13 -13
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/request.js +6 -6
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/schedule.js +1 -1
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/representation.js +11 -1
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/internal/schema/schema.d.ts +10 -1
- package/dist/internal/schema/schema.d.ts.map +1 -1
- package/dist/internal/schema/schema.js +21 -1
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +3 -3
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +19 -19
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +2 -1
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +4 -4
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +3 -3
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +6 -6
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +3 -3
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +2 -2
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +2 -2
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +2 -2
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +2 -2
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +54 -54
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +15 -8
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +22 -22
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +49 -46
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +3 -3
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +5 -5
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +6 -9
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +1 -1
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +6 -7
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +2 -2
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +2 -2
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +35 -2
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +2 -2
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +2 -2
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +2 -2
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +16 -16
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +41 -13
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +3 -3
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +10 -10
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +2 -3
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +29 -8
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +8 -1
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +2 -2
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +2 -2
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +14 -14
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +11 -10
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +2 -3
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +2 -2
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +2 -2
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +8 -8
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/Param.d.ts +30 -2
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +17 -7
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Prompt.js +8 -2
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +5 -5
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +3 -3
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +94 -15
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +7 -7
- package/dist/unstable/cluster/ClusterSchema.d.ts +12 -9
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +9 -9
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +13 -14
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +8 -8
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +12 -12
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +2 -2
- package/dist/unstable/cluster/EntityProxy.js +3 -3
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +4 -4
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +2 -2
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +2 -2
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +3 -3
- package/dist/unstable/cluster/HttpRunner.js +2 -2
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +4 -4
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +2 -2
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +7 -4
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +5 -5
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +14 -14
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +8 -8
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +2 -2
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +5 -5
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +2 -2
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +2 -2
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +1 -1
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +12 -12
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +3 -3
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +3 -3
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +7 -7
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +35 -49
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +65 -67
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +2 -2
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +21 -21
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +2 -2
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +5 -5
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +2 -2
- package/dist/unstable/cluster/Snowflake.d.ts +2 -2
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +2 -2
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +15 -14
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/entityReaper.js +2 -2
- package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceMap.js +3 -3
- package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +2 -2
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +5 -5
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +0 -6
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +0 -5
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +0 -2
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +0 -2
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +26 -9
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +128 -69
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +91 -37
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +223 -149
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +11 -9
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +15 -17
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +228 -0
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -0
- package/dist/unstable/eventlog/EventLogMessage.js +214 -0
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -0
- package/dist/unstable/eventlog/EventLogRemote.d.ts +111 -193
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +167 -322
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +26 -48
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +128 -199
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +60 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +166 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +183 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +461 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -0
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +117 -0
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -0
- package/dist/unstable/eventlog/EventLogSessionAuth.js +284 -0
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -0
- package/dist/unstable/eventlog/{SqlEventLogJournal.d.ts → SqlEventJournal.d.ts} +2 -2
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -0
- package/dist/unstable/eventlog/{SqlEventLogJournal.js → SqlEventJournal.js} +20 -14
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -0
- package/dist/unstable/eventlog/{SqlEventLogServer.d.ts → SqlEventLogServerEncrypted.d.ts} +5 -5
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -0
- package/dist/unstable/eventlog/{SqlEventLogServer.js → SqlEventLogServerEncrypted.js} +65 -24
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +25 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +354 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -0
- package/dist/unstable/eventlog/index.d.ts +22 -2
- package/dist/unstable/eventlog/index.d.ts.map +1 -1
- package/dist/unstable/eventlog/index.js +22 -2
- package/dist/unstable/eventlog/index.js.map +1 -1
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.d.ts +2 -0
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.d.ts.map +1 -0
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js +89 -0
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js.map +1 -0
- package/dist/unstable/http/Etag.d.ts +2 -2
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +2 -2
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +6 -3
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +5 -5
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +5 -2
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +3 -3
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +8 -6
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +6 -6
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +2 -2
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +4 -4
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +6 -6
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +24 -24
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +2 -2
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +2 -2
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +3 -3
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +26 -14
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +2 -2
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +2 -2
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +7 -7
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +29 -29
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +2 -2
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +2 -2
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +3 -3
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +3 -3
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +4 -4
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +6 -6
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +2 -2
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +6 -6
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +6 -6
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +7 -7
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +9 -9
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +8 -8
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +0 -3
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +20 -20
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +7 -7
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +4 -4
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +8 -8
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +4 -4
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +6 -6
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +5 -5
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +9 -6
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +6 -6
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +15 -15
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +23 -23
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +5 -5
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +1 -1
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +2 -2
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +2 -2
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +3 -3
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +4 -33
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +23 -2
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +144 -2
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +1 -2
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +10 -11
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +4 -4
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +3 -3
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +4 -4
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +3 -3
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +6 -6
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +3 -3
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +3 -3
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +2 -2
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +45 -2
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +2 -2
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +36 -36
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +9 -9
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +4 -5
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +4 -4
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +2 -2
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +3 -3
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +4 -5
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +5 -5
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +2 -2
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +6 -6
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +35 -14
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +30 -4
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +21 -21
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +73 -40
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +2 -2
- package/dist/unstable/rpc/RpcGroup.d.ts +8 -8
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js +20 -20
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +8 -8
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +5 -5
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +3 -3
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +3 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +2 -2
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +2 -2
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +2 -2
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +21 -20
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +2 -2
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js +4 -4
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts +6 -3
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +46 -5
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +2 -2
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +2 -4
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +1 -12
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +10 -10
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +9 -9
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +5 -2
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +2 -2
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +5 -5
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +7 -7
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +2 -2
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js +5 -2
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +12 -12
- package/dist/unstable/sql/SqlModel.d.ts +8 -9
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js +9 -35
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +11 -11
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +2 -2
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +2 -2
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +3 -3
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +7 -7
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +3 -3
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +6 -3
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +5 -5
- package/dist/unstable/workers/WorkerRunner.d.ts +2 -2
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +5 -2
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +7 -7
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +7 -7
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +0 -3
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +3 -3
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +7 -7
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +9 -9
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +18 -18
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +3 -3
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +5 -5
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +4 -4
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/package.json +1 -1
- package/src/Cache.ts +18 -46
- package/src/Cause.ts +21 -21
- package/src/Channel.ts +120 -79
- package/src/Clock.ts +2 -2
- package/src/Config.ts +2 -2
- package/src/ConfigProvider.ts +5 -5
- package/src/Console.ts +2 -2
- package/src/{ServiceMap.ts → Context.ts} +337 -340
- package/src/DateTime.ts +2 -2
- package/src/Effect.ts +182 -184
- package/src/Equal.ts +17 -0
- package/src/ErrorReporter.ts +3 -3
- package/src/ExecutionPlan.ts +8 -9
- package/src/Fiber.ts +7 -7
- package/src/FiberHandle.ts +5 -5
- package/src/FiberMap.ts +5 -5
- package/src/FiberSet.ts +5 -5
- package/src/FileSystem.ts +3 -3
- package/src/Hash.ts +2 -2
- package/src/Layer.ts +333 -307
- package/src/LayerMap.ts +27 -26
- package/src/Logger.ts +3 -3
- package/src/ManagedRuntime.ts +32 -32
- package/src/Metric.ts +58 -58
- package/src/Path.ts +2 -2
- package/src/Pool.ts +5 -5
- package/src/PubSub.ts +3 -3
- package/src/Random.ts +2 -2
- package/src/RcMap.ts +14 -14
- package/src/Redactable.ts +146 -72
- package/src/References.ts +14 -14
- package/src/Request.ts +5 -5
- package/src/RequestResolver.ts +6 -7
- package/src/Resource.ts +4 -4
- package/src/Schedule.ts +2 -2
- package/src/Scheduler.ts +4 -4
- package/src/Schema.ts +837 -397
- package/src/SchemaAST.ts +5 -14
- package/src/SchemaGetter.ts +69 -11
- package/src/SchemaTransformation.ts +166 -0
- package/src/Scope.ts +2 -2
- package/src/ScopedCache.ts +5 -5
- package/src/Semaphore.ts +2 -4
- package/src/Sink.ts +9 -9
- package/src/Stdio.ts +2 -2
- package/src/Stream.ts +234 -158
- package/src/Terminal.ts +3 -3
- package/src/Tracer.ts +17 -17
- package/src/Unify.ts +26 -2
- package/src/index.ts +82 -16
- package/src/internal/core.ts +7 -7
- package/src/internal/effect.ts +106 -106
- package/src/internal/layer.ts +7 -7
- package/src/internal/random.ts +2 -2
- package/src/internal/rcRef.ts +10 -10
- package/src/internal/references.ts +13 -13
- package/src/internal/request.ts +8 -8
- package/src/internal/schedule.ts +3 -1
- package/src/internal/schema/representation.ts +8 -1
- package/src/internal/schema/schema.ts +24 -1
- package/src/testing/TestSchema.ts +3 -3
- package/src/unstable/ai/AiError.ts +3 -2
- package/src/unstable/ai/Chat.ts +3 -3
- package/src/unstable/ai/EmbeddingModel.ts +3 -3
- package/src/unstable/ai/IdGenerator.ts +2 -2
- package/src/unstable/ai/LanguageModel.ts +2 -2
- package/src/unstable/ai/McpSchema.ts +11 -9
- package/src/unstable/ai/McpServer.ts +68 -66
- package/src/unstable/ai/Model.ts +8 -8
- package/src/unstable/ai/Prompt.ts +6 -12
- package/src/unstable/ai/Response.ts +6 -8
- package/src/unstable/ai/ResponseIdTracker.ts +2 -4
- package/src/unstable/ai/Telemetry.ts +2 -2
- package/src/unstable/ai/Tokenizer.ts +2 -2
- package/src/unstable/ai/Tool.ts +25 -25
- package/src/unstable/ai/Toolkit.ts +12 -12
- package/src/unstable/cli/Argument.ts +3 -4
- package/src/unstable/cli/CliError.ts +22 -9
- package/src/unstable/cli/CliOutput.ts +2 -2
- package/src/unstable/cli/Command.ts +36 -30
- package/src/unstable/cli/Flag.ts +3 -4
- package/src/unstable/cli/GlobalFlag.ts +3 -3
- package/src/unstable/cli/HelpDoc.ts +8 -8
- package/src/unstable/cli/Param.ts +39 -16
- package/src/unstable/cli/Prompt.ts +13 -6
- package/src/unstable/cli/internal/command.ts +7 -7
- package/src/unstable/cli/internal/parser.ts +130 -21
- package/src/unstable/cluster/ClusterSchema.ts +12 -12
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +14 -15
- package/src/unstable/cluster/Entity.ts +25 -25
- package/src/unstable/cluster/EntityProxy.ts +3 -3
- package/src/unstable/cluster/EntityProxyServer.ts +4 -4
- package/src/unstable/cluster/EntityResource.ts +2 -2
- package/src/unstable/cluster/HttpRunner.ts +2 -2
- package/src/unstable/cluster/K8sHttpClient.ts +2 -2
- package/src/unstable/cluster/Message.ts +8 -8
- package/src/unstable/cluster/MessageStorage.ts +11 -11
- package/src/unstable/cluster/Reply.ts +7 -7
- package/src/unstable/cluster/RunnerHealth.ts +2 -2
- package/src/unstable/cluster/RunnerServer.ts +1 -1
- package/src/unstable/cluster/RunnerStorage.ts +9 -9
- package/src/unstable/cluster/Runners.ts +7 -7
- package/src/unstable/cluster/ShardId.ts +84 -74
- package/src/unstable/cluster/Sharding.ts +26 -26
- package/src/unstable/cluster/ShardingConfig.ts +5 -5
- package/src/unstable/cluster/Snowflake.ts +2 -2
- package/src/unstable/cluster/SqlMessageStorage.ts +1 -1
- package/src/unstable/cluster/internal/entityManager.ts +27 -23
- package/src/unstable/cluster/internal/entityReaper.ts +2 -2
- package/src/unstable/cluster/internal/resourceMap.ts +3 -3
- package/src/unstable/devtools/DevToolsClient.ts +5 -5
- package/src/unstable/eventlog/Event.ts +0 -8
- package/src/unstable/eventlog/EventGroup.ts +0 -4
- package/src/unstable/eventlog/EventJournal.ts +146 -78
- package/src/unstable/eventlog/EventLog.ts +353 -232
- package/src/unstable/eventlog/EventLogEncryption.ts +18 -32
- package/src/unstable/eventlog/EventLogMessage.ts +277 -0
- package/src/unstable/eventlog/EventLogRemote.ts +263 -410
- package/src/unstable/eventlog/EventLogServer.ts +183 -275
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +206 -0
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +749 -0
- package/src/unstable/eventlog/EventLogSessionAuth.ts +437 -0
- package/src/unstable/eventlog/{SqlEventLogJournal.ts → SqlEventJournal.ts} +26 -18
- package/src/unstable/eventlog/{SqlEventLogServer.ts → SqlEventLogServerEncrypted.ts} +102 -40
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +500 -0
- package/src/unstable/eventlog/index.ts +27 -2
- package/src/unstable/eventlog/internal/identityRootSecretDerivation.ts +153 -0
- package/src/unstable/http/Etag.ts +2 -2
- package/src/unstable/http/FetchHttpClient.ts +5 -5
- package/src/unstable/http/Headers.ts +4 -4
- package/src/unstable/http/HttpClient.ts +9 -8
- package/src/unstable/http/HttpClientRequest.ts +5 -5
- package/src/unstable/http/HttpEffect.ts +35 -35
- package/src/unstable/http/HttpIncomingMessage.ts +2 -2
- package/src/unstable/http/HttpMiddleware.ts +28 -14
- package/src/unstable/http/HttpPlatform.ts +2 -2
- package/src/unstable/http/HttpRouter.ts +37 -37
- package/src/unstable/http/HttpServer.ts +2 -2
- package/src/unstable/http/HttpServerError.ts +4 -4
- package/src/unstable/http/HttpServerRequest.ts +7 -7
- package/src/unstable/http/HttpServerResponse.ts +8 -8
- package/src/unstable/http/Multipart.ts +8 -8
- package/src/unstable/httpapi/HttpApi.ts +18 -18
- package/src/unstable/httpapi/HttpApiBuilder.ts +20 -20
- package/src/unstable/httpapi/HttpApiClient.ts +4 -4
- package/src/unstable/httpapi/HttpApiEndpoint.ts +14 -14
- package/src/unstable/httpapi/HttpApiGroup.ts +16 -16
- package/src/unstable/httpapi/HttpApiMiddleware.ts +14 -14
- package/src/unstable/httpapi/HttpApiSecurity.ts +13 -13
- package/src/unstable/httpapi/OpenApi.ts +29 -31
- package/src/unstable/observability/OtlpExporter.ts +5 -5
- package/src/unstable/observability/OtlpMetrics.ts +1 -1
- package/src/unstable/observability/OtlpSerialization.ts +2 -2
- package/src/unstable/observability/OtlpTracer.ts +2 -2
- package/src/unstable/observability/PrometheusMetrics.ts +5 -5
- package/src/unstable/persistence/KeyValueStore.ts +226 -3
- package/src/unstable/persistence/PersistedCache.ts +20 -17
- package/src/unstable/persistence/PersistedQueue.ts +3 -3
- package/src/unstable/persistence/Persistence.ts +4 -4
- package/src/unstable/persistence/RateLimiter.ts +3 -3
- package/src/unstable/persistence/Redis.ts +2 -2
- package/src/unstable/process/ChildProcessSpawner.ts +46 -2
- package/src/unstable/reactivity/Atom.ts +79 -79
- package/src/unstable/reactivity/AtomHttpApi.ts +27 -12
- package/src/unstable/reactivity/AtomRegistry.ts +4 -4
- package/src/unstable/reactivity/AtomRpc.ts +20 -9
- package/src/unstable/reactivity/Reactivity.ts +6 -6
- package/src/unstable/rpc/Rpc.ts +59 -21
- package/src/unstable/rpc/RpcClient.ts +103 -54
- package/src/unstable/rpc/RpcGroup.ts +31 -31
- package/src/unstable/rpc/RpcMiddleware.ts +16 -16
- package/src/unstable/rpc/RpcSchema.ts +4 -4
- package/src/unstable/rpc/RpcSerialization.ts +2 -2
- package/src/unstable/rpc/RpcServer.ts +24 -22
- package/src/unstable/rpc/RpcWorker.ts +5 -5
- package/src/unstable/rpc/Utils.ts +63 -4
- package/src/unstable/schema/Model.ts +4 -6
- package/src/unstable/schema/VariantSchema.ts +4 -17
- package/src/unstable/socket/Socket.ts +9 -9
- package/src/unstable/socket/SocketServer.ts +2 -2
- package/src/unstable/sql/SqlClient.ts +11 -11
- package/src/unstable/sql/SqlConnection.ts +2 -2
- package/src/unstable/sql/SqlModel.ts +54 -82
- package/src/unstable/sql/SqlResolver.ts +11 -11
- package/src/unstable/sql/Statement.ts +2 -2
- package/src/unstable/workers/Transferable.ts +15 -17
- package/src/unstable/workers/Worker.ts +4 -4
- package/src/unstable/workers/WorkerRunner.ts +2 -2
- package/src/unstable/workflow/Activity.ts +14 -14
- package/src/unstable/workflow/DurableClock.ts +3 -3
- package/src/unstable/workflow/DurableDeferred.ts +8 -8
- package/src/unstable/workflow/Workflow.ts +23 -23
- package/src/unstable/workflow/WorkflowEngine.ts +6 -6
- package/src/unstable/workflow/WorkflowProxyServer.ts +4 -4
- package/dist/ServiceMap.d.ts +0 -1150
- package/dist/ServiceMap.d.ts.map +0 -1
- package/dist/ServiceMap.js.map +0 -1
- package/dist/unstable/eventlog/SqlEventLogJournal.d.ts.map +0 -1
- package/dist/unstable/eventlog/SqlEventLogJournal.js.map +0 -1
- package/dist/unstable/eventlog/SqlEventLogServer.d.ts.map +0 -1
- package/dist/unstable/eventlog/SqlEventLogServer.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
|
+
import * as Context from "../../Context.ts"
|
|
4
5
|
import * as Effect from "../../Effect.ts"
|
|
5
6
|
import { dual } from "../../Function.ts"
|
|
6
7
|
import * as Schema from "../../Schema.ts"
|
|
7
8
|
import * as Getter from "../../SchemaGetter.ts"
|
|
8
|
-
import * as ServiceMap from "../../ServiceMap.ts"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @since 1.0.0
|
|
12
12
|
* @category models
|
|
13
13
|
*/
|
|
14
|
-
export class Collector extends
|
|
14
|
+
export class Collector extends Context.Service<Collector, {
|
|
15
15
|
readonly addAll: (
|
|
16
16
|
_: Iterable<globalThis.Transferable>
|
|
17
17
|
) => Effect.Effect<void>
|
|
@@ -60,8 +60,8 @@ export const makeCollector: Effect.Effect<Collector["Service"]> = Effect.sync(ma
|
|
|
60
60
|
export const addAll = (
|
|
61
61
|
tranferables: Iterable<globalThis.Transferable>
|
|
62
62
|
): Effect.Effect<void> =>
|
|
63
|
-
Effect.
|
|
64
|
-
const collector =
|
|
63
|
+
Effect.contextWith((services) => {
|
|
64
|
+
const collector = Context.getOrUndefined(services, Collector)
|
|
65
65
|
if (!collector) return Effect.void
|
|
66
66
|
collector.addAllUnsafe(tranferables)
|
|
67
67
|
return Effect.void
|
|
@@ -75,8 +75,8 @@ export const getterAddAll = <A>(
|
|
|
75
75
|
f: (_: A) => Iterable<globalThis.Transferable>
|
|
76
76
|
): Getter.Getter<A, A> =>
|
|
77
77
|
Getter.transformOrFail((e: A) =>
|
|
78
|
-
Effect.
|
|
79
|
-
const collector =
|
|
78
|
+
Effect.contextWith((services) => {
|
|
79
|
+
const collector = Context.getOrUndefined(services, Collector)
|
|
80
80
|
if (!collector) return Effect.succeed(e)
|
|
81
81
|
collector.addAllUnsafe(f(e))
|
|
82
82
|
return Effect.succeed(e)
|
|
@@ -115,16 +115,14 @@ export const schema: {
|
|
|
115
115
|
self: S,
|
|
116
116
|
f: (_: S["Encoded"]) => Iterable<globalThis.Transferable>
|
|
117
117
|
): Transferable<S> =>
|
|
118
|
-
self
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
self.annotate({
|
|
119
|
+
toCodecJson: () => passthroughLink
|
|
120
|
+
}).pipe(
|
|
121
|
+
Schema.decode({
|
|
122
|
+
decode: Getter.passthrough(),
|
|
123
|
+
encode: getterAddAll(f)
|
|
121
124
|
})
|
|
122
|
-
|
|
123
|
-
Schema.decode({
|
|
124
|
-
decode: Getter.passthrough(),
|
|
125
|
-
encode: getterAddAll(f)
|
|
126
|
-
})
|
|
127
|
-
)
|
|
125
|
+
)
|
|
128
126
|
)
|
|
129
127
|
|
|
130
128
|
const passthroughLink = Schema.link()(Schema.Any, {
|
|
@@ -154,7 +152,7 @@ export const MessagePort: Transferable<Schema.declare<MessagePort>> = schema(
|
|
|
154
152
|
* @since 1.0.0
|
|
155
153
|
* @category schema
|
|
156
154
|
*/
|
|
157
|
-
export const Uint8Array: Transferable<Schema.Uint8Array
|
|
158
|
-
Schema.Uint8Array,
|
|
155
|
+
export const Uint8Array: Transferable<Schema.instanceOf<globalThis.Uint8Array<ArrayBuffer>>> = schema(
|
|
156
|
+
Schema.Uint8Array as any,
|
|
159
157
|
(_) => [_.buffer]
|
|
160
158
|
)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
|
+
import * as Context from "../../Context.ts"
|
|
4
5
|
import type * as Deferred from "../../Deferred.ts"
|
|
5
6
|
import * as Effect from "../../Effect.ts"
|
|
6
7
|
import * as FiberSet from "../../FiberSet.ts"
|
|
7
8
|
import * as Latch from "../../Latch.ts"
|
|
8
9
|
import * as Layer from "../../Layer.ts"
|
|
9
10
|
import * as Scope from "../../Scope.ts"
|
|
10
|
-
import * as ServiceMap from "../../ServiceMap.ts"
|
|
11
11
|
import { WorkerError, WorkerSendError } from "./WorkerError.ts"
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @since 4.0.0
|
|
15
15
|
* @category models
|
|
16
16
|
*/
|
|
17
|
-
export class WorkerPlatform extends
|
|
17
|
+
export class WorkerPlatform extends Context.Service<WorkerPlatform, {
|
|
18
18
|
readonly spawn: <O = unknown, I = unknown>(
|
|
19
19
|
id: number
|
|
20
20
|
) => Effect.Effect<Worker<O, I>, WorkerError, Spawner>
|
|
@@ -80,10 +80,10 @@ export interface Spawner {
|
|
|
80
80
|
* @since 4.0.0
|
|
81
81
|
* @category tags
|
|
82
82
|
*/
|
|
83
|
-
export const Spawner:
|
|
83
|
+
export const Spawner: Context.Service<
|
|
84
84
|
Spawner,
|
|
85
85
|
SpawnerFn<unknown>
|
|
86
|
-
> =
|
|
86
|
+
> = Context.Service("effect/workers/Worker/Spawner")
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* @since 4.0.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
|
+
import * as Context from "../../Context.ts"
|
|
4
5
|
import type * as Effect from "../../Effect.ts"
|
|
5
6
|
import type * as Queue from "../../Queue.ts"
|
|
6
|
-
import * as ServiceMap from "../../ServiceMap.ts"
|
|
7
7
|
import type { WorkerError } from "./WorkerError.ts"
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -37,6 +37,6 @@ export type PlatformMessage<I> = readonly [request: 0, I] | readonly [close: 1]
|
|
|
37
37
|
* @since 4.0.0
|
|
38
38
|
* @category models
|
|
39
39
|
*/
|
|
40
|
-
export class WorkerRunnerPlatform extends
|
|
40
|
+
export class WorkerRunnerPlatform extends Context.Service<WorkerRunnerPlatform, {
|
|
41
41
|
readonly start: <O = unknown, I = unknown>() => Effect.Effect<WorkerRunner<O, I>, WorkerError>
|
|
42
42
|
}>()("effect/workers/WorkerRunner/WorkerRunnerPlatform") {}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { NonEmptyReadonlyArray } from "../../Array.ts"
|
|
5
5
|
import * as Cause from "../../Cause.ts"
|
|
6
|
+
import * as Context from "../../Context.ts"
|
|
6
7
|
import * as Effect from "../../Effect.ts"
|
|
7
8
|
import { dual } from "../../Function.ts"
|
|
8
9
|
import { PipeInspectableProto, YieldableProto } from "../../internal/core.ts"
|
|
9
10
|
import * as Schedule from "../../Schedule.ts"
|
|
10
11
|
import * as Schema from "../../Schema.ts"
|
|
11
12
|
import type { Scope } from "../../Scope.ts"
|
|
12
|
-
import * as ServiceMap from "../../ServiceMap.ts"
|
|
13
13
|
import type * as Types from "../../Types.ts"
|
|
14
14
|
import * as DurableDeferred from "./DurableDeferred.ts"
|
|
15
15
|
import { makeHashDigest } from "./internal/crypto.ts"
|
|
@@ -39,13 +39,13 @@ export interface Activity<
|
|
|
39
39
|
readonly successSchema: Success
|
|
40
40
|
readonly errorSchema: Error
|
|
41
41
|
readonly exitSchema: Schema.Exit<Success, Error, Schema.Defect>
|
|
42
|
-
readonly annotations:
|
|
42
|
+
readonly annotations: Context.Context<never>
|
|
43
43
|
annotate<I, S>(
|
|
44
|
-
key:
|
|
44
|
+
key: Context.Key<I, S>,
|
|
45
45
|
value: S
|
|
46
46
|
): Activity<Success, Error, R>
|
|
47
47
|
annotateMerge<I>(
|
|
48
|
-
annotations:
|
|
48
|
+
annotations: Context.Context<I>
|
|
49
49
|
): Activity<Success, Error, R>
|
|
50
50
|
readonly execute: Effect.Effect<
|
|
51
51
|
Success["Type"],
|
|
@@ -81,7 +81,7 @@ export interface Any {
|
|
|
81
81
|
readonly [TypeId]: typeof TypeId
|
|
82
82
|
readonly name: string
|
|
83
83
|
readonly executeEncoded: Effect.Effect<any, any, any>
|
|
84
|
-
readonly annotations:
|
|
84
|
+
readonly annotations: Context.Context<never>
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/**
|
|
@@ -110,7 +110,7 @@ export const make = <
|
|
|
110
110
|
readonly error?: Error | undefined
|
|
111
111
|
readonly execute: Effect.Effect<Success["Type"], Error["Type"], R>
|
|
112
112
|
readonly interruptRetryPolicy?: Schedule.Schedule<any, Cause.Cause<unknown>> | undefined
|
|
113
|
-
readonly annotations?:
|
|
113
|
+
readonly annotations?: Context.Context<never> | undefined
|
|
114
114
|
}): Activity<Success, Error, Exclude<R, WorkflowInstance | WorkflowEngine | Scope>> => {
|
|
115
115
|
const successSchema = options.success ?? (Schema.Void as any as Success)
|
|
116
116
|
const errorSchema = options.error ?? (Schema.Never as any as Error)
|
|
@@ -130,17 +130,17 @@ export const make = <
|
|
|
130
130
|
successSchema,
|
|
131
131
|
errorSchema,
|
|
132
132
|
exitSchema: Schema.Exit(successSchemaJson, errorSchemaJson, Schema.Defect),
|
|
133
|
-
annotations: options.annotations ??
|
|
134
|
-
annotate(tag:
|
|
133
|
+
annotations: options.annotations ?? Context.empty(),
|
|
134
|
+
annotate(tag: Context.Key<any, any>, value: any) {
|
|
135
135
|
return make({
|
|
136
136
|
...options,
|
|
137
|
-
annotations:
|
|
137
|
+
annotations: Context.add(self.annotations, tag, value)
|
|
138
138
|
})
|
|
139
139
|
},
|
|
140
|
-
annotateMerge(context:
|
|
140
|
+
annotateMerge(context: Context.Context<any>) {
|
|
141
141
|
return make({
|
|
142
142
|
...options,
|
|
143
|
-
annotations:
|
|
143
|
+
annotations: Context.merge(self.annotations, context)
|
|
144
144
|
})
|
|
145
145
|
},
|
|
146
146
|
execute: executeWithoutInterrupt,
|
|
@@ -205,7 +205,7 @@ export const retry: {
|
|
|
205
205
|
* @since 4.0.0
|
|
206
206
|
* @category Attempts
|
|
207
207
|
*/
|
|
208
|
-
export const CurrentAttempt =
|
|
208
|
+
export const CurrentAttempt = Context.Reference<number>(
|
|
209
209
|
"effect/workflow/Activity/CurrentAttempt",
|
|
210
210
|
{ defaultValue: () => 1 }
|
|
211
211
|
)
|
|
@@ -263,10 +263,10 @@ export const raceAll = <const Activities extends NonEmptyReadonlyArray<Any>>(
|
|
|
263
263
|
// internal
|
|
264
264
|
// -----------------------------------------------------------------------------
|
|
265
265
|
|
|
266
|
-
const EngineTag =
|
|
266
|
+
const EngineTag = Context.Service<WorkflowEngine, WorkflowEngine["Service"]>(
|
|
267
267
|
"effect/workflow/WorkflowEngine" satisfies typeof WorkflowEngine.key
|
|
268
268
|
)
|
|
269
|
-
const InstanceTag =
|
|
269
|
+
const InstanceTag = Context.Service<WorkflowInstance, WorkflowInstance["Service"]>(
|
|
270
270
|
"effect/workflow/WorkflowEngine/WorkflowInstance" satisfies typeof WorkflowInstance.key
|
|
271
271
|
)
|
|
272
272
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
|
+
import * as Context from "../../Context.ts"
|
|
4
5
|
import * as Duration from "../../Duration.ts"
|
|
5
6
|
import * as Effect from "../../Effect.ts"
|
|
6
7
|
import type * as Schema from "../../Schema.ts"
|
|
7
|
-
import * as ServiceMap from "../../ServiceMap.ts"
|
|
8
8
|
import * as Activity from "./Activity.ts"
|
|
9
9
|
import * as DurableDeferred from "./DurableDeferred.ts"
|
|
10
10
|
import type { WorkflowEngine, WorkflowInstance } from "./WorkflowEngine.ts"
|
|
@@ -36,11 +36,11 @@ export const make = (options: {
|
|
|
36
36
|
deferred: DurableDeferred.make(`DurableClock/${options.name}`)
|
|
37
37
|
})
|
|
38
38
|
|
|
39
|
-
const EngineTag =
|
|
39
|
+
const EngineTag = Context.Service<WorkflowEngine, WorkflowEngine["Service"]>(
|
|
40
40
|
"effect/workflow/WorkflowEngine" satisfies typeof WorkflowEngine.key
|
|
41
41
|
)
|
|
42
42
|
|
|
43
|
-
const InstanceTag =
|
|
43
|
+
const InstanceTag = Context.Service<
|
|
44
44
|
WorkflowInstance,
|
|
45
45
|
WorkflowInstance["Service"]
|
|
46
46
|
>(
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import type { NonEmptyReadonlyArray } from "../../Array.ts"
|
|
5
5
|
import type * as Brand from "../../Brand.ts"
|
|
6
6
|
import type * as Cause from "../../Cause.ts"
|
|
7
|
+
import * as Context from "../../Context.ts"
|
|
7
8
|
import * as Effect from "../../Effect.ts"
|
|
8
9
|
import * as Encoding from "../../Encoding.ts"
|
|
9
10
|
import * as Exit from "../../Exit.ts"
|
|
@@ -11,7 +12,6 @@ import { dual } from "../../Function.ts"
|
|
|
11
12
|
import * as Option from "../../Option.ts"
|
|
12
13
|
import * as Schema from "../../Schema.ts"
|
|
13
14
|
import * as Getter from "../../SchemaGetter.ts"
|
|
14
|
-
import * as ServiceMap from "../../ServiceMap.ts"
|
|
15
15
|
import type * as Activity from "./Activity.ts"
|
|
16
16
|
import * as Workflow from "./Workflow.ts"
|
|
17
17
|
import type { WorkflowEngine, WorkflowInstance } from "./WorkflowEngine.ts"
|
|
@@ -91,18 +91,18 @@ export const make = <
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
const EngineTag =
|
|
94
|
+
const EngineTag = Context.Service<WorkflowEngine, WorkflowEngine["Service"]>(
|
|
95
95
|
"effect/workflow/WorkflowEngine" satisfies typeof WorkflowEngine.key
|
|
96
96
|
)
|
|
97
97
|
|
|
98
|
-
const InstanceTag =
|
|
98
|
+
const InstanceTag = Context.Service<
|
|
99
99
|
WorkflowInstance,
|
|
100
100
|
WorkflowInstance["Service"]
|
|
101
101
|
>(
|
|
102
102
|
"effect/workflow/WorkflowEngine/WorkflowInstance" satisfies typeof WorkflowInstance.key
|
|
103
103
|
)
|
|
104
104
|
|
|
105
|
-
const CurrentAttempt =
|
|
105
|
+
const CurrentAttempt = Context.Reference<number>(
|
|
106
106
|
"effect/workflow/Activity/CurrentAttempt" satisfies typeof Activity.CurrentAttempt.key,
|
|
107
107
|
{ defaultValue: () => 1 }
|
|
108
108
|
)
|
|
@@ -190,10 +190,10 @@ export const into: {
|
|
|
190
190
|
| Success["DecodingServices"]
|
|
191
191
|
| Error["DecodingServices"]
|
|
192
192
|
> =>
|
|
193
|
-
Effect.
|
|
194
|
-
(
|
|
195
|
-
const engine =
|
|
196
|
-
const instance =
|
|
193
|
+
Effect.contextWith(
|
|
194
|
+
(context: Context.Context<WorkflowEngine | WorkflowInstance>) => {
|
|
195
|
+
const engine = Context.get(context, EngineTag)
|
|
196
|
+
const instance = Context.get(context, InstanceTag)
|
|
197
197
|
return Effect.onExit(
|
|
198
198
|
effect,
|
|
199
199
|
Effect.fnUntraced(function*(exit) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
4
|
import * as Cause from "../../Cause.ts"
|
|
5
|
+
import * as Context from "../../Context.ts"
|
|
5
6
|
import * as Data from "../../Data.ts"
|
|
6
7
|
import * as Effect from "../../Effect.ts"
|
|
7
8
|
import * as Exit from "../../Exit.ts"
|
|
@@ -16,7 +17,6 @@ import * as Issue from "../../SchemaIssue.ts"
|
|
|
16
17
|
import * as Parser from "../../SchemaParser.ts"
|
|
17
18
|
import * as Tranformation from "../../SchemaTransformation.ts"
|
|
18
19
|
import * as Scope from "../../Scope.ts"
|
|
19
|
-
import * as ServiceMap from "../../ServiceMap.ts"
|
|
20
20
|
import type { ExitEncoded } from "../rpc/RpcMessage.ts"
|
|
21
21
|
import { makeHashDigest } from "./internal/crypto.ts"
|
|
22
22
|
import type { WorkflowEngine, WorkflowInstance } from "./WorkflowEngine.ts"
|
|
@@ -38,13 +38,13 @@ export interface Workflow<
|
|
|
38
38
|
readonly payloadSchema: Payload
|
|
39
39
|
readonly successSchema: Success
|
|
40
40
|
readonly errorSchema: Error
|
|
41
|
-
readonly annotations:
|
|
41
|
+
readonly annotations: Context.Context<never>
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Add an annotation to the workflow.
|
|
45
45
|
*/
|
|
46
46
|
annotate<I, S>(
|
|
47
|
-
key:
|
|
47
|
+
key: Context.Key<I, S>,
|
|
48
48
|
value: S
|
|
49
49
|
): Workflow<Name, Payload, Success, Error>
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ export interface Workflow<
|
|
|
52
52
|
* Merge multiple annotations into the workflow.
|
|
53
53
|
*/
|
|
54
54
|
annotateMerge<I>(
|
|
55
|
-
annotations:
|
|
55
|
+
annotations: Context.Context<I>
|
|
56
56
|
): Workflow<Name, Payload, Success, Error>
|
|
57
57
|
|
|
58
58
|
/**
|
|
@@ -191,7 +191,7 @@ export interface Any {
|
|
|
191
191
|
readonly payloadSchema: AnyStructSchema
|
|
192
192
|
readonly successSchema: Schema.Top
|
|
193
193
|
readonly errorSchema: Schema.Top
|
|
194
|
-
readonly annotations:
|
|
194
|
+
readonly annotations: Context.Context<never>
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/**
|
|
@@ -256,11 +256,11 @@ export type RequirementsHandler<Workflows extends Any> = Workflows extends Workf
|
|
|
256
256
|
| _Error["EncodingServices"]
|
|
257
257
|
: never
|
|
258
258
|
|
|
259
|
-
const EngineTag =
|
|
259
|
+
const EngineTag = Context.Service<WorkflowEngine, WorkflowEngine["Service"]>(
|
|
260
260
|
"effect/workflow/WorkflowEngine" satisfies typeof WorkflowEngine.key
|
|
261
261
|
)
|
|
262
262
|
|
|
263
|
-
const InstanceTag =
|
|
263
|
+
const InstanceTag = Context.Service<
|
|
264
264
|
WorkflowInstance,
|
|
265
265
|
WorkflowInstance["Service"]
|
|
266
266
|
>(
|
|
@@ -286,7 +286,7 @@ export const make = <
|
|
|
286
286
|
readonly success?: Success
|
|
287
287
|
readonly error?: Error
|
|
288
288
|
readonly suspendedRetrySchedule?: Schedule.Schedule<any, unknown> | undefined
|
|
289
|
-
readonly annotations?:
|
|
289
|
+
readonly annotations?: Context.Context<never>
|
|
290
290
|
}): Workflow<
|
|
291
291
|
Name,
|
|
292
292
|
Payload extends Schema.Struct.Fields ? Schema.Struct<Payload> : Payload,
|
|
@@ -302,22 +302,22 @@ export const make = <
|
|
|
302
302
|
: Schema.Struct(options.payload as any),
|
|
303
303
|
successSchema: options.success ?? (Schema.Void as any),
|
|
304
304
|
errorSchema: options.error ?? (Schema.Never as any),
|
|
305
|
-
annotations: options.annotations ??
|
|
305
|
+
annotations: options.annotations ?? Context.empty(),
|
|
306
306
|
annotate(tag, value) {
|
|
307
307
|
return make({
|
|
308
308
|
...options,
|
|
309
|
-
annotations:
|
|
309
|
+
annotations: Context.add(self.annotations, tag, value)
|
|
310
310
|
})
|
|
311
311
|
},
|
|
312
312
|
annotateMerge(context) {
|
|
313
313
|
return make({
|
|
314
314
|
...options,
|
|
315
|
-
annotations:
|
|
315
|
+
annotations: Context.merge(self.annotations, context)
|
|
316
316
|
})
|
|
317
317
|
},
|
|
318
318
|
execute: Effect.fnUntraced(
|
|
319
319
|
function*(fields: any, opts) {
|
|
320
|
-
const payload = self.payloadSchema.
|
|
320
|
+
const payload = self.payloadSchema.make(fields)
|
|
321
321
|
const engine = yield* EngineTag
|
|
322
322
|
const executionId = yield* makeExecutionId(payload)
|
|
323
323
|
yield* Effect.annotateCurrentSpan({ executionId })
|
|
@@ -376,7 +376,7 @@ export const make = <
|
|
|
376
376
|
),
|
|
377
377
|
executionId: (payload) =>
|
|
378
378
|
Effect.flatMap(
|
|
379
|
-
Effect.sync(() => self.payloadSchema.
|
|
379
|
+
Effect.sync(() => self.payloadSchema.make(payload)),
|
|
380
380
|
makeExecutionId
|
|
381
381
|
),
|
|
382
382
|
withCompensation
|
|
@@ -554,10 +554,10 @@ export const intoResult = <A, E, R>(
|
|
|
554
554
|
never,
|
|
555
555
|
Exclude<R, Scope.Scope> | WorkflowInstance
|
|
556
556
|
> =>
|
|
557
|
-
Effect.
|
|
558
|
-
const instance =
|
|
559
|
-
const captureDefects =
|
|
560
|
-
const suspendOnFailure =
|
|
557
|
+
Effect.contextWith((context: Context.Context<WorkflowInstance>) => {
|
|
558
|
+
const instance = Context.get(context, InstanceTag)
|
|
559
|
+
const captureDefects = Context.get(instance.workflow.annotations, CaptureDefects)
|
|
560
|
+
const suspendOnFailure = Context.get(instance.workflow.annotations, SuspendOnFailure)
|
|
561
561
|
return effect.pipe(
|
|
562
562
|
// so we can use external interruption to suspend the workflow
|
|
563
563
|
Effect.forkChild({ startImmediately: true }),
|
|
@@ -604,8 +604,8 @@ export const wrapActivityResult = <A, E, R>(
|
|
|
604
604
|
effect: Effect.Effect<A, E, R>,
|
|
605
605
|
isSuspend: (value: A) => boolean
|
|
606
606
|
): Effect.Effect<A, E, R | WorkflowInstance> =>
|
|
607
|
-
Effect.
|
|
608
|
-
const instance =
|
|
607
|
+
Effect.contextWith((context: Context.Context<WorkflowInstance>) => {
|
|
608
|
+
const instance = Context.get(context, InstanceTag)
|
|
609
609
|
const state = instance.activityState
|
|
610
610
|
if (instance.suspended) {
|
|
611
611
|
return waitForZero(instance).pipe(
|
|
@@ -694,8 +694,8 @@ export const addFinalizer: <R>(
|
|
|
694
694
|
f: (exit: Exit.Exit<unknown, unknown>) => Effect.Effect<void, never, R>
|
|
695
695
|
) {
|
|
696
696
|
const scope = (yield* InstanceTag).scope
|
|
697
|
-
const services = yield* Effect.
|
|
698
|
-
yield* Scope.addFinalizerExit(scope, (exit) => Effect.
|
|
697
|
+
const services = yield* Effect.context<R>()
|
|
698
|
+
yield* Scope.addFinalizerExit(scope, (exit) => Effect.provideContext(f(exit), services))
|
|
699
699
|
})
|
|
700
700
|
|
|
701
701
|
/**
|
|
@@ -772,7 +772,7 @@ export const suspend = (instance: WorkflowInstance["Service"]): Effect.Effect<ne
|
|
|
772
772
|
* @since 4.0.0
|
|
773
773
|
* @category Annotations
|
|
774
774
|
*/
|
|
775
|
-
export const CaptureDefects =
|
|
775
|
+
export const CaptureDefects = Context.Reference<boolean>(
|
|
776
776
|
"effect/workflow/Workflow/CaptureDefects",
|
|
777
777
|
{
|
|
778
778
|
defaultValue: constTrue
|
|
@@ -789,7 +789,7 @@ export const CaptureDefects = ServiceMap.Reference<boolean>(
|
|
|
789
789
|
* @since 4.0.0
|
|
790
790
|
* @category Annotations
|
|
791
791
|
*/
|
|
792
|
-
export const SuspendOnFailure =
|
|
792
|
+
export const SuspendOnFailure = Context.Reference<boolean>(
|
|
793
793
|
"effect/workflow/Workflow/SuspendOnFailure",
|
|
794
794
|
{
|
|
795
795
|
defaultValue: constFalse
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
4
|
import type * as Cause from "../../Cause.ts"
|
|
5
|
+
import * as Context from "../../Context.ts"
|
|
5
6
|
import * as Effect from "../../Effect.ts"
|
|
6
7
|
import * as Exit from "../../Exit.ts"
|
|
7
8
|
import * as Fiber from "../../Fiber.ts"
|
|
@@ -12,7 +13,6 @@ import * as Option from "../../Option.ts"
|
|
|
12
13
|
import * as Schedule from "../../Schedule.ts"
|
|
13
14
|
import * as Schema from "../../Schema.ts"
|
|
14
15
|
import * as Scope from "../../Scope.ts"
|
|
15
|
-
import * as ServiceMap from "../../ServiceMap.ts"
|
|
16
16
|
import type * as Activity from "./Activity.ts"
|
|
17
17
|
import type { DurableClock } from "./DurableClock.ts"
|
|
18
18
|
import type * as DurableDeferred from "./DurableDeferred.ts"
|
|
@@ -22,7 +22,7 @@ import * as Workflow from "./Workflow.ts"
|
|
|
22
22
|
* @since 4.0.0
|
|
23
23
|
* @category Services
|
|
24
24
|
*/
|
|
25
|
-
export class WorkflowEngine extends
|
|
25
|
+
export class WorkflowEngine extends Context.Service<
|
|
26
26
|
WorkflowEngine,
|
|
27
27
|
{
|
|
28
28
|
/**
|
|
@@ -199,7 +199,7 @@ export class WorkflowEngine extends ServiceMap.Service<
|
|
|
199
199
|
* @since 4.0.0
|
|
200
200
|
* @category Services
|
|
201
201
|
*/
|
|
202
|
-
export class WorkflowInstance extends
|
|
202
|
+
export class WorkflowInstance extends Context.Service<
|
|
203
203
|
WorkflowInstance,
|
|
204
204
|
{
|
|
205
205
|
/**
|
|
@@ -336,13 +336,13 @@ export interface Encoded {
|
|
|
336
336
|
export const makeUnsafe = (options: Encoded): WorkflowEngine["Service"] =>
|
|
337
337
|
WorkflowEngine.of({
|
|
338
338
|
register: Effect.fnUntraced(function*(workflow, execute) {
|
|
339
|
-
const services = yield* Effect.
|
|
339
|
+
const services = yield* Effect.context<WorkflowEngine>()
|
|
340
340
|
yield* options.register(workflow, (payload, executionId) =>
|
|
341
341
|
Effect.suspend(() =>
|
|
342
342
|
execute(payload, executionId)
|
|
343
343
|
).pipe(
|
|
344
|
-
Effect.
|
|
345
|
-
(input) =>
|
|
344
|
+
Effect.updateContext(
|
|
345
|
+
(input) => Context.merge(services, input) as Context.Context<any>
|
|
346
346
|
)
|
|
347
347
|
))
|
|
348
348
|
}),
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
4
|
import type { NonEmptyReadonlyArray } from "../../Array.ts"
|
|
5
|
+
import * as Context from "../../Context.ts"
|
|
5
6
|
import * as Effect from "../../Effect.ts"
|
|
6
7
|
import * as Layer from "../../Layer.ts"
|
|
7
|
-
import * as ServiceMap from "../../ServiceMap.ts"
|
|
8
8
|
import type * as HttpApi from "../httpapi/HttpApi.ts"
|
|
9
9
|
import * as HttpApiBuilder from "../httpapi/HttpApiBuilder.ts"
|
|
10
10
|
import type * as HttpApiGroup from "../httpapi/HttpApiGroup.ts"
|
|
@@ -90,8 +90,8 @@ export const layerRpcHandlers = <
|
|
|
90
90
|
never,
|
|
91
91
|
WorkflowEngine | Workflow.RequirementsHandler<Workflows[number]>
|
|
92
92
|
> =>
|
|
93
|
-
Layer.
|
|
94
|
-
const services = yield* Effect.
|
|
93
|
+
Layer.effectContext(Effect.gen(function*() {
|
|
94
|
+
const services = yield* Effect.context<never>()
|
|
95
95
|
const prefix = options?.prefix ?? ""
|
|
96
96
|
const handlers = new Map<string, Rpc.Handler<string>>()
|
|
97
97
|
for (const workflow_ of workflows) {
|
|
@@ -118,7 +118,7 @@ export const layerRpcHandlers = <
|
|
|
118
118
|
handler: (payload: any) => workflow.resume(payload.executionId) as any
|
|
119
119
|
} as any)
|
|
120
120
|
}
|
|
121
|
-
return
|
|
121
|
+
return Context.makeUnsafe(handlers)
|
|
122
122
|
}))
|
|
123
123
|
|
|
124
124
|
/**
|