@rise-maritime/keelson-js 0.6.0-alpha.225.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 +8 -0
- package/dist/interfaces/Route.d.ts +13 -0
- package/dist/interfaces/Route.js +32 -0
- package/dist/interfaces/ScenarioControl.d.ts +96 -3
- package/dist/interfaces/ScenarioControl.js +394 -37
- package/dist/interfaces/serviceRegistry.d.ts +8 -0
- package/dist/payloads/Route.d.ts +13 -0
- package/dist/payloads/Route.js +32 -0
- package/dist/payloads/index.keelson.d.ts +0 -2
- package/dist/payloads/index.keelson.js +0 -2
- package/dist/qos.json +3 -8
- package/dist/subjects.json +4 -2
- package/package.json +1 -1
- package/dist/payloads/ScenarioEvent.d.ts +0 -90
- package/dist/payloads/ScenarioEvent.js +0 -294
- package/dist/payloads/ScenarioTickAck.d.ts +0 -81
- package/dist/payloads/ScenarioTickAck.js +0 -225
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").
|
package/dist/interfaces/Route.js
CHANGED
|
@@ -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>;
|