@almadar/std 16.145.0 → 16.147.0

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 (135) hide show
  1. package/behaviors/lolo/infra/atoms/std-migration-job.lolo +269 -0
  2. package/behaviors/lolo/infra/atoms/std-mod-queue.lolo +1 -1
  3. package/behaviors/lolo/ml/atoms/std-data-collector.lolo +56 -0
  4. package/behaviors/lolo/ml/atoms/std-graph-builder.lolo +90 -0
  5. package/behaviors/lolo/ml/atoms/std-ml-similarity.lolo +25 -13
  6. package/behaviors/lolo/ml/atoms/std-tokenizer.lolo +108 -0
  7. package/behaviors/lolo/ml/atoms/std-weight-validator.lolo +106 -0
  8. package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +14 -0
  9. package/behaviors/lolo/ui/core/atoms/std-billable-hour.lolo +1 -1
  10. package/behaviors/lolo/ui/core/atoms/std-esign-flow.lolo +3 -3
  11. package/behaviors/lolo/ui/core/atoms/std-esign-request.lolo +4 -4
  12. package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +2 -2
  13. package/behaviors/lolo/ui/core/atoms/std-file-store.lolo +1 -1
  14. package/behaviors/lolo/ui/core/atoms/std-gallery.lolo +1 -1
  15. package/behaviors/lolo/ui/core/atoms/std-image-upload-multi.lolo +2 -2
  16. package/behaviors/lolo/ui/core/atoms/std-import.lolo +132 -0
  17. package/behaviors/lolo/ui/core/atoms/std-recurrence.lolo +5 -5
  18. package/behaviors/lolo/ui/core/atoms/std-saved-search.lolo +1 -1
  19. package/behaviors/lolo/ui/core/atoms/std-signature-capture.lolo +1 -1
  20. package/behaviors/lolo/ui/core/atoms/std-stats.lolo +1 -1
  21. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +3 -3
  22. package/behaviors/lolo/ui/core/molecules/ui-data-grid.lolo +0 -2
  23. package/behaviors/lolo/ui/core/molecules/ui-data-list.lolo +0 -2
  24. package/behaviors/lolo/ui/core/molecules/ui-import-preview-tree.lolo +96 -0
  25. package/behaviors/lolo/ui/core/molecules/ui-import-progress.lolo +49 -0
  26. package/behaviors/lolo/ui/core/molecules/ui-import-source-picker.lolo +67 -0
  27. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +0 -2
  28. package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +0 -2
  29. package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +0 -2
  30. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +0 -2
  31. package/behaviors/lolo/ui/core/organisms/ui-timeline.lolo +0 -2
  32. package/behaviors/lolo/ui/game/atoms/std-dungeon-combat.lolo +2 -2
  33. package/behaviors/lolo/ui/game/molecules/std-worldmap-board-2d.lolo +1 -1
  34. package/behaviors/lolo/ui/game/organisms/ui-boardgame-board.lolo +2 -2
  35. package/behaviors/lolo/ui/game/organisms/ui-builder-board.lolo +2 -2
  36. package/behaviors/lolo/ui/game/organisms/ui-debugger-board.lolo +3 -3
  37. package/behaviors/lolo/ui/game/organisms/ui-physics-sandbox-board.lolo +3 -3
  38. package/behaviors/lolo/ui/game/organisms/ui-roguelike-board.lolo +1 -1
  39. package/behaviors/lolo/ui/game/organisms/ui-sequencer-board.lolo +1 -1
  40. package/behaviors/lolo/ui/learning/atoms/std-algo-heapsort.lolo +2 -2
  41. package/behaviors/lolo/ui/learning/atoms/std-algo-mst.lolo +3 -3
  42. package/behaviors/registry/factory-signatures.json +11531 -2142
  43. package/behaviors/registry/infra/atoms/std-migration-job.orb +1310 -0
  44. package/behaviors/registry/infra/atoms/std-mod-queue.orb +5 -5
  45. package/behaviors/registry/ml/atoms/std-data-collector.orb +324 -0
  46. package/behaviors/registry/ml/atoms/std-graph-builder.orb +480 -0
  47. package/behaviors/registry/ml/atoms/std-ml-similarity.orb +127 -72
  48. package/behaviors/registry/ml/atoms/std-tokenizer.orb +570 -0
  49. package/behaviors/registry/ml/atoms/std-weight-validator.orb +624 -0
  50. package/behaviors/registry/ui/core/atoms/std-app-layout.orb +33 -1
  51. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +2 -2
  52. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +17 -21
  53. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +7 -13
  54. package/behaviors/registry/ui/core/atoms/std-event-log.orb +2 -4
  55. package/behaviors/registry/ui/core/atoms/std-file-store.orb +3 -4
  56. package/behaviors/registry/ui/core/atoms/std-gallery.orb +11 -20
  57. package/behaviors/registry/ui/core/atoms/std-image-upload-multi.orb +4 -4
  58. package/behaviors/registry/ui/core/atoms/std-import.orb +701 -0
  59. package/behaviors/registry/ui/core/atoms/std-recurrence.orb +5 -10
  60. package/behaviors/registry/ui/core/atoms/std-saved-search.orb +2 -2
  61. package/behaviors/registry/ui/core/atoms/std-signature-capture.orb +2 -2
  62. package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +12 -25
  63. package/behaviors/registry/ui/core/molecules/ui-data-list.orb +13 -26
  64. package/behaviors/registry/ui/core/molecules/ui-import-preview-tree.orb +354 -0
  65. package/behaviors/registry/ui/core/molecules/ui-import-progress.orb +195 -0
  66. package/behaviors/registry/ui/core/molecules/ui-import-source-picker.orb +279 -0
  67. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +12 -25
  68. package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +0 -13
  69. package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +8 -21
  70. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +0 -13
  71. package/behaviors/registry/ui/core/organisms/ui-timeline.orb +0 -13
  72. package/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +4 -4
  73. package/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +6 -9
  74. package/behaviors/registry/ui/game/organisms/ui-boardgame-board.orb +4 -4
  75. package/behaviors/registry/ui/game/organisms/ui-builder-board.orb +4 -4
  76. package/behaviors/registry/ui/game/organisms/ui-debugger-board.orb +12 -12
  77. package/behaviors/registry/ui/game/organisms/ui-physics-sandbox-board.orb +19 -19
  78. package/behaviors/registry/ui/game/organisms/ui-roguelike-board.orb +1 -1
  79. package/behaviors/registry/ui/game/organisms/ui-sequencer-board.orb +2 -2
  80. package/behaviors/registry/ui/learning/atoms/std-algo-heapsort.orb +8 -8
  81. package/dist/behaviors/behaviors-embeddings.json +568 -496
  82. package/dist/behaviors/behaviors-registry.json +7518 -3936
  83. package/dist/behaviors/exports-reader.js +3093 -2581
  84. package/dist/behaviors/functions/index.d.ts +922 -14
  85. package/dist/behaviors/functions/index.js +3056 -2582
  86. package/dist/behaviors/index.d.ts +1 -1
  87. package/dist/behaviors/index.js +3094 -2582
  88. package/dist/behaviors/knob-embeddings.json +1 -1
  89. package/dist/behaviors/query.js +3093 -2581
  90. package/dist/behaviors/registry/factory-signatures.json +11531 -2142
  91. package/dist/behaviors/registry/infra/atoms/std-migration-job.orb +1310 -0
  92. package/dist/behaviors/registry/infra/atoms/std-mod-queue.orb +5 -5
  93. package/dist/behaviors/registry/ml/atoms/std-data-collector.orb +324 -0
  94. package/dist/behaviors/registry/ml/atoms/std-graph-builder.orb +480 -0
  95. package/dist/behaviors/registry/ml/atoms/std-ml-similarity.orb +127 -72
  96. package/dist/behaviors/registry/ml/atoms/std-tokenizer.orb +570 -0
  97. package/dist/behaviors/registry/ml/atoms/std-weight-validator.orb +624 -0
  98. package/dist/behaviors/registry/ui/core/atoms/std-app-layout.orb +33 -1
  99. package/dist/behaviors/registry/ui/core/atoms/std-billable-hour.orb +2 -2
  100. package/dist/behaviors/registry/ui/core/atoms/std-esign-flow.orb +17 -21
  101. package/dist/behaviors/registry/ui/core/atoms/std-esign-request.orb +7 -13
  102. package/dist/behaviors/registry/ui/core/atoms/std-event-log.orb +2 -4
  103. package/dist/behaviors/registry/ui/core/atoms/std-file-store.orb +3 -4
  104. package/dist/behaviors/registry/ui/core/atoms/std-gallery.orb +11 -20
  105. package/dist/behaviors/registry/ui/core/atoms/std-image-upload-multi.orb +4 -4
  106. package/dist/behaviors/registry/ui/core/atoms/std-import.orb +701 -0
  107. package/dist/behaviors/registry/ui/core/atoms/std-recurrence.orb +5 -10
  108. package/dist/behaviors/registry/ui/core/atoms/std-saved-search.orb +2 -2
  109. package/dist/behaviors/registry/ui/core/atoms/std-signature-capture.orb +2 -2
  110. package/dist/behaviors/registry/ui/core/molecules/ui-data-grid.orb +12 -25
  111. package/dist/behaviors/registry/ui/core/molecules/ui-data-list.orb +13 -26
  112. package/dist/behaviors/registry/ui/core/molecules/ui-import-preview-tree.orb +354 -0
  113. package/dist/behaviors/registry/ui/core/molecules/ui-import-progress.orb +195 -0
  114. package/dist/behaviors/registry/ui/core/molecules/ui-import-source-picker.orb +279 -0
  115. package/dist/behaviors/registry/ui/core/molecules/ui-table-view.orb +12 -25
  116. package/dist/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +0 -13
  117. package/dist/behaviors/registry/ui/core/organisms/ui-entity-list.orb +8 -21
  118. package/dist/behaviors/registry/ui/core/organisms/ui-entity-table.orb +0 -13
  119. package/dist/behaviors/registry/ui/core/organisms/ui-timeline.orb +0 -13
  120. package/dist/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +4 -4
  121. package/dist/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +6 -9
  122. package/dist/behaviors/registry/ui/game/organisms/ui-boardgame-board.orb +4 -4
  123. package/dist/behaviors/registry/ui/game/organisms/ui-builder-board.orb +4 -4
  124. package/dist/behaviors/registry/ui/game/organisms/ui-debugger-board.orb +12 -12
  125. package/dist/behaviors/registry/ui/game/organisms/ui-physics-sandbox-board.orb +19 -19
  126. package/dist/behaviors/registry/ui/game/organisms/ui-roguelike-board.orb +1 -1
  127. package/dist/behaviors/registry/ui/game/organisms/ui-sequencer-board.orb +2 -2
  128. package/dist/behaviors/registry/ui/learning/atoms/std-algo-heapsort.orb +8 -8
  129. package/dist/behaviors-embeddings.json +568 -496
  130. package/dist/behaviors-registry.json +7518 -3936
  131. package/dist/index.d.ts +1 -1
  132. package/dist/index.js +3094 -2582
  133. package/dist/knob-embeddings.json +1 -1
  134. package/dist/registry/factory-signatures.json +11531 -2142
  135. package/package.json +2 -2
