@operato/ops-contract 0.9.25 → 0.9.27

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.
@@ -75,6 +75,39 @@ export interface DomainProfileInfo {
75
75
  locationTypes: readonly string[];
76
76
  }
77
77
  export declare const DOMAIN_CATALOG: Record<DomainSystem, DomainProfileInfo>;
78
+ /**
79
+ * **어디서 읽은 값인가** — 개체 하나를 답할 때 그 답의 출처(`provenance.basis`).
80
+ *
81
+ * 닫힌 낱말이다. 화면이 「어디서 왔나」를 그리는 근거이고, 열려 있으면 제품마다 다른 말을 만든다.
82
+ *
83
+ * · `document` — 저장된 트윈 모델 문서 안에서 읽었다
84
+ * · `rows` — 그 문서를 투영한 조회용 행에서 읽었다(문서와 같은 사실, 다른 자리)
85
+ * · `state` — 커널의 지금 상태에서 읽었다(커널이 돌 때만 있다)
86
+ * · `journal` — 저널을 되세워 읽었다(과거까지 있고 커널이 멈춰도 남는다)
87
+ * · `record` — **그 제품이 기록의 주인인 행**에서 읽었다. 그 제품이 직접 적었든, 자기 사건을
88
+ * 접어 그 행에 둔 값이든 주인은 같다 (ADR-0075 결정 3 보탬 — plant 의 로트 360,
89
+ * warehouse 의 재고 줄이 그 접은 값이다. twin 은 내지 않는다)
90
+ *
91
+ * `null` 로 두지 않는 이유: 어디서 왔는지 말할 능력을 잃는다. 모르면 그 사실을 다른 칸이 말한다.
92
+ */
93
+ export declare const READ_BASIS: readonly ["document", "rows", "state", "journal", "record"];
94
+ export type ReadBasis = (typeof READ_BASIS)[number];
95
+ /**
96
+ * **왜 답이 없나** — 답이 서지 못했을 때 그 자리를 채우는 낱말(ADR-0075 결정 3 보탬).
97
+ *
98
+ * `provenance` 는 답이 있을 때만 선다. 답이 없으면 출처를 말할 것이 없고, 대신 **까닭 한 칸**이
99
+ * 선다. 그 칸도 닫힌 낱말이다 — 열어 두면 제품마다 다른 말이 생기고, 화면은 그것을 전부
100
+ * 「없습니다」 하나로 접는다. 사람이 할 일은 까닭마다 다르다.
101
+ *
102
+ * · `not-running` 커널이 안 돌아 지금 값을 물을 수 없다. 할 일은 트윈을 띄우는 것이다
103
+ * · `not-observed` 그 축으로 들어온 관측이 아직 없다. 할 일은 원본과 커넥터를 보는 것이다
104
+ * · `not-applicable` 이 개념에는 그 물음이 성립하지 않는다. **할 일이 없다**
105
+ * · `not-kept` 이 제품은 그 축을 보관하지 않는다. 물을 곳이 다른 제품이다
106
+ *
107
+ * `not-observed` 와 `not-applicable` 을 합치지 않는다 — 앞엣것은 「아직」이고 뒤엣것은 「영영」이다.
108
+ */
109
+ export declare const ABSENCE: readonly ["not-running", "not-observed", "not-applicable", "not-kept"];
110
+ export type Absence = (typeof ABSENCE)[number];
78
111
  /**
79
112
  * 저널이 개체의 이력을 나르는 축 — 컬럼으로 승격돼 있어 그 축으로만 물을 수 있다.
80
113
  *
@@ -182,6 +215,11 @@ export interface TwinAxisInfo {
182
215
  *
183
216
  * 선언하지 않으면 소비처는 `idField` 만 보인다. 없는 이름을 지어내지 않는다.
184
217
  *
218
+ * **여럿을 적는다** (2026-09-18, 도는 트윈에서 실측). 같은 축의 항목이 원본에 따라 다른 칸에 이름을
219
+ * 담는다 — 등급 넷과 검사 명세는 `name` 으로 들어오는데 형 선언은 `description` 을 말하고, 공정은
220
+ * `name` 과 `label` 둘 다 쓰인다. 소비처는 **앞에서부터 값이 있는 것**을 쓰므로, 차례가 곧 「무엇을
221
+ * 먼저 보이나」다. 없는 칸은 건너뛴다.
222
+ *
185
223
  * 소비처가 셋이다: 개체 상세의 요약 줄, 관계 그림의 정점 부제, 그리고 AI 가 개체를 한 줄로 말할 때.
186
224
  * 셋이 각자 고르면 같은 개체가 화면마다 다른 말로 불린다.
187
225
  *
@@ -10,6 +10,59 @@ export const DOMAIN_CATALOG = {
10
10
  mes: { system: 'mes', label: 'twin.system.mes', types: MES_TYPES, locationTypes: locationKeys(MES_TYPES) },
11
11
  ems: { system: 'ems', label: 'twin.system.ems', types: EMS_TYPES, locationTypes: locationKeys(EMS_TYPES) }
12
12
  };
13
+ /*
14
+ * ── board 축의 표준 투영 (2026-08-08, twin-inspection §3.1) ──────────────────────────────────
15
+ *
16
+ * `TwinTypeInfo` 는 **타입**(storage·welder)의 표준 투영을 말한다. 그런데 트윈 인스펙션이 답해야
17
+ * 하는 것은 한 단계 위다 — **"이 트윈은 표준 모델의 어디를 채우고 있나"**. 그 단위는 타입이 아니라
18
+ * `TwinModelDef` 의 **축**(locations·persons·materialDefinitions…)이다.
19
+ *
20
+ * 실제로 세어 보니 `standardClass` 는 `role: 'location'` 4종·`role: 'equipment'` 7종에만 있었고,
21
+ * 사람·자산·품목·공정의 ISA-95 대응은 `contract.ts` **산문 주석에만** 있었다. 사람이 읽을 수는
22
+ * 있어도 화면이 읽을 수는 없다 — 그래서 축마다 화면을 손으로 짜게 된다(그 실패가 발단이다).
23
+ *
24
+ * ── 왜 도메인별이 아니라 전역인가 ──────────────────────────────────────────────
25
+ * `TwinModelDef` 는 시스템마다 다르지 않다. 축은 **하나의 계약**이고, 도메인이 그중 무엇을 쓰느냐만
26
+ * 다르다(야드는 `productionSpec` 을 안 쓴다). 그건 "선언이 없다" 가 아니라 **"건수가 0"** 이다.
27
+ * 그 둘을 구분하는 것이 이 선언의 가치다 — 0 건은 사실이고, 미선언은 결손이다.
28
+ *
29
+ * ── 값은 발명하지 않는다 ────────────────────────────────────────────────────
30
+ * ISA-95 이름은 `contract.ts` 가 이미 1차 출처(B2MML v0701)에서 적어 둔 것을 그대로 쓴다.
31
+ * `locations` 에 `isa95` 가 비어 있는 것은 누락이 아니라 **표준의 판단**이다 —
32
+ * `OperationalLocationType` 은 자원 9종과 달리 시험 대상이 아니고, 표준이 그 비대칭을 갖는다.
33
+ * 비어 있음을 채우지 않고 그대로 낸다(화면은 "표준 투영 미선언" 으로 표시).
34
+ */
35
+ /**
36
+ * **어디서 읽은 값인가** — 개체 하나를 답할 때 그 답의 출처(`provenance.basis`).
37
+ *
38
+ * 닫힌 낱말이다. 화면이 「어디서 왔나」를 그리는 근거이고, 열려 있으면 제품마다 다른 말을 만든다.
39
+ *
40
+ * · `document` — 저장된 트윈 모델 문서 안에서 읽었다
41
+ * · `rows` — 그 문서를 투영한 조회용 행에서 읽었다(문서와 같은 사실, 다른 자리)
42
+ * · `state` — 커널의 지금 상태에서 읽었다(커널이 돌 때만 있다)
43
+ * · `journal` — 저널을 되세워 읽었다(과거까지 있고 커널이 멈춰도 남는다)
44
+ * · `record` — **그 제품이 기록의 주인인 행**에서 읽었다. 그 제품이 직접 적었든, 자기 사건을
45
+ * 접어 그 행에 둔 값이든 주인은 같다 (ADR-0075 결정 3 보탬 — plant 의 로트 360,
46
+ * warehouse 의 재고 줄이 그 접은 값이다. twin 은 내지 않는다)
47
+ *
48
+ * `null` 로 두지 않는 이유: 어디서 왔는지 말할 능력을 잃는다. 모르면 그 사실을 다른 칸이 말한다.
49
+ */
50
+ export const READ_BASIS = ['document', 'rows', 'state', 'journal', 'record'];
51
+ /**
52
+ * **왜 답이 없나** — 답이 서지 못했을 때 그 자리를 채우는 낱말(ADR-0075 결정 3 보탬).
53
+ *
54
+ * `provenance` 는 답이 있을 때만 선다. 답이 없으면 출처를 말할 것이 없고, 대신 **까닭 한 칸**이
55
+ * 선다. 그 칸도 닫힌 낱말이다 — 열어 두면 제품마다 다른 말이 생기고, 화면은 그것을 전부
56
+ * 「없습니다」 하나로 접는다. 사람이 할 일은 까닭마다 다르다.
57
+ *
58
+ * · `not-running` 커널이 안 돌아 지금 값을 물을 수 없다. 할 일은 트윈을 띄우는 것이다
59
+ * · `not-observed` 그 축으로 들어온 관측이 아직 없다. 할 일은 원본과 커넥터를 보는 것이다
60
+ * · `not-applicable` 이 개념에는 그 물음이 성립하지 않는다. **할 일이 없다**
61
+ * · `not-kept` 이 제품은 그 축을 보관하지 않는다. 물을 곳이 다른 제품이다
62
+ *
63
+ * `not-observed` 와 `not-applicable` 을 합치지 않는다 — 앞엣것은 「아직」이고 뒤엣것은 「영영」이다.
64
+ */
65
+ export const ABSENCE = ['not-running', 'not-observed', 'not-applicable', 'not-kept'];
13
66
  /**
14
67
  * 물건·사람·공정이 있는 종류 — **에너지에는 없는 축들**이 이것을 선언한다.
15
68
  *
@@ -40,17 +93,17 @@ export const TWIN_AXES = [
40
93
  standardClass: { isa95: 'Person' }, systems: LOGISTICS },
41
94
  { axis: 'assets', path: 'assets', label: 'twin.axis.assets', kind: 'instance',
42
95
  standardClass: { isa95: 'PhysicalAsset', iso55000: 'Asset' } },
43
- { axis: 'personnelClasses', path: 'personnelClasses', describedBy: ['description'], label: 'twin.axis.personnelClasses', kind: 'class',
96
+ { axis: 'personnelClasses', path: 'personnelClasses', describedBy: ['name', 'description'], label: 'twin.axis.personnelClasses', kind: 'class',
44
97
  standardClass: { isa95: 'PersonnelClass' }, systems: LOGISTICS },
45
- { axis: 'equipmentClasses', path: 'equipmentClasses', describedBy: ['description'], label: 'twin.axis.equipmentClasses', kind: 'class',
98
+ { axis: 'equipmentClasses', path: 'equipmentClasses', describedBy: ['name', 'description'], label: 'twin.axis.equipmentClasses', kind: 'class',
46
99
  standardClass: { isa95: 'EquipmentClass' } },
47
- { axis: 'assetClasses', path: 'assetClasses', describedBy: ['description'], label: 'twin.axis.assetClasses', kind: 'class',
100
+ { axis: 'assetClasses', path: 'assetClasses', describedBy: ['name', 'description'], label: 'twin.axis.assetClasses', kind: 'class',
48
101
  standardClass: { isa95: 'PhysicalAssetClass' } },
49
- { axis: 'materialDefinitions', path: 'materialDefinitions', journalAxis: 'epc', describedBy: ['description', 'uom'], label: 'twin.axis.materialDefinitions', kind: 'class',
102
+ { axis: 'materialDefinitions', path: 'materialDefinitions', journalAxis: 'epc', describedBy: ['name', 'description', 'uom'], label: 'twin.axis.materialDefinitions', kind: 'class',
50
103
  standardClass: { isa95: 'MaterialDefinition' }, systems: LOGISTICS },
51
- { axis: 'materialClasses', path: 'materialClasses', describedBy: ['description'], label: 'twin.axis.materialClasses', kind: 'class',
104
+ { axis: 'materialClasses', path: 'materialClasses', describedBy: ['name', 'description'], label: 'twin.axis.materialClasses', kind: 'class',
52
105
  standardClass: { isa95: 'MaterialClass' }, systems: LOGISTICS },
53
- { axis: 'operations', path: 'operations', describedBy: ['label'], label: 'twin.axis.operations', kind: 'spec',
106
+ { axis: 'operations', path: 'operations', describedBy: ['name', 'label', 'description'], label: 'twin.axis.operations', kind: 'spec',
54
107
  standardClass: { isa95: 'OperationsSegment' }, systems: LOGISTICS },
55
108
  { axis: 'productionSpec', path: 'productionSpec', label: 'twin.axis.productionSpec', kind: 'spec',
56
109
  standardClass: { isa95: 'OperationsSegment' }, systems: LOGISTICS },
@@ -74,7 +127,7 @@ export const TWIN_AXES = [
74
127
  *
75
128
  * `kind: 'spec'` 이다: 자원도 등급도 아니고 **판정의 정의**다(공정·레시피와 같은 부류).
76
129
  */
