@rise-maritime/keelson-js 0.5.3 → 0.6.0-alpha.202.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.
Files changed (121) hide show
  1. package/dist/index.d.ts +524 -1
  2. package/dist/index.js +114 -5
  3. package/dist/index.test.js +57 -0
  4. package/dist/interfaces/AlarmAck.d.ts +62 -0
  5. package/dist/interfaces/AlarmAck.js +218 -0
  6. package/dist/interfaces/Configurable.d.ts +24 -18
  7. package/dist/interfaces/Configurable.js +24 -22
  8. package/dist/interfaces/Coordinate.d.ts +38 -0
  9. package/dist/interfaces/Coordinate.js +82 -0
  10. package/dist/interfaces/ErrorResponse.d.ts +1 -1
  11. package/dist/interfaces/ErrorResponse.js +1 -1
  12. package/dist/interfaces/MavlinkCommand.d.ts +24 -18
  13. package/dist/interfaces/MavlinkCommand.js +24 -22
  14. package/dist/interfaces/Mission.d.ts +128 -0
  15. package/dist/interfaces/Mission.js +800 -0
  16. package/dist/interfaces/NetworkPingPong.d.ts +16 -16
  17. package/dist/interfaces/NetworkPingPong.js +16 -16
  18. package/dist/interfaces/ReplayControl.d.ts +72 -30
  19. package/dist/interfaces/ReplayControl.js +72 -58
  20. package/dist/interfaces/Route.d.ts +640 -0
  21. package/dist/interfaces/Route.js +4180 -0
  22. package/dist/interfaces/RoutePlanner.d.ts +152 -0
  23. package/dist/interfaces/RoutePlanner.js +268 -0
  24. package/dist/interfaces/ScenarioCheckpoint.d.ts +154 -0
  25. package/dist/interfaces/ScenarioCheckpoint.js +694 -0
  26. package/dist/interfaces/ScenarioControl.d.ts +144 -0
  27. package/dist/interfaces/ScenarioControl.js +552 -0
  28. package/dist/interfaces/Severity.d.ts +22 -0
  29. package/dist/interfaces/Severity.js +72 -0
  30. package/dist/interfaces/SimulationControl.d.ts +69 -0
  31. package/dist/interfaces/SimulationControl.js +153 -0
  32. package/dist/interfaces/Subscriber.d.ts +24 -18
  33. package/dist/interfaces/Subscriber.js +24 -22
  34. package/dist/interfaces/VehicleCommon.d.ts +1 -32
  35. package/dist/interfaces/VehicleCommon.js +2 -74
  36. package/dist/interfaces/VehicleControl.d.ts +34 -28
  37. package/dist/interfaces/VehicleControl.js +34 -22
  38. package/dist/interfaces/VehicleGeofence.d.ts +26 -19
  39. package/dist/interfaces/VehicleGeofence.js +40 -37
  40. package/dist/interfaces/VehicleLifecycle.d.ts +32 -20
  41. package/dist/interfaces/VehicleLifecycle.js +32 -28
  42. package/dist/interfaces/VehicleMission.d.ts +42 -97
  43. package/dist/interfaces/VehicleMission.js +41 -696
  44. package/dist/interfaces/VehicleNavigation.d.ts +30 -24
  45. package/dist/interfaces/VehicleNavigation.js +30 -22
  46. package/dist/interfaces/VehicleParam.d.ts +48 -24
  47. package/dist/interfaces/VehicleParam.js +48 -40
  48. package/dist/interfaces/VehicleSimulatorControl.d.ts +57 -0
  49. package/dist/interfaces/VehicleSimulatorControl.js +155 -0
  50. package/dist/interfaces/WHEPProxy.d.ts +16 -16
  51. package/dist/interfaces/WHEPProxy.js +16 -16
  52. package/dist/interfaces/foxglove/GeoJSON.d.ts +27 -0
  53. package/dist/interfaces/foxglove/GeoJSON.js +65 -0
  54. package/dist/interfaces/foxglove/LocationFix.d.ts +49 -0
  55. package/dist/interfaces/foxglove/LocationFix.js +246 -0
  56. package/dist/interfaces/google/protobuf/any.d.ts +144 -0
  57. package/dist/interfaces/google/protobuf/any.js +107 -0
  58. package/dist/interfaces/google/protobuf/duration.d.ts +99 -0
  59. package/dist/interfaces/google/protobuf/duration.js +92 -0
  60. package/dist/interfaces/serviceRegistry.d.ts +520 -0
  61. package/dist/interfaces/serviceRegistry.js +40 -0
  62. package/dist/interfaces.json +19 -0
  63. package/dist/payloads/Alarm.d.ts +7 -12
  64. package/dist/payloads/Alarm.js +4 -54
  65. package/dist/payloads/ChecklistEvent.d.ts +152 -0
  66. package/dist/payloads/ChecklistEvent.js +524 -0
  67. package/dist/payloads/ChecklistEvidence.d.ts +79 -0
  68. package/dist/payloads/ChecklistEvidence.js +287 -0
  69. package/dist/payloads/ChecklistPresence.d.ts +68 -0
  70. package/dist/payloads/ChecklistPresence.js +286 -0
  71. package/dist/payloads/ChecklistProcedure.d.ts +81 -0
  72. package/dist/payloads/ChecklistProcedure.js +364 -0
  73. package/dist/payloads/ChecklistState.d.ts +178 -0
  74. package/dist/payloads/ChecklistState.js +838 -0
  75. package/dist/payloads/CommandAuthority.d.ts +82 -0
  76. package/dist/payloads/CommandAuthority.js +364 -0
  77. package/dist/payloads/Coordinate.d.ts +39 -0
  78. package/dist/payloads/Coordinate.js +85 -0
  79. package/dist/payloads/EntityHealth.d.ts +9 -0
  80. package/dist/payloads/EntityHealth.js +14 -0
  81. package/dist/payloads/Mission.d.ts +137 -0
  82. package/dist/payloads/Mission.js +826 -0
  83. package/dist/payloads/OperationalAuthority.d.ts +172 -5
  84. package/dist/payloads/OperationalAuthority.js +525 -6
  85. package/dist/payloads/Route.d.ts +662 -0
  86. package/dist/payloads/Route.js +4289 -0
  87. package/dist/payloads/RouteChangeEvent.d.ts +42 -0
  88. package/dist/payloads/RouteChangeEvent.js +223 -0
  89. package/dist/payloads/RouteEditAuthority.d.ts +87 -0
  90. package/dist/payloads/RouteEditAuthority.js +380 -0
  91. package/dist/payloads/RouteExecution.d.ts +64 -0
  92. package/dist/payloads/RouteExecution.js +310 -0
  93. package/dist/payloads/ScenarioStatus.d.ts +160 -0
  94. package/dist/payloads/ScenarioStatus.js +654 -0
  95. package/dist/payloads/Severity.d.ts +13 -6
  96. package/dist/payloads/Severity.js +30 -18
  97. package/dist/payloads/SimulationStatus.d.ts +3 -4
  98. package/dist/payloads/SimulationStatus.js +12 -18
  99. package/dist/payloads/TestObjectStatus.d.ts +154 -0
  100. package/dist/payloads/TestObjectStatus.js +580 -0
  101. package/dist/payloads/VesselType.d.ts +2 -1
  102. package/dist/payloads/VesselType.js +1 -1
  103. package/dist/payloads/Voyage.d.ts +154 -0
  104. package/dist/payloads/Voyage.js +866 -0
  105. package/dist/payloads/WarrantRecord.d.ts +168 -0
  106. package/dist/payloads/WarrantRecord.js +781 -0
  107. package/dist/payloads/foxglove/CompressedPointCloud.d.ts +37 -0
  108. package/dist/payloads/foxglove/CompressedPointCloud.js +185 -0
  109. package/dist/payloads/google/protobuf/any.d.ts +145 -0
  110. package/dist/payloads/google/protobuf/any.js +110 -0
  111. package/dist/payloads/google/protobuf/empty.d.ts +34 -0
  112. package/dist/payloads/google/protobuf/empty.js +50 -0
  113. package/dist/payloads/index.foxglove.d.ts +1 -0
  114. package/dist/payloads/index.foxglove.js +1 -0
  115. package/dist/payloads/index.google.protobuf.d.ts +2 -0
  116. package/dist/payloads/index.google.protobuf.js +2 -0
  117. package/dist/payloads/index.keelson.d.ts +17 -1
  118. package/dist/payloads/index.keelson.js +17 -1
  119. package/dist/qos.json +95 -0
  120. package/dist/subjects.json +38 -1
  121. package/package.json +2 -1
