@m1kad0/hannah-proto 3.3.1 → 3.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/activity_log.d.ts +60 -0
- package/dist/activity_log.js +403 -0
- package/dist/compat_versions.js +4 -1
- package/dist/descriptor.binpb +0 -0
- package/dist/hannah.d.ts +76 -1
- package/dist/hannah.js +40 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/wakeword_capture.d.ts +47 -0
- package/dist/wakeword_capture.js +283 -1
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "hannah";
|
|
3
|
+
export interface ActivityLogEntry {
|
|
4
|
+
id: bigint;
|
|
5
|
+
ts: string;
|
|
6
|
+
channelType: string;
|
|
7
|
+
channelId: string;
|
|
8
|
+
/** 0 = unresolved/unset */
|
|
9
|
+
userId: number;
|
|
10
|
+
rawText: string;
|
|
11
|
+
intentName: string;
|
|
12
|
+
/** JSON-encoded, "" = none */
|
|
13
|
+
intentMetaJson: string;
|
|
14
|
+
answerText: string;
|
|
15
|
+
/** audio_path was set — tells the caller whether to offer playback */
|
|
16
|
+
hasAudio: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ListActivityLogRequest {
|
|
19
|
+
requestorId: number;
|
|
20
|
+
/** only honored when requestor's trust_level >= 10; 0 = no target filter */
|
|
21
|
+
filterUserId: number;
|
|
22
|
+
pageSize: number;
|
|
23
|
+
/** cursor, 0 = start from newest */
|
|
24
|
+
beforeId: bigint;
|
|
25
|
+
}
|
|
26
|
+
export interface ListActivityLogResponse {
|
|
27
|
+
entries: ActivityLogEntry[];
|
|
28
|
+
hasMore: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface StreamActivityAudioRequest {
|
|
31
|
+
requestorId: number;
|
|
32
|
+
activityLogId: bigint;
|
|
33
|
+
}
|
|
34
|
+
/** A chunk of raw PCM audio (16-bit signed, mono) streamed from a single Activity Log entry. */
|
|
35
|
+
export interface ActivityAudioChunk {
|
|
36
|
+
pcm: Uint8Array;
|
|
37
|
+
sampleRate: number;
|
|
38
|
+
}
|
|
39
|
+
export declare const ActivityLogEntry: MessageFns<ActivityLogEntry>;
|
|
40
|
+
export declare const ListActivityLogRequest: MessageFns<ListActivityLogRequest>;
|
|
41
|
+
export declare const ListActivityLogResponse: MessageFns<ListActivityLogResponse>;
|
|
42
|
+
export declare const StreamActivityAudioRequest: MessageFns<StreamActivityAudioRequest>;
|
|
43
|
+
export declare const ActivityAudioChunk: MessageFns<ActivityAudioChunk>;
|
|
44
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
45
|
+
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 {} ? {
|
|
46
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
47
|
+
} : Partial<T>;
|
|
48
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
49
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
50
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
51
|
+
} & {
|
|
52
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
53
|
+
};
|
|
54
|
+
export interface MessageFns<T> {
|
|
55
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
56
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
57
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
58
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.0
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: hannah/activity_log.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ActivityAudioChunk = exports.StreamActivityAudioRequest = exports.ListActivityLogResponse = exports.ListActivityLogRequest = exports.ActivityLogEntry = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "hannah";
|
|
12
|
+
function createBaseActivityLogEntry() {
|
|
13
|
+
return {
|
|
14
|
+
id: 0n,
|
|
15
|
+
ts: "",
|
|
16
|
+
channelType: "",
|
|
17
|
+
channelId: "",
|
|
18
|
+
userId: 0,
|
|
19
|
+
rawText: "",
|
|
20
|
+
intentName: "",
|
|
21
|
+
intentMetaJson: "",
|
|
22
|
+
answerText: "",
|
|
23
|
+
hasAudio: false,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.ActivityLogEntry = {
|
|
27
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
28
|
+
if (message.id !== 0n) {
|
|
29
|
+
if (BigInt.asIntN(64, message.id) !== message.id) {
|
|
30
|
+
throw new globalThis.Error("value provided for field message.id of type int64 too large");
|
|
31
|
+
}
|
|
32
|
+
writer.uint32(8).int64(message.id);
|
|
33
|
+
}
|
|
34
|
+
if (message.ts !== "") {
|
|
35
|
+
writer.uint32(18).string(message.ts);
|
|
36
|
+
}
|
|
37
|
+
if (message.channelType !== "") {
|
|
38
|
+
writer.uint32(26).string(message.channelType);
|
|
39
|
+
}
|
|
40
|
+
if (message.channelId !== "") {
|
|
41
|
+
writer.uint32(34).string(message.channelId);
|
|
42
|
+
}
|
|
43
|
+
if (message.userId !== 0) {
|
|
44
|
+
writer.uint32(40).int32(message.userId);
|
|
45
|
+
}
|
|
46
|
+
if (message.rawText !== "") {
|
|
47
|
+
writer.uint32(50).string(message.rawText);
|
|
48
|
+
}
|
|
49
|
+
if (message.intentName !== "") {
|
|
50
|
+
writer.uint32(58).string(message.intentName);
|
|
51
|
+
}
|
|
52
|
+
if (message.intentMetaJson !== "") {
|
|
53
|
+
writer.uint32(66).string(message.intentMetaJson);
|
|
54
|
+
}
|
|
55
|
+
if (message.answerText !== "") {
|
|
56
|
+
writer.uint32(74).string(message.answerText);
|
|
57
|
+
}
|
|
58
|
+
if (message.hasAudio !== false) {
|
|
59
|
+
writer.uint32(80).bool(message.hasAudio);
|
|
60
|
+
}
|
|
61
|
+
return writer;
|
|
62
|
+
},
|
|
63
|
+
decode(input, length) {
|
|
64
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
65
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
66
|
+
const message = createBaseActivityLogEntry();
|
|
67
|
+
while (reader.pos < end) {
|
|
68
|
+
const tag = reader.uint32();
|
|
69
|
+
switch (tag >>> 3) {
|
|
70
|
+
case 1: {
|
|
71
|
+
if (tag !== 8) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
message.id = reader.int64();
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
case 2: {
|
|
78
|
+
if (tag !== 18) {
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
message.ts = reader.string();
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
case 3: {
|
|
85
|
+
if (tag !== 26) {
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
message.channelType = reader.string();
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
case 4: {
|
|
92
|
+
if (tag !== 34) {
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
message.channelId = reader.string();
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
case 5: {
|
|
99
|
+
if (tag !== 40) {
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
message.userId = reader.int32();
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
case 6: {
|
|
106
|
+
if (tag !== 50) {
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
message.rawText = reader.string();
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
case 7: {
|
|
113
|
+
if (tag !== 58) {
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
message.intentName = reader.string();
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
case 8: {
|
|
120
|
+
if (tag !== 66) {
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
message.intentMetaJson = reader.string();
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
case 9: {
|
|
127
|
+
if (tag !== 74) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
message.answerText = reader.string();
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
case 10: {
|
|
134
|
+
if (tag !== 80) {
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
message.hasAudio = reader.bool();
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
reader.skip(tag & 7);
|
|
145
|
+
}
|
|
146
|
+
return message;
|
|
147
|
+
},
|
|
148
|
+
create(base) {
|
|
149
|
+
return exports.ActivityLogEntry.fromPartial(base ?? {});
|
|
150
|
+
},
|
|
151
|
+
fromPartial(object) {
|
|
152
|
+
const message = createBaseActivityLogEntry();
|
|
153
|
+
message.id = (object.id !== undefined && object.id !== null) ? BigInt(object.id) : 0n;
|
|
154
|
+
message.ts = object.ts ?? "";
|
|
155
|
+
message.channelType = object.channelType ?? "";
|
|
156
|
+
message.channelId = object.channelId ?? "";
|
|
157
|
+
message.userId = object.userId ?? 0;
|
|
158
|
+
message.rawText = object.rawText ?? "";
|
|
159
|
+
message.intentName = object.intentName ?? "";
|
|
160
|
+
message.intentMetaJson = object.intentMetaJson ?? "";
|
|
161
|
+
message.answerText = object.answerText ?? "";
|
|
162
|
+
message.hasAudio = object.hasAudio ?? false;
|
|
163
|
+
return message;
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
function createBaseListActivityLogRequest() {
|
|
167
|
+
return { requestorId: 0, filterUserId: 0, pageSize: 0, beforeId: 0n };
|
|
168
|
+
}
|
|
169
|
+
exports.ListActivityLogRequest = {
|
|
170
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
171
|
+
if (message.requestorId !== 0) {
|
|
172
|
+
writer.uint32(8).int32(message.requestorId);
|
|
173
|
+
}
|
|
174
|
+
if (message.filterUserId !== 0) {
|
|
175
|
+
writer.uint32(16).int32(message.filterUserId);
|
|
176
|
+
}
|
|
177
|
+
if (message.pageSize !== 0) {
|
|
178
|
+
writer.uint32(24).int32(message.pageSize);
|
|
179
|
+
}
|
|
180
|
+
if (message.beforeId !== 0n) {
|
|
181
|
+
if (BigInt.asIntN(64, message.beforeId) !== message.beforeId) {
|
|
182
|
+
throw new globalThis.Error("value provided for field message.beforeId of type int64 too large");
|
|
183
|
+
}
|
|
184
|
+
writer.uint32(32).int64(message.beforeId);
|
|
185
|
+
}
|
|
186
|
+
return writer;
|
|
187
|
+
},
|
|
188
|
+
decode(input, length) {
|
|
189
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
190
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
191
|
+
const message = createBaseListActivityLogRequest();
|
|
192
|
+
while (reader.pos < end) {
|
|
193
|
+
const tag = reader.uint32();
|
|
194
|
+
switch (tag >>> 3) {
|
|
195
|
+
case 1: {
|
|
196
|
+
if (tag !== 8) {
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
message.requestorId = reader.int32();
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
case 2: {
|
|
203
|
+
if (tag !== 16) {
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
message.filterUserId = reader.int32();
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
case 3: {
|
|
210
|
+
if (tag !== 24) {
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
message.pageSize = reader.int32();
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
case 4: {
|
|
217
|
+
if (tag !== 32) {
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
message.beforeId = reader.int64();
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
reader.skip(tag & 7);
|
|
228
|
+
}
|
|
229
|
+
return message;
|
|
230
|
+
},
|
|
231
|
+
create(base) {
|
|
232
|
+
return exports.ListActivityLogRequest.fromPartial(base ?? {});
|
|
233
|
+
},
|
|
234
|
+
fromPartial(object) {
|
|
235
|
+
const message = createBaseListActivityLogRequest();
|
|
236
|
+
message.requestorId = object.requestorId ?? 0;
|
|
237
|
+
message.filterUserId = object.filterUserId ?? 0;
|
|
238
|
+
message.pageSize = object.pageSize ?? 0;
|
|
239
|
+
message.beforeId = (object.beforeId !== undefined && object.beforeId !== null) ? BigInt(object.beforeId) : 0n;
|
|
240
|
+
return message;
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
function createBaseListActivityLogResponse() {
|
|
244
|
+
return { entries: [], hasMore: false };
|
|
245
|
+
}
|
|
246
|
+
exports.ListActivityLogResponse = {
|
|
247
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
248
|
+
for (const v of message.entries) {
|
|
249
|
+
exports.ActivityLogEntry.encode(v, writer.uint32(10).fork()).join();
|
|
250
|
+
}
|
|
251
|
+
if (message.hasMore !== false) {
|
|
252
|
+
writer.uint32(16).bool(message.hasMore);
|
|
253
|
+
}
|
|
254
|
+
return writer;
|
|
255
|
+
},
|
|
256
|
+
decode(input, length) {
|
|
257
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
258
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
259
|
+
const message = createBaseListActivityLogResponse();
|
|
260
|
+
while (reader.pos < end) {
|
|
261
|
+
const tag = reader.uint32();
|
|
262
|
+
switch (tag >>> 3) {
|
|
263
|
+
case 1: {
|
|
264
|
+
if (tag !== 10) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
message.entries.push(exports.ActivityLogEntry.decode(reader, reader.uint32()));
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
case 2: {
|
|
271
|
+
if (tag !== 16) {
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
message.hasMore = reader.bool();
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
reader.skip(tag & 7);
|
|
282
|
+
}
|
|
283
|
+
return message;
|
|
284
|
+
},
|
|
285
|
+
create(base) {
|
|
286
|
+
return exports.ListActivityLogResponse.fromPartial(base ?? {});
|
|
287
|
+
},
|
|
288
|
+
fromPartial(object) {
|
|
289
|
+
const message = createBaseListActivityLogResponse();
|
|
290
|
+
message.entries = object.entries?.map((e) => exports.ActivityLogEntry.fromPartial(e)) || [];
|
|
291
|
+
message.hasMore = object.hasMore ?? false;
|
|
292
|
+
return message;
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
function createBaseStreamActivityAudioRequest() {
|
|
296
|
+
return { requestorId: 0, activityLogId: 0n };
|
|
297
|
+
}
|
|
298
|
+
exports.StreamActivityAudioRequest = {
|
|
299
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
300
|
+
if (message.requestorId !== 0) {
|
|
301
|
+
writer.uint32(8).int32(message.requestorId);
|
|
302
|
+
}
|
|
303
|
+
if (message.activityLogId !== 0n) {
|
|
304
|
+
if (BigInt.asIntN(64, message.activityLogId) !== message.activityLogId) {
|
|
305
|
+
throw new globalThis.Error("value provided for field message.activityLogId of type int64 too large");
|
|
306
|
+
}
|
|
307
|
+
writer.uint32(16).int64(message.activityLogId);
|
|
308
|
+
}
|
|
309
|
+
return writer;
|
|
310
|
+
},
|
|
311
|
+
decode(input, length) {
|
|
312
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
313
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
314
|
+
const message = createBaseStreamActivityAudioRequest();
|
|
315
|
+
while (reader.pos < end) {
|
|
316
|
+
const tag = reader.uint32();
|
|
317
|
+
switch (tag >>> 3) {
|
|
318
|
+
case 1: {
|
|
319
|
+
if (tag !== 8) {
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
message.requestorId = reader.int32();
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
case 2: {
|
|
326
|
+
if (tag !== 16) {
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
message.activityLogId = reader.int64();
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
reader.skip(tag & 7);
|
|
337
|
+
}
|
|
338
|
+
return message;
|
|
339
|
+
},
|
|
340
|
+
create(base) {
|
|
341
|
+
return exports.StreamActivityAudioRequest.fromPartial(base ?? {});
|
|
342
|
+
},
|
|
343
|
+
fromPartial(object) {
|
|
344
|
+
const message = createBaseStreamActivityAudioRequest();
|
|
345
|
+
message.requestorId = object.requestorId ?? 0;
|
|
346
|
+
message.activityLogId = (object.activityLogId !== undefined && object.activityLogId !== null)
|
|
347
|
+
? BigInt(object.activityLogId)
|
|
348
|
+
: 0n;
|
|
349
|
+
return message;
|
|
350
|
+
},
|
|
351
|
+
};
|
|
352
|
+
function createBaseActivityAudioChunk() {
|
|
353
|
+
return { pcm: new Uint8Array(0), sampleRate: 0 };
|
|
354
|
+
}
|
|
355
|
+
exports.ActivityAudioChunk = {
|
|
356
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
357
|
+
if (message.pcm.length !== 0) {
|
|
358
|
+
writer.uint32(10).bytes(message.pcm);
|
|
359
|
+
}
|
|
360
|
+
if (message.sampleRate !== 0) {
|
|
361
|
+
writer.uint32(16).int32(message.sampleRate);
|
|
362
|
+
}
|
|
363
|
+
return writer;
|
|
364
|
+
},
|
|
365
|
+
decode(input, length) {
|
|
366
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
367
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
368
|
+
const message = createBaseActivityAudioChunk();
|
|
369
|
+
while (reader.pos < end) {
|
|
370
|
+
const tag = reader.uint32();
|
|
371
|
+
switch (tag >>> 3) {
|
|
372
|
+
case 1: {
|
|
373
|
+
if (tag !== 10) {
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
message.pcm = reader.bytes();
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
case 2: {
|
|
380
|
+
if (tag !== 16) {
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
message.sampleRate = reader.int32();
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
reader.skip(tag & 7);
|
|
391
|
+
}
|
|
392
|
+
return message;
|
|
393
|
+
},
|
|
394
|
+
create(base) {
|
|
395
|
+
return exports.ActivityAudioChunk.fromPartial(base ?? {});
|
|
396
|
+
},
|
|
397
|
+
fromPartial(object) {
|
|
398
|
+
const message = createBaseActivityAudioChunk();
|
|
399
|
+
message.pcm = object.pcm ?? new Uint8Array(0);
|
|
400
|
+
message.sampleRate = object.sampleRate ?? 0;
|
|
401
|
+
return message;
|
|
402
|
+
},
|
|
403
|
+
};
|
package/dist/compat_versions.js
CHANGED
|
@@ -61,6 +61,7 @@ exports.REQUIRED_COMPAT_VERSIONS = {
|
|
|
61
61
|
"ReleaseSatelliteCapture": 1,
|
|
62
62
|
"StreamSatelliteAudio": 1,
|
|
63
63
|
"TriggerPlink": 1,
|
|
64
|
+
"CollectorConnect": 1,
|
|
64
65
|
"RegisterProxy": 1,
|
|
65
66
|
"SubmitSatelliteAudio": 1,
|
|
66
67
|
"NotifySatelliteRegistered": 1,
|
|
@@ -71,5 +72,7 @@ exports.REQUIRED_COMPAT_VERSIONS = {
|
|
|
71
72
|
"GetTimers": 1,
|
|
72
73
|
"DeleteTimer": 1,
|
|
73
74
|
"AgentConnect": 1,
|
|
74
|
-
"AutomationConnect": 1
|
|
75
|
+
"AutomationConnect": 1,
|
|
76
|
+
"ListActivityLog": 1,
|
|
77
|
+
"StreamActivityAudio": 1
|
|
75
78
|
};
|
package/dist/descriptor.binpb
CHANGED
|
Binary file
|
package/dist/hannah.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
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
|
+
import { ActivityAudioChunk, ListActivityLogRequest, ListActivityLogResponse, StreamActivityAudioRequest } from "./activity_log";
|
|
2
3
|
import { AgentCommand, AgentMessage, AgentNotification } from "./agent";
|
|
3
4
|
import { AutomationCommand, AutomationMessage } from "./automation";
|
|
4
5
|
import { CarStateResponse, GetAllCarStatesResponse } from "./car_state";
|
|
@@ -13,7 +14,7 @@ import { EnrollVoiceprintRequest } from "./speaker_enrollment";
|
|
|
13
14
|
import { DeleteTimerRequest, GetTimersRequest, GetTimersResponse } from "./timer_admin";
|
|
14
15
|
import { TimerCommand, TimerMessage } from "./timer_service";
|
|
15
16
|
import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, GetResidentsResponse, GetUserRequest, GetUsersRequest, GetUsersResponse, LinkAccountRequest, LoginRequest, SetAutomationRequest, SetSystemMessagesRequest, SetTrustLevelRequest, UnlinkAccountRequest, UpdateUserRequest, UserResponse } from "./user_registry";
|
|
16
|
-
import { SatelliteAudioChunk, SatelliteCaptureRequest, SatelliteCaptureResponse, TriggerPlinkRequest } from "./wakeword_capture";
|
|
17
|
+
import { CaptureCommand, CollectorMessage, SatelliteAudioChunk, SatelliteCaptureRequest, SatelliteCaptureResponse, TriggerPlinkRequest } from "./wakeword_capture";
|
|
17
18
|
export declare const protobufPackage = "hannah";
|
|
18
19
|
export type HannahServiceService = typeof HannahServiceService;
|
|
19
20
|
export declare const HannahServiceService: {
|
|
@@ -603,6 +604,20 @@ export declare const HannahServiceService: {
|
|
|
603
604
|
readonly responseSerialize: (value: StatusResponse) => Buffer;
|
|
604
605
|
readonly responseDeserialize: (value: Buffer) => StatusResponse;
|
|
605
606
|
};
|
|
607
|
+
/**
|
|
608
|
+
* Bidirectional stream between the Collector and Hannah Core, analogous to TimerConnect.
|
|
609
|
+
* The Collector initiates and holds the connection open; Hannah pushes CaptureCommands
|
|
610
|
+
* down to start/stop satellite captures instead of the Collector polling for them.
|
|
611
|
+
*/
|
|
612
|
+
readonly collectorConnect: {
|
|
613
|
+
readonly path: "/hannah.HannahService/CollectorConnect";
|
|
614
|
+
readonly requestStream: true;
|
|
615
|
+
readonly responseStream: true;
|
|
616
|
+
readonly requestSerialize: (value: CollectorMessage) => Buffer;
|
|
617
|
+
readonly requestDeserialize: (value: Buffer) => CollectorMessage;
|
|
618
|
+
readonly responseSerialize: (value: CaptureCommand) => Buffer;
|
|
619
|
+
readonly responseDeserialize: (value: Buffer) => CaptureCommand;
|
|
620
|
+
};
|
|
606
621
|
/**
|
|
607
622
|
* --- Satellite Proxy (Go gRPC proxy) ---
|
|
608
623
|
* Bidirectional keepalive stream. Proxy sends heartbeats; Hannah sends TTS
|
|
@@ -750,6 +765,31 @@ export declare const HannahServiceService: {
|
|
|
750
765
|
readonly responseSerialize: (value: AutomationCommand) => Buffer;
|
|
751
766
|
readonly responseDeserialize: (value: Buffer) => AutomationCommand;
|
|
752
767
|
};
|
|
768
|
+
/**
|
|
769
|
+
* --- Activity Log ---
|
|
770
|
+
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
771
|
+
* full entry detail inline (transcript, intent + intent_meta, answer text) with
|
|
772
|
+
* cursor-based pagination; audio is fetched separately, decoded server-side from the
|
|
773
|
+
* stored WAV and streamed as raw PCM chunks.
|
|
774
|
+
*/
|
|
775
|
+
readonly listActivityLog: {
|
|
776
|
+
readonly path: "/hannah.HannahService/ListActivityLog";
|
|
777
|
+
readonly requestStream: false;
|
|
778
|
+
readonly responseStream: false;
|
|
779
|
+
readonly requestSerialize: (value: ListActivityLogRequest) => Buffer;
|
|
780
|
+
readonly requestDeserialize: (value: Buffer) => ListActivityLogRequest;
|
|
781
|
+
readonly responseSerialize: (value: ListActivityLogResponse) => Buffer;
|
|
782
|
+
readonly responseDeserialize: (value: Buffer) => ListActivityLogResponse;
|
|
783
|
+
};
|
|
784
|
+
readonly streamActivityAudio: {
|
|
785
|
+
readonly path: "/hannah.HannahService/StreamActivityAudio";
|
|
786
|
+
readonly requestStream: false;
|
|
787
|
+
readonly responseStream: true;
|
|
788
|
+
readonly requestSerialize: (value: StreamActivityAudioRequest) => Buffer;
|
|
789
|
+
readonly requestDeserialize: (value: Buffer) => StreamActivityAudioRequest;
|
|
790
|
+
readonly responseSerialize: (value: ActivityAudioChunk) => Buffer;
|
|
791
|
+
readonly responseDeserialize: (value: Buffer) => ActivityAudioChunk;
|
|
792
|
+
};
|
|
753
793
|
};
|
|
754
794
|
export interface HannahServiceServer extends UntypedServiceImplementation {
|
|
755
795
|
/** --- User Registry --- */
|
|
@@ -882,6 +922,12 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
|
|
|
882
922
|
* Returns after PTT is released — Collector calls this in a loop for guided hey-hannah collection.
|
|
883
923
|
*/
|
|
884
924
|
triggerPlink: handleUnaryCall<TriggerPlinkRequest, StatusResponse>;
|
|
925
|
+
/**
|
|
926
|
+
* Bidirectional stream between the Collector and Hannah Core, analogous to TimerConnect.
|
|
927
|
+
* The Collector initiates and holds the connection open; Hannah pushes CaptureCommands
|
|
928
|
+
* down to start/stop satellite captures instead of the Collector polling for them.
|
|
929
|
+
*/
|
|
930
|
+
collectorConnect: handleBidiStreamingCall<CollectorMessage, CaptureCommand>;
|
|
885
931
|
/**
|
|
886
932
|
* --- Satellite Proxy (Go gRPC proxy) ---
|
|
887
933
|
* Bidirectional keepalive stream. Proxy sends heartbeats; Hannah sends TTS
|
|
@@ -941,6 +987,15 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
|
|
|
941
987
|
* instead of missing state changes that happened while it was offline.
|
|
942
988
|
*/
|
|
943
989
|
automationConnect: handleBidiStreamingCall<AutomationMessage, AutomationCommand>;
|
|
990
|
+
/**
|
|
991
|
+
* --- Activity Log ---
|
|
992
|
+
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
993
|
+
* full entry detail inline (transcript, intent + intent_meta, answer text) with
|
|
994
|
+
* cursor-based pagination; audio is fetched separately, decoded server-side from the
|
|
995
|
+
* stored WAV and streamed as raw PCM chunks.
|
|
996
|
+
*/
|
|
997
|
+
listActivityLog: handleUnaryCall<ListActivityLogRequest, ListActivityLogResponse>;
|
|
998
|
+
streamActivityAudio: handleServerStreamingCall<StreamActivityAudioRequest, ActivityAudioChunk>;
|
|
944
999
|
}
|
|
945
1000
|
export interface HannahServiceClient extends Client {
|
|
946
1001
|
/** --- User Registry --- */
|
|
@@ -1185,6 +1240,14 @@ export interface HannahServiceClient extends Client {
|
|
|
1185
1240
|
triggerPlink(request: TriggerPlinkRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1186
1241
|
triggerPlink(request: TriggerPlinkRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1187
1242
|
triggerPlink(request: TriggerPlinkRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1243
|
+
/**
|
|
1244
|
+
* Bidirectional stream between the Collector and Hannah Core, analogous to TimerConnect.
|
|
1245
|
+
* The Collector initiates and holds the connection open; Hannah pushes CaptureCommands
|
|
1246
|
+
* down to start/stop satellite captures instead of the Collector polling for them.
|
|
1247
|
+
*/
|
|
1248
|
+
collectorConnect(): ClientDuplexStream<CollectorMessage, CaptureCommand>;
|
|
1249
|
+
collectorConnect(options: Partial<CallOptions>): ClientDuplexStream<CollectorMessage, CaptureCommand>;
|
|
1250
|
+
collectorConnect(metadata: Metadata, options?: Partial<CallOptions>): ClientDuplexStream<CollectorMessage, CaptureCommand>;
|
|
1188
1251
|
/**
|
|
1189
1252
|
* --- Satellite Proxy (Go gRPC proxy) ---
|
|
1190
1253
|
* Bidirectional keepalive stream. Proxy sends heartbeats; Hannah sends TTS
|
|
@@ -1266,6 +1329,18 @@ export interface HannahServiceClient extends Client {
|
|
|
1266
1329
|
automationConnect(): ClientDuplexStream<AutomationMessage, AutomationCommand>;
|
|
1267
1330
|
automationConnect(options: Partial<CallOptions>): ClientDuplexStream<AutomationMessage, AutomationCommand>;
|
|
1268
1331
|
automationConnect(metadata: Metadata, options?: Partial<CallOptions>): ClientDuplexStream<AutomationMessage, AutomationCommand>;
|
|
1332
|
+
/**
|
|
1333
|
+
* --- Activity Log ---
|
|
1334
|
+
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
1335
|
+
* full entry detail inline (transcript, intent + intent_meta, answer text) with
|
|
1336
|
+
* cursor-based pagination; audio is fetched separately, decoded server-side from the
|
|
1337
|
+
* stored WAV and streamed as raw PCM chunks.
|
|
1338
|
+
*/
|
|
1339
|
+
listActivityLog(request: ListActivityLogRequest, callback: (error: ServiceError | null, response: ListActivityLogResponse) => void): ClientUnaryCall;
|
|
1340
|
+
listActivityLog(request: ListActivityLogRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListActivityLogResponse) => void): ClientUnaryCall;
|
|
1341
|
+
listActivityLog(request: ListActivityLogRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListActivityLogResponse) => void): ClientUnaryCall;
|
|
1342
|
+
streamActivityAudio(request: StreamActivityAudioRequest, options?: Partial<CallOptions>): ClientReadableStream<ActivityAudioChunk>;
|
|
1343
|
+
streamActivityAudio(request: StreamActivityAudioRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<ActivityAudioChunk>;
|
|
1269
1344
|
}
|
|
1270
1345
|
export declare const HannahServiceClient: {
|
|
1271
1346
|
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): HannahServiceClient;
|
package/dist/hannah.js
CHANGED
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.HannahServiceClient = exports.HannahServiceService = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
|
+
const activity_log_1 = require("./activity_log");
|
|
11
12
|
const agent_1 = require("./agent");
|
|
12
13
|
const automation_1 = require("./automation");
|
|
13
14
|
const car_state_1 = require("./car_state");
|
|
@@ -611,6 +612,20 @@ exports.HannahServiceService = {
|
|
|
611
612
|
responseSerialize: (value) => Buffer.from(shared_1.StatusResponse.encode(value).finish()),
|
|
612
613
|
responseDeserialize: (value) => shared_1.StatusResponse.decode(value),
|
|
613
614
|
},
|
|
615
|
+
/**
|
|
616
|
+
* Bidirectional stream between the Collector and Hannah Core, analogous to TimerConnect.
|
|
617
|
+
* The Collector initiates and holds the connection open; Hannah pushes CaptureCommands
|
|
618
|
+
* down to start/stop satellite captures instead of the Collector polling for them.
|
|
619
|
+
*/
|
|
620
|
+
collectorConnect: {
|
|
621
|
+
path: "/hannah.HannahService/CollectorConnect",
|
|
622
|
+
requestStream: true,
|
|
623
|
+
responseStream: true,
|
|
624
|
+
requestSerialize: (value) => Buffer.from(wakeword_capture_1.CollectorMessage.encode(value).finish()),
|
|
625
|
+
requestDeserialize: (value) => wakeword_capture_1.CollectorMessage.decode(value),
|
|
626
|
+
responseSerialize: (value) => Buffer.from(wakeword_capture_1.CaptureCommand.encode(value).finish()),
|
|
627
|
+
responseDeserialize: (value) => wakeword_capture_1.CaptureCommand.decode(value),
|
|
628
|
+
},
|
|
614
629
|
/**
|
|
615
630
|
* --- Satellite Proxy (Go gRPC proxy) ---
|
|
616
631
|
* Bidirectional keepalive stream. Proxy sends heartbeats; Hannah sends TTS
|
|
@@ -758,5 +773,30 @@ exports.HannahServiceService = {
|
|
|
758
773
|
responseSerialize: (value) => Buffer.from(automation_1.AutomationCommand.encode(value).finish()),
|
|
759
774
|
responseDeserialize: (value) => automation_1.AutomationCommand.decode(value),
|
|
760
775
|
},
|
|
776
|
+
/**
|
|
777
|
+
* --- Activity Log ---
|
|
778
|
+
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
779
|
+
* full entry detail inline (transcript, intent + intent_meta, answer text) with
|
|
780
|
+
* cursor-based pagination; audio is fetched separately, decoded server-side from the
|
|
781
|
+
* stored WAV and streamed as raw PCM chunks.
|
|
782
|
+
*/
|
|
783
|
+
listActivityLog: {
|
|
784
|
+
path: "/hannah.HannahService/ListActivityLog",
|
|
785
|
+
requestStream: false,
|
|
786
|
+
responseStream: false,
|
|
787
|
+
requestSerialize: (value) => Buffer.from(activity_log_1.ListActivityLogRequest.encode(value).finish()),
|
|
788
|
+
requestDeserialize: (value) => activity_log_1.ListActivityLogRequest.decode(value),
|
|
789
|
+
responseSerialize: (value) => Buffer.from(activity_log_1.ListActivityLogResponse.encode(value).finish()),
|
|
790
|
+
responseDeserialize: (value) => activity_log_1.ListActivityLogResponse.decode(value),
|
|
791
|
+
},
|
|
792
|
+
streamActivityAudio: {
|
|
793
|
+
path: "/hannah.HannahService/StreamActivityAudio",
|
|
794
|
+
requestStream: false,
|
|
795
|
+
responseStream: true,
|
|
796
|
+
requestSerialize: (value) => Buffer.from(activity_log_1.StreamActivityAudioRequest.encode(value).finish()),
|
|
797
|
+
requestDeserialize: (value) => activity_log_1.StreamActivityAudioRequest.decode(value),
|
|
798
|
+
responseSerialize: (value) => Buffer.from(activity_log_1.ActivityAudioChunk.encode(value).finish()),
|
|
799
|
+
responseDeserialize: (value) => activity_log_1.ActivityAudioChunk.decode(value),
|
|
800
|
+
},
|
|
761
801
|
};
|
|
762
802
|
exports.HannahServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.HannahServiceService, "hannah.HannahService");
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -36,8 +36,9 @@ 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.hannah = exports.event_stream = exports.device_control_menu = exports.control = exports.compat_versions = exports.compat_interceptor = exports.car_state = exports.automation = exports.agent = 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.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;
|
|
40
40
|
__exportStar(require("./version"), exports);
|
|
41
|
+
exports.activity_log = __importStar(require("./activity_log"));
|
|
41
42
|
exports.agent = __importStar(require("./agent"));
|
|
42
43
|
exports.automation = __importStar(require("./automation"));
|
|
43
44
|
exports.car_state = __importStar(require("./car_state"));
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
export declare const protobufPackage = "hannah";
|
|
3
|
+
export declare enum CaptureMode {
|
|
4
|
+
CAPTURE_MODE_UNSPECIFIED = 0,
|
|
5
|
+
CAPTURE_MODE_MANUAL = 1,
|
|
6
|
+
CAPTURE_MODE_PTT = 2,
|
|
7
|
+
CAPTURE_MODE_PLINK = 3,
|
|
8
|
+
UNRECOGNIZED = -1
|
|
9
|
+
}
|
|
3
10
|
export interface SatelliteCaptureRequest {
|
|
4
11
|
deviceId: string;
|
|
5
12
|
/**
|
|
@@ -32,10 +39,50 @@ export interface SatelliteAudioChunk {
|
|
|
32
39
|
/** true = PTT released, utterance boundary */
|
|
33
40
|
endOfUtterance: boolean;
|
|
34
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Sent by Hannah Core over the CollectorConnect stream to start or stop a
|
|
44
|
+
* satellite capture — the Collector-side counterpart to RequestSatelliteCapture/
|
|
45
|
+
* ReleaseSatelliteCapture, pushed proactively instead of polled.
|
|
46
|
+
* capture_mode is only meaningful when sample_type is hey_hannah.
|
|
47
|
+
*/
|
|
48
|
+
export interface CaptureCommand {
|
|
49
|
+
deviceId: string;
|
|
50
|
+
sampleType: SampleType | undefined;
|
|
51
|
+
captureMode: CaptureMode;
|
|
52
|
+
stop: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Deliberately a oneof of (currently empty) payload messages rather than a plain
|
|
56
|
+
* enum — leaves room to attach per-sample-type data later without a breaking change.
|
|
57
|
+
*/
|
|
58
|
+
export interface SampleType {
|
|
59
|
+
noise?: NoiseSample | undefined;
|
|
60
|
+
heyHannah?: HeyHannahSample | undefined;
|
|
61
|
+
}
|
|
62
|
+
export interface NoiseSample {
|
|
63
|
+
}
|
|
64
|
+
export interface HeyHannahSample {
|
|
65
|
+
}
|
|
66
|
+
/** Sent by the Collector over the CollectorConnect stream. */
|
|
67
|
+
export interface CollectorMessage {
|
|
68
|
+
/** initial confirmation when stream is established */
|
|
69
|
+
ack?: CollectorAck | undefined;
|
|
70
|
+
}
|
|
71
|
+
/** Sent once by the Collector after the CollectorConnect stream is established. */
|
|
72
|
+
export interface CollectorAck {
|
|
73
|
+
/** human-readable status */
|
|
74
|
+
message: string;
|
|
75
|
+
}
|
|
35
76
|
export declare const SatelliteCaptureRequest: MessageFns<SatelliteCaptureRequest>;
|
|
36
77
|
export declare const TriggerPlinkRequest: MessageFns<TriggerPlinkRequest>;
|
|
37
78
|
export declare const SatelliteCaptureResponse: MessageFns<SatelliteCaptureResponse>;
|
|
38
79
|
export declare const SatelliteAudioChunk: MessageFns<SatelliteAudioChunk>;
|
|
80
|
+
export declare const CaptureCommand: MessageFns<CaptureCommand>;
|
|
81
|
+
export declare const SampleType: MessageFns<SampleType>;
|
|
82
|
+
export declare const NoiseSample: MessageFns<NoiseSample>;
|
|
83
|
+
export declare const HeyHannahSample: MessageFns<HeyHannahSample>;
|
|
84
|
+
export declare const CollectorMessage: MessageFns<CollectorMessage>;
|
|
85
|
+
export declare const CollectorAck: MessageFns<CollectorAck>;
|
|
39
86
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
40
87
|
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 {} ? {
|
|
41
88
|
[K in keyof T]?: DeepPartial<T[K]>;
|
package/dist/wakeword_capture.js
CHANGED
|
@@ -5,10 +5,18 @@
|
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: hannah/wakeword_capture.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.SatelliteAudioChunk = exports.SatelliteCaptureResponse = exports.TriggerPlinkRequest = exports.SatelliteCaptureRequest = exports.protobufPackage = void 0;
|
|
8
|
+
exports.CollectorAck = exports.CollectorMessage = exports.HeyHannahSample = exports.NoiseSample = exports.SampleType = exports.CaptureCommand = exports.SatelliteAudioChunk = exports.SatelliteCaptureResponse = exports.TriggerPlinkRequest = exports.SatelliteCaptureRequest = exports.CaptureMode = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
exports.protobufPackage = "hannah";
|
|
12
|
+
var CaptureMode;
|
|
13
|
+
(function (CaptureMode) {
|
|
14
|
+
CaptureMode[CaptureMode["CAPTURE_MODE_UNSPECIFIED"] = 0] = "CAPTURE_MODE_UNSPECIFIED";
|
|
15
|
+
CaptureMode[CaptureMode["CAPTURE_MODE_MANUAL"] = 1] = "CAPTURE_MODE_MANUAL";
|
|
16
|
+
CaptureMode[CaptureMode["CAPTURE_MODE_PTT"] = 2] = "CAPTURE_MODE_PTT";
|
|
17
|
+
CaptureMode[CaptureMode["CAPTURE_MODE_PLINK"] = 3] = "CAPTURE_MODE_PLINK";
|
|
18
|
+
CaptureMode[CaptureMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
19
|
+
})(CaptureMode || (exports.CaptureMode = CaptureMode = {}));
|
|
12
20
|
function createBaseSatelliteCaptureRequest() {
|
|
13
21
|
return { deviceId: "", sampleType: "" };
|
|
14
22
|
}
|
|
@@ -228,3 +236,277 @@ exports.SatelliteAudioChunk = {
|
|
|
228
236
|
return message;
|
|
229
237
|
},
|
|
230
238
|
};
|
|
239
|
+
function createBaseCaptureCommand() {
|
|
240
|
+
return { deviceId: "", sampleType: undefined, captureMode: 0, stop: false };
|
|
241
|
+
}
|
|
242
|
+
exports.CaptureCommand = {
|
|
243
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
244
|
+
if (message.deviceId !== "") {
|
|
245
|
+
writer.uint32(10).string(message.deviceId);
|
|
246
|
+
}
|
|
247
|
+
if (message.sampleType !== undefined) {
|
|
248
|
+
exports.SampleType.encode(message.sampleType, writer.uint32(18).fork()).join();
|
|
249
|
+
}
|
|
250
|
+
if (message.captureMode !== 0) {
|
|
251
|
+
writer.uint32(24).int32(message.captureMode);
|
|
252
|
+
}
|
|
253
|
+
if (message.stop !== false) {
|
|
254
|
+
writer.uint32(32).bool(message.stop);
|
|
255
|
+
}
|
|
256
|
+
return writer;
|
|
257
|
+
},
|
|
258
|
+
decode(input, length) {
|
|
259
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
260
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
261
|
+
const message = createBaseCaptureCommand();
|
|
262
|
+
while (reader.pos < end) {
|
|
263
|
+
const tag = reader.uint32();
|
|
264
|
+
switch (tag >>> 3) {
|
|
265
|
+
case 1: {
|
|
266
|
+
if (tag !== 10) {
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
message.deviceId = reader.string();
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
case 2: {
|
|
273
|
+
if (tag !== 18) {
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
message.sampleType = exports.SampleType.decode(reader, reader.uint32());
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
case 3: {
|
|
280
|
+
if (tag !== 24) {
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
message.captureMode = reader.int32();
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
case 4: {
|
|
287
|
+
if (tag !== 32) {
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
message.stop = reader.bool();
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
reader.skip(tag & 7);
|
|
298
|
+
}
|
|
299
|
+
return message;
|
|
300
|
+
},
|
|
301
|
+
create(base) {
|
|
302
|
+
return exports.CaptureCommand.fromPartial(base ?? {});
|
|
303
|
+
},
|
|
304
|
+
fromPartial(object) {
|
|
305
|
+
const message = createBaseCaptureCommand();
|
|
306
|
+
message.deviceId = object.deviceId ?? "";
|
|
307
|
+
message.sampleType = (object.sampleType !== undefined && object.sampleType !== null)
|
|
308
|
+
? exports.SampleType.fromPartial(object.sampleType)
|
|
309
|
+
: undefined;
|
|
310
|
+
message.captureMode = object.captureMode ?? 0;
|
|
311
|
+
message.stop = object.stop ?? false;
|
|
312
|
+
return message;
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
function createBaseSampleType() {
|
|
316
|
+
return { noise: undefined, heyHannah: undefined };
|
|
317
|
+
}
|
|
318
|
+
exports.SampleType = {
|
|
319
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
320
|
+
if (message.noise !== undefined) {
|
|
321
|
+
exports.NoiseSample.encode(message.noise, writer.uint32(10).fork()).join();
|
|
322
|
+
}
|
|
323
|
+
if (message.heyHannah !== undefined) {
|
|
324
|
+
exports.HeyHannahSample.encode(message.heyHannah, writer.uint32(18).fork()).join();
|
|
325
|
+
}
|
|
326
|
+
return writer;
|
|
327
|
+
},
|
|
328
|
+
decode(input, length) {
|
|
329
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
330
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
331
|
+
const message = createBaseSampleType();
|
|
332
|
+
while (reader.pos < end) {
|
|
333
|
+
const tag = reader.uint32();
|
|
334
|
+
switch (tag >>> 3) {
|
|
335
|
+
case 1: {
|
|
336
|
+
if (tag !== 10) {
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
message.noise = exports.NoiseSample.decode(reader, reader.uint32());
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
case 2: {
|
|
343
|
+
if (tag !== 18) {
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
message.heyHannah = exports.HeyHannahSample.decode(reader, reader.uint32());
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
reader.skip(tag & 7);
|
|
354
|
+
}
|
|
355
|
+
return message;
|
|
356
|
+
},
|
|
357
|
+
create(base) {
|
|
358
|
+
return exports.SampleType.fromPartial(base ?? {});
|
|
359
|
+
},
|
|
360
|
+
fromPartial(object) {
|
|
361
|
+
const message = createBaseSampleType();
|
|
362
|
+
message.noise = (object.noise !== undefined && object.noise !== null)
|
|
363
|
+
? exports.NoiseSample.fromPartial(object.noise)
|
|
364
|
+
: undefined;
|
|
365
|
+
message.heyHannah = (object.heyHannah !== undefined && object.heyHannah !== null)
|
|
366
|
+
? exports.HeyHannahSample.fromPartial(object.heyHannah)
|
|
367
|
+
: undefined;
|
|
368
|
+
return message;
|
|
369
|
+
},
|
|
370
|
+
};
|
|
371
|
+
function createBaseNoiseSample() {
|
|
372
|
+
return {};
|
|
373
|
+
}
|
|
374
|
+
exports.NoiseSample = {
|
|
375
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
376
|
+
return writer;
|
|
377
|
+
},
|
|
378
|
+
decode(input, length) {
|
|
379
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
380
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
381
|
+
const message = createBaseNoiseSample();
|
|
382
|
+
while (reader.pos < end) {
|
|
383
|
+
const tag = reader.uint32();
|
|
384
|
+
switch (tag >>> 3) {
|
|
385
|
+
}
|
|
386
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
387
|
+
break;
|
|
388
|
+
}
|
|
389
|
+
reader.skip(tag & 7);
|
|
390
|
+
}
|
|
391
|
+
return message;
|
|
392
|
+
},
|
|
393
|
+
create(base) {
|
|
394
|
+
return exports.NoiseSample.fromPartial(base ?? {});
|
|
395
|
+
},
|
|
396
|
+
fromPartial(_) {
|
|
397
|
+
const message = createBaseNoiseSample();
|
|
398
|
+
return message;
|
|
399
|
+
},
|
|
400
|
+
};
|
|
401
|
+
function createBaseHeyHannahSample() {
|
|
402
|
+
return {};
|
|
403
|
+
}
|
|
404
|
+
exports.HeyHannahSample = {
|
|
405
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
406
|
+
return writer;
|
|
407
|
+
},
|
|
408
|
+
decode(input, length) {
|
|
409
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
410
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
411
|
+
const message = createBaseHeyHannahSample();
|
|
412
|
+
while (reader.pos < end) {
|
|
413
|
+
const tag = reader.uint32();
|
|
414
|
+
switch (tag >>> 3) {
|
|
415
|
+
}
|
|
416
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
reader.skip(tag & 7);
|
|
420
|
+
}
|
|
421
|
+
return message;
|
|
422
|
+
},
|
|
423
|
+
create(base) {
|
|
424
|
+
return exports.HeyHannahSample.fromPartial(base ?? {});
|
|
425
|
+
},
|
|
426
|
+
fromPartial(_) {
|
|
427
|
+
const message = createBaseHeyHannahSample();
|
|
428
|
+
return message;
|
|
429
|
+
},
|
|
430
|
+
};
|
|
431
|
+
function createBaseCollectorMessage() {
|
|
432
|
+
return { ack: undefined };
|
|
433
|
+
}
|
|
434
|
+
exports.CollectorMessage = {
|
|
435
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
436
|
+
if (message.ack !== undefined) {
|
|
437
|
+
exports.CollectorAck.encode(message.ack, writer.uint32(10).fork()).join();
|
|
438
|
+
}
|
|
439
|
+
return writer;
|
|
440
|
+
},
|
|
441
|
+
decode(input, length) {
|
|
442
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
443
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
444
|
+
const message = createBaseCollectorMessage();
|
|
445
|
+
while (reader.pos < end) {
|
|
446
|
+
const tag = reader.uint32();
|
|
447
|
+
switch (tag >>> 3) {
|
|
448
|
+
case 1: {
|
|
449
|
+
if (tag !== 10) {
|
|
450
|
+
break;
|
|
451
|
+
}
|
|
452
|
+
message.ack = exports.CollectorAck.decode(reader, reader.uint32());
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
reader.skip(tag & 7);
|
|
460
|
+
}
|
|
461
|
+
return message;
|
|
462
|
+
},
|
|
463
|
+
create(base) {
|
|
464
|
+
return exports.CollectorMessage.fromPartial(base ?? {});
|
|
465
|
+
},
|
|
466
|
+
fromPartial(object) {
|
|
467
|
+
const message = createBaseCollectorMessage();
|
|
468
|
+
message.ack = (object.ack !== undefined && object.ack !== null) ? exports.CollectorAck.fromPartial(object.ack) : undefined;
|
|
469
|
+
return message;
|
|
470
|
+
},
|
|
471
|
+
};
|
|
472
|
+
function createBaseCollectorAck() {
|
|
473
|
+
return { message: "" };
|
|
474
|
+
}
|
|
475
|
+
exports.CollectorAck = {
|
|
476
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
477
|
+
if (message.message !== "") {
|
|
478
|
+
writer.uint32(10).string(message.message);
|
|
479
|
+
}
|
|
480
|
+
return writer;
|
|
481
|
+
},
|
|
482
|
+
decode(input, length) {
|
|
483
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
484
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
485
|
+
const message = createBaseCollectorAck();
|
|
486
|
+
while (reader.pos < end) {
|
|
487
|
+
const tag = reader.uint32();
|
|
488
|
+
switch (tag >>> 3) {
|
|
489
|
+
case 1: {
|
|
490
|
+
if (tag !== 10) {
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
message.message = reader.string();
|
|
494
|
+
continue;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
reader.skip(tag & 7);
|
|
501
|
+
}
|
|
502
|
+
return message;
|
|
503
|
+
},
|
|
504
|
+
create(base) {
|
|
505
|
+
return exports.CollectorAck.fromPartial(base ?? {});
|
|
506
|
+
},
|
|
507
|
+
fromPartial(object) {
|
|
508
|
+
const message = createBaseCollectorAck();
|
|
509
|
+
message.message = object.message ?? "";
|
|
510
|
+
return message;
|
|
511
|
+
},
|
|
512
|
+
};
|
package/package.json
CHANGED