@operato/twin-kernel 0.7.59 → 0.7.60

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.
@@ -1,6 +1,6 @@
1
1
  import type { IngestResult } from './face2-adapter.ts';
2
2
  /** 이 문이 받는 여섯 가지 — 리듀서가 접는 것과 같은 목록(주목 확인은 우리 안의 행위라 제외). */
3
- export type OperationalKind = 'task' | 'equipment' | 'person' | 'asset' | 'order' | 'quality';
3
+ export type OperationalKind = 'task' | 'equipment' | 'person' | 'asset' | 'order' | 'quality' | 'test';
4
4
  /**
5
5
  * 정규 운영 레코드 — **델타의 필드 이름 + 시각(`at`)**.
6
6
  *
@@ -119,6 +119,27 @@ const SPECS = {
119
119
  /* 누적 카운터가 없으면 OEE 가 양품률을 못 센다 — 판정 하나만으로는 비율이 나오지 않는다. */
120
120
  required: ['moverId', 'good', 'goodCount', 'scrapCount'], // vocabulary-guard: allow
121
121
  fields: { moverId: 'string', good: 'boolean', goodCount: 'number', scrapCount: 'number', recordTime: 'string' } // vocabulary-guard: allow
122
+ },
123
+ /*
124
+ * **시험 결과** — 대상을 가리켜 들어온다(표준 `TestResult.TestableObjectID`).
125
+ *
126
+ * `result` 를 **요구하지 않는다**: 재기만 하고 판정하지 않는 원천이 정상이고, 요구하면 그 원천의
127
+ * 사실을 아예 담을 수 없다(§`TestResult.result`). 비어 있으면 커널이 선언된 기준으로 판정하고
128
+ * `derived` 를 세운다 — 판정하지 못하면 비워 둔다.
129
+ *
130
+ * `propertyMeasurements` 안쪽은 재검사하지 않는다 — 그 모양은 `PropertyMeasurement` 계약이고,
131
+ * 여기서 두 번 지키면 두 벌이 된다(설비 `motion` 과 같은 규율).
132
+ */
133
+ test: {
134
+ eventType: OP_EVENT.test,
135
+ identity: 'testableObjectId',
136
+ /* 무엇을 어느 기준으로 시험했나 — 둘 중 하나가 없으면 그 결과는 아무 데도 붙지 못한다. */
137
+ required: ['testableObjectId', 'specId'],
138
+ fields: {
139
+ testableObjectId: 'string', specId: 'string', result: 'string', at: 'string', expiresAt: 'string',
140
+ derived: 'boolean', propertyMeasurements: 'object[]', recordTime: 'string'
141
+ },
142
+ enums: { result: ['pass', 'fail'] }
122
143
  }
123
144
  };
124
145
  /**
@@ -152,6 +173,20 @@ export function operationalKindOf(record) {
152
173
  return 'task'; // 작업이 든 `orderId` 는 소속(참조)이다
153
174
  if (has('orderId'))
154
175
  return 'order';
176
+ /*
177
+ * ── ★ **채널을 열고 들어오는 길을 내지 않았다** (2026-08-24) ─────────────────
178
+ * `OP_EVENT.test` 를 계약에 냈는데 이 라우팅이 `testableObjectId` 를 보지 않았다. 그래서 커넥터의
179
+ * 시험 결과가 **어느 통도 아니어서 조용히 버려졌다** — 거부 목록에도 남지 않았다(운영 경로를 아예
180
+ * 지나지 않으므로).
181
+ *
182
+ * 같은 부류가 하루에 세 번 났다: `ilmd`(매핑에 자리 없음) · 사건 시각(이름 어긋남) · 그리고 이것.
183
+ * **계약에 자리를 만드는 것과 그 자리로 가는 길을 내는 것은 다른 일이다.** 앞의 것만 하면 보내는
184
+ * 쪽에는 「실었다」로 보이고 화면에는 「없다」로 보인다.
185
+ *
186
+ * 순서상 뒤에 둔다 — 시험 결과가 작업·오더를 함께 가리킬 수 있고, 그때 그것은 **그 작업의 사실**이다.
187
+ */
188
+ if (has('testableObjectId'))
189
+ return 'test';
155
190
  return undefined;
156
191
  }
157
192
  /** 이 레코드가 운영 사실인가 — 호스트의 라우팅이 묻는 자리. */
@@ -8990,6 +8990,33 @@ var SPECS = {
8990
8990
  // vocabulary-guard: allow
8991
8991
  fields: { moverId: "string", good: "boolean", goodCount: "number", scrapCount: "number", recordTime: "string" }
8992
8992
  // vocabulary-guard: allow
8993
+ },
8994
+ /*
8995
+ * **시험 결과** — 대상을 가리켜 들어온다(표준 `TestResult.TestableObjectID`).
8996
+ *
8997
+ * `result` 를 **요구하지 않는다**: 재기만 하고 판정하지 않는 원천이 정상이고, 요구하면 그 원천의
8998
+ * 사실을 아예 담을 수 없다(§`TestResult.result`). 비어 있으면 커널이 선언된 기준으로 판정하고
8999
+ * `derived` 를 세운다 — 판정하지 못하면 비워 둔다.
9000
+ *
9001
+ * `propertyMeasurements` 안쪽은 재검사하지 않는다 — 그 모양은 `PropertyMeasurement` 계약이고,
9002
+ * 여기서 두 번 지키면 두 벌이 된다(설비 `motion` 과 같은 규율).
9003
+ */
9004
+ test: {
9005
+ eventType: OP_EVENT.test,
9006
+ identity: "testableObjectId",
9007
+ /* 무엇을 어느 기준으로 시험했나 — 둘 중 하나가 없으면 그 결과는 아무 데도 붙지 못한다. */
9008
+ required: ["testableObjectId", "specId"],
9009
+ fields: {
9010
+ testableObjectId: "string",
9011
+ specId: "string",
9012
+ result: "string",
9013
+ at: "string",
9014
+ expiresAt: "string",
9015
+ derived: "boolean",
9016
+ propertyMeasurements: "object[]",
9017
+ recordTime: "string"
9018
+ },
9019
+ enums: { result: ["pass", "fail"] }
8993
9020
  }
8994
9021
  };
8995
9022
  function operationalKindOf(record) {
@@ -9002,6 +9029,7 @@ function operationalKindOf(record) {
9002
9029
  if (has("assetId")) return "asset";
9003
9030
  if (has("taskId")) return "task";
9004
9031
  if (has("orderId")) return "order";
9032
+ if (has("testableObjectId")) return "test";
9005
9033
  return void 0;
9006
9034
  }
9007
9035
  function isOperationalRecord(record) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/twin-kernel",
3
- "version": "0.7.59",
3
+ "version": "0.7.60",
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": {