@rise-maritime/keelson-js 0.6.0-alpha.282.dev.2 → 0.6.0-experimental.2

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.
@@ -5,7 +5,7 @@
5
5
  // protoc v6.30.2
6
6
  // source: ReplayControl.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
8
+ exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.DescribeFileResponse = exports.ChannelInfo = exports.DescribeFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const empty_1 = require("./google/protobuf/empty");
@@ -283,6 +283,270 @@ exports.ListFilesResponse = {
283
283
  return message;
284
284
  },
285
285
  };
286
+ function createBaseDescribeFileRequest() {
287
+ return { path: "" };
288
+ }
289
+ exports.DescribeFileRequest = {
290
+ encode(message, writer = new wire_1.BinaryWriter()) {
291
+ if (message.path !== "") {
292
+ writer.uint32(10).string(message.path);
293
+ }
294
+ return writer;
295
+ },
296
+ decode(input, length) {
297
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
298
+ let end = length === undefined ? reader.len : reader.pos + length;
299
+ const message = createBaseDescribeFileRequest();
300
+ while (reader.pos < end) {
301
+ const tag = reader.uint32();
302
+ switch (tag >>> 3) {
303
+ case 1: {
304
+ if (tag !== 10) {
305
+ break;
306
+ }
307
+ message.path = reader.string();
308
+ continue;
309
+ }
310
+ }
311
+ if ((tag & 7) === 4 || tag === 0) {
312
+ break;
313
+ }
314
+ reader.skip(tag & 7);
315
+ }
316
+ return message;
317
+ },
318
+ fromJSON(object) {
319
+ return { path: isSet(object.path) ? globalThis.String(object.path) : "" };
320
+ },
321
+ toJSON(message) {
322
+ const obj = {};
323
+ if (message.path !== "") {
324
+ obj.path = message.path;
325
+ }
326
+ return obj;
327
+ },
328
+ create(base) {
329
+ return exports.DescribeFileRequest.fromPartial(base ?? {});
330
+ },
331
+ fromPartial(object) {
332
+ const message = createBaseDescribeFileRequest();
333
+ message.path = object.path ?? "";
334
+ return message;
335
+ },
336
+ };
337
+ function createBaseChannelInfo() {
338
+ return { topic: "", schemaName: "", messageEncoding: "", messageCount: 0, firstTime: undefined, lastTime: undefined };
339
+ }
340
+ exports.ChannelInfo = {
341
+ encode(message, writer = new wire_1.BinaryWriter()) {
342
+ if (message.topic !== "") {
343
+ writer.uint32(10).string(message.topic);
344
+ }
345
+ if (message.schemaName !== "") {
346
+ writer.uint32(18).string(message.schemaName);
347
+ }
348
+ if (message.messageEncoding !== "") {
349
+ writer.uint32(26).string(message.messageEncoding);
350
+ }
351
+ if (message.messageCount !== 0) {
352
+ writer.uint32(32).uint64(message.messageCount);
353
+ }
354
+ if (message.firstTime !== undefined) {
355
+ timestamp_1.Timestamp.encode(toTimestamp(message.firstTime), writer.uint32(42).fork()).join();
356
+ }
357
+ if (message.lastTime !== undefined) {
358
+ timestamp_1.Timestamp.encode(toTimestamp(message.lastTime), writer.uint32(50).fork()).join();
359
+ }
360
+ return writer;
361
+ },
362
+ decode(input, length) {
363
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
364
+ let end = length === undefined ? reader.len : reader.pos + length;
365
+ const message = createBaseChannelInfo();
366
+ while (reader.pos < end) {
367
+ const tag = reader.uint32();
368
+ switch (tag >>> 3) {
369
+ case 1: {
370
+ if (tag !== 10) {
371
+ break;
372
+ }
373
+ message.topic = reader.string();
374
+ continue;
375
+ }
376
+ case 2: {
377
+ if (tag !== 18) {
378
+ break;
379
+ }
380
+ message.schemaName = reader.string();
381
+ continue;
382
+ }
383
+ case 3: {
384
+ if (tag !== 26) {
385
+ break;
386
+ }
387
+ message.messageEncoding = reader.string();
388
+ continue;
389
+ }
390
+ case 4: {
391
+ if (tag !== 32) {
392
+ break;
393
+ }
394
+ message.messageCount = longToNumber(reader.uint64());
395
+ continue;
396
+ }
397
+ case 5: {
398
+ if (tag !== 42) {
399
+ break;
400
+ }
401
+ message.firstTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
402
+ continue;
403
+ }
404
+ case 6: {
405
+ if (tag !== 50) {
406
+ break;
407
+ }
408
+ message.lastTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
409
+ continue;
410
+ }
411
+ }
412
+ if ((tag & 7) === 4 || tag === 0) {
413
+ break;
414
+ }
415
+ reader.skip(tag & 7);
416
+ }
417
+ return message;
418
+ },
419
+ fromJSON(object) {
420
+ return {
421
+ topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
422
+ schemaName: isSet(object.schemaName) ? globalThis.String(object.schemaName) : "",
423
+ messageEncoding: isSet(object.messageEncoding) ? globalThis.String(object.messageEncoding) : "",
424
+ messageCount: isSet(object.messageCount) ? globalThis.Number(object.messageCount) : 0,
425
+ firstTime: isSet(object.firstTime) ? fromJsonTimestamp(object.firstTime) : undefined,
426
+ lastTime: isSet(object.lastTime) ? fromJsonTimestamp(object.lastTime) : undefined,
427
+ };
428
+ },
429
+ toJSON(message) {
430
+ const obj = {};
431
+ if (message.topic !== "") {
432
+ obj.topic = message.topic;
433
+ }
434
+ if (message.schemaName !== "") {
435
+ obj.schemaName = message.schemaName;
436
+ }
437
+ if (message.messageEncoding !== "") {
438
+ obj.messageEncoding = message.messageEncoding;
439
+ }
440
+ if (message.messageCount !== 0) {
441
+ obj.messageCount = Math.round(message.messageCount);
442
+ }
443
+ if (message.firstTime !== undefined) {
444
+ obj.firstTime = message.firstTime.toISOString();
445
+ }
446
+ if (message.lastTime !== undefined) {
447
+ obj.lastTime = message.lastTime.toISOString();
448
+ }
449
+ return obj;
450
+ },
451
+ create(base) {
452
+ return exports.ChannelInfo.fromPartial(base ?? {});
453
+ },
454
+ fromPartial(object) {
455
+ const message = createBaseChannelInfo();
456
+ message.topic = object.topic ?? "";
457
+ message.schemaName = object.schemaName ?? "";
458
+ message.messageEncoding = object.messageEncoding ?? "";
459
+ message.messageCount = object.messageCount ?? 0;
460
+ message.firstTime = object.firstTime ?? undefined;
461
+ message.lastTime = object.lastTime ?? undefined;
462
+ return message;
463
+ },
464
+ };
465
+ function createBaseDescribeFileResponse() {
466
+ return { file: undefined, channels: [], fromScan: false };
467
+ }
468
+ exports.DescribeFileResponse = {
469
+ encode(message, writer = new wire_1.BinaryWriter()) {
470
+ if (message.file !== undefined) {
471
+ exports.FileInfo.encode(message.file, writer.uint32(10).fork()).join();
472
+ }
473
+ for (const v of message.channels) {
474
+ exports.ChannelInfo.encode(v, writer.uint32(18).fork()).join();
475
+ }
476
+ if (message.fromScan !== false) {
477
+ writer.uint32(24).bool(message.fromScan);
478
+ }
479
+ return writer;
480
+ },
481
+ decode(input, length) {
482
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
483
+ let end = length === undefined ? reader.len : reader.pos + length;
484
+ const message = createBaseDescribeFileResponse();
485
+ while (reader.pos < end) {
486
+ const tag = reader.uint32();
487
+ switch (tag >>> 3) {
488
+ case 1: {
489
+ if (tag !== 10) {
490
+ break;
491
+ }
492
+ message.file = exports.FileInfo.decode(reader, reader.uint32());
493
+ continue;
494
+ }
495
+ case 2: {
496
+ if (tag !== 18) {
497
+ break;
498
+ }
499
+ message.channels.push(exports.ChannelInfo.decode(reader, reader.uint32()));
500
+ continue;
501
+ }
502
+ case 3: {
503
+ if (tag !== 24) {
504
+ break;
505
+ }
506
+ message.fromScan = reader.bool();
507
+ continue;
508
+ }
509
+ }
510
+ if ((tag & 7) === 4 || tag === 0) {
511
+ break;
512
+ }
513
+ reader.skip(tag & 7);
514
+ }
515
+ return message;
516
+ },
517
+ fromJSON(object) {
518
+ return {
519
+ file: isSet(object.file) ? exports.FileInfo.fromJSON(object.file) : undefined,
520
+ channels: globalThis.Array.isArray(object?.channels)
521
+ ? object.channels.map((e) => exports.ChannelInfo.fromJSON(e))
522
+ : [],
523
+ fromScan: isSet(object.fromScan) ? globalThis.Boolean(object.fromScan) : false,
524
+ };
525
+ },
526
+ toJSON(message) {
527
+ const obj = {};
528
+ if (message.file !== undefined) {
529
+ obj.file = exports.FileInfo.toJSON(message.file);
530
+ }
531
+ if (message.channels?.length) {
532
+ obj.channels = message.channels.map((e) => exports.ChannelInfo.toJSON(e));
533
+ }
534
+ if (message.fromScan !== false) {
535
+ obj.fromScan = message.fromScan;
536
+ }
537
+ return obj;
538
+ },
539
+ create(base) {
540
+ return exports.DescribeFileResponse.fromPartial(base ?? {});
541
+ },
542
+ fromPartial(object) {
543
+ const message = createBaseDescribeFileResponse();
544
+ message.file = (object.file !== undefined && object.file !== null) ? exports.FileInfo.fromPartial(object.file) : undefined;
545
+ message.channels = object.channels?.map((e) => exports.ChannelInfo.fromPartial(e)) || [];
546
+ message.fromScan = object.fromScan ?? false;
547
+ return message;
548
+ },
549
+ };
286
550
  function createBaseLoadFileRequest() {
287
551
  return { path: "" };
288
552
  }
