fluncle 0.285.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 +19 -10
  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.285.0".trim() ? "0.285.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.285.0".trim() ? "0.285.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
@@ -35669,7 +35673,7 @@ JSON field reference:
35669
35673
  await Promise.resolve().then(() => init_preview_archive());
35670
35674
  await runTrackPreviewArchive(idOrLogId, options, previewArchiveUploadCommand);
35671
35675
  });
35672
- 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) => {
35673
35677
  if (options.queue) {
35674
35678
  await Promise.resolve().then(() => init_admin_tracks2());
35675
35679
  await runAdminObserveQueue(options, observeQueueCommand);
@@ -36103,7 +36107,7 @@ JSON field reference:
36103
36107
  }
36104
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).`);
36105
36109
  });
36106
- 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) => {
36107
36111
  await Promise.resolve().then(() => init_admin_catalogue2());
36108
36112
  await runCatalogueList(options, catalogueListCommand);
36109
36113
  });
@@ -36665,8 +36669,8 @@ async function runTrackObserve(idOrLogId, options, trackObserveCommand) {
36665
36669
  throw new Error("--duration-ms must be a positive integer");
36666
36670
  }
36667
36671
  const durationTargetSec = options.durationTargetSec === undefined ? undefined : Number.parseInt(options.durationTargetSec, 10);
36668
- if (durationTargetSec !== undefined && (!Number.isInteger(durationTargetSec) || durationTargetSec < 1)) {
36669
- 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");
36670
36674
  }
36671
36675
  const result = await trackObserveCommand(idOrLogId, {
36672
36676
  contextNote: options.contextNote,
@@ -36681,6 +36685,11 @@ async function runTrackObserve(idOrLogId, options, trackObserveCommand) {
36681
36685
  printJson2(result);
36682
36686
  return;
36683
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
+ }
36684
36693
  console.log(`Recorded observation for ${result.logId}`);
36685
36694
  console.log(` audio: ${result.audioUrl}`);
36686
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.285.0"
34
+ "version": "0.286.0"
35
35
  }