@m1kad0/hannah-proto 3.7.1 → 3.8.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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.12.0
4
+ // protoc-gen-ts_proto v2.12.1
5
5
  // protoc unknown
6
6
  // source: hannah/activity_log.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -62,88 +62,98 @@ exports.ActivityLogEntry = {
62
62
  },
63
63
  decode(input, length) {
64
64
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
65
- const end = length === undefined ? reader.len : reader.pos + length;
66
- const message = createBaseActivityLogEntry();
67
- while (reader.pos < end) {
68
- const tag = reader.uint32();
69
- switch (tag >>> 3) {
70
- case 1: {
71
- if (tag !== 8) {
72
- break;
65
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
66
+ if (previousRecursionDepth >= 100) {
67
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
68
+ }
69
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
70
+ try {
71
+ const end = length === undefined ? reader.len : reader.pos + length;
72
+ const message = createBaseActivityLogEntry();
73
+ while (reader.pos < end) {
74
+ const tag = reader.uint32();
75
+ switch (tag >>> 3) {
76
+ case 1: {
77
+ if (tag !== 8) {
78
+ break;
79
+ }
80
+ message.id = reader.int64();
81
+ continue;
73
82
  }
74
- message.id = reader.int64();
75
- continue;
76
- }
77
- case 2: {
78
- if (tag !== 18) {
79
- break;
83
+ case 2: {
84
+ if (tag !== 18) {
85
+ break;
86
+ }
87
+ message.ts = reader.string();
88
+ continue;
80
89
  }
81
- message.ts = reader.string();
82
- continue;
83
- }
84
- case 3: {
85
- if (tag !== 26) {
86
- break;
90
+ case 3: {
91
+ if (tag !== 26) {
92
+ break;
93
+ }
94
+ message.channelType = reader.string();
95
+ continue;
87
96
  }
88
- message.channelType = reader.string();
89
- continue;
90
- }
91
- case 4: {
92
- if (tag !== 34) {
93
- break;
97
+ case 4: {
98
+ if (tag !== 34) {
99
+ break;
100
+ }
101
+ message.channelId = reader.string();
102
+ continue;
94
103
  }
95
- message.channelId = reader.string();
96
- continue;
97
- }
98
- case 5: {
99
- if (tag !== 40) {
100
- break;
104
+ case 5: {
105
+ if (tag !== 40) {
106
+ break;
107
+ }
108
+ message.userId = reader.int32();
109
+ continue;
101
110
  }
102
- message.userId = reader.int32();
103
- continue;
104
- }
105
- case 6: {
106
- if (tag !== 50) {
107
- break;
111
+ case 6: {
112
+ if (tag !== 50) {
113
+ break;
114
+ }
115
+ message.rawText = reader.string();
116
+ continue;
108
117
  }
109
- message.rawText = reader.string();
110
- continue;
111
- }
112
- case 7: {
113
- if (tag !== 58) {
114
- break;
118
+ case 7: {
119
+ if (tag !== 58) {
120
+ break;
121
+ }
122
+ message.intentName = reader.string();
123
+ continue;
115
124
  }
116
- message.intentName = reader.string();
117
- continue;
118
- }
119
- case 8: {
120
- if (tag !== 66) {
121
- break;
125
+ case 8: {
126
+ if (tag !== 66) {
127
+ break;
128
+ }
129
+ message.intentMetaJson = reader.string();
130
+ continue;
122
131
  }
123
- message.intentMetaJson = reader.string();
124
- continue;
125
- }
126
- case 9: {
127
- if (tag !== 74) {
128
- break;
132
+ case 9: {
133
+ if (tag !== 74) {
134
+ break;
135
+ }
136
+ message.answerText = reader.string();
137
+ continue;
129
138
  }
130
- message.answerText = reader.string();
131
- continue;
132
- }
133
- case 10: {
134
- if (tag !== 80) {
135
- break;
139
+ case 10: {
140
+ if (tag !== 80) {
141
+ break;
142
+ }
143
+ message.hasAudio = reader.bool();
144
+ continue;
136
145
  }
137
- message.hasAudio = reader.bool();
138
- continue;
139
146
  }
147
+ if ((tag & 7) === 4 || tag === 0) {
148
+ break;
149
+ }
150
+ reader.skip(tag & 7);
140
151
  }
141
- if ((tag & 7) === 4 || tag === 0) {
142
- break;
143
- }
144
- reader.skip(tag & 7);
152
+ return message;
153
+ }
154
+ finally {
155
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
145
156
  }
146
- return message;
147
157
  },
148
158
  create(base) {
149
159
  return exports.ActivityLogEntry.fromPartial(base ?? {});
@@ -187,46 +197,56 @@ exports.ListActivityLogRequest = {
187
197
  },
188
198
  decode(input, length) {
189
199
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
190
- const end = length === undefined ? reader.len : reader.pos + length;
191
- const message = createBaseListActivityLogRequest();
192
- while (reader.pos < end) {
193
- const tag = reader.uint32();
194
- switch (tag >>> 3) {
195
- case 1: {
196
- if (tag !== 8) {
197
- break;
200
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
201
+ if (previousRecursionDepth >= 100) {
202
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
203
+ }
204
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
205
+ try {
206
+ const end = length === undefined ? reader.len : reader.pos + length;
207
+ const message = createBaseListActivityLogRequest();
208
+ while (reader.pos < end) {
209
+ const tag = reader.uint32();
210
+ switch (tag >>> 3) {
211
+ case 1: {
212
+ if (tag !== 8) {
213
+ break;
214
+ }
215
+ message.requestorId = reader.int32();
216
+ continue;
198
217
  }
199
- message.requestorId = reader.int32();
200
- continue;
201
- }
202
- case 2: {
203
- if (tag !== 16) {
204
- break;
218
+ case 2: {
219
+ if (tag !== 16) {
220
+ break;
221
+ }
222
+ message.filterUserId = reader.int32();
223
+ continue;
205
224
  }
206
- message.filterUserId = reader.int32();
207
- continue;
208
- }
209
- case 3: {
210
- if (tag !== 24) {
211
- break;
225
+ case 3: {
226
+ if (tag !== 24) {
227
+ break;
228
+ }
229
+ message.pageSize = reader.int32();
230
+ continue;
212
231
  }
213
- message.pageSize = reader.int32();
214
- continue;
215
- }
216
- case 4: {
217
- if (tag !== 32) {
218
- break;
232
+ case 4: {
233
+ if (tag !== 32) {
234
+ break;
235
+ }
236
+ message.beforeId = reader.int64();
237
+ continue;
219
238
  }
220
- message.beforeId = reader.int64();
221
- continue;
222
239
  }
240
+ if ((tag & 7) === 4 || tag === 0) {
241
+ break;
242
+ }
243
+ reader.skip(tag & 7);
223
244
  }
224
- if ((tag & 7) === 4 || tag === 0) {
225
- break;
226
- }
227
- reader.skip(tag & 7);
245
+ return message;
246
+ }
247
+ finally {
248
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
228
249
  }
229
- return message;
230
250
  },
231
251
  create(base) {
232
252
  return exports.ListActivityLogRequest.fromPartial(base ?? {});
@@ -255,32 +275,42 @@ exports.ListActivityLogResponse = {
255
275
  },
256
276
  decode(input, length) {
257
277
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
258
- const end = length === undefined ? reader.len : reader.pos + length;
259
- const message = createBaseListActivityLogResponse();
260
- while (reader.pos < end) {
261
- const tag = reader.uint32();
262
- switch (tag >>> 3) {
263
- case 1: {
264
- if (tag !== 10) {
265
- break;
278
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
279
+ if (previousRecursionDepth >= 100) {
280
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
281
+ }
282
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
283
+ try {
284
+ const end = length === undefined ? reader.len : reader.pos + length;
285
+ const message = createBaseListActivityLogResponse();
286
+ while (reader.pos < end) {
287
+ const tag = reader.uint32();
288
+ switch (tag >>> 3) {
289
+ case 1: {
290
+ if (tag !== 10) {
291
+ break;
292
+ }
293
+ message.entries.push(exports.ActivityLogEntry.decode(reader, reader.uint32()));
294
+ continue;
266
295
  }
267
- message.entries.push(exports.ActivityLogEntry.decode(reader, reader.uint32()));
268
- continue;
269
- }
270
- case 2: {
271
- if (tag !== 16) {
272
- break;
296
+ case 2: {
297
+ if (tag !== 16) {
298
+ break;
299
+ }
300
+ message.hasMore = reader.bool();
301
+ continue;
273
302
  }
274
- message.hasMore = reader.bool();
275
- continue;
276
303
  }
304
+ if ((tag & 7) === 4 || tag === 0) {
305
+ break;
306
+ }
307
+ reader.skip(tag & 7);
277
308
  }
278
- if ((tag & 7) === 4 || tag === 0) {
279
- break;
280
- }
281
- reader.skip(tag & 7);
309
+ return message;
310
+ }
311
+ finally {
312
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
282
313
  }
283
- return message;
284
314
  },
285
315
  create(base) {
286
316
  return exports.ListActivityLogResponse.fromPartial(base ?? {});
@@ -310,32 +340,42 @@ exports.StreamActivityAudioRequest = {
310
340
  },
311
341
  decode(input, length) {
312
342
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
313
- const end = length === undefined ? reader.len : reader.pos + length;
314
- const message = createBaseStreamActivityAudioRequest();
315
- while (reader.pos < end) {
316
- const tag = reader.uint32();
317
- switch (tag >>> 3) {
318
- case 1: {
319
- if (tag !== 8) {
320
- break;
343
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
344
+ if (previousRecursionDepth >= 100) {
345
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
346
+ }
347
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
348
+ try {
349
+ const end = length === undefined ? reader.len : reader.pos + length;
350
+ const message = createBaseStreamActivityAudioRequest();
351
+ while (reader.pos < end) {
352
+ const tag = reader.uint32();
353
+ switch (tag >>> 3) {
354
+ case 1: {
355
+ if (tag !== 8) {
356
+ break;
357
+ }
358
+ message.requestorId = reader.int32();
359
+ continue;
321
360
  }
322
- message.requestorId = reader.int32();
323
- continue;
324
- }
325
- case 2: {
326
- if (tag !== 16) {
327
- break;
361
+ case 2: {
362
+ if (tag !== 16) {
363
+ break;
364
+ }
365
+ message.activityLogId = reader.int64();
366
+ continue;
328
367
  }
329
- message.activityLogId = reader.int64();
330
- continue;
331
368
  }
369
+ if ((tag & 7) === 4 || tag === 0) {
370
+ break;
371
+ }
372
+ reader.skip(tag & 7);
332
373
  }
333
- if ((tag & 7) === 4 || tag === 0) {
334
- break;
335
- }
336
- reader.skip(tag & 7);
374
+ return message;
375
+ }
376
+ finally {
377
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
337
378
  }
338
- return message;
339
379
  },
340
380
  create(base) {
341
381
  return exports.StreamActivityAudioRequest.fromPartial(base ?? {});
@@ -364,32 +404,42 @@ exports.ActivityAudioChunk = {
364
404
  },
365
405
  decode(input, length) {
366
406
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
367
- const end = length === undefined ? reader.len : reader.pos + length;
368
- const message = createBaseActivityAudioChunk();
369
- while (reader.pos < end) {
370
- const tag = reader.uint32();
371
- switch (tag >>> 3) {
372
- case 1: {
373
- if (tag !== 10) {
374
- break;
407
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
408
+ if (previousRecursionDepth >= 100) {
409
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
410
+ }
411
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
412
+ try {
413
+ const end = length === undefined ? reader.len : reader.pos + length;
414
+ const message = createBaseActivityAudioChunk();
415
+ while (reader.pos < end) {
416
+ const tag = reader.uint32();
417
+ switch (tag >>> 3) {
418
+ case 1: {
419
+ if (tag !== 10) {
420
+ break;
421
+ }
422
+ message.pcm = reader.bytes();
423
+ continue;
375
424
  }
376
- message.pcm = reader.bytes();
377
- continue;
378
- }
379
- case 2: {
380
- if (tag !== 16) {
381
- break;
425
+ case 2: {
426
+ if (tag !== 16) {
427
+ break;
428
+ }
429
+ message.sampleRate = reader.int32();
430
+ continue;
382
431
  }
383
- message.sampleRate = reader.int32();
384
- continue;
385
432
  }
433
+ if ((tag & 7) === 4 || tag === 0) {
434
+ break;
435
+ }
436
+ reader.skip(tag & 7);
386
437
  }
387
- if ((tag & 7) === 4 || tag === 0) {
388
- break;
389
- }
390
- reader.skip(tag & 7);
438
+ return message;
439
+ }
440
+ finally {
441
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
391
442
  }
392
- return message;
393
443
  },
394
444
  create(base) {
395
445
  return exports.ActivityAudioChunk.fromPartial(base ?? {});
package/dist/agent.d.ts CHANGED
@@ -235,6 +235,23 @@ export interface AgentDevice {
235
235
  enumValues: EnumValues | undefined;
236
236
  /** derived from ioBroker's common.write */
237
237
  writable: boolean;
238
+ /**
239
+ * Grouping ID for the device this state belongs to (the adapter's own
240
+ * `deviceId`, one path segment up from state_id) — lets Core group sibling
241
+ * states without guessing from state_id's path depth. Empty = adapter hasn't
242
+ * been updated yet; Core falls back to its own path-depth heuristic (hannah#257).
243
+ */
244
+ deviceId: string;
245
+ /**
246
+ * Semantic role of this specific state (e.g. "on", "level", "color", "current",
247
+ * "expected"), resolved by the adapter from the state's ioBroker common.role —
248
+ * same per-state basis as device_type, not aggregated across sibling states
249
+ * (a thermostat's "current" and "expected" states have different roles but
250
+ * belong to one device). Empty = adapter hasn't been updated yet or role is
251
+ * unresolvable; Core falls back to its iobroker.state_names default table
252
+ * (hannah#256, hannah#257).
253
+ */
254
+ canonicalKey: string;
238
255
  }
239
256
  export interface AgentDevice_RoomNamesEntry {
240
257
  key: string;