@effect-uai/core 0.17.0 → 0.19.0-dev-20261109183959
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 +5 -5
- package/dist/Content-D_Qfn8Ja.d.mts +48 -0
- package/dist/Content-D_Qfn8Ja.d.mts.map +1 -0
- package/dist/File-B923KvZ9.d.mts +46 -0
- package/dist/File-B923KvZ9.d.mts.map +1 -0
- package/dist/{Image-Cv6iBLTy.d.mts → Image-Bzc1H_UK.d.mts} +19 -8
- package/dist/Image-Bzc1H_UK.d.mts.map +1 -0
- package/dist/{Items-C7MyrYPX.d.mts → Items-Bvx8s9QH.d.mts} +109 -16
- package/dist/Items-Bvx8s9QH.d.mts.map +1 -0
- package/dist/{Loop-ChpaO-ya.d.mts → Loop-CeA0AelN.d.mts} +7 -6
- package/dist/Loop-CeA0AelN.d.mts.map +1 -0
- package/dist/Tool-Bkryw6-h.d.mts +206 -0
- package/dist/Tool-Bkryw6-h.d.mts.map +1 -0
- package/dist/ToolEvent-9inLx5cI.d.mts +22 -0
- package/dist/ToolEvent-9inLx5cI.d.mts.map +1 -0
- package/dist/ToolOutput-BNTIQgGB.d.mts +151 -0
- package/dist/ToolOutput-BNTIQgGB.d.mts.map +1 -0
- package/dist/Toolkit-D2VGeD5R.d.mts +212 -0
- package/dist/Toolkit-D2VGeD5R.d.mts.map +1 -0
- package/dist/browser/BrowserTool.d.mts +84 -22
- package/dist/browser/BrowserTool.d.mts.map +1 -1
- package/dist/browser/BrowserTool.mjs +5 -0
- package/dist/browser/BrowserTool.mjs.map +1 -1
- package/dist/capabilities/Capabilities.d.mts +1 -1
- package/dist/decision-model/Decision.test.mjs +4 -4
- package/dist/dist-B5K-y4Be.mjs +191 -0
- package/dist/dist-B5K-y4Be.mjs.map +1 -0
- package/dist/dist-CorQTQL-.mjs +1533 -0
- package/dist/dist-CorQTQL-.mjs.map +1 -0
- package/dist/dist-DNeuh84d.mjs +7 -0
- package/dist/dist-DNeuh84d.mjs.map +1 -0
- package/dist/dist-DzeSyeYF.mjs +10253 -0
- package/dist/dist-DzeSyeYF.mjs.map +1 -0
- package/dist/domain/File.d.mts +2 -0
- package/dist/domain/File.mjs +51 -0
- package/dist/domain/File.mjs.map +1 -0
- package/dist/domain/Image.d.mts +2 -2
- package/dist/domain/Image.mjs +12 -2
- package/dist/domain/Image.mjs.map +1 -1
- package/dist/domain/Items.d.mts +2 -2
- package/dist/domain/Items.mjs +65 -4
- package/dist/domain/Items.mjs.map +1 -1
- package/dist/domain/Realtime.d.mts +72 -490
- package/dist/domain/Realtime.d.mts.map +1 -1
- package/dist/domain/Research.d.mts +1 -1
- package/dist/domain/Transcript.test.mjs +3 -3
- package/dist/domain/Turn.d.mts +57 -262
- package/dist/domain/Turn.d.mts.map +1 -1
- package/dist/domain/Turn.mjs +1 -1
- package/dist/domain/Turn.test.mjs +2 -2
- package/dist/embedding-model/Embedding.d.mts +1 -1
- package/dist/embedding-model/EmbeddingModel.test.mjs +2 -2
- package/dist/embedding-model/EmbeddingModel.test.mjs.map +1 -1
- package/dist/image-generator/ImageGenerator.d.mts +10 -66
- package/dist/image-generator/ImageGenerator.d.mts.map +1 -1
- package/dist/index.C4tKZ0yW-LuFnBtmu.mjs +7042 -0
- package/dist/index.C4tKZ0yW-LuFnBtmu.mjs.map +1 -0
- package/dist/index.d.mts +10 -9
- package/dist/index.mjs +7 -6
- package/dist/language-model/LanguageModel.d.mts +2 -2
- package/dist/language-model/LanguageModel.test.mjs +2 -2
- package/dist/loop/Loop.d.mts +1 -1
- package/dist/loop/Loop.mjs.map +1 -1
- package/dist/loop/Loop.test.mjs +3 -3
- package/dist/math/Probability.test.mjs +2 -2
- package/dist/messenger/Messenger.d.mts +43 -289
- package/dist/messenger/Messenger.d.mts.map +1 -1
- package/dist/messenger/MessengerAdapter.test.mjs +3 -3
- package/dist/music-generator/MusicGenerator.test.mjs +3 -3
- package/dist/observability/Metrics.d.mts +1 -1
- package/dist/observability/Metrics.test.mjs +3 -3
- package/dist/observability/Telemetry.d.mts +1 -1
- package/dist/observability/Telemetry.mjs +1 -1
- package/dist/observability/Telemetry.mjs.map +1 -1
- package/dist/observability/Telemetry.test.mjs +4 -4
- package/dist/observability/Telemetry.test.mjs.map +1 -1
- package/dist/realtime/RealtimeSession.d.mts +1 -1
- package/dist/realtime/RealtimeSession.test.mjs +4 -4
- package/dist/retry/Retry.test.mjs +2 -2
- package/dist/sandbox/Sandbox.d.mts +32 -237
- package/dist/sandbox/Sandbox.d.mts.map +1 -1
- package/dist/speech-synthesizer/SpeechSynthesizer.test.mjs +3 -3
- package/dist/streaming/JSONL.test.mjs +2 -2
- package/dist/streaming/Multipart.d.mts +1 -1
- package/dist/streaming/Multipart.mjs +3 -2
- package/dist/streaming/Multipart.mjs.map +1 -1
- package/dist/streaming/Multipart.test.mjs +28 -0
- package/dist/streaming/Multipart.test.mjs.map +1 -0
- package/dist/streaming/SSE.d.mts +1 -1
- package/dist/streaming/SSE.mjs +2 -2
- package/dist/streaming/SSE.mjs.map +1 -1
- package/dist/streaming/SSE.test.mjs +2 -2
- package/dist/streaming/Settle.test.mjs +3 -3
- package/dist/streaming/WebSocketSession.d.mts +5 -3
- package/dist/streaming/WebSocketSession.d.mts.map +1 -1
- package/dist/streaming/WebSocketSession.mjs +22 -10
- package/dist/streaming/WebSocketSession.mjs.map +1 -1
- package/dist/streaming/WebSocketSession.test.mjs +41 -5
- package/dist/streaming/WebSocketSession.test.mjs.map +1 -1
- package/dist/structured-format/StructuredFormat.mjs.map +1 -1
- package/dist/structured-format/StructuredFormat.test.mjs +2 -2
- package/dist/testing/FakeWebSocket.d.mts +5 -1
- package/dist/testing/FakeWebSocket.d.mts.map +1 -1
- package/dist/testing/FakeWebSocket.mjs +12 -6
- package/dist/testing/FakeWebSocket.mjs.map +1 -1
- package/dist/testing/MockMessenger.d.mts +19 -134
- package/dist/testing/MockMessenger.d.mts.map +1 -1
- package/dist/testing/MockProvider.d.mts +1 -1
- package/dist/testing/MockSandbox.d.mts +65 -446
- package/dist/testing/MockSandbox.d.mts.map +1 -1
- package/dist/tool/Content.d.mts +2 -0
- package/dist/tool/Content.mjs +46 -0
- package/dist/tool/Content.mjs.map +1 -0
- package/dist/tool/Content.test.d.mts +1 -0
- package/dist/tool/Content.test.mjs +48 -0
- package/dist/tool/Content.test.mjs.map +1 -0
- package/dist/tool/HistoryCheck.d.mts +6 -15
- package/dist/tool/HistoryCheck.d.mts.map +1 -1
- package/dist/tool/HistoryCheck.mjs +10 -24
- package/dist/tool/HistoryCheck.mjs.map +1 -1
- package/dist/tool/Tool.d.mts +2 -2
- package/dist/tool/Tool.mjs +55 -130
- package/dist/tool/Tool.mjs.map +1 -1
- package/dist/tool/Tool.test.mjs +222 -178
- package/dist/tool/Tool.test.mjs.map +1 -1
- package/dist/tool/ToolDecision.d.mts +164 -0
- package/dist/tool/ToolDecision.d.mts.map +1 -0
- package/dist/tool/ToolDecision.mjs +146 -0
- package/dist/tool/ToolDecision.mjs.map +1 -0
- package/dist/tool/ToolDecision.test.d.mts +1 -0
- package/dist/tool/ToolDecision.test.mjs +330 -0
- package/dist/tool/ToolDecision.test.mjs.map +1 -0
- package/dist/tool/ToolEvent.d.mts +2 -2
- package/dist/tool/ToolEvent.mjs +2 -34
- package/dist/tool/ToolEvent.mjs.map +1 -1
- package/dist/tool/ToolOutput.d.mts +2 -0
- package/dist/tool/ToolOutput.mjs +128 -0
- package/dist/tool/ToolOutput.mjs.map +1 -0
- package/dist/tool/ToolOutput.test.d.mts +1 -0
- package/dist/tool/ToolOutput.test.mjs +153 -0
- package/dist/tool/ToolOutput.test.mjs.map +1 -0
- package/dist/tool/Toolkit.d.mts +2 -2
- package/dist/tool/Toolkit.mjs +230 -165
- package/dist/tool/Toolkit.mjs.map +1 -1
- package/dist/tool/Toolkit.test.mjs +433 -391
- package/dist/tool/Toolkit.test.mjs.map +1 -1
- package/dist/transcriber/Transcriber.test.mjs +3 -3
- package/dist/web-read/WebReadTool.d.mts +2 -2
- package/dist/web-read/WebReadTool.mjs +1 -0
- package/dist/web-read/WebReadTool.mjs.map +1 -1
- package/dist/web-search/WebSearchTool.d.mts +2 -2
- package/dist/web-search/WebSearchTool.mjs +1 -0
- package/dist/web-search/WebSearchTool.mjs.map +1 -1
- package/package.json +18 -10
- package/src/browser/BrowserTool.ts +5 -0
- package/src/domain/File.ts +79 -0
- package/src/domain/Image.ts +14 -4
- package/src/domain/Items.ts +39 -3
- package/src/embedding-model/EmbeddingModel.test.ts +2 -2
- package/src/index.ts +3 -2
- package/src/loop/Loop.ts +25 -14
- package/src/observability/Telemetry.test.ts +1 -1
- package/src/observability/Telemetry.ts +2 -2
- package/src/streaming/Multipart.test.ts +26 -0
- package/src/streaming/Multipart.ts +6 -5
- package/src/streaming/SSE.ts +2 -2
- package/src/streaming/WebSocketSession.test.ts +54 -2
- package/src/streaming/WebSocketSession.ts +27 -6
- package/src/structured-format/StructuredFormat.ts +1 -1
- package/src/testing/FakeWebSocket.ts +21 -6
- package/src/tool/Content.test.ts +40 -0
- package/src/tool/Content.ts +38 -0
- package/src/tool/HistoryCheck.ts +21 -26
- package/src/tool/Tool.test.ts +240 -241
- package/src/tool/Tool.ts +204 -309
- package/src/tool/ToolDecision.test.ts +301 -0
- package/src/tool/ToolDecision.ts +360 -0
- package/src/tool/ToolEvent.ts +21 -41
- package/src/tool/ToolOutput.test.ts +132 -0
- package/src/tool/ToolOutput.ts +198 -0
- package/src/tool/Toolkit.test.ts +594 -454
- package/src/tool/Toolkit.ts +631 -356
- package/src/web-read/WebReadTool.ts +2 -1
- package/src/web-search/WebSearchTool.ts +2 -1
- package/dist/Image-Cv6iBLTy.d.mts.map +0 -1
- package/dist/Items-C7MyrYPX.d.mts.map +0 -1
- package/dist/Loop-ChpaO-ya.d.mts.map +0 -1
- package/dist/Tool-BF78QWtn.d.mts +0 -314
- package/dist/Tool-BF78QWtn.d.mts.map +0 -1
- package/dist/ToolEvent-Di4a723B.d.mts +0 -144
- package/dist/ToolEvent-Di4a723B.d.mts.map +0 -1
- package/dist/ToolResult-BsYQRjmW.d.mts +0 -152
- package/dist/ToolResult-BsYQRjmW.d.mts.map +0 -1
- package/dist/Toolkit-tlL0F2YR.d.mts +0 -193
- package/dist/Toolkit-tlL0F2YR.d.mts.map +0 -1
- package/dist/dist-BaenoU1A.mjs +0 -145
- package/dist/dist-BaenoU1A.mjs.map +0 -1
- package/dist/dist-nohcnkD6.mjs +0 -182
- package/dist/dist-nohcnkD6.mjs.map +0 -1
- package/dist/magic-string.es-CB2hOw9v.mjs +0 -1014
- package/dist/magic-string.es-CB2hOw9v.mjs.map +0 -1
- package/dist/test.DNmyFkvJ-YPzDR0Co.mjs +0 -10254
- package/dist/test.DNmyFkvJ-YPzDR0Co.mjs.map +0 -1
- package/dist/tool/Approval.d.mts +0 -113
- package/dist/tool/Approval.d.mts.map +0 -1
- package/dist/tool/Approval.mjs +0 -80
- package/dist/tool/Approval.mjs.map +0 -1
- package/dist/tool/Approval.test.mjs +0 -371
- package/dist/tool/Approval.test.mjs.map +0 -1
- package/dist/tool/ToolResult.d.mts +0 -2
- package/dist/tool/ToolResult.mjs +0 -85
- package/dist/tool/ToolResult.mjs.map +0 -1
- package/dist/utils-CiH_DjFW.mjs +0 -3918
- package/dist/utils-CiH_DjFW.mjs.map +0 -1
- package/src/tool/Approval.test.ts +0 -400
- package/src/tool/Approval.ts +0 -181
- package/src/tool/ToolResult.ts +0 -114
- /package/dist/{tool/Approval.test.d.mts → streaming/Multipart.test.d.mts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as ImageSource } from "../Image-
|
|
2
|
-
import { S as
|
|
3
|
-
import {
|
|
1
|
+
import { o as ImageSource } from "../Image-Bzc1H_UK.mjs";
|
|
2
|
+
import { S as ToolCallOutput, T as Usage, o as HistoryItem, x as ToolCall } from "../Items-Bvx8s9QH.mjs";
|
|
3
|
+
import { f as ToolDescriptor } from "../Tool-Bkryw6-h.mjs";
|
|
4
4
|
import { r as AudioFormat } from "../Audio-_nGR4V0X.mjs";
|
|
5
5
|
import { Data, Duration } from "effect";
|
|
6
6
|
declare namespace Realtime_d_exports {
|
|
@@ -43,179 +43,30 @@ type RealtimeInput = Data.TaggedEnum<{
|
|
|
43
43
|
readonly playedMs: number;
|
|
44
44
|
};
|
|
45
45
|
}>;
|
|
46
|
-
declare const RealtimeInput: {
|
|
47
|
-
readonly
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}> | Extract<{
|
|
71
|
-
readonly _tag: "Text";
|
|
72
|
-
readonly text: string;
|
|
73
|
-
readonly role?: "user" | "system";
|
|
74
|
-
}, {
|
|
75
|
-
readonly _tag: Tag;
|
|
76
|
-
}> | Extract<{
|
|
77
|
-
readonly _tag: "ToolResult";
|
|
78
|
-
readonly output: ToolCallOutput;
|
|
79
|
-
}, {
|
|
80
|
-
readonly _tag: Tag;
|
|
81
|
-
}> | Extract<{
|
|
82
|
-
readonly _tag: "VideoFrame";
|
|
83
|
-
readonly frame: ImageSource;
|
|
84
|
-
}, {
|
|
85
|
-
readonly _tag: Tag;
|
|
86
|
-
}>;
|
|
87
|
-
readonly $match: {
|
|
88
|
-
<Cases extends { readonly [Tag in "ActivityEnd" | "ActivityStart" | "Audio" | "Interrupt" | "PlaybackPosition" | "Text" | "ToolResult" | "VideoFrame"]: (args: Extract<{
|
|
89
|
-
readonly _tag: "ActivityEnd";
|
|
90
|
-
} | {
|
|
91
|
-
readonly _tag: "ActivityStart";
|
|
92
|
-
} | {
|
|
93
|
-
readonly _tag: "Audio";
|
|
94
|
-
readonly bytes: Uint8Array;
|
|
95
|
-
} | {
|
|
96
|
-
readonly _tag: "Interrupt";
|
|
97
|
-
} | {
|
|
98
|
-
readonly _tag: "PlaybackPosition";
|
|
99
|
-
readonly responseId: string;
|
|
100
|
-
readonly playedMs: number;
|
|
101
|
-
} | {
|
|
102
|
-
readonly _tag: "Text";
|
|
103
|
-
readonly text: string;
|
|
104
|
-
readonly role?: "user" | "system";
|
|
105
|
-
} | {
|
|
106
|
-
readonly _tag: "ToolResult";
|
|
107
|
-
readonly output: ToolCallOutput;
|
|
108
|
-
} | {
|
|
109
|
-
readonly _tag: "VideoFrame";
|
|
110
|
-
readonly frame: ImageSource;
|
|
111
|
-
}, {
|
|
112
|
-
readonly _tag: Tag;
|
|
113
|
-
}>) => any; }>(cases: Cases): (value: {
|
|
114
|
-
readonly _tag: "ActivityEnd";
|
|
115
|
-
} | {
|
|
116
|
-
readonly _tag: "ActivityStart";
|
|
117
|
-
} | {
|
|
118
|
-
readonly _tag: "Audio";
|
|
119
|
-
readonly bytes: Uint8Array;
|
|
120
|
-
} | {
|
|
121
|
-
readonly _tag: "Interrupt";
|
|
122
|
-
} | {
|
|
123
|
-
readonly _tag: "PlaybackPosition";
|
|
124
|
-
readonly responseId: string;
|
|
125
|
-
readonly playedMs: number;
|
|
126
|
-
} | {
|
|
127
|
-
readonly _tag: "Text";
|
|
128
|
-
readonly text: string;
|
|
129
|
-
readonly role?: "user" | "system";
|
|
130
|
-
} | {
|
|
131
|
-
readonly _tag: "ToolResult";
|
|
132
|
-
readonly output: ToolCallOutput;
|
|
133
|
-
} | {
|
|
134
|
-
readonly _tag: "VideoFrame";
|
|
135
|
-
readonly frame: ImageSource;
|
|
136
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["ActivityEnd" | "ActivityStart" | "Audio" | "Interrupt" | "PlaybackPosition" | "Text" | "ToolResult" | "VideoFrame"]>>;
|
|
137
|
-
<Cases extends { readonly [Tag in "ActivityEnd" | "ActivityStart" | "Audio" | "Interrupt" | "PlaybackPosition" | "Text" | "ToolResult" | "VideoFrame"]: (args: Extract<{
|
|
138
|
-
readonly _tag: "ActivityEnd";
|
|
139
|
-
} | {
|
|
140
|
-
readonly _tag: "ActivityStart";
|
|
141
|
-
} | {
|
|
142
|
-
readonly _tag: "Audio";
|
|
143
|
-
readonly bytes: Uint8Array;
|
|
144
|
-
} | {
|
|
145
|
-
readonly _tag: "Interrupt";
|
|
146
|
-
} | {
|
|
147
|
-
readonly _tag: "PlaybackPosition";
|
|
148
|
-
readonly responseId: string;
|
|
149
|
-
readonly playedMs: number;
|
|
150
|
-
} | {
|
|
151
|
-
readonly _tag: "Text";
|
|
152
|
-
readonly text: string;
|
|
153
|
-
readonly role?: "user" | "system";
|
|
154
|
-
} | {
|
|
155
|
-
readonly _tag: "ToolResult";
|
|
156
|
-
readonly output: ToolCallOutput;
|
|
157
|
-
} | {
|
|
158
|
-
readonly _tag: "VideoFrame";
|
|
159
|
-
readonly frame: ImageSource;
|
|
160
|
-
}, {
|
|
161
|
-
readonly _tag: Tag;
|
|
162
|
-
}>) => any; }>(value: {
|
|
163
|
-
readonly _tag: "ActivityEnd";
|
|
164
|
-
} | {
|
|
165
|
-
readonly _tag: "ActivityStart";
|
|
166
|
-
} | {
|
|
167
|
-
readonly _tag: "Audio";
|
|
168
|
-
readonly bytes: Uint8Array;
|
|
169
|
-
} | {
|
|
170
|
-
readonly _tag: "Interrupt";
|
|
171
|
-
} | {
|
|
172
|
-
readonly _tag: "PlaybackPosition";
|
|
173
|
-
readonly responseId: string;
|
|
174
|
-
readonly playedMs: number;
|
|
175
|
-
} | {
|
|
176
|
-
readonly _tag: "Text";
|
|
177
|
-
readonly text: string;
|
|
178
|
-
readonly role?: "user" | "system";
|
|
179
|
-
} | {
|
|
180
|
-
readonly _tag: "ToolResult";
|
|
181
|
-
readonly output: ToolCallOutput;
|
|
182
|
-
} | {
|
|
183
|
-
readonly _tag: "VideoFrame";
|
|
184
|
-
readonly frame: ImageSource;
|
|
185
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["ActivityEnd" | "ActivityStart" | "Audio" | "Interrupt" | "PlaybackPosition" | "Text" | "ToolResult" | "VideoFrame"]>>;
|
|
186
|
-
};
|
|
187
|
-
readonly ActivityEnd: Data.TaggedEnum.ConstructorFrom<{
|
|
188
|
-
readonly _tag: "ActivityEnd";
|
|
189
|
-
}, "_tag">;
|
|
190
|
-
readonly ActivityStart: Data.TaggedEnum.ConstructorFrom<{
|
|
191
|
-
readonly _tag: "ActivityStart";
|
|
192
|
-
}, "_tag">;
|
|
193
|
-
readonly Audio: Data.TaggedEnum.ConstructorFrom<{
|
|
194
|
-
readonly _tag: "Audio";
|
|
195
|
-
readonly bytes: Uint8Array;
|
|
196
|
-
}, "_tag">;
|
|
197
|
-
readonly Interrupt: Data.TaggedEnum.ConstructorFrom<{
|
|
198
|
-
readonly _tag: "Interrupt";
|
|
199
|
-
}, "_tag">;
|
|
200
|
-
readonly PlaybackPosition: Data.TaggedEnum.ConstructorFrom<{
|
|
201
|
-
readonly _tag: "PlaybackPosition";
|
|
202
|
-
readonly responseId: string;
|
|
203
|
-
readonly playedMs: number;
|
|
204
|
-
}, "_tag">;
|
|
205
|
-
readonly Text: Data.TaggedEnum.ConstructorFrom<{
|
|
206
|
-
readonly _tag: "Text";
|
|
207
|
-
readonly text: string;
|
|
208
|
-
readonly role?: "user" | "system";
|
|
209
|
-
}, "_tag">;
|
|
210
|
-
readonly ToolResult: Data.TaggedEnum.ConstructorFrom<{
|
|
211
|
-
readonly _tag: "ToolResult";
|
|
212
|
-
readonly output: ToolCallOutput;
|
|
213
|
-
}, "_tag">;
|
|
214
|
-
readonly VideoFrame: Data.TaggedEnum.ConstructorFrom<{
|
|
215
|
-
readonly _tag: "VideoFrame";
|
|
216
|
-
readonly frame: ImageSource;
|
|
217
|
-
}, "_tag">;
|
|
218
|
-
};
|
|
46
|
+
declare const RealtimeInput: Data.TaggedEnum.Constructor<{
|
|
47
|
+
readonly _tag: "ActivityEnd";
|
|
48
|
+
} | {
|
|
49
|
+
readonly _tag: "ActivityStart";
|
|
50
|
+
} | {
|
|
51
|
+
readonly _tag: "Audio";
|
|
52
|
+
readonly bytes: Uint8Array;
|
|
53
|
+
} | {
|
|
54
|
+
readonly _tag: "Interrupt";
|
|
55
|
+
} | {
|
|
56
|
+
readonly _tag: "PlaybackPosition";
|
|
57
|
+
readonly responseId: string;
|
|
58
|
+
readonly playedMs: number;
|
|
59
|
+
} | {
|
|
60
|
+
readonly _tag: "Text";
|
|
61
|
+
readonly text: string;
|
|
62
|
+
readonly role?: "user" | "system";
|
|
63
|
+
} | {
|
|
64
|
+
readonly _tag: "ToolResult";
|
|
65
|
+
readonly output: ToolCallOutput;
|
|
66
|
+
} | {
|
|
67
|
+
readonly _tag: "VideoFrame";
|
|
68
|
+
readonly frame: ImageSource;
|
|
69
|
+
}>;
|
|
219
70
|
/**
|
|
220
71
|
* What the session emits. Every `AudioDelta` and `OutputTranscriptDelta` is
|
|
221
72
|
* bracketed by `ResponseStarted` and `ResponseDone` carrying the same
|
|
@@ -276,320 +127,51 @@ type RealtimeEvent = Data.TaggedEnum<{
|
|
|
276
127
|
readonly message: string;
|
|
277
128
|
};
|
|
278
129
|
}>;
|
|
279
|
-
declare const RealtimeEvent: {
|
|
280
|
-
readonly
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}, {
|
|
325
|
-
readonly _tag: Tag;
|
|
326
|
-
}> | Extract<{
|
|
327
|
-
readonly _tag: "SessionEnding";
|
|
328
|
-
readonly timeLeft?: Duration.Duration;
|
|
329
|
-
}, {
|
|
330
|
-
readonly _tag: Tag;
|
|
331
|
-
}> | Extract<{
|
|
332
|
-
readonly _tag: "SpeechStarted";
|
|
333
|
-
}, {
|
|
334
|
-
readonly _tag: Tag;
|
|
335
|
-
}> | Extract<{
|
|
336
|
-
readonly _tag: "SpeechStopped";
|
|
337
|
-
}, {
|
|
338
|
-
readonly _tag: Tag;
|
|
339
|
-
}> | Extract<{
|
|
340
|
-
readonly _tag: "ToolCall";
|
|
341
|
-
readonly responseId: string;
|
|
342
|
-
readonly call: ToolCall;
|
|
343
|
-
}, {
|
|
344
|
-
readonly _tag: Tag;
|
|
345
|
-
}> | Extract<{
|
|
346
|
-
readonly _tag: "ToolCallCancelled";
|
|
347
|
-
readonly callIds: ReadonlyArray<string>;
|
|
348
|
-
}, {
|
|
349
|
-
readonly _tag: Tag;
|
|
350
|
-
}>;
|
|
351
|
-
readonly $match: {
|
|
352
|
-
<Cases extends { readonly [Tag in "AudioDelta" | "Error" | "InputTranscript" | "Interrupted" | "OutputTranscriptDelta" | "ResponseDone" | "ResponseStarted" | "ResumptionHandle" | "SessionEnding" | "SpeechStarted" | "SpeechStopped" | "ToolCall" | "ToolCallCancelled"]: (args: Extract<{
|
|
353
|
-
readonly _tag: "AudioDelta";
|
|
354
|
-
readonly responseId: string;
|
|
355
|
-
readonly bytes: Uint8Array;
|
|
356
|
-
} | {
|
|
357
|
-
readonly _tag: "Error";
|
|
358
|
-
readonly code?: string;
|
|
359
|
-
readonly message: string;
|
|
360
|
-
} | {
|
|
361
|
-
readonly _tag: "InputTranscript";
|
|
362
|
-
readonly text: string;
|
|
363
|
-
readonly final: boolean;
|
|
364
|
-
} | {
|
|
365
|
-
readonly _tag: "Interrupted";
|
|
366
|
-
readonly responseId: string;
|
|
367
|
-
} | {
|
|
368
|
-
readonly _tag: "OutputTranscriptDelta";
|
|
369
|
-
readonly responseId: string;
|
|
370
|
-
readonly text: string;
|
|
371
|
-
} | {
|
|
372
|
-
readonly _tag: "ResponseDone";
|
|
373
|
-
readonly responseId: string;
|
|
374
|
-
readonly reason: "complete" | "interrupted" | "cancelled" | "error";
|
|
375
|
-
readonly usage?: Usage;
|
|
376
|
-
} | {
|
|
377
|
-
readonly _tag: "ResponseStarted";
|
|
378
|
-
readonly responseId: string;
|
|
379
|
-
} | {
|
|
380
|
-
readonly _tag: "ResumptionHandle";
|
|
381
|
-
readonly handle: string;
|
|
382
|
-
} | {
|
|
383
|
-
readonly _tag: "SessionEnding";
|
|
384
|
-
readonly timeLeft?: Duration.Duration;
|
|
385
|
-
} | {
|
|
386
|
-
readonly _tag: "SpeechStarted";
|
|
387
|
-
} | {
|
|
388
|
-
readonly _tag: "SpeechStopped";
|
|
389
|
-
} | {
|
|
390
|
-
readonly _tag: "ToolCall";
|
|
391
|
-
readonly responseId: string;
|
|
392
|
-
readonly call: ToolCall;
|
|
393
|
-
} | {
|
|
394
|
-
readonly _tag: "ToolCallCancelled";
|
|
395
|
-
readonly callIds: ReadonlyArray<string>;
|
|
396
|
-
}, {
|
|
397
|
-
readonly _tag: Tag;
|
|
398
|
-
}>) => any; }>(cases: Cases): (value: {
|
|
399
|
-
readonly _tag: "AudioDelta";
|
|
400
|
-
readonly responseId: string;
|
|
401
|
-
readonly bytes: Uint8Array;
|
|
402
|
-
} | {
|
|
403
|
-
readonly _tag: "Error";
|
|
404
|
-
readonly code?: string;
|
|
405
|
-
readonly message: string;
|
|
406
|
-
} | {
|
|
407
|
-
readonly _tag: "InputTranscript";
|
|
408
|
-
readonly text: string;
|
|
409
|
-
readonly final: boolean;
|
|
410
|
-
} | {
|
|
411
|
-
readonly _tag: "Interrupted";
|
|
412
|
-
readonly responseId: string;
|
|
413
|
-
} | {
|
|
414
|
-
readonly _tag: "OutputTranscriptDelta";
|
|
415
|
-
readonly responseId: string;
|
|
416
|
-
readonly text: string;
|
|
417
|
-
} | {
|
|
418
|
-
readonly _tag: "ResponseDone";
|
|
419
|
-
readonly responseId: string;
|
|
420
|
-
readonly reason: "complete" | "interrupted" | "cancelled" | "error";
|
|
421
|
-
readonly usage?: Usage;
|
|
422
|
-
} | {
|
|
423
|
-
readonly _tag: "ResponseStarted";
|
|
424
|
-
readonly responseId: string;
|
|
425
|
-
} | {
|
|
426
|
-
readonly _tag: "ResumptionHandle";
|
|
427
|
-
readonly handle: string;
|
|
428
|
-
} | {
|
|
429
|
-
readonly _tag: "SessionEnding";
|
|
430
|
-
readonly timeLeft?: Duration.Duration;
|
|
431
|
-
} | {
|
|
432
|
-
readonly _tag: "SpeechStarted";
|
|
433
|
-
} | {
|
|
434
|
-
readonly _tag: "SpeechStopped";
|
|
435
|
-
} | {
|
|
436
|
-
readonly _tag: "ToolCall";
|
|
437
|
-
readonly responseId: string;
|
|
438
|
-
readonly call: ToolCall;
|
|
439
|
-
} | {
|
|
440
|
-
readonly _tag: "ToolCallCancelled";
|
|
441
|
-
readonly callIds: ReadonlyArray<string>;
|
|
442
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["AudioDelta" | "Error" | "InputTranscript" | "Interrupted" | "OutputTranscriptDelta" | "ResponseDone" | "ResponseStarted" | "ResumptionHandle" | "SessionEnding" | "SpeechStarted" | "SpeechStopped" | "ToolCall" | "ToolCallCancelled"]>>;
|
|
443
|
-
<Cases extends { readonly [Tag in "AudioDelta" | "Error" | "InputTranscript" | "Interrupted" | "OutputTranscriptDelta" | "ResponseDone" | "ResponseStarted" | "ResumptionHandle" | "SessionEnding" | "SpeechStarted" | "SpeechStopped" | "ToolCall" | "ToolCallCancelled"]: (args: Extract<{
|
|
444
|
-
readonly _tag: "AudioDelta";
|
|
445
|
-
readonly responseId: string;
|
|
446
|
-
readonly bytes: Uint8Array;
|
|
447
|
-
} | {
|
|
448
|
-
readonly _tag: "Error";
|
|
449
|
-
readonly code?: string;
|
|
450
|
-
readonly message: string;
|
|
451
|
-
} | {
|
|
452
|
-
readonly _tag: "InputTranscript";
|
|
453
|
-
readonly text: string;
|
|
454
|
-
readonly final: boolean;
|
|
455
|
-
} | {
|
|
456
|
-
readonly _tag: "Interrupted";
|
|
457
|
-
readonly responseId: string;
|
|
458
|
-
} | {
|
|
459
|
-
readonly _tag: "OutputTranscriptDelta";
|
|
460
|
-
readonly responseId: string;
|
|
461
|
-
readonly text: string;
|
|
462
|
-
} | {
|
|
463
|
-
readonly _tag: "ResponseDone";
|
|
464
|
-
readonly responseId: string;
|
|
465
|
-
readonly reason: "complete" | "interrupted" | "cancelled" | "error";
|
|
466
|
-
readonly usage?: Usage;
|
|
467
|
-
} | {
|
|
468
|
-
readonly _tag: "ResponseStarted";
|
|
469
|
-
readonly responseId: string;
|
|
470
|
-
} | {
|
|
471
|
-
readonly _tag: "ResumptionHandle";
|
|
472
|
-
readonly handle: string;
|
|
473
|
-
} | {
|
|
474
|
-
readonly _tag: "SessionEnding";
|
|
475
|
-
readonly timeLeft?: Duration.Duration;
|
|
476
|
-
} | {
|
|
477
|
-
readonly _tag: "SpeechStarted";
|
|
478
|
-
} | {
|
|
479
|
-
readonly _tag: "SpeechStopped";
|
|
480
|
-
} | {
|
|
481
|
-
readonly _tag: "ToolCall";
|
|
482
|
-
readonly responseId: string;
|
|
483
|
-
readonly call: ToolCall;
|
|
484
|
-
} | {
|
|
485
|
-
readonly _tag: "ToolCallCancelled";
|
|
486
|
-
readonly callIds: ReadonlyArray<string>;
|
|
487
|
-
}, {
|
|
488
|
-
readonly _tag: Tag;
|
|
489
|
-
}>) => any; }>(value: {
|
|
490
|
-
readonly _tag: "AudioDelta";
|
|
491
|
-
readonly responseId: string;
|
|
492
|
-
readonly bytes: Uint8Array;
|
|
493
|
-
} | {
|
|
494
|
-
readonly _tag: "Error";
|
|
495
|
-
readonly code?: string;
|
|
496
|
-
readonly message: string;
|
|
497
|
-
} | {
|
|
498
|
-
readonly _tag: "InputTranscript";
|
|
499
|
-
readonly text: string;
|
|
500
|
-
readonly final: boolean;
|
|
501
|
-
} | {
|
|
502
|
-
readonly _tag: "Interrupted";
|
|
503
|
-
readonly responseId: string;
|
|
504
|
-
} | {
|
|
505
|
-
readonly _tag: "OutputTranscriptDelta";
|
|
506
|
-
readonly responseId: string;
|
|
507
|
-
readonly text: string;
|
|
508
|
-
} | {
|
|
509
|
-
readonly _tag: "ResponseDone";
|
|
510
|
-
readonly responseId: string;
|
|
511
|
-
readonly reason: "complete" | "interrupted" | "cancelled" | "error";
|
|
512
|
-
readonly usage?: Usage;
|
|
513
|
-
} | {
|
|
514
|
-
readonly _tag: "ResponseStarted";
|
|
515
|
-
readonly responseId: string;
|
|
516
|
-
} | {
|
|
517
|
-
readonly _tag: "ResumptionHandle";
|
|
518
|
-
readonly handle: string;
|
|
519
|
-
} | {
|
|
520
|
-
readonly _tag: "SessionEnding";
|
|
521
|
-
readonly timeLeft?: Duration.Duration;
|
|
522
|
-
} | {
|
|
523
|
-
readonly _tag: "SpeechStarted";
|
|
524
|
-
} | {
|
|
525
|
-
readonly _tag: "SpeechStopped";
|
|
526
|
-
} | {
|
|
527
|
-
readonly _tag: "ToolCall";
|
|
528
|
-
readonly responseId: string;
|
|
529
|
-
readonly call: ToolCall;
|
|
530
|
-
} | {
|
|
531
|
-
readonly _tag: "ToolCallCancelled";
|
|
532
|
-
readonly callIds: ReadonlyArray<string>;
|
|
533
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["AudioDelta" | "Error" | "InputTranscript" | "Interrupted" | "OutputTranscriptDelta" | "ResponseDone" | "ResponseStarted" | "ResumptionHandle" | "SessionEnding" | "SpeechStarted" | "SpeechStopped" | "ToolCall" | "ToolCallCancelled"]>>;
|
|
534
|
-
};
|
|
535
|
-
readonly AudioDelta: Data.TaggedEnum.ConstructorFrom<{
|
|
536
|
-
readonly _tag: "AudioDelta";
|
|
537
|
-
readonly responseId: string;
|
|
538
|
-
readonly bytes: Uint8Array;
|
|
539
|
-
}, "_tag">;
|
|
540
|
-
readonly Error: Data.TaggedEnum.ConstructorFrom<{
|
|
541
|
-
readonly _tag: "Error";
|
|
542
|
-
readonly code?: string;
|
|
543
|
-
readonly message: string;
|
|
544
|
-
}, "_tag">;
|
|
545
|
-
readonly InputTranscript: Data.TaggedEnum.ConstructorFrom<{
|
|
546
|
-
readonly _tag: "InputTranscript";
|
|
547
|
-
readonly text: string;
|
|
548
|
-
readonly final: boolean;
|
|
549
|
-
}, "_tag">;
|
|
550
|
-
readonly Interrupted: Data.TaggedEnum.ConstructorFrom<{
|
|
551
|
-
readonly _tag: "Interrupted";
|
|
552
|
-
readonly responseId: string;
|
|
553
|
-
}, "_tag">;
|
|
554
|
-
readonly OutputTranscriptDelta: Data.TaggedEnum.ConstructorFrom<{
|
|
555
|
-
readonly _tag: "OutputTranscriptDelta";
|
|
556
|
-
readonly responseId: string;
|
|
557
|
-
readonly text: string;
|
|
558
|
-
}, "_tag">;
|
|
559
|
-
readonly ResponseDone: Data.TaggedEnum.ConstructorFrom<{
|
|
560
|
-
readonly _tag: "ResponseDone";
|
|
561
|
-
readonly responseId: string;
|
|
562
|
-
readonly reason: "complete" | "interrupted" | "cancelled" | "error";
|
|
563
|
-
readonly usage?: Usage;
|
|
564
|
-
}, "_tag">;
|
|
565
|
-
readonly ResponseStarted: Data.TaggedEnum.ConstructorFrom<{
|
|
566
|
-
readonly _tag: "ResponseStarted";
|
|
567
|
-
readonly responseId: string;
|
|
568
|
-
}, "_tag">;
|
|
569
|
-
readonly ResumptionHandle: Data.TaggedEnum.ConstructorFrom<{
|
|
570
|
-
readonly _tag: "ResumptionHandle";
|
|
571
|
-
readonly handle: string;
|
|
572
|
-
}, "_tag">;
|
|
573
|
-
readonly SessionEnding: Data.TaggedEnum.ConstructorFrom<{
|
|
574
|
-
readonly _tag: "SessionEnding";
|
|
575
|
-
readonly timeLeft?: Duration.Duration;
|
|
576
|
-
}, "_tag">;
|
|
577
|
-
readonly SpeechStarted: Data.TaggedEnum.ConstructorFrom<{
|
|
578
|
-
readonly _tag: "SpeechStarted";
|
|
579
|
-
}, "_tag">;
|
|
580
|
-
readonly SpeechStopped: Data.TaggedEnum.ConstructorFrom<{
|
|
581
|
-
readonly _tag: "SpeechStopped";
|
|
582
|
-
}, "_tag">;
|
|
583
|
-
readonly ToolCall: Data.TaggedEnum.ConstructorFrom<{
|
|
584
|
-
readonly _tag: "ToolCall";
|
|
585
|
-
readonly responseId: string;
|
|
586
|
-
readonly call: ToolCall;
|
|
587
|
-
}, "_tag">;
|
|
588
|
-
readonly ToolCallCancelled: Data.TaggedEnum.ConstructorFrom<{
|
|
589
|
-
readonly _tag: "ToolCallCancelled";
|
|
590
|
-
readonly callIds: ReadonlyArray<string>;
|
|
591
|
-
}, "_tag">;
|
|
592
|
-
};
|
|
130
|
+
declare const RealtimeEvent: Data.TaggedEnum.Constructor<{
|
|
131
|
+
readonly _tag: "AudioDelta";
|
|
132
|
+
readonly responseId: string;
|
|
133
|
+
readonly bytes: Uint8Array;
|
|
134
|
+
} | {
|
|
135
|
+
readonly _tag: "Error";
|
|
136
|
+
readonly code?: string;
|
|
137
|
+
readonly message: string;
|
|
138
|
+
} | {
|
|
139
|
+
readonly _tag: "InputTranscript";
|
|
140
|
+
readonly text: string;
|
|
141
|
+
readonly final: boolean;
|
|
142
|
+
} | {
|
|
143
|
+
readonly _tag: "Interrupted";
|
|
144
|
+
readonly responseId: string;
|
|
145
|
+
} | {
|
|
146
|
+
readonly _tag: "OutputTranscriptDelta";
|
|
147
|
+
readonly responseId: string;
|
|
148
|
+
readonly text: string;
|
|
149
|
+
} | {
|
|
150
|
+
readonly _tag: "ResponseDone";
|
|
151
|
+
readonly responseId: string;
|
|
152
|
+
readonly reason: "complete" | "interrupted" | "cancelled" | "error";
|
|
153
|
+
readonly usage?: Usage;
|
|
154
|
+
} | {
|
|
155
|
+
readonly _tag: "ResponseStarted";
|
|
156
|
+
readonly responseId: string;
|
|
157
|
+
} | {
|
|
158
|
+
readonly _tag: "ResumptionHandle";
|
|
159
|
+
readonly handle: string;
|
|
160
|
+
} | {
|
|
161
|
+
readonly _tag: "SessionEnding";
|
|
162
|
+
readonly timeLeft?: Duration.Duration;
|
|
163
|
+
} | {
|
|
164
|
+
readonly _tag: "SpeechStarted";
|
|
165
|
+
} | {
|
|
166
|
+
readonly _tag: "SpeechStopped";
|
|
167
|
+
} | {
|
|
168
|
+
readonly _tag: "ToolCall";
|
|
169
|
+
readonly responseId: string;
|
|
170
|
+
readonly call: ToolCall;
|
|
171
|
+
} | {
|
|
172
|
+
readonly _tag: "ToolCallCancelled";
|
|
173
|
+
readonly callIds: ReadonlyArray<string>;
|
|
174
|
+
}>;
|
|
593
175
|
/**
|
|
594
176
|
* Cross-provider session setup. Each adapter extends this, narrowing `model`
|
|
595
177
|
* and adding its own knobs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Realtime.d.mts","names":[],"sources":["../../src/domain/Realtime.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;KA6BY,gBAAgB,KAAK;EAC/B;aAAkB,OAAO;;EACzB;aAAiB;aAAuB;;EACxC;aAAuB,QAAQ;;EAC/B;EACA;aAAuB,OAAO;;EAC9B;EACA;EACA;aAA6B;aAA6B;;;cAG/C
|
|
1
|
+
{"version":3,"file":"Realtime.d.mts","names":[],"sources":["../../src/domain/Realtime.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;KA6BY,gBAAgB,KAAK;EAC/B;aAAkB,OAAO;;EACzB;aAAiB;aAAuB;;EACxC;aAAuB,QAAQ;;EAC/B;EACA;aAAuB,OAAO;;EAC9B;EACA;EACA;aAA6B;aAA6B;;;cAG/C,eAAa,KAAA,WAAA;;;;;;WAVC,OAAA;;;;;WAOgB;WAA2B;;;WAN7C;WAAwB;;;WAChB,QAAA;;;WAED,OAAA;;;;;;;;;;;;;;;;;;KAwBpB,gBAAgB,KAAK;EAC/B;aAA4B;;EAC5B;aAAuB;aAA6B,OAAO;;EAC3D;aAAkC;aAA6B;;EAC/D;aAA4B;aAAuB;;EACnD;EACA;EACA;aAAqB;aAA6B,MAAM;;EACxD;aAA8B,SAAS;;EACvC;aAAwB;;EACxB;aACW;aACA;aACA,QAAQ;;EAEnB;aAA6B;;EAC7B;aAA0B,WAAW,SAAS;;EAC9C;aAAkB;aAAwB;;;cAG/B,eAAa,KAAA,WAAA;;WAlBW;WAAwB,OAAA;;;WAelC;WAA0B;;;WAbjB;WAAwB;;;WAKtB;;;WANU;WAAuB;;;WAQ9C;WACJ;WACA,QAAA;;;WAZqB;;;WAcH;;;WACA,WAAA,SAAS;;;;;;;WATb;WAAuB,MAAA;;;WACjB,SAAA;;;;;;KAkB7B;WACD;WACA;WACA;;WAEA,QAAQ,cAAc;WACtB,aAAa;WACb,cAAc;;WAEd;;WAEA;;WAEA,UAAU,cAAc;;WAExB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { accumulatePartials } from "./Transcript.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as globalExpect } from "../
|
|
4
|
-
import { t as it } from "../dist-
|
|
2
|
+
import { m as describe } from "../dist-DzeSyeYF.mjs";
|
|
3
|
+
import { n as globalExpect } from "../index.C4tKZ0yW-LuFnBtmu.mjs";
|
|
4
|
+
import { t as it } from "../dist-B5K-y4Be.mjs";
|
|
5
5
|
import { Effect, Queue, Ref, Stream } from "effect";
|
|
6
6
|
import { TestClock } from "effect/testing";
|
|
7
7
|
//#region src/domain/Transcript.test.ts
|