@m1kad0/hannah-proto 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # hannah-proto
2
+
3
+ Protobuf/gRPC schema definitions for the Hannah voice assistant ecosystem (Core, satellites, WebUI, ioBroker adapter, Telegram bot, and other consumers). This repo is the single source of truth for the wire protocol shared across all of them.
4
+
5
+ The `.proto` files live flat at the repo root, one per functional area — satellite control, event streaming, the ioBroker agent bridge, user registry, timers, automations, and so on. Nothing here is application code, just schema.
6
+
7
+ ## Distribution
8
+
9
+ Three independent, tag-triggered publish targets — pick whichever matches your language. Each contains only generated gRPC stubs/types for the current tagged release.
10
+
11
+ | Language | Package | Install |
12
+ |------------|------------------------------------------|---------------------------------------------|
13
+ | Python | PyPI [`hannah-proto`](https://pypi.org/project/hannah-proto/) | `pip install hannah-proto` |
14
+ | TypeScript | npm [`@m1kad0/hannah-proto`](https://www.npmjs.com/package/@m1kad0/hannah-proto) | `npm install @m1kad0/hannah-proto` |
15
+ | Go | [github.com/NurPech/hannah-proto-go](https://github.com/NurPech/hannah-proto-go) | `go get github.com/NurPech/hannah-proto-go` |
16
+
17
+ Go has no separate package registry, so that tagged GitHub repo *is* the package — `go get` resolves it directly.
18
+
19
+ ## Versioning: PROTO_VERSION
20
+
21
+ Alongside the semver package/tag version, every release carries a single-integer `PROTO_VERSION` (see the `PROTO_VERSION` file). Hannah Core and its clients exchange this value on every call and reject a mismatch at runtime — that's the actual compatibility gate, not the semver tag. A breaking schema change requires bumping `PROTO_VERSION`; CI enforces this on every merge request via `buf breaking`.
22
+
23
+ ## Compatibility checks
24
+
25
+ CI runs `buf lint` and `buf breaking` (against `origin/master`) on every MR. To check a local branch against a specific released version:
26
+
27
+ ```sh
28
+ buf breaking --against '.git#tag=vX.Y.Z'
29
+ ```
30
+
31
+ ## Changelog
32
+
33
+ See [CHANGELOG.md](CHANGELOG.md) for what changed release to release, including breaking changes and the consumers they affect.
package/dist/control.d.ts CHANGED
@@ -73,6 +73,8 @@ export interface Satellite {
73
73
  /** true if the device has a new firmware available */
74
74
  updateAvailable: boolean;
75
75
  newVersion?: string | undefined;
76
+ /** #158: mic reopens after a Smalltalk answer instead of waiting for wake-word/PTT again */
77
+ smalltalkFollowupListen: boolean;
76
78
  }
77
79
  export interface GetSatellitesResponse {
78
80
  satellites: Satellite[];
@@ -97,6 +99,12 @@ export interface SetSatelliteOwnerRequest {
97
99
  /** requestor */
98
100
  requestorId: number;
99
101
  }
102
+ export interface SetSatelliteSmalltalkFollowupRequest {
103
+ deviceId: string;
104
+ enabled: boolean;
105
+ /** requestor */
106
+ requestorId: number;
107
+ }
100
108
  export interface DeleteSatelliteRequest {
101
109
  deviceId: string;
102
110
  /** requestor */
@@ -324,6 +332,7 @@ export declare const GetSatellitesResponse: MessageFns<GetSatellitesResponse>;
324
332
  export declare const SetSatelliteRoomRequest: MessageFns<SetSatelliteRoomRequest>;
325
333
  export declare const SetSatelliteDisplayNameRequest: MessageFns<SetSatelliteDisplayNameRequest>;
326
334
  export declare const SetSatelliteOwnerRequest: MessageFns<SetSatelliteOwnerRequest>;
335
+ export declare const SetSatelliteSmalltalkFollowupRequest: MessageFns<SetSatelliteSmalltalkFollowupRequest>;
327
336
  export declare const DeleteSatelliteRequest: MessageFns<DeleteSatelliteRequest>;
328
337
  export declare const Room: MessageFns<Room>;
329
338
  export declare const GetRoomsResponse: MessageFns<GetRoomsResponse>;
package/dist/control.js CHANGED
@@ -5,7 +5,7 @@
5
5
  // protoc unknown
6
6
  // source: control.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.DeleteCarRequest = exports.UpdateCarRequest = exports.CreateCarResponse = exports.CreateCarRequest = exports.GetCarsResponse = exports.Car = exports.DeleteBleTagRequest = exports.UpdateBleTagRequest = exports.CreateBleTagResponse = exports.CreateBleTagRequest = exports.GetBleTagsResponse = exports.BleTag = exports.UpdateConfigRequest = exports.SettingUpdate = exports.GetSettingsResponse = exports.Setting = exports.Category = exports.DeleteAlarmRequest = exports.UpdateAlarmRequest = exports.CreateAlarmResponse = exports.CreateAlarmRequest = exports.GetAlarmsResponse = exports.Alarm = exports.DeleteTriggerRequest = exports.UpdateTriggerRequest = exports.CreateTriggerRequest = exports.GetTriggersResponse = exports.Trigger = exports.SetGroupRoomsRequest = exports.DeleteGroupRequest = exports.UpdateGroupRequest = exports.CreateGroupRequest = exports.GetGroupsResponse = exports.Group = exports.GetRoomsResponse = exports.Room = exports.DeleteSatelliteRequest = exports.SetSatelliteOwnerRequest = exports.SetSatelliteDisplayNameRequest = exports.SetSatelliteRoomRequest = exports.GetSatellitesResponse = exports.Satellite = exports.AnnounceRequest = exports.SubmitVoiceResponse = exports.SubmitVoiceRequest = exports.SubmitTextResponse = exports.SubmitTextRequest = exports.protobufPackage = void 0;
8
+ exports.DeleteCarRequest = exports.UpdateCarRequest = exports.CreateCarResponse = exports.CreateCarRequest = exports.GetCarsResponse = exports.Car = exports.DeleteBleTagRequest = exports.UpdateBleTagRequest = exports.CreateBleTagResponse = exports.CreateBleTagRequest = exports.GetBleTagsResponse = exports.BleTag = exports.UpdateConfigRequest = exports.SettingUpdate = exports.GetSettingsResponse = exports.Setting = exports.Category = exports.DeleteAlarmRequest = exports.UpdateAlarmRequest = exports.CreateAlarmResponse = exports.CreateAlarmRequest = exports.GetAlarmsResponse = exports.Alarm = exports.DeleteTriggerRequest = exports.UpdateTriggerRequest = exports.CreateTriggerRequest = exports.GetTriggersResponse = exports.Trigger = exports.SetGroupRoomsRequest = exports.DeleteGroupRequest = exports.UpdateGroupRequest = exports.CreateGroupRequest = exports.GetGroupsResponse = exports.Group = exports.GetRoomsResponse = exports.Room = exports.DeleteSatelliteRequest = exports.SetSatelliteSmalltalkFollowupRequest = exports.SetSatelliteOwnerRequest = exports.SetSatelliteDisplayNameRequest = exports.SetSatelliteRoomRequest = exports.GetSatellitesResponse = exports.Satellite = exports.AnnounceRequest = exports.SubmitVoiceResponse = exports.SubmitVoiceRequest = exports.SubmitTextResponse = exports.SubmitTextRequest = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  exports.protobufPackage = "hannah";
@@ -351,6 +351,7 @@ function createBaseSatellite() {
351
351
  firmwareVersion: "",
352
352
  updateAvailable: false,
353
353
  newVersion: undefined,
354
+ smalltalkFollowupListen: false,
354
355
  };
355
356
  }
356
357
  exports.Satellite = {
@@ -397,6 +398,9 @@ exports.Satellite = {
397
398
  if (message.newVersion !== undefined) {
398
399
  writer.uint32(122).string(message.newVersion);
399
400
  }
401
+ if (message.smalltalkFollowupListen !== false) {
402
+ writer.uint32(128).bool(message.smalltalkFollowupListen);
403
+ }
400
404
  return writer;
401
405
  },
402
406
  decode(input, length) {
@@ -504,6 +508,13 @@ exports.Satellite = {
504
508
  message.newVersion = reader.string();
505
509
  continue;
506
510
  }
511
+ case 16: {
512
+ if (tag !== 128) {
513
+ break;
514
+ }
515
+ message.smalltalkFollowupListen = reader.bool();
516
+ continue;
517
+ }
507
518
  }
508
519
  if ((tag & 7) === 4 || tag === 0) {
509
520
  break;
@@ -531,6 +542,7 @@ exports.Satellite = {
531
542
  message.firmwareVersion = object.firmwareVersion ?? "";
532
543
  message.updateAvailable = object.updateAvailable ?? false;
533
544
  message.newVersion = object.newVersion ?? undefined;
545
+ message.smalltalkFollowupListen = object.smalltalkFollowupListen ?? false;
534
546
  return message;
535
547
  },
536
548
  };
@@ -764,6 +776,69 @@ exports.SetSatelliteOwnerRequest = {
764
776
  return message;
765
777
  },
766
778
  };
779
+ function createBaseSetSatelliteSmalltalkFollowupRequest() {
780
+ return { deviceId: "", enabled: false, requestorId: 0 };
781
+ }
782
+ exports.SetSatelliteSmalltalkFollowupRequest = {
783
+ encode(message, writer = new wire_1.BinaryWriter()) {
784
+ if (message.deviceId !== "") {
785
+ writer.uint32(10).string(message.deviceId);
786
+ }
787
+ if (message.enabled !== false) {
788
+ writer.uint32(16).bool(message.enabled);
789
+ }
790
+ if (message.requestorId !== 0) {
791
+ writer.uint32(24).int32(message.requestorId);
792
+ }
793
+ return writer;
794
+ },
795
+ decode(input, length) {
796
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
797
+ const end = length === undefined ? reader.len : reader.pos + length;
798
+ const message = createBaseSetSatelliteSmalltalkFollowupRequest();
799
+ while (reader.pos < end) {
800
+ const tag = reader.uint32();
801
+ switch (tag >>> 3) {
802
+ case 1: {
803
+ if (tag !== 10) {
804
+ break;
805
+ }
806
+ message.deviceId = reader.string();
807
+ continue;
808
+ }
809
+ case 2: {
810
+ if (tag !== 16) {
811
+ break;
812
+ }
813
+ message.enabled = reader.bool();
814
+ continue;
815
+ }
816
+ case 3: {
817
+ if (tag !== 24) {
818
+ break;
819
+ }
820
+ message.requestorId = reader.int32();
821
+ continue;
822
+ }
823
+ }
824
+ if ((tag & 7) === 4 || tag === 0) {
825
+ break;
826
+ }
827
+ reader.skip(tag & 7);
828
+ }
829
+ return message;
830
+ },
831
+ create(base) {
832
+ return exports.SetSatelliteSmalltalkFollowupRequest.fromPartial(base ?? {});
833
+ },
834
+ fromPartial(object) {
835
+ const message = createBaseSetSatelliteSmalltalkFollowupRequest();
836
+ message.deviceId = object.deviceId ?? "";
837
+ message.enabled = object.enabled ?? false;
838
+ message.requestorId = object.requestorId ?? 0;
839
+ return message;
840
+ },
841
+ };
767
842
  function createBaseDeleteSatelliteRequest() {
768
843
  return { deviceId: "", requestorId: 0 };
769
844
  }
package/dist/hannah.d.ts CHANGED
@@ -2,7 +2,7 @@ import { type CallOptions, type ChannelCredentials, Client, type ClientDuplexStr
2
2
  import { AgentCommand, AgentMessage, AgentNotification } from "./agent";
3
3
  import { AutomationCommand, AutomationMessage } from "./automation";
4
4
  import { CarStateResponse, GetAllCarStatesResponse } from "./car_state";
5
- import { AnnounceRequest, CreateAlarmRequest, CreateAlarmResponse, CreateBleTagRequest, CreateBleTagResponse, CreateCarRequest, CreateCarResponse, CreateGroupRequest, CreateTriggerRequest, DeleteAlarmRequest, DeleteBleTagRequest, DeleteCarRequest, DeleteGroupRequest, DeleteSatelliteRequest, DeleteTriggerRequest, GetAlarmsResponse, GetBleTagsResponse, GetCarsResponse, GetGroupsResponse, GetRoomsResponse, GetSatellitesResponse, GetSettingsResponse, GetTriggersResponse, SetGroupRoomsRequest, SetSatelliteDisplayNameRequest, SetSatelliteOwnerRequest, SetSatelliteRoomRequest, SubmitTextRequest, SubmitTextResponse, SubmitVoiceRequest, SubmitVoiceResponse, UpdateAlarmRequest, UpdateBleTagRequest, UpdateCarRequest, UpdateConfigRequest, UpdateGroupRequest, UpdateTriggerRequest } from "./control";
5
+ import { AnnounceRequest, CreateAlarmRequest, CreateAlarmResponse, CreateBleTagRequest, CreateBleTagResponse, CreateCarRequest, CreateCarResponse, CreateGroupRequest, CreateTriggerRequest, DeleteAlarmRequest, DeleteBleTagRequest, DeleteCarRequest, DeleteGroupRequest, DeleteSatelliteRequest, DeleteTriggerRequest, GetAlarmsResponse, GetBleTagsResponse, GetCarsResponse, GetGroupsResponse, GetRoomsResponse, GetSatellitesResponse, GetSettingsResponse, GetTriggersResponse, SetGroupRoomsRequest, SetSatelliteDisplayNameRequest, SetSatelliteOwnerRequest, SetSatelliteRoomRequest, SetSatelliteSmalltalkFollowupRequest, SubmitTextRequest, SubmitTextResponse, SubmitVoiceRequest, SubmitVoiceResponse, UpdateAlarmRequest, UpdateBleTagRequest, UpdateCarRequest, UpdateConfigRequest, UpdateGroupRequest, UpdateTriggerRequest } from "./control";
6
6
  import { ControlDeviceRequest, GetDevicesResponse } from "./device_control_menu";
7
7
  import { EventFilter, HannahEvent, TriggerFirmwareUpdateRequest } from "./event_stream";
8
8
  import { ProvisionSatelliteRequest } from "./satellite_provisioning";
@@ -239,6 +239,19 @@ export declare const HannahServiceService: {
239
239
  readonly responseSerialize: (value: StatusResponse) => Buffer;
240
240
  readonly responseDeserialize: (value: Buffer) => StatusResponse;
241
241
  };
242
+ /**
243
+ * Toggle whether the satellite's mic reopens after a Smalltalk answer instead of
244
+ * waiting for wake-word/PTT again (silence-timeout lives in the satellite firmware). #158
245
+ */
246
+ readonly setSatelliteSmalltalkFollowup: {
247
+ readonly path: "/hannah.HannahService/SetSatelliteSmalltalkFollowup";
248
+ readonly requestStream: false;
249
+ readonly responseStream: false;
250
+ readonly requestSerialize: (value: SetSatelliteSmalltalkFollowupRequest) => Buffer;
251
+ readonly requestDeserialize: (value: Buffer) => SetSatelliteSmalltalkFollowupRequest;
252
+ readonly responseSerialize: (value: StatusResponse) => Buffer;
253
+ readonly responseDeserialize: (value: Buffer) => StatusResponse;
254
+ };
242
255
  /** Delete existing satellite */
243
256
  readonly deleteSatellite: {
244
257
  readonly path: "/hannah.HannahService/DeleteSatellite";
@@ -770,6 +783,11 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
770
783
  setSatelliteDisplayName: handleUnaryCall<SetSatelliteDisplayNameRequest, StatusResponse>;
771
784
  /** Assign a satellite to a Person (User), independent of its room. #31 */
772
785
  setSatelliteOwner: handleUnaryCall<SetSatelliteOwnerRequest, StatusResponse>;
786
+ /**
787
+ * Toggle whether the satellite's mic reopens after a Smalltalk answer instead of
788
+ * waiting for wake-word/PTT again (silence-timeout lives in the satellite firmware). #158
789
+ */
790
+ setSatelliteSmalltalkFollowup: handleUnaryCall<SetSatelliteSmalltalkFollowupRequest, StatusResponse>;
773
791
  /** Delete existing satellite */
774
792
  deleteSatellite: handleUnaryCall<DeleteSatelliteRequest, StatusResponse>;
775
793
  /** --- Rooms/Groups (Admin-UI, #27 Phase 1) --- */
@@ -993,6 +1011,13 @@ export interface HannahServiceClient extends Client {
993
1011
  setSatelliteOwner(request: SetSatelliteOwnerRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
994
1012
  setSatelliteOwner(request: SetSatelliteOwnerRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
995
1013
  setSatelliteOwner(request: SetSatelliteOwnerRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1014
+ /**
1015
+ * Toggle whether the satellite's mic reopens after a Smalltalk answer instead of
1016
+ * waiting for wake-word/PTT again (silence-timeout lives in the satellite firmware). #158
1017
+ */
1018
+ setSatelliteSmalltalkFollowup(request: SetSatelliteSmalltalkFollowupRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1019
+ setSatelliteSmalltalkFollowup(request: SetSatelliteSmalltalkFollowupRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1020
+ setSatelliteSmalltalkFollowup(request: SetSatelliteSmalltalkFollowupRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
996
1021
  /** Delete existing satellite */
997
1022
  deleteSatellite(request: DeleteSatelliteRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
998
1023
  deleteSatellite(request: DeleteSatelliteRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
package/dist/hannah.js CHANGED
@@ -247,6 +247,19 @@ exports.HannahServiceService = {
247
247
  responseSerialize: (value) => Buffer.from(shared_1.StatusResponse.encode(value).finish()),
248
248
  responseDeserialize: (value) => shared_1.StatusResponse.decode(value),
249
249
  },
250
+ /**
251
+ * Toggle whether the satellite's mic reopens after a Smalltalk answer instead of
252
+ * waiting for wake-word/PTT again (silence-timeout lives in the satellite firmware). #158
253
+ */
254
+ setSatelliteSmalltalkFollowup: {
255
+ path: "/hannah.HannahService/SetSatelliteSmalltalkFollowup",
256
+ requestStream: false,
257
+ responseStream: false,
258
+ requestSerialize: (value) => Buffer.from(control_1.SetSatelliteSmalltalkFollowupRequest.encode(value).finish()),
259
+ requestDeserialize: (value) => control_1.SetSatelliteSmalltalkFollowupRequest.decode(value),
260
+ responseSerialize: (value) => Buffer.from(shared_1.StatusResponse.encode(value).finish()),
261
+ responseDeserialize: (value) => shared_1.StatusResponse.decode(value),
262
+ },
250
263
  /** Delete existing satellite */
251
264
  deleteSatellite: {
252
265
  path: "/hannah.HannahService/DeleteSatellite",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m1kad0/hannah-proto",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
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",