@m1kad0/hannah-proto 4.6.2 → 4.7.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.
Binary file
@@ -47,6 +47,14 @@ export interface AgentMessage {
47
47
  /** full room catalog, independent of devices */
48
48
  sendRooms?: AgentRoomSnapshot | undefined;
49
49
  weatherUpdate?: AgentWeatherUpdate | undefined;
50
+ /**
51
+ * Set = the adapter asks Core to reply with an AgentAck carrying the same
52
+ * ack_id, listing the fields of this message Core's schema did not know.
53
+ * Unset = no ack. A Core too old for AgentAck ignores this field and never
54
+ * replies, so the adapter must treat a missing ack (after a timeout) as
55
+ * "not supported" (hannah-proto#16).
56
+ */
57
+ ackId?: bigint | undefined;
50
58
  }
51
59
  /**
52
60
  * Adapter instructs Hannah to control satellites in a room or a specific satellite.
@@ -126,6 +134,31 @@ export interface AgentCommand {
126
134
  satelliteDeleted?: AgentSatelliteDeleted | undefined;
127
135
  /** Hannah wants to set a resident's mood, independent of presence */
128
136
  setResidentMood?: AgentSetResidentMood | undefined;
137
+ /** reply to an AgentMessage that set ack_id */
138
+ ack?: AgentAck | undefined;
139
+ }
140
+ /**
141
+ * Core's reply to an AgentMessage that set ack_id: which fields of that
142
+ * message (including nested messages) Core's schema did not know and
143
+ * therefore dropped. Empty unknown_fields = every field was known.
144
+ * Core guarantees that every field it does not report is also evaluated,
145
+ * so a security-relevant field never reads as supported without being
146
+ * enforced (hannah-proto#16).
147
+ */
148
+ export interface AgentAck {
149
+ ackId: bigint;
150
+ unknownFields: UnknownFields[];
151
+ }
152
+ /**
153
+ * Unknown field numbers, aggregated per message type — a snapshot with many
154
+ * devices yields one entry for hannah.v1.AgentDevice, not one per device.
155
+ * An unknown oneof payload shows up as a field number on the enclosing message.
156
+ */
157
+ export interface UnknownFields {
158
+ /** fully qualified name, e.g. "hannah.v1.AgentDevice" */
159
+ messageType: string;
160
+ /** deduplicated */
161
+ fieldNumbers: number[];
129
162
  }
