@rise-maritime/keelson-js 0.6.0-pre.13 → 0.6.0-pre.15

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.
@@ -108,6 +108,30 @@ export declare enum RouteStatus {
108
108
  }
109
109
  export declare function routeStatusFromJSON(object: any): RouteStatus;
110
110
  export declare function routeStatusToJSON(object: RouteStatus): string;
111
+ /**
112
+ * Which side of an operational limit counts as a breach.
113
+ *
114
+ * RouteInfo's own limit block carries both directions — max_wind_gust_mps is
115
+ * breached above, min_visibility_m below — so nothing about a limit's identity
116
+ * says which way it fails. Consumers of an exceedance record need it: "the most
117
+ * extreme value reached" is undefined without it, and deriving the direction
118
+ * from a `max_` / `min_` name prefix is a string match that fails silently the
119
+ * first time a limit is named anything else.
120
+ *
121
+ * Lives here rather than beside either consumer because it is a property of the
122
+ * limit as authored, not of the monitoring. Read by keelson.EnvelopeExceedance
123
+ * and keelson.EnvelopeLimitState.
124
+ */
125
+ export declare enum EnvelopeBound {
126
+ ENVELOPE_BOUND_UNSPECIFIED = 0,
127
+ /** ENVELOPE_BOUND_UPPER - Breached by going ABOVE the limit value (max_wind_gust_mps, max_roll_deg). */
128
+ ENVELOPE_BOUND_UPPER = 1,
129
+ /** ENVELOPE_BOUND_LOWER - Breached by going BELOW it (min_visibility_m, min_speed_knots). */
130
+ ENVELOPE_BOUND_LOWER = 2,
131
+ UNRECOGNIZED = -1
132
+ }
133
+ export declare function envelopeBoundFromJSON(object: any): EnvelopeBound;
134
+ export declare function envelopeBoundToJSON(object: EnvelopeBound): string;
111
135
  /** Required action for an ActionPoint. */
