@hyprune/schema 0.0.0-stage → 0.5.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 (78) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/LICENSE +21 -0
  3. package/README.md +140 -2
  4. package/bin/validate.mjs +19 -0
  5. package/examples/extension.json +22 -0
  6. package/examples/ipc/error.json +11 -0
  7. package/examples/ipc/movement.set.request.json +8 -0
  8. package/examples/ipc/movement.set.response.json +7 -0
  9. package/examples/ipc/runtime.exit.request.json +6 -0
  10. package/examples/ipc/runtime.exit.response.json +7 -0
  11. package/examples/ipc/runtime.notice.notification.json +9 -0
  12. package/examples/ipc/session.hello.request.json +17 -0
  13. package/examples/ipc/session.hello.response.json +23 -0
  14. package/examples/ipc/session.ping.request.json +6 -0
  15. package/examples/ipc/session.ping.response.json +7 -0
  16. package/examples/ipc/session.revoked.notification.json +7 -0
  17. package/examples/ipc/shell.claim.request.json +10 -0
  18. package/examples/ipc/shell.claim.response.json +8 -0
  19. package/examples/ipc/shell.overlay.request.json +11 -0
  20. package/examples/ipc/shell.overlay.response.json +7 -0
  21. package/examples/ipc/shell.release.request.json +8 -0
  22. package/examples/ipc/shell.release.response.json +7 -0
  23. package/examples/ipc/state.delta.notification.json +18 -0
  24. package/examples/ipc/state.snapshot.request.json +8 -0
  25. package/examples/ipc/state.snapshot.response.json +37 -0
  26. package/examples/ipc/state.subscribe.request.json +10 -0
  27. package/examples/ipc/state.subscribe.response.json +38 -0
  28. package/examples/ipc/state.unsubscribe.request.json +8 -0
  29. package/examples/ipc/state.unsubscribe.response.json +7 -0
  30. package/examples/ipc/surface.focus.request.json +9 -0
  31. package/examples/ipc/surface.focus.response.json +7 -0
  32. package/examples/ipc/world.load.request.json +9 -0
  33. package/examples/ipc/world.load.response.json +7 -0
  34. package/examples/placement-input.json +169 -0
  35. package/examples/screen-type.json +24 -0
  36. package/examples/world.json +111 -0
  37. package/extensions/hud-style-manifest.schema.json +17 -0
  38. package/extensions/hud-style.schema.json +118 -0
  39. package/lib/validate.d.mts +37 -0
  40. package/lib/validate.mjs +221 -0
  41. package/package.json +57 -4
  42. package/v0/common.schema.json +85 -0
  43. package/v0/extension.schema.json +121 -0
  44. package/v0/ipc.schema.json +1725 -0
  45. package/v0/screen-type.schema.json +115 -0
  46. package/v0/world.schema.json +363 -0
  47. package/v0.10/ipc.schema.json +8811 -0
  48. package/v0.11/ipc.schema.json +8863 -0
  49. package/v0.12/ipc.schema.json +9541 -0
  50. package/v0.13/ipc.schema.json +10032 -0
  51. package/v0.14/ipc.schema.json +10127 -0
  52. package/v0.15/ipc.schema.json +10534 -0
  53. package/v0.16/ipc.schema.json +10550 -0
  54. package/v0.17/ipc.schema.json +10703 -0
  55. package/v0.18/ipc.schema.json +10801 -0
  56. package/v0.19/ipc.schema.json +11587 -0
  57. package/v0.2/common.schema.json +86 -0
  58. package/v0.2/ipc.schema.json +3570 -0
  59. package/v0.2/world.schema.json +363 -0
  60. package/v0.3/common.schema.json +477 -0
  61. package/v0.3/ipc.schema.json +4044 -0
  62. package/v0.3/world.schema.json +390 -0
  63. package/v0.4/common.schema.json +477 -0
  64. package/v0.4/ipc.schema.json +5561 -0
  65. package/v0.4/world.schema.json +496 -0
  66. package/v0.5/common.schema.json +477 -0
  67. package/v0.5/ipc.schema.json +5781 -0
  68. package/v0.5/world.schema.json +790 -0
  69. package/v0.6/common.schema.json +478 -0
  70. package/v0.6/input.schema.json +519 -0
  71. package/v0.6/ipc.schema.json +7375 -0
  72. package/v0.6/world.schema.json +1062 -0
  73. package/v0.7/common.schema.json +478 -0
  74. package/v0.7/ipc.schema.json +7905 -0
  75. package/v0.7/world.schema.json +1062 -0
  76. package/v0.8/ipc.schema.json +7945 -0
  77. package/v0.9/input.schema.json +518 -0
  78. package/v0.9/ipc.schema.json +8613 -0
