@voltro/ai 0.74.0 → 0.76.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.
@@ -5,11 +5,11 @@ property of its respective copyright holders and is used under the terms of
5
5
  its license. This file is provided for attribution; it grants no rights in
6
6
  @voltro/ai itself, which is proprietary (see LICENSE).
7
7
 
8
- Generated from the resolved runtime dependency closure (36 packages).
8
+ Generated from the resolved runtime dependency closure (37 packages).
9
9
 
10
10
  ---
11
11
 
12
- ## @ai-sdk/anthropic@4.0.49
12
+ ## @ai-sdk/anthropic@4.0.56
13
13
 
14
14
  License: Apache-2.0
15
15
 
@@ -29,7 +29,7 @@ See the License for the specific language governing permissions and
29
29
  limitations under the License.
30
30
  ```
31
31
 
32
- ## @ai-sdk/openai@4.0.58
32
+ ## @ai-sdk/openai@4.0.69
33
33
 
34
34
  License: Apache-2.0
35
35
 
@@ -49,7 +49,7 @@ See the License for the specific language governing permissions and
49
49
  limitations under the License.
50
50
  ```
51
51
 
52
- ## @ai-sdk/provider@4.0.10
52
+ ## @ai-sdk/provider@4.0.17
53
53
 
54
54
  License: Apache-2.0
55
55
 
@@ -69,7 +69,7 @@ See the License for the specific language governing permissions and
69
69
  limitations under the License.
70
70
  ```
71
71
 
72
- ## @ai-sdk/provider-utils@5.0.36
72
+ ## @ai-sdk/provider-utils@5.0.43
73
73
 
74
74
  License: Apache-2.0
75
75
 
@@ -244,7 +244,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
244
244
  SOFTWARE.
245
245
  ```
246
246
 
247
- ## @upstash/redis@1.38.3
247
+ ## @upstash/redis@1.38.4
248
248
 
249
249
  License: MIT
250
250
 
@@ -713,7 +713,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
713
713
  SOFTWARE.
714
714
  ```
715
715
 
716
- ## jose@6.2.10
716
+ ## jose@6.2.12
717
717
 
718
718
  License: MIT
719
719
 
@@ -1454,3 +1454,30 @@ The above copyright notice and this permission notice shall be included in all c
1454
1454
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1455
1455
  ```
1456
1456
 
