@freedome/protocol 1.0.0 → 1.2.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,4154 @@ 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/assistant.schema.json": {
4686
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4687
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/assistant.schema.json",
4688
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). The person's side of the assistant: physical confirmations and the outbound link (flows/sdd-freedome-mcp 3.2, 3.3).",
4689
+ title: "Assistant",
4690
+ $ref: "#/$defs/link",
4691
+ $defs: {
4692
+ confirmation: {
4693
+ description: "A physical action waiting for a person. The code hash stays on the venue and is never part of this shape.",
4694
+ type: "object",
4695
+ required: ["id", "tool", "risk", "text", "argumentsHash", "via", "createdAt", "expiresAt", "status"],
4696
+ additionalProperties: false,
4697
+ properties: {
4698
+ id: { type: "string", maxLength: 64 },
4699
+ tool: { type: "string" },
4700
+ risk: { const: "physical" },
4701
+ text: {
4702
+ type: "string",
4703
+ maxLength: 600,
4704
+ description: "What will happen, in plain words, made on the venue from the tool and its arguments."
4705
+ },
4706
+ argumentsHash: { type: "string", pattern: "^[0-9a-f]{64}$" },
4707
+ via: { enum: ["local", "link"] },
4708
+ sessionId: {
4709
+ type: "string",
4710
+ maxLength: 64,
4711
+ description: "The approval it came through, when `via` is `link`."
4712
+ },
4713
+ createdAt: { type: "string", format: "date-time" },
4714
+ expiresAt: { type: "string", format: "date-time" },
4715
+ status: { enum: ["pending", "confirmed", "expired", "refused"] },
4716
+ code: { type: "string", pattern: "^[0-9]{4}$", description: "Only for a person, and only while `pending`." }
4717
+ }
4718
+ },
4719
+ confirmationPage: {
4720
+ type: "object",
4721
+ required: ["items", "nextCursor"],
4722
+ additionalProperties: false,
4723
+ properties: {
4724
+ items: { type: "array", items: { $ref: "#/$defs/confirmation" } },
4725
+ nextCursor: { type: ["string", "null"] }
4726
+ }
4727
+ },
4728
+ linkSession: {
4729
+ description: "One approval: who gave it, what it may do, until when.",
4730
+ type: "object",
4731
+ required: ["id", "approver", "role", "scopes", "createdAt", "expiresAt", "status", "calls"],
4732
+ additionalProperties: false,
4733
+ properties: {
4734
+ id: { type: "string", maxLength: 64 },
4735
+ approver: { type: "string" },
4736
+ role: { enum: ["operator", "admin", "superadmin"] },
4737
+ scopes: { type: "array", items: { type: "string" } },
4738
+ createdAt: { type: "string", format: "date-time" },
4739
+ expiresAt: { type: "string", format: "date-time" },
4740
+ status: { enum: ["active", "ended", "expired"] },
4741
+ calls: { type: "integer", minimum: 0 }
4742
+ }
4743
+ },
4744
+ link: {
4745
+ type: "object",
4746
+ required: ["enabled", "state", "sessions"],
4747
+ additionalProperties: false,
4748
+ properties: {
4749
+ enabled: { type: "boolean" },
4750
+ state: { enum: ["off", "connecting", "online", "offline"] },
4751
+ installationId: { type: "string" },
4752
+ sessions: { type: "array", items: { $ref: "#/$defs/linkSession" } }
4753
+ }
4754
+ },
4755
+ linkApprove: {
4756
+ type: "object",
4757
+ required: ["code"],
4758
+ additionalProperties: false,
4759
+ properties: {
4760
+ code: {
4761
+ type: "string",
4762
+ pattern: "^[0-9A-Za-z]{4}-?[0-9A-Za-z]{4}$",
4763
+ description: "The code the assistant showed."
4764
+ }
4765
+ }
4766
+ }
4767
+ }
4768
+ },
4769
+ "https://freedome.nativemind.us/schemas/api/1.1/audio-reactive.schema.json": {
4770
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4771
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/audio-reactive.schema.json",
4772
+ $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.",
4773
+ title: "AudioReactive state",
4774
+ allOf: [{ $ref: "#/$defs/state" }],
4775
+ $defs: {
4776
+ status: {
4777
+ description: "Service status. Open list.",
4778
+ anyOf: [
4779
+ { enum: ["disabled", "starting", "running", "degraded", "down"] },
4780
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
4781
+ ]
4782
+ },
4783
+ metric: {
4784
+ description: "A value of the analysis frame. rms, peak: envelope; subBass, mid, highMid, treble: bands; centroid: spectral brightness; onset: attack strength. Open list.",
4785
+ anyOf: [
4786
+ { enum: ["rms", "peak", "subBass", "mid", "highMid", "treble", "centroid", "onset"] },
4787
+ { type: "string", pattern: "^[a-z][A-Za-z0-9]{0,31}$" }
4788
+ ]
4789
+ },
4790
+ bands: {
4791
+ description: "Band energies, each 0..1. Fixed ranges: subBass 30\u2013150 Hz, mid 150\u2013800 Hz, highMid 800\u20134000 Hz, treble 4000\u201316000 Hz.",
4792
+ type: "object",
4793
+ required: ["subBass", "mid", "highMid", "treble"],
4794
+ properties: {
4795
+ subBass: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4796
+ mid: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4797
+ highMid: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4798
+ treble: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" }
4799
+ },
4800
+ additionalProperties: false
4801
+ },
4802
+ frame: {
4803
+ 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.",
4804
+ type: "object",
4805
+ required: ["inputId", "frame", "captureUs", "rms", "peak", "bands", "centroid", "onset"],
4806
+ properties: {
4807
+ inputId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4808
+ frame: { type: "integer", minimum: 0, description: "frame counter of this input since the analysis started" },
4809
+ captureUs: {
4810
+ type: "integer",
4811
+ minimum: 0,
4812
+ description: "start of the audio block on the analysis node's monotonic clock, \xB5s; comparable only on that node"
4813
+ },
4814
+ rms: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4815
+ peak: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4816
+ rmsDb: { type: "number", description: "dBFS, before normalisation" },
4817
+ peakDb: { type: "number", description: "dBFS, before normalisation" },
4818
+ bands: { $ref: "#/$defs/bands" },
4819
+ centroid: {
4820
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4821
+ description: "centroidHz on a log scale over the input's centroidRange"
4822
+ },
4823
+ centroidHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
4824
+ onset: {
4825
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4826
+ description: "attack strength of this frame; 0 = no attack"
4827
+ },
4828
+ gated: { type: "boolean", description: "the input is below its gate: normalised values are 0" }
4829
+ },
4830
+ patternProperties: { "^x-": true },
4831
+ additionalProperties: false
4832
+ },
4833
+ onset: {
4834
+ description: "One detected attack (event audio.onset).",
4835
+ type: "object",
4836
+ required: ["inputId", "frame", "captureUs", "strength"],
4837
+ properties: {
4838
+ inputId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4839
+ frame: { type: "integer", minimum: 0 },
4840
+ captureUs: { type: "integer", minimum: 0 },
4841
+ strength: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4842
+ band: {
4843
+ enum: ["subBass", "mid", "highMid", "treble"],
4844
+ description: "band with the largest energy rise, when known"
4845
+ }
4846
+ },
4847
+ patternProperties: { "^x-": true },
4848
+ additionalProperties: false
4849
+ },
4850
+ input: {
4851
+ description: "One analysed input (a vocal microphone, an instrument group, a mix).",
4852
+ type: "object",
4853
+ required: ["id"],
4854
+ properties: {
4855
+ id: {
4856
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4857
+ description: "name used by scenes, e.g. vocal, drums, mix"
4858
+ },
4859
+ label: { type: "string", maxLength: 128 },
4860
+ device: {
4861
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4862
+ description: "audio device id (GET \u2026/audio/devices); default = the engine's default capture device"
4863
+ },
4864
+ channels: {
4865
+ type: "array",
4866
+ items: { type: "integer", minimum: 1, maximum: 1024 },
4867
+ minItems: 1,
4868
+ maxItems: 64,
4869
+ uniqueItems: true,
4870
+ description: "1-based capture channels, summed to mono; default [1]"
4871
+ },
4872
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
4873
+ gateDb: { type: "number", minimum: -144, maximum: 0, description: "noise gate threshold, dBFS" },
4874
+ envelope: {
4875
+ type: "object",
4876
+ properties: {
4877
+ attackMs: { type: "number", minimum: 0, maximum: 1e4, default: 8 },
4878
+ decayMs: { type: "number", minimum: 0, maximum: 1e4, default: 120 }
4879
+ },
4880
+ additionalProperties: false
4881
+ },
4882
+ onset: {
4883
+ type: "object",
4884
+ properties: {
4885
+ threshold: {
4886
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4887
+ description: "detector sensitivity: 0 = most sensitive"
4888
+ },
4889
+ refractoryMs: {
4890
+ type: "number",
4891
+ minimum: 0,
4892
+ maximum: 1e4,
4893
+ description: "minimum time between two onsets"
4894
+ }
4895
+ },
4896
+ additionalProperties: false
4897
+ },
4898
+ centroidRange: {
4899
+ description: "Frequencies that map to centroid 0 and 1.",
4900
+ type: "object",
4901
+ required: ["minHz", "maxHz"],
4902
+ properties: {
4903
+ minHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
4904
+ maxHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" }
4905
+ },
4906
+ additionalProperties: false
4907
+ }
4908
+ },
4909
+ patternProperties: { "^x-": true },
4910
+ additionalProperties: false
4911
+ },
4912
+ analysisSettings: {
4913
+ description: "PUT /venues/{venueId}/audio/analysis body: replaces the whole list of inputs.",
4914
+ type: "object",
4915
+ required: ["enabled", "inputs"],
4916
+ properties: {
4917
+ enabled: { type: "boolean" },
4918
+ inputs: { type: "array", items: { $ref: "#/$defs/input" }, maxItems: 64 }
4919
+ },
4920
+ additionalProperties: false
4921
+ },
4922
+ analysisState: {
4923
+ description: "GET /venues/{venueId}/audio/analysis, event audioAnalysis.state.",
4924
+ type: "object",
4925
+ required: ["venueId", "enabled", "status", "inputs"],
4926
+ properties: {
4927
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/venueRef" },
4928
+ enabled: { type: "boolean" },
4929
+ status: { $ref: "#/$defs/status" },
4930
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
4931
+ engine: { type: "string", description: "engine that runs the analysis, `<kind>@<node>`" },
4932
+ sampleRate: { type: "integer", minimum: 1 },
4933
+ blockSize: { type: "integer", minimum: 1 },
4934
+ inputs: { type: "array", items: { $ref: "#/$defs/input" }, maxItems: 64 }
4935
+ },
4936
+ patternProperties: { "^x-": true },
4937
+ additionalProperties: false
4938
+ },
4939
+ smoothing: {
4940
+ description: "Asymmetric smoothing of the mapped value, applied by the media server.",
4941
+ type: "object",
4942
+ properties: {
4943
+ attackMs: { type: "number", minimum: 0, maximum: 1e4 },
4944
+ decayMs: { type: "number", minimum: 0, maximum: 1e4 }
4945
+ },
4946
+ additionalProperties: false
4947
+ },
4948
+ range: {
4949
+ description: "Linear map before the curve. inMax > inMin (422 otherwise); outMin > outMax inverts. Defaults 0, 1, 0, 1.",
4950
+ type: "object",
4951
+ properties: {
4952
+ inMin: { type: "number" },
4953
+ inMax: { type: "number" },
4954
+ outMin: { type: "number" },
4955
+ outMax: { type: "number" }
4956
+ },
4957
+ additionalProperties: false
4958
+ },
4959
+ target: {
4960
+ 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.",
4961
+ type: "object",
4962
+ required: ["kind"],
4963
+ properties: {
4964
+ kind: { anyOf: [{ enum: ["osc"] }, { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }] },
4965
+ gateway: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId", description: "gateway id, e.g. resolume" },
4966
+ address: {
4967
+ type: "string",
4968
+ pattern: "^/[^\\s#*,?\\[\\]{}]*$",
4969
+ description: "concrete address, e.g. /composition/layers/1/video/opacity"
4970
+ },
4971
+ type: { enum: ["f", "i"], description: "OSC argument type" },
4972
+ value: { type: "number", description: "trigger mode: the argument to send; default 1" }
4973
+ },
4974
+ if: { properties: { kind: { const: "osc" } }, required: ["kind"] },
4975
+ then: { required: ["gateway", "address", "type"] },
4976
+ patternProperties: { "^x-": true },
4977
+ additionalProperties: false
4978
+ },
4979
+ mapping: {
4980
+ 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`.",
4981
+ type: "object",
4982
+ required: ["id", "mode", "source", "target"],
4983
+ properties: {
4984
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4985
+ mode: { enum: ["continuous", "trigger"] },
4986
+ source: {
4987
+ type: "object",
4988
+ required: ["input", "metric"],
4989
+ properties: {
4990
+ input: {
4991
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4992
+ description: "input id of the analysis settings"
4993
+ },
4994
+ metric: { $ref: "#/$defs/metric" }
4995
+ },
4996
+ additionalProperties: false
4997
+ },
4998
+ range: { $ref: "#/$defs/range" },
4999
+ curve: {
5000
+ anyOf: [
5001
+ { enum: ["linear", "exp", "log", "s-curve"] },
5002
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
5003
+ ],
5004
+ default: "linear",
5005
+ description: "for t in 0..1: linear t; exp t\xB2; log log10(1 + 9t); s-curve 3t\xB2 \u2212 2t\xB3"
5006
+ },
5007
+ smoothing: { $ref: "#/$defs/smoothing" },
5008
+ threshold: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
5009
+ cooldownMs: { type: "number", minimum: 0, maximum: 6e4 },
5010
+ target: { $ref: "#/$defs/target" }
5011
+ },
5012
+ if: { properties: { mode: { const: "trigger" } }, required: ["mode"] },
5013
+ then: { required: ["threshold"] },
5014
+ patternProperties: { "^x-": true },
5015
+ additionalProperties: false
5016
+ },
5017
+ sceneBody: {
5018
+ type: "object",
5019
+ properties: {
5020
+ title: { $ref: "../../common/1.0/i18n-text.schema.json#/$defs/textOrI18n" },
5021
+ description: { $ref: "../../common/1.0/i18n-text.schema.json#/$defs/textOrI18n" },
5022
+ mappings: { type: "array", items: { $ref: "#/$defs/mapping" }, maxItems: 256 }
5023
+ },
5024
+ patternProperties: { "^x-": true }
5025
+ },
5026
+ scene: {
5027
+ description: "A scene is data: which metrics drive which targets. Mapping ids are unique within the scene.",
5028
+ type: "object",
5029
+ allOf: [{ $ref: "#/$defs/sceneBody" }],
5030
+ required: ["id", "title", "revision", "mappings"],
5031
+ properties: {
5032
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5033
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
5034
+ },
5035
+ unevaluatedProperties: false
5036
+ },
5037
+ sceneInput: {
5038
+ description: "PUT \u2026/audio/reactive/scenes/{sceneId} body.",
5039
+ type: "object",
5040
+ allOf: [{ $ref: "#/$defs/sceneBody" }],
5041
+ required: ["title", "mappings"],
5042
+ unevaluatedProperties: false
5043
+ },
5044
+ scenePage: {
5045
+ type: "object",
5046
+ required: ["items", "nextCursor"],
5047
+ properties: {
5048
+ items: { type: "array", items: { $ref: "#/$defs/scene" } },
5049
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5050
+ },
5051
+ additionalProperties: false
5052
+ },
5053
+ state: {
5054
+ description: "GET /venues/{venueId}/audio/reactive, event audioReactive.state.",
5055
+ type: "object",
5056
+ required: ["venueId", "enabled", "status", "activeSceneId", "intensity"],
5057
+ properties: {
5058
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/venueRef" },
5059
+ enabled: { type: "boolean" },
5060
+ status: { $ref: "#/$defs/status" },
5061
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
5062
+ activeSceneId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
5063
+ intensity: {
5064
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
5065
+ description: "master amount of all continuous mappings"
5066
+ },
5067
+ stats: {
5068
+ type: "object",
5069
+ additionalProperties: { type: "number" },
5070
+ description: "counters, e.g. framesIn, messagesOut, framesDropped"
5071
+ },
5072
+ resolume: {
5073
+ $ref: "gateway.schema.json#/$defs/resolumeStatus",
5074
+ 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."
5075
+ }
5076
+ },
5077
+ patternProperties: { "^x-": true },
5078
+ additionalProperties: false
5079
+ },
5080
+ patch: {
5081
+ 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.",
5082
+ type: "object",
5083
+ minProperties: 1,
5084
+ properties: {
5085
+ enabled: { type: "boolean" },
5086
+ activeSceneId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
5087
+ intensity: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" }
5088
+ },
5089
+ additionalProperties: false
5090
+ }
5091
+ }
5092
+ },
5093
+ "https://freedome.nativemind.us/schemas/api/1.1/audio.schema.json": {
5094
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5095
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/audio.schema.json",
5096
+ $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.",
5097
+ title: "Audio state",
5098
+ type: "object",
5099
+ required: ["venueId", "mode", "masterGainDb", "mute", "revision"],
5100
+ properties: {
5101
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5102
+ mode: { $ref: "#/$defs/mode" },
5103
+ masterGainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5104
+ mute: { type: "boolean" },
5105
+ engines: {
5106
+ type: "object",
5107
+ properties: { anantasound: { $ref: "#/$defs/engineRef" }, anantadigital: { $ref: "#/$defs/engineRef" } },
5108
+ additionalProperties: { $ref: "#/$defs/engineRef" }
5109
+ },
5110
+ layoutRevision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
5111
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
5112
+ },
5113
+ patternProperties: { "^x-": true },
5114
+ additionalProperties: false,
5115
+ $defs: {
5116
+ mode: {
5117
+ description: "A8: digital = anAntaDigital only; hybrid = anAntaSound (mechanical devices); combined = both.",
5118
+ anyOf: [{ enum: ["digital", "hybrid", "combined"] }, { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }]
5119
+ },
5120
+ engineRef: {
5121
+ type: "object",
5122
+ required: ["status"],
5123
+ properties: {
5124
+ status: { anyOf: [{ enum: ["up", "degraded", "down", "incompatible", "disabled"] }, { type: "string" }] },
5125
+ version: { type: "string" }
5126
+ },
5127
+ additionalProperties: false
5128
+ },
5129
+ patch: {
5130
+ type: "object",
5131
+ minProperties: 1,
5132
+ properties: {
5133
+ mode: { $ref: "#/$defs/mode" },
5134
+ masterGainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5135
+ mute: { type: "boolean" }
5136
+ },
5137
+ patternProperties: { "^x-": true },
5138
+ additionalProperties: false
5139
+ },
5140
+ eqBand: {
5141
+ type: "object",
5142
+ required: ["type", "frequencyHz"],
5143
+ properties: {
5144
+ type: {
5145
+ anyOf: [
5146
+ { enum: ["peak", "lowShelf", "highShelf", "lowPass", "highPass", "notch", "allPass"] },
5147
+ { type: "string" }
5148
+ ]
5149
+ },
5150
+ frequencyHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5151
+ gainDb: { type: "number", minimum: -48, maximum: 24 },
5152
+ q: { type: "number", exclusiveMinimum: 0, maximum: 100 },
5153
+ enabled: { type: "boolean", default: true }
5154
+ },
5155
+ additionalProperties: false
5156
+ },
5157
+ zoneBody: {
5158
+ type: "object",
5159
+ properties: {
5160
+ name: { type: "string", maxLength: 128 },
5161
+ speakers: {
5162
+ type: "array",
5163
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5164
+ uniqueItems: true
5165
+ },
5166
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5167
+ delayMs: { type: "number", minimum: 0, maximum: 2e3 },
5168
+ eq: { type: "array", items: { $ref: "#/$defs/eqBand" }, maxItems: 32 },
5169
+ mute: { type: "boolean" }
5170
+ },
5171
+ patternProperties: { "^x-": true }
5172
+ },
5173
+ zone: {
5174
+ description: "anAntaDigital zone: a subset of speakers with gain, delay, EQ.",
5175
+ type: "object",
5176
+ allOf: [{ $ref: "#/$defs/zoneBody" }],
5177
+ required: ["id", "speakers", "gainDb", "mute", "revision"],
5178
+ properties: {
5179
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5180
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
5181
+ },
5182
+ unevaluatedProperties: false
5183
+ },
5184
+ zoneInput: {
5185
+ type: "object",
5186
+ allOf: [{ $ref: "#/$defs/zoneBody" }],
5187
+ required: ["speakers"],
5188
+ unevaluatedProperties: false
5189
+ },
5190
+ zonePatch: {
5191
+ type: "object",
5192
+ allOf: [{ $ref: "#/$defs/zoneBody" }],
5193
+ minProperties: 1,
5194
+ unevaluatedProperties: false
5195
+ },
5196
+ zonePage: {
5197
+ type: "object",
5198
+ required: ["items", "nextCursor"],
5199
+ properties: {
5200
+ items: { type: "array", items: { $ref: "#/$defs/zone" } },
5201
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5202
+ },
5203
+ additionalProperties: false
5204
+ },
5205
+ deviceKind: {
5206
+ anyOf: [
5207
+ { enum: ["speaker", "speaker_amp", "microphone", "qrd", "patefon", "karmic_cluster", "resonator"] },
5208
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
5209
+ ]
5210
+ },
5211
+ device: {
5212
+ description: "Audio device = .dome audio.devices[] / speakers[] entry + live state (02c \xA76).",
5213
+ type: "object",
5214
+ required: ["id", "kind", "state"],
5215
+ properties: {
5216
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5217
+ kind: { $ref: "#/$defs/deviceKind" },
5218
+ name: { type: "string" },
5219
+ config: { type: "object", description: "the .dome audio device / speaker entry", additionalProperties: true },
5220
+ state: {
5221
+ type: "object",
5222
+ required: ["online"],
5223
+ properties: {
5224
+ online: { type: "boolean" },
5225
+ engine: { anyOf: [{ enum: ["anantasound", "anantadigital"] }, { type: "string" }] },
5226
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5227
+ mute: { type: "boolean" },
5228
+ levelDb: { type: "number", maximum: 24, description: "last meter value (dBFS)" },
5229
+ temperatureC: { type: "number" },
5230
+ firmware: { type: "string" },
5231
+ faults: { type: "array", items: { type: "string" } },
5232
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5233
+ },
5234
+ additionalProperties: true
5235
+ }
5236
+ },
5237
+ patternProperties: { "^x-": true },
5238
+ additionalProperties: false
5239
+ },
5240
+ devicePatch: {
5241
+ type: "object",
5242
+ minProperties: 1,
5243
+ properties: {
5244
+ name: { type: "string" },
5245
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5246
+ mute: { type: "boolean" },
5247
+ config: { type: "object", additionalProperties: true }
5248
+ },
5249
+ additionalProperties: false
5250
+ },
5251
+ devicePage: {
5252
+ type: "object",
5253
+ required: ["items", "nextCursor"],
5254
+ properties: {
5255
+ items: { type: "array", items: { $ref: "#/$defs/device" } },
5256
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5257
+ },
5258
+ additionalProperties: false
5259
+ },
5260
+ deviceTest: {
5261
+ type: "object",
5262
+ properties: {
5263
+ kind: { anyOf: [{ enum: ["ping", "tone", "selftest", "strike"] }, { type: "string" }], default: "ping" },
5264
+ frequencyHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5265
+ gainDb: { type: "number", minimum: -96, maximum: 0 },
5266
+ durationS: { type: "number", exclusiveMinimum: 0, maximum: 30 }
5267
+ },
5268
+ additionalProperties: false
5269
+ },
5270
+ deviceTestResult: {
5271
+ type: "object",
5272
+ required: ["deviceId", "ok"],
5273
+ properties: {
5274
+ deviceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5275
+ ok: { type: "boolean" },
5276
+ latencyMs: { type: "number", minimum: 0 },
5277
+ detail: { type: "string" },
5278
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
5279
+ },
5280
+ additionalProperties: false
5281
+ },
5282
+ presetKind: { enum: ["programme", "pattern", "session"] },
5283
+ preset: {
5284
+ description: "Installed L6 preset: an ananta/1.0 programme, pattern or session document (02c, RC2).",
5285
+ type: "object",
5286
+ required: ["id", "kind", "revision", "document"],
5287
+ properties: {
5288
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5289
+ kind: { $ref: "#/$defs/presetKind" },
5290
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
5291
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
5292
+ document: { type: "object" },
5293
+ sha256: { $ref: "../../common/1.0/ids.schema.json#/$defs/sha256" },
5294
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5295
+ },
5296
+ additionalProperties: false,
5297
+ allOf: [
5298
+ {
5299
+ if: { properties: { kind: { const: "programme" } }, required: ["kind"] },
5300
+ then: { properties: { document: { $ref: "../../ananta/1.0/programme.schema.json" } } }
5301
+ },
5302
+ {
5303
+ if: { properties: { kind: { const: "pattern" } }, required: ["kind"] },
5304
+ then: { properties: { document: { $ref: "../../ananta/1.0/pattern.schema.json" } } }
5305
+ },
5306
+ {
5307
+ if: { properties: { kind: { const: "session" } }, required: ["kind"] },
5308
+ then: { properties: { document: { $ref: "../../ananta/1.0/session.schema.json" } } }
5309
+ }
5310
+ ]
5311
+ },
5312
+ presetInput: {
5313
+ description: "PUT /venues/{venueId}/audio/presets/{presetId} body.",
5314
+ type: "object",
5315
+ required: ["kind", "document"],
5316
+ properties: { kind: { $ref: "#/$defs/presetKind" }, document: { type: "object" } },
5317
+ additionalProperties: false,
5318
+ allOf: [
5319
+ {
5320
+ if: { properties: { kind: { const: "programme" } }, required: ["kind"] },
5321
+ then: { properties: { document: { $ref: "../../ananta/1.0/programme.schema.json" } } }
5322
+ },
5323
+ {
5324
+ if: { properties: { kind: { const: "pattern" } }, required: ["kind"] },
5325
+ then: { properties: { document: { $ref: "../../ananta/1.0/pattern.schema.json" } } }
5326
+ },
5327
+ {
5328
+ if: { properties: { kind: { const: "session" } }, required: ["kind"] },
5329
+ then: { properties: { document: { $ref: "../../ananta/1.0/session.schema.json" } } }
5330
+ }
5331
+ ]
5332
+ },
5333
+ presetPage: {
5334
+ type: "object",
5335
+ required: ["items", "nextCursor"],
5336
+ properties: {
5337
+ items: {
5338
+ type: "array",
5339
+ items: {
5340
+ type: "object",
5341
+ required: ["id", "kind", "revision"],
5342
+ properties: {
5343
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5344
+ kind: { $ref: "#/$defs/presetKind" },
5345
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
5346
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
5347
+ },
5348
+ additionalProperties: false
5349
+ }
5350
+ },
5351
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5352
+ },
5353
+ additionalProperties: false
5354
+ },
5355
+ targets: {
5356
+ type: "object",
5357
+ properties: {
5358
+ devices: {
5359
+ type: "array",
5360
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5361
+ uniqueItems: true
5362
+ },
5363
+ zones: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, uniqueItems: true },
5364
+ speakers: {
5365
+ type: "array",
5366
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5367
+ uniqueItems: true
5368
+ }
5369
+ },
5370
+ additionalProperties: false
5371
+ },
5372
+ sessionStart: {
5373
+ description: "POST /venues/{venueId}/audio/sessions: run an installed preset (programme or session).",
5374
+ type: "object",
5375
+ required: ["presetId"],
5376
+ properties: {
5377
+ presetId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5378
+ gainDb: { type: "number", minimum: -96, maximum: 12 },
5379
+ targets: { $ref: "#/$defs/targets" },
5380
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5381
+ loop: { type: "boolean" },
5382
+ roleZones: { $ref: "#/$defs/roleZones" }
5383
+ },
5384
+ additionalProperties: false
5385
+ },
5386
+ roleZones: {
5387
+ 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.",
5388
+ type: "object",
5389
+ propertyNames: { $ref: "../../ananta/1.0/programme.schema.json#/$defs/id" },
5390
+ additionalProperties: {
5391
+ type: "array",
5392
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5393
+ minItems: 1,
5394
+ uniqueItems: true
5395
+ }
5396
+ },
5397
+ session: {
5398
+ type: "object",
5399
+ required: ["id", "venueId", "presetId", "status", "startedAt"],
5400
+ properties: {
5401
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5402
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5403
+ presetId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5404
+ status: {
5405
+ anyOf: [{ enum: ["starting", "running", "paused", "finished", "stopped", "failed"] }, { type: "string" }]
5406
+ },
5407
+ engines: { type: "array", items: { type: "string" } },
5408
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
5409
+ duration: { $ref: "../../common/1.0/units.schema.json#/$defs/seconds" },
5410
+ itemIndex: { type: "integer", minimum: 0 },
5411
+ targets: { $ref: "#/$defs/targets" },
5412
+ roleZones: { $ref: "#/$defs/roleZones" },
5413
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
5414
+ startedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5415
+ endedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5416
+ },
5417
+ additionalProperties: false
5418
+ },
5419
+ sessionPage: {
5420
+ type: "object",
5421
+ required: ["items", "nextCursor"],
5422
+ properties: {
5423
+ items: { type: "array", items: { $ref: "#/$defs/session" } },
5424
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5425
+ },
5426
+ additionalProperties: false
5427
+ },
5428
+ generator: {
5429
+ description: "Test / MULTI generator (iScillator semantics; replaces generate_test_signal).",
5430
+ type: "object",
5431
+ required: ["signal"],
5432
+ properties: {
5433
+ signal: { anyOf: [{ enum: ["sine", "pink", "white", "sweep", "multi"] }, { type: "string" }] },
5434
+ frequencies: {
5435
+ type: "array",
5436
+ items: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5437
+ maxItems: 64,
5438
+ description: "sine: [f]; sweep: [from, to]; multi: up to 64 partials"
5439
+ },
5440
+ gainDb: { type: "number", minimum: -96, maximum: 0 },
5441
+ durationS: { type: "number", exclusiveMinimum: 0 },
5442
+ targets: { $ref: "#/$defs/targets" },
5443
+ multi: { $ref: "#/$defs/generatorMulti" }
5444
+ },
5445
+ additionalProperties: false
5446
+ },
5447
+ generatorMulti: {
5448
+ 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.",
5449
+ $ref: "../../ananta/1.0/programme.schema.json#/$defs/multi"
5450
+ },
5451
+ generatorState: {
5452
+ type: "object",
5453
+ required: ["running"],
5454
+ properties: {
5455
+ running: { type: "boolean" },
5456
+ settings: { $ref: "#/$defs/generator" },
5457
+ startedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5458
+ },
5459
+ additionalProperties: false
5460
+ },
5461
+ deviceSweep: {
5462
+ 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.",
5463
+ type: "object",
5464
+ properties: {
5465
+ actuator: {
5466
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
5467
+ description: "resonator channel id; absent = the first one"
5468
+ },
5469
+ fromHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz", default: 20 },
5470
+ toHz: {
5471
+ $ref: "../../common/1.0/units.schema.json#/$defs/hertz",
5472
+ default: 2e3,
5473
+ description: "above `fromHz`, else 422"
5474
+ },
5475
+ durationS: { type: "number", exclusiveMinimum: 0, maximum: 300, default: 5 },
5476
+ level: {
5477
+ type: "number",
5478
+ exclusiveMinimum: 0,
5479
+ maximum: 1,
5480
+ default: 0.3,
5481
+ description: "share of the channel's limit"
5482
+ },
5483
+ modelHz: {
5484
+ type: "array",
5485
+ items: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5486
+ maxItems: 64,
5487
+ description: "expected partials. With them the partials and warnings are stored with the device's calibration; without them the sweep only reports peaks."
5488
+ },
5489
+ tolerance: {
5490
+ type: "number",
5491
+ exclusiveMinimum: 0,
5492
+ maximum: 1,
5493
+ default: 0.01,
5494
+ description: "relative; four times this and a partial counts as gone (`cracked`)"
5495
+ }
5496
+ },
5497
+ additionalProperties: false
5498
+ },
5499
+ sourcePosition: {
5500
+ description: "Interactive / realtime source position (spherical, listener at the dome centre).",
5501
+ type: "object",
5502
+ required: ["azimuth", "elevation"],
5503
+ properties: {
5504
+ azimuth: {
5505
+ type: "number",
5506
+ minimum: -360,
5507
+ maximum: 360,
5508
+ description: "degrees, 0 = front, positive = left (ambisonic convention)"
5509
+ },
5510
+ elevation: { type: "number", minimum: -90, maximum: 90 },
5511
+ distance: { type: "number", exclusiveMinimum: 0, description: "metres" },
5512
+ rampMs: { type: "number", minimum: 0, maximum: 1e4 }
5513
+ },
5514
+ additionalProperties: false
5515
+ }
5516
+ }
5517
+ },
5518
+ "https://freedome.nativemind.us/schemas/api/1.1/auth.schema.json": {
5519
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5520
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/auth.schema.json",
5521
+ $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.",
5522
+ title: "Session tokens",
5523
+ allOf: [{ $ref: "#/$defs/tokens" }],
5524
+ $defs: {
5525
+ role: {
5526
+ description: "Role = scope bundle (02e \xA73.6). Open enum: clients map unknown roles to UNKNOWN.",
5527
+ anyOf: [
5528
+ { enum: ["guest", "operator", "admin", "superadmin"] },
5529
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
5530
+ ]
5531
+ },
5532
+ scopes: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/scope" }, uniqueItems: true },
5533
+ tokens: {
5534
+ type: "object",
5535
+ required: ["accessToken", "tokenType", "expiresIn"],
5536
+ properties: {
5537
+ accessToken: { type: "string", minLength: 16, description: "access JWT (15 min)" },
5538
+ tokenType: { const: "Bearer" },
5539
+ expiresIn: { type: "integer", minimum: 1, description: "access token lifetime in seconds" },
5540
+ refreshToken: {
5541
+ type: "string",
5542
+ minLength: 16,
5543
+ description: "rotating refresh token; reuse of a rotated one revokes the whole family"
5544
+ },
5545
+ refreshExpiresIn: { type: "integer", minimum: 1 },
5546
+ scopes: { $ref: "#/$defs/scopes" },
5547
+ principal: { $ref: "#/$defs/principal" }
5548
+ },
5549
+ patternProperties: { "^x-": true },
5550
+ additionalProperties: false
5551
+ },
5552
+ sessionRequest: {
5553
+ description: "POST /auth/session (local account).",
5554
+ type: "object",
5555
+ required: ["username", "password"],
5556
+ properties: {
5557
+ username: { type: "string", minLength: 1, maxLength: 128 },
5558
+ password: { type: "string", minLength: 1, maxLength: 1024, writeOnly: true },
5559
+ client: { $ref: "#/$defs/clientInfo" }
5560
+ },
5561
+ additionalProperties: false
5562
+ },
5563
+ refreshRequest: {
5564
+ description: "POST /auth/refresh.",
5565
+ type: "object",
5566
+ required: ["refreshToken"],
5567
+ properties: { refreshToken: { type: "string", minLength: 16 } },
5568
+ additionalProperties: false
5569
+ },
5570
+ tokenExchangeRequest: {
5571
+ description: "POST /auth/token-exchange: an L7 (freedome.nativemind.us) access JWT for a local session; linked installations only (JWKS of the cloud).",
5572
+ type: "object",
5573
+ required: ["subjectToken"],
5574
+ properties: {
5575
+ subjectToken: { type: "string", minLength: 16 },
5576
+ subjectTokenType: {
5577
+ const: "urn:ietf:params:oauth:token-type:jwt",
5578
+ default: "urn:ietf:params:oauth:token-type:jwt"
5579
+ },
5580
+ client: { $ref: "#/$defs/clientInfo" }
5581
+ },
5582
+ additionalProperties: false
5583
+ },
5584
+ clientInfo: {
5585
+ type: "object",
5586
+ properties: {
5587
+ app: { type: "string", minLength: 1, maxLength: 128 },
5588
+ appVersion: { type: "string", maxLength: 64 },
5589
+ deviceName: { type: "string", maxLength: 128 }
5590
+ },
5591
+ additionalProperties: false
5592
+ },
5593
+ pairingRequest: {
5594
+ description: "POST /auth/pairings (anonymous; ecosystem app asks for a guest token).",
5595
+ type: "object",
5596
+ required: ["app", "deviceName"],
5597
+ properties: {
5598
+ app: {
5599
+ type: "string",
5600
+ minLength: 1,
5601
+ maxLength: 128,
5602
+ description: "application id, e.g. net.nativemind.starveda"
5603
+ },
5604
+ deviceName: { type: "string", minLength: 1, maxLength: 128 },
5605
+ requestedRole: { $ref: "#/$defs/role" }
5606
+ },
5607
+ additionalProperties: false
5608
+ },
5609
+ pairing: {
5610
+ 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.",
5611
+ type: "object",
5612
+ required: ["pairingId", "status", "expiresAt"],
5613
+ properties: {
5614
+ pairingId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5615
+ status: {
5616
+ anyOf: [
5617
+ { enum: ["pending", "approved", "denied", "expired"] },
5618
+ { type: "string", pattern: "^[a-z_]{1,32}$" }
5619
+ ]
5620
+ },
5621
+ code: { type: "string", pattern: "^[0-9]{6}$" },
5622
+ qr: { type: "string", pattern: "^freedome://pair\\?", description: "freedome://pair?host=\u2026&code=\u2026" },
5623
+ app: { type: "string" },
5624
+ deviceName: { type: "string" },
5625
+ role: { $ref: "#/$defs/role" },
5626
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5627
+ tokens: { $ref: "#/$defs/tokens" }
5628
+ },
5629
+ patternProperties: { "^x-": true },
5630
+ additionalProperties: false
5631
+ },
5632
+ pairingApproval: {
5633
+ description: "POST /auth/pairings/{pairingId}/approve body (operator side).",
5634
+ type: "object",
5635
+ properties: {
5636
+ approve: { type: "boolean", default: true, description: "false = deny" },
5637
+ role: { $ref: "#/$defs/role", description: "granted role (default guest)" },
5638
+ ttlSec: { type: "integer", minimum: 60, maximum: 31536e3 }
5639
+ },
5640
+ additionalProperties: false
5641
+ },
5642
+ principal: {
5643
+ description: "GET /auth/me: who is calling and what they may do.",
5644
+ type: "object",
5645
+ required: ["subject", "kind", "role", "scopes"],
5646
+ properties: {
5647
+ subject: { type: "string", minLength: 1, description: "user id, api key id or pairing id" },
5648
+ kind: {
5649
+ anyOf: [
5650
+ { enum: ["user", "apiKey", "pairing", "cloud", "anonymous"] },
5651
+ { type: "string", pattern: "^[a-zA-Z]{1,32}$" }
5652
+ ]
5653
+ },
5654
+ name: { type: "string" },
5655
+ role: { $ref: "#/$defs/role" },
5656
+ scopes: { $ref: "#/$defs/scopes" },
5657
+ origin: {
5658
+ type: "string",
5659
+ description: "transport the request came in on (rest, graphql, ws, socketio, osc, grpc)"
5660
+ },
5661
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5662
+ },
5663
+ patternProperties: { "^x-": true },
5664
+ additionalProperties: false
5665
+ }
5666
+ }
5667
+ },
5668
+ "https://freedome.nativemind.us/schemas/api/1.1/calibration-job.schema.json": {
5669
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5670
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/calibration-job.schema.json",
5671
+ $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}.",
5672
+ title: "Calibration job",
5673
+ allOf: [{ $ref: "#/$defs/calibrationJob" }],
5674
+ $defs: {
5675
+ calibrationJob: {
5676
+ type: "object",
5677
+ required: ["id", "venueId", "kind", "status", "steps", "createdAt"],
5678
+ properties: {
5679
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5680
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5681
+ kind: { $ref: "#/$defs/kind" },
5682
+ status: { $ref: "job.schema.json#/$defs/status" },
5683
+ progress: { type: "number", minimum: 0, maximum: 1 },
5684
+ displays: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
5685
+ speakers: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
5686
+ steps: {
5687
+ type: "array",
5688
+ items: {
5689
+ type: "object",
5690
+ required: ["id", "status"],
5691
+ properties: {
5692
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5693
+ name: { type: "string" },
5694
+ displayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5695
+ status: { enum: ["pending", "running", "awaiting_input", "done", "failed", "skipped"] }
5696
+ },
5697
+ additionalProperties: false
5698
+ }
5699
+ },
5700
+ currentStep: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
5701
+ awaiting: {
5702
+ description: "Set while status = awaiting_input: what the operator / camera must provide.",
5703
+ anyOf: [{ type: "null" }, { $ref: "#/$defs/awaiting" }]
5704
+ },
5705
+ errors: {
5706
+ description: "Per-display residual error after solving.",
5707
+ type: "array",
5708
+ items: {
5709
+ type: "object",
5710
+ required: ["displayId"],
5711
+ properties: {
5712
+ displayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5713
+ meanError: { type: "number", minimum: 0 },
5714
+ maxError: { type: "number", minimum: 0 },
5715
+ unit: { type: "string" }
5716
+ },
5717
+ additionalProperties: false
5718
+ }
5719
+ },
5720
+ result: {
5721
+ description: "Proposed calibration (applied to the venue by POST \u2026/apply).",
5722
+ anyOf: [{ type: "null" }, { $ref: "../../dome/1.1/dome.schema.json#/$defs/calibration" }]
5723
+ },
5724
+ sweep: { $ref: "#/$defs/sweep" },
5725
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
5726
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5727
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5728
+ },
5729
+ additionalProperties: false
5730
+ },
5731
+ sweep: {
5732
+ description: "Kind `audio-device-sweep`: what was asked; `peaks`, `partials` and `warnings` once the job has succeeded.",
5733
+ type: "object",
5734
+ required: ["deviceId"],
5735
+ properties: {
5736
+ deviceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5737
+ actuator: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5738
+ fromHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5739
+ toHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5740
+ durationS: { type: "number", exclusiveMinimum: 0 },
5741
+ level: { type: "number", exclusiveMinimum: 0, maximum: 1 },
5742
+ peaks: {
5743
+ description: "Strongest first.",
5744
+ type: "array",
5745
+ items: {
5746
+ type: "object",
5747
+ required: ["hz", "db"],
5748
+ properties: {
5749
+ hz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5750
+ db: { type: "number" },
5751
+ q: { type: "number", minimum: 0 }
5752
+ },
5753
+ additionalProperties: false
5754
+ }
5755
+ },
5756
+ partials: {
5757
+ description: "Comparison with `modelHz`; `measuredHz` is absent for a partial with no peak near it.",
5758
+ type: "array",
5759
+ items: {
5760
+ type: "object",
5761
+ required: ["modelHz"],
5762
+ properties: {
5763
+ modelHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5764
+ measuredHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" }
5765
+ },
5766
+ additionalProperties: false
5767
+ }
5768
+ },
5769
+ warnings: { type: "array", items: { anyOf: [{ enum: ["detuned", "cracked", "weak"] }, { type: "string" }] } }
5770
+ },
5771
+ additionalProperties: false
5772
+ },
5773
+ kind: {
5774
+ anyOf: [
5775
+ { enum: ["visual-camera", "visual-manual", "visual-import", "audio-room", "audio-speaker-check"] },
5776
+ { type: "string", pattern: "^[a-z][a-z0-9-]{0,63}$" }
5777
+ ]
5778
+ },
5779
+ start: {
5780
+ description: "POST /venues/{venueId}/calibration/jobs body.",
5781
+ type: "object",
5782
+ required: ["kind"],
5783
+ properties: {
5784
+ kind: { $ref: "#/$defs/kind" },
5785
+ displays: {
5786
+ type: "array",
5787
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5788
+ uniqueItems: true
5789
+ },
5790
+ speakers: {
5791
+ type: "array",
5792
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5793
+ uniqueItems: true
5794
+ },
5795
+ options: { type: "object", description: "kind-specific (grid density, camera model, import format \u2026)" }
5796
+ },
5797
+ additionalProperties: false
5798
+ },
5799
+ capture: {
5800
+ 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).",
5801
+ type: "object",
5802
+ required: ["uploadId"],
5803
+ properties: {
5804
+ uploadId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5805
+ stepId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }
5806
+ },
5807
+ additionalProperties: false
5808
+ },
5809
+ awaiting: {
5810
+ type: "object",
5811
+ required: ["kind"],
5812
+ properties: {
5813
+ kind: { anyOf: [{ enum: ["camera-capture", "manual-adjust", "confirm"] }, { type: "string" }] },
5814
+ stepId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5815
+ displayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5816
+ pattern: { $ref: "display.schema.json#/$defs/testPattern" },
5817
+ instructions: { $ref: "../../common/1.0/i18n-text.schema.json" }
5818
+ },
5819
+ additionalProperties: false
5820
+ },
5821
+ page: {
5822
+ type: "object",
5823
+ required: ["items", "nextCursor"],
5824
+ properties: {
5825
+ items: { type: "array", items: { $ref: "#/$defs/calibrationJob" } },
5826
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5827
+ },
5828
+ additionalProperties: false
5829
+ }
5830
+ }
5831
+ },
5832
+ "https://freedome.nativemind.us/schemas/api/1.1/client.schema.json": {
5833
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5834
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/client.schema.json",
5835
+ $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.",
5836
+ title: "Client",
5837
+ allOf: [{ $ref: "#/$defs/client" }],
5838
+ $defs: {
5839
+ capability: {
5840
+ anyOf: [
5841
+ {
5842
+ enum: [
5843
+ "vibration",
5844
+ "camera",
5845
+ "biometric",
5846
+ "sensors.accelerometer",
5847
+ "sensors.gyroscope",
5848
+ "sensors.magnetometer",
5849
+ "sensors.heartRate",
5850
+ "sensors.location"
5851
+ ]
5852
+ },
5853
+ { type: "string", pattern: "^[a-z][A-Za-z0-9.]{0,63}$" }
5854
+ ]
5855
+ },
5856
+ client: {
5857
+ type: "object",
5858
+ required: ["id", "app", "deviceName", "capabilities", "registeredAt"],
5859
+ properties: {
5860
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5861
+ app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" },
5862
+ appVersion: { type: "string" },
5863
+ deviceName: { type: "string", maxLength: 128 },
5864
+ platform: { type: "string" },
5865
+ capabilities: { type: "array", items: { $ref: "#/$defs/capability" }, uniqueItems: true },
5866
+ principal: { type: "string" },
5867
+ commandsTopic: {
5868
+ $ref: "../../common/1.0/ids.schema.json#/$defs/topic",
5869
+ description: "clients/{clientId}/commands"
5870
+ },
5871
+ registeredAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5872
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5873
+ },
5874
+ additionalProperties: false
5875
+ },
5876
+ input: {
5877
+ type: "object",
5878
+ required: ["app", "deviceName"],
5879
+ properties: {
5880
+ app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" },
5881
+ appVersion: { type: "string", maxLength: 64 },
5882
+ deviceName: { type: "string", minLength: 1, maxLength: 128 },
5883
+ platform: { type: "string", maxLength: 64 },
5884
+ capabilities: { type: "array", items: { $ref: "#/$defs/capability" }, uniqueItems: true, default: [] }
5885
+ },
5886
+ additionalProperties: false
5887
+ },
5888
+ page: {
5889
+ type: "object",
5890
+ required: ["items", "nextCursor"],
5891
+ properties: {
5892
+ items: { type: "array", items: { $ref: "#/$defs/client" } },
5893
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5894
+ },
5895
+ additionalProperties: false
5896
+ },
5897
+ telemetry: {
5898
+ description: "POST /clients/{clientId}/telemetry: batched sensor samples (replaces sendSensorData).",
5899
+ type: "object",
5900
+ required: ["samples"],
5901
+ properties: {
5902
+ samples: {
5903
+ type: "array",
5904
+ minItems: 1,
5905
+ maxItems: 1e3,
5906
+ items: {
5907
+ type: "object",
5908
+ required: ["ts", "sensor", "values"],
5909
+ properties: {
5910
+ ts: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5911
+ sensor: { $ref: "#/$defs/capability" },
5912
+ values: { type: "array", items: { type: "number" }, maxItems: 64 },
5913
+ unit: { type: "string" }
5914
+ },
5915
+ additionalProperties: false
5916
+ }
5917
+ }
5918
+ },
5919
+ additionalProperties: false
5920
+ },
5921
+ command: {
5922
+ description: "Server \u2192 device command, delivered as event client.command on clients/{clientId}/commands.",
5923
+ type: "object",
5924
+ required: ["command"],
5925
+ properties: {
5926
+ command: {
5927
+ anyOf: [
5928
+ { enum: ["vibrate", "capture", "sensors", "biometric"] },
5929
+ { type: "string", pattern: "^[a-z][A-Za-z0-9_.-]{0,63}$" }
5930
+ ]
5931
+ },
5932
+ params: { type: "object", additionalProperties: true },
5933
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5934
+ },
5935
+ additionalProperties: false
5936
+ }
5937
+ }
5938
+ },
5939
+ "https://freedome.nativemind.us/schemas/api/1.1/device.schema.json": {
5940
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5941
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/device.schema.json",
5942
+ $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}.",
5943
+ title: "Visual device",
5944
+ allOf: [{ $ref: "#/$defs/device" }],
5945
+ $defs: {
5946
+ device: {
5947
+ type: "object",
5948
+ required: ["id", "variant", "address", "paired", "state"],
5949
+ properties: {
5950
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5951
+ serial: { type: "string" },
5952
+ product: { type: "string" },
5953
+ variant: { type: "string", description: "fd-vp-f-1, fd-vp-p-s, \u2026" },
5954
+ hwRevision: { type: "string" },
5955
+ agentVersion: { type: "string" },
5956
+ protocolVersion: { type: "string" },
5957
+ capabilities: { type: "array", items: { type: "string" }, uniqueItems: true },
5958
+ address: { type: "string", description: "host:port of the agent" },
5959
+ paired: { type: "boolean" },
5960
+ displayId: {
5961
+ anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }],
5962
+ description: "venue display this device drives"
5963
+ },
5964
+ state: {
5965
+ type: "object",
5966
+ required: ["online"],
5967
+ properties: {
5968
+ online: { type: "boolean" },
5969
+ power: {
5970
+ anyOf: [{ enum: ["on", "off", "standby", "warming", "cooling", "unknown"] }, { type: "string" }]
5971
+ },
5972
+ temperatureC: { type: "number" },
5973
+ fanRpm: { type: "number", minimum: 0 },
5974
+ lampHours: { type: "number", minimum: 0 },
5975
+ battery: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
5976
+ faults: { type: "array", items: { type: "string" } },
5977
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5978
+ },
5979
+ additionalProperties: true
5980
+ }
5981
+ },
5982
+ patternProperties: { "^x-": true },
5983
+ additionalProperties: false
5984
+ },
5985
+ page: {
5986
+ type: "object",
5987
+ required: ["items", "nextCursor"],
5988
+ properties: {
5989
+ items: { type: "array", items: { $ref: "#/$defs/device" } },
5990
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5991
+ },
5992
+ additionalProperties: false
5993
+ },
5994
+ pairingStarted: {
5995
+ description: "POST /devices/{deviceId}/pairing: the device shows a code (display / LED); the operator confirms it.",
5996
+ type: "object",
5997
+ required: ["deviceId", "expiresAt"],
5998
+ properties: {
5999
+ deviceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6000
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
6001
+ codeLength: { type: "integer", minimum: 4, maximum: 8 }
6002
+ },
6003
+ additionalProperties: false
6004
+ },
6005
+ pairingConfirm: {
6006
+ type: "object",
6007
+ required: ["code"],
6008
+ properties: { code: { type: "string", pattern: "^[0-9A-Z]{4,8}$" } },
6009
+ additionalProperties: false
6010
+ },
6011
+ bind: {
6012
+ type: "object",
6013
+ required: ["displayId"],
6014
+ properties: {
6015
+ displayId: {
6016
+ anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }],
6017
+ description: "null unbinds"
6018
+ }
6019
+ },
6020
+ additionalProperties: false
6021
+ }
6022
+ }
6023
+ },
6024
+ "https://freedome.nativemind.us/schemas/api/1.1/display.schema.json": {
6025
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6026
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/display.schema.json",
6027
+ $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.",
6028
+ title: "Display",
6029
+ allOf: [{ $ref: "#/$defs/display" }],
6030
+ $defs: {
6031
+ display: {
6032
+ type: "object",
6033
+ required: ["id", "venueId", "config", "state"],
6034
+ properties: {
6035
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6036
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6037
+ revision: {
6038
+ $ref: "../../common/1.0/ids.schema.json#/$defs/revision",
6039
+ description: "venue revision the config belongs to"
6040
+ },
6041
+ config: { $ref: "../../dome/1.1/dome.schema.json#/$defs/display" },
6042
+ state: { $ref: "#/$defs/state" }
6043
+ },
6044
+ additionalProperties: false
6045
+ },
6046
+ state: {
6047
+ type: "object",
6048
+ required: ["online"],
6049
+ properties: {
6050
+ online: { type: "boolean", description: "engine output / device agent reachable" },
6051
+ power: {
6052
+ anyOf: [
6053
+ { enum: ["on", "off", "standby", "warming", "cooling", "unknown"] },
6054
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6055
+ ]
6056
+ },
6057
+ shutter: { enum: ["open", "closed", "unknown"] },
6058
+ signal: { type: "boolean" },
6059
+ temperatureC: { type: ["number", "null"] },
6060
+ pattern: { anyOf: [{ $ref: "#/$defs/testPattern" }, { type: "null" }] },
6061
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
6062
+ capabilities: {
6063
+ type: "array",
6064
+ items: { anyOf: [{ enum: ["power", "shutter", "identify", "temperature", "pjlink"] }, { type: "string" }] }
6065
+ },
6066
+ faults: {
6067
+ type: "array",
6068
+ items: {
6069
+ type: "object",
6070
+ required: ["code"],
6071
+ properties: { code: { type: "string" }, detail: { type: "string" } },
6072
+ additionalProperties: false
6073
+ }
6074
+ }
6075
+ },
6076
+ additionalProperties: false
6077
+ },
6078
+ testPattern: {
6079
+ description: "PUT /venues/{venueId}/displays/{displayId}/pattern body (engine freedome_pattern_*).",
6080
+ type: "object",
6081
+ required: ["kind"],
6082
+ properties: {
6083
+ kind: {
6084
+ anyOf: [
6085
+ {
6086
+ enum: [
6087
+ "off",
6088
+ "grid",
6089
+ "checker",
6090
+ "gray-ramp",
6091
+ "colour-bars",
6092
+ "dots",
6093
+ "crosshair",
6094
+ "solid",
6095
+ "structured-light"
6096
+ ]
6097
+ },
6098
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
6099
+ ]
6100
+ },
6101
+ params: {
6102
+ description: "Kind-specific: grid {spacingDeg, lineWidthPx, colour}, checker {cells}, solid {colour}, structured-light {sequence, index} \u2026",
6103
+ type: "object"
6104
+ },
6105
+ face: { type: "integer", minimum: 0, maximum: 5, description: "prism / pyramid: limit to one optics face" }
6106
+ },
6107
+ additionalProperties: false
6108
+ },
6109
+ power: {
6110
+ description: "POST \u2026/power body; only what the device supports (state.capabilities).",
6111
+ type: "object",
6112
+ minProperties: 1,
6113
+ properties: { on: { type: "boolean" }, shutter: { enum: ["open", "closed"] } },
6114
+ additionalProperties: false
6115
+ },
6116
+ identify: {
6117
+ description: "POST \u2026/identify body (optional): how long to show the id overlay.",
6118
+ type: "object",
6119
+ properties: { durationS: { type: "number", minimum: 0.5, maximum: 60, default: 5 } },
6120
+ additionalProperties: false
6121
+ },
6122
+ patch: {
6123
+ description: "PATCH body (application/merge-patch+json) over `config`; `id` cannot change.",
6124
+ type: "object",
6125
+ minProperties: 1,
6126
+ not: { required: ["id"] }
6127
+ },
6128
+ page: {
6129
+ type: "object",
6130
+ allOf: [{ $ref: "../../common/1.0/pagination.schema.json" }],
6131
+ properties: { items: { type: "array", items: { $ref: "#/$defs/display" } } }
6132
+ }
6133
+ }
6134
+ },
6135
+ "https://freedome.nativemind.us/schemas/api/1.1/engine.schema.json": {
6136
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6137
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/engine.schema.json",
6138
+ $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}.",
6139
+ title: "Engine",
6140
+ allOf: [{ $ref: "#/$defs/engine" }],
6141
+ $defs: {
6142
+ engine: {
6143
+ type: "object",
6144
+ required: ["name", "status"],
6145
+ properties: {
6146
+ name: {
6147
+ anyOf: [
6148
+ { enum: ["visual", "anantasound", "anantadigital"] },
6149
+ { $ref: "../../common/1.0/ids.schema.json#/$defs/engineName" }
6150
+ ]
6151
+ },
6152
+ status: {
6153
+ anyOf: [
6154
+ { enum: ["up", "degraded", "down", "incompatible"] },
6155
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6156
+ ]
6157
+ },
6158
+ version: { type: "string" },
6159
+ protocol: {
6160
+ type: "string",
6161
+ pattern: "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*\\.v[0-9]+$",
6162
+ description: "gRPC package, e.g. freedome.engine.v1"
6163
+ },
6164
+ endpoint: { type: "string", description: "unix:/run/freedome/engine.sock, host:port" },
6165
+ nodes: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
6166
+ backend: {
6167
+ anyOf: [{ enum: ["vulkan", "metal", "d3d12", "opengl", "software"] }, { type: "string" }],
6168
+ description: "visual: active compute / render backend"
6169
+ },
6170
+ backends: { type: "array", items: { type: "string" }, description: "visual: available backends" },
6171
+ capabilities: {
6172
+ type: "object",
6173
+ additionalProperties: true,
6174
+ description: "engine-reported capabilities (outputs, codecs, max resolution, audio channels \u2026); keys listed in docs/capabilities.yaml"
6175
+ },
6176
+ metrics: {
6177
+ type: "object",
6178
+ additionalProperties: { type: "number" },
6179
+ description: "fps, droppedFrames, gpuLoad, latencyMs \u2026"
6180
+ },
6181
+ problem: { $ref: "../../common/1.0/problem.schema.json", description: "why degraded / down / incompatible" },
6182
+ since: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
6183
+ },
6184
+ patternProperties: { "^x-": true },
6185
+ additionalProperties: false
6186
+ },
6187
+ page: {
6188
+ type: "object",
6189
+ required: ["items", "nextCursor"],
6190
+ properties: {
6191
+ items: { type: "array", items: { $ref: "#/$defs/engine" } },
6192
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
6193
+ },
6194
+ additionalProperties: false
6195
+ },
6196
+ backendRequest: {
6197
+ type: "object",
6198
+ required: ["backend"],
6199
+ properties: {
6200
+ backend: {
6201
+ anyOf: [
6202
+ { enum: ["vulkan", "metal", "d3d12", "opengl", "software"] },
6203
+ { type: "string", pattern: "^[a-z0-9_-]{1,32}$" }
6204
+ ]
6205
+ }
6206
+ },
6207
+ additionalProperties: false
6208
+ }
6209
+ }
6210
+ },
6211
+ "https://freedome.nativemind.us/schemas/api/1.1/event-kinds.schema.json": {
6212
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6213
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/event-kinds.schema.json",
6214
+ $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).",
6215
+ title: "Event data by kind",
6216
+ type: "object",
6217
+ allOf: [
6218
+ { $ref: "../../common/1.0/envelope.schema.json#/$defs/eventData" },
6219
+ {
6220
+ if: { properties: { kind: { const: "system.info" } }, required: ["kind"] },
6221
+ then: { properties: { resource: { $ref: "info.schema.json" } } }
6222
+ },
6223
+ {
6224
+ if: { properties: { kind: { const: "system.health" } }, required: ["kind"] },
6225
+ then: { properties: { resource: { $ref: "info.schema.json#/$defs/health" } } }
6226
+ },
6227
+ {
6228
+ if: { properties: { kind: { const: "engine.status" } }, required: ["kind"] },
6229
+ then: { properties: { resource: { $ref: "#/$defs/engineStatus" } } }
6230
+ },
6231
+ {
6232
+ if: { properties: { kind: { const: "engine.metrics" } }, required: ["kind"] },
6233
+ then: { properties: { resource: { $ref: "#/$defs/engineMetrics" }, patch: { $ref: "#/$defs/engineMetrics" } } }
6234
+ },
6235
+ {
6236
+ if: { properties: { kind: { const: "engine.error" } }, required: ["kind"] },
6237
+ then: { properties: { resource: { $ref: "../../common/1.0/problem.schema.json" } } }
6238
+ },
6239
+ {
6240
+ if: { properties: { kind: { const: "venue.updated" } }, required: ["kind"] },
6241
+ then: {
6242
+ properties: { resource: { $ref: "venue.schema.json" }, patch: { $ref: "venue.schema.json#/$defs/patch" } }
6243
+ }
6244
+ },
6245
+ {
6246
+ if: { properties: { kind: { const: "venue.deleted" } }, required: ["kind"] },
6247
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6248
+ },
6249
+ {
6250
+ if: { properties: { kind: { const: "venue.activeShow" } }, required: ["kind"] },
6251
+ then: { properties: { resource: { $ref: "#/$defs/activeShow" } } }
6252
+ },
6253
+ {
6254
+ if: { properties: { kind: { const: "output.state" } }, required: ["kind"] },
6255
+ then: {
6256
+ properties: { resource: { $ref: "output.schema.json" }, patch: { $ref: "output.schema.json#/$defs/patch" } }
6257
+ }
6258
+ },
6259
+ {
6260
+ if: { properties: { kind: { const: "display.state" } }, required: ["kind"] },
6261
+ then: { properties: { resource: { $ref: "display.schema.json#/$defs/state" }, patch: { type: "object" } } }
6262
+ },
6263
+ {
6264
+ if: { properties: { kind: { const: "display.pattern" } }, required: ["kind"] },
6265
+ then: {
6266
+ properties: { resource: { anyOf: [{ $ref: "display.schema.json#/$defs/testPattern" }, { type: "null" }] } }
6267
+ }
6268
+ },
6269
+ {
6270
+ if: { properties: { kind: { const: "display.error" } }, required: ["kind"] },
6271
+ then: { properties: { resource: { $ref: "../../common/1.0/problem.schema.json" } } }
6272
+ },
6273
+ {
6274
+ if: { properties: { kind: { const: "calibration.updated" } }, required: ["kind"] },
6275
+ then: { properties: { resource: { $ref: "../../dome/1.1/dome.schema.json#/$defs/calibration" } } }
6276
+ },
6277
+ {
6278
+ if: { properties: { kind: { const: "calibrationJob.state" } }, required: ["kind"] },
6279
+ then: { properties: { resource: { $ref: "calibration-job.schema.json" } } }
6280
+ },
6281
+ {
6282
+ if: { properties: { kind: { const: "calibrationJob.progress" } }, required: ["kind"] },
6283
+ then: { properties: { patch: { $ref: "#/$defs/progressPatch" } } }
6284
+ },
6285
+ {
6286
+ if: { properties: { kind: { const: "calibrationJob.awaiting" } }, required: ["kind"] },
6287
+ then: { properties: { resource: { $ref: "#/$defs/awaiting" } } }
6288
+ },
6289
+ {
6290
+ if: { properties: { kind: { const: "job.state" } }, required: ["kind"] },
6291
+ then: { properties: { resource: { $ref: "job.schema.json" } } }
6292
+ },
6293
+ {
6294
+ if: { properties: { kind: { const: "job.progress" } }, required: ["kind"] },
6295
+ then: { properties: { patch: { $ref: "#/$defs/progressPatch" } } }
6296
+ },
6297
+ {
6298
+ if: { properties: { kind: { const: "log.entry" } }, required: ["kind"] },
6299
+ then: { properties: { resource: { $ref: "system.schema.json#/$defs/logEntry" } } }
6300
+ },
6301
+ {
6302
+ if: { properties: { kind: { const: "node.state" } }, required: ["kind"] },
6303
+ then: {
6304
+ properties: { resource: { $ref: "system.schema.json#/$defs/node" }, patch: { $ref: "#/$defs/anyPatch" } }
6305
+ }
6306
+ },
6307
+ {
6308
+ if: { properties: { kind: { const: "player.state" } }, required: ["kind"] },
6309
+ then: { properties: { resource: { $ref: "player.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } } }
6310
+ },
6311
+ {
6312
+ if: { properties: { kind: { const: "player.position" } }, required: ["kind"] },
6313
+ then: { properties: { patch: { $ref: "#/$defs/positionPatch" } } }
6314
+ },
6315
+ {
6316
+ if: { properties: { kind: { const: "player.ended" } }, required: ["kind"] },
6317
+ then: { properties: { resource: { $ref: "player.schema.json" } } }
6318
+ },
6319
+ {
6320
+ if: { properties: { kind: { const: "player.error" } }, required: ["kind"] },
6321
+ then: { properties: { resource: { $ref: "../../common/1.0/problem.schema.json" } } }
6322
+ },
6323
+ {
6324
+ if: { properties: { kind: { const: "cue.fired" } }, required: ["kind"] },
6325
+ then: { properties: { resource: { $ref: "player.schema.json#/$defs/cueFired" } } }
6326
+ },
6327
+ {
6328
+ if: { properties: { kind: { const: "cue.failed" } }, required: ["kind"] },
6329
+ then: { properties: { resource: { $ref: "player.schema.json#/$defs/cueFired" } } }
6330
+ },
6331
+ {
6332
+ if: { properties: { kind: { const: "parameter.changed" } }, required: ["kind"] },
6333
+ then: { properties: { resource: { $ref: "player.schema.json#/$defs/parameter" } } }
6334
+ },
6335
+ {
6336
+ if: { properties: { kind: { const: "audio.state" } }, required: ["kind"] },
6337
+ then: {
6338
+ properties: { resource: { $ref: "audio.schema.json" }, patch: { $ref: "audio.schema.json#/$defs/patch" } }
6339
+ }
6340
+ },
6341
+ {
6342
+ if: { properties: { kind: { const: "audio.layout" } }, required: ["kind"] },
6343
+ then: { properties: { resource: { $ref: "../../dome/1.1/dome.schema.json#/$defs/audio" } } }
6344
+ },
6345
+ {
6346
+ if: { properties: { kind: { const: "audio.levels" } }, required: ["kind"] },
6347
+ then: { properties: { resource: { $ref: "#/$defs/levels" } } }
6348
+ },
6349
+ {
6350
+ if: { properties: { kind: { const: "zone.state" } }, required: ["kind"] },
6351
+ then: {
6352
+ properties: { resource: { $ref: "audio.schema.json#/$defs/zone" }, patch: { $ref: "#/$defs/anyPatch" } }
6353
+ }
6354
+ },
6355
+ {
6356
+ if: { properties: { kind: { const: "zone.deleted" } }, required: ["kind"] },
6357
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6358
+ },
6359
+ {
6360
+ if: { properties: { kind: { const: "audioDevice.state" } }, required: ["kind"] },
6361
+ then: {
6362
+ properties: { resource: { $ref: "audio.schema.json#/$defs/device" }, patch: { $ref: "#/$defs/anyPatch" } }
6363
+ }
6364
+ },
6365
+ {
6366
+ if: { properties: { kind: { const: "audioSession.state" } }, required: ["kind"] },
6367
+ then: {
6368
+ properties: { resource: { $ref: "audio.schema.json#/$defs/session" }, patch: { $ref: "#/$defs/anyPatch" } }
6369
+ }
6370
+ },
6371
+ {
6372
+ if: { properties: { kind: { const: "generator.state" } }, required: ["kind"] },
6373
+ then: { properties: { resource: { $ref: "audio.schema.json#/$defs/generatorState" } } }
6374
+ },
6375
+ {
6376
+ if: { properties: { kind: { const: "show.updated" } }, required: ["kind"] },
6377
+ then: {
6378
+ properties: { resource: { $ref: "show.schema.json" }, patch: { $ref: "show.schema.json#/$defs/patch" } }
6379
+ }
6380
+ },
6381
+ {
6382
+ if: { properties: { kind: { const: "show.deleted" } }, required: ["kind"] },
6383
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6384
+ },
6385
+ {
6386
+ if: { properties: { kind: { const: "playlist.updated" } }, required: ["kind"] },
6387
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6388
+ },
6389
+ {
6390
+ if: { properties: { kind: { const: "playlist.deleted" } }, required: ["kind"] },
6391
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6392
+ },
6393
+ {
6394
+ if: { properties: { kind: { const: "timeline.updated" } }, required: ["kind"] },
6395
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6396
+ },
6397
+ {
6398
+ if: { properties: { kind: { const: "timeline.deleted" } }, required: ["kind"] },
6399
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6400
+ },
6401
+ {
6402
+ if: { properties: { kind: { const: "cue.updated" } }, required: ["kind"] },
6403
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6404
+ },
6405
+ {
6406
+ if: { properties: { kind: { const: "cue.deleted" } }, required: ["kind"] },
6407
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6408
+ },
6409
+ {
6410
+ if: { properties: { kind: { const: "trigger.updated" } }, required: ["kind"] },
6411
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6412
+ },
6413
+ {
6414
+ if: { properties: { kind: { const: "trigger.deleted" } }, required: ["kind"] },
6415
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6416
+ },
6417
+ {
6418
+ if: { properties: { kind: { const: "matrix.updated" } }, required: ["kind"] },
6419
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6420
+ },
6421
+ {
6422
+ if: { properties: { kind: { const: "asset.created" } }, required: ["kind"] },
6423
+ then: { properties: { resource: { $ref: "asset.schema.json" } } }
6424
+ },
6425
+ {
6426
+ if: { properties: { kind: { const: "asset.progress" } }, required: ["kind"] },
6427
+ then: { properties: { patch: { $ref: "#/$defs/progressPatch" } } }
6428
+ },
6429
+ {
6430
+ if: { properties: { kind: { const: "asset.ready" } }, required: ["kind"] },
6431
+ then: { properties: { resource: { $ref: "asset.schema.json" } } }
6432
+ },
6433
+ {
6434
+ if: { properties: { kind: { const: "asset.failed" } }, required: ["kind"] },
6435
+ then: { properties: { resource: { $ref: "asset.schema.json" } } }
6436
+ },
6437
+ {
6438
+ if: { properties: { kind: { const: "asset.deleted" } }, required: ["kind"] },
6439
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6440
+ },
6441
+ {
6442
+ if: { properties: { kind: { const: "upload.progress" } }, required: ["kind"] },
6443
+ then: { properties: { resource: { $ref: "upload.schema.json" }, patch: { $ref: "#/$defs/uploadProgress" } } }
6444
+ },
6445
+ {
6446
+ if: { properties: { kind: { const: "gateway.state" } }, required: ["kind"] },
6447
+ then: { properties: { resource: { $ref: "gateway.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } } }
6448
+ },
6449
+ {
6450
+ if: { properties: { kind: { const: "gateway.message" } }, required: ["kind"] },
6451
+ then: { properties: { resource: { $ref: "#/$defs/gatewayMessage" } } }
6452
+ },
6453
+ {
6454
+ if: { properties: { kind: { const: "app.payload" } }, required: ["kind"] },
6455
+ then: { properties: { resource: { $ref: "app-payload.schema.json#/$defs/published" } } }
6456
+ },
6457
+ {
6458
+ if: { properties: { kind: { const: "app.cleared" } }, required: ["kind"] },
6459
+ then: { properties: { resource: { $ref: "#/$defs/appCleared" } } }
6460
+ },
6461
+ {
6462
+ if: { properties: { kind: { const: "client.command" } }, required: ["kind"] },
6463
+ then: { properties: { resource: { $ref: "client.schema.json#/$defs/command" } } }
6464
+ },
6465
+ {
6466
+ if: { properties: { kind: { const: "session.revoked" } }, required: ["kind"] },
6467
+ then: { properties: { resource: { $ref: "#/$defs/sessionRevoked" } } }
6468
+ },
6469
+ {
6470
+ if: { properties: { kind: { const: "scenarioSession.state" } }, required: ["kind"] },
6471
+ then: {
6472
+ properties: { resource: { $ref: "scenario-session.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } }
6473
+ }
6474
+ },
6475
+ {
6476
+ if: { properties: { kind: { const: "scenarioSession.log" } }, required: ["kind"] },
6477
+ then: { properties: { resource: { $ref: "scenario-session.schema.json#/$defs/logEntry" } } }
6478
+ },
6479
+ {
6480
+ if: { properties: { kind: { const: "device.state" } }, required: ["kind"] },
6481
+ then: { properties: { resource: { $ref: "device.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } } }
6482
+ },
6483
+ {
6484
+ if: { properties: { kind: { const: "audioAnalysis.state" } }, required: ["kind"] },
6485
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/analysisState" } } }
6486
+ },
6487
+ {
6488
+ if: { properties: { kind: { const: "audio.analysis" } }, required: ["kind"] },
6489
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/frame" } } }
6490
+ },
6491
+ {
6492
+ if: { properties: { kind: { const: "audio.onset" } }, required: ["kind"] },
6493
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/onset" } } }
6494
+ },
6495
+ {
6496
+ if: { properties: { kind: { const: "audioReactive.state" } }, required: ["kind"] },
6497
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/state" } } }
6498
+ },
6499
+ {
6500
+ if: { properties: { kind: { const: "audioReactiveScene.updated" } }, required: ["kind"] },
6501
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/scene" } } }
6502
+ },
6503
+ {
6504
+ if: { properties: { kind: { const: "audioReactiveScene.deleted" } }, required: ["kind"] },
6505
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6506
+ },
6507
+ {
6508
+ if: { properties: { kind: { const: "textureSource.state" } }, required: ["kind"] },
6509
+ then: { properties: { resource: { $ref: "asset.schema.json#/$defs/textureSource" } } }
6510
+ }
6511
+ ],
6512
+ $defs: {
6513
+ knownKind: {
6514
+ description: "Kinds of the v1 topic tree (events/topics.yaml); open catalogue \u2014 clients ignore unknown kinds.",
6515
+ enum: [
6516
+ "system.info",
6517
+ "system.health",
6518
+ "engine.status",
6519
+ "engine.metrics",
6520
+ "engine.error",
6521
+ "venue.updated",
6522
+ "venue.deleted",
6523
+ "venue.activeShow",
6524
+ "output.state",
6525
+ "display.state",
6526
+ "display.pattern",
6527
+ "display.error",
6528
+ "calibration.updated",
6529
+ "calibrationJob.state",
6530
+ "calibrationJob.progress",
6531
+ "calibrationJob.awaiting",
6532
+ "job.state",
6533
+ "job.progress",
6534
+ "log.entry",
6535
+ "node.state",
6536
+ "player.state",
6537
+ "player.position",
6538
+ "player.ended",
6539
+ "player.error",
6540
+ "cue.fired",
6541
+ "cue.failed",
6542
+ "parameter.changed",
6543
+ "audio.state",
6544
+ "audio.layout",
6545
+ "audio.levels",
6546
+ "zone.state",
6547
+ "zone.deleted",
6548
+ "audioDevice.state",
6549
+ "audioSession.state",
6550
+ "generator.state",
6551
+ "show.updated",
6552
+ "show.deleted",
6553
+ "playlist.updated",
6554
+ "playlist.deleted",
6555
+ "timeline.updated",
6556
+ "timeline.deleted",
6557
+ "cue.updated",
6558
+ "cue.deleted",
6559
+ "trigger.updated",
6560
+ "trigger.deleted",
6561
+ "matrix.updated",
6562
+ "asset.created",
6563
+ "asset.progress",
6564
+ "asset.ready",
6565
+ "asset.failed",
6566
+ "asset.deleted",
6567
+ "upload.progress",
6568
+ "gateway.state",
6569
+ "gateway.message",
6570
+ "app.payload",
6571
+ "app.cleared",
6572
+ "client.command",
6573
+ "session.revoked",
6574
+ "scenarioSession.state",
6575
+ "scenarioSession.log",
6576
+ "device.state",
6577
+ "audioAnalysis.state",
6578
+ "audio.analysis",
6579
+ "audio.onset",
6580
+ "audioReactive.state",
6581
+ "audioReactiveScene.updated",
6582
+ "audioReactiveScene.deleted",
6583
+ "textureSource.state"
6584
+ ]
6585
+ },
6586
+ engineStatus: {
6587
+ type: "object",
6588
+ required: ["name", "status"],
6589
+ properties: {
6590
+ name: {
6591
+ anyOf: [
6592
+ { enum: ["visual", "anantasound", "anantadigital"] },
6593
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}(@[A-Za-z0-9._-]{1,64})?$" }
6594
+ ]
6595
+ },
6596
+ status: { enum: ["up", "degraded", "down", "incompatible"] },
6597
+ version: { type: "string" },
6598
+ protocol: { type: "string", examples: ["freedome.engine.v1"] },
6599
+ capabilities: { type: "array", items: { type: "string" } },
6600
+ message: { type: "string" }
6601
+ },
6602
+ additionalProperties: false
6603
+ },
6604
+ engineMetrics: {
6605
+ description: "\u2264 1 Hz; any subset (patch) of the metrics.",
6606
+ type: "object",
6607
+ properties: {
6608
+ fps: { type: "number", minimum: 0 },
6609
+ frameTimeMs: { type: "number", minimum: 0 },
6610
+ droppedFrames: { type: "integer", minimum: 0 },
6611
+ gpuLoad: { type: "number", minimum: 0, maximum: 1 },
6612
+ cpuLoad: { type: "number", minimum: 0, maximum: 1 },
6613
+ temperatureC: { type: "number" }
6614
+ },
6615
+ patternProperties: { "^x-": true },
6616
+ additionalProperties: false
6617
+ },
6618
+ deleted: {
6619
+ type: "object",
6620
+ required: ["id"],
6621
+ properties: { id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
6622
+ additionalProperties: false
6623
+ },
6624
+ activeShow: {
6625
+ type: "object",
6626
+ required: ["activeShowId"],
6627
+ properties: {
6628
+ activeShowId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] }
6629
+ },
6630
+ additionalProperties: false
6631
+ },
6632
+ progressPatch: {
6633
+ type: "object",
6634
+ minProperties: 1,
6635
+ properties: {
6636
+ progress: { type: "number", minimum: 0, maximum: 1 },
6637
+ currentStep: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
6638
+ message: { type: "string" }
6639
+ },
6640
+ additionalProperties: false
6641
+ },
6642
+ awaiting: {
6643
+ description: "Same object as calibration-job `awaiting` (null when nothing is awaited).",
6644
+ anyOf: [{ type: "null" }, { $ref: "calibration-job.schema.json#/$defs/awaiting" }]
6645
+ },
6646
+ anyPatch: { description: "Merge patch of the resource (high-rate kinds).", type: "object", minProperties: 1 },
6647
+ positionPatch: {
6648
+ description: "player.position (default 4 Hz, \u2264 30 Hz per subscription option positionHz).",
6649
+ type: "object",
6650
+ required: ["position"],
6651
+ properties: {
6652
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
6653
+ duration: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/seconds" }, { type: "null" }] },
6654
+ rate: { type: "number" },
6655
+ timecode: { type: "string", pattern: "^\\d{2}:\\d{2}:\\d{2}[:;]\\d{2}$" }
6656
+ },
6657
+ additionalProperties: false
6658
+ },
6659
+ levels: {
6660
+ description: "audio.levels meters (\u2264 10 Hz): id (speaker / zone / device / master) \u2192 dBFS.",
6661
+ type: "object",
6662
+ required: ["levels"],
6663
+ properties: {
6664
+ levels: { type: "object", additionalProperties: { type: "number", maximum: 24 } },
6665
+ peak: { type: "object", additionalProperties: { type: "number", maximum: 24 } }
6666
+ },
6667
+ additionalProperties: false
6668
+ },
6669
+ showItem: {
6670
+ description: "Fine-grained show edit (sub-kind of show.updated).",
6671
+ type: "object",
6672
+ required: ["showId", "itemId", "revision"],
6673
+ properties: {
6674
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6675
+ itemId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6676
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
6677
+ item: { type: "object", description: "the stored .dome entry (absent on delete)" }
6678
+ },
6679
+ additionalProperties: false
6680
+ },
6681
+ uploadProgress: {
6682
+ type: "object",
6683
+ required: ["offset"],
6684
+ properties: {
6685
+ offset: { type: "integer", minimum: 0 },
6686
+ length: { type: "integer", minimum: 0 },
6687
+ status: { type: "string" }
6688
+ },
6689
+ additionalProperties: false
6690
+ },
6691
+ gatewayMessage: {
6692
+ description: "Debug trace of a gateway message (gateways:manage only).",
6693
+ type: "object",
6694
+ required: ["direction", "summary"],
6695
+ properties: {
6696
+ direction: { enum: ["in", "out"] },
6697
+ peer: { type: "string" },
6698
+ summary: { type: "string" },
6699
+ mapsTo: { $ref: "../../common/1.0/ids.schema.json#/$defs/operationId" },
6700
+ raw: { type: "string", maxLength: 4096 }
6701
+ },
6702
+ additionalProperties: false
6703
+ },
6704
+ appCleared: {
6705
+ type: "object",
6706
+ required: ["app"],
6707
+ properties: { app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" } },
6708
+ additionalProperties: false
6709
+ },
6710
+ sessionRevoked: {
6711
+ type: "object",
6712
+ required: ["reason"],
6713
+ properties: {
6714
+ sessionId: { type: "string" },
6715
+ reason: {
6716
+ anyOf: [
6717
+ { enum: ["signed-out", "refresh-reuse", "password-changed", "user-deleted", "key-revoked", "admin"] },
6718
+ { type: "string" }
6719
+ ]
6720
+ }
6721
+ },
6722
+ additionalProperties: false
6723
+ }
6724
+ }
6725
+ },
6726
+ "https://freedome.nativemind.us/schemas/api/1.1/gateway.schema.json": {
6727
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6728
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/gateway.schema.json",
6729
+ $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}.",
6730
+ title: "Gateway",
6731
+ allOf: [{ $ref: "#/$defs/gateway" }],
6732
+ $defs: {
6733
+ gateway: {
6734
+ type: "object",
6735
+ required: ["id", "direction", "protocol", "enabled", "status"],
6736
+ properties: {
6737
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6738
+ name: { type: "string" },
6739
+ direction: { enum: ["inbound", "outbound", "converter"] },
6740
+ protocol: {
6741
+ type: "string",
6742
+ description: "e.g. screenberry-json, dome360-http, watchout, resolume, osc, pjlink, artnet"
6743
+ },
6744
+ vendor: { type: "string" },
6745
+ enabled: { type: "boolean" },
6746
+ status: {
6747
+ anyOf: [
6748
+ { enum: ["disabled", "starting", "up", "degraded", "down"] },
6749
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6750
+ ]
6751
+ },
6752
+ docsOnly: {
6753
+ type: "boolean",
6754
+ 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`."
6755
+ },
6756
+ listeners: {
6757
+ type: "array",
6758
+ items: {
6759
+ type: "object",
6760
+ required: ["transport", "port"],
6761
+ properties: {
6762
+ transport: { enum: ["http", "tcp", "udp", "osc", "ws", "socketio", "serial"] },
6763
+ port: { type: "integer", minimum: 0, maximum: 65535 },
6764
+ bind: { type: "string" }
6765
+ },
6766
+ additionalProperties: false
6767
+ }
6768
+ },
6769
+ peers: {
6770
+ type: "array",
6771
+ items: {
6772
+ type: "object",
6773
+ properties: {
6774
+ address: { type: "string" },
6775
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
6776
+ },
6777
+ additionalProperties: false
6778
+ }
6779
+ },
6780
+ config: {
6781
+ type: "object",
6782
+ additionalProperties: true,
6783
+ description: 'gateway-specific; secrets redacted as "***"'
6784
+ },
6785
+ allowCidrs: { type: "array", items: { type: "string" } },
6786
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
6787
+ stats: { type: "object", additionalProperties: { type: "number" } },
6788
+ resolume: {
6789
+ $ref: "#/$defs/resolumeStatus",
6790
+ description: "live driver status; only on protocol resolume, read-only"
6791
+ }
6792
+ },
6793
+ if: { properties: { protocol: { const: "resolume" } }, required: ["protocol"] },
6794
+ then: { properties: { config: { $ref: "#/$defs/resolumeConfig" } } },
6795
+ patternProperties: { "^x-": true },
6796
+ additionalProperties: false
6797
+ },
6798
+ resolumeConfig: {
6799
+ 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).",
6800
+ type: "object",
6801
+ required: ["host"],
6802
+ properties: {
6803
+ host: {
6804
+ type: "string",
6805
+ minLength: 1,
6806
+ maxLength: 253,
6807
+ description: "host name or IP of the Resolume machine"
6808
+ },
6809
+ oscPort: { type: "integer", minimum: 1, maximum: 65535, default: 7e3 },
6810
+ restPort: { type: "integer", minimum: 1, maximum: 65535, default: 8080 },
6811
+ ws: {
6812
+ type: "boolean",
6813
+ default: true,
6814
+ description: "keep the WebSocket API connection (ws://host:restPort/api/v1) for state"
6815
+ },
6816
+ oscMaxRateHz: {
6817
+ type: "number",
6818
+ exclusiveMinimum: 0,
6819
+ maximum: 1e3,
6820
+ description: "highest send rate per OSC address; newer values replace unsent ones"
6821
+ }
6822
+ },
6823
+ patternProperties: { "^x-": true },
6824
+ additionalProperties: false
6825
+ },
6826
+ resolumeLink: {
6827
+ type: "object",
6828
+ required: ["state"],
6829
+ properties: {
6830
+ state: {
6831
+ anyOf: [
6832
+ { enum: ["disabled", "connecting", "up", "down"] },
6833
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6834
+ ],
6835
+ description: "for OSC over UDP, up means sending: there is no acknowledgement"
6836
+ },
6837
+ lastOkAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
6838
+ sent: { type: "integer", minimum: 0 },
6839
+ dropped: { type: "integer", minimum: 0 },
6840
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
6841
+ },
6842
+ additionalProperties: false
6843
+ },
6844
+ resolumeStatus: {
6845
+ type: "object",
6846
+ required: ["osc", "rest", "ws"],
6847
+ properties: {
6848
+ osc: { $ref: "#/$defs/resolumeLink" },
6849
+ rest: { $ref: "#/$defs/resolumeLink" },
6850
+ ws: { $ref: "#/$defs/resolumeLink" },
6851
+ product: {
6852
+ description: "GET /api/v1/product of Resolume, when reachable.",
6853
+ type: "object",
6854
+ properties: {
6855
+ name: { type: "string" },
6856
+ major: { type: "integer", minimum: 0 },
6857
+ minor: { type: "integer", minimum: 0 },
6858
+ micro: { type: "integer", minimum: 0 },
6859
+ revision: { type: "integer", minimum: 0 }
6860
+ },
6861
+ additionalProperties: false
6862
+ },
6863
+ composition: {
6864
+ description: "Summary of the open composition.",
6865
+ type: "object",
6866
+ properties: {
6867
+ name: { type: "string" },
6868
+ layers: { type: "integer", minimum: 0 },
6869
+ columns: { type: "integer", minimum: 0 },
6870
+ decks: { type: "integer", minimum: 0 }
6871
+ },
6872
+ additionalProperties: false
6873
+ },
6874
+ lastSyncAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
6875
+ },
6876
+ additionalProperties: false
6877
+ },
6878
+ patch: {
6879
+ type: "object",
6880
+ minProperties: 1,
6881
+ properties: {
6882
+ enabled: { type: "boolean" },
6883
+ config: { type: "object", additionalProperties: true },
6884
+ allowCidrs: { type: "array", items: { type: "string" } }
6885
+ },
6886
+ additionalProperties: false
6887
+ },
6888
+ page: {
6889
+ type: "object",
6890
+ required: ["items", "nextCursor"],
6891
+ properties: {
6892
+ items: { type: "array", items: { $ref: "#/$defs/gateway" } },
6893
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
6894
+ },
6895
+ additionalProperties: false
6896
+ },
6897
+ testResult: {
6898
+ type: "object",
6899
+ required: ["gatewayId", "ok"],
6900
+ properties: {
6901
+ gatewayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6902
+ ok: { type: "boolean" },
6903
+ latencyMs: { type: "number", minimum: 0 },
6904
+ remoteVersion: { type: "string" },
6905
+ detail: { type: "string" },
6906
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
6907
+ },
6908
+ additionalProperties: false
6909
+ },
6910
+ oscArg: {
6911
+ type: "object",
6912
+ required: ["type", "value"],
6913
+ properties: {
6914
+ type: { enum: ["i", "f", "s", "b", "T", "F", "h", "d", "t", "N"] },
6915
+ value: {
6916
+ anyOf: [{ type: "number" }, { type: "string" }, { type: "boolean" }, { type: "null" }],
6917
+ description: "b = base64 blob; t = NTP time tag as RFC 3339"
6918
+ }
6919
+ },
6920
+ additionalProperties: false
6921
+ },
6922
+ sendOsc: {
6923
+ description: "POST /integrations/osc/send: to a configured OSC target only (never an arbitrary host).",
6924
+ type: "object",
6925
+ required: ["target", "address"],
6926
+ properties: {
6927
+ target: {
6928
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
6929
+ description: "configured target id (gateway or osc target)"
6930
+ },
6931
+ address: { type: "string", pattern: "^/[^\\s#*,?\\[\\]{}]*$" },
6932
+ args: { type: "array", items: { $ref: "#/$defs/oscArg" }, maxItems: 64 }
6933
+ },
6934
+ additionalProperties: false
6935
+ }
6936
+ }
6937
+ },
6938
+ "https://freedome.nativemind.us/schemas/api/1.1/import.schema.json": {
6939
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6940
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/import.schema.json",
6941
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). POST /imports body (02e \xA75.3) and the result of a finished import job. Root = request.",
6942
+ title: "Import request",
6943
+ type: "object",
6944
+ required: ["format"],
6945
+ properties: {
6946
+ uploadId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7", description: "tus upload (purpose import)" },
6947
+ url: {
6948
+ type: "string",
6949
+ format: "uri",
6950
+ pattern: "^https?://",
6951
+ description: "server-side fetch (allow-listed hosts only)"
6952
+ },
6953
+ assetId: {
6954
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
6955
+ description: "an already stored asset (e.g. a .zelim uploaded as asset)"
6956
+ },
6957
+ format: { $ref: "#/$defs/format" },
6958
+ target: {
6959
+ type: "object",
6960
+ properties: {
6961
+ kind: { enum: ["auto", "show", "venue", "assets"], default: "auto" },
6962
+ id: {
6963
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
6964
+ description: "id to create (default: meta.id / generated)"
6965
+ },
6966
+ replace: {
6967
+ type: "boolean",
6968
+ default: false,
6969
+ description: "replace an existing show / venue with the same id (409 otherwise)"
6970
+ },
6971
+ activate: {
6972
+ type: "boolean",
6973
+ default: false,
6974
+ description: "venue: make it the active venue; show: set as the active show"
6975
+ }
6976
+ },
6977
+ additionalProperties: false
6978
+ },
6979
+ options: {
6980
+ type: "object",
6981
+ additionalProperties: true,
6982
+ description: "format-specific (e.g. domemaster-folder: fps, loop)"
6983
+ }
6984
+ },
6985
+ patternProperties: { "^x-": true },
6986
+ additionalProperties: false,
6987
+ oneOf: [{ required: ["uploadId"] }, { required: ["url"] }, { required: ["assetId"] }],
6988
+ $defs: {
6989
+ format: {
6990
+ anyOf: [
6991
+ {
6992
+ enum: [
6993
+ "dome",
6994
+ "domemaster-folder",
6995
+ "screenberry-project",
6996
+ "dome360-playlist",
6997
+ "zelim",
6998
+ "boranko",
6999
+ "comics",
7000
+ "mpcdi"
7001
+ ]
7002
+ },
7003
+ { type: "string", pattern: "^[a-z0-9][a-z0-9.-]{0,63}$" }
7004
+ ]
7005
+ },
7006
+ result: {
7007
+ description: "`result` of a succeeded import job.",
7008
+ type: "object",
7009
+ properties: {
7010
+ format: { $ref: "#/$defs/format" },
7011
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7012
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7013
+ assetIds: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
7014
+ warnings: { type: "array", items: { $ref: "show.schema.json#/$defs/warning" } }
7015
+ },
7016
+ additionalProperties: false
7017
+ }
7018
+ }
7019
+ },
7020
+ "https://freedome.nativemind.us/schemas/api/1.1/info.schema.json": {
7021
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7022
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/info.schema.json",
7023
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). GET /api/v1/info (02e \xA75.1) and the unversioned /health, /ready bodies ($defs/health).",
7024
+ title: "Server info",
7025
+ type: "object",
7026
+ required: ["product", "serverVersion", "instanceId", "apiVersions"],
7027
+ properties: {
7028
+ product: { anyOf: [{ enum: ["freedome-mediaserver", "freedome-cloud"] }, { type: "string", minLength: 1 }] },
7029
+ serverVersion: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7030
+ contractVersion: {
7031
+ $ref: "../../common/1.0/ids.schema.json#/$defs/semver",
7032
+ description: "freedome_contract release the server implements"
7033
+ },
7034
+ instanceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7035
+ name: { type: "string" },
7036
+ apiVersions: { type: "array", minItems: 1, items: { type: "string", pattern: "^v\\d+$" } },
7037
+ legacyProfile: { type: "boolean", description: "legacy (flutter_freedome 3.0 / razvivalka) listener enabled" },
7038
+ transports: {
7039
+ type: "object",
7040
+ properties: {
7041
+ rest: { type: "object", properties: { basePath: { type: "string" } }, additionalProperties: true },
7042
+ graphql: {
7043
+ type: "object",
7044
+ properties: { enabled: { type: "boolean" }, path: { type: "string" } },
7045
+ additionalProperties: true
7046
+ },
7047
+ ws: {
7048
+ type: "object",
7049
+ properties: { path: { type: "string" }, subprotocol: { type: "string" } },
7050
+ additionalProperties: true
7051
+ },
7052
+ socketio: {
7053
+ type: "object",
7054
+ properties: { path: { type: "string" }, namespace: { type: "string" } },
7055
+ additionalProperties: true
7056
+ },
7057
+ osc: {
7058
+ type: "object",
7059
+ properties: {
7060
+ udpIn: { type: "integer", minimum: 1, maximum: 65535 },
7061
+ udpOut: { type: "integer", minimum: 1, maximum: 65535 },
7062
+ tcp: { type: "integer", minimum: 1, maximum: 65535 }
7063
+ },
7064
+ additionalProperties: true
7065
+ }
7066
+ },
7067
+ additionalProperties: true
7068
+ },
7069
+ auth: {
7070
+ type: "object",
7071
+ properties: {
7072
+ methods: {
7073
+ type: "array",
7074
+ items: { anyOf: [{ enum: ["password", "apiKey", "pairing", "cloud", "anonymous"] }, { type: "string" }] }
7075
+ }
7076
+ },
7077
+ additionalProperties: true
7078
+ },
7079
+ venues: {
7080
+ type: "array",
7081
+ items: {
7082
+ type: "object",
7083
+ required: ["id"],
7084
+ properties: {
7085
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7086
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
7087
+ default: { type: "boolean" },
7088
+ status: { type: "string" }
7089
+ },
7090
+ additionalProperties: true
7091
+ }
7092
+ },
7093
+ capabilities: {
7094
+ description: "Engines, audio modes, display types, test patterns, gateways \u2026 (open object; clients ignore unknown keys).",
7095
+ type: "object",
7096
+ additionalProperties: true
7097
+ },
7098
+ links: { type: "object", additionalProperties: { type: "string", format: "uri-reference" } }
7099
+ },
7100
+ additionalProperties: true,
7101
+ $defs: {
7102
+ health: {
7103
+ description: "GET /health and /ready (unversioned, anonymous).",
7104
+ type: "object",
7105
+ required: ["status"],
7106
+ properties: {
7107
+ status: { enum: ["ok", "degraded", "down"] },
7108
+ checks: {
7109
+ type: "object",
7110
+ additionalProperties: {
7111
+ type: "object",
7112
+ required: ["status"],
7113
+ properties: { status: { enum: ["ok", "degraded", "down"] }, detail: { type: "string" } },
7114
+ additionalProperties: false
7115
+ }
7116
+ }
7117
+ },
7118
+ additionalProperties: false
7119
+ }
7120
+ }
7121
+ },
7122
+ "https://freedome.nativemind.us/schemas/api/1.1/job.schema.json": {
7123
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7124
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/job.schema.json",
7125
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Generic long-running operation (02e \xA73.1, \xA75.1 GET /jobs/{jobId}).",
7126
+ title: "Job",
7127
+ allOf: [{ $ref: "#/$defs/job" }],
7128
+ $defs: {
7129
+ job: {
7130
+ type: "object",
7131
+ required: ["id", "kind", "status", "createdAt"],
7132
+ properties: {
7133
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7134
+ kind: {
7135
+ anyOf: [
7136
+ { enum: ["calibration", "import", "export", "backup", "restore", "diagnostics", "update", "probe"] },
7137
+ { $ref: "#/$defs/token" }
7138
+ ]
7139
+ },
7140
+ status: { $ref: "#/$defs/status" },
7141
+ progress: { type: "number", minimum: 0, maximum: 1 },
7142
+ message: { type: "string" },
7143
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7144
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7145
+ finishedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7146
+ result: { description: "Kind-specific result (e.g. { venueId } of an import)." },
7147
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
7148
+ links: {
7149
+ type: "object",
7150
+ properties: {
7151
+ self: { type: "string", format: "uri-reference" },
7152
+ cancel: { type: "string", format: "uri-reference" },
7153
+ resource: { type: "string", format: "uri-reference" }
7154
+ },
7155
+ additionalProperties: false
7156
+ }
7157
+ },
7158
+ patternProperties: { "^x-": true },
7159
+ additionalProperties: false,
7160
+ allOf: [
7161
+ {
7162
+ if: { properties: { status: { const: "failed" } }, required: ["status"] },
7163
+ then: { required: ["problem"] }
7164
+ }
7165
+ ]
7166
+ },
7167
+ token: { type: "string", pattern: "^[a-z0-9][a-z0-9._-]{0,63}$" },
7168
+ status: {
7169
+ description: "queued \u2192 running \u21C4 awaiting_input \u2192 succeeded | failed | cancelled.",
7170
+ enum: ["queued", "running", "awaiting_input", "succeeded", "failed", "cancelled"]
7171
+ },
7172
+ page: {
7173
+ type: "object",
7174
+ required: ["items", "nextCursor"],
7175
+ properties: {
7176
+ items: { type: "array", items: { $ref: "#/$defs/job" } },
7177
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7178
+ },
7179
+ additionalProperties: false
7180
+ }
7181
+ }
7182
+ },
7183
+ "https://freedome.nativemind.us/schemas/api/1.1/output.schema.json": {
7184
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7185
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/output.schema.json",
7186
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Venue output state (02e \xA75.2 GET/PATCH /venues/{venueId}/output; fulldome /@1/* coverage).",
7187
+ title: "Venue output",
7188
+ type: "object",
7189
+ required: ["brightness", "volume", "blackout"],
7190
+ properties: {
7191
+ brightness: {
7192
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
7193
+ description: "master brightness 0..1"
7194
+ },
7195
+ volume: {
7196
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
7197
+ description: "master volume, linear 0..1 (C5)"
7198
+ },
7199
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
7200
+ mute: { type: "boolean" },
7201
+ blackout: { type: "boolean" },
7202
+ rotation: { type: "number", minimum: -360, maximum: 360, description: "\xB0 content rotation about the dome axis" },
7203
+ lighting: { type: "boolean", description: "stage / house light relay" },
7204
+ ndi: {
7205
+ type: "object",
7206
+ properties: { enabled: { type: "boolean" }, name: { type: "string" } },
7207
+ additionalProperties: false
7208
+ }
7209
+ },
7210
+ patternProperties: { "^x-": true },
7211
+ additionalProperties: false,
7212
+ $defs: {
7213
+ patch: {
7214
+ description: "PATCH body (application/merge-patch+json): any subset of the output fields.",
7215
+ type: "object",
7216
+ minProperties: 1,
7217
+ properties: {
7218
+ brightness: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7219
+ volume: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7220
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
7221
+ mute: { type: "boolean" },
7222
+ blackout: { type: "boolean" },
7223
+ rotation: { type: "number", minimum: -360, maximum: 360 },
7224
+ lighting: { type: "boolean" },
7225
+ ndi: {
7226
+ type: "object",
7227
+ properties: { enabled: { type: "boolean" }, name: { type: "string" } },
7228
+ additionalProperties: false
7229
+ }
7230
+ },
7231
+ patternProperties: { "^x-": true },
7232
+ additionalProperties: false
7233
+ }
7234
+ }
7235
+ },
7236
+ "https://freedome.nativemind.us/schemas/api/1.1/player.schema.json": {
7237
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7238
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/player.schema.json",
7239
+ $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}.",
7240
+ title: "Media player",
7241
+ allOf: [{ $ref: "#/$defs/player" }],
7242
+ $defs: {
7243
+ player: {
7244
+ type: "object",
7245
+ required: ["id", "venueId", "status", "position", "revision"],
7246
+ properties: {
7247
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7248
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7249
+ name: { type: "string" },
7250
+ status: { $ref: "#/$defs/status" },
7251
+ showId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7252
+ playlistId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7253
+ timelineId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7254
+ matrixCell: { anyOf: [{ $ref: "#/$defs/matrixCell" }, { type: "null" }] },
7255
+ itemIndex: { anyOf: [{ type: "integer", minimum: 0 }, { type: "null" }] },
7256
+ assetId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7257
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
7258
+ duration: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/seconds" }, { type: "null" }] },
7259
+ rate: { $ref: "#/$defs/rate" },
7260
+ loop: { type: "boolean" },
7261
+ volume: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7262
+ opacity: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7263
+ brightness: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7264
+ rotation: { type: "number", minimum: -360, maximum: 360 },
7265
+ target: {
7266
+ type: "object",
7267
+ properties: {
7268
+ displays: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
7269
+ layer: { type: "integer", minimum: 0 }
7270
+ },
7271
+ additionalProperties: false
7272
+ },
7273
+ pending: {
7274
+ type: "boolean",
7275
+ description: "last command not yet acknowledged by the engine (2 s timeout); a later player.state resolves it"
7276
+ },
7277
+ scheduledAt: {
7278
+ anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }, { type: "null" }],
7279
+ description: "pending scheduled start (play.at)"
7280
+ },
7281
+ error: { anyOf: [{ $ref: "../../common/1.0/problem.schema.json" }, { type: "null" }] },
7282
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7283
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7284
+ },
7285
+ patternProperties: { "^x-": true },
7286
+ additionalProperties: false
7287
+ },
7288
+ status: {
7289
+ anyOf: [
7290
+ { enum: ["idle", "loading", "playing", "paused", "stopped", "error"] },
7291
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
7292
+ ]
7293
+ },
7294
+ rate: { type: "number", exclusiveMinimum: 0, maximum: 16, description: "playback rate, 1 = normal" },
7295
+ matrixCell: {
7296
+ type: "object",
7297
+ required: ["row", "column"],
7298
+ properties: {
7299
+ matrixId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7300
+ row: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7301
+ column: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }
7302
+ },
7303
+ additionalProperties: false
7304
+ },
7305
+ page: {
7306
+ type: "object",
7307
+ required: ["items", "nextCursor"],
7308
+ properties: {
7309
+ items: { type: "array", items: { $ref: "#/$defs/player" } },
7310
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7311
+ },
7312
+ additionalProperties: false
7313
+ },
7314
+ patch: {
7315
+ description: "PATCH /venues/{venueId}/players/{playerId} (merge-patch; playback is last-writer-wins, no If-Match).",
7316
+ type: "object",
7317
+ minProperties: 1,
7318
+ properties: {
7319
+ rate: { $ref: "#/$defs/rate" },
7320
+ loop: { type: "boolean" },
7321
+ volume: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7322
+ opacity: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7323
+ brightness: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7324
+ rotation: { type: "number", minimum: -360, maximum: 360 }
7325
+ },
7326
+ patternProperties: { "^x-": true },
7327
+ additionalProperties: false
7328
+ },
7329
+ play: {
7330
+ 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).",
7331
+ type: "object",
7332
+ properties: {
7333
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7334
+ playlistId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7335
+ itemIndex: { type: "integer", minimum: 0 },
7336
+ timelineId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7337
+ matrixCell: { $ref: "#/$defs/matrixCell" },
7338
+ assetId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7339
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
7340
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7341
+ loop: { type: "boolean" }
7342
+ },
7343
+ patternProperties: { "^x-": true },
7344
+ additionalProperties: false,
7345
+ not: {
7346
+ anyOf: [
7347
+ { required: ["playlistId", "timelineId"] },
7348
+ { required: ["playlistId", "assetId"] },
7349
+ { required: ["timelineId", "assetId"] },
7350
+ { required: ["matrixCell", "playlistId"] },
7351
+ { required: ["matrixCell", "timelineId"] },
7352
+ { required: ["matrixCell", "assetId"] }
7353
+ ]
7354
+ }
7355
+ },
7356
+ seek: {
7357
+ description: "POST \u2026/seek: exactly one of position (s), marker (timeline marker id) or normalized (0..1).",
7358
+ type: "object",
7359
+ properties: {
7360
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
7361
+ marker: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7362
+ normalized: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7363
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7364
+ },
7365
+ additionalProperties: false,
7366
+ oneOf: [{ required: ["position"] }, { required: ["marker"] }, { required: ["normalized"] }]
7367
+ },
7368
+ activeShow: {
7369
+ description: "PUT /venues/{venueId}/active-show: load a show onto the venue (mapped onto its geometry); showId null unloads.",
7370
+ type: "object",
7371
+ required: ["showId"],
7372
+ properties: {
7373
+ showId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7374
+ autoplay: { type: "boolean", default: false, description: "start `show.startup` on player main" }
7375
+ },
7376
+ additionalProperties: false
7377
+ },
7378
+ activeShowState: {
7379
+ type: "object",
7380
+ required: ["venueId", "showId"],
7381
+ properties: {
7382
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7383
+ showId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7384
+ warnings: { type: "array", items: { $ref: "show.schema.json#/$defs/warning" } }
7385
+ },
7386
+ additionalProperties: false
7387
+ },
7388
+ fireCue: {
7389
+ type: "object",
7390
+ properties: {
7391
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId", description: "default = active show" }
7392
+ },
7393
+ additionalProperties: false
7394
+ },
7395
+ cueFired: {
7396
+ type: "object",
7397
+ required: ["cueId", "showId", "firedAt"],
7398
+ properties: {
7399
+ cueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7400
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7401
+ firedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7402
+ actions: {
7403
+ type: "array",
7404
+ items: {
7405
+ type: "object",
7406
+ required: ["do", "status"],
7407
+ properties: {
7408
+ do: { type: "string" },
7409
+ status: { enum: ["ok", "failed", "skipped"] },
7410
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
7411
+ },
7412
+ additionalProperties: false
7413
+ }
7414
+ }
7415
+ },
7416
+ additionalProperties: false
7417
+ },
7418
+ parameterValue: {
7419
+ description: "PUT /venues/{venueId}/parameters/{path} body.",
7420
+ type: "object",
7421
+ required: ["value"],
7422
+ properties: {
7423
+ value: { anyOf: [{ type: "number" }, { type: "boolean" }, { type: "string" }] },
7424
+ fadeSec: { type: "number", minimum: 0, maximum: 3600 }
7425
+ },
7426
+ additionalProperties: false
7427
+ },
7428
+ parameter: {
7429
+ description: "A node / layer parameter (02d ParameterService UC-N1\u2013N3; Screenberry-compatible surface).",
7430
+ type: "object",
7431
+ required: ["path", "type", "value"],
7432
+ properties: {
7433
+ path: { type: "string", pattern: "^[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+){0,15}$" },
7434
+ type: { enum: ["float", "int", "bool", "string", "enum", "colour"] },
7435
+ value: { anyOf: [{ type: "number" }, { type: "boolean" }, { type: "string" }] },
7436
+ min: { type: "number" },
7437
+ max: { type: "number" },
7438
+ unit: { type: "string" },
7439
+ values: { type: "array", items: { type: "string" }, description: "allowed values of an enum parameter" },
7440
+ readOnly: { type: "boolean" },
7441
+ description: { type: "string" }
7442
+ },
7443
+ additionalProperties: false
7444
+ },
7445
+ parameterPage: {
7446
+ type: "object",
7447
+ required: ["items", "nextCursor"],
7448
+ properties: {
7449
+ items: { type: "array", items: { $ref: "#/$defs/parameter" } },
7450
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7451
+ },
7452
+ additionalProperties: false
7453
+ }
7454
+ }
7455
+ },
7456
+ "https://freedome.nativemind.us/schemas/api/1.1/scenario-session.schema.json": {
7457
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7458
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/scenario-session.schema.json",
7459
+ $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}.",
7460
+ title: "Scenario session",
7461
+ allOf: [{ $ref: "#/$defs/session" }],
7462
+ $defs: {
7463
+ status: {
7464
+ anyOf: [
7465
+ { enum: ["starting", "running", "paused", "finished", "stopped", "failed"] },
7466
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
7467
+ ]
7468
+ },
7469
+ session: {
7470
+ type: "object",
7471
+ required: ["id", "venueId", "scenarioId", "status", "params", "startedAt"],
7472
+ properties: {
7473
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7474
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7475
+ scenarioId: { type: "string", pattern: "^[a-z][a-z0-9_]{0,63}$" },
7476
+ scenarioVersion: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7477
+ status: { $ref: "#/$defs/status" },
7478
+ params: { type: "object" },
7479
+ owner: { type: "string", description: "principal that started it (the session runs with its role)" },
7480
+ progress: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7481
+ phase: { type: "string" },
7482
+ message: { type: "string" },
7483
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
7484
+ startedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7485
+ endedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7486
+ },
7487
+ patternProperties: { "^x-": true },
7488
+ additionalProperties: false,
7489
+ allOf: [
7490
+ {
7491
+ if: { properties: { status: { const: "failed" } }, required: ["status"] },
7492
+ then: { required: ["problem"] }
7493
+ }
7494
+ ]
7495
+ },
7496
+ start: {
7497
+ description: "POST /venues/{venueId}/scenario-sessions (UC-SC2); params are validated against the scenario's paramsSchema (422).",
7498
+ type: "object",
7499
+ required: ["scenarioId"],
7500
+ properties: {
7501
+ scenarioId: { type: "string", pattern: "^[a-z][a-z0-9_]{0,63}$" },
7502
+ params: { type: "object", default: {} },
7503
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7504
+ },
7505
+ additionalProperties: false
7506
+ },
7507
+ page: {
7508
+ type: "object",
7509
+ required: ["items", "nextCursor"],
7510
+ properties: {
7511
+ items: { type: "array", items: { $ref: "#/$defs/session" } },
7512
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7513
+ },
7514
+ additionalProperties: false
7515
+ },
7516
+ logEntry: {
7517
+ type: "object",
7518
+ required: ["seq", "ts", "level", "message"],
7519
+ properties: {
7520
+ seq: { type: "integer", minimum: 0 },
7521
+ ts: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7522
+ level: { enum: ["debug", "info", "warn", "error"] },
7523
+ message: { type: "string" },
7524
+ fields: { type: "object", additionalProperties: true }
7525
+ },
7526
+ additionalProperties: false
7527
+ },
7528
+ logPage: {
7529
+ type: "object",
7530
+ required: ["items", "nextCursor"],
7531
+ properties: {
7532
+ items: { type: "array", items: { $ref: "#/$defs/logEntry" } },
7533
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7534
+ },
7535
+ additionalProperties: false
7536
+ }
7537
+ }
7538
+ },
7539
+ "https://freedome.nativemind.us/schemas/api/1.1/scenario.schema.json": {
7540
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7541
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/scenario.schema.json",
7542
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Installed L6 scenario plugin (02d \xA74a ScenarioManifest, UC-SC1 / SC5; RC5). Root = GET /scenarios/{scenarioId}.",
7543
+ title: "Scenario",
7544
+ allOf: [{ $ref: "#/$defs/scenario" }],
7545
+ $defs: {
7546
+ capability: {
7547
+ anyOf: [
7548
+ {
7549
+ enum: [
7550
+ "playback",
7551
+ "parameters",
7552
+ "audioDigital",
7553
+ "audioHybrid",
7554
+ "cues",
7555
+ "timers",
7556
+ "events",
7557
+ "storage",
7558
+ "http"
7559
+ ]
7560
+ },
7561
+ { type: "string", pattern: "^[a-z][A-Za-z0-9]{0,31}$" }
7562
+ ]
7563
+ },
7564
+ scenario: {
7565
+ type: "object",
7566
+ required: ["id", "version", "api", "title", "enabled", "paramsSchema", "capabilities"],
7567
+ properties: {
7568
+ id: { type: "string", pattern: "^[a-z][a-z0-9_]{0,63}$" },
7569
+ version: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7570
+ api: {
7571
+ type: "string",
7572
+ pattern: "^[0-9]+\\.[0-9]+$",
7573
+ description: "freedome-scenario-api major.minor the plugin is built against"
7574
+ },
7575
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
7576
+ description: { $ref: "../../common/1.0/i18n-text.schema.json" },
7577
+ enabled: { type: "boolean" },
7578
+ paramsSchema: {
7579
+ type: "object",
7580
+ description: "JSON Schema of the start parameters (Manager renders the form)"
7581
+ },
7582
+ capabilities: { type: "array", items: { $ref: "#/$defs/capability" }, uniqueItems: true },
7583
+ minRole: { $ref: "auth.schema.json#/$defs/role" },
7584
+ sessions: { type: "integer", minimum: 0, description: "running sessions" }
7585
+ },
7586
+ patternProperties: { "^x-": true },
7587
+ additionalProperties: false
7588
+ },
7589
+ patch: {
7590
+ description: "PATCH /scenarios/{scenarioId} (admin, UC-SC5).",
7591
+ type: "object",
7592
+ required: ["enabled"],
7593
+ properties: { enabled: { type: "boolean" } },
7594
+ additionalProperties: false
7595
+ },
7596
+ page: {
7597
+ type: "object",
7598
+ required: ["items", "nextCursor"],
7599
+ properties: {
7600
+ items: { type: "array", items: { $ref: "#/$defs/scenario" } },
7601
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7602
+ },
7603
+ additionalProperties: false
7604
+ }
7605
+ }
7606
+ },
7607
+ "https://freedome.nativemind.us/schemas/api/1.1/show.schema.json": {
7608
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7609
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/show.schema.json",
7610
+ $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.",
7611
+ title: "Show",
7612
+ allOf: [{ $ref: "#/$defs/show" }],
7613
+ $defs: {
7614
+ show: {
7615
+ type: "object",
7616
+ allOf: [{ $ref: "#/$defs/body" }],
7617
+ required: ["id", "revision", "meta", "assets", "show"],
7618
+ properties: {
7619
+ id: {
7620
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
7621
+ description: "show id (= meta.id for shows created from a .dome)"
7622
+ },
7623
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7624
+ status: {
7625
+ anyOf: [{ enum: ["ready", "incomplete", "invalid"] }, { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }],
7626
+ description: "incomplete = referenced assets not ready yet"
7627
+ },
7628
+ warnings: {
7629
+ type: "array",
7630
+ items: { $ref: "#/$defs/warning" },
7631
+ description: "UC-S6 validation against the active venue (remapping, missing assets)"
7632
+ },
7633
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7634
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7635
+ },
7636
+ unevaluatedProperties: false
7637
+ },
7638
+ body: {
7639
+ description: "Show content shared by GET / PUT / POST: the .dome show sections.",
7640
+ type: "object",
7641
+ properties: {
7642
+ meta: { $ref: "../../dome/1.1/dome.schema.json#/$defs/meta" },
7643
+ assets: { type: "array", items: { $ref: "../../dome/1.1/dome.schema.json#/$defs/asset" } },
7644
+ show: { $ref: "../../dome/1.1/dome.schema.json#/$defs/show" },
7645
+ compat: { $ref: "../../dome/1.1/dome.schema.json#/$defs/compat" }
7646
+ },
7647
+ patternProperties: { "^x-": true }
7648
+ },
7649
+ input: {
7650
+ 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.",
7651
+ type: "object",
7652
+ allOf: [{ $ref: "#/$defs/body" }],
7653
+ required: ["meta", "assets", "show"],
7654
+ unevaluatedProperties: false
7655
+ },
7656
+ patch: {
7657
+ description: "PATCH /shows/{showId} (application/merge-patch+json): any subset of the sections; arrays are replaced whole (RFC 7396).",
7658
+ type: "object",
7659
+ minProperties: 1,
7660
+ properties: {
7661
+ meta: { type: "object" },
7662
+ assets: { type: "array", items: { $ref: "../../dome/1.1/dome.schema.json#/$defs/asset" } },
7663
+ show: { type: "object" },
7664
+ compat: { anyOf: [{ type: "object" }, { type: "null" }] }
7665
+ },
7666
+ patternProperties: { "^x-": true },
7667
+ additionalProperties: false
7668
+ },
7669
+ warning: {
7670
+ type: "object",
7671
+ required: ["code", "detail"],
7672
+ properties: {
7673
+ code: { type: "string", pattern: "^[a-z][a-z0-9-]{0,63}$" },
7674
+ detail: { type: "string" },
7675
+ pointer: { type: "string" }
7676
+ },
7677
+ additionalProperties: false
7678
+ },
7679
+ page: {
7680
+ type: "object",
7681
+ required: ["items", "nextCursor"],
7682
+ properties: {
7683
+ items: { type: "array", items: { $ref: "#/$defs/summary" } },
7684
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
7685
+ count: { type: "integer", minimum: 0 }
7686
+ },
7687
+ additionalProperties: false
7688
+ },
7689
+ summary: {
7690
+ description: "Collection item: no assets / show body.",
7691
+ type: "object",
7692
+ required: ["id", "revision", "meta"],
7693
+ properties: {
7694
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7695
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7696
+ meta: { $ref: "../../dome/1.1/dome.schema.json#/$defs/meta" },
7697
+ status: { type: "string" },
7698
+ assetCount: { type: "integer", minimum: 0 },
7699
+ duration: { $ref: "../../common/1.0/units.schema.json#/$defs/seconds" },
7700
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7701
+ },
7702
+ patternProperties: { "^x-": true },
7703
+ additionalProperties: false
7704
+ }
7705
+ }
7706
+ },
7707
+ "https://freedome.nativemind.us/schemas/api/1.1/system.schema.json": {
7708
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7709
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/system.schema.json",
7710
+ $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.",
7711
+ title: "System status",
7712
+ type: "object",
7713
+ required: ["host", "uptimeSec", "versions"],
7714
+ properties: {
7715
+ host: {
7716
+ type: "object",
7717
+ required: ["hostname", "os", "arch"],
7718
+ properties: {
7719
+ hostname: { type: "string" },
7720
+ os: { type: "string", description: "e.g. Debian 12, Astra Linux 1.8, Windows 11, macOS 15" },
7721
+ kernel: { type: "string" },
7722
+ arch: {
7723
+ anyOf: [{ enum: ["x86_64", "aarch64", "riscv64", "loongarch64", "e2k", "mips64el"] }, { type: "string" }]
7724
+ },
7725
+ cpu: {
7726
+ type: "object",
7727
+ properties: {
7728
+ model: { type: "string" },
7729
+ cores: { type: "integer", minimum: 1 },
7730
+ loadPercent: { type: "number", minimum: 0 }
7731
+ },
7732
+ additionalProperties: true
7733
+ },
7734
+ memory: {
7735
+ type: "object",
7736
+ properties: { totalBytes: { type: "integer", minimum: 0 }, usedBytes: { type: "integer", minimum: 0 } },
7737
+ additionalProperties: true
7738
+ },
7739
+ gpus: {
7740
+ type: "array",
7741
+ items: {
7742
+ type: "object",
7743
+ properties: {
7744
+ name: { type: "string" },
7745
+ driver: { type: "string" },
7746
+ loadPercent: { type: "number", minimum: 0 },
7747
+ memoryBytes: { type: "integer", minimum: 0 }
7748
+ },
7749
+ additionalProperties: true
7750
+ }
7751
+ }
7752
+ },
7753
+ additionalProperties: true
7754
+ },
7755
+ temperatures: {
7756
+ description: "Sensor name \u2192 \xB0C (replaces /api/system/temperature).",
7757
+ type: "object",
7758
+ additionalProperties: { type: "number" }
7759
+ },
7760
+ disks: {
7761
+ type: "array",
7762
+ items: {
7763
+ type: "object",
7764
+ required: ["mount", "totalBytes", "freeBytes"],
7765
+ properties: {
7766
+ mount: { type: "string" },
7767
+ totalBytes: { type: "integer", minimum: 0 },
7768
+ freeBytes: { type: "integer", minimum: 0 }
7769
+ },
7770
+ additionalProperties: false
7771
+ }
7772
+ },
7773
+ uptimeSec: { type: "number", minimum: 0 },
7774
+ serviceUptimeSec: { type: "number", minimum: 0 },
7775
+ versions: {
7776
+ description: "Component \u2192 version (server, contract, engines, OS packages).",
7777
+ type: "object",
7778
+ additionalProperties: { type: "string" }
7779
+ }
7780
+ },
7781
+ patternProperties: { "^x-": true },
7782
+ additionalProperties: false,
7783
+ $defs: {
7784
+ logLevel: { enum: ["trace", "debug", "info", "warn", "error"] },
7785
+ logEntry: {
7786
+ type: "object",
7787
+ required: ["ts", "level", "message"],
7788
+ properties: {
7789
+ seq: { type: "integer", minimum: 0 },
7790
+ ts: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7791
+ level: { $ref: "#/$defs/logLevel" },
7792
+ target: { type: "string", description: "module / component" },
7793
+ message: { type: "string" },
7794
+ fields: { type: "object", additionalProperties: true },
7795
+ traceId: { type: "string" }
7796
+ },
7797
+ additionalProperties: false
7798
+ },
7799
+ logPage: {
7800
+ type: "object",
7801
+ required: ["items", "nextCursor"],
7802
+ properties: {
7803
+ items: { type: "array", items: { $ref: "#/$defs/logEntry" } },
7804
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7805
+ },
7806
+ additionalProperties: false
7807
+ },
7808
+ config: {
7809
+ 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).',
7810
+ type: "object",
7811
+ required: ["revision", "values"],
7812
+ properties: {
7813
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7814
+ values: { type: "object", additionalProperties: true },
7815
+ redacted: {
7816
+ type: "array",
7817
+ items: { type: "string" },
7818
+ description: "JSON pointers of redacted secret values"
7819
+ },
7820
+ restartRequired: {
7821
+ type: "array",
7822
+ items: { type: "string" },
7823
+ description: "pointers whose change takes effect only after a restart"
7824
+ }
7825
+ },
7826
+ additionalProperties: false
7827
+ },
7828
+ configInput: {
7829
+ description: "PUT /system/config body (If-Match = config revision).",
7830
+ type: "object",
7831
+ required: ["values"],
7832
+ properties: { values: { type: "object", additionalProperties: true } },
7833
+ additionalProperties: false
7834
+ },
7835
+ diagnosticsRequest: {
7836
+ type: "object",
7837
+ properties: {
7838
+ checks: {
7839
+ type: "array",
7840
+ items: {
7841
+ anyOf: [
7842
+ { enum: ["engines", "displays", "audio", "network", "storage", "sync", "gateways"] },
7843
+ { type: "string" }
7844
+ ]
7845
+ },
7846
+ uniqueItems: true
7847
+ }
7848
+ },
7849
+ additionalProperties: false
7850
+ },
7851
+ backupRequest: {
7852
+ type: "object",
7853
+ properties: {
7854
+ include: {
7855
+ type: "array",
7856
+ items: {
7857
+ anyOf: [{ enum: ["config", "database", "venues", "shows", "keys", "assets"] }, { type: "string" }]
7858
+ },
7859
+ uniqueItems: true
7860
+ },
7861
+ note: { type: "string", maxLength: 512 }
7862
+ },
7863
+ additionalProperties: false
7864
+ },
7865
+ restoreRequest: {
7866
+ type: "object",
7867
+ required: ["uploadId", "confirm"],
7868
+ properties: {
7869
+ uploadId: {
7870
+ $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7",
7871
+ description: "tus upload (purpose restore) holding the backup archive"
7872
+ },
7873
+ confirm: { const: true }
7874
+ },
7875
+ additionalProperties: false
7876
+ },
7877
+ updateRequest: {
7878
+ type: "object",
7879
+ properties: {
7880
+ channel: { anyOf: [{ enum: ["stable", "beta"] }, { type: "string" }] },
7881
+ version: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7882
+ uploadId: {
7883
+ $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7",
7884
+ description: "offline update package (purpose update)"
7885
+ },
7886
+ components: {
7887
+ type: "array",
7888
+ items: { type: "string" },
7889
+ uniqueItems: true,
7890
+ description: "server, engines, firmware:<deviceId> \u2026; absent = all"
7891
+ }
7892
+ },
7893
+ additionalProperties: false
7894
+ },
7895
+ updateStatus: {
7896
+ type: "object",
7897
+ required: ["status"],
7898
+ properties: {
7899
+ status: {
7900
+ anyOf: [
7901
+ { enum: ["idle", "checking", "available", "downloading", "installing", "restartPending", "failed"] },
7902
+ { type: "string" }
7903
+ ]
7904
+ },
7905
+ current: { type: "object", additionalProperties: { type: "string" } },
7906
+ available: { type: "object", additionalProperties: { type: "string" } },
7907
+ jobId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7908
+ checkedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7909
+ },
7910
+ additionalProperties: false
7911
+ },
7912
+ power: {
7913
+ description: "POST /system/reboot and /system/shutdown body.",
7914
+ type: "object",
7915
+ required: ["confirm"],
7916
+ properties: {
7917
+ confirm: { const: true },
7918
+ delaySec: { type: "integer", minimum: 0, maximum: 3600, default: 5 },
7919
+ reason: { type: "string", maxLength: 256 }
7920
+ },
7921
+ additionalProperties: false
7922
+ },
7923
+ powerAccepted: {
7924
+ type: "object",
7925
+ required: ["action", "at"],
7926
+ properties: {
7927
+ action: { enum: ["reboot", "shutdown"] },
7928
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7929
+ },
7930
+ additionalProperties: false
7931
+ },
7932
+ clock: {
7933
+ description: "Clock status of a node (02d ClockStatus).",
7934
+ type: "object",
7935
+ required: ["source", "locked"],
7936
+ properties: {
7937
+ source: { anyOf: [{ enum: ["ptp", "ntp", "local"] }, { type: "string" }] },
7938
+ offsetMs: { type: "number" },
7939
+ jitterMs: { type: "number", minimum: 0 },
7940
+ masterId: { type: "string" },
7941
+ locked: { type: "boolean" }
7942
+ },
7943
+ additionalProperties: false
7944
+ },
7945
+ node: {
7946
+ description: "Cluster node (02d UC-K1\u2013K3): this server and the engine hosts it drives.",
7947
+ type: "object",
7948
+ required: ["id", "role", "status"],
7949
+ properties: {
7950
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7951
+ name: { type: "string" },
7952
+ role: { anyOf: [{ enum: ["primary", "engine", "peer"] }, { type: "string" }] },
7953
+ status: { anyOf: [{ enum: ["up", "degraded", "down"] }, { type: "string" }] },
7954
+ address: { type: "string" },
7955
+ engines: { type: "array", items: { type: "string" } },
7956
+ clock: { $ref: "#/$defs/clock" },
7957
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7958
+ },
7959
+ patternProperties: { "^x-": true },
7960
+ additionalProperties: false
7961
+ },
7962
+ nodePage: {
7963
+ type: "object",
7964
+ required: ["items", "nextCursor"],
7965
+ properties: {
7966
+ items: { type: "array", items: { $ref: "#/$defs/node" } },
7967
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7968
+ },
7969
+ additionalProperties: false
7970
+ }
7971
+ }
7972
+ },
7973
+ "https://freedome.nativemind.us/schemas/api/1.1/upload.schema.json": {
7974
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7975
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/upload.schema.json",
7976
+ $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.",
7977
+ title: "Upload",
7978
+ type: "object",
7979
+ required: ["id", "length", "offset", "status", "metadata", "createdAt"],
7980
+ properties: {
7981
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7982
+ length: { type: "integer", minimum: 0, description: "Upload-Length" },
7983
+ offset: { type: "integer", minimum: 0, description: "Upload-Offset (bytes received and persisted)" },
7984
+ status: {
7985
+ anyOf: [
7986
+ { enum: ["uploading", "complete", "failed", "expired"] },
7987
+ { type: "string", pattern: "^[a-z_]{1,32}$" }
7988
+ ]
7989
+ },
7990
+ metadata: { $ref: "#/$defs/metadata" },
7991
+ assetId: {
7992
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
7993
+ description: "asset created / updated on completion (purpose asset)"
7994
+ },
7995
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
7996
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7997
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7998
+ links: {
7999
+ type: "object",
8000
+ properties: {
8001
+ self: { type: "string", format: "uri-reference" },
8002
+ asset: { type: "string", format: "uri-reference" }
8003
+ },
8004
+ additionalProperties: false
8005
+ }
8006
+ },
8007
+ additionalProperties: false,
8008
+ $defs: {
8009
+ metadata: {
8010
+ description: "Upload-Metadata (tus: comma-separated `key base64(value)` pairs), decoded.",
8011
+ type: "object",
8012
+ required: ["filename", "purpose"],
8013
+ properties: {
8014
+ filename: { type: "string", minLength: 1, maxLength: 512 },
8015
+ contentType: { $ref: "../../common/1.0/units.schema.json#/$defs/mediaType" },
8016
+ sha256: {
8017
+ $ref: "../../common/1.0/ids.schema.json#/$defs/sha256",
8018
+ description: "digest of the whole file, verified on completion (upload-checksum-mismatch)"
8019
+ },
8020
+ purpose: {
8021
+ anyOf: [
8022
+ { enum: ["asset", "import", "restore", "capture", "update"] },
8023
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
8024
+ ]
8025
+ },
8026
+ assetId: {
8027
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
8028
+ description: "purpose asset: create the asset with this id (or replace the content of an existing one)"
8029
+ }
8030
+ },
8031
+ additionalProperties: true
8032
+ },
8033
+ capabilities: {
8034
+ description: "Informative mirror of the OPTIONS /uploads headers (Tus-Version, Tus-Extension, Tus-Max-Size, Tus-Checksum-Algorithm).",
8035
+ type: "object",
8036
+ required: ["version", "extensions"],
8037
+ properties: {
8038
+ version: { type: "array", items: { type: "string" } },
8039
+ extensions: {
8040
+ type: "array",
8041
+ items: {
8042
+ anyOf: [
8043
+ { enum: ["creation", "creation-with-upload", "termination", "checksum", "expiration"] },
8044
+ { type: "string" }
8045
+ ]
8046
+ }
8047
+ },
8048
+ maxSize: { type: "integer", minimum: 0 },
8049
+ checksumAlgorithms: { type: "array", items: { type: "string" } },
8050
+ maxChunkBytes: {
8051
+ type: "integer",
8052
+ minimum: 1,
8053
+ description: "server-recommended PATCH size (\u2264 95 MB behind Cloudflare)"
8054
+ }
8055
+ },
8056
+ additionalProperties: false
8057
+ }
8058
+ }
8059
+ },
8060
+ "https://freedome.nativemind.us/schemas/api/1.1/user.schema.json": {
8061
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8062
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/user.schema.json",
8063
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Local user account of a media server (02e \xA75.1 /users, scope users:manage). Root = GET representation.",
8064
+ title: "User",
8065
+ allOf: [{ $ref: "#/$defs/user" }],
8066
+ $defs: {
8067
+ user: {
8068
+ type: "object",
8069
+ required: ["id", "username", "role", "revision", "createdAt"],
8070
+ properties: {
8071
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
8072
+ username: { $ref: "#/$defs/username" },
8073
+ displayName: { type: "string", maxLength: 128 },
8074
+ role: { $ref: "auth.schema.json#/$defs/role" },
8075
+ disabled: { type: "boolean" },
8076
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
8077
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
8078
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
8079
+ lastLoginAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
8080
+ },
8081
+ patternProperties: { "^x-": true },
8082
+ additionalProperties: false
8083
+ },
8084
+ username: { type: "string", pattern: "^[a-z0-9][a-z0-9._-]{1,63}$" },
8085
+ input: {
8086
+ description: "POST /users.",
8087
+ type: "object",
8088
+ required: ["username", "password", "role"],
8089
+ properties: {
8090
+ username: { $ref: "#/$defs/username" },
8091
+ displayName: { type: "string", maxLength: 128 },
8092
+ password: { type: "string", minLength: 12, maxLength: 1024, writeOnly: true },
8093
+ role: { $ref: "auth.schema.json#/$defs/role" },
8094
+ disabled: { type: "boolean" }
8095
+ },
8096
+ additionalProperties: false
8097
+ },
8098
+ patch: {
8099
+ description: "PATCH /users/{userId} (merge-patch). Changing the password revokes the user's sessions.",
8100
+ type: "object",
8101
+ minProperties: 1,
8102
+ properties: {
8103
+ displayName: { type: "string", maxLength: 128 },
8104
+ password: { type: "string", minLength: 12, maxLength: 1024, writeOnly: true },
8105
+ role: { $ref: "auth.schema.json#/$defs/role" },
8106
+ disabled: { type: "boolean" }
8107
+ },
8108
+ additionalProperties: false
8109
+ },
8110
+ page: {
8111
+ type: "object",
8112
+ required: ["items", "nextCursor"],
8113
+ properties: {
8114
+ items: { type: "array", items: { $ref: "#/$defs/user" } },
8115
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
8116
+ count: { type: "integer", minimum: 0 }
8117
+ },
8118
+ additionalProperties: false
8119
+ }
8120
+ }
8121
+ },
8122
+ "https://freedome.nativemind.us/schemas/api/1.1/venue.schema.json": {
8123
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8124
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/venue.schema.json",
8125
+ $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.",
8126
+ title: "Venue",
8127
+ allOf: [{ $ref: "#/$defs/venue" }],
8128
+ $defs: {
8129
+ venue: {
8130
+ type: "object",
8131
+ allOf: [{ $ref: "#/$defs/body" }],
8132
+ required: ["id", "revision", "status", "meta", "dome", "displays"],
8133
+ properties: {
8134
+ id: {
8135
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
8136
+ description: "venue id (= meta.id for venues created from a .dome)"
8137
+ },
8138
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
8139
+ status: {
8140
+ anyOf: [
8141
+ { enum: ["idle", "loading", "ready", "playing", "degraded", "error"] },
8142
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
8143
+ ]
8144
+ },
8145
+ default: { type: "boolean", description: "true for the venue the alias `default` resolves to" },
8146
+ activeShowId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
8147
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
8148
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
8149
+ },
8150
+ unevaluatedProperties: false
8151
+ },
8152
+ body: {
8153
+ description: "Venue content shared by GET / PUT / POST: the .dome venue sections.",
8154
+ type: "object",
8155
+ properties: {
8156
+ meta: { $ref: "../../dome/1.1/dome.schema.json#/$defs/meta" },
8157
+ dome: { $ref: "../../dome/1.1/dome.schema.json#/$defs/dome" },
8158
+ displays: { type: "array", items: { $ref: "../../dome/1.1/dome.schema.json#/$defs/display" } },
8159
+ calibration: { $ref: "../../dome/1.1/dome.schema.json#/$defs/calibration" },
8160
+ audio: { $ref: "../../dome/1.1/dome.schema.json#/$defs/audio" },
8161
+ compat: { $ref: "../../dome/1.1/dome.schema.json#/$defs/compat" }
8162
+ },
8163
+ patternProperties: { "^x-": true }
8164
+ },
8165
+ input: {
8166
+ description: "POST /venues and PUT /venues/{venueId} body.",
8167
+ type: "object",
8168
+ allOf: [{ $ref: "#/$defs/body" }],
8169
+ required: ["meta", "dome", "displays"],
8170
+ unevaluatedProperties: false
8171
+ },
8172
+ patch: {
8173
+ description: "PATCH body (application/merge-patch+json, RFC 7396) over the venue sections; the merged result must be a valid input.",
8174
+ type: "object",
8175
+ minProperties: 1,
8176
+ propertyNames: { pattern: "^(meta|dome|displays|calibration|audio|compat|x-.+)$" }
8177
+ },
8178
+ page: {
8179
+ description: "GET /venues page.",
8180
+ type: "object",
8181
+ allOf: [{ $ref: "../../common/1.0/pagination.schema.json" }],
8182
+ properties: { items: { type: "array", items: { $ref: "#/$defs/venue" } } }
8183
+ }
8184
+ }
8185
+ },
8186
+ "https://freedome.nativemind.us/schemas/api/1.1/ws-messages.schema.json": {
8187
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8188
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/ws-messages.schema.json",
8189
+ $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.",
8190
+ title: "WebSocket messages (freedome.v1)",
8191
+ oneOf: [
8192
+ { $ref: "#/$defs/hello" },
8193
+ { $ref: "#/$defs/welcome" },
8194
+ { $ref: "#/$defs/subscribe" },
8195
+ { $ref: "#/$defs/unsubscribe" },
8196
+ { $ref: "#/$defs/call" },
8197
+ { $ref: "#/$defs/result" },
8198
+ { $ref: "#/$defs/error" },
8199
+ { $ref: "#/$defs/event" },
8200
+ { $ref: "#/$defs/resync" },
8201
+ { $ref: "#/$defs/ping" },
8202
+ { $ref: "#/$defs/pong" },
8203
+ { $ref: "#/$defs/bye" }
8204
+ ],
8205
+ $defs: {
8206
+ helloData: {
8207
+ type: "object",
8208
+ required: ["app"],
8209
+ properties: {
8210
+ token: {
8211
+ type: "string",
8212
+ description: "access JWT or fdk_ key (or Authorization header / ?access_token= for browsers)"
8213
+ },
8214
+ app: { type: "string", minLength: 1 },
8215
+ appVersion: { type: "string" },
8216
+ sdk: { type: "string", examples: ["freedome_client/1.0.0"] },
8217
+ resume: {
8218
+ type: "object",
8219
+ required: ["sinceSeq"],
8220
+ properties: { sinceSeq: { type: "integer", minimum: 0 } },
8221
+ patternProperties: { "^x-": true },
8222
+ additionalProperties: false
8223
+ }
8224
+ },
8225
+ patternProperties: { "^x-": true },
8226
+ additionalProperties: false
8227
+ },
8228
+ welcomeData: {
8229
+ type: "object",
8230
+ required: ["sessionId", "server", "scopes", "heartbeatSec"],
8231
+ properties: {
8232
+ sessionId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
8233
+ server: { $ref: "info.schema.json" },
8234
+ scopes: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/scope" } },
8235
+ heartbeatSec: { type: "integer", minimum: 1, default: 20 },
8236
+ maxMessageBytes: { type: "integer", minimum: 1024, default: 1048576 }
8237
+ },
8238
+ patternProperties: { "^x-": true },
8239
+ additionalProperties: false
8240
+ },
8241
+ subscribeData: {
8242
+ type: "object",
8243
+ required: ["topics"],
8244
+ properties: {
8245
+ topics: {
8246
+ type: "array",
8247
+ minItems: 1,
8248
+ maxItems: 256,
8249
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" }
8250
+ },
8251
+ sinceSeq: { type: "integer", minimum: 0 },
8252
+ options: {
8253
+ type: "object",
8254
+ properties: {
8255
+ positionHz: {
8256
+ type: "number",
8257
+ exclusiveMinimum: 0,
8258
+ maximum: 30,
8259
+ description: "player.position rate (default 4)"
8260
+ },
8261
+ analysisHz: {
8262
+ type: "number",
8263
+ exclusiveMinimum: 0,
8264
+ maximum: 60,
8265
+ description: "audio.analysis rate (default 15); the server sends the newest frame"
8266
+ }
8267
+ },
8268
+ patternProperties: { "^x-": true },
8269
+ additionalProperties: false
8270
+ }
8271
+ },
8272
+ patternProperties: { "^x-": true },
8273
+ additionalProperties: false
8274
+ },
8275
+ unsubscribeData: {
8276
+ type: "object",
8277
+ required: ["topics"],
8278
+ properties: {
8279
+ topics: {
8280
+ type: "array",
8281
+ minItems: 1,
8282
+ maxItems: 256,
8283
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" }
8284
+ }
8285
+ },
8286
+ patternProperties: { "^x-": true },
8287
+ additionalProperties: false
8288
+ },
8289
+ subscribeResult: {
8290
+ description: "`result.body` of subscribe / unsubscribe: accepted filters + denied ones with a problem (no leak of existence).",
8291
+ type: "object",
8292
+ required: ["topics"],
8293
+ properties: {
8294
+ topics: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" } },
8295
+ denied: {
8296
+ type: "array",
8297
+ items: {
8298
+ type: "object",
8299
+ required: ["topic", "problem"],
8300
+ properties: {
8301
+ topic: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" },
8302
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
8303
+ },
8304
+ patternProperties: { "^x-": true },
8305
+ additionalProperties: false
8306
+ }
8307
+ }
8308
+ },
8309
+ patternProperties: { "^x-": true },
8310
+ additionalProperties: false
8311
+ },
8312
+ resultData: {
8313
+ type: "object",
8314
+ required: ["status"],
8315
+ properties: {
8316
+ status: {
8317
+ type: "integer",
8318
+ minimum: 100,
8319
+ maximum: 599,
8320
+ description: "HTTP status of the equivalent REST call"
8321
+ },
8322
+ etag: { type: "string" },
8323
+ body: { description: "REST response body of the operation (absent for 204)" }
8324
+ },
8325
+ patternProperties: { "^x-": true },
8326
+ additionalProperties: false
8327
+ },
8328
+ resyncData: {
8329
+ description: "Client must re-read state via REST / GraphQL for these topics.",
8330
+ type: "object",
8331
+ required: ["topics", "reason"],
8332
+ properties: {
8333
+ topics: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" } },
8334
+ reason: { anyOf: [{ enum: ["gap-too-old", "server-restart", "overflow"] }, { type: "string" }] }
8335
+ },
8336
+ patternProperties: { "^x-": true },
8337
+ additionalProperties: false
8338
+ },
8339
+ emptyData: { type: "object", maxProperties: 0 },
8340
+ byeData: {
8341
+ type: "object",
8342
+ required: ["reason"],
8343
+ properties: {
8344
+ reason: { type: "string" },
8345
+ code: {
8346
+ type: "integer",
8347
+ description: "WebSocket close code that follows: 4401 unauthenticated, 4403 forbidden, 4408 heartbeat timeout, 4409 superseded, 4413 message too large, 1012 restart"
8348
+ }
8349
+ },
8350
+ patternProperties: { "^x-": true },
8351
+ additionalProperties: false
8352
+ },
8353
+ hello: {
8354
+ description: "C\u2192S first message.",
8355
+ type: "object",
8356
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8357
+ required: ["type", "id", "ts", "data"],
8358
+ properties: { type: { const: "hello" }, data: { $ref: "#/$defs/helloData" } }
8359
+ },
8360
+ welcome: {
8361
+ description: "S\u2192C answer to hello.",
8362
+ type: "object",
8363
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8364
+ required: ["type", "id", "ts", "data", "replyTo"],
8365
+ properties: { type: { const: "welcome" }, data: { $ref: "#/$defs/welcomeData" } }
8366
+ },
8367
+ subscribe: {
8368
+ description: "C\u2192S; answered by result (subscribeResult).",
8369
+ type: "object",
8370
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8371
+ required: ["type", "id", "ts", "data"],
8372
+ properties: { type: { const: "subscribe" }, data: { $ref: "#/$defs/subscribeData" } }
8373
+ },
8374
+ unsubscribe: {
8375
+ description: "C\u2192S; answered by result.",
8376
+ type: "object",
8377
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8378
+ required: ["type", "id", "ts", "data"],
8379
+ properties: { type: { const: "unsubscribe" }, data: { $ref: "#/$defs/unsubscribeData" } }
8380
+ },
8381
+ call: {
8382
+ description: "C\u2192S operation call (`op` = OpenAPI operationId; envelope id = idempotency key).",
8383
+ type: "object",
8384
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8385
+ required: ["type", "id", "ts", "data"],
8386
+ properties: {
8387
+ type: { const: "call" },
8388
+ data: { $ref: "../../common/1.0/envelope.schema.json#/$defs/callData" }
8389
+ }
8390
+ },
8391
+ result: {
8392
+ description: "S\u2192C reply to subscribe / unsubscribe / call.",
8393
+ type: "object",
8394
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8395
+ required: ["type", "id", "ts", "data", "replyTo"],
8396
+ properties: { type: { const: "result" }, data: { $ref: "#/$defs/resultData" } }
8397
+ },
8398
+ error: {
8399
+ description: "S\u2192C problem reply (replyTo set when answering a message).",
8400
+ type: "object",
8401
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8402
+ required: ["type", "id", "ts", "data"],
8403
+ properties: { type: { const: "error" }, data: { $ref: "../../common/1.0/problem.schema.json" } }
8404
+ },
8405
+ event: {
8406
+ description: "S\u2192C event (02e \xA77.1).",
8407
+ type: "object",
8408
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8409
+ required: ["type", "id", "ts", "data", "topic"],
8410
+ properties: { type: { const: "event" }, data: { $ref: "event-kinds.schema.json" } }
8411
+ },
8412
+ resync: {
8413
+ description: "S\u2192C: resume gap too old.",
8414
+ type: "object",
8415
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8416
+ required: ["type", "id", "ts", "data"],
8417
+ properties: { type: { const: "resync" }, data: { $ref: "#/$defs/resyncData" } }
8418
+ },
8419
+ ping: {
8420
+ description: "Either side; 2 missed heartbeats \u2192 close 4408.",
8421
+ type: "object",
8422
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8423
+ required: ["type", "id", "ts", "data"],
8424
+ properties: { type: { const: "ping" }, data: { $ref: "#/$defs/emptyData" } }
8425
+ },
8426
+ pong: {
8427
+ description: "Reply to ping.",
8428
+ type: "object",
8429
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8430
+ required: ["type", "id", "ts", "data", "replyTo"],
8431
+ properties: { type: { const: "pong" }, data: { $ref: "#/$defs/emptyData" } }
8432
+ },
8433
+ bye: {
8434
+ description: "S\u2192C before closing.",
8435
+ type: "object",
8436
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8437
+ required: ["type", "id", "ts", "data"],
8438
+ properties: { type: { const: "bye" }, data: { $ref: "#/$defs/byeData" } }
8439
+ },
8440
+ eventPage: {
8441
+ 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.",
8442
+ type: "object",
8443
+ required: ["items", "nextCursor"],
8444
+ properties: {
8445
+ items: { type: "array", items: { $ref: "#/$defs/event" } },
8446
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
8447
+ lastSeq: { type: "integer", minimum: 0 },
8448
+ resync: { type: "boolean" }
8449
+ },
8450
+ additionalProperties: false
8451
+ },
8452
+ socketioAck: {
8453
+ 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).",
8454
+ type: "array",
8455
+ minItems: 2,
8456
+ maxItems: 2,
8457
+ prefixItems: [
8458
+ { anyOf: [{ $ref: "../../common/1.0/problem.schema.json" }, { type: "null" }] },
8459
+ { anyOf: [{ $ref: "#/$defs/resultData" }, { type: "null" }] }
8460
+ ],
8461
+ items: false
8462
+ },
8463
+ socketioCall: {
8464
+ description: "socket.io `call` payload = WS call data (02e \xA78.2).",
8465
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json#/$defs/callData" }]
8466
+ }
8467
+ }
8468
+ },
4321
8469
  "https://freedome.nativemind.us/schemas/boranko/1.0/boranko.schema.json": {
4322
8470
  $schema: "https://json-schema.org/draft/2020-12/schema",
4323
8471
  $id: "https://freedome.nativemind.us/schemas/boranko/1.0/boranko.schema.json",
@@ -7880,6 +12028,448 @@ var schemaBundle = {
7880
12028
  patternProperties: { "^x-": true },
7881
12029
  additionalProperties: false
7882
12030
  },
12031
+ "https://freedome.nativemind.us/schemas/mcp/1.0/dossier.schema.json": {
12032
+ $schema: "https://json-schema.org/draft/2020-12/schema",
12033
+ $id: "https://freedome.nativemind.us/schemas/mcp/1.0/dossier.schema.json",
12034
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). The dossier of a venue project and the shapes around it (flows/sdd-freedome-mcp 02 Data Models). Text in a dossier is data from a client: never instructions.",
12035
+ title: "Dossier",
12036
+ $ref: "#/$defs/dossier",
12037
+ $defs: {
12038
+ range: {
12039
+ type: "object",
12040
+ required: ["low", "high"],
12041
+ additionalProperties: false,
12042
+ properties: { low: { type: "number" }, high: { type: "number" } }
12043
+ },
12044
+ estimate: {
12045
+ type: "object",
12046
+ description: "Every figure of the planner. `isEstimate` is always true: nothing here was measured.",
12047
+ required: ["value", "unit", "range", "assumptions", "isEstimate", "rule"],
12048
+ additionalProperties: false,
12049
+ properties: {
12050
+ value: { type: "number" },
12051
+ unit: { type: "string" },
12052
+ range: { $ref: "#/$defs/range" },
12053
+ assumptions: { type: "array", minItems: 1, items: { type: "string" } },
12054
+ isEstimate: { const: true },
12055
+ rule: {
12056
+ type: "object",
12057
+ required: ["id", "version", "status", "source"],
12058
+ additionalProperties: false,
12059
+ properties: {
12060
+ id: { type: "string" },
12061
+ version: { type: "integer", minimum: 1 },
12062
+ status: { enum: ["geometry", "ours", "ours-tbv", "unverified"] },
12063
+ source: { type: "string" }
12064
+ }
12065
+ }
12066
+ }
12067
+ },
12068
+ checkItem: {
12069
+ type: "object",
12070
+ required: ["id", "done"],
12071
+ additionalProperties: false,
12072
+ properties: { id: { type: "string" }, done: { type: "boolean" }, note: { type: "string", maxLength: 500 } }
12073
+ },
12074
+ attachment: {
12075
+ type: "object",
12076
+ required: ["id", "name", "contentType", "size", "createdAt"],
12077
+ additionalProperties: false,
12078
+ properties: {
12079
+ id: { type: "string", format: "uuid" },
12080
+ name: { type: "string", maxLength: 200 },
12081
+ contentType: { enum: ["image/jpeg", "image/png", "image/webp", "application/pdf"] },
12082
+ size: { type: "integer", minimum: 1 },
12083
+ createdAt: { type: "string", format: "date-time" }
12084
+ }
12085
+ },
12086
+ consent: {
12087
+ type: "object",
12088
+ required: ["at", "version"],
12089
+ additionalProperties: false,
12090
+ properties: { at: { type: "string", format: "date-time" }, version: { type: "string", minLength: 1 } }
12091
+ },
12092
+ dossier: {
12093
+ type: "object",
12094
+ required: [
12095
+ "id",
12096
+ "version",
12097
+ "lang",
12098
+ "stage",
12099
+ "answers",
12100
+ "checklist",
12101
+ "openItems",
12102
+ "attachments",
12103
+ "createdAt",
12104
+ "updatedAt"
12105
+ ],
12106
+ additionalProperties: false,
12107
+ properties: {
12108
+ id: { type: "string", format: "uuid" },
12109
+ version: { type: "integer", minimum: 1 },
12110
+ lang: { enum: ["en", "ru"] },
12111
+ stage: { enum: ["intake", "survey", "choices", "prepared", "installed"] },
12112
+ claimed: { type: "boolean" },
12113
+ room: { type: "object" },
12114
+ goals: { type: "string", maxLength: 2e3 },
12115
+ answers: { type: "object" },
12116
+ choices: { type: "object" },
12117
+ estimates: { type: "object", additionalProperties: { type: "object" } },
12118
+ domeDraft: { $ref: "../../dome/1.1/dome.schema.json" },
12119
+ checklist: { type: "array", items: { $ref: "#/$defs/checkItem" } },
12120
+ openItems: { type: "array", items: { type: "string" } },
12121
+ attachments: { type: "array", items: { $ref: "#/$defs/attachment" } },
12122
+ consent: { $ref: "#/$defs/consent" },
12123
+ linkedInstallationId: { type: "string", format: "uuid" },
12124
+ expiresAt: { type: "string", format: "date-time" },
12125
+ createdAt: { type: "string", format: "date-time" },
12126
+ updatedAt: { type: "string", format: "date-time" }
12127
+ }
12128
+ },
12129
+ consentRequest: {
12130
+ type: "object",
12131
+ required: ["version"],
12132
+ additionalProperties: false,
12133
+ properties: { version: { type: "string", minLength: 1, maxLength: 32 } }
12134
+ },
12135
+ expertRequest: {
12136
+ type: "object",
12137
+ required: ["id", "question", "clientAcceptedAt", "status"],
12138
+ additionalProperties: false,
12139
+ properties: {
12140
+ id: { type: "string", format: "uuid" },
12141
+ question: { type: "string", maxLength: 1500 },
12142
+ clientAcceptedAt: { type: "string", format: "date-time" },
12143
+ status: { enum: ["sent", "answered", "closed"] },
12144
+ answer: { type: "string" }
12145
+ }
12146
+ },
12147
+ pendingConfirmation: {
12148
+ type: "object",
12149
+ description: "What an assistant may know of a confirmation. The code hash stays on the venue and is not part of this shape.",
12150
+ required: ["id", "tool", "argumentsHash", "risk", "text", "expiresAt", "status"],
12151
+ additionalProperties: false,
12152
+ properties: {
12153
+ id: { type: "string" },
12154
+ tool: { type: "string" },
12155
+ argumentsHash: { type: "string" },
12156
+ risk: { const: "physical" },
12157
+ text: { type: "string" },
12158
+ expiresAt: { type: "string", format: "date-time" },
12159
+ status: { enum: ["pending", "confirmed", "expired", "refused"] }
12160
+ }
12161
+ },
12162
+ toolResult: {
12163
+ type: "object",
12164
+ description: "Every tool result: a short sentence to read aloud, plus the full data.",
12165
+ required: ["summary", "data"],
12166
+ additionalProperties: false,
12167
+ properties: {
12168
+ summary: { type: "string", minLength: 1 },
12169
+ data: { type: "object" },
12170
+ untrusted: {
12171
+ type: "array",
12172
+ items: { type: "string" },
12173
+ description: "Paths of `data` that hold client text: data, not instructions."
12174
+ }
12175
+ }
12176
+ },
12177
+ toolError: {
12178
+ type: "object",
12179
+ required: ["code", "summary", "retryable"],
12180
+ additionalProperties: false,
12181
+ properties: {
12182
+ code: { type: "string", pattern: "^[a-z][a-z0-9_]*$" },
12183
+ summary: { type: "string", minLength: 1 },
12184
+ retryable: { type: "boolean" },
12185
+ data: { type: "object" }
12186
+ }
12187
+ }
12188
+ }
12189
+ },
12190
+ "https://freedome.nativemind.us/schemas/mcp/1.0/knowledge.schema.json": {
12191
+ $schema: "https://json-schema.org/draft/2020-12/schema",
12192
+ $id: "https://freedome.nativemind.us/schemas/mcp/1.0/knowledge.schema.json",
12193
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Planning knowledge mcp/knowledge/*.yaml. The root validates a single rule; each file has its own $def.",
12194
+ title: "Freedome MCP knowledge",
12195
+ $ref: "#/$defs/rule",
12196
+ $defs: {
12197
+ text: {
12198
+ type: "object",
12199
+ required: ["en", "ru"],
12200
+ additionalProperties: false,
12201
+ properties: { en: { type: "string", minLength: 1 }, ru: { type: "string", minLength: 1 } }
12202
+ },
12203
+ condition: { type: "object", additionalProperties: { type: "array", items: { type: "string" }, minItems: 1 } },
12204
+ sourceId: { type: "string", pattern: "^(doc|gen)-[a-z0-9]+$" },
12205
+ rule: {
12206
+ type: "object",
12207
+ required: ["id", "version", "status", "source", "title", "formula", "params", "assumptions"],
12208
+ additionalProperties: false,
12209
+ properties: {
12210
+ id: { type: "string", pattern: "^[a-z]+\\.[a-z0-9-]+$" },
12211
+ version: { type: "integer", minimum: 1 },
12212
+ status: { enum: ["geometry", "ours", "ours-tbv", "unverified"] },
12213
+ source: { $ref: "#/$defs/sourceId" },
12214
+ title: { $ref: "#/$defs/text" },
12215
+ formula: { type: "string", minLength: 1 },
12216
+ params: { type: "object" },
12217
+ assumptions: { type: "array", minItems: 1, items: { $ref: "#/$defs/text" } }
12218
+ }
12219
+ },
12220
+ rules: {
12221
+ type: "object",
12222
+ required: ["version", "rules"],
12223
+ additionalProperties: false,
12224
+ properties: { version: { const: 1 }, rules: { type: "array", items: { $ref: "#/$defs/rule" } } }
12225
+ },
12226
+ source: {
12227
+ type: "object",
12228
+ required: ["id", "kind", "title", "where"],
12229
+ additionalProperties: false,
12230
+ properties: {
12231
+ id: { $ref: "#/$defs/sourceId" },
12232
+ kind: { enum: ["ours", "general"] },
12233
+ title: { type: "string" },
12234
+ where: { type: "string" }
12235
+ }
12236
+ },
12237
+ sources: {
12238
+ type: "object",
12239
+ required: ["version", "sources"],
12240
+ additionalProperties: false,
12241
+ properties: { version: { const: 1 }, sources: { type: "array", items: { $ref: "#/$defs/source" } } }
12242
+ },
12243
+ question: {
12244
+ type: "object",
12245
+ required: ["id", "type", "en", "ru"],
12246
+ additionalProperties: false,
12247
+ properties: {
12248
+ id: { type: "string", pattern: "^[a-z][a-z0-9_]*$" },
12249
+ type: { enum: ["enum", "number", "text"] },
12250
+ unit: { type: "string" },
12251
+ min: { type: "number" },
12252
+ max: { type: "number" },
12253
+ integer: { type: "boolean" },
12254
+ maxLength: { type: "integer", minimum: 1 },
12255
+ skippable: { type: "boolean" },
12256
+ when: { $ref: "#/$defs/condition" },
12257
+ options: {
12258
+ type: "array",
12259
+ minItems: 2,
12260
+ items: {
12261
+ type: "object",
12262
+ required: ["value", "en", "ru"],
12263
+ additionalProperties: false,
12264
+ properties: { value: { type: "string" }, en: { type: "string" }, ru: { type: "string" } }
12265
+ }
12266
+ },
12267
+ en: { type: "string", minLength: 1 },
12268
+ ru: { type: "string", minLength: 1 }
12269
+ }
12270
+ },
12271
+ survey: {
12272
+ type: "object",
12273
+ required: ["version", "questions"],
12274
+ additionalProperties: false,
12275
+ properties: {
12276
+ version: { const: 1 },
12277
+ questions: { type: "array", minItems: 1, items: { $ref: "#/$defs/question" } }
12278
+ }
12279
+ },
12280
+ item: {
12281
+ type: "object",
12282
+ required: ["id", "who", "source", "en", "ru"],
12283
+ additionalProperties: false,
12284
+ properties: {
12285
+ id: { type: "string", pattern: "^[a-z][a-z0-9-]*$" },
12286
+ who: { enum: ["client", "electrician", "structural", "fire", "acoustic", "installer"] },
12287
+ expert: { type: "boolean" },
12288
+ source: { $ref: "#/$defs/sourceId" },
12289
+ when: { $ref: "#/$defs/condition" },
12290
+ en: { type: "string", minLength: 1 },
12291
+ ru: { type: "string", minLength: 1 }
12292
+ }
12293
+ },
12294
+ checklist: {
12295
+ type: "object",
12296
+ required: ["version", "items"],
12297
+ additionalProperties: false,
12298
+ properties: { version: { const: 1 }, items: { type: "array", minItems: 1, items: { $ref: "#/$defs/item" } } }
12299
+ },
12300
+ policy: {
12301
+ type: "object",
12302
+ required: ["version", "lines", "routes"],
12303
+ additionalProperties: false,
12304
+ properties: {
12305
+ version: { const: 1 },
12306
+ lines: { type: "object", additionalProperties: { $ref: "#/$defs/text" } },
12307
+ routes: { type: "object", additionalProperties: { type: "array", items: { type: "string" } } }
12308
+ }
12309
+ }
12310
+ }
12311
+ },
12312
+ "https://freedome.nativemind.us/schemas/mcp/1.0/link.schema.json": {
12313
+ $schema: "https://json-schema.org/draft/2020-12/schema",
12314
+ $id: "https://freedome.nativemind.us/schemas/mcp/1.0/link.schema.json",
12315
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Frames of wss://\u2026/api/v1/installations/link (flows/sdd-freedome-mcp 3.3). Text frames, one JSON object each, at most 1 MiB. This list is closed: anything else closes the link.",
12316
+ title: "Link frame",
12317
+ oneOf: [
12318
+ { $ref: "#/$defs/challenge" },
12319
+ { $ref: "#/$defs/proof" },
12320
+ { $ref: "#/$defs/ready" },
12321
+ { $ref: "#/$defs/approve" },
12322
+ { $ref: "#/$defs/approveResult" },
12323
+ { $ref: "#/$defs/mcp" },
12324
+ { $ref: "#/$defs/mcpResult" },
12325
+ { $ref: "#/$defs/end" },
12326
+ { $ref: "#/$defs/ended" },
12327
+ { $ref: "#/$defs/sessions" }
12328
+ ],
12329
+ $defs: {
12330
+ id: { type: "string", minLength: 1, maxLength: 64 },
12331
+ challenge: {
12332
+ description: "Hub to venue, first frame after a valid `fdi_` key in `Authorization`.",
12333
+ type: "object",
12334
+ additionalProperties: false,
12335
+ required: ["t", "nonce"],
12336
+ properties: { t: { const: "challenge" }, nonce: { type: "string", pattern: "^[A-Za-z0-9_-]{43}$" } }
12337
+ },
12338
+ proof: {
12339
+ description: "Venue to hub: unpadded base64url ed25519 signature of the UTF-8 text `freedome-link-v1\\n<installationId>\\n<nonce>`, by the key of enrolment.",
12340
+ type: "object",
12341
+ additionalProperties: false,
12342
+ required: ["t", "signature", "active"],
12343
+ properties: {
12344
+ t: { const: "proof" },
12345
+ signature: { type: "string", pattern: "^[A-Za-z0-9_-]{86}$" },
12346
+ active: {
12347
+ type: "array",
12348
+ items: { $ref: "#/$defs/id" },
12349
+ description: "Approvals still valid on the venue. The hub ends every other one."
12350
+ }
12351
+ }
12352
+ },
12353
+ ready: {
12354
+ description: "Hub to venue: the link is up. A newer link of the same installation replaces an older one.",
12355
+ type: "object",
12356
+ additionalProperties: false,
12357
+ required: ["t"],
12358
+ properties: { t: { const: "ready" } }
12359
+ },
12360
+ approve: {
12361
+ description: "Venue to hub: a person approved a link code. The venue keeps the scopes; they are sent for the audit.",
12362
+ type: "object",
12363
+ additionalProperties: false,
12364
+ required: ["t", "id", "code", "sid", "approver", "role", "scopes", "expiresAt"],
12365
+ properties: {
12366
+ t: { const: "approve" },
12367
+ id: { $ref: "#/$defs/id" },
12368
+ code: { type: "string", maxLength: 16 },
12369
+ sid: { $ref: "#/$defs/id" },
12370
+ approver: { type: "string", maxLength: 128 },
12371
+ role: { type: "string" },
12372
+ scopes: { type: "array", items: { type: "string" } },
12373
+ expiresAt: { type: "string", format: "date-time" }
12374
+ }
12375
+ },
12376
+ approveResult: {
12377
+ type: "object",
12378
+ additionalProperties: false,
12379
+ required: ["t", "id", "ok"],
12380
+ properties: {
12381
+ t: { const: "approve_result" },
12382
+ id: { $ref: "#/$defs/id" },
12383
+ ok: { type: "boolean" },
12384
+ error: { enum: ["wrong_code", "expired", "busy"] }
12385
+ }
12386
+ },
12387
+ mcp: {
12388
+ description: "Hub to venue: one MCP request, under an approval the venue knows. Only `initialize`, `tools/list` and `tools/call`.",
12389
+ type: "object",
12390
+ additionalProperties: false,
12391
+ required: ["t", "id", "sid", "dossierId", "msg"],
12392
+ properties: {
12393
+ t: { const: "mcp" },
12394
+ id: { $ref: "#/$defs/id" },
12395
+ sid: { $ref: "#/$defs/id" },
12396
+ dossierId: { $ref: "#/$defs/id" },
12397
+ msg: { type: "object", description: "JSON-RPC 2.0 request." }
12398
+ }
12399
+ },
12400
+ mcpResult: {
12401
+ type: "object",
12402
+ additionalProperties: false,
12403
+ required: ["t", "id", "msg"],
12404
+ properties: {
12405
+ t: { const: "mcp_result" },
12406
+ id: { $ref: "#/$defs/id" },
12407
+ msg: { type: "object", description: "JSON-RPC 2.0 response." }
12408
+ }
12409
+ },
12410
+ end: {
12411
+ description: "Hub to venue: the assistant ended the link.",
12412
+ type: "object",
12413
+ additionalProperties: false,
12414
+ required: ["t", "sid"],
12415
+ properties: { t: { const: "end" }, sid: { $ref: "#/$defs/id" } }
12416
+ },
12417
+ ended: {
12418
+ description: "Venue to hub: ended in Manager, or expired.",
12419
+ type: "object",
12420
+ additionalProperties: false,
12421
+ required: ["t", "sid", "reason"],
12422
+ properties: { t: { const: "ended" }, sid: { $ref: "#/$defs/id" }, reason: { enum: ["manager", "expired"] } }
12423
+ },
12424
+ sessions: {
12425
+ description: "Reserved for a later resync.",
12426
+ type: "object",
12427
+ additionalProperties: false,
12428
+ required: ["t", "active"],
12429
+ properties: { t: { const: "sessions" }, active: { type: "array", items: { $ref: "#/$defs/id" } } }
12430
+ }
12431
+ }
12432
+ },
12433
+ "https://freedome.nativemind.us/schemas/mcp/1.0/tools.schema.json": {
12434
+ $schema: "https://json-schema.org/draft/2020-12/schema",
12435
+ $id: "https://freedome.nativemind.us/schemas/mcp/1.0/tools.schema.json",
12436
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). The MCP catalogue mcp/tools.yaml (flows/sdd-freedome-mcp 02).",
12437
+ title: "Freedome MCP catalogue",
12438
+ type: "object",
12439
+ required: ["version", "tools"],
12440
+ additionalProperties: false,
12441
+ properties: {
12442
+ version: { const: 1 },
12443
+ $defs: { type: "object" },
12444
+ tools: { type: "array", minItems: 1, items: { $ref: "#/$defs/tool" } }
12445
+ },
12446
+ $defs: {
12447
+ text: {
12448
+ type: "object",
12449
+ required: ["en", "ru"],
12450
+ additionalProperties: false,
12451
+ properties: { en: { type: "string", minLength: 1 }, ru: { type: "string", minLength: 1 } }
12452
+ },
12453
+ tool: {
12454
+ type: "object",
12455
+ required: ["name", "group", "modes", "scope", "risk", "summary"],
12456
+ additionalProperties: false,
12457
+ oneOf: [{ required: ["planner"] }, { required: ["operationId"] }],
12458
+ properties: {
12459
+ name: { type: "string", pattern: "^[a-z][a-z0-9_]{1,47}$" },
12460
+ group: { type: "string", pattern: "^[a-z][a-z-]*$" },
12461
+ modes: { type: "array", minItems: 1, uniqueItems: true, items: { enum: ["planning", "simulation", "live"] } },
12462
+ planner: { type: "string", pattern: "^[a-z][a-z0-9_]*$" },
12463
+ operationId: { type: "string", pattern: "^[a-z][a-zA-Z0-9]*$" },
12464
+ scope: { type: "string", pattern: "^(none|anon|any|[a-z]+:[a-z]+)$" },
12465
+ risk: { enum: ["read", "control", "physical"] },
12466
+ status: { enum: ["planned"] },
12467
+ summary: { $ref: "#/$defs/text" },
12468
+ input: { type: "object" }
12469
+ }
12470
+ }
12471
+ }
12472
+ },
7883
12473
  "https://freedome.nativemind.us/schemas/zelim/1.0/zelim-project.schema.json": {
7884
12474
  $schema: "https://json-schema.org/draft/2020-12/schema",
7885
12475
  $id: "https://freedome.nativemind.us/schemas/zelim/1.0/zelim-project.schema.json",