130
163
  export interface AgentFirmwareEvent {
131
164
  device: string;
@@ -291,6 +324,13 @@ export interface AgentDevice {
291
324
  * not `false` (hannah-proto#4).
292
325
  */
293
326
  inverted?: boolean | undefined;
327
+ /**
328
+ * Minimum user trust level (0–10, same scale as the users' trust level)
329
+ * required to control this state, read by the adapter from
330
+ * common.custom["hannah.0"].neededTrust. Unset = not configured, no
331
+ * restriction — distinct from an explicit 0 (hannah-proto#15).
332
+ */
333
+ requiredTrustLevel?: number | undefined;
294
334
  }
295
335
  export interface AgentDevice_RoomNamesEntry {
296
336
  key: string;
@@ -392,6 +432,8 @@ export declare const CaptureControl: MessageFns<CaptureControl>;
392
432
  export declare const AgentStateUpdate: MessageFns<AgentStateUpdate>;
393
433
  export declare const AgentTextCommand: MessageFns<AgentTextCommand>;
394
434
  export declare const AgentCommand: MessageFns<AgentCommand>;
435
+ export declare const AgentAck: MessageFns<AgentAck>;
436
+ export declare const UnknownFields: MessageFns<UnknownFields>;
395
437
  export declare const AgentFirmwareEvent: MessageFns<AgentFirmwareEvent>;
396
438
  export declare const AgentSetState: MessageFns<AgentSetState>;
397
439
  export declare const AgentWatchMore: MessageFns<AgentWatchMore>;
package/dist/v1/agent.js CHANGED
@@ -5,7 +5,7 @@
5
5
  // protoc unknown
6
6
  // source: hannah/v1/agent.proto
7
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;
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.UnknownFields = exports.AgentAck = exports.AgentCommand = exports.AgentTextCommand = exports.AgentStateUpdate = exports.CaptureControl = exports.AgentSatelliteControl = exports.AgentMessage = exports.ResidentPresenceAction = exports.ResidentType = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const shared_1 = require("./shared");
@@ -50,6 +50,7 @@ function createBaseAgentMessage() {
50
50
  askResident: undefined,
51
51
  sendRooms: undefined,
52
52
  weatherUpdate: undefined,
53
+ ackId: undefined,
53
54
  };
54
55
  }
55
56
  exports.AgentMessage = {
@@ -81,6 +82,12 @@ exports.AgentMessage = {
81
82
  if (message.weatherUpdate !== undefined) {
82
83
  weather_1.AgentWeatherUpdate.encode(message.weatherUpdate, writer.uint32(74).fork()).join();
83
84
  }
85
+ if (message.ackId !== undefined) {
86
+ if (BigInt.asUintN(64, message.ackId) !== message.ackId) {
87
+ throw new globalThis.Error("value provided for field message.ackId of type uint64 too large");
88
+ }
89
+ writer.uint32(80).uint64(message.ackId);
90
+ }
84
91
  return writer;
85
92
  },
86
93
  decode(input, length) {
@@ -159,6 +166,13 @@ exports.AgentMessage = {
159
166
  message.weatherUpdate = weather_1.AgentWeatherUpdate.decode(reader, reader.uint32());
160
167
  continue;
161
168
  }
169
+ case 10: {
170
+ if (tag !== 80) {
171
+ break;
172
+ }
173
+ message.ackId = reader.uint64();
174
+ continue;
175
+ }
162
176
  }
163
177
  if ((tag & 7) === 4 || tag === 0) {
164
178
  break;
@@ -203,6 +217,7 @@ exports.AgentMessage = {
203
217
  message.weatherUpdate = (object.weatherUpdate !== undefined && object.weatherUpdate !== null)
204
218
  ? weather_1.AgentWeatherUpdate.fromPartial(object.weatherUpdate)
205
219
  : undefined;
220
+ message.ackId = (object.ackId !== undefined && object.ackId !== null) ? BigInt(object.ackId) : undefined;
206
221
  return message;
207
222
  },
208
223
  };
@@ -583,6 +598,7 @@ function createBaseAgentCommand() {
583
598
  residentAnswered: undefined,
584
599
  satelliteDeleted: undefined,
585
600
  setResidentMood: undefined,
601
+ ack: undefined,
586
602
  };
587
603
  }
588
604
  exports.AgentCommand = {
@@ -620,6 +636,9 @@ exports.AgentCommand = {
620
636
  if (message.setResidentMood !== undefined) {
621
637
  exports.AgentSetResidentMood.encode(message.setResidentMood, writer.uint32(90).fork()).join();
622
638
  }
639
+ if (message.ack !== undefined) {
640
+ exports.AgentAck.encode(message.ack, writer.uint32(98).fork()).join();
641
+ }
623
642
  return writer;
624
643
  },
625
644
  decode(input, length) {
@@ -712,6 +731,13 @@ exports.AgentCommand = {
712
731
  message.setResidentMood = exports.AgentSetResidentMood.decode(reader, reader.uint32());
713
732
  continue;
714
733
  }
734
+ case 12: {
735
+ if (tag !== 98) {
736
+ break;
737
+ }
738
+ message.ack = exports.AgentAck.decode(reader, reader.uint32());
739
+ continue;
740
+ }
715
741
  }
716
742
  if ((tag & 7) === 4 || tag === 0) {
717
743
  break;
@@ -762,6 +788,143 @@ exports.AgentCommand = {
762
788
  message.setResidentMood = (object.setResidentMood !== undefined && object.setResidentMood !== null)
763
789
  ? exports.AgentSetResidentMood.fromPartial(object.setResidentMood)
764
790
  : undefined;
791
+ message.ack = (object.ack !== undefined && object.ack !== null) ? exports.AgentAck.fromPartial(object.ack) : undefined;
792
+ return message;
793
+ },
794
+ };
795
+ function createBaseAgentAck() {
796
+ return { ackId: 0n, unknownFields: [] };
797
+ }
798
+ exports.AgentAck = {
799
+ encode(message, writer = new wire_1.BinaryWriter()) {
800
+ if (message.ackId !== 0n) {
801
+ if (BigInt.asUintN(64, message.ackId) !== message.ackId) {
802
+ throw new globalThis.Error("value provided for field message.ackId of type uint64 too large");
803
+ }
804
+ writer.uint32(8).uint64(message.ackId);
805
+ }
806
+ for (const v of message.unknownFields) {
807
+ exports.UnknownFields.encode(v, writer.uint32(18).fork()).join();
808
+ }
809
+ return writer;
810
+ },
811
+ decode(input, length) {
812
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
813
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
814
+ if (previousRecursionDepth >= 100) {
815
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
816
+ }
817
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
818
+ try {
819
+ const end = length === undefined ? reader.len : reader.pos + length;
820
+ const message = createBaseAgentAck();
821
+ while (reader.pos < end) {
822
+ const tag = reader.uint32();
823
+ switch (tag >>> 3) {
824
+ case 1: {
825
+ if (tag !== 8) {
826
+ break;
827
+ }
828
+ message.ackId = reader.uint64();
829
+ continue;
830
+ }
831
+ case 2: {
832
+ if (tag !== 18) {
833
+ break;
834
+ }
835
+ message.unknownFields.push(exports.UnknownFields.decode(reader, reader.uint32()));
836
+ continue;
837
+ }
838
+ }
839
+ if ((tag & 7) === 4 || tag === 0) {
840
+ break;
841
+ }
842
+ reader.skip(tag & 7);
843
+ }
844
+ return message;
845
+ }
846
+ finally {
847
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
848
+ }
849
+ },
850
+ create(base) {
851
+ return exports.AgentAck.fromPartial(base ?? {});
852
+ },
853
+ fromPartial(object) {
854
+ const message = createBaseAgentAck();
855
+ message.ackId = (object.ackId !== undefined && object.ackId !== null) ? BigInt(object.ackId) : 0n;
856
+ message.unknownFields = object.unknownFields?.map((e) => exports.UnknownFields.fromPartial(e)) || [];
857
+ return message;
858
+ },
859
+ };
860
+ function createBaseUnknownFields() {
861
+ return { messageType: "", fieldNumbers: [] };
862
+ }
863
+ exports.UnknownFields = {
864
+ encode(message, writer = new wire_1.BinaryWriter()) {
865
+ if (message.messageType !== "") {
866
+ writer.uint32(10).string(message.messageType);
867
+ }
868
+ writer.uint32(18).fork();
869
+ for (const v of message.fieldNumbers) {
870
+ writer.uint32(v);
871
+ }
872
+ writer.join();
873
+ return writer;
874
+ },
875
+ decode(input, length) {
876
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
877
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
878
+ if (previousRecursionDepth >= 100) {
879
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
880
+ }
881
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
882
+ try {
883
+ const end = length === undefined ? reader.len : reader.pos + length;
884
+ const message = createBaseUnknownFields();
885
+ while (reader.pos < end) {
886
+ const tag = reader.uint32();
887
+ switch (tag >>> 3) {
888
+ case 1: {
889
+ if (tag !== 10) {
890
+ break;
891
+ }
892
+ message.messageType = reader.string();
893
+ continue;
894
+ }
895
+ case 2: {
896
+ if (tag === 16) {
897
+ message.fieldNumbers.push(reader.uint32());
898
+ continue;
899
+ }
900
+ if (tag === 18) {
901
+ const end2 = reader.uint32() + reader.pos;
902
+ while (reader.pos < end2) {
903
+ message.fieldNumbers.push(reader.uint32());
904
+ }
905
+ continue;
906
+ }
907
+ break;
908
+ }
909
+ }
910
+ if ((tag & 7) === 4 || tag === 0) {
911
+ break;
912
+ }
913
+ reader.skip(tag & 7);
914
+ }
915
+ return message;
916
+ }
917
+ finally {
918
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
919
+ }
920
+ },
921
+ create(base) {
922
+ return exports.UnknownFields.fromPartial(base ?? {});
923
+ },
924
+ fromPartial(object) {
925
+ const message = createBaseUnknownFields();
926
+ message.messageType = object.messageType ?? "";
927
+ message.fieldNumbers = object.fieldNumbers?.map((e) => e) || [];
765
928
  return message;
766
929
  },
767
930
  };
@@ -1520,6 +1683,7 @@ function createBaseAgentDevice() {
1520
1683
  deviceId: "",
1521
1684
  canonicalKey: "",
1522
1685
  inverted: undefined,
1686
+ requiredTrustLevel: undefined,
1523
1687
  };
1524
1688
  }
1525
1689
  exports.AgentDevice = {
@@ -1566,6 +1730,9 @@ exports.AgentDevice = {
1566
1730
  if (message.inverted !== undefined) {
1567
1731
  writer.uint32(112).bool(message.inverted);
1568
1732
  }
1733
+ if (message.requiredTrustLevel !== undefined) {
1734
+ writer.uint32(120).int32(message.requiredTrustLevel);
1735
+ }
1569
1736
  return writer;
1570
1737
  },
1571
1738
  decode(input, length) {
@@ -1682,6 +1849,13 @@ exports.AgentDevice = {
1682
1849
  message.inverted = reader.bool();
1683
1850
  continue;
1684
1851
  }
1852
+ case 15: {
1853
+ if (tag !== 120) {
1854
+ break;
1855
+ }
1856
+ message.requiredTrustLevel = reader.int32();
1857
+ continue;
1858
+ }
1685
1859
  }
1686
1860
  if ((tag & 7) === 4 || tag === 0) {
1687
1861
  break;
@@ -1722,6 +1896,7 @@ exports.AgentDevice = {
1722
1896
  message.deviceId = object.deviceId ?? "";
1723
1897
  message.canonicalKey = object.canonicalKey ?? "";
1724
1898
  message.inverted = object.inverted ?? undefined;
1899
+ message.requiredTrustLevel = object.requiredTrustLevel ?? undefined;
1725
1900
  return message;
1726
1901
  },
1727
1902
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m1kad0/hannah-proto",
3
- "version": "4.6.2",
3
+ "version": "4.7.0",
4
4
  "description": "Generated TypeScript gRPC-js client stubs for the Hannah voice assistant proto schema",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",