@operato/ops-contract 0.9.46 → 0.9.47

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.
@@ -36,7 +36,7 @@ export interface TrackableState {
36
36
  held: boolean;
37
37
  }
38
38
  /**
39
- * 계량 — 이 자원은 **자원의 에너지 소비를 계측합니다..**
39
+ * 계량 — 이 자원은 **자원의 에너지 소비를 계측합니다.**
40
40
  *
41
41
  * `kW` 는 그 계량 주기의 평균이고 순시값이 아니다(순시는 전력 품질의 영역이라 범위 밖).
42
42
  * `kWh` 는 계기 누적값 — 차분은 소비처가 한다(계기 교체·리셋을 우리가 지어내지 않는다).
@@ -53,17 +53,17 @@ export const CAPABILITIES = {
53
53
  * 대기전력을 쓴다.
54
54
  */
55
55
  metered: {
56
- key: 'metered', label: 'twin.capability.metered', semantics: '자원의 에너지 소비를 계측합니다. — 유효전력·누적량·역률. 값이 없으면 모르는 것이다(0 이 아니다).',
56
+ key: 'metered', label: 'twin.capability.metered', semantics: '자원의 유효전력·누적 에너지 소비량·역률을 계측합니다. 측정값이 없으면 미확인 상태로 처리하며 0으로 간주하지 않습니다.',
57
57
  commands: [],
58
58
  stateFields: ['kW', 'kWh', 'powerFactor'], models: ['MeteredState'], results: ['measured']
59
59
  },
60
60
  curtailable: {
61
- key: 'curtailable', label: 'twin.capability.curtailable', semantics: '부하를 줄일 수 있습니다. 최소 유지 부하는 지켜야 합니다. 판정만 하고 집행은 사람과 그 시스템의 몫이다.',
61
+ key: 'curtailable', label: 'twin.capability.curtailable', semantics: '최소 유지 부하를 준수하는 범위에서 감축 가능 여부를 판정합니다. 실제 실행은 담당자와 연계 시스템에서 처리합니다.',
62
62
  commands: [],
63
63
  stateFields: ['curtailable', 'minKW'], models: ['CurtailableState'], invariants: ['minKW >= 0'], results: ['drSuggested']
64
64
  },
