@things-factory/station 10.1.33

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.
Files changed (185) hide show
  1. package/README.md +124 -0
  2. package/dist-client/index.d.ts +11 -0
  3. package/dist-client/index.js +13 -0
  4. package/dist-client/index.js.map +1 -0
  5. package/dist-client/station/scene/index.d.ts +11 -0
  6. package/dist-client/station/scene/index.js +12 -0
  7. package/dist-client/station/scene/index.js.map +1 -0
  8. package/dist-client/station/scene/station-context-binding.d.ts +25 -0
  9. package/dist-client/station/scene/station-context-binding.js +39 -0
  10. package/dist-client/station/scene/station-context-binding.js.map +1 -0
  11. package/dist-client/station/scene/station-context-scene.d.ts +28 -0
  12. package/dist-client/station/scene/station-context-scene.js +138 -0
  13. package/dist-client/station/scene/station-context-scene.js.map +1 -0
  14. package/dist-client/station/scene/station-counts-scene.d.ts +6 -0
  15. package/dist-client/station/scene/station-counts-scene.js +51 -0
  16. package/dist-client/station/scene/station-counts-scene.js.map +1 -0
  17. package/dist-client/station/scene/station-field-scene.d.ts +6 -0
  18. package/dist-client/station/scene/station-field-scene.js +89 -0
  19. package/dist-client/station/scene/station-field-scene.js.map +1 -0
  20. package/dist-client/station/scene/station-icons.d.ts +82 -0
  21. package/dist-client/station/scene/station-icons.js +131 -0
  22. package/dist-client/station/scene/station-icons.js.map +1 -0
  23. package/dist-client/station/scene/station-numpad-scene.d.ts +9 -0
  24. package/dist-client/station/scene/station-numpad-scene.js +144 -0
  25. package/dist-client/station/scene/station-numpad-scene.js.map +1 -0
  26. package/dist-client/station/scene/station-scene-style.d.ts +51 -0
  27. package/dist-client/station/scene/station-scene-style.js +108 -0
  28. package/dist-client/station/scene/station-scene-style.js.map +1 -0
  29. package/dist-client/station/scene/station-scene.d.ts +295 -0
  30. package/dist-client/station/scene/station-scene.js +68 -0
  31. package/dist-client/station/scene/station-scene.js.map +1 -0
  32. package/dist-client/station/scene/station-who-scene.d.ts +6 -0
  33. package/dist-client/station/scene/station-who-scene.js +48 -0
  34. package/dist-client/station/scene/station-who-scene.js.map +1 -0
  35. package/dist-client/station/scene/station-work-panel-scene.d.ts +28 -0
  36. package/dist-client/station/scene/station-work-panel-scene.js +37 -0
  37. package/dist-client/station/scene/station-work-panel-scene.js.map +1 -0
  38. package/dist-client/station/station-board-binding.d.ts +16 -0
  39. package/dist-client/station/station-board-binding.js +20 -0
  40. package/dist-client/station/station-board-binding.js.map +1 -0
  41. package/dist-client/station/station-context.d.ts +178 -0
  42. package/dist-client/station/station-context.js +30 -0
  43. package/dist-client/station/station-context.js.map +1 -0
  44. package/dist-client/station/station-palette.d.ts +34 -0
  45. package/dist-client/station/station-palette.js +119 -0
  46. package/dist-client/station/station-palette.js.map +1 -0
  47. package/dist-client/station/station-runtime.d.ts +47 -0
  48. package/dist-client/station/station-runtime.js +47 -0
  49. package/dist-client/station/station-runtime.js.map +1 -0
  50. package/dist-client/station/station-scene-context.d.ts +68 -0
  51. package/dist-client/station/station-scene-context.js +62 -0
  52. package/dist-client/station/station-scene-context.js.map +1 -0
  53. package/dist-client/station/station-screen-flow.d.ts +16 -0
  54. package/dist-client/station/station-screen-flow.js +58 -0
  55. package/dist-client/station/station-screen-flow.js.map +1 -0
  56. package/dist-client/station/station-tile-registry.d.ts +89 -0
  57. package/dist-client/station/station-tile-registry.js +86 -0
  58. package/dist-client/station/station-tile-registry.js.map +1 -0
  59. package/dist-client/station/station-work-panel-view.d.ts +23 -0
  60. package/dist-client/station/station-work-panel-view.js +125 -0
  61. package/dist-client/station/station-work-panel-view.js.map +1 -0
  62. package/dist-client/station/station-work-runtime.d.ts +47 -0
  63. package/dist-client/station/station-work-runtime.js +161 -0
  64. package/dist-client/station/station-work-runtime.js.map +1 -0
  65. package/dist-client/station/station-work-scenarios.d.ts +41 -0
  66. package/dist-client/station/station-work-scenarios.js +59 -0
  67. package/dist-client/station/station-work-scenarios.js.map +1 -0
  68. package/dist-client/station/task-counts.d.ts +32 -0
  69. package/dist-client/station/task-counts.js +26 -0
  70. package/dist-client/station/task-counts.js.map +1 -0
  71. package/dist-client/tsconfig.tsbuildinfo +1 -0
  72. package/dist-server/activities/activity-station-screen-control-withdrawal.d.ts +62 -0
  73. package/dist-server/activities/activity-station-screen-control-withdrawal.js +147 -0
  74. package/dist-server/activities/activity-station-screen-control-withdrawal.js.map +1 -0
  75. package/dist-server/activities/activity-station-screen-release.d.ts +81 -0
  76. package/dist-server/activities/activity-station-screen-release.js +147 -0
  77. package/dist-server/activities/activity-station-screen-release.js.map +1 -0
  78. package/dist-server/activities/index.d.ts +49 -0
  79. package/dist-server/activities/index.js +21 -0
  80. package/dist-server/activities/index.js.map +1 -0
  81. package/dist-server/index.d.ts +3 -0
  82. package/dist-server/index.js +8 -0
  83. package/dist-server/index.js.map +1 -0
  84. package/dist-server/service/index.d.ts +23 -0
  85. package/dist-server/service/index.js +41 -0
  86. package/dist-server/service/index.js.map +1 -0
  87. package/dist-server/service/station/deletion-changes.d.ts +14 -0
  88. package/dist-server/service/station/deletion-changes.js +25 -0
  89. package/dist-server/service/station/deletion-changes.js.map +1 -0
  90. package/dist-server/service/station/index.d.ts +13 -0
  91. package/dist-server/service/station/index.js +25 -0
  92. package/dist-server/service/station/index.js.map +1 -0
  93. package/dist-server/service/station/reversibility.d.ts +21 -0
  94. package/dist-server/service/station/reversibility.js +24 -0
  95. package/dist-server/service/station/reversibility.js.map +1 -0
  96. package/dist-server/service/station/screen-model-digest.d.ts +60 -0
  97. package/dist-server/service/station/screen-model-digest.js +97 -0
  98. package/dist-server/service/station/screen-model-digest.js.map +1 -0
  99. package/dist-server/service/station/staged-material.d.ts +62 -0
  100. package/dist-server/service/station/staged-material.js +44 -0
  101. package/dist-server/service/station/staged-material.js.map +1 -0
  102. package/dist-server/service/station/station-argument-sources.d.ts +31 -0
  103. package/dist-server/service/station/station-argument-sources.js +66 -0
  104. package/dist-server/service/station/station-argument-sources.js.map +1 -0
  105. package/dist-server/service/station/station-assignment-choice.d.ts +81 -0
  106. package/dist-server/service/station/station-assignment-choice.js +105 -0
  107. package/dist-server/service/station/station-assignment-choice.js.map +1 -0
  108. package/dist-server/service/station/station-assignment-resolver.d.ts +104 -0
  109. package/dist-server/service/station/station-assignment-resolver.js +426 -0
  110. package/dist-server/service/station/station-assignment-resolver.js.map +1 -0
  111. package/dist-server/service/station/station-assignment-service.d.ts +33 -0
  112. package/dist-server/service/station/station-assignment-service.js +64 -0
  113. package/dist-server/service/station/station-assignment-service.js.map +1 -0
  114. package/dist-server/service/station/station-axes.d.ts +9 -0
  115. package/dist-server/service/station/station-axes.js +16 -0
  116. package/dist-server/service/station/station-axes.js.map +1 -0
  117. package/dist-server/service/station/station-flow.d.ts +156 -0
  118. package/dist-server/service/station/station-flow.js +255 -0
  119. package/dist-server/service/station/station-flow.js.map +1 -0
  120. package/dist-server/service/station/station-generate.d.ts +76 -0
  121. package/dist-server/service/station/station-generate.js +178 -0
  122. package/dist-server/service/station/station-generate.js.map +1 -0
  123. package/dist-server/service/station/station-product.d.ts +123 -0
  124. package/dist-server/service/station/station-product.js +77 -0
  125. package/dist-server/service/station/station-product.js.map +1 -0
  126. package/dist-server/service/station/station-runtime-binding.d.ts +6 -0
  127. package/dist-server/service/station/station-runtime-binding.js +46 -0
  128. package/dist-server/service/station/station-runtime-binding.js.map +1 -0
  129. package/dist-server/service/station/station-screen-assignment.d.ts +94 -0
  130. package/dist-server/service/station/station-screen-assignment.js +154 -0
  131. package/dist-server/service/station/station-screen-assignment.js.map +1 -0
  132. package/dist-server/service/station/station-screen-control-withdrawal-resolver.d.ts +37 -0
  133. package/dist-server/service/station/station-screen-control-withdrawal-resolver.js +130 -0
  134. package/dist-server/service/station/station-screen-control-withdrawal-resolver.js.map +1 -0
  135. package/dist-server/service/station/station-screen-control-withdrawal.d.ts +104 -0
  136. package/dist-server/service/station/station-screen-control-withdrawal.js +128 -0
  137. package/dist-server/service/station/station-screen-control-withdrawal.js.map +1 -0
  138. package/dist-server/service/station/station-screen-draft-resolver.d.ts +47 -0
  139. package/dist-server/service/station/station-screen-draft-resolver.js +153 -0
  140. package/dist-server/service/station/station-screen-draft-resolver.js.map +1 -0
  141. package/dist-server/service/station/station-screen-layout.d.ts +119 -0
  142. package/dist-server/service/station/station-screen-layout.js +202 -0
  143. package/dist-server/service/station/station-screen-layout.js.map +1 -0
  144. package/dist-server/service/station/station-screen-list-resolver.d.ts +69 -0
  145. package/dist-server/service/station/station-screen-list-resolver.js +215 -0
  146. package/dist-server/service/station/station-screen-list-resolver.js.map +1 -0
  147. package/dist-server/service/station/station-screen-publish-subscriber.d.ts +22 -0
  148. package/dist-server/service/station/station-screen-publish-subscriber.js +90 -0
  149. package/dist-server/service/station/station-screen-publish-subscriber.js.map +1 -0
  150. package/dist-server/service/station/station-screen-release-gate.d.ts +66 -0
  151. package/dist-server/service/station/station-screen-release-gate.js +67 -0
  152. package/dist-server/service/station/station-screen-release-gate.js.map +1 -0
  153. package/dist-server/service/station/station-screen-release-record.d.ts +62 -0
  154. package/dist-server/service/station/station-screen-release-record.js +139 -0
  155. package/dist-server/service/station/station-screen-release-record.js.map +1 -0
  156. package/dist-server/service/station/station-screen-release-signature.d.ts +23 -0
  157. package/dist-server/service/station/station-screen-release-signature.js +32 -0
  158. package/dist-server/service/station/station-screen-release-signature.js.map +1 -0
  159. package/dist-server/service/station/station-screen-scorecard.d.ts +15 -0
  160. package/dist-server/service/station/station-screen-scorecard.js +35 -0
  161. package/dist-server/service/station/station-screen-scorecard.js.map +1 -0
  162. package/dist-server/service/station/station-screen-spec-resolver.d.ts +36 -0
  163. package/dist-server/service/station/station-screen-spec-resolver.js +202 -0
  164. package/dist-server/service/station/station-screen-spec-resolver.js.map +1 -0
  165. package/dist-server/service/station/station-screen-spec.d.ts +104 -0
  166. package/dist-server/service/station/station-screen-spec.js +114 -0
  167. package/dist-server/service/station/station-screen-spec.js.map +1 -0
  168. package/dist-server/service/station/station-screen-thumbnail.d.ts +11 -0
  169. package/dist-server/service/station/station-screen-thumbnail.js +36 -0
  170. package/dist-server/service/station/station-screen-thumbnail.js.map +1 -0
  171. package/dist-server/service/station/station-service-resolver.d.ts +27 -0
  172. package/dist-server/service/station/station-service-resolver.js +95 -0
  173. package/dist-server/service/station/station-service-resolver.js.map +1 -0
  174. package/dist-server/tsconfig.tsbuildinfo +1 -0
  175. package/package.json +44 -0
  176. package/shared/station-axes.d.ts +4 -0
  177. package/shared/station-axes.js +155 -0
  178. package/shared/station-screen-flow-check.d.ts +12 -0
  179. package/shared/station-screen-flow-check.js +74 -0
  180. package/things-scene.config.js +15 -0
  181. package/translations/en.json +42 -0
  182. package/translations/ja.json +42 -0
  183. package/translations/ko.json +42 -0
  184. package/translations/ms.json +42 -0
  185. package/translations/zh.json +42 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-station-screen-control-withdrawal.js","sourceRoot":"","sources":["../../server/activities/activity-station-screen-control-withdrawal.ts"],"names":[],"mappings":";;;AAAA,uDAAwH;AAExH,gFAA0E;AAC1E,4GAK6D;AAC7D,0EAAqE;AACrE,wEAAmE;AACnE,iDAA+D;AAElD,QAAA,0CAA0C,GAAG,gCAAgC,CAAA;AAE1F,iEAAiE;AACjE,SAAS,iBAAiB,CAAC,OAAiC;IAC1D,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,8BAA8B;YACjC,OAAO,IAAI,eAAO,CAChB,8BAA8B,EAC9B,EAAE,EACF,uFAAuF,CACxF,CAAA;QACH,KAAK,qBAAqB;YACxB,OAAO,IAAI,eAAO,CAChB,qBAAqB,EACrB,EAAE,EACF,wFAAwF,CACzF,CAAA;IACL,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,KAAK,UAAU,QAAQ,CACrB,QAA0B,EAC1B,SAA8C,EAC9C,OAAwB;IAExB,IAAI,QAAQ,CAAC,KAAK,KAAK,iCAAsB,CAAC,KAAK;QAAE,OAAM;IAE3D,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,EAAE,UAA+E,CAAA;IAElH,IAA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E,eAAe,EAAE,IAAI,EAAE,gCAAgC,EAAE;KAC9F;IACD,KAAK,EAAE;QACL;YACE,mDAAmD;YACnD,IAAI,EAAE,SAAS;YACf,GAAG,EAAE,SAAS;YACd,WAAW,EAAE,wDAAwD;YACrE,MAAM,EAAE,IAAI;YACZ,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,CAAC,CAAC,CAAC;YACf,IAAI,EAAE,EAAE;SACT;QACD;YACE,IAAI,EAAE,YAAY;YAClB,GAAG,EAAE,YAAY;YACjB,WAAW,EAAE,kFAAkF;YAC/F,MAAM,EAAE,IAAI;YACZ,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,CAAC,CAAC,CAAC;YACf,IAAI,EAAE,EAAE;SACT;KACF;IACD,QAAQ,EAAE,IAAA,sBAAc,EAAC,QAAQ,CAAC;CACnC,CAAA","sourcesContent":["import { ActivityInstance, ActivityInstanceStatus, UpdateActivityInstanceStateAddendum } from '@things-factory/worklist'\n\nimport { StationScreenSpec } from '../service/station/station-screen-spec'\nimport {\n stationScreenSpecBefore,\n whyNotWithdraw,\n type ControlWithdrawalAction,\n type ControlWithdrawalRefusal\n} from '../service/station/station-screen-control-withdrawal'\nimport { deletionChanges } from '../service/station/deletion-changes'\nimport { stationProduct } from '../service/station/station-product'\nimport { Refusal, speaksRefusals } from '@things-factory/shell'\n\nexport const STATION_SCREEN_CONTROL_WITHDRAWAL_ACTIVITY = 'StationScreenControlWithdrawal'\n\n/** 사람이 볼 사실이 다르므로 코드가 다르다. 문장은 요청의 언어로 `error.<code>` 에서 만든다. */\nfunction withdrawalRefusal(refusal: ControlWithdrawalRefusal): Refusal {\n switch (refusal) {\n case 'control-withdrawal-spec-gone':\n return new Refusal(\n 'control-withdrawal-spec-gone',\n {},\n '[control withdrawal] the requested screen setting no longer exists. reject this item.'\n )\n case 'control-already-off':\n return new Refusal(\n 'control-already-off',\n {},\n '[control withdrawal] this screen is no longer a controlled document. reject this item.'\n )\n }\n}\n\n/**\n * 승인되면 **올릴 때 굳힌 것만** 한다 — 그 사이 들어온 다른 변경을 덮지 않는다.\n *\n * ── 왜 id 로 다시 읽나 ─────────────────────────────────────────────────────\n * boardId 로 찾으면, 그 사이 지우고 새로 만든 spec 을 끄거나 지운다. 결재자가 본 것은 그 spec 이\n * 아니다.\n *\n * ── 왜 통째로 저장하지 않나 ────────────────────────────────────────────────\n * 읽은 행을 고쳐 `save` 하면 그 사이 누가 저장한 흐름이 **읽은 시점의 흐름으로** 되돌아간다. 끄는\n * 것은 `controlled` 한 칸이므로 그 칸만 쓴다.\n *\n * ── 할 수 없으면 조용히 끝내지 않는다 ──────────────────────────────────────\n * 던진다. 결재가 끝나지 않고 결재자가 사유를 본다 — 「승인됨」으로 끝났는데 아무 일도 없던 것이 가장\n * 나쁘다.\n */\nasync function callback(\n instance: ActivityInstance,\n _addendum: UpdateActivityInstanceStateAddendum,\n context: ResolverContext\n) {\n if (instance.state !== ActivityInstanceStatus.Ended) return\n\n const withdrawal = instance.input?.withdrawal as { specId?: string; action?: ControlWithdrawalAction } | undefined\n\n if (!withdrawal?.specId || (withdrawal.action !== 'turn-off' && withdrawal.action !== 'delete')) {\n throw new Refusal(\n 'control-withdrawal-carried-missing',\n {},\n '[control withdrawal] the approved item has no screen setting, so it was not applied.'\n )\n }\n\n const { domain, user, tx } = context.state\n const repository = tx.getRepository(StationScreenSpec)\n const standing = await repository.findOne({ where: { domain: { id: domain.id }, id: withdrawal.specId } })\n const refusal = whyNotWithdraw(standing)\n\n if (refusal) {\n throw withdrawalRefusal(refusal)\n }\n\n /*\n * 범위는 위에서 도메인으로 좁혀 읽은 그 행이다. 여기서 id(uuid) 하나로 쓰는 것은 관계 칸을 조건에\n * 넣은 `update` · `delete` 가 드라이버마다 다르게 풀리기 때문이다 — 읽기는 이미 도메인을 확인했다.\n */\n if (withdrawal.action === 'delete') {\n /*\n * **지우는 그 순간의 설정**을 이력에 남긴다. 상신의 `before` 는 결재자가 본 모습이고, 그 사이 저장된\n * 흐름까지 여기서 읽은 행으로 적는다(ADR-0064 ③).\n */\n /*\n * 어느 이력으로 가는지는 제품이 정한다 — 선언 다섯(ADR-0083 결정 7). 여기가 만드는 것은 「무엇이\n * 지워지는가」뿐이고, plant 는 그것을 `fact-change` 로 보낸다.\n */\n await stationProduct().recordChange(\n tx,\n domain,\n { factKind: 'station-screen-spec', factName: standing!.boardId, changes: deletionChanges(stationScreenSpecBefore(standing!)) },\n { user, activityInstanceId: instance.id }\n )\n\n await repository.delete({ id: standing!.id })\n return\n }\n\n await repository.update({ id: standing!.id }, { controlled: false, updater: user } as any)\n}\n\n/**\n * 통제 해제 승인 — **통제 문서를 통제 밖으로 내보내는 결재.**\n *\n * ── 왜 발행 승인과 다른 문인가 ─────────────────────────────────────────────\n * `station_screen_releases` 한 행은 「이 도안 지문에 서명했다」 하나만 뜻해야 한다. 발행 관문이 그\n * 행을 그대로 서명으로 센다. 해제를 거기 섞으면 읽는 모든 자리가 종류로 걸러야 하고, 한 곳이\n * 빠지면 지문 없는 행이 서명이 된다. 그래서 문을 가르고, 해제는 별도 표를 두지 않는다 — 누가 언제\n * 승인했는지는 이 활동 인스턴스가 말한다(아키텍트 판정 2026-09-17).\n *\n * ── 결재선은 이 문의 것이 아니다 ───────────────────────────────────────────\n * 발행 승인의 결재선을 **올리는 순간 읽어서** 싣는다(`requestStationScreenControlWithdrawal`). 같은\n * 결재선을 값으로 두 번 적으면 언젠가 갈린다 — 그러면 켤 때와 끌 때 승인하는 사람이 달라진다.\n * 문 현황은 이 문을 「화면 발행 승인의 결재선을 따른다」로 그린다(`LINE_FOLLOWS`).\n */\nexport const ActivityStationScreenControlWithdrawal = {\n name: STATION_SCREEN_CONTROL_WITHDRAWAL_ACTIVITY,\n /* label and guide are drawn from the translations (activity.<door>.label · .guide.<n>); change them together. */\n label: 'control withdrawal approval',\n description: 'Approve taking one station screen out of document control',\n guide: [\n 'take a station screen that was put under document control out of control. after approval it is published without approval.',\n 'the approval line is the same as for screen publication approval — the same people decide turning it on and off.',\n 'until it is approved it is still a controlled document. an unsigned edition does not go out in the meantime either.'\n ],\n release: '1.0.0',\n provider: 'hatiolab.com',\n category: 'quality',\n activityType: 'user',\n priority: 1,\n startingType: 'post',\n multiple: 'single',\n standardTime: 8 * 60 * 60,\n searchKeys: [\n { name: 'board', description: 'Which screen leaves document control', inputKey: 'boardId', tKey: 'field.board' }\n ],\n /*\n * 전용 결재 화면을 두지 않는다 — 결재자가 판단할 것이 선언한 자리로 다 그려진다. 앞서 전용 화면을\n * 가리켜 놓고 안 만든 양식이 빈 화면에 승인 단추만 남겼다(§`activity-lot-hold-release`). 둘 다 비운다.\n */\n viewType: '',\n viewSource: '',\n decisionKeys: [\n { role: 'headline', inputPath: 'headline', name: 'which screen leaves control' },\n { role: 'subject', inputPath: 'withdrawal.screenName', tKey: 'field.board', name: 'which screen' },\n { role: 'reason', inputPath: 'withdrawal.reason', tKey: 'field.reason', name: 'why control is no longer needed' },\n { role: 'consequence', inputPath: 'consequences.after', name: 'what goes out without approval afterwards' },\n { role: 'reversibility', inputPath: 'reversibility', name: 'whether this can be taken back' }\n ],\n model: [\n {\n /* 찾기 칸이 읽는 자리 — 맨 위에 있어야 채워진다. 이름이 아니라 식별자로 건다. */\n name: 'boardId',\n tag: 'boardId',\n description: 'Which screen, by the identifier that survives renaming',\n hidden: true,\n mandatory: true,\n inout: 'in',\n type: 'string',\n options: {},\n unit: null,\n quantifier: [1],\n spec: {}\n },\n {\n name: 'withdrawal',\n tag: 'withdrawal',\n description: 'Which spec, and whether it is turned off or deleted — fixed when this was raised',\n hidden: true,\n mandatory: true,\n inout: 'in',\n type: 'object',\n options: {},\n unit: null,\n quantifier: [1],\n spec: {}\n }\n ],\n callback: speaksRefusals(callback)\n}\n"]}