112
136
  export declare enum ActionPointRequiredAction {
113
137
  ACTION_POINT_REQUIRED_ACTION_UNSPECIFIED = 0,
@@ -272,6 +296,19 @@ export interface RouteInfo {
272
296
  maxWindSpeedMps?: number | undefined;
273
297
  minSpeedKnots?: number | undefined;
274
298
  maxSpeedKnots?: number | undefined;
299
+ /**
300
+ * Minimum visibility the route is valid above. `visibility_range_m` is
301
+ * published, so without this the measurement exists and the limit it should
302
+ * be checked against does not.
303
+ */
304
+ minVisibilityM?: number | undefined;
305
+ /**
306
+ * Gust limit, distinct from the mean-wind limit above. Gust is what governs
307
+ * small-craft operations: 12 m/s mean with 20 m/s gusts is a different
308
+ * proposition from a steady 12 m/s, and only the mean can be constrained
309
+ * today. Checked against the windowed `true_wind_speed_max_mps`.
310
+ */
311
+ maxWindGustMps?: number | undefined;
275
312
  /**
276
313
  * -- Optimization & autonomy ------------------------------------------------
277
314
  * Free-form optimization method label (e.g. "fuel-min", "eta-min", "weather-routed").
@@ -5,8 +5,8 @@
5
5
  // protoc v6.30.2
6
6
  // source: Route.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.RouteIssue = exports.RouteChallenge = exports.HazardZone = exports.ActionPoint = exports.ActionPoints = exports.ScheduleElement = exports.Schedule = exports.Schedules = exports.Leg = exports.Waypoint = exports.DefaultWaypoint = exports.Waypoints = exports.RouteInfo = exports.Route = exports.Extensions_Entry_AttributesEntry = exports.Extensions_Entry = exports.Extensions = exports.CircleGeometry = exports.RouteRef = exports.schedule_OriginToJSON = exports.schedule_OriginFromJSON = exports.Schedule_Origin = exports.actionPointRequiredActionToJSON = exports.actionPointRequiredActionFromJSON = exports.ActionPointRequiredAction = exports.routeStatusToJSON = exports.routeStatusFromJSON = exports.RouteStatus = exports.geometryTypeToJSON = exports.geometryTypeFromJSON = exports.GeometryType = exports.colregTrafficIntensityToJSON = exports.colregTrafficIntensityFromJSON = exports.ColregTrafficIntensity = exports.colregSituationToJSON = exports.colregSituationFromJSON = exports.ColregSituation = exports.hazardZoneTypeToJSON = exports.hazardZoneTypeFromJSON = exports.HazardZoneType = exports.routeChallengeTypeToJSON = exports.routeChallengeTypeFromJSON = exports.RouteChallengeType = exports.operationalContextToJSON = exports.operationalContextFromJSON = exports.OperationalContext = exports.autonomyLevelToJSON = exports.autonomyLevelFromJSON = exports.AutonomyLevel = exports.protobufPackage = void 0;
9
- exports.RouteStatusUpdate = exports.RouteSignature = exports.RouteSignatures = void 0;
8
+ exports.ActionPoint = exports.ActionPoints = exports.ScheduleElement = exports.Schedule = exports.Schedules = exports.Leg = exports.Waypoint = exports.DefaultWaypoint = exports.Waypoints = exports.RouteInfo = exports.Route = exports.Extensions_Entry_AttributesEntry = exports.Extensions_Entry = exports.Extensions = exports.CircleGeometry = exports.RouteRef = exports.schedule_OriginToJSON = exports.schedule_OriginFromJSON = exports.Schedule_Origin = exports.actionPointRequiredActionToJSON = exports.actionPointRequiredActionFromJSON = exports.ActionPointRequiredAction = exports.envelopeBoundToJSON = exports.envelopeBoundFromJSON = exports.EnvelopeBound = exports.routeStatusToJSON = exports.routeStatusFromJSON = exports.RouteStatus = exports.geometryTypeToJSON = exports.geometryTypeFromJSON = exports.GeometryType = exports.colregTrafficIntensityToJSON = exports.colregTrafficIntensityFromJSON = exports.ColregTrafficIntensity = exports.colregSituationToJSON = exports.colregSituationFromJSON = exports.ColregSituation = exports.hazardZoneTypeToJSON = exports.hazardZoneTypeFromJSON = exports.HazardZoneType = exports.routeChallengeTypeToJSON = exports.routeChallengeTypeFromJSON = exports.RouteChallengeType = exports.operationalContextToJSON = exports.operationalContextFromJSON = exports.OperationalContext = exports.autonomyLevelToJSON = exports.autonomyLevelFromJSON = exports.AutonomyLevel = exports.protobufPackage = void 0;
9
+ exports.RouteStatusUpdate = exports.RouteSignature = exports.RouteSignatures = exports.RouteIssue = exports.RouteChallenge = exports.HazardZone = void 0;
10
10
  /* eslint-disable */
11
11
  const wire_1 = require("@bufbuild/protobuf/wire");
12
12
  const Coordinate_1 = require("./Coordinate");
@@ -492,6 +492,61 @@ function routeStatusToJSON(object) {
492
492
  }
493
493
  }
494
494
  exports.routeStatusToJSON = routeStatusToJSON;
495
+ /**
496
+ * Which side of an operational limit counts as a breach.
497
+ *
498
+ * RouteInfo's own limit block carries both directions — max_wind_gust_mps is
499
+ * breached above, min_visibility_m below — so nothing about a limit's identity
500
+ * says which way it fails. Consumers of an exceedance record need it: "the most
501
+ * extreme value reached" is undefined without it, and deriving the direction
502
+ * from a `max_` / `min_` name prefix is a string match that fails silently the
503
+ * first time a limit is named anything else.
504
+ *
505
+ * Lives here rather than beside either consumer because it is a property of the
506
+ * limit as authored, not of the monitoring. Read by keelson.EnvelopeExceedance
507
+ * and keelson.EnvelopeLimitState.
508
+ */
509
+ var EnvelopeBound;
510
+ (function (EnvelopeBound) {
511
+ EnvelopeBound[EnvelopeBound["ENVELOPE_BOUND_UNSPECIFIED"] = 0] = "ENVELOPE_BOUND_UNSPECIFIED";
512
+ /** ENVELOPE_BOUND_UPPER - Breached by going ABOVE the limit value (max_wind_gust_mps, max_roll_deg). */
513
+ EnvelopeBound[EnvelopeBound["ENVELOPE_BOUND_UPPER"] = 1] = "ENVELOPE_BOUND_UPPER";
514
+ /** ENVELOPE_BOUND_LOWER - Breached by going BELOW it (min_visibility_m, min_speed_knots). */
515
+ EnvelopeBound[EnvelopeBound["ENVELOPE_BOUND_LOWER"] = 2] = "ENVELOPE_BOUND_LOWER";
516
+ EnvelopeBound[EnvelopeBound["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
517
+ })(EnvelopeBound || (exports.EnvelopeBound = EnvelopeBound = {}));
518
+ function envelopeBoundFromJSON(object) {
519
+ switch (object) {
520
+ case 0:
521
+ case "ENVELOPE_BOUND_UNSPECIFIED":
522
+ return EnvelopeBound.ENVELOPE_BOUND_UNSPECIFIED;
523
+ case 1:
524
+ case "ENVELOPE_BOUND_UPPER":
525
+ return EnvelopeBound.ENVELOPE_BOUND_UPPER;
526
+ case 2:
527
+ case "ENVELOPE_BOUND_LOWER":
528
+ return EnvelopeBound.ENVELOPE_BOUND_LOWER;
529
+ case -1:
530
+ case "UNRECOGNIZED":
531
+ default:
532
+ return EnvelopeBound.UNRECOGNIZED;
533
+ }
534
+ }
535
+ exports.envelopeBoundFromJSON = envelopeBoundFromJSON;
536
+ function envelopeBoundToJSON(object) {
537
+ switch (object) {
538
+ case EnvelopeBound.ENVELOPE_BOUND_UNSPECIFIED:
539
+ return "ENVELOPE_BOUND_UNSPECIFIED";
540
+ case EnvelopeBound.ENVELOPE_BOUND_UPPER:
541
+ return "ENVELOPE_BOUND_UPPER";
542
+ case EnvelopeBound.ENVELOPE_BOUND_LOWER:
543
+ return "ENVELOPE_BOUND_LOWER";
544
+ case EnvelopeBound.UNRECOGNIZED:
545
+ default:
546
+ return "UNRECOGNIZED";
547
+ }
548
+ }
549
+ exports.envelopeBoundToJSON = envelopeBoundToJSON;
495
550
  /** Required action for an ActionPoint. */
496
551
  var ActionPointRequiredAction;
497
552
  (function (ActionPointRequiredAction) {
@@ -1311,6 +1366,8 @@ function createBaseRouteInfo() {
1311
1366
  maxWindSpeedMps: undefined,
1312
1367
  minSpeedKnots: undefined,
1313
1368
  maxSpeedKnots: undefined,
1369
+ minVisibilityM: undefined,
1370
+ maxWindGustMps: undefined,
1314
1371
  optimizationMethod: "",
1315
1372
  autonomyLevel: 0,
1316
1373
  extensions: undefined,
@@ -1360,6 +1417,12 @@ exports.RouteInfo = {
1360
1417
  if (message.maxSpeedKnots !== undefined) {
1361
1418
  writer.uint32(277).float(message.maxSpeedKnots);
1362
1419
  }
1420
+ if (message.minVisibilityM !== undefined) {
1421
+ writer.uint32(285).float(message.minVisibilityM);
1422
+ }
1423
+ if (message.maxWindGustMps !== undefined) {
1424
+ writer.uint32(293).float(message.maxWindGustMps);
1425
+ }
1363
1426
  if (message.optimizationMethod !== "") {
1364
1427
  writer.uint32(402).string(message.optimizationMethod);
1365
1428
  }
@@ -1476,6 +1539,20 @@ exports.RouteInfo = {
1476
1539
  message.maxSpeedKnots = reader.float();
1477
1540
  continue;
1478
1541
  }
1542
+ case 35: {
1543
+ if (tag !== 285) {
1544
+ break;
1545
+ }
1546
+ message.minVisibilityM = reader.float();
1547
+ continue;
1548
+ }
1549
+ case 36: {
1550
+ if (tag !== 293) {
1551
+ break;
1552
+ }
1553
+ message.maxWindGustMps = reader.float();
1554
+ continue;
1555
+ }
1479
1556
  case 50: {
1480
1557
  if (tag !== 402) {
1481
1558
  break;
@@ -1521,6 +1598,8 @@ exports.RouteInfo = {
1521
1598
  maxWindSpeedMps: isSet(object.maxWindSpeedMps) ? globalThis.Number(object.maxWindSpeedMps) : undefined,
1522
1599
  minSpeedKnots: isSet(object.minSpeedKnots) ? globalThis.Number(object.minSpeedKnots) : undefined,
1523
1600
  maxSpeedKnots: isSet(object.maxSpeedKnots) ? globalThis.Number(object.maxSpeedKnots) : undefined,
1601
+ minVisibilityM: isSet(object.minVisibilityM) ? globalThis.Number(object.minVisibilityM) : undefined,
1602
+ maxWindGustMps: isSet(object.maxWindGustMps) ? globalThis.Number(object.maxWindGustMps) : undefined,
1524
1603
  optimizationMethod: isSet(object.optimizationMethod) ? globalThis.String(object.optimizationMethod) : "",
1525
1604
  autonomyLevel: isSet(object.autonomyLevel) ? autonomyLevelFromJSON(object.autonomyLevel) : 0,
1526
1605
  extensions: isSet(object.extensions) ? exports.Extensions.fromJSON(object.extensions) : undefined,
@@ -1570,6 +1649,12 @@ exports.RouteInfo = {
1570
1649
  if (message.maxSpeedKnots !== undefined) {
1571
1650
  obj.maxSpeedKnots = message.maxSpeedKnots;
1572
1651
  }
1652
+ if (message.minVisibilityM !== undefined) {
1653
+ obj.minVisibilityM = message.minVisibilityM;
1654
+ }
1655
+ if (message.maxWindGustMps !== undefined) {
1656
+ obj.maxWindGustMps = message.maxWindGustMps;
1657
+ }
1573
1658
  if (message.optimizationMethod !== "") {
1574
1659
  obj.optimizationMethod = message.optimizationMethod;
1575
1660
  }
@@ -1600,6 +1685,8 @@ exports.RouteInfo = {
1600
1685
  message.maxWindSpeedMps = object.maxWindSpeedMps ?? undefined;
1601
1686
  message.minSpeedKnots = object.minSpeedKnots ?? undefined;
1602
1687
  message.maxSpeedKnots = object.maxSpeedKnots ?? undefined;
1688
+ message.minVisibilityM = object.minVisibilityM ?? undefined;
1689
+ message.maxWindGustMps = object.maxWindGustMps ?? undefined;
1603
1690
  message.optimizationMethod = object.optimizationMethod ?? "";
1604
1691
  message.autonomyLevel = object.autonomyLevel ?? 0;
1605
1692
  message.extensions = (object.extensions !== undefined && object.extensions !== null)
@@ -19,7 +19,18 @@ export interface ChecklistEvent {
19
19
  itemId: string;
20
20
  /** Event-specific text payload (note text, flag reason, resolution text) */
21
21
  detail: string;
22
- /** Reference ID for additive entries (note_id, evidence_id) */
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
+ */
23
34
  referenceId: string;
24
35
  /**
25
36
  * Which RUN of `procedure_id` this event belongs to.
@@ -30,6 +41,29 @@ export interface ChecklistEvent {
30
41
  runId: string;
31
42
  /** Set on EVENT_TYPE_EVIDENCE_ATTACHED. Metadata only — see ChecklistEvidence.proto. */
32
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;
33
67
  }
34
68
  export declare enum ChecklistEvent_EventType {
35
69
  EVENT_TYPE_UNKNOWN = 0,
@@ -38,6 +72,21 @@ export declare enum ChecklistEvent_EventType {
38
72
  EVENT_TYPE_ITEM_COMPLETED = 3,
39
73
  EVENT_TYPE_ITEM_REVERTED = 4,
40
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
+ */
41
90
  EVENT_TYPE_ITEM_FLAGGED = 6,
42
91
  EVENT_TYPE_FLAG_RESOLVED = 7,
43
92
  /**
@@ -63,9 +112,9 @@ export declare enum ChecklistEvent_EventType {
63
112
  * "confirmed" row, and changes nothing. The guard is right for genuine concurrent completion
64
113
  * and must not be relaxed for this.
65
114
  *
66
- * `detail` carries the corrected instant as a UTC ISO-8601 string. `reference_id` names the
67
- * field being corrected: "started_at", "completed_at" or "run_started_at" (the last one
68
- * ignores item_id and moves the run's own start).
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.
69
118
  *
70
119
  * Applying it patches ONLY that timestamp — status and author are untouched — and it is
71
120
  * recorded as its own kind of entry. In a safety record a corrected time that renders
@@ -89,6 +138,23 @@ export declare enum ChecklistEvent_EventType {
89
138
  }
90
139
  export declare function checklistEvent_EventTypeFromJSON(object: any): ChecklistEvent_EventType;
91
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;
92
158
  export declare const ChecklistEvent: MessageFns<ChecklistEvent, "keelson.ChecklistEvent">;
93
159
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
94
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 {} ? {
@@ -5,7 +5,7 @@
5
5
  // protoc v6.30.2
6
6
  // source: ChecklistEvent.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ChecklistEvent = exports.checklistEvent_EventTypeToJSON = exports.checklistEvent_EventTypeFromJSON = exports.ChecklistEvent_EventType = void 0;
8
+ exports.ChecklistEvent = exports.checklistEvent_TimeFieldToJSON = exports.checklistEvent_TimeFieldFromJSON = exports.ChecklistEvent_TimeField = exports.checklistEvent_EventTypeToJSON = exports.checklistEvent_EventTypeFromJSON = exports.ChecklistEvent_EventType = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const ChecklistEvidence_1 = require("./ChecklistEvidence");
@@ -19,6 +19,21 @@ var ChecklistEvent_EventType;
19
19
  ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_ITEM_COMPLETED"] = 3] = "EVENT_TYPE_ITEM_COMPLETED";
20
20
  ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_ITEM_REVERTED"] = 4] = "EVENT_TYPE_ITEM_REVERTED";
21
21
  ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_NOTE_ADDED"] = 5] = "EVENT_TYPE_NOTE_ADDED";
22
+ /**
23
+ * EVENT_TYPE_ITEM_FLAGGED - An issue raised on an item, and the moment it was cleared.
24
+ *
25
+ * Both carry the flag they act on in `reference_id` — the `flag_id`, which is the union key
26
+ * ChecklistState.ItemState.flags merges on. Without it a receiver folding one of these into
27
+ * `flags` has nothing to match against and can only append, so resolving a flag would add a
28
+ * second open one instead of closing the first.
29
+ *
30
+ * A publisher of FLAG_RESOLVED must ALSO write the resolution triple on the ItemFlag —
31
+ * `resolved_at`, `resolved_by`, `resolution` — because that is the half that survives in a
32
+ * snapshot. The event is the live path; a station bootstrapping later sees only the state.
33
+ * Those three are absorbing and settled earliest-wins, per protocol-specification.md §7.2: a
34
+ * peer that never saw the resolution must not reopen it, and two stations genuinely clearing
35
+ * one flag are decided by the earlier time as a value, never by whose snapshot landed last.
36
+ */
22
37
  ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_ITEM_FLAGGED"] = 6] = "EVENT_TYPE_ITEM_FLAGGED";
23
38
  ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_FLAG_RESOLVED"] = 7] = "EVENT_TYPE_FLAG_RESOLVED";
24
39
  /**
@@ -44,9 +59,9 @@ var ChecklistEvent_EventType;
44
59
  * "confirmed" row, and changes nothing. The guard is right for genuine concurrent completion
45
60
  * and must not be relaxed for this.
46
61
  *
47
- * `detail` carries the corrected instant as a UTC ISO-8601 string. `reference_id` names the
48
- * field being corrected: "started_at", "completed_at" or "run_started_at" (the last one
49
- * ignores item_id and moves the run's own start).
62
+ * The corrected instant travels in `corrected_time` and the field it corrects in
63
+ * `corrected_field`. See those fields for what a receiver does with a publisher that
64
+ * predates them.
50
65
  *
51
66
  * Applying it patches ONLY that timestamp — status and author are untouched — and it is
52
67
  * recorded as its own kind of entry. In a safety record a corrected time that renders
@@ -160,6 +175,59 @@ function checklistEvent_EventTypeToJSON(object) {
160
175
  }
161
176
  }
162
177
  exports.checklistEvent_EventTypeToJSON = checklistEvent_EventTypeToJSON;
178
+ /**
179
+ * Which timestamp an EVENT_TYPE_TIME_SET corrects.
180
+ *
181
+ * An enum rather than the field's name as a string, because a string target is matched by
182
+ * every consumer against its own spelling: a typo is not an error, it is a silent no-op that
183
+ * logs an audited correction and patches nothing.
184
+ */
185
+ var ChecklistEvent_TimeField;
186
+ (function (ChecklistEvent_TimeField) {
187
+ ChecklistEvent_TimeField[ChecklistEvent_TimeField["TIME_FIELD_UNKNOWN"] = 0] = "TIME_FIELD_UNKNOWN";
188
+ ChecklistEvent_TimeField[ChecklistEvent_TimeField["TIME_FIELD_ITEM_STARTED_AT"] = 1] = "TIME_FIELD_ITEM_STARTED_AT";
189
+ ChecklistEvent_TimeField[ChecklistEvent_TimeField["TIME_FIELD_ITEM_COMPLETED_AT"] = 2] = "TIME_FIELD_ITEM_COMPLETED_AT";
190
+ /** TIME_FIELD_RUN_STARTED_AT - The run's own start. Ignores `item_id`. */
191
+ ChecklistEvent_TimeField[ChecklistEvent_TimeField["TIME_FIELD_RUN_STARTED_AT"] = 3] = "TIME_FIELD_RUN_STARTED_AT";
192
+ ChecklistEvent_TimeField[ChecklistEvent_TimeField["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
193
+ })(ChecklistEvent_TimeField || (exports.ChecklistEvent_TimeField = ChecklistEvent_TimeField = {}));
194
+ function checklistEvent_TimeFieldFromJSON(object) {
195
+ switch (object) {
196
+ case 0:
197
+ case "TIME_FIELD_UNKNOWN":
198
+ return ChecklistEvent_TimeField.TIME_FIELD_UNKNOWN;
199
+ case 1:
200
+ case "TIME_FIELD_ITEM_STARTED_AT":
201
+ return ChecklistEvent_TimeField.TIME_FIELD_ITEM_STARTED_AT;
202
+ case 2:
203
+ case "TIME_FIELD_ITEM_COMPLETED_AT":
204
+ return ChecklistEvent_TimeField.TIME_FIELD_ITEM_COMPLETED_AT;
205
+ case 3:
206
+ case "TIME_FIELD_RUN_STARTED_AT":
207
+ return ChecklistEvent_TimeField.TIME_FIELD_RUN_STARTED_AT;
208
+ case -1:
209
+ case "UNRECOGNIZED":
210
+ default:
211
+ return ChecklistEvent_TimeField.UNRECOGNIZED;
212
+ }
213
+ }
214
+ exports.checklistEvent_TimeFieldFromJSON = checklistEvent_TimeFieldFromJSON;
215
+ function checklistEvent_TimeFieldToJSON(object) {
216
+ switch (object) {
217
+ case ChecklistEvent_TimeField.TIME_FIELD_UNKNOWN:
218
+ return "TIME_FIELD_UNKNOWN";
219
+ case ChecklistEvent_TimeField.TIME_FIELD_ITEM_STARTED_AT:
220
+ return "TIME_FIELD_ITEM_STARTED_AT";
221
+ case ChecklistEvent_TimeField.TIME_FIELD_ITEM_COMPLETED_AT:
222
+ return "TIME_FIELD_ITEM_COMPLETED_AT";
223
+ case ChecklistEvent_TimeField.TIME_FIELD_RUN_STARTED_AT:
224
+ return "TIME_FIELD_RUN_STARTED_AT";
225
+ case ChecklistEvent_TimeField.UNRECOGNIZED:
226
+ default:
227
+ return "UNRECOGNIZED";
228
+ }
229
+ }
230
+ exports.checklistEvent_TimeFieldToJSON = checklistEvent_TimeFieldToJSON;
163
231
  function createBaseChecklistEvent() {
164
232
  return {
165
233
  $type: "keelson.ChecklistEvent",
@@ -176,6 +244,8 @@ function createBaseChecklistEvent() {
176
244
  referenceId: "",
177
245
  runId: "",
178
246
  evidence: undefined,
247
+ correctedTime: undefined,
248
+ correctedField: 0,
179
249
  };
180
250
  }
181
251
  exports.ChecklistEvent = {
@@ -220,6 +290,12 @@ exports.ChecklistEvent = {
220
290
  if (message.evidence !== undefined) {
221
291
  ChecklistEvidence_1.ChecklistItemEvidence.encode(message.evidence, writer.uint32(106).fork()).join();
222
292
  }
293
+ if (message.correctedTime !== undefined) {
294
+ timestamp_1.Timestamp.encode(toTimestamp(message.correctedTime), writer.uint32(114).fork()).join();
295
+ }
296
+ if (message.correctedField !== 0) {
297
+ writer.uint32(120).int32(message.correctedField);
298
+ }
223
299
  return writer;
224
300
  },
225
301
  decode(input, length) {
@@ -320,6 +396,20 @@ exports.ChecklistEvent = {
320
396
  message.evidence = ChecklistEvidence_1.ChecklistItemEvidence.decode(reader, reader.uint32());
321
397
  continue;
322
398
  }
399
+ case 14: {
400
+ if (tag !== 114) {
401
+ break;
402
+ }
403
+ message.correctedTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
404
+ continue;
405
+ }
406
+ case 15: {
407
+ if (tag !== 120) {
408
+ break;
409
+ }
410
+ message.correctedField = reader.int32();
411
+ continue;
412
+ }
323
413
  }
324
414
  if ((tag & 7) === 4 || tag === 0) {
325
415
  break;
@@ -344,6 +434,8 @@ exports.ChecklistEvent = {
344
434
  referenceId: isSet(object.referenceId) ? globalThis.String(object.referenceId) : "",
345
435
  runId: isSet(object.runId) ? globalThis.String(object.runId) : "",
346
436
  evidence: isSet(object.evidence) ? ChecklistEvidence_1.ChecklistItemEvidence.fromJSON(object.evidence) : undefined,
437
+ correctedTime: isSet(object.correctedTime) ? fromJsonTimestamp(object.correctedTime) : undefined,
438
+ correctedField: isSet(object.correctedField) ? checklistEvent_TimeFieldFromJSON(object.correctedField) : 0,
347
439
  };
348
440
  },
349
441
  toJSON(message) {
@@ -387,6 +479,12 @@ exports.ChecklistEvent = {
387
479
  if (message.evidence !== undefined) {
388
480
  obj.evidence = ChecklistEvidence_1.ChecklistItemEvidence.toJSON(message.evidence);
389
481
  }
482
+ if (message.correctedTime !== undefined) {
483
+ obj.correctedTime = message.correctedTime.toISOString();
484
+ }
485
+ if (message.correctedField !== 0) {
486
+ obj.correctedField = checklistEvent_TimeFieldToJSON(message.correctedField);
487
+ }
390
488
  return obj;
391
489
  },
392
490
  create(base) {
@@ -409,6 +507,8 @@ exports.ChecklistEvent = {
409
507
  message.evidence = (object.evidence !== undefined && object.evidence !== null)
410
508
  ? ChecklistEvidence_1.ChecklistItemEvidence.fromPartial(object.evidence)
411
509
  : undefined;
510
+ message.correctedTime = object.correctedTime ?? undefined;
511
+ message.correctedField = object.correctedField ?? 0;
412
512
  return message;
413
513
  },
414
514
  };
@@ -28,7 +28,7 @@ export interface ChecklistItemEvidence {
28
28
  /** When the image was TAKEN, which is not necessarily when it was attached. */
29
29
  capturedAt: Date | undefined;
30
30
  author: string;
31
- authorRocSite: string;
31
+ authorSite: string;
32
32
  /**
33
33
  * Full media type, e.g. "image/jpeg". Drives the Blob the receiver builds, and is echoed into
34
34
  * the CompressedImage's own `format` so a recovered blob is self-describing.
@@ -65,7 +65,7 @@ function createBaseChecklistItemEvidence() {
65
65
  caption: "",
66
66
  capturedAt: undefined,
67
67
  author: "",
68
- authorRocSite: "",
68
+ authorSite: "",
69
69
  mediaType: "",
70
70
  byteSize: 0,
71
71
  width: 0,
@@ -88,8 +88,8 @@ exports.ChecklistItemEvidence = {
88
88
  if (message.author !== "") {
89
89
  writer.uint32(34).string(message.author);
90
90
  }
91
- if (message.authorRocSite !== "") {
92
- writer.uint32(42).string(message.authorRocSite);
91
+ if (message.authorSite !== "") {
92
+ writer.uint32(42).string(message.authorSite);
93
93
  }
94
94
  if (message.mediaType !== "") {
95
95
  writer.uint32(50).string(message.mediaType);
@@ -147,7 +147,7 @@ exports.ChecklistItemEvidence = {
147
147
  if (tag !== 42) {
148
148
  break;
149
149
  }
150
- message.authorRocSite = reader.string();
150
+ message.authorSite = reader.string();
151
151
  continue;
152
152
  }
153
153
  case 6: {
@@ -200,7 +200,7 @@ exports.ChecklistItemEvidence = {
200
200
  caption: isSet(object.caption) ? globalThis.String(object.caption) : "",
201
201
  capturedAt: isSet(object.capturedAt) ? fromJsonTimestamp(object.capturedAt) : undefined,
202
202
  author: isSet(object.author) ? globalThis.String(object.author) : "",
203
- authorRocSite: isSet(object.authorRocSite) ? globalThis.String(object.authorRocSite) : "",
203
+ authorSite: isSet(object.authorSite) ? globalThis.String(object.authorSite) : "",
204
204
  mediaType: isSet(object.mediaType) ? globalThis.String(object.mediaType) : "",
205
205
  byteSize: isSet(object.byteSize) ? globalThis.Number(object.byteSize) : 0,
206
206
  width: isSet(object.width) ? globalThis.Number(object.width) : 0,
@@ -222,8 +222,8 @@ exports.ChecklistItemEvidence = {
222
222
  if (message.author !== "") {
223
223
  obj.author = message.author;
224
224
  }
225
- if (message.authorRocSite !== "") {
226
- obj.authorRocSite = message.authorRocSite;
225
+ if (message.authorSite !== "") {
226
+ obj.authorSite = message.authorSite;
227
227
  }
228
228
  if (message.mediaType !== "") {
229
229
  obj.mediaType = message.mediaType;
@@ -251,7 +251,7 @@ exports.ChecklistItemEvidence = {
251
251
  message.caption = object.caption ?? "";
252
252
  message.capturedAt = object.capturedAt ?? undefined;
253
253
  message.author = object.author ?? "";
254
- message.authorRocSite = object.authorRocSite ?? "";
254
+ message.authorSite = object.authorSite ?? "";
255
255
  message.mediaType = object.mediaType ?? "";
256
256
  message.byteSize = object.byteSize ?? 0;
257
257
  message.width = object.width ?? 0;
@@ -31,10 +31,16 @@ export interface ChecklistPresence {
31
31
  */
32
32
  openRunIds: string[];
33
33
  }
34
+ /**
35
+ * Renamed from CURSOR_* to carry the enum's own name, which is what every other enum in this
36
+ * family does (RUN_STATUS_, ITEM_STATUS_, SOURCE_, EVENT_TYPE_). The WIRE IS UNCHANGED — only
37
+ * the generated identifiers move, so a recording decodes identically and a consumer notices at
38
+ * compile time rather than at runtime.
39
+ */
34
40
  export declare enum ChecklistPresence_CursorState {
35
- CURSOR_IDLE = 0,
36
- CURSOR_VIEWING = 1,
37
- CURSOR_EDITING_NOTE = 2,
41
+ CURSOR_STATE_IDLE = 0,
42
+ CURSOR_STATE_VIEWING = 1,
43
+ CURSOR_STATE_EDITING_NOTE = 2,
38
44
  UNRECOGNIZED = -1
39
45
  }
40
46
  export declare function checklistPresence_CursorStateFromJSON(object: any): ChecklistPresence_CursorState;
@@ -10,24 +10,30 @@ exports.ChecklistPresence = exports.checklistPresence_CursorStateToJSON = export
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const timestamp_1 = require("./google/protobuf/timestamp");
12
12
  const typeRegistry_1 = require("./typeRegistry");
13
+ /**
14
+ * Renamed from CURSOR_* to carry the enum's own name, which is what every other enum in this
15
+ * family does (RUN_STATUS_, ITEM_STATUS_, SOURCE_, EVENT_TYPE_). The WIRE IS UNCHANGED — only
16
+ * the generated identifiers move, so a recording decodes identically and a consumer notices at
17
+ * compile time rather than at runtime.
18
+ */
13
19
  var ChecklistPresence_CursorState;
14
20
  (function (ChecklistPresence_CursorState) {
15
- ChecklistPresence_CursorState[ChecklistPresence_CursorState["CURSOR_IDLE"] = 0] = "CURSOR_IDLE";
16
- ChecklistPresence_CursorState[ChecklistPresence_CursorState["CURSOR_VIEWING"] = 1] = "CURSOR_VIEWING";
17
- ChecklistPresence_CursorState[ChecklistPresence_CursorState["CURSOR_EDITING_NOTE"] = 2] = "CURSOR_EDITING_NOTE";
21
+ ChecklistPresence_CursorState[ChecklistPresence_CursorState["CURSOR_STATE_IDLE"] = 0] = "CURSOR_STATE_IDLE";
22
+ ChecklistPresence_CursorState[ChecklistPresence_CursorState["CURSOR_STATE_VIEWING"] = 1] = "CURSOR_STATE_VIEWING";
23
+ ChecklistPresence_CursorState[ChecklistPresence_CursorState["CURSOR_STATE_EDITING_NOTE"] = 2] = "CURSOR_STATE_EDITING_NOTE";
18
24
  ChecklistPresence_CursorState[ChecklistPresence_CursorState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
19
25
  })(ChecklistPresence_CursorState || (exports.ChecklistPresence_CursorState = ChecklistPresence_CursorState = {}));
20
26
  function checklistPresence_CursorStateFromJSON(object) {
21
27
  switch (object) {
22
28
  case 0:
23
- case "CURSOR_IDLE":
24
- return ChecklistPresence_CursorState.CURSOR_IDLE;
29
+ case "CURSOR_STATE_IDLE":
30
+ return ChecklistPresence_CursorState.CURSOR_STATE_IDLE;
25
31
  case 1:
26
- case "CURSOR_VIEWING":
27
- return ChecklistPresence_CursorState.CURSOR_VIEWING;
32
+ case "CURSOR_STATE_VIEWING":
33
+ return ChecklistPresence_CursorState.CURSOR_STATE_VIEWING;
28
34
  case 2:
29
- case "CURSOR_EDITING_NOTE":
30
- return ChecklistPresence_CursorState.CURSOR_EDITING_NOTE;
35
+ case "CURSOR_STATE_EDITING_NOTE":
36
+ return ChecklistPresence_CursorState.CURSOR_STATE_EDITING_NOTE;
31
37
  case -1:
32
38
  case "UNRECOGNIZED":
33
39
  default:
@@ -37,12 +43,12 @@ function checklistPresence_CursorStateFromJSON(object) {
37
43
  exports.checklistPresence_CursorStateFromJSON = checklistPresence_CursorStateFromJSON;
38
44
  function checklistPresence_CursorStateToJSON(object) {
39
45
  switch (object) {
40
- case ChecklistPresence_CursorState.CURSOR_IDLE:
41
- return "CURSOR_IDLE";
42
- case ChecklistPresence_CursorState.CURSOR_VIEWING:
43
- return "CURSOR_VIEWING";
44
- case ChecklistPresence_CursorState.CURSOR_EDITING_NOTE:
45
- return "CURSOR_EDITING_NOTE";
46
+ case ChecklistPresence_CursorState.CURSOR_STATE_IDLE:
47
+ return "CURSOR_STATE_IDLE";
48
+ case ChecklistPresence_CursorState.CURSOR_STATE_VIEWING:
49
+ return "CURSOR_STATE_VIEWING";
50
+ case ChecklistPresence_CursorState.CURSOR_STATE_EDITING_NOTE:
51
+ return "CURSOR_STATE_EDITING_NOTE";
46
52
  case ChecklistPresence_CursorState.UNRECOGNIZED:
47
53
  default:
48
54
  return "UNRECOGNIZED";