dsh-knowhub 0.9.0 → 0.10.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 (195) hide show
  1. package/README.md +11 -2
  2. package/cordis.patch.yml +10 -0
  3. package/lib/host/model.js +1 -1
  4. package/lib/host/pipeline/incremental.js +3 -3
  5. package/lib/host/pipeline/initialize.js +144 -27
  6. package/lib/host/pipeline/model-output.js +2 -2
  7. package/package.json +3 -2
  8. package/skills/archify/LICENSE +202 -0
  9. package/skills/archify/LICENSE-MIT +22 -0
  10. package/skills/archify/NOTICE +26 -0
  11. package/skills/archify/SKILL.md +137 -0
  12. package/skills/archify/THIRD_PARTY_NOTICES.md +78 -0
  13. package/skills/archify/assets/JetBrainsMono-OFL.txt +93 -0
  14. package/skills/archify/assets/template.html +14768 -0
  15. package/skills/archify/bin/archify.mjs +7289 -0
  16. package/skills/archify/bin/delivery-update.mjs +92 -0
  17. package/skills/archify/bin/finalize.mjs +1055 -0
  18. package/skills/archify/bin/open-artifact.mjs +146 -0
  19. package/skills/archify/bin/preview.mjs +970 -0
  20. package/skills/archify/bin/recover-output.mjs +41 -0
  21. package/skills/archify/bin/visual-check.mjs +2780 -0
  22. package/skills/archify/brand-marks/README.md +31 -0
  23. package/skills/archify/brand-marks/catalog.json +131 -0
  24. package/skills/archify/delta/architecture-delta.mjs +1318 -0
  25. package/skills/archify/examples/agent-run.lifecycle.json +55 -0
  26. package/skills/archify/examples/agent-tool-call.workflow.json +74 -0
  27. package/skills/archify/examples/archify-dev-activity.timeline.json +176 -0
  28. package/skills/archify/examples/archify-repository.tree.json +197 -0
  29. package/skills/archify/examples/async-job-roundtrip.sequence.json +56 -0
  30. package/skills/archify/examples/brand-aware-delivery.architecture.json +34 -0
  31. package/skills/archify/examples/cache-miss-request.sequence.json +77 -0
  32. package/skills/archify/examples/checkout-platform.base.architecture.json +32 -0
  33. package/skills/archify/examples/checkout-platform.head.architecture.json +32 -0
  34. package/skills/archify/examples/checkout-request.waterfall.json +20 -0
  35. package/skills/archify/examples/delivery.explainer.json +155 -0
  36. package/skills/archify/examples/deployment-release.lifecycle.json +72 -0
  37. package/skills/archify/examples/event-stream.dataflow.json +52 -0
  38. package/skills/archify/examples/example-rebuild.waterfall.json +212 -0
  39. package/skills/archify/examples/holiday-planning.workflow.json +143 -0
  40. package/skills/archify/examples/incident-response.workflow.json +59 -0
  41. package/skills/archify/examples/locales/de.json +463 -0
  42. package/skills/archify/examples/locales/fr.json +463 -0
  43. package/skills/archify/examples/locales/fr.partial.json +22 -0
  44. package/skills/archify/examples/locales/it.json +463 -0
  45. package/skills/archify/examples/locales/ja.json +463 -0
  46. package/skills/archify/examples/locales/pt.json +463 -0
  47. package/skills/archify/examples/locales/ru.json +463 -0
  48. package/skills/archify/examples/orders.erd.json +337 -0
  49. package/skills/archify/examples/payment-incident.timeline.json +24 -0
  50. package/skills/archify/examples/payment-platform.tree.json +22 -0
  51. package/skills/archify/examples/payment-processors.class.json +177 -0
  52. package/skills/archify/examples/payments.class.json +85 -0
  53. package/skills/archify/examples/product-analytics.dataflow.json +71 -0
  54. package/skills/archify/examples/production-deployment.architecture.json +51 -0
  55. package/skills/archify/examples/release-delivery.workflow.json +57 -0
  56. package/skills/archify/examples/subscription-billing.erd.json +548 -0
  57. package/skills/archify/examples/web-app.architecture.json +41 -0
  58. package/skills/archify/explainer/browser-check.mjs +208 -0
  59. package/skills/archify/explainer/charts.mjs +70 -0
  60. package/skills/archify/explainer/check.mjs +167 -0
  61. package/skills/archify/explainer/diagrams.mjs +517 -0
  62. package/skills/archify/explainer/diff.mjs +124 -0
  63. package/skills/archify/explainer/inline.mjs +155 -0
  64. package/skills/archify/explainer/layout.mjs +35 -0
  65. package/skills/archify/explainer/page-bundle.mjs +16 -0
  66. package/skills/archify/explainer/parse.mjs +300 -0
  67. package/skills/archify/explainer/patch.mjs +117 -0
  68. package/skills/archify/explainer/prepare.mjs +131 -0
  69. package/skills/archify/explainer/reader.css +472 -0
  70. package/skills/archify/explainer/reader.js +666 -0
  71. package/skills/archify/explainer/render.mjs +224 -0
  72. package/skills/archify/explainer/revision.mjs +20 -0
  73. package/skills/archify/explainer/sources.mjs +318 -0
  74. package/skills/archify/explainer/validate.mjs +138 -0
  75. package/skills/archify/explainer/vendor/pele/LICENSE +40 -0
  76. package/skills/archify/explainer/vendor/pele/README.md +5 -0
  77. package/skills/archify/explainer/vendor/pele/chunks/3DKXF73K.js +4 -0
  78. package/skills/archify/explainer/vendor/pele/chunks/42UTT654.js +3 -0
  79. package/skills/archify/explainer/vendor/pele/chunks/DKTLEL5E.js +1 -0
  80. package/skills/archify/explainer/vendor/pele/chunks/EEIX5ZYH.js +2 -0
  81. package/skills/archify/explainer/vendor/pele/chunks/EJ5KOXYD.js +25 -0
  82. package/skills/archify/explainer/vendor/pele/chunks/GUJTEFZK.js +1 -0
  83. package/skills/archify/explainer/vendor/pele/chunks/IZOKQ2GT.js +4 -0
  84. package/skills/archify/explainer/vendor/pele/chunks/L4LY553T.js +3 -0
  85. package/skills/archify/explainer/vendor/pele/chunks/MSKIJHB2.js +2 -0
  86. package/skills/archify/explainer/vendor/pele/chunks/RVARI57O.js +1 -0
  87. package/skills/archify/explainer/vendor/pele/chunks/UKSIWDDN.js +2 -0
  88. package/skills/archify/explainer/vendor/pele/chunks/UPTXNAXN.js +2 -0
  89. package/skills/archify/explainer/vendor/pele/chunks/XTDUIGUI.js +9 -0
  90. package/skills/archify/explainer/vendor/pele/chunks/YAYTP6L5.js +9 -0
  91. package/skills/archify/explainer/vendor/pele/core.js +1 -0
  92. package/skills/archify/explainer/vendor/pele/diagrams/pie.js +1 -0
  93. package/skills/archify/explainer/vendor/pele/diagrams/quadrantChart.js +1 -0
  94. package/skills/archify/explainer/vendor/pele/diagrams/radar.js +1 -0
  95. package/skills/archify/explainer/vendor/pele/diagrams/sankey.js +1 -0
  96. package/skills/archify/explainer/vendor/pele/diagrams/venn.js +1 -0
  97. package/skills/archify/explainer/vendor/pele/diagrams/xychart.js +1 -0
  98. package/skills/archify/explainer/writing.mjs +139 -0
  99. package/skills/archify/locales/README.md +40 -0
  100. package/skills/archify/locales/ar.json +488 -0
  101. package/skills/archify/locales/en.json +488 -0
  102. package/skills/archify/locales/es.json +488 -0
  103. package/skills/archify/locales/ko.json +488 -0
  104. package/skills/archify/locales/manifest.json +10 -0
  105. package/skills/archify/locales/zh-CN.json +488 -0
  106. package/skills/archify/locales/zh-TW.json +488 -0
  107. package/skills/archify/migrations/workflow-v2.mjs +280 -0
  108. package/skills/archify/package.json +17 -0
  109. package/skills/archify/recipes/scenarios.mjs +455 -0
  110. package/skills/archify/references/architecture-layout-repair.md +18 -0
  111. package/skills/archify/references/authoring-contract.md +645 -0
  112. package/skills/archify/references/authoring-defaults.md +57 -0
  113. package/skills/archify/references/brand-marks.md +119 -0
  114. package/skills/archify/references/delivery-contract.md +665 -0
  115. package/skills/archify/references/explainer-authoring.md +274 -0
  116. package/skills/archify/references/repository-authoring.md +126 -0
  117. package/skills/archify/references/update-awareness.md +13 -0
  118. package/skills/archify/references/viewer-runtime.md +52 -0
  119. package/skills/archify/renderers/architecture/grid.mjs +62 -0
  120. package/skills/archify/renderers/architecture/labels.mjs +2 -0
  121. package/skills/archify/renderers/architecture/render-architecture.mjs +1204 -0
  122. package/skills/archify/renderers/architecture/routing.mjs +1469 -0
  123. package/skills/archify/renderers/class/README.md +130 -0
  124. package/skills/archify/renderers/class/render-class.mjs +1095 -0
  125. package/skills/archify/renderers/dataflow/README.md +176 -0
  126. package/skills/archify/renderers/dataflow/dataflow-compiler.mjs +1605 -0
  127. package/skills/archify/renderers/dataflow/joint-label-routing.mjs +165 -0
  128. package/skills/archify/renderers/dataflow/label-capacity.mjs +81 -0
  129. package/skills/archify/renderers/dataflow/render-dataflow.mjs +23 -0
  130. package/skills/archify/renderers/erd/README.md +246 -0
  131. package/skills/archify/renderers/erd/grid.mjs +150 -0
  132. package/skills/archify/renderers/erd/render-erd.mjs +1588 -0
  133. package/skills/archify/renderers/explainer/render-explainer.mjs +42 -0
  134. package/skills/archify/renderers/lifecycle/README.md +104 -0
  135. package/skills/archify/renderers/lifecycle/render-lifecycle.mjs +1134 -0
  136. package/skills/archify/renderers/sequence/README.md +146 -0
  137. package/skills/archify/renderers/sequence/render-sequence.mjs +1105 -0
  138. package/skills/archify/renderers/shared/atomic-output.mjs +1982 -0
  139. package/skills/archify/renderers/shared/automatic-labels.mjs +290 -0
  140. package/skills/archify/renderers/shared/brand-marks.mjs +706 -0
  141. package/skills/archify/renderers/shared/cli.mjs +430 -0
  142. package/skills/archify/renderers/shared/desktop-readability.mjs +132 -0
  143. package/skills/archify/renderers/shared/diagnostics.mjs +0 -0
  144. package/skills/archify/renderers/shared/engineering-profiles.mjs +157 -0
  145. package/skills/archify/renderers/shared/generated-brand-marks.mjs +2003 -0
  146. package/skills/archify/renderers/shared/generated-validators.mjs +279 -0
  147. package/skills/archify/renderers/shared/geometry.mjs +2073 -0
  148. package/skills/archify/renderers/shared/i18n.mjs +328 -0
  149. package/skills/archify/renderers/shared/layout-report.mjs +57 -0
  150. package/skills/archify/renderers/shared/legend.mjs +227 -0
  151. package/skills/archify/renderers/shared/node-card-style.mjs +32 -0
  152. package/skills/archify/renderers/shared/output-path.mjs +440 -0
  153. package/skills/archify/renderers/shared/owned-temp-directory.mjs +82 -0
  154. package/skills/archify/renderers/shared/path-semantics.mjs +1017 -0
  155. package/skills/archify/renderers/shared/portable-path.mjs +408 -0
  156. package/skills/archify/renderers/shared/repository-evidence.mjs +394 -0
  157. package/skills/archify/renderers/shared/repository-location.mjs +71 -0
  158. package/skills/archify/renderers/shared/route-quality.mjs +670 -0
  159. package/skills/archify/renderers/shared/sidecar-path.mjs +38 -0
  160. package/skills/archify/renderers/shared/software-notices.mjs +6 -0
  161. package/skills/archify/renderers/shared/spatial-grid.mjs +66 -0
  162. package/skills/archify/renderers/shared/svg-path-analysis.mjs +135 -0
  163. package/skills/archify/renderers/shared/text-fit.mjs +105 -0
  164. package/skills/archify/renderers/shared/utils.mjs +260 -0
  165. package/skills/archify/renderers/shared/validator.mjs +83 -0
  166. package/skills/archify/renderers/timeline/README.md +76 -0
  167. package/skills/archify/renderers/timeline/render-timeline.mjs +576 -0
  168. package/skills/archify/renderers/tree/README.md +96 -0
  169. package/skills/archify/renderers/tree/render-tree.mjs +573 -0
  170. package/skills/archify/renderers/waterfall/README.md +73 -0
  171. package/skills/archify/renderers/waterfall/render-waterfall.mjs +413 -0
  172. package/skills/archify/renderers/workflow/README.md +337 -0
  173. package/skills/archify/renderers/workflow/render-workflow.mjs +47 -0
  174. package/skills/archify/renderers/workflow/workflow-compiler.mjs +5920 -0
  175. package/skills/archify/renderers/workflow/workflow-migration-geometry.mjs +161 -0
  176. package/skills/archify/renderers/workflow/workflow-placement-repair.mjs +94 -0
  177. package/skills/archify/schemas/README.md +258 -0
  178. package/skills/archify/schemas/architecture.schema.json +152 -0
  179. package/skills/archify/schemas/class.schema.json +345 -0
  180. package/skills/archify/schemas/common.schema.json +181 -0
  181. package/skills/archify/schemas/dataflow.schema.json +254 -0
  182. package/skills/archify/schemas/erd.schema.json +381 -0
  183. package/skills/archify/schemas/explainer.schema.json +927 -0
  184. package/skills/archify/schemas/lifecycle.schema.json +179 -0
  185. package/skills/archify/schemas/sequence.schema.json +234 -0
  186. package/skills/archify/schemas/timeline.schema.json +160 -0
  187. package/skills/archify/schemas/tree.schema.json +141 -0
  188. package/skills/archify/schemas/waterfall.schema.json +147 -0
  189. package/skills/archify/schemas/workflow.schema.json +439 -0
  190. package/skills/archify/scripts/check-render-output.mjs +1469 -0
  191. package/skills/archify/scripts/check-update.mjs +1717 -0
  192. package/skills/archify/scripts/delivery-update-child.mjs +26 -0
  193. package/skills/archify/scripts/render-examples.mjs +36 -0
  194. package/skills/archify/scripts/update-contract.mjs +187 -0
  195. package/skills/archify/skill-release.json +10 -0
