@m1kad0/hannah-proto 4.4.0 → 4.6.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/README.md +21 -0
- package/dist/compat_interceptor.js +6 -6
- package/dist/compat_versions.js +176 -85
- package/dist/descriptor.binpb +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/logging.d.ts +189 -0
- package/dist/logging.js +775 -0
- package/dist/v1/activity_log.d.ts +60 -0
- package/dist/v1/activity_log.js +453 -0
- package/dist/v1/agent.d.ts +433 -0
- package/dist/v1/agent.js +2527 -0
- package/dist/v1/automation.d.ts +54 -0
- package/dist/v1/automation.js +303 -0
- package/dist/v1/car_state.d.ts +72 -0
- package/dist/v1/car_state.js +516 -0
- package/dist/v1/channel.d.ts +102 -0
- package/dist/v1/channel.js +587 -0
- package/dist/v1/control.d.ts +383 -0
- package/dist/v1/control.js +3879 -0
- package/dist/v1/device_control_menu.d.ts +88 -0
- package/dist/v1/device_control_menu.js +629 -0
- package/dist/v1/event_stream.d.ts +63 -0
- package/dist/v1/event_stream.js +494 -0
- package/dist/v1/hannah.d.ts +1644 -0
- package/dist/v1/hannah.js +968 -0
- package/dist/v1/index.d.ts +22 -0
- package/dist/v1/index.js +58 -0
- package/dist/v1/infrastructure.d.ts +98 -0
- package/dist/v1/infrastructure.js +652 -0
- package/dist/v1/logging.d.ts +189 -0
- package/dist/v1/logging.js +775 -0
- package/dist/v1/messages.d.ts +56 -0
- package/dist/v1/messages.js +398 -0
- package/dist/v1/satellite.d.ts +90 -0
- package/dist/v1/satellite.js +637 -0
- package/dist/v1/satellite_provisioning.d.ts +33 -0
- package/dist/v1/satellite_provisioning.js +84 -0
- package/dist/v1/satellite_proxy.d.ts +100 -0
- package/dist/v1/satellite_proxy.js +546 -0
- package/dist/v1/shared.d.ts +54 -0
- package/dist/v1/shared.js +249 -0
- package/dist/v1/speaker_enrollment.d.ts +44 -0
- package/dist/v1/speaker_enrollment.js +157 -0
- package/dist/v1/timer_admin.d.ts +42 -0
- package/dist/v1/timer_admin.js +273 -0
- package/dist/v1/timer_service.d.ts +133 -0
- package/dist/v1/timer_service.js +945 -0
- package/dist/v1/user_registry.d.ts +187 -0
- package/dist/v1/user_registry.js +1612 -0
- package/dist/v1/wakeword_capture.d.ts +101 -0
- package/dist/v1/wakeword_capture.js +611 -0
- package/dist/v1/weather.d.ts +81 -0
- package/dist/v1/weather.js +366 -0
- package/package.json +1 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { type CallOptions, type ChannelCredentials, Client, type ClientOptions, type ClientReadableStream, type ClientUnaryCall, type ClientWritableStream, type handleClientStreamingCall, type handleServerStreamingCall, type handleUnaryCall, type Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
|
+
import { Empty } from "./shared";
|
|
4
|
+
export declare const protobufPackage = "hannah.v1";
|
|
5
|
+
export declare enum LogLevel {
|
|
6
|
+
LOG_LEVEL_UNSPECIFIED = 0,
|
|
7
|
+
LOG_LEVEL_DEBUG = 1,
|
|
8
|
+
LOG_LEVEL_INFO = 2,
|
|
9
|
+
LOG_LEVEL_WARNING = 3,
|
|
10
|
+
LOG_LEVEL_ERROR = 4,
|
|
11
|
+
LOG_LEVEL_CRITICAL = 5,
|
|
12
|
+
UNRECOGNIZED = -1
|
|
13
|
+
}
|
|
14
|
+
/** Lets an export leave out sensitive content (e.g. before posting it in a forum). */
|
|
15
|
+
export declare enum LogCategory {
|
|
16
|
+
LOG_CATEGORY_UNSPECIFIED = 0,
|
|
17
|
+
LOG_CATEGORY_GENERAL = 1,
|
|
18
|
+
/** LOG_CATEGORY_TRANSCRIPT - speech transcripts / user utterances */
|
|
19
|
+
LOG_CATEGORY_TRANSCRIPT = 2,
|
|
20
|
+
/** LOG_CATEGORY_METADATA - room/device names, presence and similar */
|
|
21
|
+
LOG_CATEGORY_METADATA = 3,
|
|
22
|
+
UNRECOGNIZED = -1
|
|
23
|
+
}
|
|
24
|
+
export interface ShipMessage {
|
|
25
|
+
/** exactly once, as the first message */
|
|
26
|
+
hello?: ShipHello | undefined;
|
|
27
|
+
entry?: LogEntry | undefined;
|
|
28
|
+
/** the component's buffer overflowed, entries were dropped */
|
|
29
|
+
gap?: LogGap | undefined;
|
|
30
|
+
}
|
|
31
|
+
/** Identifies the source of all entries on this stream. */
|
|
32
|
+
export interface ShipHello {
|
|
33
|
+
/** e.g. "core", "telegram", "voiceid" */
|
|
34
|
+
component: string;
|
|
35
|
+
/** distinguishes several instances of the same component */
|
|
36
|
+
instance: string;
|
|
37
|
+
/** component version, shown in the export manifest */
|
|
38
|
+
version: string;
|
|
39
|
+
}
|
|
40
|
+
export interface LogEntry {
|
|
41
|
+
/** Unix ms at the time of logging in the component, not of receipt */
|
|
42
|
+
timestampMs: bigint;
|
|
43
|
+
level: LogLevel;
|
|
44
|
+
/** e.g. the Python logger name */
|
|
45
|
+
logger: string;
|
|
46
|
+
/** secrets are filtered out by the component before sending */
|
|
47
|
+
message: string;
|
|
48
|
+
category: LogCategory;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Entries the component had to drop (buffer overflow while the collector was
|
|
52
|
+
* unreachable). Listed in the export manifest so gaps are visible.
|
|
53
|
+
*/
|
|
54
|
+
export interface LogGap {
|
|
55
|
+
dropped: bigint;
|
|
56
|
+
fromMs: bigint;
|
|
57
|
+
toMs: bigint;
|
|
58
|
+
}
|
|
59
|
+
export interface ShipAck {
|
|
60
|
+
/** number of entries stored from this stream */
|
|
61
|
+
accepted: bigint;
|
|
62
|
+
}
|
|
63
|
+
export interface LogSource {
|
|
64
|
+
component: string;
|
|
65
|
+
instance: string;
|
|
66
|
+
/** from the most recent ShipHello */
|
|
67
|
+
version: string;
|
|
68
|
+
oldestMs: bigint;
|
|
69
|
+
newestMs: bigint;
|
|
70
|
+
entries: bigint;
|
|
71
|
+
}
|
|
72
|
+
export interface GetSourcesResponse {
|
|
73
|
+
sources: LogSource[];
|
|
74
|
+
}
|
|
75
|
+
export interface ExportRequest {
|
|
76
|
+
sinceMs: bigint;
|
|
77
|
+
/** 0 = now */
|
|
78
|
+
untilMs: bigint;
|
|
79
|
+
/** empty = all */
|
|
80
|
+
components: string[];
|
|
81
|
+
excludeCategories: LogCategory[];
|
|
82
|
+
}
|
|
83
|
+
export interface ExportChunk {
|
|
84
|
+
data: Uint8Array;
|
|
85
|
+
}
|
|
86
|
+
export declare const ShipMessage: MessageFns<ShipMessage>;
|
|
87
|
+
export declare const ShipHello: MessageFns<ShipHello>;
|
|
88
|
+
export declare const LogEntry: MessageFns<LogEntry>;
|
|
89
|
+
export declare const LogGap: MessageFns<LogGap>;
|
|
90
|
+
export declare const ShipAck: MessageFns<ShipAck>;
|
|
91
|
+
export declare const LogSource: MessageFns<LogSource>;
|
|
92
|
+
export declare const GetSourcesResponse: MessageFns<GetSourcesResponse>;
|
|
93
|
+
export declare const ExportRequest: MessageFns<ExportRequest>;
|
|
94
|
+
export declare const ExportChunk: MessageFns<ExportChunk>;
|
|
95
|
+
export type LogServiceService = typeof LogServiceService;
|
|
96
|
+
export declare const LogServiceService: {
|
|
97
|
+
/**
|
|
98
|
+
* Component → collector. First message is a ShipHello, then any number of
|
|
99
|
+
* entries/gaps. The stream stays open for as long as the component runs.
|
|
100
|
+
*/
|
|
101
|
+
readonly ship: {
|
|
102
|
+
readonly path: "/hannah.v1.LogService/Ship";
|
|
103
|
+
readonly requestStream: true;
|
|
104
|
+
readonly responseStream: false;
|
|
105
|
+
readonly requestSerialize: (value: ShipMessage) => Buffer;
|
|
106
|
+
readonly requestDeserialize: (value: Buffer) => ShipMessage;
|
|
107
|
+
readonly responseSerialize: (value: ShipAck) => Buffer;
|
|
108
|
+
readonly responseDeserialize: (value: Buffer) => ShipAck;
|
|
109
|
+
};
|
|
110
|
+
/** Which sources the collector currently holds logs for, and how far back. */
|
|
111
|
+
readonly getSources: {
|
|
112
|
+
readonly path: "/hannah.v1.LogService/GetSources";
|
|
113
|
+
readonly requestStream: false;
|
|
114
|
+
readonly responseStream: false;
|
|
115
|
+
readonly requestSerialize: (value: Empty) => Buffer;
|
|
116
|
+
readonly requestDeserialize: (value: Buffer) => Empty;
|
|
117
|
+
readonly responseSerialize: (value: GetSourcesResponse) => Buffer;
|
|
118
|
+
readonly responseDeserialize: (value: Buffer) => GetSourcesResponse;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Archive of the requested logs (tar.gz: one file per source plus a manifest),
|
|
122
|
+
* split into chunks — the client concatenates ExportChunk.data in order.
|
|
123
|
+
*/
|
|
124
|
+
readonly export: {
|
|
125
|
+
readonly path: "/hannah.v1.LogService/Export";
|
|
126
|
+
readonly requestStream: false;
|
|
127
|
+
readonly responseStream: true;
|
|
128
|
+
readonly requestSerialize: (value: ExportRequest) => Buffer;
|
|
129
|
+
readonly requestDeserialize: (value: Buffer) => ExportRequest;
|
|
130
|
+
readonly responseSerialize: (value: ExportChunk) => Buffer;
|
|
131
|
+
readonly responseDeserialize: (value: Buffer) => ExportChunk;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export interface LogServiceServer extends UntypedServiceImplementation {
|
|
135
|
+
/**
|
|
136
|
+
* Component → collector. First message is a ShipHello, then any number of
|
|
137
|
+
* entries/gaps. The stream stays open for as long as the component runs.
|
|
138
|
+
*/
|
|
139
|
+
ship: handleClientStreamingCall<ShipMessage, ShipAck>;
|
|
140
|
+
/** Which sources the collector currently holds logs for, and how far back. */
|
|
141
|
+
getSources: handleUnaryCall<Empty, GetSourcesResponse>;
|
|
142
|
+
/**
|
|
143
|
+
* Archive of the requested logs (tar.gz: one file per source plus a manifest),
|
|
144
|
+
* split into chunks — the client concatenates ExportChunk.data in order.
|
|
145
|
+
*/
|
|
146
|
+
export: handleServerStreamingCall<ExportRequest, ExportChunk>;
|
|
147
|
+
}
|
|
148
|
+
export interface LogServiceClient extends Client {
|
|
149
|
+
/**
|
|
150
|
+
* Component → collector. First message is a ShipHello, then any number of
|
|
151
|
+
* entries/gaps. The stream stays open for as long as the component runs.
|
|
152
|
+
*/
|
|
153
|
+
ship(callback: (error: ServiceError | null, response: ShipAck) => void): ClientWritableStream<ShipMessage>;
|
|
154
|
+
ship(metadata: Metadata, callback: (error: ServiceError | null, response: ShipAck) => void): ClientWritableStream<ShipMessage>;
|
|
155
|
+
ship(options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ShipAck) => void): ClientWritableStream<ShipMessage>;
|
|
156
|
+
ship(metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ShipAck) => void): ClientWritableStream<ShipMessage>;
|
|
157
|
+
/** Which sources the collector currently holds logs for, and how far back. */
|
|
158
|
+
getSources(request: Empty, callback: (error: ServiceError | null, response: GetSourcesResponse) => void): ClientUnaryCall;
|
|
159
|
+
getSources(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: GetSourcesResponse) => void): ClientUnaryCall;
|
|
160
|
+
getSources(request: Empty, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetSourcesResponse) => void): ClientUnaryCall;
|
|
161
|
+
/**
|
|
162
|
+
* Archive of the requested logs (tar.gz: one file per source plus a manifest),
|
|
163
|
+
* split into chunks — the client concatenates ExportChunk.data in order.
|
|
164
|
+
*/
|
|
165
|
+
export(request: ExportRequest, options?: Partial<CallOptions>): ClientReadableStream<ExportChunk>;
|
|
166
|
+
export(request: ExportRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<ExportChunk>;
|
|
167
|
+
}
|
|
168
|
+
export declare const LogServiceClient: {
|
|
169
|
+
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): LogServiceClient;
|
|
170
|
+
service: typeof LogServiceService;
|
|
171
|
+
serviceName: string;
|
|
172
|
+
};
|
|
173
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
174
|
+
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 {} ? {
|
|
175
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
176
|
+
} : Partial<T>;
|
|
177
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
178
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
179
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
180
|
+
} & {
|
|
181
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
182
|
+
};
|
|
183
|
+
export interface MessageFns<T> {
|
|
184
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
185
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
186
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
187
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
188
|
+
}
|
|
189
|
+
export {};
|