@openplanr/protocol 0.5.0 → 0.6.1

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.
@@ -0,0 +1,157 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-fidelity-report.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "diagram-fidelity-report",
6
+ "version": "1.13.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "diagram-fidelity-report"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.13.0"
19
+ },
20
+ "diagramId": {
21
+ "type": "string",
22
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
23
+ "minLength": 1,
24
+ "maxLength": 128
25
+ },
26
+ "basis": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "bundleDigest": {
31
+ "type": "string",
32
+ "pattern": "^sha256:[a-f0-9]{64}$"
33
+ },
34
+ "semanticDigest": {
35
+ "type": "string",
36
+ "pattern": "^sha256:[a-f0-9]{64}$"
37
+ },
38
+ "presentationDigest": {
39
+ "type": "string",
40
+ "pattern": "^sha256:[a-f0-9]{64}$"
41
+ }
42
+ },
43
+ "required": [
44
+ "bundleDigest",
45
+ "semanticDigest",
46
+ "presentationDigest"
47
+ ]
48
+ },
49
+ "sourceDigest": {
50
+ "anyOf": [
51
+ {
52
+ "type": "null"
53
+ },
54
+ {
55
+ "type": "string",
56
+ "pattern": "^sha256:[a-f0-9]{64}$"
57
+ }
58
+ ]
59
+ },
60
+ "sourceFormat": {
61
+ "enum": [
62
+ "mermaid",
63
+ "planr-diagram-bundle"
64
+ ]
65
+ },
66
+ "targetFormat": {
67
+ "enum": [
68
+ "mermaid",
69
+ "planr-diagram-bundle",
70
+ "svg",
71
+ "html",
72
+ "png"
73
+ ]
74
+ },
75
+ "semantic": {
76
+ "enum": [
77
+ "lossless",
78
+ "partial",
79
+ "unsupported"
80
+ ]
81
+ },
82
+ "presentation": {
83
+ "enum": [
84
+ "lossless",
85
+ "partial",
86
+ "unsupported"
87
+ ]
88
+ },
89
+ "sourceText": {
90
+ "enum": [
91
+ "lossless",
92
+ "partial",
93
+ "unsupported"
94
+ ]
95
+ },
96
+ "losses": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "properties": {
102
+ "dimension": {
103
+ "enum": [
104
+ "semantic",
105
+ "presentation",
106
+ "sourceText"
107
+ ]
108
+ },
109
+ "code": {
110
+ "type": "string",
111
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
112
+ "maxLength": 64
113
+ },
114
+ "elementIds": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string",
118
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
119
+ "minLength": 1,
120
+ "maxLength": 128
121
+ },
122
+ "minItems": 0,
123
+ "maxItems": 10000,
124
+ "uniqueItems": true
125
+ },
126
+ "message": {
127
+ "type": "string",
128
+ "minLength": 1,
129
+ "maxLength": 512
130
+ }
131
+ },
132
+ "required": [
133
+ "dimension",
134
+ "code",
135
+ "elementIds",
136
+ "message"
137
+ ]
138
+ },
139
+ "minItems": 0,
140
+ "maxItems": 1024
141
+ }
142
+ },
143
+ "required": [
144
+ "kind",
145
+ "schemaVersion",
146
+ "protocolVersion",
147
+ "diagramId",
148
+ "basis",
149
+ "sourceDigest",
150
+ "sourceFormat",
151
+ "targetFormat",
152
+ "semantic",
153
+ "presentation",
154
+ "sourceText",
155
+ "losses"
156
+ ]
157
+ }
@@ -0,0 +1,311 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-manifest.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "diagram-manifest",
6
+ "version": "1.13.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "diagram-manifest"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.13.0"
19
+ },
20
+ "diagramId": {
21
+ "type": "string",
22
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
23
+ "minLength": 1,
24
+ "maxLength": 128
25
+ },
26
+ "basis": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "bundleDigest": {
31
+ "type": "string",
32
+ "pattern": "^sha256:[a-f0-9]{64}$"
33
+ },
34
+ "semanticDigest": {
35
+ "type": "string",
36
+ "pattern": "^sha256:[a-f0-9]{64}$"
37
+ },
38
+ "presentationDigest": {
39
+ "type": "string",
40
+ "pattern": "^sha256:[a-f0-9]{64}$"
41
+ }
42
+ },
43
+ "required": [
44
+ "bundleDigest",
45
+ "semanticDigest",
46
+ "presentationDigest"
47
+ ]
48
+ },
49
+ "bundle": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "properties": {
53
+ "path": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "maxLength": 1024,
57
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*$"
58
+ },
59
+ "transportDigest": {
60
+ "type": "string",
61
+ "pattern": "^sha256:[a-f0-9]{64}$"
62
+ }
63
+ },
64
+ "required": [
65
+ "path",
66
+ "transportDigest"
67
+ ]
68
+ },
69
+ "renderer": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "properties": {
73
+ "id": {
74
+ "type": "string",
75
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
76
+ "maxLength": 64
77
+ },
78
+ "version": {
79
+ "type": "string",
80
+ "minLength": 1,
81
+ "maxLength": 64
82
+ }
83
+ },
84
+ "required": [
85
+ "id",
86
+ "version"
87
+ ]
88
+ },
89
+ "outputs": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "properties": {
95
+ "path": {
96
+ "type": "string",
97
+ "minLength": 1,
98
+ "maxLength": 1024,
99
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*$"
100
+ },
101
+ "mediaType": {
102
+ "enum": [
103
+ "image/svg+xml",
104
+ "text/html",
105
+ "image/png"
106
+ ]
107
+ },
108
+ "transportDigest": {
109
+ "type": "string",
110
+ "pattern": "^sha256:[a-f0-9]{64}$"
111
+ },
112
+ "fidelity": {
113
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
114
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-fidelity-report.schema.json",
115
+ "x-openplanr-contract": {
116
+ "id": "diagram-fidelity-report",
117
+ "version": "1.13.0"
118
+ },
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "properties": {
122
+ "kind": {
123
+ "const": "diagram-fidelity-report"
124
+ },
125
+ "schemaVersion": {
126
+ "const": "1.0.0"
127
+ },
128
+ "protocolVersion": {
129
+ "const": "1.13.0"
130
+ },
131
+ "diagramId": {
132
+ "type": "string",
133
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
134
+ "minLength": 1,
135
+ "maxLength": 128
136
+ },
137
+ "basis": {
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "properties": {
141
+ "bundleDigest": {
142
+ "type": "string",
143
+ "pattern": "^sha256:[a-f0-9]{64}$"
144
+ },
145
+ "semanticDigest": {
146
+ "type": "string",
147
+ "pattern": "^sha256:[a-f0-9]{64}$"
148
+ },
149
+ "presentationDigest": {
150
+ "type": "string",
151
+ "pattern": "^sha256:[a-f0-9]{64}$"
152
+ }
153
+ },
154
+ "required": [
155
+ "bundleDigest",
156
+ "semanticDigest",
157
+ "presentationDigest"
158
+ ]
159
+ },
160
+ "sourceDigest": {
161
+ "anyOf": [
162
+ {
163
+ "type": "null"
164
+ },
165
+ {
166
+ "type": "string",
167
+ "pattern": "^sha256:[a-f0-9]{64}$"
168
+ }
169
+ ]
170
+ },
171
+ "sourceFormat": {
172
+ "enum": [
173
+ "mermaid",
174
+ "planr-diagram-bundle"
175
+ ]
176
+ },
177
+ "targetFormat": {
178
+ "enum": [
179
+ "mermaid",
180
+ "planr-diagram-bundle",
181
+ "svg",
182
+ "html",
183
+ "png"
184
+ ]
185
+ },
186
+ "semantic": {
187
+ "enum": [
188
+ "lossless",
189
+ "partial",
190
+ "unsupported"
191
+ ]
192
+ },
193
+ "presentation": {
194
+ "enum": [
195
+ "lossless",
196
+ "partial",
197
+ "unsupported"
198
+ ]
199
+ },
200
+ "sourceText": {
201
+ "enum": [
202
+ "lossless",
203
+ "partial",
204
+ "unsupported"
205
+ ]
206
+ },
207
+ "losses": {
208
+ "type": "array",
209
+ "items": {
210
+ "type": "object",
211
+ "additionalProperties": false,
212
+ "properties": {
213
+ "dimension": {
214
+ "enum": [
215
+ "semantic",
216
+ "presentation",
217
+ "sourceText"
218
+ ]
219
+ },
220
+ "code": {
221
+ "type": "string",
222
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
223
+ "maxLength": 64
224
+ },
225
+ "elementIds": {
226
+ "type": "array",
227
+ "items": {
228
+ "type": "string",
229
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
230
+ "minLength": 1,
231
+ "maxLength": 128
232
+ },
233
+ "minItems": 0,
234
+ "maxItems": 10000,
235
+ "uniqueItems": true
236
+ },
237
+ "message": {
238
+ "type": "string",
239
+ "minLength": 1,
240
+ "maxLength": 512
241
+ }
242
+ },
243
+ "required": [
244
+ "dimension",
245
+ "code",
246
+ "elementIds",
247
+ "message"
248
+ ]
249
+ },
250
+ "minItems": 0,
251
+ "maxItems": 1024
252
+ }
253
+ },
254
+ "required": [
255
+ "kind",
256
+ "schemaVersion",
257
+ "protocolVersion",
258
+ "diagramId",
259
+ "basis",
260
+ "sourceDigest",
261
+ "sourceFormat",
262
+ "targetFormat",
263
+ "semantic",
264
+ "presentation",
265
+ "sourceText",
266
+ "losses"
267
+ ]
268
+ }
269
+ },
270
+ "required": [
271
+ "path",
272
+ "mediaType",
273
+ "transportDigest",
274
+ "fidelity"
275
+ ]
276
+ },
277
+ "minItems": 1,
278
+ "maxItems": 32
279
+ },
280
+ "theme": {
281
+ "type": "object",
282
+ "additionalProperties": false,
283
+ "properties": {
284
+ "id": {
285
+ "type": "string",
286
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
287
+ "maxLength": 64
288
+ },
289
+ "version": {
290
+ "type": "string",
291
+ "minLength": 1,
292
+ "maxLength": 64
293
+ }
294
+ },
295
+ "required": [
296
+ "id",
297
+ "version"
298
+ ]
299
+ }
300
+ },
301
+ "required": [
302
+ "kind",
303
+ "schemaVersion",
304
+ "protocolVersion",
305
+ "diagramId",
306
+ "basis",
307
+ "bundle",
308
+ "renderer",
309
+ "outputs"
310
+ ]
311
+ }