deep-roon-mcp 0.5.8 → 0.5.9
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/README.md +3 -1
- package/dist/deep-roon-mcp.js +71 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ server of its own and sends nothing anywhere else. What you ask goes to your MCP
|
|
|
22
22
|
|
|
23
23
|
## Status
|
|
24
24
|
|
|
25
|
-
Version 0.5: sixty-
|
|
25
|
+
Version 0.5: sixty-four tools (fifty-eight with a read-only library; sixty-eight with playlist editing on). Qobuz, TIDAL or both — whatever is signed in on your Core.
|
|
26
26
|
|
|
27
27
|
**Reading** — changes nothing in Roon:
|
|
28
28
|
|
|
@@ -61,6 +61,7 @@ Version 0.5: sixty-one tools (fifty-five with a read-only library; sixty-five wi
|
|
|
61
61
|
| `roon_similar` | More like this, for an album or an artist |
|
|
62
62
|
| `roon_signal_path` | Roon's signal path for what plays: is it bit-perfect, what happens on the way |
|
|
63
63
|
| `roon_dsp` | MUSE: the DSP set up for a zone |
|
|
64
|
+
| `roon_devices` | The RAAT audio devices of Settings › Audio: enabled, and whether they have a zone |
|
|
64
65
|
| `roon_radio` | Live Radio: your own stations, the directory by category and genre |
|
|
65
66
|
|
|
66
67
|
**Playing** — only on your request:
|
|
@@ -79,6 +80,7 @@ Version 0.5: sixty-one tools (fifty-five with a read-only library; sixty-five wi
|
|
|
79
80
|
| `roon_group`, `roon_ungroup` | Group zones, and undo it |
|
|
80
81
|
| `roon_sleep` | A sleep timer |
|
|
81
82
|
| `roon_standby` | Put a device in standby, or wake it |
|
|
83
|
+
| `roon_device_reset` | Disable and enable a device stuck on "Enabling…" (enabled, no zone) — only those |
|
|
82
84
|
| `roon_play_playlist` | A playlist on a zone (also a TIDAL one), optionally shuffled |
|
|
83
85
|
| `roon_play_mix` | One of today's Daily Mixes |
|
|
84
86
|
| `roon_play_radio` | A Live Radio station on a zone |
|
package/dist/deep-roon-mcp.js
CHANGED
|
@@ -15469,7 +15469,7 @@ var require_lib2 = __commonJS({
|
|
|
15469
15469
|
var version2;
|
|
15470
15470
|
var init_package = __esm({
|
|
15471
15471
|
"package.json"() {
|
|
15472
|
-
version2 = "0.5.
|
|
15472
|
+
version2 = "0.5.9";
|
|
15473
15473
|
}
|
|
15474
15474
|
});
|
|
15475
15475
|
|
|
@@ -51664,6 +51664,63 @@ async function dspSet(zoneName, s) {
|
|
|
51664
51664
|
}
|
|
51665
51665
|
__name(dspSet, "dspSet");
|
|
51666
51666
|
|
|
51667
|
+
// src/roon/devices.ts
|
|
51668
|
+
init_session();
|
|
51669
|
+
init_graph();
|
|
51670
|
+
async function raatDevices(c) {
|
|
51671
|
+
const list = await untilField(c, c.serviceOid("Transport"), "RaatServers", 4e3);
|
|
51672
|
+
const servers = items(c, list);
|
|
51673
|
+
const out = [];
|
|
51674
|
+
for (const s of servers) {
|
|
51675
|
+
const devs = field2(s, "Devices") ?? await untilField(c, s.oid, "Devices", 2e3);
|
|
51676
|
+
const refs = obj(c, devs)?.fields?.$items ?? [];
|
|
51677
|
+
await untilLoaded(c, refs, 2e3);
|
|
51678
|
+
for (const d of items(c, devs)) {
|
|
51679
|
+
const name = field2(d, "Name");
|
|
51680
|
+
if (typeof name !== "string") continue;
|
|
51681
|
+
const ep = obj(c, field2(d, "Endpoint"));
|
|
51682
|
+
const zone3 = !!ep && obj(c, field2(ep, "Zone")) != null;
|
|
51683
|
+
out.push({
|
|
51684
|
+
name,
|
|
51685
|
+
server: String(field2(s, "MachineName") ?? ""),
|
|
51686
|
+
ip: String(field2(s, "IPAddress") ?? ""),
|
|
51687
|
+
enabled: flag(field2(d, "IsEnabled")),
|
|
51688
|
+
zone: zone3,
|
|
51689
|
+
status: String(field2(d, "Status") ?? ""),
|
|
51690
|
+
oid: BigInt(d.oid)
|
|
51691
|
+
});
|
|
51692
|
+
}
|
|
51693
|
+
}
|
|
51694
|
+
return out;
|
|
51695
|
+
}
|
|
51696
|
+
__name(raatDevices, "raatDevices");
|
|
51697
|
+
var show = /* @__PURE__ */ __name((d) => ({ name: d.name, machine: d.server, ip: d.ip, enabled: d.enabled, zone: d.zone, ...d.status ? { status: d.status } : {} }), "show");
|
|
51698
|
+
async function devices() {
|
|
51699
|
+
return withCore(async (c) => ({ devices: (await raatDevices(c)).map(show) }));
|
|
51700
|
+
}
|
|
51701
|
+
__name(devices, "devices");
|
|
51702
|
+
async function deviceReset(opts) {
|
|
51703
|
+
if (!opts.name && !opts.ip) throw new RoonError("Give a device name or the address of its RAAT server", "invalid");
|
|
51704
|
+
return withCore(async (c) => {
|
|
51705
|
+
const want = opts.name?.toLowerCase();
|
|
51706
|
+
const all = await raatDevices(c);
|
|
51707
|
+
const match = all.filter((d) => (!want || d.name.toLowerCase() === want) && (!opts.ip || d.ip === opts.ip));
|
|
51708
|
+
if (!match.length) throw new RoonError(`No RAAT device ${opts.name ?? ""}${opts.ip ? " at " + opts.ip : ""}; Roon has: ${all.map((d) => d.name).join(", ")}`, "not_found");
|
|
51709
|
+
const stuck = match.filter((d) => d.enabled && !d.zone);
|
|
51710
|
+
const done = [];
|
|
51711
|
+
for (const d of stuck) {
|
|
51712
|
+
await short(c.call("RaatServerAudioDevice", "Disable", [{ type: "ResultCallback", name: "cb_result" }], Buffer.alloc(0), d.oid), 6e3);
|
|
51713
|
+
await wait(800);
|
|
51714
|
+
await short(c.call("RaatServerAudioDevice", "Enable", [{ type: "ResultCallback<Endpoint>", name: "cb_result" }], Buffer.alloc(0), d.oid), 8e3);
|
|
51715
|
+
done.push(d.name);
|
|
51716
|
+
}
|
|
51717
|
+
if (done.length) await wait(3e3);
|
|
51718
|
+
const after = (await raatDevices(c)).filter((d) => match.some((m) => m.oid === d.oid)).map(show);
|
|
51719
|
+
return { reset: done, left_alone: match.filter((d) => !stuck.includes(d)).map((d) => `${d.name} (${d.enabled ? "has a zone" : "disabled"})`), now: after };
|
|
51720
|
+
});
|
|
51721
|
+
}
|
|
51722
|
+
__name(deviceReset, "deviceReset");
|
|
51723
|
+
|
|
51667
51724
|
// src/tools/library.ts
|
|
51668
51725
|
init_session();
|
|
51669
51726
|
|
|
@@ -52154,6 +52211,18 @@ function registerLibraryTools(server) {
|
|
|
52154
52211
|
inputSchema: { zone: zone2, enabled: external_exports.boolean().optional(), part: external_exports.string().optional(), preset: external_exports.string().optional() },
|
|
52155
52212
|
annotations: CHANGES
|
|
52156
52213
|
}, ({ zone: zn, enabled: enabled2, part, preset }) => run(() => dspSet(zn, { enabled: enabled2, part, preset })));
|
|
52214
|
+
server.registerTool("roon_devices", {
|
|
52215
|
+
title: "Audio devices",
|
|
52216
|
+
description: `Roon's RAAT audio devices as Settings \u2192 Audio shows them: per device its name, the machine and address of its RAAT server, whether it is enabled, and whether it has a zone now. An enabled device without a zone is usually stuck on "Enabling\u2026" (see roon_device_reset).`,
|
|
52217
|
+
inputSchema: {},
|
|
52218
|
+
annotations: READ2
|
|
52219
|
+
}, () => run(() => devices()));
|
|
52220
|
+
server.registerTool("roon_device_reset", {
|
|
52221
|
+
title: "Reset a stuck device",
|
|
52222
|
+
description: 'Disable and enable a RAAT device that is enabled but has no zone \u2014 what you do by hand in Settings \u2192 Audio when a device hangs on "Enabling\u2026" (Roon backs off after failed connections, e.g. a phone that changed networks). Only devices in that state are touched; others are left alone. By `name` or by `ip`, the address of the device\'s RAAT server (from roon_devices). Reads back.',
|
|
52223
|
+
inputSchema: { name: external_exports.string().optional().describe("The device name, as in roon_devices."), ip: external_exports.string().optional().describe("The address of its RAAT server, as in roon_devices.") },
|
|
52224
|
+
annotations: CHANGES
|
|
52225
|
+
}, ({ name, ip }) => run(() => deviceReset({ name, ip })));
|
|
52157
52226
|
}
|
|
52158
52227
|
__name(registerLibraryTools, "registerLibraryTools");
|
|
52159
52228
|
|
|
@@ -52273,6 +52342,7 @@ var INSTRUCTIONS = `Deep Roon MCP connects to the user's own Roon Core (music pl
|
|
|
52273
52342
|
- Unofficial: this uses Roon's internal protocol, which a Roon update can change; if a tool says so, tell the user to check for an update.`;
|
|
52274
52343
|
var LIBRARY_WRITES = /* @__PURE__ */ new Set([...PLAYLIST_WRITES, "roon_playlist_create", "roon_favorite", "roon_radio_favorite", "roon_listen_later_set", "roon_library_add", "roon_dsp_set"]);
|
|
52275
52344
|
var PLAYBACK = /* @__PURE__ */ new Set([
|
|
52345
|
+
"roon_device_reset",
|
|
52276
52346
|
"roon_play",
|
|
52277
52347
|
"roon_play_tracks",
|
|
52278
52348
|
"roon_play_radio",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deep-roon-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.9",
|
|
4
4
|
"description": "An MCP server for Roon that reaches the parts the official API doesn't: reviews, biographies, Qobuz's and TIDAL's shelves, TIDAL's playlists, your history, search across your library and the streaming services",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "René Bouwmeester <21277119+renebouwmeester@users.noreply.github.com>",
|