# SPDX-License-Identifier: LicenseRef-NativeMindNONC
# Legacy OSC aliases — compatibility profile only (02e §8.3, §11; served when `[legacy] enabled = true`, default on in
# 1.x, removed in API v2). Sources: deleted NestJS backend `osc.service.ts:84-116` (v3) and media server 2.0
# `src/osc/mod.rs:230-300` (now legacy/freedome_core). Legacy 0..100 values are scaled to 0..1 at the profile boundary.
# Every hit increments freedome_mediaserver_legacy_requests_total{client="osc",message=<address>}.
version: 1
kind: legacy
sunset: API v2 (the legacy profile lives for the whole v1 lifetime, 02e §13)
addresses:
  - { address: /play, direction: in, source: nestjs-v3, status: alias, args: [{ name: mediaId, type: s }], mapsTo: { operationId: play, params: { venueId: default, playerId: main }, body: { assetId: $mediaId } }, scope: playback:control }
  - { address: /stop, direction: in, source: nestjs-v3, status: alias, args: [], mapsTo: { operationId: stop, params: { venueId: default, playerId: main } }, scope: playback:control }
  - { address: /pause, direction: in, source: nestjs-v3, status: alias, args: [], mapsTo: { operationId: pause, params: { venueId: default, playerId: main } }, scope: playback:control }
  - { address: /volume, direction: in, source: nestjs-v3, status: alias, args: [{ name: value, type: f, range: [0, 100] }], mapsTo: { operationId: patchOutput, params: { venueId: default }, body: { volume: $value/100 } }, scope: playback:control }
  - { address: /brightness, direction: in, source: nestjs-v3, status: alias, args: [{ name: value, type: f, range: [0, 100] }], mapsTo: { operationId: patchOutput, params: { venueId: default }, body: { brightness: $value/100 } }, scope: playback:control }
  - { address: /rotation, direction: in, source: nestjs-v3, status: alias, args: [{ name: degrees, type: f }], mapsTo: { operationId: patchOutput, params: { venueId: default }, body: { rotation: $degrees } }, scope: playback:control }
  - { address: /position, direction: in, source: nestjs-v3, status: alias, args: [{ name: seconds, type: f }], mapsTo: { operationId: seek, params: { venueId: default, playerId: main }, body: { position: $seconds } }, scope: playback:control }
  - { address: /lighting, direction: in, source: nestjs-v3, status: alias, args: [{ name: on, type: 'T|F' }], mapsTo: { operationId: patchOutput, params: { venueId: default }, body: { lighting: $on } }, scope: playback:control }
  - { address: /calibrate, direction: in, source: nestjs-v3, status: alias, args: [], mapsTo: { operationId: startCalibrationJob, params: { venueId: default }, body: { kind: visual-camera } }, scope: calibration:run, adminCidrOnly: true }
  - { address: /freedome/play, direction: in, source: mediaserver-2.0, status: alias, args: [{ name: contentId, type: s, optional: true }], mapsTo: { operationId: play, params: { venueId: default, playerId: main }, body: { assetId: $contentId } }, scope: playback:control }
  - { address: /freedome/stop, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { operationId: stop, params: { venueId: default, playerId: main } }, scope: playback:control }
  - { address: /freedome/status, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { operationId: getPlayer, params: { venueId: default, playerId: main } }, scope: playback:read, reply: { address: /freedome/status, args: [{ name: json, type: s }] } }
  - { address: /freedome/capabilities, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { operationId: getInfo }, scope: anon, reply: { address: /freedome/capabilities, args: [{ name: json, type: s }] } }
  - { address: /freedome/render/single, direction: in, source: mediaserver-2.0, status: dropped, args: [], notes: 'no pixels over the control plane (A1); answered with /freedome/v1/error legacy-unsupported' }
  - { address: /freedome/config/reload, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { operationId: getConfig }, scope: system:read, notes: 'config is reloaded by putConfig; the alias only re-reads (no-op) and answers the effective revision', adminCidrOnly: true }
  - { address: /freedome/backend/switch, direction: in, source: mediaserver-2.0, status: alias, args: [{ name: backend, type: s }], mapsTo: { operationId: setComputeBackend, body: { backend: $backend } }, scope: system:admin, adminCidrOnly: true }
  - { address: /freedome/backend/query, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { operationId: getEngine, params: { name: visual } }, scope: info:read, reply: { address: /freedome/backend/query, args: [{ name: backend, type: s }] } }
  - { address: /server/status, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { operationId: getHealth }, scope: anon, reply: { address: /server/status, args: [{ name: json, type: s }] } }
  - { address: /server/subscribe, direction: in, source: mediaserver-2.0, status: alias, args: [{ name: replyPort, type: i, optional: true }], mapsTo: { internal: subscribe }, scope: events:subscribe, notes: 'subscribes to system/health + venues/default/players/main (the 2.0 status stream)' }
  - { address: /server/unsubscribe, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { internal: unsubscribe }, scope: events:subscribe }
  - { address: /server/restart, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { operationId: restartEngine, params: { name: visual } }, scope: system:admin, adminCidrOnly: true, confirm: { address: /server/restart/confirm, withinSec: 5 } }
  - { address: /server/shutdown, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { operationId: shutdownSystem, body: { confirm: true } }, scope: system:admin, adminCidrOnly: true, confirm: { address: /server/shutdown/confirm, withinSec: 5 } }
  - { address: /server/exit, direction: in, source: mediaserver-2.0, status: alias, args: [], mapsTo: { operationId: rebootSystem, body: { confirm: true } }, scope: system:admin, adminCidrOnly: true, confirm: { address: /server/exit/confirm, withinSec: 5 }, notes: 'process exit → supervised restart; mapped to rebootSystem only when host power control is enabled, otherwise legacy-unsupported' }
