@rise-maritime/keelson-js 0.6.0-alpha.232.dev.1 → 0.6.0-alpha.255.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 -8
- package/dist/interfaces/Route.d.ts +24 -0
- package/dist/interfaces/Route.js +57 -2
- package/dist/interfaces/ScenarioControl.d.ts +3 -96
- package/dist/interfaces/ScenarioControl.js +37 -394
- package/dist/interfaces/VehicleSimulatorControl.d.ts +83 -0
- package/dist/interfaces/VehicleSimulatorControl.js +293 -1
- package/dist/interfaces/serviceRegistry.d.ts +8 -8
- package/dist/payloads/ChecklistEvent.d.ts +178 -0
- package/dist/payloads/ChecklistEvent.js +539 -0
- package/dist/payloads/ChecklistEvidence.d.ts +79 -0
- package/dist/payloads/ChecklistEvidence.js +287 -0
- package/dist/payloads/ChecklistPresence.d.ts +68 -0
- package/dist/payloads/ChecklistPresence.js +286 -0
- package/dist/payloads/ChecklistProcedure.d.ts +81 -0
- package/dist/payloads/ChecklistProcedure.js +364 -0
- package/dist/payloads/ChecklistState.d.ts +283 -0
- package/dist/payloads/ChecklistState.js +1100 -0
- package/dist/payloads/EnvelopeExceedance.d.ts +216 -0
- package/dist/payloads/EnvelopeExceedance.js +461 -0
- package/dist/payloads/Route.d.ts +24 -0
- package/dist/payloads/Route.js +57 -2
- package/dist/payloads/RouteExecution.d.ts +81 -1
- package/dist/payloads/RouteExecution.js +215 -1
- package/dist/payloads/ScenarioEvent.d.ts +90 -0
- package/dist/payloads/ScenarioEvent.js +294 -0
- package/dist/payloads/ScenarioTickAck.d.ts +95 -0
- package/dist/payloads/ScenarioTickAck.js +239 -0
- package/dist/payloads/index.foxglove.d.ts +1 -1
- package/dist/payloads/index.foxglove.js +1 -1
- package/dist/payloads/index.google.protobuf.d.ts +1 -1
- package/dist/payloads/index.google.protobuf.js +1 -1
- package/dist/payloads/index.keelson.d.ts +9 -1
- package/dist/payloads/index.keelson.js +9 -1
- package/dist/qos.json +13 -1
- package/dist/subjects.json +9 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: VehicleSimulatorControl.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.VehicleSimulatorControlDefinition = exports.SetInitialPoseResponse = exports.InitialPose = exports.protobufPackage = void 0;
|
|
8
|
+
exports.VehicleSimulatorControlDefinition = exports.SetStandingOrderResponse = exports.StandingOrder = exports.PropulsionOrder = exports.SteeringOrder = exports.SetInitialPoseResponse = exports.InitialPose = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const Coordinate_1 = require("./Coordinate");
|
|
@@ -132,6 +132,283 @@ exports.SetInitialPoseResponse = {
|
|
|
132
132
|
return message;
|
|
133
133
|
},
|
|
134
134
|
};
|
|
135
|
+
function createBaseSteeringOrder() {
|
|
136
|
+
return { courseOverGroundDeg: undefined, headingDeg: undefined };
|
|
137
|
+
}
|
|
138
|
+
exports.SteeringOrder = {
|
|
139
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
140
|
+
if (message.courseOverGroundDeg !== undefined) {
|
|
141
|
+
writer.uint32(9).double(message.courseOverGroundDeg);
|
|
142
|
+
}
|
|
143
|
+
if (message.headingDeg !== undefined) {
|
|
144
|
+
writer.uint32(17).double(message.headingDeg);
|
|
145
|
+
}
|
|
146
|
+
return writer;
|
|
147
|
+
},
|
|
148
|
+
decode(input, length) {
|
|
149
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
150
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
151
|
+
const message = createBaseSteeringOrder();
|
|
152
|
+
while (reader.pos < end) {
|
|
153
|
+
const tag = reader.uint32();
|
|
154
|
+
switch (tag >>> 3) {
|
|
155
|
+
case 1: {
|
|
156
|
+
if (tag !== 9) {
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
message.courseOverGroundDeg = reader.double();
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
case 2: {
|
|
163
|
+
if (tag !== 17) {
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
message.headingDeg = reader.double();
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
reader.skip(tag & 7);
|
|
174
|
+
}
|
|
175
|
+
return message;
|
|
176
|
+
},
|
|
177
|
+
fromJSON(object) {
|
|
178
|
+
return {
|
|
179
|
+
courseOverGroundDeg: isSet(object.courseOverGroundDeg)
|
|
180
|
+
? globalThis.Number(object.courseOverGroundDeg)
|
|
181
|
+
: undefined,
|
|
182
|
+
headingDeg: isSet(object.headingDeg) ? globalThis.Number(object.headingDeg) : undefined,
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
toJSON(message) {
|
|
186
|
+
const obj = {};
|
|
187
|
+
if (message.courseOverGroundDeg !== undefined) {
|
|
188
|
+
obj.courseOverGroundDeg = message.courseOverGroundDeg;
|
|
189
|
+
}
|
|
190
|
+
if (message.headingDeg !== undefined) {
|
|
191
|
+
obj.headingDeg = message.headingDeg;
|
|
192
|
+
}
|
|
193
|
+
return obj;
|
|
194
|
+
},
|
|
195
|
+
create(base) {
|
|
196
|
+
return exports.SteeringOrder.fromPartial(base ?? {});
|
|
197
|
+
},
|
|
198
|
+
fromPartial(object) {
|
|
199
|
+
const message = createBaseSteeringOrder();
|
|
200
|
+
message.courseOverGroundDeg = object.courseOverGroundDeg ?? undefined;
|
|
201
|
+
message.headingDeg = object.headingDeg ?? undefined;
|
|
202
|
+
return message;
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
function createBasePropulsionOrder() {
|
|
206
|
+
return { sogMps: undefined, stwMps: undefined, enginePct: undefined, shaftRpm: undefined };
|
|
207
|
+
}
|
|
208
|
+
exports.PropulsionOrder = {
|
|
209
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
210
|
+
if (message.sogMps !== undefined) {
|
|
211
|
+
writer.uint32(9).double(message.sogMps);
|
|
212
|
+
}
|
|
213
|
+
if (message.stwMps !== undefined) {
|
|
214
|
+
writer.uint32(17).double(message.stwMps);
|
|
215
|
+
}
|
|
216
|
+
if (message.enginePct !== undefined) {
|
|
217
|
+
writer.uint32(25).double(message.enginePct);
|
|
218
|
+
}
|
|
219
|
+
if (message.shaftRpm !== undefined) {
|
|
220
|
+
writer.uint32(33).double(message.shaftRpm);
|
|
221
|
+
}
|
|
222
|
+
return writer;
|
|
223
|
+
},
|
|
224
|
+
decode(input, length) {
|
|
225
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
226
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
227
|
+
const message = createBasePropulsionOrder();
|
|
228
|
+
while (reader.pos < end) {
|
|
229
|
+
const tag = reader.uint32();
|
|
230
|
+
switch (tag >>> 3) {
|
|
231
|
+
case 1: {
|
|
232
|
+
if (tag !== 9) {
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
message.sogMps = reader.double();
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
case 2: {
|
|
239
|
+
if (tag !== 17) {
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
message.stwMps = reader.double();
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
case 3: {
|
|
246
|
+
if (tag !== 25) {
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
message.enginePct = reader.double();
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
case 4: {
|
|
253
|
+
if (tag !== 33) {
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
message.shaftRpm = reader.double();
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
reader.skip(tag & 7);
|
|
264
|
+
}
|
|
265
|
+
return message;
|
|
266
|
+
},
|
|
267
|
+
fromJSON(object) {
|
|
268
|
+
return {
|
|
269
|
+
sogMps: isSet(object.sogMps) ? globalThis.Number(object.sogMps) : undefined,
|
|
270
|
+
stwMps: isSet(object.stwMps) ? globalThis.Number(object.stwMps) : undefined,
|
|
271
|
+
enginePct: isSet(object.enginePct) ? globalThis.Number(object.enginePct) : undefined,
|
|
272
|
+
shaftRpm: isSet(object.shaftRpm) ? globalThis.Number(object.shaftRpm) : undefined,
|
|
273
|
+
};
|
|
274
|
+
},
|
|
275
|
+
toJSON(message) {
|
|
276
|
+
const obj = {};
|
|
277
|
+
if (message.sogMps !== undefined) {
|
|
278
|
+
obj.sogMps = message.sogMps;
|
|
279
|
+
}
|
|
280
|
+
if (message.stwMps !== undefined) {
|
|
281
|
+
obj.stwMps = message.stwMps;
|
|
282
|
+
}
|
|
283
|
+
if (message.enginePct !== undefined) {
|
|
284
|
+
obj.enginePct = message.enginePct;
|
|
285
|
+
}
|
|
286
|
+
if (message.shaftRpm !== undefined) {
|
|
287
|
+
obj.shaftRpm = message.shaftRpm;
|
|
288
|
+
}
|
|
289
|
+
return obj;
|
|
290
|
+
},
|
|
291
|
+
create(base) {
|
|
292
|
+
return exports.PropulsionOrder.fromPartial(base ?? {});
|
|
293
|
+
},
|
|
294
|
+
fromPartial(object) {
|
|
295
|
+
const message = createBasePropulsionOrder();
|
|
296
|
+
message.sogMps = object.sogMps ?? undefined;
|
|
297
|
+
message.stwMps = object.stwMps ?? undefined;
|
|
298
|
+
message.enginePct = object.enginePct ?? undefined;
|
|
299
|
+
message.shaftRpm = object.shaftRpm ?? undefined;
|
|
300
|
+
return message;
|
|
301
|
+
},
|
|
302
|
+
};
|
|
303
|
+
function createBaseStandingOrder() {
|
|
304
|
+
return { steering: undefined, propulsion: undefined };
|
|
305
|
+
}
|
|
306
|
+
exports.StandingOrder = {
|
|
307
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
308
|
+
if (message.steering !== undefined) {
|
|
309
|
+
exports.SteeringOrder.encode(message.steering, writer.uint32(10).fork()).join();
|
|
310
|
+
}
|
|
311
|
+
if (message.propulsion !== undefined) {
|
|
312
|
+
exports.PropulsionOrder.encode(message.propulsion, writer.uint32(18).fork()).join();
|
|
313
|
+
}
|
|
314
|
+
return writer;
|
|
315
|
+
},
|
|
316
|
+
decode(input, length) {
|
|
317
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
318
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
319
|
+
const message = createBaseStandingOrder();
|
|
320
|
+
while (reader.pos < end) {
|
|
321
|
+
const tag = reader.uint32();
|
|
322
|
+
switch (tag >>> 3) {
|
|
323
|
+
case 1: {
|
|
324
|
+
if (tag !== 10) {
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
message.steering = exports.SteeringOrder.decode(reader, reader.uint32());
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
case 2: {
|
|
331
|
+
if (tag !== 18) {
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
message.propulsion = exports.PropulsionOrder.decode(reader, reader.uint32());
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
reader.skip(tag & 7);
|
|
342
|
+
}
|
|
343
|
+
return message;
|
|
344
|
+
},
|
|
345
|
+
fromJSON(object) {
|
|
346
|
+
return {
|
|
347
|
+
steering: isSet(object.steering) ? exports.SteeringOrder.fromJSON(object.steering) : undefined,
|
|
348
|
+
propulsion: isSet(object.propulsion) ? exports.PropulsionOrder.fromJSON(object.propulsion) : undefined,
|
|
349
|
+
};
|
|
350
|
+
},
|
|
351
|
+
toJSON(message) {
|
|
352
|
+
const obj = {};
|
|
353
|
+
if (message.steering !== undefined) {
|
|
354
|
+
obj.steering = exports.SteeringOrder.toJSON(message.steering);
|
|
355
|
+
}
|
|
356
|
+
if (message.propulsion !== undefined) {
|
|
357
|
+
obj.propulsion = exports.PropulsionOrder.toJSON(message.propulsion);
|
|
358
|
+
}
|
|
359
|
+
return obj;
|
|
360
|
+
},
|
|
361
|
+
create(base) {
|
|
362
|
+
return exports.StandingOrder.fromPartial(base ?? {});
|
|
363
|
+
},
|
|
364
|
+
fromPartial(object) {
|
|
365
|
+
const message = createBaseStandingOrder();
|
|
366
|
+
message.steering = (object.steering !== undefined && object.steering !== null)
|
|
367
|
+
? exports.SteeringOrder.fromPartial(object.steering)
|
|
368
|
+
: undefined;
|
|
369
|
+
message.propulsion = (object.propulsion !== undefined && object.propulsion !== null)
|
|
370
|
+
? exports.PropulsionOrder.fromPartial(object.propulsion)
|
|
371
|
+
: undefined;
|
|
372
|
+
return message;
|
|
373
|
+
},
|
|
374
|
+
};
|
|
375
|
+
function createBaseSetStandingOrderResponse() {
|
|
376
|
+
return {};
|
|
377
|
+
}
|
|
378
|
+
exports.SetStandingOrderResponse = {
|
|
379
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
380
|
+
return writer;
|
|
381
|
+
},
|
|
382
|
+
decode(input, length) {
|
|
383
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
384
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
385
|
+
const message = createBaseSetStandingOrderResponse();
|
|
386
|
+
while (reader.pos < end) {
|
|
387
|
+
const tag = reader.uint32();
|
|
388
|
+
switch (tag >>> 3) {
|
|
389
|
+
}
|
|
390
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
reader.skip(tag & 7);
|
|
394
|
+
}
|
|
395
|
+
return message;
|
|
396
|
+
},
|
|
397
|
+
fromJSON(_) {
|
|
398
|
+
return {};
|
|
399
|
+
},
|
|
400
|
+
toJSON(_) {
|
|
401
|
+
const obj = {};
|
|
402
|
+
return obj;
|
|
403
|
+
},
|
|
404
|
+
create(base) {
|
|
405
|
+
return exports.SetStandingOrderResponse.fromPartial(base ?? {});
|
|
406
|
+
},
|
|
407
|
+
fromPartial(_) {
|
|
408
|
+
const message = createBaseSetStandingOrderResponse();
|
|
409
|
+
return message;
|
|
410
|
+
},
|
|
411
|
+
};
|
|
135
412
|
exports.VehicleSimulatorControlDefinition = {
|
|
136
413
|
name: "VehicleSimulatorControl",
|
|
137
414
|
fullName: "keelson.interfaces.vehicle_simulator_control.VehicleSimulatorControl",
|
|
@@ -148,6 +425,21 @@ exports.VehicleSimulatorControlDefinition = {
|
|
|
148
425
|
responseStream: false,
|
|
149
426
|
options: {},
|
|
150
427
|
},
|
|
428
|
+
/**
|
|
429
|
+
* Give a RUNNING entity a new standing order, without moving it. On a
|
|
430
|
+
* STOPPED or ASSIGNED entity, replies ErrorResponse{code =
|
|
431
|
+
* INVALID_STATE} — the mirror of set_initial_pose's own rule, and for
|
|
432
|
+
* the same reason: an order to a vehicle that is not going anywhere is
|
|
433
|
+
* a caller confusing setup with command.
|
|
434
|
+
*/
|
|
435
|
+
set_standing_order: {
|
|
436
|
+
name: "set_standing_order",
|
|
437
|
+
requestType: exports.StandingOrder,
|
|
438
|
+
requestStream: false,
|
|
439
|
+
responseType: exports.SetStandingOrderResponse,
|
|
440
|
+
responseStream: false,
|
|
441
|
+
options: {},
|
|
442
|
+
},
|
|
151
443
|
},
|
|
152
444
|
};
|
|
153
445
|
function isSet(value) {
|
|
@@ -199,14 +199,6 @@ 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
|
-
};
|
|
210
202
|
readonly load: {
|
|
211
203
|
readonly name: "load";
|
|
212
204
|
readonly requestType: import("./ScenarioControl").MessageFns<import("./ScenarioControl").LoadRequest>;
|
|
@@ -509,6 +501,14 @@ export declare const serviceDefinitions: {
|
|
|
509
501
|
readonly responseStream: false;
|
|
510
502
|
readonly options: {};
|
|
511
503
|
};
|
|
504
|
+
readonly set_standing_order: {
|
|
505
|
+
readonly name: "set_standing_order";
|
|
506
|
+
readonly requestType: import("./VehicleSimulatorControl").MessageFns<import("./VehicleSimulatorControl").StandingOrder>;
|
|
507
|
+
readonly requestStream: false;
|
|
508
|
+
readonly responseType: import("./VehicleSimulatorControl").MessageFns<import("./VehicleSimulatorControl").SetStandingOrderResponse>;
|
|
509
|
+
readonly responseStream: false;
|
|
510
|
+
readonly options: {};
|
|
511
|
+
};
|
|
512
512
|
};
|
|
513
513
|
};
|
|
514
514
|
readonly "whep_proxy/v1": {
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { ChecklistItemEvidence } from "./ChecklistEvidence";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a single auditable action performed on a checklist by an operator.
|
|
5
|
+
* Used for real-time synchronization of checklist activity between Remote Operations Centres.
|
|
6
|
+
*/
|
|
7
|
+
export interface ChecklistEvent {
|
|
8
|
+
$type: "keelson.ChecklistEvent";
|
|
9
|
+
timestamp: Date | undefined;
|
|
10
|
+
eventId: string;
|
|
11
|
+
eventType: ChecklistEvent_EventType;
|
|
12
|
+
/** Operator identity */
|
|
13
|
+
operatorId: string;
|
|
14
|
+
username: string;
|
|
15
|
+
role: string;
|
|
16
|
+
rocSite: string;
|
|
17
|
+
/** Checklist context */
|
|
18
|
+
procedureId: string;
|
|
19
|
+
itemId: string;
|
|
20
|
+
/** Event-specific text payload (note text, flag reason, resolution text) */
|
|
21
|
+
detail: string;
|
|
22
|
+
/**
|
|
23
|
+
* Which additive entry this event names: `note_id`, `evidence_id`, or `flag_id`.
|
|
24
|
+
*
|
|
25
|
+
* Each is the union key its list merges on in protocol-specification.md §7.2, so an event that
|
|
26
|
+
* omits this can only append — it cannot say which existing entry it acts on.
|
|
27
|
+
*
|
|
28
|
+
* LEGACY, and unrelated to the above: on an EVENT_TYPE_TIME_SET from a publisher that predates
|
|
29
|
+
* `corrected_field`, this instead carries the NAME of the timestamp being corrected, as one of
|
|
30
|
+
* the strings "started_at", "completed_at", "run_started_at". See `corrected_field` for that
|
|
31
|
+
* fallback path. New publishers set `corrected_field` and leave this to mean what the first
|
|
32
|
+
* paragraph says.
|
|
33
|
+
*/
|
|
34
|
+
referenceId: string;
|
|
35
|
+
/**
|
|
36
|
+
* Which RUN of `procedure_id` this event belongs to.
|
|
37
|
+
*
|
|
38
|
+
* Empty means a publisher that predates the run model; a receiver adopts such an event under a
|
|
39
|
+
* legacy run keyed by the procedure id rather than dropping it.
|
|
40
|
+
*/
|
|
41
|
+
runId: string;
|
|
42
|
+
/** Set on EVENT_TYPE_EVIDENCE_ATTACHED. Metadata only — see ChecklistEvidence.proto. */
|
|
43
|
+
evidence: ChecklistItemEvidence | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* The corrected instant, on EVENT_TYPE_TIME_SET.
|
|
46
|
+
*
|
|
47
|
+
* This used to travel as a UTC ISO-8601 string in `detail`, in a message that already imports
|
|
48
|
+
* google.protobuf.Timestamp — so every consumer wrote its own parser, and every parser was a
|
|
49
|
+
* chance to disagree about an instant in a safety record.
|
|
50
|
+
*
|
|
51
|
+
* LEGACY FALLBACK: a publisher predating this field leaves it unset and writes the string. A
|
|
52
|
+
* receiver reads this field when `corrected_field` is set, and falls back to parsing `detail`
|
|
53
|
+
* only when `corrected_field == TIME_FIELD_UNKNOWN` — never the other way round, so a
|
|
54
|
+
* publisher writing both cannot be misread. Publishers SHOULD write both until every consumer
|
|
55
|
+
* is known to read the typed pair; recordings full of the string form must keep replaying.
|
|
56
|
+
*/
|
|
57
|
+
correctedTime: Date | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Which timestamp `corrected_time` replaces. Set together with it, or neither.
|
|
60
|
+
*
|
|
61
|
+
* TIME_FIELD_UNKNOWN on an EVENT_TYPE_TIME_SET means a legacy publisher: fall back to the
|
|
62
|
+
* `reference_id` string ("started_at", "completed_at", "run_started_at"). An unrecognised
|
|
63
|
+
* value here is dropped, not guessed — a correction applied to the wrong field is worse than
|
|
64
|
+
* one not applied at all.
|
|
65
|
+
*/
|
|
66
|
+
correctedField: ChecklistEvent_TimeField;
|
|
67
|
+
}
|
|
68
|
+
export declare enum ChecklistEvent_EventType {
|
|
69
|
+
EVENT_TYPE_UNKNOWN = 0,
|
|
70
|
+
EVENT_TYPE_CHECKLIST_OPENED = 1,
|
|
71
|
+
EVENT_TYPE_ITEM_STARTED = 2,
|
|
72
|
+
EVENT_TYPE_ITEM_COMPLETED = 3,
|
|
73
|
+
EVENT_TYPE_ITEM_REVERTED = 4,
|
|
74
|
+
EVENT_TYPE_NOTE_ADDED = 5,
|
|
75
|
+
/**
|
|
76
|
+
* EVENT_TYPE_ITEM_FLAGGED - An issue raised on an item, and the moment it was cleared.
|
|
77
|
+
*
|
|
78
|
+
* Both carry the flag they act on in `reference_id` — the `flag_id`, which is the union key
|
|
79
|
+
* ChecklistState.ItemState.flags merges on. Without it a receiver folding one of these into
|
|
80
|
+
* `flags` has nothing to match against and can only append, so resolving a flag would add a
|
|
81
|
+
* second open one instead of closing the first.
|
|
82
|
+
*
|
|
83
|
+
* A publisher of FLAG_RESOLVED must ALSO write the resolution triple on the ItemFlag —
|
|
84
|
+
* `resolved_at`, `resolved_by`, `resolution` — because that is the half that survives in a
|
|
85
|
+
* snapshot. The event is the live path; a station bootstrapping later sees only the state.
|
|
86
|
+
* Those three are absorbing and settled earliest-wins, per protocol-specification.md §7.2: a
|
|
87
|
+
* peer that never saw the resolution must not reopen it, and two stations genuinely clearing
|
|
88
|
+
* one flag are decided by the earlier time as a value, never by whose snapshot landed last.
|
|
89
|
+
*/
|
|
90
|
+
EVENT_TYPE_ITEM_FLAGGED = 6,
|
|
91
|
+
EVENT_TYPE_FLAG_RESOLVED = 7,
|
|
92
|
+
/**
|
|
93
|
+
* EVENT_TYPE_PROCEDURE_STARTED - The run boundary markers. STARTED moves a run to ACTIVE (from PLANNED, or straight from
|
|
94
|
+
* creation); COMPLETED is the sign-off once every required item is done.
|
|
95
|
+
*/
|
|
96
|
+
EVENT_TYPE_PROCEDURE_STARTED = 8,
|
|
97
|
+
EVENT_TYPE_PROCEDURE_COMPLETED = 9,
|
|
98
|
+
/** EVENT_TYPE_RUN_PLANNED - A run queued for later, with or without a due time. */
|
|
99
|
+
EVENT_TYPE_RUN_PLANNED = 10,
|
|
100
|
+
/** EVENT_TYPE_RUN_ABANDONED - A run stopped without completing. The reason is required and travels in `detail`. */
|
|
101
|
+
EVENT_TYPE_RUN_ABANDONED = 11,
|
|
102
|
+
/**
|
|
103
|
+
* EVENT_TYPE_EVIDENCE_ATTACHED - A photo attached to an item. The metadata rides in `evidence`; the bytes are published
|
|
104
|
+
* separately to `checklist_evidence/{evidence_id}`.
|
|
105
|
+
*/
|
|
106
|
+
EVENT_TYPE_EVIDENCE_ATTACHED = 12,
|
|
107
|
+
/**
|
|
108
|
+
* EVENT_TYPE_TIME_SET - A timestamp corrected after the fact — "I finished at 14:45, I am only ticking it now".
|
|
109
|
+
*
|
|
110
|
+
* A dedicated type rather than a backdated ITEM_COMPLETED, because ITEM_COMPLETED resolves
|
|
111
|
+
* conflicts earliest-wins: a completion moved LATER hits that guard on every station, logs a
|
|
112
|
+
* "confirmed" row, and changes nothing. The guard is right for genuine concurrent completion
|
|
113
|
+
* and must not be relaxed for this.
|
|
114
|
+
*
|
|
115
|
+
* The corrected instant travels in `corrected_time` and the field it corrects in
|
|
116
|
+
* `corrected_field`. See those fields for what a receiver does with a publisher that
|
|
117
|
+
* predates them.
|
|
118
|
+
*
|
|
119
|
+
* Applying it patches ONLY that timestamp — status and author are untouched — and it is
|
|
120
|
+
* recorded as its own kind of entry. In a safety record a corrected time that renders
|
|
121
|
+
* identically to an original one is a claim nobody can audit.
|
|
122
|
+
*/
|
|
123
|
+
EVENT_TYPE_TIME_SET = 13,
|
|
124
|
+
/**
|
|
125
|
+
* EVENT_TYPE_ITEM_REOPENED - An item taken back out of "done", with the reason in `detail`.
|
|
126
|
+
*
|
|
127
|
+
* Publishers have been spelling this EVENT_TYPE_ITEM_REVERTED = 4 with the reason in `detail`,
|
|
128
|
+
* because adding an enum value costs a release cycle. The behaviour and the audit trail were
|
|
129
|
+
* right; only the name misled — "reverted" reads as undoing a mistake, while reopening is a
|
|
130
|
+
* deliberate, reasoned act that a supervisor performs on a record that already stands.
|
|
131
|
+
*
|
|
132
|
+
* EVENT_TYPE_ITEM_REVERTED stays valid and is deliberately NOT reserved: recordings and
|
|
133
|
+
* durable snapshots already contain 4, and they must keep decoding. Treat the two as the same
|
|
134
|
+
* act; prefer this one for anything published from now on.
|
|
135
|
+
*/
|
|
136
|
+
EVENT_TYPE_ITEM_REOPENED = 15,
|
|
137
|
+
UNRECOGNIZED = -1
|
|
138
|
+
}
|
|
139
|
+
export declare function checklistEvent_EventTypeFromJSON(object: any): ChecklistEvent_EventType;
|
|
140
|
+
export declare function checklistEvent_EventTypeToJSON(object: ChecklistEvent_EventType): string;
|
|
141
|
+
/**
|
|
142
|
+
* Which timestamp an EVENT_TYPE_TIME_SET corrects.
|
|
143
|
+
*
|
|
144
|
+
* An enum rather than the field's name as a string, because a string target is matched by
|
|
145
|
+
* every consumer against its own spelling: a typo is not an error, it is a silent no-op that
|
|
146
|
+
* logs an audited correction and patches nothing.
|
|
147
|
+
*/
|
|
148
|
+
export declare enum ChecklistEvent_TimeField {
|
|
149
|
+
TIME_FIELD_UNKNOWN = 0,
|
|
150
|
+
TIME_FIELD_ITEM_STARTED_AT = 1,
|
|
151
|
+
TIME_FIELD_ITEM_COMPLETED_AT = 2,
|
|
152
|
+
/** TIME_FIELD_RUN_STARTED_AT - The run's own start. Ignores `item_id`. */
|
|
153
|
+
TIME_FIELD_RUN_STARTED_AT = 3,
|
|
154
|
+
UNRECOGNIZED = -1
|
|
155
|
+
}
|
|
156
|
+
export declare function checklistEvent_TimeFieldFromJSON(object: any): ChecklistEvent_TimeField;
|
|
157
|
+
export declare function checklistEvent_TimeFieldToJSON(object: ChecklistEvent_TimeField): string;
|
|
158
|
+
export declare const ChecklistEvent: MessageFns<ChecklistEvent, "keelson.ChecklistEvent">;
|
|
159
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
160
|
+
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 {} ? {
|
|
161
|
+
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
162
|
+
} : Partial<T>;
|
|
163
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
164
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
165
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
166
|
+
} & {
|
|
167
|
+
[K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
|
|
168
|
+
};
|
|
169
|
+
interface MessageFns<T, V extends string> {
|
|
170
|
+
readonly $type: V;
|
|
171
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
172
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
173
|
+
fromJSON(object: any): T;
|
|
174
|
+
toJSON(message: T): unknown;
|
|
175
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
176
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
177
|
+
}
|
|
178
|
+
export {};
|