fluncle 0.284.0 → 0.286.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.
Files changed (2) hide show
  1. package/bin/fluncle.mjs +93 -12
  2. package/package.json +1 -1
package/bin/fluncle.mjs CHANGED
@@ -704,7 +704,7 @@ function parseVersion(version) {
704
704
  var currentVersion;
705
705
  var init_version = __esm(() => {
706
706
  init_output();
707
- currentVersion = "0.284.0".trim() ? "0.284.0".trim() : "0.1.0";
707
+ currentVersion = "0.286.0".trim() ? "0.286.0".trim() : "0.1.0";
708
708
  });
709
709
 
710
710
  // src/update-notifier.ts
@@ -11145,7 +11145,7 @@ function parseVersion2(version) {
11145
11145
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
11146
11146
  var init_version2 = __esm(() => {
11147
11147
  init_output();
11148
- currentVersion2 = "0.284.0".trim() ? "0.284.0".trim() : "0.1.0";
11148
+ currentVersion2 = "0.286.0".trim() ? "0.286.0".trim() : "0.1.0";
11149
11149
  });
11150
11150
 
11151
11151
  // ../../packages/registry/src/index.ts
@@ -27236,7 +27236,7 @@ var init_me_sets = __esm(() => {
27236
27236
  path: "/me/saved-sets/{id}",
27237
27237
  summary: "Rename or overwrite a saved set",
27238
27238
  tags: ["Me"]
27239
- }).input(looseObject({ id: string4() })).output(object({ ok: literal(true), savedSet: SavedSetSchema }));
27239
+ }).input(SaveSetBodySchema.extend({ id: string4() })).output(object({ ok: literal(true), savedSet: SavedSetSchema }));
27240
27240
  deletePrivateSavedSet = oc.route({
27241
27241
  method: "DELETE",
27242
27242
  operationId: "deletePrivateSavedSet",
@@ -30281,8 +30281,12 @@ async function catalogueDemandCommand() {
30281
30281
  return response.summary;
30282
30282
  }
30283
30283
  async function catalogueListCommand(options) {
30284
+ const lens = CatalogueLensSchema.safeParse(options.lens ?? "ear");
30285
+ if (!lens.success) {
30286
+ throw new CliError("invalid_lens", `Unknown lens "${options.lens}". Use one of: ${CatalogueLensSchema.options.join(", ")}`);
30287
+ }
30284
30288
  const params = new URLSearchParams;
30285
- params.set("lens", options.lens && CATALOGUE_LENSES.has(options.lens) ? options.lens : "ear");
30289
+ params.set("lens", lens.data);
30286
30290
  if (options.limit) {
30287
30291
  params.set("limit", options.limit);
30288
30292
  }
@@ -30371,10 +30375,10 @@ async function commitCrawlNodesCommand(body) {
30371
30375
  async function crawlStatusCommand() {
30372
30376
  return adminApiGet("/api/v1/admin/catalogue/crawl");
30373
30377
  }
30374
- var CATALOGUE_LENSES;
30375
30378
  var init_admin_catalogue2 = __esm(() => {
30379
+ init_orpc();
30376
30380
  init_api();
30377
- CATALOGUE_LENSES = new Set(["capture", "dismissed", "failed", "quarantine", "unmatched"]);
30381
+ init_output();
30378
30382
  });
30379
30383
 
30380
30384
  // src/commands/admin-reach.ts
@@ -31603,7 +31607,40 @@ function musicbrainzDetailLines(mb) {
31603
31607
  lines.push(` first credits: ${mb.census.firstCredits.map((credit) => `${credit.artistName} (${credit.artistMbid}) ${credit.recordings}`).join("; ")}; uncredited ${mb.census.uncreditedRecordings}`);
31604
31608
  }
31605
31609
  for (const release of mb?.releases?.releases ?? []) {
31606
- lines.push(` release: ${release.artist} — ${release.title}; catno ${release.catno ?? "none"}; ${release.date ?? "undated"}`);
31610
+ lines.push(` release: ${release.artist} — ${release.title}; catno ${release.catno ?? "none"}; ${release.date ?? "undated"}; format ${release.format ?? "unknown"}; status ${release.status ?? "unknown"}; barcode ${release.barcode ?? "none"}`);
31611
+ }
31612
+ return lines;
31613
+ }
31614
+ function discogsDetailLines(discogs) {
31615
+ const lines = [];
31616
+ if (discogs?.label) {
31617
+ lines.push(` profile: ${discogs.label.profile || "none"}`);
31618
+ lines.push(` parent: ${discogs.label.parentLabel ? `${discogs.label.parentLabel.name} (${discogs.label.parentLabel.id})` : "none"}; sublabels: ${discogs.label.sublabels.join(", ") || "none"}`);
31619
+ }
31620
+ if (discogs?.releases) {
31621
+ lines.push(` ${discogs.releases.releaseCount} releases; top artists: ${discogs.releases.topArtists.map((artist) => `${artist.name} ${artist.releases}`).join(", ") || "none"}`);
31622
+ for (const release of discogs.releases.sample) {
31623
+ lines.push(` release: ${release.artist} — ${release.title}; catno ${release.catno ?? "none"}; year ${release.year ?? "unknown"}; format ${release.format ?? "unknown"}`);
31624
+ }
31625
+ }
31626
+ if (discogs?.styles) {
31627
+ lines.push(` genres: ${countLine(discogs.styles.genres, discogs.styles.genres.length) || "none"}`);
31628
+ lines.push(` all styles: ${countLine(discogs.styles.styles, discogs.styles.styles.length) || "none"}`);
31629
+ }
31630
+ return lines;
31631
+ }
31632
+ function beatportDetailLines(beatport) {
31633
+ const lines = [];
31634
+ if (beatport) {
31635
+ lines.push(` subgenres: ${countLine(beatport.subGenres, beatport.subGenres.length) || "none"}`);
31636
+ lines.push(` top artists: ${countLine(beatport.topArtists, beatport.topArtists.length) || "none"}`);
31637
+ }
31638
+ return lines;
31639
+ }
31640
+ function appleDetailLines(apple) {
31641
+ const lines = [];
31642
+ for (const release of apple?.releases ?? []) {
31643
+ lines.push(release.found ? ` Apple match: ${release.mbTitle}; barcode ${release.barcode}; genre ${release.primaryGenreName ?? "unknown"}; artist ${release.artistName ?? "unknown"}; title ${release.collectionName ?? "unknown"}; copyright ${release.copyright ?? "unknown"}` : ` Apple unmatched: ${release.mbTitle}; barcode ${release.barcode}`);
31607
31644
  }
31608
31645
  return lines;
31609
31646
  }
@@ -31628,12 +31665,15 @@ function labelEvidenceLines(evidence) {
31628
31665
  const dg = discogs.data;
31629
31666
  const dgDetail = dg?.styles ? `styles: ${countLine(dg.styles.styles, 6)} (${dg.styles.releasesRead} releases)` : dg?.candidates ? `unverified candidates: ${dg.candidates.map((c) => c.title).join(", ") || "none"}` : discogs.note;
31630
31667
  lines.push(` discogs: ${discogs.status}${dgDetail ? ` — ${dgDetail}` : ""}`);
31668
+ lines.push(...discogsDetailLines(dg));
31631
31669
  const bp = beatport.data;
31632
31670
  const bpDetail = bp ? `${bp.trackCount} tracks; genres: ${bp.genres.slice(0, 5).map((genre) => `${genre.name} ${Math.round(genre.share * 100)}%`).join(", ")}` : beatport.note;
31633
31671
  lines.push(` beatport: ${beatport.status}${bpDetail ? ` — ${bpDetail}` : ""}`);
31672
+ lines.push(...beatportDetailLines(bp));
31634
31673
  const ap = apple.data;
31635
31674
  const apDetail = ap ? `${ap.found}/${ap.looked} found; genres: ${countLine(ap.genres, 4) || "none"}` : apple.note;
31636
31675
  lines.push(` apple: ${apple.status}${apDetail ? ` — ${apDetail}` : ""}`);
31676
+ lines.push(...appleDetailLines(ap));
31637
31677
  for (const failure of evidence.errors) {
31638
31678
  lines.push(` ! ${failure.source}: ${failure.message}`);
31639
31679
  }
@@ -32317,7 +32357,40 @@ function musicbrainzDetailLines2(mb) {
32317
32357
  lines.push(` first credits: ${mb.census.firstCredits.map((credit) => `${credit.artistName} (${credit.artistMbid}) ${credit.recordings}`).join("; ")}; uncredited ${mb.census.uncreditedRecordings}`);
32318
32358
  }
32319
32359
  for (const release of mb?.releases?.releases ?? []) {
32320
- lines.push(` release: ${release.artist} — ${release.title}; catno ${release.catno ?? "none"}; ${release.date ?? "undated"}`);
32360
+ lines.push(` release: ${release.artist} — ${release.title}; catno ${release.catno ?? "none"}; ${release.date ?? "undated"}; format ${release.format ?? "unknown"}; status ${release.status ?? "unknown"}; barcode ${release.barcode ?? "none"}`);
32361
+ }
32362
+ return lines;
32363
+ }
32364
+ function discogsDetailLines2(discogs) {
32365
+ const lines = [];
32366
+ if (discogs?.label) {
32367
+ lines.push(` profile: ${discogs.label.profile || "none"}`);
32368
+ lines.push(` parent: ${discogs.label.parentLabel ? `${discogs.label.parentLabel.name} (${discogs.label.parentLabel.id})` : "none"}; sublabels: ${discogs.label.sublabels.join(", ") || "none"}`);
32369
+ }
32370
+ if (discogs?.releases) {
32371
+ lines.push(` ${discogs.releases.releaseCount} releases; top artists: ${discogs.releases.topArtists.map((artist) => `${artist.name} ${artist.releases}`).join(", ") || "none"}`);
32372
+ for (const release of discogs.releases.sample) {
32373
+ lines.push(` release: ${release.artist} — ${release.title}; catno ${release.catno ?? "none"}; year ${release.year ?? "unknown"}; format ${release.format ?? "unknown"}`);
32374
+ }
32375
+ }
32376
+ if (discogs?.styles) {
32377
+ lines.push(` genres: ${countLine2(discogs.styles.genres, discogs.styles.genres.length) || "none"}`);
32378
+ lines.push(` all styles: ${countLine2(discogs.styles.styles, discogs.styles.styles.length) || "none"}`);
32379
+ }
32380
+ return lines;
32381
+ }
32382
+ function beatportDetailLines2(beatport) {
32383
+ const lines = [];
32384
+ if (beatport) {
32385
+ lines.push(` subgenres: ${countLine2(beatport.subGenres, beatport.subGenres.length) || "none"}`);
32386
+ lines.push(` top artists: ${countLine2(beatport.topArtists, beatport.topArtists.length) || "none"}`);
32387
+ }
32388
+ return lines;
32389
+ }
32390
+ function appleDetailLines2(apple) {
32391
+ const lines = [];
32392
+ for (const release of apple?.releases ?? []) {
32393
+ lines.push(release.found ? ` Apple match: ${release.mbTitle}; barcode ${release.barcode}; genre ${release.primaryGenreName ?? "unknown"}; artist ${release.artistName ?? "unknown"}; title ${release.collectionName ?? "unknown"}; copyright ${release.copyright ?? "unknown"}` : ` Apple unmatched: ${release.mbTitle}; barcode ${release.barcode}`);
32321
32394
  }
32322
32395
  return lines;
32323
32396
  }
@@ -32342,12 +32415,15 @@ function labelEvidenceLines2(evidence) {
32342
32415
  const dg = discogs.data;
32343
32416
  const dgDetail = dg?.styles ? `styles: ${countLine2(dg.styles.styles, 6)} (${dg.styles.releasesRead} releases)` : dg?.candidates ? `unverified candidates: ${dg.candidates.map((c) => c.title).join(", ") || "none"}` : discogs.note;
32344
32417
  lines.push(` discogs: ${discogs.status}${dgDetail ? ` — ${dgDetail}` : ""}`);
32418
+ lines.push(...discogsDetailLines2(dg));
32345
32419
  const bp = beatport.data;
32346
32420
  const bpDetail = bp ? `${bp.trackCount} tracks; genres: ${bp.genres.slice(0, 5).map((genre) => `${genre.name} ${Math.round(genre.share * 100)}%`).join(", ")}` : beatport.note;
32347
32421
  lines.push(` beatport: ${beatport.status}${bpDetail ? ` — ${bpDetail}` : ""}`);
32422
+ lines.push(...beatportDetailLines2(bp));
32348
32423
  const ap = apple.data;
32349
32424
  const apDetail = ap ? `${ap.found}/${ap.looked} found; genres: ${countLine2(ap.genres, 4) || "none"}` : apple.note;
32350
32425
  lines.push(` apple: ${apple.status}${apDetail ? ` — ${apDetail}` : ""}`);
32426
+ lines.push(...appleDetailLines2(ap));
32351
32427
  for (const failure of evidence.errors) {
32352
32428
  lines.push(` ! ${failure.source}: ${failure.message}`);
32353
32429
  }
@@ -35597,7 +35673,7 @@ JSON field reference:
35597
35673
  await Promise.resolve().then(() => init_preview_archive());
35598
35674
  await runTrackPreviewArchive(idOrLogId, options, previewArchiveUploadCommand);
35599
35675
  });
35600
- adminTrack.command("observe").description("Render Fluncle's spoken field observation for a track (Cartesia, Worker-side)").argument("[idOrLogId]").option("--queue", "Show the observe worklist (notes but no observation yet), oldest first", false).option("--limit <limit>", "Number of findings to show with --queue", "10").option("--script <text>", "The voice-gated observation script (the spoken text)").option("--script-file <file>", "Read the observation script from a file (e.g. observation.txt)").option("--voice-id <id>", "Override the configured Cartesia voice id").option("--duration-ms <ms>", "Probed audio duration in ms (else derived from word timestamps)").option("--duration-target-sec <sec>", "Target observation length in seconds (20\u201345)").option("--context-note <text>", "Pre-fetched factual context (else the Worker firecrawls)").option("--prompt-version <n>", "The prompt-registry version that authored this (the sweep sends it; it is the artifact's provenance)").option("--force", "Re-render even if an observation already exists (voice re-tune / fix)", false).option("--json", "Print JSON", false).allowExcessArguments().action(async (idOrLogId, options) => {
35676
+ adminTrack.command("observe").description("Render Fluncle's spoken field observation for a track (Cartesia, Worker-side)").argument("[idOrLogId]").option("--queue", "Show the observe worklist (notes but no observation yet), oldest first", false).option("--limit <limit>", "Number of findings to show with --queue", "10").option("--script <text>", "The voice-gated observation script (the spoken text)").option("--script-file <file>", "Read the observation script from a file (e.g. observation.txt)").option("--voice-id <id>", "Override the configured Cartesia voice id").option("--duration-ms <ms>", "Probed audio duration in ms (else derived from word timestamps)").option("--duration-target-sec <sec>", "Target observation length in seconds (aim for 20\u201345; accepts 5\u201390)").option("--context-note <text>", "Pre-fetched factual context (else the Worker firecrawls)").option("--prompt-version <n>", "The prompt-registry version that authored this (the sweep sends it; it is the artifact's provenance)").option("--force", "Re-render even if an observation already exists (voice re-tune / fix)", false).option("--json", "Print JSON", false).allowExcessArguments().action(async (idOrLogId, options) => {
35601
35677
  if (options.queue) {
35602
35678
  await Promise.resolve().then(() => init_admin_tracks2());
35603
35679
  await runAdminObserveQueue(options, observeQueueCommand);
@@ -36031,7 +36107,7 @@ JSON field reference:
36031
36107
  }
36032
36108
  console.log(`Read ${summary.pagesRead} page(s) over ${summary.window.start}\u2026${summary.window.end}. Demanded ${summary.demandedArtists} artist(s) + ${summary.demandedLabels} label(s) (${summary.unknownSlugs} unknown skipped); scored ${summary.tracksScored} track(s), promoted ${summary.frontierPromoted} frontier node(s).`);
36033
36109
  });
36034
- catalogue.command("list").description("The ranked catalogue: closest to a finding (ear), next to capture, or wrong audio").option("--lens <lens>", "ear (default), capture, quarantine, unmatched, failed, or dismissed", "ear").option("--limit <limit>", "Rows (default 50, max 200)").option("--json", "Print JSON", false).action(async (options) => {
36110
+ catalogue.command("list").description("The ranked catalogue: closest to a finding (ear), next to capture, or wrong audio").option("--lens <lens>", "ear (default), capture, long, quarantine, unmatched, failed, or dismissed", "ear").option("--limit <limit>", "Rows (default 50, max 200)").option("--json", "Print JSON", false).action(async (options) => {
36035
36111
  await Promise.resolve().then(() => init_admin_catalogue2());
36036
36112
  await runCatalogueList(options, catalogueListCommand);
36037
36113
  });
@@ -36593,8 +36669,8 @@ async function runTrackObserve(idOrLogId, options, trackObserveCommand) {
36593
36669
  throw new Error("--duration-ms must be a positive integer");
36594
36670
  }
36595
36671
  const durationTargetSec = options.durationTargetSec === undefined ? undefined : Number.parseInt(options.durationTargetSec, 10);
36596
- if (durationTargetSec !== undefined && (!Number.isInteger(durationTargetSec) || durationTargetSec < 1)) {
36597
- throw new Error("--duration-target-sec must be a positive integer");
36672
+ if (durationTargetSec !== undefined && (!Number.isInteger(durationTargetSec) || durationTargetSec < 5 || durationTargetSec > 90)) {
36673
+ throw new Error("--duration-target-sec must be a whole number from 5 to 90");
36598
36674
  }
36599
36675
  const result = await trackObserveCommand(idOrLogId, {
36600
36676
  contextNote: options.contextNote,
@@ -36609,6 +36685,11 @@ async function runTrackObserve(idOrLogId, options, trackObserveCommand) {
36609
36685
  printJson2(result);
36610
36686
  return;
36611
36687
  }
36688
+ if (result.skipped) {
36689
+ console.log(`${result.logId} already has an observation; pass --force to record over it`);
36690
+ console.log(` audio: ${result.audioUrl}`);
36691
+ return;
36692
+ }
36612
36693
  console.log(`Recorded observation for ${result.logId}`);
36613
36694
  console.log(` audio: ${result.audioUrl}`);
36614
36695
  console.log(` length: ${Math.round(result.durationMs / 1000)}s`);
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  "url": "git+https://github.com/mauricekleine/fluncle.git"
32
32
  },
33
33
  "type": "module",
34
- "version": "0.284.0"
34
+ "version": "0.286.0"
35
35
  }