@freedome/protocol 1.0.0 → 1.1.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.
package/dist/validate.cjs CHANGED
@@ -4318,6 +4318,4070 @@ var schemaBundle = {
4318
4318
  }
4319
4319
  }
4320
4320
  },
4321
+ "https://freedome.nativemind.us/schemas/api/1.1/api-key.schema.json": {
4322
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4323
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/api-key.schema.json",
4324
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). API key `fdk_<id>_<secret>` (02e \xA73.6, \xA75.1 /api-keys, scope keys:manage). The secret is returned once (#/$defs/created); stored as a hash only.",
4325
+ title: "API key",
4326
+ allOf: [{ $ref: "#/$defs/apiKey" }],
4327
+ $defs: {
4328
+ apiKey: {
4329
+ type: "object",
4330
+ required: ["id", "name", "role", "scopes", "createdAt"],
4331
+ properties: {
4332
+ id: { $ref: "#/$defs/keyId" },
4333
+ name: { type: "string", minLength: 1, maxLength: 128 },
4334
+ role: { $ref: "auth.schema.json#/$defs/role" },
4335
+ scopes: { $ref: "auth.schema.json#/$defs/scopes" },
4336
+ prefix: {
4337
+ type: "string",
4338
+ pattern: "^fdk_[a-z0-9]{8,32}$",
4339
+ description: "public part of the token (fdk_<id>) for recognition in logs"
4340
+ },
4341
+ createdBy: { type: "string" },
4342
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
4343
+ expiresAt: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }, { type: "null" }] },
4344
+ lastUsedAt: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }, { type: "null" }] },
4345
+ revokedAt: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }, { type: "null" }] }
4346
+ },
4347
+ patternProperties: { "^x-": true },
4348
+ additionalProperties: false
4349
+ },
4350
+ keyId: { type: "string", pattern: "^[a-z0-9]{8,32}$" },
4351
+ input: {
4352
+ description: "POST /api-keys. A key never gets more than the caller's own role.",
4353
+ type: "object",
4354
+ required: ["name", "role"],
4355
+ properties: {
4356
+ name: { type: "string", minLength: 1, maxLength: 128 },
4357
+ role: { $ref: "auth.schema.json#/$defs/role" },
4358
+ scopes: { $ref: "auth.schema.json#/$defs/scopes", description: "optional narrowing of the role's scopes" },
4359
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
4360
+ },
4361
+ additionalProperties: false
4362
+ },
4363
+ created: {
4364
+ description: "201 body of POST /api-keys: the key plus its token, shown once.",
4365
+ type: "object",
4366
+ required: ["key", "token"],
4367
+ properties: {
4368
+ key: { $ref: "#/$defs/apiKey" },
4369
+ token: { type: "string", pattern: "^fdk_[a-z0-9]{8,32}_[A-Za-z0-9]{32,128}$" }
4370
+ },
4371
+ additionalProperties: false
4372
+ },
4373
+ page: {
4374
+ type: "object",
4375
+ required: ["items", "nextCursor"],
4376
+ properties: {
4377
+ items: { type: "array", items: { $ref: "#/$defs/apiKey" } },
4378
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
4379
+ count: { type: "integer", minimum: 0 }
4380
+ },
4381
+ additionalProperties: false
4382
+ }
4383
+ }
4384
+ },
4385
+ "https://freedome.nativemind.us/schemas/api/1.1/app-payload.schema.json": {
4386
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4387
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/app-payload.schema.json",
4388
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Ecosystem-app content (02e \xA75.6 POST /apps/{app}/payloads) rendered by the app-content renderer (asset type realtime); replaces integration-event / integrateApp. Root = request body.",
4389
+ title: "App payload",
4390
+ type: "object",
4391
+ required: ["kind", "data"],
4392
+ properties: {
4393
+ kind: {
4394
+ anyOf: [{ enum: ["scene", "overlay", "state"] }, { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }]
4395
+ },
4396
+ schema: {
4397
+ type: "string",
4398
+ format: "uri",
4399
+ description: "$id of the app's payload schema (app payload registry, 4.CT.4)"
4400
+ },
4401
+ data: { description: "app-defined JSON (\u2264 1 MB)" },
4402
+ ttlSec: { type: "integer", minimum: 1, maximum: 86400, default: 300 },
4403
+ target: {
4404
+ type: "object",
4405
+ properties: {
4406
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/venueRef" },
4407
+ playerId: { $ref: "../../common/1.0/ids.schema.json#/$defs/playerRef" }
4408
+ },
4409
+ additionalProperties: false
4410
+ }
4411
+ },
4412
+ patternProperties: { "^x-": true },
4413
+ additionalProperties: false,
4414
+ $defs: {
4415
+ published: {
4416
+ description: "Response of publishAppPayload and the `data.resource` of event app.payload.",
4417
+ type: "object",
4418
+ required: ["id", "app", "kind", "expiresAt"],
4419
+ properties: {
4420
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
4421
+ app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" },
4422
+ kind: { type: "string" },
4423
+ schema: { type: "string" },
4424
+ data: {},
4425
+ publishedBy: { type: "string" },
4426
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
4427
+ },
4428
+ additionalProperties: false
4429
+ }
4430
+ }
4431
+ },
4432
+ "https://freedome.nativemind.us/schemas/api/1.1/asset.schema.json": {
4433
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4434
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/asset.schema.json",
4435
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Stored asset (02e \xA74, \xA75.4) = .dome asset fields + storage (sha256, size, status, probe data, thumbnails). Root = GET /assets/{assetId}.",
4436
+ title: "Asset",
4437
+ allOf: [{ $ref: "#/$defs/asset" }],
4438
+ $defs: {
4439
+ asset: {
4440
+ type: "object",
4441
+ required: ["id", "name", "type", "status", "revision", "createdAt"],
4442
+ properties: {
4443
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4444
+ name: {
4445
+ type: "string",
4446
+ minLength: 1,
4447
+ maxLength: 512,
4448
+ description: "original file name (with extension) or a title"
4449
+ },
4450
+ type: { $ref: "#/$defs/type" },
4451
+ src: {
4452
+ type: "string",
4453
+ description: "external URI for registered (not stored) assets; absent for stored blobs. Type stream: also spout://<sender>, syphon://<app>/<server>, dmabuf://<pipewire-node>, v4l2:///dev/<device>, ndi://<source> (percent-encoded, docs/audio-reactive.md)"
4454
+ },
4455
+ texture: { $ref: "#/$defs/texture" },
4456
+ mediaType: { $ref: "../../common/1.0/units.schema.json#/$defs/mediaType" },
4457
+ sha256: { $ref: "../../common/1.0/ids.schema.json#/$defs/sha256" },
4458
+ size: { type: "integer", minimum: 0 },
4459
+ status: { $ref: "#/$defs/status" },
4460
+ problem: {
4461
+ $ref: "../../common/1.0/problem.schema.json",
4462
+ description: "why the asset failed (e.g. upload-checksum-mismatch)"
4463
+ },
4464
+ progress: {
4465
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4466
+ description: "upload / processing progress"
4467
+ },
4468
+ mapping: { $ref: "../../dome/1.1/dome.schema.json#/$defs/mapping" },
4469
+ media: { $ref: "#/$defs/media" },
4470
+ thumbnails: {
4471
+ type: "array",
4472
+ items: {
4473
+ type: "object",
4474
+ required: ["size", "url"],
4475
+ properties: { size: { type: "integer", minimum: 16 }, url: { type: "string", format: "uri-reference" } },
4476
+ additionalProperties: false
4477
+ }
4478
+ },
4479
+ tags: { type: "array", items: { type: "string", minLength: 1, maxLength: 64 }, uniqueItems: true },
4480
+ usedBy: {
4481
+ type: "array",
4482
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4483
+ description: "ids of shows referencing the asset"
4484
+ },
4485
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
4486
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
4487
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
4488
+ },
4489
+ patternProperties: { "^x-": true },
4490
+ additionalProperties: false,
4491
+ allOf: [
4492
+ {
4493
+ if: { properties: { status: { const: "failed" } }, required: ["status"] },
4494
+ then: { required: ["problem"] }
4495
+ }
4496
+ ]
4497
+ },
4498
+ textureTransport: {
4499
+ description: "Shared GPU texture or spare network transport of a live source. Open list.",
4500
+ anyOf: [
4501
+ { enum: ["spout", "syphon", "dmabuf", "capture", "ndi"] },
4502
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
4503
+ ]
4504
+ },
4505
+ texture: {
4506
+ description: "Stream asset fed by another application on the engine's machine (derived by the server from `src`, read-only).",
4507
+ type: "object",
4508
+ required: ["transport", "sender"],
4509
+ properties: {
4510
+ transport: { $ref: "#/$defs/textureTransport" },
4511
+ sender: {
4512
+ type: "string",
4513
+ minLength: 1,
4514
+ maxLength: 256,
4515
+ description: "Spout sender, Syphon server, PipeWire node, capture device or NDI source name"
4516
+ },
4517
+ application: { type: "string", maxLength: 256, description: "Syphon application name" },
4518
+ fallbackUrl: { type: "string", format: "uri" }
4519
+ },
4520
+ additionalProperties: false
4521
+ },
4522
+ textureSource: {
4523
+ description: "A live source seen by the engine (GET /venues/{venueId}/texture-sources, event textureSource.state).",
4524
+ type: "object",
4525
+ required: ["id", "transport", "sender", "status"],
4526
+ properties: {
4527
+ id: {
4528
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4529
+ description: "server-assigned, stable while the sender keeps its name"
4530
+ },
4531
+ transport: { $ref: "#/$defs/textureTransport" },
4532
+ sender: { type: "string", minLength: 1, maxLength: 256 },
4533
+ application: { type: "string", maxLength: 256 },
4534
+ status: { anyOf: [{ enum: ["online", "offline"] }, { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }] },
4535
+ width: { type: "integer", minimum: 1 },
4536
+ height: { type: "integer", minimum: 1 },
4537
+ fps: { type: "number", minimum: 0, description: "frames per second measured by the engine" },
4538
+ pixelFormat: { type: "string", maxLength: 32 },
4539
+ assetId: {
4540
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4541
+ description: "the stream asset bound to this source, if any"
4542
+ },
4543
+ node: { type: "string", maxLength: 64, description: "node whose engine sees the source" },
4544
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
4545
+ },
4546
+ patternProperties: { "^x-": true },
4547
+ additionalProperties: false
4548
+ },
4549
+ textureSourcePage: {
4550
+ type: "object",
4551
+ required: ["items", "nextCursor"],
4552
+ properties: {
4553
+ items: { type: "array", items: { $ref: "#/$defs/textureSource" } },
4554
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
4555
+ },
4556
+ additionalProperties: false
4557
+ },
4558
+ type: {
4559
+ anyOf: [
4560
+ { enum: ["video", "image", "audio", "zelim", "boranko", "comics", "realtime", "stream", "dome", "other"] },
4561
+ { type: "string", pattern: "^[a-z][a-z0-9._-]{0,63}$" }
4562
+ ]
4563
+ },
4564
+ status: {
4565
+ anyOf: [
4566
+ { enum: ["uploading", "processing", "ready", "failed"] },
4567
+ { type: "string", pattern: "^[a-z_]{1,32}$" }
4568
+ ]
4569
+ },
4570
+ media: {
4571
+ description: "Probe result (ffprobe): container, streams, duration. `probeUnavailable` when the server has no prober (asset still ready).",
4572
+ type: "object",
4573
+ properties: {
4574
+ container: { type: "string" },
4575
+ duration: { $ref: "../../common/1.0/units.schema.json#/$defs/seconds" },
4576
+ video: {
4577
+ type: "object",
4578
+ properties: {
4579
+ codec: { type: "string" },
4580
+ resolution: { type: "array", items: { type: "integer", minimum: 1 }, minItems: 2, maxItems: 2 },
4581
+ fps: { type: "number", exclusiveMinimum: 0 },
4582
+ bitDepth: { type: "integer", minimum: 1 },
4583
+ pixelFormat: { type: "string" }
4584
+ },
4585
+ additionalProperties: true
4586
+ },
4587
+ audio: {
4588
+ type: "object",
4589
+ properties: {
4590
+ codec: { type: "string" },
4591
+ channels: { type: "integer", minimum: 1 },
4592
+ layout: { type: "string" },
4593
+ sampleRate: { type: "integer", minimum: 1 },
4594
+ ambisonicOrder: { type: "integer", minimum: 0, maximum: 7 }
4595
+ },
4596
+ additionalProperties: true
4597
+ },
4598
+ probeUnavailable: { type: "boolean" }
4599
+ },
4600
+ additionalProperties: true
4601
+ },
4602
+ input: {
4603
+ description: "POST /assets JSON body: register a finished tus upload or an external URL (streams, CDN).",
4604
+ type: "object",
4605
+ properties: {
4606
+ uploadId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
4607
+ url: { type: "string", format: "uri" },
4608
+ id: {
4609
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4610
+ description: "client-chosen id (e.g. the .dome asset id); default UUIDv7"
4611
+ },
4612
+ name: { type: "string", minLength: 1, maxLength: 512 },
4613
+ type: { $ref: "#/$defs/type" },
4614
+ mapping: { $ref: "../../dome/1.1/dome.schema.json#/$defs/mapping" },
4615
+ tags: { type: "array", items: { type: "string", minLength: 1, maxLength: 64 }, uniqueItems: true },
4616
+ sha256: {
4617
+ $ref: "../../common/1.0/ids.schema.json#/$defs/sha256",
4618
+ description: "expected digest of a URL asset (verified on fetch)"
4619
+ },
4620
+ fallbackUrl: {
4621
+ type: "string",
4622
+ format: "uri",
4623
+ description: "stream assets: source to use while `url` is unavailable, e.g. ndi://\u2026"
4624
+ }
4625
+ },
4626
+ additionalProperties: false,
4627
+ oneOf: [{ required: ["uploadId"] }, { required: ["url"] }]
4628
+ },
4629
+ multipart: {
4630
+ description: "POST /assets multipart/form-data body (simple upload \u2264 100 MB): part `file` + optional JSON fields.",
4631
+ type: "object",
4632
+ required: ["file"],
4633
+ properties: {
4634
+ file: { type: "string", contentMediaType: "application/octet-stream" },
4635
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4636
+ type: { $ref: "#/$defs/type" },
4637
+ tags: { type: "string", description: "comma-separated" }
4638
+ }
4639
+ },
4640
+ patch: {
4641
+ type: "object",
4642
+ minProperties: 1,
4643
+ properties: {
4644
+ name: { type: "string", minLength: 1, maxLength: 512 },
4645
+ type: { $ref: "#/$defs/type" },
4646
+ mapping: { $ref: "../../dome/1.1/dome.schema.json#/$defs/mapping" },
4647
+ tags: { type: "array", items: { type: "string", minLength: 1, maxLength: 64 }, uniqueItems: true }
4648
+ },
4649
+ patternProperties: { "^x-": true },
4650
+ additionalProperties: false
4651
+ },
4652
+ page: {
4653
+ type: "object",
4654
+ required: ["items", "nextCursor"],
4655
+ properties: {
4656
+ items: { type: "array", items: { $ref: "#/$defs/asset" } },
4657
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
4658
+ count: { type: "integer", minimum: 0 }
4659
+ },
4660
+ additionalProperties: false
4661
+ },
4662
+ storage: {
4663
+ description: "GET /storage (replaces /api/v1/content/stats).",
4664
+ type: "object",
4665
+ required: ["totalBytes", "usedBytes", "freeBytes"],
4666
+ properties: {
4667
+ totalBytes: { type: "integer", minimum: 0 },
4668
+ usedBytes: { type: "integer", minimum: 0 },
4669
+ freeBytes: { type: "integer", minimum: 0 },
4670
+ quotaBytes: { anyOf: [{ type: "integer", minimum: 0 }, { type: "null" }] },
4671
+ assets: { $ref: "#/$defs/countBytes" },
4672
+ uploads: { $ref: "#/$defs/countBytes" },
4673
+ byType: { type: "object", additionalProperties: { $ref: "#/$defs/countBytes" } }
4674
+ },
4675
+ additionalProperties: false
4676
+ },
4677
+ countBytes: {
4678
+ type: "object",
4679
+ required: ["count", "bytes"],
4680
+ properties: { count: { type: "integer", minimum: 0 }, bytes: { type: "integer", minimum: 0 } },
4681
+ additionalProperties: false
4682
+ }
4683
+ }
4684
+ },
4685
+ "https://freedome.nativemind.us/schemas/api/1.1/audio-reactive.schema.json": {
4686
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4687
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/audio-reactive.schema.json",
4688
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Live audio analysis (produced by anAntaDigital, L1) and AudioReactive scenes (executed by the media server, L3): sdd-360-art-center 02-specifications \xA70, docs/audio-reactive.md. Root = GET /venues/{venueId}/audio/reactive.",
4689
+ title: "AudioReactive state",
4690
+ allOf: [{ $ref: "#/$defs/state" }],
4691
+ $defs: {
4692
+ status: {
4693
+ description: "Service status. Open list.",
4694
+ anyOf: [
4695
+ { enum: ["disabled", "starting", "running", "degraded", "down"] },
4696
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
4697
+ ]
4698
+ },
4699
+ metric: {
4700
+ description: "A value of the analysis frame. rms, peak: envelope; subBass, mid, highMid, treble: bands; centroid: spectral brightness; onset: attack strength. Open list.",
4701
+ anyOf: [
4702
+ { enum: ["rms", "peak", "subBass", "mid", "highMid", "treble", "centroid", "onset"] },
4703
+ { type: "string", pattern: "^[a-z][A-Za-z0-9]{0,31}$" }
4704
+ ]
4705
+ },
4706
+ bands: {
4707
+ description: "Band energies, each 0..1. Fixed ranges: subBass 30\u2013150 Hz, mid 150\u2013800 Hz, highMid 800\u20134000 Hz, treble 4000\u201316000 Hz.",
4708
+ type: "object",
4709
+ required: ["subBass", "mid", "highMid", "treble"],
4710
+ properties: {
4711
+ subBass: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4712
+ mid: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4713
+ highMid: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4714
+ treble: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" }
4715
+ },
4716
+ additionalProperties: false
4717
+ },
4718
+ frame: {
4719
+ description: "One analysis frame of one input (event audio.analysis). rms, peak and bands are linear amplitude relative to full scale, clamped to 0..1, after the input's envelope (a voice at -24 dBFS reads 0.06). Scene smoothing is applied after this.",
4720
+ type: "object",
4721
+ required: ["inputId", "frame", "captureUs", "rms", "peak", "bands", "centroid", "onset"],
4722
+ properties: {
4723
+ inputId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4724
+ frame: { type: "integer", minimum: 0, description: "frame counter of this input since the analysis started" },
4725
+ captureUs: {
4726
+ type: "integer",
4727
+ minimum: 0,
4728
+ description: "start of the audio block on the analysis node's monotonic clock, \xB5s; comparable only on that node"
4729
+ },
4730
+ rms: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4731
+ peak: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4732
+ rmsDb: { type: "number", description: "dBFS, before normalisation" },
4733
+ peakDb: { type: "number", description: "dBFS, before normalisation" },
4734
+ bands: { $ref: "#/$defs/bands" },
4735
+ centroid: {
4736
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4737
+ description: "centroidHz on a log scale over the input's centroidRange"
4738
+ },
4739
+ centroidHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
4740
+ onset: {
4741
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4742
+ description: "attack strength of this frame; 0 = no attack"
4743
+ },
4744
+ gated: { type: "boolean", description: "the input is below its gate: normalised values are 0" }
4745
+ },
4746
+ patternProperties: { "^x-": true },
4747
+ additionalProperties: false
4748
+ },
4749
+ onset: {
4750
+ description: "One detected attack (event audio.onset).",
4751
+ type: "object",
4752
+ required: ["inputId", "frame", "captureUs", "strength"],
4753
+ properties: {
4754
+ inputId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4755
+ frame: { type: "integer", minimum: 0 },
4756
+ captureUs: { type: "integer", minimum: 0 },
4757
+ strength: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4758
+ band: {
4759
+ enum: ["subBass", "mid", "highMid", "treble"],
4760
+ description: "band with the largest energy rise, when known"
4761
+ }
4762
+ },
4763
+ patternProperties: { "^x-": true },
4764
+ additionalProperties: false
4765
+ },
4766
+ input: {
4767
+ description: "One analysed input (a vocal microphone, an instrument group, a mix).",
4768
+ type: "object",
4769
+ required: ["id"],
4770
+ properties: {
4771
+ id: {
4772
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4773
+ description: "name used by scenes, e.g. vocal, drums, mix"
4774
+ },
4775
+ label: { type: "string", maxLength: 128 },
4776
+ device: {
4777
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4778
+ description: "audio device id (GET \u2026/audio/devices); default = the engine's default capture device"
4779
+ },
4780
+ channels: {
4781
+ type: "array",
4782
+ items: { type: "integer", minimum: 1, maximum: 1024 },
4783
+ minItems: 1,
4784
+ maxItems: 64,
4785
+ uniqueItems: true,
4786
+ description: "1-based capture channels, summed to mono; default [1]"
4787
+ },
4788
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
4789
+ gateDb: { type: "number", minimum: -144, maximum: 0, description: "noise gate threshold, dBFS" },
4790
+ envelope: {
4791
+ type: "object",
4792
+ properties: {
4793
+ attackMs: { type: "number", minimum: 0, maximum: 1e4, default: 8 },
4794
+ decayMs: { type: "number", minimum: 0, maximum: 1e4, default: 120 }
4795
+ },
4796
+ additionalProperties: false
4797
+ },
4798
+ onset: {
4799
+ type: "object",
4800
+ properties: {
4801
+ threshold: {
4802
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4803
+ description: "detector sensitivity: 0 = most sensitive"
4804
+ },
4805
+ refractoryMs: {
4806
+ type: "number",
4807
+ minimum: 0,
4808
+ maximum: 1e4,
4809
+ description: "minimum time between two onsets"
4810
+ }
4811
+ },
4812
+ additionalProperties: false
4813
+ },
4814
+ centroidRange: {
4815
+ description: "Frequencies that map to centroid 0 and 1.",
4816
+ type: "object",
4817
+ required: ["minHz", "maxHz"],
4818
+ properties: {
4819
+ minHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
4820
+ maxHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" }
4821
+ },
4822
+ additionalProperties: false
4823
+ }
4824
+ },
4825
+ patternProperties: { "^x-": true },
4826
+ additionalProperties: false
4827
+ },
4828
+ analysisSettings: {
4829
+ description: "PUT /venues/{venueId}/audio/analysis body: replaces the whole list of inputs.",
4830
+ type: "object",
4831
+ required: ["enabled", "inputs"],
4832
+ properties: {
4833
+ enabled: { type: "boolean" },
4834
+ inputs: { type: "array", items: { $ref: "#/$defs/input" }, maxItems: 64 }
4835
+ },
4836
+ additionalProperties: false
4837
+ },
4838
+ analysisState: {
4839
+ description: "GET /venues/{venueId}/audio/analysis, event audioAnalysis.state.",
4840
+ type: "object",
4841
+ required: ["venueId", "enabled", "status", "inputs"],
4842
+ properties: {
4843
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/venueRef" },
4844
+ enabled: { type: "boolean" },
4845
+ status: { $ref: "#/$defs/status" },
4846
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
4847
+ engine: { type: "string", description: "engine that runs the analysis, `<kind>@<node>`" },
4848
+ sampleRate: { type: "integer", minimum: 1 },
4849
+ blockSize: { type: "integer", minimum: 1 },
4850
+ inputs: { type: "array", items: { $ref: "#/$defs/input" }, maxItems: 64 }
4851
+ },
4852
+ patternProperties: { "^x-": true },
4853
+ additionalProperties: false
4854
+ },
4855
+ smoothing: {
4856
+ description: "Asymmetric smoothing of the mapped value, applied by the media server.",
4857
+ type: "object",
4858
+ properties: {
4859
+ attackMs: { type: "number", minimum: 0, maximum: 1e4 },
4860
+ decayMs: { type: "number", minimum: 0, maximum: 1e4 }
4861
+ },
4862
+ additionalProperties: false
4863
+ },
4864
+ range: {
4865
+ description: "Linear map before the curve. inMax > inMin (422 otherwise); outMin > outMax inverts. Defaults 0, 1, 0, 1.",
4866
+ type: "object",
4867
+ properties: {
4868
+ inMin: { type: "number" },
4869
+ inMax: { type: "number" },
4870
+ outMin: { type: "number" },
4871
+ outMax: { type: "number" }
4872
+ },
4873
+ additionalProperties: false
4874
+ },
4875
+ target: {
4876
+ description: "Where a mapping goes. kind osc: an OSC address of an outbound gateway. Open list: a server that does not know a kind answers 422.",
4877
+ type: "object",
4878
+ required: ["kind"],
4879
+ properties: {
4880
+ kind: { anyOf: [{ enum: ["osc"] }, { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }] },
4881
+ gateway: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId", description: "gateway id, e.g. resolume" },
4882
+ address: {
4883
+ type: "string",
4884
+ pattern: "^/[^\\s#*,?\\[\\]{}]*$",
4885
+ description: "concrete address, e.g. /composition/layers/1/video/opacity"
4886
+ },
4887
+ type: { enum: ["f", "i"], description: "OSC argument type" },
4888
+ value: { type: "number", description: "trigger mode: the argument to send; default 1" }
4889
+ },
4890
+ if: { properties: { kind: { const: "osc" } }, required: ["kind"] },
4891
+ then: { required: ["gateway", "address", "type"] },
4892
+ patternProperties: { "^x-": true },
4893
+ additionalProperties: false
4894
+ },
4895
+ mapping: {
4896
+ description: "One metric \u2192 one target. continuous: the mapped value is sent on every frame it changes. trigger: one message when the metric rises through `threshold`, then nothing for `cooldownMs`.",
4897
+ type: "object",
4898
+ required: ["id", "mode", "source", "target"],
4899
+ properties: {
4900
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4901
+ mode: { enum: ["continuous", "trigger"] },
4902
+ source: {
4903
+ type: "object",
4904
+ required: ["input", "metric"],
4905
+ properties: {
4906
+ input: {
4907
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4908
+ description: "input id of the analysis settings"
4909
+ },
4910
+ metric: { $ref: "#/$defs/metric" }
4911
+ },
4912
+ additionalProperties: false
4913
+ },
4914
+ range: { $ref: "#/$defs/range" },
4915
+ curve: {
4916
+ anyOf: [
4917
+ { enum: ["linear", "exp", "log", "s-curve"] },
4918
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
4919
+ ],
4920
+ default: "linear",
4921
+ description: "for t in 0..1: linear t; exp t\xB2; log log10(1 + 9t); s-curve 3t\xB2 \u2212 2t\xB3"
4922
+ },
4923
+ smoothing: { $ref: "#/$defs/smoothing" },
4924
+ threshold: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4925
+ cooldownMs: { type: "number", minimum: 0, maximum: 6e4 },
4926
+ target: { $ref: "#/$defs/target" }
4927
+ },
4928
+ if: { properties: { mode: { const: "trigger" } }, required: ["mode"] },
4929
+ then: { required: ["threshold"] },
4930
+ patternProperties: { "^x-": true },
4931
+ additionalProperties: false
4932
+ },
4933
+ sceneBody: {
4934
+ type: "object",
4935
+ properties: {
4936
+ title: { $ref: "../../common/1.0/i18n-text.schema.json#/$defs/textOrI18n" },
4937
+ description: { $ref: "../../common/1.0/i18n-text.schema.json#/$defs/textOrI18n" },
4938
+ mappings: { type: "array", items: { $ref: "#/$defs/mapping" }, maxItems: 256 }
4939
+ },
4940
+ patternProperties: { "^x-": true }
4941
+ },
4942
+ scene: {
4943
+ description: "A scene is data: which metrics drive which targets. Mapping ids are unique within the scene.",
4944
+ type: "object",
4945
+ allOf: [{ $ref: "#/$defs/sceneBody" }],
4946
+ required: ["id", "title", "revision", "mappings"],
4947
+ properties: {
4948
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4949
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
4950
+ },
4951
+ unevaluatedProperties: false
4952
+ },
4953
+ sceneInput: {
4954
+ description: "PUT \u2026/audio/reactive/scenes/{sceneId} body.",
4955
+ type: "object",
4956
+ allOf: [{ $ref: "#/$defs/sceneBody" }],
4957
+ required: ["title", "mappings"],
4958
+ unevaluatedProperties: false
4959
+ },
4960
+ scenePage: {
4961
+ type: "object",
4962
+ required: ["items", "nextCursor"],
4963
+ properties: {
4964
+ items: { type: "array", items: { $ref: "#/$defs/scene" } },
4965
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
4966
+ },
4967
+ additionalProperties: false
4968
+ },
4969
+ state: {
4970
+ description: "GET /venues/{venueId}/audio/reactive, event audioReactive.state.",
4971
+ type: "object",
4972
+ required: ["venueId", "enabled", "status", "activeSceneId", "intensity"],
4973
+ properties: {
4974
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/venueRef" },
4975
+ enabled: { type: "boolean" },
4976
+ status: { $ref: "#/$defs/status" },
4977
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
4978
+ activeSceneId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
4979
+ intensity: {
4980
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4981
+ description: "master amount of all continuous mappings"
4982
+ },
4983
+ stats: {
4984
+ type: "object",
4985
+ additionalProperties: { type: "number" },
4986
+ description: "counters, e.g. framesIn, messagesOut, framesDropped"
4987
+ },
4988
+ resolume: {
4989
+ $ref: "gateway.schema.json#/$defs/resolumeStatus",
4990
+ description: "connection status of gateway `resolume`, the same object as its gateway member, so that playback:read can see it without gateways:manage; absent when no such gateway is configured. Read-only."
4991
+ }
4992
+ },
4993
+ patternProperties: { "^x-": true },
4994
+ additionalProperties: false
4995
+ },
4996
+ patch: {
4997
+ description: "PATCH /venues/{venueId}/audio/reactive. activeSceneId null = no scene. An unknown scene, or a scene whose gateway or input does not exist, is refused with 422.",
4998
+ type: "object",
4999
+ minProperties: 1,
5000
+ properties: {
5001
+ enabled: { type: "boolean" },
5002
+ activeSceneId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
5003
+ intensity: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" }
5004
+ },
5005
+ additionalProperties: false
5006
+ }
5007
+ }
5008
+ },
5009
+ "https://freedome.nativemind.us/schemas/api/1.1/audio.schema.json": {
5010
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5011
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/audio.schema.json",
5012
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Audio through the media server (02e \xA75.5, 02c A8): venue audio state + patch, zones, devices (+ test, resonance sweep), presets (02c ananta/1.0 programme / pattern / session, RC2), sessions (+ pause, resume, role \u2192 zone), generator (+ MULTI block), source position. Rules of the 1.1 additions: docs/audio-control.md. Root = GET /venues/{venueId}/audio.",
5013
+ title: "Audio state",
5014
+ type: "object",
5015
+ required: ["venueId", "mode", "masterGainDb", "mute", "revision"],
5016
+ properties: {
5017
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5018
+ mode: { $ref: "#/$defs/mode" },
5019
+ masterGainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5020
+ mute: { type: "boolean" },
5021
+ engines: {
5022
+ type: "object",
5023
+ properties: { anantasound: { $ref: "#/$defs/engineRef" }, anantadigital: { $ref: "#/$defs/engineRef" } },
5024
+ additionalProperties: { $ref: "#/$defs/engineRef" }
5025
+ },
5026
+ layoutRevision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
5027
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
5028
+ },
5029
+ patternProperties: { "^x-": true },
5030
+ additionalProperties: false,
5031
+ $defs: {
5032
+ mode: {
5033
+ description: "A8: digital = anAntaDigital only; hybrid = anAntaSound (mechanical devices); combined = both.",
5034
+ anyOf: [{ enum: ["digital", "hybrid", "combined"] }, { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }]
5035
+ },
5036
+ engineRef: {
5037
+ type: "object",
5038
+ required: ["status"],
5039
+ properties: {
5040
+ status: { anyOf: [{ enum: ["up", "degraded", "down", "incompatible", "disabled"] }, { type: "string" }] },
5041
+ version: { type: "string" }
5042
+ },
5043
+ additionalProperties: false
5044
+ },
5045
+ patch: {
5046
+ type: "object",
5047
+ minProperties: 1,
5048
+ properties: {
5049
+ mode: { $ref: "#/$defs/mode" },
5050
+ masterGainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5051
+ mute: { type: "boolean" }
5052
+ },
5053
+ patternProperties: { "^x-": true },
5054
+ additionalProperties: false
5055
+ },
5056
+ eqBand: {
5057
+ type: "object",
5058
+ required: ["type", "frequencyHz"],
5059
+ properties: {
5060
+ type: {
5061
+ anyOf: [
5062
+ { enum: ["peak", "lowShelf", "highShelf", "lowPass", "highPass", "notch", "allPass"] },
5063
+ { type: "string" }
5064
+ ]
5065
+ },
5066
+ frequencyHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5067
+ gainDb: { type: "number", minimum: -48, maximum: 24 },
5068
+ q: { type: "number", exclusiveMinimum: 0, maximum: 100 },
5069
+ enabled: { type: "boolean", default: true }
5070
+ },
5071
+ additionalProperties: false
5072
+ },
5073
+ zoneBody: {
5074
+ type: "object",
5075
+ properties: {
5076
+ name: { type: "string", maxLength: 128 },
5077
+ speakers: {
5078
+ type: "array",
5079
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5080
+ uniqueItems: true
5081
+ },
5082
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5083
+ delayMs: { type: "number", minimum: 0, maximum: 2e3 },
5084
+ eq: { type: "array", items: { $ref: "#/$defs/eqBand" }, maxItems: 32 },
5085
+ mute: { type: "boolean" }
5086
+ },
5087
+ patternProperties: { "^x-": true }
5088
+ },
5089
+ zone: {
5090
+ description: "anAntaDigital zone: a subset of speakers with gain, delay, EQ.",
5091
+ type: "object",
5092
+ allOf: [{ $ref: "#/$defs/zoneBody" }],
5093
+ required: ["id", "speakers", "gainDb", "mute", "revision"],
5094
+ properties: {
5095
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5096
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
5097
+ },
5098
+ unevaluatedProperties: false
5099
+ },
5100
+ zoneInput: {
5101
+ type: "object",
5102
+ allOf: [{ $ref: "#/$defs/zoneBody" }],
5103
+ required: ["speakers"],
5104
+ unevaluatedProperties: false
5105
+ },
5106
+ zonePatch: {
5107
+ type: "object",
5108
+ allOf: [{ $ref: "#/$defs/zoneBody" }],
5109
+ minProperties: 1,
5110
+ unevaluatedProperties: false
5111
+ },
5112
+ zonePage: {
5113
+ type: "object",
5114
+ required: ["items", "nextCursor"],
5115
+ properties: {
5116
+ items: { type: "array", items: { $ref: "#/$defs/zone" } },
5117
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5118
+ },
5119
+ additionalProperties: false
5120
+ },
5121
+ deviceKind: {
5122
+ anyOf: [
5123
+ { enum: ["speaker", "speaker_amp", "microphone", "qrd", "patefon", "karmic_cluster", "resonator"] },
5124
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
5125
+ ]
5126
+ },
5127
+ device: {
5128
+ description: "Audio device = .dome audio.devices[] / speakers[] entry + live state (02c \xA76).",
5129
+ type: "object",
5130
+ required: ["id", "kind", "state"],
5131
+ properties: {
5132
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5133
+ kind: { $ref: "#/$defs/deviceKind" },
5134
+ name: { type: "string" },
5135
+ config: { type: "object", description: "the .dome audio device / speaker entry", additionalProperties: true },
5136
+ state: {
5137
+ type: "object",
5138
+ required: ["online"],
5139
+ properties: {
5140
+ online: { type: "boolean" },
5141
+ engine: { anyOf: [{ enum: ["anantasound", "anantadigital"] }, { type: "string" }] },
5142
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5143
+ mute: { type: "boolean" },
5144
+ levelDb: { type: "number", maximum: 24, description: "last meter value (dBFS)" },
5145
+ temperatureC: { type: "number" },
5146
+ firmware: { type: "string" },
5147
+ faults: { type: "array", items: { type: "string" } },
5148
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5149
+ },
5150
+ additionalProperties: true
5151
+ }
5152
+ },
5153
+ patternProperties: { "^x-": true },
5154
+ additionalProperties: false
5155
+ },
5156
+ devicePatch: {
5157
+ type: "object",
5158
+ minProperties: 1,
5159
+ properties: {
5160
+ name: { type: "string" },
5161
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5162
+ mute: { type: "boolean" },
5163
+ config: { type: "object", additionalProperties: true }
5164
+ },
5165
+ additionalProperties: false
5166
+ },
5167
+ devicePage: {
5168
+ type: "object",
5169
+ required: ["items", "nextCursor"],
5170
+ properties: {
5171
+ items: { type: "array", items: { $ref: "#/$defs/device" } },
5172
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5173
+ },
5174
+ additionalProperties: false
5175
+ },
5176
+ deviceTest: {
5177
+ type: "object",
5178
+ properties: {
5179
+ kind: { anyOf: [{ enum: ["ping", "tone", "selftest", "strike"] }, { type: "string" }], default: "ping" },
5180
+ frequencyHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5181
+ gainDb: { type: "number", minimum: -96, maximum: 0 },
5182
+ durationS: { type: "number", exclusiveMinimum: 0, maximum: 30 }
5183
+ },
5184
+ additionalProperties: false
5185
+ },
5186
+ deviceTestResult: {
5187
+ type: "object",
5188
+ required: ["deviceId", "ok"],
5189
+ properties: {
5190
+ deviceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5191
+ ok: { type: "boolean" },
5192
+ latencyMs: { type: "number", minimum: 0 },
5193
+ detail: { type: "string" },
5194
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
5195
+ },
5196
+ additionalProperties: false
5197
+ },
5198
+ presetKind: { enum: ["programme", "pattern", "session"] },
5199
+ preset: {
5200
+ description: "Installed L6 preset: an ananta/1.0 programme, pattern or session document (02c, RC2).",
5201
+ type: "object",
5202
+ required: ["id", "kind", "revision", "document"],
5203
+ properties: {
5204
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5205
+ kind: { $ref: "#/$defs/presetKind" },
5206
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
5207
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
5208
+ document: { type: "object" },
5209
+ sha256: { $ref: "../../common/1.0/ids.schema.json#/$defs/sha256" },
5210
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5211
+ },
5212
+ additionalProperties: false,
5213
+ allOf: [
5214
+ {
5215
+ if: { properties: { kind: { const: "programme" } }, required: ["kind"] },
5216
+ then: { properties: { document: { $ref: "../../ananta/1.0/programme.schema.json" } } }
5217
+ },
5218
+ {
5219
+ if: { properties: { kind: { const: "pattern" } }, required: ["kind"] },
5220
+ then: { properties: { document: { $ref: "../../ananta/1.0/pattern.schema.json" } } }
5221
+ },
5222
+ {
5223
+ if: { properties: { kind: { const: "session" } }, required: ["kind"] },
5224
+ then: { properties: { document: { $ref: "../../ananta/1.0/session.schema.json" } } }
5225
+ }
5226
+ ]
5227
+ },
5228
+ presetInput: {
5229
+ description: "PUT /venues/{venueId}/audio/presets/{presetId} body.",
5230
+ type: "object",
5231
+ required: ["kind", "document"],
5232
+ properties: { kind: { $ref: "#/$defs/presetKind" }, document: { type: "object" } },
5233
+ additionalProperties: false,
5234
+ allOf: [
5235
+ {
5236
+ if: { properties: { kind: { const: "programme" } }, required: ["kind"] },
5237
+ then: { properties: { document: { $ref: "../../ananta/1.0/programme.schema.json" } } }
5238
+ },
5239
+ {
5240
+ if: { properties: { kind: { const: "pattern" } }, required: ["kind"] },
5241
+ then: { properties: { document: { $ref: "../../ananta/1.0/pattern.schema.json" } } }
5242
+ },
5243
+ {
5244
+ if: { properties: { kind: { const: "session" } }, required: ["kind"] },
5245
+ then: { properties: { document: { $ref: "../../ananta/1.0/session.schema.json" } } }
5246
+ }
5247
+ ]
5248
+ },
5249
+ presetPage: {
5250
+ type: "object",
5251
+ required: ["items", "nextCursor"],
5252
+ properties: {
5253
+ items: {
5254
+ type: "array",
5255
+ items: {
5256
+ type: "object",
5257
+ required: ["id", "kind", "revision"],
5258
+ properties: {
5259
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5260
+ kind: { $ref: "#/$defs/presetKind" },
5261
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
5262
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
5263
+ },
5264
+ additionalProperties: false
5265
+ }
5266
+ },
5267
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5268
+ },
5269
+ additionalProperties: false
5270
+ },
5271
+ targets: {
5272
+ type: "object",
5273
+ properties: {
5274
+ devices: {
5275
+ type: "array",
5276
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5277
+ uniqueItems: true
5278
+ },
5279
+ zones: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, uniqueItems: true },
5280
+ speakers: {
5281
+ type: "array",
5282
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5283
+ uniqueItems: true
5284
+ }
5285
+ },
5286
+ additionalProperties: false
5287
+ },
5288
+ sessionStart: {
5289
+ description: "POST /venues/{venueId}/audio/sessions: run an installed preset (programme or session).",
5290
+ type: "object",
5291
+ required: ["presetId"],
5292
+ properties: {
5293
+ presetId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5294
+ gainDb: { type: "number", minimum: -96, maximum: 12 },
5295
+ targets: { $ref: "#/$defs/targets" },
5296
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5297
+ loop: { type: "boolean" },
5298
+ roleZones: { $ref: "#/$defs/roleZones" }
5299
+ },
5300
+ additionalProperties: false
5301
+ },
5302
+ roleZones: {
5303
+ description: "Preset role \u2192 the zones it plays in (02c \xA75.1, \xA75.3). Only for roles of class `speakers`. A role not named plays in `targets.zones`, or on the main bus when there are none.",
5304
+ type: "object",
5305
+ propertyNames: { $ref: "../../ananta/1.0/programme.schema.json#/$defs/id" },
5306
+ additionalProperties: {
5307
+ type: "array",
5308
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5309
+ minItems: 1,
5310
+ uniqueItems: true
5311
+ }
5312
+ },
5313
+ session: {
5314
+ type: "object",
5315
+ required: ["id", "venueId", "presetId", "status", "startedAt"],
5316
+ properties: {
5317
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5318
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5319
+ presetId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5320
+ status: {
5321
+ anyOf: [{ enum: ["starting", "running", "paused", "finished", "stopped", "failed"] }, { type: "string" }]
5322
+ },
5323
+ engines: { type: "array", items: { type: "string" } },
5324
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
5325
+ duration: { $ref: "../../common/1.0/units.schema.json#/$defs/seconds" },
5326
+ itemIndex: { type: "integer", minimum: 0 },
5327
+ targets: { $ref: "#/$defs/targets" },
5328
+ roleZones: { $ref: "#/$defs/roleZones" },
5329
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
5330
+ startedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5331
+ endedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5332
+ },
5333
+ additionalProperties: false
5334
+ },
5335
+ sessionPage: {
5336
+ type: "object",
5337
+ required: ["items", "nextCursor"],
5338
+ properties: {
5339
+ items: { type: "array", items: { $ref: "#/$defs/session" } },
5340
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5341
+ },
5342
+ additionalProperties: false
5343
+ },
5344
+ generator: {
5345
+ description: "Test / MULTI generator (iScillator semantics; replaces generate_test_signal).",
5346
+ type: "object",
5347
+ required: ["signal"],
5348
+ properties: {
5349
+ signal: { anyOf: [{ enum: ["sine", "pink", "white", "sweep", "multi"] }, { type: "string" }] },
5350
+ frequencies: {
5351
+ type: "array",
5352
+ items: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5353
+ maxItems: 64,
5354
+ description: "sine: [f]; sweep: [from, to]; multi: up to 64 partials"
5355
+ },
5356
+ gainDb: { type: "number", minimum: -96, maximum: 0 },
5357
+ durationS: { type: "number", exclusiveMinimum: 0 },
5358
+ targets: { $ref: "#/$defs/targets" },
5359
+ multi: { $ref: "#/$defs/generatorMulti" }
5360
+ },
5361
+ additionalProperties: false
5362
+ },
5363
+ generatorMulti: {
5364
+ description: "NmSoundParams of a MULTI generator, the same object as `multi` of an ananta/1.0 programme segment: `program`, `target`, `enviroment` (spelling kept), `modulation`, `multi`, `channel`, `audio`, `compatJava`. `channel` is the angle code: 0, 1, 2, 60, 90, 120, 137, 180; 1000\u20261999 binaural, right channel at base + (code \u2212 1000) Hz; 5000\u20265999, 6000\u20266999, 7000\u20267999 stereo phase offsets (no multichannel output). Only with `signal: multi`, and without `frequencies`: anything else is 422. Codes and bit-exactness: docs/audio-control.md.",
5365
+ $ref: "../../ananta/1.0/programme.schema.json#/$defs/multi"
5366
+ },
5367
+ generatorState: {
5368
+ type: "object",
5369
+ required: ["running"],
5370
+ properties: {
5371
+ running: { type: "boolean" },
5372
+ settings: { $ref: "#/$defs/generator" },
5373
+ startedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5374
+ },
5375
+ additionalProperties: false
5376
+ },
5377
+ deviceSweep: {
5378
+ description: "POST /venues/{venueId}/audio/devices/{deviceId}/sweep body: resonance sweep of one resonator channel (`Calibration.Sweep` of ananta.sound.v1). Every member is optional; the defaults are the engine's.",
5379
+ type: "object",
5380
+ properties: {
5381
+ actuator: {
5382
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
5383
+ description: "resonator channel id; absent = the first one"
5384
+ },
5385
+ fromHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz", default: 20 },
5386
+ toHz: {
5387
+ $ref: "../../common/1.0/units.schema.json#/$defs/hertz",
5388
+ default: 2e3,
5389
+ description: "above `fromHz`, else 422"
5390
+ },
5391
+ durationS: { type: "number", exclusiveMinimum: 0, maximum: 300, default: 5 },
5392
+ level: {
5393
+ type: "number",
5394
+ exclusiveMinimum: 0,
5395
+ maximum: 1,
5396
+ default: 0.3,
5397
+ description: "share of the channel's limit"
5398
+ },
5399
+ modelHz: {
5400
+ type: "array",
5401
+ items: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5402
+ maxItems: 64,
5403
+ description: "expected partials. With them the partials and warnings are stored with the device's calibration; without them the sweep only reports peaks."
5404
+ },
5405
+ tolerance: {
5406
+ type: "number",
5407
+ exclusiveMinimum: 0,
5408
+ maximum: 1,
5409
+ default: 0.01,
5410
+ description: "relative; four times this and a partial counts as gone (`cracked`)"
5411
+ }
5412
+ },
5413
+ additionalProperties: false
5414
+ },
5415
+ sourcePosition: {
5416
+ description: "Interactive / realtime source position (spherical, listener at the dome centre).",
5417
+ type: "object",
5418
+ required: ["azimuth", "elevation"],
5419
+ properties: {
5420
+ azimuth: {
5421
+ type: "number",
5422
+ minimum: -360,
5423
+ maximum: 360,
5424
+ description: "degrees, 0 = front, positive = left (ambisonic convention)"
5425
+ },
5426
+ elevation: { type: "number", minimum: -90, maximum: 90 },
5427
+ distance: { type: "number", exclusiveMinimum: 0, description: "metres" },
5428
+ rampMs: { type: "number", minimum: 0, maximum: 1e4 }
5429
+ },
5430
+ additionalProperties: false
5431
+ }
5432
+ }
5433
+ },
5434
+ "https://freedome.nativemind.us/schemas/api/1.1/auth.schema.json": {
5435
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5436
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/auth.schema.json",
5437
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Authentication bodies (02e \xA73.6, \xA75.1): sessions, refresh, cloud token exchange, pairing, principal. Root = token pair returned by createSession / refreshSession / exchangeCloudToken.",
5438
+ title: "Session tokens",
5439
+ allOf: [{ $ref: "#/$defs/tokens" }],
5440
+ $defs: {
5441
+ role: {
5442
+ description: "Role = scope bundle (02e \xA73.6). Open enum: clients map unknown roles to UNKNOWN.",
5443
+ anyOf: [
5444
+ { enum: ["guest", "operator", "admin", "superadmin"] },
5445
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
5446
+ ]
5447
+ },
5448
+ scopes: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/scope" }, uniqueItems: true },
5449
+ tokens: {
5450
+ type: "object",
5451
+ required: ["accessToken", "tokenType", "expiresIn"],
5452
+ properties: {
5453
+ accessToken: { type: "string", minLength: 16, description: "access JWT (15 min)" },
5454
+ tokenType: { const: "Bearer" },
5455
+ expiresIn: { type: "integer", minimum: 1, description: "access token lifetime in seconds" },
5456
+ refreshToken: {
5457
+ type: "string",
5458
+ minLength: 16,
5459
+ description: "rotating refresh token; reuse of a rotated one revokes the whole family"
5460
+ },
5461
+ refreshExpiresIn: { type: "integer", minimum: 1 },
5462
+ scopes: { $ref: "#/$defs/scopes" },
5463
+ principal: { $ref: "#/$defs/principal" }
5464
+ },
5465
+ patternProperties: { "^x-": true },
5466
+ additionalProperties: false
5467
+ },
5468
+ sessionRequest: {
5469
+ description: "POST /auth/session (local account).",
5470
+ type: "object",
5471
+ required: ["username", "password"],
5472
+ properties: {
5473
+ username: { type: "string", minLength: 1, maxLength: 128 },
5474
+ password: { type: "string", minLength: 1, maxLength: 1024, writeOnly: true },
5475
+ client: { $ref: "#/$defs/clientInfo" }
5476
+ },
5477
+ additionalProperties: false
5478
+ },
5479
+ refreshRequest: {
5480
+ description: "POST /auth/refresh.",
5481
+ type: "object",
5482
+ required: ["refreshToken"],
5483
+ properties: { refreshToken: { type: "string", minLength: 16 } },
5484
+ additionalProperties: false
5485
+ },
5486
+ tokenExchangeRequest: {
5487
+ description: "POST /auth/token-exchange: an L7 (freedome.nativemind.us) access JWT for a local session; linked installations only (JWKS of the cloud).",
5488
+ type: "object",
5489
+ required: ["subjectToken"],
5490
+ properties: {
5491
+ subjectToken: { type: "string", minLength: 16 },
5492
+ subjectTokenType: {
5493
+ const: "urn:ietf:params:oauth:token-type:jwt",
5494
+ default: "urn:ietf:params:oauth:token-type:jwt"
5495
+ },
5496
+ client: { $ref: "#/$defs/clientInfo" }
5497
+ },
5498
+ additionalProperties: false
5499
+ },
5500
+ clientInfo: {
5501
+ type: "object",
5502
+ properties: {
5503
+ app: { type: "string", minLength: 1, maxLength: 128 },
5504
+ appVersion: { type: "string", maxLength: 64 },
5505
+ deviceName: { type: "string", maxLength: 128 }
5506
+ },
5507
+ additionalProperties: false
5508
+ },
5509
+ pairingRequest: {
5510
+ description: "POST /auth/pairings (anonymous; ecosystem app asks for a guest token).",
5511
+ type: "object",
5512
+ required: ["app", "deviceName"],
5513
+ properties: {
5514
+ app: {
5515
+ type: "string",
5516
+ minLength: 1,
5517
+ maxLength: 128,
5518
+ description: "application id, e.g. net.nativemind.starveda"
5519
+ },
5520
+ deviceName: { type: "string", minLength: 1, maxLength: 128 },
5521
+ requestedRole: { $ref: "#/$defs/role" }
5522
+ },
5523
+ additionalProperties: false
5524
+ },
5525
+ pairing: {
5526
+ description: "Pairing state. `code` (6 digits) is returned only to the requester on creation and shown on the dome / in Manager; `tokens` only once, to the requester's first poll after approval.",
5527
+ type: "object",
5528
+ required: ["pairingId", "status", "expiresAt"],
5529
+ properties: {
5530
+ pairingId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5531
+ status: {
5532
+ anyOf: [
5533
+ { enum: ["pending", "approved", "denied", "expired"] },
5534
+ { type: "string", pattern: "^[a-z_]{1,32}$" }
5535
+ ]
5536
+ },
5537
+ code: { type: "string", pattern: "^[0-9]{6}$" },
5538
+ qr: { type: "string", pattern: "^freedome://pair\\?", description: "freedome://pair?host=\u2026&code=\u2026" },
5539
+ app: { type: "string" },
5540
+ deviceName: { type: "string" },
5541
+ role: { $ref: "#/$defs/role" },
5542
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5543
+ tokens: { $ref: "#/$defs/tokens" }
5544
+ },
5545
+ patternProperties: { "^x-": true },
5546
+ additionalProperties: false
5547
+ },
5548
+ pairingApproval: {
5549
+ description: "POST /auth/pairings/{pairingId}/approve body (operator side).",
5550
+ type: "object",
5551
+ properties: {
5552
+ approve: { type: "boolean", default: true, description: "false = deny" },
5553
+ role: { $ref: "#/$defs/role", description: "granted role (default guest)" },
5554
+ ttlSec: { type: "integer", minimum: 60, maximum: 31536e3 }
5555
+ },
5556
+ additionalProperties: false
5557
+ },
5558
+ principal: {
5559
+ description: "GET /auth/me: who is calling and what they may do.",
5560
+ type: "object",
5561
+ required: ["subject", "kind", "role", "scopes"],
5562
+ properties: {
5563
+ subject: { type: "string", minLength: 1, description: "user id, api key id or pairing id" },
5564
+ kind: {
5565
+ anyOf: [
5566
+ { enum: ["user", "apiKey", "pairing", "cloud", "anonymous"] },
5567
+ { type: "string", pattern: "^[a-zA-Z]{1,32}$" }
5568
+ ]
5569
+ },
5570
+ name: { type: "string" },
5571
+ role: { $ref: "#/$defs/role" },
5572
+ scopes: { $ref: "#/$defs/scopes" },
5573
+ origin: {
5574
+ type: "string",
5575
+ description: "transport the request came in on (rest, graphql, ws, socketio, osc, grpc)"
5576
+ },
5577
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5578
+ },
5579
+ patternProperties: { "^x-": true },
5580
+ additionalProperties: false
5581
+ }
5582
+ }
5583
+ },
5584
+ "https://freedome.nativemind.us/schemas/api/1.1/calibration-job.schema.json": {
5585
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5586
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/calibration-job.schema.json",
5587
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Calibration job (02e \xA75.2, 02a \xA72.5 / \xA74.7, 02b \xA74.5); `audio-device-sweep` jobs are started by startAudioDeviceSweep (docs/audio-control.md). Root = GET \u2026/calibration/jobs/{jobId}.",
5588
+ title: "Calibration job",
5589
+ allOf: [{ $ref: "#/$defs/calibrationJob" }],
5590
+ $defs: {
5591
+ calibrationJob: {
5592
+ type: "object",
5593
+ required: ["id", "venueId", "kind", "status", "steps", "createdAt"],
5594
+ properties: {
5595
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5596
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5597
+ kind: { $ref: "#/$defs/kind" },
5598
+ status: { $ref: "job.schema.json#/$defs/status" },
5599
+ progress: { type: "number", minimum: 0, maximum: 1 },
5600
+ displays: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
5601
+ speakers: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
5602
+ steps: {
5603
+ type: "array",
5604
+ items: {
5605
+ type: "object",
5606
+ required: ["id", "status"],
5607
+ properties: {
5608
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5609
+ name: { type: "string" },
5610
+ displayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5611
+ status: { enum: ["pending", "running", "awaiting_input", "done", "failed", "skipped"] }
5612
+ },
5613
+ additionalProperties: false
5614
+ }
5615
+ },
5616
+ currentStep: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
5617
+ awaiting: {
5618
+ description: "Set while status = awaiting_input: what the operator / camera must provide.",
5619
+ anyOf: [{ type: "null" }, { $ref: "#/$defs/awaiting" }]
5620
+ },
5621
+ errors: {
5622
+ description: "Per-display residual error after solving.",
5623
+ type: "array",
5624
+ items: {
5625
+ type: "object",
5626
+ required: ["displayId"],
5627
+ properties: {
5628
+ displayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5629
+ meanError: { type: "number", minimum: 0 },
5630
+ maxError: { type: "number", minimum: 0 },
5631
+ unit: { type: "string" }
5632
+ },
5633
+ additionalProperties: false
5634
+ }
5635
+ },
5636
+ result: {
5637
+ description: "Proposed calibration (applied to the venue by POST \u2026/apply).",
5638
+ anyOf: [{ type: "null" }, { $ref: "../../dome/1.1/dome.schema.json#/$defs/calibration" }]
5639
+ },
5640
+ sweep: { $ref: "#/$defs/sweep" },
5641
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
5642
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5643
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5644
+ },
5645
+ additionalProperties: false
5646
+ },
5647
+ sweep: {
5648
+ description: "Kind `audio-device-sweep`: what was asked; `peaks`, `partials` and `warnings` once the job has succeeded.",
5649
+ type: "object",
5650
+ required: ["deviceId"],
5651
+ properties: {
5652
+ deviceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5653
+ actuator: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5654
+ fromHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5655
+ toHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5656
+ durationS: { type: "number", exclusiveMinimum: 0 },
5657
+ level: { type: "number", exclusiveMinimum: 0, maximum: 1 },
5658
+ peaks: {
5659
+ description: "Strongest first.",
5660
+ type: "array",
5661
+ items: {
5662
+ type: "object",
5663
+ required: ["hz", "db"],
5664
+ properties: {
5665
+ hz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5666
+ db: { type: "number" },
5667
+ q: { type: "number", minimum: 0 }
5668
+ },
5669
+ additionalProperties: false
5670
+ }
5671
+ },
5672
+ partials: {
5673
+ description: "Comparison with `modelHz`; `measuredHz` is absent for a partial with no peak near it.",
5674
+ type: "array",
5675
+ items: {
5676
+ type: "object",
5677
+ required: ["modelHz"],
5678
+ properties: {
5679
+ modelHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5680
+ measuredHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" }
5681
+ },
5682
+ additionalProperties: false
5683
+ }
5684
+ },
5685
+ warnings: { type: "array", items: { anyOf: [{ enum: ["detuned", "cracked", "weak"] }, { type: "string" }] } }
5686
+ },
5687
+ additionalProperties: false
5688
+ },
5689
+ kind: {
5690
+ anyOf: [
5691
+ { enum: ["visual-camera", "visual-manual", "visual-import", "audio-room", "audio-speaker-check"] },
5692
+ { type: "string", pattern: "^[a-z][a-z0-9-]{0,63}$" }
5693
+ ]
5694
+ },
5695
+ start: {
5696
+ description: "POST /venues/{venueId}/calibration/jobs body.",
5697
+ type: "object",
5698
+ required: ["kind"],
5699
+ properties: {
5700
+ kind: { $ref: "#/$defs/kind" },
5701
+ displays: {
5702
+ type: "array",
5703
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5704
+ uniqueItems: true
5705
+ },
5706
+ speakers: {
5707
+ type: "array",
5708
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5709
+ uniqueItems: true
5710
+ },
5711
+ options: { type: "object", description: "kind-specific (grid density, camera model, import format \u2026)" }
5712
+ },
5713
+ additionalProperties: false
5714
+ },
5715
+ capture: {
5716
+ description: "POST \u2026/captures JSON body: a camera frame uploaded before (tus upload id); multipart/form-data with an `image` part is the alternative (\u2264 32 MB).",
5717
+ type: "object",
5718
+ required: ["uploadId"],
5719
+ properties: {
5720
+ uploadId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5721
+ stepId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }
5722
+ },
5723
+ additionalProperties: false
5724
+ },
5725
+ awaiting: {
5726
+ type: "object",
5727
+ required: ["kind"],
5728
+ properties: {
5729
+ kind: { anyOf: [{ enum: ["camera-capture", "manual-adjust", "confirm"] }, { type: "string" }] },
5730
+ stepId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5731
+ displayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5732
+ pattern: { $ref: "display.schema.json#/$defs/testPattern" },
5733
+ instructions: { $ref: "../../common/1.0/i18n-text.schema.json" }
5734
+ },
5735
+ additionalProperties: false
5736
+ },
5737
+ page: {
5738
+ type: "object",
5739
+ required: ["items", "nextCursor"],
5740
+ properties: {
5741
+ items: { type: "array", items: { $ref: "#/$defs/calibrationJob" } },
5742
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5743
+ },
5744
+ additionalProperties: false
5745
+ }
5746
+ }
5747
+ },
5748
+ "https://freedome.nativemind.us/schemas/api/1.1/client.schema.json": {
5749
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5750
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/client.schema.json",
5751
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Connected client devices (02e \xA75.6 /clients: churyavzrosliy device fx \u2014 vibration, camera, sensors, biometric). Root = registered client.",
5752
+ title: "Client",
5753
+ allOf: [{ $ref: "#/$defs/client" }],
5754
+ $defs: {
5755
+ capability: {
5756
+ anyOf: [
5757
+ {
5758
+ enum: [
5759
+ "vibration",
5760
+ "camera",
5761
+ "biometric",
5762
+ "sensors.accelerometer",
5763
+ "sensors.gyroscope",
5764
+ "sensors.magnetometer",
5765
+ "sensors.heartRate",
5766
+ "sensors.location"
5767
+ ]
5768
+ },
5769
+ { type: "string", pattern: "^[a-z][A-Za-z0-9.]{0,63}$" }
5770
+ ]
5771
+ },
5772
+ client: {
5773
+ type: "object",
5774
+ required: ["id", "app", "deviceName", "capabilities", "registeredAt"],
5775
+ properties: {
5776
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5777
+ app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" },
5778
+ appVersion: { type: "string" },
5779
+ deviceName: { type: "string", maxLength: 128 },
5780
+ platform: { type: "string" },
5781
+ capabilities: { type: "array", items: { $ref: "#/$defs/capability" }, uniqueItems: true },
5782
+ principal: { type: "string" },
5783
+ commandsTopic: {
5784
+ $ref: "../../common/1.0/ids.schema.json#/$defs/topic",
5785
+ description: "clients/{clientId}/commands"
5786
+ },
5787
+ registeredAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5788
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5789
+ },
5790
+ additionalProperties: false
5791
+ },
5792
+ input: {
5793
+ type: "object",
5794
+ required: ["app", "deviceName"],
5795
+ properties: {
5796
+ app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" },
5797
+ appVersion: { type: "string", maxLength: 64 },
5798
+ deviceName: { type: "string", minLength: 1, maxLength: 128 },
5799
+ platform: { type: "string", maxLength: 64 },
5800
+ capabilities: { type: "array", items: { $ref: "#/$defs/capability" }, uniqueItems: true, default: [] }
5801
+ },
5802
+ additionalProperties: false
5803
+ },
5804
+ page: {
5805
+ type: "object",
5806
+ required: ["items", "nextCursor"],
5807
+ properties: {
5808
+ items: { type: "array", items: { $ref: "#/$defs/client" } },
5809
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5810
+ },
5811
+ additionalProperties: false
5812
+ },
5813
+ telemetry: {
5814
+ description: "POST /clients/{clientId}/telemetry: batched sensor samples (replaces sendSensorData).",
5815
+ type: "object",
5816
+ required: ["samples"],
5817
+ properties: {
5818
+ samples: {
5819
+ type: "array",
5820
+ minItems: 1,
5821
+ maxItems: 1e3,
5822
+ items: {
5823
+ type: "object",
5824
+ required: ["ts", "sensor", "values"],
5825
+ properties: {
5826
+ ts: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5827
+ sensor: { $ref: "#/$defs/capability" },
5828
+ values: { type: "array", items: { type: "number" }, maxItems: 64 },
5829
+ unit: { type: "string" }
5830
+ },
5831
+ additionalProperties: false
5832
+ }
5833
+ }
5834
+ },
5835
+ additionalProperties: false
5836
+ },
5837
+ command: {
5838
+ description: "Server \u2192 device command, delivered as event client.command on clients/{clientId}/commands.",
5839
+ type: "object",
5840
+ required: ["command"],
5841
+ properties: {
5842
+ command: {
5843
+ anyOf: [
5844
+ { enum: ["vibrate", "capture", "sensors", "biometric"] },
5845
+ { type: "string", pattern: "^[a-z][A-Za-z0-9_.-]{0,63}$" }
5846
+ ]
5847
+ },
5848
+ params: { type: "object", additionalProperties: true },
5849
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5850
+ },
5851
+ additionalProperties: false
5852
+ }
5853
+ }
5854
+ },
5855
+ "https://freedome.nativemind.us/schemas/api/1.1/device.schema.json": {
5856
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5857
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/device.schema.json",
5858
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Visual device agents speaking freedome.device.v1 (projector variants FD-VP-*, master PR3, MS 1.MS.18): discovery, pairing, binding to a display, telemetry. Root = GET /devices/{deviceId}.",
5859
+ title: "Visual device",
5860
+ allOf: [{ $ref: "#/$defs/device" }],
5861
+ $defs: {
5862
+ device: {
5863
+ type: "object",
5864
+ required: ["id", "variant", "address", "paired", "state"],
5865
+ properties: {
5866
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5867
+ serial: { type: "string" },
5868
+ product: { type: "string" },
5869
+ variant: { type: "string", description: "fd-vp-f-1, fd-vp-p-s, \u2026" },
5870
+ hwRevision: { type: "string" },
5871
+ agentVersion: { type: "string" },
5872
+ protocolVersion: { type: "string" },
5873
+ capabilities: { type: "array", items: { type: "string" }, uniqueItems: true },
5874
+ address: { type: "string", description: "host:port of the agent" },
5875
+ paired: { type: "boolean" },
5876
+ displayId: {
5877
+ anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }],
5878
+ description: "venue display this device drives"
5879
+ },
5880
+ state: {
5881
+ type: "object",
5882
+ required: ["online"],
5883
+ properties: {
5884
+ online: { type: "boolean" },
5885
+ power: {
5886
+ anyOf: [{ enum: ["on", "off", "standby", "warming", "cooling", "unknown"] }, { type: "string" }]
5887
+ },
5888
+ temperatureC: { type: "number" },
5889
+ fanRpm: { type: "number", minimum: 0 },
5890
+ lampHours: { type: "number", minimum: 0 },
5891
+ battery: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
5892
+ faults: { type: "array", items: { type: "string" } },
5893
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5894
+ },
5895
+ additionalProperties: true
5896
+ }
5897
+ },
5898
+ patternProperties: { "^x-": true },
5899
+ additionalProperties: false
5900
+ },
5901
+ page: {
5902
+ type: "object",
5903
+ required: ["items", "nextCursor"],
5904
+ properties: {
5905
+ items: { type: "array", items: { $ref: "#/$defs/device" } },
5906
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5907
+ },
5908
+ additionalProperties: false
5909
+ },
5910
+ pairingStarted: {
5911
+ description: "POST /devices/{deviceId}/pairing: the device shows a code (display / LED); the operator confirms it.",
5912
+ type: "object",
5913
+ required: ["deviceId", "expiresAt"],
5914
+ properties: {
5915
+ deviceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5916
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5917
+ codeLength: { type: "integer", minimum: 4, maximum: 8 }
5918
+ },
5919
+ additionalProperties: false
5920
+ },
5921
+ pairingConfirm: {
5922
+ type: "object",
5923
+ required: ["code"],
5924
+ properties: { code: { type: "string", pattern: "^[0-9A-Z]{4,8}$" } },
5925
+ additionalProperties: false
5926
+ },
5927
+ bind: {
5928
+ type: "object",
5929
+ required: ["displayId"],
5930
+ properties: {
5931
+ displayId: {
5932
+ anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }],
5933
+ description: "null unbinds"
5934
+ }
5935
+ },
5936
+ additionalProperties: false
5937
+ }
5938
+ }
5939
+ },
5940
+ "https://freedome.nativemind.us/schemas/api/1.1/display.schema.json": {
5941
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5942
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/display.schema.json",
5943
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Display resource (02e \xA74, \xA75.2): `config` = the .dome 1.1 display entry, `state` = live device state. Root = GET representation.",
5944
+ title: "Display",
5945
+ allOf: [{ $ref: "#/$defs/display" }],
5946
+ $defs: {
5947
+ display: {
5948
+ type: "object",
5949
+ required: ["id", "venueId", "config", "state"],
5950
+ properties: {
5951
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5952
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5953
+ revision: {
5954
+ $ref: "../../common/1.0/ids.schema.json#/$defs/revision",
5955
+ description: "venue revision the config belongs to"
5956
+ },
5957
+ config: { $ref: "../../dome/1.1/dome.schema.json#/$defs/display" },
5958
+ state: { $ref: "#/$defs/state" }
5959
+ },
5960
+ additionalProperties: false
5961
+ },
5962
+ state: {
5963
+ type: "object",
5964
+ required: ["online"],
5965
+ properties: {
5966
+ online: { type: "boolean", description: "engine output / device agent reachable" },
5967
+ power: {
5968
+ anyOf: [
5969
+ { enum: ["on", "off", "standby", "warming", "cooling", "unknown"] },
5970
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
5971
+ ]
5972
+ },
5973
+ shutter: { enum: ["open", "closed", "unknown"] },
5974
+ signal: { type: "boolean" },
5975
+ temperatureC: { type: ["number", "null"] },
5976
+ pattern: { anyOf: [{ $ref: "#/$defs/testPattern" }, { type: "null" }] },
5977
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5978
+ capabilities: {
5979
+ type: "array",
5980
+ items: { anyOf: [{ enum: ["power", "shutter", "identify", "temperature", "pjlink"] }, { type: "string" }] }
5981
+ },
5982
+ faults: {
5983
+ type: "array",
5984
+ items: {
5985
+ type: "object",
5986
+ required: ["code"],
5987
+ properties: { code: { type: "string" }, detail: { type: "string" } },
5988
+ additionalProperties: false
5989
+ }
5990
+ }
5991
+ },
5992
+ additionalProperties: false
5993
+ },
5994
+ testPattern: {
5995
+ description: "PUT /venues/{venueId}/displays/{displayId}/pattern body (engine freedome_pattern_*).",
5996
+ type: "object",
5997
+ required: ["kind"],
5998
+ properties: {
5999
+ kind: {
6000
+ anyOf: [
6001
+ {
6002
+ enum: [
6003
+ "off",
6004
+ "grid",
6005
+ "checker",
6006
+ "gray-ramp",
6007
+ "colour-bars",
6008
+ "dots",
6009
+ "crosshair",
6010
+ "solid",
6011
+ "structured-light"
6012
+ ]
6013
+ },
6014
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
6015
+ ]
6016
+ },
6017
+ params: {
6018
+ description: "Kind-specific: grid {spacingDeg, lineWidthPx, colour}, checker {cells}, solid {colour}, structured-light {sequence, index} \u2026",
6019
+ type: "object"
6020
+ },
6021
+ face: { type: "integer", minimum: 0, maximum: 5, description: "prism / pyramid: limit to one optics face" }
6022
+ },
6023
+ additionalProperties: false
6024
+ },
6025
+ power: {
6026
+ description: "POST \u2026/power body; only what the device supports (state.capabilities).",
6027
+ type: "object",
6028
+ minProperties: 1,
6029
+ properties: { on: { type: "boolean" }, shutter: { enum: ["open", "closed"] } },
6030
+ additionalProperties: false
6031
+ },
6032
+ identify: {
6033
+ description: "POST \u2026/identify body (optional): how long to show the id overlay.",
6034
+ type: "object",
6035
+ properties: { durationS: { type: "number", minimum: 0.5, maximum: 60, default: 5 } },
6036
+ additionalProperties: false
6037
+ },
6038
+ patch: {
6039
+ description: "PATCH body (application/merge-patch+json) over `config`; `id` cannot change.",
6040
+ type: "object",
6041
+ minProperties: 1,
6042
+ not: { required: ["id"] }
6043
+ },
6044
+ page: {
6045
+ type: "object",
6046
+ allOf: [{ $ref: "../../common/1.0/pagination.schema.json" }],
6047
+ properties: { items: { type: "array", items: { $ref: "#/$defs/display" } } }
6048
+ }
6049
+ }
6050
+ },
6051
+ "https://freedome.nativemind.us/schemas/api/1.1/engine.schema.json": {
6052
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6053
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/engine.schema.json",
6054
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). gRPC engine status mirror (02e \xA74, \xA75.6): visual (freedome.engine.v1), anantasound (ananta.sound.v1), anantadigital (ananta.digital.v1). Root = GET /engines/{name}.",
6055
+ title: "Engine",
6056
+ allOf: [{ $ref: "#/$defs/engine" }],
6057
+ $defs: {
6058
+ engine: {
6059
+ type: "object",
6060
+ required: ["name", "status"],
6061
+ properties: {
6062
+ name: {
6063
+ anyOf: [
6064
+ { enum: ["visual", "anantasound", "anantadigital"] },
6065
+ { $ref: "../../common/1.0/ids.schema.json#/$defs/engineName" }
6066
+ ]
6067
+ },
6068
+ status: {
6069
+ anyOf: [
6070
+ { enum: ["up", "degraded", "down", "incompatible"] },
6071
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6072
+ ]
6073
+ },
6074
+ version: { type: "string" },
6075
+ protocol: {
6076
+ type: "string",
6077
+ pattern: "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*\\.v[0-9]+$",
6078
+ description: "gRPC package, e.g. freedome.engine.v1"
6079
+ },
6080
+ endpoint: { type: "string", description: "unix:/run/freedome/engine.sock, host:port" },
6081
+ nodes: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
6082
+ backend: {
6083
+ anyOf: [{ enum: ["vulkan", "metal", "d3d12", "opengl", "software"] }, { type: "string" }],
6084
+ description: "visual: active compute / render backend"
6085
+ },
6086
+ backends: { type: "array", items: { type: "string" }, description: "visual: available backends" },
6087
+ capabilities: {
6088
+ type: "object",
6089
+ additionalProperties: true,
6090
+ description: "engine-reported capabilities (outputs, codecs, max resolution, audio channels \u2026); keys listed in docs/capabilities.yaml"
6091
+ },
6092
+ metrics: {
6093
+ type: "object",
6094
+ additionalProperties: { type: "number" },
6095
+ description: "fps, droppedFrames, gpuLoad, latencyMs \u2026"
6096
+ },
6097
+ problem: { $ref: "../../common/1.0/problem.schema.json", description: "why degraded / down / incompatible" },
6098
+ since: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
6099
+ },
6100
+ patternProperties: { "^x-": true },
6101
+ additionalProperties: false
6102
+ },
6103
+ page: {
6104
+ type: "object",
6105
+ required: ["items", "nextCursor"],
6106
+ properties: {
6107
+ items: { type: "array", items: { $ref: "#/$defs/engine" } },
6108
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
6109
+ },
6110
+ additionalProperties: false
6111
+ },
6112
+ backendRequest: {
6113
+ type: "object",
6114
+ required: ["backend"],
6115
+ properties: {
6116
+ backend: {
6117
+ anyOf: [
6118
+ { enum: ["vulkan", "metal", "d3d12", "opengl", "software"] },
6119
+ { type: "string", pattern: "^[a-z0-9_-]{1,32}$" }
6120
+ ]
6121
+ }
6122
+ },
6123
+ additionalProperties: false
6124
+ }
6125
+ }
6126
+ },
6127
+ "https://freedome.nativemind.us/schemas/api/1.1/event-kinds.schema.json": {
6128
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6129
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/event-kinds.schema.json",
6130
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). `data` of an event message (02e \xA77.1) with the payload bound to its `kind` (events/topics.yaml). v1: every kind of the topic tree (02e \xA77.2 + scenarios, parameters, nodes, devices). Unknown kinds stay valid (open catalogue, 02e \xA713).",
6131
+ title: "Event data by kind",
6132
+ type: "object",
6133
+ allOf: [
6134
+ { $ref: "../../common/1.0/envelope.schema.json#/$defs/eventData" },
6135
+ {
6136
+ if: { properties: { kind: { const: "system.info" } }, required: ["kind"] },
6137
+ then: { properties: { resource: { $ref: "info.schema.json" } } }
6138
+ },
6139
+ {
6140
+ if: { properties: { kind: { const: "system.health" } }, required: ["kind"] },
6141
+ then: { properties: { resource: { $ref: "info.schema.json#/$defs/health" } } }
6142
+ },
6143
+ {
6144
+ if: { properties: { kind: { const: "engine.status" } }, required: ["kind"] },
6145
+ then: { properties: { resource: { $ref: "#/$defs/engineStatus" } } }
6146
+ },
6147
+ {
6148
+ if: { properties: { kind: { const: "engine.metrics" } }, required: ["kind"] },
6149
+ then: { properties: { resource: { $ref: "#/$defs/engineMetrics" }, patch: { $ref: "#/$defs/engineMetrics" } } }
6150
+ },
6151
+ {
6152
+ if: { properties: { kind: { const: "engine.error" } }, required: ["kind"] },
6153
+ then: { properties: { resource: { $ref: "../../common/1.0/problem.schema.json" } } }
6154
+ },
6155
+ {
6156
+ if: { properties: { kind: { const: "venue.updated" } }, required: ["kind"] },
6157
+ then: {
6158
+ properties: { resource: { $ref: "venue.schema.json" }, patch: { $ref: "venue.schema.json#/$defs/patch" } }
6159
+ }
6160
+ },
6161
+ {
6162
+ if: { properties: { kind: { const: "venue.deleted" } }, required: ["kind"] },
6163
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6164
+ },
6165
+ {
6166
+ if: { properties: { kind: { const: "venue.activeShow" } }, required: ["kind"] },
6167
+ then: { properties: { resource: { $ref: "#/$defs/activeShow" } } }
6168
+ },
6169
+ {
6170
+ if: { properties: { kind: { const: "output.state" } }, required: ["kind"] },
6171
+ then: {
6172
+ properties: { resource: { $ref: "output.schema.json" }, patch: { $ref: "output.schema.json#/$defs/patch" } }
6173
+ }
6174
+ },
6175
+ {
6176
+ if: { properties: { kind: { const: "display.state" } }, required: ["kind"] },
6177
+ then: { properties: { resource: { $ref: "display.schema.json#/$defs/state" }, patch: { type: "object" } } }
6178
+ },
6179
+ {
6180
+ if: { properties: { kind: { const: "display.pattern" } }, required: ["kind"] },
6181
+ then: {
6182
+ properties: { resource: { anyOf: [{ $ref: "display.schema.json#/$defs/testPattern" }, { type: "null" }] } }
6183
+ }
6184
+ },
6185
+ {
6186
+ if: { properties: { kind: { const: "display.error" } }, required: ["kind"] },
6187
+ then: { properties: { resource: { $ref: "../../common/1.0/problem.schema.json" } } }
6188
+ },
6189
+ {
6190
+ if: { properties: { kind: { const: "calibration.updated" } }, required: ["kind"] },
6191
+ then: { properties: { resource: { $ref: "../../dome/1.1/dome.schema.json#/$defs/calibration" } } }
6192
+ },
6193
+ {
6194
+ if: { properties: { kind: { const: "calibrationJob.state" } }, required: ["kind"] },
6195
+ then: { properties: { resource: { $ref: "calibration-job.schema.json" } } }
6196
+ },
6197
+ {
6198
+ if: { properties: { kind: { const: "calibrationJob.progress" } }, required: ["kind"] },
6199
+ then: { properties: { patch: { $ref: "#/$defs/progressPatch" } } }
6200
+ },
6201
+ {
6202
+ if: { properties: { kind: { const: "calibrationJob.awaiting" } }, required: ["kind"] },
6203
+ then: { properties: { resource: { $ref: "#/$defs/awaiting" } } }
6204
+ },
6205
+ {
6206
+ if: { properties: { kind: { const: "job.state" } }, required: ["kind"] },
6207
+ then: { properties: { resource: { $ref: "job.schema.json" } } }
6208
+ },
6209
+ {
6210
+ if: { properties: { kind: { const: "job.progress" } }, required: ["kind"] },
6211
+ then: { properties: { patch: { $ref: "#/$defs/progressPatch" } } }
6212
+ },
6213
+ {
6214
+ if: { properties: { kind: { const: "log.entry" } }, required: ["kind"] },
6215
+ then: { properties: { resource: { $ref: "system.schema.json#/$defs/logEntry" } } }
6216
+ },
6217
+ {
6218
+ if: { properties: { kind: { const: "node.state" } }, required: ["kind"] },
6219
+ then: {
6220
+ properties: { resource: { $ref: "system.schema.json#/$defs/node" }, patch: { $ref: "#/$defs/anyPatch" } }
6221
+ }
6222
+ },
6223
+ {
6224
+ if: { properties: { kind: { const: "player.state" } }, required: ["kind"] },
6225
+ then: { properties: { resource: { $ref: "player.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } } }
6226
+ },
6227
+ {
6228
+ if: { properties: { kind: { const: "player.position" } }, required: ["kind"] },
6229
+ then: { properties: { patch: { $ref: "#/$defs/positionPatch" } } }
6230
+ },
6231
+ {
6232
+ if: { properties: { kind: { const: "player.ended" } }, required: ["kind"] },
6233
+ then: { properties: { resource: { $ref: "player.schema.json" } } }
6234
+ },
6235
+ {
6236
+ if: { properties: { kind: { const: "player.error" } }, required: ["kind"] },
6237
+ then: { properties: { resource: { $ref: "../../common/1.0/problem.schema.json" } } }
6238
+ },
6239
+ {
6240
+ if: { properties: { kind: { const: "cue.fired" } }, required: ["kind"] },
6241
+ then: { properties: { resource: { $ref: "player.schema.json#/$defs/cueFired" } } }
6242
+ },
6243
+ {
6244
+ if: { properties: { kind: { const: "cue.failed" } }, required: ["kind"] },
6245
+ then: { properties: { resource: { $ref: "player.schema.json#/$defs/cueFired" } } }
6246
+ },
6247
+ {
6248
+ if: { properties: { kind: { const: "parameter.changed" } }, required: ["kind"] },
6249
+ then: { properties: { resource: { $ref: "player.schema.json#/$defs/parameter" } } }
6250
+ },
6251
+ {
6252
+ if: { properties: { kind: { const: "audio.state" } }, required: ["kind"] },
6253
+ then: {
6254
+ properties: { resource: { $ref: "audio.schema.json" }, patch: { $ref: "audio.schema.json#/$defs/patch" } }
6255
+ }
6256
+ },
6257
+ {
6258
+ if: { properties: { kind: { const: "audio.layout" } }, required: ["kind"] },
6259
+ then: { properties: { resource: { $ref: "../../dome/1.1/dome.schema.json#/$defs/audio" } } }
6260
+ },
6261
+ {
6262
+ if: { properties: { kind: { const: "audio.levels" } }, required: ["kind"] },
6263
+ then: { properties: { resource: { $ref: "#/$defs/levels" } } }
6264
+ },
6265
+ {
6266
+ if: { properties: { kind: { const: "zone.state" } }, required: ["kind"] },
6267
+ then: {
6268
+ properties: { resource: { $ref: "audio.schema.json#/$defs/zone" }, patch: { $ref: "#/$defs/anyPatch" } }
6269
+ }
6270
+ },
6271
+ {
6272
+ if: { properties: { kind: { const: "zone.deleted" } }, required: ["kind"] },
6273
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6274
+ },
6275
+ {
6276
+ if: { properties: { kind: { const: "audioDevice.state" } }, required: ["kind"] },
6277
+ then: {
6278
+ properties: { resource: { $ref: "audio.schema.json#/$defs/device" }, patch: { $ref: "#/$defs/anyPatch" } }
6279
+ }
6280
+ },
6281
+ {
6282
+ if: { properties: { kind: { const: "audioSession.state" } }, required: ["kind"] },
6283
+ then: {
6284
+ properties: { resource: { $ref: "audio.schema.json#/$defs/session" }, patch: { $ref: "#/$defs/anyPatch" } }
6285
+ }
6286
+ },
6287
+ {
6288
+ if: { properties: { kind: { const: "generator.state" } }, required: ["kind"] },
6289
+ then: { properties: { resource: { $ref: "audio.schema.json#/$defs/generatorState" } } }
6290
+ },
6291
+ {
6292
+ if: { properties: { kind: { const: "show.updated" } }, required: ["kind"] },
6293
+ then: {
6294
+ properties: { resource: { $ref: "show.schema.json" }, patch: { $ref: "show.schema.json#/$defs/patch" } }
6295
+ }
6296
+ },
6297
+ {
6298
+ if: { properties: { kind: { const: "show.deleted" } }, required: ["kind"] },
6299
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6300
+ },
6301
+ {
6302
+ if: { properties: { kind: { const: "playlist.updated" } }, required: ["kind"] },
6303
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6304
+ },
6305
+ {
6306
+ if: { properties: { kind: { const: "playlist.deleted" } }, required: ["kind"] },
6307
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6308
+ },
6309
+ {
6310
+ if: { properties: { kind: { const: "timeline.updated" } }, required: ["kind"] },
6311
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6312
+ },
6313
+ {
6314
+ if: { properties: { kind: { const: "timeline.deleted" } }, required: ["kind"] },
6315
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6316
+ },
6317
+ {
6318
+ if: { properties: { kind: { const: "cue.updated" } }, required: ["kind"] },
6319
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6320
+ },
6321
+ {
6322
+ if: { properties: { kind: { const: "cue.deleted" } }, required: ["kind"] },
6323
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6324
+ },
6325
+ {
6326
+ if: { properties: { kind: { const: "trigger.updated" } }, required: ["kind"] },
6327
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6328
+ },
6329
+ {
6330
+ if: { properties: { kind: { const: "trigger.deleted" } }, required: ["kind"] },
6331
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6332
+ },
6333
+ {
6334
+ if: { properties: { kind: { const: "matrix.updated" } }, required: ["kind"] },
6335
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6336
+ },
6337
+ {
6338
+ if: { properties: { kind: { const: "asset.created" } }, required: ["kind"] },
6339
+ then: { properties: { resource: { $ref: "asset.schema.json" } } }
6340
+ },
6341
+ {
6342
+ if: { properties: { kind: { const: "asset.progress" } }, required: ["kind"] },
6343
+ then: { properties: { patch: { $ref: "#/$defs/progressPatch" } } }
6344
+ },
6345
+ {
6346
+ if: { properties: { kind: { const: "asset.ready" } }, required: ["kind"] },
6347
+ then: { properties: { resource: { $ref: "asset.schema.json" } } }
6348
+ },
6349
+ {
6350
+ if: { properties: { kind: { const: "asset.failed" } }, required: ["kind"] },
6351
+ then: { properties: { resource: { $ref: "asset.schema.json" } } }
6352
+ },
6353
+ {
6354
+ if: { properties: { kind: { const: "asset.deleted" } }, required: ["kind"] },
6355
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6356
+ },
6357
+ {
6358
+ if: { properties: { kind: { const: "upload.progress" } }, required: ["kind"] },
6359
+ then: { properties: { resource: { $ref: "upload.schema.json" }, patch: { $ref: "#/$defs/uploadProgress" } } }
6360
+ },
6361
+ {
6362
+ if: { properties: { kind: { const: "gateway.state" } }, required: ["kind"] },
6363
+ then: { properties: { resource: { $ref: "gateway.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } } }
6364
+ },
6365
+ {
6366
+ if: { properties: { kind: { const: "gateway.message" } }, required: ["kind"] },
6367
+ then: { properties: { resource: { $ref: "#/$defs/gatewayMessage" } } }
6368
+ },
6369
+ {
6370
+ if: { properties: { kind: { const: "app.payload" } }, required: ["kind"] },
6371
+ then: { properties: { resource: { $ref: "app-payload.schema.json#/$defs/published" } } }
6372
+ },
6373
+ {
6374
+ if: { properties: { kind: { const: "app.cleared" } }, required: ["kind"] },
6375
+ then: { properties: { resource: { $ref: "#/$defs/appCleared" } } }
6376
+ },
6377
+ {
6378
+ if: { properties: { kind: { const: "client.command" } }, required: ["kind"] },
6379
+ then: { properties: { resource: { $ref: "client.schema.json#/$defs/command" } } }
6380
+ },
6381
+ {
6382
+ if: { properties: { kind: { const: "session.revoked" } }, required: ["kind"] },
6383
+ then: { properties: { resource: { $ref: "#/$defs/sessionRevoked" } } }
6384
+ },
6385
+ {
6386
+ if: { properties: { kind: { const: "scenarioSession.state" } }, required: ["kind"] },
6387
+ then: {
6388
+ properties: { resource: { $ref: "scenario-session.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } }
6389
+ }
6390
+ },
6391
+ {
6392
+ if: { properties: { kind: { const: "scenarioSession.log" } }, required: ["kind"] },
6393
+ then: { properties: { resource: { $ref: "scenario-session.schema.json#/$defs/logEntry" } } }
6394
+ },
6395
+ {
6396
+ if: { properties: { kind: { const: "device.state" } }, required: ["kind"] },
6397
+ then: { properties: { resource: { $ref: "device.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } } }
6398
+ },
6399
+ {
6400
+ if: { properties: { kind: { const: "audioAnalysis.state" } }, required: ["kind"] },
6401
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/analysisState" } } }
6402
+ },
6403
+ {
6404
+ if: { properties: { kind: { const: "audio.analysis" } }, required: ["kind"] },
6405
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/frame" } } }
6406
+ },
6407
+ {
6408
+ if: { properties: { kind: { const: "audio.onset" } }, required: ["kind"] },
6409
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/onset" } } }
6410
+ },
6411
+ {
6412
+ if: { properties: { kind: { const: "audioReactive.state" } }, required: ["kind"] },
6413
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/state" } } }
6414
+ },
6415
+ {
6416
+ if: { properties: { kind: { const: "audioReactiveScene.updated" } }, required: ["kind"] },
6417
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/scene" } } }
6418
+ },
6419
+ {
6420
+ if: { properties: { kind: { const: "audioReactiveScene.deleted" } }, required: ["kind"] },
6421
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6422
+ },
6423
+ {
6424
+ if: { properties: { kind: { const: "textureSource.state" } }, required: ["kind"] },
6425
+ then: { properties: { resource: { $ref: "asset.schema.json#/$defs/textureSource" } } }
6426
+ }
6427
+ ],
6428
+ $defs: {
6429
+ knownKind: {
6430
+ description: "Kinds of the v1 topic tree (events/topics.yaml); open catalogue \u2014 clients ignore unknown kinds.",
6431
+ enum: [
6432
+ "system.info",
6433
+ "system.health",
6434
+ "engine.status",
6435
+ "engine.metrics",
6436
+ "engine.error",
6437
+ "venue.updated",
6438
+ "venue.deleted",
6439
+ "venue.activeShow",
6440
+ "output.state",
6441
+ "display.state",
6442
+ "display.pattern",
6443
+ "display.error",
6444
+ "calibration.updated",
6445
+ "calibrationJob.state",
6446
+ "calibrationJob.progress",
6447
+ "calibrationJob.awaiting",
6448
+ "job.state",
6449
+ "job.progress",
6450
+ "log.entry",
6451
+ "node.state",
6452
+ "player.state",
6453
+ "player.position",
6454
+ "player.ended",
6455
+ "player.error",
6456
+ "cue.fired",
6457
+ "cue.failed",
6458
+ "parameter.changed",
6459
+ "audio.state",
6460
+ "audio.layout",
6461
+ "audio.levels",
6462
+ "zone.state",
6463
+ "zone.deleted",
6464
+ "audioDevice.state",
6465
+ "audioSession.state",
6466
+ "generator.state",
6467
+ "show.updated",
6468
+ "show.deleted",
6469
+ "playlist.updated",
6470
+ "playlist.deleted",
6471
+ "timeline.updated",
6472
+ "timeline.deleted",
6473
+ "cue.updated",
6474
+ "cue.deleted",
6475
+ "trigger.updated",
6476
+ "trigger.deleted",
6477
+ "matrix.updated",
6478
+ "asset.created",
6479
+ "asset.progress",
6480
+ "asset.ready",
6481
+ "asset.failed",
6482
+ "asset.deleted",
6483
+ "upload.progress",
6484
+ "gateway.state",
6485
+ "gateway.message",
6486
+ "app.payload",
6487
+ "app.cleared",
6488
+ "client.command",
6489
+ "session.revoked",
6490
+ "scenarioSession.state",
6491
+ "scenarioSession.log",
6492
+ "device.state",
6493
+ "audioAnalysis.state",
6494
+ "audio.analysis",
6495
+ "audio.onset",
6496
+ "audioReactive.state",
6497
+ "audioReactiveScene.updated",
6498
+ "audioReactiveScene.deleted",
6499
+ "textureSource.state"
6500
+ ]
6501
+ },
6502
+ engineStatus: {
6503
+ type: "object",
6504
+ required: ["name", "status"],
6505
+ properties: {
6506
+ name: {
6507
+ anyOf: [
6508
+ { enum: ["visual", "anantasound", "anantadigital"] },
6509
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}(@[A-Za-z0-9._-]{1,64})?$" }
6510
+ ]
6511
+ },
6512
+ status: { enum: ["up", "degraded", "down", "incompatible"] },
6513
+ version: { type: "string" },
6514
+ protocol: { type: "string", examples: ["freedome.engine.v1"] },
6515
+ capabilities: { type: "array", items: { type: "string" } },
6516
+ message: { type: "string" }
6517
+ },
6518
+ additionalProperties: false
6519
+ },
6520
+ engineMetrics: {
6521
+ description: "\u2264 1 Hz; any subset (patch) of the metrics.",
6522
+ type: "object",
6523
+ properties: {
6524
+ fps: { type: "number", minimum: 0 },
6525
+ frameTimeMs: { type: "number", minimum: 0 },
6526
+ droppedFrames: { type: "integer", minimum: 0 },
6527
+ gpuLoad: { type: "number", minimum: 0, maximum: 1 },
6528
+ cpuLoad: { type: "number", minimum: 0, maximum: 1 },
6529
+ temperatureC: { type: "number" }
6530
+ },
6531
+ patternProperties: { "^x-": true },
6532
+ additionalProperties: false
6533
+ },
6534
+ deleted: {
6535
+ type: "object",
6536
+ required: ["id"],
6537
+ properties: { id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
6538
+ additionalProperties: false
6539
+ },
6540
+ activeShow: {
6541
+ type: "object",
6542
+ required: ["activeShowId"],
6543
+ properties: {
6544
+ activeShowId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] }
6545
+ },
6546
+ additionalProperties: false
6547
+ },
6548
+ progressPatch: {
6549
+ type: "object",
6550
+ minProperties: 1,
6551
+ properties: {
6552
+ progress: { type: "number", minimum: 0, maximum: 1 },
6553
+ currentStep: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
6554
+ message: { type: "string" }
6555
+ },
6556
+ additionalProperties: false
6557
+ },
6558
+ awaiting: {
6559
+ description: "Same object as calibration-job `awaiting` (null when nothing is awaited).",
6560
+ anyOf: [{ type: "null" }, { $ref: "calibration-job.schema.json#/$defs/awaiting" }]
6561
+ },
6562
+ anyPatch: { description: "Merge patch of the resource (high-rate kinds).", type: "object", minProperties: 1 },
6563
+ positionPatch: {
6564
+ description: "player.position (default 4 Hz, \u2264 30 Hz per subscription option positionHz).",
6565
+ type: "object",
6566
+ required: ["position"],
6567
+ properties: {
6568
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
6569
+ duration: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/seconds" }, { type: "null" }] },
6570
+ rate: { type: "number" },
6571
+ timecode: { type: "string", pattern: "^\\d{2}:\\d{2}:\\d{2}[:;]\\d{2}$" }
6572
+ },
6573
+ additionalProperties: false
6574
+ },
6575
+ levels: {
6576
+ description: "audio.levels meters (\u2264 10 Hz): id (speaker / zone / device / master) \u2192 dBFS.",
6577
+ type: "object",
6578
+ required: ["levels"],
6579
+ properties: {
6580
+ levels: { type: "object", additionalProperties: { type: "number", maximum: 24 } },
6581
+ peak: { type: "object", additionalProperties: { type: "number", maximum: 24 } }
6582
+ },
6583
+ additionalProperties: false
6584
+ },
6585
+ showItem: {
6586
+ description: "Fine-grained show edit (sub-kind of show.updated).",
6587
+ type: "object",
6588
+ required: ["showId", "itemId", "revision"],
6589
+ properties: {
6590
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6591
+ itemId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6592
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
6593
+ item: { type: "object", description: "the stored .dome entry (absent on delete)" }
6594
+ },
6595
+ additionalProperties: false
6596
+ },
6597
+ uploadProgress: {
6598
+ type: "object",
6599
+ required: ["offset"],
6600
+ properties: {
6601
+ offset: { type: "integer", minimum: 0 },
6602
+ length: { type: "integer", minimum: 0 },
6603
+ status: { type: "string" }
6604
+ },
6605
+ additionalProperties: false
6606
+ },
6607
+ gatewayMessage: {
6608
+ description: "Debug trace of a gateway message (gateways:manage only).",
6609
+ type: "object",
6610
+ required: ["direction", "summary"],
6611
+ properties: {
6612
+ direction: { enum: ["in", "out"] },
6613
+ peer: { type: "string" },
6614
+ summary: { type: "string" },
6615
+ mapsTo: { $ref: "../../common/1.0/ids.schema.json#/$defs/operationId" },
6616
+ raw: { type: "string", maxLength: 4096 }
6617
+ },
6618
+ additionalProperties: false
6619
+ },
6620
+ appCleared: {
6621
+ type: "object",
6622
+ required: ["app"],
6623
+ properties: { app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" } },
6624
+ additionalProperties: false
6625
+ },
6626
+ sessionRevoked: {
6627
+ type: "object",
6628
+ required: ["reason"],
6629
+ properties: {
6630
+ sessionId: { type: "string" },
6631
+ reason: {
6632
+ anyOf: [
6633
+ { enum: ["signed-out", "refresh-reuse", "password-changed", "user-deleted", "key-revoked", "admin"] },
6634
+ { type: "string" }
6635
+ ]
6636
+ }
6637
+ },
6638
+ additionalProperties: false
6639
+ }
6640
+ }
6641
+ },
6642
+ "https://freedome.nativemind.us/schemas/api/1.1/gateway.schema.json": {
6643
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6644
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/gateway.schema.json",
6645
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Compatibility gateways (inbound emulators, outbound drivers, 02d) and the OSC send integration (02e \xA75.6). Root = GET /gateways/{gatewayId}.",
6646
+ title: "Gateway",
6647
+ allOf: [{ $ref: "#/$defs/gateway" }],
6648
+ $defs: {
6649
+ gateway: {
6650
+ type: "object",
6651
+ required: ["id", "direction", "protocol", "enabled", "status"],
6652
+ properties: {
6653
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6654
+ name: { type: "string" },
6655
+ direction: { enum: ["inbound", "outbound", "converter"] },
6656
+ protocol: {
6657
+ type: "string",
6658
+ description: "e.g. screenberry-json, dome360-http, watchout, resolume, osc, pjlink, artnet"
6659
+ },
6660
+ vendor: { type: "string" },
6661
+ enabled: { type: "boolean" },
6662
+ status: {
6663
+ anyOf: [
6664
+ { enum: ["disabled", "starting", "up", "degraded", "down"] },
6665
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6666
+ ]
6667
+ },
6668
+ docsOnly: {
6669
+ type: "boolean",
6670
+ description: "provenance of the driver, not its health: implemented from public docs, no recorded fixtures from a real system yet. A gateway can be `status: up` and `docsOnly: true`."
6671
+ },
6672
+ listeners: {
6673
+ type: "array",
6674
+ items: {
6675
+ type: "object",
6676
+ required: ["transport", "port"],
6677
+ properties: {
6678
+ transport: { enum: ["http", "tcp", "udp", "osc", "ws", "socketio", "serial"] },
6679
+ port: { type: "integer", minimum: 0, maximum: 65535 },
6680
+ bind: { type: "string" }
6681
+ },
6682
+ additionalProperties: false
6683
+ }
6684
+ },
6685
+ peers: {
6686
+ type: "array",
6687
+ items: {
6688
+ type: "object",
6689
+ properties: {
6690
+ address: { type: "string" },
6691
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
6692
+ },
6693
+ additionalProperties: false
6694
+ }
6695
+ },
6696
+ config: {
6697
+ type: "object",
6698
+ additionalProperties: true,
6699
+ description: 'gateway-specific; secrets redacted as "***"'
6700
+ },
6701
+ allowCidrs: { type: "array", items: { type: "string" } },
6702
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
6703
+ stats: { type: "object", additionalProperties: { type: "number" } },
6704
+ resolume: {
6705
+ $ref: "#/$defs/resolumeStatus",
6706
+ description: "live driver status; only on protocol resolume, read-only"
6707
+ }
6708
+ },
6709
+ if: { properties: { protocol: { const: "resolume" } }, required: ["protocol"] },
6710
+ then: { properties: { config: { $ref: "#/$defs/resolumeConfig" } } },
6711
+ patternProperties: { "^x-": true },
6712
+ additionalProperties: false
6713
+ },
6714
+ resolumeConfig: {
6715
+ description: "`config` of the outbound Resolume Arena / Avenue driver (protocol resolume). Defaults are Resolume's own ports; they equal the media server's defaults, so on one machine move the media server (docs/audio-reactive.md).",
6716
+ type: "object",
6717
+ required: ["host"],
6718
+ properties: {
6719
+ host: {
6720
+ type: "string",
6721
+ minLength: 1,
6722
+ maxLength: 253,
6723
+ description: "host name or IP of the Resolume machine"
6724
+ },
6725
+ oscPort: { type: "integer", minimum: 1, maximum: 65535, default: 7e3 },
6726
+ restPort: { type: "integer", minimum: 1, maximum: 65535, default: 8080 },
6727
+ ws: {
6728
+ type: "boolean",
6729
+ default: true,
6730
+ description: "keep the WebSocket API connection (ws://host:restPort/api/v1) for state"
6731
+ },
6732
+ oscMaxRateHz: {
6733
+ type: "number",
6734
+ exclusiveMinimum: 0,
6735
+ maximum: 1e3,
6736
+ description: "highest send rate per OSC address; newer values replace unsent ones"
6737
+ }
6738
+ },
6739
+ patternProperties: { "^x-": true },
6740
+ additionalProperties: false
6741
+ },
6742
+ resolumeLink: {
6743
+ type: "object",
6744
+ required: ["state"],
6745
+ properties: {
6746
+ state: {
6747
+ anyOf: [
6748
+ { enum: ["disabled", "connecting", "up", "down"] },
6749
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6750
+ ],
6751
+ description: "for OSC over UDP, up means sending: there is no acknowledgement"
6752
+ },
6753
+ lastOkAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
6754
+ sent: { type: "integer", minimum: 0 },
6755
+ dropped: { type: "integer", minimum: 0 },
6756
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
6757
+ },
6758
+ additionalProperties: false
6759
+ },
6760
+ resolumeStatus: {
6761
+ type: "object",
6762
+ required: ["osc", "rest", "ws"],
6763
+ properties: {
6764
+ osc: { $ref: "#/$defs/resolumeLink" },
6765
+ rest: { $ref: "#/$defs/resolumeLink" },
6766
+ ws: { $ref: "#/$defs/resolumeLink" },
6767
+ product: {
6768
+ description: "GET /api/v1/product of Resolume, when reachable.",
6769
+ type: "object",
6770
+ properties: {
6771
+ name: { type: "string" },
6772
+ major: { type: "integer", minimum: 0 },
6773
+ minor: { type: "integer", minimum: 0 },
6774
+ micro: { type: "integer", minimum: 0 },
6775
+ revision: { type: "integer", minimum: 0 }
6776
+ },
6777
+ additionalProperties: false
6778
+ },
6779
+ composition: {
6780
+ description: "Summary of the open composition.",
6781
+ type: "object",
6782
+ properties: {
6783
+ name: { type: "string" },
6784
+ layers: { type: "integer", minimum: 0 },
6785
+ columns: { type: "integer", minimum: 0 },
6786
+ decks: { type: "integer", minimum: 0 }
6787
+ },
6788
+ additionalProperties: false
6789
+ },
6790
+ lastSyncAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
6791
+ },
6792
+ additionalProperties: false
6793
+ },
6794
+ patch: {
6795
+ type: "object",
6796
+ minProperties: 1,
6797
+ properties: {
6798
+ enabled: { type: "boolean" },
6799
+ config: { type: "object", additionalProperties: true },
6800
+ allowCidrs: { type: "array", items: { type: "string" } }
6801
+ },
6802
+ additionalProperties: false
6803
+ },
6804
+ page: {
6805
+ type: "object",
6806
+ required: ["items", "nextCursor"],
6807
+ properties: {
6808
+ items: { type: "array", items: { $ref: "#/$defs/gateway" } },
6809
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
6810
+ },
6811
+ additionalProperties: false
6812
+ },
6813
+ testResult: {
6814
+ type: "object",
6815
+ required: ["gatewayId", "ok"],
6816
+ properties: {
6817
+ gatewayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6818
+ ok: { type: "boolean" },
6819
+ latencyMs: { type: "number", minimum: 0 },
6820
+ remoteVersion: { type: "string" },
6821
+ detail: { type: "string" },
6822
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
6823
+ },
6824
+ additionalProperties: false
6825
+ },
6826
+ oscArg: {
6827
+ type: "object",
6828
+ required: ["type", "value"],
6829
+ properties: {
6830
+ type: { enum: ["i", "f", "s", "b", "T", "F", "h", "d", "t", "N"] },
6831
+ value: {
6832
+ anyOf: [{ type: "number" }, { type: "string" }, { type: "boolean" }, { type: "null" }],
6833
+ description: "b = base64 blob; t = NTP time tag as RFC 3339"
6834
+ }
6835
+ },
6836
+ additionalProperties: false
6837
+ },
6838
+ sendOsc: {
6839
+ description: "POST /integrations/osc/send: to a configured OSC target only (never an arbitrary host).",
6840
+ type: "object",
6841
+ required: ["target", "address"],
6842
+ properties: {
6843
+ target: {
6844
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
6845
+ description: "configured target id (gateway or osc target)"
6846
+ },
6847
+ address: { type: "string", pattern: "^/[^\\s#*,?\\[\\]{}]*$" },
6848
+ args: { type: "array", items: { $ref: "#/$defs/oscArg" }, maxItems: 64 }
6849
+ },
6850
+ additionalProperties: false
6851
+ }
6852
+ }
6853
+ },
6854
+ "https://freedome.nativemind.us/schemas/api/1.1/import.schema.json": {
6855
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6856
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/import.schema.json",
6857
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). POST /imports body (02e \xA75.3) and the result of a finished import job. Root = request.",
6858
+ title: "Import request",
6859
+ type: "object",
6860
+ required: ["format"],
6861
+ properties: {
6862
+ uploadId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7", description: "tus upload (purpose import)" },
6863
+ url: {
6864
+ type: "string",
6865
+ format: "uri",
6866
+ pattern: "^https?://",
6867
+ description: "server-side fetch (allow-listed hosts only)"
6868
+ },
6869
+ assetId: {
6870
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
6871
+ description: "an already stored asset (e.g. a .zelim uploaded as asset)"
6872
+ },
6873
+ format: { $ref: "#/$defs/format" },
6874
+ target: {
6875
+ type: "object",
6876
+ properties: {
6877
+ kind: { enum: ["auto", "show", "venue", "assets"], default: "auto" },
6878
+ id: {
6879
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
6880
+ description: "id to create (default: meta.id / generated)"
6881
+ },
6882
+ replace: {
6883
+ type: "boolean",
6884
+ default: false,
6885
+ description: "replace an existing show / venue with the same id (409 otherwise)"
6886
+ },
6887
+ activate: {
6888
+ type: "boolean",
6889
+ default: false,
6890
+ description: "venue: make it the active venue; show: set as the active show"
6891
+ }
6892
+ },
6893
+ additionalProperties: false
6894
+ },
6895
+ options: {
6896
+ type: "object",
6897
+ additionalProperties: true,
6898
+ description: "format-specific (e.g. domemaster-folder: fps, loop)"
6899
+ }
6900
+ },
6901
+ patternProperties: { "^x-": true },
6902
+ additionalProperties: false,
6903
+ oneOf: [{ required: ["uploadId"] }, { required: ["url"] }, { required: ["assetId"] }],
6904
+ $defs: {
6905
+ format: {
6906
+ anyOf: [
6907
+ {
6908
+ enum: [
6909
+ "dome",
6910
+ "domemaster-folder",
6911
+ "screenberry-project",
6912
+ "dome360-playlist",
6913
+ "zelim",
6914
+ "boranko",
6915
+ "comics",
6916
+ "mpcdi"
6917
+ ]
6918
+ },
6919
+ { type: "string", pattern: "^[a-z0-9][a-z0-9.-]{0,63}$" }
6920
+ ]
6921
+ },
6922
+ result: {
6923
+ description: "`result` of a succeeded import job.",
6924
+ type: "object",
6925
+ properties: {
6926
+ format: { $ref: "#/$defs/format" },
6927
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6928
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6929
+ assetIds: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
6930
+ warnings: { type: "array", items: { $ref: "show.schema.json#/$defs/warning" } }
6931
+ },
6932
+ additionalProperties: false
6933
+ }
6934
+ }
6935
+ },
6936
+ "https://freedome.nativemind.us/schemas/api/1.1/info.schema.json": {
6937
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6938
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/info.schema.json",
6939
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). GET /api/v1/info (02e \xA75.1) and the unversioned /health, /ready bodies ($defs/health).",
6940
+ title: "Server info",
6941
+ type: "object",
6942
+ required: ["product", "serverVersion", "instanceId", "apiVersions"],
6943
+ properties: {
6944
+ product: { anyOf: [{ enum: ["freedome-mediaserver", "freedome-cloud"] }, { type: "string", minLength: 1 }] },
6945
+ serverVersion: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
6946
+ contractVersion: {
6947
+ $ref: "../../common/1.0/ids.schema.json#/$defs/semver",
6948
+ description: "freedome_contract release the server implements"
6949
+ },
6950
+ instanceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
6951
+ name: { type: "string" },
6952
+ apiVersions: { type: "array", minItems: 1, items: { type: "string", pattern: "^v\\d+$" } },
6953
+ legacyProfile: { type: "boolean", description: "legacy (flutter_freedome 3.0 / razvivalka) listener enabled" },
6954
+ transports: {
6955
+ type: "object",
6956
+ properties: {
6957
+ rest: { type: "object", properties: { basePath: { type: "string" } }, additionalProperties: true },
6958
+ graphql: {
6959
+ type: "object",
6960
+ properties: { enabled: { type: "boolean" }, path: { type: "string" } },
6961
+ additionalProperties: true
6962
+ },
6963
+ ws: {
6964
+ type: "object",
6965
+ properties: { path: { type: "string" }, subprotocol: { type: "string" } },
6966
+ additionalProperties: true
6967
+ },
6968
+ socketio: {
6969
+ type: "object",
6970
+ properties: { path: { type: "string" }, namespace: { type: "string" } },
6971
+ additionalProperties: true
6972
+ },
6973
+ osc: {
6974
+ type: "object",
6975
+ properties: {
6976
+ udpIn: { type: "integer", minimum: 1, maximum: 65535 },
6977
+ udpOut: { type: "integer", minimum: 1, maximum: 65535 },
6978
+ tcp: { type: "integer", minimum: 1, maximum: 65535 }
6979
+ },
6980
+ additionalProperties: true
6981
+ }
6982
+ },
6983
+ additionalProperties: true
6984
+ },
6985
+ auth: {
6986
+ type: "object",
6987
+ properties: {
6988
+ methods: {
6989
+ type: "array",
6990
+ items: { anyOf: [{ enum: ["password", "apiKey", "pairing", "cloud", "anonymous"] }, { type: "string" }] }
6991
+ }
6992
+ },
6993
+ additionalProperties: true
6994
+ },
6995
+ venues: {
6996
+ type: "array",
6997
+ items: {
6998
+ type: "object",
6999
+ required: ["id"],
7000
+ properties: {
7001
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7002
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
7003
+ default: { type: "boolean" },
7004
+ status: { type: "string" }
7005
+ },
7006
+ additionalProperties: true
7007
+ }
7008
+ },
7009
+ capabilities: {
7010
+ description: "Engines, audio modes, display types, test patterns, gateways \u2026 (open object; clients ignore unknown keys).",
7011
+ type: "object",
7012
+ additionalProperties: true
7013
+ },
7014
+ links: { type: "object", additionalProperties: { type: "string", format: "uri-reference" } }
7015
+ },
7016
+ additionalProperties: true,
7017
+ $defs: {
7018
+ health: {
7019
+ description: "GET /health and /ready (unversioned, anonymous).",
7020
+ type: "object",
7021
+ required: ["status"],
7022
+ properties: {
7023
+ status: { enum: ["ok", "degraded", "down"] },
7024
+ checks: {
7025
+ type: "object",
7026
+ additionalProperties: {
7027
+ type: "object",
7028
+ required: ["status"],
7029
+ properties: { status: { enum: ["ok", "degraded", "down"] }, detail: { type: "string" } },
7030
+ additionalProperties: false
7031
+ }
7032
+ }
7033
+ },
7034
+ additionalProperties: false
7035
+ }
7036
+ }
7037
+ },
7038
+ "https://freedome.nativemind.us/schemas/api/1.1/job.schema.json": {
7039
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7040
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/job.schema.json",
7041
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Generic long-running operation (02e \xA73.1, \xA75.1 GET /jobs/{jobId}).",
7042
+ title: "Job",
7043
+ allOf: [{ $ref: "#/$defs/job" }],
7044
+ $defs: {
7045
+ job: {
7046
+ type: "object",
7047
+ required: ["id", "kind", "status", "createdAt"],
7048
+ properties: {
7049
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7050
+ kind: {
7051
+ anyOf: [
7052
+ { enum: ["calibration", "import", "export", "backup", "restore", "diagnostics", "update", "probe"] },
7053
+ { $ref: "#/$defs/token" }
7054
+ ]
7055
+ },
7056
+ status: { $ref: "#/$defs/status" },
7057
+ progress: { type: "number", minimum: 0, maximum: 1 },
7058
+ message: { type: "string" },
7059
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7060
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7061
+ finishedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7062
+ result: { description: "Kind-specific result (e.g. { venueId } of an import)." },
7063
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
7064
+ links: {
7065
+ type: "object",
7066
+ properties: {
7067
+ self: { type: "string", format: "uri-reference" },
7068
+ cancel: { type: "string", format: "uri-reference" },
7069
+ resource: { type: "string", format: "uri-reference" }
7070
+ },
7071
+ additionalProperties: false
7072
+ }
7073
+ },
7074
+ patternProperties: { "^x-": true },
7075
+ additionalProperties: false,
7076
+ allOf: [
7077
+ {
7078
+ if: { properties: { status: { const: "failed" } }, required: ["status"] },
7079
+ then: { required: ["problem"] }
7080
+ }
7081
+ ]
7082
+ },
7083
+ token: { type: "string", pattern: "^[a-z0-9][a-z0-9._-]{0,63}$" },
7084
+ status: {
7085
+ description: "queued \u2192 running \u21C4 awaiting_input \u2192 succeeded | failed | cancelled.",
7086
+ enum: ["queued", "running", "awaiting_input", "succeeded", "failed", "cancelled"]
7087
+ },
7088
+ page: {
7089
+ type: "object",
7090
+ required: ["items", "nextCursor"],
7091
+ properties: {
7092
+ items: { type: "array", items: { $ref: "#/$defs/job" } },
7093
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7094
+ },
7095
+ additionalProperties: false
7096
+ }
7097
+ }
7098
+ },
7099
+ "https://freedome.nativemind.us/schemas/api/1.1/output.schema.json": {
7100
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7101
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/output.schema.json",
7102
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Venue output state (02e \xA75.2 GET/PATCH /venues/{venueId}/output; fulldome /@1/* coverage).",
7103
+ title: "Venue output",
7104
+ type: "object",
7105
+ required: ["brightness", "volume", "blackout"],
7106
+ properties: {
7107
+ brightness: {
7108
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
7109
+ description: "master brightness 0..1"
7110
+ },
7111
+ volume: {
7112
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
7113
+ description: "master volume, linear 0..1 (C5)"
7114
+ },
7115
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
7116
+ mute: { type: "boolean" },
7117
+ blackout: { type: "boolean" },
7118
+ rotation: { type: "number", minimum: -360, maximum: 360, description: "\xB0 content rotation about the dome axis" },
7119
+ lighting: { type: "boolean", description: "stage / house light relay" },
7120
+ ndi: {
7121
+ type: "object",
7122
+ properties: { enabled: { type: "boolean" }, name: { type: "string" } },
7123
+ additionalProperties: false
7124
+ }
7125
+ },
7126
+ patternProperties: { "^x-": true },
7127
+ additionalProperties: false,
7128
+ $defs: {
7129
+ patch: {
7130
+ description: "PATCH body (application/merge-patch+json): any subset of the output fields.",
7131
+ type: "object",
7132
+ minProperties: 1,
7133
+ properties: {
7134
+ brightness: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7135
+ volume: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7136
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
7137
+ mute: { type: "boolean" },
7138
+ blackout: { type: "boolean" },
7139
+ rotation: { type: "number", minimum: -360, maximum: 360 },
7140
+ lighting: { type: "boolean" },
7141
+ ndi: {
7142
+ type: "object",
7143
+ properties: { enabled: { type: "boolean" }, name: { type: "string" } },
7144
+ additionalProperties: false
7145
+ }
7146
+ },
7147
+ patternProperties: { "^x-": true },
7148
+ additionalProperties: false
7149
+ }
7150
+ }
7151
+ },
7152
+ "https://freedome.nativemind.us/schemas/api/1.1/player.schema.json": {
7153
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7154
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/player.schema.json",
7155
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Media player state and playback command bodies (02e \xA75.3: players, play / pause / resume / stop / next / previous / seek, fireCue, setActiveShow, parameters). Root = GET /venues/{venueId}/players/{playerId}.",
7156
+ title: "Media player",
7157
+ allOf: [{ $ref: "#/$defs/player" }],
7158
+ $defs: {
7159
+ player: {
7160
+ type: "object",
7161
+ required: ["id", "venueId", "status", "position", "revision"],
7162
+ properties: {
7163
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7164
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7165
+ name: { type: "string" },
7166
+ status: { $ref: "#/$defs/status" },
7167
+ showId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7168
+ playlistId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7169
+ timelineId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7170
+ matrixCell: { anyOf: [{ $ref: "#/$defs/matrixCell" }, { type: "null" }] },
7171
+ itemIndex: { anyOf: [{ type: "integer", minimum: 0 }, { type: "null" }] },
7172
+ assetId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7173
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
7174
+ duration: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/seconds" }, { type: "null" }] },
7175
+ rate: { $ref: "#/$defs/rate" },
7176
+ loop: { type: "boolean" },
7177
+ volume: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7178
+ opacity: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7179
+ brightness: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7180
+ rotation: { type: "number", minimum: -360, maximum: 360 },
7181
+ target: {
7182
+ type: "object",
7183
+ properties: {
7184
+ displays: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
7185
+ layer: { type: "integer", minimum: 0 }
7186
+ },
7187
+ additionalProperties: false
7188
+ },
7189
+ pending: {
7190
+ type: "boolean",
7191
+ description: "last command not yet acknowledged by the engine (2 s timeout); a later player.state resolves it"
7192
+ },
7193
+ scheduledAt: {
7194
+ anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }, { type: "null" }],
7195
+ description: "pending scheduled start (play.at)"
7196
+ },
7197
+ error: { anyOf: [{ $ref: "../../common/1.0/problem.schema.json" }, { type: "null" }] },
7198
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7199
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7200
+ },
7201
+ patternProperties: { "^x-": true },
7202
+ additionalProperties: false
7203
+ },
7204
+ status: {
7205
+ anyOf: [
7206
+ { enum: ["idle", "loading", "playing", "paused", "stopped", "error"] },
7207
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
7208
+ ]
7209
+ },
7210
+ rate: { type: "number", exclusiveMinimum: 0, maximum: 16, description: "playback rate, 1 = normal" },
7211
+ matrixCell: {
7212
+ type: "object",
7213
+ required: ["row", "column"],
7214
+ properties: {
7215
+ matrixId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7216
+ row: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7217
+ column: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }
7218
+ },
7219
+ additionalProperties: false
7220
+ },
7221
+ page: {
7222
+ type: "object",
7223
+ required: ["items", "nextCursor"],
7224
+ properties: {
7225
+ items: { type: "array", items: { $ref: "#/$defs/player" } },
7226
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7227
+ },
7228
+ additionalProperties: false
7229
+ },
7230
+ patch: {
7231
+ description: "PATCH /venues/{venueId}/players/{playerId} (merge-patch; playback is last-writer-wins, no If-Match).",
7232
+ type: "object",
7233
+ minProperties: 1,
7234
+ properties: {
7235
+ rate: { $ref: "#/$defs/rate" },
7236
+ loop: { type: "boolean" },
7237
+ volume: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7238
+ opacity: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7239
+ brightness: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7240
+ rotation: { type: "number", minimum: -360, maximum: 360 }
7241
+ },
7242
+ patternProperties: { "^x-": true },
7243
+ additionalProperties: false
7244
+ },
7245
+ play: {
7246
+ description: "POST \u2026/play: what to play (absent = resume the loaded source / startup) and when. `at` = scheduled start on the server clock (multi-node sync, 02d UC-K5).",
7247
+ type: "object",
7248
+ properties: {
7249
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7250
+ playlistId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7251
+ itemIndex: { type: "integer", minimum: 0 },
7252
+ timelineId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7253
+ matrixCell: { $ref: "#/$defs/matrixCell" },
7254
+ assetId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7255
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
7256
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7257
+ loop: { type: "boolean" }
7258
+ },
7259
+ patternProperties: { "^x-": true },
7260
+ additionalProperties: false,
7261
+ not: {
7262
+ anyOf: [
7263
+ { required: ["playlistId", "timelineId"] },
7264
+ { required: ["playlistId", "assetId"] },
7265
+ { required: ["timelineId", "assetId"] },
7266
+ { required: ["matrixCell", "playlistId"] },
7267
+ { required: ["matrixCell", "timelineId"] },
7268
+ { required: ["matrixCell", "assetId"] }
7269
+ ]
7270
+ }
7271
+ },
7272
+ seek: {
7273
+ description: "POST \u2026/seek: exactly one of position (s), marker (timeline marker id) or normalized (0..1).",
7274
+ type: "object",
7275
+ properties: {
7276
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
7277
+ marker: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7278
+ normalized: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7279
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7280
+ },
7281
+ additionalProperties: false,
7282
+ oneOf: [{ required: ["position"] }, { required: ["marker"] }, { required: ["normalized"] }]
7283
+ },
7284
+ activeShow: {
7285
+ description: "PUT /venues/{venueId}/active-show: load a show onto the venue (mapped onto its geometry); showId null unloads.",
7286
+ type: "object",
7287
+ required: ["showId"],
7288
+ properties: {
7289
+ showId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7290
+ autoplay: { type: "boolean", default: false, description: "start `show.startup` on player main" }
7291
+ },
7292
+ additionalProperties: false
7293
+ },
7294
+ activeShowState: {
7295
+ type: "object",
7296
+ required: ["venueId", "showId"],
7297
+ properties: {
7298
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7299
+ showId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7300
+ warnings: { type: "array", items: { $ref: "show.schema.json#/$defs/warning" } }
7301
+ },
7302
+ additionalProperties: false
7303
+ },
7304
+ fireCue: {
7305
+ type: "object",
7306
+ properties: {
7307
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId", description: "default = active show" }
7308
+ },
7309
+ additionalProperties: false
7310
+ },
7311
+ cueFired: {
7312
+ type: "object",
7313
+ required: ["cueId", "showId", "firedAt"],
7314
+ properties: {
7315
+ cueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7316
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7317
+ firedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7318
+ actions: {
7319
+ type: "array",
7320
+ items: {
7321
+ type: "object",
7322
+ required: ["do", "status"],
7323
+ properties: {
7324
+ do: { type: "string" },
7325
+ status: { enum: ["ok", "failed", "skipped"] },
7326
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
7327
+ },
7328
+ additionalProperties: false
7329
+ }
7330
+ }
7331
+ },
7332
+ additionalProperties: false
7333
+ },
7334
+ parameterValue: {
7335
+ description: "PUT /venues/{venueId}/parameters/{path} body.",
7336
+ type: "object",
7337
+ required: ["value"],
7338
+ properties: {
7339
+ value: { anyOf: [{ type: "number" }, { type: "boolean" }, { type: "string" }] },
7340
+ fadeSec: { type: "number", minimum: 0, maximum: 3600 }
7341
+ },
7342
+ additionalProperties: false
7343
+ },
7344
+ parameter: {
7345
+ description: "A node / layer parameter (02d ParameterService UC-N1\u2013N3; Screenberry-compatible surface).",
7346
+ type: "object",
7347
+ required: ["path", "type", "value"],
7348
+ properties: {
7349
+ path: { type: "string", pattern: "^[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+){0,15}$" },
7350
+ type: { enum: ["float", "int", "bool", "string", "enum", "colour"] },
7351
+ value: { anyOf: [{ type: "number" }, { type: "boolean" }, { type: "string" }] },
7352
+ min: { type: "number" },
7353
+ max: { type: "number" },
7354
+ unit: { type: "string" },
7355
+ values: { type: "array", items: { type: "string" }, description: "allowed values of an enum parameter" },
7356
+ readOnly: { type: "boolean" },
7357
+ description: { type: "string" }
7358
+ },
7359
+ additionalProperties: false
7360
+ },
7361
+ parameterPage: {
7362
+ type: "object",
7363
+ required: ["items", "nextCursor"],
7364
+ properties: {
7365
+ items: { type: "array", items: { $ref: "#/$defs/parameter" } },
7366
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7367
+ },
7368
+ additionalProperties: false
7369
+ }
7370
+ }
7371
+ },
7372
+ "https://freedome.nativemind.us/schemas/api/1.1/scenario-session.schema.json": {
7373
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7374
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/scenario-session.schema.json",
7375
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Scenario session (02d \xA73 ScenarioSession, UC-SC2\u2013SC4; topic venues/{venueId}/scenarios/{sessionId}, RC5). Root = GET /venues/{venueId}/scenario-sessions/{sessionId}.",
7376
+ title: "Scenario session",
7377
+ allOf: [{ $ref: "#/$defs/session" }],
7378
+ $defs: {
7379
+ status: {
7380
+ anyOf: [
7381
+ { enum: ["starting", "running", "paused", "finished", "stopped", "failed"] },
7382
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
7383
+ ]
7384
+ },
7385
+ session: {
7386
+ type: "object",
7387
+ required: ["id", "venueId", "scenarioId", "status", "params", "startedAt"],
7388
+ properties: {
7389
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7390
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7391
+ scenarioId: { type: "string", pattern: "^[a-z][a-z0-9_]{0,63}$" },
7392
+ scenarioVersion: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7393
+ status: { $ref: "#/$defs/status" },
7394
+ params: { type: "object" },
7395
+ owner: { type: "string", description: "principal that started it (the session runs with its role)" },
7396
+ progress: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7397
+ phase: { type: "string" },
7398
+ message: { type: "string" },
7399
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
7400
+ startedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7401
+ endedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7402
+ },
7403
+ patternProperties: { "^x-": true },
7404
+ additionalProperties: false,
7405
+ allOf: [
7406
+ {
7407
+ if: { properties: { status: { const: "failed" } }, required: ["status"] },
7408
+ then: { required: ["problem"] }
7409
+ }
7410
+ ]
7411
+ },
7412
+ start: {
7413
+ description: "POST /venues/{venueId}/scenario-sessions (UC-SC2); params are validated against the scenario's paramsSchema (422).",
7414
+ type: "object",
7415
+ required: ["scenarioId"],
7416
+ properties: {
7417
+ scenarioId: { type: "string", pattern: "^[a-z][a-z0-9_]{0,63}$" },
7418
+ params: { type: "object", default: {} },
7419
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7420
+ },
7421
+ additionalProperties: false
7422
+ },
7423
+ page: {
7424
+ type: "object",
7425
+ required: ["items", "nextCursor"],
7426
+ properties: {
7427
+ items: { type: "array", items: { $ref: "#/$defs/session" } },
7428
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7429
+ },
7430
+ additionalProperties: false
7431
+ },
7432
+ logEntry: {
7433
+ type: "object",
7434
+ required: ["seq", "ts", "level", "message"],
7435
+ properties: {
7436
+ seq: { type: "integer", minimum: 0 },
7437
+ ts: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7438
+ level: { enum: ["debug", "info", "warn", "error"] },
7439
+ message: { type: "string" },
7440
+ fields: { type: "object", additionalProperties: true }
7441
+ },
7442
+ additionalProperties: false
7443
+ },
7444
+ logPage: {
7445
+ type: "object",
7446
+ required: ["items", "nextCursor"],
7447
+ properties: {
7448
+ items: { type: "array", items: { $ref: "#/$defs/logEntry" } },
7449
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7450
+ },
7451
+ additionalProperties: false
7452
+ }
7453
+ }
7454
+ },
7455
+ "https://freedome.nativemind.us/schemas/api/1.1/scenario.schema.json": {
7456
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7457
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/scenario.schema.json",
7458
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Installed L6 scenario plugin (02d \xA74a ScenarioManifest, UC-SC1 / SC5; RC5). Root = GET /scenarios/{scenarioId}.",
7459
+ title: "Scenario",
7460
+ allOf: [{ $ref: "#/$defs/scenario" }],
7461
+ $defs: {
7462
+ capability: {
7463
+ anyOf: [
7464
+ {
7465
+ enum: [
7466
+ "playback",
7467
+ "parameters",
7468
+ "audioDigital",
7469
+ "audioHybrid",
7470
+ "cues",
7471
+ "timers",
7472
+ "events",
7473
+ "storage",
7474
+ "http"
7475
+ ]
7476
+ },
7477
+ { type: "string", pattern: "^[a-z][A-Za-z0-9]{0,31}$" }
7478
+ ]
7479
+ },
7480
+ scenario: {
7481
+ type: "object",
7482
+ required: ["id", "version", "api", "title", "enabled", "paramsSchema", "capabilities"],
7483
+ properties: {
7484
+ id: { type: "string", pattern: "^[a-z][a-z0-9_]{0,63}$" },
7485
+ version: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7486
+ api: {
7487
+ type: "string",
7488
+ pattern: "^[0-9]+\\.[0-9]+$",
7489
+ description: "freedome-scenario-api major.minor the plugin is built against"
7490
+ },
7491
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
7492
+ description: { $ref: "../../common/1.0/i18n-text.schema.json" },
7493
+ enabled: { type: "boolean" },
7494
+ paramsSchema: {
7495
+ type: "object",
7496
+ description: "JSON Schema of the start parameters (Manager renders the form)"
7497
+ },
7498
+ capabilities: { type: "array", items: { $ref: "#/$defs/capability" }, uniqueItems: true },
7499
+ minRole: { $ref: "auth.schema.json#/$defs/role" },
7500
+ sessions: { type: "integer", minimum: 0, description: "running sessions" }
7501
+ },
7502
+ patternProperties: { "^x-": true },
7503
+ additionalProperties: false
7504
+ },
7505
+ patch: {
7506
+ description: "PATCH /scenarios/{scenarioId} (admin, UC-SC5).",
7507
+ type: "object",
7508
+ required: ["enabled"],
7509
+ properties: { enabled: { type: "boolean" } },
7510
+ additionalProperties: false
7511
+ },
7512
+ page: {
7513
+ type: "object",
7514
+ required: ["items", "nextCursor"],
7515
+ properties: {
7516
+ items: { type: "array", items: { $ref: "#/$defs/scenario" } },
7517
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7518
+ },
7519
+ additionalProperties: false
7520
+ }
7521
+ }
7522
+ },
7523
+ "https://freedome.nativemind.us/schemas/api/1.1/show.schema.json": {
7524
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7525
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/show.schema.json",
7526
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Show resource (02e \xA74, \xA75.3) = .dome 1.1 show manifest without format / kind ($defs reused from dome/1.1, never duplicated) + server fields. Root = GET representation.",
7527
+ title: "Show",
7528
+ allOf: [{ $ref: "#/$defs/show" }],
7529
+ $defs: {
7530
+ show: {
7531
+ type: "object",
7532
+ allOf: [{ $ref: "#/$defs/body" }],
7533
+ required: ["id", "revision", "meta", "assets", "show"],
7534
+ properties: {
7535
+ id: {
7536
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
7537
+ description: "show id (= meta.id for shows created from a .dome)"
7538
+ },
7539
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7540
+ status: {
7541
+ anyOf: [{ enum: ["ready", "incomplete", "invalid"] }, { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }],
7542
+ description: "incomplete = referenced assets not ready yet"
7543
+ },
7544
+ warnings: {
7545
+ type: "array",
7546
+ items: { $ref: "#/$defs/warning" },
7547
+ description: "UC-S6 validation against the active venue (remapping, missing assets)"
7548
+ },
7549
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7550
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7551
+ },
7552
+ unevaluatedProperties: false
7553
+ },
7554
+ body: {
7555
+ description: "Show content shared by GET / PUT / POST: the .dome show sections.",
7556
+ type: "object",
7557
+ properties: {
7558
+ meta: { $ref: "../../dome/1.1/dome.schema.json#/$defs/meta" },
7559
+ assets: { type: "array", items: { $ref: "../../dome/1.1/dome.schema.json#/$defs/asset" } },
7560
+ show: { $ref: "../../dome/1.1/dome.schema.json#/$defs/show" },
7561
+ compat: { $ref: "../../dome/1.1/dome.schema.json#/$defs/compat" }
7562
+ },
7563
+ patternProperties: { "^x-": true }
7564
+ },
7565
+ input: {
7566
+ description: "POST /shows and PUT /shows/{showId} body. Assets are referenced by .dome asset entries; an entry whose `src` is `asset:<assetId>` points to an asset already stored on the server.",
7567
+ type: "object",
7568
+ allOf: [{ $ref: "#/$defs/body" }],
7569
+ required: ["meta", "assets", "show"],
7570
+ unevaluatedProperties: false
7571
+ },
7572
+ patch: {
7573
+ description: "PATCH /shows/{showId} (application/merge-patch+json): any subset of the sections; arrays are replaced whole (RFC 7396).",
7574
+ type: "object",
7575
+ minProperties: 1,
7576
+ properties: {
7577
+ meta: { type: "object" },
7578
+ assets: { type: "array", items: { $ref: "../../dome/1.1/dome.schema.json#/$defs/asset" } },
7579
+ show: { type: "object" },
7580
+ compat: { anyOf: [{ type: "object" }, { type: "null" }] }
7581
+ },
7582
+ patternProperties: { "^x-": true },
7583
+ additionalProperties: false
7584
+ },
7585
+ warning: {
7586
+ type: "object",
7587
+ required: ["code", "detail"],
7588
+ properties: {
7589
+ code: { type: "string", pattern: "^[a-z][a-z0-9-]{0,63}$" },
7590
+ detail: { type: "string" },
7591
+ pointer: { type: "string" }
7592
+ },
7593
+ additionalProperties: false
7594
+ },
7595
+ page: {
7596
+ type: "object",
7597
+ required: ["items", "nextCursor"],
7598
+ properties: {
7599
+ items: { type: "array", items: { $ref: "#/$defs/summary" } },
7600
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
7601
+ count: { type: "integer", minimum: 0 }
7602
+ },
7603
+ additionalProperties: false
7604
+ },
7605
+ summary: {
7606
+ description: "Collection item: no assets / show body.",
7607
+ type: "object",
7608
+ required: ["id", "revision", "meta"],
7609
+ properties: {
7610
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7611
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7612
+ meta: { $ref: "../../dome/1.1/dome.schema.json#/$defs/meta" },
7613
+ status: { type: "string" },
7614
+ assetCount: { type: "integer", minimum: 0 },
7615
+ duration: { $ref: "../../common/1.0/units.schema.json#/$defs/seconds" },
7616
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7617
+ },
7618
+ patternProperties: { "^x-": true },
7619
+ additionalProperties: false
7620
+ }
7621
+ }
7622
+ },
7623
+ "https://freedome.nativemind.us/schemas/api/1.1/system.schema.json": {
7624
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7625
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/system.schema.json",
7626
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Host / service status and system operations (02e \xA75.1 /system/*): status, logs, config (redacted), diagnostics, backup / restore, update, reboot / shutdown; cluster nodes + clock (02d UC-K1\u2013K3). Root = GET /system.",
7627
+ title: "System status",
7628
+ type: "object",
7629
+ required: ["host", "uptimeSec", "versions"],
7630
+ properties: {
7631
+ host: {
7632
+ type: "object",
7633
+ required: ["hostname", "os", "arch"],
7634
+ properties: {
7635
+ hostname: { type: "string" },
7636
+ os: { type: "string", description: "e.g. Debian 12, Astra Linux 1.8, Windows 11, macOS 15" },
7637
+ kernel: { type: "string" },
7638
+ arch: {
7639
+ anyOf: [{ enum: ["x86_64", "aarch64", "riscv64", "loongarch64", "e2k", "mips64el"] }, { type: "string" }]
7640
+ },
7641
+ cpu: {
7642
+ type: "object",
7643
+ properties: {
7644
+ model: { type: "string" },
7645
+ cores: { type: "integer", minimum: 1 },
7646
+ loadPercent: { type: "number", minimum: 0 }
7647
+ },
7648
+ additionalProperties: true
7649
+ },
7650
+ memory: {
7651
+ type: "object",
7652
+ properties: { totalBytes: { type: "integer", minimum: 0 }, usedBytes: { type: "integer", minimum: 0 } },
7653
+ additionalProperties: true
7654
+ },
7655
+ gpus: {
7656
+ type: "array",
7657
+ items: {
7658
+ type: "object",
7659
+ properties: {
7660
+ name: { type: "string" },
7661
+ driver: { type: "string" },
7662
+ loadPercent: { type: "number", minimum: 0 },
7663
+ memoryBytes: { type: "integer", minimum: 0 }
7664
+ },
7665
+ additionalProperties: true
7666
+ }
7667
+ }
7668
+ },
7669
+ additionalProperties: true
7670
+ },
7671
+ temperatures: {
7672
+ description: "Sensor name \u2192 \xB0C (replaces /api/system/temperature).",
7673
+ type: "object",
7674
+ additionalProperties: { type: "number" }
7675
+ },
7676
+ disks: {
7677
+ type: "array",
7678
+ items: {
7679
+ type: "object",
7680
+ required: ["mount", "totalBytes", "freeBytes"],
7681
+ properties: {
7682
+ mount: { type: "string" },
7683
+ totalBytes: { type: "integer", minimum: 0 },
7684
+ freeBytes: { type: "integer", minimum: 0 }
7685
+ },
7686
+ additionalProperties: false
7687
+ }
7688
+ },
7689
+ uptimeSec: { type: "number", minimum: 0 },
7690
+ serviceUptimeSec: { type: "number", minimum: 0 },
7691
+ versions: {
7692
+ description: "Component \u2192 version (server, contract, engines, OS packages).",
7693
+ type: "object",
7694
+ additionalProperties: { type: "string" }
7695
+ }
7696
+ },
7697
+ patternProperties: { "^x-": true },
7698
+ additionalProperties: false,
7699
+ $defs: {
7700
+ logLevel: { enum: ["trace", "debug", "info", "warn", "error"] },
7701
+ logEntry: {
7702
+ type: "object",
7703
+ required: ["ts", "level", "message"],
7704
+ properties: {
7705
+ seq: { type: "integer", minimum: 0 },
7706
+ ts: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7707
+ level: { $ref: "#/$defs/logLevel" },
7708
+ target: { type: "string", description: "module / component" },
7709
+ message: { type: "string" },
7710
+ fields: { type: "object", additionalProperties: true },
7711
+ traceId: { type: "string" }
7712
+ },
7713
+ additionalProperties: false
7714
+ },
7715
+ logPage: {
7716
+ type: "object",
7717
+ required: ["items", "nextCursor"],
7718
+ properties: {
7719
+ items: { type: "array", items: { $ref: "#/$defs/logEntry" } },
7720
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7721
+ },
7722
+ additionalProperties: false
7723
+ },
7724
+ config: {
7725
+ description: 'Effective server configuration (TOML sections as JSON). Secret values are always returned as "***" and a PUT that sends "***" keeps the stored secret (redaction rule, 01a \xA73).',
7726
+ type: "object",
7727
+ required: ["revision", "values"],
7728
+ properties: {
7729
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7730
+ values: { type: "object", additionalProperties: true },
7731
+ redacted: {
7732
+ type: "array",
7733
+ items: { type: "string" },
7734
+ description: "JSON pointers of redacted secret values"
7735
+ },
7736
+ restartRequired: {
7737
+ type: "array",
7738
+ items: { type: "string" },
7739
+ description: "pointers whose change takes effect only after a restart"
7740
+ }
7741
+ },
7742
+ additionalProperties: false
7743
+ },
7744
+ configInput: {
7745
+ description: "PUT /system/config body (If-Match = config revision).",
7746
+ type: "object",
7747
+ required: ["values"],
7748
+ properties: { values: { type: "object", additionalProperties: true } },
7749
+ additionalProperties: false
7750
+ },
7751
+ diagnosticsRequest: {
7752
+ type: "object",
7753
+ properties: {
7754
+ checks: {
7755
+ type: "array",
7756
+ items: {
7757
+ anyOf: [
7758
+ { enum: ["engines", "displays", "audio", "network", "storage", "sync", "gateways"] },
7759
+ { type: "string" }
7760
+ ]
7761
+ },
7762
+ uniqueItems: true
7763
+ }
7764
+ },
7765
+ additionalProperties: false
7766
+ },
7767
+ backupRequest: {
7768
+ type: "object",
7769
+ properties: {
7770
+ include: {
7771
+ type: "array",
7772
+ items: {
7773
+ anyOf: [{ enum: ["config", "database", "venues", "shows", "keys", "assets"] }, { type: "string" }]
7774
+ },
7775
+ uniqueItems: true
7776
+ },
7777
+ note: { type: "string", maxLength: 512 }
7778
+ },
7779
+ additionalProperties: false
7780
+ },
7781
+ restoreRequest: {
7782
+ type: "object",
7783
+ required: ["uploadId", "confirm"],
7784
+ properties: {
7785
+ uploadId: {
7786
+ $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7",
7787
+ description: "tus upload (purpose restore) holding the backup archive"
7788
+ },
7789
+ confirm: { const: true }
7790
+ },
7791
+ additionalProperties: false
7792
+ },
7793
+ updateRequest: {
7794
+ type: "object",
7795
+ properties: {
7796
+ channel: { anyOf: [{ enum: ["stable", "beta"] }, { type: "string" }] },
7797
+ version: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7798
+ uploadId: {
7799
+ $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7",
7800
+ description: "offline update package (purpose update)"
7801
+ },
7802
+ components: {
7803
+ type: "array",
7804
+ items: { type: "string" },
7805
+ uniqueItems: true,
7806
+ description: "server, engines, firmware:<deviceId> \u2026; absent = all"
7807
+ }
7808
+ },
7809
+ additionalProperties: false
7810
+ },
7811
+ updateStatus: {
7812
+ type: "object",
7813
+ required: ["status"],
7814
+ properties: {
7815
+ status: {
7816
+ anyOf: [
7817
+ { enum: ["idle", "checking", "available", "downloading", "installing", "restartPending", "failed"] },
7818
+ { type: "string" }
7819
+ ]
7820
+ },
7821
+ current: { type: "object", additionalProperties: { type: "string" } },
7822
+ available: { type: "object", additionalProperties: { type: "string" } },
7823
+ jobId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7824
+ checkedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7825
+ },
7826
+ additionalProperties: false
7827
+ },
7828
+ power: {
7829
+ description: "POST /system/reboot and /system/shutdown body.",
7830
+ type: "object",
7831
+ required: ["confirm"],
7832
+ properties: {
7833
+ confirm: { const: true },
7834
+ delaySec: { type: "integer", minimum: 0, maximum: 3600, default: 5 },
7835
+ reason: { type: "string", maxLength: 256 }
7836
+ },
7837
+ additionalProperties: false
7838
+ },
7839
+ powerAccepted: {
7840
+ type: "object",
7841
+ required: ["action", "at"],
7842
+ properties: {
7843
+ action: { enum: ["reboot", "shutdown"] },
7844
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7845
+ },
7846
+ additionalProperties: false
7847
+ },
7848
+ clock: {
7849
+ description: "Clock status of a node (02d ClockStatus).",
7850
+ type: "object",
7851
+ required: ["source", "locked"],
7852
+ properties: {
7853
+ source: { anyOf: [{ enum: ["ptp", "ntp", "local"] }, { type: "string" }] },
7854
+ offsetMs: { type: "number" },
7855
+ jitterMs: { type: "number", minimum: 0 },
7856
+ masterId: { type: "string" },
7857
+ locked: { type: "boolean" }
7858
+ },
7859
+ additionalProperties: false
7860
+ },
7861
+ node: {
7862
+ description: "Cluster node (02d UC-K1\u2013K3): this server and the engine hosts it drives.",
7863
+ type: "object",
7864
+ required: ["id", "role", "status"],
7865
+ properties: {
7866
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7867
+ name: { type: "string" },
7868
+ role: { anyOf: [{ enum: ["primary", "engine", "peer"] }, { type: "string" }] },
7869
+ status: { anyOf: [{ enum: ["up", "degraded", "down"] }, { type: "string" }] },
7870
+ address: { type: "string" },
7871
+ engines: { type: "array", items: { type: "string" } },
7872
+ clock: { $ref: "#/$defs/clock" },
7873
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7874
+ },
7875
+ patternProperties: { "^x-": true },
7876
+ additionalProperties: false
7877
+ },
7878
+ nodePage: {
7879
+ type: "object",
7880
+ required: ["items", "nextCursor"],
7881
+ properties: {
7882
+ items: { type: "array", items: { $ref: "#/$defs/node" } },
7883
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7884
+ },
7885
+ additionalProperties: false
7886
+ }
7887
+ }
7888
+ },
7889
+ "https://freedome.nativemind.us/schemas/api/1.1/upload.schema.json": {
7890
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7891
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/upload.schema.json",
7892
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). tus 1.0.0 upload (02e \xA75.4, C12): JSON status of GET /uploads/{uploadId} for non-tus clients; the decoded Upload-Metadata. Root = upload status.",
7893
+ title: "Upload",
7894
+ type: "object",
7895
+ required: ["id", "length", "offset", "status", "metadata", "createdAt"],
7896
+ properties: {
7897
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7898
+ length: { type: "integer", minimum: 0, description: "Upload-Length" },
7899
+ offset: { type: "integer", minimum: 0, description: "Upload-Offset (bytes received and persisted)" },
7900
+ status: {
7901
+ anyOf: [
7902
+ { enum: ["uploading", "complete", "failed", "expired"] },
7903
+ { type: "string", pattern: "^[a-z_]{1,32}$" }
7904
+ ]
7905
+ },
7906
+ metadata: { $ref: "#/$defs/metadata" },
7907
+ assetId: {
7908
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
7909
+ description: "asset created / updated on completion (purpose asset)"
7910
+ },
7911
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
7912
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7913
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7914
+ links: {
7915
+ type: "object",
7916
+ properties: {
7917
+ self: { type: "string", format: "uri-reference" },
7918
+ asset: { type: "string", format: "uri-reference" }
7919
+ },
7920
+ additionalProperties: false
7921
+ }
7922
+ },
7923
+ additionalProperties: false,
7924
+ $defs: {
7925
+ metadata: {
7926
+ description: "Upload-Metadata (tus: comma-separated `key base64(value)` pairs), decoded.",
7927
+ type: "object",
7928
+ required: ["filename", "purpose"],
7929
+ properties: {
7930
+ filename: { type: "string", minLength: 1, maxLength: 512 },
7931
+ contentType: { $ref: "../../common/1.0/units.schema.json#/$defs/mediaType" },
7932
+ sha256: {
7933
+ $ref: "../../common/1.0/ids.schema.json#/$defs/sha256",
7934
+ description: "digest of the whole file, verified on completion (upload-checksum-mismatch)"
7935
+ },
7936
+ purpose: {
7937
+ anyOf: [
7938
+ { enum: ["asset", "import", "restore", "capture", "update"] },
7939
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
7940
+ ]
7941
+ },
7942
+ assetId: {
7943
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
7944
+ description: "purpose asset: create the asset with this id (or replace the content of an existing one)"
7945
+ }
7946
+ },
7947
+ additionalProperties: true
7948
+ },
7949
+ capabilities: {
7950
+ description: "Informative mirror of the OPTIONS /uploads headers (Tus-Version, Tus-Extension, Tus-Max-Size, Tus-Checksum-Algorithm).",
7951
+ type: "object",
7952
+ required: ["version", "extensions"],
7953
+ properties: {
7954
+ version: { type: "array", items: { type: "string" } },
7955
+ extensions: {
7956
+ type: "array",
7957
+ items: {
7958
+ anyOf: [
7959
+ { enum: ["creation", "creation-with-upload", "termination", "checksum", "expiration"] },
7960
+ { type: "string" }
7961
+ ]
7962
+ }
7963
+ },
7964
+ maxSize: { type: "integer", minimum: 0 },
7965
+ checksumAlgorithms: { type: "array", items: { type: "string" } },
7966
+ maxChunkBytes: {
7967
+ type: "integer",
7968
+ minimum: 1,
7969
+ description: "server-recommended PATCH size (\u2264 95 MB behind Cloudflare)"
7970
+ }
7971
+ },
7972
+ additionalProperties: false
7973
+ }
7974
+ }
7975
+ },
7976
+ "https://freedome.nativemind.us/schemas/api/1.1/user.schema.json": {
7977
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7978
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/user.schema.json",
7979
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Local user account of a media server (02e \xA75.1 /users, scope users:manage). Root = GET representation.",
7980
+ title: "User",
7981
+ allOf: [{ $ref: "#/$defs/user" }],
7982
+ $defs: {
7983
+ user: {
7984
+ type: "object",
7985
+ required: ["id", "username", "role", "revision", "createdAt"],
7986
+ properties: {
7987
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7988
+ username: { $ref: "#/$defs/username" },
7989
+ displayName: { type: "string", maxLength: 128 },
7990
+ role: { $ref: "auth.schema.json#/$defs/role" },
7991
+ disabled: { type: "boolean" },
7992
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7993
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7994
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7995
+ lastLoginAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7996
+ },
7997
+ patternProperties: { "^x-": true },
7998
+ additionalProperties: false
7999
+ },
8000
+ username: { type: "string", pattern: "^[a-z0-9][a-z0-9._-]{1,63}$" },
8001
+ input: {
8002
+ description: "POST /users.",
8003
+ type: "object",
8004
+ required: ["username", "password", "role"],
8005
+ properties: {
8006
+ username: { $ref: "#/$defs/username" },
8007
+ displayName: { type: "string", maxLength: 128 },
8008
+ password: { type: "string", minLength: 12, maxLength: 1024, writeOnly: true },
8009
+ role: { $ref: "auth.schema.json#/$defs/role" },
8010
+ disabled: { type: "boolean" }
8011
+ },
8012
+ additionalProperties: false
8013
+ },
8014
+ patch: {
8015
+ description: "PATCH /users/{userId} (merge-patch). Changing the password revokes the user's sessions.",
8016
+ type: "object",
8017
+ minProperties: 1,
8018
+ properties: {
8019
+ displayName: { type: "string", maxLength: 128 },
8020
+ password: { type: "string", minLength: 12, maxLength: 1024, writeOnly: true },
8021
+ role: { $ref: "auth.schema.json#/$defs/role" },
8022
+ disabled: { type: "boolean" }
8023
+ },
8024
+ additionalProperties: false
8025
+ },
8026
+ page: {
8027
+ type: "object",
8028
+ required: ["items", "nextCursor"],
8029
+ properties: {
8030
+ items: { type: "array", items: { $ref: "#/$defs/user" } },
8031
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
8032
+ count: { type: "integer", minimum: 0 }
8033
+ },
8034
+ additionalProperties: false
8035
+ }
8036
+ }
8037
+ },
8038
+ "https://freedome.nativemind.us/schemas/api/1.1/venue.schema.json": {
8039
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8040
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/venue.schema.json",
8041
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Venue resource (02e \xA74, \xA75.2) = .dome 1.1 venue manifest without format / kind ($defs reused from dome/1.1) + server fields. Root = GET representation.",
8042
+ title: "Venue",
8043
+ allOf: [{ $ref: "#/$defs/venue" }],
8044
+ $defs: {
8045
+ venue: {
8046
+ type: "object",
8047
+ allOf: [{ $ref: "#/$defs/body" }],
8048
+ required: ["id", "revision", "status", "meta", "dome", "displays"],
8049
+ properties: {
8050
+ id: {
8051
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
8052
+ description: "venue id (= meta.id for venues created from a .dome)"
8053
+ },
8054
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
8055
+ status: {
8056
+ anyOf: [
8057
+ { enum: ["idle", "loading", "ready", "playing", "degraded", "error"] },
8058
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
8059
+ ]
8060
+ },
8061
+ default: { type: "boolean", description: "true for the venue the alias `default` resolves to" },
8062
+ activeShowId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
8063
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
8064
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
8065
+ },
8066
+ unevaluatedProperties: false
8067
+ },
8068
+ body: {
8069
+ description: "Venue content shared by GET / PUT / POST: the .dome venue sections.",
8070
+ type: "object",
8071
+ properties: {
8072
+ meta: { $ref: "../../dome/1.1/dome.schema.json#/$defs/meta" },
8073
+ dome: { $ref: "../../dome/1.1/dome.schema.json#/$defs/dome" },
8074
+ displays: { type: "array", items: { $ref: "../../dome/1.1/dome.schema.json#/$defs/display" } },
8075
+ calibration: { $ref: "../../dome/1.1/dome.schema.json#/$defs/calibration" },
8076
+ audio: { $ref: "../../dome/1.1/dome.schema.json#/$defs/audio" },
8077
+ compat: { $ref: "../../dome/1.1/dome.schema.json#/$defs/compat" }
8078
+ },
8079
+ patternProperties: { "^x-": true }
8080
+ },
8081
+ input: {
8082
+ description: "POST /venues and PUT /venues/{venueId} body.",
8083
+ type: "object",
8084
+ allOf: [{ $ref: "#/$defs/body" }],
8085
+ required: ["meta", "dome", "displays"],
8086
+ unevaluatedProperties: false
8087
+ },
8088
+ patch: {
8089
+ description: "PATCH body (application/merge-patch+json, RFC 7396) over the venue sections; the merged result must be a valid input.",
8090
+ type: "object",
8091
+ minProperties: 1,
8092
+ propertyNames: { pattern: "^(meta|dome|displays|calibration|audio|compat|x-.+)$" }
8093
+ },
8094
+ page: {
8095
+ description: "GET /venues page.",
8096
+ type: "object",
8097
+ allOf: [{ $ref: "../../common/1.0/pagination.schema.json" }],
8098
+ properties: { items: { type: "array", items: { $ref: "#/$defs/venue" } } }
8099
+ }
8100
+ }
8101
+ },
8102
+ "https://freedome.nativemind.us/schemas/api/1.1/ws-messages.schema.json": {
8103
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8104
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/ws-messages.schema.json",
8105
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Plain WebSocket messages, sub-protocol freedome.v1 (02e \xA78.1; asyncapi/ws.yaml). Each $def `<type>` is a full envelope with its `data`; the root accepts any known message.",
8106
+ title: "WebSocket messages (freedome.v1)",
8107
+ oneOf: [
8108
+ { $ref: "#/$defs/hello" },
8109
+ { $ref: "#/$defs/welcome" },
8110
+ { $ref: "#/$defs/subscribe" },
8111
+ { $ref: "#/$defs/unsubscribe" },
8112
+ { $ref: "#/$defs/call" },
8113
+ { $ref: "#/$defs/result" },
8114
+ { $ref: "#/$defs/error" },
8115
+ { $ref: "#/$defs/event" },
8116
+ { $ref: "#/$defs/resync" },
8117
+ { $ref: "#/$defs/ping" },
8118
+ { $ref: "#/$defs/pong" },
8119
+ { $ref: "#/$defs/bye" }
8120
+ ],
8121
+ $defs: {
8122
+ helloData: {
8123
+ type: "object",
8124
+ required: ["app"],
8125
+ properties: {
8126
+ token: {
8127
+ type: "string",
8128
+ description: "access JWT or fdk_ key (or Authorization header / ?access_token= for browsers)"
8129
+ },
8130
+ app: { type: "string", minLength: 1 },
8131
+ appVersion: { type: "string" },
8132
+ sdk: { type: "string", examples: ["freedome_client/1.0.0"] },
8133
+ resume: {
8134
+ type: "object",
8135
+ required: ["sinceSeq"],
8136
+ properties: { sinceSeq: { type: "integer", minimum: 0 } },
8137
+ patternProperties: { "^x-": true },
8138
+ additionalProperties: false
8139
+ }
8140
+ },
8141
+ patternProperties: { "^x-": true },
8142
+ additionalProperties: false
8143
+ },
8144
+ welcomeData: {
8145
+ type: "object",
8146
+ required: ["sessionId", "server", "scopes", "heartbeatSec"],
8147
+ properties: {
8148
+ sessionId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
8149
+ server: { $ref: "info.schema.json" },
8150
+ scopes: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/scope" } },
8151
+ heartbeatSec: { type: "integer", minimum: 1, default: 20 },
8152
+ maxMessageBytes: { type: "integer", minimum: 1024, default: 1048576 }
8153
+ },
8154
+ patternProperties: { "^x-": true },
8155
+ additionalProperties: false
8156
+ },
8157
+ subscribeData: {
8158
+ type: "object",
8159
+ required: ["topics"],
8160
+ properties: {
8161
+ topics: {
8162
+ type: "array",
8163
+ minItems: 1,
8164
+ maxItems: 256,
8165
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" }
8166
+ },
8167
+ sinceSeq: { type: "integer", minimum: 0 },
8168
+ options: {
8169
+ type: "object",
8170
+ properties: {
8171
+ positionHz: {
8172
+ type: "number",
8173
+ exclusiveMinimum: 0,
8174
+ maximum: 30,
8175
+ description: "player.position rate (default 4)"
8176
+ },
8177
+ analysisHz: {
8178
+ type: "number",
8179
+ exclusiveMinimum: 0,
8180
+ maximum: 60,
8181
+ description: "audio.analysis rate (default 15); the server sends the newest frame"
8182
+ }
8183
+ },
8184
+ patternProperties: { "^x-": true },
8185
+ additionalProperties: false
8186
+ }
8187
+ },
8188
+ patternProperties: { "^x-": true },
8189
+ additionalProperties: false
8190
+ },
8191
+ unsubscribeData: {
8192
+ type: "object",
8193
+ required: ["topics"],
8194
+ properties: {
8195
+ topics: {
8196
+ type: "array",
8197
+ minItems: 1,
8198
+ maxItems: 256,
8199
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" }
8200
+ }
8201
+ },
8202
+ patternProperties: { "^x-": true },
8203
+ additionalProperties: false
8204
+ },
8205
+ subscribeResult: {
8206
+ description: "`result.body` of subscribe / unsubscribe: accepted filters + denied ones with a problem (no leak of existence).",
8207
+ type: "object",
8208
+ required: ["topics"],
8209
+ properties: {
8210
+ topics: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" } },
8211
+ denied: {
8212
+ type: "array",
8213
+ items: {
8214
+ type: "object",
8215
+ required: ["topic", "problem"],
8216
+ properties: {
8217
+ topic: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" },
8218
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
8219
+ },
8220
+ patternProperties: { "^x-": true },
8221
+ additionalProperties: false
8222
+ }
8223
+ }
8224
+ },
8225
+ patternProperties: { "^x-": true },
8226
+ additionalProperties: false
8227
+ },
8228
+ resultData: {
8229
+ type: "object",
8230
+ required: ["status"],
8231
+ properties: {
8232
+ status: {
8233
+ type: "integer",
8234
+ minimum: 100,
8235
+ maximum: 599,
8236
+ description: "HTTP status of the equivalent REST call"
8237
+ },
8238
+ etag: { type: "string" },
8239
+ body: { description: "REST response body of the operation (absent for 204)" }
8240
+ },
8241
+ patternProperties: { "^x-": true },
8242
+ additionalProperties: false
8243
+ },
8244
+ resyncData: {
8245
+ description: "Client must re-read state via REST / GraphQL for these topics.",
8246
+ type: "object",
8247
+ required: ["topics", "reason"],
8248
+ properties: {
8249
+ topics: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" } },
8250
+ reason: { anyOf: [{ enum: ["gap-too-old", "server-restart", "overflow"] }, { type: "string" }] }
8251
+ },
8252
+ patternProperties: { "^x-": true },
8253
+ additionalProperties: false
8254
+ },
8255
+ emptyData: { type: "object", maxProperties: 0 },
8256
+ byeData: {
8257
+ type: "object",
8258
+ required: ["reason"],
8259
+ properties: {
8260
+ reason: { type: "string" },
8261
+ code: {
8262
+ type: "integer",
8263
+ description: "WebSocket close code that follows: 4401 unauthenticated, 4403 forbidden, 4408 heartbeat timeout, 4409 superseded, 4413 message too large, 1012 restart"
8264
+ }
8265
+ },
8266
+ patternProperties: { "^x-": true },
8267
+ additionalProperties: false
8268
+ },
8269
+ hello: {
8270
+ description: "C\u2192S first message.",
8271
+ type: "object",
8272
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8273
+ required: ["type", "id", "ts", "data"],
8274
+ properties: { type: { const: "hello" }, data: { $ref: "#/$defs/helloData" } }
8275
+ },
8276
+ welcome: {
8277
+ description: "S\u2192C answer to hello.",
8278
+ type: "object",
8279
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8280
+ required: ["type", "id", "ts", "data", "replyTo"],
8281
+ properties: { type: { const: "welcome" }, data: { $ref: "#/$defs/welcomeData" } }
8282
+ },
8283
+ subscribe: {
8284
+ description: "C\u2192S; answered by result (subscribeResult).",
8285
+ type: "object",
8286
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8287
+ required: ["type", "id", "ts", "data"],
8288
+ properties: { type: { const: "subscribe" }, data: { $ref: "#/$defs/subscribeData" } }
8289
+ },
8290
+ unsubscribe: {
8291
+ description: "C\u2192S; answered by result.",
8292
+ type: "object",
8293
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8294
+ required: ["type", "id", "ts", "data"],
8295
+ properties: { type: { const: "unsubscribe" }, data: { $ref: "#/$defs/unsubscribeData" } }
8296
+ },
8297
+ call: {
8298
+ description: "C\u2192S operation call (`op` = OpenAPI operationId; envelope id = idempotency key).",
8299
+ type: "object",
8300
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8301
+ required: ["type", "id", "ts", "data"],
8302
+ properties: {
8303
+ type: { const: "call" },
8304
+ data: { $ref: "../../common/1.0/envelope.schema.json#/$defs/callData" }
8305
+ }
8306
+ },
8307
+ result: {
8308
+ description: "S\u2192C reply to subscribe / unsubscribe / call.",
8309
+ type: "object",
8310
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8311
+ required: ["type", "id", "ts", "data", "replyTo"],
8312
+ properties: { type: { const: "result" }, data: { $ref: "#/$defs/resultData" } }
8313
+ },
8314
+ error: {
8315
+ description: "S\u2192C problem reply (replyTo set when answering a message).",
8316
+ type: "object",
8317
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8318
+ required: ["type", "id", "ts", "data"],
8319
+ properties: { type: { const: "error" }, data: { $ref: "../../common/1.0/problem.schema.json" } }
8320
+ },
8321
+ event: {
8322
+ description: "S\u2192C event (02e \xA77.1).",
8323
+ type: "object",
8324
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8325
+ required: ["type", "id", "ts", "data", "topic"],
8326
+ properties: { type: { const: "event" }, data: { $ref: "event-kinds.schema.json" } }
8327
+ },
8328
+ resync: {
8329
+ description: "S\u2192C: resume gap too old.",
8330
+ type: "object",
8331
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8332
+ required: ["type", "id", "ts", "data"],
8333
+ properties: { type: { const: "resync" }, data: { $ref: "#/$defs/resyncData" } }
8334
+ },
8335
+ ping: {
8336
+ description: "Either side; 2 missed heartbeats \u2192 close 4408.",
8337
+ type: "object",
8338
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8339
+ required: ["type", "id", "ts", "data"],
8340
+ properties: { type: { const: "ping" }, data: { $ref: "#/$defs/emptyData" } }
8341
+ },
8342
+ pong: {
8343
+ description: "Reply to ping.",
8344
+ type: "object",
8345
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8346
+ required: ["type", "id", "ts", "data", "replyTo"],
8347
+ properties: { type: { const: "pong" }, data: { $ref: "#/$defs/emptyData" } }
8348
+ },
8349
+ bye: {
8350
+ description: "S\u2192C before closing.",
8351
+ type: "object",
8352
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8353
+ required: ["type", "id", "ts", "data"],
8354
+ properties: { type: { const: "bye" }, data: { $ref: "#/$defs/byeData" } }
8355
+ },
8356
+ eventPage: {
8357
+ description: "GET /events (history ring buffer, resume after reconnect): events with seq > sinceSeq on the requested topics. `resync: true` = the gap is older than the buffer; re-read state.",
8358
+ type: "object",
8359
+ required: ["items", "nextCursor"],
8360
+ properties: {
8361
+ items: { type: "array", items: { $ref: "#/$defs/event" } },
8362
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
8363
+ lastSeq: { type: "integer", minimum: 0 },
8364
+ resync: { type: "boolean" }
8365
+ },
8366
+ additionalProperties: false
8367
+ },
8368
+ socketioAck: {
8369
+ description: "socket.io acknowledgement arguments `(err, result)` of subscribe / unsubscribe / call on namespace /v1 (02e \xA78.2): always two arguments: err = problem or null, result = the WS result data (status, etag, body).",
8370
+ type: "array",
8371
+ minItems: 2,
8372
+ maxItems: 2,
8373
+ prefixItems: [
8374
+ { anyOf: [{ $ref: "../../common/1.0/problem.schema.json" }, { type: "null" }] },
8375
+ { anyOf: [{ $ref: "#/$defs/resultData" }, { type: "null" }] }
8376
+ ],
8377
+ items: false
8378
+ },
8379
+ socketioCall: {
8380
+ description: "socket.io `call` payload = WS call data (02e \xA78.2).",
8381
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json#/$defs/callData" }]
8382
+ }
8383
+ }
8384
+ },
4321
8385
  "https://freedome.nativemind.us/schemas/boranko/1.0/boranko.schema.json": {
4322
8386
  $schema: "https://json-schema.org/draft/2020-12/schema",
4323
8387
  $id: "https://freedome.nativemind.us/schemas/boranko/1.0/boranko.schema.json",