fluncle 0.171.0 → 0.172.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 +39 -3
  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.171.0".trim() ? "0.171.0".trim() : "0.1.0";
564
+ currentVersion = "0.172.0".trim() ? "0.172.0".trim() : "0.1.0";
565
565
  });
566
566
 
567
567
  // src/update-notifier.ts
@@ -2259,7 +2259,7 @@ function parseVersion2(version) {
2259
2259
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
2260
2260
  var init_version2 = __esm(() => {
2261
2261
  init_output();
2262
- currentVersion2 = "0.171.0".trim() ? "0.171.0".trim() : "0.1.0";
2262
+ currentVersion2 = "0.172.0".trim() ? "0.172.0".trim() : "0.1.0";
2263
2263
  });
2264
2264
 
2265
2265
  // ../../packages/registry/src/index.ts
@@ -3499,6 +3499,24 @@ var init_src = __esm(() => {
3499
3499
  title: "Reach snapshot",
3500
3500
  weights: { status: "secondary" }
3501
3501
  },
3502
+ {
3503
+ command: "fluncle admin catalogue demand",
3504
+ exposedContent: [
3505
+ "nightly demand reorder — reads Simple Analytics pageviews for /artist + /label pages and reorders crawl/capture priority toward what real visitors looked at (--no-agent)"
3506
+ ],
3507
+ kind: "cron",
3508
+ name: "cron.demand",
3509
+ operatorNotes: "04:40 Amsterdam daily (just after the 04:00 reach snapshot — both daily analytics reads in one window). A bare trigger (the reach/rank shape): fires the AGENT-tier record_demand op once — the WORKER reads Simple Analytics for the /artist/<slug> + /label/<slug> pageviews over the trailing 30 days and REWRITES two derived reorder columns, tracks.demand_score (the capture queue's within-tier secondary sort) and crawl_frontier.demand_rank (the frontier pick's within-hop tiebreak). RANK-ORDER ONLY: it reorders within a tier and never overrides the capture_priority veto (a ruled-out label is never resurrected); the seed-allowlist crawl gate is untouched. Clear-then-set, so a same-window re-run is idempotent. Unprovisioned (no SIMPLE_ANALYTICS_API_KEY) it returns configured:false and is a clean no-op. Zero LLM tokens; the box's agent token drives it and the SA key lives Worker-side (no new box secret). Source: docs/agents/hermes/scripts/demand-sweep.*. See docs/catalogue-crawler.md § Demand.",
3510
+ probeConfig: {
3511
+ cadenceMs: 24 * 60 * MINUTE_MS,
3512
+ cronName: "fluncle-demand",
3513
+ kind: "cron",
3514
+ schedule: { time: "04:40", tz: "Europe/Amsterdam" }
3515
+ },
3516
+ statusDescription: "leans the catalogue toward what visitors looked at",
3517
+ title: "Demand reorder",
3518
+ weights: { status: "hidden" }
3519
+ },
3502
3520
  {
3503
3521
  exposedContent: [
3504
3522
  "daily catalogue-funnel snapshot — one row per UTC day of stage totals + queue depths + frontier counts behind /admin/funnel (--no-agent)"
@@ -6180,13 +6198,18 @@ __export(exports_admin_catalogue, {
6180
6198
  clearWrongAudioCommand: () => clearWrongAudioCommand,
6181
6199
  certifyTrackCommand: () => certifyTrackCommand,
6182
6200
  catalogueRankCommand: () => catalogueRankCommand,
6183
- catalogueListCommand: () => catalogueListCommand
6201
+ catalogueListCommand: () => catalogueListCommand,
6202
+ catalogueDemandCommand: () => catalogueDemandCommand
6184
6203
  });
6185
6204
  async function catalogueRankCommand(options) {
6186
6205
  const limit = options.limit ? Number.parseInt(options.limit, 10) : undefined;
6187
6206
  const response = await adminApiPost("/api/admin/catalogue/rank", limit ? { limit } : {});
6188
6207
  return { summary: response.summary, telescope: response.telescope };
6189
6208
  }
6209
+ async function catalogueDemandCommand() {
6210
+ const response = await adminApiPost("/api/admin/catalogue/demand", {});
6211
+ return response.summary;
6212
+ }
6190
6213
  async function catalogueListCommand(options) {
6191
6214
  const params = new URLSearchParams;
6192
6215
  params.set("lens", options.lens && CATALOGUE_LENSES.has(options.lens) ? options.lens : "ear");
@@ -9470,6 +9493,19 @@ function addAdminCommands(program2) {
9470
9493
  const { catalogueRankCommand: catalogueRankCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
9471
9494
  await runCatalogueRank(options, catalogueRankCommand2);
9472
9495
  });
9496
+ catalogue.command("demand").description("Reorder crawl/capture priority from Simple Analytics pageviews (one tick)").option("--json", "Print JSON", false).action(async (options) => {
9497
+ const { catalogueDemandCommand: catalogueDemandCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
9498
+ const summary = await catalogueDemandCommand2();
9499
+ if (options.json) {
9500
+ printJson({ ok: true, summary });
9501
+ return;
9502
+ }
9503
+ if (!summary.configured) {
9504
+ console.log("Simple Analytics is not configured \u2014 demand left untouched (a clean no-op).");
9505
+ return;
9506
+ }
9507
+ 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).`);
9508
+ });
9473
9509
  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) => {
9474
9510
  const { catalogueListCommand: catalogueListCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
9475
9511
  await runCatalogueList(options, catalogueListCommand2);
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.171.0"
34
+ "version": "0.172.0"
35
35
  }