@m1kad0/hannah-proto 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +21 -0
  2. package/dist/compat_interceptor.js +6 -6
  3. package/dist/compat_versions.js +176 -88
  4. package/dist/descriptor.binpb +0 -0
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.js +2 -1
  7. package/dist/v1/activity_log.d.ts +60 -0
  8. package/dist/v1/activity_log.js +453 -0
  9. package/dist/v1/agent.d.ts +433 -0
  10. package/dist/v1/agent.js +2527 -0
  11. package/dist/v1/automation.d.ts +54 -0
  12. package/dist/v1/automation.js +303 -0
  13. package/dist/v1/car_state.d.ts +72 -0
  14. package/dist/v1/car_state.js +516 -0
  15. package/dist/v1/channel.d.ts +102 -0
  16. package/dist/v1/channel.js +587 -0
  17. package/dist/v1/control.d.ts +383 -0
  18. package/dist/v1/control.js +3879 -0
  19. package/dist/v1/device_control_menu.d.ts +88 -0
  20. package/dist/v1/device_control_menu.js +629 -0
  21. package/dist/v1/event_stream.d.ts +63 -0
  22. package/dist/v1/event_stream.js +494 -0
  23. package/dist/v1/hannah.d.ts +1644 -0
  24. package/dist/v1/hannah.js +968 -0
  25. package/dist/v1/index.d.ts +22 -0
  26. package/dist/v1/index.js +58 -0
  27. package/dist/v1/infrastructure.d.ts +98 -0
  28. package/dist/v1/infrastructure.js +652 -0
  29. package/dist/v1/logging.d.ts +189 -0
  30. package/dist/v1/logging.js +775 -0
  31. package/dist/v1/messages.d.ts +56 -0
  32. package/dist/v1/messages.js +398 -0
  33. package/dist/v1/satellite.d.ts +90 -0
  34. package/dist/v1/satellite.js +637 -0
  35. package/dist/v1/satellite_provisioning.d.ts +33 -0
  36. package/dist/v1/satellite_provisioning.js +84 -0
  37. package/dist/v1/satellite_proxy.d.ts +100 -0
  38. package/dist/v1/satellite_proxy.js +546 -0
  39. package/dist/v1/shared.d.ts +54 -0
  40. package/dist/v1/shared.js +249 -0
  41. package/dist/v1/speaker_enrollment.d.ts +44 -0
  42. package/dist/v1/speaker_enrollment.js +157 -0
  43. package/dist/v1/timer_admin.d.ts +42 -0
  44. package/dist/v1/timer_admin.js +273 -0
  45. package/dist/v1/timer_service.d.ts +133 -0
  46. package/dist/v1/timer_service.js +945 -0
  47. package/dist/v1/user_registry.d.ts +187 -0
  48. package/dist/v1/user_registry.js +1612 -0
  49. package/dist/v1/wakeword_capture.d.ts +101 -0
  50. package/dist/v1/wakeword_capture.js +611 -0
  51. package/dist/v1/weather.d.ts +81 -0
  52. package/dist/v1/weather.js +366 -0
  53. package/package.json +1 -1