1457
+ ## ws@8.21.0
1458
+
1459
+ License: MIT
1460
+
1461
+ ```
1462
+ Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
1463
+ Copyright (c) 2013 Arnout Kazemier and contributors
1464
+ Copyright (c) 2016 Luigi Pinca and contributors
1465
+
1466
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
1467
+ this software and associated documentation files (the "Software"), to deal in
1468
+ the Software without restriction, including without limitation the rights to
1469
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
1470
+ the Software, and to permit persons to whom the Software is furnished to do so,
1471
+ subject to the following conditions:
1472
+
1473
+ The above copyright notice and this permission notice shall be included in all
1474
+ copies or substantial portions of the Software.
1475
+
1476
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1477
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
1478
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1479
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1480
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1481
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1482
+ ```
1483
+
@@ -0,0 +1,152 @@
1
+ import { Schema as e } from "effect";
2
+ //#region src/transcriptionEvent.ts
3
+ var t = class extends e.TaggedError()("TranscriptionStreamError", {
4
+ reason: e.Literal("input", "unsupported", "provider", "cancelled"),
5
+ message: e.String
6
+ }) {}, n = e.Struct({
7
+ text: e.String,
8
+ start: e.Number,
9
+ end: e.Number
10
+ }), r = { id: e.optional(e.String) }, i = e.Union(e.Struct({
11
+ type: e.Literal("transcript-delta"),
12
+ ...r,
13
+ delta: e.String
14
+ }), e.Struct({
15
+ type: e.Literal("transcript-partial"),
16
+ ...r,
17
+ text: e.String,
18
+ startSecond: e.optional(e.Number),
19
+ durationInSeconds: e.optional(e.Number),
20
+ channelIndex: e.optional(e.Number)
21
+ }), e.Struct({
22
+ type: e.Literal("transcript-final"),
23
+ ...r,
24
+ text: e.String,
25
+ startSecond: e.optional(e.Number),
26
+ endSecond: e.optional(e.Number),
27
+ channelIndex: e.optional(e.Number)
28
+ }), e.Struct({
29
+ type: e.Literal("finish"),
30
+ text: e.String,
31
+ segments: e.Array(n),
32
+ language: e.optional(e.String),
33
+ durationSec: e.optional(e.Number)
34
+ })), a = e.String.pipe(e.pattern(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/)), o = e.Number.pipe(e.finite(), e.nonNegative()), s = e.Union(e.Struct({
35
+ type: e.Literal("input-audio-append"),
36
+ audio: a
37
+ }), e.Struct({ type: e.Literal("input-audio-commit", "input-audio-clear", "response-create", "response-cancel") }), e.Struct({
38
+ type: e.Literal("conversation-item-create"),
39
+ item: e.Struct({
40
+ type: e.Literal("text-message"),
41
+ role: e.Literal("user"),
42
+ text: e.String
43
+ })
44
+ }), e.Struct({
45
+ type: e.Literal("conversation-item-truncate"),
46
+ itemId: e.String,
47
+ contentIndex: o.pipe(e.int()),
48
+ audioEndMs: o
49
+ })), c = { itemId: e.String }, l = {
50
+ responseId: e.String,
51
+ ...c
52
+ }, u = e.Union(e.Struct({ type: e.Literal("ready") }), e.Struct({
53
+ type: e.Literal("session-created"),
54
+ sessionId: e.optional(e.String)
55
+ }), e.Struct({ type: e.Literal("session-updated") }), e.Struct({
56
+ type: e.Literal("speech-started", "speech-stopped"),
57
+ itemId: e.optional(e.String)
58
+ }), e.Struct({
59
+ type: e.Literal("audio-committed"),
60
+ itemId: e.optional(e.String),
61
+ previousItemId: e.optional(e.String)
62
+ }), e.Struct({
63
+ type: e.Literal("conversation-item-added"),
64
+ ...c
65
+ }), e.Struct({
66
+ type: e.Literal("input-transcription-completed"),
67
+ ...c,
68
+ transcript: e.String
69
+ }), e.Struct({
70
+ type: e.Literal("response-created"),
71
+ responseId: e.String
72
+ }), e.Struct({
73
+ type: e.Literal("response-done"),
74
+ responseId: e.String,
75
+ status: e.String
76
+ }), e.Struct({
77
+ type: e.Literal("output-item-added", "output-item-done", "content-part-added", "content-part-done", "audio-done"),
78
+ ...l
79
+ }), e.Struct({
80
+ type: e.Literal("audio-delta"),
81
+ ...l,
82
+ delta: a
83
+ }), e.Struct({
84
+ type: e.Literal("text-delta", "audio-transcript-delta"),
85
+ ...l,
86
+ delta: e.String
87
+ }), e.Struct({
88
+ type: e.Literal("text-done"),
89
+ ...l,
90
+ text: e.optional(e.String)
91
+ }), e.Struct({
92
+ type: e.Literal("audio-transcript-done"),
93
+ ...l,
94
+ transcript: e.optional(e.String)
95
+ })), d = e.Literal("provider", "tool", "timeout", "cancelled", "decode", "internal"), f = e.Struct({
96
+ inputTokens: e.optional(e.Number),
97
+ outputTokens: e.optional(e.Number),
98
+ totalTokens: e.optional(e.Number)
99
+ }), p = e.Union(e.Struct({
100
+ _tag: e.Literal("token"),
101
+ text: e.String
102
+ }), e.Struct({
103
+ _tag: e.Literal("reasoning"),
104
+ text: e.String
105
+ }), e.Struct({
106
+ _tag: e.Literal("toolCall"),
107
+ id: e.String,
108
+ name: e.String,
109
+ input: e.Unknown
110
+ }), e.Struct({
111
+ _tag: e.Literal("toolResult"),
112
+ id: e.String,
113
+ name: e.String,
114
+ output: e.optional(e.Unknown),
115
+ error: e.optional(e.String)
116
+ }), e.Struct({
117
+ _tag: e.Literal("source"),
118
+ sourceType: e.Literal("url", "document"),
119
+ id: e.String,
120
+ url: e.optional(e.String),
121
+ title: e.optional(e.String),
122
+ mediaType: e.optional(e.String),
123
+ filename: e.optional(e.String),
124
+ providerMetadata: e.optional(e.Unknown)
125
+ }), e.Struct({
126
+ _tag: e.Literal("file"),
127
+ mediaType: e.String,
128
+ data: e.String,
129
+ providerMetadata: e.optional(e.Unknown)
130
+ }), e.Struct({
131
+ _tag: e.Literal("stepMetadata"),
132
+ step: e.Int.pipe(e.nonNegative()),
133
+ providerMetadata: e.Unknown
134
+ }), e.Struct({
135
+ _tag: e.Literal("message"),
136
+ role: e.String,
137
+ content: e.String
138
+ }), e.Struct({
139
+ _tag: e.Literal("error"),
140
+ code: d,
141
+ message: e.String,
142
+ retryable: e.Boolean
143
+ }), e.Struct({
144
+ _tag: e.Literal("done"),
145
+ finishReason: e.String,
146
+ usage: f
147
+ })), m = e.Struct({
148
+ seq: e.Number,
149
+ event: p
150
+ });
151
+ //#endregion
152
+ export { u as a, s as i, p as n, t as o, m as r, i as s, d as t };
package/dist/events.d.ts CHANGED
@@ -63,6 +63,87 @@ export declare const AgentEvent: Schema.Union<[Schema.Struct<{
63
63
 
64
64
  export declare type AgentEvent = typeof AgentEvent.Type;
65
65
 
66
+ /** Browser-safe input allowlist. Session configuration and provider credentials
67
+ * belong to the server, never to events received from the browser. */
68
+ export declare const RealtimeClientEvent: Schema.Union<[Schema.Struct<{
69
+ type: Schema.Literal<["input-audio-append"]>;
70
+ audio: Schema.filter<typeof Schema.String>;
71
+ }>, Schema.Struct<{
72
+ type: Schema.Literal<["input-audio-commit", "input-audio-clear", "response-create", "response-cancel"]>;
73
+ }>, Schema.Struct<{
74
+ type: Schema.Literal<["conversation-item-create"]>;
75
+ item: Schema.Struct<{
76
+ type: Schema.Literal<["text-message"]>;
77
+ role: Schema.Literal<["user"]>;
78
+ text: typeof Schema.String;
79
+ }>;
80
+ }>, Schema.Struct<{
81
+ type: Schema.Literal<["conversation-item-truncate"]>;
82
+ itemId: typeof Schema.String;
83
+ contentIndex: Schema.filter<Schema.filter<Schema.filter<typeof Schema.Number>>>;
84
+ audioEndMs: Schema.filter<Schema.filter<typeof Schema.Number>>;
85
+ }>]>;
86
+
87
+ export declare type RealtimeClientEvent = typeof RealtimeClientEvent.Type;
88
+
89
+ /** Safe, normalized server events. No raw provider payload, client secret,
90
+ * arbitrary conversation item or provider error message crosses this surface. */
91
+ export declare const RealtimeServerEvent: Schema.Union<[Schema.Struct<{
92
+ type: Schema.Literal<["ready"]>;
93
+ }>, Schema.Struct<{
94
+ type: Schema.Literal<["session-created"]>;
95
+ sessionId: Schema.optional<typeof Schema.String>;
96
+ }>, Schema.Struct<{
97
+ type: Schema.Literal<["session-updated"]>;
98
+ }>, Schema.Struct<{
99
+ type: Schema.Literal<["speech-started", "speech-stopped"]>;
100
+ itemId: Schema.optional<typeof Schema.String>;
101
+ }>, Schema.Struct<{
102
+ type: Schema.Literal<["audio-committed"]>;
103
+ itemId: Schema.optional<typeof Schema.String>;
104
+ previousItemId: Schema.optional<typeof Schema.String>;
105
+ }>, Schema.Struct<{
106
+ itemId: typeof Schema.String;
107
+ type: Schema.Literal<["conversation-item-added"]>;
108
+ }>, Schema.Struct<{
109
+ transcript: typeof Schema.String;
110
+ itemId: typeof Schema.String;
111
+ type: Schema.Literal<["input-transcription-completed"]>;
112
+ }>, Schema.Struct<{
113
+ type: Schema.Literal<["response-created"]>;
114
+ responseId: typeof Schema.String;
115
+ }>, Schema.Struct<{
116
+ type: Schema.Literal<["response-done"]>;
117
+ responseId: typeof Schema.String;
118
+ status: typeof Schema.String;
119
+ }>, Schema.Struct<{
120
+ itemId: typeof Schema.String;
121
+ responseId: typeof Schema.String;
122
+ type: Schema.Literal<["output-item-added", "output-item-done", "content-part-added", "content-part-done", "audio-done"]>;
123
+ }>, Schema.Struct<{
124
+ delta: Schema.filter<typeof Schema.String>;
125
+ itemId: typeof Schema.String;
126
+ responseId: typeof Schema.String;
127
+ type: Schema.Literal<["audio-delta"]>;
128
+ }>, Schema.Struct<{
129
+ delta: typeof Schema.String;
130
+ itemId: typeof Schema.String;
131
+ responseId: typeof Schema.String;
132
+ type: Schema.Literal<["text-delta", "audio-transcript-delta"]>;
133
+ }>, Schema.Struct<{
134
+ text: Schema.optional<typeof Schema.String>;
135
+ itemId: typeof Schema.String;
136
+ responseId: typeof Schema.String;
137
+ type: Schema.Literal<["text-done"]>;
138
+ }>, Schema.Struct<{
139
+ transcript: Schema.optional<typeof Schema.String>;
140
+ itemId: typeof Schema.String;
141
+ responseId: typeof Schema.String;
142
+ type: Schema.Literal<["audio-transcript-done"]>;
143
+ }>]>;
144
+
145
+ export declare type RealtimeServerEvent = typeof RealtimeServerEvent.Type;
146
+
66
147
  /**
67
148
  * One persisted event of a RESUMABLE stream: an `AgentEvent` plus its monotonic
68
149
  * 1-based position. `seq` is the resume cursor — a client that has rendered up
@@ -135,4 +216,48 @@ export declare const SeqEvent: Schema.Struct<{
135
216
 
136
217
  export declare type SeqEvent = typeof SeqEvent.Type;
137
218
 
219
+ /** Browser-safe error contract for a declared transcription stream. */
220
+ export declare class TranscriptionStreamError extends TranscriptionStreamError_base {
221
+ }
222
+
223
+ declare const TranscriptionStreamError_base: Schema.TaggedErrorClass<TranscriptionStreamError, "TranscriptionStreamError", {
224
+ readonly _tag: Schema.tag<"TranscriptionStreamError">;
225
+ } & {
226
+ reason: Schema.Literal<["input", "unsupported", "provider", "cancelled"]>;
227
+ message: typeof Schema.String;
228
+ }>;
229
+
230
+ /** Partial text is replaceable, delta text is append-only, and final text seals a segment. */
231
+ export declare const TranscriptionStreamEvent: Schema.Union<[Schema.Struct<{
232
+ delta: typeof Schema.String;
233
+ id: Schema.optional<typeof Schema.String>;
234
+ type: Schema.Literal<["transcript-delta"]>;
235
+ }>, Schema.Struct<{
236
+ text: typeof Schema.String;
237
+ startSecond: Schema.optional<typeof Schema.Number>;
238
+ durationInSeconds: Schema.optional<typeof Schema.Number>;
239
+ channelIndex: Schema.optional<typeof Schema.Number>;
240
+ id: Schema.optional<typeof Schema.String>;
241
+ type: Schema.Literal<["transcript-partial"]>;
242
+ }>, Schema.Struct<{
243
+ text: typeof Schema.String;
244
+ startSecond: Schema.optional<typeof Schema.Number>;
245
+ endSecond: Schema.optional<typeof Schema.Number>;
246
+ channelIndex: Schema.optional<typeof Schema.Number>;
247
+ id: Schema.optional<typeof Schema.String>;
248
+ type: Schema.Literal<["transcript-final"]>;
249
+ }>, Schema.Struct<{
250
+ type: Schema.Literal<["finish"]>;
251
+ text: typeof Schema.String;
252
+ segments: Schema.Array$<Schema.Struct<{
253
+ text: typeof Schema.String;
254
+ start: typeof Schema.Number;
255
+ end: typeof Schema.Number;
256
+ }>>;
257
+ language: Schema.optional<typeof Schema.String>;
258
+ durationSec: Schema.optional<typeof Schema.Number>;
259
+ }>]>;
260
+
261
+ export declare type TranscriptionStreamEvent = typeof TranscriptionStreamEvent.Type;
262
+
138
263
  export { }
package/dist/events.js CHANGED
@@ -1,60 +1,2 @@
1
- import { Schema as e } from "effect";
2
- //#region src/agentEvent.ts
3
- var t = e.Literal("provider", "tool", "timeout", "cancelled", "decode", "internal"), n = e.Struct({
4
- inputTokens: e.optional(e.Number),
5
- outputTokens: e.optional(e.Number),
6
- totalTokens: e.optional(e.Number)
7
- }), r = e.Union(e.Struct({
8
- _tag: e.Literal("token"),
9
- text: e.String
10
- }), e.Struct({
11
- _tag: e.Literal("reasoning"),
12
- text: e.String
13
- }), e.Struct({
14
- _tag: e.Literal("toolCall"),
15
- id: e.String,
16
- name: e.String,
17
- input: e.Unknown
18
- }), e.Struct({
19
- _tag: e.Literal("toolResult"),
20
- id: e.String,
21
- name: e.String,
22
- output: e.optional(e.Unknown),
23
- error: e.optional(e.String)
24
- }), e.Struct({
25
- _tag: e.Literal("source"),
26
- sourceType: e.Literal("url", "document"),
27
- id: e.String,
28
- url: e.optional(e.String),
29
- title: e.optional(e.String),
30
- mediaType: e.optional(e.String),
31
- filename: e.optional(e.String),
32
- providerMetadata: e.optional(e.Unknown)
33
- }), e.Struct({
34
- _tag: e.Literal("file"),
35
- mediaType: e.String,
36
- data: e.String,
37
- providerMetadata: e.optional(e.Unknown)
38
- }), e.Struct({
39
- _tag: e.Literal("stepMetadata"),
40
- step: e.Int.pipe(e.nonNegative()),
41
- providerMetadata: e.Unknown
42
- }), e.Struct({
43
- _tag: e.Literal("message"),
44
- role: e.String,
45
- content: e.String
46
- }), e.Struct({
47
- _tag: e.Literal("error"),
48
- code: t,
49
- message: e.String,
50
- retryable: e.Boolean
51
- }), e.Struct({
52
- _tag: e.Literal("done"),
53
- finishReason: e.String,
54
- usage: n
55
- })), i = e.Struct({
56
- seq: e.Number,
57
- event: r
58
- });
59
- //#endregion
60
- export { t as AgentErrorCode, r as AgentEvent, i as SeqEvent };
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./agentEvent-BuXA7sRt.js";
2
+ export { o as AgentErrorCode, n as AgentEvent, t as RealtimeClientEvent, e as RealtimeServerEvent, i as SeqEvent, r as TranscriptionStreamError, a as TranscriptionStreamEvent };