@m1kad0/hannah-proto 5.2.0 → 5.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.
- package/dist/compat_versions.js +1 -0
- package/dist/descriptor.binpb +0 -0
- package/dist/v2/hannah.d.ts +49 -0
- package/dist/v2/hannah.js +95 -1
- package/dist/v2/infrastructure.d.ts +4 -0
- package/dist/v2/infrastructure.js +24 -2
- package/package.json +1 -1
package/dist/compat_versions.js
CHANGED
|
@@ -177,6 +177,7 @@ exports.REQUIRED_COMPAT_VERSIONS = {
|
|
|
177
177
|
"/hannah.v2.HannahService/CreateMessage": 1,
|
|
178
178
|
"/hannah.v2.HannahService/ListMessages": 1,
|
|
179
179
|
"/hannah.v2.HannahService/DeleteMessage": 1,
|
|
180
|
+
"/hannah.v2.HannahService/Heartbeat": 1,
|
|
180
181
|
"/hannah.v2.LogService/Ship": 1,
|
|
181
182
|
"/hannah.v2.LogService/GetSources": 1,
|
|
182
183
|
"/hannah.v2.LogService/Export": 1
|
package/dist/descriptor.binpb
CHANGED
|
Binary file
|
package/dist/v2/hannah.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
1
2
|
import { type CallOptions, type ChannelCredentials, Client, type ClientDuplexStream, type ClientOptions, type ClientReadableStream, type ClientUnaryCall, type handleBidiStreamingCall, type handleServerStreamingCall, type handleUnaryCall, type Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
2
3
|
import { ActivityAudioChunk, ListActivityLogRequest, ListActivityLogResponse, StreamActivityAudioRequest } from "./activity_log";
|
|
3
4
|
import { AgentCommand, AgentMessage, AgentNotification } from "./agent";
|
|
@@ -19,6 +20,12 @@ import { TimerCommand, TimerMessage } from "./timer_service";
|
|
|
19
20
|
import { CreateLinkTokenRequest, CreateLinkTokenResponse, CreateUserRequest, CreateUserResponse, DeleteUserRequest, GetResidentsResponse, GetUserRequest, GetUsersRequest, GetUsersResponse, LinkAccountRequest, LoginRequest, SetAutomationRequest, SetSystemMessagesRequest, SetTrustLevelRequest, UnlinkAccountRequest, UpdateUserRequest, UserResponse } from "./user_registry";
|
|
20
21
|
import { CaptureCommand, CollectorMessage, SatelliteAudioChunk, SatelliteCaptureRequest, SatelliteCaptureResponse, TriggerPlinkRequest } from "./wakeword_capture";
|
|
21
22
|
export declare const protobufPackage = "hannah.v2";
|
|
23
|
+
export interface HeartbeatRequest {
|
|
24
|
+
}
|
|
25
|
+
export interface HeartbeatResponse {
|
|
26
|
+
}
|
|
27
|
+
export declare const HeartbeatRequest: MessageFns<HeartbeatRequest>;
|
|
28
|
+
export declare const HeartbeatResponse: MessageFns<HeartbeatResponse>;
|
|
22
29
|
export type HannahServiceService = typeof HannahServiceService;
|
|
23
30
|
export declare const HannahServiceService: {
|
|
24
31
|
/** --- User Registry --- */
|
|
@@ -956,6 +963,19 @@ export declare const HannahServiceService: {
|
|
|
956
963
|
readonly responseSerialize: (value: StatusResponse) => Buffer;
|
|
957
964
|
readonly responseDeserialize: (value: Buffer) => StatusResponse;
|
|
958
965
|
};
|
|
966
|
+
/**
|
|
967
|
+
* Liveness signal from a component. The component names itself in the call metadata
|
|
968
|
+
* (x-component, x-component-version, x-component-id), the message carries nothing yet.
|
|
969
|
+
*/
|
|
970
|
+
readonly heartbeat: {
|
|
971
|
+
readonly path: "/hannah.v2.HannahService/Heartbeat";
|
|
972
|
+
readonly requestStream: false;
|
|
973
|
+
readonly responseStream: false;
|
|
974
|
+
readonly requestSerialize: (value: HeartbeatRequest) => Buffer;
|
|
975
|
+
readonly requestDeserialize: (value: Buffer) => HeartbeatRequest;
|
|
976
|
+
readonly responseSerialize: (value: HeartbeatResponse) => Buffer;
|
|
977
|
+
readonly responseDeserialize: (value: Buffer) => HeartbeatResponse;
|
|
978
|
+
};
|
|
959
979
|
};
|
|
960
980
|
export interface HannahServiceServer extends UntypedServiceImplementation {
|
|
961
981
|
/** --- User Registry --- */
|
|
@@ -1213,6 +1233,11 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
|
|
|
1213
1233
|
createMessage: handleUnaryCall<CreateMessageRequest, StatusResponse>;
|
|
1214
1234
|
listMessages: handleUnaryCall<ListMessagesRequest, ListMessagesResponse>;
|
|
1215
1235
|
deleteMessage: handleUnaryCall<DeleteMessageRequest, StatusResponse>;
|
|
1236
|
+
/**
|
|
1237
|
+
* Liveness signal from a component. The component names itself in the call metadata
|
|
1238
|
+
* (x-component, x-component-version, x-component-id), the message carries nothing yet.
|
|
1239
|
+
*/
|
|
1240
|
+
heartbeat: handleUnaryCall<HeartbeatRequest, HeartbeatResponse>;
|
|
1216
1241
|
}
|
|
1217
1242
|
export interface HannahServiceClient extends Client {
|
|
1218
1243
|
/** --- User Registry --- */
|
|
@@ -1636,9 +1661,33 @@ export interface HannahServiceClient extends Client {
|
|
|
1636
1661
|
deleteMessage(request: DeleteMessageRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1637
1662
|
deleteMessage(request: DeleteMessageRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1638
1663
|
deleteMessage(request: DeleteMessageRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1664
|
+
/**
|
|
1665
|
+
* Liveness signal from a component. The component names itself in the call metadata
|
|
1666
|
+
* (x-component, x-component-version, x-component-id), the message carries nothing yet.
|
|
1667
|
+
*/
|
|
1668
|
+
heartbeat(request: HeartbeatRequest, callback: (error: ServiceError | null, response: HeartbeatResponse) => void): ClientUnaryCall;
|
|
1669
|
+
heartbeat(request: HeartbeatRequest, metadata: Metadata, callback: (error: ServiceError | null, response: HeartbeatResponse) => void): ClientUnaryCall;
|
|
1670
|
+
heartbeat(request: HeartbeatRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: HeartbeatResponse) => void): ClientUnaryCall;
|
|
1639
1671
|
}
|
|
1640
1672
|
export declare const HannahServiceClient: {
|
|
1641
1673
|
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): HannahServiceClient;
|
|
1642
1674
|
service: typeof HannahServiceService;
|
|
1643
1675
|
serviceName: string;
|
|
1644
1676
|
};
|
|
1677
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
1678
|
+
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 {} ? {
|
|
1679
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
1680
|
+
} : Partial<T>;
|
|
1681
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
1682
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
1683
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
1684
|
+
} & {
|
|
1685
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
1686
|
+
};
|
|
1687
|
+
export interface MessageFns<T> {
|
|
1688
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1689
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1690
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
1691
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
1692
|
+
}
|
|
1693
|
+
export {};
|
package/dist/v2/hannah.js
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: hannah/v2/hannah.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.HannahServiceClient = exports.HannahServiceService = exports.protobufPackage = void 0;
|
|
8
|
+
exports.HannahServiceClient = exports.HannahServiceService = exports.HeartbeatResponse = exports.HeartbeatRequest = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
10
11
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
12
|
const activity_log_1 = require("./activity_log");
|
|
12
13
|
const agent_1 = require("./agent");
|
|
@@ -28,6 +29,86 @@ const timer_service_1 = require("./timer_service");
|
|
|
28
29
|
const user_registry_1 = require("./user_registry");
|
|
29
30
|
const wakeword_capture_1 = require("./wakeword_capture");
|
|
30
31
|
exports.protobufPackage = "hannah.v2";
|
|
32
|
+
function createBaseHeartbeatRequest() {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
exports.HeartbeatRequest = {
|
|
36
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
37
|
+
return writer;
|
|
38
|
+
},
|
|
39
|
+
decode(input, length) {
|
|
40
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
41
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
42
|
+
if (previousRecursionDepth >= 100) {
|
|
43
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
44
|
+
}
|
|
45
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
46
|
+
try {
|
|
47
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
48
|
+
const message = createBaseHeartbeatRequest();
|
|
49
|
+
while (reader.pos < end) {
|
|
50
|
+
const tag = reader.uint32();
|
|
51
|
+
switch (tag >>> 3) {
|
|
52
|
+
}
|
|
53
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
reader.skip(tag & 7);
|
|
57
|
+
}
|
|
58
|
+
return message;
|
|
59
|
+
}
|
|
60
|
+
finally {
|
|
61
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
create(base) {
|
|
65
|
+
return exports.HeartbeatRequest.fromPartial(base ?? {});
|
|
66
|
+
},
|
|
67
|
+
fromPartial(_) {
|
|
68
|
+
const message = createBaseHeartbeatRequest();
|
|
69
|
+
return message;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
function createBaseHeartbeatResponse() {
|
|
73
|
+
return {};
|
|
74
|
+
}
|
|
75
|
+
exports.HeartbeatResponse = {
|
|
76
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
77
|
+
return writer;
|
|
78
|
+
},
|
|
79
|
+
decode(input, length) {
|
|
80
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
81
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
82
|
+
if (previousRecursionDepth >= 100) {
|
|
83
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
84
|
+
}
|
|
85
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
86
|
+
try {
|
|
87
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
88
|
+
const message = createBaseHeartbeatResponse();
|
|
89
|
+
while (reader.pos < end) {
|
|
90
|
+
const tag = reader.uint32();
|
|
91
|
+
switch (tag >>> 3) {
|
|
92
|
+
}
|
|
93
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
reader.skip(tag & 7);
|
|
97
|
+
}
|
|
98
|
+
return message;
|
|
99
|
+
}
|
|
100
|
+
finally {
|
|
101
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
create(base) {
|
|
105
|
+
return exports.HeartbeatResponse.fromPartial(base ?? {});
|
|
106
|
+
},
|
|
107
|
+
fromPartial(_) {
|
|
108
|
+
const message = createBaseHeartbeatResponse();
|
|
109
|
+
return message;
|
|
110
|
+
},
|
|
111
|
+
};
|
|
31
112
|
exports.HannahServiceService = {
|
|
32
113
|
/** --- User Registry --- */
|
|
33
114
|
getUsers: {
|
|
@@ -964,5 +1045,18 @@ exports.HannahServiceService = {
|
|
|
964
1045
|
responseSerialize: (value) => Buffer.from(shared_1.StatusResponse.encode(value).finish()),
|
|
965
1046
|
responseDeserialize: (value) => shared_1.StatusResponse.decode(value),
|
|
966
1047
|
},
|
|
1048
|
+
/**
|
|
1049
|
+
* Liveness signal from a component. The component names itself in the call metadata
|
|
1050
|
+
* (x-component, x-component-version, x-component-id), the message carries nothing yet.
|
|
1051
|
+
*/
|
|
1052
|
+
heartbeat: {
|
|
1053
|
+
path: "/hannah.v2.HannahService/Heartbeat",
|
|
1054
|
+
requestStream: false,
|
|
1055
|
+
responseStream: false,
|
|
1056
|
+
requestSerialize: (value) => Buffer.from(exports.HeartbeatRequest.encode(value).finish()),
|
|
1057
|
+
requestDeserialize: (value) => exports.HeartbeatRequest.decode(value),
|
|
1058
|
+
responseSerialize: (value) => Buffer.from(exports.HeartbeatResponse.encode(value).finish()),
|
|
1059
|
+
responseDeserialize: (value) => exports.HeartbeatResponse.decode(value),
|
|
1060
|
+
},
|
|
967
1061
|
};
|
|
968
1062
|
exports.HannahServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.HannahServiceService, "hannah.v2.HannahService");
|
|
@@ -18,6 +18,8 @@ export interface ServiceEndpoint {
|
|
|
18
18
|
port: number;
|
|
19
19
|
/** informational */
|
|
20
20
|
version: string;
|
|
21
|
+
/** UDP port of the collector's syslog receiver on `host`; 0 = none */
|
|
22
|
+
syslogPort: number;
|
|
21
23
|
}
|
|
22
24
|
/** Which kinds of service the subscriber cares about. Empty = all kinds. */
|
|
23
25
|
export interface InfrastructureFilter {
|
|
@@ -61,6 +63,8 @@ export interface LogCollectorRegister {
|
|
|
61
63
|
port: number;
|
|
62
64
|
/** informational */
|
|
63
65
|
version: string;
|
|
66
|
+
/** UDP port of the syslog receiver, on the same host; 0 = no receiver */
|
|
67
|
+
syslogPort: number;
|
|
64
68
|
}
|
|
65
69
|
/** Sent by Hannah Core over the LogCollectorConnect stream. */
|
|
66
70
|
export interface LogCollectorCommand {
|
|
@@ -21,7 +21,7 @@ var ServiceKind;
|
|
|
21
21
|
ServiceKind[ServiceKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
22
22
|
})(ServiceKind || (exports.ServiceKind = ServiceKind = {}));
|
|
23
23
|
function createBaseServiceEndpoint() {
|
|
24
|
-
return { kind: 0, instance: "", host: "", port: 0, version: "" };
|
|
24
|
+
return { kind: 0, instance: "", host: "", port: 0, version: "", syslogPort: 0 };
|
|
25
25
|
}
|
|
26
26
|
exports.ServiceEndpoint = {
|
|
27
27
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -40,6 +40,9 @@ exports.ServiceEndpoint = {
|
|
|
40
40
|
if (message.version !== "") {
|
|
41
41
|
writer.uint32(42).string(message.version);
|
|
42
42
|
}
|
|
43
|
+
if (message.syslogPort !== 0) {
|
|
44
|
+
writer.uint32(48).int32(message.syslogPort);
|
|
45
|
+
}
|
|
43
46
|
return writer;
|
|
44
47
|
},
|
|
45
48
|
decode(input, length) {
|
|
@@ -90,6 +93,13 @@ exports.ServiceEndpoint = {
|
|
|
90
93
|
message.version = reader.string();
|
|
91
94
|
continue;
|
|
92
95
|
}
|
|
96
|
+
case 6: {
|
|
97
|
+
if (tag !== 48) {
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
message.syslogPort = reader.int32();
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
93
103
|
}
|
|
94
104
|
if ((tag & 7) === 4 || tag === 0) {
|
|
95
105
|
break;
|
|
@@ -112,6 +122,7 @@ exports.ServiceEndpoint = {
|
|
|
112
122
|
message.host = object.host ?? "";
|
|
113
123
|
message.port = object.port ?? 0;
|
|
114
124
|
message.version = object.version ?? "";
|
|
125
|
+
message.syslogPort = object.syslogPort ?? 0;
|
|
115
126
|
return message;
|
|
116
127
|
},
|
|
117
128
|
};
|
|
@@ -474,7 +485,7 @@ exports.LogCollectorMessage = {
|
|
|
474
485
|
},
|
|
475
486
|
};
|
|
476
487
|
function createBaseLogCollectorRegister() {
|
|
477
|
-
return { instance: "", host: "", port: 0, version: "" };
|
|
488
|
+
return { instance: "", host: "", port: 0, version: "", syslogPort: 0 };
|
|
478
489
|
}
|
|
479
490
|
exports.LogCollectorRegister = {
|
|
480
491
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -490,6 +501,9 @@ exports.LogCollectorRegister = {
|
|
|
490
501
|
if (message.version !== "") {
|
|
491
502
|
writer.uint32(34).string(message.version);
|
|
492
503
|
}
|
|
504
|
+
if (message.syslogPort !== 0) {
|
|
505
|
+
writer.uint32(40).int32(message.syslogPort);
|
|
506
|
+
}
|
|
493
507
|
return writer;
|
|
494
508
|
},
|
|
495
509
|
decode(input, length) {
|
|
@@ -533,6 +547,13 @@ exports.LogCollectorRegister = {
|
|
|
533
547
|
message.version = reader.string();
|
|
534
548
|
continue;
|
|
535
549
|
}
|
|
550
|
+
case 5: {
|
|
551
|
+
if (tag !== 40) {
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
message.syslogPort = reader.int32();
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
536
557
|
}
|
|
537
558
|
if ((tag & 7) === 4 || tag === 0) {
|
|
538
559
|
break;
|
|
@@ -554,6 +575,7 @@ exports.LogCollectorRegister = {
|
|
|
554
575
|
message.host = object.host ?? "";
|
|
555
576
|
message.port = object.port ?? 0;
|
|
556
577
|
message.version = object.version ?? "";
|
|
578
|
+
message.syslogPort = object.syslogPort ?? 0;
|
|
557
579
|
return message;
|
|
558
580
|
},
|
|
559
581
|
};
|
package/package.json
CHANGED