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