deep-roon-mcp 0.5.2 → 0.5.3

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.
@@ -15538,7 +15538,7 @@ var require_lib2 = __commonJS({
15538
15538
  var version2;
15539
15539
  var init_package = __esm({
15540
15540
  "package.json"() {
15541
- version2 = "0.5.2";
15541
+ version2 = "0.5.3";
15542
15542
  }
15543
15543
  });
15544
15544
 
@@ -16030,6 +16030,8 @@ function albumRow(c, o) {
16030
16030
  if (typeof p === "number") r.popularity = Math.round(p * 100) / 100;
16031
16031
  const img = imageKey(c, o);
16032
16032
  if (img) r.image = img;
16033
+ const at2 = field2(o, "Type");
16034
+ r.album_type = ALBUM_TYPES[typeof at2 === "number" ? at2 : 0] ?? "unknown";
16033
16035
  return r;
16034
16036
  }
16035
16037
  function resultRow(c, o) {
@@ -16073,7 +16075,7 @@ function trackArtist(c, r, tr, al) {
16073
16075
  if (!namen.length || namen.includes(albumArtiest) || namen.every((n) => albumArtiest.includes(n))) return;
16074
16076
  r.track_artist = namen.join(", ");
16075
16077
  }
16076
- var obj, clean, typeOf, items, strings, flag, yearOf, wait;
16078
+ var obj, clean, typeOf, items, strings, flag, yearOf, wait, ALBUM_TYPES;
16077
16079
  var init_graph = __esm({
16078
16080
  "src/roon/graph.ts"() {
16079
16081
  "use strict";
@@ -16105,6 +16107,7 @@ var init_graph = __esm({
16105
16107
  __name(duration3, "duration");
16106
16108
  __name(localTime, "localTime");
16107
16109
  __name(sourceOf, "sourceOf");
16110
+ ALBUM_TYPES = ["main", "single", "compilation", "other", "unknown", "ep", "soundtrack", "show"];
16108
16111
  __name(albumRow, "albumRow");
16109
16112
  __name(resultRow, "resultRow");
16110
16113
  __name(trackArtist, "trackArtist");
@@ -16635,6 +16638,11 @@ __export(focus_exports, {
16635
16638
  work: () => work,
16636
16639
  works: () => works
16637
16640
  });
16641
+ function albumTypeOf(x) {
16642
+ const k = x.toLowerCase().replace(/releases?|s$/g, "").replace(/[^a-z]/g, "");
16643
+ const alias = { mainrelease: "main", album: "main", extendedplay: "ep", ost: "soundtrack" };
16644
+ return ALBUM_TYPES.indexOf(alias[k] ?? k);
16645
+ }
16638
16646
  async function virtualQuery(c, kind, members2, limit3, offset2, row) {
16639
16647
  const schema = structSchema(`Sooloos.Broker.Api.${kind}QueryCriteria`) ?? [];
16640
16648
  const missing = members2.find((f) => !schema.some((m) => m.shortName === f.name));
@@ -16756,6 +16764,15 @@ async function focusMembers(c, f, people = ["artist", "composer", "producer"]) {
16756
16764
  if (f.compilation === true) m.push(yes("RequireIsCompilation"));
16757
16765
  else if (f.compilation === false) m.push(yes("ExcludeIsCompilation"));
16758
16766
  if (f.picks) m.push(yes("RequireIsPick"));
16767
+ if (f.bootleg === true) m.push(yes("RequireIsBootleg"));
16768
+ else if (f.bootleg === false) m.push(yes("ExcludeIsBootleg"));
16769
+ for (const [arg, member2] of [[f.album_type, "RequireTypes"], [f.exclude_album_type, "ExcludeTypes"]]) {
16770
+ if (!arg) continue;
16771
+ const want = names(arg).map((x) => albumTypeOf(x));
16772
+ const bad = want.findIndex((x) => x < 0);
16773
+ if (bad >= 0) throw new RoonError(`album type "${names(arg)[bad]}": choose from ${ALBUM_TYPES.join(", ")}`, "invalid");
16774
+ m.push({ name: member2, propType: 23, value: intList(want) });
16775
+ }
16759
16776
  if (f.year_from && f.year_from > 1e3) m.push({ name: "MinDate", propType: 23, value: dateValue(f.year_from, 0, 0) });
16760
16777
  if (f.year_to && f.year_to > 1e3) m.push({ name: "MaxDate", propType: 23, value: dateValue(f.year_to, 12, 31) });
16761
16778
  const wanted = [["artist", "artists", "RequirePerformers"], ["composer", "composers", "RequireComposers"], ["producer", "producers", "RequireProduction"]].filter(([p]) => people.includes(p) && f[p]);
@@ -16839,6 +16856,8 @@ async function focus(f, more, search2, limit3) {
16839
16856
  compilations: field2(info, "IsCompilationCount") ?? 0,
16840
16857
  roon_picks: field2(info, "IsPickCount") ?? 0,
16841
16858
  mqa: field2(info, "IsMQACount") ?? 0,
16859
+ // Roon's album types (main release, single, EP, soundtrack …); the default, main, comes without a value.
16860
+ album_types: hist("Types").map((x) => ({ type: ALBUM_TYPES[typeof x.w === "number" ? x.w : 0] ?? "unknown", albums: x.n })).sort((a, b) => b.albums - a.albums),
16842
16861
  // Raw histograms, to be named once measured (13 Oct 2026): where the albums live, and their file formats.
16843
16862
  storage: hist("Locations").map((x) => {
16844
16863
  const n = isRef2(x.w) ? String(field2(obj(c, x.w), "Name") ?? "") : String(x.w);
@@ -16983,6 +17002,7 @@ var init_focus = __esm({
16983
17002
  init_session();
16984
17003
  init_graph();
16985
17004
  init_library();
17005
+ __name(albumTypeOf, "albumTypeOf");
16986
17006
  intList = /* @__PURE__ */ __name((xs) => {
16987
17007
  const w = new BinaryWriter().flexInt(xs.length);
16988
17008
  for (const x of xs) w.integer(x);
@@ -51611,6 +51631,9 @@ var FOCUS = {
51611
51631
  bits: external_exports.string().optional().describe('Bit depths, comma-separated: "16, 24".'),
51612
51632
  mqa: external_exports.boolean().optional(),
51613
51633
  storage: external_exports.enum(["tidal", "qobuz", "local"]).optional().describe("Where the albums live."),
51634
+ album_type: external_exports.string().optional().describe("Roon's album type, comma-separated: main, single, ep, compilation, soundtrack, show, other."),
51635
+ exclude_album_type: external_exports.string().optional().describe('Album types to leave out, e.g. "single, ep".'),
51636
+ bootleg: external_exports.boolean().optional(),
51614
51637
  played_within_days: days,
51615
51638
  not_played_within_days: days,
51616
51639
  added_within_days: days
@@ -51619,13 +51642,13 @@ var filters = /* @__PURE__ */ __name((a) => ({ ...a }), "filters");
51619
51642
  function registerLibraryTools(server) {
51620
51643
  server.registerTool("roon_library", {
51621
51644
  title: "Library (Focus)",
51622
- description: 'The user\'s Roon LIBRARY \u2014 the albums they own or added \u2014 filtered and sorted with Roon\'s Focus. Filters combine freely: `min_stars` (Roon\'s editorial album rating; 5 = only five-star albums \u2014 THE tool for "five-star albums in my library"), `genre`, `label`, `artist`, `composer`, `producer`, `year_from` / `year_to`, `hires`, `live`, `compilation`, `picks`, `text`, `favorites`, `played_within_days` / `not_played_within_days` / `added_within_days`. `sort`: artist (default), added, released, most_played, title, popular, random \u2014 `random` is the way to "pick something from my library"; `ascending` flips a sort. `total` counts all matches; `offset` pages. Rows carry stars, year, format and a `key` for roon_play / roon_album. `matched` says which artist, composer or producer a name became.',
51645
+ description: 'The user\'s Roon LIBRARY \u2014 the albums they own or added \u2014 filtered and sorted with Roon\'s Focus. Filters combine freely: `min_stars` (Roon\'s editorial album rating; 5 = only five-star albums \u2014 THE tool for "five-star albums in my library"), `genre`, `label`, `artist`, `composer`, `producer`, `year_from` / `year_to`, `hires`, `live`, `compilation`, `picks`, `album_type` / `exclude_album_type` (main, single, ep, compilation, soundtrack, show), `bootleg`, `text`, `favorites`, `played_within_days` / `not_played_within_days` / `added_within_days`. `sort`: artist (default), added, released, most_played, title, popular, random \u2014 `random` is the way to "pick something from my library"; `ascending` flips a sort. `total` counts all matches; `offset` pages. Rows carry stars, year, format and a `key` for roon_play / roon_album. `matched` says which artist, composer or producer a name became.',
51623
51646
  inputSchema: { ...FOCUS, sort: external_exports.enum(["artist", "added", "released", "most_played", "title", "popular", "random"]).optional(), ascending: external_exports.boolean().optional(), limit: limit2(100, 50), offset },
51624
51647
  annotations: READ2
51625
51648
  }, ({ sort, ascending, limit: n, offset: o, ...f }) => run(() => library2(filters(f), sort, ascending, n ?? 50, o ?? 0)));
51626
51649
  server.registerTool("roon_focus", {
51627
51650
  title: "Focus panel",
51628
- description: 'Roon\'s Focus panel: what the library \u2014 or a filtered part of it \u2014 is MADE OF, with counts: genres and sub-genres, labels, artists, composers, producers, decades, star ratings, sample rates and bit depths, live albums, compilations, Roon\'s picks. Same filters as roon_library ("what labels are my five-star albums on", "which decades is my ECM collection from"). Use it for questions ABOUT the library and to find exact genre or label names for roon_library. The panel shows the top twenty of each list; `more` (labels, artists, composers, producers, genres) returns one list in full, optionally narrowed by `search`.',
51651
+ description: 'Roon\'s Focus panel: what the library \u2014 or a filtered part of it \u2014 is MADE OF, with counts: genres and sub-genres, labels, artists, composers, producers, decades, star ratings, sample rates and bit depths, live albums, compilations, album types (main release, single, EP, soundtrack \u2026), Roon\'s picks. Same filters as roon_library ("what labels are my five-star albums on", "which decades is my ECM collection from"). Use it for questions ABOUT the library and to find exact genre or label names for roon_library. The panel shows the top twenty of each list; `more` (labels, artists, composers, producers, genres) returns one list in full, optionally narrowed by `search`.',
51629
51652
  inputSchema: { ...FOCUS, more: external_exports.enum(["labels", "artists", "composers", "producers", "genres"]).optional(), search: external_exports.string().optional().describe("With `more`: only names containing this."), limit: limit2(200, 40) },
51630
51653
  annotations: READ2
51631
51654
  }, ({ more: m, search: search2, limit: n, ...f }) => run(() => focus(filters(f), m, search2, n ?? 40)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deep-roon-mcp",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
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>",