@effect-uai/core 0.11.0 → 0.12.1
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/{AiError-Bf1pq4BB.d.mts → AiError-eLV9t1lU.d.mts} +12 -16
- package/dist/AiError-eLV9t1lU.d.mts.map +1 -0
- package/dist/{Audio-CR7CSljJ.d.mts → Audio-60lKKHxS.d.mts} +4 -5
- package/dist/Audio-60lKKHxS.d.mts.map +1 -0
- package/dist/{Image-C4vuBmu0.d.mts → Image-BK8-4H6s.d.mts} +12 -14
- package/dist/Image-BK8-4H6s.d.mts.map +1 -0
- package/dist/{Items-BWNu6VGp.d.mts → Items-SfUabNuB.d.mts} +92 -81
- package/dist/Items-SfUabNuB.d.mts.map +1 -0
- package/dist/{Loop-D8nWpowc.d.mts → Loop-B54AB1ME.d.mts} +19 -21
- package/dist/Loop-B54AB1ME.d.mts.map +1 -0
- package/dist/{Media-D_CpcM1Z.d.mts → Media-DwgpifPD.d.mts} +1 -1
- package/dist/Media-DwgpifPD.d.mts.map +1 -0
- package/dist/{SandboxError-CIrVDOMV.d.mts → SandboxError-BN8b28Bh.d.mts} +11 -15
- package/dist/SandboxError-BN8b28Bh.d.mts.map +1 -0
- package/dist/{StructuredFormat-DHaUJBdd.d.mts → StructuredFormat-BlZhyOsi.d.mts} +3 -7
- package/dist/StructuredFormat-BlZhyOsi.d.mts.map +1 -0
- package/dist/{Tool-CXFHCQrT.d.mts → Tool-DE-rnvkw.d.mts} +5 -8
- package/dist/Tool-DE-rnvkw.d.mts.map +1 -0
- package/dist/{ToolEvent-nVijCrvm.d.mts → ToolEvent-D99MGQYH.d.mts} +56 -63
- package/dist/ToolEvent-D99MGQYH.d.mts.map +1 -0
- package/dist/{ToolResult-CQqKkcDa.d.mts → ToolResult-Cj8ChodL.d.mts} +49 -54
- package/dist/ToolResult-Cj8ChodL.d.mts.map +1 -0
- package/dist/{Toolkit-BYPwwu-j.d.mts → Toolkit-BEZrNPTI.d.mts} +13 -16
- package/dist/Toolkit-BEZrNPTI.d.mts.map +1 -0
- package/dist/browser/Browser.d.mts +11 -7
- package/dist/browser/Browser.d.mts.map +1 -1
- package/dist/browser/Browser.mjs +1 -1
- package/dist/browser/Browser.mjs.map +1 -1
- package/dist/browser/BrowserError.d.mts +9 -13
- package/dist/browser/BrowserError.d.mts.map +1 -1
- package/dist/browser/BrowserError.mjs +1 -1
- package/dist/browser/BrowserError.mjs.map +1 -1
- package/dist/browser/BrowserTool.d.mts +33 -36
- package/dist/browser/BrowserTool.d.mts.map +1 -1
- package/dist/browser/BrowserTool.mjs +1 -1
- package/dist/browser/BrowserTool.mjs.map +1 -1
- package/dist/capabilities/Capabilities.d.mts +8 -6
- package/dist/capabilities/Capabilities.d.mts.map +1 -1
- package/dist/capabilities/Capabilities.mjs +1 -1
- package/dist/capabilities/Capabilities.mjs.map +1 -1
- package/dist/dist-BaenoU1A.mjs +145 -0
- package/dist/dist-BaenoU1A.mjs.map +1 -0
- package/dist/{dist-C0m0QnUP.mjs → dist-nohcnkD6.mjs} +16 -15
- package/dist/dist-nohcnkD6.mjs.map +1 -0
- package/dist/domain/AiError.d.mts +1 -1
- package/dist/domain/AiError.mjs +1 -1
- package/dist/domain/AiError.mjs.map +1 -1
- package/dist/domain/Audio.d.mts +1 -1
- package/dist/domain/Audio.mjs +1 -1
- package/dist/domain/Citation.d.mts +0 -2
- package/dist/domain/Citation.d.mts.map +1 -1
- package/dist/domain/Citation.mjs +1 -1
- package/dist/domain/Image.d.mts +1 -1
- package/dist/domain/Image.mjs +1 -1
- package/dist/domain/Image.mjs.map +1 -1
- package/dist/domain/Items.d.mts +1 -1
- package/dist/domain/Items.mjs +16 -2
- package/dist/domain/Items.mjs.map +1 -1
- package/dist/domain/Media.d.mts +1 -1
- package/dist/domain/Media.mjs +1 -1
- package/dist/domain/Music.d.mts +18 -11
- package/dist/domain/Music.d.mts.map +1 -1
- package/dist/domain/Music.mjs +1 -1
- package/dist/domain/Music.mjs.map +1 -1
- package/dist/domain/Research.d.mts +3 -4
- package/dist/domain/Research.d.mts.map +1 -1
- package/dist/domain/Research.mjs +1 -1
- package/dist/domain/Transcript.d.mts +2 -3
- package/dist/domain/Transcript.d.mts.map +1 -1
- package/dist/domain/Transcript.mjs +1 -1
- package/dist/domain/Turn.d.mts +144 -164
- package/dist/domain/Turn.d.mts.map +1 -1
- package/dist/domain/Turn.mjs +1 -1
- package/dist/domain/Turn.mjs.map +1 -1
- package/dist/domain/Turn.test.d.mts +1 -1
- package/dist/domain/Turn.test.mjs +28 -18
- package/dist/domain/Turn.test.mjs.map +1 -1
- package/dist/embedding-model/Embedding.d.mts +1 -3
- package/dist/embedding-model/Embedding.d.mts.map +1 -1
- package/dist/embedding-model/Embedding.mjs +1 -1
- package/dist/embedding-model/EmbeddingModel.d.mts +1 -3
- package/dist/embedding-model/EmbeddingModel.d.mts.map +1 -1
- package/dist/embedding-model/EmbeddingModel.mjs +1 -1
- package/dist/embedding-model/EmbeddingModel.mjs.map +1 -1
- package/dist/embedding-model/EmbeddingModel.test.d.mts +1 -1
- package/dist/embedding-model/EmbeddingModel.test.mjs +14 -9
- package/dist/embedding-model/EmbeddingModel.test.mjs.map +1 -1
- package/dist/index.d.mts +12 -12
- package/dist/job/Job.d.mts +4 -4
- package/dist/job/Job.d.mts.map +1 -1
- package/dist/job/Job.mjs +1 -1
- package/dist/job/Job.mjs.map +1 -1
- package/dist/language-model/LanguageModel.d.mts +4 -6
- package/dist/language-model/LanguageModel.d.mts.map +1 -1
- package/dist/language-model/LanguageModel.mjs +1 -1
- package/dist/language-model/LanguageModel.mjs.map +1 -1
- package/dist/language-model/LanguageModel.test.d.mts +1 -1
- package/dist/language-model/LanguageModel.test.mjs +6 -3
- package/dist/language-model/LanguageModel.test.mjs.map +1 -1
- package/dist/loop/Loop.d.mts +1 -1
- package/dist/loop/Loop.mjs +1 -1
- package/dist/loop/Loop.mjs.map +1 -1
- package/dist/loop/Loop.test.d.mts +1 -1
- package/dist/loop/Loop.test.mjs +60 -34
- package/dist/loop/Loop.test.mjs.map +1 -1
- package/dist/{magic-string.es-Dk-MMA0F.mjs → magic-string.es-CB2hOw9v.mjs} +14 -13
- package/dist/{magic-string.es-Dk-MMA0F.mjs.map → magic-string.es-CB2hOw9v.mjs.map} +1 -1
- package/dist/math/Vector.d.mts +0 -2
- package/dist/math/Vector.d.mts.map +1 -1
- package/dist/math/Vector.mjs +1 -1
- package/dist/math/Vector.mjs.map +1 -1
- package/dist/music-generator/MusicGenerator.d.mts +2 -4
- package/dist/music-generator/MusicGenerator.d.mts.map +1 -1
- package/dist/music-generator/MusicGenerator.mjs +1 -1
- package/dist/music-generator/MusicGenerator.mjs.map +1 -1
- package/dist/music-generator/MusicGenerator.test.d.mts +1 -1
- package/dist/music-generator/MusicGenerator.test.mjs +19 -10
- package/dist/music-generator/MusicGenerator.test.mjs.map +1 -1
- package/dist/observability/Metrics.d.mts +21 -10
- package/dist/observability/Metrics.d.mts.map +1 -1
- package/dist/observability/Metrics.mjs +31 -8
- package/dist/observability/Metrics.mjs.map +1 -1
- package/dist/observability/Metrics.test.d.mts +1 -1
- package/dist/observability/Metrics.test.mjs +87 -23
- package/dist/observability/Metrics.test.mjs.map +1 -1
- package/dist/observability/Telemetry.d.mts +2 -3
- package/dist/observability/Telemetry.d.mts.map +1 -1
- package/dist/observability/Telemetry.mjs +1 -1
- package/dist/observability/Telemetry.mjs.map +1 -1
- package/dist/observability/Telemetry.test.d.mts +1 -1
- package/dist/observability/Telemetry.test.mjs +15 -7
- package/dist/observability/Telemetry.test.mjs.map +1 -1
- package/dist/research/DeepResearch.d.mts +1 -3
- package/dist/research/DeepResearch.d.mts.map +1 -1
- package/dist/research/DeepResearch.mjs +1 -1
- package/dist/research/DeepResearch.mjs.map +1 -1
- package/dist/retry/Retry.d.mts +4 -8
- package/dist/retry/Retry.d.mts.map +1 -1
- package/dist/retry/Retry.mjs +31 -2
- package/dist/retry/Retry.mjs.map +1 -1
- package/dist/retry/Retry.test.d.mts +1 -1
- package/dist/retry/Retry.test.mjs +6 -3
- package/dist/retry/Retry.test.mjs.map +1 -1
- package/dist/sandbox/Memory.d.mts +0 -2
- package/dist/sandbox/Memory.d.mts.map +1 -1
- package/dist/sandbox/Memory.mjs +4 -4
- package/dist/sandbox/Memory.mjs.map +1 -1
- package/dist/sandbox/Sandbox.d.mts +144 -156
- package/dist/sandbox/Sandbox.d.mts.map +1 -1
- package/dist/sandbox/Sandbox.mjs +1 -1
- package/dist/sandbox/Sandbox.mjs.map +1 -1
- package/dist/sandbox/SandboxError.d.mts +1 -1
- package/dist/sandbox/SandboxError.mjs +1 -1
- package/dist/sandbox/SandboxError.mjs.map +1 -1
- package/dist/sandbox/SandboxImage.d.mts +0 -2
- package/dist/sandbox/SandboxImage.d.mts.map +1 -1
- package/dist/sandbox/SandboxImage.mjs +1 -1
- package/dist/sandbox/SandboxImage.mjs.map +1 -1
- package/dist/sandbox/SandboxNetwork.d.mts +0 -2
- package/dist/sandbox/SandboxNetwork.d.mts.map +1 -1
- package/dist/sandbox/SandboxNetwork.mjs +1 -1
- package/dist/sandbox/SandboxNetwork.mjs.map +1 -1
- package/dist/speech-synthesizer/SpeechSynthesizer.d.mts +8 -7
- package/dist/speech-synthesizer/SpeechSynthesizer.d.mts.map +1 -1
- package/dist/speech-synthesizer/SpeechSynthesizer.mjs +1 -1
- package/dist/speech-synthesizer/SpeechSynthesizer.mjs.map +1 -1
- package/dist/speech-synthesizer/SpeechSynthesizer.test.d.mts +1 -1
- package/dist/speech-synthesizer/SpeechSynthesizer.test.mjs +31 -16
- package/dist/speech-synthesizer/SpeechSynthesizer.test.mjs.map +1 -1
- package/dist/streaming/JSONL.d.mts +1 -5
- package/dist/streaming/JSONL.d.mts.map +1 -1
- package/dist/streaming/JSONL.mjs +1 -1
- package/dist/streaming/JSONL.mjs.map +1 -1
- package/dist/streaming/JSONL.test.d.mts +1 -1
- package/dist/streaming/JSONL.test.mjs +16 -8
- package/dist/streaming/JSONL.test.mjs.map +1 -1
- package/dist/streaming/Lines.d.mts +0 -2
- package/dist/streaming/Lines.d.mts.map +1 -1
- package/dist/streaming/Lines.mjs +1 -1
- package/dist/streaming/Lines.mjs.map +1 -1
- package/dist/streaming/SSE.d.mts +0 -2
- package/dist/streaming/SSE.d.mts.map +1 -1
- package/dist/streaming/SSE.mjs +1 -1
- package/dist/streaming/SSE.mjs.map +1 -1
- package/dist/streaming/SSE.test.d.mts +1 -1
- package/dist/streaming/SSE.test.mjs +34 -17
- package/dist/streaming/SSE.test.mjs.map +1 -1
- package/dist/structured-format/StructuredFormat.d.mts +1 -1
- package/dist/structured-format/StructuredFormat.mjs +1 -1
- package/dist/structured-format/StructuredFormat.mjs.map +1 -1
- package/dist/structured-format/StructuredFormat.test.d.mts +1 -1
- package/dist/structured-format/StructuredFormat.test.mjs +7 -4
- package/dist/structured-format/StructuredFormat.test.mjs.map +1 -1
- package/dist/{dist-CcRV3-A5.mjs → test.DNmyFkvJ-YPzDR0Co.mjs} +1644 -5172
- package/dist/test.DNmyFkvJ-YPzDR0Co.mjs.map +1 -0
- package/dist/testing/MockMusicGenerator.d.mts +4 -3
- package/dist/testing/MockMusicGenerator.d.mts.map +1 -1
- package/dist/testing/MockMusicGenerator.mjs.map +1 -1
- package/dist/testing/MockProvider.d.mts +1 -2
- package/dist/testing/MockProvider.d.mts.map +1 -1
- package/dist/testing/MockProvider.mjs.map +1 -1
- package/dist/testing/MockSandbox.d.mts +256 -290
- package/dist/testing/MockSandbox.d.mts.map +1 -1
- package/dist/testing/MockSandbox.mjs.map +1 -1
- package/dist/testing/MockSpeechSynthesizer.d.mts +10 -6
- package/dist/testing/MockSpeechSynthesizer.d.mts.map +1 -1
- package/dist/testing/MockSpeechSynthesizer.mjs.map +1 -1
- package/dist/testing/MockTranscriber.d.mts +3 -2
- package/dist/testing/MockTranscriber.d.mts.map +1 -1
- package/dist/testing/MockTranscriber.mjs.map +1 -1
- package/dist/tool/Approval.d.mts +31 -36
- package/dist/tool/Approval.d.mts.map +1 -1
- package/dist/tool/Approval.mjs +1 -1
- package/dist/tool/Approval.mjs.map +1 -1
- package/dist/tool/Approval.test.d.mts +1 -1
- package/dist/tool/Approval.test.mjs +37 -24
- package/dist/tool/Approval.test.mjs.map +1 -1
- package/dist/tool/HistoryCheck.d.mts +2 -4
- package/dist/tool/HistoryCheck.d.mts.map +1 -1
- package/dist/tool/HistoryCheck.mjs +1 -1
- package/dist/tool/HistoryCheck.mjs.map +1 -1
- package/dist/tool/Tool.d.mts +1 -1
- package/dist/tool/Tool.mjs +4 -4
- package/dist/tool/Tool.mjs.map +1 -1
- package/dist/tool/Tool.test.d.mts +1 -1
- package/dist/tool/Tool.test.mjs +23 -11
- package/dist/tool/Tool.test.mjs.map +1 -1
- package/dist/tool/ToolEvent.d.mts +1 -1
- package/dist/tool/ToolEvent.mjs +1 -1
- package/dist/tool/ToolEvent.mjs.map +1 -1
- package/dist/tool/ToolResult.d.mts +1 -1
- package/dist/tool/ToolResult.mjs +1 -1
- package/dist/tool/ToolResult.mjs.map +1 -1
- package/dist/tool/Toolkit.d.mts +1 -1
- package/dist/tool/Toolkit.mjs +4 -3
- package/dist/tool/Toolkit.mjs.map +1 -1
- package/dist/tool/Toolkit.test.d.mts +1 -1
- package/dist/tool/Toolkit.test.mjs +40 -21
- package/dist/tool/Toolkit.test.mjs.map +1 -1
- package/dist/transcriber/Transcriber.d.mts +6 -6
- package/dist/transcriber/Transcriber.d.mts.map +1 -1
- package/dist/transcriber/Transcriber.mjs +1 -1
- package/dist/transcriber/Transcriber.mjs.map +1 -1
- package/dist/transcriber/Transcriber.test.d.mts +1 -1
- package/dist/transcriber/Transcriber.test.mjs +20 -10
- package/dist/transcriber/Transcriber.test.mjs.map +1 -1
- package/dist/utils-CiH_DjFW.mjs +3918 -0
- package/dist/utils-CiH_DjFW.mjs.map +1 -0
- package/dist/web-read/WebRead.d.mts +15 -9
- package/dist/web-read/WebRead.d.mts.map +1 -1
- package/dist/web-read/WebRead.mjs +1 -1
- package/dist/web-read/WebRead.mjs.map +1 -1
- package/dist/web-read/WebReadTool.d.mts +4 -5
- package/dist/web-read/WebReadTool.d.mts.map +1 -1
- package/dist/web-read/WebReadTool.mjs +1 -1
- package/dist/web-read/WebReadTool.mjs.map +1 -1
- package/dist/web-search/WebSearch.d.mts +22 -13
- package/dist/web-search/WebSearch.d.mts.map +1 -1
- package/dist/web-search/WebSearch.mjs +1 -1
- package/dist/web-search/WebSearch.mjs.map +1 -1
- package/dist/web-search/WebSearchTool.d.mts +6 -6
- package/dist/web-search/WebSearchTool.d.mts.map +1 -1
- package/dist/web-search/WebSearchTool.mjs +1 -1
- package/dist/web-search/WebSearchTool.mjs.map +1 -1
- package/package.json +4 -4
- package/src/domain/Items.ts +18 -0
- package/src/loop/Loop.test.ts +13 -14
- package/src/loop/Loop.ts +74 -76
- package/src/observability/Metrics.test.ts +65 -0
- package/src/observability/Metrics.ts +53 -11
- package/src/retry/Retry.ts +44 -3
- package/src/testing/MockProvider.ts +8 -9
- package/src/tool/Tool.ts +13 -13
- package/dist/AiError-Bf1pq4BB.d.mts.map +0 -1
- package/dist/Audio-CR7CSljJ.d.mts.map +0 -1
- package/dist/Image-C4vuBmu0.d.mts.map +0 -1
- package/dist/Items-BWNu6VGp.d.mts.map +0 -1
- package/dist/Loop-D8nWpowc.d.mts.map +0 -1
- package/dist/Media-D_CpcM1Z.d.mts.map +0 -1
- package/dist/SandboxError-CIrVDOMV.d.mts.map +0 -1
- package/dist/StructuredFormat-DHaUJBdd.d.mts.map +0 -1
- package/dist/Tool-CXFHCQrT.d.mts.map +0 -1
- package/dist/ToolEvent-nVijCrvm.d.mts.map +0 -1
- package/dist/ToolResult-CQqKkcDa.d.mts.map +0 -1
- package/dist/Toolkit-BYPwwu-j.d.mts.map +0 -1
- package/dist/dist-C0m0QnUP.mjs.map +0 -1
- package/dist/dist-CcRV3-A5.mjs.map +0 -1
- /package/dist/{chunk-uyGKjUfl.mjs → rolldown-runtime-EAsCxrDo.mjs} +0 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { CommonCreateRequest, CommonExecRequest, CommonSpawnRequest, ExecEvent, ExecResult, ProcessHandle, Sandbox, SandboxCustomImage, SandboxHostnameAllowlist, SandboxId, SandboxKernelSession, SandboxPauseResume, SandboxPortExposure, SandboxPty, SandboxRef, SandboxSecretInjection, SandboxService, SandboxSnapshots, SandboxVolumes, SnapshotId, VolumeId } from "../sandbox/Sandbox.mjs";
|
|
2
2
|
import { Data, Effect, Layer } from "effect";
|
|
3
|
-
import * as _$effect_Unify0 from "effect/Unify";
|
|
4
|
-
|
|
5
3
|
//#region src/testing/MockSandbox.d.ts
|
|
6
4
|
/**
|
|
7
5
|
* One entry per side-effecting method call. Tests filter via
|
|
@@ -74,95 +72,14 @@ type Call = Data.TaggedEnum<{
|
|
|
74
72
|
};
|
|
75
73
|
}>;
|
|
76
74
|
declare const Call: {
|
|
77
|
-
readonly Create:
|
|
78
|
-
readonly _tag: "Create";
|
|
79
|
-
readonly request: CommonCreateRequest;
|
|
80
|
-
}, "_tag">;
|
|
81
|
-
readonly Attach: Data.TaggedEnum.ConstructorFrom<{
|
|
75
|
+
readonly $is: <Tag extends "Attach" | "Create" | "Destroy" | "Exec" | "ExecStream" | "ExposePort" | "FileExists" | "FileList" | "FileMkdir" | "FileRead" | "FileRemove" | "FileWrite" | "SnapshotCreate" | "SnapshotDestroy" | "Spawn" | "VolumeCreate" | "VolumeDestroy">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
82
76
|
readonly _tag: "Attach";
|
|
83
77
|
readonly id: SandboxId;
|
|
84
|
-
}, "_tag">;
|
|
85
|
-
readonly Destroy: Data.TaggedEnum.ConstructorFrom<{
|
|
86
|
-
readonly _tag: "Destroy";
|
|
87
|
-
readonly id: SandboxId;
|
|
88
|
-
}, "_tag">;
|
|
89
|
-
readonly Exec: Data.TaggedEnum.ConstructorFrom<{
|
|
90
|
-
readonly _tag: "Exec";
|
|
91
|
-
readonly id: SandboxId;
|
|
92
|
-
readonly request: CommonExecRequest;
|
|
93
|
-
}, "_tag">;
|
|
94
|
-
readonly ExecStream: Data.TaggedEnum.ConstructorFrom<{
|
|
95
|
-
readonly _tag: "ExecStream";
|
|
96
|
-
readonly id: SandboxId;
|
|
97
|
-
readonly request: CommonExecRequest;
|
|
98
|
-
}, "_tag">;
|
|
99
|
-
readonly Spawn: Data.TaggedEnum.ConstructorFrom<{
|
|
100
|
-
readonly _tag: "Spawn";
|
|
101
|
-
readonly id: SandboxId;
|
|
102
|
-
readonly request: CommonSpawnRequest;
|
|
103
|
-
}, "_tag">;
|
|
104
|
-
readonly FileRead: Data.TaggedEnum.ConstructorFrom<{
|
|
105
|
-
readonly _tag: "FileRead";
|
|
106
|
-
readonly id: SandboxId;
|
|
107
|
-
readonly path: string;
|
|
108
|
-
}, "_tag">;
|
|
109
|
-
readonly FileWrite: Data.TaggedEnum.ConstructorFrom<{
|
|
110
|
-
readonly _tag: "FileWrite";
|
|
111
|
-
readonly id: SandboxId;
|
|
112
|
-
readonly path: string;
|
|
113
|
-
readonly contents: Uint8Array | string;
|
|
114
|
-
}, "_tag">;
|
|
115
|
-
readonly FileRemove: Data.TaggedEnum.ConstructorFrom<{
|
|
116
|
-
readonly _tag: "FileRemove";
|
|
117
|
-
readonly id: SandboxId;
|
|
118
|
-
readonly path: string;
|
|
119
|
-
}, "_tag">;
|
|
120
|
-
readonly FileMkdir: Data.TaggedEnum.ConstructorFrom<{
|
|
121
|
-
readonly _tag: "FileMkdir";
|
|
122
|
-
readonly id: SandboxId;
|
|
123
|
-
readonly path: string;
|
|
124
|
-
}, "_tag">;
|
|
125
|
-
readonly FileList: Data.TaggedEnum.ConstructorFrom<{
|
|
126
|
-
readonly _tag: "FileList";
|
|
127
|
-
readonly id: SandboxId;
|
|
128
|
-
readonly path: string;
|
|
129
|
-
}, "_tag">;
|
|
130
|
-
readonly FileExists: Data.TaggedEnum.ConstructorFrom<{
|
|
131
|
-
readonly _tag: "FileExists";
|
|
132
|
-
readonly id: SandboxId;
|
|
133
|
-
readonly path: string;
|
|
134
|
-
}, "_tag">;
|
|
135
|
-
readonly ExposePort: Data.TaggedEnum.ConstructorFrom<{
|
|
136
|
-
readonly _tag: "ExposePort";
|
|
137
|
-
readonly id: SandboxId;
|
|
138
|
-
readonly port: number;
|
|
139
|
-
}, "_tag">;
|
|
140
|
-
readonly SnapshotCreate: Data.TaggedEnum.ConstructorFrom<{
|
|
141
|
-
readonly _tag: "SnapshotCreate";
|
|
142
|
-
readonly id: SandboxId;
|
|
143
|
-
readonly name?: string;
|
|
144
|
-
}, "_tag">;
|
|
145
|
-
readonly SnapshotDestroy: Data.TaggedEnum.ConstructorFrom<{
|
|
146
|
-
readonly _tag: "SnapshotDestroy";
|
|
147
|
-
readonly id: SnapshotId;
|
|
148
|
-
}, "_tag">;
|
|
149
|
-
readonly VolumeCreate: Data.TaggedEnum.ConstructorFrom<{
|
|
150
|
-
readonly _tag: "VolumeCreate";
|
|
151
|
-
readonly name: string;
|
|
152
|
-
readonly quotaBytes?: number;
|
|
153
|
-
}, "_tag">;
|
|
154
|
-
readonly VolumeDestroy: Data.TaggedEnum.ConstructorFrom<{
|
|
155
|
-
readonly _tag: "VolumeDestroy";
|
|
156
|
-
readonly id: VolumeId;
|
|
157
|
-
}, "_tag">;
|
|
158
|
-
readonly $is: <Tag extends "Create" | "Attach" | "Destroy" | "Exec" | "ExecStream" | "Spawn" | "FileRead" | "FileWrite" | "FileRemove" | "FileMkdir" | "FileList" | "FileExists" | "ExposePort" | "SnapshotCreate" | "SnapshotDestroy" | "VolumeCreate" | "VolumeDestroy">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
159
|
-
readonly _tag: "Create";
|
|
160
|
-
readonly request: CommonCreateRequest;
|
|
161
78
|
}, {
|
|
162
79
|
readonly _tag: Tag;
|
|
163
80
|
}> | Extract<{
|
|
164
|
-
readonly _tag: "
|
|
165
|
-
readonly
|
|
81
|
+
readonly _tag: "Create";
|
|
82
|
+
readonly request: CommonCreateRequest;
|
|
166
83
|
}, {
|
|
167
84
|
readonly _tag: Tag;
|
|
168
85
|
}> | Extract<{
|
|
@@ -183,26 +100,19 @@ declare const Call: {
|
|
|
183
100
|
}, {
|
|
184
101
|
readonly _tag: Tag;
|
|
185
102
|
}> | Extract<{
|
|
186
|
-
readonly _tag: "
|
|
187
|
-
readonly id: SandboxId;
|
|
188
|
-
readonly request: CommonSpawnRequest;
|
|
189
|
-
}, {
|
|
190
|
-
readonly _tag: Tag;
|
|
191
|
-
}> | Extract<{
|
|
192
|
-
readonly _tag: "FileRead";
|
|
103
|
+
readonly _tag: "ExposePort";
|
|
193
104
|
readonly id: SandboxId;
|
|
194
|
-
readonly
|
|
105
|
+
readonly port: number;
|
|
195
106
|
}, {
|
|
196
107
|
readonly _tag: Tag;
|
|
197
108
|
}> | Extract<{
|
|
198
|
-
readonly _tag: "
|
|
109
|
+
readonly _tag: "FileExists";
|
|
199
110
|
readonly id: SandboxId;
|
|
200
111
|
readonly path: string;
|
|
201
|
-
readonly contents: Uint8Array | string;
|
|
202
112
|
}, {
|
|
203
113
|
readonly _tag: Tag;
|
|
204
114
|
}> | Extract<{
|
|
205
|
-
readonly _tag: "
|
|
115
|
+
readonly _tag: "FileList";
|
|
206
116
|
readonly id: SandboxId;
|
|
207
117
|
readonly path: string;
|
|
208
118
|
}, {
|
|
@@ -214,21 +124,22 @@ declare const Call: {
|
|
|
214
124
|
}, {
|
|
215
125
|
readonly _tag: Tag;
|
|
216
126
|
}> | Extract<{
|
|
217
|
-
readonly _tag: "
|
|
127
|
+
readonly _tag: "FileRead";
|
|
218
128
|
readonly id: SandboxId;
|
|
219
129
|
readonly path: string;
|
|
220
130
|
}, {
|
|
221
131
|
readonly _tag: Tag;
|
|
222
132
|
}> | Extract<{
|
|
223
|
-
readonly _tag: "
|
|
133
|
+
readonly _tag: "FileRemove";
|
|
224
134
|
readonly id: SandboxId;
|
|
225
135
|
readonly path: string;
|
|
226
136
|
}, {
|
|
227
137
|
readonly _tag: Tag;
|
|
228
138
|
}> | Extract<{
|
|
229
|
-
readonly _tag: "
|
|
139
|
+
readonly _tag: "FileWrite";
|
|
230
140
|
readonly id: SandboxId;
|
|
231
|
-
readonly
|
|
141
|
+
readonly path: string;
|
|
142
|
+
readonly contents: Uint8Array | string;
|
|
232
143
|
}, {
|
|
233
144
|
readonly _tag: Tag;
|
|
234
145
|
}> | Extract<{
|
|
@@ -242,6 +153,12 @@ declare const Call: {
|
|
|
242
153
|
readonly id: SnapshotId;
|
|
243
154
|
}, {
|
|
244
155
|
readonly _tag: Tag;
|
|
156
|
+
}> | Extract<{
|
|
157
|
+
readonly _tag: "Spawn";
|
|
158
|
+
readonly id: SandboxId;
|
|
159
|
+
readonly request: CommonSpawnRequest;
|
|
160
|
+
}, {
|
|
161
|
+
readonly _tag: Tag;
|
|
245
162
|
}> | Extract<{
|
|
246
163
|
readonly _tag: "VolumeCreate";
|
|
247
164
|
readonly name: string;
|
|
@@ -255,94 +172,12 @@ declare const Call: {
|
|
|
255
172
|
readonly _tag: Tag;
|
|
256
173
|
}>;
|
|
257
174
|
readonly $match: {
|
|
258
|
-
<Cases extends {
|
|
259
|
-
readonly Create: (args: {
|
|
260
|
-
readonly _tag: "Create";
|
|
261
|
-
readonly request: CommonCreateRequest;
|
|
262
|
-
}) => any;
|
|
263
|
-
readonly Attach: (args: {
|
|
264
|
-
readonly _tag: "Attach";
|
|
265
|
-
readonly id: SandboxId;
|
|
266
|
-
}) => any;
|
|
267
|
-
readonly Destroy: (args: {
|
|
268
|
-
readonly _tag: "Destroy";
|
|
269
|
-
readonly id: SandboxId;
|
|
270
|
-
}) => any;
|
|
271
|
-
readonly Exec: (args: {
|
|
272
|
-
readonly _tag: "Exec";
|
|
273
|
-
readonly id: SandboxId;
|
|
274
|
-
readonly request: CommonExecRequest;
|
|
275
|
-
}) => any;
|
|
276
|
-
readonly ExecStream: (args: {
|
|
277
|
-
readonly _tag: "ExecStream";
|
|
278
|
-
readonly id: SandboxId;
|
|
279
|
-
readonly request: CommonExecRequest;
|
|
280
|
-
}) => any;
|
|
281
|
-
readonly Spawn: (args: {
|
|
282
|
-
readonly _tag: "Spawn";
|
|
283
|
-
readonly id: SandboxId;
|
|
284
|
-
readonly request: CommonSpawnRequest;
|
|
285
|
-
}) => any;
|
|
286
|
-
readonly FileRead: (args: {
|
|
287
|
-
readonly _tag: "FileRead";
|
|
288
|
-
readonly id: SandboxId;
|
|
289
|
-
readonly path: string;
|
|
290
|
-
}) => any;
|
|
291
|
-
readonly FileWrite: (args: {
|
|
292
|
-
readonly _tag: "FileWrite";
|
|
293
|
-
readonly id: SandboxId;
|
|
294
|
-
readonly path: string;
|
|
295
|
-
readonly contents: Uint8Array | string;
|
|
296
|
-
}) => any;
|
|
297
|
-
readonly FileRemove: (args: {
|
|
298
|
-
readonly _tag: "FileRemove";
|
|
299
|
-
readonly id: SandboxId;
|
|
300
|
-
readonly path: string;
|
|
301
|
-
}) => any;
|
|
302
|
-
readonly FileMkdir: (args: {
|
|
303
|
-
readonly _tag: "FileMkdir";
|
|
304
|
-
readonly id: SandboxId;
|
|
305
|
-
readonly path: string;
|
|
306
|
-
}) => any;
|
|
307
|
-
readonly FileList: (args: {
|
|
308
|
-
readonly _tag: "FileList";
|
|
309
|
-
readonly id: SandboxId;
|
|
310
|
-
readonly path: string;
|
|
311
|
-
}) => any;
|
|
312
|
-
readonly FileExists: (args: {
|
|
313
|
-
readonly _tag: "FileExists";
|
|
314
|
-
readonly id: SandboxId;
|
|
315
|
-
readonly path: string;
|
|
316
|
-
}) => any;
|
|
317
|
-
readonly ExposePort: (args: {
|
|
318
|
-
readonly _tag: "ExposePort";
|
|
319
|
-
readonly id: SandboxId;
|
|
320
|
-
readonly port: number;
|
|
321
|
-
}) => any;
|
|
322
|
-
readonly SnapshotCreate: (args: {
|
|
323
|
-
readonly _tag: "SnapshotCreate";
|
|
324
|
-
readonly id: SandboxId;
|
|
325
|
-
readonly name?: string;
|
|
326
|
-
}) => any;
|
|
327
|
-
readonly SnapshotDestroy: (args: {
|
|
328
|
-
readonly _tag: "SnapshotDestroy";
|
|
329
|
-
readonly id: SnapshotId;
|
|
330
|
-
}) => any;
|
|
331
|
-
readonly VolumeCreate: (args: {
|
|
332
|
-
readonly _tag: "VolumeCreate";
|
|
333
|
-
readonly name: string;
|
|
334
|
-
readonly quotaBytes?: number;
|
|
335
|
-
}) => any;
|
|
336
|
-
readonly VolumeDestroy: (args: {
|
|
337
|
-
readonly _tag: "VolumeDestroy";
|
|
338
|
-
readonly id: VolumeId;
|
|
339
|
-
}) => any;
|
|
340
|
-
}>(cases: Cases): (value: {
|
|
341
|
-
readonly _tag: "Create";
|
|
342
|
-
readonly request: CommonCreateRequest;
|
|
343
|
-
} | {
|
|
175
|
+
<Cases extends { readonly [Tag in "Attach" | "Create" | "Destroy" | "Exec" | "ExecStream" | "ExposePort" | "FileExists" | "FileList" | "FileMkdir" | "FileRead" | "FileRemove" | "FileWrite" | "SnapshotCreate" | "SnapshotDestroy" | "Spawn" | "VolumeCreate" | "VolumeDestroy"]: (args: Extract<{
|
|
344
176
|
readonly _tag: "Attach";
|
|
345
177
|
readonly id: SandboxId;
|
|
178
|
+
} | {
|
|
179
|
+
readonly _tag: "Create";
|
|
180
|
+
readonly request: CommonCreateRequest;
|
|
346
181
|
} | {
|
|
347
182
|
readonly _tag: "Destroy";
|
|
348
183
|
readonly id: SandboxId;
|
|
@@ -355,20 +190,81 @@ declare const Call: {
|
|
|
355
190
|
readonly id: SandboxId;
|
|
356
191
|
readonly request: CommonExecRequest;
|
|
357
192
|
} | {
|
|
358
|
-
readonly _tag: "
|
|
193
|
+
readonly _tag: "ExposePort";
|
|
359
194
|
readonly id: SandboxId;
|
|
360
|
-
readonly
|
|
195
|
+
readonly port: number;
|
|
196
|
+
} | {
|
|
197
|
+
readonly _tag: "FileExists";
|
|
198
|
+
readonly id: SandboxId;
|
|
199
|
+
readonly path: string;
|
|
200
|
+
} | {
|
|
201
|
+
readonly _tag: "FileList";
|
|
202
|
+
readonly id: SandboxId;
|
|
203
|
+
readonly path: string;
|
|
204
|
+
} | {
|
|
205
|
+
readonly _tag: "FileMkdir";
|
|
206
|
+
readonly id: SandboxId;
|
|
207
|
+
readonly path: string;
|
|
361
208
|
} | {
|
|
362
209
|
readonly _tag: "FileRead";
|
|
363
210
|
readonly id: SandboxId;
|
|
364
211
|
readonly path: string;
|
|
212
|
+
} | {
|
|
213
|
+
readonly _tag: "FileRemove";
|
|
214
|
+
readonly id: SandboxId;
|
|
215
|
+
readonly path: string;
|
|
365
216
|
} | {
|
|
366
217
|
readonly _tag: "FileWrite";
|
|
367
218
|
readonly id: SandboxId;
|
|
368
219
|
readonly path: string;
|
|
369
220
|
readonly contents: Uint8Array | string;
|
|
370
221
|
} | {
|
|
371
|
-
readonly _tag: "
|
|
222
|
+
readonly _tag: "SnapshotCreate";
|
|
223
|
+
readonly id: SandboxId;
|
|
224
|
+
readonly name?: string;
|
|
225
|
+
} | {
|
|
226
|
+
readonly _tag: "SnapshotDestroy";
|
|
227
|
+
readonly id: SnapshotId;
|
|
228
|
+
} | {
|
|
229
|
+
readonly _tag: "Spawn";
|
|
230
|
+
readonly id: SandboxId;
|
|
231
|
+
readonly request: CommonSpawnRequest;
|
|
232
|
+
} | {
|
|
233
|
+
readonly _tag: "VolumeCreate";
|
|
234
|
+
readonly name: string;
|
|
235
|
+
readonly quotaBytes?: number;
|
|
236
|
+
} | {
|
|
237
|
+
readonly _tag: "VolumeDestroy";
|
|
238
|
+
readonly id: VolumeId;
|
|
239
|
+
}, {
|
|
240
|
+
readonly _tag: Tag;
|
|
241
|
+
}>) => any; }>(cases: Cases): (value: {
|
|
242
|
+
readonly _tag: "Attach";
|
|
243
|
+
readonly id: SandboxId;
|
|
244
|
+
} | {
|
|
245
|
+
readonly _tag: "Create";
|
|
246
|
+
readonly request: CommonCreateRequest;
|
|
247
|
+
} | {
|
|
248
|
+
readonly _tag: "Destroy";
|
|
249
|
+
readonly id: SandboxId;
|
|
250
|
+
} | {
|
|
251
|
+
readonly _tag: "Exec";
|
|
252
|
+
readonly id: SandboxId;
|
|
253
|
+
readonly request: CommonExecRequest;
|
|
254
|
+
} | {
|
|
255
|
+
readonly _tag: "ExecStream";
|
|
256
|
+
readonly id: SandboxId;
|
|
257
|
+
readonly request: CommonExecRequest;
|
|
258
|
+
} | {
|
|
259
|
+
readonly _tag: "ExposePort";
|
|
260
|
+
readonly id: SandboxId;
|
|
261
|
+
readonly port: number;
|
|
262
|
+
} | {
|
|
263
|
+
readonly _tag: "FileExists";
|
|
264
|
+
readonly id: SandboxId;
|
|
265
|
+
readonly path: string;
|
|
266
|
+
} | {
|
|
267
|
+
readonly _tag: "FileList";
|
|
372
268
|
readonly id: SandboxId;
|
|
373
269
|
readonly path: string;
|
|
374
270
|
} | {
|
|
@@ -376,17 +272,18 @@ declare const Call: {
|
|
|
376
272
|
readonly id: SandboxId;
|
|
377
273
|
readonly path: string;
|
|
378
274
|
} | {
|
|
379
|
-
readonly _tag: "
|
|
275
|
+
readonly _tag: "FileRead";
|
|
380
276
|
readonly id: SandboxId;
|
|
381
277
|
readonly path: string;
|
|
382
278
|
} | {
|
|
383
|
-
readonly _tag: "
|
|
279
|
+
readonly _tag: "FileRemove";
|
|
384
280
|
readonly id: SandboxId;
|
|
385
281
|
readonly path: string;
|
|
386
282
|
} | {
|
|
387
|
-
readonly _tag: "
|
|
283
|
+
readonly _tag: "FileWrite";
|
|
388
284
|
readonly id: SandboxId;
|
|
389
|
-
readonly
|
|
285
|
+
readonly path: string;
|
|
286
|
+
readonly contents: Uint8Array | string;
|
|
390
287
|
} | {
|
|
391
288
|
readonly _tag: "SnapshotCreate";
|
|
392
289
|
readonly id: SandboxId;
|
|
@@ -394,6 +291,10 @@ declare const Call: {
|
|
|
394
291
|
} | {
|
|
395
292
|
readonly _tag: "SnapshotDestroy";
|
|
396
293
|
readonly id: SnapshotId;
|
|
294
|
+
} | {
|
|
295
|
+
readonly _tag: "Spawn";
|
|
296
|
+
readonly id: SandboxId;
|
|
297
|
+
readonly request: CommonSpawnRequest;
|
|
397
298
|
} | {
|
|
398
299
|
readonly _tag: "VolumeCreate";
|
|
399
300
|
readonly name: string;
|
|
@@ -401,95 +302,13 @@ declare const Call: {
|
|
|
401
302
|
} | {
|
|
402
303
|
readonly _tag: "VolumeDestroy";
|
|
403
304
|
readonly id: VolumeId;
|
|
404
|
-
}) =>
|
|
405
|
-
<Cases extends {
|
|
406
|
-
readonly Create: (args: {
|
|
407
|
-
readonly _tag: "Create";
|
|
408
|
-
readonly request: CommonCreateRequest;
|
|
409
|
-
}) => any;
|
|
410
|
-
readonly Attach: (args: {
|
|
411
|
-
readonly _tag: "Attach";
|
|
412
|
-
readonly id: SandboxId;
|
|
413
|
-
}) => any;
|
|
414
|
-
readonly Destroy: (args: {
|
|
415
|
-
readonly _tag: "Destroy";
|
|
416
|
-
readonly id: SandboxId;
|
|
417
|
-
}) => any;
|
|
418
|
-
readonly Exec: (args: {
|
|
419
|
-
readonly _tag: "Exec";
|
|
420
|
-
readonly id: SandboxId;
|
|
421
|
-
readonly request: CommonExecRequest;
|
|
422
|
-
}) => any;
|
|
423
|
-
readonly ExecStream: (args: {
|
|
424
|
-
readonly _tag: "ExecStream";
|
|
425
|
-
readonly id: SandboxId;
|
|
426
|
-
readonly request: CommonExecRequest;
|
|
427
|
-
}) => any;
|
|
428
|
-
readonly Spawn: (args: {
|
|
429
|
-
readonly _tag: "Spawn";
|
|
430
|
-
readonly id: SandboxId;
|
|
431
|
-
readonly request: CommonSpawnRequest;
|
|
432
|
-
}) => any;
|
|
433
|
-
readonly FileRead: (args: {
|
|
434
|
-
readonly _tag: "FileRead";
|
|
435
|
-
readonly id: SandboxId;
|
|
436
|
-
readonly path: string;
|
|
437
|
-
}) => any;
|
|
438
|
-
readonly FileWrite: (args: {
|
|
439
|
-
readonly _tag: "FileWrite";
|
|
440
|
-
readonly id: SandboxId;
|
|
441
|
-
readonly path: string;
|
|
442
|
-
readonly contents: Uint8Array | string;
|
|
443
|
-
}) => any;
|
|
444
|
-
readonly FileRemove: (args: {
|
|
445
|
-
readonly _tag: "FileRemove";
|
|
446
|
-
readonly id: SandboxId;
|
|
447
|
-
readonly path: string;
|
|
448
|
-
}) => any;
|
|
449
|
-
readonly FileMkdir: (args: {
|
|
450
|
-
readonly _tag: "FileMkdir";
|
|
451
|
-
readonly id: SandboxId;
|
|
452
|
-
readonly path: string;
|
|
453
|
-
}) => any;
|
|
454
|
-
readonly FileList: (args: {
|
|
455
|
-
readonly _tag: "FileList";
|
|
456
|
-
readonly id: SandboxId;
|
|
457
|
-
readonly path: string;
|
|
458
|
-
}) => any;
|
|
459
|
-
readonly FileExists: (args: {
|
|
460
|
-
readonly _tag: "FileExists";
|
|
461
|
-
readonly id: SandboxId;
|
|
462
|
-
readonly path: string;
|
|
463
|
-
}) => any;
|
|
464
|
-
readonly ExposePort: (args: {
|
|
465
|
-
readonly _tag: "ExposePort";
|
|
466
|
-
readonly id: SandboxId;
|
|
467
|
-
readonly port: number;
|
|
468
|
-
}) => any;
|
|
469
|
-
readonly SnapshotCreate: (args: {
|
|
470
|
-
readonly _tag: "SnapshotCreate";
|
|
471
|
-
readonly id: SandboxId;
|
|
472
|
-
readonly name?: string;
|
|
473
|
-
}) => any;
|
|
474
|
-
readonly SnapshotDestroy: (args: {
|
|
475
|
-
readonly _tag: "SnapshotDestroy";
|
|
476
|
-
readonly id: SnapshotId;
|
|
477
|
-
}) => any;
|
|
478
|
-
readonly VolumeCreate: (args: {
|
|
479
|
-
readonly _tag: "VolumeCreate";
|
|
480
|
-
readonly name: string;
|
|
481
|
-
readonly quotaBytes?: number;
|
|
482
|
-
}) => any;
|
|
483
|
-
readonly VolumeDestroy: (args: {
|
|
484
|
-
readonly _tag: "VolumeDestroy";
|
|
485
|
-
readonly id: VolumeId;
|
|
486
|
-
}) => any;
|
|
487
|
-
}>(value: {
|
|
488
|
-
readonly _tag: "Create";
|
|
489
|
-
readonly request: CommonCreateRequest;
|
|
490
|
-
} | {
|
|
305
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Attach" | "Create" | "Destroy" | "Exec" | "ExecStream" | "ExposePort" | "FileExists" | "FileList" | "FileMkdir" | "FileRead" | "FileRemove" | "FileWrite" | "SnapshotCreate" | "SnapshotDestroy" | "Spawn" | "VolumeCreate" | "VolumeDestroy"]>>;
|
|
306
|
+
<Cases extends { readonly [Tag in "Attach" | "Create" | "Destroy" | "Exec" | "ExecStream" | "ExposePort" | "FileExists" | "FileList" | "FileMkdir" | "FileRead" | "FileRemove" | "FileWrite" | "SnapshotCreate" | "SnapshotDestroy" | "Spawn" | "VolumeCreate" | "VolumeDestroy"]: (args: Extract<{
|
|
491
307
|
readonly _tag: "Attach";
|
|
492
308
|
readonly id: SandboxId;
|
|
309
|
+
} | {
|
|
310
|
+
readonly _tag: "Create";
|
|
311
|
+
readonly request: CommonCreateRequest;
|
|
493
312
|
} | {
|
|
494
313
|
readonly _tag: "Destroy";
|
|
495
314
|
readonly id: SandboxId;
|
|
@@ -502,20 +321,81 @@ declare const Call: {
|
|
|
502
321
|
readonly id: SandboxId;
|
|
503
322
|
readonly request: CommonExecRequest;
|
|
504
323
|
} | {
|
|
505
|
-
readonly _tag: "
|
|
324
|
+
readonly _tag: "ExposePort";
|
|
506
325
|
readonly id: SandboxId;
|
|
507
|
-
readonly
|
|
326
|
+
readonly port: number;
|
|
327
|
+
} | {
|
|
328
|
+
readonly _tag: "FileExists";
|
|
329
|
+
readonly id: SandboxId;
|
|
330
|
+
readonly path: string;
|
|
331
|
+
} | {
|
|
332
|
+
readonly _tag: "FileList";
|
|
333
|
+
readonly id: SandboxId;
|
|
334
|
+
readonly path: string;
|
|
335
|
+
} | {
|
|
336
|
+
readonly _tag: "FileMkdir";
|
|
337
|
+
readonly id: SandboxId;
|
|
338
|
+
readonly path: string;
|
|
508
339
|
} | {
|
|
509
340
|
readonly _tag: "FileRead";
|
|
510
341
|
readonly id: SandboxId;
|
|
511
342
|
readonly path: string;
|
|
343
|
+
} | {
|
|
344
|
+
readonly _tag: "FileRemove";
|
|
345
|
+
readonly id: SandboxId;
|
|
346
|
+
readonly path: string;
|
|
512
347
|
} | {
|
|
513
348
|
readonly _tag: "FileWrite";
|
|
514
349
|
readonly id: SandboxId;
|
|
515
350
|
readonly path: string;
|
|
516
351
|
readonly contents: Uint8Array | string;
|
|
517
352
|
} | {
|
|
518
|
-
readonly _tag: "
|
|
353
|
+
readonly _tag: "SnapshotCreate";
|
|
354
|
+
readonly id: SandboxId;
|
|
355
|
+
readonly name?: string;
|
|
356
|
+
} | {
|
|
357
|
+
readonly _tag: "SnapshotDestroy";
|
|
358
|
+
readonly id: SnapshotId;
|
|
359
|
+
} | {
|
|
360
|
+
readonly _tag: "Spawn";
|
|
361
|
+
readonly id: SandboxId;
|
|
362
|
+
readonly request: CommonSpawnRequest;
|
|
363
|
+
} | {
|
|
364
|
+
readonly _tag: "VolumeCreate";
|
|
365
|
+
readonly name: string;
|
|
366
|
+
readonly quotaBytes?: number;
|
|
367
|
+
} | {
|
|
368
|
+
readonly _tag: "VolumeDestroy";
|
|
369
|
+
readonly id: VolumeId;
|
|
370
|
+
}, {
|
|
371
|
+
readonly _tag: Tag;
|
|
372
|
+
}>) => any; }>(value: {
|
|
373
|
+
readonly _tag: "Attach";
|
|
374
|
+
readonly id: SandboxId;
|
|
375
|
+
} | {
|
|
376
|
+
readonly _tag: "Create";
|
|
377
|
+
readonly request: CommonCreateRequest;
|
|
378
|
+
} | {
|
|
379
|
+
readonly _tag: "Destroy";
|
|
380
|
+
readonly id: SandboxId;
|
|
381
|
+
} | {
|
|
382
|
+
readonly _tag: "Exec";
|
|
383
|
+
readonly id: SandboxId;
|
|
384
|
+
readonly request: CommonExecRequest;
|
|
385
|
+
} | {
|
|
386
|
+
readonly _tag: "ExecStream";
|
|
387
|
+
readonly id: SandboxId;
|
|
388
|
+
readonly request: CommonExecRequest;
|
|
389
|
+
} | {
|
|
390
|
+
readonly _tag: "ExposePort";
|
|
391
|
+
readonly id: SandboxId;
|
|
392
|
+
readonly port: number;
|
|
393
|
+
} | {
|
|
394
|
+
readonly _tag: "FileExists";
|
|
395
|
+
readonly id: SandboxId;
|
|
396
|
+
readonly path: string;
|
|
397
|
+
} | {
|
|
398
|
+
readonly _tag: "FileList";
|
|
519
399
|
readonly id: SandboxId;
|
|
520
400
|
readonly path: string;
|
|
521
401
|
} | {
|
|
@@ -523,17 +403,18 @@ declare const Call: {
|
|
|
523
403
|
readonly id: SandboxId;
|
|
524
404
|
readonly path: string;
|
|
525
405
|
} | {
|
|
526
|
-
readonly _tag: "
|
|
406
|
+
readonly _tag: "FileRead";
|
|
527
407
|
readonly id: SandboxId;
|
|
528
408
|
readonly path: string;
|
|
529
409
|
} | {
|
|
530
|
-
readonly _tag: "
|
|
410
|
+
readonly _tag: "FileRemove";
|
|
531
411
|
readonly id: SandboxId;
|
|
532
412
|
readonly path: string;
|
|
533
413
|
} | {
|
|
534
|
-
readonly _tag: "
|
|
414
|
+
readonly _tag: "FileWrite";
|
|
535
415
|
readonly id: SandboxId;
|
|
536
|
-
readonly
|
|
416
|
+
readonly path: string;
|
|
417
|
+
readonly contents: Uint8Array | string;
|
|
537
418
|
} | {
|
|
538
419
|
readonly _tag: "SnapshotCreate";
|
|
539
420
|
readonly id: SandboxId;
|
|
@@ -541,6 +422,10 @@ declare const Call: {
|
|
|
541
422
|
} | {
|
|
542
423
|
readonly _tag: "SnapshotDestroy";
|
|
543
424
|
readonly id: SnapshotId;
|
|
425
|
+
} | {
|
|
426
|
+
readonly _tag: "Spawn";
|
|
427
|
+
readonly id: SandboxId;
|
|
428
|
+
readonly request: CommonSpawnRequest;
|
|
544
429
|
} | {
|
|
545
430
|
readonly _tag: "VolumeCreate";
|
|
546
431
|
readonly name: string;
|
|
@@ -548,8 +433,89 @@ declare const Call: {
|
|
|
548
433
|
} | {
|
|
549
434
|
readonly _tag: "VolumeDestroy";
|
|
550
435
|
readonly id: VolumeId;
|
|
551
|
-
}, cases: Cases):
|
|
436
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Attach" | "Create" | "Destroy" | "Exec" | "ExecStream" | "ExposePort" | "FileExists" | "FileList" | "FileMkdir" | "FileRead" | "FileRemove" | "FileWrite" | "SnapshotCreate" | "SnapshotDestroy" | "Spawn" | "VolumeCreate" | "VolumeDestroy"]>>;
|
|
552
437
|
};
|
|
438
|
+
readonly Attach: Data.TaggedEnum.ConstructorFrom<{
|
|
439
|
+
readonly _tag: "Attach";
|
|
440
|
+
readonly id: SandboxId;
|
|
441
|
+
}, "_tag">;
|
|
442
|
+
readonly Create: Data.TaggedEnum.ConstructorFrom<{
|
|
443
|
+
readonly _tag: "Create";
|
|
444
|
+
readonly request: CommonCreateRequest;
|
|
445
|
+
}, "_tag">;
|
|
446
|
+
readonly Destroy: Data.TaggedEnum.ConstructorFrom<{
|
|
447
|
+
readonly _tag: "Destroy";
|
|
448
|
+
readonly id: SandboxId;
|
|
449
|
+
}, "_tag">;
|
|
450
|
+
readonly Exec: Data.TaggedEnum.ConstructorFrom<{
|
|
451
|
+
readonly _tag: "Exec";
|
|
452
|
+
readonly id: SandboxId;
|
|
453
|
+
readonly request: CommonExecRequest;
|
|
454
|
+
}, "_tag">;
|
|
455
|
+
readonly ExecStream: Data.TaggedEnum.ConstructorFrom<{
|
|
456
|
+
readonly _tag: "ExecStream";
|
|
457
|
+
readonly id: SandboxId;
|
|
458
|
+
readonly request: CommonExecRequest;
|
|
459
|
+
}, "_tag">;
|
|
460
|
+
readonly ExposePort: Data.TaggedEnum.ConstructorFrom<{
|
|
461
|
+
readonly _tag: "ExposePort";
|
|
462
|
+
readonly id: SandboxId;
|
|
463
|
+
readonly port: number;
|
|
464
|
+
}, "_tag">;
|
|
465
|
+
readonly FileExists: Data.TaggedEnum.ConstructorFrom<{
|
|
466
|
+
readonly _tag: "FileExists";
|
|
467
|
+
readonly id: SandboxId;
|
|
468
|
+
readonly path: string;
|
|
469
|
+
}, "_tag">;
|
|
470
|
+
readonly FileList: Data.TaggedEnum.ConstructorFrom<{
|
|
471
|
+
readonly _tag: "FileList";
|
|
472
|
+
readonly id: SandboxId;
|
|
473
|
+
readonly path: string;
|
|
474
|
+
}, "_tag">;
|
|
475
|
+
readonly FileMkdir: Data.TaggedEnum.ConstructorFrom<{
|
|
476
|
+
readonly _tag: "FileMkdir";
|
|
477
|
+
readonly id: SandboxId;
|
|
478
|
+
readonly path: string;
|
|
479
|
+
}, "_tag">;
|
|
480
|
+
readonly FileRead: Data.TaggedEnum.ConstructorFrom<{
|
|
481
|
+
readonly _tag: "FileRead";
|
|
482
|
+
readonly id: SandboxId;
|
|
483
|
+
readonly path: string;
|
|
484
|
+
}, "_tag">;
|
|
485
|
+
readonly FileRemove: Data.TaggedEnum.ConstructorFrom<{
|
|
486
|
+
readonly _tag: "FileRemove";
|
|
487
|
+
readonly id: SandboxId;
|
|
488
|
+
readonly path: string;
|
|
489
|
+
}, "_tag">;
|
|
490
|
+
readonly FileWrite: Data.TaggedEnum.ConstructorFrom<{
|
|
491
|
+
readonly _tag: "FileWrite";
|
|
492
|
+
readonly id: SandboxId;
|
|
493
|
+
readonly path: string;
|
|
494
|
+
readonly contents: Uint8Array | string;
|
|
495
|
+
}, "_tag">;
|
|
496
|
+
readonly SnapshotCreate: Data.TaggedEnum.ConstructorFrom<{
|
|
497
|
+
readonly _tag: "SnapshotCreate";
|
|
498
|
+
readonly id: SandboxId;
|
|
499
|
+
readonly name?: string;
|
|
500
|
+
}, "_tag">;
|
|
501
|
+
readonly SnapshotDestroy: Data.TaggedEnum.ConstructorFrom<{
|
|
502
|
+
readonly _tag: "SnapshotDestroy";
|
|
503
|
+
readonly id: SnapshotId;
|
|
504
|
+
}, "_tag">;
|
|
505
|
+
readonly Spawn: Data.TaggedEnum.ConstructorFrom<{
|
|
506
|
+
readonly _tag: "Spawn";
|
|
507
|
+
readonly id: SandboxId;
|
|
508
|
+
readonly request: CommonSpawnRequest;
|
|
509
|
+
}, "_tag">;
|
|
510
|
+
readonly VolumeCreate: Data.TaggedEnum.ConstructorFrom<{
|
|
511
|
+
readonly _tag: "VolumeCreate";
|
|
512
|
+
readonly name: string;
|
|
513
|
+
readonly quotaBytes?: number;
|
|
514
|
+
}, "_tag">;
|
|
515
|
+
readonly VolumeDestroy: Data.TaggedEnum.ConstructorFrom<{
|
|
516
|
+
readonly _tag: "VolumeDestroy";
|
|
517
|
+
readonly id: VolumeId;
|
|
518
|
+
}, "_tag">;
|
|
553
519
|
};
|
|
554
520
|
type MockSandboxRecorder = {
|
|
555
521
|
readonly calls: ReadonlyArray<Call>;
|
|
@@ -582,7 +548,7 @@ type MockSandboxScript = {
|
|
|
582
548
|
* exercises any of them.
|
|
583
549
|
*/
|
|
584
550
|
declare const layer: (script?: MockSandboxScript) => {
|
|
585
|
-
layer: Layer.Layer<Sandbox |
|
|
551
|
+
layer: Layer.Layer<Sandbox | SandboxCustomImage | SandboxHostnameAllowlist | SandboxKernelSession | SandboxPauseResume | SandboxPortExposure | SandboxPty | SandboxSecretInjection | SandboxSnapshots | SandboxVolumes, never, never>;
|
|
586
552
|
recorder: Effect.Effect<MockSandboxRecorder, never, never>;
|
|
587
553
|
};
|
|
588
554
|
/**
|