@things-factory/figure-service 10.1.129 → 10.1.142

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/figure-service",
3
- "version": "10.1.129",
3
+ "version": "10.1.142",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "@things-factory:registry": "https://registry.npmjs.org"
@@ -25,18 +25,18 @@
25
25
  "test:templates": "node --test scripts/templates.test.mts"
26
26
  },
27
27
  "dependencies": {
28
- "@hatiolab/figure-model": "^0.4.0",
28
+ "@hatiolab/figure-model": "^0.5.0",
29
29
  "@operato/typeorm-history": "^10.0.0",
30
30
  "@things-factory/ai-client-base": "^10.1.129",
31
- "@things-factory/attachment-base": "^10.1.123",
32
- "@things-factory/auth-base": "^10.1.123",
31
+ "@things-factory/attachment-base": "^10.1.142",
32
+ "@things-factory/auth-base": "^10.1.142",
33
33
  "@things-factory/env": "^10.1.20",
34
- "@things-factory/setting-base": "^10.1.123",
35
- "@things-factory/shell": "^10.1.123",
34
+ "@things-factory/setting-base": "^10.1.142",
35
+ "@things-factory/shell": "^10.1.142",
36
36
  "graphql-scalars": "^1.22.4",
37
37
  "graphql-upload": "^15.0.2",
38
38
  "jszip": "^3.10.1",
39
39
  "koa-router": "^7.4.0"
40
40
  },
41
- "gitHead": "4d1ef242d9b7e6669a34c27b6d31aed778c07a90"
41
+ "gitHead": "73522201151b0156168b0eeea15f2962cda0bd8f"
42
42
  }
@@ -350,7 +350,7 @@ describe('figure-format — 판을 알아보는 문', () => {
350
350
  it('every new change has its sentence in both languages', () => {
351
351
  const KO = require('../../../translations/ko.json') as Record<string, string>
352
352
  const EN = require('../../../translations/en.json') as Record<string, string>
353
- for (const code of ['occupancy-changed', 'contact-face-changed', 'public-input-gone', 'public-input-range-narrowed', 'public-input-added', 'state-input-joints-changed', 'joint-axis-changed', 'joint-motion-unit-changed', 'joint-child-changed', 'joint-list-unread'])
353
+ for (const code of ['occupancy-changed', 'contact-face-changed', 'public-input-gone', 'public-input-range-narrowed', 'public-input-added', 'state-input-joints-changed', 'joint-axis-changed', 'joint-motion-unit-changed', 'joint-child-changed', 'joint-list-unread', 'carrier-gone', 'carrier-type-changed', 'carrier-dimensions-changed', 'carrier-added'])
354
354
  for (const dict of [KO, EN]) for (const field of ['message', 'why']) expect(dict[`figure.gate.contract.${code}.${field}`]).toBeTruthy()
355
355
  })
356
356
  })
@@ -461,6 +461,29 @@ function figureContractWording(change: FigureContractChange, say: Say): Pick<Gat
461
461
  message: say(key('message'), { ...v, input: change.subject ?? '' }, `'${change.subject}' can now be set on a board.`),
462
462
  why: say(key('why'), {}, 'Placed instances that give no value stand at its default.')
463
463
  }
464
+ /* What live data names a carrier by, and the size a holder fits it by (ADR-0123). */
465
+ case 'carrier-gone':
466
+ return {
467
+ message: say(key('message'), v, `The figure is no longer carrier type ${v.type}.`),
468
+ why: say(key('why'), {}, 'Live data names carriers by this code. After this release carriers of this type find no figure.'),
469
+ ...gone
470
+ }
471
+ case 'carrier-type-changed':
472
+ return {
473
+ message: say(key('message'), v, `The carrier type changed from ${v.before} to ${v.after}.`),
474
+ why: say(key('why'), {}, 'Live data names carriers by this code. After this release carriers of the old type find no figure.'),
475
+ ...gone
476
+ }
477
+ case 'carrier-dimensions-changed':
478
+ return {
479
+ message: say(key('message'), v, `The carrier size changed from ${v.before} to ${v.after} mm.`),
480
+ why: say(key('why'), {}, 'Holders fit and stack carriers by this size. Where they stand and what fits is judged again once the map takes this release.')
481
+ }
482
+ case 'carrier-added':
483
+ return {
484
+ message: say(key('message'), v, `The figure is now carrier type ${v.type}.`),
485
+ why: say(key('why'), {}, 'Live data with this code finds this figure once the type map takes this release.')
486
+ }
464
487
  /* The joints a controller drives (ADR-0107 decision 7): what writing a state input moves, compared release to release. */
