@rise-maritime/keelson-js 0.6.0-alpha.221.dev.1 → 0.6.0-alpha.232.dev.1

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
@@ -216,6 +216,14 @@ export declare function getInterfaceDefinition(interfaceAndVersion: string): {
216
216
  readonly name: "ScenarioControl";
217
217
  readonly fullName: "keelson.interfaces.scenario_control.ScenarioControl";
218
218
  readonly methods: {
219
+ readonly list: {
220
+ readonly name: "list";
221
+ readonly requestType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").ListRequest>;
222
+ readonly requestStream: false;
223
+ readonly responseType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").ListResponse>;
224
+ readonly responseStream: false;
225
+ readonly options: {};
226
+ };
219
227
  readonly load: {
220
228
  readonly name: "load";
221
229
  readonly requestType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").LoadRequest>;
@@ -272,6 +272,19 @@ export interface RouteInfo {
272
272
  maxWindSpeedMps?: number | undefined;
273
273
  minSpeedKnots?: number | undefined;
274
274
  maxSpeedKnots?: number | undefined;
275
+ /**
276
+ * Minimum visibility the route is valid above. `visibility_range_m` is
277
+ * published, so without this the measurement exists and the limit it should
278
+ * be checked against does not.
279
+ */
280
+ minVisibilityM?: number | undefined;
281
+ /**
282
+ * Gust limit, distinct from the mean-wind limit above. Gust is what governs
283
+ * small-craft operations: 12 m/s mean with 20 m/s gusts is a different
284
+ * proposition from a steady 12 m/s, and only the mean can be constrained
285
+ * today. Checked against the windowed `true_wind_speed_max_mps`.
286
+ */
287
+ maxWindGustMps?: number | undefined;
275
288
  /**
276
289
  * -- Optimization & autonomy ------------------------------------------------
277
290
  * Free-form optimization method label (e.g. "fuel-min", "eta-min", "weather-routed").
@@ -1311,6 +1311,8 @@ function createBaseRouteInfo() {
1311
1311
  maxWindSpeedMps: undefined,
1312
1312
  minSpeedKnots: undefined,
1313
1313
  maxSpeedKnots: undefined,
1314
+ minVisibilityM: undefined,
1315
+ maxWindGustMps: undefined,
1314
1316
  optimizationMethod: "",
1315
1317
  autonomyLevel: 0,
1316
1318
  extensions: undefined,
@@ -1360,6 +1362,12 @@ exports.RouteInfo = {
1360
1362
  if (message.maxSpeedKnots !== undefined) {
1361
1363
  writer.uint32(277).float(message.maxSpeedKnots);
1362
1364
  }
1365
+ if (message.minVisibilityM !== undefined) {
1366
+ writer.uint32(285).float(message.minVisibilityM);
1367
+ }
1368
+ if (message.maxWindGustMps !== undefined) {
1369
+ writer.uint32(293).float(message.maxWindGustMps);
1370
+ }
1363
1371
  if (message.optimizationMethod !== "") {
1364
1372
  writer.uint32(402).string(message.optimizationMethod);
1365
1373
  }
@@ -1476,6 +1484,20 @@ exports.RouteInfo = {
1476
1484
  message.maxSpeedKnots = reader.float();
1477
1485
  continue;
1478
1486
  }
1487
+ case 35: {
1488
+ if (tag !== 285) {
1489
+ break;
1490
+ }
1491
+ message.minVisibilityM = reader.float();
1492
+ continue;
1493
+ }
1494
+ case 36: {
1495
+ if (tag !== 293) {
1496
+ break;
1497
+ }
1498
+ message.maxWindGustMps = reader.float();
1499
+ continue;
1500
+ }
1479
1501
  case 50: {
1480
1502
  if (tag !== 402) {
1481
1503
  break;
@@ -1521,6 +1543,8 @@ exports.RouteInfo = {
1521
1543
  maxWindSpeedMps: isSet(object.maxWindSpeedMps) ? globalThis.Number(object.maxWindSpeedMps) : undefined,
1522
1544
  minSpeedKnots: isSet(object.minSpeedKnots) ? globalThis.Number(object.minSpeedKnots) : undefined,
1523
1545
  maxSpeedKnots: isSet(object.maxSpeedKnots) ? globalThis.Number(object.maxSpeedKnots) : undefined,
1546
+ minVisibilityM: isSet(object.minVisibilityM) ? globalThis.Number(object.minVisibilityM) : undefined,
1547
+ maxWindGustMps: isSet(object.maxWindGustMps) ? globalThis.Number(object.maxWindGustMps) : undefined,
1524
1548
  optimizationMethod: isSet(object.optimizationMethod) ? globalThis.String(object.optimizationMethod) : "",
1525
1549
  autonomyLevel: isSet(object.autonomyLevel) ? autonomyLevelFromJSON(object.autonomyLevel) : 0,
1526
1550
  extensions: isSet(object.extensions) ? exports.Extensions.fromJSON(object.extensions) : undefined,
@@ -1570,6 +1594,12 @@ exports.RouteInfo = {
1570
1594
  if (message.maxSpeedKnots !== undefined) {
1571
1595
  obj.maxSpeedKnots = message.maxSpeedKnots;
1572
1596
  }
1597
+ if (message.minVisibilityM !== undefined) {
1598
+ obj.minVisibilityM = message.minVisibilityM;
1599
+ }
1600
+ if (message.maxWindGustMps !== undefined) {
1601
+ obj.maxWindGustMps = message.maxWindGustMps;
1602
+ }
1573
1603
  if (message.optimizationMethod !== "") {
1574
1604
  obj.optimizationMethod = message.optimizationMethod;
1575
1605
  }
@@ -1600,6 +1630,8 @@ exports.RouteInfo = {
1600
1630
  message.maxWindSpeedMps = object.maxWindSpeedMps ?? undefined;
1601
1631
  message.minSpeedKnots = object.minSpeedKnots ?? undefined;
1602
1632
  message.maxSpeedKnots = object.maxSpeedKnots ?? undefined;
1633
+ message.minVisibilityM = object.minVisibilityM ?? undefined;
1634
+ message.maxWindGustMps = object.maxWindGustMps ?? undefined;
1603
1635
  message.optimizationMethod = object.optimizationMethod ?? "";
1604
1636
  message.autonomyLevel = object.autonomyLevel ?? 0;
1605
1637
  message.extensions = (object.extensions !== undefined && object.extensions !== null)
@@ -1,6 +1,74 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Empty } from "./google/protobuf/empty";
3
3
  export declare const protobufPackage = "keelson.interfaces.scenario_control";
4
+ /**
5
+ * One scenario the responder is willing to be asked about. Deliberately
6
+ * thin: the fields are the ones an operator needs to *choose* between two
7
+ * scenarios, not a description of what a scenario is. What a scenario is
8
+ * varies by simulator, and pinning that here would bind every
9
+ * implementation to one — the same reason LoadRequest.scenario is opaque.
10
+ */
11
+ export interface ScenarioInfo {
12
+ /**
13
+ * Exactly what `load` takes. A listing whose ids are not loadable ids is
14
+ * a listing a picker cannot act on.
15
+ */
16
+ scenarioId: string;
17
+ /** One line, from the document. Empty if it carries none. */
18
+ description: string;
19
+ /**
20
+ * Content hash of the scenario as the responder reads it — the same hash
21
+ * ScenarioStatus broadcasts, so a picker can tell which of these is the
22
+ * running one, and two responders offering the same id can be compared.
23
+ */
24
+ scenarioHash: string;
25
+ /**
26
+ * Enough to tell two scenarios apart at a glance. Zero means the
27
+ * responder does not know or the scenario does not say — for
28
+ * duration_ticks specifically, an open-ended scenario.
29
+ */
30
+ vesselCount: number;
31
+ durationTicks: number;
32
+ stepSizeMs: number;
33
+ /**
34
+ * False when the responder can see this scenario but would refuse to
35
+ * load it, with `reason` saying why in the words the failed load would
36
+ * have used.
37
+ *
38
+ * On the wire rather than filtered out, because both alternatives are
39
+ * worse. Omitting these rows hides files the operator can see in the
40
+ * library and leaves them asking why one is missing; listing them as
41
+ * loadable is a lie the picker only discovers by trying. A simulator
42
+ * whose scenario language is still growing has these constantly: the
43
+ * document parses, and names a construct this build cannot elaborate.
44
+ */
45
+ loadable: boolean;
46
+ reason: string;
47
+ }
48
+ export interface ListRequest {
49
+ /**
50
+ * Optional; the responder decides what it means (an id prefix, a glob).
51
+ * No filter lists everything the responder is willing to list. Same
52
+ * contract as ListCheckpointsRequest.pattern and ListFilesRequest.pattern.
53
+ */
54
+ pattern: string;
55
+ }
56
+ export interface ListResponse {
57
+ /**
58
+ * Where the responder is listing from, for the reason its two siblings
59
+ * carry it: an operator choosing between two scenarios with the same id
60
+ * needs to know whether they came from the same place.
61
+ */
62
+ baseDirectory: string;
63
+ /** Ordered by scenario_id, so a listing read twice reads the same way. */
64
+ scenarios: ScenarioInfo[];
65
+ /**
66
+ * True when the responder capped the listing. On the wire because a
67
+ * listing that quietly stopped short reads as "that is all of them", and
68
+ * an operator would go looking for a scenario that is in fact there.
69
+ */
70
+ truncated: boolean;
71
+ }
4
72
  export interface LoadRequest {
5
73
  /**
6
74
  * Identifier of the scenario to load, as the responder understands it —
@@ -29,8 +97,6 @@ export interface SetRateRequest {
29
97
  * individual command can grow a return field later without a breaking
30
98
  * type change and without that field bleeding onto the other commands.
31
99
  */
32
- export interface LoadResponse {
33
- }
34
100
  export interface StartResponse {
35
101
  }
36
102
  export interface PauseResponse {
@@ -41,6 +107,22 @@ export interface ResetResponse {
41
107
  }
42
108
  export interface SetRateResponse {
43
109
  }
110
+ export interface LoadResponse {
111
+ /**
112
+ * What was actually loaded, resolved. `scenario` in the request is
113
+ * whatever the caller typed; these are the responder's answer to it, and
114
+ * the run id is minted by the load itself.
115
+ *
116
+ * Returned rather than left to the status broadcast for the reason
117
+ * StepResponse.tick gives twelve lines below: a caller should not have to
118
+ * race a 1 Hz status sample to learn the result of its own call. It also
119
+ * makes an ambiguous id visible — a caller that asked for "harbor" and
120
+ * got back a hash it did not expect can say so.
121
+ */
122
+ scenarioId: string;
123
+ scenarioHash: string;
124
+ runId: string;
125
+ }
44
126
  export interface StepResponse {
45
127
  /**
46
128
  * Where the clock came to rest. Returned rather than left to the status
@@ -50,21 +132,32 @@ export interface StepResponse {
50
132
  tick: number;
51
133
  simulationTime: Date | undefined;
52
134
  }
135
+ export declare const ScenarioInfo: MessageFns<ScenarioInfo>;
136
+ export declare const ListRequest: MessageFns<ListRequest>;
137
+ export declare const ListResponse: MessageFns<ListResponse>;
53
138
  export declare const LoadRequest: MessageFns<LoadRequest>;
54
139
  export declare const StepRequest: MessageFns<StepRequest>;
55
140
  export declare const SetRateRequest: MessageFns<SetRateRequest>;
56
- export declare const LoadResponse: MessageFns<LoadResponse>;
57
141
  export declare const StartResponse: MessageFns<StartResponse>;
58
142
  export declare const PauseResponse: MessageFns<PauseResponse>;
59
143
  export declare const StopResponse: MessageFns<StopResponse>;
60
144
  export declare const ResetResponse: MessageFns<ResetResponse>;
61
145
  export declare const SetRateResponse: MessageFns<SetRateResponse>;
146
+ export declare const LoadResponse: MessageFns<LoadResponse>;
62
147
  export declare const StepResponse: MessageFns<StepResponse>;
63
148
  export type ScenarioControlDefinition = typeof ScenarioControlDefinition;
64
149
  export declare const ScenarioControlDefinition: {
65
150
  readonly name: "ScenarioControl";
66
151
  readonly fullName: "keelson.interfaces.scenario_control.ScenarioControl";
67
152
  readonly methods: {
153
+ readonly list: {
154
+ readonly name: "list";
155
+ readonly requestType: MessageFns<ListRequest>;
156
+ readonly requestStream: false;
157
+ readonly responseType: MessageFns<ListResponse>;
158
+ readonly responseStream: false;
159
+ readonly options: {};
160
+ };
68
161
  readonly load: {
69
162
  readonly name: "load";
70
163
  readonly requestType: MessageFns<LoadRequest>;
@@ -5,12 +5,315 @@
5
5
  // protoc v6.30.2
6
6
  // source: ScenarioControl.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ScenarioControlDefinition = exports.StepResponse = exports.SetRateResponse = exports.ResetResponse = exports.StopResponse = exports.PauseResponse = exports.StartResponse = exports.LoadResponse = exports.SetRateRequest = exports.StepRequest = exports.LoadRequest = exports.protobufPackage = void 0;
8
+ exports.ScenarioControlDefinition = exports.StepResponse = exports.LoadResponse = exports.SetRateResponse = exports.ResetResponse = exports.StopResponse = exports.PauseResponse = exports.StartResponse = exports.SetRateRequest = exports.StepRequest = exports.LoadRequest = exports.ListResponse = exports.ListRequest = exports.ScenarioInfo = 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");
12
12
  const timestamp_1 = require("./google/protobuf/timestamp");
13
13
  exports.protobufPackage = "keelson.interfaces.scenario_control";
14
+ function createBaseScenarioInfo() {
15
+ return {
16
+ scenarioId: "",
17
+ description: "",
18
+ scenarioHash: "",
19
+ vesselCount: 0,
20
+ durationTicks: 0,
21
+ stepSizeMs: 0,
22
+ loadable: false,
23
+ reason: "",
24
+ };
25
+ }
26
+ exports.ScenarioInfo = {
27
+ encode(message, writer = new wire_1.BinaryWriter()) {
28
+ if (message.scenarioId !== "") {
29
+ writer.uint32(10).string(message.scenarioId);
30
+ }
31
+ if (message.description !== "") {
32
+ writer.uint32(18).string(message.description);
33
+ }
34
+ if (message.scenarioHash !== "") {
35
+ writer.uint32(26).string(message.scenarioHash);
36
+ }
37
+ if (message.vesselCount !== 0) {
38
+ writer.uint32(32).uint32(message.vesselCount);
39
+ }
40
+ if (message.durationTicks !== 0) {
41
+ writer.uint32(40).uint64(message.durationTicks);
42
+ }
43
+ if (message.stepSizeMs !== 0) {
44
+ writer.uint32(48).uint32(message.stepSizeMs);
45
+ }
46
+ if (message.loadable !== false) {
47
+ writer.uint32(56).bool(message.loadable);
48
+ }
49
+ if (message.reason !== "") {
50
+ writer.uint32(66).string(message.reason);
51
+ }
52
+ return writer;
53
+ },
54
+ decode(input, length) {
55
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
56
+ let end = length === undefined ? reader.len : reader.pos + length;
57
+ const message = createBaseScenarioInfo();
58
+ while (reader.pos < end) {
59
+ const tag = reader.uint32();
60
+ switch (tag >>> 3) {
61
+ case 1: {
62
+ if (tag !== 10) {
63
+ break;
64
+ }
65
+ message.scenarioId = reader.string();
66
+ continue;
67
+ }
68
+ case 2: {
69
+ if (tag !== 18) {
70
+ break;
71
+ }
72
+ message.description = reader.string();
73
+ continue;
74
+ }
75
+ case 3: {
76
+ if (tag !== 26) {
77
+ break;
78
+ }
79
+ message.scenarioHash = reader.string();
80
+ continue;
81
+ }
82
+ case 4: {
83
+ if (tag !== 32) {
84
+ break;
85
+ }
86
+ message.vesselCount = reader.uint32();
87
+ continue;
88
+ }
89
+ case 5: {
90
+ if (tag !== 40) {
91
+ break;
92
+ }
93
+ message.durationTicks = longToNumber(reader.uint64());
94
+ continue;
95
+ }
96
+ case 6: {
97
+ if (tag !== 48) {
98
+ break;
99
+ }
100
+ message.stepSizeMs = reader.uint32();
101
+ continue;
102
+ }
103
+ case 7: {
104
+ if (tag !== 56) {
105
+ break;
106
+ }
107
+ message.loadable = reader.bool();
108
+ continue;
109
+ }
110
+ case 8: {
111
+ if (tag !== 66) {
112
+ break;
113
+ }
114
+ message.reason = reader.string();
115
+ continue;
116
+ }
117
+ }
118
+ if ((tag & 7) === 4 || tag === 0) {
119
+ break;
120
+ }
121
+ reader.skip(tag & 7);
122
+ }
123
+ return message;
124
+ },
125
+ fromJSON(object) {
126
+ return {
127
+ scenarioId: isSet(object.scenarioId) ? globalThis.String(object.scenarioId) : "",
128
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
129
+ scenarioHash: isSet(object.scenarioHash) ? globalThis.String(object.scenarioHash) : "",
130
+ vesselCount: isSet(object.vesselCount) ? globalThis.Number(object.vesselCount) : 0,
131
+ durationTicks: isSet(object.durationTicks) ? globalThis.Number(object.durationTicks) : 0,
132
+ stepSizeMs: isSet(object.stepSizeMs) ? globalThis.Number(object.stepSizeMs) : 0,
133
+ loadable: isSet(object.loadable) ? globalThis.Boolean(object.loadable) : false,
134
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
135
+ };
136
+ },
137
+ toJSON(message) {
138
+ const obj = {};
139
+ if (message.scenarioId !== "") {
140
+ obj.scenarioId = message.scenarioId;
141
+ }
142
+ if (message.description !== "") {
143
+ obj.description = message.description;
144
+ }
145
+ if (message.scenarioHash !== "") {
146
+ obj.scenarioHash = message.scenarioHash;
147
+ }
148
+ if (message.vesselCount !== 0) {
149
+ obj.vesselCount = Math.round(message.vesselCount);
150
+ }
151
+ if (message.durationTicks !== 0) {
152
+ obj.durationTicks = Math.round(message.durationTicks);
153
+ }
154
+ if (message.stepSizeMs !== 0) {
155
+ obj.stepSizeMs = Math.round(message.stepSizeMs);
156
+ }
157
+ if (message.loadable !== false) {
158
+ obj.loadable = message.loadable;
159
+ }
160
+ if (message.reason !== "") {
161
+ obj.reason = message.reason;
162
+ }
163
+ return obj;
164
+ },
165
+ create(base) {
166
+ return exports.ScenarioInfo.fromPartial(base ?? {});
167
+ },
168
+ fromPartial(object) {
169
+ const message = createBaseScenarioInfo();
170
+ message.scenarioId = object.scenarioId ?? "";
171
+ message.description = object.description ?? "";
172
+ message.scenarioHash = object.scenarioHash ?? "";
173
+ message.vesselCount = object.vesselCount ?? 0;
174
+ message.durationTicks = object.durationTicks ?? 0;
175
+ message.stepSizeMs = object.stepSizeMs ?? 0;
176
+ message.loadable = object.loadable ?? false;
177
+ message.reason = object.reason ?? "";
178
+ return message;
179
+ },
180
+ };
181
+ function createBaseListRequest() {
182
+ return { pattern: "" };
183
+ }
184
+ exports.ListRequest = {
185
+ encode(message, writer = new wire_1.BinaryWriter()) {
186
+ if (message.pattern !== "") {
187
+ writer.uint32(10).string(message.pattern);
188
+ }
189
+ return writer;
190
+ },
191
+ decode(input, length) {
192
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
193
+ let end = length === undefined ? reader.len : reader.pos + length;
194
+ const message = createBaseListRequest();
195
+ while (reader.pos < end) {
196
+ const tag = reader.uint32();
197
+ switch (tag >>> 3) {
198
+ case 1: {
199
+ if (tag !== 10) {
200
+ break;
201
+ }
202
+ message.pattern = reader.string();
203
+ continue;
204
+ }
205
+ }
206
+ if ((tag & 7) === 4 || tag === 0) {
207
+ break;
208
+ }
209
+ reader.skip(tag & 7);
210
+ }
211
+ return message;
212
+ },
213
+ fromJSON(object) {
214
+ return { pattern: isSet(object.pattern) ? globalThis.String(object.pattern) : "" };
215
+ },
216
+ toJSON(message) {
217
+ const obj = {};
218
+ if (message.pattern !== "") {
219
+ obj.pattern = message.pattern;
220
+ }
221
+ return obj;
222
+ },
223
+ create(base) {
224
+ return exports.ListRequest.fromPartial(base ?? {});
225
+ },
226
+ fromPartial(object) {
227
+ const message = createBaseListRequest();
228
+ message.pattern = object.pattern ?? "";
229
+ return message;
230
+ },
231
+ };
232
+ function createBaseListResponse() {
233
+ return { baseDirectory: "", scenarios: [], truncated: false };
234
+ }
235
+ exports.ListResponse = {
236
+ encode(message, writer = new wire_1.BinaryWriter()) {
237
+ if (message.baseDirectory !== "") {
238
+ writer.uint32(10).string(message.baseDirectory);
239
+ }
240
+ for (const v of message.scenarios) {
241
+ exports.ScenarioInfo.encode(v, writer.uint32(18).fork()).join();
242
+ }
243
+ if (message.truncated !== false) {
244
+ writer.uint32(24).bool(message.truncated);
245
+ }
246
+ return writer;
247
+ },
248
+ decode(input, length) {
249
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
250
+ let end = length === undefined ? reader.len : reader.pos + length;
251
+ const message = createBaseListResponse();
252
+ while (reader.pos < end) {
253
+ const tag = reader.uint32();
254
+ switch (tag >>> 3) {
255
+ case 1: {
256
+ if (tag !== 10) {
257
+ break;
258
+ }
259
+ message.baseDirectory = reader.string();
260
+ continue;
261
+ }
262
+ case 2: {
263
+ if (tag !== 18) {
264
+ break;
265
+ }
266
+ message.scenarios.push(exports.ScenarioInfo.decode(reader, reader.uint32()));
267
+ continue;
268
+ }
269
+ case 3: {
270
+ if (tag !== 24) {
271
+ break;
272
+ }
273
+ message.truncated = reader.bool();
274
+ continue;
275
+ }
276
+ }
277
+ if ((tag & 7) === 4 || tag === 0) {
278
+ break;
279
+ }
280
+ reader.skip(tag & 7);
281
+ }
282
+ return message;
283
+ },
284
+ fromJSON(object) {
285
+ return {
286
+ baseDirectory: isSet(object.baseDirectory) ? globalThis.String(object.baseDirectory) : "",
287
+ scenarios: globalThis.Array.isArray(object?.scenarios)
288
+ ? object.scenarios.map((e) => exports.ScenarioInfo.fromJSON(e))
289
+ : [],
290
+ truncated: isSet(object.truncated) ? globalThis.Boolean(object.truncated) : false,
291
+ };
292
+ },
293
+ toJSON(message) {
294
+ const obj = {};
295
+ if (message.baseDirectory !== "") {
296
+ obj.baseDirectory = message.baseDirectory;
297
+ }
298
+ if (message.scenarios?.length) {
299
+ obj.scenarios = message.scenarios.map((e) => exports.ScenarioInfo.toJSON(e));
300
+ }
301
+ if (message.truncated !== false) {
302
+ obj.truncated = message.truncated;
303
+ }
304
+ return obj;
305
+ },
306
+ create(base) {
307
+ return exports.ListResponse.fromPartial(base ?? {});
308
+ },
309
+ fromPartial(object) {
310
+ const message = createBaseListResponse();
311
+ message.baseDirectory = object.baseDirectory ?? "";
312
+ message.scenarios = object.scenarios?.map((e) => exports.ScenarioInfo.fromPartial(e)) || [];
313
+ message.truncated = object.truncated ?? false;
314
+ return message;
315
+ },
316
+ };
14
317
  function createBaseLoadRequest() {
15
318
  return { scenario: "" };
16
319
  }
@@ -164,17 +467,17 @@ exports.SetRateRequest = {
164
467
  return message;
165
468
  },
166
469
  };
167
- function createBaseLoadResponse() {
470
+ function createBaseStartResponse() {
168
471
  return {};
169
472
  }
170
- exports.LoadResponse = {
473
+ exports.StartResponse = {
171
474
  encode(_, writer = new wire_1.BinaryWriter()) {
172
475
  return writer;
173
476
  },
174
477
  decode(input, length) {
175
478
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
176
479
  let end = length === undefined ? reader.len : reader.pos + length;
177
- const message = createBaseLoadResponse();
480
+ const message = createBaseStartResponse();
178
481
  while (reader.pos < end) {
179
482
  const tag = reader.uint32();
180
483
  switch (tag >>> 3) {
@@ -194,24 +497,24 @@ exports.LoadResponse = {
194
497
  return obj;
195
498
  },
196
499
  create(base) {
197
- return exports.LoadResponse.fromPartial(base ?? {});
500
+ return exports.StartResponse.fromPartial(base ?? {});
198
501
  },
199
502
  fromPartial(_) {
200
- const message = createBaseLoadResponse();
503
+ const message = createBaseStartResponse();
201
504
  return message;
202
505
  },
203
506
  };
204
- function createBaseStartResponse() {
507
+ function createBasePauseResponse() {
205
508
  return {};
206
509
  }
207
- exports.StartResponse = {
510
+ exports.PauseResponse = {
208
511
  encode(_, writer = new wire_1.BinaryWriter()) {
209
512
  return writer;
210
513
  },
211
514
  decode(input, length) {
212
515
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
213
516
  let end = length === undefined ? reader.len : reader.pos + length;
214
- const message = createBaseStartResponse();
517
+ const message = createBasePauseResponse();
215
518
  while (reader.pos < end) {
216
519
  const tag = reader.uint32();
217
520
  switch (tag >>> 3) {
@@ -231,24 +534,24 @@ exports.StartResponse = {
231
534
  return obj;
232
535
  },
233
536
  create(base) {
234
- return exports.StartResponse.fromPartial(base ?? {});
537
+ return exports.PauseResponse.fromPartial(base ?? {});
235
538
  },
236
539
  fromPartial(_) {
237
- const message = createBaseStartResponse();
540
+ const message = createBasePauseResponse();
238
541
  return message;
239
542
  },
240
543
  };
241
- function createBasePauseResponse() {
544
+ function createBaseStopResponse() {
242
545
  return {};
243
546
  }
244
- exports.PauseResponse = {
547
+ exports.StopResponse = {
245
548
  encode(_, writer = new wire_1.BinaryWriter()) {
246
549
  return writer;
247
550
  },
248
551
  decode(input, length) {
249
552
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
250
553
  let end = length === undefined ? reader.len : reader.pos + length;
251
- const message = createBasePauseResponse();
554
+ const message = createBaseStopResponse();
252
555
  while (reader.pos < end) {
253
556
  const tag = reader.uint32();
254
557
  switch (tag >>> 3) {
@@ -268,24 +571,24 @@ exports.PauseResponse = {
268
571
  return obj;
269
572
  },
270
573
  create(base) {
271
- return exports.PauseResponse.fromPartial(base ?? {});
574
+ return exports.StopResponse.fromPartial(base ?? {});
272
575
  },
273
576
  fromPartial(_) {
274
- const message = createBasePauseResponse();
577
+ const message = createBaseStopResponse();
275
578
  return message;
276
579
  },
277
580
  };
278
- function createBaseStopResponse() {
581
+ function createBaseResetResponse() {
279
582
  return {};
280
583
  }
281
- exports.StopResponse = {
584
+ exports.ResetResponse = {
282
585
  encode(_, writer = new wire_1.BinaryWriter()) {
283
586
  return writer;
284
587
  },
285
588
  decode(input, length) {
286
589
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
287
590
  let end = length === undefined ? reader.len : reader.pos + length;
288
- const message = createBaseStopResponse();
591
+ const message = createBaseResetResponse();
289
592
  while (reader.pos < end) {
290
593
  const tag = reader.uint32();
291
594
  switch (tag >>> 3) {
@@ -305,24 +608,24 @@ exports.StopResponse = {
305
608
  return obj;
306
609
  },
307
610
  create(base) {
308
- return exports.StopResponse.fromPartial(base ?? {});
611
+ return exports.ResetResponse.fromPartial(base ?? {});
309
612
  },
310
613
  fromPartial(_) {
311
- const message = createBaseStopResponse();
614
+ const message = createBaseResetResponse();
312
615
  return message;
313
616
  },
314
617
  };
315
- function createBaseResetResponse() {
618
+ function createBaseSetRateResponse() {
316
619
  return {};
317
620
  }
318
- exports.ResetResponse = {
621
+ exports.SetRateResponse = {
319
622
  encode(_, writer = new wire_1.BinaryWriter()) {
320
623
  return writer;
321
624
  },
322
625
  decode(input, length) {
323
626
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
324
627
  let end = length === undefined ? reader.len : reader.pos + length;
325
- const message = createBaseResetResponse();
628
+ const message = createBaseSetRateResponse();
326
629
  while (reader.pos < end) {
327
630
  const tag = reader.uint32();
328
631
  switch (tag >>> 3) {
@@ -342,27 +645,57 @@ exports.ResetResponse = {
342
645
  return obj;
343
646
  },
344
647
  create(base) {
345
- return exports.ResetResponse.fromPartial(base ?? {});
648
+ return exports.SetRateResponse.fromPartial(base ?? {});
346
649
  },
347
650
  fromPartial(_) {
348
- const message = createBaseResetResponse();
651
+ const message = createBaseSetRateResponse();
349
652
  return message;
350
653
  },
351
654
  };
352
- function createBaseSetRateResponse() {
353
- return {};
655
+ function createBaseLoadResponse() {
656
+ return { scenarioId: "", scenarioHash: "", runId: "" };
354
657
  }
355
- exports.SetRateResponse = {
356
- encode(_, writer = new wire_1.BinaryWriter()) {
658
+ exports.LoadResponse = {
659
+ encode(message, writer = new wire_1.BinaryWriter()) {
660
+ if (message.scenarioId !== "") {
661
+ writer.uint32(10).string(message.scenarioId);
662
+ }
663
+ if (message.scenarioHash !== "") {
664
+ writer.uint32(18).string(message.scenarioHash);
665
+ }
666
+ if (message.runId !== "") {
667
+ writer.uint32(26).string(message.runId);
668
+ }
357
669
  return writer;
358
670
  },
359
671
  decode(input, length) {
360
672
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
361
673
  let end = length === undefined ? reader.len : reader.pos + length;
362
- const message = createBaseSetRateResponse();
674
+ const message = createBaseLoadResponse();
363
675
  while (reader.pos < end) {
364
676
  const tag = reader.uint32();
365
677
  switch (tag >>> 3) {
678
+ case 1: {
679
+ if (tag !== 10) {
680
+ break;
681
+ }
682
+ message.scenarioId = reader.string();
683
+ continue;
684
+ }
685
+ case 2: {
686
+ if (tag !== 18) {
687
+ break;
688
+ }
689
+ message.scenarioHash = reader.string();
690
+ continue;
691
+ }
692
+ case 3: {
693
+ if (tag !== 26) {
694
+ break;
695
+ }
696
+ message.runId = reader.string();
697
+ continue;
698
+ }
366
699
  }
367
700
  if ((tag & 7) === 4 || tag === 0) {
368
701
  break;
@@ -371,18 +704,34 @@ exports.SetRateResponse = {
371
704
  }
372
705
  return message;
373
706
  },
374
- fromJSON(_) {
375
- return {};
707
+ fromJSON(object) {
708
+ return {
709
+ scenarioId: isSet(object.scenarioId) ? globalThis.String(object.scenarioId) : "",
710
+ scenarioHash: isSet(object.scenarioHash) ? globalThis.String(object.scenarioHash) : "",
711
+ runId: isSet(object.runId) ? globalThis.String(object.runId) : "",
712
+ };
376
713
  },
377
- toJSON(_) {
714
+ toJSON(message) {
378
715
  const obj = {};
716
+ if (message.scenarioId !== "") {
717
+ obj.scenarioId = message.scenarioId;
718
+ }
719
+ if (message.scenarioHash !== "") {
720
+ obj.scenarioHash = message.scenarioHash;
721
+ }
722
+ if (message.runId !== "") {
723
+ obj.runId = message.runId;
724
+ }
379
725
  return obj;
380
726
  },
381
727
  create(base) {
382
- return exports.SetRateResponse.fromPartial(base ?? {});
728
+ return exports.LoadResponse.fromPartial(base ?? {});
383
729
  },
384
- fromPartial(_) {
385
- const message = createBaseSetRateResponse();
730
+ fromPartial(object) {
731
+ const message = createBaseLoadResponse();
732
+ message.scenarioId = object.scenarioId ?? "";
733
+ message.scenarioHash = object.scenarioHash ?? "";
734
+ message.runId = object.runId ?? "";
386
735
  return message;
387
736
  },
388
737
  };
@@ -458,6 +807,14 @@ exports.ScenarioControlDefinition = {
458
807
  name: "ScenarioControl",
459
808
  fullName: "keelson.interfaces.scenario_control.ScenarioControl",
460
809
  methods: {
810
+ list: {
811
+ name: "list",
812
+ requestType: exports.ListRequest,
813
+ requestStream: false,
814
+ responseType: exports.ListResponse,
815
+ responseStream: false,
816
+ options: {},
817
+ },
461
818
  load: {
462
819
  name: "load",
463
820
  requestType: exports.LoadRequest,
@@ -199,6 +199,14 @@ export declare const serviceDefinitions: {
199
199
  readonly name: "ScenarioControl";
200
200
  readonly fullName: "keelson.interfaces.scenario_control.ScenarioControl";
201
201
  readonly methods: {
202
+ readonly list: {
203
+ readonly name: "list";
204
+ readonly requestType: import("./ScenarioControl").MessageFns<import("./ScenarioControl").ListRequest>;
205
+ readonly requestStream: false;
206
+ readonly responseType: import("./ScenarioControl").MessageFns<import("./ScenarioControl").ListResponse>;
207
+ readonly responseStream: false;
208
+ readonly options: {};
209
+ };
202
210
  readonly load: {
203
211
  readonly name: "load";
204
212
  readonly requestType: import("./ScenarioControl").MessageFns<import("./ScenarioControl").LoadRequest>;
@@ -278,6 +278,19 @@ export interface RouteInfo {
278
278
  maxWindSpeedMps?: number | undefined;
279
279
  minSpeedKnots?: number | undefined;
280
280
  maxSpeedKnots?: number | undefined;
281
+ /**
282
+ * Minimum visibility the route is valid above. `visibility_range_m` is
283
+ * published, so without this the measurement exists and the limit it should
284
+ * be checked against does not.
285
+ */
286
+ minVisibilityM?: number | undefined;
287
+ /**
288
+ * Gust limit, distinct from the mean-wind limit above. Gust is what governs
289
+ * small-craft operations: 12 m/s mean with 20 m/s gusts is a different
290
+ * proposition from a steady 12 m/s, and only the mean can be constrained
291
+ * today. Checked against the windowed `true_wind_speed_max_mps`.
292
+ */
293
+ maxWindGustMps?: number | undefined;
281
294
  /**
282
295
  * -- Optimization & autonomy ------------------------------------------------
283
296
  * Free-form optimization method label (e.g. "fuel-min", "eta-min", "weather-routed").
@@ -1342,6 +1342,8 @@ function createBaseRouteInfo() {
1342
1342
  maxWindSpeedMps: undefined,
1343
1343
  minSpeedKnots: undefined,
1344
1344
  maxSpeedKnots: undefined,
1345
+ minVisibilityM: undefined,
1346
+ maxWindGustMps: undefined,
1345
1347
  optimizationMethod: "",
1346
1348
  autonomyLevel: 0,
1347
1349
  extensions: undefined,
@@ -1392,6 +1394,12 @@ exports.RouteInfo = {
1392
1394
  if (message.maxSpeedKnots !== undefined) {
1393
1395
  writer.uint32(277).float(message.maxSpeedKnots);
1394
1396
  }
1397
+ if (message.minVisibilityM !== undefined) {
1398
+ writer.uint32(285).float(message.minVisibilityM);
1399
+ }
1400
+ if (message.maxWindGustMps !== undefined) {
1401
+ writer.uint32(293).float(message.maxWindGustMps);
1402
+ }
1395
1403
  if (message.optimizationMethod !== "") {
1396
1404
  writer.uint32(402).string(message.optimizationMethod);
1397
1405
  }
@@ -1508,6 +1516,20 @@ exports.RouteInfo = {
1508
1516
  message.maxSpeedKnots = reader.float();
1509
1517
  continue;
1510
1518
  }
1519
+ case 35: {
1520
+ if (tag !== 285) {
1521
+ break;
1522
+ }
1523
+ message.minVisibilityM = reader.float();
1524
+ continue;
1525
+ }
1526
+ case 36: {
1527
+ if (tag !== 293) {
1528
+ break;
1529
+ }
1530
+ message.maxWindGustMps = reader.float();
1531
+ continue;
1532
+ }
1511
1533
  case 50: {
1512
1534
  if (tag !== 402) {
1513
1535
  break;
@@ -1554,6 +1576,8 @@ exports.RouteInfo = {
1554
1576
  maxWindSpeedMps: isSet(object.maxWindSpeedMps) ? globalThis.Number(object.maxWindSpeedMps) : undefined,
1555
1577
  minSpeedKnots: isSet(object.minSpeedKnots) ? globalThis.Number(object.minSpeedKnots) : undefined,
1556
1578
  maxSpeedKnots: isSet(object.maxSpeedKnots) ? globalThis.Number(object.maxSpeedKnots) : undefined,
1579
+ minVisibilityM: isSet(object.minVisibilityM) ? globalThis.Number(object.minVisibilityM) : undefined,
1580
+ maxWindGustMps: isSet(object.maxWindGustMps) ? globalThis.Number(object.maxWindGustMps) : undefined,
1557
1581
  optimizationMethod: isSet(object.optimizationMethod) ? globalThis.String(object.optimizationMethod) : "",
1558
1582
  autonomyLevel: isSet(object.autonomyLevel) ? autonomyLevelFromJSON(object.autonomyLevel) : 0,
1559
1583
  extensions: isSet(object.extensions) ? exports.Extensions.fromJSON(object.extensions) : undefined,
@@ -1603,6 +1627,12 @@ exports.RouteInfo = {
1603
1627
  if (message.maxSpeedKnots !== undefined) {
1604
1628
  obj.maxSpeedKnots = message.maxSpeedKnots;
1605
1629
  }
1630
+ if (message.minVisibilityM !== undefined) {
1631
+ obj.minVisibilityM = message.minVisibilityM;
1632
+ }
1633
+ if (message.maxWindGustMps !== undefined) {
1634
+ obj.maxWindGustMps = message.maxWindGustMps;
1635
+ }
1606
1636
  if (message.optimizationMethod !== "") {
1607
1637
  obj.optimizationMethod = message.optimizationMethod;
1608
1638
  }
@@ -1633,6 +1663,8 @@ exports.RouteInfo = {
1633
1663
  message.maxWindSpeedMps = object.maxWindSpeedMps ?? undefined;
1634
1664
  message.minSpeedKnots = object.minSpeedKnots ?? undefined;
1635
1665
  message.maxSpeedKnots = object.maxSpeedKnots ?? undefined;
1666
+ message.minVisibilityM = object.minVisibilityM ?? undefined;
1667
+ message.maxWindGustMps = object.maxWindGustMps ?? undefined;
1636
1668
  message.optimizationMethod = object.optimizationMethod ?? "";
1637
1669
  message.autonomyLevel = object.autonomyLevel ?? 0;
1638
1670
  message.extensions = (object.extensions !== undefined && object.extensions !== null)
package/dist/qos.json CHANGED
@@ -72,6 +72,9 @@
72
72
  "target_bcr_m": "elevated",
73
73
  "target_bct_s": "elevated",
74
74
  "weather_alert": "elevated",
75
+ "depth_below_transducer_m": "elevated",
76
+ "depth_below_keel_m": "elevated",
77
+ "depth_below_surface_m": "elevated",
75
78
  "route_status": "elevated",
76
79
  "route_execution": "elevated",
77
80
  "route_edit_authority": "elevated",
@@ -106,9 +106,13 @@
106
106
  "air_relative_humidity_pct": "keelson.TimestampedFloat",
107
107
  "air_pressure_pa": "keelson.TimestampedFloat",
108
108
  "dew_point_celsius": "keelson.TimestampedFloat",
109
+ "illuminance_lux": "keelson.TimestampedFloat",
109
110
  "water_temperature_celsius": "keelson.TimestampedFloat",
110
111
  "water_salinity_ppt": "keelson.TimestampedFloat",
111
112
  "water_speed_of_sound_mps": "keelson.TimestampedFloat",
113
+ "depth_below_transducer_m": "keelson.TimestampedFloat",
114
+ "depth_below_keel_m": "keelson.TimestampedFloat",
115
+ "depth_below_surface_m": "keelson.TimestampedFloat",
112
116
  "true_wind_direction_deg": "keelson.TimestampedFloat",
113
117
  "true_wind_angle_deg": "keelson.TimestampedFloat",
114
118
  "true_wind_speed_mps": "keelson.TimestampedFloat",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rise-maritime/keelson-js",
3
3
  "//version": "NOT the published version. The release workflow overwrites it from the release tag (npm version --no-git-tag-version), so tag and artifact cannot disagree. Only matters for local installs; do not hand-bump before tagging — that manual step is what broke release 0.5.4.",
4
- "version": "0.6.0-alpha.221.dev.1",
4
+ "version": "0.6.0-alpha.232.dev.1",
5
5
  "description": "Keelson JavaScript SDK with Node-RED nodes",
6
6
  "main": "dist/index.js",
7
7
  "files": [