@operato/twin-kernel 0.11.29 → 0.11.31

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.
@@ -481,7 +481,7 @@ export class EmsKernel extends FlowEngine {
481
481
  /*
482
482
  * ── 「사실」이라 말할 수 있는 조건은 **둘을 다 아는 것**이다 (2026-08-28, 고침) ─
483
483
  *
484
- * 앞 판은 `since ? 'declared' : 'inferred'` 였다. 그래서 **기준점을 뒤늦게 알게 되는 원본**에서
484
+ * 앞 버전은 `since ? 'declared' : 'inferred'` 였다. 그래서 **기준점을 뒤늦게 알게 되는 원본**에서
485
485
  * 첫 되돌아감이 「짐작인데 사실로」 기록됐다 — 인티그레이션 레인이 짚었다.
486
486
  *
487
487
  * 표본 1..N 기준점 없음
@@ -501,7 +501,7 @@ export class EmsKernel extends FlowEngine {
501
501
  /*
502
502
  * ── 종류를 알면 기준점 없이도 경계를 안다 (2026-08-28) ─────────────────────
503
503
  *
504
- * 앞 판은 `since` 만 보았다. 그래서 하루 누적을 선언한 원본이 기준점을 주지 않으면 매일 자정이
504
+ * 앞 버전은 `since` 만 보았다. 그래서 하루 누적을 선언한 원본이 기준점을 주지 않으면 매일 자정이
505
505
  * 계기 교체로 기록됐다 — 종류를 말해 주었는데도.
506
506
  *
507
507
  * 그리고 **같은 날 안에서** 줄어든 것은 종류가 무엇이든 이상이다: 하루 누적의 경계는 자정이고,
@@ -1603,7 +1603,7 @@ export class EmsKernel extends FlowEngine {
1603
1603
  /*
1604
1604
  * ── 발전 기간도 **시계로** 마감한다 (2026-08-30) ───────────────────────────
1605
1605
  *
1606
- * 앞 판은 새 표본이 올 때만 날짜가 바뀐 것을 알아챘다. 그런데 태양광은 해가 지면 값을 보내지
1606
+ * 앞 버전은 새 표본이 올 때만 날짜가 바뀐 것을 알아챘다. 그런데 태양광은 해가 지면 값을 보내지
1607
1607
  * 않는다 — 어제 마지막 표본이 19:40 이면 어제 하루치가 **다음 날 아침 첫 표본**에야 확정된다.
1608
1608
  * 밤새 「어제 얼마 냈나」에 답이 없다.
1609
1609
  *
@@ -1429,7 +1429,7 @@ export declare abstract class FlowEngine implements TwinKernel {
1429
1429
  *
1430
1430
  * ── 왜 여기인가 ────────────────────────────────────────────────────────────
1431
1431
  * 부르는 자리 하나를 막으면 다른 자리에서 같은 일이 난다 — `emitOrder` 를 부르는 곳만 열다섯이다.
1432
- * 그리고 `revision` 이 여기서 오르므로, 여기서 막지 않으면 **적지 않고도 판만 올라간다.**
1432
+ * 그리고 `revision` 이 여기서 오르므로, 여기서 막지 않으면 **적지 않고도 버전만 올라간다.**
1433
1433
  *
1434
1434
  * ── 무엇을 같다고 보나 ─────────────────────────────────────────────────────
1435
1435
  * `data` 가 바이트까지 같으면 같다. 시각은 `data` 에 없다(여기서 붙인다) — 그래서 「같은 사실을
@@ -3011,7 +3011,7 @@ export class FlowEngine {
3011
3011
  *
3012
3012
  * ── 왜 여기인가 ────────────────────────────────────────────────────────────
3013
3013
  * 부르는 자리 하나를 막으면 다른 자리에서 같은 일이 난다 — `emitOrder` 를 부르는 곳만 열다섯이다.
3014
- * 그리고 `revision` 이 여기서 오르므로, 여기서 막지 않으면 **적지 않고도 판만 올라간다.**
3014
+ * 그리고 `revision` 이 여기서 오르므로, 여기서 막지 않으면 **적지 않고도 버전만 올라간다.**
3015
3015
  *
3016
3016
  * ── 무엇을 같다고 보나 ─────────────────────────────────────────────────────
3017
3017
  * `data` 가 바이트까지 같으면 같다. 시각은 `data` 에 없다(여기서 붙인다) — 그래서 「같은 사실을
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ export * from './runtime.ts';
13
13
  export * from './flow-engine.ts';
14
14
  export { WmsKernel } from './kernel.ts';
15
15
  export { YmsKernel } from './yms-kernel.ts';
16
- export { MesKernel } from './mes-kernel.ts';
16
+ export { MesKernel, TWIN_MODEL_NO_PRODUCTION_SPEC } from './mes-kernel.ts';
17
17
  export { EmsKernel, DEMAND_WINDOW_MS, demandWindowStart } from './ems-kernel.ts';
18
18
  export * from './energy-attribution.ts';
19
19
  export * from './make-to-order.ts';
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ export * from "./runtime.js";
27
27
  export * from "./flow-engine.js";
28
28
  export { WmsKernel } from "./kernel.js";
29
29
  export { YmsKernel } from "./yms-kernel.js";
30
- export { MesKernel } from "./mes-kernel.js";
30
+ export { MesKernel, TWIN_MODEL_NO_PRODUCTION_SPEC } from "./mes-kernel.js";
31
31
  export { EmsKernel, DEMAND_WINDOW_MS, demandWindowStart } from "./ems-kernel.js";
32
32
  export * from "./energy-attribution.js";
33
33
  export * from "./make-to-order.js";
@@ -3,6 +3,11 @@ import type { AllocationPolicy } from './allocation-policy.ts';
3
3
  import { FlowEngine } from './flow-engine.ts';
4
4
  import type { FlowOrder, FlowTask } from './flow-engine.ts';
5
5
  import { type OpMaterialSpecification } from '@operato/ops-contract';
6
+ /**
7
+ * A MES twin model without a production declaration. The kernel refuses to load it, carrying this code
8
+ * and `params` on the error so a host can turn it into a sentence the reader can read (ADR-0054).
9
+ */
10
+ export declare const TWIN_MODEL_NO_PRODUCTION_SPEC = "twin-model-no-production-spec";
6
11
  export declare class MesKernel extends FlowEngine {
7
12
  private wipSeq;
8
13
  private prodSeq;
@@ -89,7 +94,7 @@ export declare class MesKernel extends FlowEngine {
89
94
  * 은 스스로 「자재 반입→보관→공정 변환→완제품 반출 … 양끝 야드 물류(YMS·WMS·MES)」라 말한다 —
90
95
  * **한 선언이 사이트 전체를 덮고, 도메인마다 다른 트윈이 그 일부를 지난다.**
91
96
  *
92
- * 그래서 MES 판(여섯 노드)이 `receive`→`dock-door` · `park`→`yard-slot` · `dispatch`→`gate` 때문에
97
+ * 그래서 MES 버전(여섯 노드)이 `receive`→`dock-door` · `park`→`yard-slot` · `dispatch`→`gate` 때문에
93
98
  * **아예 열리지 않았다.** 셋 다 이 트윈이 지나지 않는 공정이다. 없는 사정을 상상하지 말라던 규율을
94
99
  * 지키려다, **있는 사정을 못 본 채로** 검사를 넓힌 것이 잘못이었다.
95
100
  *
@@ -22,6 +22,11 @@ const DEFAULT_SETUP_MS = 15_000; // 체인지오버(제품 전환) 셋업 — OE
22
22
  // MES 도메인 커맨드(Tier 2, 무방언 — MES 어휘는 MES 커널 소유). handleCommand 로 처리.
23
23
  const MES_CMD = { changeover: 'mes.changeover' };
24
24
  const DEFAULT_YIELD = 0.8; // 양품률 기본값 — 현장 값은 OperationDef.parameters(OP_PARAM.yield) 로 온다
25
+ /**
26
+ * A MES twin model without a production declaration. The kernel refuses to load it, carrying this code
27
+ * and `params` on the error so a host can turn it into a sentence the reader can read (ADR-0054).
28
+ */
29
+ export const TWIN_MODEL_NO_PRODUCTION_SPEC = 'twin-model-no-production-spec';
25
30
  /*
26
31
  * 정의-구동 모드 스펙은 **계약의 `ProductionSpec`** 이다(`contract.ts`).
27
32
  *
@@ -251,7 +256,7 @@ export class MesKernel extends FlowEngine {
251
256
  * 은 스스로 「자재 반입→보관→공정 변환→완제품 반출 … 양끝 야드 물류(YMS·WMS·MES)」라 말한다 —
252
257
  * **한 선언이 사이트 전체를 덮고, 도메인마다 다른 트윈이 그 일부를 지난다.**
253
258
  *
254
- * 그래서 MES 판(여섯 노드)이 `receive`→`dock-door` · `park`→`yard-slot` · `dispatch`→`gate` 때문에
259
+ * 그래서 MES 버전(여섯 노드)이 `receive`→`dock-door` · `park`→`yard-slot` · `dispatch`→`gate` 때문에
255
260
  * **아예 열리지 않았다.** 셋 다 이 트윈이 지나지 않는 공정이다. 없는 사정을 상상하지 말라던 규율을
256
261
  * 지키려다, **있는 사정을 못 본 채로** 검사를 넓힌 것이 잘못이었다.
257
262
  *
@@ -269,8 +274,12 @@ export class MesKernel extends FlowEngine {
269
274
  * 그 상수가 모델에 없는 품목을 만들어 냈다. 그 경로를 제거했으므로 선언은 이제 필수다.
270
275
  */
271
276
  if (!this.productionSpec) {
272
- throw new Error('MES twin requires a production declaration (ProductionSpec): materials, routes and recipes. ' +
273
- 'The kernel no longer carries a built-in demo product — what is made is decided by the model.');
277
+ /*
278
+ * A refusal with a name, not a crash: the model is what is wrong, and the host has to be able to
279
+ * say so in the reader's language (ADR-0054). The English sentence is the fallback and the log line.
280
+ */
281
+ throw Object.assign(new Error('MES twin requires a production declaration (ProductionSpec): materials, routes and recipes. ' +
282
+ 'The kernel no longer carries a built-in demo product — what is made is decided by the model.'), { code: TWIN_MODEL_NO_PRODUCTION_SPEC, params: {} });
274
283
  }
275
284
  const have = new Set([...this.locations.values()].map(l => l.type));
276
285
  const decl = this.productionSpec.definition;
@@ -32,6 +32,7 @@ __export(index_exports, {
32
32
  OPERATION_PROPERTY: () => OPERATION_PROPERTY,
33
33
  ObservedReducer: () => ObservedReducer,
34
34
  StateProjector: () => ObservedReducer,
35
+ TWIN_MODEL_NO_PRODUCTION_SPEC: () => TWIN_MODEL_NO_PRODUCTION_SPEC,
35
36
  TwinHistory: () => TwinHistory,
36
37
  TwinObserver: () => TwinObserver,
37
38
  TwinRuntime: () => TwinRuntime,
@@ -859,6 +860,9 @@ var ENERGY_EVENT = {
859
860
  */
860
861
  drSuggested: "energy.dr.suggested"
861
862
  };
863
+ var EQUIPMENT_STATUS = ["busy", "setup", "down", "idle", "planned-stop"];
864
+ var PERSON_STATUS = ["idle", "busy"];
865
+ var ASSET_STATUS = ["idle", "in-use"];
862
866
  var MATERIAL_ACTUAL_USE = ["consumed", "produced"];
863
867
  var ALLOCATION_POLICY = {
864
868
  /** 가장 작은 식별자부터. FIFO 가 아니다 — 입고 시각을 보지 않는다. */
@@ -1037,81 +1041,6 @@ function analyzeCapacity(input) {
1037
1041
  };
1038
1042
  }
1039
1043
 
1040
- // ../ops-contract/dist/wms-profile.js
1041
- var BIZSTEP = {
1042
- receiving: "urn:epcglobal:cbv:bizstep:receiving",
1043
- storing: "urn:epcglobal:cbv:bizstep:storing",
1044
- picking: "urn:epcglobal:cbv:bizstep:picking",
1045
- packing: "urn:epcglobal:cbv:bizstep:packing",
1046
- staging_outbound: "urn:epcglobal:cbv:bizstep:staging_outbound",
1047
- shipping: "urn:epcglobal:cbv:bizstep:shipping",
1048
- /**
1049
- * **Replenishment** — moving goods to where they are picked from. CBV has no `replenishing`; this contract
1050
- * wrote one until 2026-09-24, and the closed-list test found it. CBV `stocking` is the step that means it:
1051
- * "…within a location to make an object available to the customer or for order fulfilment within a DC"
1052
- * (CBV ontology, `BizStep-stocking`). Ruled by the chief architect; no reader branches on the value, and
1053
- * the journal keeps what it already wrote (ADR-0038).
1054
- */
1055
- stocking: "urn:epcglobal:cbv:bizstep:stocking",
1056
- /**
1057
- * **Counted, and the book set to the count** — CBV `cycle_counting`. Primary source: the CBV ontology
1058
- * (gs1/EPCIS `Ontology/CBV.ttl`, `cbv:BizStep-cycle_counting`, also served at ref.gs1.org/cbv): "Process of
1059
- * counting objects within a location in order to obtain an accurate inventory for business needs other
1060
- * than accounting purposes (e.g., replenishment and allocation)."
1061
- *
1062
- * **Only for an event somebody actually counted** (chief architect, 2026-09-24). A person correcting the
1063
- * book without counting is `CBV_BIZSTEP.other` with the reason carried as a value — `epcis.ts` says why:
1064
- * writing that as `cycle_counting` records a count that never happened. A count for the accounts is a
1065
- * different CBV step (`stock_taking`) and is not this one.
1066
- */
1067
- cycle_counting: "urn:epcglobal:cbv:bizstep:cycle_counting"
1068
- };
1069
- var BTT = {
1070
- /** Purchase Order — the document an inbound receipt is made against. */
1071
- po: "urn:epcglobal:cbv:btt:po",
1072
- /** Purchase Order Confirmation — the seller's sales order. */
1073
- poc: "urn:epcglobal:cbv:btt:poc",
1074
- /** Despatch Advice (ASN) — announces an inbound delivery; also attached when shipping. */
1075
- desadv: "urn:epcglobal:cbv:btt:desadv",
1076
- /** Receiving Advice — the reply once an inbound receipt is complete. */
1077
- recadv: "urn:epcglobal:cbv:btt:recadv",
1078
- /** Return Merchandise Authorization — what a return is received against. */
1079
- rma: "urn:epcglobal:cbv:btt:rma",
1080
- /** Bill of Lading — the carrier's document, attached when shipping. */
1081
- bol: "urn:epcglobal:cbv:btt:bol"
1082
- };
1083
- var WMS_ORDER_KIND = {
1084
- /**
1085
- * Expected receipt (ASN) — what was promised to arrive, and how much of it has.
1086
- *
1087
- * Flow metrics leave it out: the arrival both raises and fulfils it, so counting it would add a
1088
- * completed order per arrival and never clear the backlog (`isFlowOrder`).
1089
- */
1090
- inbound: "inbound",
1091
- /** Outbound order — what the kernel's sales order is. */
1092
- outbound: "outbound",
1093
- /** Receipt of returned goods. */
1094
- return: "return",
1095
- /** Stock transfer between sites. CBV has no document type for it: carry the id without a type. */
1096
- transfer: "transfer"
1097
- };
1098
- var WMS_RECEIVING_ORDER_KINDS = [WMS_ORDER_KIND.inbound, WMS_ORDER_KIND.return];
1099
- var WMS_LOCATION_TYPES = ["dock", "storage", "staging", "dock-ship", "vas-station"];
1100
- var WMS_LOCATION_LEVEL = {
1101
- dock: "StorageZone",
1102
- storage: "StorageUnit",
1103
- staging: "StorageZone",
1104
- "dock-ship": "StorageZone",
1105
- "vas-station": "WorkCell"
1106
- };
1107
- var WMS_TYPES = [
1108
- ...WMS_LOCATION_TYPES.filter((k) => k !== "vas-station").map((k) => ({ key: k, role: "location", label: `twin.type.${k}`, standardClass: { epcis: "bizLocation" }, identity: { scheme: "gs1:SGLN" }, level: WMS_LOCATION_LEVEL[k], capabilities: ["storable"] })),
1109
- { key: "vas-station", role: "location", label: "twin.type.vas-station", standardClass: { epcis: "bizLocation", isa95: "WorkCenter" }, identity: { scheme: "gs1:SGLN" }, level: WMS_LOCATION_LEVEL["vas-station"], capabilities: ["storable", "processable"] },
1110
- { key: "forklift", role: "equipment", label: "twin.type.forklift", standardClass: { epcis: "object", iso55000: "Asset" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["mobile", "operable"] },
1111
- /** 유통가공 작업자·작업대 설비 — 가공을 수행하는 능동 자원(ISA-95 `Equipment`). */
1112
- { key: "packer", role: "equipment", label: "twin.type.packer", standardClass: { epcis: "object", isa95: "Equipment" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["processable", "operable"] }
1113
- ];
1114
-
1115
1044
  // ../ops-contract/dist/epcis.js
1116
1045
  var EPCIS_CONTEXT = "https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld";
1117
1046
  var UTC_OFFSET = "+00:00";
@@ -1180,7 +1109,15 @@ var DISP = {
1180
1109
  * 그때 열되, **판정 자체는 여기서 끝난다.**
1181
1110
  */
1182
1111
  conformant: "urn:epcglobal:cbv:disp:conformant",
1183
- non_conformant: "urn:epcglobal:cbv:disp:non_conformant"
1112
+ non_conformant: "urn:epcglobal:cbv:disp:non_conformant",
1113
+ /**
1114
+ * **Sent back** — CBV `returned`. Primary source: the CBV ontology (gs1/EPCIS `Ontology/CBV.ttl`, versionInfo 2.0,
1115
+ * `cbv:Disp-returned`, read 2026-10-23): "Object has been sent or brought back for various reasons. It may or may not
1116
+ * be sellable." It is what goods going back to their supplier carry when they leave (`RETURN_TO_SUPPLIER`), and what
1117
+ * a customer's return may carry when it arrives. Added for the warehouse's return to supplier (operato-application
1118
+ * ADR-0154 decision 2, ruled: the words before the document).
1119
+ */
1120
+ returned: "urn:epcglobal:cbv:disp:returned"
1184
1121
  };
1185
1122
  var HATIOLAB_VOCABULARY = "https://hatiolab.com/voc/";
1186
1123
  var PRIVATE_BIZSTEP = {
@@ -1507,6 +1444,86 @@ function gs1KeyDigitViolation(uri) {
1507
1444
  return `${m[1]} \uC790\uB9AC \uC218 \uC624\uB958: ${uri} \u2014 \uD68C\uC0AC \uD504\uB9AC\uD53D\uC2A4(${prefix.length}) + \uCC38\uC870(${ref.length}) = ${got} \uC774\uC9C0\uB9CC ${want} \uC5EC\uC57C \uD55C\uB2E4(GS1 TDS). \uD504\uB9AC\uD53D\uC2A4\uB97C \uBC14\uAFB8\uBA74 \uCC38\uC870 \uC790\uB9AC \uC218\uB97C \uD568\uAED8 \uB9DE\uCDB0\uC57C \uD55C\uB2E4.`;
1508
1445
  }
1509
1446
 
1447
+ // ../ops-contract/dist/wms-profile.js
1448
+ var BIZSTEP = {
1449
+ receiving: "urn:epcglobal:cbv:bizstep:receiving",
1450
+ storing: "urn:epcglobal:cbv:bizstep:storing",
1451
+ picking: "urn:epcglobal:cbv:bizstep:picking",
1452
+ packing: "urn:epcglobal:cbv:bizstep:packing",
1453
+ staging_outbound: "urn:epcglobal:cbv:bizstep:staging_outbound",
1454
+ shipping: "urn:epcglobal:cbv:bizstep:shipping",
1455
+ /**
1456
+ * **Replenishment** — moving goods to where they are picked from. CBV has no `replenishing`; this contract
1457
+ * wrote one until 2026-09-24, and the closed-list test found it. CBV `stocking` is the step that means it:
1458
+ * "…within a location to make an object available to the customer or for order fulfilment within a DC"
1459
+ * (CBV ontology, `BizStep-stocking`). Ruled by the chief architect; no reader branches on the value, and
1460
+ * the journal keeps what it already wrote (ADR-0038).
1461
+ */
1462
+ stocking: "urn:epcglobal:cbv:bizstep:stocking",
1463
+ /**
1464
+ * **Counted, and the book set to the count** — CBV `cycle_counting`. Primary source: the CBV ontology
1465
+ * (gs1/EPCIS `Ontology/CBV.ttl`, `cbv:BizStep-cycle_counting`, also served at ref.gs1.org/cbv): "Process of
1466
+ * counting objects within a location in order to obtain an accurate inventory for business needs other
1467
+ * than accounting purposes (e.g., replenishment and allocation)."
1468
+ *
1469
+ * **Only for an event somebody actually counted** (chief architect, 2026-09-24). A person correcting the
1470
+ * book without counting is `CBV_BIZSTEP.other` with the reason carried as a value — `epcis.ts` says why:
1471
+ * writing that as `cycle_counting` records a count that never happened. A count for the accounts is a
1472
+ * different CBV step (`stock_taking`) and is not this one.
1473
+ */
1474
+ cycle_counting: "urn:epcglobal:cbv:bizstep:cycle_counting"
1475
+ };
1476
+ var BTT = {
1477
+ /** Purchase Order — the document an inbound receipt is made against. */
1478
+ po: "urn:epcglobal:cbv:btt:po",
1479
+ /** Purchase Order Confirmation — the seller's sales order. */
1480
+ poc: "urn:epcglobal:cbv:btt:poc",
1481
+ /** Despatch Advice (ASN) — announces an inbound delivery; also attached when shipping. */
1482
+ desadv: "urn:epcglobal:cbv:btt:desadv",
1483
+ /** Receiving Advice — the reply once an inbound receipt is complete. */
1484
+ recadv: "urn:epcglobal:cbv:btt:recadv",
1485
+ /** Return Merchandise Authorization — what a return is received against. */
1486
+ rma: "urn:epcglobal:cbv:btt:rma",
1487
+ /** Bill of Lading — the carrier's document, attached when shipping. */
1488
+ bol: "urn:epcglobal:cbv:btt:bol"
1489
+ };
1490
+ var RETURN_TO_SUPPLIER = {
1491
+ bizStep: BIZSTEP.shipping,
1492
+ disposition: DISP.returned,
1493
+ bizTransactionType: BTT.rma
1494
+ };
1495
+ var WMS_ORDER_KIND = {
1496
+ /**
1497
+ * Expected receipt (ASN) — what was promised to arrive, and how much of it has.
1498
+ *
1499
+ * Flow metrics leave it out: the arrival both raises and fulfils it, so counting it would add a
1500
+ * completed order per arrival and never clear the backlog (`isFlowOrder`).
1501
+ */
1502
+ inbound: "inbound",
1503
+ /** Outbound order — what the kernel's sales order is. */
1504
+ outbound: "outbound",
1505
+ /** Receipt of returned goods. */
1506
+ return: "return",
1507
+ /** Stock transfer between sites. CBV has no document type for it: carry the id without a type. */
1508
+ transfer: "transfer"
1509
+ };
1510
+ var WMS_RECEIVING_ORDER_KINDS = [WMS_ORDER_KIND.inbound, WMS_ORDER_KIND.return];
1511
+ var WMS_LOCATION_TYPES = ["dock", "storage", "staging", "dock-ship", "vas-station"];
1512
+ var WMS_LOCATION_LEVEL = {
1513
+ dock: "StorageZone",
1514
+ storage: "StorageUnit",
1515
+ staging: "StorageZone",
1516
+ "dock-ship": "StorageZone",
1517
+ "vas-station": "WorkCell"
1518
+ };
1519
+ var WMS_TYPES = [
1520
+ ...WMS_LOCATION_TYPES.filter((k) => k !== "vas-station").map((k) => ({ key: k, role: "location", label: `twin.type.${k}`, standardClass: { epcis: "bizLocation" }, identity: { scheme: "gs1:SGLN" }, level: WMS_LOCATION_LEVEL[k], capabilities: ["storable"] })),
1521
+ { key: "vas-station", role: "location", label: "twin.type.vas-station", standardClass: { epcis: "bizLocation", isa95: "WorkCenter" }, identity: { scheme: "gs1:SGLN" }, level: WMS_LOCATION_LEVEL["vas-station"], capabilities: ["storable", "processable"] },
1522
+ { key: "forklift", role: "equipment", label: "twin.type.forklift", standardClass: { epcis: "object", iso55000: "Asset" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["mobile", "operable"] },
1523
+ /** 유통가공 작업자·작업대 설비 — 가공을 수행하는 능동 자원(ISA-95 `Equipment`). */
1524
+ { key: "packer", role: "equipment", label: "twin.type.packer", standardClass: { epcis: "object", isa95: "Equipment" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["processable", "operable"] }
1525
+ ];
1526
+
1510
1527
  // ../ops-contract/dist/yms-profile.js
1511
1528
  var YARD_BIZSTEP = {
1512
1529
  arriving: "urn:epcglobal:cbv:bizstep:arriving",
@@ -2123,9 +2140,6 @@ function isWorkShiftExecutionBasis(value) {
2123
2140
 
2124
2141
  // ../ops-contract/dist/operational-ingest.js
2125
2142
  var TASK_STATUS = ["created", "assigned", "in-progress", "completed"];
2126
- var EQUIPMENT_STATUS = ["idle", "busy", "down", "setup", "planned-stop"];
2127
- var PERSON_STATUS = ["idle", "busy"];
2128
- var ASSET_STATUS = ["idle", "in-use"];
2129
2143
  var SPECS = {
2130
2144
  task: {
2131
2145
  eventType: OP_EVENT.task,
@@ -6554,7 +6568,7 @@ var FlowEngine = class {
6554
6568
  *
6555
6569
  * ── 왜 여기인가 ────────────────────────────────────────────────────────────
6556
6570
  * 부르는 자리 하나를 막으면 다른 자리에서 같은 일이 난다 — `emitOrder` 를 부르는 곳만 열다섯이다.
6557
- * 그리고 `revision` 이 여기서 오르므로, 여기서 막지 않으면 **적지 않고도 판만 올라간다.**
6571
+ * 그리고 `revision` 이 여기서 오르므로, 여기서 막지 않으면 **적지 않고도 버전만 올라간다.**
6558
6572
  *
6559
6573
  * ── 무엇을 같다고 보나 ─────────────────────────────────────────────────────
6560
6574
  * `data` 가 바이트까지 같으면 같다. 시각은 `data` 에 없다(여기서 붙인다) — 그래서 「같은 사실을
@@ -8205,6 +8219,7 @@ var DEFAULT_CYCLE_MS = 4e4;
8205
8219
  var DEFAULT_SETUP_MS = 15e3;
8206
8220
  var MES_CMD = { changeover: "mes.changeover" };
8207
8221
  var DEFAULT_YIELD = 0.8;
8222
+ var TWIN_MODEL_NO_PRODUCTION_SPEC = "twin-model-no-production-spec";
8208
8223
  var MesKernel = class extends FlowEngine {
8209
8224
  wipSeq = 0;
8210
8225
  prodSeq = 0;
@@ -8379,7 +8394,7 @@ The steps are the source of truth for execution order; the hierarchy only names
8379
8394
  * 은 스스로 「자재 반입→보관→공정 변환→완제품 반출 … 양끝 야드 물류(YMS·WMS·MES)」라 말한다 —
8380
8395
  * **한 선언이 사이트 전체를 덮고, 도메인마다 다른 트윈이 그 일부를 지난다.**
8381
8396
  *
8382
- * 그래서 MES 판(여섯 노드)이 `receive`→`dock-door` · `park`→`yard-slot` · `dispatch`→`gate` 때문에
8397
+ * 그래서 MES 버전(여섯 노드)이 `receive`→`dock-door` · `park`→`yard-slot` · `dispatch`→`gate` 때문에
8383
8398
  * **아예 열리지 않았다.** 셋 다 이 트윈이 지나지 않는 공정이다. 없는 사정을 상상하지 말라던 규율을
8384
8399
  * 지키려다, **있는 사정을 못 본 채로** 검사를 넓힌 것이 잘못이었다.
8385
8400
  *
@@ -8393,8 +8408,11 @@ The steps are the source of truth for execution order; the hierarchy only names
8393
8408
  loadTwinModel(def) {
8394
8409
  super.loadTwinModel(def);
8395
8410
  if (!this.productionSpec) {
8396
- throw new Error(
8397
- "MES twin requires a production declaration (ProductionSpec): materials, routes and recipes. The kernel no longer carries a built-in demo product \u2014 what is made is decided by the model."
8411
+ throw Object.assign(
8412
+ new Error(
8413
+ "MES twin requires a production declaration (ProductionSpec): materials, routes and recipes. The kernel no longer carries a built-in demo product \u2014 what is made is decided by the model."
8414
+ ),
8415
+ { code: TWIN_MODEL_NO_PRODUCTION_SPEC, params: {} }
8398
8416
  );
8399
8417
  }
8400
8418
  const have = new Set([...this.locations.values()].map((l) => l.type));
@@ -10628,6 +10646,7 @@ function electricityCost(input) {
10628
10646
  OPERATION_PROPERTY,
10629
10647
  ObservedReducer,
10630
10648
  StateProjector,
10649
+ TWIN_MODEL_NO_PRODUCTION_SPEC,
10631
10650
  TwinHistory,
10632
10651
  TwinObserver,
10633
10652
  TwinRuntime,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/twin-kernel",
3
- "version": "0.11.29",
3
+ "version": "0.11.31",
4
4
  "type": "module",
5
5
  "description": "Twin Domain Kernel — framework-agnostic, zero-dep (domain + sim + 3-channel contract). WMS/YMS/MES, EPCIS 2.0 · ISA-95.",
6
6
  "publishConfig": {
@@ -17,8 +17,17 @@
17
17
  }
18
18
  },
19
19
  "files": [
20
+ "README.md",
20
21
  "dist",
21
- "dist-cjs"
22
+ "dist-cjs",
23
+ "!**/*.map",
24
+ "!**/*.test.*",
25
+ "!**/*.spec.*",
26
+ "!**/test/**",
27
+ "!**/tests/**",
28
+ "!**/__tests__/**",
29
+ "!**/*.tsbuildinfo",
30
+ "!**/.DS_Store"
22
31
  ],
23
32
  "scripts": {
24
33
  "build": "npm run build:esm && npm run build:cjs",
@@ -28,6 +37,6 @@
28
37
  "test": "node --test test/*.test.ts"
29
38
  },
30
39
  "dependencies": {
31
- "@operato/ops-contract": "^0.9.40"
40
+ "@operato/ops-contract": "^0.9.43"
32
41
  }
33
42
  }