import { createSidecarProxy } from '@@/sidecar/create-proxy'; import { mountPrefix } from '@@/plugins/manifest'; import { manifest } from '../manifest'; // /api/transmission/* — auth, then forward to officer-transmission. No routes of its own and no // Transmission knowledge here: the sidecar owns the RPC contract and holds the daemon's credentials. // // The prefix is DERIVED rather than written, for the reason recorded in `plugins/music/api/router.ts`: // the proxy strips exactly `prefix.length` characters, so a literal is correct only for a first-party // publisher and silently forwards the wrong path for anyone else. const proxy = createSidecarProxy({ name: 'transmission', prefix: `/api${mountPrefix({ appName: 'transmission', manifest })}`, }); export const router = proxy.router;