465
488
  case 'state-input-joints-changed': {
466
489
  const after = v.after || say('figure.gate.contract.joints-none', {}, 'nothing')
@@ -51,7 +51,12 @@ describe('the model is told the kernel\'s commands and the open draft', () => {
51
51
  it('teaches every word of the grammar, in its own shape', () => {
52
52
  const rules = rulesPromptFigure()
53
53
  for (const word of FIGURE_PROPOSAL_GRAMMAR) expect(rules).toContain(word.shape)
54
- expect(rules).not.toMatch(/"parts"\s*:\s*\[|anchor/i)
54
+ /*
55
+ Our own words teach no retired shape -- a `parts` array, an `anchor` on a part. The kernel's grammar is taught as it
56
+ is, and a slot layout's `anchors` are its own (figure-model 0.4.3), so its words are taken out before looking.
57
+ */
58
+ const ours = FIGURE_PROPOSAL_GRAMMAR.reduce((text, word) => text.split(word.shape).join('').split(word.means).join(''), rules)
59
+ expect(ours).not.toMatch(/"parts"\s*:\s*\[|anchor/i)
55
60
  })
56
61
 
57
62
  it('a measure asked to be the same as another is linked, not copied (:3300, 2026-09-26: 「몸통 지름과 같게」 came as a fixed 100)', () => {
@@ -75,6 +75,14 @@
75
75
  "figure.gate.contract.public-input-range-narrowed.why": "An instance may have set a value outside the new range. Which values are placed is not recorded.",
76
76
  "figure.gate.contract.public-input-added.message": "'{input}' can now be set on a board.",
77
77
  "figure.gate.contract.public-input-added.why": "Placed instances that give no value stand at its default.",
78
+ "figure.gate.contract.carrier-gone.message": "The figure is no longer carrier type {type}.",
79
+ "figure.gate.contract.carrier-gone.why": "Live data names carriers by this code. After this release carriers of this type find no figure.",
80
+ "figure.gate.contract.carrier-type-changed.message": "The carrier type changed from {before} to {after}.",
81
+ "figure.gate.contract.carrier-type-changed.why": "Live data names carriers by this code. After this release carriers of the old type find no figure.",
82
+ "figure.gate.contract.carrier-dimensions-changed.message": "The carrier size changed from {before} to {after} mm.",
83
+ "figure.gate.contract.carrier-dimensions-changed.why": "Holders fit and stack carriers by this size. Where they stand and what fits is judged again once the map takes this release.",
84
+ "figure.gate.contract.carrier-added.message": "The figure is now carrier type {type}.",
85
+ "figure.gate.contract.carrier-added.why": "Live data with this code finds this figure once the type map takes this release.",
78
86
  "figure.gate.contract.joints-none": "nothing",
79
87
  "figure.gate.contract.state-input-joints-changed.message": "The control '{id}' moved {before}. It now moves {after}.",
80
88
  "figure.gate.contract.state-input-joints-changed.why": "A controller writes this value to drive those joints. After this release the same value moves other joints, or by other amounts.",
@@ -75,6 +75,14 @@
75
75
  "figure.gate.contract.public-input-range-narrowed.why": "새 범위 밖의 값을 준 인스턴스가 있을 수 있습니다. 어떤 값이 놓였는지는 기록하지 않습니다.",
76
76
  "figure.gate.contract.public-input-added.message": "'{input}' 값을 이제 보드에서 정할 수 있습니다.",
77
77
  "figure.gate.contract.public-input-added.why": "값을 주지 않은 인스턴스는 기본값으로 섭니다.",
78
+ "figure.gate.contract.carrier-gone.message": "이 Figure는 이제 Carrier 타입 {type}이 아닙니다.",
79
+ "figure.gate.contract.carrier-gone.why": "실시간 데이터는 이 코드로 Carrier를 부릅니다. 이 발행 뒤 이 타입의 Carrier는 Figure를 찾지 못합니다.",
80
+ "figure.gate.contract.carrier-type-changed.message": "Carrier 타입이 {before}에서 {after}로 바뀌었습니다.",
81
+ "figure.gate.contract.carrier-type-changed.why": "실시간 데이터는 이 코드로 Carrier를 부릅니다. 이 발행 뒤 예전 타입의 Carrier는 Figure를 찾지 못합니다.",
82
+ "figure.gate.contract.carrier-dimensions-changed.message": "Carrier 치수가 {before}에서 {after} mm로 바뀌었습니다.",
83
+ "figure.gate.contract.carrier-dimensions-changed.why": "홀더는 이 치수로 Carrier를 놓고 쌓습니다. 타입 맵이 이 발행본을 쓰면 자리와 적재 판정을 다시 합니다.",
84
+ "figure.gate.contract.carrier-added.message": "이 Figure는 이제 Carrier 타입 {type}입니다.",
85
+ "figure.gate.contract.carrier-added.why": "타입 맵이 이 발행본을 쓰면 이 코드의 실시간 데이터가 이 Figure를 찾습니다.",
78
86
  "figure.gate.contract.joints-none": "없음",
79
87
  "figure.gate.contract.state-input-joints-changed.message": "'{id}' 조작값이 움직이던 관절이 {before} 에서 {after} 로 바뀌었습니다.",
80
88
  "figure.gate.contract.state-input-joints-changed.why": "컨트롤러는 이 값을 써서 그 관절들을 움직입니다. 이 발행 뒤에는 같은 값이 다른 관절을 움직이거나 다른 양만큼 움직입니다.",