@@ -0,0 +1,662 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Coordinate } from "./Coordinate";
3
+ import { SeverityLevel } from "./Severity";
4
+ import { GeoJSON } from "./foxglove/GeoJSON";
5
+ import { LocationFix } from "./foxglove/LocationFix";
6
+ import { Any } from "./google/protobuf/any";
7
+ import { Duration } from "./google/protobuf/duration";
8
+ /** Autonomy level the route is authored for. */
9
+ export declare enum AutonomyLevel {
10
+ AUTONOMY_LEVEL_UNSPECIFIED = 0,
11
+ AUTONOMY_LEVEL_MANUAL_ONLY = 1,
12
+ AUTONOMY_LEVEL_REMOTE_CONTROLLED = 2,
13
+ AUTONOMY_LEVEL_AUTONOMOUS_SUPERVISED = 3,
14
+ AUTONOMY_LEVEL_AUTONOMOUS_UNSUPERVISED = 4,
15
+ UNRECOGNIZED = -1
16
+ }
17
+ export declare function autonomyLevelFromJSON(object: any): AutonomyLevel;
18
+ export declare function autonomyLevelToJSON(object: AutonomyLevel): string;
19
+ /** Operational context for a leg or waypoint. */
20
+ export declare enum OperationalContext {
21
+ OPERATIONAL_CONTEXT_UNSPECIFIED = 0,
22
+ OPERATIONAL_CONTEXT_OPEN_SEA = 1,
23
+ OPERATIONAL_CONTEXT_COASTAL = 2,
24
+ OPERATIONAL_CONTEXT_ARCHIPELAGO = 3,
25
+ OPERATIONAL_CONTEXT_PORT_APPROACH = 4,
26
+ OPERATIONAL_CONTEXT_PORT_AREA = 5,
27
+ OPERATIONAL_CONTEXT_RIVER_WATERS = 6,
28
+ OPERATIONAL_CONTEXT_LOCK = 7,
29
+ UNRECOGNIZED = -1
30
+ }
31
+ export declare function operationalContextFromJSON(object: any): OperationalContext;
32
+ export declare function operationalContextToJSON(object: OperationalContext): string;
33
+ /** Categorisation of route challenges (used in structured risk). */
34
+ export declare enum RouteChallengeType {
35
+ ROUTE_CHALLENGE_TYPE_UNSPECIFIED = 0,
36
+ ROUTE_CHALLENGE_TYPE_SHALLOW_WATER = 1,
37
+ ROUTE_CHALLENGE_TYPE_TRAFFIC_DENSITY = 2,
38
+ ROUTE_CHALLENGE_TYPE_WEATHER_HAZARD = 3,
39
+ ROUTE_CHALLENGE_TYPE_PIRACY_SECURITY = 4,
40
+ ROUTE_CHALLENGE_TYPE_REGULATORY_LIMIT = 5,
41
+ ROUTE_CHALLENGE_TYPE_TECHNICAL_LIMIT = 6,
42
+ ROUTE_CHALLENGE_TYPE_OTHER = 7,
43
+ UNRECOGNIZED = -1
44
+ }
45
+ export declare function routeChallengeTypeFromJSON(object: any): RouteChallengeType;
46
+ export declare function routeChallengeTypeToJSON(object: RouteChallengeType): string;
47
+ /** Hazard zone classification. */
48
+ export declare enum HazardZoneType {
49
+ HAZARD_ZONE_TYPE_UNSPECIFIED = 0,
50
+ HAZARD_ZONE_TYPE_STATIC_NOGO = 1,
51
+ HAZARD_ZONE_TYPE_DYNAMIC_NOGO = 2,
52
+ HAZARD_ZONE_TYPE_TRAFFIC = 3,
53
+ HAZARD_ZONE_TYPE_WEATHER = 4,
54
+ HAZARD_ZONE_TYPE_ENVIRONMENTAL = 5,
55
+ UNRECOGNIZED = -1
56
+ }
57
+ export declare function hazardZoneTypeFromJSON(object: any): HazardZoneType;
58
+ export declare function hazardZoneTypeToJSON(object: HazardZoneType): string;
59
+ /** COLREG encounter situation for an annotated leg. */
60
+ export declare enum ColregSituation {
61
+ COLREG_SITUATION_UNSPECIFIED = 0,
62
+ COLREG_SITUATION_OVERTAKING = 1,
63
+ COLREG_SITUATION_CROSSING_STBD = 2,
64
+ COLREG_SITUATION_CROSSING_PORT = 3,
65
+ COLREG_SITUATION_HEAD_ON = 4,
66
+ UNRECOGNIZED = -1
67
+ }
68
+ export declare function colregSituationFromJSON(object: any): ColregSituation;
69
+ export declare function colregSituationToJSON(object: ColregSituation): string;
70
+ /** Annotated traffic intensity for a leg. */
71
+ export declare enum ColregTrafficIntensity {
72
+ COLREG_TRAFFIC_INTENSITY_UNSPECIFIED = 0,
73
+ COLREG_TRAFFIC_INTENSITY_NONE = 1,
74
+ COLREG_TRAFFIC_INTENSITY_LIGHT = 2,
75
+ COLREG_TRAFFIC_INTENSITY_MODERATE = 3,
76
+ COLREG_TRAFFIC_INTENSITY_HEAVY = 4,
77
+ UNRECOGNIZED = -1
78
+ }
79
+ export declare function colregTrafficIntensityFromJSON(object: any): ColregTrafficIntensity;
80
+ export declare function colregTrafficIntensityToJSON(object: ColregTrafficIntensity): string;
81
+ /** Geometry type for a leg between waypoints. */
82
+ export declare enum GeometryType {
83
+ GEOMETRY_TYPE_UNSPECIFIED = 0,
84
+ GEOMETRY_TYPE_LOXODROME = 1,
85
+ GEOMETRY_TYPE_ORTHODROME = 2,
86
+ UNRECOGNIZED = -1
87
+ }
88
+ export declare function geometryTypeFromJSON(object: any): GeometryType;
89
+ export declare function geometryTypeToJSON(object: GeometryType): string;
90
+ /**
91
+ * Lifecycle status for the route artifact (authoring + quality).
92
+ * Execution-side state (vessel sailing, paused, completed) lives on
93
+ * keelson.VoyageStatus and is intentionally NOT duplicated here.
94
+ */
95
+ export declare enum RouteStatus {
96
+ ROUTE_STATUS_UNSPECIFIED = 0,
97
+ ROUTE_STATUS_INITIAL = 1,
98
+ ROUTE_STATUS_PLANNED = 2,
99
+ ROUTE_STATUS_RECOMMENDED = 3,
100
+ ROUTE_STATUS_ACKNOWLEDGED = 4,
101
+ /** ROUTE_STATUS_TERMINATED - Route artifact retired / superseded. */
102
+ ROUTE_STATUS_TERMINATED = 6,
103
+ ROUTE_STATUS_ERRORS = 7,
104
+ ROUTE_STATUS_INCOMPLETE = 8,
105
+ ROUTE_STATUS_ROUTE_ISSUES = 9,
106
+ UNRECOGNIZED = -1
107
+ }
108
+ export declare function routeStatusFromJSON(object: any): RouteStatus;
109
+ export declare function routeStatusToJSON(object: RouteStatus): string;
110
+ /** Required action for an ActionPoint. */
111
+ export declare enum ActionPointRequiredAction {
112
+ ACTION_POINT_REQUIRED_ACTION_UNSPECIFIED = 0,
113
+ ACTION_POINT_REQUIRED_ACTION_USER_DEFINED = 1,
114
+ ACTION_POINT_REQUIRED_ACTION_REPORT = 2,
115
+ /** ACTION_POINT_REQUIRED_ACTION_UKCM - Under-keel clearance monitoring */
116
+ ACTION_POINT_REQUIRED_ACTION_UKCM = 3,
117
+ ACTION_POINT_REQUIRED_ACTION_NOTE = 4,
118
+ ACTION_POINT_REQUIRED_ACTION_PILOT_BOARDING = 5,
119
+ ACTION_POINT_REQUIRED_ACTION_FUEL_SWITCH = 6,
120
+ ACTION_POINT_REQUIRED_ACTION_MODE_SWITCH = 7,
121
+ ACTION_POINT_REQUIRED_ACTION_INCREASE_LOOKOUT = 8,
122
+ UNRECOGNIZED = -1
123
+ }
124
+ export declare function actionPointRequiredActionFromJSON(object: any): ActionPointRequiredAction;
125
+ export declare function actionPointRequiredActionToJSON(object: ActionPointRequiredAction): string;
126
+ /**
127
+ * A reference to one specific edition of a route.
128
+ *
129
+ * A bare route_id names a LINEAGE, not a document: editions exist precisely so
130
+ * that routes change, so "the route with id X" is ambiguous the moment anyone
131
+ * bumps it. Anything that pins a route — a voyage, an execution sample — must
132
+ * say which edition it pinned, and carrying the pair as a type rather than as
133
+ * two loose fields is what stops the two drifting apart in a message that only
134
+ * remembered to update one of them.
135
+ *
136
+ * Resolution is defined in the protocol specification §6.3: the pair addresses
137
+ * `pubsub/route/{route_id}/edition/{route_edition_number}`. A reference whose
138
+ * edition cannot be resolved is dangling and must be surfaced, never silently
139
+ * resolved to `latest`.
140
+ */
141
+ export interface RouteRef {
142
+ $type: "keelson.RouteRef";
143
+ routeId: string;
144
+ routeEditionNumber: number;
145
+ }
146
+ /**
147
+ * A circle: centre plus radius, in metres.
148
+ *
149
+ * Exists so that geometry can be a `oneof`. Modelled as parallel fields, a
150
+ * centre with no radius, a radius with no centre, and a circle that also
151
+ * carries a polygon are all representable — and a consumer meeting one has no
152
+ * rule for which to believe. Binding the two into a single message makes the
153
+ * incomplete states unrepresentable rather than merely discouraged.
154
+ */
155
+ export interface CircleGeometry {
156
+ $type: "keelson.CircleGeometry";
157
+ centre: LocationFix | undefined;
158
+ radiusM: number;
159
+ }
160
+ /**
161
+ * Vendor- or model-specific data attached to any container. Each entry is
162
+ * scoped by manufacturer + name + version so multiple vendors can coexist on
163
+ * the same route without colliding.
164
+ *
165
+ * NOTE: the per-entry `payload` is a google.protobuf.Any — a deliberate,
166
+ * reviewed exception to the "no opaque escape hatch" guidance (#154), and the
167
+ * ONLY one left in this family (RouteChangeEvent.diff was the other; it was
168
+ * removed rather than granted the same exception, because it was convenience
169
+ * rather than a requirement of the interchange format). It is the
170
+ * vendor-extension mechanism for this RTZ 1.2 / S-421 standards-exchange
171
+ * format, which has to be able to carry data keelson does not model.
172
+ *
173
+ * The exception comes with two obligations, both load-bearing:
174
+ *
175
+ * 1. Producers SHOULD prefer the typed `attributes` map for simple key/values
176
+ * and reserve Any for genuinely vendor-specific structured payloads.
177
+ * 2. A consumer that cannot resolve an entry's `type_url` MUST pass the entry
178
+ * through unchanged rather than drop it. Extensions are the one part of a
179
+ * Route that is opaque by design, so the only way a round-trip through a
180
+ * keelson consumer can be lossless is if unknown entries survive it. An
181
+ * editor that re-publishes a route it does not fully understand and
182
+ * silently discards another vendor's extension has corrupted the artifact.
183
+ */
184
+ export interface Extensions {
185
+ $type: "keelson.Extensions";
186
+ entries: Extensions_Entry[];
187
+ }
188
+ export interface Extensions_Entry {
189
+ $type: "keelson.Extensions.Entry";
190
+ /** Reverse-DNS or short vendor identifier (e.g. "se.rise", "kongsberg"). */
191
+ manufacturer: string;
192
+ /** Vendor-scoped extension name. */
193
+ name: string;
194
+ /** Extension version (semver or vendor-defined). */
195
+ version: string;
196
+ /** Strongly-typed payload. */
197
+ payload: Any | undefined;
198
+ /** Lightweight key/value attributes that don't justify a typed payload. */
199
+ attributes: {
200
+ [key: string]: string;
201
+ };
202
+ }
203
+ export interface Extensions_Entry_AttributesEntry {
204
+ $type: "keelson.Extensions.Entry.AttributesEntry";
205
+ key: string;
206
+ value: string;
207
+ }
208
+ export interface Route {
209
+ $type: "keelson.Route";
210
+ /** Schema version this Route conforms to. */
211
+ version: string;
212
+ /** Globally unique route identifier (UUID recommended). */
213
+ routeId: string;
214
+ /** Monotonically increasing edition number; bumped on any edit. */
215
+ routeEditionNumber: number;
216
+ /**
217
+ * RTZ / S-421 format version this Route is compatible with
218
+ * (e.g. "RTZ-1.2", "S-421-FC1.0").
219
+ */
220
+ routeFormatVersion: string;
221
+ /** Lifecycle status. */
222
+ status: RouteStatus;
223
+ /** Time the route was created and last modified. */
224
+ createdAt: Date | undefined;
225
+ modifiedAt: Date | undefined;
226
+ info: RouteInfo | undefined;
227
+ waypoints: Waypoints | undefined;
228
+ schedules: Schedules | undefined;
229
+ actionPoints: ActionPoints | undefined;
230
+ /** Dynamic hazards / no-go areas valid for this route. */
231
+ hazardZones: HazardZone[];
232
+ /** Structured challenges / risks identified during planning. */
233
+ challenges: RouteChallenge[];
234
+ /** Free-form notes or issues against the route as a whole. */
235
+ issues: RouteIssue[];
236
+ extensions: Extensions | undefined;
237
+ }
238
+ /**
239
+ * Route artifact metadata. Vessel identity, port codes, planned dep/arr times,
240
+ * and voyage_id intentionally live on keelson.Voyage instead of here, so a
241
+ * Route can be authored once and executed by multiple voyages.
242
+ */
243
+ export interface RouteInfo {
244
+ $type: "keelson.RouteInfo";
245
+ /** Human-readable route name. */
246
+ name: string;
247
+ /** Author of the route (planner / system name). */
248
+ author: string;
249
+ /** Organisation owning the route. */
250
+ authorOrganization: string;
251
+ /** Validity window for this route (e.g. tidal window, weather window). */
252
+ validFrom: Date | undefined;
253
+ validTo: Date | undefined;
254
+ /**
255
+ * -- Vessel-class plan constraints ------------------------------------------
256
+ * Dimensions the route was authored against. These are constraints, not
257
+ * identity — the vessel actually executing the voyage may differ within
258
+ * these bounds. Vessel identity lives on keelson.Voyage.
259
+ * `optional` throughout: a plan authored without a beam constraint is not a
260
+ * plan for a vessel of zero beam. Proto3 implicit presence cannot tell the
261
+ * two apart, and 0.0 is the more dangerous reading of the pair.
262
+ */
263
+ vesselLoaM?: number | undefined;
264
+ /** Maximum beam */
265
+ vesselBeamM?: number | undefined;
266
+ /** Maximum draft the route was planned for */
267
+ vesselDraftM?: number | undefined;
268
+ /** Maximum height above waterline */
269
+ vesselAirDraftM?: number | undefined;
270
+ /**
271
+ * -- Operational limits -----------------------------------------------------
272
+ * Limits the route is valid under. Use `optional` so a zero value means
273
+ * "no limit applies" only when the field is set; an unset field means the
274
+ * limit is unknown / not specified.
275
+ */
276
+ maxRollDeg?: number | undefined;
277
+ maxWaveHeightM?: number | undefined;
278
+ maxWindSpeedMps?: number | undefined;
279
+ minSpeedKnots?: number | undefined;
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;
294
+ /**
295
+ * -- Optimization & autonomy ------------------------------------------------
296
+ * Free-form optimization method label (e.g. "fuel-min", "eta-min", "weather-routed").
297
+ */
298
+ optimizationMethod: string;
299
+ /** Target autonomy level this route is authored for. */
300
+ autonomyLevel: AutonomyLevel;
301
+ extensions: Extensions | undefined;
302
+ }
303
+ export interface Waypoints {
304
+ $type: "keelson.Waypoints";
305
+ /** Default values applied to any waypoint or leg that doesn't override them. */
306
+ defaults: DefaultWaypoint | undefined;
307
+ /** Ordered list of waypoints, in route order. */
308
+ waypoint: Waypoint[];
309
+ extensions: Extensions | undefined;
310
+ }
311
+ /**
312
+ * Default values for waypoint/leg fields. RTZ-aligned.
313
+ *
314
+ * The scalars are `optional` for the same reason as their `Waypoint`
315
+ * counterparts, one level up: without presence there is no way to say "this
316
+ * route sets no default speed" as distinct from "this route defaults to
317
+ * zero", and a consumer merging defaults into a waypoint cannot tell which
318
+ * it was handed.
319
+ */
320
+ export interface DefaultWaypoint {
321
+ $type: "keelson.DefaultWaypoint";
322
+ leg: Leg | undefined;
323
+ radiusM?: number | undefined;
324
+ plannedSogKnots?: number | undefined;
325
+ }
326
+ export interface Waypoint {
327
+ $type: "keelson.Waypoint";
328
+ /**
329
+ * Stable waypoint identifier. §6.2 rests its whole addressing rule on this
330
+ * field: array indices mean a different waypoint after an edit, so anything
331
+ * referring to a waypoint MUST carry the id.
332
+ *
333
+ * `string`, matching every other id in this family (Schedule, ActionPoint,
334
+ * HazardZone, RouteChallenge, RouteIssue). The trade-off is RTZ 1.2, where
335
+ * waypoint ids are integers: an importer stringifies and an exporter must
336
+ * parse back, and a non-numeric id is expressible here but not
337
+ * RTZ-exportable. Chosen deliberately — one id type across the family beats
338
+ * fidelity to a format keelson only interoperates with at the edges.
339
+ */
340
+ id: string;
341
+ /** Revision counter for this specific waypoint. */
342
+ revision: number;
343
+ /** Human-readable name (e.g. "WP-007 East of Hanö"). */
344
+ name: string;
345
+ /**
346
+ * WGS-84 position. `Coordinate`, not `LocationFix`: a planned waypoint is
347
+ * a referent, not a measurement, and has no use for a covariance matrix or
348
+ * fix quality. See protocol-specification.md §2.2.1 and §6.8.
349
+ */
350
+ position: Coordinate | undefined;
351
+ /**
352
+ * Planned speed over ground when leaving this waypoint. `optional` because
353
+ * `Waypoints.defaults` backs this field: without presence, "no override,
354
+ * use the default" and "hold zero speed here" are the same bytes, and 0.0
355
+ * is the more dangerous reading of the pair.
356
+ */
357
+ plannedSogKnots?: number | undefined;
358
+ /**
359
+ * Turn radius for fly-by, in metres. `optional` for the same reason —
360
+ * `DefaultWaypoint.radius_m` is the fallback when this is unset.
361
+ */
362
+ radiusM?: number | undefined;
363
+ /**
364
+ * Maximum rate of turn during the turn, degrees per second. Not backed by
365
+ * `defaults`, but 0 is still not a rate anyone means to command.
366
+ */
367
+ rateOfTurnDegps?: number | undefined;
368
+ /** Distance before the turn at which wheel-over should be ordered, metres. */
369
+ wheelOverDistanceM?: number | undefined;
370
+ /**
371
+ * If true, the waypoint is locked and may not be edited by autonomous
372
+ * re-routing.
373
+ */
374
+ lock: boolean;
375
+ /** Operational context for this waypoint (open sea, port approach, lock, ...). */
376
+ operationalContext: OperationalContext;
377
+ /** Outgoing leg from this waypoint to the next. The last waypoint has none. */
378
+ leg: Leg | undefined;
379
+ /** Free-form notes attached to this waypoint. */
380
+ note: string;
381
+ extensions: Extensions | undefined;
382
+ }
383
+ export interface Leg {
384
+ $type: "keelson.Leg";
385
+ /**
386
+ * Cross-track distance (XTD) limits and monitoring thresholds, in metres.
387
+ * `optional` so producers can distinguish "no XTD limit" (unset) from
388
+ * "zero XTD limit" (set to 0).
389
+ */
390
+ xtdPortM?: number | undefined;
391
+ xtdStarboardM?: number | undefined;
392
+ xtdMonitoringPortM?: number | undefined;
393
+ xtdMonitoringStarboardM?: number | undefined;
394
+ /**
395
+ * Safety contour (depth in metres below chart datum) below which the route
396
+ * is considered unsafe.
397
+ */
398
+ safetyContourM?: number | undefined;
399
+ /** Minimum allowed depth on this leg, in metres. */
400
+ safetyDepthM?: number | undefined;
401
+ /** Static under-keel clearance, in metres. */
402
+ ukcStaticM?: number | undefined;
403
+ /** Dynamic under-keel clearance margin, in metres. */
404
+ ukcDynamicM?: number | undefined;
405
+ /**
406
+ * Planned draughts for this leg. `optional` for the same reason as the UKC
407
+ * margins above: a leg with no planned draught is not a leg planned for zero
408
+ * draught, and under-keel arithmetic is the last place to guess.
409
+ */
410
+ draughtBowM?: number | undefined;
411
+ draughtSternM?: number | undefined;
412
+ draughtMeanM?: number | undefined;
413
+ /** Geometry type along this leg. */
414
+ geometryType: GeometryType;
415
+ /**
416
+ * Speed envelope — Speed Over Ground (knots). `optional` so an open-ended
417
+ * envelope is expressible: unset minimum means "no lower bound", which is
418
+ * distinct from a commanded minimum of 0 kn (i.e. stop permitted).
419
+ */
420
+ sogMinKnots?: number | undefined;
421
+ sogMaxKnots?: number | undefined;
422
+ /** Speed envelope — Speed Through Water (knots). Same reading as above. */
423
+ stwMinKnots?: number | undefined;
424
+ stwMaxKnots?: number | undefined;
425
+ /**
426
+ * Dimensional limits for the leg (e.g. bridge clearances, lock dimensions).
427
+ * `optional` so unset means "no limit specified".
428
+ */
429
+ draughtMaxM?: number | undefined;
430
+ airDraftMaxM?: number | undefined;
431
+ beamMaxM?: number | undefined;
432
+ lengthMaxM?: number | undefined;
433
+ /** Free-text reporting / handover text for this leg. */
434
+ report: string;
435
+ /** Free-form notes. */
436
+ note: string;
437
+ /** COLREG annotations. */
438
+ colregSituation: ColregSituation;
439
+ colregTrafficIntensity: ColregTrafficIntensity;
440
+ extensions: Extensions | undefined;
441
+ }
442
+ export interface Schedules {
443
+ $type: "keelson.Schedules";
444
+ /** Multiple schedules can coexist (e.g. "manual", "weather-optimized"). */
445
+ schedule: Schedule[];
446
+ extensions: Extensions | undefined;
447
+ }
448
+ export interface Schedule {
449
+ $type: "keelson.Schedule";
450
+ /** Schedule identifier (unique within the route). */
451
+ id: string;
452
+ /** Free-text name. */
453
+ name: string;
454
+ origin: Schedule_Origin;
455
+ /** Ordered list of schedule entries, one per waypoint. */
456
+ element: ScheduleElement[];
457
+ extensions: Extensions | undefined;
458
+ }
459
+ /** Whether this schedule was authored manually or computed. */
460
+ export declare enum Schedule_Origin {
461
+ ORIGIN_UNSPECIFIED = 0,
462
+ ORIGIN_MANUAL = 1,
463
+ ORIGIN_CALCULATED = 2,
464
+ UNRECOGNIZED = -1
465
+ }
466
+ export declare function schedule_OriginFromJSON(object: any): Schedule_Origin;
467
+ export declare function schedule_OriginToJSON(object: Schedule_Origin): string;
468
+ export interface ScheduleElement {
469
+ $type: "keelson.ScheduleElement";
470
+ /** ID of the waypoint this entry refers to. */
471
+ waypointId: string;
472
+ /** Estimated time of arrival / departure with allowed windows. */
473
+ eta: Date | undefined;
474
+ etaWindowStart: Date | undefined;
475
+ etaWindowEnd: Date | undefined;
476
+ etd: Date | undefined;
477
+ etdWindowStart: Date | undefined;
478
+ etdWindowEnd: Date | undefined;
479
+ /** Planned duration of stay at this waypoint (port, anchorage, ...). */
480
+ stay: Duration | undefined;
481
+ /** -- Environmental forecast for this leg ------------------------------------ */
482
+ windSpeedMps: number;
483
+ windDirectionDeg: number;
484
+ currentSpeedMps: number;
485
+ currentDirectionDeg: number;
486
+ waveHeightM: number;
487
+ wavePeriodS: number;
488
+ waveDirectionDeg: number;
489
+ /** -- Energy / propulsion plan ---------------------------------------------- */
490
+ plannedRpm: number;
491
+ plannedPropellerPitchPct: number;
492
+ plannedFuelKg: number;
493
+ /** Fuel savings versus a reference plan, in kilograms (negative = increase). */
494
+ fuelSavingVsReferenceKg: number;
495
+ extensions: Extensions | undefined;
496
+ }
497
+ export interface ActionPoints {
498
+ $type: "keelson.ActionPoints";
499
+ actionPoint: ActionPoint[];
500
+ extensions: Extensions | undefined;
501
+ }
502
+ export interface ActionPoint {
503
+ $type: "keelson.ActionPoint";
504
+ /** Stable action-point identifier. */
505
+ id: string;
506
+ /** Human-readable name. */
507
+ name: string;
508
+ circle?: CircleGeometry | undefined;
509
+ areaGeojson?: GeoJSON | undefined;
510
+ /**
511
+ * Lead time before crossing the geometry at which the action should be
512
+ * triggered (e.g. 5 minutes before pilot boarding ground).
513
+ */
514
+ timeToAct: Duration | undefined;
515
+ /** Required action. */
516
+ requiredAction: ActionPointRequiredAction;
517
+ /**
518
+ * Free-form action description (always required when required_action is
519
+ * USER_DEFINED; otherwise supplements the enum).
520
+ */
521
+ description: string;
522
+ extensions: Extensions | undefined;
523
+ }
524
+ export interface HazardZone {
525
+ $type: "keelson.HazardZone";
526
+ /** Stable hazard identifier. */
527
+ id: string;
528
+ type: HazardZoneType;
529
+ /** Hazard severity. */
530
+ severity: SeverityLevel;
531
+ /** Free-text description. */
532
+ description: string;
533
+ circle?: CircleGeometry | undefined;
534
+ polygonGeojson?: GeoJSON | undefined;
535
+ /** Validity window for the hazard. */
536
+ validFrom: Date | undefined;
537
+ validTo: Date | undefined;
538
+ extensions: Extensions | undefined;
539
+ }
540
+ export interface RouteChallenge {
541
+ $type: "keelson.RouteChallenge";
542
+ id: string;
543
+ type: RouteChallengeType;
544
+ severity: SeverityLevel;
545
+ description: string;
546
+ /** Waypoint IDs the challenge applies to (empty = whole route). */
547
+ waypointIds: string[];
548
+ extensions: Extensions | undefined;
549
+ }
550
+ export interface RouteIssue {
551
+ $type: "keelson.RouteIssue";
552
+ id: string;
553
+ severity: SeverityLevel;
554
+ description: string;
555
+ raisedAt: Date | undefined;
556
+ raisedBy: string;
557
+ extensions: Extensions | undefined;
558
+ }
559
+ /**
560
+ * The signatures attesting to one specific route edition, published on the
561
+ * `route_signature` subject at
562
+ * route_signature/{route_id}/edition/{N}
563
+ * alongside the edition they attest to, never inside it.
564
+ *
565
+ * WHAT IS SIGNED — see protocol-specification.md §6.3.1 for the normative rule.
566
+ * The signing input is exactly the `Envelope.payload` bytes stored at
567
+ * `route/{route_id}/edition/{N}`: the serialized keelson.Route, byte for byte
568
+ * as the publisher wrote it. Verification is a `get` on that key followed by a
569
+ * signature check over the returned bytes verbatim — no re-serialization, no
570
+ * field reordering, no canonicalization step to disagree about.
571
+ *
572
+ * This works only because §6.3 makes an edition key immutable once written. An
573
+ * edition is not a mutable document that happens to have a version number; it
574
+ * is a fixed artifact, and that is what makes it signable at all. If editions
575
+ * ever became rewritable, this scheme would have to be revisited — a signature
576
+ * over bytes that can change underneath it attests to nothing.
577
+ *
578
+ * Separating the two also means signing does not bump the edition: attesting
579
+ * to a plan is not editing it, and a signature arriving late (a second master
580
+ * countersigning hours later) adds an entry here without disturbing the
581
+ * artifact or the change log.
582
+ */
583
+ export interface RouteSignatures {
584
+ $type: "keelson.RouteSignatures";
585
+ /** The edition these signatures attest to. */
586
+ routeRef: RouteRef | undefined;
587
+ /** One entry per signer. Order is not significant. */
588
+ signatures: RouteSignature[];
589
+ extensions: Extensions | undefined;
590
+ }
591
+ export interface RouteSignature {
592
+ $type: "keelson.RouteSignature";
593
+ /** Free-form signer identifier (e.g. user id, system id). */
594
+ signerId: string;
595
+ /** Signer role (e.g. "master", "planner", "shore-control"). */
596
+ signerRole: string;
597
+ /** Signing algorithm (e.g. "ed25519", "ecdsa-p256-sha256"). */
598
+ algorithm: string;
599
+ /** Raw signature bytes. */
600
+ signature: Uint8Array;
601
+ /** Time of signing. */
602
+ signedAt: Date | undefined;
603
+ /** Reference to the public key used to verify (key id, URL, fingerprint). */
604
+ keyReference: string;
605
+ extensions: Extensions | undefined;
606
+ }
607
+ /**
608
+ * Standalone, structured payload for the `route_status` subject. Replaces the
609
+ * previous TimestampedString mapping so subscribers can act on the standard
610
+ * RouteStatus enum without parsing free-form text.
611
+ */
612
+ export interface RouteStatusUpdate {
613
+ $type: "keelson.RouteStatusUpdate";
614
+ timestamp: Date | undefined;
615
+ routeId: string;
616
+ routeEditionNumber: number;
617
+ status: RouteStatus;
618
+ changedBy: string;
619
+ note: string;
620
+ }
621
+ export declare const RouteRef: MessageFns<RouteRef, "keelson.RouteRef">;
622
+ export declare const CircleGeometry: MessageFns<CircleGeometry, "keelson.CircleGeometry">;
623
+ export declare const Extensions: MessageFns<Extensions, "keelson.Extensions">;
624
+ export declare const Extensions_Entry: MessageFns<Extensions_Entry, "keelson.Extensions.Entry">;
625
+ export declare const Extensions_Entry_AttributesEntry: MessageFns<Extensions_Entry_AttributesEntry, "keelson.Extensions.Entry.AttributesEntry">;
626
+ export declare const Route: MessageFns<Route, "keelson.Route">;
627
+ export declare const RouteInfo: MessageFns<RouteInfo, "keelson.RouteInfo">;
628
+ export declare const Waypoints: MessageFns<Waypoints, "keelson.Waypoints">;
629
+ export declare const DefaultWaypoint: MessageFns<DefaultWaypoint, "keelson.DefaultWaypoint">;
630
+ export declare const Waypoint: MessageFns<Waypoint, "keelson.Waypoint">;
631
+ export declare const Leg: MessageFns<Leg, "keelson.Leg">;
632
+ export declare const Schedules: MessageFns<Schedules, "keelson.Schedules">;
633
+ export declare const Schedule: MessageFns<Schedule, "keelson.Schedule">;
634
+ export declare const ScheduleElement: MessageFns<ScheduleElement, "keelson.ScheduleElement">;
635
+ export declare const ActionPoints: MessageFns<ActionPoints, "keelson.ActionPoints">;
636
+ export declare const ActionPoint: MessageFns<ActionPoint, "keelson.ActionPoint">;
637
+ export declare const HazardZone: MessageFns<HazardZone, "keelson.HazardZone">;
638
+ export declare const RouteChallenge: MessageFns<RouteChallenge, "keelson.RouteChallenge">;
639
+ export declare const RouteIssue: MessageFns<RouteIssue, "keelson.RouteIssue">;
640
+ export declare const RouteSignatures: MessageFns<RouteSignatures, "keelson.RouteSignatures">;
641
+ export declare const RouteSignature: MessageFns<RouteSignature, "keelson.RouteSignature">;
642
+ export declare const RouteStatusUpdate: MessageFns<RouteStatusUpdate, "keelson.RouteStatusUpdate">;
643
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
644
+ 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 {} ? {
645
+ [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
646
+ } : Partial<T>;
647
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
648
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
649
+ [K in keyof P]: Exact<P[K], I[K]>;
650
+ } & {
651
+ [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
652
+ };
653
+ interface MessageFns<T, V extends string> {
654
+ readonly $type: V;
655
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
656
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
657
+ fromJSON(object: any): T;
658
+ toJSON(message: T): unknown;
659
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
660
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
661
+ }
662
+ export {};