@m1kad0/hannah-proto 3.3.0 → 3.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/activity_log.d.ts +60 -0
- package/dist/activity_log.js +403 -0
- package/dist/compat_versions.js +3 -1
- package/dist/descriptor.binpb +0 -0
- package/dist/hannah.d.ts +47 -0
- package/dist/hannah.js +26 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -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
|
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";
|
|
@@ -750,6 +751,31 @@ export declare const HannahServiceService: {
|
|
|
750
751
|
readonly responseSerialize: (value: AutomationCommand) => Buffer;
|
|
751
752
|
readonly responseDeserialize: (value: Buffer) => AutomationCommand;
|
|
752
753
|
};
|
|
754
|
+
/**
|
|
755
|
+
* --- Activity Log ---
|
|
756
|
+
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
757
|
+
* full entry detail inline (transcript, intent + intent_meta, answer text) with
|
|
758
|
+
* cursor-based pagination; audio is fetched separately, decoded server-side from the
|
|
759
|
+
* stored WAV and streamed as raw PCM chunks.
|
|
760
|
+
*/
|
|
761
|
+
readonly listActivityLog: {
|
|
762
|
+
readonly path: "/hannah.HannahService/ListActivityLog";
|
|
763
|
+
readonly requestStream: false;
|
|
764
|
+
readonly responseStream: false;
|
|
765
|
+
readonly requestSerialize: (value: ListActivityLogRequest) => Buffer;
|
|
766
|
+
readonly requestDeserialize: (value: Buffer) => ListActivityLogRequest;
|
|
767
|
+
readonly responseSerialize: (value: ListActivityLogResponse) => Buffer;
|
|
768
|
+
readonly responseDeserialize: (value: Buffer) => ListActivityLogResponse;
|
|
769
|
+
};
|
|
770
|
+
readonly streamActivityAudio: {
|
|
771
|
+
readonly path: "/hannah.HannahService/StreamActivityAudio";
|
|
772
|
+
readonly requestStream: false;
|
|
773
|
+
readonly responseStream: true;
|
|
774
|
+
readonly requestSerialize: (value: StreamActivityAudioRequest) => Buffer;
|
|
775
|
+
readonly requestDeserialize: (value: Buffer) => StreamActivityAudioRequest;
|
|
776
|
+
readonly responseSerialize: (value: ActivityAudioChunk) => Buffer;
|
|
777
|
+
readonly responseDeserialize: (value: Buffer) => ActivityAudioChunk;
|
|
778
|
+
};
|
|
753
779
|
};
|
|
754
780
|
export interface HannahServiceServer extends UntypedServiceImplementation {
|
|
755
781
|
/** --- User Registry --- */
|
|
@@ -941,6 +967,15 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
|
|
|
941
967
|
* instead of missing state changes that happened while it was offline.
|
|
942
968
|
*/
|
|
943
969
|
automationConnect: handleBidiStreamingCall<AutomationMessage, AutomationCommand>;
|
|
970
|
+
/**
|
|
971
|
+
* --- Activity Log ---
|
|
972
|
+
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
973
|
+
* full entry detail inline (transcript, intent + intent_meta, answer text) with
|
|
974
|
+
* cursor-based pagination; audio is fetched separately, decoded server-side from the
|
|
975
|
+
* stored WAV and streamed as raw PCM chunks.
|
|
976
|
+
*/
|
|
977
|
+
listActivityLog: handleUnaryCall<ListActivityLogRequest, ListActivityLogResponse>;
|
|
978
|
+
streamActivityAudio: handleServerStreamingCall<StreamActivityAudioRequest, ActivityAudioChunk>;
|
|
944
979
|
}
|
|
945
980
|
export interface HannahServiceClient extends Client {
|
|
946
981
|
/** --- User Registry --- */
|
|
@@ -1266,6 +1301,18 @@ export interface HannahServiceClient extends Client {
|
|
|
1266
1301
|
automationConnect(): ClientDuplexStream<AutomationMessage, AutomationCommand>;
|
|
1267
1302
|
automationConnect(options: Partial<CallOptions>): ClientDuplexStream<AutomationMessage, AutomationCommand>;
|
|
1268
1303
|
automationConnect(metadata: Metadata, options?: Partial<CallOptions>): ClientDuplexStream<AutomationMessage, AutomationCommand>;
|
|
1304
|
+
/**
|
|
1305
|
+
* --- Activity Log ---
|
|
1306
|
+
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
1307
|
+
* full entry detail inline (transcript, intent + intent_meta, answer text) with
|
|
1308
|
+
* cursor-based pagination; audio is fetched separately, decoded server-side from the
|
|
1309
|
+
* stored WAV and streamed as raw PCM chunks.
|
|
1310
|
+
*/
|
|
1311
|
+
listActivityLog(request: ListActivityLogRequest, callback: (error: ServiceError | null, response: ListActivityLogResponse) => void): ClientUnaryCall;
|
|
1312
|
+
listActivityLog(request: ListActivityLogRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListActivityLogResponse) => void): ClientUnaryCall;
|
|
1313
|
+
listActivityLog(request: ListActivityLogRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListActivityLogResponse) => void): ClientUnaryCall;
|
|
1314
|
+
streamActivityAudio(request: StreamActivityAudioRequest, options?: Partial<CallOptions>): ClientReadableStream<ActivityAudioChunk>;
|
|
1315
|
+
streamActivityAudio(request: StreamActivityAudioRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<ActivityAudioChunk>;
|
|
1269
1316
|
}
|
|
1270
1317
|
export declare const HannahServiceClient: {
|
|
1271
1318
|
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");
|
|
@@ -758,5 +759,30 @@ exports.HannahServiceService = {
|
|
|
758
759
|
responseSerialize: (value) => Buffer.from(automation_1.AutomationCommand.encode(value).finish()),
|
|
759
760
|
responseDeserialize: (value) => automation_1.AutomationCommand.decode(value),
|
|
760
761
|
},
|
|
762
|
+
/**
|
|
763
|
+
* --- Activity Log ---
|
|
764
|
+
* Read access to the Activity Log (#220) for external consumers (WebUI). List returns
|
|
765
|
+
* full entry detail inline (transcript, intent + intent_meta, answer text) with
|
|
766
|
+
* cursor-based pagination; audio is fetched separately, decoded server-side from the
|
|
767
|
+
* stored WAV and streamed as raw PCM chunks.
|
|
768
|
+
*/
|
|
769
|
+
listActivityLog: {
|
|
770
|
+
path: "/hannah.HannahService/ListActivityLog",
|
|
771
|
+
requestStream: false,
|
|
772
|
+
responseStream: false,
|
|
773
|
+
requestSerialize: (value) => Buffer.from(activity_log_1.ListActivityLogRequest.encode(value).finish()),
|
|
774
|
+
requestDeserialize: (value) => activity_log_1.ListActivityLogRequest.decode(value),
|
|
775
|
+
responseSerialize: (value) => Buffer.from(activity_log_1.ListActivityLogResponse.encode(value).finish()),
|
|
776
|
+
responseDeserialize: (value) => activity_log_1.ListActivityLogResponse.decode(value),
|
|
777
|
+
},
|
|
778
|
+
streamActivityAudio: {
|
|
779
|
+
path: "/hannah.HannahService/StreamActivityAudio",
|
|
780
|
+
requestStream: false,
|
|
781
|
+
responseStream: true,
|
|
782
|
+
requestSerialize: (value) => Buffer.from(activity_log_1.StreamActivityAudioRequest.encode(value).finish()),
|
|
783
|
+
requestDeserialize: (value) => activity_log_1.StreamActivityAudioRequest.decode(value),
|
|
784
|
+
responseSerialize: (value) => Buffer.from(activity_log_1.ActivityAudioChunk.encode(value).finish()),
|
|
785
|
+
responseDeserialize: (value) => activity_log_1.ActivityAudioChunk.decode(value),
|
|
786
|
+
},
|
|
761
787
|
};
|
|
762
788
|
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"));
|
package/package.json
CHANGED