@@ -0,0 +1,254 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/tt-a1i/archify/schemas/dataflow.schema.json",
4
+ "title": "Archify Data Flow Diagram",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "diagram_type",
10
+ "meta",
11
+ "stages",
12
+ "nodes",
13
+ "flows"
14
+ ],
15
+ "properties": {
16
+ "schema_version": {
17
+ "const": 1
18
+ },
19
+ "diagram_type": {
20
+ "const": "dataflow"
21
+ },
22
+ "meta": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "title",
27
+ "output"
28
+ ],
29
+ "properties": {
30
+ "title": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "locale": {
35
+ "$ref": "common.schema.json#/$defs/locale"
36
+ },
37
+ "translations": {
38
+ "$ref": "common.schema.json#/$defs/translations"
39
+ },
40
+ "subtitle": {
41
+ "type": "string"
42
+ },
43
+ "output": {
44
+ "$ref": "common.schema.json#/$defs/portableOutputPath"
45
+ },
46
+ "animation": {
47
+ "$ref": "common.schema.json#/$defs/animation"
48
+ },
49
+ "visual_preset": {
50
+ "$ref": "common.schema.json#/$defs/visualPreset"
51
+ },
52
+ "quality_profile": {
53
+ "$ref": "common.schema.json#/$defs/qualityProfile"
54
+ },
55
+ "repository": {
56
+ "$ref": "common.schema.json#/$defs/repository"
57
+ },
58
+ "views": {
59
+ "$ref": "common.schema.json#/$defs/guidedViews"
60
+ },
61
+ "legend": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "properties": {
65
+ "mode": { "$ref": "common.schema.json#/$defs/legendMode" },
66
+ "entries": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "properties": {
70
+ "default": { "$ref": "common.schema.json#/$defs/legendEntry" },
71
+ "emphasis": { "$ref": "common.schema.json#/$defs/legendEntry" },
72
+ "security": { "$ref": "common.schema.json#/$defs/legendEntry" },
73
+ "dashed": { "$ref": "common.schema.json#/$defs/legendEntry" },
74
+ "database": { "$ref": "common.schema.json#/$defs/legendEntry" }
75
+ }
76
+ }
77
+ }
78
+ },
79
+ "viewBox": {
80
+ "type": "array",
81
+ "prefixItems": [
82
+ {
83
+ "type": "number",
84
+ "minimum": 360
85
+ },
86
+ {
87
+ "type": "number",
88
+ "minimum": 360
89
+ }
90
+ ],
91
+ "items": false,
92
+ "minItems": 2,
93
+ "maxItems": 2
94
+ }
95
+ }
96
+ },
97
+ "stages": {
98
+ "type": "array",
99
+ "minItems": 2,
100
+ "maxItems": 5,
101
+ "items": {
102
+ "type": "object",
103
+ "additionalProperties": false,
104
+ "required": [
105
+ "label"
106
+ ],
107
+ "properties": {
108
+ "label": {
109
+ "type": "string",
110
+ "minLength": 1
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "nodes": {
116
+ "type": "array",
117
+ "minItems": 2,
118
+ "items": {
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "required": [
122
+ "id",
123
+ "type",
124
+ "label",
125
+ "stage",
126
+ "row"
127
+ ],
128
+ "properties": {
129
+ "id": {
130
+ "$ref": "common.schema.json#/$defs/id"
131
+ },
132
+ "type": {
133
+ "$ref": "common.schema.json#/$defs/componentType"
134
+ },
135
+ "label": {
136
+ "type": "string",
137
+ "minLength": 1
138
+ },
139
+ "sublabel": {
140
+ "type": "string"
141
+ },
142
+ "tag": {
143
+ "type": "string"
144
+ },
145
+ "icon": { "$ref": "common.schema.json#/$defs/nodeIcon" },
146
+ "brand": {
147
+ "$ref": "common.schema.json#/$defs/brandMark"
148
+ },
149
+ "sources": {
150
+ "$ref": "common.schema.json#/$defs/sourceReferences"
151
+ },
152
+ "stage": {
153
+ "type": "integer",
154
+ "minimum": 0
155
+ },
156
+ "row": {
157
+ "type": "integer",
158
+ "minimum": 0
159
+ },
160
+ "width": {
161
+ "type": "number",
162
+ "minimum": 48
163
+ },
164
+ "height": {
165
+ "type": "number",
166
+ "minimum": 36
167
+ },
168
+ "yOffset": {
169
+ "type": "number"
170
+ }
171
+ }
172
+ }
173
+ },
174
+ "flows": {
175
+ "type": "array",
176
+ "items": {
177
+ "type": "object",
178
+ "additionalProperties": false,
179
+ "required": [
180
+ "from",
181
+ "to",
182
+ "label"
183
+ ],
184
+ "properties": {
185
+ "id": {
186
+ "$ref": "common.schema.json#/$defs/id"
187
+ },
188
+ "from": {
189
+ "$ref": "common.schema.json#/$defs/id"
190
+ },
191
+ "to": {
192
+ "$ref": "common.schema.json#/$defs/id"
193
+ },
194
+ "label": {
195
+ "type": "string",
196
+ "minLength": 1
197
+ },
198
+ "classification": {
199
+ "type": "string"
200
+ },
201
+ "variant": {
202
+ "$ref": "common.schema.json#/$defs/variant"
203
+ },
204
+ "route": {
205
+ "enum": [
206
+ "auto",
207
+ "straight",
208
+ "vertical-channel",
209
+ "bottom-channel",
210
+ "top-channel"
211
+ ]
212
+ },
213
+ "fromSide": {
214
+ "$ref": "common.schema.json#/$defs/side"
215
+ },
216
+ "toSide": {
217
+ "$ref": "common.schema.json#/$defs/side"
218
+ },
219
+ "channelX": {
220
+ "type": "number"
221
+ },
222
+ "channelY": {
223
+ "type": "number"
224
+ },
225
+ "labelAt": {
226
+ "$ref": "common.schema.json#/$defs/point"
227
+ },
228
+ "labelDx": {
229
+ "type": "number"
230
+ },
231
+ "labelDy": {
232
+ "type": "number"
233
+ },
234
+ "labelSegment": {
235
+ "type": "integer",
236
+ "minimum": 0
237
+ },
238
+ "via": {
239
+ "type": "array",
240
+ "items": {
241
+ "$ref": "common.schema.json#/$defs/point"
242
+ }
243
+ },
244
+ "width": {
245
+ "$ref": "common.schema.json#/$defs/relationshipWidth"
246
+ }
247
+ }
248
+ }
249
+ },
250
+ "cards": {
251
+ "$ref": "common.schema.json#/$defs/cards"
252
+ }
253
+ }
254
+ }
@@ -0,0 +1,381 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/tt-a1i/archify/schemas/erd.schema.json",
4
+ "title": "Archify Entity-Relationship Diagram",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "diagram_type",
10
+ "meta",
11
+ "entities"
12
+ ],
13
+ "properties": {
14
+ "schema_version": {
15
+ "const": 1
16
+ },
17
+ "diagram_type": {
18
+ "const": "erd"
19
+ },
20
+ "meta": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": [
24
+ "title"
25
+ ],
26
+ "properties": {
27
+ "title": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "locale": {
32
+ "$ref": "common.schema.json#/$defs/locale"
33
+ },
34
+ "translations": {
35
+ "$ref": "common.schema.json#/$defs/translations"
36
+ },
37
+ "subtitle": {
38
+ "type": "string"
39
+ },
40
+ "output": {
41
+ "type": "string"
42
+ },
43
+ "animation": {
44
+ "$ref": "common.schema.json#/$defs/animation"
45
+ },
46
+ "visual_preset": {
47
+ "$ref": "common.schema.json#/$defs/visualPreset"
48
+ },
49
+ "quality_profile": {
50
+ "$ref": "common.schema.json#/$defs/qualityProfile"
51
+ },
52
+ "repository": {
53
+ "$ref": "common.schema.json#/$defs/repository"
54
+ },
55
+ "views": {
56
+ "$ref": "common.schema.json#/$defs/guidedViews"
57
+ },
58
+ "legend": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "mode": {
63
+ "$ref": "common.schema.json#/$defs/legendMode"
64
+ },
65
+ "entries": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "properties": {
69
+ "pk": {
70
+ "$ref": "common.schema.json#/$defs/legendEntry"
71
+ },
72
+ "fk": {
73
+ "$ref": "common.schema.json#/$defs/legendEntry"
74
+ },
75
+ "uk": {
76
+ "$ref": "common.schema.json#/$defs/legendEntry"
77
+ },
78
+ "one": {
79
+ "$ref": "common.schema.json#/$defs/legendEntry"
80
+ },
81
+ "many": {
82
+ "$ref": "common.schema.json#/$defs/legendEntry"
83
+ },
84
+ "optional": {
85
+ "$ref": "common.schema.json#/$defs/legendEntry"
86
+ }
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "viewBox": {
92
+ "type": "array",
93
+ "prefixItems": [
94
+ {
95
+ "type": "number",
96
+ "minimum": 320
97
+ },
98
+ {
99
+ "type": "number",
100
+ "minimum": 240
101
+ }
102
+ ],
103
+ "items": false,
104
+ "minItems": 2,
105
+ "maxItems": 2
106
+ }
107
+ }
108
+ },
109
+ "layout": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "mode"
114
+ ],
115
+ "properties": {
116
+ "mode": {
117
+ "enum": [
118
+ "grid"
119
+ ]
120
+ },
121
+ "origin": {
122
+ "$ref": "common.schema.json#/$defs/point"
123
+ },
124
+ "gapX": {
125
+ "type": "number",
126
+ "minimum": 0
127
+ },
128
+ "gapY": {
129
+ "type": "number",
130
+ "minimum": 0
131
+ },
132
+ "entityW": {
133
+ "type": "number",
134
+ "minimum": 80
135
+ },
136
+ "headerH": {
137
+ "type": "number",
138
+ "minimum": 16
139
+ },
140
+ "rowH": {
141
+ "type": "number",
142
+ "minimum": 10
143
+ }
144
+ }
145
+ },
146
+ "entities": {
147
+ "type": "array",
148
+ "minItems": 1,
149
+ "items": {
150
+ "type": "object",
151
+ "additionalProperties": false,
152
+ "required": [
153
+ "id",
154
+ "label"
155
+ ],
156
+ "properties": {
157
+ "id": {
158
+ "$ref": "common.schema.json#/$defs/id"
159
+ },
160
+ "label": {
161
+ "type": "string",
162
+ "minLength": 1
163
+ },
164
+ "sublabel": {
165
+ "type": "string"
166
+ },
167
+ "tag": {
168
+ "type": "string"
169
+ },
170
+ "row": {
171
+ "type": "integer",
172
+ "minimum": 0,
173
+ "maximum": 12
174
+ },
175
+ "col": {
176
+ "type": "integer",
177
+ "minimum": 0,
178
+ "maximum": 12
179
+ },
180
+ "pos": {
181
+ "$ref": "common.schema.json#/$defs/point"
182
+ },
183
+ "width": {
184
+ "type": "number",
185
+ "minimum": 80
186
+ },
187
+ "attributes": {
188
+ "type": "array",
189
+ "items": {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": [
193
+ "name"
194
+ ],
195
+ "properties": {
196
+ "name": {
197
+ "type": "string",
198
+ "minLength": 1
199
+ },
200
+ "type": {
201
+ "type": "string"
202
+ },
203
+ "key": {
204
+ "anyOf": [
205
+ {
206
+ "enum": [
207
+ "pk",
208
+ "fk",
209
+ "uk"
210
+ ]
211
+ },
212
+ {
213
+ "type": "array",
214
+ "minItems": 1,
215
+ "items": {
216
+ "enum": [
217
+ "pk",
218
+ "fk",
219
+ "uk"
220
+ ]
221
+ }
222
+ }
223
+ ]
224
+ },
225
+ "references": {
226
+ "type": "string",
227
+ "minLength": 3,
228
+ "pattern": "^[^.]+\\.[^.]+$"
229
+ }
230
+ },
231
+ "if": {
232
+ "properties": {
233
+ "key": {
234
+ "anyOf": [
235
+ {
236
+ "const": "fk"
237
+ },
238
+ {
239
+ "type": "array",
240
+ "contains": {
241
+ "const": "fk"
242
+ }
243
+ }
244
+ ]
245
+ }
246
+ },
247
+ "required": [
248
+ "key"
249
+ ]
250
+ },
251
+ "then": {
252
+ "required": [
253
+ "references"
254
+ ],
255
+ "properties": {
256
+ "references": {}
257
+ }
258
+ }
259
+ }
260
+ },
261
+ "sources": {
262
+ "$ref": "common.schema.json#/$defs/sourceReferences"
263
+ }
264
+ }
265
+ }
266
+ },
267
+ "relationships": {
268
+ "type": "array",
269
+ "items": {
270
+ "type": "object",
271
+ "additionalProperties": false,
272
+ "required": [
273
+ "from",
274
+ "to",
275
+ "fromCardinality",
276
+ "toCardinality"
277
+ ],
278
+ "properties": {
279
+ "id": {
280
+ "$ref": "common.schema.json#/$defs/id"
281
+ },
282
+ "from": {
283
+ "$ref": "common.schema.json#/$defs/id"
284
+ },
285
+ "to": {
286
+ "$ref": "common.schema.json#/$defs/id"
287
+ },
288
+ "label": {
289
+ "type": "string"
290
+ },
291
+ "fromCardinality": {
292
+ "enum": [
293
+ "one",
294
+ "many"
295
+ ]
296
+ },
297
+ "toCardinality": {
298
+ "enum": [
299
+ "one",
300
+ "many"
301
+ ]
302
+ },
303
+ "fromOptional": {
304
+ "type": "boolean"
305
+ },
306
+ "toOptional": {
307
+ "type": "boolean"
308
+ },
309
+ "identifying": {
310
+ "type": "boolean"
311
+ },
312
+ "variant": {
313
+ "$ref": "common.schema.json#/$defs/variant"
314
+ },
315
+ "fromSide": {
316
+ "$ref": "common.schema.json#/$defs/side"
317
+ },
318
+ "toSide": {
319
+ "$ref": "common.schema.json#/$defs/side"
320
+ },
321
+ "route": {
322
+ "enum": [
323
+ "auto",
324
+ "straight",
325
+ "orthogonal-h",
326
+ "orthogonal-v"
327
+ ]
328
+ },
329
+ "via": {
330
+ "type": "array",
331
+ "items": {
332
+ "$ref": "common.schema.json#/$defs/point"
333
+ }
334
+ },
335
+ "labelAt": {
336
+ "$ref": "common.schema.json#/$defs/point"
337
+ },
338
+ "labelDx": {
339
+ "type": "number"
340
+ },
341
+ "labelDy": {
342
+ "type": "number"
343
+ },
344
+ "labelSegment": {
345
+ "type": "integer",
346
+ "minimum": 0
347
+ },
348
+ "width": {
349
+ "$ref": "common.schema.json#/$defs/relationshipWidth"
350
+ }
351
+ },
352
+ "allOf": [
353
+ {
354
+ "if": {
355
+ "required": [
356
+ "identifying"
357
+ ],
358
+ "properties": {
359
+ "identifying": {
360
+ "const": false
361
+ }
362
+ }
363
+ },
364
+ "then": {
365
+ "properties": {
366
+ "variant": {
367
+ "enum": [
368
+ "dashed"
369
+ ]
370
+ }
371
+ }
372
+ }
373
+ }
374
+ ]
375
+ }
376
+ },
377
+ "cards": {
378
+ "$ref": "common.schema.json#/$defs/cards"
379
+ }
380
+ }
381
+ }