@@ -536,6 +800,15 @@ exports.ReplayControlDefinition = {
536
800
  responseStream: false,
537
801
  options: {},
538
802
  },
803
+ /** Per-channel message counts and first/last message times for one file. */
804
+ describe_file: {
805
+ name: "describe_file",
806
+ requestType: exports.DescribeFileRequest,
807
+ requestStream: false,
808
+ responseType: exports.DescribeFileResponse,
809
+ responseStream: false,
810
+ options: {},
811
+ },
539
812
  load_file: {
540
813
  name: "load_file",
541
814
  requestType: exports.LoadFileRequest,
@@ -111,44 +111,6 @@ export declare const serviceDefinitions: {
111
111
  };
112
112
  };
113
113
  };
114
- readonly "navigation_control/v1": {
115
- readonly name: "NavigationControl";
116
- readonly fullName: "keelson.interfaces.navigation_control.NavigationControl";
117
- readonly methods: {
118
- readonly load_route: {
119
- readonly name: "load_route";
120
- readonly requestType: import("./NavigationControl").MessageFns<import("./NavigationControl").LoadRouteRequest>;
121
- readonly requestStream: false;
122
- readonly responseType: import("./NavigationControl").MessageFns<import("./NavigationControl").LoadRouteResponse>;
123
- readonly responseStream: false;
124
- readonly options: {};
125
- };
126
- readonly set_guidance_order: {
127
- readonly name: "set_guidance_order";
128
- readonly requestType: import("./NavigationControl").MessageFns<import("./NavigationControl").SetGuidanceOrderRequest>;
129
- readonly requestStream: false;
130
- readonly responseType: import("./NavigationControl").MessageFns<import("./NavigationControl").SetGuidanceOrderResponse>;
131
- readonly responseStream: false;
132
- readonly options: {};
133
- };
134
- readonly set_voyage_status: {
135
- readonly name: "set_voyage_status";
136
- readonly requestType: import("./NavigationControl").MessageFns<import("./NavigationControl").SetVoyageStatusRequest>;
137
- readonly requestStream: false;
138
- readonly responseType: import("./NavigationControl").MessageFns<import("./NavigationControl").SetVoyageStatusResponse>;
139
- readonly responseStream: false;
140
- readonly options: {};
141
- };
142
- readonly get_navigation_state: {
143
- readonly name: "get_navigation_state";
144
- readonly requestType: import("./NavigationControl").MessageFns<import("./NavigationControl").GetNavigationStateRequest>;
145
- readonly requestStream: false;
146
- readonly responseType: import("./NavigationState").MessageFns<import("./NavigationState").NavigationState>;
147
- readonly responseStream: false;
148
- readonly options: {};
149
- };
150
- };
151
- };
152
114
  readonly "network_ping_pong/v1": {
153
115
  readonly name: "NetworkPingPong";
154
116
  readonly fullName: "keelson.interfaces.network_ping_pong.NetworkPingPong";
@@ -175,6 +137,14 @@ export declare const serviceDefinitions: {
175
137
  readonly responseStream: false;
176
138
  readonly options: {};
177
139
  };
140
+ readonly describe_file: {
141
+ readonly name: "describe_file";
142
+ readonly requestType: import("./ReplayControl").MessageFns<import("./ReplayControl").DescribeFileRequest>;
143
+ readonly requestStream: false;
144
+ readonly responseType: import("./ReplayControl").MessageFns<import("./ReplayControl").DescribeFileResponse>;
145
+ readonly responseStream: false;
146
+ readonly options: {};
147
+ };
178
148
  readonly load_file: {
179
149
  readonly name: "load_file";
180
150
  readonly requestType: import("./ReplayControl").MessageFns<import("./ReplayControl").LoadFileRequest>;
@@ -6,7 +6,6 @@ const AlarmAck_1 = require("./AlarmAck");
6
6
  const Configurable_1 = require("./Configurable");
7
7
  const ContainerControl_1 = require("./ContainerControl");
8
8
  const MavlinkCommand_1 = require("./MavlinkCommand");
9
- const NavigationControl_1 = require("./NavigationControl");
10
9
  const NetworkPingPong_1 = require("./NetworkPingPong");
11
10
  const ReplayControl_1 = require("./ReplayControl");
12
11
  const RoutePlanner_1 = require("./RoutePlanner");
@@ -27,7 +26,6 @@ exports.serviceDefinitions = {
27
26
  "configurable/v1": Configurable_1.ConfigurableDefinition,
28
27
  "container_control/v1": ContainerControl_1.ContainerControlDefinition,
29
28
  "mavlink_command/v1": MavlinkCommand_1.MavlinkCommandDefinition,
30
- "navigation_control/v1": NavigationControl_1.NavigationControlDefinition,
31
29
  "network_ping_pong/v1": NetworkPingPong_1.NetworkPingPongDefinition,
32
30
  "replay_control/v1": ReplayControl_1.ReplayControlDefinition,
33
31
  "route_planner/v1": RoutePlanner_1.RoutePlannerDefinition,
@@ -3,7 +3,6 @@
3
3
  "configurable/v1": "keelson.interfaces.configurable.Configurable",
4
4
  "container_control/v1": "keelson.interfaces.container_control.ContainerControl",
5
5
  "mavlink_command/v1": "keelson.interfaces.mavlink_command.MavlinkCommand",
6
- "navigation_control/v1": "keelson.interfaces.navigation_control.NavigationControl",
7
6
  "network_ping_pong/v1": "keelson.interfaces.network_ping_pong.NetworkPingPong",
8
7
  "replay_control/v1": "keelson.interfaces.replay_control.ReplayControl",
9
8
  "route_planner/v1": "keelson.interfaces.route_planner.RoutePlanner",
@@ -1,10 +1,14 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  /**
3
- * What happened to one NavigationAdvice, and who decided.
3
+ * The decision on one NavigationAdvice, and who made it.
4
4
  *
5
- * ACCEPTED and REJECTED come from whoever holds the decision for the function (an operator at a
6
- * station, or a conduct service under a grant). SUPERSEDED and EXPIRED come from the advisor
7
- * itself. Only ACCEPTED licenses acting, and only within the advice's validity window.
5
+ * Written ONLY by whoever holds the decision for the function (an operator at a station, or a
6
+ * conduct service under a grant): ACCEPTED or REJECTED. Only ACCEPTED licenses acting, and only
7
+ * within the advice's validity window.
8
+ *
9
+ * The advisor does not write this slot. It retires its own advice on NavigationAdvice
10
+ * (retired_at, retirement), because a slot with two writer roles keeps whichever wrote last, and
11
+ * the advisor's EXPIRED replaced the operator's ACCEPTED in storage (keelson#283).
8
12
  */
9
13
  export interface AdviceDisposition {
10
14
  $type: "keelson.AdviceDisposition";
@@ -17,7 +21,11 @@ export interface AdviceDisposition {
17
21
  * changed_by and acknowledged_by elsewhere.
18
22
  */
19
23
  decidedBy: string;
20
- /** For SUPERSEDED: the advice that replaced it. */
24
+ /**
25
+ * Deprecated with STATE_SUPERSEDED (keelson#283): NavigationAdvice.superseded_by.
26
+ *
27
+ * @deprecated
28
+ */
21
29
  supersededBy?: string | undefined;
22
30
  /** Free text. Consumers MUST NOT parse it. */
23
31
  reason: string;
@@ -26,7 +34,14 @@ export declare enum AdviceDisposition_State {
26
34
  STATE_UNSPECIFIED = 0,
27
35
  STATE_ACCEPTED = 1,
28
36
  STATE_REJECTED = 2,
37
+ /**
38
+ * STATE_SUPERSEDED - Deprecated (keelson#283): retirement is NavigationAdvice.retirement. Kept so records stored
39
+ * by 0.6.0-pre.18 producers still decode; never published, and a consumer ignores them.
40
+ *
41
+ * @deprecated
42
+ */
29
43
  STATE_SUPERSEDED = 3,
44
+ /** @deprecated */
30
45
  STATE_EXPIRED = 4,
31
46
  UNRECOGNIZED = -1
32
47
  }
@@ -15,7 +15,14 @@ var AdviceDisposition_State;
15
15
  AdviceDisposition_State[AdviceDisposition_State["STATE_UNSPECIFIED"] = 0] = "STATE_UNSPECIFIED";
16
16
  AdviceDisposition_State[AdviceDisposition_State["STATE_ACCEPTED"] = 1] = "STATE_ACCEPTED";
17
17
  AdviceDisposition_State[AdviceDisposition_State["STATE_REJECTED"] = 2] = "STATE_REJECTED";
18
+ /**
19
+ * STATE_SUPERSEDED - Deprecated (keelson#283): retirement is NavigationAdvice.retirement. Kept so records stored
20
+ * by 0.6.0-pre.18 producers still decode; never published, and a consumer ignores them.
21
+ *
22
+ * @deprecated
23
+ */
18
24
  AdviceDisposition_State[AdviceDisposition_State["STATE_SUPERSEDED"] = 3] = "STATE_SUPERSEDED";
25
+ /** @deprecated */
19
26
  AdviceDisposition_State[AdviceDisposition_State["STATE_EXPIRED"] = 4] = "STATE_EXPIRED";
20
27
  AdviceDisposition_State[AdviceDisposition_State["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
21
28
  })(AdviceDisposition_State || (exports.AdviceDisposition_State = AdviceDisposition_State = {}));
@@ -62,6 +62,48 @@ export declare enum ContainerStatusTrigger {
62
62
  }
63
63
  export declare function containerStatusTriggerFromJSON(object: any): ContainerStatusTrigger;
64
64
  export declare function containerStatusTriggerToJSON(object: ContainerStatusTrigger): string;
65
+ /**
66
+ * A published port. Both halves are present because they answer different
67
+ * questions: container_port is what the process inside bound, host_port is what
68
+ * anything outside can reach.
69
+ */
70
+ export interface ContainerPortBinding {
71
+ $type: "keelson.ContainerPortBinding";
72
+ containerPort: number;
73
+ /** "tcp" or "udp" as the runtime spells it. */
74
+ protocol: string;
75
+ /**
76
+ * The host interface the binding is on, as the runtime reports it (Docker
77
+ * says "0.0.0.0" or "::" for every interface).
78
+ */
79
+ hostIp: string;
80
+ /** 0 for a port exposed but not published. */
81
+ hostPort: number;
82
+ }
83
+ /**
84
+ * One network the container is attached to.
85
+ *
86
+ * A container on the HOST network is attached to no named network at all, which
87
+ * is why an empty list is a meaningful answer rather than a missing one -- the
88
+ * same fact ContainerResourceUsage expresses by omitting its network counters.
89
+ */
90
+ export interface ContainerNetworkAttachment {
91
+ $type: "keelson.ContainerNetworkAttachment";
92
+ name: string;
93
+ /** Empty when the runtime assigned none (host networking, or not yet started). */
94
+ ipAddress: string;
95
+ aliases: string[];
96
+ }
97
+ /** One mount into the container's filesystem. */
98
+ export interface ContainerMount {
99
+ $type: "keelson.ContainerMount";
100
+ /** "bind", "volume" or "tmpfs" as the runtime spells it. */
101
+ type: string;
102
+ /** The host path, or the volume name for a named volume. */
103
+ source: string;
104
+ destination: string;
105
+ readOnly: boolean;
106
+ }
65
107
  export interface ContainerInfo {
66
108
  $type: "keelson.ContainerInfo";
67
109
  /**
@@ -122,6 +164,9 @@ export interface ContainerInfo {
122
164
  * not explicitly ask otherwise gets.
123
165
  */
124
166
  removable: boolean;
167
+ ports: ContainerPortBinding[];
168
+ networks: ContainerNetworkAttachment[];
169
+ mounts: ContainerMount[];
125
170
  }
126
171
  /**
127
172
  * What `list` answers, published continuously instead of on request.
@@ -381,6 +426,9 @@ export interface ContainerHostStats {
381
426
  */
382
427
  sequence: number;
383
428
  }
429
+ export declare const ContainerPortBinding: MessageFns<ContainerPortBinding, "keelson.ContainerPortBinding">;
430
+ export declare const ContainerNetworkAttachment: MessageFns<ContainerNetworkAttachment, "keelson.ContainerNetworkAttachment">;
431
+ export declare const ContainerMount: MessageFns<ContainerMount, "keelson.ContainerMount">;
384
432
  export declare const ContainerInfo: MessageFns<ContainerInfo, "keelson.ContainerInfo">;
385
433
  export declare const ContainerHostStatus: MessageFns<ContainerHostStatus, "keelson.ContainerHostStatus">;
386
434
  export declare const ContainerResourceUsage: MessageFns<ContainerResourceUsage, "keelson.ContainerResourceUsage">;