@m1kad0/hannah-proto 4.3.0 → 4.5.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.
- package/dist/compat_versions.js +6 -1
- package/dist/descriptor.binpb +0 -0
- package/dist/hannah.d.ts +62 -0
- package/dist/hannah.js +31 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/infrastructure.d.ts +98 -0
- package/dist/infrastructure.js +652 -0
- package/dist/logging.d.ts +189 -0
- package/dist/logging.js +775 -0
- package/package.json +1 -1
package/dist/compat_versions.js
CHANGED
|
@@ -82,9 +82,14 @@ exports.REQUIRED_COMPAT_VERSIONS = {
|
|
|
82
82
|
"AutomationConnect": 1,
|
|
83
83
|
"ChannelConnect": 1,
|
|
84
84
|
"GetChannels": 1,
|
|
85
|
+
"SubscribeInfrastructure": 1,
|
|
86
|
+
"LogCollectorConnect": 1,
|
|
85
87
|
"ListActivityLog": 1,
|
|
86
88
|
"StreamActivityAudio": 1,
|
|
87
89
|
"CreateMessage": 1,
|
|
88
90
|
"ListMessages": 1,
|
|
89
|
-
"DeleteMessage": 1
|
|
91
|
+
"DeleteMessage": 1,
|
|
92
|
+
"Ship": 1,
|
|
93
|
+
"GetSources": 1,
|
|
94
|
+
"Export": 1
|
|
90
95
|
};
|
package/dist/descriptor.binpb
CHANGED
|
Binary file
|
package/dist/hannah.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ChannelCommand, ChannelMessage, GetChannelsResponse } from "./channel";
|
|
|
7
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";
|
|
8
8
|
import { ControlDeviceRequest, GetDevicesResponse } from "./device_control_menu";
|
|
9
9
|
import { EventFilter, HannahEvent, TriggerFirmwareUpdateRequest, TriggerSatelliteRestartRequest } from "./event_stream";
|
|
10
|
+
import { InfrastructureFilter, InfrastructureMessage, LogCollectorCommand, LogCollectorMessage } from "./infrastructure";
|
|
10
11
|
import { CreateMessageRequest, DeleteMessageRequest, ListMessagesRequest, ListMessagesResponse } from "./messages";
|
|
11
12
|
import { DeleteSatelliteRequest, GetSatellitesResponse, SetSatelliteDisplayNameRequest, SetSatelliteOwnerRequest, SetSatelliteRoomRequest, SetSatelliteSmalltalkFollowupRequest } from "./satellite";
|
|
12
13
|
import { ProvisionSatelliteRequest } from "./satellite_provisioning";
|
|
@@ -872,6 +873,36 @@ export declare const HannahServiceService: {
|
|
|
872
873
|
readonly responseSerialize: (value: GetChannelsResponse) => Buffer;
|
|
873
874
|
readonly responseDeserialize: (value: Buffer) => GetChannelsResponse;
|
|
874
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
|
+
};
|
|
875
906
|
/**
|
|
876
907
|
* --- Activity Log ---
|
|
877
908
|
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
@@ -1155,6 +1186,20 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
|
|
|
1155
1186
|
channelConnect: handleBidiStreamingCall<ChannelMessage, ChannelCommand>;
|
|
1156
1187
|
/** Currently connected channel adapters and whether they support account linking. */
|
|
1157
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>;
|
|
1158
1203
|
/**
|
|
1159
1204
|
* --- Activity Log ---
|
|
1160
1205
|
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
@@ -1552,6 +1597,23 @@ export interface HannahServiceClient extends Client {
|
|
|
1552
1597
|
getChannels(request: Empty, callback: (error: ServiceError | null, response: GetChannelsResponse) => void): ClientUnaryCall;
|
|
1553
1598
|
getChannels(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: GetChannelsResponse) => void): ClientUnaryCall;
|
|
1554
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>;
|
|
1555
1617
|
/**
|
|
1556
1618
|
* --- Activity Log ---
|
|
1557
1619
|
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
package/dist/hannah.js
CHANGED
|
@@ -16,6 +16,7 @@ const channel_1 = require("./channel");
|
|
|
16
16
|
const control_1 = require("./control");
|
|
17
17
|
const device_control_menu_1 = require("./device_control_menu");
|
|
18
18
|
const event_stream_1 = require("./event_stream");
|
|
19
|
+
const infrastructure_1 = require("./infrastructure");
|
|
19
20
|
const messages_1 = require("./messages");
|
|
20
21
|
const satellite_1 = require("./satellite");
|
|
21
22
|
const satellite_provisioning_1 = require("./satellite_provisioning");
|
|
@@ -880,6 +881,36 @@ exports.HannahServiceService = {
|
|
|
880
881
|
responseSerialize: (value) => Buffer.from(channel_1.GetChannelsResponse.encode(value).finish()),
|
|
881
882
|
responseDeserialize: (value) => channel_1.GetChannelsResponse.decode(value),
|
|
882
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
|
+
},
|
|
883
914
|
/**
|
|
884
915
|
* --- Activity Log ---
|
|
885
916
|
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export * as control from './control';
|
|
|
10
10
|
export * as device_control_menu from './device_control_menu';
|
|
11
11
|
export * as event_stream from './event_stream';
|
|
12
12
|
export * as hannah from './hannah';
|
|
13
|
+
export * as infrastructure from './infrastructure';
|
|
14
|
+
export * as logging from './logging';
|
|
13
15
|
export * as messages from './messages';
|
|
14
16
|
export * as options from './options';
|
|
15
17
|
export * as satellite from './satellite';
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ 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.channel = 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.logging = 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"));
|
|
@@ -49,6 +49,8 @@ exports.control = __importStar(require("./control"));
|
|
|
49
49
|
exports.device_control_menu = __importStar(require("./device_control_menu"));
|
|
50
50
|
exports.event_stream = __importStar(require("./event_stream"));
|
|
51
51
|
exports.hannah = __importStar(require("./hannah"));
|
|
52
|
+
exports.infrastructure = __importStar(require("./infrastructure"));
|
|
53
|
+
exports.logging = __importStar(require("./logging"));
|
|
52
54
|
exports.messages = __importStar(require("./messages"));
|
|
53
55
|
exports.options = __importStar(require("./options"));
|
|
54
56
|
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 {};
|