@m1kad0/hannah-proto 4.2.1 → 4.4.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.
@@ -8,6 +8,7 @@ exports.REQUIRED_COMPAT_VERSIONS = {
8
8
  "GetUser": 1,
9
9
  "LinkAccount": 1,
10
10
  "UnlinkAccount": 1,
11
+ "CreateLinkToken": 1,
11
12
  "SetTrustLevel": 1,
12
13
  "SetSystemMessages": 1,
13
14
  "SetAutomation": 1,
@@ -79,6 +80,10 @@ exports.REQUIRED_COMPAT_VERSIONS = {
79
80
  "DeleteTimer": 1,
80
81
  "AgentConnect": 1,
81
82
  "AutomationConnect": 1,
83
+ "ChannelConnect": 1,
84
+ "GetChannels": 1,
85
+ "SubscribeInfrastructure": 1,
86
+ "LogCollectorConnect": 1,
82
87
  "ListActivityLog": 1,
83
88
  "StreamActivityAudio": 1,
84
89
  "CreateMessage": 1,
Binary file
package/dist/hannah.d.ts CHANGED
@@ -3,9 +3,11 @@ import { ActivityAudioChunk, ListActivityLogRequest, ListActivityLogResponse, St
3
3
  import { AgentCommand, AgentMessage, AgentNotification } from "./agent";
4
4
  import { AutomationCommand, AutomationMessage } from "./automation";
5
5
  import { CarStateResponse, GetAllCarStatesResponse } from "./car_state";
6
+ import { ChannelCommand, ChannelMessage, GetChannelsResponse } from "./channel";
6
7
  import { AnnounceRequest, CreateAlarmRequest, CreateAlarmResponse, CreateBleTagRequest, CreateBleTagResponse, CreateCarRequest, CreateCarResponse, CreateGroupRequest, CreatePresenceSourceRequest, CreatePresenceSourceResponse, CreateTriggerRequest, DeleteAlarmRequest, DeleteBleTagRequest, DeleteCarRequest, DeleteGroupRequest, DeletePresenceSourceRequest, DeleteTriggerRequest, GetAlarmsResponse, GetBleTagsResponse, GetCarsResponse, GetGroupsResponse, GetPresenceSourcesResponse, GetRoomsResponse, GetSettingsResponse, GetTriggersResponse, SetGroupSatellitesRequest, SubmitTextRequest, SubmitTextResponse, SubmitVoiceRequest, SubmitVoiceResponse, UpdateAlarmRequest, UpdateBleTagRequest, UpdateCarRequest, UpdateConfigRequest, UpdateGroupRequest, UpdatePresenceSourceRequest, UpdateTriggerRequest } from "./control";
7
8
  import { ControlDeviceRequest, GetDevicesResponse } from "./device_control_menu";
8
9
  import { EventFilter, HannahEvent, TriggerFirmwareUpdateRequest, TriggerSatelliteRestartRequest } from "./event_stream";
10
+ import { InfrastructureFilter, InfrastructureMessage, LogCollectorCommand, LogCollectorMessage } from "./infrastructure";
9
11
  import { CreateMessageRequest, DeleteMessageRequest, ListMessagesRequest, ListMessagesResponse } from "./messages";
10
12
  import { DeleteSatelliteRequest, GetSatellitesResponse, SetSatelliteDisplayNameRequest, SetSatelliteOwnerRequest, SetSatelliteRoomRequest, SetSatelliteSmalltalkFollowupRequest } from "./satellite";
11
13
  import { ProvisionSatelliteRequest } from "./satellite_provisioning";
@@ -14,7 +16,7 @@ import { Empty, StatusResponse } from "./shared";
14
16
  import { EnrollVoiceprintRequest, StartVoiceEnrollmentRequest } from "./speaker_enrollment";
15
17
  import { DeleteTimerRequest, GetTimersRequest, GetTimersResponse } from "./timer_admin";
16
18
  import { TimerCommand, TimerMessage } from "./timer_service";
17
- import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, GetResidentsResponse, GetUserRequest, GetUsersRequest, GetUsersResponse, LinkAccountRequest, LoginRequest, SetAutomationRequest, SetSystemMessagesRequest, SetTrustLevelRequest, UnlinkAccountRequest, UpdateUserRequest, UserResponse } from "./user_registry";
19
+ import { CreateLinkTokenRequest, CreateLinkTokenResponse, CreateUserRequest, CreateUserResponse, DeleteUserRequest, GetResidentsResponse, GetUserRequest, GetUsersRequest, GetUsersResponse, LinkAccountRequest, LoginRequest, SetAutomationRequest, SetSystemMessagesRequest, SetTrustLevelRequest, UnlinkAccountRequest, UpdateUserRequest, UserResponse } from "./user_registry";
18
20
  import { CaptureCommand, CollectorMessage, SatelliteAudioChunk, SatelliteCaptureRequest, SatelliteCaptureResponse, TriggerPlinkRequest } from "./wakeword_capture";
19
21
  export declare const protobufPackage = "hannah";
20
22
  export type HannahServiceService = typeof HannahServiceService;
@@ -56,6 +58,19 @@ export declare const HannahServiceService: {
56
58
  readonly responseSerialize: (value: StatusResponse) => Buffer;
57
59
  readonly responseDeserialize: (value: Buffer) => StatusResponse;
58
60
  };
61
+ /**
62
+ * One-time token for linking an account via the service's adapter (e.g. Telegram deep link).
63
+ * Redeemed by the adapter over ChannelConnect.
64
+ */
65
+ readonly createLinkToken: {
66
+ readonly path: "/hannah.HannahService/CreateLinkToken";
67
+ readonly requestStream: false;
68
+ readonly responseStream: false;
69
+ readonly requestSerialize: (value: CreateLinkTokenRequest) => Buffer;
70
+ readonly requestDeserialize: (value: Buffer) => CreateLinkTokenRequest;
71
+ readonly responseSerialize: (value: CreateLinkTokenResponse) => Buffer;
72
+ readonly responseDeserialize: (value: Buffer) => CreateLinkTokenResponse;
73
+ };
59
74
  readonly setTrustLevel: {
60
75
  readonly path: "/hannah.HannahService/SetTrustLevel";
61
76
  readonly requestStream: false;
@@ -832,6 +847,62 @@ export declare const HannahServiceService: {
832
847
  readonly responseSerialize: (value: AutomationCommand) => Buffer;
833
848
  readonly responseDeserialize: (value: Buffer) => AutomationCommand;
834
849
  };
850
+ /**
851
+ * --- Channels ---
852
+ * Bidirectional stream for channel adapters (e.g. the Telegram service). The adapter
853
+ * sends a ChannelRegister and keeps the stream open; it counts as available exactly as
854
+ * long as the stream is open. A second registration for the same service replaces the
855
+ * first. Link tokens (CreateLinkToken) are redeemed over this stream.
856
+ */
857
+ readonly channelConnect: {
858
+ readonly path: "/hannah.HannahService/ChannelConnect";
859
+ readonly requestStream: true;
860
+ readonly responseStream: true;
861
+ readonly requestSerialize: (value: ChannelMessage) => Buffer;
862
+ readonly requestDeserialize: (value: Buffer) => ChannelMessage;
863
+ readonly responseSerialize: (value: ChannelCommand) => Buffer;
864
+ readonly responseDeserialize: (value: Buffer) => ChannelCommand;
865
+ };
866
+ /** Currently connected channel adapters and whether they support account linking. */
867
+ readonly getChannels: {
868
+ readonly path: "/hannah.HannahService/GetChannels";
869
+ readonly requestStream: false;
870
+ readonly responseStream: false;
871
+ readonly requestSerialize: (value: Empty) => Buffer;
872
+ readonly requestDeserialize: (value: Buffer) => Empty;
873
+ readonly responseSerialize: (value: GetChannelsResponse) => Buffer;
874
+ readonly responseDeserialize: (value: Buffer) => GetChannelsResponse;
875
+ };
876
+ /**
877
+ * --- Infrastructure ---
878
+ * Service discovery for components: Hannah sends an InfrastructureSnapshot of all
879
+ * currently available infrastructure services (e.g. the log collector) right after
880
+ * subscribing, followed by ServiceAvailable/ServiceUnavailable deltas.
881
+ */
882
+ readonly subscribeInfrastructure: {
883
+ readonly path: "/hannah.HannahService/SubscribeInfrastructure";
884
+ readonly requestStream: false;
885
+ readonly responseStream: true;
886
+ readonly requestSerialize: (value: InfrastructureFilter) => Buffer;
887
+ readonly requestDeserialize: (value: Buffer) => InfrastructureFilter;
888
+ readonly responseSerialize: (value: InfrastructureMessage) => Buffer;
889
+ readonly responseDeserialize: (value: Buffer) => InfrastructureMessage;
890
+ };
891
+ /**
892
+ * Bidirectional stream for the log collector. The collector sends a LogCollectorRegister
893
+ * and keeps the stream open; it counts as available exactly as long as the stream is
894
+ * open, and a second registration for the same instance replaces the first (same
895
+ * semantics as ChannelConnect). Not related to CollectorConnect (wakeword capture).
896
+ */
897
+ readonly logCollectorConnect: {
898
+ readonly path: "/hannah.HannahService/LogCollectorConnect";
899
+ readonly requestStream: true;
900
+ readonly responseStream: true;
901
+ readonly requestSerialize: (value: LogCollectorMessage) => Buffer;
902
+ readonly requestDeserialize: (value: Buffer) => LogCollectorMessage;
903
+ readonly responseSerialize: (value: LogCollectorCommand) => Buffer;
904
+ readonly responseDeserialize: (value: Buffer) => LogCollectorCommand;
905
+ };
835
906
  /**
836
907
  * --- Activity Log ---
837
908
  * Read access to the Activity Log (#220) for external consumers (WebUI). List returns
@@ -892,6 +963,11 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
892
963
  getUser: handleUnaryCall<GetUserRequest, UserResponse>;
893
964
  linkAccount: handleUnaryCall<LinkAccountRequest, StatusResponse>;
894
965
  unlinkAccount: handleUnaryCall<UnlinkAccountRequest, StatusResponse>;
966
+ /**
967
+ * One-time token for linking an account via the service's adapter (e.g. Telegram deep link).
968
+ * Redeemed by the adapter over ChannelConnect.
969
+ */
970
+ createLinkToken: handleUnaryCall<CreateLinkTokenRequest, CreateLinkTokenResponse>;
895
971
  setTrustLevel: handleUnaryCall<SetTrustLevelRequest, StatusResponse>;
896
972
  setSystemMessages: handleUnaryCall<SetSystemMessagesRequest, StatusResponse>;
897
973
  /**
@@ -1100,6 +1176,30 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
1100
1176
  * instead of missing state changes that happened while it was offline.
1101
1177
  */
1102
1178
  automationConnect: handleBidiStreamingCall<AutomationMessage, AutomationCommand>;
1179
+ /**
1180
+ * --- Channels ---
1181
+ * Bidirectional stream for channel adapters (e.g. the Telegram service). The adapter
1182
+ * sends a ChannelRegister and keeps the stream open; it counts as available exactly as
1183
+ * long as the stream is open. A second registration for the same service replaces the
1184
+ * first. Link tokens (CreateLinkToken) are redeemed over this stream.
1185
+ */
1186
+ channelConnect: handleBidiStreamingCall<ChannelMessage, ChannelCommand>;
1187
+ /** Currently connected channel adapters and whether they support account linking. */
1188
+ getChannels: handleUnaryCall<Empty, GetChannelsResponse>;
1189
+ /**
1190
+ * --- Infrastructure ---
1191
+ * Service discovery for components: Hannah sends an InfrastructureSnapshot of all
1192
+ * currently available infrastructure services (e.g. the log collector) right after
1193
+ * subscribing, followed by ServiceAvailable/ServiceUnavailable deltas.
1194
+ */
1195
+ subscribeInfrastructure: handleServerStreamingCall<InfrastructureFilter, InfrastructureMessage>;
1196
+ /**
1197
+ * Bidirectional stream for the log collector. The collector sends a LogCollectorRegister
1198
+ * and keeps the stream open; it counts as available exactly as long as the stream is
1199
+ * open, and a second registration for the same instance replaces the first (same
1200
+ * semantics as ChannelConnect). Not related to CollectorConnect (wakeword capture).
1201
+ */
1202
+ logCollectorConnect: handleBidiStreamingCall<LogCollectorMessage, LogCollectorCommand>;
1103
1203
  /**
1104
1204
  * --- Activity Log ---
1105
1205
  * Read access to the Activity Log (#220) for external consumers (WebUI). List returns
@@ -1128,6 +1228,13 @@ export interface HannahServiceClient extends Client {
1128
1228
  unlinkAccount(request: UnlinkAccountRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1129
1229
  unlinkAccount(request: UnlinkAccountRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1130
1230
  unlinkAccount(request: UnlinkAccountRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1231
+ /**
1232
+ * One-time token for linking an account via the service's adapter (e.g. Telegram deep link).
1233
+ * Redeemed by the adapter over ChannelConnect.
1234
+ */
1235
+ createLinkToken(request: CreateLinkTokenRequest, callback: (error: ServiceError | null, response: CreateLinkTokenResponse) => void): ClientUnaryCall;
1236
+ createLinkToken(request: CreateLinkTokenRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CreateLinkTokenResponse) => void): ClientUnaryCall;
1237
+ createLinkToken(request: CreateLinkTokenRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CreateLinkTokenResponse) => void): ClientUnaryCall;
1131
1238
  setTrustLevel(request: SetTrustLevelRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1132
1239
  setTrustLevel(request: SetTrustLevelRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1133
1240
  setTrustLevel(request: SetTrustLevelRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
@@ -1476,6 +1583,37 @@ export interface HannahServiceClient extends Client {
1476
1583
  automationConnect(): ClientDuplexStream<AutomationMessage, AutomationCommand>;
1477
1584
  automationConnect(options: Partial<CallOptions>): ClientDuplexStream<AutomationMessage, AutomationCommand>;
1478
1585
  automationConnect(metadata: Metadata, options?: Partial<CallOptions>): ClientDuplexStream<AutomationMessage, AutomationCommand>;
1586
+ /**
1587
+ * --- Channels ---
1588
+ * Bidirectional stream for channel adapters (e.g. the Telegram service). The adapter
1589
+ * sends a ChannelRegister and keeps the stream open; it counts as available exactly as
1590
+ * long as the stream is open. A second registration for the same service replaces the
1591
+ * first. Link tokens (CreateLinkToken) are redeemed over this stream.
1592
+ */
1593
+ channelConnect(): ClientDuplexStream<ChannelMessage, ChannelCommand>;
1594
+ channelConnect(options: Partial<CallOptions>): ClientDuplexStream<ChannelMessage, ChannelCommand>;
1595
+ channelConnect(metadata: Metadata, options?: Partial<CallOptions>): ClientDuplexStream<ChannelMessage, ChannelCommand>;
1596
+ /** Currently connected channel adapters and whether they support account linking. */
1597
+ getChannels(request: Empty, callback: (error: ServiceError | null, response: GetChannelsResponse) => void): ClientUnaryCall;
1598
+ getChannels(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: GetChannelsResponse) => void): ClientUnaryCall;
1599
+ getChannels(request: Empty, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetChannelsResponse) => void): ClientUnaryCall;
1600
+ /**
1601
+ * --- Infrastructure ---
1602
+ * Service discovery for components: Hannah sends an InfrastructureSnapshot of all
1603
+ * currently available infrastructure services (e.g. the log collector) right after
1604
+ * subscribing, followed by ServiceAvailable/ServiceUnavailable deltas.
1605
+ */
1606
+ subscribeInfrastructure(request: InfrastructureFilter, options?: Partial<CallOptions>): ClientReadableStream<InfrastructureMessage>;
1607
+ subscribeInfrastructure(request: InfrastructureFilter, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<InfrastructureMessage>;
1608
+ /**
1609
+ * Bidirectional stream for the log collector. The collector sends a LogCollectorRegister
1610
+ * and keeps the stream open; it counts as available exactly as long as the stream is
1611
+ * open, and a second registration for the same instance replaces the first (same
1612
+ * semantics as ChannelConnect). Not related to CollectorConnect (wakeword capture).
1613
+ */
1614
+ logCollectorConnect(): ClientDuplexStream<LogCollectorMessage, LogCollectorCommand>;
1615
+ logCollectorConnect(options: Partial<CallOptions>): ClientDuplexStream<LogCollectorMessage, LogCollectorCommand>;
1616
+ logCollectorConnect(metadata: Metadata, options?: Partial<CallOptions>): ClientDuplexStream<LogCollectorMessage, LogCollectorCommand>;
1479
1617
  /**
1480
1618
  * --- Activity Log ---
1481
1619
  * Read access to the Activity Log (#220) for external consumers (WebUI). List returns
package/dist/hannah.js CHANGED
@@ -12,9 +12,11 @@ const activity_log_1 = require("./activity_log");
12
12
  const agent_1 = require("./agent");
13
13
  const automation_1 = require("./automation");
14
14
  const car_state_1 = require("./car_state");
15
+ const channel_1 = require("./channel");
15
16
  const control_1 = require("./control");
16
17
  const device_control_menu_1 = require("./device_control_menu");
17
18
  const event_stream_1 = require("./event_stream");
19
+ const infrastructure_1 = require("./infrastructure");
18
20
  const messages_1 = require("./messages");
19
21
  const satellite_1 = require("./satellite");
20
22
  const satellite_provisioning_1 = require("./satellite_provisioning");
@@ -64,6 +66,19 @@ exports.HannahServiceService = {
64
66
  responseSerialize: (value) => Buffer.from(shared_1.StatusResponse.encode(value).finish()),
65
67
  responseDeserialize: (value) => shared_1.StatusResponse.decode(value),
66
68
  },
69
+ /**
70
+ * One-time token for linking an account via the service's adapter (e.g. Telegram deep link).
71
+ * Redeemed by the adapter over ChannelConnect.
72
+ */
73
+ createLinkToken: {
74
+ path: "/hannah.HannahService/CreateLinkToken",
75
+ requestStream: false,
76
+ responseStream: false,
77
+ requestSerialize: (value) => Buffer.from(user_registry_1.CreateLinkTokenRequest.encode(value).finish()),
78
+ requestDeserialize: (value) => user_registry_1.CreateLinkTokenRequest.decode(value),
79
+ responseSerialize: (value) => Buffer.from(user_registry_1.CreateLinkTokenResponse.encode(value).finish()),
80
+ responseDeserialize: (value) => user_registry_1.CreateLinkTokenResponse.decode(value),
81
+ },
67
82
  setTrustLevel: {
68
83
  path: "/hannah.HannahService/SetTrustLevel",
69
84
  requestStream: false,
@@ -840,6 +855,62 @@ exports.HannahServiceService = {
840
855
  responseSerialize: (value) => Buffer.from(automation_1.AutomationCommand.encode(value).finish()),
841
856
  responseDeserialize: (value) => automation_1.AutomationCommand.decode(value),
842
857
  },
858
+ /**
859
+ * --- Channels ---
860
+ * Bidirectional stream for channel adapters (e.g. the Telegram service). The adapter
861
+ * sends a ChannelRegister and keeps the stream open; it counts as available exactly as
862
+ * long as the stream is open. A second registration for the same service replaces the
863
+ * first. Link tokens (CreateLinkToken) are redeemed over this stream.
864
+ */
865
+ channelConnect: {
866
+ path: "/hannah.HannahService/ChannelConnect",
867
+ requestStream: true,
868
+ responseStream: true,
869
+ requestSerialize: (value) => Buffer.from(channel_1.ChannelMessage.encode(value).finish()),
870
+ requestDeserialize: (value) => channel_1.ChannelMessage.decode(value),
871
+ responseSerialize: (value) => Buffer.from(channel_1.ChannelCommand.encode(value).finish()),
872
+ responseDeserialize: (value) => channel_1.ChannelCommand.decode(value),
873
+ },
874
+ /** Currently connected channel adapters and whether they support account linking. */
875
+ getChannels: {
876
+ path: "/hannah.HannahService/GetChannels",
877
+ requestStream: false,
878
+ responseStream: false,
879
+ requestSerialize: (value) => Buffer.from(shared_1.Empty.encode(value).finish()),
880
+ requestDeserialize: (value) => shared_1.Empty.decode(value),
881
+ responseSerialize: (value) => Buffer.from(channel_1.GetChannelsResponse.encode(value).finish()),
882
+ responseDeserialize: (value) => channel_1.GetChannelsResponse.decode(value),
883
+ },
884
+ /**
885
+ * --- Infrastructure ---
886
+ * Service discovery for components: Hannah sends an InfrastructureSnapshot of all
887
+ * currently available infrastructure services (e.g. the log collector) right after
888
+ * subscribing, followed by ServiceAvailable/ServiceUnavailable deltas.
889
+ */
890
+ subscribeInfrastructure: {
891
+ path: "/hannah.HannahService/SubscribeInfrastructure",
892
+ requestStream: false,
893
+ responseStream: true,
894
+ requestSerialize: (value) => Buffer.from(infrastructure_1.InfrastructureFilter.encode(value).finish()),
895
+ requestDeserialize: (value) => infrastructure_1.InfrastructureFilter.decode(value),
896
+ responseSerialize: (value) => Buffer.from(infrastructure_1.InfrastructureMessage.encode(value).finish()),
897
+ responseDeserialize: (value) => infrastructure_1.InfrastructureMessage.decode(value),
898
+ },
899
+ /**
900
+ * Bidirectional stream for the log collector. The collector sends a LogCollectorRegister
901
+ * and keeps the stream open; it counts as available exactly as long as the stream is
902
+ * open, and a second registration for the same instance replaces the first (same
903
+ * semantics as ChannelConnect). Not related to CollectorConnect (wakeword capture).
904
+ */
905
+ logCollectorConnect: {
906
+ path: "/hannah.HannahService/LogCollectorConnect",
907
+ requestStream: true,
908
+ responseStream: true,
909
+ requestSerialize: (value) => Buffer.from(infrastructure_1.LogCollectorMessage.encode(value).finish()),
910
+ requestDeserialize: (value) => infrastructure_1.LogCollectorMessage.decode(value),
911
+ responseSerialize: (value) => Buffer.from(infrastructure_1.LogCollectorCommand.encode(value).finish()),
912
+ responseDeserialize: (value) => infrastructure_1.LogCollectorCommand.decode(value),
913
+ },
843
914
  /**
844
915
  * --- Activity Log ---
845
916
  * Read access to the Activity Log (#220) for external consumers (WebUI). List returns
package/dist/index.d.ts CHANGED
@@ -3,12 +3,14 @@ export * as activity_log from './activity_log';
3
3
  export * as agent from './agent';
4
4
  export * as automation from './automation';
5
5
  export * as car_state from './car_state';
6
+ export * as channel from './channel';
6
7
  export * as compat_interceptor from './compat_interceptor';
7
8
  export * as compat_versions from './compat_versions';
8
9
  export * as control from './control';
9
10
  export * as device_control_menu from './device_control_menu';
10
11
  export * as event_stream from './event_stream';
11
12
  export * as hannah from './hannah';
13
+ export * as infrastructure from './infrastructure';
12
14
  export * as messages from './messages';
13
15
  export * as options from './options';
14
16
  export * as satellite from './satellite';
package/dist/index.js CHANGED
@@ -36,18 +36,20 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.weather = exports.wakeword_capture = exports.user_registry = exports.timer_service = exports.timer_admin = exports.speaker_enrollment = exports.shared = exports.satellite_proxy = exports.satellite_provisioning = exports.satellite = exports.options = exports.messages = exports.hannah = exports.event_stream = exports.device_control_menu = exports.control = exports.compat_versions = exports.compat_interceptor = exports.car_state = exports.automation = exports.agent = exports.activity_log = void 0;
39
+ exports.weather = exports.wakeword_capture = exports.user_registry = exports.timer_service = exports.timer_admin = exports.speaker_enrollment = exports.shared = exports.satellite_proxy = exports.satellite_provisioning = exports.satellite = exports.options = exports.messages = exports.infrastructure = exports.hannah = exports.event_stream = exports.device_control_menu = exports.control = exports.compat_versions = exports.compat_interceptor = exports.channel = exports.car_state = exports.automation = exports.agent = exports.activity_log = void 0;
40
40
  __exportStar(require("./version"), exports);
41
41
  exports.activity_log = __importStar(require("./activity_log"));
42
42
  exports.agent = __importStar(require("./agent"));
43
43
  exports.automation = __importStar(require("./automation"));
44
44
  exports.car_state = __importStar(require("./car_state"));
45
+ exports.channel = __importStar(require("./channel"));
45
46
  exports.compat_interceptor = __importStar(require("./compat_interceptor"));
46
47
  exports.compat_versions = __importStar(require("./compat_versions"));
47
48
  exports.control = __importStar(require("./control"));
48
49
  exports.device_control_menu = __importStar(require("./device_control_menu"));
49
50
  exports.event_stream = __importStar(require("./event_stream"));
50
51
  exports.hannah = __importStar(require("./hannah"));
52
+ exports.infrastructure = __importStar(require("./infrastructure"));
51
53
  exports.messages = __importStar(require("./messages"));
52
54
  exports.options = __importStar(require("./options"));
53
55
  exports.satellite = __importStar(require("./satellite"));
@@ -0,0 +1,98 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "hannah";
3
+ /**
4
+ * Infrastructure services that Hannah Core announces to all connected components
5
+ * (service discovery). Typed on purpose — a new kind of service gets a new enum value,
6
+ * a fundamentally new use case gets its own oneof branch, never a generic key/value bag.
7
+ */
8
+ export declare enum ServiceKind {
9
+ SERVICE_KIND_UNSPECIFIED = 0,
10
+ SERVICE_KIND_LOG_COLLECTOR = 1,
11
+ UNRECOGNIZED = -1
12
+ }
13
+ /** Where a currently available infrastructure service can be reached. */
14
+ export interface ServiceEndpoint {
15
+ kind: ServiceKind;
16
+ instance: string;
17
+ host: string;
18
+ port: number;
19
+ /** informational */
20
+ version: string;
21
+ }
22
+ /** Which kinds of service the subscriber cares about. Empty = all kinds. */
23
+ export interface InfrastructureFilter {
24
+ kinds: ServiceKind[];
25
+ }
26
+ export interface InfrastructureMessage {
27
+ /** sent once, right after subscribing */
28
+ snapshot?: InfrastructureSnapshot | undefined;
29
+ /** live delta */
30
+ available?: ServiceAvailable | undefined;
31
+ /** live delta */
32
+ unavailable?: ServiceUnavailable | undefined;
33
+ }
34
+ /**
35
+ * All matching services available right now. Sent once per subscription, before any
36
+ * delta — a subscriber replaces its whole state with it, so a reconnect never keeps a
37
+ * service that disappeared while it was offline.
38
+ */
39
+ export interface InfrastructureSnapshot {
40
+ services: ServiceEndpoint[];
41
+ }
42
+ /** A service became available, or an available one re-registered (e.g. new address). */
43
+ export interface ServiceAvailable {
44
+ service: ServiceEndpoint | undefined;
45
+ }
46
+ /** A service is no longer available (its registration stream ended or was displaced). */
47
+ export interface ServiceUnavailable {
48
+ kind: ServiceKind;
49
+ instance: string;
50
+ }
51
+ /** Sent by the log collector over the LogCollectorConnect stream. */
52
+ export interface LogCollectorMessage {
53
+ /** sent once, right after connecting */
54
+ register?: LogCollectorRegister | undefined;
55
+ }
56
+ /** A second log collector registering with the same instance replaces the first. */
57
+ export interface LogCollectorRegister {
58
+ instance: string;
59
+ /** empty = Hannah Core uses the stream's peer address */
60
+ host: string;
61
+ port: number;
62
+ /** informational */
63
+ version: string;
64
+ }
65
+ /** Sent by Hannah Core over the LogCollectorConnect stream. */
66
+ export interface LogCollectorCommand {
67
+ /** sent once, right after register */
68
+ registered?: LogCollectorRegistered | undefined;
69
+ }
70
+ export interface LogCollectorRegistered {
71
+ }
72
+ export declare const ServiceEndpoint: MessageFns<ServiceEndpoint>;
73
+ export declare const InfrastructureFilter: MessageFns<InfrastructureFilter>;
74
+ export declare const InfrastructureMessage: MessageFns<InfrastructureMessage>;
75
+ export declare const InfrastructureSnapshot: MessageFns<InfrastructureSnapshot>;
76
+ export declare const ServiceAvailable: MessageFns<ServiceAvailable>;
77
+ export declare const ServiceUnavailable: MessageFns<ServiceUnavailable>;
78
+ export declare const LogCollectorMessage: MessageFns<LogCollectorMessage>;
79
+ export declare const LogCollectorRegister: MessageFns<LogCollectorRegister>;
80
+ export declare const LogCollectorCommand: MessageFns<LogCollectorCommand>;
81
+ export declare const LogCollectorRegistered: MessageFns<LogCollectorRegistered>;
82
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
83
+ export type DeepPartial<T> = T extends bigint ? string | number | bigint : T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
84
+ [K in keyof T]?: DeepPartial<T[K]>;
85
+ } : Partial<T>;
86
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
87
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
88
+ [K in keyof P]: Exact<P[K], I[K]>;
89
+ } & {
90
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
91
+ };
92
+ export interface MessageFns<T> {
93
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
94
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
95
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
96
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
97
+ }
98
+ export {};