77
- { axis: 'testSpecifications', path: 'testSpecifications', describedBy: ['description', 'version'], label: 'twin.axis.testSpecifications', kind: 'spec',
130
+ { axis: 'testSpecifications', path: 'testSpecifications', describedBy: ['name', 'description', 'version'], label: 'twin.axis.testSpecifications', kind: 'spec',
78
131
  standardClass: { isa95: 'TestSpecification' } },
79
132
  /*
80
133
  * ── ISA-95 Part 4 — 일정과 실적 ────────────────────────────────────────────────
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // src/index.ts
20
20
  var index_exports = {};
21
21
  __export(index_exports, {
22
+ ABSENCE: () => ABSENCE,
22
23
  BIZSTEP: () => BIZSTEP,
23
24
  BTT: () => BTT,
24
25
  BTT_PRODORDER: () => BTT_PRODORDER,
@@ -64,6 +65,7 @@ __export(index_exports, {
64
65
  OP_PARAM: () => OP_PARAM,
65
66
  ORDER_TERMINAL_STATUS: () => ORDER_TERMINAL_STATUS,
66
67
  PRIORITY_UNSET: () => PRIORITY_UNSET,
68
+ READ_BASIS: () => READ_BASIS,
67
69
  REFUSED_WITHOUT_CODE: () => REFUSED_WITHOUT_CODE,
68
70
  RESOURCE_KIND: () => RESOURCE_KIND,
69
71
  RETIRED_VOCABULARY: () => RETIRED_VOCABULARY,
@@ -1712,6 +1714,8 @@ var DOMAIN_CATALOG = {
1712
1714
  mes: { system: "mes", label: "twin.system.mes", types: MES_TYPES, locationTypes: locationKeys(MES_TYPES) },
1713
1715
  ems: { system: "ems", label: "twin.system.ems", types: EMS_TYPES, locationTypes: locationKeys(EMS_TYPES) }
1714
1716
  };
1717
+ var READ_BASIS = ["document", "rows", "state", "journal", "record"];
1718
+ var ABSENCE = ["not-running", "not-observed", "not-applicable", "not-kept"];
1715
1719
  var LOGISTICS = ["wms", "yms", "mes"];
1716
1720
  var TWIN_AXES = [
1717
1721
  {
@@ -1752,7 +1756,7 @@ var TWIN_AXES = [
1752
1756
  {
1753
1757
  axis: "personnelClasses",
1754
1758
  path: "personnelClasses",
1755
- describedBy: ["description"],
1759
+ describedBy: ["name", "description"],
1756
1760
  label: "twin.axis.personnelClasses",
1757
1761
  kind: "class",
1758
1762
  standardClass: { isa95: "PersonnelClass" },
@@ -1761,7 +1765,7 @@ var TWIN_AXES = [
1761
1765
  {
1762
1766
  axis: "equipmentClasses",
1763
1767
  path: "equipmentClasses",
1764
- describedBy: ["description"],
1768
+ describedBy: ["name", "description"],
1765
1769
  label: "twin.axis.equipmentClasses",
1766
1770
  kind: "class",
1767
1771
  standardClass: { isa95: "EquipmentClass" }
@@ -1769,7 +1773,7 @@ var TWIN_AXES = [
1769
1773
  {
1770
1774
  axis: "assetClasses",
1771
1775
  path: "assetClasses",
1772
- describedBy: ["description"],
1776
+ describedBy: ["name", "description"],
1773
1777
  label: "twin.axis.assetClasses",
1774
1778
  kind: "class",
1775
1779
  standardClass: { isa95: "PhysicalAssetClass" }
@@ -1778,7 +1782,7 @@ var TWIN_AXES = [
1778
1782
  axis: "materialDefinitions",
1779
1783
  path: "materialDefinitions",
1780
1784
  journalAxis: "epc",
1781
- describedBy: ["description", "uom"],
1785
+ describedBy: ["name", "description", "uom"],
1782
1786
  label: "twin.axis.materialDefinitions",
1783
1787
  kind: "class",
1784
1788
  standardClass: { isa95: "MaterialDefinition" },
@@ -1787,7 +1791,7 @@ var TWIN_AXES = [
1787
1791
  {
1788
1792
  axis: "materialClasses",
1789
1793
  path: "materialClasses",
1790
- describedBy: ["description"],
1794
+ describedBy: ["name", "description"],
1791
1795
  label: "twin.axis.materialClasses",
1792
1796
  kind: "class",
1793
1797
  standardClass: { isa95: "MaterialClass" },
@@ -1796,7 +1800,7 @@ var TWIN_AXES = [
1796
1800
  {
1797
1801
  axis: "operations",
1798
1802
  path: "operations",
1799
- describedBy: ["label"],
1803
+ describedBy: ["name", "label", "description"],
1800
1804
  label: "twin.axis.operations",
1801
1805
  kind: "spec",
1802
1806
  standardClass: { isa95: "OperationsSegment" },
@@ -1854,7 +1858,7 @@ var TWIN_AXES = [
1854
1858
  {
1855
1859
  axis: "testSpecifications",
1856
1860
  path: "testSpecifications",
1857
- describedBy: ["description", "version"],
1861
+ describedBy: ["name", "description", "version"],
1858
1862
  label: "twin.axis.testSpecifications",
1859
1863
  kind: "spec",
1860
1864
  standardClass: { isa95: "TestSpecification" }
@@ -4648,6 +4652,7 @@ function nonEmpty(value) {
4648
4652
  }
4649
4653
  // Annotate the CommonJS export names for ESM import in node:
4650
4654
  0 && (module.exports = {
4655
+ ABSENCE,
4651
4656
  BIZSTEP,
4652
4657
  BTT,
4653
4658
  BTT_PRODORDER,
@@ -4693,6 +4698,7 @@ function nonEmpty(value) {
4693
4698
  OP_PARAM,
4694
4699
  ORDER_TERMINAL_STATUS,
4695
4700
  PRIORITY_UNSET,
4701
+ READ_BASIS,
4696
4702
  REFUSED_WITHOUT_CODE,
4697
4703
  RESOURCE_KIND,
4698
4704
  RETIRED_VOCABULARY,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/ops-contract",
3
- "version": "0.9.25",
3
+ "version": "0.9.27",
4
4
  "description": "Operations domain contract — the standard vocabulary that producers and readers agree on (EPCIS 2.0/GS1, ISA-95, IEC 61850/ISO 50001). Types, guards, validation. No state, no engine.",
5
5
  "type": "module",
6
6
  "main": "./dist-cjs/index.cjs",