fluncle 0.287.0 → 0.289.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 +59 -52
  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.287.0".trim() ? "0.287.0".trim() : "0.1.0";
707
+ currentVersion = "0.289.0".trim() ? "0.289.0".trim() : "0.1.0";
708
708
  });
709
709
 
710
710
  // src/update-notifier.ts
@@ -10528,6 +10528,18 @@ function coordinate2(track) {
10528
10528
  function artistTitle(track) {
10529
10529
  return `${track.artists.join(", ")} — ${track.title}`;
10530
10530
  }
10531
+ function isTerminalControl(code) {
10532
+ return code < 32 && code !== 9 && code !== 10 || code >= 127 && code <= 159;
10533
+ }
10534
+ function terminalSafe(value) {
10535
+ let safe = "";
10536
+ for (const character of value) {
10537
+ if (!isTerminalControl(character.codePointAt(0) ?? 0)) {
10538
+ safe += character;
10539
+ }
10540
+ }
10541
+ return safe;
10542
+ }
10531
10543
  var COORD_FALLBACK3 = "—";
10532
10544
  var init_format = __esm(() => {
10533
10545
  init_util();
@@ -11145,7 +11157,7 @@ function parseVersion2(version) {
11145
11157
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
11146
11158
  var init_version2 = __esm(() => {
11147
11159
  init_output();
11148
- currentVersion2 = "0.287.0".trim() ? "0.287.0".trim() : "0.1.0";
11160
+ currentVersion2 = "0.289.0".trim() ? "0.289.0".trim() : "0.1.0";
11149
11161
  });
11150
11162
 
11151
11163
  // ../../packages/registry/src/index.ts
@@ -11306,7 +11318,7 @@ var init_src = __esm(() => {
11306
11318
  {
11307
11319
  discoveryUrl: `${SITE}/llms.txt`,
11308
11320
  exposedContent: [
11309
- "/artists — one A–Z index of every drum & bass artist Fluncle holds",
11321
+ "/artists — one index of every drum & bass artist Fluncle holds, most tracks first by default (A–Z and latest-release orders too)",
11310
11322
  "/artist/:slug — one artist's page: its findings, its identity links, and the rest of its catalogue"
11311
11323
  ],
11312
11324
  kind: "web_route",
@@ -11319,12 +11331,12 @@ var init_src = __esm(() => {
11319
11331
  {
11320
11332
  discoveryUrl: `${SITE}/llms.txt`,
11321
11333
  exposedContent: [
11322
- "/labels — one A–Z index of every drum & bass record label Fluncle holds",
11334
+ "/labels — one index of every drum & bass record label Fluncle holds, most tracks first by default (A–Z and latest-release orders too)",
11323
11335
  "/label/:slug — one label: its findings, the artists on it, and the rest of its catalogue"
11324
11336
  ],
11325
11337
  kind: "web_route",
11326
11338
  name: "web.labels",
11327
- operatorNotes: "The label half of the graph (log ↔ artist ↔ label ↔ album). The INDEX is probeable (always 200); the slug page is not, so the probe targets /labels. /labels is ONE unified A–Z index of every label Fluncle holds (certified lit, catalogue unlit), paged behind ?page=N. A label below the renderable-track floor renders noindex + stays out of the sitemap (the ARTIST_INDEX_MIN_FINDINGS precedent). The page is BLIND to the label's crawl seed_state — that is crawl scope, never storage (docs/label-entity.md); the operator's ruling station is /admin/labels.",
11339
+ operatorNotes: "The label half of the graph (log ↔ artist ↔ label ↔ album). The INDEX is probeable (always 200); the slug page is not, so the probe targets /labels. /labels is ONE unified index of every label Fluncle holds (certified lit, catalogue unlit), paged behind ?page=N. A label below the renderable-track floor renders noindex + stays out of the sitemap (the ARTIST_INDEX_MIN_FINDINGS precedent). The page is BLIND to the label's crawl seed_state — that is crawl scope, never storage (docs/label-entity.md); the operator's ruling station is /admin/labels.",
11328
11340
  probeConfig: { cadenceMs: PROBE_CADENCE_MS, kind: "http", timeoutMs: PROBE_TIMEOUT_MS },
11329
11341
  route: "/labels",
11330
11342
  url: `${SITE}/labels`,
@@ -11333,7 +11345,7 @@ var init_src = __esm(() => {
11333
11345
  {
11334
11346
  discoveryUrl: `${SITE}/llms.txt`,
11335
11347
  exposedContent: [
11336
- "/albums — one alphabetical index of every drum & bass album Fluncle holds",
11348
+ "/albums — one index of every drum & bass album Fluncle holds, most tracks first by default (A–Z and latest-release orders too)",
11337
11349
  "/album/:slug — one record: its findings, its artists, its label, and the rest of its tracklist"
11338
11350
  ],
11339
11351
  kind: "web_route",
@@ -17864,13 +17876,6 @@ function _boolean(Class, params) {
17864
17876
  ...normalizeParams(params)
17865
17877
  });
17866
17878
  }
17867
- function _coercedBoolean(Class, params) {
17868
- return new Class({
17869
- type: "boolean",
17870
- coerce: true,
17871
- ...normalizeParams(params)
17872
- });
17873
- }
17874
17879
  function _null2(Class, params) {
17875
17880
  return new Class({
17876
17881
  type: "null",
@@ -20408,9 +20413,6 @@ var init_iso = __esm(() => {
20408
20413
  function number5(params) {
20409
20414
  return _coercedNumber(ZodNumber, params);
20410
20415
  }
20411
- function boolean4(params) {
20412
- return _coercedBoolean(ZodBoolean, params);
20413
- }
20414
20416
  var init_coerce = __esm(() => {
20415
20417
  init_core3();
20416
20418
  init_schemas2();
@@ -20508,7 +20510,7 @@ var init_admin_catalogue = __esm(() => {
20508
20510
  summary: "One tick of the catalogue ranking sweep (nearest finding + capture priority)",
20509
20511
  tags: ["Admin"]
20510
20512
  }).input(object({
20511
- countRemaining: boolean4().default(false),
20513
+ countRemaining: boolean3().default(false),
20512
20514
  limit: number5().int().min(1).max(1000).default(250)
20513
20515
  })).output(object({
20514
20516
  ok: literal(true),
@@ -22090,7 +22092,7 @@ var init_admin_artists = __esm(() => {
22090
22092
  summary: "One tick of the similar-artists sweep (artist centroids + top-K edges)",
22091
22093
  tags: ["Admin"]
22092
22094
  }).input(object({
22093
- countRemaining: boolean4().default(false),
22095
+ countRemaining: boolean3().default(false),
22094
22096
  limit: number5().int().min(1).max(1000).default(50)
22095
22097
  })).output(object({
22096
22098
  ok: literal(true),
@@ -22627,9 +22629,9 @@ var init_admin_backfills = __esm(() => {
22627
22629
  query: object({
22628
22630
  cursor: string4().optional(),
22629
22631
  dryRun: string4().optional(),
22630
- kind: string4().optional(),
22632
+ kind: _enum(["album", "artist"]).optional(),
22631
22633
  limit: string4().optional(),
22632
- retry: string4().optional()
22634
+ retry: _enum(["none"]).optional()
22633
22635
  })
22634
22636
  })).output(object({
22635
22637
  dryRun: boolean3(),
@@ -22641,8 +22643,8 @@ var init_admin_backfills = __esm(() => {
22641
22643
  noneCount: number4(),
22642
22644
  ok: literal(true),
22643
22645
  rateLimited: boolean3(),
22644
- requeued: array2(string4()).optional(),
22645
- requeuedCount: number4().optional(),
22646
+ requeued: array2(string4()),
22647
+ requeuedCount: number4(),
22646
22648
  resolved: array2(string4()),
22647
22649
  resolvedCount: number4()
22648
22650
  }));
@@ -22779,7 +22781,7 @@ var init_admin_bios = __esm(() => {
22779
22781
  });
22780
22782
 
22781
22783
  // ../../packages/contracts/src/orpc/admin-costs.ts
22782
- var CostStep, CostVendor, CostUnitType, CostBasis, CostSource, CostEventInputSchema, MAX_COST_EVENTS_PER_BATCH = 500, recordCost, adminCostsContract;
22784
+ var CostStep, CostVendor, CostUnitType, CostBasis, CostSource, COST_EVENT_LOG_ID_MAX = 64, COST_EVENT_TRACK_ID_MAX = 256, COST_EVENT_MODEL_MAX = 256, COST_EVENT_TIMESTAMP_MAX = 64, COST_EVENT_ID_MAX = 1024, CostEventInputSchema, MAX_COST_EVENTS_PER_BATCH = 500, recordCost, adminCostsContract;
22783
22785
  var init_admin_costs = __esm(() => {
22784
22786
  init_dist4();
22785
22787
  init_zod();
@@ -22813,14 +22815,14 @@ var init_admin_costs = __esm(() => {
22813
22815
  CostSource = _enum(["measured", "estimated"]);
22814
22816
  CostEventInputSchema = object({
22815
22817
  costBasis: CostBasis,
22816
- id: string4().min(1),
22817
- logId: string4().nullish(),
22818
- model: string4().nullish(),
22819
- occurredAt: string4().min(1),
22818
+ id: string4().min(1).max(COST_EVENT_ID_MAX),
22819
+ logId: string4().max(COST_EVENT_LOG_ID_MAX).nullish(),
22820
+ model: string4().max(COST_EVENT_MODEL_MAX).nullish(),
22821
+ occurredAt: string4().min(1).max(COST_EVENT_TIMESTAMP_MAX),
22820
22822
  quantity: number4(),
22821
22823
  source: CostSource,
22822
22824
  step: CostStep,
22823
- trackId: string4().nullish(),
22825
+ trackId: string4().max(COST_EVENT_TRACK_ID_MAX).nullish(),
22824
22826
  unitType: CostUnitType,
22825
22827
  usd: number4().nullish(),
22826
22828
  vendor: CostVendor
@@ -24296,7 +24298,7 @@ var init_admin_indexnow = __esm(() => {
24296
24298
  });
24297
24299
 
24298
24300
  // ../../packages/contracts/src/orpc/admin-label-outliers.ts
24299
- var MAX_RECORDED_LABEL_OUTLIERS = 2000, MAX_LABEL_OUTLIER_DISMISSALS = 500, LabelOutlierReferenceSchema, RecordedLabelOutlierSchema, LabelOutlierRunSchema, AlertedLabelOutlierSchema, PendingLabelOutlierAlertSchema, recordLabelOutliers, acknowledgeLabelOutlierAlerts, LabelOutlierTrackSchema, LabelOutlierItemSchema, listLabelOutliers, setLabelOutliersDismissed, LabelOutlierInputTrackSchema, LabelOutlierInputAlbumSchema, listLabelOutlierInputs, adminLabelOutliersContract;
24301
+ var MAX_RECORDED_LABEL_OUTLIERS = 2000, MAX_LABEL_OUTLIER_DISMISSALS = 500, LABEL_OUTLIER_TIMESTAMP_MAX = 64, LabelOutlierReferenceSchema, RecordedLabelOutlierSchema, LabelOutlierRunSchema, AlertedLabelOutlierSchema, PendingLabelOutlierAlertSchema, recordLabelOutliers, acknowledgeLabelOutlierAlerts, LabelOutlierTrackSchema, LabelOutlierItemSchema, listLabelOutliers, setLabelOutliersDismissed, LabelOutlierInputTrackSchema, LabelOutlierInputAlbumSchema, listLabelOutlierInputs, adminLabelOutliersContract;
24300
24302
  var init_admin_label_outliers = __esm(() => {
24301
24303
  init_dist4();
24302
24304
  init_zod();
@@ -24341,7 +24343,7 @@ var init_admin_label_outliers = __esm(() => {
24341
24343
  }).input(object({
24342
24344
  labelsScored: number4().int().min(0),
24343
24345
  outliers: array2(RecordedLabelOutlierSchema).max(MAX_RECORDED_LABEL_OUTLIERS),
24344
- replicaSyncedAt: string4().nullable(),
24346
+ replicaSyncedAt: string4().max(LABEL_OUTLIER_TIMESTAMP_MAX).nullable(),
24345
24347
  totalFlagged: number4().int().min(0),
24346
24348
  tracksScored: number4().int().min(0),
24347
24349
  unitsScored: number4().int().min(0)
@@ -24799,7 +24801,7 @@ var init_admin_migrations = __esm(() => {
24799
24801
  cursor: string4().optional(),
24800
24802
  dryRun: string4().optional(),
24801
24803
  limit: string4().optional(),
24802
- mode: string4().optional()
24804
+ mode: _enum(["copy", "delete", "verify"]).optional()
24803
24805
  })
24804
24806
  })).output(object({
24805
24807
  blocked: string4().nullable(),
@@ -25044,7 +25046,7 @@ var init_admin_mixtapes = __esm(() => {
25044
25046
  path: "/admin/clips/{clipId}/schedule",
25045
25047
  summary: "Set or override a clip's Instagram drip slot",
25046
25048
  tags: ["Admin"]
25047
- }).input(object({ clipId: string4(), scheduledFor: string4() })).output(object({ ok: literal(true), post: ClipSocialPostSchema }));
25049
+ }).input(object({ clipId: string4(), scheduledFor: string4().datetime({ offset: true }) })).output(object({ ok: literal(true), post: ClipSocialPostSchema }));
25048
25050
  setClipSchedules = oc.route({
25049
25051
  method: "POST",
25050
25052
  operationId: "setClipSchedules",
@@ -26280,7 +26282,7 @@ var init_admin_tracks = __esm(() => {
26280
26282
  count: string4().optional(),
26281
26283
  debtAware: string4().optional(),
26282
26284
  kind: TrackWorkKindSchema,
26283
- limit: number5().int().min(1).max(250).default(50),
26285
+ limit: number5().int().min(1).max(200).default(50),
26284
26286
  paidMode: _enum(["quota", "prior", "unasked"]).optional(),
26285
26287
  scope: TrackWorkScopeSchema.default("all")
26286
26288
  })).output(object({
@@ -26639,7 +26641,7 @@ var init_admin_turso_usage = __esm(() => {
26639
26641
  });
26640
26642
 
26641
26643
  // ../../packages/contracts/src/orpc/admin-twitch.ts
26642
- var LIVE_STATE_TIMESTAMP_MAX = 64, recordLiveState, adminTwitchContract;
26644
+ var LIVE_STATE_TIMESTAMP_MAX = 64, LIVE_STATE_TITLE_MAX = 140, recordLiveState, adminTwitchContract;
26643
26645
  var init_admin_twitch = __esm(() => {
26644
26646
  init_dist4();
26645
26647
  init_zod();
@@ -26653,7 +26655,7 @@ var init_admin_twitch = __esm(() => {
26653
26655
  at: string4().max(LIVE_STATE_TIMESTAMP_MAX).datetime({ offset: true }),
26654
26656
  live: boolean3(),
26655
26657
  startedAt: string4().max(LIVE_STATE_TIMESTAMP_MAX).nullable(),
26656
- title: string4().nullable()
26658
+ title: string4().max(LIVE_STATE_TITLE_MAX).nullable()
26657
26659
  })).output(object({ ok: literal(true) }));
26658
26660
  adminTwitchContract = {
26659
26661
  record_live_state: recordLiveState
@@ -27321,13 +27323,13 @@ var init_me2 = __esm(() => {
27321
27323
  ok: literal(true),
27322
27324
  summary: object({
27323
27325
  credentials: string4(),
27324
- followDigest: string4().optional(),
27325
- follows: string4().optional(),
27326
+ followDigest: string4(),
27327
+ follows: string4(),
27326
27328
  galaxyProgress: string4(),
27327
- preferences: string4().optional(),
27328
- recSeeds: string4().optional(),
27329
+ preferences: string4(),
27330
+ recSeeds: string4(),
27329
27331
  savedFindings: string4(),
27330
- savedSets: string4().optional(),
27332
+ savedSets: string4(),
27331
27333
  sessions: string4(),
27332
27334
  submissions: string4(),
27333
27335
  user: string4(),
@@ -27349,7 +27351,7 @@ var init_me2 = __esm(() => {
27349
27351
  lastWeekKey: string4().nullable(),
27350
27352
  unsubscribedAt: string4().nullable(),
27351
27353
  updatedAt: string4()
27352
- }).nullable().optional(),
27354
+ }).nullable(),
27353
27355
  followDigestDeliveries: array2(object({
27354
27356
  attempts: number4(),
27355
27357
  claimedAt: string4(),
@@ -27358,16 +27360,16 @@ var init_me2 = __esm(() => {
27358
27360
  sentAt: string4().nullable(),
27359
27361
  status: string4(),
27360
27362
  weekKey: string4()
27361
- })).optional(),
27362
- follows: array2(FollowSchema).optional(),
27363
+ })),
27364
+ follows: array2(FollowSchema),
27363
27365
  generatedAt: string4(),
27364
27366
  id: string4(),
27365
27367
  preferences: UserPreferencesSchema,
27366
27368
  privacyNotes: array2(string4()),
27367
27369
  progress: GalaxyProgressSchema,
27368
- recSeeds: array2(RecSeedSchema).optional(),
27370
+ recSeeds: array2(RecSeedSchema),
27369
27371
  savedFindings: array2(SavedFindingSchema),
27370
- savedSets: array2(SavedSetSchema).optional(),
27372
+ savedSets: array2(SavedSetSchema),
27371
27373
  submissions: array2(PrivateSubmissionSchema)
27372
27374
  }),
27373
27375
  ok: literal(true)
@@ -27500,6 +27502,7 @@ var init_me_watches = __esm(() => {
27500
27502
  }).meta({ id: "Watch" });
27501
27503
  SaveWatchBodySchema = looseObject({
27502
27504
  entityId: unknown2().optional(),
27505
+ intent: unknown2().optional(),
27503
27506
  kind: unknown2().optional()
27504
27507
  });
27505
27508
  listPrivateWatches = oc.route({
@@ -30065,7 +30068,7 @@ async function triageSubmissionCommand(submissionId, verdict, options = {}) {
30065
30068
  printJson({ ok: true, submission: response.submission });
30066
30069
  return;
30067
30070
  }
30068
- console.log(`Triaged ${formatTrackLine(response.submission)}: ${response.submission.triageVerdict ?? ""}`);
30071
+ console.log(`Triaged ${formatTrackLine(response.submission)}: ${terminalSafe(response.submission.triageVerdict ?? "")}`);
30069
30072
  }
30070
30073
  async function fetchSubmission(submissionId) {
30071
30074
  const response = await adminApiGet(`/api/v1/admin/submissions/${encodeURIComponent(submissionId)}`);
@@ -30087,16 +30090,16 @@ async function confirm(label) {
30087
30090
  }
30088
30091
  }
30089
30092
  function formatSubmissionSummary(submission) {
30090
- return [
30093
+ return terminalSafe([
30091
30094
  `${submission.id}`,
30092
30095
  `${formatTrackLine(submission)} (${submission.source})`,
30093
30096
  submission.contact ? `Contact: ${submission.contact}` : undefined,
30094
30097
  submission.note ? `Note: ${submission.note}` : undefined
30095
30098
  ].filter(Boolean).join(`
30096
- `);
30099
+ `));
30097
30100
  }
30098
30101
  function formatSubmissionDetail(submission) {
30099
- return [
30102
+ return terminalSafe([
30100
30103
  `${submission.id}`,
30101
30104
  formatTrackLine(submission),
30102
30105
  `Status: ${submission.status}`,
@@ -30106,13 +30109,14 @@ function formatSubmissionDetail(submission) {
30106
30109
  submission.note ? `Note: ${submission.note}` : undefined,
30107
30110
  `Spotify: ${submission.spotifyUrl}`
30108
30111
  ].filter(Boolean).join(`
30109
- `);
30112
+ `));
30110
30113
  }
30111
30114
  function formatTrackLine(submission) {
30112
- return `${submission.artists.join(", ")} — ${submission.title}`;
30115
+ return terminalSafe(`${submission.artists.join(", ")} — ${submission.title}`);
30113
30116
  }
30114
30117
  var init_submissions2 = __esm(() => {
30115
30118
  init_api();
30119
+ init_format();
30116
30120
  init_output();
30117
30121
  init_add2();
30118
30122
  });
@@ -37542,7 +37546,10 @@ async function runBackfillArtistImages(options, backfillArtistImagesCommand) {
37542
37546
  }
37543
37547
  async function runBackfillCoverMasters(options, backfillCoverMastersCommand) {
37544
37548
  const limit = parseListLimit(options.limit);
37545
- const kind = options.kind === "artist" ? "artist" : "album";
37549
+ const kind = options.kind ?? "album";
37550
+ if (kind !== "album" && kind !== "artist") {
37551
+ throw new Error(`--kind must be one of: album, artist (got "${kind}")`);
37552
+ }
37546
37553
  const retryNone = options.retryNone ?? false;
37547
37554
  const resolved = [];
37548
37555
  const none = [];
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.287.0"
34
+ "version": "0.289.0"
35
35
  }