@@ -0,0 +1,81 @@
1
+ export declare const STATION_SCREEN_RELEASE_ACTIVITY = "StationScreenRelease";
2
+ /**
3
+ * 결재자가 보는 화면의 요소 이름.
4
+ *
5
+ * 안 붙어 있으면 결재함이 「승인 대상 내용이 없습니다」만 그리고 **승인 단추는 그대로 눌린다.**
6
+ * 통제 문서에서 그것은 「검토했다」가 거짓이 되는 자리다 — 무엇을 바꾸는 판인지 안 보이는데 서명이
7
+ * 남는다. 출하 승인에서 실제로 그랬다(2026-09-16).
8
+ */
9
+ export declare const STATION_SCREEN_RELEASE_VIEW = "activity-station-screen-release-view";
10
+ /**
11
+ * 화면 발행 승인 — **통제 문서 한 판을 내보내도 되는지 정하는 자리.**
12
+ *
13
+ * ═══════════════════════════════════════════════════════════════════════════
14
+ * ── 왜 이 문이 있어야 하나 ────────────────────────────────────────────────
15
+ * `StationScreenSpec.controlled` 는 저장·조회·전달까지 되는데 **분기하는 자리가 0 이었다.** 그리고
16
+ * 통제 문서 규칙(결재선 없이는 `controlled` 를 못 켠다)은 **문이 없으면 「영영 못 켜는 칸」**이 된다 —
17
+ * 자리는 있고 길이 없는 결함이다. 그 길이 이 문이다.
18
+ *
19
+ * ── 작성자와 승인자를 가른다 ──────────────────────────────────────────────
20
+ * ISO 9001 7.5.3 의 뜻이 그것이다. 화면을 만드는 권한(`station:mutation`)을 든 자리가 올리고,
21
+ * **문서 관리를 맡은 품질**이 승인한다. 그래서 이 문의 결재선에는 `station:mutation` 을 든 자리가
22
+ * 들어가지 않는다 — 들어가면 한 사람이 만들고 자기가 승인한다.
23
+ *
24
+ * 현장이 공장장을 마지막 서명자로 두고 싶으면 **공장장이 `station:mutation` 을 내려놓는** 쪽이다.
25
+ * 역할 템플릿은 그 테넌트의 것이고, 그 선택은 현장이 한다.
26
+ * [합의했다] operato-application/adr/ADR-0047.md ⑦
27
+ *
28
+ * ── 이 문이 하는 일과 안 하는 일 ──────────────────────────────────────────
29
+ * ```
30
+ * 한다 양식 · 결재선 · 결재 화면 · 승인되면 그 판의 서명을 남긴다
31
+ * 안 한다 발행 자체를 막는 관문 — 그것은 station 레인이 들고, 이 서명을 읽어 판단한다
32
+ * ```
33
+ * ═══════════════════════════════════════════════════════════════════════════
34
+ */
35
+ export declare const ActivityStationScreenRelease: {
36
+ name: string;
37
+ label: string;
38
+ description: string;
39
+ guide: string[];
40
+ release: string;
41
+ provider: string;
42
+ category: string;
43
+ activityType: string;
44
+ priority: number;
45
+ startingType: string;
46
+ multiple: string;
47
+ standardTime: number;
48
+ searchKeys: {
49
+ name: string;
50
+ description: string;
51
+ inputKey: string;
52
+ tKey: string;
53
+ }[];
54
+ viewType: string;
55
+ viewSource: string;
56
+ decisionKeys: ({
57
+ role: string;
58
+ inputPath: string;
59
+ name: string;
60
+ tKey?: undefined;
61
+ } | {
62
+ role: string;
63
+ inputPath: string;
64
+ tKey: string;
65
+ name: string;
66
+ })[];
67
+ model: {
68
+ name: string;
69
+ tag: string;
70
+ description: string;
71
+ hidden: boolean;
72
+ mandatory: boolean;
73
+ inout: string;
74
+ type: string;
75
+ options: {};
76
+ unit: any;
77
+ quantifier: number[];
78
+ spec: {};
79
+ }[];
80
+ callback: (instance: any, addendum: any, context: any) => Promise<void>;
81
+ };
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActivityStationScreenRelease = exports.STATION_SCREEN_RELEASE_VIEW = exports.STATION_SCREEN_RELEASE_ACTIVITY = void 0;
4
+ const worklist_1 = require("@things-factory/worklist");
5
+ const station_screen_release_record_1 = require("../service/station/station-screen-release-record");
6
+ const shell_1 = require("@things-factory/shell");
7
+ const station_screen_release_signature_1 = require("../service/station/station-screen-release-signature");
8
+ exports.STATION_SCREEN_RELEASE_ACTIVITY = 'StationScreenRelease';
9
+ /**
10
+ * 결재자가 보는 화면의 요소 이름.
11
+ *
12
+ * 안 붙어 있으면 결재함이 「승인 대상 내용이 없습니다」만 그리고 **승인 단추는 그대로 눌린다.**
13
+ * 통제 문서에서 그것은 「검토했다」가 거짓이 되는 자리다 — 무엇을 바꾸는 판인지 안 보이는데 서명이
14
+ * 남는다. 출하 승인에서 실제로 그랬다(2026-09-16).
15
+ */
16
+ exports.STATION_SCREEN_RELEASE_VIEW = 'activity-station-screen-release-view';
17
+ /**
18
+ * 승인이 끝나면 **그 판에 대한 서명**을 남긴다.
19
+ *
20
+ * 상신할 때 굳힌 값(화면 이름 · 작업대 · 변경 요지 · 결재자에게 보인 문장)을 그대로 적는다. 여기서
21
+ * 다시 읽지 않는다 — 상신과 승인 사이에 화면이 또 바뀔 수 있고, 그러면 **결재자가 본 것과 남는 것이
22
+ * 달라진다.** 서명은 본 것에 대한 것이다.
23
+ */
24
+ async function callback(instance, _addendum, context) {
25
+ if (instance.state !== worklist_1.ActivityInstanceStatus.Ended)
26
+ return;
27
+ const release = instance.input?.release;
28
+ if (!release?.boardId) {
29
+ throw new shell_1.Refusal('station-release-carried-missing', {}, '[screen release] the approved item has no screen, so it was not applied.');
30
+ }
31
+ const { domain, user, tx } = context.state;
32
+ const repository = tx.getRepository(station_screen_release_record_1.StationScreenRelease);
33
+ /*
34
+ * 같은 판을 두 번 승인해도 앞의 서명을 덮지 않는다 — 서명은 쌓이는 기록이다. 정체는 **판의 지문**이다:
35
+ * 같은 화면의 다른 판은 새 서명이고, 앞 판의 서명은 그대로 남는다(ADR-0047 ④).
36
+ */
37
+ const already = await repository.findOne({ where: (0, station_screen_release_signature_1.signatureOf)(domain.id, release.boardId, release.modelDigest) });
38
+ if (already) {
39
+ return;
40
+ }
41
+ await repository.save({
42
+ domain,
43
+ name: release.name,
44
+ boardId: release.boardId,
45
+ screenName: release.screenName,
46
+ stationName: release.stationName,
47
+ /* 어느 판에 서명했나. 상신 때 만든 지문을 그대로 적는다 — 여기서 다시 읽으면 그 사이의 판이 된다. */
48
+ modelDigest: release.modelDigest,
49
+ /* 정한 시각과 정한 사람은 같은 사건이다. 둘 다 여기서 적는다. */
50
+ decidedAt: new Date(),
51
+ decidedBy: user?.name ?? user?.email,
52
+ requestedAt: release.requestedAt ? new Date(release.requestedAt) : undefined,
53
+ reason: release.reason,
54
+ shownAtSigning: release.shownAtSigning ?? [],
55
+ creator: user,
56
+ updater: user
57
+ });
58
+ }
59
+ /**
60
+ * 화면 발행 승인 — **통제 문서 한 판을 내보내도 되는지 정하는 자리.**
61
+ *
62
+ * ═══════════════════════════════════════════════════════════════════════════
63
+ * ── 왜 이 문이 있어야 하나 ────────────────────────────────────────────────
64
+ * `StationScreenSpec.controlled` 는 저장·조회·전달까지 되는데 **분기하는 자리가 0 이었다.** 그리고
65
+ * 통제 문서 규칙(결재선 없이는 `controlled` 를 못 켠다)은 **문이 없으면 「영영 못 켜는 칸」**이 된다 —
66
+ * 자리는 있고 길이 없는 결함이다. 그 길이 이 문이다.
67
+ *
68
+ * ── 작성자와 승인자를 가른다 ──────────────────────────────────────────────
69
+ * ISO 9001 7.5.3 의 뜻이 그것이다. 화면을 만드는 권한(`station:mutation`)을 든 자리가 올리고,
70
+ * **문서 관리를 맡은 품질**이 승인한다. 그래서 이 문의 결재선에는 `station:mutation` 을 든 자리가
71
+ * 들어가지 않는다 — 들어가면 한 사람이 만들고 자기가 승인한다.
72
+ *
73
+ * 현장이 공장장을 마지막 서명자로 두고 싶으면 **공장장이 `station:mutation` 을 내려놓는** 쪽이다.
74
+ * 역할 템플릿은 그 테넌트의 것이고, 그 선택은 현장이 한다.
75
+ * [합의했다] operato-application/adr/ADR-0047.md ⑦
76
+ *
77
+ * ── 이 문이 하는 일과 안 하는 일 ──────────────────────────────────────────
78
+ * ```
79
+ * 한다 양식 · 결재선 · 결재 화면 · 승인되면 그 판의 서명을 남긴다
80
+ * 안 한다 발행 자체를 막는 관문 — 그것은 station 레인이 들고, 이 서명을 읽어 판단한다
81
+ * ```
82
+ * ═══════════════════════════════════════════════════════════════════════════
83
+ */
84
+ exports.ActivityStationScreenRelease = {
85
+ name: exports.STATION_SCREEN_RELEASE_ACTIVITY,
86
+ /* label and guide are drawn from the translations (activity.<door>.label · .guide.<n>); change them together. */
87
+ label: 'screen publication approval',
88
+ description: 'Approve releasing one controlled station screen',
89
+ guide: [
90
+ 'what the operator reads on the screen changes. one torque value, one tolerance becomes the work on the floor.',
91
+ 'read what changes and how, then decide — approving sends that edition to the floor and records who approved it.',
92
+ 'with an empty approval line this screen cannot be put under document control. there is no way to publish under control without approval.'
93
+ ],
94
+ release: '1.0.0',
95
+ provider: 'hatiolab.com',
96
+ category: 'quality',
97
+ activityType: 'user',
98
+ priority: 1,
99
+ startingType: 'post',
100
+ multiple: 'single',
101
+ standardTime: 8 * 60 * 60,
102
+ searchKeys: [
103
+ { name: 'board', description: 'Which screen this release is about', inputKey: 'boardId', tKey: 'field.board' }
104
+ ],
105
+ /* 결재자가 볼 화면. 없으면 빈 화면에 승인 단추만 남는다(§`STATION_SCREEN_RELEASE_VIEW`). */
106
+ viewType: 'custom-element',
107
+ viewSource: exports.STATION_SCREEN_RELEASE_VIEW,
108
+ decisionKeys: [
109
+ { role: 'headline', inputPath: 'headline', name: 'which screen is going out' },
110
+ { role: 'subject', inputPath: 'release.stationName', tKey: 'field.station', name: 'which station reads it' },
111
+ { role: 'reason', inputPath: 'release.reason', tKey: 'field.reason', name: 'what this version changes' },
112
+ { role: 'consequence', inputPath: 'consequences.reads', name: 'what an operator will read off it' },
113
+ { role: 'evidence', inputPath: 'evidence.changes', name: 'the changes themselves, line by line' },
114
+ { role: 'reversibility', inputPath: 'reversibility', name: 'whether this can be taken back' }
115
+ ],
116
+ model: [
117
+ {
118
+ /* 찾기 칸이 읽는 자리 — 맨 위에 있어야 채워진다. 이름이 아니라 식별자로 건다. */
119
+ name: 'boardId',
120
+ tag: 'boardId',
121
+ description: 'Which screen, by the identifier that survives renaming',
122
+ hidden: true,
123
+ mandatory: true,
124
+ inout: 'in',
125
+ type: 'string',
126
+ options: {},
127
+ unit: null,
128
+ quantifier: [1],
129
+ spec: {}
130
+ },
131
+ {
132
+ name: 'release',
133
+ tag: 'release',
134
+ description: 'The screen version as it stood when this was raised',
135
+ hidden: true,
136
+ mandatory: true,
137
+ inout: 'in',
138
+ type: 'object',
139
+ options: {},
140
+ unit: null,
141
+ quantifier: [1],
142
+ spec: {}
143
+ }
144
+ ],
145
+ callback: (0, shell_1.speaksRefusals)(callback)
146
+ };
147
+ //# sourceMappingURL=activity-station-screen-release.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-station-screen-release.js","sourceRoot":"","sources":["../../server/activities/activity-station-screen-release.ts"],"names":[],"mappings":";;;AAAA,uDAAwH;AAExH,oGAAuF;AACvF,iDAA+D;AAC/D,0GAAiF;AAEpE,QAAA,+BAA+B,GAAG,sBAAsB,CAAA;AAErE;;;;;;GAMG;AACU,QAAA,2BAA2B,GAAG,sCAAsC,CAAA;AAEjF;;;;;;GAMG;AACH,KAAK,UAAU,QAAQ,CACrB,QAA0B,EAC1B,SAA8C,EAC9C,OAAwB;IAExB,IAAI,QAAQ,CAAC,KAAK,KAAK,iCAAsB,CAAC,KAAK;QAAE,OAAM;IAE3D,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IAEvC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;QACtB,MAAM,IAAI,eAAO,CACf,iCAAiC,EACjC,EAAE,EACF,0EAA0E,CAC3E,CAAA;IACH,CAAC;IAED,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,oDAAoB,CAAC,CAAA;IAEzD;;;OAGG;IACH,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAA,8CAAW,EAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,C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IAAI,EAAE,IAAI;YACV,UAAU,EAAE,CAAC,CAAC,CAAC;YACf,IAAI,EAAE,EAAE;SACT;KACF;IACD,QAAQ,EAAE,IAAA,sBAAc,EAAC,QAAQ,CAAC;CACnC,CAAA","sourcesContent":["import { ActivityInstance, ActivityInstanceStatus, UpdateActivityInstanceStateAddendum } from '@things-factory/worklist'\n\nimport { StationScreenRelease } from '../service/station/station-screen-release-record'\nimport { Refusal, speaksRefusals } from '@things-factory/shell'\nimport { signatureOf } from '../service/station/station-screen-release-signature'\n\nexport const STATION_SCREEN_RELEASE_ACTIVITY = 'StationScreenRelease'\n\n/**\n * 결재자가 보는 화면의 요소 이름.\n *\n * 안 붙어 있으면 결재함이 「승인 대상 내용이 없습니다」만 그리고 **승인 단추는 그대로 눌린다.**\n * 통제 문서에서 그것은 「검토했다」가 거짓이 되는 자리다 — 무엇을 바꾸는 판인지 안 보이는데 서명이\n * 남는다. 출하 승인에서 실제로 그랬다(2026-09-16).\n */\nexport const STATION_SCREEN_RELEASE_VIEW = 'activity-station-screen-release-view'\n\n/**\n * 승인이 끝나면 **그 판에 대한 서명**을 남긴다.\n *\n * 상신할 때 굳힌 값(화면 이름 · 작업대 · 변경 요지 · 결재자에게 보인 문장)을 그대로 적는다. 여기서\n * 다시 읽지 않는다 — 상신과 승인 사이에 화면이 또 바뀔 수 있고, 그러면 **결재자가 본 것과 남는 것이\n * 달라진다.** 서명은 본 것에 대한 것이다.\n */\nasync function callback(\n instance: ActivityInstance,\n _addendum: UpdateActivityInstanceStateAddendum,\n context: ResolverContext\n) {\n if (instance.state !== ActivityInstanceStatus.Ended) return\n\n const release = instance.input?.release\n\n if (!release?.boardId) {\n throw new Refusal(\n 'station-release-carried-missing',\n {},\n '[screen release] the approved item has no screen, so it was not applied.'\n )\n }\n\n const { domain, user, tx } = context.state\n const repository = tx.getRepository(StationScreenRelease)\n\n /*\n * 같은 판을 두 번 승인해도 앞의 서명을 덮지 않는다 — 서명은 쌓이는 기록이다. 정체는 **판의 지문**이다:\n * 같은 화면의 다른 판은 새 서명이고, 앞 판의 서명은 그대로 남는다(ADR-0047 ④).\n */\n const already = await repository.findOne({ where: signatureOf(domain.id, release.boardId, release.modelDigest) })\n\n if (already) {\n return\n }\n\n await repository.save({\n domain,\n name: release.name,\n boardId: release.boardId,\n screenName: release.screenName,\n stationName: release.stationName,\n /* 어느 판에 서명했나. 상신 때 만든 지문을 그대로 적는다 — 여기서 다시 읽으면 그 사이의 판이 된다. */\n modelDigest: release.modelDigest,\n /* 정한 시각과 정한 사람은 같은 사건이다. 둘 다 여기서 적는다. */\n decidedAt: new Date(),\n decidedBy: user?.name ?? user?.email,\n requestedAt: release.requestedAt ? new Date(release.requestedAt) : undefined,\n reason: release.reason,\n shownAtSigning: release.shownAtSigning ?? [],\n creator: user,\n updater: user\n } as any)\n}\n\n/**\n * 화면 발행 승인 — **통제 문서 한 판을 내보내도 되는지 정하는 자리.**\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── 왜 이 문이 있어야 하나 ────────────────────────────────────────────────\n * `StationScreenSpec.controlled` 는 저장·조회·전달까지 되는데 **분기하는 자리가 0 이었다.** 그리고\n * 통제 문서 규칙(결재선 없이는 `controlled` 를 못 켠다)은 **문이 없으면 「영영 못 켜는 칸」**이 된다 —\n * 자리는 있고 길이 없는 결함이다. 그 길이 이 문이다.\n *\n * ── 작성자와 승인자를 가른다 ──────────────────────────────────────────────\n * ISO 9001 7.5.3 의 뜻이 그것이다. 화면을 만드는 권한(`station:mutation`)을 든 자리가 올리고,\n * **문서 관리를 맡은 품질**이 승인한다. 그래서 이 문의 결재선에는 `station:mutation` 을 든 자리가\n * 들어가지 않는다 — 들어가면 한 사람이 만들고 자기가 승인한다.\n *\n * 현장이 공장장을 마지막 서명자로 두고 싶으면 **공장장이 `station:mutation` 을 내려놓는** 쪽이다.\n * 역할 템플릿은 그 테넌트의 것이고, 그 선택은 현장이 한다.\n * [합의했다] operato-application/adr/ADR-0047.md ⑦\n *\n * ── 이 문이 하는 일과 안 하는 일 ──────────────────────────────────────────\n * ```\n * 한다 양식 · 결재선 · 결재 화면 · 승인되면 그 판의 서명을 남긴다\n * 안 한다 발행 자체를 막는 관문 — 그것은 station 레인이 들고, 이 서명을 읽어 판단한다\n * ```\n * ═══════════════════════════════════════════════════════════════════════════\n */\nexport const ActivityStationScreenRelease = {\n name: STATION_SCREEN_RELEASE_ACTIVITY,\n /* label and guide are drawn from the translations (activity.<door>.label · .guide.<n>); change them together. */\n label: 'screen publication approval',\n description: 'Approve releasing one controlled station screen',\n guide: [\n 'what the operator reads on the screen changes. one torque value, one tolerance becomes the work on the floor.',\n 'read what changes and how, then decide — approving sends that edition to the floor and records who approved it.',\n 'with an empty approval line this screen cannot be put under document control. there is no way to publish under control without approval.'\n ],\n release: '1.0.0',\n provider: 'hatiolab.com',\n category: 'quality',\n activityType: 'user',\n priority: 1,\n startingType: 'post',\n multiple: 'single',\n standardTime: 8 * 60 * 60,\n searchKeys: [\n { name: 'board', description: 'Which screen this release is about', inputKey: 'boardId', tKey: 'field.board' }\n ],\n /* 결재자가 볼 화면. 없으면 빈 화면에 승인 단추만 남는다(§`STATION_SCREEN_RELEASE_VIEW`). */\n viewType: 'custom-element',\n viewSource: STATION_SCREEN_RELEASE_VIEW,\n decisionKeys: [\n { role: 'headline', inputPath: 'headline', name: 'which screen is going out' },\n { role: 'subject', inputPath: 'release.stationName', tKey: 'field.station', name: 'which station reads it' },\n { role: 'reason', inputPath: 'release.reason', tKey: 'field.reason', name: 'what this version changes' },\n { role: 'consequence', inputPath: 'consequences.reads', name: 'what an operator will read off it' },\n { role: 'evidence', inputPath: 'evidence.changes', name: 'the changes themselves, line by line' },\n { role: 'reversibility', inputPath: 'reversibility', name: 'whether this can be taken back' }\n ],\n model: [\n {\n /* 찾기 칸이 읽는 자리 — 맨 위에 있어야 채워진다. 이름이 아니라 식별자로 건다. */\n name: 'boardId',\n tag: 'boardId',\n description: 'Which screen, by the identifier that survives renaming',\n hidden: true,\n mandatory: true,\n inout: 'in',\n type: 'string',\n options: {},\n unit: null,\n quantifier: [1],\n spec: {}\n },\n {\n name: 'release',\n tag: 'release',\n description: 'The screen version as it stood when this was raised',\n hidden: true,\n mandatory: true,\n inout: 'in',\n type: 'object',\n options: {},\n unit: null,\n quantifier: [1],\n spec: {}\n }\n ],\n callback: speaksRefusals(callback)\n}\n"]}
@@ -0,0 +1,49 @@
1
+ export declare const STATION_ACTIVITIES: {
2
+ name: string;
3
+ label: string;
4
+ description: string;
5
+ guide: string[];
6
+ release: string;
7
+ provider: string;
8
+ category: string;
9
+ activityType: string;
10
+ priority: number;
11
+ startingType: string;
12
+ multiple: string;
13
+ standardTime: number;
14
+ searchKeys: {
15
+ name: string;
16
+ description: string;
17
+ inputKey: string;
18
+ tKey: string;
19
+ }[];
20
+ viewType: string;
21
+ viewSource: string;
22
+ decisionKeys: ({
23
+ role: string;
24
+ inputPath: string;
25
+ name: string;
26
+ tKey?: undefined;
27
+ } | {
28
+ role: string;
29
+ inputPath: string;
30
+ tKey: string;
31
+ name: string;
32
+ })[];
33
+ model: {
34
+ name: string;
35
+ tag: string;
36
+ description: string;
37
+ hidden: boolean;
38
+ mandatory: boolean;
39
+ inout: string;
40
+ type: string;
41
+ options: {};
42
+ unit: any;
43
+ quantifier: number[];
44
+ spec: {};
45
+ }[];
46
+ callback: (instance: any, addendum: any, context: any) => Promise<void>;
47
+ }[];
48
+ export * from './activity-station-screen-release.js';
49
+ export * from './activity-station-screen-control-withdrawal.js';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STATION_ACTIVITIES = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const worklist_1 = require("@things-factory/worklist");
6
+ const activity_station_screen_release_js_1 = require("./activity-station-screen-release.js");
7
+ const activity_station_screen_control_withdrawal_js_1 = require("./activity-station-screen-control-withdrawal.js");
8
+ /*
9
+ * 저작 결재의 양식 둘을 워크리스트에 등록한다 — 이 import 자체가 등록을 돈다(ADR-0069 결정 3).
10
+ * 등록은 모듈 import 때다. bootstrap 훅은 스키마가 선 뒤라 늦다.
11
+ *
12
+ * 등록만으로는 결재선이 서지 않는다 — 현장이 워크리스트에서 이 이름의 액티비티를 만들고 **결재선을
13
+ * 채워야** 한다. 비어 있으면 발행을 올릴 때 막고 그 사실을 말한다(`station-screen-release-gate`).
14
+ */
15
+ exports.STATION_ACTIVITIES = [activity_station_screen_release_js_1.ActivityStationScreenRelease, activity_station_screen_control_withdrawal_js_1.ActivityStationScreenControlWithdrawal];
16
+ exports.STATION_ACTIVITIES.forEach(template => {
17
+ worklist_1.ActivityInstallations.installActivityTemplate(template);
18
+ });
19
+ tslib_1.__exportStar(require("./activity-station-screen-release.js"), exports);
20
+ tslib_1.__exportStar(require("./activity-station-screen-control-withdrawal.js"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/activities/index.ts"],"names":[],"mappings":";;;;AAAA,uDAAgE;AAEhE,6FAAmF;AACnF,mHAAwG;AAExG;;;;;;GAMG;AACU,QAAA,kBAAkB,GAAG,CAAC,iEAA4B,EAAE,sFAAsC,CAAC,CAAA;AAExG,0BAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;IACpC,gCAAqB,CAAC,uBAAuB,CAAC,QAAe,CAAC,CAAA;AAChE,CAAC,CAAC,CAAA;AAEF,+EAAoD;AACpD,0FAA+D","sourcesContent":["import { ActivityInstallations } from '@things-factory/worklist'\n\nimport { ActivityStationScreenRelease } from './activity-station-screen-release.js'\nimport { ActivityStationScreenControlWithdrawal } from './activity-station-screen-control-withdrawal.js'\n\n/*\n * 저작 결재의 양식 둘을 워크리스트에 등록한다 — 이 import 자체가 등록을 돈다(ADR-0069 결정 3).\n * 등록은 모듈 import 때다. bootstrap 훅은 스키마가 선 뒤라 늦다.\n *\n * 등록만으로는 결재선이 서지 않는다 — 현장이 워크리스트에서 이 이름의 액티비티를 만들고 **결재선을\n * 채워야** 한다. 비어 있으면 발행을 올릴 때 막고 그 사실을 말한다(`station-screen-release-gate`).\n */\nexport const STATION_ACTIVITIES = [ActivityStationScreenRelease, ActivityStationScreenControlWithdrawal]\n\nSTATION_ACTIVITIES.forEach(template => {\n ActivityInstallations.installActivityTemplate(template as any)\n})\n\nexport * from './activity-station-screen-release.js'\nexport * from './activity-station-screen-control-withdrawal.js'\n"]}
@@ -0,0 +1,3 @@
1
+ import './activities/index.js';
2
+ export * from './activities/index.js';
3
+ export * from './service/index.js';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /* 저작 결재의 양식 둘 — 이 import 자체가 워크리스트 등록을 돈다. */
5
+ require("./activities/index.js");
6
+ tslib_1.__exportStar(require("./activities/index.js"), exports);
7
+ tslib_1.__exportStar(require("./service/index.js"), exports);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AAC9C,iCAA8B;AAE9B,gEAAqC;AACrC,6DAAkC","sourcesContent":["/* 저작 결재의 양식 둘 — 이 import 자체가 워크리스트 등록을 돈다. */\nimport './activities/index.js'\n\nexport * from './activities/index.js'\nexport * from './service/index.js'\n"]}
@@ -0,0 +1,23 @@
1
+ export * from './station/station-product.js';
2
+ export * from './station/station-axes.js';
3
+ export * from './station/deletion-changes.js';
4
+ export * from './station/station-screen-spec.js';
5
+ export * from './station/station-screen-assignment.js';
6
+ export * from './station/station-screen-release-record.js';
7
+ export * from './station/station-assignment-choice.js';
8
+ export * from './station/station-assignment-service.js';
9
+ export * from './station/station-flow.js';
10
+ export * from './station/station-generate.js';
11
+ export * from './station/station-runtime-binding.js';
12
+ export * from './station/station-screen-layout.js';
13
+ export * from './station/station-screen-release-gate.js';
14
+ export * from './station/station-screen-release-signature.js';
15
+ export * from './station/station-screen-scorecard.js';
16
+ export * from './station/station-screen-thumbnail.js';
17
+ export * from './station/station-screen-control-withdrawal.js';
18
+ export * from './station/station-screen-publish-subscriber.js';
19
+ export * from './station/station-argument-sources.js';
20
+ export * from './station/screen-model-digest.js';
21
+ export * from './station/staged-material.js';
22
+ import { entities, resolvers, subscribers } from './station/index.js';
23
+ export { entities, resolvers, subscribers };
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /*
3
+ * ★ 낼 것을 파일마다 적는다 — 묶음의 `index` 를 통째로 내보내지 않는다.
4
+ *
5
+ * 그 파일은 `entities` · `resolvers` · `subscribers` 라는 이름을 갖고 있고 이 파일도 같은 이름을
6
+ * 갖는다. `export *` 로 섞으면 그 이름들이 조용히 가려지거나 빠진다 — 오류는 안 나고 서버가 반쯤
7
+ * 선다(worklist 가 같은 자리에 같은 주석을 달아 두었다).
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.subscribers = exports.resolvers = exports.entities = void 0;
11
+ const tslib_1 = require("tslib");
12
+ /* 제품이 선언하는 자리 — 이것이 안 나가면 앱이 「그런 export 가 없다」로 멈춘다 (ADR-0083 결정 2·7). */
13
+ tslib_1.__exportStar(require("./station/station-product.js"), exports);
14
+ tslib_1.__exportStar(require("./station/station-axes.js"), exports);
15
+ tslib_1.__exportStar(require("./station/deletion-changes.js"), exports);
16
+ /* 엔티티 */
17
+ tslib_1.__exportStar(require("./station/station-screen-spec.js"), exports);
18
+ tslib_1.__exportStar(require("./station/station-screen-assignment.js"), exports);
19
+ tslib_1.__exportStar(require("./station/station-screen-release-record.js"), exports);
20
+ /* 저작·배정·흐름의 판단 — 제품과 시험이 읽는다. */
21
+ tslib_1.__exportStar(require("./station/station-assignment-choice.js"), exports);
22
+ tslib_1.__exportStar(require("./station/station-assignment-service.js"), exports);
23
+ tslib_1.__exportStar(require("./station/station-flow.js"), exports);
24
+ tslib_1.__exportStar(require("./station/station-generate.js"), exports);
25
+ tslib_1.__exportStar(require("./station/station-runtime-binding.js"), exports);
26
+ tslib_1.__exportStar(require("./station/station-screen-layout.js"), exports);
27
+ tslib_1.__exportStar(require("./station/station-screen-release-gate.js"), exports);
28
+ tslib_1.__exportStar(require("./station/station-screen-release-signature.js"), exports);
29
+ tslib_1.__exportStar(require("./station/station-screen-scorecard.js"), exports);
30
+ tslib_1.__exportStar(require("./station/station-screen-thumbnail.js"), exports);
31
+ tslib_1.__exportStar(require("./station/station-screen-control-withdrawal.js"), exports);
32
+ tslib_1.__exportStar(require("./station/station-screen-publish-subscriber.js"), exports);
33
+ tslib_1.__exportStar(require("./station/station-argument-sources.js"), exports);
34
+ tslib_1.__exportStar(require("./station/screen-model-digest.js"), exports);
35
+ tslib_1.__exportStar(require("./station/staged-material.js"), exports);
36
+ /* 리졸버는 이름으로 받아 다시 낸다. */
37
+ const index_js_1 = require("./station/index.js");
38
+ Object.defineProperty(exports, "entities", { enumerable: true, get: function () { return index_js_1.entities; } });
39
+ Object.defineProperty(exports, "resolvers", { enumerable: true, get: function () { return index_js_1.resolvers; } });
40
+ Object.defineProperty(exports, "subscribers", { enumerable: true, get: function () { return index_js_1.subscribers; } });
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,yEAAyE;AACzE,uEAA4C;AAC5C,oEAAyC;AACzC,wEAA6C;AAE7C,SAAS;AACT,2EAAgD;AAChD,iFAAsD;AACtD,qFAA0D;AAE1D,iCAAiC;AACjC,iFAAsD;AACtD,kFAAuD;AACvD,oEAAyC;AACzC,wEAA6C;AAC7C,+EAAoD;AACpD,6EAAkD;AAClD,mFAAwD;AACxD,wFAA6D;AAC7D,gFAAqD;AACrD,gFAAqD;AACrD,yFAA8D;AAC9D,yFAA8D;AAC9D,gFAAqD;AACrD,2EAAgD;AAChD,uEAA4C;AAE5C,yBAAyB;AACzB,iDAAqE;AAE5D,yFAFA,mBAAQ,OAEA;AAAE,0FAFA,oBAAS,OAEA;AAAE,4FAFA,sBAAW,OAEA","sourcesContent":["/*\n * ★ 낼 것을 파일마다 적는다 — 묶음의 `index` 를 통째로 내보내지 않는다.\n *\n * 그 파일은 `entities` · `resolvers` · `subscribers` 라는 이름을 갖고 있고 이 파일도 같은 이름을\n * 갖는다. `export *` 로 섞으면 그 이름들이 조용히 가려지거나 빠진다 — 오류는 안 나고 서버가 반쯤\n * 선다(worklist 가 같은 자리에 같은 주석을 달아 두었다).\n */\n\n/* 제품이 선언하는 자리 — 이것이 안 나가면 앱이 「그런 export 가 없다」로 멈춘다 (ADR-0083 결정 2·7). */\nexport * from './station/station-product.js'\nexport * from './station/station-axes.js'\nexport * from './station/deletion-changes.js'\n\n/* 엔티티 */\nexport * from './station/station-screen-spec.js'\nexport * from './station/station-screen-assignment.js'\nexport * from './station/station-screen-release-record.js'\n\n/* 저작·배정·흐름의 판단 — 제품과 시험이 읽는다. */\nexport * from './station/station-assignment-choice.js'\nexport * from './station/station-assignment-service.js'\nexport * from './station/station-flow.js'\nexport * from './station/station-generate.js'\nexport * from './station/station-runtime-binding.js'\nexport * from './station/station-screen-layout.js'\nexport * from './station/station-screen-release-gate.js'\nexport * from './station/station-screen-release-signature.js'\nexport * from './station/station-screen-scorecard.js'\nexport * from './station/station-screen-thumbnail.js'\nexport * from './station/station-screen-control-withdrawal.js'\nexport * from './station/station-screen-publish-subscriber.js'\nexport * from './station/station-argument-sources.js'\nexport * from './station/screen-model-digest.js'\nexport * from './station/staged-material.js'\n\n/* 리졸버는 이름으로 받아 다시 낸다. */\nimport { entities, resolvers, subscribers } from './station/index.js'\n\nexport { entities, resolvers, subscribers }\n"]}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * **A row as it was, written as history rows at the moment it is deleted.**
3
+ *
4
+ * A deletion is reversible only if what it removed stays readable (ADR-0064, condition ③). An approval
5
+ * record carries the row as it was when the request was raised, which is what the approver saw; the row
6
+ * can change between raising and approving. What the callback actually deletes is written here, from the
7
+ * row it read, one history row per content column with its value as `fromValue` and nothing as `toValue`
8
+ * (chief architect, 2026-09-17).
9
+ */
10
+ export declare function deletionChanges(snapshot: Record<string, unknown>): {
11
+ field: string;
12
+ fromValue?: string;
13
+ toValue?: string;
14
+ }[];
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deletionChanges = deletionChanges;
4
+ /**
5
+ * **A row as it was, written as history rows at the moment it is deleted.**
6
+ *
7
+ * A deletion is reversible only if what it removed stays readable (ADR-0064, condition ③). An approval
8
+ * record carries the row as it was when the request was raised, which is what the approver saw; the row
9
+ * can change between raising and approving. What the callback actually deletes is written here, from the
10
+ * row it read, one history row per content column with its value as `fromValue` and nothing as `toValue`
11
+ * (chief architect, 2026-09-17).
12
+ */
13
+ function deletionChanges(snapshot) {
14
+ return Object.entries(snapshot)
15
+ .filter(([, value]) => value !== undefined && value !== null && value !== '')
16
+ .map(([field, value]) => ({ field, fromValue: textOf(value) }));
17
+ }
18
+ function textOf(value) {
19
+ if (value instanceof Date)
20
+ return value.toISOString();
21
+ if (typeof value === 'object')
22
+ return JSON.stringify(value);
23
+ return String(value);
24
+ }
25
+ //# sourceMappingURL=deletion-changes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deletion-changes.js","sourceRoot":"","sources":["../../../server/service/station/deletion-changes.ts"],"names":[],"mappings":";;AASA,0CAIC;AAbD;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAAC,QAAiC;IAC/D,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;SAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;SAC5E,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AACnE,CAAC;AAED,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,KAAK,YAAY,IAAI;QAAE,OAAO,KAAK,CAAC,WAAW,EAAE,CAAA;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IAC3D,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;AACtB,CAAC","sourcesContent":["/**\n * **A row as it was, written as history rows at the moment it is deleted.**\n *\n * A deletion is reversible only if what it removed stays readable (ADR-0064, condition ③). An approval\n * record carries the row as it was when the request was raised, which is what the approver saw; the row\n * can change between raising and approving. What the callback actually deletes is written here, from the\n * row it read, one history row per content column with its value as `fromValue` and nothing as `toValue`\n * (chief architect, 2026-09-17).\n */\nexport function deletionChanges(snapshot: Record<string, unknown>): { field: string; fromValue?: string; toValue?: string }[] {\n return Object.entries(snapshot)\n .filter(([, value]) => value !== undefined && value !== null && value !== '')\n .map(([field, value]) => ({ field, fromValue: textOf(value) }))\n}\n\nfunction textOf(value: unknown): string {\n if (value instanceof Date) return value.toISOString()\n if (typeof value === 'object') return JSON.stringify(value)\n return String(value)\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { StationScreenAssignment } from './station-screen-assignment.js';
2
+ import { StationScreenSpec } from './station-screen-spec.js';
3
+ import { StationScreenRelease } from './station-screen-release-record.js';
4
+ import { StationScreenSpecResolver } from './station-screen-spec-resolver.js';
5
+ import { StationScreenDraftResolver } from './station-screen-draft-resolver.js';
6
+ import { StationScreenListResolver } from './station-screen-list-resolver.js';
7
+ import { StationServiceResolver } from './station-service-resolver.js';
8
+ import { StationAssignmentResolver } from './station-assignment-resolver.js';
9
+ import { StationScreenControlWithdrawalResolver } from './station-screen-control-withdrawal-resolver.js';
10
+ import { StationScreenPublishSubscriber } from './station-screen-publish-subscriber.js';
11
+ export declare const entities: (typeof StationScreenRelease | typeof StationScreenSpec | typeof StationScreenAssignment)[];
12
+ export declare const resolvers: (typeof StationScreenControlWithdrawalResolver | typeof StationScreenSpecResolver | typeof StationAssignmentResolver | typeof StationScreenListResolver | typeof StationScreenDraftResolver | typeof StationServiceResolver)[];
13
+ export declare const subscribers: (typeof StationScreenPublishSubscriber)[];
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.subscribers = exports.resolvers = exports.entities = void 0;
4
+ const station_screen_assignment_js_1 = require("./station-screen-assignment.js");
5
+ const station_screen_spec_js_1 = require("./station-screen-spec.js");
6
+ /* 화면 발행 승인이 남기는 서명. */
7
+ const station_screen_release_record_js_1 = require("./station-screen-release-record.js");
8
+ const station_screen_spec_resolver_js_1 = require("./station-screen-spec-resolver.js");
9
+ const station_screen_draft_resolver_js_1 = require("./station-screen-draft-resolver.js");
10
+ const station_screen_list_resolver_js_1 = require("./station-screen-list-resolver.js");
11
+ const station_service_resolver_js_1 = require("./station-service-resolver.js");
12
+ const station_assignment_resolver_js_1 = require("./station-assignment-resolver.js");
13
+ const station_screen_control_withdrawal_resolver_js_1 = require("./station-screen-control-withdrawal-resolver.js");
14
+ const station_screen_publish_subscriber_js_1 = require("./station-screen-publish-subscriber.js");
15
+ exports.entities = [station_screen_assignment_js_1.StationScreenAssignment, station_screen_spec_js_1.StationScreenSpec, station_screen_release_record_js_1.StationScreenRelease];
16
+ exports.resolvers = [
17
+ station_assignment_resolver_js_1.StationAssignmentResolver,
18
+ station_screen_spec_resolver_js_1.StationScreenSpecResolver,
19
+ station_screen_list_resolver_js_1.StationScreenListResolver,
20
+ station_screen_draft_resolver_js_1.StationScreenDraftResolver,
21
+ station_service_resolver_js_1.StationServiceResolver,
22
+ station_screen_control_withdrawal_resolver_js_1.StationScreenControlWithdrawalResolver
23
+ ];
24
+ exports.subscribers = [station_screen_publish_subscriber_js_1.StationScreenPublishSubscriber];
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/station/index.ts"],"names":[],"mappings":";;;AAAA,iFAAwE;AACxE,qEAA4D;AAC5D,uBAAuB;AACvB,yFAAyE;AAEzE,uFAA6E;AAC7E,yFAA+E;AAC/E,uFAA6E;AAC7E,+EAAsE;AACtE,qFAA4E;AAC5E,mHAAwG;AAExG,iGAAuF;AAE1E,QAAA,QAAQ,GAAG,CAAC,sDAAuB,EAAE,0CAAiB,EAAE,uDAAoB,CAAC,CAAA;AAE7E,QAAA,SAAS,GAAG;IACvB,0DAAyB;IACzB,2DAAyB;IACzB,2DAAyB;IACzB,6DAA0B;IAC1B,oDAAsB;IACtB,sFAAsC;CACvC,CAAA;AAEY,QAAA,WAAW,GAAG,CAAC,qEAA8B,CAAC,CAAA","sourcesContent":["import { StationScreenAssignment } from './station-screen-assignment.js'\nimport { StationScreenSpec } from './station-screen-spec.js'\n/* 화면 발행 승인이 남기는 서명. */\nimport { StationScreenRelease } from './station-screen-release-record.js'\n\nimport { StationScreenSpecResolver } from './station-screen-spec-resolver.js'\nimport { StationScreenDraftResolver } from './station-screen-draft-resolver.js'\nimport { StationScreenListResolver } from './station-screen-list-resolver.js'\nimport { StationServiceResolver } from './station-service-resolver.js'\nimport { StationAssignmentResolver } from './station-assignment-resolver.js'\nimport { StationScreenControlWithdrawalResolver } from './station-screen-control-withdrawal-resolver.js'\n\nimport { StationScreenPublishSubscriber } from './station-screen-publish-subscriber.js'\n\nexport const entities = [StationScreenAssignment, StationScreenSpec, StationScreenRelease]\n\nexport const resolvers = [\n StationAssignmentResolver,\n StationScreenSpecResolver,\n StationScreenListResolver,\n StationScreenDraftResolver,\n StationServiceResolver,\n StationScreenControlWithdrawalResolver\n]\n\nexport const subscribers = [StationScreenPublishSubscriber]\n"]}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Whether an operation's effect can be undone (ADR-0064 decision 1).
3
+ *
4
+ * - `irreversible` the effect happens there and then, and there is no way back.
5
+ * - `compensable` it cannot be undone, but the original record stays and a new record corrects it.
6
+ * - `reversible` a paired operation returns to the same state, and no other record holds the id of a
7
+ * removed row (a row made again has a new id).
8
+ * - `unknown` not yet established. A value of its own, so the classifier never guesses a neighbour.
9
+ *
10
+ * Screens ask a destructive confirmation only for `irreversible`.
11
+ *
12
+ * ── 이 파일의 집은 아직 안 정해졌다 (ADR-0083 걸음 3, 판정 ① 대기) ─────────────
13
+ * 같은 네 값을 operato-plant 의 활동 선언 열 개가 쓰고, `@things-factory/worklist` 는 `reversibility`
14
+ * 를 **결재 키의 역할 이름**으로 이미 갖고 있다(`activity-decision-key-item-type.ts`) — 값 목록만 없다.
15
+ * worklist 로 올리는 것이 정석으로 보이나 공용 모듈이라 수석 아키텍트의 판정을 기다린다. 판정이
16
+ * worklist 로 나면 이 파일은 지워지고 아래 한 줄만 바뀐다:
17
+ *
18
+ * import type { Reversibility } from '@things-factory/worklist'
19
+ */
20
+ export declare const REVERSIBILITIES: readonly ["irreversible", "compensable", "reversible", "unknown"];
21
+ export type Reversibility = (typeof REVERSIBILITIES)[number];
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REVERSIBILITIES = void 0;
4
+ /**
5
+ * Whether an operation's effect can be undone (ADR-0064 decision 1).
6
+ *
7
+ * - `irreversible` the effect happens there and then, and there is no way back.
8
+ * - `compensable` it cannot be undone, but the original record stays and a new record corrects it.
9
+ * - `reversible` a paired operation returns to the same state, and no other record holds the id of a
10
+ * removed row (a row made again has a new id).
11
+ * - `unknown` not yet established. A value of its own, so the classifier never guesses a neighbour.
12
+ *
13
+ * Screens ask a destructive confirmation only for `irreversible`.
14
+ *
15
+ * ── 이 파일의 집은 아직 안 정해졌다 (ADR-0083 걸음 3, 판정 ① 대기) ─────────────
16
+ * 같은 네 값을 operato-plant 의 활동 선언 열 개가 쓰고, `@things-factory/worklist` 는 `reversibility`
17
+ * 를 **결재 키의 역할 이름**으로 이미 갖고 있다(`activity-decision-key-item-type.ts`) — 값 목록만 없다.
18
+ * worklist 로 올리는 것이 정석으로 보이나 공용 모듈이라 수석 아키텍트의 판정을 기다린다. 판정이
19
+ * worklist 로 나면 이 파일은 지워지고 아래 한 줄만 바뀐다:
20
+ *
21
+ * import type { Reversibility } from '@things-factory/worklist'
22
+ */
23
+ exports.REVERSIBILITIES = ['irreversible', 'compensable', 'reversible', 'unknown'];
24
+ //# sourceMappingURL=reversibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reversibility.js","sourceRoot":"","sources":["../../../server/service/station/reversibility.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,eAAe,GAAG,CAAC,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,CAAU,CAAA","sourcesContent":["/**\n * Whether an operation's effect can be undone (ADR-0064 decision 1).\n *\n * - `irreversible` the effect happens there and then, and there is no way back.\n * - `compensable` it cannot be undone, but the original record stays and a new record corrects it.\n * - `reversible` a paired operation returns to the same state, and no other record holds the id of a\n * removed row (a row made again has a new id).\n * - `unknown` not yet established. A value of its own, so the classifier never guesses a neighbour.\n *\n * Screens ask a destructive confirmation only for `irreversible`.\n *\n * ── 이 파일의 집은 아직 안 정해졌다 (ADR-0083 걸음 3, 판정 ① 대기) ─────────────\n * 같은 네 값을 operato-plant 의 활동 선언 열 개가 쓰고, `@things-factory/worklist` 는 `reversibility`\n * 를 **결재 키의 역할 이름**으로 이미 갖고 있다(`activity-decision-key-item-type.ts`) — 값 목록만 없다.\n * worklist 로 올리는 것이 정석으로 보이나 공용 모듈이라 수석 아키텍트의 판정을 기다린다. 판정이\n * worklist 로 나면 이 파일은 지워지고 아래 한 줄만 바뀐다:\n *\n * import type { Reversibility } from '@things-factory/worklist'\n */\nexport const REVERSIBILITIES = ['irreversible', 'compensable', 'reversible', 'unknown'] as const\n\nexport type Reversibility = (typeof REVERSIBILITIES)[number]\n"]}