@rise-maritime/keelson-js 0.6.0-alpha.255.dev.1 → 0.6.0-alpha.275.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 +83 -8
- package/dist/index.js +23 -1
- package/dist/index.test.js +31 -0
- package/dist/interfaces/AlarmAck.d.ts +2 -2
- package/dist/interfaces/AlarmAck.js +2 -2
- package/dist/interfaces/ContainerControl.d.ts +239 -0
- package/dist/interfaces/ContainerControl.js +1053 -0
- package/dist/interfaces/ContainerHost.d.ts +403 -0
- package/dist/interfaces/ContainerHost.js +1230 -0
- package/dist/interfaces/ErrorResponse.d.ts +7 -2
- package/dist/interfaces/ErrorResponse.js +12 -2
- package/dist/interfaces/Route.d.ts +141 -6
- package/dist/interfaces/Route.js +309 -4
- package/dist/interfaces/RoutePlanner.d.ts +19 -1
- package/dist/interfaces/RoutePlanner.js +23 -1
- package/dist/interfaces/ScenarioControl.d.ts +132 -3
- package/dist/interfaces/ScenarioControl.js +439 -37
- package/dist/interfaces/VehicleNavigation.d.ts +55 -0
- package/dist/interfaces/VehicleNavigation.js +233 -1
- package/dist/interfaces/VehicleSimulatorControl.d.ts +0 -83
- package/dist/interfaces/VehicleSimulatorControl.js +1 -293
- package/dist/interfaces/serviceRegistry.d.ts +84 -8
- package/dist/interfaces/serviceRegistry.js +4 -0
- package/dist/interfaces.json +2 -0
- package/dist/payloads/AdviceDisposition.d.ts +55 -0
- package/dist/payloads/AdviceDisposition.js +242 -0
- package/dist/payloads/ChecklistHandover.d.ts +522 -0
- package/dist/payloads/ChecklistHandover.js +1735 -0
- package/dist/payloads/ContainerHost.d.ts +407 -0
- package/dist/payloads/ContainerHost.js +1245 -0
- package/dist/payloads/Encounter.d.ts +104 -0
- package/dist/payloads/Encounter.js +573 -0
- package/dist/payloads/NavigationAdvice.d.ts +94 -0
- package/dist/payloads/NavigationAdvice.js +596 -0
- package/dist/payloads/NavigationState.d.ts +90 -0
- package/dist/payloads/NavigationState.js +377 -0
- package/dist/payloads/Route.d.ts +142 -6
- package/dist/payloads/Route.js +318 -4
- package/dist/payloads/RouteExecution.d.ts +7 -0
- package/dist/payloads/ScenarioEvent.d.ts +14 -0
- package/dist/payloads/ScenarioEvent.js +16 -0
- package/dist/payloads/index.d.ts +1 -1
- package/dist/payloads/index.js +2 -2
- package/dist/payloads/index.keelson.d.ts +10 -4
- package/dist/payloads/index.keelson.js +10 -4
- package/dist/qos.json +6 -0
- package/dist/subjects.json +20 -1
- package/package.json +1 -1
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { ChecklistState_ItemState_ItemStatus } from "./ChecklistState";
|
|
3
|
+
import { Coordinate } from "./Coordinate";
|
|
4
|
+
import { OperationalAuthority_AuthorityConstraint, OperationalAuthority_AuthorityLevel } from "./OperationalAuthority";
|
|
5
|
+
import { SeverityLevel } from "./Severity";
|
|
6
|
+
/**
|
|
7
|
+
* The briefing one operator hands the next at a watch change, and the signature saying it was
|
|
8
|
+
* received.
|
|
9
|
+
*
|
|
10
|
+
* WHAT ALREADY EXISTS, AND WHY NEITHER COVERS THIS. Two messages model parts of a watch change:
|
|
11
|
+
*
|
|
12
|
+
* command_authority moves the conn. A short-lived lease in front of actuation — a PERMISSION,
|
|
13
|
+
* not a record; nothing about it survives the next heartbeat.
|
|
14
|
+
* checklist_* carries the PROCEDURE an operator works through. A handover-category
|
|
15
|
+
* procedure's required items are this briefing's agenda.
|
|
16
|
+
*
|
|
17
|
+
* What had no message is the briefing itself: what the vessel was doing, what is still open, what
|
|
18
|
+
* the relief needs to worry about, who accepted it and when. That is the artefact a watch change
|
|
19
|
+
* produces and the one an investigation asks for.
|
|
20
|
+
*
|
|
21
|
+
* IT DOES NOT MOVE COMMAND AUTHORITY, and a consumer MUST NOT infer that it does. Accepting a
|
|
22
|
+
* briefing and being ready to take control are two decisions, taken separately and deliberately:
|
|
23
|
+
* a station may hold an ACCEPTED handover and not hold the conn, and may hold the conn with no
|
|
24
|
+
* handover at all. Nor does it replace the handover procedure — `run_id` names the run whose items
|
|
25
|
+
* were the agenda, and that run is worked through checklist_state as usual.
|
|
26
|
+
*
|
|
27
|
+
* THE KEY is `checklist_handover/{handover_id}`, where handover_id is a SINGLE token by
|
|
28
|
+
* construction so `.../checklist_handover/*` covers it. A composite id — `{from_roc}/{to_roc}` is
|
|
29
|
+
* the tempting one — publishes without error and never persists, because the storage's key
|
|
30
|
+
* expression simply does not match it. Who it is from and to travels in the payload.
|
|
31
|
+
*
|
|
32
|
+
* A SNAPSHOT, NOT AN EVENT. Meant to be backed by a router storage (§7.3). A handover published on
|
|
33
|
+
* an ephemeral key is invisible to any station that joined afterwards, which is precisely the
|
|
34
|
+
* station the relieving operator is sitting at. Convergence, precedence and single-writer rules are
|
|
35
|
+
* normative in protocol-specification.md §7.5; this file states the schema half.
|
|
36
|
+
*
|
|
37
|
+
* Not the same as a TaskHandoff between VEHICLES (RISE-Maritime/keelson#211). The participants, the
|
|
38
|
+
* content and the lifetime all differ; only the outcome vocabulary is shared, and this one needs
|
|
39
|
+
* two states #211 has no use for.
|
|
40
|
+
*/
|
|
41
|
+
export interface ChecklistHandover {
|
|
42
|
+
$type: "keelson.ChecklistHandover";
|
|
43
|
+
/**
|
|
44
|
+
* When THIS VERSION of the record was written.
|
|
45
|
+
*
|
|
46
|
+
* The last-writer-wins tiebreak of §7.5.2, and the same role ChecklistState.timestamp plays in
|
|
47
|
+
* §7.2. Consulted only AFTER the status rules: a terminal status beats a live one regardless of
|
|
48
|
+
* this field, and two different terminals are decided by precedence rather than by it. A record
|
|
49
|
+
* with no timestamp loses to one that has it — a publisher that cannot say when it wrote should
|
|
50
|
+
* not overwrite one that can.
|
|
51
|
+
*/
|
|
52
|
+
timestamp: Date | undefined;
|
|
53
|
+
/** Globally unique, and the last token of this record's key. ONE TOKEN — see the message comment. */
|
|
54
|
+
handoverId: string;
|
|
55
|
+
/**
|
|
56
|
+
* The checklist run whose items were this briefing's agenda, or empty when the station had no
|
|
57
|
+
* handover-category procedure to run.
|
|
58
|
+
*
|
|
59
|
+
* THE LINK IS ONE-DIRECTIONAL, AND THAT IS NOT AN OVERSIGHT. ChecklistState deliberately has no
|
|
60
|
+
* handover id and must not grow one. A run is a unit of work that exists whether or not a watch
|
|
61
|
+
* changed; a handover is the thing that references it. Both subjects are durable, so a consumer
|
|
62
|
+
* derives the reverse link locally by matching this field — no wire round-trip, and no second
|
|
63
|
+
* writer to the run's key.
|
|
64
|
+
*/
|
|
65
|
+
runId: string;
|
|
66
|
+
status: ChecklistHandover_HandoverStatus;
|
|
67
|
+
offeredBy: ChecklistHandover_Party | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The relief. MAY be empty: a handover offered to whoever is next on is still a valid record —
|
|
70
|
+
* it is an open offer.
|
|
71
|
+
*/
|
|
72
|
+
offeredTo: ChecklistHandover_Party | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Set only when a PERSON declined. Never set on a vessel refusal, which is exactly why it cannot
|
|
75
|
+
* stand in for `refusal_source`.
|
|
76
|
+
*/
|
|
77
|
+
refusedBy: ChecklistHandover_Party | undefined;
|
|
78
|
+
refusalSource: ChecklistHandover_RefusalSource;
|
|
79
|
+
/**
|
|
80
|
+
* Why it was declined, or the vessel's own `reason` copied forward.
|
|
81
|
+
*
|
|
82
|
+
* ITS OWN FIELD, never acknowledgment_note. "I signed for this" and "I would not take this watch"
|
|
83
|
+
* in one slot gives a record that cannot tell them apart afterwards, which is worse than one
|
|
84
|
+
* carrying neither.
|
|
85
|
+
*/
|
|
86
|
+
refusalReason: string;
|
|
87
|
+
/** What the relief wrote when they signed. Empty until they do. */
|
|
88
|
+
acknowledgmentNote: string;
|
|
89
|
+
offeredAt: Date | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* The deadline, ON THE RECORD.
|
|
92
|
+
*
|
|
93
|
+
* A RECEIVER DERIVES EXPIRY FROM THIS FIELD, NEVER FROM A LOCAL TIMER — the OPPOSITE of the lease
|
|
94
|
+
* rule in §6.5.1, so read this before assuming it is a bug. A lease is a mutual-exclusion
|
|
95
|
+
* interlock where an early expiry lets two stations act at once, so it arms on the receiver's own
|
|
96
|
+
* clock. A handover offer interlocks nothing. It is a durable record that outlives every tab, so
|
|
97
|
+
* a station booting an hour later must reach the same verdict as one that watched the deadline
|
|
98
|
+
* pass — and it cannot, if the deadline only ever existed in somebody else's timer. The cost is
|
|
99
|
+
* trusting the offerer's clock; the worst case is an offer that looks stale a few seconds early.
|
|
100
|
+
*
|
|
101
|
+
* Every station may DERIVE that an offer is dead. Only the offering station may PUBLISH
|
|
102
|
+
* HANDOVER_STATUS_EXPIRED — see §7.5.3.
|
|
103
|
+
*/
|
|
104
|
+
expiresAt: Date | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* When the RELIEF signed. Stamped even when the record then goes to PENDING_VESSEL, and NOT
|
|
107
|
+
* overwritten when the vessel answers: those are two instants and the record must keep both.
|
|
108
|
+
*/
|
|
109
|
+
acceptedAt: Date | undefined;
|
|
110
|
+
refusedAt: Date | undefined;
|
|
111
|
+
/** When the vessel answered, on confirmation and refusal alike. */
|
|
112
|
+
vesselConfirmedAt: Date | undefined;
|
|
113
|
+
vessel: ChecklistHandover_VesselRef | undefined;
|
|
114
|
+
vesselStatus: ChecklistHandover_VesselStatus | undefined;
|
|
115
|
+
vesselVerdict: ChecklistHandover_VesselVerdict | undefined;
|
|
116
|
+
openItems: ChecklistHandover_OpenItem[];
|
|
117
|
+
activeRisks: ChecklistHandover_ActiveRisk[];
|
|
118
|
+
/**
|
|
119
|
+
* Free text. Nothing in the system can derive what is pending on the radio, so this is the one
|
|
120
|
+
* part of a briefing that is genuinely the outgoing operator's to write.
|
|
121
|
+
*/
|
|
122
|
+
keyCommunications: string[];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The six states a handover can hold, and the two that are not terminal.
|
|
126
|
+
*
|
|
127
|
+
* OFFERED and PENDING_VESSEL are live: the first waits on the relief, the second on the vessel.
|
|
128
|
+
* The other four are absorbing.
|
|
129
|
+
*
|
|
130
|
+
* TERMINAL PRECEDENCE IS NOT THE ENUM ORDER, even though the numbering below happens to agree
|
|
131
|
+
* with it. §7.5.1's table is normative:
|
|
132
|
+
*
|
|
133
|
+
* ACCEPTED > REFUSED > CANCELLED > EXPIRED
|
|
134
|
+
*
|
|
135
|
+
* The numbering is laid out to match as a mnemonic and a reader may NOT rely on it: a future
|
|
136
|
+
* terminal state will be appended at the end whatever its precedence, because renumbering
|
|
137
|
+
* silently reinterprets every record already in storage.
|
|
138
|
+
*
|
|
139
|
+
* Why precedence rather than last-writer-wins. While ACCEPTED and CANCELLED were the only
|
|
140
|
+
* terminals, "terminal beats non-terminal" happened to be a total order — only the relief could
|
|
141
|
+
* accept and only the offerer could cancel, so two stations could never reach DIFFERENT
|
|
142
|
+
* terminals. With four they can, and routinely will: the relief declines at the same moment the
|
|
143
|
+
* offerer's deadline passes, and both publish. Falling through to last-writer-wins there decides
|
|
144
|
+
* a safety record by whose clock is faster. The order is safety-conservative and the top of it is
|
|
145
|
+
* the rule: NEVER LET A TIMER ERASE A SIGNATURE. An acceptance is somebody putting their name to
|
|
146
|
+
* the watch; an expiry is nobody doing anything.
|
|
147
|
+
*/
|
|
148
|
+
export declare enum ChecklistHandover_HandoverStatus {
|
|
149
|
+
HANDOVER_STATUS_UNKNOWN = 0,
|
|
150
|
+
/** HANDOVER_STATUS_OFFERED - Live. Offered to the relief, not yet answered. */
|
|
151
|
+
HANDOVER_STATUS_OFFERED = 1,
|
|
152
|
+
/**
|
|
153
|
+
* HANDOVER_STATUS_PENDING_VESSEL - Live. The relief has signed and the vessel has not yet answered. Only reachable where a
|
|
154
|
+
* watch_handover connector is deployed; whether an acceptance passes through this state is the
|
|
155
|
+
* accepting client's decision, not a property of the record, because a fleet running no such
|
|
156
|
+
* connector must not have every handover stall here.
|
|
157
|
+
*/
|
|
158
|
+
HANDOVER_STATUS_PENDING_VESSEL = 2,
|
|
159
|
+
/** HANDOVER_STATUS_ACCEPTED - Terminal. Somebody signed for the watch. */
|
|
160
|
+
HANDOVER_STATUS_ACCEPTED = 3,
|
|
161
|
+
/**
|
|
162
|
+
* HANDOVER_STATUS_REFUSED - Terminal, and TWO DIFFERENT ACTS deliberately sharing one status — a refusal is a refusal to
|
|
163
|
+
* whoever is waiting on it. They mean opposite things to an auditor, so `refusal_source` tells
|
|
164
|
+
* them apart; see it for why an absence could not.
|
|
165
|
+
*/
|
|
166
|
+
HANDOVER_STATUS_REFUSED = 4,
|
|
167
|
+
/** HANDOVER_STATUS_CANCELLED - Terminal. The offering operator withdrew an offer nobody took. */
|
|
168
|
+
HANDOVER_STATUS_CANCELLED = 5,
|
|
169
|
+
/**
|
|
170
|
+
* HANDOVER_STATUS_EXPIRED - Terminal. The deadline in `expires_at` passed unanswered. Published by the OFFERING station
|
|
171
|
+
* only — see that field and §7.5.3.
|
|
172
|
+
*/
|
|
173
|
+
HANDOVER_STATUS_EXPIRED = 6,
|
|
174
|
+
UNRECOGNIZED = -1
|
|
175
|
+
}
|
|
176
|
+
export declare function checklistHandover_HandoverStatusFromJSON(object: any): ChecklistHandover_HandoverStatus;
|
|
177
|
+
export declare function checklistHandover_HandoverStatusToJSON(object: ChecklistHandover_HandoverStatus): string;
|
|
178
|
+
/**
|
|
179
|
+
* Whether a value may be shown as a measurement at all, and if not, why not.
|
|
180
|
+
*
|
|
181
|
+
* THE FAILURE THIS EXISTS TO PREVENT. Own-ship values that default to 0.0 and are re-zeroed on
|
|
182
|
+
* platform switch structurally cannot express "no source configured". On a handover that matters
|
|
183
|
+
* more than anywhere else: a briefing reading 0.0 kn when the truth is "no GNSS" is worse than
|
|
184
|
+
* one reading nothing, because the relief believes it.
|
|
185
|
+
*
|
|
186
|
+
* A CONSUMER MUST NOT RENDER A VALUE AS A MEASUREMENT UNLESS availability IS
|
|
187
|
+
* AVAILABILITY_AVAILABLE. That rule is what makes the zero sentinel safe: an unset availability,
|
|
188
|
+
* and any value a future revision adds that this build does not know, both fail closed to
|
|
189
|
+
* "no source" rather than open to a number.
|
|
190
|
+
*/
|
|
191
|
+
export declare enum ChecklistHandover_Availability {
|
|
192
|
+
/** AVAILABILITY_UNKNOWN - Nothing was said. Treat exactly as NO_SOURCE — never as "probably fine". */
|
|
193
|
+
AVAILABILITY_UNKNOWN = 0,
|
|
194
|
+
/**
|
|
195
|
+
* AVAILABILITY_NO_SOURCE - No sensor is configured for this. A deployment fact, and the one #218 is about:
|
|
196
|
+
* distinguishable from UNKNOWN so a briefing can say "there is no GNSS on this platform"
|
|
197
|
+
* rather than "nobody told me".
|
|
198
|
+
*/
|
|
199
|
+
AVAILABILITY_NO_SOURCE = 1,
|
|
200
|
+
/**
|
|
201
|
+
* AVAILABILITY_AVAILABLE - A source exists and this is its reading. The only value that may be rendered as a bare
|
|
202
|
+
* number.
|
|
203
|
+
*/
|
|
204
|
+
AVAILABILITY_AVAILABLE = 2,
|
|
205
|
+
/**
|
|
206
|
+
* AVAILABILITY_STALE - A source exists and has stopped updating. A value MAY be carried; if it is, it MUST be
|
|
207
|
+
* rendered with `observed_at` beside it, never bare.
|
|
208
|
+
*/
|
|
209
|
+
AVAILABILITY_STALE = 3,
|
|
210
|
+
/**
|
|
211
|
+
* AVAILABILITY_INVALID - A source exists and reported a fault. Materially different from silence to a relief
|
|
212
|
+
* operator, which is why it is not folded into NO_SOURCE.
|
|
213
|
+
*/
|
|
214
|
+
AVAILABILITY_INVALID = 4,
|
|
215
|
+
UNRECOGNIZED = -1
|
|
216
|
+
}
|
|
217
|
+
export declare function checklistHandover_AvailabilityFromJSON(object: any): ChecklistHandover_Availability;
|
|
218
|
+
export declare function checklistHandover_AvailabilityToJSON(object: ChecklistHandover_Availability): string;
|
|
219
|
+
/**
|
|
220
|
+
* Which of the two acts a HANDOVER_STATUS_REFUSED record is.
|
|
221
|
+
*
|
|
222
|
+
* STATED RATHER THAN INFERRED, and that is the change from the provisional JSON form this
|
|
223
|
+
* replaces. There it was derived from two absences — a vessel timestamp set while the refusing
|
|
224
|
+
* party was unset — and an absence reads as "unknown" rather than as "the vessel". Two clients
|
|
225
|
+
* had each derived it inline and a third would have had to guess. A decline is a person
|
|
226
|
+
* exercising judgement; a vessel refusal is a machine applying a configured floor, and only the
|
|
227
|
+
* second says anything about whether that floor is set right.
|
|
228
|
+
*/
|
|
229
|
+
export declare enum ChecklistHandover_RefusalSource {
|
|
230
|
+
REFUSAL_SOURCE_UNKNOWN = 0,
|
|
231
|
+
REFUSAL_SOURCE_OPERATOR = 1,
|
|
232
|
+
REFUSAL_SOURCE_VESSEL = 2,
|
|
233
|
+
UNRECOGNIZED = -1
|
|
234
|
+
}
|
|
235
|
+
export declare function checklistHandover_RefusalSourceFromJSON(object: any): ChecklistHandover_RefusalSource;
|
|
236
|
+
export declare function checklistHandover_RefusalSourceToJSON(object: ChecklistHandover_RefusalSource): string;
|
|
237
|
+
/**
|
|
238
|
+
* One party to the handover, reduced to what the record needs.
|
|
239
|
+
*
|
|
240
|
+
* Spelled `offered_by` / `offered_to` / `refused_by` rather than `from` / `to`: `from` is a
|
|
241
|
+
* reserved word in Python, and this repo ships a Python SDK.
|
|
242
|
+
*/
|
|
243
|
+
export interface ChecklistHandover_Party {
|
|
244
|
+
$type: "keelson.ChecklistHandover.Party";
|
|
245
|
+
operatorId: string;
|
|
246
|
+
username: string;
|
|
247
|
+
role: string;
|
|
248
|
+
rocSite: string;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* The vessel the briefing describes, and the one asked to confirm where that is switched on.
|
|
252
|
+
* A realm + entity pair because the record lives on the ROC's key, not the vessel's.
|
|
253
|
+
*/
|
|
254
|
+
export interface ChecklistHandover_VesselRef {
|
|
255
|
+
$type: "keelson.ChecklistHandover.VesselRef";
|
|
256
|
+
realm: string;
|
|
257
|
+
entityId: string;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* One instrument reading as the outgoing operator's display showed it — including showing
|
|
261
|
+
* nothing.
|
|
262
|
+
*
|
|
263
|
+
* BELT AND BRACES, and both halves earn their place. The `value` oneof says whether there IS a
|
|
264
|
+
* number: a oneof member carries explicit presence, so a set 0.0 is distinguishable from a
|
|
265
|
+
* defaulted one, which a bare double is not. `availability` says WHY there is not, which presence
|
|
266
|
+
* alone cannot express — "no GNSS fitted" and "the GNSS failed" are both absences and a relief
|
|
267
|
+
* needs to be told which.
|
|
268
|
+
*
|
|
269
|
+
* A MEASURED ZERO IS A REAL READING. Stopped in the water is 0.0 kn with AVAILABILITY_AVAILABLE
|
|
270
|
+
* and it must survive every hop; that case is the whole reason this is not a nullable double.
|
|
271
|
+
*/
|
|
272
|
+
export interface ChecklistHandover_Reading {
|
|
273
|
+
$type: "keelson.ChecklistHandover.Reading";
|
|
274
|
+
availability: ChecklistHandover_Availability;
|
|
275
|
+
scalar?: number | undefined;
|
|
276
|
+
/**
|
|
277
|
+
* A position, carried here rather than as a foxglove.LocationFix.
|
|
278
|
+
*
|
|
279
|
+
* Coordinate.proto asks that telemetry fixes stay foxglove.LocationFix because a measured fix
|
|
280
|
+
* carries sensor context. That rule is about telemetry, and this is not telemetry: a briefing
|
|
281
|
+
* records WHAT THE OUTGOING OPERATOR'S DISPLAY SHOWED, which is a latitude and a longitude.
|
|
282
|
+
* Covariance and frame_id were not part of what they saw, and a frozen briefing is not a fix.
|
|
283
|
+
*/
|
|
284
|
+
coordinate?: Coordinate | undefined;
|
|
285
|
+
/**
|
|
286
|
+
* The instrument, so a briefing can say "GNSS 1 — no data" rather than blanking. Carried on an
|
|
287
|
+
* unavailable reading too, deliberately: naming the source that is missing is more use than a
|
|
288
|
+
* blank.
|
|
289
|
+
*/
|
|
290
|
+
sourceName: string;
|
|
291
|
+
/**
|
|
292
|
+
* When the value was MEASURED, not when this record was written. Required in practice on
|
|
293
|
+
* AVAILABILITY_STALE — a stale value with no age is a number nobody can judge.
|
|
294
|
+
*/
|
|
295
|
+
observedAt: Date | undefined;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* What the vessel was doing when the briefing was written.
|
|
299
|
+
*
|
|
300
|
+
* Frozen at that instant and never edited afterwards (§7.5.2). A briefing is a statement of
|
|
301
|
+
* conditions at a moment; one that keeps updating is not a record of anything.
|
|
302
|
+
*/
|
|
303
|
+
export interface ChecklistHandover_VesselStatus {
|
|
304
|
+
$type: "keelson.ChecklistHandover.VesselStatus";
|
|
305
|
+
platformName: string;
|
|
306
|
+
/**
|
|
307
|
+
* Free text: "underway, making way", "alongside berth 4". Nothing in the system derives this,
|
|
308
|
+
* so it is the operator's to write.
|
|
309
|
+
*/
|
|
310
|
+
condition: string;
|
|
311
|
+
speedOverGroundKnots: ChecklistHandover_Reading | undefined;
|
|
312
|
+
/**
|
|
313
|
+
* TRUE north. A magnetic-only source is either converted before it gets here or reported
|
|
314
|
+
* AVAILABILITY_NO_SOURCE — a briefing must not leave which datum it meant to the reader.
|
|
315
|
+
*/
|
|
316
|
+
headingDeg: ChecklistHandover_Reading | undefined;
|
|
317
|
+
/** Carries a Coordinate in its `value` oneof rather than a scalar. */
|
|
318
|
+
position: ChecklistHandover_Reading | undefined;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* One checklist item still outstanding across the runs this briefing covers.
|
|
322
|
+
*
|
|
323
|
+
* A structured reference rather than a sentence, so the relief can click through to the item
|
|
324
|
+
* instead of reading about it. Parent headings are excluded by the publisher: a parent has no
|
|
325
|
+
* ItemState and can never be ticked, so listing one reports work nobody can do.
|
|
326
|
+
*/
|
|
327
|
+
export interface ChecklistHandover_OpenItem {
|
|
328
|
+
$type: "keelson.ChecklistHandover.OpenItem";
|
|
329
|
+
runId: string;
|
|
330
|
+
itemId: string;
|
|
331
|
+
title: string;
|
|
332
|
+
/**
|
|
333
|
+
* Carried because a receiver may hold an item whose run definition has not arrived off the bus,
|
|
334
|
+
* and a bare item id in a briefing is unreadable.
|
|
335
|
+
*/
|
|
336
|
+
procedureTitle: string;
|
|
337
|
+
/**
|
|
338
|
+
* EXPLICIT PRESENCE, and this is the one field in the family that has it.
|
|
339
|
+
* ChecklistProcedure.Item.is_required is a plain bool defaulting to false; here the safe
|
|
340
|
+
* reading is the opposite. AN UNSET is_required MUST BE READ AS REQUIRED — a publisher that
|
|
341
|
+
* did not say must not thereby understate what is outstanding at a watch change. Wire-
|
|
342
|
+
* compatible with a plain bool, so ChecklistProcedure.Item could adopt the same presence bit
|
|
343
|
+
* later without renumbering.
|
|
344
|
+
*/
|
|
345
|
+
isRequired?: boolean | undefined;
|
|
346
|
+
/**
|
|
347
|
+
* Reused rather than redeclared: an open item's status IS a ChecklistState item status, and a
|
|
348
|
+
* parallel enum here would need a mapping table in every client and would drift from it.
|
|
349
|
+
* ITEM_STATUS_COMPLETED never appears — a completed item is not open. Note that enum's zero
|
|
350
|
+
* value is PENDING rather than an UNKNOWN sentinel, which is right here for the same reason it
|
|
351
|
+
* is right there: an item has no unknown state, it has simply not been started.
|
|
352
|
+
*/
|
|
353
|
+
status: ChecklistState_ItemState_ItemStatus;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Something the relief needs to worry about: a flagged checklist item, or an unacknowledged
|
|
357
|
+
* alert.
|
|
358
|
+
*
|
|
359
|
+
* ONE ORDERED LIST WITH A KIND, not two repeated fields and not a oneof. The two sources share
|
|
360
|
+
* everything a reader acts on — a title, a detail, when and by whom — and differ only in which
|
|
361
|
+
* thing they point at. Two repeated fields would destroy the single ordering the outgoing
|
|
362
|
+
* operator chose and force every client to invent its own interleave rule for a safety briefing.
|
|
363
|
+
* A oneof would either duplicate the shared majority in both arms, or hoist it and leave two
|
|
364
|
+
* discriminators that can disagree. The flat form is also what ChecklistEvent already does with
|
|
365
|
+
* EventType and its type-specific fields.
|
|
366
|
+
*/
|
|
367
|
+
export interface ChecklistHandover_ActiveRisk {
|
|
368
|
+
$type: "keelson.ChecklistHandover.ActiveRisk";
|
|
369
|
+
kind: ChecklistHandover_ActiveRisk_RiskKind;
|
|
370
|
+
title: string;
|
|
371
|
+
detail: string;
|
|
372
|
+
raisedAt: Date | undefined;
|
|
373
|
+
raisedBy: string;
|
|
374
|
+
rocSite: string;
|
|
375
|
+
/** RISK_KIND_FLAG only: the item to click through to. */
|
|
376
|
+
runId: string;
|
|
377
|
+
itemId: string;
|
|
378
|
+
/** RISK_KIND_ALERT only. */
|
|
379
|
+
alertId: string;
|
|
380
|
+
/**
|
|
381
|
+
* The shared keelson severity scale, reused rather than paralleled because Severity.proto asks
|
|
382
|
+
* to be "the single source of truth so the bus does not accumulate per-domain severity scales".
|
|
383
|
+
*
|
|
384
|
+
* DELIBERATELY LOSSY, and a consumer should know it. A station whose alert stack uses the
|
|
385
|
+
* IEC 62923 BAM ladder has five tiers to map onto four levels here. That is acceptable because
|
|
386
|
+
* this field orders a briefing for reading; `alert_id` names the alert, whose own severity is
|
|
387
|
+
* authoritative and one lookup away. Severity.proto anticipates exactly this: "warning-grade
|
|
388
|
+
* maps to MEDIUM or HIGH per the emitter's judgement".
|
|
389
|
+
*/
|
|
390
|
+
severity: SeverityLevel;
|
|
391
|
+
}
|
|
392
|
+
export declare enum ChecklistHandover_ActiveRisk_RiskKind {
|
|
393
|
+
RISK_KIND_UNKNOWN = 0,
|
|
394
|
+
/** RISK_KIND_FLAG - A checklist item an operator flagged and nobody resolved. */
|
|
395
|
+
RISK_KIND_FLAG = 1,
|
|
396
|
+
/** RISK_KIND_ALERT - An alert nobody acknowledged. */
|
|
397
|
+
RISK_KIND_ALERT = 2,
|
|
398
|
+
UNRECOGNIZED = -1
|
|
399
|
+
}
|
|
400
|
+
export declare function checklistHandover_ActiveRisk_RiskKindFromJSON(object: any): ChecklistHandover_ActiveRisk_RiskKind;
|
|
401
|
+
export declare function checklistHandover_ActiveRisk_RiskKindToJSON(object: ChecklistHandover_ActiveRisk_RiskKind): string;
|
|
402
|
+
/**
|
|
403
|
+
* The vessel's answer, and the bar it judged the handover against.
|
|
404
|
+
*
|
|
405
|
+
* WHY THIS IS TYPED RATHER THAN AN OPAQUE BLOB. This submessage is the only durable record of the
|
|
406
|
+
* decision, and it is read back long after the fact to ask one question — is the configured floor
|
|
407
|
+
* set right — which cannot be answered from `level` alone. You need the bar it was judged
|
|
408
|
+
* against, and WHICH test fired, because two of them mean opposite things: a NON_AUTHORIZING
|
|
409
|
+
* refusal says nothing about the floor (those levels refuse at every setting), while a
|
|
410
|
+
* BELOW_FLOOR refusal is entirely about it. An opaque blob makes the one field the feature exists
|
|
411
|
+
* to audit unreadable to anything but its writer, and lets the gate token drift.
|
|
412
|
+
*
|
|
413
|
+
* CARRIED ON CONFIRMATIONS TOO. A confirmation recording why the vessel was willing is as much of
|
|
414
|
+
* an audit trail as a refusal, and it is what makes the floor question answerable from the whole
|
|
415
|
+
* population rather than from the refusals only.
|
|
416
|
+
*/
|
|
417
|
+
export interface ChecklistHandover_VesselVerdict {
|
|
418
|
+
$type: "keelson.ChecklistHandover.VesselVerdict";
|
|
419
|
+
gate: ChecklistHandover_VesselVerdict_Gate;
|
|
420
|
+
/**
|
|
421
|
+
* The vessel's observed authority. AUTHORITY_LEVEL_UNKNOWN on GATE_NO_AUTHORITY and
|
|
422
|
+
* GATE_STALE_AUTHORITY is the truth rather than an absence — that proto requires UNKNOWN be
|
|
423
|
+
* treated as non-authorizing, never as "no constraints known".
|
|
424
|
+
*/
|
|
425
|
+
level: OperationalAuthority_AuthorityLevel;
|
|
426
|
+
/**
|
|
427
|
+
* The floor this was judged against. EXPLICIT PRESENCE: absent means a producer that predates
|
|
428
|
+
* the field, while 0 would read as a legitimate-looking AUTHORITY_LEVEL_UNKNOWN floor. Without
|
|
429
|
+
* it a stored refusal cannot be re-judged against a different setting, which is the only
|
|
430
|
+
* question anyone asks of these records afterwards.
|
|
431
|
+
*/
|
|
432
|
+
minLevel?: OperationalAuthority_AuthorityLevel | undefined;
|
|
433
|
+
/**
|
|
434
|
+
* The vessel's own account of what was capping it, in the shape OperationalAuthority already
|
|
435
|
+
* publishes. Reused rather than paralleled so a Cause added there needs no change here.
|
|
436
|
+
*/
|
|
437
|
+
constraints: OperationalAuthority_AuthorityConstraint[];
|
|
438
|
+
/**
|
|
439
|
+
* The policy that produced the reading, so a recorded verdict can be replayed against the rules
|
|
440
|
+
* actually in force. Same convention as OperationalAuthority.policy_id.
|
|
441
|
+
*/
|
|
442
|
+
policyId?: string | undefined;
|
|
443
|
+
/** Set on GATE_STALE_AUTHORITY: how old the last reading was. */
|
|
444
|
+
ageSeconds?: number | undefined;
|
|
445
|
+
/**
|
|
446
|
+
* Human-readable, for operators and logs. CONSUMERS MUST NOT PARSE THIS — everything it says
|
|
447
|
+
* is above, structurally.
|
|
448
|
+
*/
|
|
449
|
+
reason: string;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Which test produced the answer. A STABLE TOKEN, safe to count.
|
|
453
|
+
*
|
|
454
|
+
* Deliberately not something to be recovered from `reason`. OperationalAuthority.proto forbids
|
|
455
|
+
* parsing its own reason prose, and the same discipline holds here — otherwise every future
|
|
456
|
+
* count of refusals becomes a regex over English.
|
|
457
|
+
*/
|
|
458
|
+
export declare enum ChecklistHandover_VesselVerdict_Gate {
|
|
459
|
+
/**
|
|
460
|
+
* GATE_UNKNOWN - No gate recorded: a verdict written by a producer that predates this field. NOT a guess at
|
|
461
|
+
* which test fired. A refusal whose cause was never recorded is not evidence for whichever
|
|
462
|
+
* reading you would prefer, and it MUST stay countable as its own bucket.
|
|
463
|
+
*/
|
|
464
|
+
GATE_UNKNOWN = 0,
|
|
465
|
+
/** GATE_CONFIRMED - The vessel was willing. */
|
|
466
|
+
GATE_CONFIRMED = 1,
|
|
467
|
+
/**
|
|
468
|
+
* GATE_NON_AUTHORIZING - The vessel's authority is non-authorizing on its own terms — AUTHORITY_LEVEL_UNKNOWN or
|
|
469
|
+
* AUTHORITY_LEVEL_MINIMAL_SAFE_MODE. Refuses at EVERY floor setting, so it is evidence about
|
|
470
|
+
* the vessel and never about the floor.
|
|
471
|
+
*/
|
|
472
|
+
GATE_NON_AUTHORIZING = 2,
|
|
473
|
+
/**
|
|
474
|
+
* GATE_BELOW_FLOOR - The level cleared the protocol-mandated floor but not the configured one. The only gate
|
|
475
|
+
* that argues for moving the configured floor.
|
|
476
|
+
*/
|
|
477
|
+
GATE_BELOW_FLOOR = 3,
|
|
478
|
+
/**
|
|
479
|
+
* GATE_NO_AUTHORITY - Nothing on operational_authority for this entity. The vessel cannot say whether it accepts
|
|
480
|
+
* remote operation, which is not a yes. `level` is AUTHORITY_LEVEL_UNKNOWN because there is
|
|
481
|
+
* no level to report.
|
|
482
|
+
*/
|
|
483
|
+
GATE_NO_AUTHORITY = 4,
|
|
484
|
+
/**
|
|
485
|
+
* GATE_STALE_AUTHORITY - The last reading is older than the producer's limit. Stale silence is not a yes either: an
|
|
486
|
+
* aggregator that died while the vessel read FULL_AUTONOMOUS would otherwise keep confirming
|
|
487
|
+
* handovers against a frozen value for ever — a safety gate failing open. `age_seconds`
|
|
488
|
+
* carries how old.
|
|
489
|
+
*/
|
|
490
|
+
GATE_STALE_AUTHORITY = 5,
|
|
491
|
+
UNRECOGNIZED = -1
|
|
492
|
+
}
|
|
493
|
+
export declare function checklistHandover_VesselVerdict_GateFromJSON(object: any): ChecklistHandover_VesselVerdict_Gate;
|
|
494
|
+
export declare function checklistHandover_VesselVerdict_GateToJSON(object: ChecklistHandover_VesselVerdict_Gate): string;
|
|
495
|
+
export declare const ChecklistHandover: MessageFns<ChecklistHandover, "keelson.ChecklistHandover">;
|
|
496
|
+
export declare const ChecklistHandover_Party: MessageFns<ChecklistHandover_Party, "keelson.ChecklistHandover.Party">;
|
|
497
|
+
export declare const ChecklistHandover_VesselRef: MessageFns<ChecklistHandover_VesselRef, "keelson.ChecklistHandover.VesselRef">;
|
|
498
|
+
export declare const ChecklistHandover_Reading: MessageFns<ChecklistHandover_Reading, "keelson.ChecklistHandover.Reading">;
|
|
499
|
+
export declare const ChecklistHandover_VesselStatus: MessageFns<ChecklistHandover_VesselStatus, "keelson.ChecklistHandover.VesselStatus">;
|
|
500
|
+
export declare const ChecklistHandover_OpenItem: MessageFns<ChecklistHandover_OpenItem, "keelson.ChecklistHandover.OpenItem">;
|
|
501
|
+
export declare const ChecklistHandover_ActiveRisk: MessageFns<ChecklistHandover_ActiveRisk, "keelson.ChecklistHandover.ActiveRisk">;
|
|
502
|
+
export declare const ChecklistHandover_VesselVerdict: MessageFns<ChecklistHandover_VesselVerdict, "keelson.ChecklistHandover.VesselVerdict">;
|
|
503
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
504
|
+
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 {} ? {
|
|
505
|
+
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
506
|
+
} : Partial<T>;
|
|
507
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
508
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
509
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
510
|
+
} & {
|
|
511
|
+
[K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
|
|
512
|
+
};
|
|
513
|
+
interface MessageFns<T, V extends string> {
|
|
514
|
+
readonly $type: V;
|
|
515
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
516
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
517
|
+
fromJSON(object: any): T;
|
|
518
|
+
toJSON(message: T): unknown;
|
|
519
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
520
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
521
|
+
}
|
|
522
|
+
export {};
|