effect 4.0.6 → 4.1.0
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/README.md +1 -1
- package/dist/Arbitrary.d.ts +10 -2
- package/dist/Arbitrary.d.ts.map +1 -1
- package/dist/Arbitrary.js +2 -1
- package/dist/Arbitrary.js.map +1 -1
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +3 -0
- package/dist/BigDecimal.js.map +1 -1
- package/dist/Channel.d.ts +12 -6
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +30 -9
- package/dist/Channel.js.map +1 -1
- package/dist/Config.d.ts +7 -1
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js.map +1 -1
- package/dist/Context.d.ts +18 -1
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +27 -8
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +81 -11
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +101 -26
- package/dist/Cron.js.map +1 -1
- package/dist/Data.d.ts +54 -235
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js.map +1 -1
- package/dist/Duration.d.ts +78 -0
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +123 -0
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +165 -8
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +12 -2
- package/dist/Effect.js.map +1 -1
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +8 -1
- package/dist/Equal.js.map +1 -1
- package/dist/Exit.d.ts +3 -3
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js.map +1 -1
- package/dist/FileSystem.d.ts +59 -4
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +9 -2
- package/dist/FileSystem.js.map +1 -1
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +27 -13
- package/dist/Formatter.js.map +1 -1
- package/dist/Glob.d.ts +165 -0
- package/dist/Glob.d.ts.map +1 -0
- package/dist/Glob.js +127 -0
- package/dist/Glob.js.map +1 -0
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +4 -1
- package/dist/Hash.js.map +1 -1
- package/dist/JsonPatch.js +4 -0
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +13 -40
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Match.d.ts +86 -0
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +72 -0
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +3 -3
- package/dist/MutableList.d.ts +5 -2
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +7 -5
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +7 -0
- package/dist/MutableRef.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +2 -1
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +22 -12
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Pool.d.ts +51 -0
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +136 -36
- package/dist/Pool.js.map +1 -1
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +5 -6
- package/dist/PubSub.js.map +1 -1
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +3 -3
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +8 -2
- package/dist/RcMap.js.map +1 -1
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +8 -0
- package/dist/Ref.js.map +1 -1
- package/dist/Schedule.d.ts +18 -1
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +8 -3
- package/dist/Schedule.js.map +1 -1
- package/dist/Schema.d.ts +690 -49
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +687 -28
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +4 -2
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +14 -17
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +6 -1
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +22 -11
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +48 -22
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +33 -10
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +39 -13
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +12 -4
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +15 -5
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +5 -7
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Semaphore.d.ts +130 -0
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +94 -35
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +7 -2
- package/dist/Sink.js.map +1 -1
- package/dist/Stream.d.ts +13 -4
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +31 -10
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +3 -0
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +3 -0
- package/dist/String.js.map +1 -1
- package/dist/Terminal.d.ts +18 -1
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +1 -1
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +11 -1
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +6 -1
- package/dist/Tracer.js.map +1 -1
- package/dist/ai/AiError.d.ts +43 -116
- package/dist/ai/AiError.d.ts.map +1 -1
- package/dist/ai/AiError.js +53 -72
- package/dist/ai/AiError.js.map +1 -1
- package/dist/ai/Decision.d.ts +196 -15
- package/dist/ai/Decision.d.ts.map +1 -1
- package/dist/ai/Decision.js +130 -0
- package/dist/ai/Decision.js.map +1 -1
- package/dist/ai/DecisionModel.d.ts +54 -13
- package/dist/ai/DecisionModel.d.ts.map +1 -1
- package/dist/ai/DecisionModel.js +123 -12
- package/dist/ai/DecisionModel.js.map +1 -1
- package/dist/ai/LanguageModel.d.ts.map +1 -1
- package/dist/ai/LanguageModel.js +9 -0
- package/dist/ai/LanguageModel.js.map +1 -1
- package/dist/ai/McpSchema.d.ts +110 -110
- package/dist/ai/McpSchema.d.ts.map +1 -1
- package/dist/ai/McpServer.d.ts +630 -29
- package/dist/ai/McpServer.d.ts.map +1 -1
- package/dist/ai/McpServer.js +583 -131
- package/dist/ai/McpServer.js.map +1 -1
- package/dist/ai/McpTest.d.ts +130 -0
- package/dist/ai/McpTest.d.ts.map +1 -0
- package/dist/ai/McpTest.js +237 -0
- package/dist/ai/McpTest.js.map +1 -0
- package/dist/ai/Prompt.d.ts +52 -0
- package/dist/ai/Prompt.d.ts.map +1 -1
- package/dist/ai/Prompt.js +38 -0
- package/dist/ai/Prompt.js.map +1 -1
- package/dist/ai/Response.d.ts +17 -28
- package/dist/ai/Response.d.ts.map +1 -1
- package/dist/ai/Response.js +5 -10
- package/dist/ai/Response.js.map +1 -1
- package/dist/ai/Tool.d.ts +43 -1
- package/dist/ai/Tool.d.ts.map +1 -1
- package/dist/ai/Tool.js +5 -2
- package/dist/ai/Tool.js.map +1 -1
- package/dist/ai/Toolkit.d.ts.map +1 -1
- package/dist/ai/Toolkit.js +8 -1
- package/dist/ai/Toolkit.js.map +1 -1
- 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/mcpCore.js +17 -12
- package/dist/ai/internal/mcpCore.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2024_11_05.js +4 -5
- package/dist/ai/internal/mcpProtocol/v2024_11_05.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_03_26.js +4 -5
- package/dist/ai/internal/mcpProtocol/v2025_03_26.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_06_18.js +4 -5
- package/dist/ai/internal/mcpProtocol/v2025_06_18.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_11_25.js +4 -5
- package/dist/ai/internal/mcpProtocol/v2025_11_25.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2026_07_28.js +18 -10
- package/dist/ai/internal/mcpProtocol/v2026_07_28.js.map +1 -1
- package/dist/ai/internal/mcpProtocol.js +13 -0
- package/dist/ai/internal/mcpProtocol.js.map +1 -1
- package/dist/ai/internal/mcpRuntime.js +5 -3
- package/dist/ai/internal/mcpRuntime.js.map +1 -1
- package/dist/ai/internal/mcpStatefulRuntime.js +6 -1
- package/dist/ai/internal/mcpStatefulRuntime.js.map +1 -1
- package/dist/cli/Argument.d.ts +21 -0
- package/dist/cli/Argument.d.ts.map +1 -1
- package/dist/cli/Argument.js +7 -0
- package/dist/cli/Argument.js.map +1 -1
- package/dist/cli/CliError.d.ts +78 -0
- package/dist/cli/CliError.d.ts.map +1 -1
- package/dist/cli/CliError.js +65 -3
- package/dist/cli/CliError.js.map +1 -1
- package/dist/cli/CliOutput.d.ts +220 -7
- package/dist/cli/CliOutput.d.ts.map +1 -1
- package/dist/cli/CliOutput.js +156 -43
- package/dist/cli/CliOutput.js.map +1 -1
- package/dist/cli/Command.d.ts +47 -16
- package/dist/cli/Command.d.ts.map +1 -1
- package/dist/cli/Command.js +67 -29
- package/dist/cli/Command.js.map +1 -1
- package/dist/cli/Completions.d.ts +58 -0
- package/dist/cli/Completions.d.ts.map +1 -1
- package/dist/cli/Completions.js +49 -9
- package/dist/cli/Completions.js.map +1 -1
- package/dist/cli/Flag.d.ts +122 -0
- package/dist/cli/Flag.d.ts.map +1 -1
- package/dist/cli/Flag.js +42 -0
- package/dist/cli/Flag.js.map +1 -1
- package/dist/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/cli/GlobalFlag.js +15 -7
- package/dist/cli/GlobalFlag.js.map +1 -1
- package/dist/cli/HelpDoc.d.ts +15 -1
- package/dist/cli/HelpDoc.d.ts.map +1 -1
- package/dist/cli/Param.d.ts +15 -0
- package/dist/cli/Param.d.ts.map +1 -1
- package/dist/cli/Param.js +23 -2
- package/dist/cli/Param.js.map +1 -1
- package/dist/cli/Primitive.d.ts +14 -0
- package/dist/cli/Primitive.d.ts.map +1 -1
- package/dist/cli/Primitive.js +15 -1
- package/dist/cli/Primitive.js.map +1 -1
- package/dist/cli/Prompt.d.ts +1 -0
- package/dist/cli/Prompt.d.ts.map +1 -1
- package/dist/cli/Prompt.js +1 -0
- package/dist/cli/Prompt.js.map +1 -1
- package/dist/cli/TerminalCapabilities.d.ts +3 -2
- package/dist/cli/TerminalCapabilities.d.ts.map +1 -1
- package/dist/cli/TerminalCapabilities.js +3 -1
- package/dist/cli/TerminalCapabilities.js.map +1 -1
- package/dist/cli/internal/completions/bash.js +73 -27
- package/dist/cli/internal/completions/bash.js.map +1 -1
- package/dist/cli/internal/help.d.ts.map +1 -1
- package/dist/cli/internal/help.js +17 -10
- package/dist/cli/internal/help.js.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.js +45 -10
- package/dist/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/cluster/MessageStorage.d.ts +23 -45
- package/dist/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/cluster/MessageStorage.js +6 -7
- package/dist/cluster/MessageStorage.js.map +1 -1
- package/dist/cluster/Sharding.d.ts.map +1 -1
- package/dist/cluster/Sharding.js +151 -49
- package/dist/cluster/Sharding.js.map +1 -1
- package/dist/cluster/ShardingConfig.d.ts +76 -0
- package/dist/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/cluster/ShardingConfig.js +4 -0
- package/dist/cluster/ShardingConfig.js.map +1 -1
- package/dist/cluster/SingleRunner.d.ts +3 -3
- package/dist/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/cluster/SingleRunner.js +1 -1
- package/dist/cluster/Snowflake.d.ts.map +1 -1
- package/dist/cluster/Snowflake.js +3 -7
- package/dist/cluster/Snowflake.js.map +1 -1
- package/dist/cluster/SqlMessageStorage.d.ts +37 -6
- package/dist/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/cluster/SqlMessageStorage.js +34 -7
- package/dist/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/cluster/SqlRunnerStorage.js +109 -46
- package/dist/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/cluster/internal/entityManager.js +54 -20
- package/dist/cluster/internal/entityManager.js.map +1 -1
- package/dist/crypto/Aead.d.ts +322 -0
- package/dist/crypto/Aead.d.ts.map +1 -0
- package/dist/crypto/Aead.js +331 -0
- package/dist/crypto/Aead.js.map +1 -0
- package/dist/crypto/Cipher.d.ts +235 -0
- package/dist/crypto/Cipher.d.ts.map +1 -0
- package/dist/crypto/Cipher.js +233 -0
- package/dist/crypto/Cipher.js.map +1 -0
- package/dist/crypto/CryptoError.d.ts +212 -0
- package/dist/crypto/CryptoError.d.ts.map +1 -0
- package/dist/crypto/CryptoError.js +202 -0
- package/dist/crypto/CryptoError.js.map +1 -0
- package/dist/crypto/Digest.d.ts +143 -0
- package/dist/crypto/Digest.d.ts.map +1 -0
- package/dist/crypto/Digest.js +146 -0
- package/dist/crypto/Digest.js.map +1 -0
- package/dist/crypto/Kdf.d.ts +220 -0
- package/dist/crypto/Kdf.d.ts.map +1 -0
- package/dist/crypto/Kdf.js +212 -0
- package/dist/crypto/Kdf.js.map +1 -0
- package/dist/crypto/KeyAgreement.d.ts +323 -0
- package/dist/crypto/KeyAgreement.d.ts.map +1 -0
- package/dist/crypto/KeyAgreement.js +303 -0
- package/dist/crypto/KeyAgreement.js.map +1 -0
- package/dist/crypto/KeyFormat.d.ts +309 -0
- package/dist/crypto/KeyFormat.d.ts.map +1 -0
- package/dist/crypto/KeyFormat.js +556 -0
- package/dist/crypto/KeyFormat.js.map +1 -0
- package/dist/crypto/KeyWrap.d.ts +389 -0
- package/dist/crypto/KeyWrap.d.ts.map +1 -0
- package/dist/crypto/KeyWrap.js +381 -0
- package/dist/crypto/KeyWrap.js.map +1 -0
- package/dist/crypto/Mac.d.ts +277 -0
- package/dist/crypto/Mac.d.ts.map +1 -0
- package/dist/crypto/Mac.js +288 -0
- package/dist/crypto/Mac.js.map +1 -0
- package/dist/crypto/SecureRandom.d.ts +340 -0
- package/dist/crypto/SecureRandom.d.ts.map +1 -0
- package/dist/crypto/SecureRandom.js +257 -0
- package/dist/crypto/SecureRandom.js.map +1 -0
- package/dist/crypto/Signature.d.ts +448 -0
- package/dist/crypto/Signature.d.ts.map +1 -0
- package/dist/crypto/Signature.js +484 -0
- package/dist/crypto/Signature.js.map +1 -0
- package/dist/crypto/WebCrypto.d.ts +61 -0
- package/dist/crypto/WebCrypto.d.ts.map +1 -0
- package/dist/crypto/WebCrypto.js +63 -0
- package/dist/crypto/WebCrypto.js.map +1 -0
- package/dist/crypto/index.d.ts +65 -0
- package/dist/crypto/index.d.ts.map +1 -0
- package/dist/crypto/index.js +66 -0
- package/dist/crypto/index.js.map +1 -0
- package/dist/crypto/internal/asymmetric.d.ts +2 -0
- package/dist/crypto/internal/asymmetric.d.ts.map +1 -0
- package/dist/crypto/internal/asymmetric.js +210 -0
- package/dist/crypto/internal/asymmetric.js.map +1 -0
- package/dist/crypto/internal/chacha.d.ts +46 -0
- package/dist/crypto/internal/chacha.d.ts.map +1 -0
- package/dist/crypto/internal/chacha.js +885 -0
- package/dist/crypto/internal/chacha.js.map +1 -0
- package/dist/crypto/internal/der.d.ts +6 -0
- package/dist/crypto/internal/der.d.ts.map +1 -0
- package/dist/crypto/internal/der.js +86 -0
- package/dist/crypto/internal/der.js.map +1 -0
- package/dist/crypto/internal/digest.d.ts +2 -0
- package/dist/crypto/internal/digest.d.ts.map +1 -0
- package/dist/crypto/internal/digest.js +15 -0
- package/dist/crypto/internal/digest.js.map +1 -0
- package/dist/crypto/internal/key.d.ts +2 -0
- package/dist/crypto/internal/key.d.ts.map +1 -0
- package/dist/crypto/internal/key.js +170 -0
- package/dist/crypto/internal/key.js.map +1 -0
- package/dist/crypto/internal/md5.d.ts +39 -0
- package/dist/crypto/internal/md5.d.ts.map +1 -0
- package/dist/crypto/internal/md5.js +179 -0
- package/dist/crypto/internal/md5.js.map +1 -0
- package/dist/crypto/internal/webCrypto.d.ts +2 -0
- package/dist/crypto/internal/webCrypto.d.ts.map +1 -0
- package/dist/crypto/internal/webCrypto.js +111 -0
- package/dist/crypto/internal/webCrypto.js.map +1 -0
- package/dist/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/devtools/DevToolsClient.js +2 -0
- package/dist/devtools/DevToolsClient.js.map +1 -1
- package/dist/encoding/Base64.js +36 -0
- package/dist/encoding/Base64.js.map +1 -1
- package/dist/encoding/Base64Url.d.ts.map +1 -1
- package/dist/encoding/Base64Url.js +3 -2
- package/dist/encoding/Base64Url.js.map +1 -1
- package/dist/encoding/Csv.d.ts +608 -0
- package/dist/encoding/Csv.d.ts.map +1 -0
- package/dist/encoding/Csv.js +718 -0
- package/dist/encoding/Csv.js.map +1 -0
- package/dist/encoding/Hex.d.ts +3 -2
- package/dist/encoding/Hex.d.ts.map +1 -1
- package/dist/encoding/Hex.js +3 -2
- package/dist/encoding/Hex.js.map +1 -1
- package/dist/encoding/SchemaBinary.d.ts.map +1 -1
- package/dist/encoding/SchemaBinary.js +42 -4
- package/dist/encoding/SchemaBinary.js.map +1 -1
- package/dist/encoding/Sse.d.ts.map +1 -1
- package/dist/encoding/Sse.js +3 -3
- package/dist/encoding/Sse.js.map +1 -1
- package/dist/encoding/Toml.d.ts +17 -3
- package/dist/encoding/Toml.d.ts.map +1 -1
- package/dist/encoding/Toml.js +124 -31
- package/dist/encoding/Toml.js.map +1 -1
- package/dist/encoding/Yaml.d.ts +8 -1
- package/dist/encoding/Yaml.d.ts.map +1 -1
- package/dist/encoding/Yaml.js +54 -18
- package/dist/encoding/Yaml.js.map +1 -1
- package/dist/encoding/index.d.ts +5 -0
- package/dist/encoding/index.d.ts.map +1 -1
- package/dist/encoding/index.js +5 -0
- package/dist/encoding/index.js.map +1 -1
- package/dist/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/eventlog/EventJournal.js +6 -3
- package/dist/eventlog/EventJournal.js.map +1 -1
- package/dist/eventlog/EventLog.d.ts +119 -4
- package/dist/eventlog/EventLog.d.ts.map +1 -1
- package/dist/eventlog/EventLog.js +200 -12
- package/dist/eventlog/EventLog.js.map +1 -1
- package/dist/eventlog/EventLogEncryption.d.ts +41 -4
- package/dist/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/eventlog/EventLogEncryption.js +83 -64
- package/dist/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/eventlog/EventLogMessage.d.ts +279 -0
- package/dist/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/eventlog/EventLogMessage.js +217 -1
- package/dist/eventlog/EventLogMessage.js.map +1 -1
- package/dist/eventlog/EventLogRemote.d.ts +200 -28
- package/dist/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/eventlog/EventLogRemote.js +186 -16
- package/dist/eventlog/EventLogRemote.js.map +1 -1
- package/dist/eventlog/EventLogServer.d.ts +3 -0
- package/dist/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/eventlog/EventLogServer.js +18 -10
- package/dist/eventlog/EventLogServer.js.map +1 -1
- package/dist/eventlog/EventLogServerEncrypted.d.ts +326 -5
- package/dist/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/eventlog/EventLogServerEncrypted.js +769 -14
- package/dist/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/eventlog/EventLogSessionAuth.d.ts +5 -3
- package/dist/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/eventlog/EventLogSessionAuth.js +41 -64
- package/dist/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/eventlog/EventRow.d.ts +4 -0
- package/dist/eventlog/EventRow.d.ts.map +1 -1
- package/dist/eventlog/EventRow.js +12 -2
- package/dist/eventlog/EventRow.js.map +1 -1
- package/dist/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/eventlog/SqlEventJournal.js +47 -27
- package/dist/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/eventlog/SqlEventLogServerEncrypted.d.ts +21 -5
- package/dist/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/eventlog/SqlEventLogServerEncrypted.js +1048 -113
- package/dist/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/eventlog/SqlEventLogServerUnencrypted.js +2 -2
- package/dist/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/eventlog/internal/batches.d.ts +12 -0
- package/dist/eventlog/internal/batches.d.ts.map +1 -0
- package/dist/eventlog/internal/batches.js +26 -0
- package/dist/eventlog/internal/batches.js.map +1 -0
- package/dist/eventlog/internal/compaction.d.ts +38 -0
- package/dist/eventlog/internal/compaction.d.ts.map +1 -0
- package/dist/eventlog/internal/compaction.js +33 -0
- package/dist/eventlog/internal/compaction.js.map +1 -0
- package/dist/eventlog/internal/conflicts.d.ts +0 -1
- package/dist/eventlog/internal/conflicts.d.ts.map +1 -1
- package/dist/eventlog/internal/conflicts.js +0 -3
- package/dist/eventlog/internal/conflicts.js.map +1 -1
- package/dist/eventlog/internal/identityRootSecretDerivation.js +66 -67
- package/dist/eventlog/internal/identityRootSecretDerivation.js.map +1 -1
- package/dist/eventlog/internal/remoteCompaction.d.ts +31 -0
- package/dist/eventlog/internal/remoteCompaction.d.ts.map +1 -0
- package/dist/eventlog/internal/remoteCompaction.js +76 -0
- package/dist/eventlog/internal/remoteCompaction.js.map +1 -0
- package/dist/http/Cookies.d.ts +172 -0
- package/dist/http/Cookies.d.ts.map +1 -1
- package/dist/http/Cookies.js +153 -10
- package/dist/http/Cookies.js.map +1 -1
- package/dist/http/FetchHttpClient.d.ts +26 -2
- package/dist/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/http/FetchHttpClient.js +78 -15
- package/dist/http/FetchHttpClient.js.map +1 -1
- package/dist/http/HttpClient.d.ts +502 -8
- package/dist/http/HttpClient.d.ts.map +1 -1
- package/dist/http/HttpClient.js +296 -12
- package/dist/http/HttpClient.js.map +1 -1
- package/dist/http/HttpClientError.d.ts +8 -1
- package/dist/http/HttpClientError.d.ts.map +1 -1
- package/dist/http/HttpClientError.js +37 -1
- package/dist/http/HttpClientError.js.map +1 -1
- package/dist/http/HttpClientRequest.d.ts +9 -5
- package/dist/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/http/HttpClientRequest.js +3 -4
- package/dist/http/HttpClientRequest.js.map +1 -1
- package/dist/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/http/HttpClientResponse.js +3 -2
- package/dist/http/HttpClientResponse.js.map +1 -1
- package/dist/http/HttpMethod.d.ts +7 -1
- package/dist/http/HttpMethod.d.ts.map +1 -1
- package/dist/http/HttpMethod.js +3 -8
- package/dist/http/HttpMethod.js.map +1 -1
- package/dist/http/HttpMiddleware.d.ts +1 -1
- package/dist/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/http/HttpMiddleware.js +14 -16
- package/dist/http/HttpMiddleware.js.map +1 -1
- package/dist/http/HttpRouter.d.ts.map +1 -1
- package/dist/http/HttpRouter.js +2 -1
- package/dist/http/HttpRouter.js.map +1 -1
- package/dist/http/HttpServerError.js +2 -2
- package/dist/http/HttpServerError.js.map +1 -1
- package/dist/http/HttpServerRequest.d.ts +11 -3
- package/dist/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/http/HttpServerRequest.js +77 -25
- package/dist/http/HttpServerRequest.js.map +1 -1
- package/dist/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/http/HttpServerResponse.js +3 -2
- package/dist/http/HttpServerResponse.js.map +1 -1
- package/dist/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/http/HttpStaticServer.js +48 -21
- package/dist/http/HttpStaticServer.js.map +1 -1
- package/dist/http/HttpTraceContext.d.ts +2 -1
- package/dist/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/http/HttpTraceContext.js +7 -5
- package/dist/http/HttpTraceContext.js.map +1 -1
- package/dist/http/MultipartParser/internal/contentType.js +3 -3
- package/dist/http/ProblemDetails.d.ts +96 -0
- package/dist/http/ProblemDetails.d.ts.map +1 -0
- package/dist/http/ProblemDetails.js +98 -0
- package/dist/http/ProblemDetails.js.map +1 -0
- package/dist/http/UrlParams.d.ts +3 -1
- package/dist/http/UrlParams.d.ts.map +1 -1
- package/dist/http/UrlParams.js +4 -2
- package/dist/http/UrlParams.js.map +1 -1
- package/dist/http/index.d.ts +5 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +5 -0
- package/dist/http/index.js.map +1 -1
- package/dist/http/internal/compression.js +4 -5
- package/dist/http/internal/compression.js.map +1 -1
- package/dist/http/internal/decompression.js +6 -2
- package/dist/http/internal/decompression.js.map +1 -1
- package/dist/http/internal/httpBody.js +8 -1
- package/dist/http/internal/httpBody.js.map +1 -1
- package/dist/http/internal/urlParams.js +33 -0
- package/dist/http/internal/urlParams.js.map +1 -1
- package/dist/http-api/HttpApi.d.ts +3 -6
- package/dist/http-api/HttpApi.d.ts.map +1 -1
- package/dist/http-api/HttpApi.js +3 -6
- 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 +43 -13
- package/dist/http-api/HttpApiBuilder.js.map +1 -1
- package/dist/http-api/HttpApiClient.d.ts +140 -7
- package/dist/http-api/HttpApiClient.d.ts.map +1 -1
- package/dist/http-api/HttpApiClient.js +193 -44
- package/dist/http-api/HttpApiClient.js.map +1 -1
- package/dist/http-api/HttpApiEndpoint.d.ts +24 -7
- package/dist/http-api/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/http-api/HttpApiEndpoint.js +123 -32
- package/dist/http-api/HttpApiEndpoint.js.map +1 -1
- package/dist/http-api/HttpApiError.d.ts +185 -13
- package/dist/http-api/HttpApiError.d.ts.map +1 -1
- package/dist/http-api/HttpApiError.js +128 -0
- package/dist/http-api/HttpApiError.js.map +1 -1
- package/dist/http-api/HttpApiMiddleware.d.ts +64 -17
- package/dist/http-api/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/http-api/HttpApiMiddleware.js +85 -1
- package/dist/http-api/HttpApiMiddleware.js.map +1 -1
- package/dist/http-api/HttpApiSchema.d.ts +142 -33
- package/dist/http-api/HttpApiSchema.d.ts.map +1 -1
- package/dist/http-api/HttpApiSchema.js +123 -59
- package/dist/http-api/HttpApiSchema.js.map +1 -1
- package/dist/http-api/HttpApiTest.d.ts.map +1 -1
- package/dist/http-api/HttpApiTest.js +3 -2
- package/dist/http-api/HttpApiTest.js.map +1 -1
- package/dist/http-api/OpenApi.d.ts.map +1 -1
- package/dist/http-api/OpenApi.js +25 -16
- package/dist/http-api/OpenApi.js.map +1 -1
- package/dist/http-api/internal/toCodecHttpProperties.d.ts +2 -0
- package/dist/http-api/internal/toCodecHttpProperties.d.ts.map +1 -0
- package/dist/http-api/internal/toCodecHttpProperties.js +38 -0
- package/dist/http-api/internal/toCodecHttpProperties.js.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/arbitrary/runner.d.ts.map +1 -1
- package/dist/internal/arbitrary/runner.js +120 -44
- package/dist/internal/arbitrary/runner.js.map +1 -1
- package/dist/internal/core.js +2 -0
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/effect.js +46 -27
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/equal.js +14 -0
- package/dist/internal/equal.js.map +1 -1
- package/dist/internal/glob.d.ts +2 -0
- package/dist/internal/glob.d.ts.map +1 -0
- package/dist/internal/glob.js +630 -0
- package/dist/internal/glob.js.map +1 -0
- package/dist/internal/jsonSchema.d.ts +2 -0
- package/dist/internal/jsonSchema.d.ts.map +1 -0
- package/dist/internal/jsonSchema.js +28 -0
- package/dist/internal/jsonSchema.js.map +1 -0
- package/dist/internal/matcher.js +11 -1
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/persistence.js +9 -0
- package/dist/internal/persistence.js.map +1 -1
- package/dist/internal/rcRef.js +4 -1
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/schema/compilerRegistry.js +4 -1
- package/dist/internal/schema/compilerRegistry.js.map +1 -1
- package/dist/internal/schema/content.d.ts +2 -0
- package/dist/internal/schema/content.d.ts.map +1 -0
- package/dist/internal/schema/content.js +13 -0
- package/dist/internal/schema/content.js.map +1 -0
- package/dist/internal/schema/fromJsonSchemaDocument.js +173 -185
- package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/fromRepresentation.js +2 -1
- package/dist/internal/schema/fromRepresentation.js.map +1 -1
- package/dist/internal/schema/standardSchema.js +8 -2
- package/dist/internal/schema/standardSchema.js.map +1 -1
- package/dist/internal/schema/toCodeDocument.js +9 -6
- package/dist/internal/schema/toCodeDocument.js.map +1 -1
- package/dist/internal/schema/toCodec.js +21 -24
- package/dist/internal/schema/toCodec.js.map +1 -1
- package/dist/internal/schema/toJsonSchemaDocument.js +205 -140
- package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/toRepresentation.js +107 -129
- package/dist/internal/schema/toRepresentation.js.map +1 -1
- package/dist/internal/sql.d.ts +2 -0
- package/dist/internal/sql.d.ts.map +1 -0
- package/dist/internal/sql.js +13 -0
- package/dist/internal/sql.js.map +1 -0
- package/dist/internal/trie.js +42 -13
- package/dist/internal/trie.js.map +1 -1
- package/dist/internal/ulid.js +41 -0
- package/dist/internal/ulid.js.map +1 -1
- package/dist/internal/uuid.js +52 -8
- package/dist/internal/uuid.js.map +1 -1
- package/dist/internal/version.js +1 -1
- package/dist/observability/Otlp.d.ts +15 -4
- 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/OtlpProxy.d.ts +154 -0
- package/dist/observability/OtlpProxy.d.ts.map +1 -0
- package/dist/observability/OtlpProxy.js +235 -0
- package/dist/observability/OtlpProxy.js.map +1 -0
- package/dist/observability/OtlpResource.d.ts +7 -0
- package/dist/observability/OtlpResource.d.ts.map +1 -1
- package/dist/observability/OtlpResource.js +11 -1
- package/dist/observability/OtlpResource.js.map +1 -1
- package/dist/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/observability/OtlpTracer.js +4 -0
- package/dist/observability/OtlpTracer.js.map +1 -1
- package/dist/observability/index.d.ts +5 -0
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +5 -0
- package/dist/observability/index.js.map +1 -1
- package/dist/persistence/CircuitBreaker.d.ts +897 -0
- package/dist/persistence/CircuitBreaker.d.ts.map +1 -0
- package/dist/persistence/CircuitBreaker.js +1165 -0
- package/dist/persistence/CircuitBreaker.js.map +1 -0
- package/dist/persistence/KeyValueStore.d.ts +47 -2
- package/dist/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/persistence/KeyValueStore.js +129 -18
- package/dist/persistence/KeyValueStore.js.map +1 -1
- package/dist/persistence/PersistedQueue.d.ts +9 -0
- package/dist/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/persistence/PersistedQueue.js +94 -52
- package/dist/persistence/PersistedQueue.js.map +1 -1
- package/dist/persistence/Persistence.d.ts +10 -4
- package/dist/persistence/Persistence.d.ts.map +1 -1
- package/dist/persistence/Persistence.js +18 -11
- package/dist/persistence/Persistence.js.map +1 -1
- package/dist/persistence/Redis.d.ts +78 -2
- package/dist/persistence/Redis.d.ts.map +1 -1
- package/dist/persistence/Redis.js +62 -7
- package/dist/persistence/Redis.js.map +1 -1
- package/dist/persistence/index.d.ts +5 -0
- package/dist/persistence/index.d.ts.map +1 -1
- package/dist/persistence/index.js +5 -0
- package/dist/persistence/index.js.map +1 -1
- package/dist/process/ChildProcess.d.ts +237 -71
- package/dist/process/ChildProcess.d.ts.map +1 -1
- package/dist/process/ChildProcess.js +56 -158
- package/dist/process/ChildProcess.js.map +1 -1
- package/dist/process/ChildProcessSpawner.d.ts +35 -0
- package/dist/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/process/ChildProcessSpawner.js +5 -2
- package/dist/process/ChildProcessSpawner.js.map +1 -1
- package/dist/process/CommandLine.d.ts +294 -0
- package/dist/process/CommandLine.d.ts.map +1 -0
- package/dist/process/CommandLine.js +481 -0
- package/dist/process/CommandLine.js.map +1 -0
- package/dist/process/index.d.ts +5 -0
- package/dist/process/index.d.ts.map +1 -1
- package/dist/process/index.js +5 -0
- package/dist/process/index.js.map +1 -1
- package/dist/reactivity/AsyncResult.d.ts +1 -1
- package/dist/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/reactivity/Atom.d.ts +2 -1
- package/dist/reactivity/Atom.d.ts.map +1 -1
- package/dist/reactivity/Atom.js +3 -4
- package/dist/reactivity/Atom.js.map +1 -1
- package/dist/reactivity/AtomRegistry.js.map +1 -1
- package/dist/rpc/RpcClient.d.ts +16 -1
- package/dist/rpc/RpcClient.d.ts.map +1 -1
- package/dist/rpc/RpcClient.js +59 -24
- package/dist/rpc/RpcClient.js.map +1 -1
- package/dist/rpc/RpcMessage.d.ts +10 -1
- package/dist/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/rpc/RpcMessage.js +1 -0
- package/dist/rpc/RpcMessage.js.map +1 -1
- package/dist/rpc/RpcSerialization.d.ts +14 -0
- package/dist/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/rpc/RpcSerialization.js +26 -8
- package/dist/rpc/RpcSerialization.js.map +1 -1
- package/dist/rpc/RpcServer.d.ts +31 -0
- package/dist/rpc/RpcServer.d.ts.map +1 -1
- package/dist/rpc/RpcServer.js +139 -56
- package/dist/rpc/RpcServer.js.map +1 -1
- package/dist/rpc/RpcTest.d.ts +1 -0
- package/dist/rpc/RpcTest.d.ts.map +1 -1
- package/dist/rpc/RpcTest.js +1 -0
- package/dist/rpc/RpcTest.js.map +1 -1
- package/dist/schema/Model.d.ts +14 -0
- package/dist/schema/Model.d.ts.map +1 -1
- package/dist/schema/Model.js +18 -3
- package/dist/schema/Model.js.map +1 -1
- package/dist/sql/Migrator.d.ts +2 -20
- package/dist/sql/Migrator.d.ts.map +1 -1
- package/dist/sql/Migrator.js +13 -55
- package/dist/sql/Migrator.js.map +1 -1
- package/dist/sql/MigratorFileSystem.d.ts +21 -0
- package/dist/sql/MigratorFileSystem.d.ts.map +1 -0
- package/dist/sql/MigratorFileSystem.js +57 -0
- package/dist/sql/MigratorFileSystem.js.map +1 -0
- package/dist/sql/SqlClient.d.ts +9 -4
- package/dist/sql/SqlClient.d.ts.map +1 -1
- package/dist/sql/SqlClient.js +13 -10
- package/dist/sql/SqlClient.js.map +1 -1
- package/dist/sql/SqlResolver.d.ts +4 -0
- package/dist/sql/SqlResolver.d.ts.map +1 -1
- package/dist/sql/SqlResolver.js +18 -4
- package/dist/sql/SqlResolver.js.map +1 -1
- package/dist/sql/Statement.d.ts +27 -6
- package/dist/sql/Statement.d.ts.map +1 -1
- package/dist/sql/Statement.js +21 -15
- package/dist/sql/Statement.js.map +1 -1
- package/dist/sql/index.js +1 -1
- package/dist/testing/index.d.ts +0 -5
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +0 -5
- package/dist/testing/index.js.map +1 -1
- package/dist/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/workflow/DurableDeferred.js +21 -2
- package/dist/workflow/DurableDeferred.js.map +1 -1
- package/dist/workflow/internal/crypto.js +9 -8
- package/dist/workflow/internal/crypto.js.map +1 -1
- package/package.json +3 -1
- package/src/Arbitrary.ts +10 -2
- package/src/BigDecimal.ts +3 -0
- package/src/Channel.ts +64 -29
- package/src/Config.ts +7 -1
- package/src/Context.ts +34 -10
- package/src/Cron.ts +178 -29
- package/src/Data.ts +60 -265
- package/src/Duration.ts +140 -0
- package/src/Effect.ts +915 -86
- package/src/Equal.ts +8 -1
- package/src/Exit.ts +3 -3
- package/src/FileSystem.ts +65 -4
- package/src/Formatter.ts +28 -13
- package/src/Glob.ts +205 -0
- package/src/Hash.ts +4 -1
- package/src/JsonPatch.ts +4 -0
- package/src/JsonSchema.ts +12 -40
- package/src/Match.ts +127 -0
- package/src/Metric.ts +3 -3
- package/src/MutableList.ts +7 -5
- package/src/MutableRef.ts +8 -1
- package/src/PartitionedSemaphore.ts +24 -13
- package/src/Pool.ts +182 -52
- package/src/PubSub.ts +5 -6
- package/src/Random.ts +3 -3
- package/src/RcMap.ts +5 -1
- package/src/Ref.ts +8 -0
- package/src/Schedule.ts +27 -4
- package/src/Schema.ts +1237 -87
- package/src/SchemaAST.ts +20 -20
- package/src/SchemaGetter.ts +27 -11
- package/src/SchemaParser.ts +51 -18
- package/src/SchemaRepresentation.ts +50 -34
- package/src/SchemaTransformation.ts +17 -5
- package/src/ScopedCache.ts +5 -9
- package/src/Semaphore.ts +208 -40
- package/src/Sink.ts +15 -2
- package/src/Stream.ts +48 -22
- package/src/String.ts +3 -0
- package/src/Terminal.ts +19 -1
- package/src/Tracer.ts +15 -1
- package/src/ai/AiError.ts +56 -80
- package/src/ai/Decision.ts +257 -6
- package/src/ai/DecisionModel.ts +171 -28
- package/src/ai/LanguageModel.ts +9 -0
- package/src/ai/McpServer.ts +1283 -299
- package/src/ai/McpTest.ts +380 -0
- package/src/ai/Prompt.ts +65 -0
- package/src/ai/Response.ts +36 -31
- package/src/ai/Tool.ts +65 -10
- package/src/ai/Toolkit.ts +4 -1
- package/src/ai/index.ts +6 -0
- package/src/ai/internal/mcpCore.ts +78 -44
- package/src/ai/internal/mcpProtocol/v2024_11_05.ts +4 -7
- package/src/ai/internal/mcpProtocol/v2025_03_26.ts +4 -7
- package/src/ai/internal/mcpProtocol/v2025_06_18.ts +4 -7
- package/src/ai/internal/mcpProtocol/v2025_11_25.ts +4 -7
- package/src/ai/internal/mcpProtocol/v2026_07_28.ts +15 -10
- package/src/ai/internal/mcpProtocol.ts +29 -0
- package/src/ai/internal/mcpRuntime.ts +9 -5
- package/src/ai/internal/mcpStatefulRuntime.ts +14 -2
- package/src/cli/Argument.ts +21 -0
- package/src/cli/CliError.ts +90 -3
- package/src/cli/CliOutput.ts +300 -55
- package/src/cli/Command.ts +76 -41
- package/src/cli/Completions.ts +51 -0
- package/src/cli/Flag.ts +122 -0
- package/src/cli/GlobalFlag.ts +6 -7
- package/src/cli/HelpDoc.ts +18 -1
- package/src/cli/Param.ts +35 -6
- package/src/cli/Primitive.ts +16 -1
- package/src/cli/Prompt.ts +1 -0
- package/src/cli/TerminalCapabilities.ts +6 -3
- package/src/cli/internal/completions/bash.ts +79 -29
- package/src/cli/internal/help.ts +21 -9
- package/src/cluster/ClusterWorkflowEngine.ts +46 -16
- package/src/cluster/MessageStorage.ts +19 -14
- package/src/cluster/Sharding.ts +176 -47
- package/src/cluster/ShardingConfig.ts +43 -0
- package/src/cluster/SingleRunner.ts +3 -3
- package/src/cluster/Snowflake.ts +3 -7
- package/src/cluster/SqlMessageStorage.ts +49 -17
- package/src/cluster/SqlRunnerStorage.ts +143 -70
- package/src/cluster/internal/entityManager.ts +75 -22
- package/src/crypto/Aead.ts +517 -0
- package/src/crypto/Cipher.ts +326 -0
- package/src/crypto/CryptoError.ts +242 -0
- package/src/crypto/Digest.ts +167 -0
- package/src/crypto/Kdf.ts +315 -0
- package/src/crypto/KeyAgreement.ts +489 -0
- package/src/crypto/KeyFormat.ts +712 -0
- package/src/crypto/KeyWrap.ts +639 -0
- package/src/crypto/Mac.ts +386 -0
- package/src/crypto/SecureRandom.ts +459 -0
- package/src/crypto/Signature.ts +673 -0
- package/src/crypto/WebCrypto.ts +64 -0
- package/src/crypto/index.ts +78 -0
- package/src/crypto/internal/asymmetric.ts +329 -0
- package/src/crypto/internal/chacha.ts +1088 -0
- package/src/crypto/internal/der.ts +110 -0
- package/src/crypto/internal/digest.ts +16 -0
- package/src/crypto/internal/key.ts +235 -0
- package/src/crypto/internal/md5.ts +170 -0
- package/src/crypto/internal/webCrypto.ts +150 -0
- package/src/devtools/DevToolsClient.ts +2 -0
- package/src/encoding/Base64.ts +38 -0
- package/src/encoding/Base64Url.ts +5 -2
- package/src/encoding/Csv.ts +1298 -0
- package/src/encoding/Hex.ts +3 -2
- package/src/encoding/SchemaBinary.ts +40 -4
- package/src/encoding/Sse.ts +4 -3
- package/src/encoding/Toml.ts +117 -35
- package/src/encoding/Yaml.ts +61 -18
- package/src/encoding/index.ts +6 -0
- package/src/eventlog/EventJournal.ts +4 -3
- package/src/eventlog/EventLog.ts +340 -15
- package/src/eventlog/EventLogEncryption.ts +118 -110
- package/src/eventlog/EventLogMessage.ts +273 -1
- package/src/eventlog/EventLogRemote.ts +367 -23
- package/src/eventlog/EventLogServer.ts +23 -8
- package/src/eventlog/EventLogServerEncrypted.ts +1130 -67
- package/src/eventlog/EventLogSessionAuth.ts +56 -70
- package/src/eventlog/EventRow.ts +12 -3
- package/src/eventlog/SqlEventJournal.ts +68 -45
- package/src/eventlog/SqlEventLogServerEncrypted.ts +1244 -136
- package/src/eventlog/SqlEventLogServerUnencrypted.ts +2 -2
- package/src/eventlog/internal/batches.ts +30 -0
- package/src/eventlog/internal/compaction.ts +64 -0
- package/src/eventlog/internal/conflicts.ts +0 -4
- package/src/eventlog/internal/identityRootSecretDerivation.ts +93 -123
- package/src/eventlog/internal/remoteCompaction.ts +92 -0
- package/src/http/Cookies.ts +291 -12
- package/src/http/FetchHttpClient.ts +88 -16
- package/src/http/HttpClient.ts +636 -29
- package/src/http/HttpClientError.ts +35 -1
- package/src/http/HttpClientRequest.ts +21 -10
- package/src/http/HttpClientResponse.ts +3 -2
- package/src/http/HttpMethod.ts +10 -2
- package/src/http/HttpMiddleware.ts +15 -18
- package/src/http/HttpRouter.ts +2 -1
- package/src/http/HttpServerError.ts +2 -2
- package/src/http/HttpServerRequest.ts +101 -30
- package/src/http/HttpServerResponse.ts +3 -2
- package/src/http/HttpStaticServer.ts +51 -22
- package/src/http/HttpTraceContext.ts +7 -4
- package/src/http/MultipartParser/internal/contentType.ts +3 -3
- package/src/http/ProblemDetails.ts +149 -0
- package/src/http/UrlParams.ts +6 -1
- package/src/http/index.ts +6 -0
- package/src/http/internal/compression.ts +4 -5
- package/src/http/internal/decompression.ts +10 -4
- package/src/http/internal/httpBody.ts +10 -2
- package/src/http/internal/urlParams.ts +37 -0
- package/src/http-api/HttpApi.ts +3 -6
- package/src/http-api/HttpApiBuilder.ts +61 -19
- package/src/http-api/HttpApiClient.ts +284 -72
- package/src/http-api/HttpApiEndpoint.ts +135 -35
- package/src/http-api/HttpApiError.ts +250 -0
- package/src/http-api/HttpApiMiddleware.ts +95 -1
- package/src/http-api/HttpApiSchema.ts +236 -52
- package/src/http-api/HttpApiTest.ts +3 -2
- package/src/http-api/OpenApi.ts +20 -17
- package/src/http-api/internal/toCodecHttpProperties.ts +56 -0
- package/src/index.ts +6 -6
- package/src/internal/arbitrary/runner.ts +133 -36
- package/src/internal/core.ts +2 -0
- package/src/internal/effect.ts +58 -34
- package/src/internal/equal.ts +17 -0
- package/src/internal/glob.ts +736 -0
- package/src/internal/jsonSchema.ts +27 -0
- package/src/internal/matcher.ts +18 -1
- package/src/internal/persistence.ts +11 -0
- package/src/internal/rcRef.ts +4 -1
- package/src/internal/schema/compilerRegistry.ts +6 -1
- package/src/internal/schema/content.ts +18 -0
- package/src/internal/schema/fromJsonSchemaDocument.ts +228 -190
- package/src/internal/schema/fromRepresentation.ts +2 -1
- package/src/internal/schema/standardSchema.ts +2 -2
- package/src/internal/schema/toCodeDocument.ts +11 -7
- package/src/internal/schema/toCodec.ts +26 -22
- package/src/internal/schema/toJsonSchemaDocument.ts +189 -167
- package/src/internal/schema/toRepresentation.ts +122 -140
- package/src/internal/sql.ts +14 -0
- package/src/internal/trie.ts +43 -14
- package/src/internal/ulid.ts +44 -0
- package/src/internal/uuid.ts +57 -16
- package/src/internal/version.ts +1 -1
- package/src/observability/Otlp.ts +21 -4
- package/src/observability/OtlpProxy.ts +314 -0
- package/src/observability/OtlpResource.ts +9 -1
- package/src/observability/OtlpTracer.ts +4 -0
- package/src/observability/index.ts +6 -0
- package/src/persistence/CircuitBreaker.ts +1678 -0
- package/src/persistence/KeyValueStore.ts +219 -22
- package/src/persistence/PersistedQueue.ts +128 -59
- package/src/persistence/Persistence.ts +20 -13
- package/src/persistence/Redis.ts +129 -8
- package/src/persistence/index.ts +6 -0
- package/src/process/ChildProcess.ts +285 -264
- package/src/process/ChildProcessSpawner.ts +46 -2
- package/src/process/CommandLine.ts +630 -0
- package/src/process/index.ts +6 -0
- package/src/reactivity/AsyncResult.ts +1 -1
- package/src/reactivity/Atom.ts +5 -5
- package/src/reactivity/AtomRegistry.ts +1 -1
- package/src/rpc/RpcClient.ts +75 -36
- package/src/rpc/RpcMessage.ts +10 -1
- package/src/rpc/RpcSerialization.ts +35 -9
- package/src/rpc/RpcServer.ts +176 -63
- package/src/rpc/RpcTest.ts +3 -0
- package/src/schema/Model.ts +26 -3
- package/src/sql/Migrator.ts +15 -69
- package/src/sql/MigratorFileSystem.ts +71 -0
- package/src/sql/SqlClient.ts +13 -20
- package/src/sql/SqlResolver.ts +23 -9
- package/src/sql/Statement.ts +38 -9
- package/src/sql/index.ts +1 -1
- package/src/testing/index.ts +0 -6
- package/src/workflow/DurableDeferred.ts +23 -6
- package/src/workflow/internal/crypto.ts +15 -11
- package/dist/Crypto.d.ts +0 -244
- package/dist/Crypto.d.ts.map +0 -1
- package/dist/Crypto.js +0 -139
- package/dist/Crypto.js.map +0 -1
- package/dist/testing/TestCrypto.d.ts +0 -73
- package/dist/testing/TestCrypto.d.ts.map +0 -1
- package/dist/testing/TestCrypto.js +0 -87
- package/dist/testing/TestCrypto.js.map +0 -1
- package/src/Crypto.ts +0 -347
- package/src/testing/TestCrypto.ts +0 -94
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-memory test client for `McpServer` registrations.
|
|
3
|
+
*
|
|
4
|
+
* `McpTest.makeClient` runs the MCP server over an in-memory
|
|
5
|
+
* `RpcServer.Protocol`, performs the handshake for the selected protocol
|
|
6
|
+
* version, and returns a typed client. Requests travel through the same
|
|
7
|
+
* JSON-RPC encoding, routing, middleware, and response encoding as the stdio
|
|
8
|
+
* and HTTP transports, so tests reach protocol encoding, list methods,
|
|
9
|
+
* sessions, and notifications without opening a transport.
|
|
10
|
+
*
|
|
11
|
+
* @stability unstable
|
|
12
|
+
* @since 4.0.0
|
|
13
|
+
*/
|
|
14
|
+
import type * as Arr from "../Array.ts"
|
|
15
|
+
import * as Cause from "../Cause.ts"
|
|
16
|
+
import * as Context from "../Context.ts"
|
|
17
|
+
import * as Effect from "../Effect.ts"
|
|
18
|
+
import { identity } from "../Function.ts"
|
|
19
|
+
import * as Layer from "../Layer.ts"
|
|
20
|
+
import * as Predicate from "../Predicate.ts"
|
|
21
|
+
import * as Queue from "../Queue.ts"
|
|
22
|
+
import * as RpcClient from "../rpc/RpcClient.ts"
|
|
23
|
+
import type * as RpcClientError from "../rpc/RpcClientError.ts"
|
|
24
|
+
import * as RpcMessage from "../rpc/RpcMessage.ts"
|
|
25
|
+
import * as RpcSerialization from "../rpc/RpcSerialization.ts"
|
|
26
|
+
import * as RpcServer from "../rpc/RpcServer.ts"
|
|
27
|
+
import * as Schema from "../Schema.ts"
|
|
28
|
+
import type * as Scope from "../Scope.ts"
|
|
29
|
+
import type * as McpProtocol from "./McpProtocol.ts"
|
|
30
|
+
import * as McpSchema from "./McpSchema.ts"
|
|
31
|
+
import * as McpServer from "./McpServer.ts"
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A typed in-memory MCP client connected to a running `McpServer`.
|
|
35
|
+
*
|
|
36
|
+
* **Details**
|
|
37
|
+
*
|
|
38
|
+
* Each request method mirrors one entry of `McpSchema.ClientRequestRpcs`,
|
|
39
|
+
* except `initialize`, which `makeClient` sends during the handshake. Requests
|
|
40
|
+
* are encoded with the client schemas and decoded with the server's selected
|
|
41
|
+
* protocol adapter, so results and errors match what a wire client observes.
|
|
42
|
+
*
|
|
43
|
+
* Server-to-client notifications are queued on `notifications` in their wire
|
|
44
|
+
* encoding, in delivery order. Server-to-client requests (elicitation, sampling, roots) are
|
|
45
|
+
* rejected with a method-not-found error.
|
|
46
|
+
*
|
|
47
|
+
* @stability unstable
|
|
48
|
+
* @category models
|
|
49
|
+
* @since 4.0.0
|
|
50
|
+
*/
|
|
51
|
+
export interface Client {
|
|
52
|
+
/**
|
|
53
|
+
* The protocol version negotiated during the handshake.
|
|
54
|
+
*/
|
|
55
|
+
readonly protocolVersion: McpProtocol.ProtocolVersion
|
|
56
|
+
/**
|
|
57
|
+
* The `McpServer` service the client is connected to, for registering
|
|
58
|
+
* capabilities or emitting notifications from a test.
|
|
59
|
+
*/
|
|
60
|
+
readonly server: McpServer.McpServer["Service"]
|
|
61
|
+
/**
|
|
62
|
+
* Notifications the server sent to this client, in delivery order.
|
|
63
|
+
*/
|
|
64
|
+
readonly notifications: Queue.Dequeue<McpSchema.ServerNotificationEncoded>
|
|
65
|
+
readonly ping: Effect.Effect<void, McpSchema.McpError>
|
|
66
|
+
readonly listTools: (
|
|
67
|
+
request?: typeof McpSchema.ListTools.payloadSchema.Type
|
|
68
|
+
) => Effect.Effect<McpSchema.ListToolsResult, McpSchema.McpError>
|
|
69
|
+
readonly callTool: (
|
|
70
|
+
request: typeof McpSchema.CallTool.payloadSchema.Type
|
|
71
|
+
) => Effect.Effect<McpSchema.CallToolResult, McpSchema.McpError>
|
|
72
|
+
readonly listResources: (
|
|
73
|
+
request?: typeof McpSchema.ListResources.payloadSchema.Type
|
|
74
|
+
) => Effect.Effect<McpSchema.ListResourcesResult, McpSchema.McpError>
|
|
75
|
+
readonly listResourceTemplates: (
|
|
76
|
+
request?: typeof McpSchema.ListResourceTemplates.payloadSchema.Type
|
|
77
|
+
) => Effect.Effect<McpSchema.ListResourceTemplatesResult, McpSchema.McpError>
|
|
78
|
+
readonly readResource: (
|
|
79
|
+
request: typeof McpSchema.ReadResource.payloadSchema.Type
|
|
80
|
+
) => Effect.Effect<McpSchema.ReadResourceResult, McpSchema.McpError>
|
|
81
|
+
readonly subscribe: (
|
|
82
|
+
request: typeof McpSchema.Subscribe.payloadSchema.Type
|
|
83
|
+
) => Effect.Effect<void, McpSchema.McpError>
|
|
84
|
+
readonly unsubscribe: (
|
|
85
|
+
request: typeof McpSchema.Unsubscribe.payloadSchema.Type
|
|
86
|
+
) => Effect.Effect<void, McpSchema.McpError>
|
|
87
|
+
readonly listPrompts: (
|
|
88
|
+
request?: typeof McpSchema.ListPrompts.payloadSchema.Type
|
|
89
|
+
) => Effect.Effect<McpSchema.ListPromptsResult, McpSchema.McpError>
|
|
90
|
+
readonly getPrompt: (
|
|
91
|
+
request: typeof McpSchema.GetPrompt.payloadSchema.Type
|
|
92
|
+
) => Effect.Effect<McpSchema.GetPromptResult, McpSchema.McpError>
|
|
93
|
+
readonly complete: (
|
|
94
|
+
request: typeof McpSchema.Complete.payloadSchema.Type
|
|
95
|
+
) => Effect.Effect<McpSchema.CompleteResult, McpSchema.McpError>
|
|
96
|
+
readonly setLevel: (
|
|
97
|
+
request: typeof McpSchema.SetLevel.payloadSchema.Type
|
|
98
|
+
) => Effect.Effect<void, McpSchema.McpError>
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Creates an in-memory MCP client for a registration layer.
|
|
103
|
+
*
|
|
104
|
+
* **Details**
|
|
105
|
+
*
|
|
106
|
+
* The server is built from `McpServer.layer` with the supplied `protocols`
|
|
107
|
+
* and `registrations`, over an in-memory `RpcServer.Protocol`. The client
|
|
108
|
+
* speaks `options.protocolVersion`, by default the first adapter's version:
|
|
109
|
+
* stateful versions `initialize` and send `notifications/initialized` before
|
|
110
|
+
* `makeClient` returns; the stateless version attaches request metadata to
|
|
111
|
+
* every request instead.
|
|
112
|
+
*
|
|
113
|
+
* Because requests reach handlers through the server runner, the transport
|
|
114
|
+
* built-ins are discharged the same way as on stdio: `McpRequestContext` on
|
|
115
|
+
* every request, and `McpServerClient` only when every adapter in `protocols`
|
|
116
|
+
* is stateful (see `McpServer.ProvidedServices`). Any other `McpRequest`
|
|
117
|
+
* marker in `registrations` stays in the requirements and must be met by MCP
|
|
118
|
+
* middleware; providing the service directly does not discharge it.
|
|
119
|
+
*
|
|
120
|
+
* The client and server live in the surrounding `Scope`.
|
|
121
|
+
*
|
|
122
|
+
* **Example** (Reading a resource in a test)
|
|
123
|
+
*
|
|
124
|
+
* ```ts import.meta.vitest
|
|
125
|
+
* import { Effect } from "effect"
|
|
126
|
+
* import { McpProtocol, McpServer, McpTest } from "effect/ai"
|
|
127
|
+
*
|
|
128
|
+
* const registrations = McpServer.resource({
|
|
129
|
+
* uri: "test://greeting",
|
|
130
|
+
* name: "greeting",
|
|
131
|
+
* content: Effect.succeed("hello")
|
|
132
|
+
* })
|
|
133
|
+
*
|
|
134
|
+
* const program = Effect.gen(function*() {
|
|
135
|
+
* const client = yield* McpTest.makeClient(registrations, {
|
|
136
|
+
* protocols: [McpProtocol.v2025_11_25]
|
|
137
|
+
* })
|
|
138
|
+
* const result = yield* client.readResource({ uri: "test://greeting" })
|
|
139
|
+
* return result.contents.map((content) => content.uri)
|
|
140
|
+
* }).pipe(Effect.scoped)
|
|
141
|
+
*
|
|
142
|
+
* const actual = await Effect.runPromise(program)
|
|
143
|
+
* actual // => ["test://greeting"]
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* @see {@link Client} for the request methods and notifications
|
|
147
|
+
* @see {@link McpServer.middleware} for discharging request-level dependencies
|
|
148
|
+
*
|
|
149
|
+
* @stability unstable
|
|
150
|
+
* @category constructors
|
|
151
|
+
* @since 4.0.0
|
|
152
|
+
*/
|
|
153
|
+
export const makeClient: <
|
|
154
|
+
const Protocols extends Arr.NonEmptyReadonlyArray<McpProtocol.ProtocolAdapter>,
|
|
155
|
+
RA = never,
|
|
156
|
+
RE = never,
|
|
157
|
+
RR = never
|
|
158
|
+
>(
|
|
159
|
+
registrations: Layer.Layer<RA, RE, RR>,
|
|
160
|
+
options: {
|
|
161
|
+
readonly protocols: Protocols
|
|
162
|
+
readonly protocolVersion?: Protocols[number]["protocolVersion"] | undefined
|
|
163
|
+
readonly name?: string | undefined
|
|
164
|
+
readonly version?: string | undefined
|
|
165
|
+
readonly instructions?: string | undefined
|
|
166
|
+
readonly extensions?: NonNullable<McpSchema.ServerCapabilities["extensions"]> | undefined
|
|
167
|
+
readonly clientInfo?: McpSchema.Implementation | undefined
|
|
168
|
+
readonly clientCapabilities?: McpSchema.ClientCapabilities | undefined
|
|
169
|
+
}
|
|
170
|
+
) => Effect.Effect<
|
|
171
|
+
Client,
|
|
172
|
+
Cause.IllegalArgumentError | RE,
|
|
173
|
+
| Scope.Scope
|
|
174
|
+
| Exclude<McpServer.McpRequest.Without<RR>, McpServer.McpServer>
|
|
175
|
+
| McpServer.McpRequest.From<
|
|
176
|
+
"Requires",
|
|
177
|
+
Exclude<McpServer.McpRequest.Only<"Requires", RR>, McpServer.ProvidedServices<Protocols>>
|
|
178
|
+
>
|
|
179
|
+
> = Effect.fnUntraced(function*(
|
|
180
|
+
registrations: Layer.Layer<any, any, any>,
|
|
181
|
+
options: {
|
|
182
|
+
readonly protocols: Arr.NonEmptyReadonlyArray<McpProtocol.ProtocolAdapter>
|
|
183
|
+
readonly protocolVersion?: string | undefined
|
|
184
|
+
readonly name?: string | undefined
|
|
185
|
+
readonly version?: string | undefined
|
|
186
|
+
readonly instructions?: string | undefined
|
|
187
|
+
readonly extensions?: NonNullable<McpSchema.ServerCapabilities["extensions"]> | undefined
|
|
188
|
+
readonly clientInfo?: McpSchema.Implementation | undefined
|
|
189
|
+
readonly clientCapabilities?: McpSchema.ClientCapabilities | undefined
|
|
190
|
+
}
|
|
191
|
+
) {
|
|
192
|
+
const selected = options.protocolVersion === undefined
|
|
193
|
+
? options.protocols[0]
|
|
194
|
+
: options.protocols.find((protocol) => protocol.protocolVersion === options.protocolVersion)
|
|
195
|
+
if (selected === undefined) {
|
|
196
|
+
return yield* new Cause.IllegalArgumentError(
|
|
197
|
+
`MCP protocol ${options.protocolVersion} is not in the configured protocols`
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
const clientInfo = options.clientInfo ?? defaultClientInfo
|
|
201
|
+
const clientCapabilities = options.clientCapabilities ?? new McpSchema.ClientCapabilities({})
|
|
202
|
+
|
|
203
|
+
// Each direction carries one serialized JSON-RPC message per element, so
|
|
204
|
+
// requests and responses round-trip through the same JSON-RPC encoding as
|
|
205
|
+
// the stdio and HTTP transports.
|
|
206
|
+
const toServer = yield* Queue.unbounded<string>()
|
|
207
|
+
const toClient = yield* Queue.unbounded<string>()
|
|
208
|
+
const notifications = yield* Queue.unbounded<McpSchema.ServerNotificationEncoded>()
|
|
209
|
+
const serverProtocol = RpcServer.Protocol.make(Effect.fnUntraced(function*(writeRequest) {
|
|
210
|
+
const parser = serialization.makeUnsafe()
|
|
211
|
+
yield* Queue.take(toServer).pipe(
|
|
212
|
+
Effect.flatMap((frame) =>
|
|
213
|
+
Effect.forEach(
|
|
214
|
+
parser.decode(frame) as ReadonlyArray<RpcMessage.FromClientEncoded>,
|
|
215
|
+
(message) => writeRequest(0, message),
|
|
216
|
+
{ discard: true }
|
|
217
|
+
)
|
|
218
|
+
),
|
|
219
|
+
Effect.forever,
|
|
220
|
+
Effect.forkScoped
|
|
221
|
+
)
|
|
222
|
+
return {
|
|
223
|
+
disconnects: yield* Queue.make<number>(),
|
|
224
|
+
send(_clientId, response) {
|
|
225
|
+
const encoded = parser.encode(response)
|
|
226
|
+
return typeof encoded === "string" ? Effect.asVoid(Queue.offer(toClient, encoded)) : Effect.void
|
|
227
|
+
},
|
|
228
|
+
end: () => Effect.void,
|
|
229
|
+
clientIds: Effect.succeed(new Set([0])),
|
|
230
|
+
initialMessage: Effect.succeedNone,
|
|
231
|
+
supportsAck: false,
|
|
232
|
+
supportsTransferables: false,
|
|
233
|
+
supportsSpanPropagation: false,
|
|
234
|
+
supportsNotifications: true,
|
|
235
|
+
codecFor: serialization.codecFor
|
|
236
|
+
}
|
|
237
|
+
}))
|
|
238
|
+
const context = yield* Layer.build(
|
|
239
|
+
McpServer.layer({
|
|
240
|
+
name: options.name ?? "McpTest",
|
|
241
|
+
version: options.version ?? "1.0.0",
|
|
242
|
+
instructions: options.instructions,
|
|
243
|
+
extensions: options.extensions,
|
|
244
|
+
protocols: options.protocols,
|
|
245
|
+
registrations
|
|
246
|
+
}).pipe(Layer.provide(Layer.effect(RpcServer.Protocol, serverProtocol)))
|
|
247
|
+
)
|
|
248
|
+
const server = Context.get(context as Context.Context<McpServer.McpServer>, McpServer.McpServer)
|
|
249
|
+
|
|
250
|
+
const write = (message: object) => Effect.asVoid(Queue.offer(toServer, JSON.stringify(message)))
|
|
251
|
+
|
|
252
|
+
// Stateless revisions carry the client profile on every request instead of
|
|
253
|
+
// negotiating it with `initialize`.
|
|
254
|
+
const requestMetadata = selected.runtime._tag === "Stateless"
|
|
255
|
+
? {
|
|
256
|
+
"io.modelcontextprotocol/protocolVersion": selected.protocolVersion,
|
|
257
|
+
"io.modelcontextprotocol/clientCapabilities": encodeClientCapabilities(clientCapabilities),
|
|
258
|
+
"io.modelcontextprotocol/clientInfo": encodeImplementation(clientInfo)
|
|
259
|
+
}
|
|
260
|
+
: undefined
|
|
261
|
+
const params = (payload: unknown) => {
|
|
262
|
+
if (requestMetadata === undefined) {
|
|
263
|
+
return payload === undefined || payload === null ? {} : { params: payload }
|
|
264
|
+
}
|
|
265
|
+
const fields = Predicate.isReadonlyObject(payload) ? payload : {}
|
|
266
|
+
return {
|
|
267
|
+
params: {
|
|
268
|
+
...fields,
|
|
269
|
+
_meta: { ...requestMetadata, ...(Predicate.isReadonlyObject(fields._meta) ? fields._meta : {}) }
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const protocol = yield* RpcClient.Protocol.make(Effect.fnUntraced(function*(writeResponse) {
|
|
275
|
+
const parser = serialization.makeUnsafe()
|
|
276
|
+
let clientId = 0
|
|
277
|
+
const route = (message: RpcMessage.FromServerEncoded | RpcMessage.FromClientEncoded): Effect.Effect<void> => {
|
|
278
|
+
if (message._tag !== "Request") {
|
|
279
|
+
return writeResponse(clientId, message as RpcMessage.FromServerEncoded)
|
|
280
|
+
}
|
|
281
|
+
if (message.isNotification === true) {
|
|
282
|
+
return Effect.asVoid(Queue.offer(notifications, {
|
|
283
|
+
_tag: "Notification",
|
|
284
|
+
method: message.tag,
|
|
285
|
+
payload: message.payload ?? undefined
|
|
286
|
+
} as McpSchema.ServerNotificationEncoded))
|
|
287
|
+
}
|
|
288
|
+
// Server-to-client requests are not supported, so reject them instead
|
|
289
|
+
// of leaving the handler waiting for a reply.
|
|
290
|
+
return write({
|
|
291
|
+
jsonrpc: "2.0",
|
|
292
|
+
id: message.id,
|
|
293
|
+
error: { code: McpSchema.METHOD_NOT_FOUND_ERROR_CODE, message: `Method not found: ${message.tag}` }
|
|
294
|
+
})
|
|
295
|
+
}
|
|
296
|
+
yield* Queue.take(toClient).pipe(
|
|
297
|
+
Effect.flatMap((frame) =>
|
|
298
|
+
Effect.forEach(
|
|
299
|
+
parser.decode(frame) as ReadonlyArray<RpcMessage.FromServerEncoded | RpcMessage.FromClientEncoded>,
|
|
300
|
+
route,
|
|
301
|
+
{ discard: true }
|
|
302
|
+
)
|
|
303
|
+
),
|
|
304
|
+
Effect.forever,
|
|
305
|
+
Effect.forkScoped
|
|
306
|
+
)
|
|
307
|
+
return {
|
|
308
|
+
send(id, request) {
|
|
309
|
+
clientId = id
|
|
310
|
+
switch (request._tag) {
|
|
311
|
+
case "Request":
|
|
312
|
+
return write({ jsonrpc: "2.0", id: request.id, method: request.tag, ...params(request.payload) })
|
|
313
|
+
case "Interrupt":
|
|
314
|
+
return write({
|
|
315
|
+
jsonrpc: "2.0",
|
|
316
|
+
method: "notifications/cancelled",
|
|
317
|
+
...params({ requestId: request.requestId })
|
|
318
|
+
})
|
|
319
|
+
default:
|
|
320
|
+
// Effect RPC control messages are not part of the MCP protocol.
|
|
321
|
+
return Effect.void
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
supportsAck: false,
|
|
325
|
+
supportsTransferables: false,
|
|
326
|
+
codecFor: serialization.codecFor
|
|
327
|
+
}
|
|
328
|
+
}))
|
|
329
|
+
let nextRequestId = 1
|
|
330
|
+
const rpc = yield* RpcClient.make(McpSchema.ClientRequestRpcs, {
|
|
331
|
+
spanPrefix: "McpTest",
|
|
332
|
+
generateRequestId: () => RpcMessage.RequestId(nextRequestId++)
|
|
333
|
+
}).pipe(Effect.provideService(RpcClient.Protocol, protocol))
|
|
334
|
+
|
|
335
|
+
let protocolVersion = selected.protocolVersion
|
|
336
|
+
if (selected.runtime._tag === "Stateful") {
|
|
337
|
+
const result = yield* rpc.initialize({
|
|
338
|
+
protocolVersion: selected.protocolVersion,
|
|
339
|
+
capabilities: clientCapabilities,
|
|
340
|
+
clientInfo
|
|
341
|
+
}).pipe(Effect.orDie)
|
|
342
|
+
protocolVersion = result.protocolVersion as McpProtocol.ProtocolVersion
|
|
343
|
+
yield* write({ jsonrpc: "2.0", method: "notifications/initialized" })
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
return identity<Client>({
|
|
347
|
+
protocolVersion,
|
|
348
|
+
server,
|
|
349
|
+
notifications,
|
|
350
|
+
ping: Effect.asVoid(orDieClientError(rpc.ping(undefined))),
|
|
351
|
+
listTools: (request) => orDieClientError(rpc["tools/list"](request)),
|
|
352
|
+
callTool: (request) => orDieClientError(rpc["tools/call"](request)),
|
|
353
|
+
listResources: (request) => orDieClientError(rpc["resources/list"](request)),
|
|
354
|
+
listResourceTemplates: (request) => orDieClientError(rpc["resources/templates/list"](request)),
|
|
355
|
+
readResource: (request) => orDieClientError(rpc["resources/read"](request)),
|
|
356
|
+
subscribe: (request) => Effect.asVoid(orDieClientError(rpc["resources/subscribe"](request))),
|
|
357
|
+
unsubscribe: (request) => Effect.asVoid(orDieClientError(rpc["resources/unsubscribe"](request))),
|
|
358
|
+
listPrompts: (request) => orDieClientError(rpc["prompts/list"](request)),
|
|
359
|
+
getPrompt: (request) => orDieClientError(rpc["prompts/get"](request)),
|
|
360
|
+
complete: (request) => orDieClientError(rpc["completion/complete"](request)),
|
|
361
|
+
setLevel: (request) => Effect.asVoid(orDieClientError(rpc["logging/setLevel"](request)))
|
|
362
|
+
})
|
|
363
|
+
}) as any
|
|
364
|
+
|
|
365
|
+
const serialization = RpcSerialization.jsonRpc()
|
|
366
|
+
|
|
367
|
+
const defaultClientInfo: McpSchema.Implementation = { name: "McpTest", version: "1.0.0" }
|
|
368
|
+
|
|
369
|
+
const encodeClientCapabilities = Schema.encodeSync(Schema.toCodecJson(McpSchema.ClientCapabilities))
|
|
370
|
+
const encodeImplementation = Schema.encodeSync(Schema.toCodecJson(McpSchema.Implementation))
|
|
371
|
+
|
|
372
|
+
// The in-memory transport never fails to send, so a client error is a defect.
|
|
373
|
+
const orDieClientError = <A, E>(
|
|
374
|
+
effect: Effect.Effect<A, E | RpcClientError.RpcClientError>
|
|
375
|
+
): Effect.Effect<A, Exclude<E, RpcClientError.RpcClientError>> =>
|
|
376
|
+
Effect.catchIf(
|
|
377
|
+
effect,
|
|
378
|
+
(error): error is RpcClientError.RpcClientError => Predicate.isTagged(error, "RpcClientError"),
|
|
379
|
+
Effect.die
|
|
380
|
+
) as any
|
package/src/ai/Prompt.ts
CHANGED
|
@@ -689,6 +689,60 @@ export const toolCallPart = (params: PartConstructorParams<ToolCallPart>): ToolC
|
|
|
689
689
|
// Tool Result Part
|
|
690
690
|
// =============================================================================
|
|
691
691
|
|
|
692
|
+
/**
|
|
693
|
+
* A part returned by a tool's `toModelOutput` mapping and sent to the model in
|
|
694
|
+
* place of the serialized tool result.
|
|
695
|
+
*
|
|
696
|
+
* @stability unstable
|
|
697
|
+
* @category models
|
|
698
|
+
* @since 4.0.0
|
|
699
|
+
*/
|
|
700
|
+
export type ToolModelOutputPart = TextPart | FilePart
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Schema for validation and encoding of tool model output parts.
|
|
704
|
+
*
|
|
705
|
+
* @stability unstable
|
|
706
|
+
* @category schemas
|
|
707
|
+
* @since 4.0.0
|
|
708
|
+
*/
|
|
709
|
+
export const ToolModelOutputPart: Schema.Union<readonly [typeof TextPart, typeof FilePart]> = Schema.Union([
|
|
710
|
+
TextPart,
|
|
711
|
+
FilePart
|
|
712
|
+
])
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Converts tool model output to text for providers that only accept text tool
|
|
716
|
+
* results.
|
|
717
|
+
*
|
|
718
|
+
* **Details**
|
|
719
|
+
*
|
|
720
|
+
* Joins text parts with newlines and replaces each file part with a placeholder
|
|
721
|
+
* naming its media type and file name.
|
|
722
|
+
*
|
|
723
|
+
* **Example** (Converting tool model output to text)
|
|
724
|
+
*
|
|
725
|
+
* ```ts import.meta.vitest
|
|
726
|
+
* import { Prompt } from "effect/ai"
|
|
727
|
+
*
|
|
728
|
+
* const text = Prompt.toolModelOutputToText([
|
|
729
|
+
* Prompt.textPart({ text: "Screenshot" }),
|
|
730
|
+
* Prompt.filePart({ mediaType: "image/png", fileName: "screenshot.png", data: "iVBORw0KGgo=" })
|
|
731
|
+
* ])
|
|
732
|
+
* text // => "Screenshot\n[image/png screenshot.png omitted]"
|
|
733
|
+
* ```
|
|
734
|
+
*
|
|
735
|
+
* @stability unstable
|
|
736
|
+
* @category combinators
|
|
737
|
+
* @since 4.0.0
|
|
738
|
+
*/
|
|
739
|
+
export const toolModelOutputToText = (parts: ReadonlyArray<ToolModelOutputPart>): string =>
|
|
740
|
+
parts.map((part) =>
|
|
741
|
+
part.type === "text"
|
|
742
|
+
? part.text
|
|
743
|
+
: `[${part.mediaType}${part.fileName === undefined ? "" : ` ${part.fileName}`} omitted]`
|
|
744
|
+
).join("\n")
|
|
745
|
+
|
|
692
746
|
/**
|
|
693
747
|
* Content part representing the result of a tool call.
|
|
694
748
|
*
|
|
@@ -732,6 +786,10 @@ export interface ToolResultPart extends BasePart<"tool-result", ToolResultPartOp
|
|
|
732
786
|
* The result returned by the tool execution.
|
|
733
787
|
*/
|
|
734
788
|
readonly result: unknown
|
|
789
|
+
/**
|
|
790
|
+
* Content sent to the model in place of the serialized `result`.
|
|
791
|
+
*/
|
|
792
|
+
readonly modelOutput?: ReadonlyArray<ToolModelOutputPart> | undefined
|
|
735
793
|
/**
|
|
736
794
|
* Whether the tool was executed by the provider (true) or framework (false).
|
|
737
795
|
*/
|
|
@@ -762,6 +820,10 @@ export interface ToolResultPartEncoded extends BasePartEncoded<"tool-result", To
|
|
|
762
820
|
* The result returned by the tool execution.
|
|
763
821
|
*/
|
|
764
822
|
readonly result: unknown
|
|
823
|
+
/**
|
|
824
|
+
* Content sent to the model in place of the serialized `result`.
|
|
825
|
+
*/
|
|
826
|
+
readonly modelOutput?: ReadonlyArray<TextPartEncoded | FilePartEncoded> | undefined
|
|
765
827
|
/**
|
|
766
828
|
* Whether the tool was executed by the provider (true) or framework (false).
|
|
767
829
|
*/
|
|
@@ -791,6 +853,7 @@ export const ToolResultPart: Schema.Struct<{
|
|
|
791
853
|
readonly name: Schema.String
|
|
792
854
|
readonly isFailure: Schema.Boolean
|
|
793
855
|
readonly result: Schema.Unknown
|
|
856
|
+
readonly modelOutput: Schema.optional<Schema.$Array<typeof ToolModelOutputPart>>
|
|
794
857
|
readonly providerExecuted: Schema.withDecodingDefault<Schema.Boolean>
|
|
795
858
|
readonly "~effect/ai/Prompt/Part": Schema.withDecodingDefaultKey<Schema.Literal<"~effect/ai/Prompt/Part">>
|
|
796
859
|
readonly options: Schema.withDecodingDefault<
|
|
@@ -806,6 +869,7 @@ export const ToolResultPart: Schema.Struct<{
|
|
|
806
869
|
name: Schema.String,
|
|
807
870
|
isFailure: Schema.Boolean,
|
|
808
871
|
result: Schema.Unknown,
|
|
872
|
+
modelOutput: Schema.optional(Schema.Array(ToolModelOutputPart)),
|
|
809
873
|
providerExecuted: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false)))
|
|
810
874
|
}).annotate({ identifier: "ToolResultPart" })
|
|
811
875
|
|
|
@@ -2272,6 +2336,7 @@ export const fromResponseParts = (parts: ReadonlyArray<Response.AnyPart>): Promp
|
|
|
2272
2336
|
name: part.name,
|
|
2273
2337
|
isFailure: part.isFailure,
|
|
2274
2338
|
result: part.encodedResult,
|
|
2339
|
+
...(part.modelOutput !== undefined ? { modelOutput: part.modelOutput } : undefined),
|
|
2275
2340
|
providerExecuted: part.providerExecuted ?? false,
|
|
2276
2341
|
options: part.metadata
|
|
2277
2342
|
}))
|
package/src/ai/Response.ts
CHANGED
|
@@ -18,6 +18,7 @@ import * as Predicate from "../Predicate.ts"
|
|
|
18
18
|
import * as Schema from "../Schema.ts"
|
|
19
19
|
import * as SchemaTransformation from "../SchemaTransformation.ts"
|
|
20
20
|
import * as AiError from "./AiError.ts"
|
|
21
|
+
import * as Prompt from "./Prompt.ts"
|
|
21
22
|
import * as Tool from "./Tool.ts"
|
|
22
23
|
import type * as Toolkit from "./Toolkit.ts"
|
|
23
24
|
|
|
@@ -172,6 +173,18 @@ const toolPartSchemas = (tool: Tool.Any) => {
|
|
|
172
173
|
|
|
173
174
|
type AnyToolParts = ToolCallPart<string, unknown> | ToolResultPart<string, unknown, unknown>
|
|
174
175
|
|
|
176
|
+
type ToolkitTools<T> = T extends Toolkit.Any ? Toolkit.Tools<T> : Toolkit.WithHandlerTools<T>
|
|
177
|
+
|
|
178
|
+
type ToolkitTool<T> = ToolkitTools<T>[keyof ToolkitTools<T>]
|
|
179
|
+
|
|
180
|
+
type ToolkitDecodingServices<T> =
|
|
181
|
+
| Tool.ParametersDecodingServices<ToolkitTool<T>>
|
|
182
|
+
| Tool.ResultDecodingServices<ToolkitTool<T>>
|
|
183
|
+
|
|
184
|
+
type ToolkitEncodingServices<T> =
|
|
185
|
+
| Tool.ParametersEncodingServices<ToolkitTool<T>>
|
|
186
|
+
| Tool.ResultEncodingServices<ToolkitTool<T>>
|
|
187
|
+
|
|
175
188
|
const toolPartSchemasFor = (
|
|
176
189
|
toolkit: Toolkit.Any | Toolkit.WithHandler<any> | undefined
|
|
177
190
|
): ReadonlyArray<Schema.Top> => {
|
|
@@ -257,10 +270,10 @@ export const AllParts: {
|
|
|
257
270
|
* @since 4.0.0
|
|
258
271
|
*/
|
|
259
272
|
<T extends Toolkit.Any | Toolkit.WithHandler<any>>(toolkit: T): Schema.Codec<
|
|
260
|
-
AllParts<
|
|
273
|
+
AllParts<ToolkitTools<T>>,
|
|
261
274
|
AllPartsEncoded,
|
|
262
|
-
|
|
263
|
-
|
|
275
|
+
ToolkitDecodingServices<T>,
|
|
276
|
+
ToolkitEncodingServices<T>
|
|
264
277
|
>
|
|
265
278
|
/**
|
|
266
279
|
* Creates a Schema for all response parts based on a toolkit.
|
|
@@ -395,10 +408,10 @@ export const Part: {
|
|
|
395
408
|
* @since 4.0.0
|
|
396
409
|
*/
|
|
397
410
|
<T extends Toolkit.Any | Toolkit.WithHandler<any>>(toolkit: T): Schema.Codec<
|
|
398
|
-
Part<
|
|
411
|
+
Part<ToolkitTools<T>>,
|
|
399
412
|
PartEncoded,
|
|
400
|
-
|
|
401
|
-
|
|
413
|
+
ToolkitDecodingServices<T>,
|
|
414
|
+
ToolkitEncodingServices<T>
|
|
402
415
|
>
|
|
403
416
|
/**
|
|
404
417
|
* Creates a Schema for non-streaming response parts based on a toolkit.
|
|
@@ -513,10 +526,10 @@ export const StreamPart: {
|
|
|
513
526
|
* @since 4.0.0
|
|
514
527
|
*/
|
|
515
528
|
<T extends Toolkit.Any | Toolkit.WithHandler<any>>(toolkit: T): Schema.Codec<
|
|
516
|
-
StreamPart<
|
|
529
|
+
StreamPart<ToolkitTools<T>>,
|
|
517
530
|
StreamPartEncoded,
|
|
518
|
-
|
|
519
|
-
|
|
531
|
+
ToolkitDecodingServices<T>,
|
|
532
|
+
ToolkitEncodingServices<T>
|
|
520
533
|
>
|
|
521
534
|
/**
|
|
522
535
|
* Creates a Schema for streaming response parts based on a toolkit.
|
|
@@ -1695,6 +1708,10 @@ export interface BaseToolResult<Name extends string> extends BasePart<"tool-resu
|
|
|
1695
1708
|
* The encoded result for serialization purposes.
|
|
1696
1709
|
*/
|
|
1697
1710
|
readonly encodedResult: unknown
|
|
1711
|
+
/**
|
|
1712
|
+
* Content sent to the model in place of the encoded result.
|
|
1713
|
+
*/
|
|
1714
|
+
readonly modelOutput?: ReadonlyArray<Prompt.ToolModelOutputPart> | undefined
|
|
1698
1715
|
/**
|
|
1699
1716
|
* Whether the tool was executed by the provider (true) or framework (false).
|
|
1700
1717
|
*/
|
|
@@ -1818,6 +1835,10 @@ export interface ToolResultPartEncoded extends BasePartEncoded<"tool-result", To
|
|
|
1818
1835
|
* The result returned by the tool execution.
|
|
1819
1836
|
*/
|
|
1820
1837
|
readonly result: unknown
|
|
1838
|
+
/**
|
|
1839
|
+
* Content sent to the model in place of the result.
|
|
1840
|
+
*/
|
|
1841
|
+
readonly modelOutput?: ReadonlyArray<Prompt.TextPartEncoded | Prompt.FilePartEncoded> | undefined
|
|
1821
1842
|
/**
|
|
1822
1843
|
* Whether or not the result of executing the tool call handler was an error.
|
|
1823
1844
|
*/
|
|
@@ -1871,6 +1892,8 @@ export const ToolResultPart = <
|
|
|
1871
1892
|
identifier: `ToolResultPart(${name})`
|
|
1872
1893
|
}) as any
|
|
1873
1894
|
|
|
1895
|
+
const ModelOutput = Schema.Array(Prompt.ToolModelOutputPart)
|
|
1896
|
+
|
|
1874
1897
|
const makeToolResultPart = (name: Schema.Top, success: Schema.Constraint, failure: Schema.Constraint) => {
|
|
1875
1898
|
const makeSchema = (result: Schema.Constraint, isFailure: boolean) => {
|
|
1876
1899
|
const encodedResult = Schema.toEncoded(result)
|
|
@@ -1887,11 +1910,13 @@ const makeToolResultPart = (name: Schema.Top, success: Schema.Constraint, failur
|
|
|
1887
1910
|
providerExecuted: Schema.Boolean,
|
|
1888
1911
|
metadata: ProviderMetadata,
|
|
1889
1912
|
encodedResult,
|
|
1913
|
+
modelOutput: Schema.optional(ModelOutput),
|
|
1890
1914
|
preliminary: Schema.Boolean
|
|
1891
1915
|
})
|
|
1892
1916
|
const Encoded = Schema.Struct({
|
|
1893
1917
|
...Common,
|
|
1894
1918
|
result: encodedResult,
|
|
1919
|
+
modelOutput: Schema.optional(Schema.toEncoded(ModelOutput)),
|
|
1895
1920
|
providerExecuted: Schema.optional(Schema.Boolean),
|
|
1896
1921
|
metadata: Schema.optional(ProviderMetadata),
|
|
1897
1922
|
preliminary: Schema.optional(Schema.Boolean)
|
|
@@ -2351,15 +2376,6 @@ export const UrlSourcePart: Schema.Struct<{
|
|
|
2351
2376
|
// HTTP Details
|
|
2352
2377
|
// =============================================================================
|
|
2353
2378
|
|
|
2354
|
-
/**
|
|
2355
|
-
* Alias of {@link AiError.HttpRequestDetails}.
|
|
2356
|
-
*
|
|
2357
|
-
* @stability unstable
|
|
2358
|
-
* @category schemas
|
|
2359
|
-
* @since 4.0.0
|
|
2360
|
-
*/
|
|
2361
|
-
export const HttpRequestDetails = AiError.HttpRequestDetails
|
|
2362
|
-
|
|
2363
2379
|
/**
|
|
2364
2380
|
* Alias of {@link AiError.HttpResponseDetails}.
|
|
2365
2381
|
*
|
|
@@ -2387,8 +2403,7 @@ export const HttpResponseDetails = AiError.HttpResponseDetails
|
|
|
2387
2403
|
* {
|
|
2388
2404
|
* id: "resp_123",
|
|
2389
2405
|
* modelId: "gpt-4",
|
|
2390
|
-
* timestamp: DateTime.makeUnsafe("2024-01-01T00:00:00Z")
|
|
2391
|
-
* request: undefined
|
|
2406
|
+
* timestamp: DateTime.makeUnsafe("2024-01-01T00:00:00Z")
|
|
2392
2407
|
* }
|
|
2393
2408
|
* )
|
|
2394
2409
|
* const result = [metadataPart.id, metadataPart.modelId] // => ["resp_123", "gpt-4"]
|
|
@@ -2411,10 +2426,6 @@ export interface ResponseMetadataPart extends BasePart<"response-metadata", Resp
|
|
|
2411
2426
|
* Optional timestamp when the response was generated.
|
|
2412
2427
|
*/
|
|
2413
2428
|
readonly timestamp?: DateTime.Utc | undefined
|
|
2414
|
-
/**
|
|
2415
|
-
* Optional HTTP request details for the request made to the AI provider.
|
|
2416
|
-
*/
|
|
2417
|
-
readonly request?: typeof HttpRequestDetails.Type | undefined
|
|
2418
2429
|
}
|
|
2419
2430
|
|
|
2420
2431
|
/**
|
|
@@ -2439,10 +2450,6 @@ export interface ResponseMetadataPartEncoded
|
|
|
2439
2450
|
* Optional timestamp when the response was generated.
|
|
2440
2451
|
*/
|
|
2441
2452
|
readonly timestamp?: string | undefined
|
|
2442
|
-
/**
|
|
2443
|
-
* Optional HTTP request details for the request made to the AI provider.
|
|
2444
|
-
*/
|
|
2445
|
-
readonly request?: typeof HttpRequestDetails.Encoded | undefined
|
|
2446
2453
|
}
|
|
2447
2454
|
|
|
2448
2455
|
/**
|
|
@@ -2467,7 +2474,6 @@ export const ResponseMetadataPart: Schema.Struct<{
|
|
|
2467
2474
|
readonly id: Schema.optional<Schema.String>
|
|
2468
2475
|
readonly modelId: Schema.optional<Schema.String>
|
|
2469
2476
|
readonly timestamp: Schema.optional<Schema.DateTimeUtcFromString>
|
|
2470
|
-
readonly request: Schema.optional<typeof HttpRequestDetails>
|
|
2471
2477
|
readonly "~effect/ai/Response/Part": Schema.withDecodingDefaultKey<Schema.tag<"~effect/ai/Response/Part">>
|
|
2472
2478
|
readonly metadata: Schema.withDecodingDefault<
|
|
2473
2479
|
Schema.$Record<Schema.String, Schema.Codec<Schema.Json>>
|
|
@@ -2477,8 +2483,7 @@ export const ResponseMetadataPart: Schema.Struct<{
|
|
|
2477
2483
|
type: Schema.tag("response-metadata"),
|
|
2478
2484
|
id: Schema.optional(Schema.String),
|
|
2479
2485
|
modelId: Schema.optional(Schema.String),
|
|
2480
|
-
timestamp: Schema.optional(Schema.DateTimeUtcFromString)
|
|
2481
|
-
request: Schema.optional(HttpRequestDetails)
|
|
2486
|
+
timestamp: Schema.optional(Schema.DateTimeUtcFromString)
|
|
2482
2487
|
}).annotate({ identifier: "ResponseMetadataPart" }) satisfies Schema.Codec<
|
|
2483
2488
|
ResponseMetadataPart,
|
|
2484
2489
|
ResponseMetadataPartEncoded
|