fluncle 0.142.0 → 0.144.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 +58 -2
  2. package/package.json +1 -1
package/bin/fluncle.mjs CHANGED
@@ -561,7 +561,7 @@ function parseVersion(version) {
561
561
  var currentVersion;
562
562
  var init_version = __esm(() => {
563
563
  init_output();
564
- currentVersion = "0.142.0".trim() ? "0.142.0".trim() : "0.1.0";
564
+ currentVersion = "0.144.0".trim() ? "0.144.0".trim() : "0.1.0";
565
565
  });
566
566
 
567
567
  // src/update-notifier.ts
@@ -2189,7 +2189,7 @@ function parseVersion2(version) {
2189
2189
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
2190
2190
  var init_version2 = __esm(() => {
2191
2191
  init_output();
2192
- currentVersion2 = "0.142.0".trim() ? "0.142.0".trim() : "0.1.0";
2192
+ currentVersion2 = "0.144.0".trim() ? "0.144.0".trim() : "0.1.0";
2193
2193
  });
2194
2194
 
2195
2195
  // ../../packages/registry/src/index.ts
@@ -5715,9 +5715,12 @@ var init_admin_notes = __esm(() => {
5715
5715
  // src/commands/admin-catalogue.ts
5716
5716
  var exports_admin_catalogue = {};
5717
5717
  __export(exports_admin_catalogue, {
5718
+ setTrackDismissedCommand: () => setTrackDismissedCommand,
5719
+ flagWrongAudioCommand: () => flagWrongAudioCommand,
5718
5720
  crawlStatusCommand: () => crawlStatusCommand,
5719
5721
  crawlCatalogueCommand: () => crawlCatalogueCommand,
5720
5722
  clearWrongAudioCommand: () => clearWrongAudioCommand,
5723
+ certifyTrackCommand: () => certifyTrackCommand,
5721
5724
  catalogueRankCommand: () => catalogueRankCommand,
5722
5725
  catalogueListCommand: () => catalogueListCommand
5723
5726
  });
@@ -5739,6 +5742,23 @@ async function clearWrongAudioCommand(trackId) {
5739
5742
  trackId
5740
5743
  });
5741
5744
  }
5745
+ async function flagWrongAudioCommand(trackId) {
5746
+ return adminApiPost("/api/admin/catalogue/wrong-audio/flag", {
5747
+ trackId
5748
+ });
5749
+ }
5750
+ async function certifyTrackCommand(trackId, note) {
5751
+ return adminApiPost("/api/admin/catalogue/certify", {
5752
+ ...note ? { note } : {},
5753
+ trackId
5754
+ });
5755
+ }
5756
+ async function setTrackDismissedCommand(trackId, dismissed) {
5757
+ return adminApiPut("/api/admin/catalogue/dismissed", {
5758
+ dismissed,
5759
+ trackId
5760
+ });
5761
+ }
5742
5762
  async function crawlCatalogueCommand(limit, maxHop, dryRun) {
5743
5763
  const params = new URLSearchParams({ limit: String(limit), maxHop: String(maxHop) });
5744
5764
  if (dryRun) {
@@ -8814,6 +8834,42 @@ function addAdminCommands(program2) {
8814
8834
  }
8815
8835
  console.log(cleared ? `Kept ${trackId}. Its audio re-embeds and rejoins the ranking on the next sweep.` : `${trackId} was not quarantined \u2014 nothing to clear.`);
8816
8836
  });
8837
+ catalogue.command("flag-wrong-audio").description("Flag a finding's captured audio as the wrong recording (operator)").argument("<trackId>", "The finding's track id whose capture is wrong").option("--json", "Print JSON", false).action(async (trackId, options) => {
8838
+ const { flagWrongAudioCommand: flagWrongAudioCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
8839
+ const { flagged } = await flagWrongAudioCommand2(trackId);
8840
+ if (options.json) {
8841
+ printJson({ flagged, ok: true });
8842
+ return;
8843
+ }
8844
+ console.log(flagged ? `Flagged ${trackId}. Its vector is out of the ranking and a fresh capture is queued (the bad bytes are hash-rejected).` : `${trackId} is not a captured finding \u2014 nothing to flag.`);
8845
+ });
8846
+ catalogue.command("certify").description("Certify an existing catalogue track in place \u2014 mint its finding (operator)").argument("<trackId>", "The catalogue track id to log").option("--note <note>", "An optional editorial note to mint onto the finding").option("--json", "Print JSON", false).action(async (trackId, options) => {
8847
+ const { certifyTrackCommand: certifyTrackCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
8848
+ const { logId } = await certifyTrackCommand2(trackId, options.note);
8849
+ if (options.json) {
8850
+ printJson({ logId, ok: true });
8851
+ return;
8852
+ }
8853
+ console.log(`Logged ${trackId} \u2014 ${logId}. Enrichment is running; finish it in the admin.`);
8854
+ });
8855
+ catalogue.command("dismiss").description("Take a catalogue track out of the ranking + capture ladder \u2014 'not for me' (operator)").argument("<trackId>", "The catalogue track id to dismiss").option("--json", "Print JSON", false).action(async (trackId, options) => {
8856
+ const { setTrackDismissedCommand: setTrackDismissedCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
8857
+ const { changed } = await setTrackDismissedCommand2(trackId, true);
8858
+ if (options.json) {
8859
+ printJson({ changed, ok: true });
8860
+ return;
8861
+ }
8862
+ console.log(changed ? `Dismissed ${trackId}. It leaves the ranking and the capture ladder; restore it any time.` : `${trackId} was not a live catalogue row \u2014 nothing dismissed.`);
8863
+ });
8864
+ catalogue.command("restore").description("Put a dismissed catalogue track back into the ranking (operator)").argument("<trackId>", "The catalogue track id to restore").option("--json", "Print JSON", false).action(async (trackId, options) => {
8865
+ const { setTrackDismissedCommand: setTrackDismissedCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
8866
+ const { changed } = await setTrackDismissedCommand2(trackId, false);
8867
+ if (options.json) {
8868
+ printJson({ changed, ok: true });
8869
+ return;
8870
+ }
8871
+ console.log(changed ? `Restored ${trackId}. It re-enters the ranking on the next sweep.` : `${trackId} was not dismissed \u2014 nothing to restore.`);
8872
+ });
8817
8873
  catalogue.command("crawl").description("Run one bounded, resumable pass of the catalogue crawler").option("--dry-run", "Report the seed plan and write nothing at all", false).option("--limit <limit>", "Frontier nodes to expand this pass", "10").option("--max-hop <maxHop>", "Graph distance from a seed label (0-3)", "2").option("--json", "Print JSON", false).action(async (options) => {
8818
8874
  const { crawlCatalogueCommand: crawlCatalogueCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
8819
8875
  await runCrawlCatalogue(options, crawlCatalogueCommand2);
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.142.0"
34
+ "version": "0.144.0"
35
35
  }