@rise-maritime/keelson-js 0.6.0-alpha.281.dev.1 → 0.6.0-alpha.282.dev.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.
package/dist/index.d.ts CHANGED
@@ -131,6 +131,43 @@ export declare function getInterfaceDefinition(interfaceAndVersion: string): {
131
131
  readonly options: {};
132
132
  };
133
133
  };
134
+ } | {
135
+ readonly name: "NavigationControl";
136
+ readonly fullName: "keelson.interfaces.navigation_control.NavigationControl";
137
+ readonly methods: {
138
+ readonly load_route: {
139
+ readonly name: "load_route";
140
+ readonly requestType: import("./interfaces/NavigationControl").MessageFns<import("./interfaces/NavigationControl").LoadRouteRequest>;
141
+ readonly requestStream: false;
142
+ readonly responseType: import("./interfaces/NavigationControl").MessageFns<import("./interfaces/NavigationControl").LoadRouteResponse>;
143
+ readonly responseStream: false;
144
+ readonly options: {};
145
+ };
146
+ readonly set_guidance_order: {
147
+ readonly name: "set_guidance_order";
148
+ readonly requestType: import("./interfaces/NavigationControl").MessageFns<import("./interfaces/NavigationControl").SetGuidanceOrderRequest>;
149
+ readonly requestStream: false;
150
+ readonly responseType: import("./interfaces/NavigationControl").MessageFns<import("./interfaces/NavigationControl").SetGuidanceOrderResponse>;
151
+ readonly responseStream: false;
152
+ readonly options: {};
153
+ };
154
+ readonly set_voyage_status: {
155
+ readonly name: "set_voyage_status";
156
+ readonly requestType: import("./interfaces/NavigationControl").MessageFns<import("./interfaces/NavigationControl").SetVoyageStatusRequest>;
157
+ readonly requestStream: false;
158
+ readonly responseType: import("./interfaces/NavigationControl").MessageFns<import("./interfaces/NavigationControl").SetVoyageStatusResponse>;
159
+ readonly responseStream: false;
160
+ readonly options: {};
161
+ };
162
+ readonly get_navigation_state: {
163
+ readonly name: "get_navigation_state";
164
+ readonly requestType: import("./interfaces/NavigationControl").MessageFns<import("./interfaces/NavigationControl").GetNavigationStateRequest>;
165
+ readonly requestStream: false;
166
+ readonly responseType: import("./interfaces/NavigationState").MessageFns<import("./interfaces/NavigationState").NavigationState>;
167
+ readonly responseStream: false;
168
+ readonly options: {};
169
+ };
170
+ };
134
171
  } | {
135
172
  readonly name: "NetworkPingPong";
136
173
  readonly fullName: "keelson.interfaces.network_ping_pong.NetworkPingPong";
@@ -156,14 +193,6 @@ export declare function getInterfaceDefinition(interfaceAndVersion: string): {
156
193
  readonly responseStream: false;
157
194
  readonly options: {};
158
195
  };
159
- readonly describe_file: {
160
- readonly name: "describe_file";
161
- readonly requestType: import("./interfaces/ReplayControl").MessageFns<import("./interfaces/ReplayControl").DescribeFileRequest>;
162
- readonly requestStream: false;
163
- readonly responseType: import("./interfaces/ReplayControl").MessageFns<import("./interfaces/ReplayControl").DescribeFileResponse>;
164
- readonly responseStream: false;
165
- readonly options: {};
166
- };
167
196
  readonly load_file: {
168
197
  readonly name: "load_file";
169
198
  readonly requestType: import("./interfaces/ReplayControl").MessageFns<import("./interfaces/ReplayControl").LoadFileRequest>;
@@ -0,0 +1,169 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { GuidanceOrder, NavigationState } from "./NavigationState";
3
+ import { RouteRef } from "./Route";
4
+ import { CommandResult } from "./VehicleCommon";
5
+ import { VoyageStatus } from "./Voyage";
6
+ export declare const protobufPackage = "keelson.interfaces.navigation_control";
7
+ /** Who is calling, and on what authority. Carried by every mutating request. */
8
+ export interface Caller {
9
+ /**
10
+ * Identity of the operator and site, or the service, e.g. "ted@ROC-1", "slipway". Recorded in
11
+ * the responder's decision log, so it should mean something to somebody reading that later.
12
+ */
13
+ controllerId: string;
14
+ /**
15
+ * The token of the command_authority lease the caller holds. Absent when it holds none, which
16
+ * is valid only while the responder holds the conn itself (see WHO MAY CALL).
17
+ */
18
+ authorityToken?: string | undefined;
19
+ }
20
+ /** Make a route edition the active voyage of this vessel. */
21
+ export interface LoadRouteRequest {
22
+ /** Client wall-clock at send, for latency logging only. */
23
+ timestamp: Date | undefined;
24
+ caller: Caller | undefined;
25
+ /**
26
+ * The entity whose route tree holds the edition. RouteRef names no entity, so it always
27
+ * resolves inside the vessel's own tree; a route drawn for another vessel is copied first.
28
+ * When it differs from this vessel, the responder reads
29
+ * `{base}/@v0/{source_entity_id}/pubsub/route/{route_id}/edition/{N}` and republishes it
30
+ * unchanged under its own vessel, with the same route_id and edition, before activating it.
31
+ * Editions are immutable, so the copy is the same route, not a new one.
32
+ */
33
+ sourceEntityId: string;
34
+ /**
35
+ * The edition to sail. Never `latest`: an edition that cannot be resolved is refused, never
36
+ * silently replaced.
37
+ */
38
+ routeRef: RouteRef | undefined;
39
+ /**
40
+ * The voyage to activate. Absent: the responder mints one. Present and already a voyage of
41
+ * this vessel: that voyage is re-pinned to `route_ref` (a reroute).
42
+ */
43
+ voyageId?: string | undefined;
44
+ /** The guidance order to take up once the voyage is active. Absent: TRACK. */
45
+ initialOrder?: GuidanceOrder | undefined;
46
+ }
47
+ export interface LoadRouteResponse {
48
+ result: CommandResult;
49
+ /**
50
+ * Why not, when result is not ACCEPTED: an unresolvable edition, no conn, another voyage the
51
+ * responder will not displace. Empty otherwise.
52
+ */
53
+ detail: string;
54
+ /** The voyage now ACTIVE, when result is ACCEPTED. */
55
+ voyageId?: string | undefined;
56
+ /** The navigation state the order produced. */
57
+ state?: NavigationState | undefined;
58
+ }
59
+ /** Change how the vessel is steered while a voyage is active. */
60
+ export interface SetGuidanceOrderRequest {
61
+ timestamp: Date | undefined;
62
+ caller: Caller | undefined;
63
+ order: GuidanceOrder | undefined;
64
+ }
65
+ export interface SetGuidanceOrderResponse {
66
+ /**
67
+ * UNSUPPORTED when the responder, or the vehicle behind it, cannot hold the requested frame —
68
+ * it never substitutes course for heading or the reverse.
69
+ */
70
+ result: CommandResult;
71
+ detail: string;
72
+ state?: NavigationState | undefined;
73
+ }
74
+ /** Pause, resume, complete or abort the active voyage. */
75
+ export interface SetVoyageStatusRequest {
76
+ timestamp: Date | undefined;
77
+ caller: Caller | undefined;
78
+ voyageId: string;
79
+ /**
80
+ * PAUSED, ACTIVE (resume), COMPLETED or ABORTED. PLANNED is refused: a voyage is planned by
81
+ * publishing it, not by asking the process sailing it.
82
+ */
83
+ status: VoyageStatus;
84
+ /** Why, for the voyage's audit trail. Free text. */
85
+ reason: string;
86
+ }
87
+ export interface SetVoyageStatusResponse {
88
+ result: CommandResult;
89
+ detail: string;
90
+ state?: NavigationState | undefined;
91
+ }
92
+ export interface GetNavigationStateRequest {
93
+ }
94
+ export declare const Caller: MessageFns<Caller>;
95
+ export declare const LoadRouteRequest: MessageFns<LoadRouteRequest>;
96
+ export declare const LoadRouteResponse: MessageFns<LoadRouteResponse>;
97
+ export declare const SetGuidanceOrderRequest: MessageFns<SetGuidanceOrderRequest>;
98
+ export declare const SetGuidanceOrderResponse: MessageFns<SetGuidanceOrderResponse>;
99
+ export declare const SetVoyageStatusRequest: MessageFns<SetVoyageStatusRequest>;
100
+ export declare const SetVoyageStatusResponse: MessageFns<SetVoyageStatusResponse>;
101
+ export declare const GetNavigationStateRequest: MessageFns<GetNavigationStateRequest>;
102
+ export type NavigationControlDefinition = typeof NavigationControlDefinition;
103
+ export declare const NavigationControlDefinition: {
104
+ readonly name: "NavigationControl";
105
+ readonly fullName: "keelson.interfaces.navigation_control.NavigationControl";
106
+ readonly methods: {
107
+ /**
108
+ * Make a route edition this vessel's active voyage, copying it from another vessel's tree when
109
+ * needed, and take up a guidance order.
110
+ */
111
+ readonly load_route: {
112
+ readonly name: "load_route";
113
+ readonly requestType: MessageFns<LoadRouteRequest>;
114
+ readonly requestStream: false;
115
+ readonly responseType: MessageFns<LoadRouteResponse>;
116
+ readonly responseStream: false;
117
+ readonly options: {};
118
+ };
119
+ /** Steer by the track, a course, a heading, or hold; optionally with a speed. */
120
+ readonly set_guidance_order: {
121
+ readonly name: "set_guidance_order";
122
+ readonly requestType: MessageFns<SetGuidanceOrderRequest>;
123
+ readonly requestStream: false;
124
+ readonly responseType: MessageFns<SetGuidanceOrderResponse>;
125
+ readonly responseStream: false;
126
+ readonly options: {};
127
+ };
128
+ /** Pause, resume, complete or abort the active voyage. */
129
+ readonly set_voyage_status: {
130
+ readonly name: "set_voyage_status";
131
+ readonly requestType: MessageFns<SetVoyageStatusRequest>;
132
+ readonly requestStream: false;
133
+ readonly responseType: MessageFns<SetVoyageStatusResponse>;
134
+ readonly responseStream: false;
135
+ readonly options: {};
136
+ };
137
+ /**
138
+ * The current NavigationState — the same payload as the `navigation_state` broadcast, for a
139
+ * caller that cannot wait for the next one. Needs no authority.
140
+ */
141
+ readonly get_navigation_state: {
142
+ readonly name: "get_navigation_state";
143
+ readonly requestType: MessageFns<GetNavigationStateRequest>;
144
+ readonly requestStream: false;
145
+ readonly responseType: import("./NavigationState").MessageFns<NavigationState>;
146
+ readonly responseStream: false;
147
+ readonly options: {};
148
+ };
149
+ };
150
+ };
151
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
152
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
153
+ [K in keyof T]?: DeepPartial<T[K]>;
154
+ } : Partial<T>;
155
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
156
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
157
+ [K in keyof P]: Exact<P[K], I[K]>;
158
+ } & {
159
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
160
+ };
161
+ export interface MessageFns<T> {
162
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
163
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
164
+ fromJSON(object: any): T;
165
+ toJSON(message: T): unknown;
166
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
167
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
168
+ }
169
+ export {};