65
65
  energyGenerating: {
66
- key: 'energyGenerating', label: 'twin.capability.energyGenerating', semantics: '전력을 생산합니다. — 역송은 소비의 음수가 아니라 별개 사실이다.',
66
+ key: 'energyGenerating', label: 'twin.capability.energyGenerating', semantics: '전력 생산량을 관리합니다. 역송량은 소비량의 음수가 아닌 별도 항목으로 기록합니다.',
67
67
  commands: [],
68
68
  /*
69
69
  * ── 적산을 더한다 (2026-08-26) ─────────────────────────────────────────────
@@ -85,7 +85,7 @@ export const CAPABILITIES = {
85
85
  * `energyGenerating` 이다 — 능력은 도메인이 아니라 관측의 면이다(방언 없음).
86
86
  */
87
87
  energyStoring: {
88
- key: 'energyStoring', label: 'twin.capability.energyStoring', semantics: '전력을 저장하고 공급합니다. 충전과 방전을 구분합니다.(손실·수명 판단이 둘을 구별해야 한다).',
88
+ key: 'energyStoring', label: 'twin.capability.energyStoring', semantics: '전력을 저장하고 공급합니다. 손실과 수명을 평가할 수 있도록 충전과 방전을 구분합니다.',
89
89
  commands: [],
90
90
  stateFields: ['soc', 'chargeKW', 'dischargeKW'], models: ['StoringState'], invariants: ['0 <= soc <= 100'], results: ['stored', 'discharged']
91
91
  }
@@ -44,7 +44,7 @@ export function procedureViolations(route) {
44
44
  if (hasChild.has(n.key))
45
45
  errors.push(`${n.key}: 하위 요소가 있는 노드에 실행 단계가 지정되었습니다. 실행 단계는 말단 노드에만 지정할 수 있습니다.`);
46
46
  if (!stepSet.has(n.step))
47
- errors.push(`${n.key}: 정의되지 않은 단계 '${n.step}' — steps 에 없다`);
47
+ errors.push(`${n.key}: 단계 목록(steps)에 정의되지 않은 단계입니다: '${n.step}'`);
48
48
  const already = seenStep.get(n.step);
49
49
  if (already)
50
50
  errors.push(`단계 '${n.step}' 가 '${already}' 와 '${n.key}' 두 곳에 중복 지정되었습니다. 한 위치에만 지정하세요.`);
package/dist/epcis.js CHANGED
@@ -925,7 +925,7 @@ export function validateEpcisEvent(e) {
925
925
  const set = e.persistentDisposition.set ?? [];
926
926
  const unset = e.persistentDisposition.unset ?? [];
927
927
  if (!set.length && !unset.length)
928
- v.push('persistentDisposition 이 set·unset 둘 다 비어 있음');
928
+ v.push('persistentDisposition의 set 또는 unset 중 하나 이상을 지정하세요.');
929
929
  const both = set.filter(x => unset.includes(x));
930
930
  if (both.length)
931
931
  v.push(`persistentDisposition 이 같은 값을 set·unset 동시 지정: ${both.join(', ')}`);
@@ -956,7 +956,7 @@ export function validateEpcisEvent(e) {
956
956
  if (!Array.isArray(e.epcList))
957
957
  v.push('ObjectEvent.epcList 누락');
958
958
  else if (e.epcList.length === 0 && !e.quantityList?.length)
959
- v.push('ObjectEvent: epcList/quantityList 둘 다 비어 있음');
959
+ v.push('ObjectEvent: epcList 또는 quantityList에 항목을 하나 이상 지정하세요.');
960
960
  }
961
961
  else if (e.type === 'AggregationEvent') {
962
962
  if (!ACTIONS.includes(e.action))
@@ -964,7 +964,7 @@ export function validateEpcisEvent(e) {
964
964
  if (!e.parentID)
965
965
  v.push('AggregationEvent.parentID 누락');
966
966
  if (!e.childEPCs?.length && !e.childQuantityList?.length)
967
- v.push('AggregationEvent: childEPCs/childQuantityList 둘 다 비어 있음');
967
+ v.push('AggregationEvent: childEPCs 또는 childQuantityList에 항목을 하나 이상 지정하세요.');
968
968
  }
969
969
  else if (e.type === 'TransactionEvent') {
970
970
  if (!ACTIONS.includes(e.action))
package/dist/erp.js CHANGED
@@ -63,7 +63,7 @@ export function validatePerformance(e, nowMs) {
63
63
  if (!String(e?.orderId ?? '').trim())
64
64
  errors.push('orderId 누락. 실적의 작업지시 ID를 지정하세요.');
65
65
  if (!String(e?.uom ?? '').trim())
66
- errors.push('uom 누락. 정산할 수량의 단위를 지정하세요.');
66
+ errors.push('생산 실적 수량의 단위(uom)를 지정하세요.');
67
67
  for (const [name, v] of [
68
68
  ['goodQuantity', e?.goodQuantity],
69
69
  ['scrapQuantity', e?.scrapQuantity]
@@ -416,7 +416,7 @@ var CAPABILITIES = {
416
416
  metered: {
417
417
  key: "metered",
418
418
  label: "twin.capability.metered",
419
- semantics: "\uC790\uC6D0\uC758 \uC5D0\uB108\uC9C0 \uC18C\uBE44\uB97C \uACC4\uCE21\uD569\uB2C8\uB2E4. \u2014 \uC720\uD6A8\uC804\uB825\xB7\uB204\uC801\uB7C9\xB7\uC5ED\uB960. \uAC12\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB974\uB294 \uAC83\uC774\uB2E4(0 \uC774 \uC544\uB2C8\uB2E4).",
419
+ semantics: "\uC790\uC6D0\uC758 \uC720\uD6A8\uC804\uB825\xB7\uB204\uC801 \uC5D0\uB108\uC9C0 \uC18C\uBE44\uB7C9\xB7\uC5ED\uB960\uC744 \uACC4\uCE21\uD569\uB2C8\uB2E4. \uCE21\uC815\uAC12\uC774 \uC5C6\uC73C\uBA74 \uBBF8\uD655\uC778 \uC0C1\uD0DC\uB85C \uCC98\uB9AC\uD558\uBA70 0\uC73C\uB85C \uAC04\uC8FC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
420
420
  commands: [],
421
421
  stateFields: ["kW", "kWh", "powerFactor"],
422
422
  models: ["MeteredState"],
@@ -425,7 +425,7 @@ var CAPABILITIES = {
425
425
  curtailable: {
426
426
  key: "curtailable",
427
427
  label: "twin.capability.curtailable",
428
- semantics: "\uBD80\uD558\uB97C \uC904\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uCD5C\uC18C \uC720\uC9C0 \uBD80\uD558\uB294 \uC9C0\uCF1C\uC57C \uD569\uB2C8\uB2E4. \uD310\uC815\uB9CC \uD558\uACE0 \uC9D1\uD589\uC740 \uC0AC\uB78C\uACFC \uADF8 \uC2DC\uC2A4\uD15C\uC758 \uBAAB\uC774\uB2E4.",
428
+ semantics: "\uCD5C\uC18C \uC720\uC9C0 \uBD80\uD558\uB97C \uC900\uC218\uD558\uB294 \uBC94\uC704\uC5D0\uC11C \uAC10\uCD95 \uAC00\uB2A5 \uC5EC\uBD80\uB97C \uD310\uC815\uD569\uB2C8\uB2E4. \uC2E4\uC81C \uC2E4\uD589\uC740 \uB2F4\uB2F9\uC790\uC640 \uC5F0\uACC4 \uC2DC\uC2A4\uD15C\uC5D0\uC11C \uCC98\uB9AC\uD569\uB2C8\uB2E4.",
429
429
  commands: [],
430
430
  stateFields: ["curtailable", "minKW"],
431
431
  models: ["CurtailableState"],
@@ -435,7 +435,7 @@ var CAPABILITIES = {
435
435
  energyGenerating: {
436
436
  key: "energyGenerating",
437
437
  label: "twin.capability.energyGenerating",
438
- semantics: "\uC804\uB825\uC744 \uC0DD\uC0B0\uD569\uB2C8\uB2E4. \u2014 \uC5ED\uC1A1\uC740 \uC18C\uBE44\uC758 \uC74C\uC218\uAC00 \uC544\uB2C8\uB77C \uBCC4\uAC1C \uC0AC\uC2E4\uC774\uB2E4.",
438
+ semantics: "\uC804\uB825 \uC0DD\uC0B0\uB7C9\uC744 \uAD00\uB9AC\uD569\uB2C8\uB2E4. \uC5ED\uC1A1\uB7C9\uC740 \uC18C\uBE44\uB7C9\uC758 \uC74C\uC218\uAC00 \uC544\uB2CC \uBCC4\uB3C4 \uD56D\uBAA9\uC73C\uB85C \uAE30\uB85D\uD569\uB2C8\uB2E4.",
439
439
  commands: [],
440
440
  /*
441
441
  * ── 적산을 더한다 (2026-08-26) ─────────────────────────────────────────────
@@ -461,7 +461,7 @@ var CAPABILITIES = {
461
461
  energyStoring: {
462
462
  key: "energyStoring",
463
463
  label: "twin.capability.energyStoring",
464
- semantics: "\uC804\uB825\uC744 \uC800\uC7A5\uD558\uACE0 \uACF5\uAE09\uD569\uB2C8\uB2E4. \uCDA9\uC804\uACFC \uBC29\uC804\uC744 \uAD6C\uBD84\uD569\uB2C8\uB2E4.(\uC190\uC2E4\xB7\uC218\uBA85 \uD310\uB2E8\uC774 \uB458\uC744 \uAD6C\uBCC4\uD574\uC57C \uD55C\uB2E4).",
464
+ semantics: "\uC804\uB825\uC744 \uC800\uC7A5\uD558\uACE0 \uACF5\uAE09\uD569\uB2C8\uB2E4. \uC190\uC2E4\uACFC \uC218\uBA85\uC744 \uD3C9\uAC00\uD560 \uC218 \uC788\uB3C4\uB85D \uCDA9\uC804\uACFC \uBC29\uC804\uC744 \uAD6C\uBD84\uD569\uB2C8\uB2E4.",
465
465
  commands: [],
466
466
  stateFields: ["soc", "chargeKW", "dischargeKW"],
467
467
  models: ["StoringState"],
@@ -1783,7 +1783,7 @@ function validateEpcisEvent(e) {
1783
1783
  if (e.persistentDisposition !== void 0) {
1784
1784
  const set = e.persistentDisposition.set ?? [];
1785
1785
  const unset = e.persistentDisposition.unset ?? [];
1786
- if (!set.length && !unset.length) v.push("persistentDisposition \uC774 set\xB7unset \uB458 \uB2E4 \uBE44\uC5B4 \uC788\uC74C");
1786
+ if (!set.length && !unset.length) v.push("persistentDisposition\uC758 set \uB610\uB294 unset \uC911 \uD558\uB098 \uC774\uC0C1\uC744 \uC9C0\uC815\uD558\uC138\uC694.");
1787
1787
  const both = set.filter((x) => unset.includes(x));
1788
1788
  if (both.length) v.push(`persistentDisposition \uC774 \uAC19\uC740 \uAC12\uC744 set\xB7unset \uB3D9\uC2DC \uC9C0\uC815: ${both.join(", ")}`);
1789
1789
  }
@@ -1807,11 +1807,11 @@ function validateEpcisEvent(e) {
1807
1807
  if (e.type === "ObjectEvent") {
1808
1808
  if (!ACTIONS.includes(e.action)) v.push(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 action \uAC12: ${e.action}`);
1809
1809
  if (!Array.isArray(e.epcList)) v.push("ObjectEvent.epcList \uB204\uB77D");
1810
- else if (e.epcList.length === 0 && !e.quantityList?.length) v.push("ObjectEvent: epcList/quantityList \uB458 \uB2E4 \uBE44\uC5B4 \uC788\uC74C");
1810
+ else if (e.epcList.length === 0 && !e.quantityList?.length) v.push("ObjectEvent: epcList \uB610\uB294 quantityList\uC5D0 \uD56D\uBAA9\uC744 \uD558\uB098 \uC774\uC0C1 \uC9C0\uC815\uD558\uC138\uC694.");
1811
1811
  } else if (e.type === "AggregationEvent") {
1812
1812
  if (!ACTIONS.includes(e.action)) v.push(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 action \uAC12: ${e.action}`);
1813
1813
  if (!e.parentID) v.push("AggregationEvent.parentID \uB204\uB77D");
1814
- if (!e.childEPCs?.length && !e.childQuantityList?.length) v.push("AggregationEvent: childEPCs/childQuantityList \uB458 \uB2E4 \uBE44\uC5B4 \uC788\uC74C");
1814
+ if (!e.childEPCs?.length && !e.childQuantityList?.length) v.push("AggregationEvent: childEPCs \uB610\uB294 childQuantityList\uC5D0 \uD56D\uBAA9\uC744 \uD558\uB098 \uC774\uC0C1 \uC9C0\uC815\uD558\uC138\uC694.");
1815
1815
  } else if (e.type === "TransactionEvent") {
1816
1816
  if (!ACTIONS.includes(e.action)) v.push(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 action \uAC12: ${e.action}`);
1817
1817
  if (!Array.isArray(e.bizTransactionList) || e.bizTransactionList.length === 0) v.push("TransactionEvent.bizTransactionList \uB204\uB77D");
@@ -2874,7 +2874,7 @@ function procedureViolations(route) {
2874
2874
  if (n.parent && !byKey.has(n.parent)) errors.push(`${n.key}: \uC0C1\uC704 '${n.parent}' \uAC00 \uC774 \uC808\uCC28\uC5D0 \uC5C6\uB2E4`);
2875
2875
  if (n.step === void 0) continue;
2876
2876
  if (hasChild.has(n.key)) errors.push(`${n.key}: \uD558\uC704 \uC694\uC18C\uAC00 \uC788\uB294 \uB178\uB4DC\uC5D0 \uC2E4\uD589 \uB2E8\uACC4\uAC00 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC2E4\uD589 \uB2E8\uACC4\uB294 \uB9D0\uB2E8 \uB178\uB4DC\uC5D0\uB9CC \uC9C0\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);
2877
- if (!stepSet.has(n.step)) errors.push(`${n.key}: \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uB2E8\uACC4 '${n.step}' \u2014 steps \uC5D0 \uC5C6\uB2E4`);
2877
+ if (!stepSet.has(n.step)) errors.push(`${n.key}: \uB2E8\uACC4 \uBAA9\uB85D(steps)\uC5D0 \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uB2E8\uACC4\uC785\uB2C8\uB2E4: '${n.step}'`);
2878
2878
  const already = seenStep.get(n.step);
2879
2879
  if (already) errors.push(`\uB2E8\uACC4 '${n.step}' \uAC00 '${already}' \uC640 '${n.key}' \uB450 \uACF3\uC5D0 \uC911\uBCF5 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD55C \uC704\uCE58\uC5D0\uB9CC \uC9C0\uC815\uD558\uC138\uC694.`);
2880
2880
  else seenStep.set(n.step, n.key);
@@ -5205,7 +5205,7 @@ function materialMovementKey(e) {
5205
5205
  function validatePerformance(e, nowMs) {
5206
5206
  const errors = [];
5207
5207
  if (!String(e?.orderId ?? "").trim()) errors.push("orderId \uB204\uB77D. \uC2E4\uC801\uC758 \uC791\uC5C5\uC9C0\uC2DC ID\uB97C \uC9C0\uC815\uD558\uC138\uC694.");
5208
- if (!String(e?.uom ?? "").trim()) errors.push("uom \uB204\uB77D. \uC815\uC0B0\uD560 \uC218\uB7C9\uC758 \uB2E8\uC704\uB97C \uC9C0\uC815\uD558\uC138\uC694.");
5208
+ if (!String(e?.uom ?? "").trim()) errors.push("\uC0DD\uC0B0 \uC2E4\uC801 \uC218\uB7C9\uC758 \uB2E8\uC704(uom)\uB97C \uC9C0\uC815\uD558\uC138\uC694.");
5209
5209
  for (const [name, v] of [
5210
5210
  ["goodQuantity", e?.goodQuantity],
5211
5211
  ["scrapQuantity", e?.scrapQuantity]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/ops-contract",
3
- "version": "0.9.46",
3
+ "version": "0.9.47",
4
4
  "description": "Operations domain contract — what producers and readers agree on: the standard vocabulary (EPCIS 2.0/GS1, ISA-95, IEC 61850/ISO 50001) and the records operations products exchange with the twin and with each other. Types, guards, validation. No state, no engine.",
5
5
  "type": "module",
6
6
  "main": "./dist-cjs/index.cjs",