@@ -0,0 +1,478 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hyprune.com/schema/v0.6/common.schema.json",
4
+ "title": "Hyprune 0.3 common",
5
+ "$defs": {
6
+ "id": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "maxLength": 128,
10
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
11
+ },
12
+ "slug": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 64,
16
+ "pattern": "^[a-z][a-z0-9-]*$"
17
+ },
18
+ "version": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "maxLength": 256,
22
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"
23
+ },
24
+ "path": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 512,
28
+ "pattern": "^(?!.*(?:^|/)\\.{1,2}(?:/|$))[A-Za-z0-9_.-]+(?:/[A-Za-z0-9_.-]+)*$"
29
+ },
30
+ "pose": {
31
+ "type": "object",
32
+ "properties": {
33
+ "position": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "number"
37
+ },
38
+ "minItems": 3,
39
+ "maxItems": 3
40
+ },
41
+ "rotation": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "number"
45
+ },
46
+ "minItems": 4,
47
+ "maxItems": 4
48
+ }
49
+ },
50
+ "required": [
51
+ "position",
52
+ "rotation"
53
+ ],
54
+ "additionalProperties": false
55
+ },
56
+ "index": {
57
+ "type": "integer",
58
+ "minimum": 0
59
+ },
60
+ "capability": {
61
+ "enum": [
62
+ "state.read",
63
+ "world.control",
64
+ "surface.control",
65
+ "movement.control",
66
+ "shell.control",
67
+ "runtime.control",
68
+ "data.publish",
69
+ "input.control"
70
+ ]
71
+ },
72
+ "extensions": {
73
+ "type": "object",
74
+ "propertyNames": {
75
+ "$ref": "common.schema.json#/$defs/id"
76
+ },
77
+ "additionalProperties": {
78
+ "type": "object"
79
+ }
80
+ },
81
+ "revision": {
82
+ "type": "integer",
83
+ "minimum": 0,
84
+ "maximum": 9007199254740991
85
+ },
86
+ "mount": {
87
+ "type": "object",
88
+ "properties": {
89
+ "type": {
90
+ "enum": [
91
+ "facade-wall",
92
+ "hanging-wall",
93
+ "wall-inset-console",
94
+ "banner",
95
+ "lectern",
96
+ "operator-desk",
97
+ "field-rig",
98
+ "kiosk-pillar",
99
+ "globe",
100
+ "crate",
101
+ "blast-door-screen",
102
+ "terminal-bench",
103
+ "radar-dish"
104
+ ]
105
+ },
106
+ "role": {
107
+ "enum": [
108
+ "mounted-workspace",
109
+ "tool-mount",
110
+ "data-object"
111
+ ]
112
+ },
113
+ "frameNode": {
114
+ "type": "integer",
115
+ "minimum": 0
116
+ },
117
+ "limits": {
118
+ "type": "object",
119
+ "properties": {
120
+ "minAspect": {
121
+ "type": "number",
122
+ "minimum": 0.05,
123
+ "maximum": 20
124
+ },
125
+ "maxAspect": {
126
+ "type": "number",
127
+ "minimum": 0.05,
128
+ "maximum": 20
129
+ },
130
+ "minSize": {
131
+ "$ref": "common.schema.json#/$defs/size2"
132
+ },
133
+ "maxSize": {
134
+ "$ref": "common.schema.json#/$defs/size2"
135
+ }
136
+ },
137
+ "required": [
138
+ "minAspect",
139
+ "maxAspect",
140
+ "minSize",
141
+ "maxSize"
142
+ ],
143
+ "additionalProperties": false
144
+ },
145
+ "interaction": {
146
+ "enum": [
147
+ "focus-in",
148
+ "in-place",
149
+ "none"
150
+ ]
151
+ }
152
+ },
153
+ "required": [
154
+ "type",
155
+ "role",
156
+ "interaction"
157
+ ],
158
+ "additionalProperties": false
159
+ },
160
+ "area": {
161
+ "type": "object",
162
+ "properties": {
163
+ "id": {
164
+ "$ref": "common.schema.json#/$defs/slug"
165
+ },
166
+ "workspaceSlot": {
167
+ "type": "string",
168
+ "pattern": "^[0-9]{2,4}$"
169
+ },
170
+ "primaryAnchor": {
171
+ "$ref": "common.schema.json#/$defs/slug"
172
+ },
173
+ "toolAnchors": {
174
+ "type": "array",
175
+ "items": {
176
+ "$ref": "common.schema.json#/$defs/slug"
177
+ },
178
+ "maxItems": 128
179
+ },
180
+ "dataAnchors": {
181
+ "type": "array",
182
+ "items": {
183
+ "$ref": "common.schema.json#/$defs/slug"
184
+ },
185
+ "maxItems": 128
186
+ },
187
+ "theme": {
188
+ "type": "string",
189
+ "maxLength": 256
190
+ },
191
+ "spawnId": {
192
+ "$ref": "common.schema.json#/$defs/slug"
193
+ },
194
+ "freePlacementZones": {
195
+ "type": "array",
196
+ "items": {
197
+ "$ref": "common.schema.json#/$defs/slug"
198
+ },
199
+ "maxItems": 32
200
+ }
201
+ },
202
+ "required": [
203
+ "id",
204
+ "workspaceSlot",
205
+ "primaryAnchor",
206
+ "toolAnchors",
207
+ "dataAnchors",
208
+ "theme"
209
+ ],
210
+ "additionalProperties": false
211
+ },
212
+ "atmosphere": {
213
+ "type": "object",
214
+ "properties": {
215
+ "fog": {
216
+ "type": "object",
217
+ "properties": {
218
+ "color": {
219
+ "$ref": "common.schema.json#/$defs/vec3"
220
+ },
221
+ "density": {
222
+ "type": "number",
223
+ "minimum": 0,
224
+ "maximum": 1
225
+ },
226
+ "heightFalloff": {
227
+ "type": "number",
228
+ "minimum": 0,
229
+ "maximum": 10
230
+ },
231
+ "baseHeight": {
232
+ "type": "number",
233
+ "minimum": -10000,
234
+ "maximum": 10000
235
+ },
236
+ "excludeUnlit": {
237
+ "type": "boolean"
238
+ }
239
+ },
240
+ "required": [
241
+ "color",
242
+ "density",
243
+ "heightFalloff",
244
+ "baseHeight",
245
+ "excludeUnlit"
246
+ ],
247
+ "additionalProperties": false
248
+ },
249
+ "sky": {
250
+ "type": "object",
251
+ "properties": {
252
+ "zenith": {
253
+ "$ref": "common.schema.json#/$defs/vec3"
254
+ },
255
+ "horizon": {
256
+ "$ref": "common.schema.json#/$defs/vec3"
257
+ },
258
+ "ground": {
259
+ "$ref": "common.schema.json#/$defs/vec3"
260
+ },
261
+ "sun": {
262
+ "type": "object",
263
+ "properties": {
264
+ "direction": {
265
+ "$ref": "common.schema.json#/$defs/vec3"
266
+ },
267
+ "color": {
268
+ "$ref": "common.schema.json#/$defs/vec3"
269
+ },
270
+ "intensity": {
271
+ "type": "number",
272
+ "minimum": 0,
273
+ "maximum": 10000
274
+ },
275
+ "angularRadius": {
276
+ "type": "number",
277
+ "minimum": 0.001,
278
+ "maximum": 1
279
+ }
280
+ },
281
+ "required": [
282
+ "direction",
283
+ "color",
284
+ "intensity",
285
+ "angularRadius"
286
+ ],
287
+ "additionalProperties": false
288
+ }
289
+ },
290
+ "required": [
291
+ "zenith",
292
+ "horizon",
293
+ "ground",
294
+ "sun"
295
+ ],
296
+ "additionalProperties": false
297
+ },
298
+ "environment": {
299
+ "type": "object",
300
+ "properties": {
301
+ "faces": {
302
+ "type": "array",
303
+ "items": {
304
+ "$ref": "common.schema.json#/$defs/path"
305
+ },
306
+ "minItems": 6,
307
+ "maxItems": 6
308
+ },
309
+ "encoding": {
310
+ "enum": [
311
+ "srgb",
312
+ "linear"
313
+ ]
314
+ },
315
+ "intensity": {
316
+ "type": "number",
317
+ "minimum": 0,
318
+ "maximum": 10000
319
+ },
320
+ "rotation": {
321
+ "type": "number",
322
+ "minimum": -6.283186,
323
+ "maximum": 6.283186
324
+ },
325
+ "maxResolution": {
326
+ "type": "integer",
327
+ "minimum": 16,
328
+ "maximum": 512
329
+ }
330
+ },
331
+ "required": [
332
+ "faces",
333
+ "encoding",
334
+ "intensity",
335
+ "rotation",
336
+ "maxResolution"
337
+ ],
338
+ "additionalProperties": false
339
+ },
340
+ "exposure": {
341
+ "type": "number",
342
+ "minimum": 0.01,
343
+ "maximum": 100
344
+ },
345
+ "toneMapping": {
346
+ "enum": [
347
+ "aces",
348
+ "reinhard",
349
+ "linear"
350
+ ]
351
+ },
352
+ "bloom": {
353
+ "type": "object",
354
+ "properties": {
355
+ "strength": {
356
+ "type": "number",
357
+ "minimum": 0,
358
+ "maximum": 2
359
+ },
360
+ "threshold": {
361
+ "type": "number",
362
+ "minimum": 0,
363
+ "maximum": 100
364
+ },
365
+ "radius": {
366
+ "type": "number",
367
+ "minimum": 1,
368
+ "maximum": 8
369
+ }
370
+ },
371
+ "required": [
372
+ "strength",
373
+ "threshold",
374
+ "radius"
375
+ ],
376
+ "additionalProperties": false
377
+ }
378
+ },
379
+ "required": [
380
+ "fog",
381
+ "sky",
382
+ "exposure",
383
+ "toneMapping",
384
+ "bloom"
385
+ ],
386
+ "additionalProperties": false
387
+ },
388
+ "vec3": {
389
+ "type": "array",
390
+ "items": {
391
+ "type": "number"
392
+ },
393
+ "minItems": 3,
394
+ "maxItems": 3
395
+ },
396
+ "size2": {
397
+ "type": "array",
398
+ "items": {
399
+ "type": "number",
400
+ "exclusiveMinimum": 0
401
+ },
402
+ "minItems": 2,
403
+ "maxItems": 2
404
+ },
405
+ "placementZone": {
406
+ "type": "object",
407
+ "properties": {
408
+ "id": {
409
+ "$ref": "common.schema.json#/$defs/slug"
410
+ },
411
+ "bounds": {
412
+ "type": "object",
413
+ "properties": {
414
+ "min": {
415
+ "$ref": "common.schema.json#/$defs/vec3"
416
+ },
417
+ "max": {
418
+ "$ref": "common.schema.json#/$defs/vec3"
419
+ }
420
+ },
421
+ "required": [
422
+ "min",
423
+ "max"
424
+ ],
425
+ "additionalProperties": false
426
+ },
427
+ "windowSizes": {
428
+ "type": "array",
429
+ "items": {
430
+ "$ref": "common.schema.json#/$defs/size2"
431
+ },
432
+ "maxItems": 8,
433
+ "minItems": 1
434
+ },
435
+ "clearance": {
436
+ "type": "number",
437
+ "minimum": 0.04,
438
+ "maximum": 1
439
+ }
440
+ },
441
+ "required": [
442
+ "id",
443
+ "bounds",
444
+ "windowSizes",
445
+ "clearance"
446
+ ],
447
+ "additionalProperties": false
448
+ },
449
+ "dataObject": {
450
+ "type": "object",
451
+ "properties": {
452
+ "id": {
453
+ "$ref": "common.schema.json#/$defs/slug"
454
+ },
455
+ "areaId": {
456
+ "$ref": "common.schema.json#/$defs/slug"
457
+ },
458
+ "pose": {
459
+ "$ref": "common.schema.json#/$defs/pose"
460
+ },
461
+ "mount": {
462
+ "$ref": "common.schema.json#/$defs/mount"
463
+ },
464
+ "node": {
465
+ "type": "integer",
466
+ "minimum": 0
467
+ }
468
+ },
469
+ "required": [
470
+ "id",
471
+ "areaId",
472
+ "pose",
473
+ "mount"
474
+ ],
475
+ "additionalProperties": false
476
+ }
477
+ }
478
+ }