@@ -0,0 +1,2527 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.12.1
5
+ // protoc unknown
6
+ // source: hannah/v1/agent.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AgentSensorUpdate = exports.AgentBleUpdate = exports.AgentResidentAnswered = exports.AgentAskResident = exports.AgentResidentSnapshot = exports.AgentResident = exports.AgentRoomSnapshot = exports.AgentRoom_DisplayNamesEntry = exports.AgentRoom = exports.AgentDeviceSnapshot = exports.AgentDevice_RoomNamesEntry = exports.AgentDevice = exports.AgentStateValue = exports.AgentNotification = exports.AgentTextAnswer = exports.AgentSatelliteDeleted = exports.AgentSatelliteUpdate = exports.AgentSetResidentMood = exports.AgentSetResident = exports.AgentWatchMore = exports.AgentSetState = exports.AgentFirmwareEvent = exports.AgentCommand = exports.AgentTextCommand = exports.AgentStateUpdate = exports.CaptureControl = exports.AgentSatelliteControl = exports.AgentMessage = exports.ResidentPresenceAction = exports.ResidentType = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const shared_1 = require("./shared");
12
+ const wakeword_capture_1 = require("./wakeword_capture");
13
+ const weather_1 = require("./weather");
14
+ exports.protobufPackage = "hannah.v1";
15
+ var ResidentType;
16
+ (function (ResidentType) {
17
+ ResidentType[ResidentType["RESIDENT_TYPE_UNSPECIFIED"] = 0] = "RESIDENT_TYPE_UNSPECIFIED";
18
+ ResidentType[ResidentType["ROOMIE"] = 1] = "ROOMIE";
19
+ ResidentType[ResidentType["GUEST"] = 2] = "GUEST";
20
+ ResidentType[ResidentType["PET"] = 3] = "PET";
21
+ ResidentType[ResidentType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
22
+ })(ResidentType || (exports.ResidentType = ResidentType = {}));
23
+ /**
24
+ * Which single presence aspect to set. The residents adapter's presence.{away,home,night}
25
+ * datapoints guard their own cross-consistency (e.g. setting "away" true automatically
26
+ * flips "home" false) — Hannah only needs to name the aspect it actually has an opinion
27
+ * about, instead of writing the whole combined presence.state value (hannah#309, root
28
+ * cause of hannah#299: two independent Hannah-side decisions, home/away presence fusion
29
+ * and an explicit asleep/awake trigger, collapsed onto one write and could clobber each
30
+ * other's information). SET_AWAKE has no direct presence.state equivalent — it only
31
+ * clears "night" and leaves "home" untouched, regardless of its current value.
32
+ */
33
+ var ResidentPresenceAction;
34
+ (function (ResidentPresenceAction) {
35
+ ResidentPresenceAction[ResidentPresenceAction["RESIDENT_PRESENCE_ACTION_UNSPECIFIED"] = 0] = "RESIDENT_PRESENCE_ACTION_UNSPECIFIED";
36
+ ResidentPresenceAction[ResidentPresenceAction["AWAY"] = 1] = "AWAY";
37
+ ResidentPresenceAction[ResidentPresenceAction["HOME"] = 2] = "HOME";
38
+ ResidentPresenceAction[ResidentPresenceAction["ASLEEP"] = 3] = "ASLEEP";
39
+ ResidentPresenceAction[ResidentPresenceAction["AWAKE"] = 4] = "AWAKE";
40
+ ResidentPresenceAction[ResidentPresenceAction["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
41
+ })(ResidentPresenceAction || (exports.ResidentPresenceAction = ResidentPresenceAction = {}));
42
+ function createBaseAgentMessage() {
43
+ return {
44
+ stateUpdate: undefined,
45
+ residentUpdate: undefined,
46
+ textCommand: undefined,
47
+ satelliteControl: undefined,
48
+ sendSnapshot: undefined,
49
+ sendResidents: undefined,
50
+ askResident: undefined,
51
+ sendRooms: undefined,
52
+ weatherUpdate: undefined,
53
+ };
54
+ }
55
+ exports.AgentMessage = {
56
+ encode(message, writer = new wire_1.BinaryWriter()) {
57
+ if (message.stateUpdate !== undefined) {
58
+ exports.AgentStateUpdate.encode(message.stateUpdate, writer.uint32(10).fork()).join();
59
+ }
60
+ if (message.residentUpdate !== undefined) {
61
+ exports.AgentResident.encode(message.residentUpdate, writer.uint32(18).fork()).join();
62
+ }
63
+ if (message.textCommand !== undefined) {
64
+ exports.AgentTextCommand.encode(message.textCommand, writer.uint32(26).fork()).join();
65
+ }
66
+ if (message.satelliteControl !== undefined) {
67
+ exports.AgentSatelliteControl.encode(message.satelliteControl, writer.uint32(34).fork()).join();
68
+ }
69
+ if (message.sendSnapshot !== undefined) {
70
+ exports.AgentDeviceSnapshot.encode(message.sendSnapshot, writer.uint32(42).fork()).join();
71
+ }
72
+ if (message.sendResidents !== undefined) {
73
+ exports.AgentResidentSnapshot.encode(message.sendResidents, writer.uint32(50).fork()).join();
74
+ }
75
+ if (message.askResident !== undefined) {
76
+ exports.AgentAskResident.encode(message.askResident, writer.uint32(58).fork()).join();
77
+ }
78
+ if (message.sendRooms !== undefined) {
79
+ exports.AgentRoomSnapshot.encode(message.sendRooms, writer.uint32(66).fork()).join();
80
+ }
81
+ if (message.weatherUpdate !== undefined) {
82
+ weather_1.AgentWeatherUpdate.encode(message.weatherUpdate, writer.uint32(74).fork()).join();
83
+ }
84
+ return writer;
85
+ },
86
+ decode(input, length) {
87
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
88
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
89
+ if (previousRecursionDepth >= 100) {
90
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
91
+ }
92
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
93
+ try {
94
+ const end = length === undefined ? reader.len : reader.pos + length;
95
+ const message = createBaseAgentMessage();
96
+ while (reader.pos < end) {
97
+ const tag = reader.uint32();
98
+ switch (tag >>> 3) {
99
+ case 1: {
100
+ if (tag !== 10) {
101
+ break;
102
+ }
103
+ message.stateUpdate = exports.AgentStateUpdate.decode(reader, reader.uint32());
104
+ continue;
105
+ }
106
+ case 2: {
107
+ if (tag !== 18) {
108
+ break;
109
+ }
110
+ message.residentUpdate = exports.AgentResident.decode(reader, reader.uint32());
111
+ continue;
112
+ }
113
+ case 3: {
114
+ if (tag !== 26) {
115
+ break;
116
+ }
117
+ message.textCommand = exports.AgentTextCommand.decode(reader, reader.uint32());
118
+ continue;
119
+ }
120
+ case 4: {
121
+ if (tag !== 34) {
122
+ break;
123
+ }
124
+ message.satelliteControl = exports.AgentSatelliteControl.decode(reader, reader.uint32());
125
+ continue;
126
+ }
127
+ case 5: {
128
+ if (tag !== 42) {
129
+ break;
130
+ }
131
+ message.sendSnapshot = exports.AgentDeviceSnapshot.decode(reader, reader.uint32());
132
+ continue;
133
+ }
134
+ case 6: {
135
+ if (tag !== 50) {
136
+ break;
137
+ }
138
+ message.sendResidents = exports.AgentResidentSnapshot.decode(reader, reader.uint32());
139
+ continue;
140
+ }
141
+ case 7: {
142
+ if (tag !== 58) {
143
+ break;
144
+ }
145
+ message.askResident = exports.AgentAskResident.decode(reader, reader.uint32());
146
+ continue;
147
+ }
148
+ case 8: {
149
+ if (tag !== 66) {
150
+ break;
151
+ }
152
+ message.sendRooms = exports.AgentRoomSnapshot.decode(reader, reader.uint32());
153
+ continue;
154
+ }
155
+ case 9: {
156
+ if (tag !== 74) {
157
+ break;
158
+ }
159
+ message.weatherUpdate = weather_1.AgentWeatherUpdate.decode(reader, reader.uint32());
160
+ continue;
161
+ }
162
+ }
163
+ if ((tag & 7) === 4 || tag === 0) {
164
+ break;
165
+ }
166
+ reader.skip(tag & 7);
167
+ }
168
+ return message;
169
+ }
170
+ finally {
171
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
172
+ }
173
+ },
174
+ create(base) {
175
+ return exports.AgentMessage.fromPartial(base ?? {});
176
+ },
177
+ fromPartial(object) {
178
+ const message = createBaseAgentMessage();
179
+ message.stateUpdate = (object.stateUpdate !== undefined && object.stateUpdate !== null)
180
+ ? exports.AgentStateUpdate.fromPartial(object.stateUpdate)
181
+ : undefined;
182
+ message.residentUpdate = (object.residentUpdate !== undefined && object.residentUpdate !== null)
183
+ ? exports.AgentResident.fromPartial(object.residentUpdate)
184
+ : undefined;
185
+ message.textCommand = (object.textCommand !== undefined && object.textCommand !== null)
186
+ ? exports.AgentTextCommand.fromPartial(object.textCommand)
187
+ : undefined;
188
+ message.satelliteControl = (object.satelliteControl !== undefined && object.satelliteControl !== null)
189
+ ? exports.AgentSatelliteControl.fromPartial(object.satelliteControl)
190
+ : undefined;
191
+ message.sendSnapshot = (object.sendSnapshot !== undefined && object.sendSnapshot !== null)
192
+ ? exports.AgentDeviceSnapshot.fromPartial(object.sendSnapshot)
193
+ : undefined;
194
+ message.sendResidents = (object.sendResidents !== undefined && object.sendResidents !== null)
195
+ ? exports.AgentResidentSnapshot.fromPartial(object.sendResidents)
196
+ : undefined;
197
+ message.askResident = (object.askResident !== undefined && object.askResident !== null)
198
+ ? exports.AgentAskResident.fromPartial(object.askResident)
199
+ : undefined;
200
+ message.sendRooms = (object.sendRooms !== undefined && object.sendRooms !== null)
201
+ ? exports.AgentRoomSnapshot.fromPartial(object.sendRooms)
202
+ : undefined;
203
+ message.weatherUpdate = (object.weatherUpdate !== undefined && object.weatherUpdate !== null)
204
+ ? weather_1.AgentWeatherUpdate.fromPartial(object.weatherUpdate)
205
+ : undefined;
206
+ return message;
207
+ },
208
+ };
209
+ function createBaseAgentSatelliteControl() {
210
+ return {
211
+ room: "",
212
+ deviceId: "",
213
+ dnd: undefined,
214
+ mute: undefined,
215
+ volume: undefined,
216
+ announcement: undefined,
217
+ announcementSsml: undefined,
218
+ announcementRephrase: undefined,
219
+ capture: undefined,
220
+ };
221
+ }
222
+ exports.AgentSatelliteControl = {
223
+ encode(message, writer = new wire_1.BinaryWriter()) {
224
+ if (message.room !== "") {
225
+ writer.uint32(10).string(message.room);
226
+ }
227
+ if (message.deviceId !== "") {
228
+ writer.uint32(58).string(message.deviceId);
229
+ }
230
+ if (message.dnd !== undefined) {
231
+ writer.uint32(16).bool(message.dnd);
232
+ }
233
+ if (message.mute !== undefined) {
234
+ writer.uint32(24).bool(message.mute);
235
+ }
236
+ if (message.volume !== undefined) {
237
+ writer.uint32(32).int32(message.volume);
238
+ }
239
+ if (message.announcement !== undefined) {
240
+ writer.uint32(42).string(message.announcement);
241
+ }
242
+ if (message.announcementSsml !== undefined) {
243
+ writer.uint32(50).string(message.announcementSsml);
244
+ }
245
+ if (message.announcementRephrase !== undefined) {
246
+ writer.uint32(66).string(message.announcementRephrase);
247
+ }
248
+ if (message.capture !== undefined) {
249
+ exports.CaptureControl.encode(message.capture, writer.uint32(74).fork()).join();
250
+ }
251
+ return writer;
252
+ },
253
+ decode(input, length) {
254
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
255
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
256
+ if (previousRecursionDepth >= 100) {
257
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
258
+ }
259
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
260
+ try {
261
+ const end = length === undefined ? reader.len : reader.pos + length;
262
+ const message = createBaseAgentSatelliteControl();
263
+ while (reader.pos < end) {
264
+ const tag = reader.uint32();
265
+ switch (tag >>> 3) {
266
+ case 1: {
267
+ if (tag !== 10) {
268
+ break;
269
+ }
270
+ message.room = reader.string();
271
+ continue;
272
+ }
273
+ case 7: {
274
+ if (tag !== 58) {
275
+ break;
276
+ }
277
+ message.deviceId = reader.string();
278
+ continue;
279
+ }
280
+ case 2: {
281
+ if (tag !== 16) {
282
+ break;
283
+ }
284
+ message.dnd = reader.bool();
285
+ continue;
286
+ }
287
+ case 3: {
288
+ if (tag !== 24) {
289
+ break;
290
+ }
291
+ message.mute = reader.bool();
292
+ continue;
293
+ }
294
+ case 4: {
295
+ if (tag !== 32) {
296
+ break;
297
+ }
298
+ message.volume = reader.int32();
299
+ continue;
300
+ }
301
+ case 5: {
302
+ if (tag !== 42) {
303
+ break;
304
+ }
305
+ message.announcement = reader.string();
306
+ continue;
307
+ }
308
+ case 6: {
309
+ if (tag !== 50) {
310
+ break;
311
+ }
312
+ message.announcementSsml = reader.string();
313
+ continue;
314
+ }
315
+ case 8: {
316
+ if (tag !== 66) {
317
+ break;
318
+ }
319
+ message.announcementRephrase = reader.string();
320
+ continue;
321
+ }
322
+ case 9: {
323
+ if (tag !== 74) {
324
+ break;
325
+ }
326
+ message.capture = exports.CaptureControl.decode(reader, reader.uint32());
327
+ continue;
328
+ }
329
+ }
330
+ if ((tag & 7) === 4 || tag === 0) {
331
+ break;
332
+ }
333
+ reader.skip(tag & 7);
334
+ }
335
+ return message;
336
+ }
337
+ finally {
338
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
339
+ }
340
+ },
341
+ create(base) {
342
+ return exports.AgentSatelliteControl.fromPartial(base ?? {});
343
+ },
344
+ fromPartial(object) {
345
+ const message = createBaseAgentSatelliteControl();
346
+ message.room = object.room ?? "";
347
+ message.deviceId = object.deviceId ?? "";
348
+ message.dnd = object.dnd ?? undefined;
349
+ message.mute = object.mute ?? undefined;
350
+ message.volume = object.volume ?? undefined;
351
+ message.announcement = object.announcement ?? undefined;
352
+ message.announcementSsml = object.announcementSsml ?? undefined;
353
+ message.announcementRephrase = object.announcementRephrase ?? undefined;
354
+ message.capture = (object.capture !== undefined && object.capture !== null)
355
+ ? exports.CaptureControl.fromPartial(object.capture)
356
+ : undefined;
357
+ return message;
358
+ },
359
+ };
360
+ function createBaseCaptureControl() {
361
+ return { sampleType: undefined, captureMode: 0, stop: false };
362
+ }
363
+ exports.CaptureControl = {
364
+ encode(message, writer = new wire_1.BinaryWriter()) {
365
+ if (message.sampleType !== undefined) {
366
+ wakeword_capture_1.SampleType.encode(message.sampleType, writer.uint32(10).fork()).join();
367
+ }
368
+ if (message.captureMode !== 0) {
369
+ writer.uint32(16).int32(message.captureMode);
370
+ }
371
+ if (message.stop !== false) {
372
+ writer.uint32(24).bool(message.stop);
373
+ }
374
+ return writer;
375
+ },
376
+ decode(input, length) {
377
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
378
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
379
+ if (previousRecursionDepth >= 100) {
380
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
381
+ }
382
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
383
+ try {
384
+ const end = length === undefined ? reader.len : reader.pos + length;
385
+ const message = createBaseCaptureControl();
386
+ while (reader.pos < end) {
387
+ const tag = reader.uint32();
388
+ switch (tag >>> 3) {
389
+ case 1: {
390
+ if (tag !== 10) {
391
+ break;
392
+ }
393
+ message.sampleType = wakeword_capture_1.SampleType.decode(reader, reader.uint32());
394
+ continue;
395
+ }
396
+ case 2: {
397
+ if (tag !== 16) {
398
+ break;
399
+ }
400
+ message.captureMode = reader.int32();
401
+ continue;
402
+ }
403
+ case 3: {
404
+ if (tag !== 24) {
405
+ break;
406
+ }
407
+ message.stop = reader.bool();
408
+ continue;
409
+ }
410
+ }
411
+ if ((tag & 7) === 4 || tag === 0) {
412
+ break;
413
+ }
414
+ reader.skip(tag & 7);
415
+ }
416
+ return message;
417
+ }
418
+ finally {
419
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
420
+ }
421
+ },
422
+ create(base) {
423
+ return exports.CaptureControl.fromPartial(base ?? {});
424
+ },
425
+ fromPartial(object) {
426
+ const message = createBaseCaptureControl();
427
+ message.sampleType = (object.sampleType !== undefined && object.sampleType !== null)
428
+ ? wakeword_capture_1.SampleType.fromPartial(object.sampleType)
429
+ : undefined;
430
+ message.captureMode = object.captureMode ?? 0;
431
+ message.stop = object.stop ?? false;
432
+ return message;
433
+ },
434
+ };
435
+ function createBaseAgentStateUpdate() {
436
+ return { stateId: "", value: "", ack: false, ts: 0n };
437
+ }
438
+ exports.AgentStateUpdate = {
439
+ encode(message, writer = new wire_1.BinaryWriter()) {
440
+ if (message.stateId !== "") {
441
+ writer.uint32(10).string(message.stateId);
442
+ }
443
+ if (message.value !== "") {
444
+ writer.uint32(18).string(message.value);
445
+ }
446
+ if (message.ack !== false) {
447
+ writer.uint32(24).bool(message.ack);
448
+ }
449
+ if (message.ts !== 0n) {
450
+ if (BigInt.asIntN(64, message.ts) !== message.ts) {
451
+ throw new globalThis.Error("value provided for field message.ts of type int64 too large");
452
+ }
453
+ writer.uint32(32).int64(message.ts);
454
+ }
455
+ return writer;
456
+ },
457
+ decode(input, length) {
458
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
459
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
460
+ if (previousRecursionDepth >= 100) {
461
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
462
+ }
463
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
464
+ try {
465
+ const end = length === undefined ? reader.len : reader.pos + length;
466
+ const message = createBaseAgentStateUpdate();
467
+ while (reader.pos < end) {
468
+ const tag = reader.uint32();
469
+ switch (tag >>> 3) {
470
+ case 1: {
471
+ if (tag !== 10) {
472
+ break;
473
+ }
474
+ message.stateId = reader.string();
475
+ continue;
476
+ }
477
+ case 2: {
478
+ if (tag !== 18) {
479
+ break;
480
+ }
481
+ message.value = reader.string();
482
+ continue;
483
+ }
484
+ case 3: {
485
+ if (tag !== 24) {
486
+ break;
487
+ }
488
+ message.ack = reader.bool();
489
+ continue;
490
+ }
491
+ case 4: {
492
+ if (tag !== 32) {
493
+ break;
494
+ }
495
+ message.ts = reader.int64();
496
+ continue;
497
+ }
498
+ }
499
+ if ((tag & 7) === 4 || tag === 0) {
500
+ break;
501
+ }
502
+ reader.skip(tag & 7);
503
+ }
504
+ return message;
505
+ }
506
+ finally {
507
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
508
+ }
509
+ },
510
+ create(base) {
511
+ return exports.AgentStateUpdate.fromPartial(base ?? {});
512
+ },
513
+ fromPartial(object) {
514
+ const message = createBaseAgentStateUpdate();
515
+ message.stateId = object.stateId ?? "";
516
+ message.value = object.value ?? "";
517
+ message.ack = object.ack ?? false;
518
+ message.ts = (object.ts !== undefined && object.ts !== null) ? BigInt(object.ts) : 0n;
519
+ return message;
520
+ },
521
+ };
522
+ function createBaseAgentTextCommand() {
523
+ return { text: "" };
524
+ }
525
+ exports.AgentTextCommand = {
526
+ encode(message, writer = new wire_1.BinaryWriter()) {
527
+ if (message.text !== "") {
528
+ writer.uint32(10).string(message.text);
529
+ }
530
+ return writer;
531
+ },
532
+ decode(input, length) {
533
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
534
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
535
+ if (previousRecursionDepth >= 100) {
536
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
537
+ }
538
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
539
+ try {
540
+ const end = length === undefined ? reader.len : reader.pos + length;
541
+ const message = createBaseAgentTextCommand();
542
+ while (reader.pos < end) {
543
+ const tag = reader.uint32();
544
+ switch (tag >>> 3) {
545
+ case 1: {
546
+ if (tag !== 10) {
547
+ break;
548
+ }
549
+ message.text = reader.string();
550
+ continue;
551
+ }
552
+ }
553
+ if ((tag & 7) === 4 || tag === 0) {
554
+ break;
555
+ }
556
+ reader.skip(tag & 7);
557
+ }
558
+ return message;
559
+ }
560
+ finally {
561
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
562
+ }
563
+ },
564
+ create(base) {
565
+ return exports.AgentTextCommand.fromPartial(base ?? {});
566
+ },
567
+ fromPartial(object) {
568
+ const message = createBaseAgentTextCommand();
569
+ message.text = object.text ?? "";
570
+ return message;
571
+ },
572
+ };
573
+ function createBaseAgentCommand() {
574
+ return {
575
+ setState: undefined,
576
+ watchMore: undefined,
577
+ setResident: undefined,
578
+ satelliteUpdate: undefined,
579
+ textAnswer: undefined,
580
+ firmwareEvent: undefined,
581
+ bleUpdate: undefined,
582
+ sensorUpdate: undefined,
583
+ residentAnswered: undefined,
584
+ satelliteDeleted: undefined,
585
+ setResidentMood: undefined,
586
+ };
587
+ }
588
+ exports.AgentCommand = {
589
+ encode(message, writer = new wire_1.BinaryWriter()) {
590
+ if (message.setState !== undefined) {
591
+ exports.AgentSetState.encode(message.setState, writer.uint32(10).fork()).join();
592
+ }
593
+ if (message.watchMore !== undefined) {
594
+ exports.AgentWatchMore.encode(message.watchMore, writer.uint32(18).fork()).join();
595
+ }
596
+ if (message.setResident !== undefined) {
597
+ exports.AgentSetResident.encode(message.setResident, writer.uint32(26).fork()).join();
598
+ }
599
+ if (message.satelliteUpdate !== undefined) {
600
+ exports.AgentSatelliteUpdate.encode(message.satelliteUpdate, writer.uint32(34).fork()).join();
601
+ }
602
+ if (message.textAnswer !== undefined) {
603
+ exports.AgentTextAnswer.encode(message.textAnswer, writer.uint32(42).fork()).join();
604
+ }
605
+ if (message.firmwareEvent !== undefined) {
606
+ exports.AgentFirmwareEvent.encode(message.firmwareEvent, writer.uint32(50).fork()).join();
607
+ }
608
+ if (message.bleUpdate !== undefined) {
609
+ exports.AgentBleUpdate.encode(message.bleUpdate, writer.uint32(58).fork()).join();
610
+ }
611
+ if (message.sensorUpdate !== undefined) {
612
+ exports.AgentSensorUpdate.encode(message.sensorUpdate, writer.uint32(66).fork()).join();
613
+ }
614
+ if (message.residentAnswered !== undefined) {
615
+ exports.AgentResidentAnswered.encode(message.residentAnswered, writer.uint32(74).fork()).join();
616
+ }
617
+ if (message.satelliteDeleted !== undefined) {
618
+ exports.AgentSatelliteDeleted.encode(message.satelliteDeleted, writer.uint32(82).fork()).join();
619
+ }
620
+ if (message.setResidentMood !== undefined) {
621
+ exports.AgentSetResidentMood.encode(message.setResidentMood, writer.uint32(90).fork()).join();
622
+ }
623
+ return writer;
624
+ },
625
+ decode(input, length) {
626
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
627
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
628
+ if (previousRecursionDepth >= 100) {
629
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
630
+ }
631
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
632
+ try {
633
+ const end = length === undefined ? reader.len : reader.pos + length;
634
+ const message = createBaseAgentCommand();
635
+ while (reader.pos < end) {
636
+ const tag = reader.uint32();
637
+ switch (tag >>> 3) {
638
+ case 1: {
639
+ if (tag !== 10) {
640
+ break;
641
+ }
642
+ message.setState = exports.AgentSetState.decode(reader, reader.uint32());
643
+ continue;
644
+ }
645
+ case 2: {
646
+ if (tag !== 18) {
647
+ break;
648
+ }
649
+ message.watchMore = exports.AgentWatchMore.decode(reader, reader.uint32());
650
+ continue;
651
+ }
652
+ case 3: {
653
+ if (tag !== 26) {
654
+ break;
655
+ }
656
+ message.setResident = exports.AgentSetResident.decode(reader, reader.uint32());
657
+ continue;
658
+ }
659
+ case 4: {
660
+ if (tag !== 34) {
661
+ break;
662
+ }
663
+ message.satelliteUpdate = exports.AgentSatelliteUpdate.decode(reader, reader.uint32());
664
+ continue;
665
+ }
666
+ case 5: {
667
+ if (tag !== 42) {
668
+ break;
669
+ }
670
+ message.textAnswer = exports.AgentTextAnswer.decode(reader, reader.uint32());
671
+ continue;
672
+ }
673
+ case 6: {
674
+ if (tag !== 50) {
675
+ break;
676
+ }
677
+ message.firmwareEvent = exports.AgentFirmwareEvent.decode(reader, reader.uint32());
678
+ continue;
679
+ }
680
+ case 7: {
681
+ if (tag !== 58) {
682
+ break;
683
+ }
684
+ message.bleUpdate = exports.AgentBleUpdate.decode(reader, reader.uint32());
685
+ continue;
686
+ }
687
+ case 8: {
688
+ if (tag !== 66) {
689
+ break;
690
+ }
691
+ message.sensorUpdate = exports.AgentSensorUpdate.decode(reader, reader.uint32());
692
+ continue;
693
+ }
694
+ case 9: {
695
+ if (tag !== 74) {
696
+ break;
697
+ }
698
+ message.residentAnswered = exports.AgentResidentAnswered.decode(reader, reader.uint32());
699
+ continue;
700
+ }
701
+ case 10: {
702
+ if (tag !== 82) {
703
+ break;
704
+ }
705
+ message.satelliteDeleted = exports.AgentSatelliteDeleted.decode(reader, reader.uint32());
706
+ continue;
707
+ }
708
+ case 11: {
709
+ if (tag !== 90) {
710
+ break;
711
+ }
712
+ message.setResidentMood = exports.AgentSetResidentMood.decode(reader, reader.uint32());
713
+ continue;
714
+ }
715
+ }
716
+ if ((tag & 7) === 4 || tag === 0) {
717
+ break;
718
+ }
719
+ reader.skip(tag & 7);
720
+ }
721
+ return message;
722
+ }
723
+ finally {
724
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
725
+ }
726
+ },
727
+ create(base) {
728
+ return exports.AgentCommand.fromPartial(base ?? {});
729
+ },
730
+ fromPartial(object) {
731
+ const message = createBaseAgentCommand();
732
+ message.setState = (object.setState !== undefined && object.setState !== null)
733
+ ? exports.AgentSetState.fromPartial(object.setState)
734
+ : undefined;
735
+ message.watchMore = (object.watchMore !== undefined && object.watchMore !== null)
736
+ ? exports.AgentWatchMore.fromPartial(object.watchMore)
737
+ : undefined;
738
+ message.setResident = (object.setResident !== undefined && object.setResident !== null)
739
+ ? exports.AgentSetResident.fromPartial(object.setResident)
740
+ : undefined;
741
+ message.satelliteUpdate = (object.satelliteUpdate !== undefined && object.satelliteUpdate !== null)
742
+ ? exports.AgentSatelliteUpdate.fromPartial(object.satelliteUpdate)
743
+ : undefined;
744
+ message.textAnswer = (object.textAnswer !== undefined && object.textAnswer !== null)
745
+ ? exports.AgentTextAnswer.fromPartial(object.textAnswer)
746
+ : undefined;
747
+ message.firmwareEvent = (object.firmwareEvent !== undefined && object.firmwareEvent !== null)
748
+ ? exports.AgentFirmwareEvent.fromPartial(object.firmwareEvent)
749
+ : undefined;
750
+ message.bleUpdate = (object.bleUpdate !== undefined && object.bleUpdate !== null)
751
+ ? exports.AgentBleUpdate.fromPartial(object.bleUpdate)
752
+ : undefined;
753
+ message.sensorUpdate = (object.sensorUpdate !== undefined && object.sensorUpdate !== null)
754
+ ? exports.AgentSensorUpdate.fromPartial(object.sensorUpdate)
755
+ : undefined;
756
+ message.residentAnswered = (object.residentAnswered !== undefined && object.residentAnswered !== null)
757
+ ? exports.AgentResidentAnswered.fromPartial(object.residentAnswered)
758
+ : undefined;
759
+ message.satelliteDeleted = (object.satelliteDeleted !== undefined && object.satelliteDeleted !== null)
760
+ ? exports.AgentSatelliteDeleted.fromPartial(object.satelliteDeleted)
761
+ : undefined;
762
+ message.setResidentMood = (object.setResidentMood !== undefined && object.setResidentMood !== null)
763
+ ? exports.AgentSetResidentMood.fromPartial(object.setResidentMood)
764
+ : undefined;
765
+ return message;
766
+ },
767
+ };
768
+ function createBaseAgentFirmwareEvent() {
769
+ return { device: "", version: "", updateAvailable: false };
770
+ }
771
+ exports.AgentFirmwareEvent = {
772
+ encode(message, writer = new wire_1.BinaryWriter()) {
773
+ if (message.device !== "") {
774
+ writer.uint32(10).string(message.device);
775
+ }
776
+ if (message.version !== "") {
777
+ writer.uint32(18).string(message.version);
778
+ }
779
+ if (message.updateAvailable !== false) {
780
+ writer.uint32(24).bool(message.updateAvailable);
781
+ }
782
+ return writer;
783
+ },
784
+ decode(input, length) {
785
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
786
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
787
+ if (previousRecursionDepth >= 100) {
788
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
789
+ }
790
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
791
+ try {
792
+ const end = length === undefined ? reader.len : reader.pos + length;
793
+ const message = createBaseAgentFirmwareEvent();
794
+ while (reader.pos < end) {
795
+ const tag = reader.uint32();
796
+ switch (tag >>> 3) {
797
+ case 1: {
798
+ if (tag !== 10) {
799
+ break;
800
+ }
801
+ message.device = reader.string();
802
+ continue;
803
+ }
804
+ case 2: {
805
+ if (tag !== 18) {
806
+ break;
807
+ }
808
+ message.version = reader.string();
809
+ continue;
810
+ }
811
+ case 3: {
812
+ if (tag !== 24) {
813
+ break;
814
+ }
815
+ message.updateAvailable = reader.bool();
816
+ continue;
817
+ }
818
+ }
819
+ if ((tag & 7) === 4 || tag === 0) {
820
+ break;
821
+ }
822
+ reader.skip(tag & 7);
823
+ }
824
+ return message;
825
+ }
826
+ finally {
827
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
828
+ }
829
+ },
830
+ create(base) {
831
+ return exports.AgentFirmwareEvent.fromPartial(base ?? {});
832
+ },
833
+ fromPartial(object) {
834
+ const message = createBaseAgentFirmwareEvent();
835
+ message.device = object.device ?? "";
836
+ message.version = object.version ?? "";
837
+ message.updateAvailable = object.updateAvailable ?? false;
838
+ return message;
839
+ },
840
+ };
841
+ function createBaseAgentSetState() {
842
+ return { stateId: "", value: "" };
843
+ }
844
+ exports.AgentSetState = {
845
+ encode(message, writer = new wire_1.BinaryWriter()) {
846
+ if (message.stateId !== "") {
847
+ writer.uint32(10).string(message.stateId);
848
+ }
849
+ if (message.value !== "") {
850
+ writer.uint32(18).string(message.value);
851
+ }
852
+ return writer;
853
+ },
854
+ decode(input, length) {
855
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
856
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
857
+ if (previousRecursionDepth >= 100) {
858
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
859
+ }
860
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
861
+ try {
862
+ const end = length === undefined ? reader.len : reader.pos + length;
863
+ const message = createBaseAgentSetState();
864
+ while (reader.pos < end) {
865
+ const tag = reader.uint32();
866
+ switch (tag >>> 3) {
867
+ case 1: {
868
+ if (tag !== 10) {
869
+ break;
870
+ }
871
+ message.stateId = reader.string();
872
+ continue;
873
+ }
874
+ case 2: {
875
+ if (tag !== 18) {
876
+ break;
877
+ }
878
+ message.value = reader.string();
879
+ continue;
880
+ }
881
+ }
882
+ if ((tag & 7) === 4 || tag === 0) {
883
+ break;
884
+ }
885
+ reader.skip(tag & 7);
886
+ }
887
+ return message;
888
+ }
889
+ finally {
890
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
891
+ }
892
+ },
893
+ create(base) {
894
+ return exports.AgentSetState.fromPartial(base ?? {});
895
+ },
896
+ fromPartial(object) {
897
+ const message = createBaseAgentSetState();
898
+ message.stateId = object.stateId ?? "";
899
+ message.value = object.value ?? "";
900
+ return message;
901
+ },
902
+ };
903
+ function createBaseAgentWatchMore() {
904
+ return { stateIds: [] };
905
+ }
906
+ exports.AgentWatchMore = {
907
+ encode(message, writer = new wire_1.BinaryWriter()) {
908
+ for (const v of message.stateIds) {
909
+ writer.uint32(10).string(v);
910
+ }
911
+ return writer;
912
+ },
913
+ decode(input, length) {
914
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
915
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
916
+ if (previousRecursionDepth >= 100) {
917
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
918
+ }
919
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
920
+ try {
921
+ const end = length === undefined ? reader.len : reader.pos + length;
922
+ const message = createBaseAgentWatchMore();
923
+ while (reader.pos < end) {
924
+ const tag = reader.uint32();
925
+ switch (tag >>> 3) {
926
+ case 1: {
927
+ if (tag !== 10) {
928
+ break;
929
+ }
930
+ message.stateIds.push(reader.string());
931
+ continue;
932
+ }
933
+ }
934
+ if ((tag & 7) === 4 || tag === 0) {
935
+ break;
936
+ }
937
+ reader.skip(tag & 7);
938
+ }
939
+ return message;
940
+ }
941
+ finally {
942
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
943
+ }
944
+ },
945
+ create(base) {
946
+ return exports.AgentWatchMore.fromPartial(base ?? {});
947
+ },
948
+ fromPartial(object) {
949
+ const message = createBaseAgentWatchMore();
950
+ message.stateIds = object.stateIds?.map((e) => e) || [];
951
+ return message;
952
+ },
953
+ };
954
+ function createBaseAgentSetResident() {
955
+ return { residentId: "", presenceState: 0, type: 0, action: 0 };
956
+ }
957
+ exports.AgentSetResident = {
958
+ encode(message, writer = new wire_1.BinaryWriter()) {
959
+ if (message.residentId !== "") {
960
+ writer.uint32(10).string(message.residentId);
961
+ }
962
+ if (message.presenceState !== 0) {
963
+ writer.uint32(16).int32(message.presenceState);
964
+ }
965
+ if (message.type !== 0) {
966
+ writer.uint32(24).int32(message.type);
967
+ }
968
+ if (message.action !== 0) {
969
+ writer.uint32(32).int32(message.action);
970
+ }
971
+ return writer;
972
+ },
973
+ decode(input, length) {
974
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
975
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
976
+ if (previousRecursionDepth >= 100) {
977
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
978
+ }
979
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
980
+ try {
981
+ const end = length === undefined ? reader.len : reader.pos + length;
982
+ const message = createBaseAgentSetResident();
983
+ while (reader.pos < end) {
984
+ const tag = reader.uint32();
985
+ switch (tag >>> 3) {
986
+ case 1: {
987
+ if (tag !== 10) {
988
+ break;
989
+ }
990
+ message.residentId = reader.string();
991
+ continue;
992
+ }
993
+ case 2: {
994
+ if (tag !== 16) {
995
+ break;
996
+ }
997
+ message.presenceState = reader.int32();
998
+ continue;
999
+ }
1000
+ case 3: {
1001
+ if (tag !== 24) {
1002
+ break;
1003
+ }
1004
+ message.type = reader.int32();
1005
+ continue;
1006
+ }
1007
+ case 4: {
1008
+ if (tag !== 32) {
1009
+ break;
1010
+ }
1011
+ message.action = reader.int32();
1012
+ continue;
1013
+ }
1014
+ }
1015
+ if ((tag & 7) === 4 || tag === 0) {
1016
+ break;
1017
+ }
1018
+ reader.skip(tag & 7);
1019
+ }
1020
+ return message;
1021
+ }
1022
+ finally {
1023
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1024
+ }
1025
+ },
1026
+ create(base) {
1027
+ return exports.AgentSetResident.fromPartial(base ?? {});
1028
+ },
1029
+ fromPartial(object) {
1030
+ const message = createBaseAgentSetResident();
1031
+ message.residentId = object.residentId ?? "";
1032
+ message.presenceState = object.presenceState ?? 0;
1033
+ message.type = object.type ?? 0;
1034
+ message.action = object.action ?? 0;
1035
+ return message;
1036
+ },
1037
+ };
1038
+ function createBaseAgentSetResidentMood() {
1039
+ return { residentId: "", mood: 0, type: 0 };
1040
+ }
1041
+ exports.AgentSetResidentMood = {
1042
+ encode(message, writer = new wire_1.BinaryWriter()) {
1043
+ if (message.residentId !== "") {
1044
+ writer.uint32(10).string(message.residentId);
1045
+ }
1046
+ if (message.mood !== 0) {
1047
+ writer.uint32(16).int32(message.mood);
1048
+ }
1049
+ if (message.type !== 0) {
1050
+ writer.uint32(24).int32(message.type);
1051
+ }
1052
+ return writer;
1053
+ },
1054
+ decode(input, length) {
1055
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1056
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1057
+ if (previousRecursionDepth >= 100) {
1058
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1059
+ }
1060
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1061
+ try {
1062
+ const end = length === undefined ? reader.len : reader.pos + length;
1063
+ const message = createBaseAgentSetResidentMood();
1064
+ while (reader.pos < end) {
1065
+ const tag = reader.uint32();
1066
+ switch (tag >>> 3) {
1067
+ case 1: {
1068
+ if (tag !== 10) {
1069
+ break;
1070
+ }
1071
+ message.residentId = reader.string();
1072
+ continue;
1073
+ }
1074
+ case 2: {
1075
+ if (tag !== 16) {
1076
+ break;
1077
+ }
1078
+ message.mood = reader.int32();
1079
+ continue;
1080
+ }
1081
+ case 3: {
1082
+ if (tag !== 24) {
1083
+ break;
1084
+ }
1085
+ message.type = reader.int32();
1086
+ continue;
1087
+ }
1088
+ }
1089
+ if ((tag & 7) === 4 || tag === 0) {
1090
+ break;
1091
+ }
1092
+ reader.skip(tag & 7);
1093
+ }
1094
+ return message;
1095
+ }
1096
+ finally {
1097
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1098
+ }
1099
+ },
1100
+ create(base) {
1101
+ return exports.AgentSetResidentMood.fromPartial(base ?? {});
1102
+ },
1103
+ fromPartial(object) {
1104
+ const message = createBaseAgentSetResidentMood();
1105
+ message.residentId = object.residentId ?? "";
1106
+ message.mood = object.mood ?? 0;
1107
+ message.type = object.type ?? 0;
1108
+ return message;
1109
+ },
1110
+ };
1111
+ function createBaseAgentSatelliteUpdate() {
1112
+ return {
1113
+ deviceId: "",
1114
+ room: "",
1115
+ address: "",
1116
+ online: false,
1117
+ volume: undefined,
1118
+ mute: undefined,
1119
+ displayName: "",
1120
+ dnd: undefined,
1121
+ };
1122
+ }
1123
+ exports.AgentSatelliteUpdate = {
1124
+ encode(message, writer = new wire_1.BinaryWriter()) {
1125
+ if (message.deviceId !== "") {
1126
+ writer.uint32(10).string(message.deviceId);
1127
+ }
1128
+ if (message.room !== "") {
1129
+ writer.uint32(18).string(message.room);
1130
+ }
1131
+ if (message.address !== "") {
1132
+ writer.uint32(26).string(message.address);
1133
+ }
1134
+ if (message.online !== false) {
1135
+ writer.uint32(32).bool(message.online);
1136
+ }
1137
+ if (message.volume !== undefined) {
1138
+ writer.uint32(40).int32(message.volume);
1139
+ }
1140
+ if (message.mute !== undefined) {
1141
+ writer.uint32(48).bool(message.mute);
1142
+ }
1143
+ if (message.displayName !== "") {
1144
+ writer.uint32(66).string(message.displayName);
1145
+ }
1146
+ if (message.dnd !== undefined) {
1147
+ writer.uint32(72).bool(message.dnd);
1148
+ }
1149
+ return writer;
1150
+ },
1151
+ decode(input, length) {
1152
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1153
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1154
+ if (previousRecursionDepth >= 100) {
1155
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1156
+ }
1157
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1158
+ try {
1159
+ const end = length === undefined ? reader.len : reader.pos + length;
1160
+ const message = createBaseAgentSatelliteUpdate();
1161
+ while (reader.pos < end) {
1162
+ const tag = reader.uint32();
1163
+ switch (tag >>> 3) {
1164
+ case 1: {
1165
+ if (tag !== 10) {
1166
+ break;
1167
+ }
1168
+ message.deviceId = reader.string();
1169
+ continue;
1170
+ }
1171
+ case 2: {
1172
+ if (tag !== 18) {
1173
+ break;
1174
+ }
1175
+ message.room = reader.string();
1176
+ continue;
1177
+ }
1178
+ case 3: {
1179
+ if (tag !== 26) {
1180
+ break;
1181
+ }
1182
+ message.address = reader.string();
1183
+ continue;
1184
+ }
1185
+ case 4: {
1186
+ if (tag !== 32) {
1187
+ break;
1188
+ }
1189
+ message.online = reader.bool();
1190
+ continue;
1191
+ }
1192
+ case 5: {
1193
+ if (tag !== 40) {
1194
+ break;
1195
+ }
1196
+ message.volume = reader.int32();
1197
+ continue;
1198
+ }
1199
+ case 6: {
1200
+ if (tag !== 48) {
1201
+ break;
1202
+ }
1203
+ message.mute = reader.bool();
1204
+ continue;
1205
+ }
1206
+ case 8: {
1207
+ if (tag !== 66) {
1208
+ break;
1209
+ }
1210
+ message.displayName = reader.string();
1211
+ continue;
1212
+ }
1213
+ case 9: {
1214
+ if (tag !== 72) {
1215
+ break;
1216
+ }
1217
+ message.dnd = reader.bool();
1218
+ continue;
1219
+ }
1220
+ }
1221
+ if ((tag & 7) === 4 || tag === 0) {
1222
+ break;
1223
+ }
1224
+ reader.skip(tag & 7);
1225
+ }
1226
+ return message;
1227
+ }
1228
+ finally {
1229
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1230
+ }
1231
+ },
1232
+ create(base) {
1233
+ return exports.AgentSatelliteUpdate.fromPartial(base ?? {});
1234
+ },
1235
+ fromPartial(object) {
1236
+ const message = createBaseAgentSatelliteUpdate();
1237
+ message.deviceId = object.deviceId ?? "";
1238
+ message.room = object.room ?? "";
1239
+ message.address = object.address ?? "";
1240
+ message.online = object.online ?? false;
1241
+ message.volume = object.volume ?? undefined;
1242
+ message.mute = object.mute ?? undefined;
1243
+ message.displayName = object.displayName ?? "";
1244
+ message.dnd = object.dnd ?? undefined;
1245
+ return message;
1246
+ },
1247
+ };
1248
+ function createBaseAgentSatelliteDeleted() {
1249
+ return { deviceId: "", room: "" };
1250
+ }
1251
+ exports.AgentSatelliteDeleted = {
1252
+ encode(message, writer = new wire_1.BinaryWriter()) {
1253
+ if (message.deviceId !== "") {
1254
+ writer.uint32(10).string(message.deviceId);
1255
+ }
1256
+ if (message.room !== "") {
1257
+ writer.uint32(18).string(message.room);
1258
+ }
1259
+ return writer;
1260
+ },
1261
+ decode(input, length) {
1262
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1263
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1264
+ if (previousRecursionDepth >= 100) {
1265
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1266
+ }
1267
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1268
+ try {
1269
+ const end = length === undefined ? reader.len : reader.pos + length;
1270
+ const message = createBaseAgentSatelliteDeleted();
1271
+ while (reader.pos < end) {
1272
+ const tag = reader.uint32();
1273
+ switch (tag >>> 3) {
1274
+ case 1: {
1275
+ if (tag !== 10) {
1276
+ break;
1277
+ }
1278
+ message.deviceId = reader.string();
1279
+ continue;
1280
+ }
1281
+ case 2: {
1282
+ if (tag !== 18) {
1283
+ break;
1284
+ }
1285
+ message.room = reader.string();
1286
+ continue;
1287
+ }
1288
+ }
1289
+ if ((tag & 7) === 4 || tag === 0) {
1290
+ break;
1291
+ }
1292
+ reader.skip(tag & 7);
1293
+ }
1294
+ return message;
1295
+ }
1296
+ finally {
1297
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1298
+ }
1299
+ },
1300
+ create(base) {
1301
+ return exports.AgentSatelliteDeleted.fromPartial(base ?? {});
1302
+ },
1303
+ fromPartial(object) {
1304
+ const message = createBaseAgentSatelliteDeleted();
1305
+ message.deviceId = object.deviceId ?? "";
1306
+ message.room = object.room ?? "";
1307
+ return message;
1308
+ },
1309
+ };
1310
+ function createBaseAgentTextAnswer() {
1311
+ return { text: "", intent: "" };
1312
+ }
1313
+ exports.AgentTextAnswer = {
1314
+ encode(message, writer = new wire_1.BinaryWriter()) {
1315
+ if (message.text !== "") {
1316
+ writer.uint32(10).string(message.text);
1317
+ }
1318
+ if (message.intent !== "") {
1319
+ writer.uint32(18).string(message.intent);
1320
+ }
1321
+ return writer;
1322
+ },
1323
+ decode(input, length) {
1324
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1325
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1326
+ if (previousRecursionDepth >= 100) {
1327
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1328
+ }
1329
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1330
+ try {
1331
+ const end = length === undefined ? reader.len : reader.pos + length;
1332
+ const message = createBaseAgentTextAnswer();
1333
+ while (reader.pos < end) {
1334
+ const tag = reader.uint32();
1335
+ switch (tag >>> 3) {
1336
+ case 1: {
1337
+ if (tag !== 10) {
1338
+ break;
1339
+ }
1340
+ message.text = reader.string();
1341
+ continue;
1342
+ }
1343
+ case 2: {
1344
+ if (tag !== 18) {
1345
+ break;
1346
+ }
1347
+ message.intent = reader.string();
1348
+ continue;
1349
+ }
1350
+ }
1351
+ if ((tag & 7) === 4 || tag === 0) {
1352
+ break;
1353
+ }
1354
+ reader.skip(tag & 7);
1355
+ }
1356
+ return message;
1357
+ }
1358
+ finally {
1359
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1360
+ }
1361
+ },
1362
+ create(base) {
1363
+ return exports.AgentTextAnswer.fromPartial(base ?? {});
1364
+ },
1365
+ fromPartial(object) {
1366
+ const message = createBaseAgentTextAnswer();
1367
+ message.text = object.text ?? "";
1368
+ message.intent = object.intent ?? "";
1369
+ return message;
1370
+ },
1371
+ };
1372
+ function createBaseAgentNotification() {
1373
+ return { text: "", direct: false, severity: "" };
1374
+ }
1375
+ exports.AgentNotification = {
1376
+ encode(message, writer = new wire_1.BinaryWriter()) {
1377
+ if (message.text !== "") {
1378
+ writer.uint32(10).string(message.text);
1379
+ }
1380
+ if (message.direct !== false) {
1381
+ writer.uint32(16).bool(message.direct);
1382
+ }
1383
+ if (message.severity !== "") {
1384
+ writer.uint32(26).string(message.severity);
1385
+ }
1386
+ return writer;
1387
+ },
1388
+ decode(input, length) {
1389
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1390
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1391
+ if (previousRecursionDepth >= 100) {
1392
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1393
+ }
1394
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1395
+ try {
1396
+ const end = length === undefined ? reader.len : reader.pos + length;
1397
+ const message = createBaseAgentNotification();
1398
+ while (reader.pos < end) {
1399
+ const tag = reader.uint32();
1400
+ switch (tag >>> 3) {
1401
+ case 1: {
1402
+ if (tag !== 10) {
1403
+ break;
1404
+ }
1405
+ message.text = reader.string();
1406
+ continue;
1407
+ }
1408
+ case 2: {
1409
+ if (tag !== 16) {
1410
+ break;
1411
+ }
1412
+ message.direct = reader.bool();
1413
+ continue;
1414
+ }
1415
+ case 3: {
1416
+ if (tag !== 26) {
1417
+ break;
1418
+ }
1419
+ message.severity = reader.string();
1420
+ continue;
1421
+ }
1422
+ }
1423
+ if ((tag & 7) === 4 || tag === 0) {
1424
+ break;
1425
+ }
1426
+ reader.skip(tag & 7);
1427
+ }
1428
+ return message;
1429
+ }
1430
+ finally {
1431
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1432
+ }
1433
+ },
1434
+ create(base) {
1435
+ return exports.AgentNotification.fromPartial(base ?? {});
1436
+ },
1437
+ fromPartial(object) {
1438
+ const message = createBaseAgentNotification();
1439
+ message.text = object.text ?? "";
1440
+ message.direct = object.direct ?? false;
1441
+ message.severity = object.severity ?? "";
1442
+ return message;
1443
+ },
1444
+ };
1445
+ function createBaseAgentStateValue() {
1446
+ return { value: "", ack: false };
1447
+ }
1448
+ exports.AgentStateValue = {
1449
+ encode(message, writer = new wire_1.BinaryWriter()) {
1450
+ if (message.value !== "") {
1451
+ writer.uint32(10).string(message.value);
1452
+ }
1453
+ if (message.ack !== false) {
1454
+ writer.uint32(16).bool(message.ack);
1455
+ }
1456
+ return writer;
1457
+ },
1458
+ decode(input, length) {
1459
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1460
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1461
+ if (previousRecursionDepth >= 100) {
1462
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1463
+ }
1464
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1465
+ try {
1466
+ const end = length === undefined ? reader.len : reader.pos + length;
1467
+ const message = createBaseAgentStateValue();
1468
+ while (reader.pos < end) {
1469
+ const tag = reader.uint32();
1470
+ switch (tag >>> 3) {
1471
+ case 1: {
1472
+ if (tag !== 10) {
1473
+ break;
1474
+ }
1475
+ message.value = reader.string();
1476
+ continue;
1477
+ }
1478
+ case 2: {
1479
+ if (tag !== 16) {
1480
+ break;
1481
+ }
1482
+ message.ack = reader.bool();
1483
+ continue;
1484
+ }
1485
+ }
1486
+ if ((tag & 7) === 4 || tag === 0) {
1487
+ break;
1488
+ }
1489
+ reader.skip(tag & 7);
1490
+ }
1491
+ return message;
1492
+ }
1493
+ finally {
1494
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1495
+ }
1496
+ },
1497
+ create(base) {
1498
+ return exports.AgentStateValue.fromPartial(base ?? {});
1499
+ },
1500
+ fromPartial(object) {
1501
+ const message = createBaseAgentStateValue();
1502
+ message.value = object.value ?? "";
1503
+ message.ack = object.ack ?? false;
1504
+ return message;
1505
+ },
1506
+ };
1507
+ function createBaseAgentDevice() {
1508
+ return {
1509
+ stateId: "",
1510
+ floor: "",
1511
+ room: "",
1512
+ device: "",
1513
+ deviceType: "",
1514
+ functions: [],
1515
+ value: undefined,
1516
+ roomNames: {},
1517
+ stateType: 0,
1518
+ enumValues: undefined,
1519
+ writable: false,
1520
+ deviceId: "",
1521
+ canonicalKey: "",
1522
+ inverted: undefined,
1523
+ };
1524
+ }
1525
+ exports.AgentDevice = {
1526
+ encode(message, writer = new wire_1.BinaryWriter()) {
1527
+ if (message.stateId !== "") {
1528
+ writer.uint32(10).string(message.stateId);
1529
+ }
1530
+ if (message.floor !== "") {
1531
+ writer.uint32(18).string(message.floor);
1532
+ }
1533
+ if (message.room !== "") {
1534
+ writer.uint32(26).string(message.room);
1535
+ }
1536
+ if (message.device !== "") {
1537
+ writer.uint32(34).string(message.device);
1538
+ }
1539
+ if (message.deviceType !== "") {
1540
+ writer.uint32(42).string(message.deviceType);
1541
+ }
1542
+ for (const v of message.functions) {
1543
+ writer.uint32(50).string(v);
1544
+ }
1545
+ if (message.value !== undefined) {
1546
+ exports.AgentStateValue.encode(message.value, writer.uint32(58).fork()).join();
1547
+ }
1548
+ globalThis.Object.entries(message.roomNames).forEach(([key, value]) => {
1549
+ exports.AgentDevice_RoomNamesEntry.encode({ key: key, value }, writer.uint32(66).fork()).join();
1550
+ });
1551
+ if (message.stateType !== 0) {
1552
+ writer.uint32(72).int32(message.stateType);
1553
+ }
1554
+ if (message.enumValues !== undefined) {
1555
+ shared_1.EnumValues.encode(message.enumValues, writer.uint32(82).fork()).join();
1556
+ }
1557
+ if (message.writable !== false) {
1558
+ writer.uint32(88).bool(message.writable);
1559
+ }
1560
+ if (message.deviceId !== "") {
1561
+ writer.uint32(98).string(message.deviceId);
1562
+ }
1563
+ if (message.canonicalKey !== "") {
1564
+ writer.uint32(106).string(message.canonicalKey);
1565
+ }
1566
+ if (message.inverted !== undefined) {
1567
+ writer.uint32(112).bool(message.inverted);
1568
+ }
1569
+ return writer;
1570
+ },
1571
+ decode(input, length) {
1572
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1573
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1574
+ if (previousRecursionDepth >= 100) {
1575
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1576
+ }
1577
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1578
+ try {
1579
+ const end = length === undefined ? reader.len : reader.pos + length;
1580
+ const message = createBaseAgentDevice();
1581
+ while (reader.pos < end) {
1582
+ const tag = reader.uint32();
1583
+ switch (tag >>> 3) {
1584
+ case 1: {
1585
+ if (tag !== 10) {
1586
+ break;
1587
+ }
1588
+ message.stateId = reader.string();
1589
+ continue;
1590
+ }
1591
+ case 2: {
1592
+ if (tag !== 18) {
1593
+ break;
1594
+ }
1595
+ message.floor = reader.string();
1596
+ continue;
1597
+ }
1598
+ case 3: {
1599
+ if (tag !== 26) {
1600
+ break;
1601
+ }
1602
+ message.room = reader.string();
1603
+ continue;
1604
+ }
1605
+ case 4: {
1606
+ if (tag !== 34) {
1607
+ break;
1608
+ }
1609
+ message.device = reader.string();
1610
+ continue;
1611
+ }
1612
+ case 5: {
1613
+ if (tag !== 42) {
1614
+ break;
1615
+ }
1616
+ message.deviceType = reader.string();
1617
+ continue;
1618
+ }
1619
+ case 6: {
1620
+ if (tag !== 50) {
1621
+ break;
1622
+ }
1623
+ message.functions.push(reader.string());
1624
+ continue;
1625
+ }
1626
+ case 7: {
1627
+ if (tag !== 58) {
1628
+ break;
1629
+ }
1630
+ message.value = exports.AgentStateValue.decode(reader, reader.uint32());
1631
+ continue;
1632
+ }
1633
+ case 8: {
1634
+ if (tag !== 66) {
1635
+ break;
1636
+ }
1637
+ const entry8 = exports.AgentDevice_RoomNamesEntry.decode(reader, reader.uint32());
1638
+ if (entry8.value !== undefined) {
1639
+ message.roomNames[entry8.key] = entry8.value;
1640
+ }
1641
+ continue;
1642
+ }
1643
+ case 9: {
1644
+ if (tag !== 72) {
1645
+ break;
1646
+ }
1647
+ message.stateType = reader.int32();
1648
+ continue;
1649
+ }
1650
+ case 10: {
1651
+ if (tag !== 82) {
1652
+ break;
1653
+ }
1654
+ message.enumValues = shared_1.EnumValues.decode(reader, reader.uint32());
1655
+ continue;
1656
+ }
1657
+ case 11: {
1658
+ if (tag !== 88) {
1659
+ break;
1660
+ }
1661
+ message.writable = reader.bool();
1662
+ continue;
1663
+ }
1664
+ case 12: {
1665
+ if (tag !== 98) {
1666
+ break;
1667
+ }
1668
+ message.deviceId = reader.string();
1669
+ continue;
1670
+ }
1671
+ case 13: {
1672
+ if (tag !== 106) {
1673
+ break;
1674
+ }
1675
+ message.canonicalKey = reader.string();
1676
+ continue;
1677
+ }
1678
+ case 14: {
1679
+ if (tag !== 112) {
1680
+ break;
1681
+ }
1682
+ message.inverted = reader.bool();
1683
+ continue;
1684
+ }
1685
+ }
1686
+ if ((tag & 7) === 4 || tag === 0) {
1687
+ break;
1688
+ }
1689
+ reader.skip(tag & 7);
1690
+ }
1691
+ return message;
1692
+ }
1693
+ finally {
1694
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1695
+ }
1696
+ },
1697
+ create(base) {
1698
+ return exports.AgentDevice.fromPartial(base ?? {});
1699
+ },
1700
+ fromPartial(object) {
1701
+ const message = createBaseAgentDevice();
1702
+ message.stateId = object.stateId ?? "";
1703
+ message.floor = object.floor ?? "";
1704
+ message.room = object.room ?? "";
1705
+ message.device = object.device ?? "";
1706
+ message.deviceType = object.deviceType ?? "";
1707
+ message.functions = object.functions?.map((e) => e) || [];
1708
+ message.value = (object.value !== undefined && object.value !== null)
1709
+ ? exports.AgentStateValue.fromPartial(object.value)
1710
+ : undefined;
1711
+ message.roomNames = globalThis.Object.entries(object.roomNames ?? {}).reduce((acc, [key, value]) => {
1712
+ if (value !== undefined) {
1713
+ acc[key] = globalThis.String(value);
1714
+ }
1715
+ return acc;
1716
+ }, {});
1717
+ message.stateType = object.stateType ?? 0;
1718
+ message.enumValues = (object.enumValues !== undefined && object.enumValues !== null)
1719
+ ? shared_1.EnumValues.fromPartial(object.enumValues)
1720
+ : undefined;
1721
+ message.writable = object.writable ?? false;
1722
+ message.deviceId = object.deviceId ?? "";
1723
+ message.canonicalKey = object.canonicalKey ?? "";
1724
+ message.inverted = object.inverted ?? undefined;
1725
+ return message;
1726
+ },
1727
+ };
1728
+ function createBaseAgentDevice_RoomNamesEntry() {
1729
+ return { key: "", value: "" };
1730
+ }
1731
+ exports.AgentDevice_RoomNamesEntry = {
1732
+ encode(message, writer = new wire_1.BinaryWriter()) {
1733
+ if (message.key !== "") {
1734
+ writer.uint32(10).string(message.key);
1735
+ }
1736
+ if (message.value !== "") {
1737
+ writer.uint32(18).string(message.value);
1738
+ }
1739
+ return writer;
1740
+ },
1741
+ decode(input, length) {
1742
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1743
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1744
+ if (previousRecursionDepth >= 100) {
1745
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1746
+ }
1747
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1748
+ try {
1749
+ const end = length === undefined ? reader.len : reader.pos + length;
1750
+ const message = createBaseAgentDevice_RoomNamesEntry();
1751
+ while (reader.pos < end) {
1752
+ const tag = reader.uint32();
1753
+ switch (tag >>> 3) {
1754
+ case 1: {
1755
+ if (tag !== 10) {
1756
+ break;
1757
+ }
1758
+ message.key = reader.string();
1759
+ continue;
1760
+ }
1761
+ case 2: {
1762
+ if (tag !== 18) {
1763
+ break;
1764
+ }
1765
+ message.value = reader.string();
1766
+ continue;
1767
+ }
1768
+ }
1769
+ if ((tag & 7) === 4 || tag === 0) {
1770
+ break;
1771
+ }
1772
+ reader.skip(tag & 7);
1773
+ }
1774
+ return message;
1775
+ }
1776
+ finally {
1777
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1778
+ }
1779
+ },
1780
+ create(base) {
1781
+ return exports.AgentDevice_RoomNamesEntry.fromPartial(base ?? {});
1782
+ },
1783
+ fromPartial(object) {
1784
+ const message = createBaseAgentDevice_RoomNamesEntry();
1785
+ message.key = object.key ?? "";
1786
+ message.value = object.value ?? "";
1787
+ return message;
1788
+ },
1789
+ };
1790
+ function createBaseAgentDeviceSnapshot() {
1791
+ return { devices: [] };
1792
+ }
1793
+ exports.AgentDeviceSnapshot = {
1794
+ encode(message, writer = new wire_1.BinaryWriter()) {
1795
+ for (const v of message.devices) {
1796
+ exports.AgentDevice.encode(v, writer.uint32(10).fork()).join();
1797
+ }
1798
+ return writer;
1799
+ },
1800
+ decode(input, length) {
1801
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1802
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1803
+ if (previousRecursionDepth >= 100) {
1804
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1805
+ }
1806
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1807
+ try {
1808
+ const end = length === undefined ? reader.len : reader.pos + length;
1809
+ const message = createBaseAgentDeviceSnapshot();
1810
+ while (reader.pos < end) {
1811
+ const tag = reader.uint32();
1812
+ switch (tag >>> 3) {
1813
+ case 1: {
1814
+ if (tag !== 10) {
1815
+ break;
1816
+ }
1817
+ message.devices.push(exports.AgentDevice.decode(reader, reader.uint32()));
1818
+ continue;
1819
+ }
1820
+ }
1821
+ if ((tag & 7) === 4 || tag === 0) {
1822
+ break;
1823
+ }
1824
+ reader.skip(tag & 7);
1825
+ }
1826
+ return message;
1827
+ }
1828
+ finally {
1829
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1830
+ }
1831
+ },
1832
+ create(base) {
1833
+ return exports.AgentDeviceSnapshot.fromPartial(base ?? {});
1834
+ },
1835
+ fromPartial(object) {
1836
+ const message = createBaseAgentDeviceSnapshot();
1837
+ message.devices = object.devices?.map((e) => exports.AgentDevice.fromPartial(e)) || [];
1838
+ return message;
1839
+ },
1840
+ };
1841
+ function createBaseAgentRoom() {
1842
+ return { roomId: "", displayNames: {} };
1843
+ }
1844
+ exports.AgentRoom = {
1845
+ encode(message, writer = new wire_1.BinaryWriter()) {
1846
+ if (message.roomId !== "") {
1847
+ writer.uint32(10).string(message.roomId);
1848
+ }
1849
+ globalThis.Object.entries(message.displayNames).forEach(([key, value]) => {
1850
+ exports.AgentRoom_DisplayNamesEntry.encode({ key: key, value }, writer.uint32(18).fork()).join();
1851
+ });
1852
+ return writer;
1853
+ },
1854
+ decode(input, length) {
1855
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1856
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1857
+ if (previousRecursionDepth >= 100) {
1858
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1859
+ }
1860
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1861
+ try {
1862
+ const end = length === undefined ? reader.len : reader.pos + length;
1863
+ const message = createBaseAgentRoom();
1864
+ while (reader.pos < end) {
1865
+ const tag = reader.uint32();
1866
+ switch (tag >>> 3) {
1867
+ case 1: {
1868
+ if (tag !== 10) {
1869
+ break;
1870
+ }
1871
+ message.roomId = reader.string();
1872
+ continue;
1873
+ }
1874
+ case 2: {
1875
+ if (tag !== 18) {
1876
+ break;
1877
+ }
1878
+ const entry2 = exports.AgentRoom_DisplayNamesEntry.decode(reader, reader.uint32());
1879
+ if (entry2.value !== undefined) {
1880
+ message.displayNames[entry2.key] = entry2.value;
1881
+ }
1882
+ continue;
1883
+ }
1884
+ }
1885
+ if ((tag & 7) === 4 || tag === 0) {
1886
+ break;
1887
+ }
1888
+ reader.skip(tag & 7);
1889
+ }
1890
+ return message;
1891
+ }
1892
+ finally {
1893
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1894
+ }
1895
+ },
1896
+ create(base) {
1897
+ return exports.AgentRoom.fromPartial(base ?? {});
1898
+ },
1899
+ fromPartial(object) {
1900
+ const message = createBaseAgentRoom();
1901
+ message.roomId = object.roomId ?? "";
1902
+ message.displayNames = globalThis.Object.entries(object.displayNames ?? {}).reduce((acc, [key, value]) => {
1903
+ if (value !== undefined) {
1904
+ acc[key] = globalThis.String(value);
1905
+ }
1906
+ return acc;
1907
+ }, {});
1908
+ return message;
1909
+ },
1910
+ };
1911
+ function createBaseAgentRoom_DisplayNamesEntry() {
1912
+ return { key: "", value: "" };
1913
+ }
1914
+ exports.AgentRoom_DisplayNamesEntry = {
1915
+ encode(message, writer = new wire_1.BinaryWriter()) {
1916
+ if (message.key !== "") {
1917
+ writer.uint32(10).string(message.key);
1918
+ }
1919
+ if (message.value !== "") {
1920
+ writer.uint32(18).string(message.value);
1921
+ }
1922
+ return writer;
1923
+ },
1924
+ decode(input, length) {
1925
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1926
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1927
+ if (previousRecursionDepth >= 100) {
1928
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1929
+ }
1930
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1931
+ try {
1932
+ const end = length === undefined ? reader.len : reader.pos + length;
1933
+ const message = createBaseAgentRoom_DisplayNamesEntry();
1934
+ while (reader.pos < end) {
1935
+ const tag = reader.uint32();
1936
+ switch (tag >>> 3) {
1937
+ case 1: {
1938
+ if (tag !== 10) {
1939
+ break;
1940
+ }
1941
+ message.key = reader.string();
1942
+ continue;
1943
+ }
1944
+ case 2: {
1945
+ if (tag !== 18) {
1946
+ break;
1947
+ }
1948
+ message.value = reader.string();
1949
+ continue;
1950
+ }
1951
+ }
1952
+ if ((tag & 7) === 4 || tag === 0) {
1953
+ break;
1954
+ }
1955
+ reader.skip(tag & 7);
1956
+ }
1957
+ return message;
1958
+ }
1959
+ finally {
1960
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1961
+ }
1962
+ },
1963
+ create(base) {
1964
+ return exports.AgentRoom_DisplayNamesEntry.fromPartial(base ?? {});
1965
+ },
1966
+ fromPartial(object) {
1967
+ const message = createBaseAgentRoom_DisplayNamesEntry();
1968
+ message.key = object.key ?? "";
1969
+ message.value = object.value ?? "";
1970
+ return message;
1971
+ },
1972
+ };
1973
+ function createBaseAgentRoomSnapshot() {
1974
+ return { rooms: [] };
1975
+ }
1976
+ exports.AgentRoomSnapshot = {
1977
+ encode(message, writer = new wire_1.BinaryWriter()) {
1978
+ for (const v of message.rooms) {
1979
+ exports.AgentRoom.encode(v, writer.uint32(10).fork()).join();
1980
+ }
1981
+ return writer;
1982
+ },
1983
+ decode(input, length) {
1984
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1985
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1986
+ if (previousRecursionDepth >= 100) {
1987
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1988
+ }
1989
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1990
+ try {
1991
+ const end = length === undefined ? reader.len : reader.pos + length;
1992
+ const message = createBaseAgentRoomSnapshot();
1993
+ while (reader.pos < end) {
1994
+ const tag = reader.uint32();
1995
+ switch (tag >>> 3) {
1996
+ case 1: {
1997
+ if (tag !== 10) {
1998
+ break;
1999
+ }
2000
+ message.rooms.push(exports.AgentRoom.decode(reader, reader.uint32()));
2001
+ continue;
2002
+ }
2003
+ }
2004
+ if ((tag & 7) === 4 || tag === 0) {
2005
+ break;
2006
+ }
2007
+ reader.skip(tag & 7);
2008
+ }
2009
+ return message;
2010
+ }
2011
+ finally {
2012
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2013
+ }
2014
+ },
2015
+ create(base) {
2016
+ return exports.AgentRoomSnapshot.fromPartial(base ?? {});
2017
+ },
2018
+ fromPartial(object) {
2019
+ const message = createBaseAgentRoomSnapshot();
2020
+ message.rooms = object.rooms?.map((e) => exports.AgentRoom.fromPartial(e)) || [];
2021
+ return message;
2022
+ },
2023
+ };
2024
+ function createBaseAgentResident() {
2025
+ return { roomieId: "", name: undefined, type: 0, moodLevel: undefined, presenceState: undefined };
2026
+ }
2027
+ exports.AgentResident = {
2028
+ encode(message, writer = new wire_1.BinaryWriter()) {
2029
+ if (message.roomieId !== "") {
2030
+ writer.uint32(10).string(message.roomieId);
2031
+ }
2032
+ if (message.name !== undefined) {
2033
+ writer.uint32(18).string(message.name);
2034
+ }
2035
+ if (message.type !== 0) {
2036
+ writer.uint32(24).int32(message.type);
2037
+ }
2038
+ if (message.moodLevel !== undefined) {
2039
+ writer.uint32(32).int32(message.moodLevel);
2040
+ }
2041
+ if (message.presenceState !== undefined) {
2042
+ writer.uint32(40).int32(message.presenceState);
2043
+ }
2044
+ return writer;
2045
+ },
2046
+ decode(input, length) {
2047
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2048
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2049
+ if (previousRecursionDepth >= 100) {
2050
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2051
+ }
2052
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2053
+ try {
2054
+ const end = length === undefined ? reader.len : reader.pos + length;
2055
+ const message = createBaseAgentResident();
2056
+ while (reader.pos < end) {
2057
+ const tag = reader.uint32();
2058
+ switch (tag >>> 3) {
2059
+ case 1: {
2060
+ if (tag !== 10) {
2061
+ break;
2062
+ }
2063
+ message.roomieId = reader.string();
2064
+ continue;
2065
+ }
2066
+ case 2: {
2067
+ if (tag !== 18) {
2068
+ break;
2069
+ }
2070
+ message.name = reader.string();
2071
+ continue;
2072
+ }
2073
+ case 3: {
2074
+ if (tag !== 24) {
2075
+ break;
2076
+ }
2077
+ message.type = reader.int32();
2078
+ continue;
2079
+ }
2080
+ case 4: {
2081
+ if (tag !== 32) {
2082
+ break;
2083
+ }
2084
+ message.moodLevel = reader.int32();
2085
+ continue;
2086
+ }
2087
+ case 5: {
2088
+ if (tag !== 40) {
2089
+ break;
2090
+ }
2091
+ message.presenceState = reader.int32();
2092
+ continue;
2093
+ }
2094
+ }
2095
+ if ((tag & 7) === 4 || tag === 0) {
2096
+ break;
2097
+ }
2098
+ reader.skip(tag & 7);
2099
+ }
2100
+ return message;
2101
+ }
2102
+ finally {
2103
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2104
+ }
2105
+ },
2106
+ create(base) {
2107
+ return exports.AgentResident.fromPartial(base ?? {});
2108
+ },
2109
+ fromPartial(object) {
2110
+ const message = createBaseAgentResident();
2111
+ message.roomieId = object.roomieId ?? "";
2112
+ message.name = object.name ?? undefined;
2113
+ message.type = object.type ?? 0;
2114
+ message.moodLevel = object.moodLevel ?? undefined;
2115
+ message.presenceState = object.presenceState ?? undefined;
2116
+ return message;
2117
+ },
2118
+ };
2119
+ function createBaseAgentResidentSnapshot() {
2120
+ return { residents: [] };
2121
+ }
2122
+ exports.AgentResidentSnapshot = {
2123
+ encode(message, writer = new wire_1.BinaryWriter()) {
2124
+ for (const v of message.residents) {
2125
+ exports.AgentResident.encode(v, writer.uint32(10).fork()).join();
2126
+ }
2127
+ return writer;
2128
+ },
2129
+ decode(input, length) {
2130
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2131
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2132
+ if (previousRecursionDepth >= 100) {
2133
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2134
+ }
2135
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2136
+ try {
2137
+ const end = length === undefined ? reader.len : reader.pos + length;
2138
+ const message = createBaseAgentResidentSnapshot();
2139
+ while (reader.pos < end) {
2140
+ const tag = reader.uint32();
2141
+ switch (tag >>> 3) {
2142
+ case 1: {
2143
+ if (tag !== 10) {
2144
+ break;
2145
+ }
2146
+ message.residents.push(exports.AgentResident.decode(reader, reader.uint32()));
2147
+ continue;
2148
+ }
2149
+ }
2150
+ if ((tag & 7) === 4 || tag === 0) {
2151
+ break;
2152
+ }
2153
+ reader.skip(tag & 7);
2154
+ }
2155
+ return message;
2156
+ }
2157
+ finally {
2158
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2159
+ }
2160
+ },
2161
+ create(base) {
2162
+ return exports.AgentResidentSnapshot.fromPartial(base ?? {});
2163
+ },
2164
+ fromPartial(object) {
2165
+ const message = createBaseAgentResidentSnapshot();
2166
+ message.residents = object.residents?.map((e) => exports.AgentResident.fromPartial(e)) || [];
2167
+ return message;
2168
+ },
2169
+ };
2170
+ function createBaseAgentAskResident() {
2171
+ return { correlationId: "", room: "", question: "" };
2172
+ }
2173
+ exports.AgentAskResident = {
2174
+ encode(message, writer = new wire_1.BinaryWriter()) {
2175
+ if (message.correlationId !== "") {
2176
+ writer.uint32(26).string(message.correlationId);
2177
+ }
2178
+ if (message.room !== "") {
2179
+ writer.uint32(10).string(message.room);
2180
+ }
2181
+ if (message.question !== "") {
2182
+ writer.uint32(18).string(message.question);
2183
+ }
2184
+ return writer;
2185
+ },
2186
+ decode(input, length) {
2187
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2188
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2189
+ if (previousRecursionDepth >= 100) {
2190
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2191
+ }
2192
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2193
+ try {
2194
+ const end = length === undefined ? reader.len : reader.pos + length;
2195
+ const message = createBaseAgentAskResident();
2196
+ while (reader.pos < end) {
2197
+ const tag = reader.uint32();
2198
+ switch (tag >>> 3) {
2199
+ case 3: {
2200
+ if (tag !== 26) {
2201
+ break;
2202
+ }
2203
+ message.correlationId = reader.string();
2204
+ continue;
2205
+ }
2206
+ case 1: {
2207
+ if (tag !== 10) {
2208
+ break;
2209
+ }
2210
+ message.room = reader.string();
2211
+ continue;
2212
+ }
2213
+ case 2: {
2214
+ if (tag !== 18) {
2215
+ break;
2216
+ }
2217
+ message.question = reader.string();
2218
+ continue;
2219
+ }
2220
+ }
2221
+ if ((tag & 7) === 4 || tag === 0) {
2222
+ break;
2223
+ }
2224
+ reader.skip(tag & 7);
2225
+ }
2226
+ return message;
2227
+ }
2228
+ finally {
2229
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2230
+ }
2231
+ },
2232
+ create(base) {
2233
+ return exports.AgentAskResident.fromPartial(base ?? {});
2234
+ },
2235
+ fromPartial(object) {
2236
+ const message = createBaseAgentAskResident();
2237
+ message.correlationId = object.correlationId ?? "";
2238
+ message.room = object.room ?? "";
2239
+ message.question = object.question ?? "";
2240
+ return message;
2241
+ },
2242
+ };
2243
+ function createBaseAgentResidentAnswered() {
2244
+ return { correlationId: "", answer: "" };
2245
+ }
2246
+ exports.AgentResidentAnswered = {
2247
+ encode(message, writer = new wire_1.BinaryWriter()) {
2248
+ if (message.correlationId !== "") {
2249
+ writer.uint32(10).string(message.correlationId);
2250
+ }
2251
+ if (message.answer !== "") {
2252
+ writer.uint32(18).string(message.answer);
2253
+ }
2254
+ return writer;
2255
+ },
2256
+ decode(input, length) {
2257
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2258
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2259
+ if (previousRecursionDepth >= 100) {
2260
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2261
+ }
2262
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2263
+ try {
2264
+ const end = length === undefined ? reader.len : reader.pos + length;
2265
+ const message = createBaseAgentResidentAnswered();
2266
+ while (reader.pos < end) {
2267
+ const tag = reader.uint32();
2268
+ switch (tag >>> 3) {
2269
+ case 1: {
2270
+ if (tag !== 10) {
2271
+ break;
2272
+ }
2273
+ message.correlationId = reader.string();
2274
+ continue;
2275
+ }
2276
+ case 2: {
2277
+ if (tag !== 18) {
2278
+ break;
2279
+ }
2280
+ message.answer = reader.string();
2281
+ continue;
2282
+ }
2283
+ }
2284
+ if ((tag & 7) === 4 || tag === 0) {
2285
+ break;
2286
+ }
2287
+ reader.skip(tag & 7);
2288
+ }
2289
+ return message;
2290
+ }
2291
+ finally {
2292
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2293
+ }
2294
+ },
2295
+ create(base) {
2296
+ return exports.AgentResidentAnswered.fromPartial(base ?? {});
2297
+ },
2298
+ fromPartial(object) {
2299
+ const message = createBaseAgentResidentAnswered();
2300
+ message.correlationId = object.correlationId ?? "";
2301
+ message.answer = object.answer ?? "";
2302
+ return message;
2303
+ },
2304
+ };
2305
+ function createBaseAgentBleUpdate() {
2306
+ return { label: "", mac: "", room: "", satellite: "", rssi: 0 };
2307
+ }
2308
+ exports.AgentBleUpdate = {
2309
+ encode(message, writer = new wire_1.BinaryWriter()) {
2310
+ if (message.label !== "") {
2311
+ writer.uint32(10).string(message.label);
2312
+ }
2313
+ if (message.mac !== "") {
2314
+ writer.uint32(18).string(message.mac);
2315
+ }
2316
+ if (message.room !== "") {
2317
+ writer.uint32(26).string(message.room);
2318
+ }
2319
+ if (message.satellite !== "") {
2320
+ writer.uint32(34).string(message.satellite);
2321
+ }
2322
+ if (message.rssi !== 0) {
2323
+ writer.uint32(40).int32(message.rssi);
2324
+ }
2325
+ return writer;
2326
+ },
2327
+ decode(input, length) {
2328
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2329
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2330
+ if (previousRecursionDepth >= 100) {
2331
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2332
+ }
2333
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2334
+ try {
2335
+ const end = length === undefined ? reader.len : reader.pos + length;
2336
+ const message = createBaseAgentBleUpdate();
2337
+ while (reader.pos < end) {
2338
+ const tag = reader.uint32();
2339
+ switch (tag >>> 3) {
2340
+ case 1: {
2341
+ if (tag !== 10) {
2342
+ break;
2343
+ }
2344
+ message.label = reader.string();
2345
+ continue;
2346
+ }
2347
+ case 2: {
2348
+ if (tag !== 18) {
2349
+ break;
2350
+ }
2351
+ message.mac = reader.string();
2352
+ continue;
2353
+ }
2354
+ case 3: {
2355
+ if (tag !== 26) {
2356
+ break;
2357
+ }
2358
+ message.room = reader.string();
2359
+ continue;
2360
+ }
2361
+ case 4: {
2362
+ if (tag !== 34) {
2363
+ break;
2364
+ }
2365
+ message.satellite = reader.string();
2366
+ continue;
2367
+ }
2368
+ case 5: {
2369
+ if (tag !== 40) {
2370
+ break;
2371
+ }
2372
+ message.rssi = reader.int32();
2373
+ continue;
2374
+ }
2375
+ }
2376
+ if ((tag & 7) === 4 || tag === 0) {
2377
+ break;
2378
+ }
2379
+ reader.skip(tag & 7);
2380
+ }
2381
+ return message;
2382
+ }
2383
+ finally {
2384
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2385
+ }
2386
+ },
2387
+ create(base) {
2388
+ return exports.AgentBleUpdate.fromPartial(base ?? {});
2389
+ },
2390
+ fromPartial(object) {
2391
+ const message = createBaseAgentBleUpdate();
2392
+ message.label = object.label ?? "";
2393
+ message.mac = object.mac ?? "";
2394
+ message.room = object.room ?? "";
2395
+ message.satellite = object.satellite ?? "";
2396
+ message.rssi = object.rssi ?? 0;
2397
+ return message;
2398
+ },
2399
+ };
2400
+ function createBaseAgentSensorUpdate() {
2401
+ return { device: "", temperature: 0, pressure: 0, humidity: 0, iaq: 0, iaqAccuracy: 0, co2Equiv: 0, vocEquiv: 0 };
2402
+ }
2403
+ exports.AgentSensorUpdate = {
2404
+ encode(message, writer = new wire_1.BinaryWriter()) {
2405
+ if (message.device !== "") {
2406
+ writer.uint32(10).string(message.device);
2407
+ }
2408
+ if (message.temperature !== 0) {
2409
+ writer.uint32(21).float(message.temperature);
2410
+ }
2411
+ if (message.pressure !== 0) {
2412
+ writer.uint32(29).float(message.pressure);
2413
+ }
2414
+ if (message.humidity !== 0) {
2415
+ writer.uint32(37).float(message.humidity);
2416
+ }
2417
+ if (message.iaq !== 0) {
2418
+ writer.uint32(53).float(message.iaq);
2419
+ }
2420
+ if (message.iaqAccuracy !== 0) {
2421
+ writer.uint32(56).uint32(message.iaqAccuracy);
2422
+ }
2423
+ if (message.co2Equiv !== 0) {
2424
+ writer.uint32(69).float(message.co2Equiv);
2425
+ }
2426
+ if (message.vocEquiv !== 0) {
2427
+ writer.uint32(77).float(message.vocEquiv);
2428
+ }
2429
+ return writer;
2430
+ },
2431
+ decode(input, length) {
2432
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2433
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2434
+ if (previousRecursionDepth >= 100) {
2435
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2436
+ }
2437
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2438
+ try {
2439
+ const end = length === undefined ? reader.len : reader.pos + length;
2440
+ const message = createBaseAgentSensorUpdate();
2441
+ while (reader.pos < end) {
2442
+ const tag = reader.uint32();
2443
+ switch (tag >>> 3) {
2444
+ case 1: {
2445
+ if (tag !== 10) {
2446
+ break;
2447
+ }
2448
+ message.device = reader.string();
2449
+ continue;
2450
+ }
2451
+ case 2: {
2452
+ if (tag !== 21) {
2453
+ break;
2454
+ }
2455
+ message.temperature = reader.float();
2456
+ continue;
2457
+ }
2458
+ case 3: {
2459
+ if (tag !== 29) {
2460
+ break;
2461
+ }
2462
+ message.pressure = reader.float();
2463
+ continue;
2464
+ }
2465
+ case 4: {
2466
+ if (tag !== 37) {
2467
+ break;
2468
+ }
2469
+ message.humidity = reader.float();
2470
+ continue;
2471
+ }
2472
+ case 6: {
2473
+ if (tag !== 53) {
2474
+ break;
2475
+ }
2476
+ message.iaq = reader.float();
2477
+ continue;
2478
+ }
2479
+ case 7: {
2480
+ if (tag !== 56) {
2481
+ break;
2482
+ }
2483
+ message.iaqAccuracy = reader.uint32();
2484
+ continue;
2485
+ }
2486
+ case 8: {
2487
+ if (tag !== 69) {
2488
+ break;
2489
+ }
2490
+ message.co2Equiv = reader.float();
2491
+ continue;
2492
+ }
2493
+ case 9: {
2494
+ if (tag !== 77) {
2495
+ break;
2496
+ }
2497
+ message.vocEquiv = reader.float();
2498
+ continue;
2499
+ }
2500
+ }
2501
+ if ((tag & 7) === 4 || tag === 0) {
2502
+ break;
2503
+ }
2504
+ reader.skip(tag & 7);
2505
+ }
2506
+ return message;
2507
+ }
2508
+ finally {
2509
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2510
+ }
2511
+ },
2512
+ create(base) {
2513
+ return exports.AgentSensorUpdate.fromPartial(base ?? {});
2514
+ },
2515
+ fromPartial(object) {
2516
+ const message = createBaseAgentSensorUpdate();
2517
+ message.device = object.device ?? "";
2518
+ message.temperature = object.temperature ?? 0;
2519
+ message.pressure = object.pressure ?? 0;
2520
+ message.humidity = object.humidity ?? 0;
2521
+ message.iaq = object.iaq ?? 0;
2522
+ message.iaqAccuracy = object.iaqAccuracy ?? 0;
2523
+ message.co2Equiv = object.co2Equiv ?? 0;
2524
+ message.vocEquiv = object.vocEquiv ?? 0;
2525
+ return message;
2526
+ },
2527
+ };