@@ -0,0 +1,1310 @@
1
+ {
2
+ "description": "std-migration-job — one import run of external data into the host system, modeled as a persistent MigrationJob row with a lifecycle state machine: idle → fetching → mapping → reviewing → committing → done | failed. All source access goes through the migration service (call-service \"migration\" listDocuments / fetchDocument / commit) — the atom never talks to a source directly, and the host-injected service handler resolves credentials from the connectionRef knob (a reference, never the secret). Staging/mapping is host work (deterministic pipeline or agent): the atom fetches, the host stages and emits MIGRATION_STAGED, the user approves (MIGRATION_APPROVED) and only then does commit run. Terminal runs persist the job row for provenance. Rebind the entity to a host-owned job entity via linkedEntity; target and connectionRef are config knobs.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01KYEH1JHZB917648MRS0X5P3H": {
6
+ "bakedName": "MigrationJob",
7
+ "curName": "MigrationJob",
8
+ "id": "ent_01KYEH1JHZB917648MRS0X5P3H",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01KYEH1JHZ108ZC0A25A791JJG": {
14
+ "bakedName": "MIGRATION_FETCHED",
15
+ "curName": "MIGRATION_FETCHED",
16
+ "id": "evt_01KYEH1JHZ108ZC0A25A791JJG",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
20
+ "renames": []
21
+ },
22
+ "evt_01KYEH1JHZ46HRGQWBVH62VTWB": {
23
+ "bakedName": "MIGRATION_CALL_FAILED",
24
+ "curName": "MIGRATION_CALL_FAILED",
25
+ "id": "evt_01KYEH1JHZ46HRGQWBVH62VTWB",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
29
+ "renames": []
30
+ },
31
+ "evt_01KYEH1JHZ4P70WNXP5KD40DQD": {
32
+ "bakedName": "MIGRATION_RETRY",
33
+ "curName": "MIGRATION_RETRY",
34
+ "id": "evt_01KYEH1JHZ4P70WNXP5KD40DQD",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
38
+ "renames": []
39
+ },
40
+ "evt_01KYEH1JHZ67GY1VYWWG8FJN5M": {
41
+ "bakedName": "MIGRATION_REJECTED",
42
+ "curName": "MIGRATION_REJECTED",
43
+ "id": "evt_01KYEH1JHZ67GY1VYWWG8FJN5M",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
47
+ "renames": []
48
+ },
49
+ "evt_01KYEH1JHZ6TVR2PR9DCX7M0JW": {
50
+ "bakedName": "RESET",
51
+ "curName": "RESET",
52
+ "id": "evt_01KYEH1JHZ6TVR2PR9DCX7M0JW",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
56
+ "renames": []
57
+ },
58
+ "evt_01KYEH1JHZANEQQJWVAQWKE7T8": {
59
+ "bakedName": "MIGRATION_APPROVED",
60
+ "curName": "MIGRATION_APPROVED",
61
+ "id": "evt_01KYEH1JHZANEQQJWVAQWKE7T8",
62
+ "kind": "event",
63
+ "owner": "workspace",
64
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
65
+ "renames": []
66
+ },
67
+ "evt_01KYEH1JHZCM65W3K5JPH22W1Y": {
68
+ "bakedName": "FETCH_DOCUMENT",
69
+ "curName": "FETCH_DOCUMENT",
70
+ "id": "evt_01KYEH1JHZCM65W3K5JPH22W1Y",
71
+ "kind": "event",
72
+ "owner": "workspace",
73
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
74
+ "renames": []
75
+ },
76
+ "evt_01KYEH1JHZE908KJFCWPSJ231V": {
77
+ "bakedName": "DOCUMENTS_LISTED",
78
+ "curName": "DOCUMENTS_LISTED",
79
+ "id": "evt_01KYEH1JHZE908KJFCWPSJ231V",
80
+ "kind": "event",
81
+ "owner": "workspace",
82
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
83
+ "renames": []
84
+ },
85
+ "evt_01KYEH1JHZFMZPRSAAAW5SNS5H": {
86
+ "bakedName": "MIGRATION_FAILED",
87
+ "curName": "MIGRATION_FAILED",
88
+ "id": "evt_01KYEH1JHZFMZPRSAAAW5SNS5H",
89
+ "kind": "event",
90
+ "owner": "workspace",
91
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
92
+ "renames": []
93
+ },
94
+ "evt_01KYEH1JHZKCD8JKV9CAHZG2JC": {
95
+ "bakedName": "MIGRATION_COMPLETED",
96
+ "curName": "MIGRATION_COMPLETED",
97
+ "id": "evt_01KYEH1JHZKCD8JKV9CAHZG2JC",
98
+ "kind": "event",
99
+ "owner": "workspace",
100
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
101
+ "renames": []
102
+ },
103
+ "evt_01KYEH1JHZMFZQV6JQ7BF49TGJ": {
104
+ "bakedName": "COMMITTED",
105
+ "curName": "COMMITTED",
106
+ "id": "evt_01KYEH1JHZMFZQV6JQ7BF49TGJ",
107
+ "kind": "event",
108
+ "owner": "workspace",
109
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
110
+ "renames": []
111
+ },
112
+ "evt_01KYEH1JHZQQGPZ8285ZJA0W2Z": {
113
+ "bakedName": "MIGRATION_REVIEW_READY",
114
+ "curName": "MIGRATION_REVIEW_READY",
115
+ "id": "evt_01KYEH1JHZQQGPZ8285ZJA0W2Z",
116
+ "kind": "event",
117
+ "owner": "workspace",
118
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
119
+ "renames": []
120
+ },
121
+ "evt_01KYEH1JHZS686HZ1PSX9E41SN": {
122
+ "bakedName": "INIT",
123
+ "curName": "INIT",
124
+ "id": "evt_01KYEH1JHZS686HZ1PSX9E41SN",
125
+ "kind": "event",
126
+ "owner": "workspace",
127
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
128
+ "renames": []
129
+ },
130
+ "evt_01KYEH1JHZTCZZE53EY6264JTY": {
131
+ "bakedName": "MIGRATION_STAGED",
132
+ "curName": "MIGRATION_STAGED",
133
+ "id": "evt_01KYEH1JHZTCZZE53EY6264JTY",
134
+ "kind": "event",
135
+ "owner": "workspace",
136
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
137
+ "renames": []
138
+ },
139
+ "evt_01KYEH1JHZVA84NGHKV4DNKKZ8": {
140
+ "bakedName": "MIGRATION_START",
141
+ "curName": "MIGRATION_START",
142
+ "id": "evt_01KYEH1JHZVA84NGHKV4DNKKZ8",
143
+ "kind": "event",
144
+ "owner": "workspace",
145
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
146
+ "renames": []
147
+ },
148
+ "evt_01KYEH1JHZXK69X09ZRB3JFTX8": {
149
+ "bakedName": "MIGRATION_DISCARDED",
150
+ "curName": "MIGRATION_DISCARDED",
151
+ "id": "evt_01KYEH1JHZXK69X09ZRB3JFTX8",
152
+ "kind": "event",
153
+ "owner": "workspace",
154
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
155
+ "renames": []
156
+ },
157
+ "evt_01KYEH1JHZYBNE7SNEH4YSB3AJ": {
158
+ "bakedName": "MIGRATION_DOCUMENT",
159
+ "curName": "MIGRATION_DOCUMENT",
160
+ "id": "evt_01KYEH1JHZYBNE7SNEH4YSB3AJ",
161
+ "kind": "event",
162
+ "owner": "workspace",
163
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
164
+ "renames": []
165
+ },
166
+ "evt_01KYEH1JHZYH9ESEMWYAGG5V20": {
167
+ "bakedName": "DOCUMENT_FETCHED",
168
+ "curName": "DOCUMENT_FETCHED",
169
+ "id": "evt_01KYEH1JHZYH9ESEMWYAGG5V20",
170
+ "kind": "event",
171
+ "owner": "workspace",
172
+ "parent": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
173
+ "renames": []
174
+ },
175
+ "orb_01KYEH1JHZPWD4MVJ22QXP4X62": {
176
+ "bakedName": "MigrationJobOrbital",
177
+ "curName": "MigrationJobOrbital",
178
+ "id": "orb_01KYEH1JHZPWD4MVJ22QXP4X62",
179
+ "kind": "orbital",
180
+ "owner": "workspace",
181
+ "renames": []
182
+ },
183
+ "pag_01KYEH1JJ0N7EVAQGKJJQBT08X": {
184
+ "bakedName": "MigrationJobPage",
185
+ "curName": "MigrationJobPage",
186
+ "id": "pag_01KYEH1JJ0N7EVAQGKJJQBT08X",
187
+ "kind": "page",
188
+ "owner": "workspace",
189
+ "renames": []
190
+ },
191
+ "trt_01KYEH1JHZFRWA4GSJPS78WGXK": {
192
+ "bakedName": "MigrationJobLifecycle",
193
+ "curName": "MigrationJobLifecycle",
194
+ "id": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
195
+ "kind": "trait",
196
+ "owner": "workspace",
197
+ "renames": []
198
+ }
199
+ },
200
+ "schemaVersion": 1
201
+ },
202
+ "name": "std-migration-job",
203
+ "orbitals": [
204
+ {
205
+ "entity": {
206
+ "collection": "migration_jobs",
207
+ "fields": [
208
+ {
209
+ "name": "id",
210
+ "required": true,
211
+ "type": "string"
212
+ },
213
+ {
214
+ "default": {},
215
+ "description": "ImportSource descriptor of the run (kind + options), supplied by the host.",
216
+ "name": "source",
217
+ "type": "object"
218
+ },
219
+ {
220
+ "default": [],
221
+ "description": "Client-side file metadata for upload sources (name/size/type/lastModified).",
222
+ "items": {
223
+ "type": "object"
224
+ },
225
+ "name": "files",
226
+ "type": "array"
227
+ },
228
+ {
229
+ "default": "",
230
+ "description": "Name of the host entity this import writes into.",
231
+ "name": "target",
232
+ "type": "string"
233
+ },
234
+ {
235
+ "default": "idle",
236
+ "description": "Lifecycle position of the run.",
237
+ "name": "status",
238
+ "type": "string",
239
+ "values": [
240
+ "idle",
241
+ "fetching",
242
+ "mapping",
243
+ "reviewing",
244
+ "committing",
245
+ "done",
246
+ "failed"
247
+ ]
248
+ },
249
+ {
250
+ "default": [],
251
+ "description": "Document metadata listed from the source.",
252
+ "items": {
253
+ "type": "object"
254
+ },
255
+ "name": "documents",
256
+ "type": "array"
257
+ },
258
+ {
259
+ "default": {},
260
+ "description": "Most recently fetched document content.",
261
+ "name": "document",
262
+ "type": "object"
263
+ },
264
+ {
265
+ "default": {},
266
+ "description": "Staged/committed/failed/skipped counts.",
267
+ "name": "stats",
268
+ "type": "object"
269
+ },
270
+ {
271
+ "default": "",
272
+ "description": "Failure detail when status is failed.",
273
+ "name": "error",
274
+ "type": "string"
275
+ },
276
+ {
277
+ "default": 0.0,
278
+ "description": "Run start timestamp.",
279
+ "name": "createdAt",
280
+ "type": "number"
281
+ }
282
+ ],
283
+ "id": "ent_01KYEH1JHZB917648MRS0X5P3H",
284
+ "name": "MigrationJob",
285
+ "persistence": "persistent"
286
+ },
287
+ "id": "orb_01KYEH1JHZPWD4MVJ22QXP4X62",
288
+ "name": "MigrationJobOrbital",
289
+ "pages": [
290
+ {
291
+ "id": "pag_01KYEH1JJ0N7EVAQGKJJQBT08X",
292
+ "name": "MigrationJobPage",
293
+ "path": "/migration-job",
294
+ "traits": [
295
+ {
296
+ "ref": "MigrationJobLifecycle",
297
+ "refId": "trt_01KYEH1JHZFRWA4GSJPS78WGXK"
298
+ }
299
+ ]
300
+ }
301
+ ],
302
+ "traits": [
303
+ {
304
+ "category": "lifecycle",
305
+ "config": {
306
+ "connectionRef": {
307
+ "default": "",
308
+ "description": "Secret-store / environment KEY holding the source credentials. The reference is stored; the secret itself never enters config, traces, or snapshots — the migration service resolves it at run time. (Typed `string` until the `secret` config-field type lands in the lolo language — tracked gap.)",
309
+ "label": "Connection reference",
310
+ "synonyms": "credential key, connection string reference, secret name",
311
+ "tier": "internal",
312
+ "type": "string"
313
+ },
314
+ "target": {
315
+ "default": "",
316
+ "description": "Name of the host entity this import writes into (e.g. the organism's own entity). The migration service derives the full target descriptor from the running app's schema.",
317
+ "label": "Target entity",
318
+ "synonyms": "destination, import into, target type",
319
+ "tier": "domain",
320
+ "type": "string"
321
+ }
322
+ },
323
+ "emits": [
324
+ {
325
+ "description": "migration.listDocuments service result, flattened onto the payload by the call-service effect executor",
326
+ "event": "DOCUMENTS_LISTED",
327
+ "eventId": "evt_01KYEH1JHZE908KJFCWPSJ231V",
328
+ "payloadSchema": [
329
+ {
330
+ "name": "documents",
331
+ "required": true,
332
+ "type": "[object]"
333
+ }
334
+ ],
335
+ "tier": "secondary"
336
+ },
337
+ {
338
+ "description": "migration.fetchDocument service result, flattened onto the payload by the call-service effect executor",
339
+ "event": "DOCUMENT_FETCHED",
340
+ "eventId": "evt_01KYEH1JHZYH9ESEMWYAGG5V20",
341
+ "payloadSchema": [
342
+ {
343
+ "name": "document",
344
+ "required": true,
345
+ "type": "object"
346
+ }
347
+ ],
348
+ "tier": "secondary"
349
+ },
350
+ {
351
+ "description": "migration.commit service result — committed count plus per-unit failures",
352
+ "event": "COMMITTED",
353
+ "eventId": "evt_01KYEH1JHZMFZQV6JQ7BF49TGJ",
354
+ "payloadSchema": [
355
+ {
356
+ "name": "committed",
357
+ "required": true,
358
+ "type": "number"
359
+ },
360
+ {
361
+ "name": "failed",
362
+ "required": true,
363
+ "type": "[object]"
364
+ }
365
+ ],
366
+ "tier": "secondary"
367
+ },
368
+ {
369
+ "description": "migration service call failure signal — lands the run in failed, never a silent swallow",
370
+ "event": "MIGRATION_CALL_FAILED",
371
+ "eventId": "evt_01KYEH1JHZ46HRGQWBVH62VTWB",
372
+ "payloadSchema": [
373
+ {
374
+ "name": "error",
375
+ "required": true,
376
+ "type": "string"
377
+ }
378
+ ],
379
+ "tier": "secondary"
380
+ },
381
+ {
382
+ "description": "Source documents are listed and the run is ready for staging (deterministic pipeline or agent)",
383
+ "event": "MIGRATION_FETCHED",
384
+ "eventId": "evt_01KYEH1JHZ108ZC0A25A791JJG",
385
+ "payloadSchema": [
386
+ {
387
+ "name": "documents",
388
+ "required": true,
389
+ "type": "[object]"
390
+ }
391
+ ],
392
+ "scope": "external",
393
+ "synonyms": "import fetched, source listed, documents ready",
394
+ "tier": "domain"
395
+ },
396
+ {
397
+ "description": "A single fetched document's content, for the host staging layer to map into target units",
398
+ "event": "MIGRATION_DOCUMENT",
399
+ "eventId": "evt_01KYEH1JHZYBNE7SNEH4YSB3AJ",
400
+ "payloadSchema": [
401
+ {
402
+ "name": "document",
403
+ "required": true,
404
+ "type": "object"
405
+ }
406
+ ],
407
+ "scope": "external",
408
+ "synonyms": "document loaded, content fetched",
409
+ "tier": "domain"
410
+ },
411
+ {
412
+ "description": "Staging is complete; the preview is ready for the approval gate",
413
+ "event": "MIGRATION_REVIEW_READY",
414
+ "eventId": "evt_01KYEH1JHZQQGPZ8285ZJA0W2Z",
415
+ "payloadSchema": [
416
+ {
417
+ "name": "stats",
418
+ "required": true,
419
+ "type": "object"
420
+ }
421
+ ],
422
+ "scope": "external",
423
+ "synonyms": "preview ready, staging complete, review import",
424
+ "tier": "domain"
425
+ },
426
+ {
427
+ "description": "The commit drained through the host sink; stats carry committed and per-unit failed counts",
428
+ "event": "MIGRATION_COMPLETED",
429
+ "eventId": "evt_01KYEH1JHZKCD8JKV9CAHZG2JC",
430
+ "payloadSchema": [
431
+ {
432
+ "name": "stats",
433
+ "required": true,
434
+ "type": "object"
435
+ }
436
+ ],
437
+ "scope": "external",
438
+ "synonyms": "import done, migration complete, data imported",
439
+ "tier": "domain"
440
+ },
441
+ {
442
+ "description": "The run failed; error carries the service-reported detail and the terminal job row was persisted",
443
+ "event": "MIGRATION_FAILED",
444
+ "eventId": "evt_01KYEH1JHZFMZPRSAAAW5SNS5H",
445
+ "payloadSchema": [
446
+ {
447
+ "name": "error",
448
+ "required": true,
449
+ "type": "string"
450
+ }
451
+ ],
452
+ "scope": "external",
453
+ "synonyms": "import failed, migration error",
454
+ "tier": "domain"
455
+ }
456
+ ],
457
+ "entityContract": {
458
+ "provides": [
459
+ "document",
460
+ "documents",
461
+ "error",
462
+ "files",
463
+ "source",
464
+ "stats",
465
+ "status",
466
+ "target"
467
+ ],
468
+ "requires": []
469
+ },
470
+ "entityRebindable": true,
471
+ "entityRefIds": {
472
+ "MigrationJob": "ent_01KYEH1JHZB917648MRS0X5P3H"
473
+ },
474
+ "id": "trt_01KYEH1JHZFRWA4GSJPS78WGXK",
475
+ "linkedEntity": "MigrationJob",
476
+ "linkedEntityId": "ent_01KYEH1JHZB917648MRS0X5P3H",
477
+ "name": "MigrationJobLifecycle",
478
+ "scope": "instance",
479
+ "stateMachine": {
480
+ "events": [
481
+ {
482
+ "id": "evt_01KYEH1JHZS686HZ1PSX9E41SN",
483
+ "key": "INIT",
484
+ "name": "Initialize"
485
+ },
486
+ {
487
+ "description": "Starts an import run. source is the ImportSource descriptor; files carries client file metadata for upload sources. Also reached via a sibling std-import's IMPORT_REQUESTED.",
488
+ "id": "evt_01KYEH1JHZVA84NGHKV4DNKKZ8",
489
+ "key": "MIGRATION_START",
490
+ "name": "Migration Start",
491
+ "payloadSchema": [
492
+ {
493
+ "name": "source",
494
+ "required": true,
495
+ "type": "object"
496
+ },
497
+ {
498
+ "name": "files",
499
+ "type": "[object]"
500
+ }
501
+ ],
502
+ "synonyms": "start import, run migration, import data",
503
+ "tier": "domain"
504
+ },
505
+ {
506
+ "description": "migration.listDocuments service result, flattened onto the payload by the call-service effect executor",
507
+ "id": "evt_01KYEH1JHZE908KJFCWPSJ231V",
508
+ "key": "DOCUMENTS_LISTED",
509
+ "name": "Documents Listed",
510
+ "payloadSchema": [
511
+ {
512
+ "name": "documents",
513
+ "required": true,
514
+ "type": "[object]"
515
+ }
516
+ ],
517
+ "tier": "secondary"
518
+ },
519
+ {
520
+ "description": "Source documents are listed and the run is ready for staging (deterministic pipeline or agent)",
521
+ "id": "evt_01KYEH1JHZ108ZC0A25A791JJG",
522
+ "key": "MIGRATION_FETCHED",
523
+ "name": "Migration Fetched",
524
+ "payloadSchema": [
525
+ {
526
+ "name": "documents",
527
+ "required": true,
528
+ "type": "[object]"
529
+ }
530
+ ],
531
+ "synonyms": "import fetched, source listed, documents ready",
532
+ "tier": "domain"
533
+ },
534
+ {
535
+ "description": "A single fetched document's content, for the host staging layer to map into target units",
536
+ "id": "evt_01KYEH1JHZYBNE7SNEH4YSB3AJ",
537
+ "key": "MIGRATION_DOCUMENT",
538
+ "name": "Migration Document",
539
+ "payloadSchema": [
540
+ {
541
+ "name": "document",
542
+ "required": true,
543
+ "type": "object"
544
+ }
545
+ ],
546
+ "synonyms": "document loaded, content fetched",
547
+ "tier": "domain"
548
+ },
549
+ {
550
+ "description": "migration service call failure signal — lands the run in failed, never a silent swallow",
551
+ "id": "evt_01KYEH1JHZ46HRGQWBVH62VTWB",
552
+ "key": "MIGRATION_CALL_FAILED",
553
+ "name": "Migration Call Failed",
554
+ "payloadSchema": [
555
+ {
556
+ "name": "error",
557
+ "required": true,
558
+ "type": "string"
559
+ }
560
+ ],
561
+ "tier": "secondary"
562
+ },
563
+ {
564
+ "description": "Fetch one document's full content from the source during staging",
565
+ "id": "evt_01KYEH1JHZCM65W3K5JPH22W1Y",
566
+ "key": "FETCH_DOCUMENT",
567
+ "name": "Fetch Document",
568
+ "payloadSchema": [
569
+ {
570
+ "name": "documentId",
571
+ "required": true,
572
+ "type": "string"
573
+ }
574
+ ],
575
+ "tier": "internal"
576
+ },
577
+ {
578
+ "description": "migration.fetchDocument service result, flattened onto the payload by the call-service effect executor",
579
+ "id": "evt_01KYEH1JHZYH9ESEMWYAGG5V20",
580
+ "key": "DOCUMENT_FETCHED",
581
+ "name": "Document Fetched",
582
+ "payloadSchema": [
583
+ {
584
+ "name": "document",
585
+ "required": true,
586
+ "type": "object"
587
+ }
588
+ ],
589
+ "tier": "secondary"
590
+ },
591
+ {
592
+ "description": "Host staging finished — units are staged and validated; stats summarize staged/skipped counts for the preview",
593
+ "id": "evt_01KYEH1JHZTCZZE53EY6264JTY",
594
+ "key": "MIGRATION_STAGED",
595
+ "name": "Migration Staged",
596
+ "payloadSchema": [
597
+ {
598
+ "name": "stats",
599
+ "required": true,
600
+ "type": "object"
601
+ }
602
+ ],
603
+ "tier": "internal"
604
+ },
605
+ {
606
+ "description": "The run was discarded before commit",
607
+ "id": "evt_01KYEH1JHZXK69X09ZRB3JFTX8",
608
+ "key": "MIGRATION_DISCARDED",
609
+ "name": "Migration Discarded",
610
+ "tier": "internal"
611
+ },
612
+ {
613
+ "description": "The user approved the preview; units are the staged ImportUnits to commit through the host sink",
614
+ "id": "evt_01KYEH1JHZANEQQJWVAQWKE7T8",
615
+ "key": "MIGRATION_APPROVED",
616
+ "name": "Migration Approved",
617
+ "payloadSchema": [
618
+ {
619
+ "name": "units",
620
+ "required": true,
621
+ "type": "[object]"
622
+ }
623
+ ],
624
+ "synonyms": "approve import, confirm migration",
625
+ "tier": "domain"
626
+ },
627
+ {
628
+ "description": "The user sent the preview back for more staging",
629
+ "id": "evt_01KYEH1JHZ67GY1VYWWG8FJN5M",
630
+ "key": "MIGRATION_REJECTED",
631
+ "name": "Migration Rejected",
632
+ "tier": "internal"
633
+ },
634
+ {
635
+ "description": "Staging is complete; the preview is ready for the approval gate",
636
+ "id": "evt_01KYEH1JHZQQGPZ8285ZJA0W2Z",
637
+ "key": "MIGRATION_REVIEW_READY",
638
+ "name": "Migration Review Ready",
639
+ "payloadSchema": [
640
+ {
641
+ "name": "stats",
642
+ "required": true,
643
+ "type": "object"
644
+ }
645
+ ],
646
+ "synonyms": "preview ready, staging complete, review import",
647
+ "tier": "domain"
648
+ },
649
+ {
650
+ "description": "migration.commit service result — committed count plus per-unit failures",
651
+ "id": "evt_01KYEH1JHZMFZQV6JQ7BF49TGJ",
652
+ "key": "COMMITTED",
653
+ "name": "Committed",
654
+ "payloadSchema": [
655
+ {
656
+ "name": "committed",
657
+ "required": true,
658
+ "type": "number"
659
+ },
660
+ {
661
+ "name": "failed",
662
+ "required": true,
663
+ "type": "[object]"
664
+ }
665
+ ],
666
+ "tier": "secondary"
667
+ },
668
+ {
669
+ "description": "Returns the job to idle from a terminal state",
670
+ "id": "evt_01KYEH1JHZ6TVR2PR9DCX7M0JW",
671
+ "key": "RESET",
672
+ "name": "Reset",
673
+ "tier": "internal"
674
+ },
675
+ {
676
+ "description": "The commit drained through the host sink; stats carry committed and per-unit failed counts",
677
+ "id": "evt_01KYEH1JHZKCD8JKV9CAHZG2JC",
678
+ "key": "MIGRATION_COMPLETED",
679
+ "name": "Migration Completed",
680
+ "payloadSchema": [
681
+ {
682
+ "name": "stats",
683
+ "required": true,
684
+ "type": "object"
685
+ }
686
+ ],
687
+ "synonyms": "import done, migration complete, data imported",
688
+ "tier": "domain"
689
+ },
690
+ {
691
+ "description": "Re-runs the fetch after a failure, with the same source",
692
+ "id": "evt_01KYEH1JHZ4P70WNXP5KD40DQD",
693
+ "key": "MIGRATION_RETRY",
694
+ "name": "Migration Retry",
695
+ "tier": "internal"
696
+ },
697
+ {
698
+ "description": "The run failed; error carries the service-reported detail and the terminal job row was persisted",
699
+ "id": "evt_01KYEH1JHZFMZPRSAAAW5SNS5H",
700
+ "key": "MIGRATION_FAILED",
701
+ "name": "Migration Failed",
702
+ "payloadSchema": [
703
+ {
704
+ "name": "error",
705
+ "required": true,
706
+ "type": "string"
707
+ }
708
+ ],
709
+ "synonyms": "import failed, migration error",
710
+ "tier": "domain"
711
+ }
712
+ ],
713
+ "states": [
714
+ {
715
+ "isInitial": true,
716
+ "name": "idle"
717
+ },
718
+ {
719
+ "name": "fetching"
720
+ },
721
+ {
722
+ "name": "mapping"
723
+ },
724
+ {
725
+ "name": "reviewing"
726
+ },
727
+ {
728
+ "name": "committing"
729
+ },
730
+ {
731
+ "name": "done"
732
+ },
733
+ {
734
+ "name": "failed"
735
+ }
736
+ ],
737
+ "transitions": [
738
+ {
739
+ "effects": [
740
+ [
741
+ "set",
742
+ "@entity.status",
743
+ "idle"
744
+ ],
745
+ [
746
+ "set",
747
+ "@entity.error",
748
+ ""
749
+ ],
750
+ [
751
+ "set",
752
+ "@entity.documents",
753
+ []
754
+ ],
755
+ [
756
+ "set",
757
+ "@entity.document",
758
+ {}
759
+ ],
760
+ [
761
+ "set",
762
+ "@entity.stats",
763
+ {}
764
+ ]
765
+ ],
766
+ "event": "INIT",
767
+ "eventId": "evt_01KYEH1JHZS686HZ1PSX9E41SN",
768
+ "from": "idle",
769
+ "to": "idle"
770
+ },
771
+ {
772
+ "effects": [
773
+ [
774
+ "set",
775
+ "@entity.source",
776
+ "@payload.source"
777
+ ],
778
+ [
779
+ "set",
780
+ "@entity.files",
781
+ "@payload.files"
782
+ ],
783
+ [
784
+ "set",
785
+ "@entity.target",
786
+ "@config.target"
787
+ ],
788
+ [
789
+ "set",
790
+ "@entity.status",
791
+ "fetching"
792
+ ],
793
+ [
794
+ "set",
795
+ "@entity.createdAt",
796
+ [
797
+ "time/now"
798
+ ]
799
+ ],
800
+ [
801
+ "call-service",
802
+ "migration",
803
+ "listDocuments",
804
+ {
805
+ "connectionRef": "@config.connectionRef",
806
+ "files": "@entity.files",
807
+ "source": "@entity.source"
808
+ },
809
+ {
810
+ "emit": {
811
+ "failure": "MIGRATION_CALL_FAILED",
812
+ "success": "DOCUMENTS_LISTED"
813
+ }
814
+ }
815
+ ]
816
+ ],
817
+ "event": "MIGRATION_START",
818
+ "eventId": "evt_01KYEH1JHZVA84NGHKV4DNKKZ8",
819
+ "from": "idle",
820
+ "to": "fetching"
821
+ },
822
+ {
823
+ "effects": [
824
+ [
825
+ "set",
826
+ "@entity.documents",
827
+ "@payload.documents"
828
+ ],
829
+ [
830
+ "set",
831
+ "@entity.status",
832
+ "mapping"
833
+ ],
834
+ [
835
+ "emit",
836
+ "MIGRATION_FETCHED",
837
+ {
838
+ "documents": "@entity.documents"
839
+ }
840
+ ]
841
+ ],
842
+ "event": "DOCUMENTS_LISTED",
843
+ "eventId": "evt_01KYEH1JHZE908KJFCWPSJ231V",
844
+ "from": "fetching",
845
+ "to": "mapping"
846
+ },
847
+ {
848
+ "event": "MIGRATION_FETCHED",
849
+ "eventId": "evt_01KYEH1JHZ108ZC0A25A791JJG",
850
+ "from": "fetching",
851
+ "to": "mapping"
852
+ },
853
+ {
854
+ "event": "MIGRATION_DOCUMENT",
855
+ "eventId": "evt_01KYEH1JHZYBNE7SNEH4YSB3AJ",
856
+ "from": "fetching",
857
+ "to": "mapping"
858
+ },
859
+ {
860
+ "effects": [
861
+ [
862
+ "set",
863
+ "@entity.error",
864
+ "@payload.error"
865
+ ],
866
+ [
867
+ "set",
868
+ "@entity.status",
869
+ "failed"
870
+ ],
871
+ [
872
+ "persist",
873
+ "create",
874
+ "MigrationJob",
875
+ {
876
+ "createdAt": "@entity.createdAt",
877
+ "error": "@entity.error",
878
+ "source": "@entity.source",
879
+ "stats": "@entity.stats",
880
+ "status": "@entity.status",
881
+ "target": "@entity.target"
882
+ }
883
+ ],
884
+ [
885
+ "emit",
886
+ "MIGRATION_FAILED",
887
+ {
888
+ "error": "@entity.error"
889
+ }
890
+ ]
891
+ ],
892
+ "event": "MIGRATION_CALL_FAILED",
893
+ "eventId": "evt_01KYEH1JHZ46HRGQWBVH62VTWB",
894
+ "from": "fetching",
895
+ "to": "failed"
896
+ },
897
+ {
898
+ "effects": [
899
+ [
900
+ "call-service",
901
+ "migration",
902
+ "fetchDocument",
903
+ {
904
+ "connectionRef": "@config.connectionRef",
905
+ "documentId": "@payload.documentId",
906
+ "source": "@entity.source"
907
+ },
908
+ {
909
+ "emit": {
910
+ "failure": "MIGRATION_CALL_FAILED",
911
+ "success": "DOCUMENT_FETCHED"
912
+ }
913
+ }
914
+ ]
915
+ ],
916
+ "event": "FETCH_DOCUMENT",
917
+ "eventId": "evt_01KYEH1JHZCM65W3K5JPH22W1Y",
918
+ "from": "mapping",
919
+ "to": "mapping"
920
+ },
921
+ {
922
+ "effects": [
923
+ [
924
+ "set",
925
+ "@entity.document",
926
+ "@payload.document"
927
+ ],
928
+ [
929
+ "emit",
930
+ "MIGRATION_DOCUMENT",
931
+ {
932
+ "document": "@entity.document"
933
+ }
934
+ ]
935
+ ],
936
+ "event": "DOCUMENT_FETCHED",
937
+ "eventId": "evt_01KYEH1JHZYH9ESEMWYAGG5V20",
938
+ "from": "mapping",
939
+ "to": "mapping"
940
+ },
941
+ {
942
+ "effects": [
943
+ [
944
+ "set",
945
+ "@entity.stats",
946
+ "@payload.stats"
947
+ ],
948
+ [
949
+ "set",
950
+ "@entity.status",
951
+ "reviewing"
952
+ ],
953
+ [
954
+ "emit",
955
+ "MIGRATION_REVIEW_READY",
956
+ {
957
+ "stats": "@entity.stats"
958
+ }
959
+ ]
960
+ ],
961
+ "event": "MIGRATION_STAGED",
962
+ "eventId": "evt_01KYEH1JHZTCZZE53EY6264JTY",
963
+ "from": "mapping",
964
+ "to": "reviewing"
965
+ },
966
+ {
967
+ "effects": [
968
+ [
969
+ "set",
970
+ "@entity.status",
971
+ "idle"
972
+ ],
973
+ [
974
+ "set",
975
+ "@entity.documents",
976
+ []
977
+ ],
978
+ [
979
+ "set",
980
+ "@entity.document",
981
+ {}
982
+ ],
983
+ [
984
+ "set",
985
+ "@entity.stats",
986
+ {}
987
+ ]
988
+ ],
989
+ "event": "MIGRATION_DISCARDED",
990
+ "eventId": "evt_01KYEH1JHZXK69X09ZRB3JFTX8",
991
+ "from": "mapping",
992
+ "to": "idle"
993
+ },
994
+ {
995
+ "effects": [
996
+ [
997
+ "set",
998
+ "@entity.error",
999
+ "@payload.error"
1000
+ ],
1001
+ [
1002
+ "set",
1003
+ "@entity.status",
1004
+ "failed"
1005
+ ],
1006
+ [
1007
+ "persist",
1008
+ "create",
1009
+ "MigrationJob",
1010
+ {
1011
+ "createdAt": "@entity.createdAt",
1012
+ "error": "@entity.error",
1013
+ "source": "@entity.source",
1014
+ "stats": "@entity.stats",
1015
+ "status": "@entity.status",
1016
+ "target": "@entity.target"
1017
+ }
1018
+ ],
1019
+ [
1020
+ "emit",
1021
+ "MIGRATION_FAILED",
1022
+ {
1023
+ "error": "@entity.error"
1024
+ }
1025
+ ]
1026
+ ],
1027
+ "event": "MIGRATION_CALL_FAILED",
1028
+ "eventId": "evt_01KYEH1JHZ46HRGQWBVH62VTWB",
1029
+ "from": "mapping",
1030
+ "to": "failed"
1031
+ },
1032
+ {
1033
+ "effects": [
1034
+ [
1035
+ "set",
1036
+ "@entity.status",
1037
+ "committing"
1038
+ ],
1039
+ [
1040
+ "call-service",
1041
+ "migration",
1042
+ "commit",
1043
+ {
1044
+ "jobId": "@entity.id",
1045
+ "units": "@payload.units"
1046
+ },
1047
+ {
1048
+ "emit": {
1049
+ "failure": "MIGRATION_CALL_FAILED",
1050
+ "success": "COMMITTED"
1051
+ }
1052
+ }
1053
+ ]
1054
+ ],
1055
+ "event": "MIGRATION_APPROVED",
1056
+ "eventId": "evt_01KYEH1JHZANEQQJWVAQWKE7T8",
1057
+ "from": "reviewing",
1058
+ "to": "committing"
1059
+ },
1060
+ {
1061
+ "effects": [
1062
+ [
1063
+ "set",
1064
+ "@entity.status",
1065
+ "mapping"
1066
+ ]
1067
+ ],
1068
+ "event": "MIGRATION_REJECTED",
1069
+ "eventId": "evt_01KYEH1JHZ67GY1VYWWG8FJN5M",
1070
+ "from": "reviewing",
1071
+ "to": "mapping"
1072
+ },
1073
+ {
1074
+ "event": "MIGRATION_REVIEW_READY",
1075
+ "eventId": "evt_01KYEH1JHZQQGPZ8285ZJA0W2Z",
1076
+ "from": "reviewing",
1077
+ "to": "reviewing"
1078
+ },
1079
+ {
1080
+ "effects": [
1081
+ [
1082
+ "set",
1083
+ "@entity.status",
1084
+ "idle"
1085
+ ],
1086
+ [
1087
+ "set",
1088
+ "@entity.documents",
1089
+ []
1090
+ ],
1091
+ [
1092
+ "set",
1093
+ "@entity.document",
1094
+ {}
1095
+ ],
1096
+ [
1097
+ "set",
1098
+ "@entity.stats",
1099
+ {}
1100
+ ]
1101
+ ],
1102
+ "event": "MIGRATION_DISCARDED",
1103
+ "eventId": "evt_01KYEH1JHZXK69X09ZRB3JFTX8",
1104
+ "from": "reviewing",
1105
+ "to": "idle"
1106
+ },
1107
+ {
1108
+ "effects": [
1109
+ [
1110
+ "set",
1111
+ "@entity.stats",
1112
+ [
1113
+ "object/merge",
1114
+ "@entity.stats",
1115
+ {
1116
+ "committed": "@payload.committed",
1117
+ "failed": "@payload.failed"
1118
+ }
1119
+ ]
1120
+ ],
1121
+ [
1122
+ "set",
1123
+ "@entity.status",
1124
+ "done"
1125
+ ],
1126
+ [
1127
+ "persist",
1128
+ "create",
1129
+ "MigrationJob",
1130
+ {
1131
+ "createdAt": "@entity.createdAt",
1132
+ "error": "",
1133
+ "source": "@entity.source",
1134
+ "stats": "@entity.stats",
1135
+ "status": "@entity.status",
1136
+ "target": "@entity.target"
1137
+ }
1138
+ ],
1139
+ [
1140
+ "emit",
1141
+ "MIGRATION_COMPLETED",
1142
+ {
1143
+ "stats": "@entity.stats"
1144
+ }
1145
+ ]
1146
+ ],
1147
+ "event": "COMMITTED",
1148
+ "eventId": "evt_01KYEH1JHZMFZQV6JQ7BF49TGJ",
1149
+ "from": "committing",
1150
+ "to": "done"
1151
+ },
1152
+ {
1153
+ "effects": [
1154
+ [
1155
+ "set",
1156
+ "@entity.error",
1157
+ "@payload.error"
1158
+ ],
1159
+ [
1160
+ "set",
1161
+ "@entity.status",
1162
+ "failed"
1163
+ ],
1164
+ [
1165
+ "persist",
1166
+ "create",
1167
+ "MigrationJob",
1168
+ {
1169
+ "createdAt": "@entity.createdAt",
1170
+ "error": "@entity.error",
1171
+ "source": "@entity.source",
1172
+ "stats": "@entity.stats",
1173
+ "status": "@entity.status",
1174
+ "target": "@entity.target"
1175
+ }
1176
+ ],
1177
+ [
1178
+ "emit",
1179
+ "MIGRATION_FAILED",
1180
+ {
1181
+ "error": "@entity.error"
1182
+ }
1183
+ ]
1184
+ ],
1185
+ "event": "MIGRATION_CALL_FAILED",
1186
+ "eventId": "evt_01KYEH1JHZ46HRGQWBVH62VTWB",
1187
+ "from": "committing",
1188
+ "to": "failed"
1189
+ },
1190
+ {
1191
+ "effects": [
1192
+ [
1193
+ "set",
1194
+ "@entity.status",
1195
+ "idle"
1196
+ ],
1197
+ [
1198
+ "set",
1199
+ "@entity.error",
1200
+ ""
1201
+ ],
1202
+ [
1203
+ "set",
1204
+ "@entity.documents",
1205
+ []
1206
+ ],
1207
+ [
1208
+ "set",
1209
+ "@entity.document",
1210
+ {}
1211
+ ],
1212
+ [
1213
+ "set",
1214
+ "@entity.stats",
1215
+ {}
1216
+ ]
1217
+ ],
1218
+ "event": "RESET",
1219
+ "eventId": "evt_01KYEH1JHZ6TVR2PR9DCX7M0JW",
1220
+ "from": "done",
1221
+ "to": "idle"
1222
+ },
1223
+ {
1224
+ "event": "MIGRATION_COMPLETED",
1225
+ "eventId": "evt_01KYEH1JHZKCD8JKV9CAHZG2JC",
1226
+ "from": "done",
1227
+ "to": "done"
1228
+ },
1229
+ {
1230
+ "effects": [
1231
+ [
1232
+ "set",
1233
+ "@entity.status",
1234
+ "fetching"
1235
+ ],
1236
+ [
1237
+ "set",
1238
+ "@entity.error",
1239
+ ""
1240
+ ],
1241
+ [
1242
+ "call-service",
1243
+ "migration",
1244
+ "listDocuments",
1245
+ {
1246
+ "connectionRef": "@config.connectionRef",
1247
+ "files": "@entity.files",
1248
+ "source": "@entity.source"
1249
+ },
1250
+ {
1251
+ "emit": {
1252
+ "failure": "MIGRATION_CALL_FAILED",
1253
+ "success": "DOCUMENTS_LISTED"
1254
+ }
1255
+ }
1256
+ ]
1257
+ ],
1258
+ "event": "MIGRATION_RETRY",
1259
+ "eventId": "evt_01KYEH1JHZ4P70WNXP5KD40DQD",
1260
+ "from": "failed",
1261
+ "to": "fetching"
1262
+ },
1263
+ {
1264
+ "effects": [
1265
+ [
1266
+ "set",
1267
+ "@entity.status",
1268
+ "idle"
1269
+ ],
1270
+ [
1271
+ "set",
1272
+ "@entity.error",
1273
+ ""
1274
+ ],
1275
+ [
1276
+ "set",
1277
+ "@entity.documents",
1278
+ []
1279
+ ],
1280
+ [
1281
+ "set",
1282
+ "@entity.document",
1283
+ {}
1284
+ ],
1285
+ [
1286
+ "set",
1287
+ "@entity.stats",
1288
+ {}
1289
+ ]
1290
+ ],
1291
+ "event": "RESET",
1292
+ "eventId": "evt_01KYEH1JHZ6TVR2PR9DCX7M0JW",
1293
+ "from": "failed",
1294
+ "to": "idle"
1295
+ },
1296
+ {
1297
+ "event": "MIGRATION_FAILED",
1298
+ "eventId": "evt_01KYEH1JHZFMZPRSAAAW5SNS5H",
1299
+ "from": "failed",
1300
+ "to": "failed"
1301
+ }
1302
+ ]
1303
+ }
1304
+ }
1305
+ ]
1306
+ }
1307
+ ],
1308
+ "schemaVersion": 1,
1309
+ "version": "1.0.0"
1310
+ }