@ag-ui/proto 0.0.44 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +6 -3
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1598 -2150
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1596 -2121
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -12
package/dist/index.mjs
CHANGED
|
@@ -1,2220 +1,1695 @@
|
|
|
1
|
-
|
|
2
|
-
import { EventSchemas, EventType as EventType2 } from "@ag-ui/core";
|
|
3
|
-
|
|
4
|
-
// src/generated/events.ts
|
|
5
|
-
import { BinaryReader as BinaryReader4, BinaryWriter as BinaryWriter4 } from "@bufbuild/protobuf/wire";
|
|
6
|
-
|
|
7
|
-
// src/generated/google/protobuf/struct.ts
|
|
1
|
+
import { EventSchemas, EventType } from "@ag-ui/core";
|
|
8
2
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
|
+
|
|
4
|
+
//#region src/generated/google/protobuf/struct.ts
|
|
5
|
+
/**
|
|
6
|
+
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
7
|
+
* `Value` type union.
|
|
8
|
+
*
|
|
9
|
+
* The JSON representation for `NullValue` is JSON `null`.
|
|
10
|
+
*/
|
|
11
|
+
let NullValue = /* @__PURE__ */ function(NullValue) {
|
|
12
|
+
/** NULL_VALUE - Null value. */
|
|
13
|
+
NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
|
|
14
|
+
NullValue[NullValue["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
15
|
+
return NullValue;
|
|
16
|
+
}({});
|
|
9
17
|
function createBaseStruct() {
|
|
10
|
-
|
|
18
|
+
return { fields: {} };
|
|
11
19
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
wrap(object) {
|
|
64
|
-
const struct = createBaseStruct();
|
|
65
|
-
if (object !== void 0) {
|
|
66
|
-
for (const key of Object.keys(object)) {
|
|
67
|
-
struct.fields[key] = object[key];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return struct;
|
|
71
|
-
},
|
|
72
|
-
unwrap(message) {
|
|
73
|
-
const object = {};
|
|
74
|
-
if (message.fields) {
|
|
75
|
-
for (const key of Object.keys(message.fields)) {
|
|
76
|
-
object[key] = message.fields[key];
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return object;
|
|
80
|
-
}
|
|
20
|
+
const Struct = {
|
|
21
|
+
encode(message, writer = new BinaryWriter()) {
|
|
22
|
+
Object.entries(message.fields).forEach(([key, value]) => {
|
|
23
|
+
if (value !== void 0) Struct_FieldsEntry.encode({
|
|
24
|
+
key,
|
|
25
|
+
value
|
|
26
|
+
}, writer.uint32(10).fork()).join();
|
|
27
|
+
});
|
|
28
|
+
return writer;
|
|
29
|
+
},
|
|
30
|
+
decode(input, length) {
|
|
31
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
32
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
33
|
+
const message = createBaseStruct();
|
|
34
|
+
while (reader.pos < end) {
|
|
35
|
+
const tag = reader.uint32();
|
|
36
|
+
switch (tag >>> 3) {
|
|
37
|
+
case 1: {
|
|
38
|
+
if (tag !== 10) break;
|
|
39
|
+
const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());
|
|
40
|
+
if (entry1.value !== void 0) message.fields[entry1.key] = entry1.value;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
45
|
+
reader.skip(tag & 7);
|
|
46
|
+
}
|
|
47
|
+
return message;
|
|
48
|
+
},
|
|
49
|
+
create(base) {
|
|
50
|
+
return Struct.fromPartial(base ?? {});
|
|
51
|
+
},
|
|
52
|
+
fromPartial(object) {
|
|
53
|
+
const message = createBaseStruct();
|
|
54
|
+
message.fields = Object.entries(object.fields ?? {}).reduce((acc, [key, value]) => {
|
|
55
|
+
if (value !== void 0) acc[key] = value;
|
|
56
|
+
return acc;
|
|
57
|
+
}, {});
|
|
58
|
+
return message;
|
|
59
|
+
},
|
|
60
|
+
wrap(object) {
|
|
61
|
+
const struct = createBaseStruct();
|
|
62
|
+
if (object !== void 0) for (const key of Object.keys(object)) struct.fields[key] = object[key];
|
|
63
|
+
return struct;
|
|
64
|
+
},
|
|
65
|
+
unwrap(message) {
|
|
66
|
+
const object = {};
|
|
67
|
+
if (message.fields) for (const key of Object.keys(message.fields)) object[key] = message.fields[key];
|
|
68
|
+
return object;
|
|
69
|
+
}
|
|
81
70
|
};
|
|
82
71
|
function createBaseStruct_FieldsEntry() {
|
|
83
|
-
|
|
72
|
+
return {
|
|
73
|
+
key: "",
|
|
74
|
+
value: void 0
|
|
75
|
+
};
|
|
84
76
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
return message;
|
|
123
|
-
},
|
|
124
|
-
create(base) {
|
|
125
|
-
return Struct_FieldsEntry.fromPartial(base != null ? base : {});
|
|
126
|
-
},
|
|
127
|
-
fromPartial(object) {
|
|
128
|
-
var _a, _b;
|
|
129
|
-
const message = createBaseStruct_FieldsEntry();
|
|
130
|
-
message.key = (_a = object.key) != null ? _a : "";
|
|
131
|
-
message.value = (_b = object.value) != null ? _b : void 0;
|
|
132
|
-
return message;
|
|
133
|
-
}
|
|
77
|
+
const Struct_FieldsEntry = {
|
|
78
|
+
encode(message, writer = new BinaryWriter()) {
|
|
79
|
+
if (message.key !== "") writer.uint32(10).string(message.key);
|
|
80
|
+
if (message.value !== void 0) Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).join();
|
|
81
|
+
return writer;
|
|
82
|
+
},
|
|
83
|
+
decode(input, length) {
|
|
84
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
85
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
86
|
+
const message = createBaseStruct_FieldsEntry();
|
|
87
|
+
while (reader.pos < end) {
|
|
88
|
+
const tag = reader.uint32();
|
|
89
|
+
switch (tag >>> 3) {
|
|
90
|
+
case 1:
|
|
91
|
+
if (tag !== 10) break;
|
|
92
|
+
message.key = reader.string();
|
|
93
|
+
continue;
|
|
94
|
+
case 2:
|
|
95
|
+
if (tag !== 18) break;
|
|
96
|
+
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
100
|
+
reader.skip(tag & 7);
|
|
101
|
+
}
|
|
102
|
+
return message;
|
|
103
|
+
},
|
|
104
|
+
create(base) {
|
|
105
|
+
return Struct_FieldsEntry.fromPartial(base ?? {});
|
|
106
|
+
},
|
|
107
|
+
fromPartial(object) {
|
|
108
|
+
const message = createBaseStruct_FieldsEntry();
|
|
109
|
+
message.key = object.key ?? "";
|
|
110
|
+
message.value = object.value ?? void 0;
|
|
111
|
+
return message;
|
|
112
|
+
}
|
|
134
113
|
};
|
|
135
114
|
function createBaseValue() {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
115
|
+
return {
|
|
116
|
+
nullValue: void 0,
|
|
117
|
+
numberValue: void 0,
|
|
118
|
+
stringValue: void 0,
|
|
119
|
+
boolValue: void 0,
|
|
120
|
+
structValue: void 0,
|
|
121
|
+
listValue: void 0
|
|
122
|
+
};
|
|
144
123
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
create(base) {
|
|
225
|
-
return Value.fromPartial(base != null ? base : {});
|
|
226
|
-
},
|
|
227
|
-
fromPartial(object) {
|
|
228
|
-
var _a, _b, _c, _d, _e, _f;
|
|
229
|
-
const message = createBaseValue();
|
|
230
|
-
message.nullValue = (_a = object.nullValue) != null ? _a : void 0;
|
|
231
|
-
message.numberValue = (_b = object.numberValue) != null ? _b : void 0;
|
|
232
|
-
message.stringValue = (_c = object.stringValue) != null ? _c : void 0;
|
|
233
|
-
message.boolValue = (_d = object.boolValue) != null ? _d : void 0;
|
|
234
|
-
message.structValue = (_e = object.structValue) != null ? _e : void 0;
|
|
235
|
-
message.listValue = (_f = object.listValue) != null ? _f : void 0;
|
|
236
|
-
return message;
|
|
237
|
-
},
|
|
238
|
-
wrap(value) {
|
|
239
|
-
const result = createBaseValue();
|
|
240
|
-
if (value === null) {
|
|
241
|
-
result.nullValue = 0 /* NULL_VALUE */;
|
|
242
|
-
} else if (typeof value === "boolean") {
|
|
243
|
-
result.boolValue = value;
|
|
244
|
-
} else if (typeof value === "number") {
|
|
245
|
-
result.numberValue = value;
|
|
246
|
-
} else if (typeof value === "string") {
|
|
247
|
-
result.stringValue = value;
|
|
248
|
-
} else if (globalThis.Array.isArray(value)) {
|
|
249
|
-
result.listValue = value;
|
|
250
|
-
} else if (typeof value === "object") {
|
|
251
|
-
result.structValue = value;
|
|
252
|
-
} else if (typeof value !== "undefined") {
|
|
253
|
-
throw new globalThis.Error("Unsupported any value type: " + typeof value);
|
|
254
|
-
}
|
|
255
|
-
return result;
|
|
256
|
-
},
|
|
257
|
-
unwrap(message) {
|
|
258
|
-
if (message.stringValue !== void 0) {
|
|
259
|
-
return message.stringValue;
|
|
260
|
-
} else if ((message == null ? void 0 : message.numberValue) !== void 0) {
|
|
261
|
-
return message.numberValue;
|
|
262
|
-
} else if ((message == null ? void 0 : message.boolValue) !== void 0) {
|
|
263
|
-
return message.boolValue;
|
|
264
|
-
} else if ((message == null ? void 0 : message.structValue) !== void 0) {
|
|
265
|
-
return message.structValue;
|
|
266
|
-
} else if ((message == null ? void 0 : message.listValue) !== void 0) {
|
|
267
|
-
return message.listValue;
|
|
268
|
-
} else if ((message == null ? void 0 : message.nullValue) !== void 0) {
|
|
269
|
-
return null;
|
|
270
|
-
}
|
|
271
|
-
return void 0;
|
|
272
|
-
}
|
|
124
|
+
const Value = {
|
|
125
|
+
encode(message, writer = new BinaryWriter()) {
|
|
126
|
+
if (message.nullValue !== void 0) writer.uint32(8).int32(message.nullValue);
|
|
127
|
+
if (message.numberValue !== void 0) writer.uint32(17).double(message.numberValue);
|
|
128
|
+
if (message.stringValue !== void 0) writer.uint32(26).string(message.stringValue);
|
|
129
|
+
if (message.boolValue !== void 0) writer.uint32(32).bool(message.boolValue);
|
|
130
|
+
if (message.structValue !== void 0) Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).join();
|
|
131
|
+
if (message.listValue !== void 0) ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).join();
|
|
132
|
+
return writer;
|
|
133
|
+
},
|
|
134
|
+
decode(input, length) {
|
|
135
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
136
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
137
|
+
const message = createBaseValue();
|
|
138
|
+
while (reader.pos < end) {
|
|
139
|
+
const tag = reader.uint32();
|
|
140
|
+
switch (tag >>> 3) {
|
|
141
|
+
case 1:
|
|
142
|
+
if (tag !== 8) break;
|
|
143
|
+
message.nullValue = reader.int32();
|
|
144
|
+
continue;
|
|
145
|
+
case 2:
|
|
146
|
+
if (tag !== 17) break;
|
|
147
|
+
message.numberValue = reader.double();
|
|
148
|
+
continue;
|
|
149
|
+
case 3:
|
|
150
|
+
if (tag !== 26) break;
|
|
151
|
+
message.stringValue = reader.string();
|
|
152
|
+
continue;
|
|
153
|
+
case 4:
|
|
154
|
+
if (tag !== 32) break;
|
|
155
|
+
message.boolValue = reader.bool();
|
|
156
|
+
continue;
|
|
157
|
+
case 5:
|
|
158
|
+
if (tag !== 42) break;
|
|
159
|
+
message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
160
|
+
continue;
|
|
161
|
+
case 6:
|
|
162
|
+
if (tag !== 50) break;
|
|
163
|
+
message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
167
|
+
reader.skip(tag & 7);
|
|
168
|
+
}
|
|
169
|
+
return message;
|
|
170
|
+
},
|
|
171
|
+
create(base) {
|
|
172
|
+
return Value.fromPartial(base ?? {});
|
|
173
|
+
},
|
|
174
|
+
fromPartial(object) {
|
|
175
|
+
const message = createBaseValue();
|
|
176
|
+
message.nullValue = object.nullValue ?? void 0;
|
|
177
|
+
message.numberValue = object.numberValue ?? void 0;
|
|
178
|
+
message.stringValue = object.stringValue ?? void 0;
|
|
179
|
+
message.boolValue = object.boolValue ?? void 0;
|
|
180
|
+
message.structValue = object.structValue ?? void 0;
|
|
181
|
+
message.listValue = object.listValue ?? void 0;
|
|
182
|
+
return message;
|
|
183
|
+
},
|
|
184
|
+
wrap(value) {
|
|
185
|
+
const result = createBaseValue();
|
|
186
|
+
if (value === null) result.nullValue = NullValue.NULL_VALUE;
|
|
187
|
+
else if (typeof value === "boolean") result.boolValue = value;
|
|
188
|
+
else if (typeof value === "number") result.numberValue = value;
|
|
189
|
+
else if (typeof value === "string") result.stringValue = value;
|
|
190
|
+
else if (globalThis.Array.isArray(value)) result.listValue = value;
|
|
191
|
+
else if (typeof value === "object") result.structValue = value;
|
|
192
|
+
else if (typeof value !== "undefined") throw new globalThis.Error("Unsupported any value type: " + typeof value);
|
|
193
|
+
return result;
|
|
194
|
+
},
|
|
195
|
+
unwrap(message) {
|
|
196
|
+
if (message.stringValue !== void 0) return message.stringValue;
|
|
197
|
+
else if (message?.numberValue !== void 0) return message.numberValue;
|
|
198
|
+
else if (message?.boolValue !== void 0) return message.boolValue;
|
|
199
|
+
else if (message?.structValue !== void 0) return message.structValue;
|
|
200
|
+
else if (message?.listValue !== void 0) return message.listValue;
|
|
201
|
+
else if (message?.nullValue !== void 0) return null;
|
|
202
|
+
}
|
|
273
203
|
};
|
|
274
204
|
function createBaseListValue() {
|
|
275
|
-
|
|
205
|
+
return { values: [] };
|
|
276
206
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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
|
-
const result = createBaseListValue();
|
|
317
|
-
result.values = array != null ? array : [];
|
|
318
|
-
return result;
|
|
319
|
-
},
|
|
320
|
-
unwrap(message) {
|
|
321
|
-
if ((message == null ? void 0 : message.hasOwnProperty("values")) && globalThis.Array.isArray(message.values)) {
|
|
322
|
-
return message.values;
|
|
323
|
-
} else {
|
|
324
|
-
return message;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
207
|
+
const ListValue = {
|
|
208
|
+
encode(message, writer = new BinaryWriter()) {
|
|
209
|
+
for (const v of message.values) Value.encode(Value.wrap(v), writer.uint32(10).fork()).join();
|
|
210
|
+
return writer;
|
|
211
|
+
},
|
|
212
|
+
decode(input, length) {
|
|
213
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
214
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
215
|
+
const message = createBaseListValue();
|
|
216
|
+
while (reader.pos < end) {
|
|
217
|
+
const tag = reader.uint32();
|
|
218
|
+
switch (tag >>> 3) {
|
|
219
|
+
case 1:
|
|
220
|
+
if (tag !== 10) break;
|
|
221
|
+
message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
225
|
+
reader.skip(tag & 7);
|
|
226
|
+
}
|
|
227
|
+
return message;
|
|
228
|
+
},
|
|
229
|
+
create(base) {
|
|
230
|
+
return ListValue.fromPartial(base ?? {});
|
|
231
|
+
},
|
|
232
|
+
fromPartial(object) {
|
|
233
|
+
const message = createBaseListValue();
|
|
234
|
+
message.values = object.values?.map((e) => e) || [];
|
|
235
|
+
return message;
|
|
236
|
+
},
|
|
237
|
+
wrap(array) {
|
|
238
|
+
const result = createBaseListValue();
|
|
239
|
+
result.values = array ?? [];
|
|
240
|
+
return result;
|
|
241
|
+
},
|
|
242
|
+
unwrap(message) {
|
|
243
|
+
if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) return message.values;
|
|
244
|
+
else return message;
|
|
245
|
+
}
|
|
327
246
|
};
|
|
328
247
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/generated/patch.ts
|
|
250
|
+
let JsonPatchOperationType = /* @__PURE__ */ function(JsonPatchOperationType) {
|
|
251
|
+
JsonPatchOperationType[JsonPatchOperationType["ADD"] = 0] = "ADD";
|
|
252
|
+
JsonPatchOperationType[JsonPatchOperationType["REMOVE"] = 1] = "REMOVE";
|
|
253
|
+
JsonPatchOperationType[JsonPatchOperationType["REPLACE"] = 2] = "REPLACE";
|
|
254
|
+
JsonPatchOperationType[JsonPatchOperationType["MOVE"] = 3] = "MOVE";
|
|
255
|
+
JsonPatchOperationType[JsonPatchOperationType["COPY"] = 4] = "COPY";
|
|
256
|
+
JsonPatchOperationType[JsonPatchOperationType["TEST"] = 5] = "TEST";
|
|
257
|
+
JsonPatchOperationType[JsonPatchOperationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
258
|
+
return JsonPatchOperationType;
|
|
259
|
+
}({});
|
|
341
260
|
function createBaseJsonPatchOperation() {
|
|
342
|
-
|
|
261
|
+
return {
|
|
262
|
+
op: 0,
|
|
263
|
+
path: "",
|
|
264
|
+
from: void 0,
|
|
265
|
+
value: void 0
|
|
266
|
+
};
|
|
343
267
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
393
|
-
continue;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
397
|
-
break;
|
|
398
|
-
}
|
|
399
|
-
reader.skip(tag & 7);
|
|
400
|
-
}
|
|
401
|
-
return message;
|
|
402
|
-
},
|
|
403
|
-
create(base) {
|
|
404
|
-
return JsonPatchOperation.fromPartial(base != null ? base : {});
|
|
405
|
-
},
|
|
406
|
-
fromPartial(object) {
|
|
407
|
-
var _a, _b, _c, _d;
|
|
408
|
-
const message = createBaseJsonPatchOperation();
|
|
409
|
-
message.op = (_a = object.op) != null ? _a : 0;
|
|
410
|
-
message.path = (_b = object.path) != null ? _b : "";
|
|
411
|
-
message.from = (_c = object.from) != null ? _c : void 0;
|
|
412
|
-
message.value = (_d = object.value) != null ? _d : void 0;
|
|
413
|
-
return message;
|
|
414
|
-
}
|
|
268
|
+
const JsonPatchOperation = {
|
|
269
|
+
encode(message, writer = new BinaryWriter()) {
|
|
270
|
+
if (message.op !== 0) writer.uint32(8).int32(message.op);
|
|
271
|
+
if (message.path !== "") writer.uint32(18).string(message.path);
|
|
272
|
+
if (message.from !== void 0) writer.uint32(26).string(message.from);
|
|
273
|
+
if (message.value !== void 0) Value.encode(Value.wrap(message.value), writer.uint32(34).fork()).join();
|
|
274
|
+
return writer;
|
|
275
|
+
},
|
|
276
|
+
decode(input, length) {
|
|
277
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
278
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
279
|
+
const message = createBaseJsonPatchOperation();
|
|
280
|
+
while (reader.pos < end) {
|
|
281
|
+
const tag = reader.uint32();
|
|
282
|
+
switch (tag >>> 3) {
|
|
283
|
+
case 1:
|
|
284
|
+
if (tag !== 8) break;
|
|
285
|
+
message.op = reader.int32();
|
|
286
|
+
continue;
|
|
287
|
+
case 2:
|
|
288
|
+
if (tag !== 18) break;
|
|
289
|
+
message.path = reader.string();
|
|
290
|
+
continue;
|
|
291
|
+
case 3:
|
|
292
|
+
if (tag !== 26) break;
|
|
293
|
+
message.from = reader.string();
|
|
294
|
+
continue;
|
|
295
|
+
case 4:
|
|
296
|
+
if (tag !== 34) break;
|
|
297
|
+
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
301
|
+
reader.skip(tag & 7);
|
|
302
|
+
}
|
|
303
|
+
return message;
|
|
304
|
+
},
|
|
305
|
+
create(base) {
|
|
306
|
+
return JsonPatchOperation.fromPartial(base ?? {});
|
|
307
|
+
},
|
|
308
|
+
fromPartial(object) {
|
|
309
|
+
const message = createBaseJsonPatchOperation();
|
|
310
|
+
message.op = object.op ?? 0;
|
|
311
|
+
message.path = object.path ?? "";
|
|
312
|
+
message.from = object.from ?? void 0;
|
|
313
|
+
message.value = object.value ?? void 0;
|
|
314
|
+
return message;
|
|
315
|
+
}
|
|
415
316
|
};
|
|
416
317
|
|
|
417
|
-
|
|
418
|
-
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region src/generated/types.ts
|
|
419
320
|
function createBaseToolCall() {
|
|
420
|
-
|
|
321
|
+
return {
|
|
322
|
+
id: "",
|
|
323
|
+
type: "",
|
|
324
|
+
function: void 0
|
|
325
|
+
};
|
|
421
326
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
465
|
-
break;
|
|
466
|
-
}
|
|
467
|
-
reader.skip(tag & 7);
|
|
468
|
-
}
|
|
469
|
-
return message;
|
|
470
|
-
},
|
|
471
|
-
create(base) {
|
|
472
|
-
return ToolCall.fromPartial(base != null ? base : {});
|
|
473
|
-
},
|
|
474
|
-
fromPartial(object) {
|
|
475
|
-
var _a, _b;
|
|
476
|
-
const message = createBaseToolCall();
|
|
477
|
-
message.id = (_a = object.id) != null ? _a : "";
|
|
478
|
-
message.type = (_b = object.type) != null ? _b : "";
|
|
479
|
-
message.function = object.function !== void 0 && object.function !== null ? ToolCall_Function.fromPartial(object.function) : void 0;
|
|
480
|
-
return message;
|
|
481
|
-
}
|
|
327
|
+
const ToolCall = {
|
|
328
|
+
encode(message, writer = new BinaryWriter()) {
|
|
329
|
+
if (message.id !== "") writer.uint32(10).string(message.id);
|
|
330
|
+
if (message.type !== "") writer.uint32(18).string(message.type);
|
|
331
|
+
if (message.function !== void 0) ToolCall_Function.encode(message.function, writer.uint32(26).fork()).join();
|
|
332
|
+
return writer;
|
|
333
|
+
},
|
|
334
|
+
decode(input, length) {
|
|
335
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
336
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
337
|
+
const message = createBaseToolCall();
|
|
338
|
+
while (reader.pos < end) {
|
|
339
|
+
const tag = reader.uint32();
|
|
340
|
+
switch (tag >>> 3) {
|
|
341
|
+
case 1:
|
|
342
|
+
if (tag !== 10) break;
|
|
343
|
+
message.id = reader.string();
|
|
344
|
+
continue;
|
|
345
|
+
case 2:
|
|
346
|
+
if (tag !== 18) break;
|
|
347
|
+
message.type = reader.string();
|
|
348
|
+
continue;
|
|
349
|
+
case 3:
|
|
350
|
+
if (tag !== 26) break;
|
|
351
|
+
message.function = ToolCall_Function.decode(reader, reader.uint32());
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
355
|
+
reader.skip(tag & 7);
|
|
356
|
+
}
|
|
357
|
+
return message;
|
|
358
|
+
},
|
|
359
|
+
create(base) {
|
|
360
|
+
return ToolCall.fromPartial(base ?? {});
|
|
361
|
+
},
|
|
362
|
+
fromPartial(object) {
|
|
363
|
+
const message = createBaseToolCall();
|
|
364
|
+
message.id = object.id ?? "";
|
|
365
|
+
message.type = object.type ?? "";
|
|
366
|
+
message.function = object.function !== void 0 && object.function !== null ? ToolCall_Function.fromPartial(object.function) : void 0;
|
|
367
|
+
return message;
|
|
368
|
+
}
|
|
482
369
|
};
|
|
483
370
|
function createBaseToolCall_Function() {
|
|
484
|
-
|
|
371
|
+
return {
|
|
372
|
+
name: "",
|
|
373
|
+
arguments: ""
|
|
374
|
+
};
|
|
485
375
|
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
}
|
|
523
|
-
return message;
|
|
524
|
-
},
|
|
525
|
-
create(base) {
|
|
526
|
-
return ToolCall_Function.fromPartial(base != null ? base : {});
|
|
527
|
-
},
|
|
528
|
-
fromPartial(object) {
|
|
529
|
-
var _a, _b;
|
|
530
|
-
const message = createBaseToolCall_Function();
|
|
531
|
-
message.name = (_a = object.name) != null ? _a : "";
|
|
532
|
-
message.arguments = (_b = object.arguments) != null ? _b : "";
|
|
533
|
-
return message;
|
|
534
|
-
}
|
|
376
|
+
const ToolCall_Function = {
|
|
377
|
+
encode(message, writer = new BinaryWriter()) {
|
|
378
|
+
if (message.name !== "") writer.uint32(10).string(message.name);
|
|
379
|
+
if (message.arguments !== "") writer.uint32(18).string(message.arguments);
|
|
380
|
+
return writer;
|
|
381
|
+
},
|
|
382
|
+
decode(input, length) {
|
|
383
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
384
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
385
|
+
const message = createBaseToolCall_Function();
|
|
386
|
+
while (reader.pos < end) {
|
|
387
|
+
const tag = reader.uint32();
|
|
388
|
+
switch (tag >>> 3) {
|
|
389
|
+
case 1:
|
|
390
|
+
if (tag !== 10) break;
|
|
391
|
+
message.name = reader.string();
|
|
392
|
+
continue;
|
|
393
|
+
case 2:
|
|
394
|
+
if (tag !== 18) break;
|
|
395
|
+
message.arguments = reader.string();
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
399
|
+
reader.skip(tag & 7);
|
|
400
|
+
}
|
|
401
|
+
return message;
|
|
402
|
+
},
|
|
403
|
+
create(base) {
|
|
404
|
+
return ToolCall_Function.fromPartial(base ?? {});
|
|
405
|
+
},
|
|
406
|
+
fromPartial(object) {
|
|
407
|
+
const message = createBaseToolCall_Function();
|
|
408
|
+
message.name = object.name ?? "";
|
|
409
|
+
message.arguments = object.arguments ?? "";
|
|
410
|
+
return message;
|
|
411
|
+
}
|
|
535
412
|
};
|
|
536
413
|
function createBaseMessage() {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
414
|
+
return {
|
|
415
|
+
id: "",
|
|
416
|
+
role: "",
|
|
417
|
+
content: void 0,
|
|
418
|
+
name: void 0,
|
|
419
|
+
toolCalls: [],
|
|
420
|
+
toolCallId: void 0,
|
|
421
|
+
error: void 0
|
|
422
|
+
};
|
|
546
423
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}
|
|
614
|
-
case 6: {
|
|
615
|
-
if (tag !== 50) {
|
|
616
|
-
break;
|
|
617
|
-
}
|
|
618
|
-
message.toolCallId = reader.string();
|
|
619
|
-
continue;
|
|
620
|
-
}
|
|
621
|
-
case 7: {
|
|
622
|
-
if (tag !== 58) {
|
|
623
|
-
break;
|
|
624
|
-
}
|
|
625
|
-
message.error = reader.string();
|
|
626
|
-
continue;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
630
|
-
break;
|
|
631
|
-
}
|
|
632
|
-
reader.skip(tag & 7);
|
|
633
|
-
}
|
|
634
|
-
return message;
|
|
635
|
-
},
|
|
636
|
-
create(base) {
|
|
637
|
-
return Message.fromPartial(base != null ? base : {});
|
|
638
|
-
},
|
|
639
|
-
fromPartial(object) {
|
|
640
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
641
|
-
const message = createBaseMessage();
|
|
642
|
-
message.id = (_a = object.id) != null ? _a : "";
|
|
643
|
-
message.role = (_b = object.role) != null ? _b : "";
|
|
644
|
-
message.content = (_c = object.content) != null ? _c : void 0;
|
|
645
|
-
message.name = (_d = object.name) != null ? _d : void 0;
|
|
646
|
-
message.toolCalls = ((_e = object.toolCalls) == null ? void 0 : _e.map((e) => ToolCall.fromPartial(e))) || [];
|
|
647
|
-
message.toolCallId = (_f = object.toolCallId) != null ? _f : void 0;
|
|
648
|
-
message.error = (_g = object.error) != null ? _g : void 0;
|
|
649
|
-
return message;
|
|
650
|
-
}
|
|
424
|
+
const Message = {
|
|
425
|
+
encode(message, writer = new BinaryWriter()) {
|
|
426
|
+
if (message.id !== "") writer.uint32(10).string(message.id);
|
|
427
|
+
if (message.role !== "") writer.uint32(18).string(message.role);
|
|
428
|
+
if (message.content !== void 0) writer.uint32(26).string(message.content);
|
|
429
|
+
if (message.name !== void 0) writer.uint32(34).string(message.name);
|
|
430
|
+
for (const v of message.toolCalls) ToolCall.encode(v, writer.uint32(42).fork()).join();
|
|
431
|
+
if (message.toolCallId !== void 0) writer.uint32(50).string(message.toolCallId);
|
|
432
|
+
if (message.error !== void 0) writer.uint32(58).string(message.error);
|
|
433
|
+
return writer;
|
|
434
|
+
},
|
|
435
|
+
decode(input, length) {
|
|
436
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
437
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
438
|
+
const message = createBaseMessage();
|
|
439
|
+
while (reader.pos < end) {
|
|
440
|
+
const tag = reader.uint32();
|
|
441
|
+
switch (tag >>> 3) {
|
|
442
|
+
case 1:
|
|
443
|
+
if (tag !== 10) break;
|
|
444
|
+
message.id = reader.string();
|
|
445
|
+
continue;
|
|
446
|
+
case 2:
|
|
447
|
+
if (tag !== 18) break;
|
|
448
|
+
message.role = reader.string();
|
|
449
|
+
continue;
|
|
450
|
+
case 3:
|
|
451
|
+
if (tag !== 26) break;
|
|
452
|
+
message.content = reader.string();
|
|
453
|
+
continue;
|
|
454
|
+
case 4:
|
|
455
|
+
if (tag !== 34) break;
|
|
456
|
+
message.name = reader.string();
|
|
457
|
+
continue;
|
|
458
|
+
case 5:
|
|
459
|
+
if (tag !== 42) break;
|
|
460
|
+
message.toolCalls.push(ToolCall.decode(reader, reader.uint32()));
|
|
461
|
+
continue;
|
|
462
|
+
case 6:
|
|
463
|
+
if (tag !== 50) break;
|
|
464
|
+
message.toolCallId = reader.string();
|
|
465
|
+
continue;
|
|
466
|
+
case 7:
|
|
467
|
+
if (tag !== 58) break;
|
|
468
|
+
message.error = reader.string();
|
|
469
|
+
continue;
|
|
470
|
+
}
|
|
471
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
472
|
+
reader.skip(tag & 7);
|
|
473
|
+
}
|
|
474
|
+
return message;
|
|
475
|
+
},
|
|
476
|
+
create(base) {
|
|
477
|
+
return Message.fromPartial(base ?? {});
|
|
478
|
+
},
|
|
479
|
+
fromPartial(object) {
|
|
480
|
+
const message = createBaseMessage();
|
|
481
|
+
message.id = object.id ?? "";
|
|
482
|
+
message.role = object.role ?? "";
|
|
483
|
+
message.content = object.content ?? void 0;
|
|
484
|
+
message.name = object.name ?? void 0;
|
|
485
|
+
message.toolCalls = object.toolCalls?.map((e) => ToolCall.fromPartial(e)) || [];
|
|
486
|
+
message.toolCallId = object.toolCallId ?? void 0;
|
|
487
|
+
message.error = object.error ?? void 0;
|
|
488
|
+
return message;
|
|
489
|
+
}
|
|
651
490
|
};
|
|
652
491
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
492
|
+
//#endregion
|
|
493
|
+
//#region src/generated/events.ts
|
|
494
|
+
let EventType$1 = /* @__PURE__ */ function(EventType) {
|
|
495
|
+
EventType[EventType["TEXT_MESSAGE_START"] = 0] = "TEXT_MESSAGE_START";
|
|
496
|
+
EventType[EventType["TEXT_MESSAGE_CONTENT"] = 1] = "TEXT_MESSAGE_CONTENT";
|
|
497
|
+
EventType[EventType["TEXT_MESSAGE_END"] = 2] = "TEXT_MESSAGE_END";
|
|
498
|
+
EventType[EventType["TOOL_CALL_START"] = 3] = "TOOL_CALL_START";
|
|
499
|
+
EventType[EventType["TOOL_CALL_ARGS"] = 4] = "TOOL_CALL_ARGS";
|
|
500
|
+
EventType[EventType["TOOL_CALL_END"] = 5] = "TOOL_CALL_END";
|
|
501
|
+
EventType[EventType["STATE_SNAPSHOT"] = 6] = "STATE_SNAPSHOT";
|
|
502
|
+
EventType[EventType["STATE_DELTA"] = 7] = "STATE_DELTA";
|
|
503
|
+
EventType[EventType["MESSAGES_SNAPSHOT"] = 8] = "MESSAGES_SNAPSHOT";
|
|
504
|
+
EventType[EventType["RAW"] = 9] = "RAW";
|
|
505
|
+
EventType[EventType["CUSTOM"] = 10] = "CUSTOM";
|
|
506
|
+
EventType[EventType["RUN_STARTED"] = 11] = "RUN_STARTED";
|
|
507
|
+
EventType[EventType["RUN_FINISHED"] = 12] = "RUN_FINISHED";
|
|
508
|
+
EventType[EventType["RUN_ERROR"] = 13] = "RUN_ERROR";
|
|
509
|
+
EventType[EventType["STEP_STARTED"] = 14] = "STEP_STARTED";
|
|
510
|
+
EventType[EventType["STEP_FINISHED"] = 15] = "STEP_FINISHED";
|
|
511
|
+
EventType[EventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
512
|
+
return EventType;
|
|
513
|
+
}({});
|
|
674
514
|
function createBaseBaseEvent() {
|
|
675
|
-
|
|
515
|
+
return {
|
|
516
|
+
type: 0,
|
|
517
|
+
timestamp: void 0,
|
|
518
|
+
rawEvent: void 0
|
|
519
|
+
};
|
|
676
520
|
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
720
|
-
break;
|
|
721
|
-
}
|
|
722
|
-
reader.skip(tag & 7);
|
|
723
|
-
}
|
|
724
|
-
return message;
|
|
725
|
-
},
|
|
726
|
-
create(base) {
|
|
727
|
-
return BaseEvent.fromPartial(base != null ? base : {});
|
|
728
|
-
},
|
|
729
|
-
fromPartial(object) {
|
|
730
|
-
var _a, _b, _c;
|
|
731
|
-
const message = createBaseBaseEvent();
|
|
732
|
-
message.type = (_a = object.type) != null ? _a : 0;
|
|
733
|
-
message.timestamp = (_b = object.timestamp) != null ? _b : void 0;
|
|
734
|
-
message.rawEvent = (_c = object.rawEvent) != null ? _c : void 0;
|
|
735
|
-
return message;
|
|
736
|
-
}
|
|
521
|
+
const BaseEvent$1 = {
|
|
522
|
+
encode(message, writer = new BinaryWriter()) {
|
|
523
|
+
if (message.type !== 0) writer.uint32(8).int32(message.type);
|
|
524
|
+
if (message.timestamp !== void 0) writer.uint32(16).int64(message.timestamp);
|
|
525
|
+
if (message.rawEvent !== void 0) Value.encode(Value.wrap(message.rawEvent), writer.uint32(26).fork()).join();
|
|
526
|
+
return writer;
|
|
527
|
+
},
|
|
528
|
+
decode(input, length) {
|
|
529
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
530
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
531
|
+
const message = createBaseBaseEvent();
|
|
532
|
+
while (reader.pos < end) {
|
|
533
|
+
const tag = reader.uint32();
|
|
534
|
+
switch (tag >>> 3) {
|
|
535
|
+
case 1:
|
|
536
|
+
if (tag !== 8) break;
|
|
537
|
+
message.type = reader.int32();
|
|
538
|
+
continue;
|
|
539
|
+
case 2:
|
|
540
|
+
if (tag !== 16) break;
|
|
541
|
+
message.timestamp = longToNumber(reader.int64());
|
|
542
|
+
continue;
|
|
543
|
+
case 3:
|
|
544
|
+
if (tag !== 26) break;
|
|
545
|
+
message.rawEvent = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
546
|
+
continue;
|
|
547
|
+
}
|
|
548
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
549
|
+
reader.skip(tag & 7);
|
|
550
|
+
}
|
|
551
|
+
return message;
|
|
552
|
+
},
|
|
553
|
+
create(base) {
|
|
554
|
+
return BaseEvent$1.fromPartial(base ?? {});
|
|
555
|
+
},
|
|
556
|
+
fromPartial(object) {
|
|
557
|
+
const message = createBaseBaseEvent();
|
|
558
|
+
message.type = object.type ?? 0;
|
|
559
|
+
message.timestamp = object.timestamp ?? void 0;
|
|
560
|
+
message.rawEvent = object.rawEvent ?? void 0;
|
|
561
|
+
return message;
|
|
562
|
+
}
|
|
737
563
|
};
|
|
738
564
|
function createBaseTextMessageStartEvent() {
|
|
739
|
-
|
|
565
|
+
return {
|
|
566
|
+
baseEvent: void 0,
|
|
567
|
+
messageId: "",
|
|
568
|
+
role: void 0
|
|
569
|
+
};
|
|
740
570
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
784
|
-
break;
|
|
785
|
-
}
|
|
786
|
-
reader.skip(tag & 7);
|
|
787
|
-
}
|
|
788
|
-
return message;
|
|
789
|
-
},
|
|
790
|
-
create(base) {
|
|
791
|
-
return TextMessageStartEvent.fromPartial(base != null ? base : {});
|
|
792
|
-
},
|
|
793
|
-
fromPartial(object) {
|
|
794
|
-
var _a, _b;
|
|
795
|
-
const message = createBaseTextMessageStartEvent();
|
|
796
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
797
|
-
message.messageId = (_a = object.messageId) != null ? _a : "";
|
|
798
|
-
message.role = (_b = object.role) != null ? _b : void 0;
|
|
799
|
-
return message;
|
|
800
|
-
}
|
|
571
|
+
const TextMessageStartEvent = {
|
|
572
|
+
encode(message, writer = new BinaryWriter()) {
|
|
573
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
574
|
+
if (message.messageId !== "") writer.uint32(18).string(message.messageId);
|
|
575
|
+
if (message.role !== void 0) writer.uint32(26).string(message.role);
|
|
576
|
+
return writer;
|
|
577
|
+
},
|
|
578
|
+
decode(input, length) {
|
|
579
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
580
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
581
|
+
const message = createBaseTextMessageStartEvent();
|
|
582
|
+
while (reader.pos < end) {
|
|
583
|
+
const tag = reader.uint32();
|
|
584
|
+
switch (tag >>> 3) {
|
|
585
|
+
case 1:
|
|
586
|
+
if (tag !== 10) break;
|
|
587
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
588
|
+
continue;
|
|
589
|
+
case 2:
|
|
590
|
+
if (tag !== 18) break;
|
|
591
|
+
message.messageId = reader.string();
|
|
592
|
+
continue;
|
|
593
|
+
case 3:
|
|
594
|
+
if (tag !== 26) break;
|
|
595
|
+
message.role = reader.string();
|
|
596
|
+
continue;
|
|
597
|
+
}
|
|
598
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
599
|
+
reader.skip(tag & 7);
|
|
600
|
+
}
|
|
601
|
+
return message;
|
|
602
|
+
},
|
|
603
|
+
create(base) {
|
|
604
|
+
return TextMessageStartEvent.fromPartial(base ?? {});
|
|
605
|
+
},
|
|
606
|
+
fromPartial(object) {
|
|
607
|
+
const message = createBaseTextMessageStartEvent();
|
|
608
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
609
|
+
message.messageId = object.messageId ?? "";
|
|
610
|
+
message.role = object.role ?? void 0;
|
|
611
|
+
return message;
|
|
612
|
+
}
|
|
801
613
|
};
|
|
802
614
|
function createBaseTextMessageContentEvent() {
|
|
803
|
-
|
|
615
|
+
return {
|
|
616
|
+
baseEvent: void 0,
|
|
617
|
+
messageId: "",
|
|
618
|
+
delta: ""
|
|
619
|
+
};
|
|
804
620
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
848
|
-
break;
|
|
849
|
-
}
|
|
850
|
-
reader.skip(tag & 7);
|
|
851
|
-
}
|
|
852
|
-
return message;
|
|
853
|
-
},
|
|
854
|
-
create(base) {
|
|
855
|
-
return TextMessageContentEvent.fromPartial(base != null ? base : {});
|
|
856
|
-
},
|
|
857
|
-
fromPartial(object) {
|
|
858
|
-
var _a, _b;
|
|
859
|
-
const message = createBaseTextMessageContentEvent();
|
|
860
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
861
|
-
message.messageId = (_a = object.messageId) != null ? _a : "";
|
|
862
|
-
message.delta = (_b = object.delta) != null ? _b : "";
|
|
863
|
-
return message;
|
|
864
|
-
}
|
|
621
|
+
const TextMessageContentEvent = {
|
|
622
|
+
encode(message, writer = new BinaryWriter()) {
|
|
623
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
624
|
+
if (message.messageId !== "") writer.uint32(18).string(message.messageId);
|
|
625
|
+
if (message.delta !== "") writer.uint32(26).string(message.delta);
|
|
626
|
+
return writer;
|
|
627
|
+
},
|
|
628
|
+
decode(input, length) {
|
|
629
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
630
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
631
|
+
const message = createBaseTextMessageContentEvent();
|
|
632
|
+
while (reader.pos < end) {
|
|
633
|
+
const tag = reader.uint32();
|
|
634
|
+
switch (tag >>> 3) {
|
|
635
|
+
case 1:
|
|
636
|
+
if (tag !== 10) break;
|
|
637
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
638
|
+
continue;
|
|
639
|
+
case 2:
|
|
640
|
+
if (tag !== 18) break;
|
|
641
|
+
message.messageId = reader.string();
|
|
642
|
+
continue;
|
|
643
|
+
case 3:
|
|
644
|
+
if (tag !== 26) break;
|
|
645
|
+
message.delta = reader.string();
|
|
646
|
+
continue;
|
|
647
|
+
}
|
|
648
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
649
|
+
reader.skip(tag & 7);
|
|
650
|
+
}
|
|
651
|
+
return message;
|
|
652
|
+
},
|
|
653
|
+
create(base) {
|
|
654
|
+
return TextMessageContentEvent.fromPartial(base ?? {});
|
|
655
|
+
},
|
|
656
|
+
fromPartial(object) {
|
|
657
|
+
const message = createBaseTextMessageContentEvent();
|
|
658
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
659
|
+
message.messageId = object.messageId ?? "";
|
|
660
|
+
message.delta = object.delta ?? "";
|
|
661
|
+
return message;
|
|
662
|
+
}
|
|
865
663
|
};
|
|
866
664
|
function createBaseTextMessageEndEvent() {
|
|
867
|
-
|
|
665
|
+
return {
|
|
666
|
+
baseEvent: void 0,
|
|
667
|
+
messageId: ""
|
|
668
|
+
};
|
|
868
669
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
}
|
|
906
|
-
return message;
|
|
907
|
-
},
|
|
908
|
-
create(base) {
|
|
909
|
-
return TextMessageEndEvent.fromPartial(base != null ? base : {});
|
|
910
|
-
},
|
|
911
|
-
fromPartial(object) {
|
|
912
|
-
var _a;
|
|
913
|
-
const message = createBaseTextMessageEndEvent();
|
|
914
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
915
|
-
message.messageId = (_a = object.messageId) != null ? _a : "";
|
|
916
|
-
return message;
|
|
917
|
-
}
|
|
670
|
+
const TextMessageEndEvent = {
|
|
671
|
+
encode(message, writer = new BinaryWriter()) {
|
|
672
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
673
|
+
if (message.messageId !== "") writer.uint32(18).string(message.messageId);
|
|
674
|
+
return writer;
|
|
675
|
+
},
|
|
676
|
+
decode(input, length) {
|
|
677
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
678
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
679
|
+
const message = createBaseTextMessageEndEvent();
|
|
680
|
+
while (reader.pos < end) {
|
|
681
|
+
const tag = reader.uint32();
|
|
682
|
+
switch (tag >>> 3) {
|
|
683
|
+
case 1:
|
|
684
|
+
if (tag !== 10) break;
|
|
685
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
686
|
+
continue;
|
|
687
|
+
case 2:
|
|
688
|
+
if (tag !== 18) break;
|
|
689
|
+
message.messageId = reader.string();
|
|
690
|
+
continue;
|
|
691
|
+
}
|
|
692
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
693
|
+
reader.skip(tag & 7);
|
|
694
|
+
}
|
|
695
|
+
return message;
|
|
696
|
+
},
|
|
697
|
+
create(base) {
|
|
698
|
+
return TextMessageEndEvent.fromPartial(base ?? {});
|
|
699
|
+
},
|
|
700
|
+
fromPartial(object) {
|
|
701
|
+
const message = createBaseTextMessageEndEvent();
|
|
702
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
703
|
+
message.messageId = object.messageId ?? "";
|
|
704
|
+
return message;
|
|
705
|
+
}
|
|
918
706
|
};
|
|
919
707
|
function createBaseToolCallStartEvent() {
|
|
920
|
-
|
|
708
|
+
return {
|
|
709
|
+
baseEvent: void 0,
|
|
710
|
+
toolCallId: "",
|
|
711
|
+
toolCallName: "",
|
|
712
|
+
parentMessageId: void 0
|
|
713
|
+
};
|
|
921
714
|
}
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
message.parentMessageId = reader.string();
|
|
971
|
-
continue;
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
975
|
-
break;
|
|
976
|
-
}
|
|
977
|
-
reader.skip(tag & 7);
|
|
978
|
-
}
|
|
979
|
-
return message;
|
|
980
|
-
},
|
|
981
|
-
create(base) {
|
|
982
|
-
return ToolCallStartEvent.fromPartial(base != null ? base : {});
|
|
983
|
-
},
|
|
984
|
-
fromPartial(object) {
|
|
985
|
-
var _a, _b, _c;
|
|
986
|
-
const message = createBaseToolCallStartEvent();
|
|
987
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
988
|
-
message.toolCallId = (_a = object.toolCallId) != null ? _a : "";
|
|
989
|
-
message.toolCallName = (_b = object.toolCallName) != null ? _b : "";
|
|
990
|
-
message.parentMessageId = (_c = object.parentMessageId) != null ? _c : void 0;
|
|
991
|
-
return message;
|
|
992
|
-
}
|
|
715
|
+
const ToolCallStartEvent = {
|
|
716
|
+
encode(message, writer = new BinaryWriter()) {
|
|
717
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
718
|
+
if (message.toolCallId !== "") writer.uint32(18).string(message.toolCallId);
|
|
719
|
+
if (message.toolCallName !== "") writer.uint32(26).string(message.toolCallName);
|
|
720
|
+
if (message.parentMessageId !== void 0) writer.uint32(34).string(message.parentMessageId);
|
|
721
|
+
return writer;
|
|
722
|
+
},
|
|
723
|
+
decode(input, length) {
|
|
724
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
725
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
726
|
+
const message = createBaseToolCallStartEvent();
|
|
727
|
+
while (reader.pos < end) {
|
|
728
|
+
const tag = reader.uint32();
|
|
729
|
+
switch (tag >>> 3) {
|
|
730
|
+
case 1:
|
|
731
|
+
if (tag !== 10) break;
|
|
732
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
733
|
+
continue;
|
|
734
|
+
case 2:
|
|
735
|
+
if (tag !== 18) break;
|
|
736
|
+
message.toolCallId = reader.string();
|
|
737
|
+
continue;
|
|
738
|
+
case 3:
|
|
739
|
+
if (tag !== 26) break;
|
|
740
|
+
message.toolCallName = reader.string();
|
|
741
|
+
continue;
|
|
742
|
+
case 4:
|
|
743
|
+
if (tag !== 34) break;
|
|
744
|
+
message.parentMessageId = reader.string();
|
|
745
|
+
continue;
|
|
746
|
+
}
|
|
747
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
748
|
+
reader.skip(tag & 7);
|
|
749
|
+
}
|
|
750
|
+
return message;
|
|
751
|
+
},
|
|
752
|
+
create(base) {
|
|
753
|
+
return ToolCallStartEvent.fromPartial(base ?? {});
|
|
754
|
+
},
|
|
755
|
+
fromPartial(object) {
|
|
756
|
+
const message = createBaseToolCallStartEvent();
|
|
757
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
758
|
+
message.toolCallId = object.toolCallId ?? "";
|
|
759
|
+
message.toolCallName = object.toolCallName ?? "";
|
|
760
|
+
message.parentMessageId = object.parentMessageId ?? void 0;
|
|
761
|
+
return message;
|
|
762
|
+
}
|
|
993
763
|
};
|
|
994
764
|
function createBaseToolCallArgsEvent() {
|
|
995
|
-
|
|
765
|
+
return {
|
|
766
|
+
baseEvent: void 0,
|
|
767
|
+
toolCallId: "",
|
|
768
|
+
delta: ""
|
|
769
|
+
};
|
|
996
770
|
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1040
|
-
break;
|
|
1041
|
-
}
|
|
1042
|
-
reader.skip(tag & 7);
|
|
1043
|
-
}
|
|
1044
|
-
return message;
|
|
1045
|
-
},
|
|
1046
|
-
create(base) {
|
|
1047
|
-
return ToolCallArgsEvent.fromPartial(base != null ? base : {});
|
|
1048
|
-
},
|
|
1049
|
-
fromPartial(object) {
|
|
1050
|
-
var _a, _b;
|
|
1051
|
-
const message = createBaseToolCallArgsEvent();
|
|
1052
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1053
|
-
message.toolCallId = (_a = object.toolCallId) != null ? _a : "";
|
|
1054
|
-
message.delta = (_b = object.delta) != null ? _b : "";
|
|
1055
|
-
return message;
|
|
1056
|
-
}
|
|
771
|
+
const ToolCallArgsEvent = {
|
|
772
|
+
encode(message, writer = new BinaryWriter()) {
|
|
773
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
774
|
+
if (message.toolCallId !== "") writer.uint32(18).string(message.toolCallId);
|
|
775
|
+
if (message.delta !== "") writer.uint32(26).string(message.delta);
|
|
776
|
+
return writer;
|
|
777
|
+
},
|
|
778
|
+
decode(input, length) {
|
|
779
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
780
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
781
|
+
const message = createBaseToolCallArgsEvent();
|
|
782
|
+
while (reader.pos < end) {
|
|
783
|
+
const tag = reader.uint32();
|
|
784
|
+
switch (tag >>> 3) {
|
|
785
|
+
case 1:
|
|
786
|
+
if (tag !== 10) break;
|
|
787
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
788
|
+
continue;
|
|
789
|
+
case 2:
|
|
790
|
+
if (tag !== 18) break;
|
|
791
|
+
message.toolCallId = reader.string();
|
|
792
|
+
continue;
|
|
793
|
+
case 3:
|
|
794
|
+
if (tag !== 26) break;
|
|
795
|
+
message.delta = reader.string();
|
|
796
|
+
continue;
|
|
797
|
+
}
|
|
798
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
799
|
+
reader.skip(tag & 7);
|
|
800
|
+
}
|
|
801
|
+
return message;
|
|
802
|
+
},
|
|
803
|
+
create(base) {
|
|
804
|
+
return ToolCallArgsEvent.fromPartial(base ?? {});
|
|
805
|
+
},
|
|
806
|
+
fromPartial(object) {
|
|
807
|
+
const message = createBaseToolCallArgsEvent();
|
|
808
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
809
|
+
message.toolCallId = object.toolCallId ?? "";
|
|
810
|
+
message.delta = object.delta ?? "";
|
|
811
|
+
return message;
|
|
812
|
+
}
|
|
1057
813
|
};
|
|
1058
814
|
function createBaseToolCallEndEvent() {
|
|
1059
|
-
|
|
815
|
+
return {
|
|
816
|
+
baseEvent: void 0,
|
|
817
|
+
toolCallId: ""
|
|
818
|
+
};
|
|
1060
819
|
}
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
}
|
|
1098
|
-
return message;
|
|
1099
|
-
},
|
|
1100
|
-
create(base) {
|
|
1101
|
-
return ToolCallEndEvent.fromPartial(base != null ? base : {});
|
|
1102
|
-
},
|
|
1103
|
-
fromPartial(object) {
|
|
1104
|
-
var _a;
|
|
1105
|
-
const message = createBaseToolCallEndEvent();
|
|
1106
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1107
|
-
message.toolCallId = (_a = object.toolCallId) != null ? _a : "";
|
|
1108
|
-
return message;
|
|
1109
|
-
}
|
|
820
|
+
const ToolCallEndEvent = {
|
|
821
|
+
encode(message, writer = new BinaryWriter()) {
|
|
822
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
823
|
+
if (message.toolCallId !== "") writer.uint32(18).string(message.toolCallId);
|
|
824
|
+
return writer;
|
|
825
|
+
},
|
|
826
|
+
decode(input, length) {
|
|
827
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
828
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
829
|
+
const message = createBaseToolCallEndEvent();
|
|
830
|
+
while (reader.pos < end) {
|
|
831
|
+
const tag = reader.uint32();
|
|
832
|
+
switch (tag >>> 3) {
|
|
833
|
+
case 1:
|
|
834
|
+
if (tag !== 10) break;
|
|
835
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
836
|
+
continue;
|
|
837
|
+
case 2:
|
|
838
|
+
if (tag !== 18) break;
|
|
839
|
+
message.toolCallId = reader.string();
|
|
840
|
+
continue;
|
|
841
|
+
}
|
|
842
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
843
|
+
reader.skip(tag & 7);
|
|
844
|
+
}
|
|
845
|
+
return message;
|
|
846
|
+
},
|
|
847
|
+
create(base) {
|
|
848
|
+
return ToolCallEndEvent.fromPartial(base ?? {});
|
|
849
|
+
},
|
|
850
|
+
fromPartial(object) {
|
|
851
|
+
const message = createBaseToolCallEndEvent();
|
|
852
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
853
|
+
message.toolCallId = object.toolCallId ?? "";
|
|
854
|
+
return message;
|
|
855
|
+
}
|
|
1110
856
|
};
|
|
1111
857
|
function createBaseStateSnapshotEvent() {
|
|
1112
|
-
|
|
858
|
+
return {
|
|
859
|
+
baseEvent: void 0,
|
|
860
|
+
snapshot: void 0
|
|
861
|
+
};
|
|
1113
862
|
}
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
}
|
|
1151
|
-
return message;
|
|
1152
|
-
},
|
|
1153
|
-
create(base) {
|
|
1154
|
-
return StateSnapshotEvent.fromPartial(base != null ? base : {});
|
|
1155
|
-
},
|
|
1156
|
-
fromPartial(object) {
|
|
1157
|
-
var _a;
|
|
1158
|
-
const message = createBaseStateSnapshotEvent();
|
|
1159
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1160
|
-
message.snapshot = (_a = object.snapshot) != null ? _a : void 0;
|
|
1161
|
-
return message;
|
|
1162
|
-
}
|
|
863
|
+
const StateSnapshotEvent = {
|
|
864
|
+
encode(message, writer = new BinaryWriter()) {
|
|
865
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
866
|
+
if (message.snapshot !== void 0) Value.encode(Value.wrap(message.snapshot), writer.uint32(18).fork()).join();
|
|
867
|
+
return writer;
|
|
868
|
+
},
|
|
869
|
+
decode(input, length) {
|
|
870
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
871
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
872
|
+
const message = createBaseStateSnapshotEvent();
|
|
873
|
+
while (reader.pos < end) {
|
|
874
|
+
const tag = reader.uint32();
|
|
875
|
+
switch (tag >>> 3) {
|
|
876
|
+
case 1:
|
|
877
|
+
if (tag !== 10) break;
|
|
878
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
879
|
+
continue;
|
|
880
|
+
case 2:
|
|
881
|
+
if (tag !== 18) break;
|
|
882
|
+
message.snapshot = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
883
|
+
continue;
|
|
884
|
+
}
|
|
885
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
886
|
+
reader.skip(tag & 7);
|
|
887
|
+
}
|
|
888
|
+
return message;
|
|
889
|
+
},
|
|
890
|
+
create(base) {
|
|
891
|
+
return StateSnapshotEvent.fromPartial(base ?? {});
|
|
892
|
+
},
|
|
893
|
+
fromPartial(object) {
|
|
894
|
+
const message = createBaseStateSnapshotEvent();
|
|
895
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
896
|
+
message.snapshot = object.snapshot ?? void 0;
|
|
897
|
+
return message;
|
|
898
|
+
}
|
|
1163
899
|
};
|
|
1164
900
|
function createBaseStateDeltaEvent() {
|
|
1165
|
-
|
|
901
|
+
return {
|
|
902
|
+
baseEvent: void 0,
|
|
903
|
+
delta: []
|
|
904
|
+
};
|
|
1166
905
|
}
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
}
|
|
1204
|
-
return message;
|
|
1205
|
-
},
|
|
1206
|
-
create(base) {
|
|
1207
|
-
return StateDeltaEvent.fromPartial(base != null ? base : {});
|
|
1208
|
-
},
|
|
1209
|
-
fromPartial(object) {
|
|
1210
|
-
var _a;
|
|
1211
|
-
const message = createBaseStateDeltaEvent();
|
|
1212
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1213
|
-
message.delta = ((_a = object.delta) == null ? void 0 : _a.map((e) => JsonPatchOperation.fromPartial(e))) || [];
|
|
1214
|
-
return message;
|
|
1215
|
-
}
|
|
906
|
+
const StateDeltaEvent = {
|
|
907
|
+
encode(message, writer = new BinaryWriter()) {
|
|
908
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
909
|
+
for (const v of message.delta) JsonPatchOperation.encode(v, writer.uint32(18).fork()).join();
|
|
910
|
+
return writer;
|
|
911
|
+
},
|
|
912
|
+
decode(input, length) {
|
|
913
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
914
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
915
|
+
const message = createBaseStateDeltaEvent();
|
|
916
|
+
while (reader.pos < end) {
|
|
917
|
+
const tag = reader.uint32();
|
|
918
|
+
switch (tag >>> 3) {
|
|
919
|
+
case 1:
|
|
920
|
+
if (tag !== 10) break;
|
|
921
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
922
|
+
continue;
|
|
923
|
+
case 2:
|
|
924
|
+
if (tag !== 18) break;
|
|
925
|
+
message.delta.push(JsonPatchOperation.decode(reader, reader.uint32()));
|
|
926
|
+
continue;
|
|
927
|
+
}
|
|
928
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
929
|
+
reader.skip(tag & 7);
|
|
930
|
+
}
|
|
931
|
+
return message;
|
|
932
|
+
},
|
|
933
|
+
create(base) {
|
|
934
|
+
return StateDeltaEvent.fromPartial(base ?? {});
|
|
935
|
+
},
|
|
936
|
+
fromPartial(object) {
|
|
937
|
+
const message = createBaseStateDeltaEvent();
|
|
938
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
939
|
+
message.delta = object.delta?.map((e) => JsonPatchOperation.fromPartial(e)) || [];
|
|
940
|
+
return message;
|
|
941
|
+
}
|
|
1216
942
|
};
|
|
1217
943
|
function createBaseMessagesSnapshotEvent() {
|
|
1218
|
-
|
|
944
|
+
return {
|
|
945
|
+
baseEvent: void 0,
|
|
946
|
+
messages: []
|
|
947
|
+
};
|
|
1219
948
|
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
}
|
|
1257
|
-
return message;
|
|
1258
|
-
},
|
|
1259
|
-
create(base) {
|
|
1260
|
-
return MessagesSnapshotEvent.fromPartial(base != null ? base : {});
|
|
1261
|
-
},
|
|
1262
|
-
fromPartial(object) {
|
|
1263
|
-
var _a;
|
|
1264
|
-
const message = createBaseMessagesSnapshotEvent();
|
|
1265
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1266
|
-
message.messages = ((_a = object.messages) == null ? void 0 : _a.map((e) => Message.fromPartial(e))) || [];
|
|
1267
|
-
return message;
|
|
1268
|
-
}
|
|
949
|
+
const MessagesSnapshotEvent = {
|
|
950
|
+
encode(message, writer = new BinaryWriter()) {
|
|
951
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
952
|
+
for (const v of message.messages) Message.encode(v, writer.uint32(18).fork()).join();
|
|
953
|
+
return writer;
|
|
954
|
+
},
|
|
955
|
+
decode(input, length) {
|
|
956
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
957
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
958
|
+
const message = createBaseMessagesSnapshotEvent();
|
|
959
|
+
while (reader.pos < end) {
|
|
960
|
+
const tag = reader.uint32();
|
|
961
|
+
switch (tag >>> 3) {
|
|
962
|
+
case 1:
|
|
963
|
+
if (tag !== 10) break;
|
|
964
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
965
|
+
continue;
|
|
966
|
+
case 2:
|
|
967
|
+
if (tag !== 18) break;
|
|
968
|
+
message.messages.push(Message.decode(reader, reader.uint32()));
|
|
969
|
+
continue;
|
|
970
|
+
}
|
|
971
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
972
|
+
reader.skip(tag & 7);
|
|
973
|
+
}
|
|
974
|
+
return message;
|
|
975
|
+
},
|
|
976
|
+
create(base) {
|
|
977
|
+
return MessagesSnapshotEvent.fromPartial(base ?? {});
|
|
978
|
+
},
|
|
979
|
+
fromPartial(object) {
|
|
980
|
+
const message = createBaseMessagesSnapshotEvent();
|
|
981
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
982
|
+
message.messages = object.messages?.map((e) => Message.fromPartial(e)) || [];
|
|
983
|
+
return message;
|
|
984
|
+
}
|
|
1269
985
|
};
|
|
1270
986
|
function createBaseRawEvent() {
|
|
1271
|
-
|
|
987
|
+
return {
|
|
988
|
+
baseEvent: void 0,
|
|
989
|
+
event: void 0,
|
|
990
|
+
source: void 0
|
|
991
|
+
};
|
|
1272
992
|
}
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1316
|
-
break;
|
|
1317
|
-
}
|
|
1318
|
-
reader.skip(tag & 7);
|
|
1319
|
-
}
|
|
1320
|
-
return message;
|
|
1321
|
-
},
|
|
1322
|
-
create(base) {
|
|
1323
|
-
return RawEvent.fromPartial(base != null ? base : {});
|
|
1324
|
-
},
|
|
1325
|
-
fromPartial(object) {
|
|
1326
|
-
var _a, _b;
|
|
1327
|
-
const message = createBaseRawEvent();
|
|
1328
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1329
|
-
message.event = (_a = object.event) != null ? _a : void 0;
|
|
1330
|
-
message.source = (_b = object.source) != null ? _b : void 0;
|
|
1331
|
-
return message;
|
|
1332
|
-
}
|
|
993
|
+
const RawEvent = {
|
|
994
|
+
encode(message, writer = new BinaryWriter()) {
|
|
995
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
996
|
+
if (message.event !== void 0) Value.encode(Value.wrap(message.event), writer.uint32(18).fork()).join();
|
|
997
|
+
if (message.source !== void 0) writer.uint32(26).string(message.source);
|
|
998
|
+
return writer;
|
|
999
|
+
},
|
|
1000
|
+
decode(input, length) {
|
|
1001
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1002
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1003
|
+
const message = createBaseRawEvent();
|
|
1004
|
+
while (reader.pos < end) {
|
|
1005
|
+
const tag = reader.uint32();
|
|
1006
|
+
switch (tag >>> 3) {
|
|
1007
|
+
case 1:
|
|
1008
|
+
if (tag !== 10) break;
|
|
1009
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
1010
|
+
continue;
|
|
1011
|
+
case 2:
|
|
1012
|
+
if (tag !== 18) break;
|
|
1013
|
+
message.event = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
1014
|
+
continue;
|
|
1015
|
+
case 3:
|
|
1016
|
+
if (tag !== 26) break;
|
|
1017
|
+
message.source = reader.string();
|
|
1018
|
+
continue;
|
|
1019
|
+
}
|
|
1020
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1021
|
+
reader.skip(tag & 7);
|
|
1022
|
+
}
|
|
1023
|
+
return message;
|
|
1024
|
+
},
|
|
1025
|
+
create(base) {
|
|
1026
|
+
return RawEvent.fromPartial(base ?? {});
|
|
1027
|
+
},
|
|
1028
|
+
fromPartial(object) {
|
|
1029
|
+
const message = createBaseRawEvent();
|
|
1030
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
1031
|
+
message.event = object.event ?? void 0;
|
|
1032
|
+
message.source = object.source ?? void 0;
|
|
1033
|
+
return message;
|
|
1034
|
+
}
|
|
1333
1035
|
};
|
|
1334
1036
|
function createBaseCustomEvent() {
|
|
1335
|
-
|
|
1037
|
+
return {
|
|
1038
|
+
baseEvent: void 0,
|
|
1039
|
+
name: "",
|
|
1040
|
+
value: void 0
|
|
1041
|
+
};
|
|
1336
1042
|
}
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1380
|
-
break;
|
|
1381
|
-
}
|
|
1382
|
-
reader.skip(tag & 7);
|
|
1383
|
-
}
|
|
1384
|
-
return message;
|
|
1385
|
-
},
|
|
1386
|
-
create(base) {
|
|
1387
|
-
return CustomEvent.fromPartial(base != null ? base : {});
|
|
1388
|
-
},
|
|
1389
|
-
fromPartial(object) {
|
|
1390
|
-
var _a, _b;
|
|
1391
|
-
const message = createBaseCustomEvent();
|
|
1392
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1393
|
-
message.name = (_a = object.name) != null ? _a : "";
|
|
1394
|
-
message.value = (_b = object.value) != null ? _b : void 0;
|
|
1395
|
-
return message;
|
|
1396
|
-
}
|
|
1043
|
+
const CustomEvent = {
|
|
1044
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1045
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
1046
|
+
if (message.name !== "") writer.uint32(18).string(message.name);
|
|
1047
|
+
if (message.value !== void 0) Value.encode(Value.wrap(message.value), writer.uint32(26).fork()).join();
|
|
1048
|
+
return writer;
|
|
1049
|
+
},
|
|
1050
|
+
decode(input, length) {
|
|
1051
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1052
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1053
|
+
const message = createBaseCustomEvent();
|
|
1054
|
+
while (reader.pos < end) {
|
|
1055
|
+
const tag = reader.uint32();
|
|
1056
|
+
switch (tag >>> 3) {
|
|
1057
|
+
case 1:
|
|
1058
|
+
if (tag !== 10) break;
|
|
1059
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
1060
|
+
continue;
|
|
1061
|
+
case 2:
|
|
1062
|
+
if (tag !== 18) break;
|
|
1063
|
+
message.name = reader.string();
|
|
1064
|
+
continue;
|
|
1065
|
+
case 3:
|
|
1066
|
+
if (tag !== 26) break;
|
|
1067
|
+
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
1068
|
+
continue;
|
|
1069
|
+
}
|
|
1070
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1071
|
+
reader.skip(tag & 7);
|
|
1072
|
+
}
|
|
1073
|
+
return message;
|
|
1074
|
+
},
|
|
1075
|
+
create(base) {
|
|
1076
|
+
return CustomEvent.fromPartial(base ?? {});
|
|
1077
|
+
},
|
|
1078
|
+
fromPartial(object) {
|
|
1079
|
+
const message = createBaseCustomEvent();
|
|
1080
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
1081
|
+
message.name = object.name ?? "";
|
|
1082
|
+
message.value = object.value ?? void 0;
|
|
1083
|
+
return message;
|
|
1084
|
+
}
|
|
1397
1085
|
};
|
|
1398
1086
|
function createBaseRunStartedEvent() {
|
|
1399
|
-
|
|
1087
|
+
return {
|
|
1088
|
+
baseEvent: void 0,
|
|
1089
|
+
threadId: "",
|
|
1090
|
+
runId: ""
|
|
1091
|
+
};
|
|
1400
1092
|
}
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1444
|
-
break;
|
|
1445
|
-
}
|
|
1446
|
-
reader.skip(tag & 7);
|
|
1447
|
-
}
|
|
1448
|
-
return message;
|
|
1449
|
-
},
|
|
1450
|
-
create(base) {
|
|
1451
|
-
return RunStartedEvent.fromPartial(base != null ? base : {});
|
|
1452
|
-
},
|
|
1453
|
-
fromPartial(object) {
|
|
1454
|
-
var _a, _b;
|
|
1455
|
-
const message = createBaseRunStartedEvent();
|
|
1456
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1457
|
-
message.threadId = (_a = object.threadId) != null ? _a : "";
|
|
1458
|
-
message.runId = (_b = object.runId) != null ? _b : "";
|
|
1459
|
-
return message;
|
|
1460
|
-
}
|
|
1093
|
+
const RunStartedEvent = {
|
|
1094
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1095
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
1096
|
+
if (message.threadId !== "") writer.uint32(18).string(message.threadId);
|
|
1097
|
+
if (message.runId !== "") writer.uint32(26).string(message.runId);
|
|
1098
|
+
return writer;
|
|
1099
|
+
},
|
|
1100
|
+
decode(input, length) {
|
|
1101
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1102
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1103
|
+
const message = createBaseRunStartedEvent();
|
|
1104
|
+
while (reader.pos < end) {
|
|
1105
|
+
const tag = reader.uint32();
|
|
1106
|
+
switch (tag >>> 3) {
|
|
1107
|
+
case 1:
|
|
1108
|
+
if (tag !== 10) break;
|
|
1109
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
1110
|
+
continue;
|
|
1111
|
+
case 2:
|
|
1112
|
+
if (tag !== 18) break;
|
|
1113
|
+
message.threadId = reader.string();
|
|
1114
|
+
continue;
|
|
1115
|
+
case 3:
|
|
1116
|
+
if (tag !== 26) break;
|
|
1117
|
+
message.runId = reader.string();
|
|
1118
|
+
continue;
|
|
1119
|
+
}
|
|
1120
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1121
|
+
reader.skip(tag & 7);
|
|
1122
|
+
}
|
|
1123
|
+
return message;
|
|
1124
|
+
},
|
|
1125
|
+
create(base) {
|
|
1126
|
+
return RunStartedEvent.fromPartial(base ?? {});
|
|
1127
|
+
},
|
|
1128
|
+
fromPartial(object) {
|
|
1129
|
+
const message = createBaseRunStartedEvent();
|
|
1130
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
1131
|
+
message.threadId = object.threadId ?? "";
|
|
1132
|
+
message.runId = object.runId ?? "";
|
|
1133
|
+
return message;
|
|
1134
|
+
}
|
|
1461
1135
|
};
|
|
1462
1136
|
function createBaseRunFinishedEvent() {
|
|
1463
|
-
|
|
1137
|
+
return {
|
|
1138
|
+
baseEvent: void 0,
|
|
1139
|
+
threadId: "",
|
|
1140
|
+
runId: "",
|
|
1141
|
+
result: void 0
|
|
1142
|
+
};
|
|
1464
1143
|
}
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
message.result = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
1514
|
-
continue;
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1518
|
-
break;
|
|
1519
|
-
}
|
|
1520
|
-
reader.skip(tag & 7);
|
|
1521
|
-
}
|
|
1522
|
-
return message;
|
|
1523
|
-
},
|
|
1524
|
-
create(base) {
|
|
1525
|
-
return RunFinishedEvent.fromPartial(base != null ? base : {});
|
|
1526
|
-
},
|
|
1527
|
-
fromPartial(object) {
|
|
1528
|
-
var _a, _b, _c;
|
|
1529
|
-
const message = createBaseRunFinishedEvent();
|
|
1530
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1531
|
-
message.threadId = (_a = object.threadId) != null ? _a : "";
|
|
1532
|
-
message.runId = (_b = object.runId) != null ? _b : "";
|
|
1533
|
-
message.result = (_c = object.result) != null ? _c : void 0;
|
|
1534
|
-
return message;
|
|
1535
|
-
}
|
|
1144
|
+
const RunFinishedEvent = {
|
|
1145
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1146
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
1147
|
+
if (message.threadId !== "") writer.uint32(18).string(message.threadId);
|
|
1148
|
+
if (message.runId !== "") writer.uint32(26).string(message.runId);
|
|
1149
|
+
if (message.result !== void 0) Value.encode(Value.wrap(message.result), writer.uint32(34).fork()).join();
|
|
1150
|
+
return writer;
|
|
1151
|
+
},
|
|
1152
|
+
decode(input, length) {
|
|
1153
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1154
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1155
|
+
const message = createBaseRunFinishedEvent();
|
|
1156
|
+
while (reader.pos < end) {
|
|
1157
|
+
const tag = reader.uint32();
|
|
1158
|
+
switch (tag >>> 3) {
|
|
1159
|
+
case 1:
|
|
1160
|
+
if (tag !== 10) break;
|
|
1161
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
1162
|
+
continue;
|
|
1163
|
+
case 2:
|
|
1164
|
+
if (tag !== 18) break;
|
|
1165
|
+
message.threadId = reader.string();
|
|
1166
|
+
continue;
|
|
1167
|
+
case 3:
|
|
1168
|
+
if (tag !== 26) break;
|
|
1169
|
+
message.runId = reader.string();
|
|
1170
|
+
continue;
|
|
1171
|
+
case 4:
|
|
1172
|
+
if (tag !== 34) break;
|
|
1173
|
+
message.result = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
1174
|
+
continue;
|
|
1175
|
+
}
|
|
1176
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1177
|
+
reader.skip(tag & 7);
|
|
1178
|
+
}
|
|
1179
|
+
return message;
|
|
1180
|
+
},
|
|
1181
|
+
create(base) {
|
|
1182
|
+
return RunFinishedEvent.fromPartial(base ?? {});
|
|
1183
|
+
},
|
|
1184
|
+
fromPartial(object) {
|
|
1185
|
+
const message = createBaseRunFinishedEvent();
|
|
1186
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
1187
|
+
message.threadId = object.threadId ?? "";
|
|
1188
|
+
message.runId = object.runId ?? "";
|
|
1189
|
+
message.result = object.result ?? void 0;
|
|
1190
|
+
return message;
|
|
1191
|
+
}
|
|
1536
1192
|
};
|
|
1537
1193
|
function createBaseRunErrorEvent() {
|
|
1538
|
-
|
|
1194
|
+
return {
|
|
1195
|
+
baseEvent: void 0,
|
|
1196
|
+
code: void 0,
|
|
1197
|
+
message: ""
|
|
1198
|
+
};
|
|
1539
1199
|
}
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1583
|
-
break;
|
|
1584
|
-
}
|
|
1585
|
-
reader.skip(tag & 7);
|
|
1586
|
-
}
|
|
1587
|
-
return message;
|
|
1588
|
-
},
|
|
1589
|
-
create(base) {
|
|
1590
|
-
return RunErrorEvent.fromPartial(base != null ? base : {});
|
|
1591
|
-
},
|
|
1592
|
-
fromPartial(object) {
|
|
1593
|
-
var _a, _b;
|
|
1594
|
-
const message = createBaseRunErrorEvent();
|
|
1595
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1596
|
-
message.code = (_a = object.code) != null ? _a : void 0;
|
|
1597
|
-
message.message = (_b = object.message) != null ? _b : "";
|
|
1598
|
-
return message;
|
|
1599
|
-
}
|
|
1200
|
+
const RunErrorEvent = {
|
|
1201
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1202
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
1203
|
+
if (message.code !== void 0) writer.uint32(18).string(message.code);
|
|
1204
|
+
if (message.message !== "") writer.uint32(26).string(message.message);
|
|
1205
|
+
return writer;
|
|
1206
|
+
},
|
|
1207
|
+
decode(input, length) {
|
|
1208
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1209
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1210
|
+
const message = createBaseRunErrorEvent();
|
|
1211
|
+
while (reader.pos < end) {
|
|
1212
|
+
const tag = reader.uint32();
|
|
1213
|
+
switch (tag >>> 3) {
|
|
1214
|
+
case 1:
|
|
1215
|
+
if (tag !== 10) break;
|
|
1216
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
1217
|
+
continue;
|
|
1218
|
+
case 2:
|
|
1219
|
+
if (tag !== 18) break;
|
|
1220
|
+
message.code = reader.string();
|
|
1221
|
+
continue;
|
|
1222
|
+
case 3:
|
|
1223
|
+
if (tag !== 26) break;
|
|
1224
|
+
message.message = reader.string();
|
|
1225
|
+
continue;
|
|
1226
|
+
}
|
|
1227
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1228
|
+
reader.skip(tag & 7);
|
|
1229
|
+
}
|
|
1230
|
+
return message;
|
|
1231
|
+
},
|
|
1232
|
+
create(base) {
|
|
1233
|
+
return RunErrorEvent.fromPartial(base ?? {});
|
|
1234
|
+
},
|
|
1235
|
+
fromPartial(object) {
|
|
1236
|
+
const message = createBaseRunErrorEvent();
|
|
1237
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
1238
|
+
message.code = object.code ?? void 0;
|
|
1239
|
+
message.message = object.message ?? "";
|
|
1240
|
+
return message;
|
|
1241
|
+
}
|
|
1600
1242
|
};
|
|
1601
1243
|
function createBaseStepStartedEvent() {
|
|
1602
|
-
|
|
1244
|
+
return {
|
|
1245
|
+
baseEvent: void 0,
|
|
1246
|
+
stepName: ""
|
|
1247
|
+
};
|
|
1603
1248
|
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
}
|
|
1641
|
-
return message;
|
|
1642
|
-
},
|
|
1643
|
-
create(base) {
|
|
1644
|
-
return StepStartedEvent.fromPartial(base != null ? base : {});
|
|
1645
|
-
},
|
|
1646
|
-
fromPartial(object) {
|
|
1647
|
-
var _a;
|
|
1648
|
-
const message = createBaseStepStartedEvent();
|
|
1649
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1650
|
-
message.stepName = (_a = object.stepName) != null ? _a : "";
|
|
1651
|
-
return message;
|
|
1652
|
-
}
|
|
1249
|
+
const StepStartedEvent = {
|
|
1250
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1251
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
1252
|
+
if (message.stepName !== "") writer.uint32(18).string(message.stepName);
|
|
1253
|
+
return writer;
|
|
1254
|
+
},
|
|
1255
|
+
decode(input, length) {
|
|
1256
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1257
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1258
|
+
const message = createBaseStepStartedEvent();
|
|
1259
|
+
while (reader.pos < end) {
|
|
1260
|
+
const tag = reader.uint32();
|
|
1261
|
+
switch (tag >>> 3) {
|
|
1262
|
+
case 1:
|
|
1263
|
+
if (tag !== 10) break;
|
|
1264
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
1265
|
+
continue;
|
|
1266
|
+
case 2:
|
|
1267
|
+
if (tag !== 18) break;
|
|
1268
|
+
message.stepName = reader.string();
|
|
1269
|
+
continue;
|
|
1270
|
+
}
|
|
1271
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1272
|
+
reader.skip(tag & 7);
|
|
1273
|
+
}
|
|
1274
|
+
return message;
|
|
1275
|
+
},
|
|
1276
|
+
create(base) {
|
|
1277
|
+
return StepStartedEvent.fromPartial(base ?? {});
|
|
1278
|
+
},
|
|
1279
|
+
fromPartial(object) {
|
|
1280
|
+
const message = createBaseStepStartedEvent();
|
|
1281
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
1282
|
+
message.stepName = object.stepName ?? "";
|
|
1283
|
+
return message;
|
|
1284
|
+
}
|
|
1653
1285
|
};
|
|
1654
1286
|
function createBaseStepFinishedEvent() {
|
|
1655
|
-
|
|
1287
|
+
return {
|
|
1288
|
+
baseEvent: void 0,
|
|
1289
|
+
stepName: ""
|
|
1290
|
+
};
|
|
1656
1291
|
}
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
}
|
|
1694
|
-
return message;
|
|
1695
|
-
},
|
|
1696
|
-
create(base) {
|
|
1697
|
-
return StepFinishedEvent.fromPartial(base != null ? base : {});
|
|
1698
|
-
},
|
|
1699
|
-
fromPartial(object) {
|
|
1700
|
-
var _a;
|
|
1701
|
-
const message = createBaseStepFinishedEvent();
|
|
1702
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1703
|
-
message.stepName = (_a = object.stepName) != null ? _a : "";
|
|
1704
|
-
return message;
|
|
1705
|
-
}
|
|
1292
|
+
const StepFinishedEvent = {
|
|
1293
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1294
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
1295
|
+
if (message.stepName !== "") writer.uint32(18).string(message.stepName);
|
|
1296
|
+
return writer;
|
|
1297
|
+
},
|
|
1298
|
+
decode(input, length) {
|
|
1299
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1300
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1301
|
+
const message = createBaseStepFinishedEvent();
|
|
1302
|
+
while (reader.pos < end) {
|
|
1303
|
+
const tag = reader.uint32();
|
|
1304
|
+
switch (tag >>> 3) {
|
|
1305
|
+
case 1:
|
|
1306
|
+
if (tag !== 10) break;
|
|
1307
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
1308
|
+
continue;
|
|
1309
|
+
case 2:
|
|
1310
|
+
if (tag !== 18) break;
|
|
1311
|
+
message.stepName = reader.string();
|
|
1312
|
+
continue;
|
|
1313
|
+
}
|
|
1314
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1315
|
+
reader.skip(tag & 7);
|
|
1316
|
+
}
|
|
1317
|
+
return message;
|
|
1318
|
+
},
|
|
1319
|
+
create(base) {
|
|
1320
|
+
return StepFinishedEvent.fromPartial(base ?? {});
|
|
1321
|
+
},
|
|
1322
|
+
fromPartial(object) {
|
|
1323
|
+
const message = createBaseStepFinishedEvent();
|
|
1324
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
1325
|
+
message.stepName = object.stepName ?? "";
|
|
1326
|
+
return message;
|
|
1327
|
+
}
|
|
1706
1328
|
};
|
|
1707
1329
|
function createBaseTextMessageChunkEvent() {
|
|
1708
|
-
|
|
1330
|
+
return {
|
|
1331
|
+
baseEvent: void 0,
|
|
1332
|
+
messageId: void 0,
|
|
1333
|
+
role: void 0,
|
|
1334
|
+
delta: void 0
|
|
1335
|
+
};
|
|
1709
1336
|
}
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
message.delta = reader.string();
|
|
1759
|
-
continue;
|
|
1760
|
-
}
|
|
1761
|
-
}
|
|
1762
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1763
|
-
break;
|
|
1764
|
-
}
|
|
1765
|
-
reader.skip(tag & 7);
|
|
1766
|
-
}
|
|
1767
|
-
return message;
|
|
1768
|
-
},
|
|
1769
|
-
create(base) {
|
|
1770
|
-
return TextMessageChunkEvent.fromPartial(base != null ? base : {});
|
|
1771
|
-
},
|
|
1772
|
-
fromPartial(object) {
|
|
1773
|
-
var _a, _b, _c;
|
|
1774
|
-
const message = createBaseTextMessageChunkEvent();
|
|
1775
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1776
|
-
message.messageId = (_a = object.messageId) != null ? _a : void 0;
|
|
1777
|
-
message.role = (_b = object.role) != null ? _b : void 0;
|
|
1778
|
-
message.delta = (_c = object.delta) != null ? _c : void 0;
|
|
1779
|
-
return message;
|
|
1780
|
-
}
|
|
1337
|
+
const TextMessageChunkEvent = {
|
|
1338
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1339
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
1340
|
+
if (message.messageId !== void 0) writer.uint32(18).string(message.messageId);
|
|
1341
|
+
if (message.role !== void 0) writer.uint32(26).string(message.role);
|
|
1342
|
+
if (message.delta !== void 0) writer.uint32(34).string(message.delta);
|
|
1343
|
+
return writer;
|
|
1344
|
+
},
|
|
1345
|
+
decode(input, length) {
|
|
1346
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1347
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1348
|
+
const message = createBaseTextMessageChunkEvent();
|
|
1349
|
+
while (reader.pos < end) {
|
|
1350
|
+
const tag = reader.uint32();
|
|
1351
|
+
switch (tag >>> 3) {
|
|
1352
|
+
case 1:
|
|
1353
|
+
if (tag !== 10) break;
|
|
1354
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
1355
|
+
continue;
|
|
1356
|
+
case 2:
|
|
1357
|
+
if (tag !== 18) break;
|
|
1358
|
+
message.messageId = reader.string();
|
|
1359
|
+
continue;
|
|
1360
|
+
case 3:
|
|
1361
|
+
if (tag !== 26) break;
|
|
1362
|
+
message.role = reader.string();
|
|
1363
|
+
continue;
|
|
1364
|
+
case 4:
|
|
1365
|
+
if (tag !== 34) break;
|
|
1366
|
+
message.delta = reader.string();
|
|
1367
|
+
continue;
|
|
1368
|
+
}
|
|
1369
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1370
|
+
reader.skip(tag & 7);
|
|
1371
|
+
}
|
|
1372
|
+
return message;
|
|
1373
|
+
},
|
|
1374
|
+
create(base) {
|
|
1375
|
+
return TextMessageChunkEvent.fromPartial(base ?? {});
|
|
1376
|
+
},
|
|
1377
|
+
fromPartial(object) {
|
|
1378
|
+
const message = createBaseTextMessageChunkEvent();
|
|
1379
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
1380
|
+
message.messageId = object.messageId ?? void 0;
|
|
1381
|
+
message.role = object.role ?? void 0;
|
|
1382
|
+
message.delta = object.delta ?? void 0;
|
|
1383
|
+
return message;
|
|
1384
|
+
}
|
|
1781
1385
|
};
|
|
1782
1386
|
function createBaseToolCallChunkEvent() {
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1387
|
+
return {
|
|
1388
|
+
baseEvent: void 0,
|
|
1389
|
+
toolCallId: void 0,
|
|
1390
|
+
toolCallName: void 0,
|
|
1391
|
+
parentMessageId: void 0,
|
|
1392
|
+
delta: void 0
|
|
1393
|
+
};
|
|
1790
1394
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
case 5: {
|
|
1846
|
-
if (tag !== 42) {
|
|
1847
|
-
break;
|
|
1848
|
-
}
|
|
1849
|
-
message.delta = reader.string();
|
|
1850
|
-
continue;
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1854
|
-
break;
|
|
1855
|
-
}
|
|
1856
|
-
reader.skip(tag & 7);
|
|
1857
|
-
}
|
|
1858
|
-
return message;
|
|
1859
|
-
},
|
|
1860
|
-
create(base) {
|
|
1861
|
-
return ToolCallChunkEvent.fromPartial(base != null ? base : {});
|
|
1862
|
-
},
|
|
1863
|
-
fromPartial(object) {
|
|
1864
|
-
var _a, _b, _c, _d;
|
|
1865
|
-
const message = createBaseToolCallChunkEvent();
|
|
1866
|
-
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent.fromPartial(object.baseEvent) : void 0;
|
|
1867
|
-
message.toolCallId = (_a = object.toolCallId) != null ? _a : void 0;
|
|
1868
|
-
message.toolCallName = (_b = object.toolCallName) != null ? _b : void 0;
|
|
1869
|
-
message.parentMessageId = (_c = object.parentMessageId) != null ? _c : void 0;
|
|
1870
|
-
message.delta = (_d = object.delta) != null ? _d : void 0;
|
|
1871
|
-
return message;
|
|
1872
|
-
}
|
|
1395
|
+
const ToolCallChunkEvent = {
|
|
1396
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1397
|
+
if (message.baseEvent !== void 0) BaseEvent$1.encode(message.baseEvent, writer.uint32(10).fork()).join();
|
|
1398
|
+
if (message.toolCallId !== void 0) writer.uint32(18).string(message.toolCallId);
|
|
1399
|
+
if (message.toolCallName !== void 0) writer.uint32(26).string(message.toolCallName);
|
|
1400
|
+
if (message.parentMessageId !== void 0) writer.uint32(34).string(message.parentMessageId);
|
|
1401
|
+
if (message.delta !== void 0) writer.uint32(42).string(message.delta);
|
|
1402
|
+
return writer;
|
|
1403
|
+
},
|
|
1404
|
+
decode(input, length) {
|
|
1405
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1406
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1407
|
+
const message = createBaseToolCallChunkEvent();
|
|
1408
|
+
while (reader.pos < end) {
|
|
1409
|
+
const tag = reader.uint32();
|
|
1410
|
+
switch (tag >>> 3) {
|
|
1411
|
+
case 1:
|
|
1412
|
+
if (tag !== 10) break;
|
|
1413
|
+
message.baseEvent = BaseEvent$1.decode(reader, reader.uint32());
|
|
1414
|
+
continue;
|
|
1415
|
+
case 2:
|
|
1416
|
+
if (tag !== 18) break;
|
|
1417
|
+
message.toolCallId = reader.string();
|
|
1418
|
+
continue;
|
|
1419
|
+
case 3:
|
|
1420
|
+
if (tag !== 26) break;
|
|
1421
|
+
message.toolCallName = reader.string();
|
|
1422
|
+
continue;
|
|
1423
|
+
case 4:
|
|
1424
|
+
if (tag !== 34) break;
|
|
1425
|
+
message.parentMessageId = reader.string();
|
|
1426
|
+
continue;
|
|
1427
|
+
case 5:
|
|
1428
|
+
if (tag !== 42) break;
|
|
1429
|
+
message.delta = reader.string();
|
|
1430
|
+
continue;
|
|
1431
|
+
}
|
|
1432
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1433
|
+
reader.skip(tag & 7);
|
|
1434
|
+
}
|
|
1435
|
+
return message;
|
|
1436
|
+
},
|
|
1437
|
+
create(base) {
|
|
1438
|
+
return ToolCallChunkEvent.fromPartial(base ?? {});
|
|
1439
|
+
},
|
|
1440
|
+
fromPartial(object) {
|
|
1441
|
+
const message = createBaseToolCallChunkEvent();
|
|
1442
|
+
message.baseEvent = object.baseEvent !== void 0 && object.baseEvent !== null ? BaseEvent$1.fromPartial(object.baseEvent) : void 0;
|
|
1443
|
+
message.toolCallId = object.toolCallId ?? void 0;
|
|
1444
|
+
message.toolCallName = object.toolCallName ?? void 0;
|
|
1445
|
+
message.parentMessageId = object.parentMessageId ?? void 0;
|
|
1446
|
+
message.delta = object.delta ?? void 0;
|
|
1447
|
+
return message;
|
|
1448
|
+
}
|
|
1873
1449
|
};
|
|
1874
1450
|
function createBaseEvent() {
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1451
|
+
return {
|
|
1452
|
+
textMessageStart: void 0,
|
|
1453
|
+
textMessageContent: void 0,
|
|
1454
|
+
textMessageEnd: void 0,
|
|
1455
|
+
toolCallStart: void 0,
|
|
1456
|
+
toolCallArgs: void 0,
|
|
1457
|
+
toolCallEnd: void 0,
|
|
1458
|
+
stateSnapshot: void 0,
|
|
1459
|
+
stateDelta: void 0,
|
|
1460
|
+
messagesSnapshot: void 0,
|
|
1461
|
+
raw: void 0,
|
|
1462
|
+
custom: void 0,
|
|
1463
|
+
runStarted: void 0,
|
|
1464
|
+
runFinished: void 0,
|
|
1465
|
+
runError: void 0,
|
|
1466
|
+
stepStarted: void 0,
|
|
1467
|
+
stepFinished: void 0,
|
|
1468
|
+
textMessageChunk: void 0,
|
|
1469
|
+
toolCallChunk: void 0
|
|
1470
|
+
};
|
|
1895
1471
|
}
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
message.raw = RawEvent.decode(reader, reader.uint32());
|
|
2029
|
-
continue;
|
|
2030
|
-
}
|
|
2031
|
-
case 11: {
|
|
2032
|
-
if (tag !== 90) {
|
|
2033
|
-
break;
|
|
2034
|
-
}
|
|
2035
|
-
message.custom = CustomEvent.decode(reader, reader.uint32());
|
|
2036
|
-
continue;
|
|
2037
|
-
}
|
|
2038
|
-
case 12: {
|
|
2039
|
-
if (tag !== 98) {
|
|
2040
|
-
break;
|
|
2041
|
-
}
|
|
2042
|
-
message.runStarted = RunStartedEvent.decode(reader, reader.uint32());
|
|
2043
|
-
continue;
|
|
2044
|
-
}
|
|
2045
|
-
case 13: {
|
|
2046
|
-
if (tag !== 106) {
|
|
2047
|
-
break;
|
|
2048
|
-
}
|
|
2049
|
-
message.runFinished = RunFinishedEvent.decode(reader, reader.uint32());
|
|
2050
|
-
continue;
|
|
2051
|
-
}
|
|
2052
|
-
case 14: {
|
|
2053
|
-
if (tag !== 114) {
|
|
2054
|
-
break;
|
|
2055
|
-
}
|
|
2056
|
-
message.runError = RunErrorEvent.decode(reader, reader.uint32());
|
|
2057
|
-
continue;
|
|
2058
|
-
}
|
|
2059
|
-
case 15: {
|
|
2060
|
-
if (tag !== 122) {
|
|
2061
|
-
break;
|
|
2062
|
-
}
|
|
2063
|
-
message.stepStarted = StepStartedEvent.decode(reader, reader.uint32());
|
|
2064
|
-
continue;
|
|
2065
|
-
}
|
|
2066
|
-
case 16: {
|
|
2067
|
-
if (tag !== 130) {
|
|
2068
|
-
break;
|
|
2069
|
-
}
|
|
2070
|
-
message.stepFinished = StepFinishedEvent.decode(reader, reader.uint32());
|
|
2071
|
-
continue;
|
|
2072
|
-
}
|
|
2073
|
-
case 17: {
|
|
2074
|
-
if (tag !== 138) {
|
|
2075
|
-
break;
|
|
2076
|
-
}
|
|
2077
|
-
message.textMessageChunk = TextMessageChunkEvent.decode(reader, reader.uint32());
|
|
2078
|
-
continue;
|
|
2079
|
-
}
|
|
2080
|
-
case 18: {
|
|
2081
|
-
if (tag !== 146) {
|
|
2082
|
-
break;
|
|
2083
|
-
}
|
|
2084
|
-
message.toolCallChunk = ToolCallChunkEvent.decode(reader, reader.uint32());
|
|
2085
|
-
continue;
|
|
2086
|
-
}
|
|
2087
|
-
}
|
|
2088
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2089
|
-
break;
|
|
2090
|
-
}
|
|
2091
|
-
reader.skip(tag & 7);
|
|
2092
|
-
}
|
|
2093
|
-
return message;
|
|
2094
|
-
},
|
|
2095
|
-
create(base) {
|
|
2096
|
-
return Event.fromPartial(base != null ? base : {});
|
|
2097
|
-
},
|
|
2098
|
-
fromPartial(object) {
|
|
2099
|
-
const message = createBaseEvent();
|
|
2100
|
-
message.textMessageStart = object.textMessageStart !== void 0 && object.textMessageStart !== null ? TextMessageStartEvent.fromPartial(object.textMessageStart) : void 0;
|
|
2101
|
-
message.textMessageContent = object.textMessageContent !== void 0 && object.textMessageContent !== null ? TextMessageContentEvent.fromPartial(object.textMessageContent) : void 0;
|
|
2102
|
-
message.textMessageEnd = object.textMessageEnd !== void 0 && object.textMessageEnd !== null ? TextMessageEndEvent.fromPartial(object.textMessageEnd) : void 0;
|
|
2103
|
-
message.toolCallStart = object.toolCallStart !== void 0 && object.toolCallStart !== null ? ToolCallStartEvent.fromPartial(object.toolCallStart) : void 0;
|
|
2104
|
-
message.toolCallArgs = object.toolCallArgs !== void 0 && object.toolCallArgs !== null ? ToolCallArgsEvent.fromPartial(object.toolCallArgs) : void 0;
|
|
2105
|
-
message.toolCallEnd = object.toolCallEnd !== void 0 && object.toolCallEnd !== null ? ToolCallEndEvent.fromPartial(object.toolCallEnd) : void 0;
|
|
2106
|
-
message.stateSnapshot = object.stateSnapshot !== void 0 && object.stateSnapshot !== null ? StateSnapshotEvent.fromPartial(object.stateSnapshot) : void 0;
|
|
2107
|
-
message.stateDelta = object.stateDelta !== void 0 && object.stateDelta !== null ? StateDeltaEvent.fromPartial(object.stateDelta) : void 0;
|
|
2108
|
-
message.messagesSnapshot = object.messagesSnapshot !== void 0 && object.messagesSnapshot !== null ? MessagesSnapshotEvent.fromPartial(object.messagesSnapshot) : void 0;
|
|
2109
|
-
message.raw = object.raw !== void 0 && object.raw !== null ? RawEvent.fromPartial(object.raw) : void 0;
|
|
2110
|
-
message.custom = object.custom !== void 0 && object.custom !== null ? CustomEvent.fromPartial(object.custom) : void 0;
|
|
2111
|
-
message.runStarted = object.runStarted !== void 0 && object.runStarted !== null ? RunStartedEvent.fromPartial(object.runStarted) : void 0;
|
|
2112
|
-
message.runFinished = object.runFinished !== void 0 && object.runFinished !== null ? RunFinishedEvent.fromPartial(object.runFinished) : void 0;
|
|
2113
|
-
message.runError = object.runError !== void 0 && object.runError !== null ? RunErrorEvent.fromPartial(object.runError) : void 0;
|
|
2114
|
-
message.stepStarted = object.stepStarted !== void 0 && object.stepStarted !== null ? StepStartedEvent.fromPartial(object.stepStarted) : void 0;
|
|
2115
|
-
message.stepFinished = object.stepFinished !== void 0 && object.stepFinished !== null ? StepFinishedEvent.fromPartial(object.stepFinished) : void 0;
|
|
2116
|
-
message.textMessageChunk = object.textMessageChunk !== void 0 && object.textMessageChunk !== null ? TextMessageChunkEvent.fromPartial(object.textMessageChunk) : void 0;
|
|
2117
|
-
message.toolCallChunk = object.toolCallChunk !== void 0 && object.toolCallChunk !== null ? ToolCallChunkEvent.fromPartial(object.toolCallChunk) : void 0;
|
|
2118
|
-
return message;
|
|
2119
|
-
}
|
|
1472
|
+
const Event = {
|
|
1473
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1474
|
+
if (message.textMessageStart !== void 0) TextMessageStartEvent.encode(message.textMessageStart, writer.uint32(10).fork()).join();
|
|
1475
|
+
if (message.textMessageContent !== void 0) TextMessageContentEvent.encode(message.textMessageContent, writer.uint32(18).fork()).join();
|
|
1476
|
+
if (message.textMessageEnd !== void 0) TextMessageEndEvent.encode(message.textMessageEnd, writer.uint32(26).fork()).join();
|
|
1477
|
+
if (message.toolCallStart !== void 0) ToolCallStartEvent.encode(message.toolCallStart, writer.uint32(34).fork()).join();
|
|
1478
|
+
if (message.toolCallArgs !== void 0) ToolCallArgsEvent.encode(message.toolCallArgs, writer.uint32(42).fork()).join();
|
|
1479
|
+
if (message.toolCallEnd !== void 0) ToolCallEndEvent.encode(message.toolCallEnd, writer.uint32(50).fork()).join();
|
|
1480
|
+
if (message.stateSnapshot !== void 0) StateSnapshotEvent.encode(message.stateSnapshot, writer.uint32(58).fork()).join();
|
|
1481
|
+
if (message.stateDelta !== void 0) StateDeltaEvent.encode(message.stateDelta, writer.uint32(66).fork()).join();
|
|
1482
|
+
if (message.messagesSnapshot !== void 0) MessagesSnapshotEvent.encode(message.messagesSnapshot, writer.uint32(74).fork()).join();
|
|
1483
|
+
if (message.raw !== void 0) RawEvent.encode(message.raw, writer.uint32(82).fork()).join();
|
|
1484
|
+
if (message.custom !== void 0) CustomEvent.encode(message.custom, writer.uint32(90).fork()).join();
|
|
1485
|
+
if (message.runStarted !== void 0) RunStartedEvent.encode(message.runStarted, writer.uint32(98).fork()).join();
|
|
1486
|
+
if (message.runFinished !== void 0) RunFinishedEvent.encode(message.runFinished, writer.uint32(106).fork()).join();
|
|
1487
|
+
if (message.runError !== void 0) RunErrorEvent.encode(message.runError, writer.uint32(114).fork()).join();
|
|
1488
|
+
if (message.stepStarted !== void 0) StepStartedEvent.encode(message.stepStarted, writer.uint32(122).fork()).join();
|
|
1489
|
+
if (message.stepFinished !== void 0) StepFinishedEvent.encode(message.stepFinished, writer.uint32(130).fork()).join();
|
|
1490
|
+
if (message.textMessageChunk !== void 0) TextMessageChunkEvent.encode(message.textMessageChunk, writer.uint32(138).fork()).join();
|
|
1491
|
+
if (message.toolCallChunk !== void 0) ToolCallChunkEvent.encode(message.toolCallChunk, writer.uint32(146).fork()).join();
|
|
1492
|
+
return writer;
|
|
1493
|
+
},
|
|
1494
|
+
decode(input, length) {
|
|
1495
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1496
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1497
|
+
const message = createBaseEvent();
|
|
1498
|
+
while (reader.pos < end) {
|
|
1499
|
+
const tag = reader.uint32();
|
|
1500
|
+
switch (tag >>> 3) {
|
|
1501
|
+
case 1:
|
|
1502
|
+
if (tag !== 10) break;
|
|
1503
|
+
message.textMessageStart = TextMessageStartEvent.decode(reader, reader.uint32());
|
|
1504
|
+
continue;
|
|
1505
|
+
case 2:
|
|
1506
|
+
if (tag !== 18) break;
|
|
1507
|
+
message.textMessageContent = TextMessageContentEvent.decode(reader, reader.uint32());
|
|
1508
|
+
continue;
|
|
1509
|
+
case 3:
|
|
1510
|
+
if (tag !== 26) break;
|
|
1511
|
+
message.textMessageEnd = TextMessageEndEvent.decode(reader, reader.uint32());
|
|
1512
|
+
continue;
|
|
1513
|
+
case 4:
|
|
1514
|
+
if (tag !== 34) break;
|
|
1515
|
+
message.toolCallStart = ToolCallStartEvent.decode(reader, reader.uint32());
|
|
1516
|
+
continue;
|
|
1517
|
+
case 5:
|
|
1518
|
+
if (tag !== 42) break;
|
|
1519
|
+
message.toolCallArgs = ToolCallArgsEvent.decode(reader, reader.uint32());
|
|
1520
|
+
continue;
|
|
1521
|
+
case 6:
|
|
1522
|
+
if (tag !== 50) break;
|
|
1523
|
+
message.toolCallEnd = ToolCallEndEvent.decode(reader, reader.uint32());
|
|
1524
|
+
continue;
|
|
1525
|
+
case 7:
|
|
1526
|
+
if (tag !== 58) break;
|
|
1527
|
+
message.stateSnapshot = StateSnapshotEvent.decode(reader, reader.uint32());
|
|
1528
|
+
continue;
|
|
1529
|
+
case 8:
|
|
1530
|
+
if (tag !== 66) break;
|
|
1531
|
+
message.stateDelta = StateDeltaEvent.decode(reader, reader.uint32());
|
|
1532
|
+
continue;
|
|
1533
|
+
case 9:
|
|
1534
|
+
if (tag !== 74) break;
|
|
1535
|
+
message.messagesSnapshot = MessagesSnapshotEvent.decode(reader, reader.uint32());
|
|
1536
|
+
continue;
|
|
1537
|
+
case 10:
|
|
1538
|
+
if (tag !== 82) break;
|
|
1539
|
+
message.raw = RawEvent.decode(reader, reader.uint32());
|
|
1540
|
+
continue;
|
|
1541
|
+
case 11:
|
|
1542
|
+
if (tag !== 90) break;
|
|
1543
|
+
message.custom = CustomEvent.decode(reader, reader.uint32());
|
|
1544
|
+
continue;
|
|
1545
|
+
case 12:
|
|
1546
|
+
if (tag !== 98) break;
|
|
1547
|
+
message.runStarted = RunStartedEvent.decode(reader, reader.uint32());
|
|
1548
|
+
continue;
|
|
1549
|
+
case 13:
|
|
1550
|
+
if (tag !== 106) break;
|
|
1551
|
+
message.runFinished = RunFinishedEvent.decode(reader, reader.uint32());
|
|
1552
|
+
continue;
|
|
1553
|
+
case 14:
|
|
1554
|
+
if (tag !== 114) break;
|
|
1555
|
+
message.runError = RunErrorEvent.decode(reader, reader.uint32());
|
|
1556
|
+
continue;
|
|
1557
|
+
case 15:
|
|
1558
|
+
if (tag !== 122) break;
|
|
1559
|
+
message.stepStarted = StepStartedEvent.decode(reader, reader.uint32());
|
|
1560
|
+
continue;
|
|
1561
|
+
case 16:
|
|
1562
|
+
if (tag !== 130) break;
|
|
1563
|
+
message.stepFinished = StepFinishedEvent.decode(reader, reader.uint32());
|
|
1564
|
+
continue;
|
|
1565
|
+
case 17:
|
|
1566
|
+
if (tag !== 138) break;
|
|
1567
|
+
message.textMessageChunk = TextMessageChunkEvent.decode(reader, reader.uint32());
|
|
1568
|
+
continue;
|
|
1569
|
+
case 18:
|
|
1570
|
+
if (tag !== 146) break;
|
|
1571
|
+
message.toolCallChunk = ToolCallChunkEvent.decode(reader, reader.uint32());
|
|
1572
|
+
continue;
|
|
1573
|
+
}
|
|
1574
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1575
|
+
reader.skip(tag & 7);
|
|
1576
|
+
}
|
|
1577
|
+
return message;
|
|
1578
|
+
},
|
|
1579
|
+
create(base) {
|
|
1580
|
+
return Event.fromPartial(base ?? {});
|
|
1581
|
+
},
|
|
1582
|
+
fromPartial(object) {
|
|
1583
|
+
const message = createBaseEvent();
|
|
1584
|
+
message.textMessageStart = object.textMessageStart !== void 0 && object.textMessageStart !== null ? TextMessageStartEvent.fromPartial(object.textMessageStart) : void 0;
|
|
1585
|
+
message.textMessageContent = object.textMessageContent !== void 0 && object.textMessageContent !== null ? TextMessageContentEvent.fromPartial(object.textMessageContent) : void 0;
|
|
1586
|
+
message.textMessageEnd = object.textMessageEnd !== void 0 && object.textMessageEnd !== null ? TextMessageEndEvent.fromPartial(object.textMessageEnd) : void 0;
|
|
1587
|
+
message.toolCallStart = object.toolCallStart !== void 0 && object.toolCallStart !== null ? ToolCallStartEvent.fromPartial(object.toolCallStart) : void 0;
|
|
1588
|
+
message.toolCallArgs = object.toolCallArgs !== void 0 && object.toolCallArgs !== null ? ToolCallArgsEvent.fromPartial(object.toolCallArgs) : void 0;
|
|
1589
|
+
message.toolCallEnd = object.toolCallEnd !== void 0 && object.toolCallEnd !== null ? ToolCallEndEvent.fromPartial(object.toolCallEnd) : void 0;
|
|
1590
|
+
message.stateSnapshot = object.stateSnapshot !== void 0 && object.stateSnapshot !== null ? StateSnapshotEvent.fromPartial(object.stateSnapshot) : void 0;
|
|
1591
|
+
message.stateDelta = object.stateDelta !== void 0 && object.stateDelta !== null ? StateDeltaEvent.fromPartial(object.stateDelta) : void 0;
|
|
1592
|
+
message.messagesSnapshot = object.messagesSnapshot !== void 0 && object.messagesSnapshot !== null ? MessagesSnapshotEvent.fromPartial(object.messagesSnapshot) : void 0;
|
|
1593
|
+
message.raw = object.raw !== void 0 && object.raw !== null ? RawEvent.fromPartial(object.raw) : void 0;
|
|
1594
|
+
message.custom = object.custom !== void 0 && object.custom !== null ? CustomEvent.fromPartial(object.custom) : void 0;
|
|
1595
|
+
message.runStarted = object.runStarted !== void 0 && object.runStarted !== null ? RunStartedEvent.fromPartial(object.runStarted) : void 0;
|
|
1596
|
+
message.runFinished = object.runFinished !== void 0 && object.runFinished !== null ? RunFinishedEvent.fromPartial(object.runFinished) : void 0;
|
|
1597
|
+
message.runError = object.runError !== void 0 && object.runError !== null ? RunErrorEvent.fromPartial(object.runError) : void 0;
|
|
1598
|
+
message.stepStarted = object.stepStarted !== void 0 && object.stepStarted !== null ? StepStartedEvent.fromPartial(object.stepStarted) : void 0;
|
|
1599
|
+
message.stepFinished = object.stepFinished !== void 0 && object.stepFinished !== null ? StepFinishedEvent.fromPartial(object.stepFinished) : void 0;
|
|
1600
|
+
message.textMessageChunk = object.textMessageChunk !== void 0 && object.textMessageChunk !== null ? TextMessageChunkEvent.fromPartial(object.textMessageChunk) : void 0;
|
|
1601
|
+
message.toolCallChunk = object.toolCallChunk !== void 0 && object.toolCallChunk !== null ? ToolCallChunkEvent.fromPartial(object.toolCallChunk) : void 0;
|
|
1602
|
+
return message;
|
|
1603
|
+
}
|
|
2120
1604
|
};
|
|
2121
1605
|
function longToNumber(int64) {
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
2127
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
2128
|
-
}
|
|
2129
|
-
return num;
|
|
1606
|
+
const num = globalThis.Number(int64.toString());
|
|
1607
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1608
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1609
|
+
return num;
|
|
2130
1610
|
}
|
|
2131
1611
|
|
|
2132
|
-
|
|
1612
|
+
//#endregion
|
|
1613
|
+
//#region src/proto.ts
|
|
2133
1614
|
function toCamelCase(str) {
|
|
2134
|
-
|
|
1615
|
+
return str.toLowerCase().replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
2135
1616
|
}
|
|
1617
|
+
/**
|
|
1618
|
+
* Encodes an event message to a protocol buffer binary format.
|
|
1619
|
+
*/
|
|
2136
1620
|
function encode(event) {
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
1621
|
+
/**
|
|
1622
|
+
* In previous versions of AG-UI, we didn't really validate the events
|
|
1623
|
+
* against a schema. With stronger types for events and Zod schemas, we
|
|
1624
|
+
* can now validate.
|
|
1625
|
+
*
|
|
1626
|
+
* However, I don't want to break compatibility with existing clients
|
|
1627
|
+
* even if they are encoding invalid events. This surfaces a warning
|
|
1628
|
+
* to them in those situations.
|
|
1629
|
+
*
|
|
1630
|
+
* @author mikeryandev
|
|
1631
|
+
*/
|
|
1632
|
+
let validatedEvent;
|
|
1633
|
+
try {
|
|
1634
|
+
validatedEvent = EventSchemas.parse(event);
|
|
1635
|
+
} catch (err) {
|
|
1636
|
+
console.warn("[ag-ui][proto.encode] Malformed devent detected, falling back to unvalidated event", err, event);
|
|
1637
|
+
validatedEvent = event;
|
|
1638
|
+
}
|
|
1639
|
+
const oneofField = toCamelCase(validatedEvent.type);
|
|
1640
|
+
const { type, timestamp, rawEvent, ...rest } = validatedEvent;
|
|
1641
|
+
if (type === EventType.MESSAGES_SNAPSHOT && Array.isArray(rest.messages)) rest.messages = rest.messages.map((message) => {
|
|
1642
|
+
if (message.toolCalls === void 0) return {
|
|
1643
|
+
...message,
|
|
1644
|
+
toolCalls: []
|
|
1645
|
+
};
|
|
1646
|
+
return message;
|
|
1647
|
+
});
|
|
1648
|
+
if (type === EventType.STATE_DELTA && Array.isArray(rest.delta)) rest.delta = rest.delta.map((operation) => ({
|
|
1649
|
+
...operation,
|
|
1650
|
+
op: JsonPatchOperationType[operation.op.toUpperCase()]
|
|
1651
|
+
}));
|
|
1652
|
+
const eventMessage = { [oneofField]: {
|
|
1653
|
+
baseEvent: {
|
|
1654
|
+
type: EventType$1[event.type],
|
|
1655
|
+
timestamp,
|
|
1656
|
+
rawEvent
|
|
1657
|
+
},
|
|
1658
|
+
...rest
|
|
1659
|
+
} };
|
|
1660
|
+
return Event.encode(eventMessage).finish();
|
|
2176
1661
|
}
|
|
1662
|
+
/**
|
|
1663
|
+
* Decodes a protocol buffer binary format to an event message.
|
|
1664
|
+
* The format includes a 4-byte length prefix followed by the message.
|
|
1665
|
+
*/
|
|
2177
1666
|
function decode(data) {
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
Object.keys(operation).forEach((key) => {
|
|
2199
|
-
if (operation[key] === void 0) {
|
|
2200
|
-
delete operation[key];
|
|
2201
|
-
}
|
|
2202
|
-
});
|
|
2203
|
-
}
|
|
2204
|
-
}
|
|
2205
|
-
Object.keys(decoded).forEach((key) => {
|
|
2206
|
-
if (decoded[key] === void 0) {
|
|
2207
|
-
delete decoded[key];
|
|
2208
|
-
}
|
|
2209
|
-
});
|
|
2210
|
-
return EventSchemas.parse(decoded);
|
|
1667
|
+
const event = Event.decode(data);
|
|
1668
|
+
const decoded = Object.values(event).find((value) => value !== void 0);
|
|
1669
|
+
if (!decoded) throw new Error("Invalid event");
|
|
1670
|
+
decoded.type = EventType$1[decoded.baseEvent.type];
|
|
1671
|
+
decoded.timestamp = decoded.baseEvent.timestamp;
|
|
1672
|
+
decoded.rawEvent = decoded.baseEvent.rawEvent;
|
|
1673
|
+
if (decoded.type === EventType.MESSAGES_SNAPSHOT) for (const message of decoded.messages) {
|
|
1674
|
+
const untypedMessage = message;
|
|
1675
|
+
if (untypedMessage.toolCalls?.length === 0) untypedMessage.toolCalls = void 0;
|
|
1676
|
+
}
|
|
1677
|
+
if (decoded.type === EventType.STATE_DELTA) for (const operation of decoded.delta) {
|
|
1678
|
+
operation.op = JsonPatchOperationType[operation.op].toLowerCase();
|
|
1679
|
+
Object.keys(operation).forEach((key) => {
|
|
1680
|
+
if (operation[key] === void 0) delete operation[key];
|
|
1681
|
+
});
|
|
1682
|
+
}
|
|
1683
|
+
Object.keys(decoded).forEach((key) => {
|
|
1684
|
+
if (decoded[key] === void 0) delete decoded[key];
|
|
1685
|
+
});
|
|
1686
|
+
return EventSchemas.parse(decoded);
|
|
2211
1687
|
}
|
|
2212
1688
|
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
};
|
|
1689
|
+
//#endregion
|
|
1690
|
+
//#region src/index.ts
|
|
1691
|
+
const AGUI_MEDIA_TYPE = "application/vnd.ag-ui.event+proto";
|
|
1692
|
+
|
|
1693
|
+
//#endregion
|
|
1694
|
+
export { AGUI_MEDIA_TYPE, decode, encode };
|
|
2220
1695
|
//# sourceMappingURL=index.mjs.map
|