@m1kad0/hannah-proto 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compat_versions.js +4 -1
- package/dist/descriptor.binpb +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/logging.d.ts +189 -0
- package/dist/logging.js +775 -0
- package/package.json +1 -1
package/dist/compat_versions.js
CHANGED
package/dist/descriptor.binpb
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * as device_control_menu from './device_control_menu';
|
|
|
11
11
|
export * as event_stream from './event_stream';
|
|
12
12
|
export * as hannah from './hannah';
|
|
13
13
|
export * as infrastructure from './infrastructure';
|
|
14
|
+
export * as logging from './logging';
|
|
14
15
|
export * as messages from './messages';
|
|
15
16
|
export * as options from './options';
|
|
16
17
|
export * as satellite from './satellite';
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.weather = exports.wakeword_capture = exports.user_registry = exports.timer_service = exports.timer_admin = exports.speaker_enrollment = exports.shared = exports.satellite_proxy = exports.satellite_provisioning = exports.satellite = exports.options = exports.messages = exports.infrastructure = exports.hannah = exports.event_stream = exports.device_control_menu = exports.control = exports.compat_versions = exports.compat_interceptor = exports.channel = exports.car_state = exports.automation = exports.agent = exports.activity_log = void 0;
|
|
39
|
+
exports.weather = exports.wakeword_capture = exports.user_registry = exports.timer_service = exports.timer_admin = exports.speaker_enrollment = exports.shared = exports.satellite_proxy = exports.satellite_provisioning = exports.satellite = exports.options = exports.messages = exports.logging = exports.infrastructure = exports.hannah = exports.event_stream = exports.device_control_menu = exports.control = exports.compat_versions = exports.compat_interceptor = exports.channel = exports.car_state = exports.automation = exports.agent = exports.activity_log = void 0;
|
|
40
40
|
__exportStar(require("./version"), exports);
|
|
41
41
|
exports.activity_log = __importStar(require("./activity_log"));
|
|
42
42
|
exports.agent = __importStar(require("./agent"));
|
|
@@ -50,6 +50,7 @@ exports.device_control_menu = __importStar(require("./device_control_menu"));
|
|
|
50
50
|
exports.event_stream = __importStar(require("./event_stream"));
|
|
51
51
|
exports.hannah = __importStar(require("./hannah"));
|
|
52
52
|
exports.infrastructure = __importStar(require("./infrastructure"));
|
|
53
|
+
exports.logging = __importStar(require("./logging"));
|
|
53
54
|
exports.messages = __importStar(require("./messages"));
|
|
54
55
|
exports.options = __importStar(require("./options"));
|
|
55
56
|
exports.satellite = __importStar(require("./satellite"));
|
|
@@ -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";
|
|
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.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.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.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 {};
|
package/dist/logging.js
ADDED
|
@@ -0,0 +1,775 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.1
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: hannah/logging.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.LogServiceClient = exports.LogServiceService = exports.ExportChunk = exports.ExportRequest = exports.GetSourcesResponse = exports.LogSource = exports.ShipAck = exports.LogGap = exports.LogEntry = exports.ShipHello = exports.ShipMessage = exports.LogCategory = exports.LogLevel = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const grpc_js_1 = require("@grpc/grpc-js");
|
|
12
|
+
const shared_1 = require("./shared");
|
|
13
|
+
exports.protobufPackage = "hannah";
|
|
14
|
+
var LogLevel;
|
|
15
|
+
(function (LogLevel) {
|
|
16
|
+
LogLevel[LogLevel["LOG_LEVEL_UNSPECIFIED"] = 0] = "LOG_LEVEL_UNSPECIFIED";
|
|
17
|
+
LogLevel[LogLevel["LOG_LEVEL_DEBUG"] = 1] = "LOG_LEVEL_DEBUG";
|
|
18
|
+
LogLevel[LogLevel["LOG_LEVEL_INFO"] = 2] = "LOG_LEVEL_INFO";
|
|
19
|
+
LogLevel[LogLevel["LOG_LEVEL_WARNING"] = 3] = "LOG_LEVEL_WARNING";
|
|
20
|
+
LogLevel[LogLevel["LOG_LEVEL_ERROR"] = 4] = "LOG_LEVEL_ERROR";
|
|
21
|
+
LogLevel[LogLevel["LOG_LEVEL_CRITICAL"] = 5] = "LOG_LEVEL_CRITICAL";
|
|
22
|
+
LogLevel[LogLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
23
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
24
|
+
/** Lets an export leave out sensitive content (e.g. before posting it in a forum). */
|
|
25
|
+
var LogCategory;
|
|
26
|
+
(function (LogCategory) {
|
|
27
|
+
LogCategory[LogCategory["LOG_CATEGORY_UNSPECIFIED"] = 0] = "LOG_CATEGORY_UNSPECIFIED";
|
|
28
|
+
LogCategory[LogCategory["LOG_CATEGORY_GENERAL"] = 1] = "LOG_CATEGORY_GENERAL";
|
|
29
|
+
/** LOG_CATEGORY_TRANSCRIPT - speech transcripts / user utterances */
|
|
30
|
+
LogCategory[LogCategory["LOG_CATEGORY_TRANSCRIPT"] = 2] = "LOG_CATEGORY_TRANSCRIPT";
|
|
31
|
+
/** LOG_CATEGORY_METADATA - room/device names, presence and similar */
|
|
32
|
+
LogCategory[LogCategory["LOG_CATEGORY_METADATA"] = 3] = "LOG_CATEGORY_METADATA";
|
|
33
|
+
LogCategory[LogCategory["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
34
|
+
})(LogCategory || (exports.LogCategory = LogCategory = {}));
|
|
35
|
+
function createBaseShipMessage() {
|
|
36
|
+
return { hello: undefined, entry: undefined, gap: undefined };
|
|
37
|
+
}
|
|
38
|
+
exports.ShipMessage = {
|
|
39
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
40
|
+
if (message.hello !== undefined) {
|
|
41
|
+
exports.ShipHello.encode(message.hello, writer.uint32(10).fork()).join();
|
|
42
|
+
}
|
|
43
|
+
if (message.entry !== undefined) {
|
|
44
|
+
exports.LogEntry.encode(message.entry, writer.uint32(18).fork()).join();
|
|
45
|
+
}
|
|
46
|
+
if (message.gap !== undefined) {
|
|
47
|
+
exports.LogGap.encode(message.gap, writer.uint32(26).fork()).join();
|
|
48
|
+
}
|
|
49
|
+
return writer;
|
|
50
|
+
},
|
|
51
|
+
decode(input, length) {
|
|
52
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
53
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
54
|
+
if (previousRecursionDepth >= 100) {
|
|
55
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
56
|
+
}
|
|
57
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
58
|
+
try {
|
|
59
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
60
|
+
const message = createBaseShipMessage();
|
|
61
|
+
while (reader.pos < end) {
|
|
62
|
+
const tag = reader.uint32();
|
|
63
|
+
switch (tag >>> 3) {
|
|
64
|
+
case 1: {
|
|
65
|
+
if (tag !== 10) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
message.hello = exports.ShipHello.decode(reader, reader.uint32());
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
case 2: {
|
|
72
|
+
if (tag !== 18) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
message.entry = exports.LogEntry.decode(reader, reader.uint32());
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
case 3: {
|
|
79
|
+
if (tag !== 26) {
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
message.gap = exports.LogGap.decode(reader, reader.uint32());
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
reader.skip(tag & 7);
|
|
90
|
+
}
|
|
91
|
+
return message;
|
|
92
|
+
}
|
|
93
|
+
finally {
|
|
94
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
create(base) {
|
|
98
|
+
return exports.ShipMessage.fromPartial(base ?? {});
|
|
99
|
+
},
|
|
100
|
+
fromPartial(object) {
|
|
101
|
+
const message = createBaseShipMessage();
|
|
102
|
+
message.hello = (object.hello !== undefined && object.hello !== null)
|
|
103
|
+
? exports.ShipHello.fromPartial(object.hello)
|
|
104
|
+
: undefined;
|
|
105
|
+
message.entry = (object.entry !== undefined && object.entry !== null)
|
|
106
|
+
? exports.LogEntry.fromPartial(object.entry)
|
|
107
|
+
: undefined;
|
|
108
|
+
message.gap = (object.gap !== undefined && object.gap !== null) ? exports.LogGap.fromPartial(object.gap) : undefined;
|
|
109
|
+
return message;
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
function createBaseShipHello() {
|
|
113
|
+
return { component: "", instance: "", version: "" };
|
|
114
|
+
}
|
|
115
|
+
exports.ShipHello = {
|
|
116
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
117
|
+
if (message.component !== "") {
|
|
118
|
+
writer.uint32(10).string(message.component);
|
|
119
|
+
}
|
|
120
|
+
if (message.instance !== "") {
|
|
121
|
+
writer.uint32(18).string(message.instance);
|
|
122
|
+
}
|
|
123
|
+
if (message.version !== "") {
|
|
124
|
+
writer.uint32(26).string(message.version);
|
|
125
|
+
}
|
|
126
|
+
return writer;
|
|
127
|
+
},
|
|
128
|
+
decode(input, length) {
|
|
129
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
130
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
131
|
+
if (previousRecursionDepth >= 100) {
|
|
132
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
133
|
+
}
|
|
134
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
135
|
+
try {
|
|
136
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
137
|
+
const message = createBaseShipHello();
|
|
138
|
+
while (reader.pos < end) {
|
|
139
|
+
const tag = reader.uint32();
|
|
140
|
+
switch (tag >>> 3) {
|
|
141
|
+
case 1: {
|
|
142
|
+
if (tag !== 10) {
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
message.component = reader.string();
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
case 2: {
|
|
149
|
+
if (tag !== 18) {
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
message.instance = reader.string();
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
case 3: {
|
|
156
|
+
if (tag !== 26) {
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
message.version = reader.string();
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
reader.skip(tag & 7);
|
|
167
|
+
}
|
|
168
|
+
return message;
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
create(base) {
|
|
175
|
+
return exports.ShipHello.fromPartial(base ?? {});
|
|
176
|
+
},
|
|
177
|
+
fromPartial(object) {
|
|
178
|
+
const message = createBaseShipHello();
|
|
179
|
+
message.component = object.component ?? "";
|
|
180
|
+
message.instance = object.instance ?? "";
|
|
181
|
+
message.version = object.version ?? "";
|
|
182
|
+
return message;
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
function createBaseLogEntry() {
|
|
186
|
+
return { timestampMs: 0n, level: 0, logger: "", message: "", category: 0 };
|
|
187
|
+
}
|
|
188
|
+
exports.LogEntry = {
|
|
189
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
190
|
+
if (message.timestampMs !== 0n) {
|
|
191
|
+
if (BigInt.asIntN(64, message.timestampMs) !== message.timestampMs) {
|
|
192
|
+
throw new globalThis.Error("value provided for field message.timestampMs of type int64 too large");
|
|
193
|
+
}
|
|
194
|
+
writer.uint32(8).int64(message.timestampMs);
|
|
195
|
+
}
|
|
196
|
+
if (message.level !== 0) {
|
|
197
|
+
writer.uint32(16).int32(message.level);
|
|
198
|
+
}
|
|
199
|
+
if (message.logger !== "") {
|
|
200
|
+
writer.uint32(26).string(message.logger);
|
|
201
|
+
}
|
|
202
|
+
if (message.message !== "") {
|
|
203
|
+
writer.uint32(34).string(message.message);
|
|
204
|
+
}
|
|
205
|
+
if (message.category !== 0) {
|
|
206
|
+
writer.uint32(40).int32(message.category);
|
|
207
|
+
}
|
|
208
|
+
return writer;
|
|
209
|
+
},
|
|
210
|
+
decode(input, length) {
|
|
211
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
212
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
213
|
+
if (previousRecursionDepth >= 100) {
|
|
214
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
215
|
+
}
|
|
216
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
217
|
+
try {
|
|
218
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
219
|
+
const message = createBaseLogEntry();
|
|
220
|
+
while (reader.pos < end) {
|
|
221
|
+
const tag = reader.uint32();
|
|
222
|
+
switch (tag >>> 3) {
|
|
223
|
+
case 1: {
|
|
224
|
+
if (tag !== 8) {
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
message.timestampMs = reader.int64();
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
case 2: {
|
|
231
|
+
if (tag !== 16) {
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
message.level = reader.int32();
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
case 3: {
|
|
238
|
+
if (tag !== 26) {
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
message.logger = reader.string();
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
case 4: {
|
|
245
|
+
if (tag !== 34) {
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
message.message = reader.string();
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
case 5: {
|
|
252
|
+
if (tag !== 40) {
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
message.category = reader.int32();
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
reader.skip(tag & 7);
|
|
263
|
+
}
|
|
264
|
+
return message;
|
|
265
|
+
}
|
|
266
|
+
finally {
|
|
267
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
create(base) {
|
|
271
|
+
return exports.LogEntry.fromPartial(base ?? {});
|
|
272
|
+
},
|
|
273
|
+
fromPartial(object) {
|
|
274
|
+
const message = createBaseLogEntry();
|
|
275
|
+
message.timestampMs = (object.timestampMs !== undefined && object.timestampMs !== null)
|
|
276
|
+
? BigInt(object.timestampMs)
|
|
277
|
+
: 0n;
|
|
278
|
+
message.level = object.level ?? 0;
|
|
279
|
+
message.logger = object.logger ?? "";
|
|
280
|
+
message.message = object.message ?? "";
|
|
281
|
+
message.category = object.category ?? 0;
|
|
282
|
+
return message;
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
function createBaseLogGap() {
|
|
286
|
+
return { dropped: 0n, fromMs: 0n, toMs: 0n };
|
|
287
|
+
}
|
|
288
|
+
exports.LogGap = {
|
|
289
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
290
|
+
if (message.dropped !== 0n) {
|
|
291
|
+
if (BigInt.asIntN(64, message.dropped) !== message.dropped) {
|
|
292
|
+
throw new globalThis.Error("value provided for field message.dropped of type int64 too large");
|
|
293
|
+
}
|
|
294
|
+
writer.uint32(8).int64(message.dropped);
|
|
295
|
+
}
|
|
296
|
+
if (message.fromMs !== 0n) {
|
|
297
|
+
if (BigInt.asIntN(64, message.fromMs) !== message.fromMs) {
|
|
298
|
+
throw new globalThis.Error("value provided for field message.fromMs of type int64 too large");
|
|
299
|
+
}
|
|
300
|
+
writer.uint32(16).int64(message.fromMs);
|
|
301
|
+
}
|
|
302
|
+
if (message.toMs !== 0n) {
|
|
303
|
+
if (BigInt.asIntN(64, message.toMs) !== message.toMs) {
|
|
304
|
+
throw new globalThis.Error("value provided for field message.toMs of type int64 too large");
|
|
305
|
+
}
|
|
306
|
+
writer.uint32(24).int64(message.toMs);
|
|
307
|
+
}
|
|
308
|
+
return writer;
|
|
309
|
+
},
|
|
310
|
+
decode(input, length) {
|
|
311
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
312
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
313
|
+
if (previousRecursionDepth >= 100) {
|
|
314
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
315
|
+
}
|
|
316
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
317
|
+
try {
|
|
318
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
319
|
+
const message = createBaseLogGap();
|
|
320
|
+
while (reader.pos < end) {
|
|
321
|
+
const tag = reader.uint32();
|
|
322
|
+
switch (tag >>> 3) {
|
|
323
|
+
case 1: {
|
|
324
|
+
if (tag !== 8) {
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
message.dropped = reader.int64();
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
case 2: {
|
|
331
|
+
if (tag !== 16) {
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
message.fromMs = reader.int64();
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
case 3: {
|
|
338
|
+
if (tag !== 24) {
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
message.toMs = reader.int64();
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
reader.skip(tag & 7);
|
|
349
|
+
}
|
|
350
|
+
return message;
|
|
351
|
+
}
|
|
352
|
+
finally {
|
|
353
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
create(base) {
|
|
357
|
+
return exports.LogGap.fromPartial(base ?? {});
|
|
358
|
+
},
|
|
359
|
+
fromPartial(object) {
|
|
360
|
+
const message = createBaseLogGap();
|
|
361
|
+
message.dropped = (object.dropped !== undefined && object.dropped !== null) ? BigInt(object.dropped) : 0n;
|
|
362
|
+
message.fromMs = (object.fromMs !== undefined && object.fromMs !== null) ? BigInt(object.fromMs) : 0n;
|
|
363
|
+
message.toMs = (object.toMs !== undefined && object.toMs !== null) ? BigInt(object.toMs) : 0n;
|
|
364
|
+
return message;
|
|
365
|
+
},
|
|
366
|
+
};
|
|
367
|
+
function createBaseShipAck() {
|
|
368
|
+
return { accepted: 0n };
|
|
369
|
+
}
|
|
370
|
+
exports.ShipAck = {
|
|
371
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
372
|
+
if (message.accepted !== 0n) {
|
|
373
|
+
if (BigInt.asIntN(64, message.accepted) !== message.accepted) {
|
|
374
|
+
throw new globalThis.Error("value provided for field message.accepted of type int64 too large");
|
|
375
|
+
}
|
|
376
|
+
writer.uint32(8).int64(message.accepted);
|
|
377
|
+
}
|
|
378
|
+
return writer;
|
|
379
|
+
},
|
|
380
|
+
decode(input, length) {
|
|
381
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
382
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
383
|
+
if (previousRecursionDepth >= 100) {
|
|
384
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
385
|
+
}
|
|
386
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
387
|
+
try {
|
|
388
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
389
|
+
const message = createBaseShipAck();
|
|
390
|
+
while (reader.pos < end) {
|
|
391
|
+
const tag = reader.uint32();
|
|
392
|
+
switch (tag >>> 3) {
|
|
393
|
+
case 1: {
|
|
394
|
+
if (tag !== 8) {
|
|
395
|
+
break;
|
|
396
|
+
}
|
|
397
|
+
message.accepted = reader.int64();
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
reader.skip(tag & 7);
|
|
405
|
+
}
|
|
406
|
+
return message;
|
|
407
|
+
}
|
|
408
|
+
finally {
|
|
409
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
create(base) {
|
|
413
|
+
return exports.ShipAck.fromPartial(base ?? {});
|
|
414
|
+
},
|
|
415
|
+
fromPartial(object) {
|
|
416
|
+
const message = createBaseShipAck();
|
|
417
|
+
message.accepted = (object.accepted !== undefined && object.accepted !== null) ? BigInt(object.accepted) : 0n;
|
|
418
|
+
return message;
|
|
419
|
+
},
|
|
420
|
+
};
|
|
421
|
+
function createBaseLogSource() {
|
|
422
|
+
return { component: "", instance: "", version: "", oldestMs: 0n, newestMs: 0n, entries: 0n };
|
|
423
|
+
}
|
|
424
|
+
exports.LogSource = {
|
|
425
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
426
|
+
if (message.component !== "") {
|
|
427
|
+
writer.uint32(10).string(message.component);
|
|
428
|
+
}
|
|
429
|
+
if (message.instance !== "") {
|
|
430
|
+
writer.uint32(18).string(message.instance);
|
|
431
|
+
}
|
|
432
|
+
if (message.version !== "") {
|
|
433
|
+
writer.uint32(26).string(message.version);
|
|
434
|
+
}
|
|
435
|
+
if (message.oldestMs !== 0n) {
|
|
436
|
+
if (BigInt.asIntN(64, message.oldestMs) !== message.oldestMs) {
|
|
437
|
+
throw new globalThis.Error("value provided for field message.oldestMs of type int64 too large");
|
|
438
|
+
}
|
|
439
|
+
writer.uint32(32).int64(message.oldestMs);
|
|
440
|
+
}
|
|
441
|
+
if (message.newestMs !== 0n) {
|
|
442
|
+
if (BigInt.asIntN(64, message.newestMs) !== message.newestMs) {
|
|
443
|
+
throw new globalThis.Error("value provided for field message.newestMs of type int64 too large");
|
|
444
|
+
}
|
|
445
|
+
writer.uint32(40).int64(message.newestMs);
|
|
446
|
+
}
|
|
447
|
+
if (message.entries !== 0n) {
|
|
448
|
+
if (BigInt.asIntN(64, message.entries) !== message.entries) {
|
|
449
|
+
throw new globalThis.Error("value provided for field message.entries of type int64 too large");
|
|
450
|
+
}
|
|
451
|
+
writer.uint32(48).int64(message.entries);
|
|
452
|
+
}
|
|
453
|
+
return writer;
|
|
454
|
+
},
|
|
455
|
+
decode(input, length) {
|
|
456
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
457
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
458
|
+
if (previousRecursionDepth >= 100) {
|
|
459
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
460
|
+
}
|
|
461
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
462
|
+
try {
|
|
463
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
464
|
+
const message = createBaseLogSource();
|
|
465
|
+
while (reader.pos < end) {
|
|
466
|
+
const tag = reader.uint32();
|
|
467
|
+
switch (tag >>> 3) {
|
|
468
|
+
case 1: {
|
|
469
|
+
if (tag !== 10) {
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
message.component = reader.string();
|
|
473
|
+
continue;
|
|
474
|
+
}
|
|
475
|
+
case 2: {
|
|
476
|
+
if (tag !== 18) {
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
message.instance = reader.string();
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
case 3: {
|
|
483
|
+
if (tag !== 26) {
|
|
484
|
+
break;
|
|
485
|
+
}
|
|
486
|
+
message.version = reader.string();
|
|
487
|
+
continue;
|
|
488
|
+
}
|
|
489
|
+
case 4: {
|
|
490
|
+
if (tag !== 32) {
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
message.oldestMs = reader.int64();
|
|
494
|
+
continue;
|
|
495
|
+
}
|
|
496
|
+
case 5: {
|
|
497
|
+
if (tag !== 40) {
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
message.newestMs = reader.int64();
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
case 6: {
|
|
504
|
+
if (tag !== 48) {
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
message.entries = reader.int64();
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
reader.skip(tag & 7);
|
|
515
|
+
}
|
|
516
|
+
return message;
|
|
517
|
+
}
|
|
518
|
+
finally {
|
|
519
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
create(base) {
|
|
523
|
+
return exports.LogSource.fromPartial(base ?? {});
|
|
524
|
+
},
|
|
525
|
+
fromPartial(object) {
|
|
526
|
+
const message = createBaseLogSource();
|
|
527
|
+
message.component = object.component ?? "";
|
|
528
|
+
message.instance = object.instance ?? "";
|
|
529
|
+
message.version = object.version ?? "";
|
|
530
|
+
message.oldestMs = (object.oldestMs !== undefined && object.oldestMs !== null) ? BigInt(object.oldestMs) : 0n;
|
|
531
|
+
message.newestMs = (object.newestMs !== undefined && object.newestMs !== null) ? BigInt(object.newestMs) : 0n;
|
|
532
|
+
message.entries = (object.entries !== undefined && object.entries !== null) ? BigInt(object.entries) : 0n;
|
|
533
|
+
return message;
|
|
534
|
+
},
|
|
535
|
+
};
|
|
536
|
+
function createBaseGetSourcesResponse() {
|
|
537
|
+
return { sources: [] };
|
|
538
|
+
}
|
|
539
|
+
exports.GetSourcesResponse = {
|
|
540
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
541
|
+
for (const v of message.sources) {
|
|
542
|
+
exports.LogSource.encode(v, writer.uint32(10).fork()).join();
|
|
543
|
+
}
|
|
544
|
+
return writer;
|
|
545
|
+
},
|
|
546
|
+
decode(input, length) {
|
|
547
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
548
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
549
|
+
if (previousRecursionDepth >= 100) {
|
|
550
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
551
|
+
}
|
|
552
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
553
|
+
try {
|
|
554
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
555
|
+
const message = createBaseGetSourcesResponse();
|
|
556
|
+
while (reader.pos < end) {
|
|
557
|
+
const tag = reader.uint32();
|
|
558
|
+
switch (tag >>> 3) {
|
|
559
|
+
case 1: {
|
|
560
|
+
if (tag !== 10) {
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
message.sources.push(exports.LogSource.decode(reader, reader.uint32()));
|
|
564
|
+
continue;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
reader.skip(tag & 7);
|
|
571
|
+
}
|
|
572
|
+
return message;
|
|
573
|
+
}
|
|
574
|
+
finally {
|
|
575
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
create(base) {
|
|
579
|
+
return exports.GetSourcesResponse.fromPartial(base ?? {});
|
|
580
|
+
},
|
|
581
|
+
fromPartial(object) {
|
|
582
|
+
const message = createBaseGetSourcesResponse();
|
|
583
|
+
message.sources = object.sources?.map((e) => exports.LogSource.fromPartial(e)) || [];
|
|
584
|
+
return message;
|
|
585
|
+
},
|
|
586
|
+
};
|
|
587
|
+
function createBaseExportRequest() {
|
|
588
|
+
return { sinceMs: 0n, untilMs: 0n, components: [], excludeCategories: [] };
|
|
589
|
+
}
|
|
590
|
+
exports.ExportRequest = {
|
|
591
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
592
|
+
if (message.sinceMs !== 0n) {
|
|
593
|
+
if (BigInt.asIntN(64, message.sinceMs) !== message.sinceMs) {
|
|
594
|
+
throw new globalThis.Error("value provided for field message.sinceMs of type int64 too large");
|
|
595
|
+
}
|
|
596
|
+
writer.uint32(8).int64(message.sinceMs);
|
|
597
|
+
}
|
|
598
|
+
if (message.untilMs !== 0n) {
|
|
599
|
+
if (BigInt.asIntN(64, message.untilMs) !== message.untilMs) {
|
|
600
|
+
throw new globalThis.Error("value provided for field message.untilMs of type int64 too large");
|
|
601
|
+
}
|
|
602
|
+
writer.uint32(16).int64(message.untilMs);
|
|
603
|
+
}
|
|
604
|
+
for (const v of message.components) {
|
|
605
|
+
writer.uint32(26).string(v);
|
|
606
|
+
}
|
|
607
|
+
writer.uint32(34).fork();
|
|
608
|
+
for (const v of message.excludeCategories) {
|
|
609
|
+
writer.int32(v);
|
|
610
|
+
}
|
|
611
|
+
writer.join();
|
|
612
|
+
return writer;
|
|
613
|
+
},
|
|
614
|
+
decode(input, length) {
|
|
615
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
616
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
617
|
+
if (previousRecursionDepth >= 100) {
|
|
618
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
619
|
+
}
|
|
620
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
621
|
+
try {
|
|
622
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
623
|
+
const message = createBaseExportRequest();
|
|
624
|
+
while (reader.pos < end) {
|
|
625
|
+
const tag = reader.uint32();
|
|
626
|
+
switch (tag >>> 3) {
|
|
627
|
+
case 1: {
|
|
628
|
+
if (tag !== 8) {
|
|
629
|
+
break;
|
|
630
|
+
}
|
|
631
|
+
message.sinceMs = reader.int64();
|
|
632
|
+
continue;
|
|
633
|
+
}
|
|
634
|
+
case 2: {
|
|
635
|
+
if (tag !== 16) {
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
message.untilMs = reader.int64();
|
|
639
|
+
continue;
|
|
640
|
+
}
|
|
641
|
+
case 3: {
|
|
642
|
+
if (tag !== 26) {
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
message.components.push(reader.string());
|
|
646
|
+
continue;
|
|
647
|
+
}
|
|
648
|
+
case 4: {
|
|
649
|
+
if (tag === 32) {
|
|
650
|
+
message.excludeCategories.push(reader.int32());
|
|
651
|
+
continue;
|
|
652
|
+
}
|
|
653
|
+
if (tag === 34) {
|
|
654
|
+
const end2 = reader.uint32() + reader.pos;
|
|
655
|
+
while (reader.pos < end2) {
|
|
656
|
+
message.excludeCategories.push(reader.int32());
|
|
657
|
+
}
|
|
658
|
+
continue;
|
|
659
|
+
}
|
|
660
|
+
break;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
reader.skip(tag & 7);
|
|
667
|
+
}
|
|
668
|
+
return message;
|
|
669
|
+
}
|
|
670
|
+
finally {
|
|
671
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
create(base) {
|
|
675
|
+
return exports.ExportRequest.fromPartial(base ?? {});
|
|
676
|
+
},
|
|
677
|
+
fromPartial(object) {
|
|
678
|
+
const message = createBaseExportRequest();
|
|
679
|
+
message.sinceMs = (object.sinceMs !== undefined && object.sinceMs !== null) ? BigInt(object.sinceMs) : 0n;
|
|
680
|
+
message.untilMs = (object.untilMs !== undefined && object.untilMs !== null) ? BigInt(object.untilMs) : 0n;
|
|
681
|
+
message.components = object.components?.map((e) => e) || [];
|
|
682
|
+
message.excludeCategories = object.excludeCategories?.map((e) => e) || [];
|
|
683
|
+
return message;
|
|
684
|
+
},
|
|
685
|
+
};
|
|
686
|
+
function createBaseExportChunk() {
|
|
687
|
+
return { data: new Uint8Array(0) };
|
|
688
|
+
}
|
|
689
|
+
exports.ExportChunk = {
|
|
690
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
691
|
+
if (message.data.length !== 0) {
|
|
692
|
+
writer.uint32(10).bytes(message.data);
|
|
693
|
+
}
|
|
694
|
+
return writer;
|
|
695
|
+
},
|
|
696
|
+
decode(input, length) {
|
|
697
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
698
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
699
|
+
if (previousRecursionDepth >= 100) {
|
|
700
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
701
|
+
}
|
|
702
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
703
|
+
try {
|
|
704
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
705
|
+
const message = createBaseExportChunk();
|
|
706
|
+
while (reader.pos < end) {
|
|
707
|
+
const tag = reader.uint32();
|
|
708
|
+
switch (tag >>> 3) {
|
|
709
|
+
case 1: {
|
|
710
|
+
if (tag !== 10) {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
message.data = reader.bytes();
|
|
714
|
+
continue;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
reader.skip(tag & 7);
|
|
721
|
+
}
|
|
722
|
+
return message;
|
|
723
|
+
}
|
|
724
|
+
finally {
|
|
725
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
create(base) {
|
|
729
|
+
return exports.ExportChunk.fromPartial(base ?? {});
|
|
730
|
+
},
|
|
731
|
+
fromPartial(object) {
|
|
732
|
+
const message = createBaseExportChunk();
|
|
733
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
734
|
+
return message;
|
|
735
|
+
},
|
|
736
|
+
};
|
|
737
|
+
exports.LogServiceService = {
|
|
738
|
+
/**
|
|
739
|
+
* Component → collector. First message is a ShipHello, then any number of
|
|
740
|
+
* entries/gaps. The stream stays open for as long as the component runs.
|
|
741
|
+
*/
|
|
742
|
+
ship: {
|
|
743
|
+
path: "/hannah.LogService/Ship",
|
|
744
|
+
requestStream: true,
|
|
745
|
+
responseStream: false,
|
|
746
|
+
requestSerialize: (value) => Buffer.from(exports.ShipMessage.encode(value).finish()),
|
|
747
|
+
requestDeserialize: (value) => exports.ShipMessage.decode(value),
|
|
748
|
+
responseSerialize: (value) => Buffer.from(exports.ShipAck.encode(value).finish()),
|
|
749
|
+
responseDeserialize: (value) => exports.ShipAck.decode(value),
|
|
750
|
+
},
|
|
751
|
+
/** Which sources the collector currently holds logs for, and how far back. */
|
|
752
|
+
getSources: {
|
|
753
|
+
path: "/hannah.LogService/GetSources",
|
|
754
|
+
requestStream: false,
|
|
755
|
+
responseStream: false,
|
|
756
|
+
requestSerialize: (value) => Buffer.from(shared_1.Empty.encode(value).finish()),
|
|
757
|
+
requestDeserialize: (value) => shared_1.Empty.decode(value),
|
|
758
|
+
responseSerialize: (value) => Buffer.from(exports.GetSourcesResponse.encode(value).finish()),
|
|
759
|
+
responseDeserialize: (value) => exports.GetSourcesResponse.decode(value),
|
|
760
|
+
},
|
|
761
|
+
/**
|
|
762
|
+
* Archive of the requested logs (tar.gz: one file per source plus a manifest),
|
|
763
|
+
* split into chunks — the client concatenates ExportChunk.data in order.
|
|
764
|
+
*/
|
|
765
|
+
export: {
|
|
766
|
+
path: "/hannah.LogService/Export",
|
|
767
|
+
requestStream: false,
|
|
768
|
+
responseStream: true,
|
|
769
|
+
requestSerialize: (value) => Buffer.from(exports.ExportRequest.encode(value).finish()),
|
|
770
|
+
requestDeserialize: (value) => exports.ExportRequest.decode(value),
|
|
771
|
+
responseSerialize: (value) => Buffer.from(exports.ExportChunk.encode(value).finish()),
|
|
772
|
+
responseDeserialize: (value) => exports.ExportChunk.decode(value),
|
|
773
|
+
},
|
|
774
|
+
};
|
|
775
|
+
exports.LogServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.LogServiceService, "hannah.LogService");
|
package/package.json
CHANGED