@operato/ops-contract 0.9.43 → 0.9.44

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.
@@ -39,7 +39,9 @@ export type YmsOrderKind = (typeof YMS_ORDER_KIND)[keyof typeof YMS_ORDER_KIND];
39
39
  * · `pull` — 야드 슬롯에서 도어로(창이 열리고 도어가 비었을 때).
40
40
  * · `dwell` — 도어에 붙어 상·하차하는 동안. 자리를 옮기지 않는 작업이다(from = to = 도어).
41
41
  * · `depart` — 도어 또는 슬롯에서 게이트로.
42
- * · `reposition` — 야드 안의 재배치(슬롯 → 슬롯). 커널은 아직 내지 않고 야드 앱이 낸다.
42
+ *
43
+ * 트윈이 읽는 낱말만 이름 붙인다. 야드 앱만 내는 재배치(`reposition`)는 야드의 낱말이다 — 생산자 고유의 종류는 생산자가 갖는다
44
+ * (2026-11-19 계약 내용 점검, 사용자 결정). 트윈은 작업 종류를 닫아 두지 않으므로 그 낱말도 그대로 받는다.
43
45
  */
44
46
  export declare const YMS_TASK_KIND: {
45
47
  readonly spot: "spot";
@@ -47,7 +49,6 @@ export declare const YMS_TASK_KIND: {
47
49
  readonly pull: "pull";
48
50
  readonly dwell: "dwell";
49
51
  readonly depart: "depart";
50
- readonly reposition: "reposition";
51
52
  };
52
53
  export type YmsTaskKind = (typeof YMS_TASK_KIND)[keyof typeof YMS_TASK_KIND];
53
54
  /** 야드 운영 모드 — `drop`: 트레일러를 슬롯에 내려놓고 창이 오면 호슬러가 끈다. `live`: 게이트에서 기다리다 도어로 곧장. */
@@ -87,6 +88,13 @@ export declare function dockDoorStatusOf(d: {
87
88
  parallelism?: number;
88
89
  blocked?: boolean;
89
90
  }): DockDoorStatus;
91
+ /**
92
+ * **How many trailers a door holds at once** - the definition of `parallelism` on a dock door (see `LocationState.parallelism`):
93
+ * a whole number, at least one - unset, 0 or negative is 1, and 1.5 is 1 (half a trailer does not dock). There is no
94
+ * "unlimited" door. One reading for the door's state, the booking refusal and the measures, on the producer and the twin
95
+ * alike (the yard floored it and this file did not - a 1.5 read two ways, found 2026-11-18).
96
+ */
97
+ export declare function dockDoorCapacityOf(parallelism: unknown): number;
90
98
  /**
91
99
  * 트레일러의 적재 — 게이트에서 **신고된** 것. 화물 SSCC 를 아는 경우 내용물은 AggregationEvent 가 말하며, 이 값은 그것을 대신하지 않는다
92
100
  * (내용을 모르는 방문 트레일러가 「차 있다 / 비었다」만 말할 때의 칸이다).
@@ -75,15 +75,16 @@ export const YMS_ORDER_KIND = {
75
75
  * · `pull` — 야드 슬롯에서 도어로(창이 열리고 도어가 비었을 때).
76
76
  * · `dwell` — 도어에 붙어 상·하차하는 동안. 자리를 옮기지 않는 작업이다(from = to = 도어).
77
77
  * · `depart` — 도어 또는 슬롯에서 게이트로.
78
- * · `reposition` — 야드 안의 재배치(슬롯 → 슬롯). 커널은 아직 내지 않고 야드 앱이 낸다.
78
+ *
79
+ * 트윈이 읽는 낱말만 이름 붙인다. 야드 앱만 내는 재배치(`reposition`)는 야드의 낱말이다 — 생산자 고유의 종류는 생산자가 갖는다
80
+ * (2026-11-19 계약 내용 점검, 사용자 결정). 트윈은 작업 종류를 닫아 두지 않으므로 그 낱말도 그대로 받는다.
79
81
  */
80
82
  export const YMS_TASK_KIND = {
81
83
  spot: 'spot',
82
84
  spotLive: 'spot-live',
83
85
  pull: 'pull',
84
86
  dwell: 'dwell',
85
- depart: 'depart',
86
- reposition: 'reposition'
87
+ depart: 'depart'
87
88
  };
88
89
  /** 야드 운영 모드 — `drop`: 트레일러를 슬롯에 내려놓고 창이 오면 호슬러가 끈다. `live`: 게이트에서 기다리다 도어로 곧장. */
89
90
  export const YARD_MODE = ['drop', 'live'];
@@ -120,8 +121,16 @@ export const DOCK_DOOR_STATUS = ['free', 'occupied', 'blocked'];
120
121
  export function dockDoorStatusOf(d) {
121
122
  if (d.blocked)
122
123
  return 'blocked';
123
- const cap = typeof d.parallelism === 'number' && d.parallelism > 0 ? d.parallelism : 1;
124
- return (d.occupancy ?? 0) >= cap ? 'occupied' : 'free';
124
+ return (d.occupancy ?? 0) >= dockDoorCapacityOf(d.parallelism) ? 'occupied' : 'free';
125
+ }
126
+ /**
127
+ * **How many trailers a door holds at once** - the definition of `parallelism` on a dock door (see `LocationState.parallelism`):
128
+ * a whole number, at least one - unset, 0 or negative is 1, and 1.5 is 1 (half a trailer does not dock). There is no
129
+ * "unlimited" door. One reading for the door's state, the booking refusal and the measures, on the producer and the twin
130
+ * alike (the yard floored it and this file did not - a 1.5 read two ways, found 2026-11-18).
131
+ */
132
+ export function dockDoorCapacityOf(parallelism) {
133
+ return Math.max(1, Math.floor(Number(parallelism) || 0));
125
134
  }
126
135
  /**
127
136
  * 트레일러의 적재 — 게이트에서 **신고된** 것. 화물 SSCC 를 아는 경우 내용물은 AggregationEvent 가 말하며, 이 값은 그것을 대신하지 않는다