@ncukondo/reference-manager 0.25.0 → 0.26.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 (58) hide show
  1. package/README.md +11 -2
  2. package/dist/chunks/{SearchableMultiSelect-B7qEWPDT.js → SearchableMultiSelect-D2IzthN4.js} +2 -2
  3. package/dist/chunks/{SearchableMultiSelect-B7qEWPDT.js.map → SearchableMultiSelect-D2IzthN4.js.map} +1 -1
  4. package/dist/chunks/{action-menu-DD0RtNVD.js → action-menu-DWdoHTFh.js} +3 -3
  5. package/dist/chunks/{action-menu-DD0RtNVD.js.map → action-menu-DWdoHTFh.js.map} +1 -1
  6. package/dist/chunks/checker-CKfdG8Ia.js +170 -0
  7. package/dist/chunks/checker-CKfdG8Ia.js.map +1 -0
  8. package/dist/chunks/crossref-client-Gs75LMVf.js +94 -0
  9. package/dist/chunks/crossref-client-Gs75LMVf.js.map +1 -0
  10. package/dist/chunks/{fix-interaction-BpfMLRNY.js → fix-interaction-DNXbmlPr.js} +79 -20
  11. package/dist/chunks/fix-interaction-DNXbmlPr.js.map +1 -0
  12. package/dist/chunks/{index-QTYx5RaF.js → index-BEQ4YIXx.js} +115 -44
  13. package/dist/chunks/index-BEQ4YIXx.js.map +1 -0
  14. package/dist/chunks/{index-PQkbePWV.js → index-k67fQbe4.js} +3 -3
  15. package/dist/chunks/index-k67fQbe4.js.map +1 -0
  16. package/dist/chunks/{index-D2HsxXnK.js → index-of6eJn8N.js} +10 -4
  17. package/dist/chunks/{index-D2HsxXnK.js.map → index-of6eJn8N.js.map} +1 -1
  18. package/dist/chunks/{index-CYEise6v.js → index-tdmbNN9b.js} +4 -4
  19. package/dist/chunks/{index-CYEise6v.js.map → index-tdmbNN9b.js.map} +1 -1
  20. package/dist/chunks/metadata-comparator-C5zfoYdK.js +137 -0
  21. package/dist/chunks/metadata-comparator-C5zfoYdK.js.map +1 -0
  22. package/dist/chunks/{pubmed-client-J18fg3fG.js → pubmed-client-CGReJIOz.js} +2 -2
  23. package/dist/chunks/{pubmed-client-J18fg3fG.js.map → pubmed-client-CGReJIOz.js.map} +1 -1
  24. package/dist/chunks/{reference-select-Qpgt9cbN.js → reference-select-i1Cnmc16.js} +3 -3
  25. package/dist/chunks/{reference-select-Qpgt9cbN.js.map → reference-select-i1Cnmc16.js.map} +1 -1
  26. package/dist/chunks/{style-select-mEMoWbM2.js → style-select-COnY01qb.js} +3 -3
  27. package/dist/chunks/{style-select-mEMoWbM2.js.map → style-select-COnY01qb.js.map} +1 -1
  28. package/dist/cli/commands/check.d.ts +2 -1
  29. package/dist/cli/commands/check.d.ts.map +1 -1
  30. package/dist/cli/index.d.ts.map +1 -1
  31. package/dist/cli.js +1 -1
  32. package/dist/features/check/checker.d.ts +1 -0
  33. package/dist/features/check/checker.d.ts.map +1 -1
  34. package/dist/features/check/crossref-client.d.ts +16 -0
  35. package/dist/features/check/crossref-client.d.ts.map +1 -1
  36. package/dist/features/check/fix-actions.d.ts +1 -1
  37. package/dist/features/check/fix-actions.d.ts.map +1 -1
  38. package/dist/features/check/fix-interaction.d.ts.map +1 -1
  39. package/dist/features/check/metadata-comparator.d.ts +37 -0
  40. package/dist/features/check/metadata-comparator.d.ts.map +1 -0
  41. package/dist/features/check/metadata-similarity.d.ts +22 -0
  42. package/dist/features/check/metadata-similarity.d.ts.map +1 -0
  43. package/dist/features/check/types.d.ts +6 -1
  44. package/dist/features/check/types.d.ts.map +1 -1
  45. package/dist/features/operations/check.d.ts +1 -0
  46. package/dist/features/operations/check.d.ts.map +1 -1
  47. package/dist/mcp/tools/check.d.ts +1 -0
  48. package/dist/mcp/tools/check.d.ts.map +1 -1
  49. package/dist/server/routes/check.d.ts.map +1 -1
  50. package/dist/server.js +1 -1
  51. package/package.json +1 -1
  52. package/dist/chunks/checker-7pzK2XSC.js +0 -92
  53. package/dist/chunks/checker-7pzK2XSC.js.map +0 -1
  54. package/dist/chunks/crossref-client-DGNz4PNW.js +0 -52
  55. package/dist/chunks/crossref-client-DGNz4PNW.js.map +0 -1
  56. package/dist/chunks/fix-interaction-BpfMLRNY.js.map +0 -1
  57. package/dist/chunks/index-PQkbePWV.js.map +0 -1
  58. package/dist/chunks/index-QTYx5RaF.js.map +0 -1
@@ -5,7 +5,7 @@ import { promises, readFileSync, existsSync, mkdirSync, writeFileSync } from "no
5
5
  import * as os from "node:os";
6
6
  import * as path from "node:path";
7
7
  import path__default, { join, basename, dirname } from "node:path";
8
- import { n as normalizePathForOutput, d as deleteDirectoryIfEmpty, p as parseFilename, i as isReservedRole, e as ensureDirectory, a as addAttachment, R as RESERVED_ROLES, b as generateFilename, c as findFulltextFiles, h as findFulltextFile, j as extensionToFormat, k as fulltextAttach, l as fulltextGet, m as fulltextDiscover, o as fulltextFetch, q as fulltextConvert, r as getExtension, s as getDefaultExportFromCjs, B as BUILTIN_STYLES, t as getFulltextAttachmentTypes, u as startServerWithFileWatcher } from "./index-D2HsxXnK.js";
8
+ import { n as normalizePathForOutput, d as deleteDirectoryIfEmpty, p as parseFilename, i as isReservedRole, e as ensureDirectory, a as addAttachment, R as RESERVED_ROLES, b as generateFilename, c as findFulltextFiles, h as findFulltextFile, j as extensionToFormat, k as fulltextAttach, l as fulltextGet, m as fulltextDiscover, o as fulltextFetch, q as fulltextConvert, r as getExtension, s as getDefaultExportFromCjs, B as BUILTIN_STYLES, t as getFulltextAttachmentTypes, u as startServerWithFileWatcher } from "./index-of6eJn8N.js";
9
9
  import { readFile, unlink, stat, readdir, rename } from "node:fs/promises";
10
10
  import { o as openWithSystemApp, l as loadConfig, e as getDefaultCurrentDirConfigFilename, h as getDefaultUserConfigPath } from "./loader-B-fte1uv.js";
11
11
  import { spawn, spawnSync } from "node:child_process";
@@ -19,7 +19,7 @@ import "@citation-js/plugin-csl";
19
19
  import { ZodOptional as ZodOptional$2, z } from "zod";
20
20
  import { serve } from "@hono/node-server";
21
21
  const name = "@ncukondo/reference-manager";
22
- const version$1 = "0.25.0";
22
+ const version$1 = "0.26.0";
23
23
  const description$1 = "A local reference management tool using CSL-JSON as the single source of truth";
24
24
  const packageJson = {
25
25
  name,
@@ -902,15 +902,15 @@ class OperationsLibrary {
902
902
  }
903
903
  // High-level operations
904
904
  async search(options) {
905
- const { searchReferences } = await import("./index-D2HsxXnK.js").then((n) => n.E);
905
+ const { searchReferences } = await import("./index-of6eJn8N.js").then((n) => n.E);
906
906
  return searchReferences(this.library, options);
907
907
  }
908
908
  async list(options) {
909
- const { listReferences } = await import("./index-D2HsxXnK.js").then((n) => n.D);
909
+ const { listReferences } = await import("./index-of6eJn8N.js").then((n) => n.D);
910
910
  return listReferences(this.library, options ?? {});
911
911
  }
912
912
  async cite(options) {
913
- const { citeReferences } = await import("./index-D2HsxXnK.js").then((n) => n.C);
913
+ const { citeReferences } = await import("./index-of6eJn8N.js").then((n) => n.C);
914
914
  const defaultStyle = options.defaultStyle ?? this.citationConfig?.defaultStyle;
915
915
  const cslDirectory = options.cslDirectory ?? this.citationConfig?.cslDirectory;
916
916
  const mergedOptions = {
@@ -921,36 +921,36 @@ class OperationsLibrary {
921
921
  return citeReferences(this.library, mergedOptions);
922
922
  }
923
923
  async import(inputs, options) {
924
- const { addReferences } = await import("./index-D2HsxXnK.js").then((n) => n.z);
924
+ const { addReferences } = await import("./index-of6eJn8N.js").then((n) => n.z);
925
925
  return addReferences(inputs, this.library, options ?? {});
926
926
  }
927
927
  async check(options) {
928
- const { checkReferences } = await import("./index-D2HsxXnK.js").then((n) => n.A);
928
+ const { checkReferences } = await import("./index-of6eJn8N.js").then((n) => n.A);
929
929
  return checkReferences(this.library, options);
930
930
  }
931
931
  // Attachment operations
932
932
  async attachAdd(options) {
933
- const { addAttachment: addAttachment2 } = await import("./index-PQkbePWV.js");
933
+ const { addAttachment: addAttachment2 } = await import("./index-k67fQbe4.js");
934
934
  return addAttachment2(this.library, options);
935
935
  }
936
936
  async attachList(options) {
937
- const { listAttachments: listAttachments2 } = await import("./index-PQkbePWV.js");
937
+ const { listAttachments: listAttachments2 } = await import("./index-k67fQbe4.js");
938
938
  return listAttachments2(this.library, options);
939
939
  }
940
940
  async attachGet(options) {
941
- const { getAttachment: getAttachment2 } = await import("./index-PQkbePWV.js");
941
+ const { getAttachment: getAttachment2 } = await import("./index-k67fQbe4.js");
942
942
  return getAttachment2(this.library, options);
943
943
  }
944
944
  async attachDetach(options) {
945
- const { detachAttachment: detachAttachment2 } = await import("./index-PQkbePWV.js");
945
+ const { detachAttachment: detachAttachment2 } = await import("./index-k67fQbe4.js");
946
946
  return detachAttachment2(this.library, options);
947
947
  }
948
948
  async attachSync(options) {
949
- const { syncAttachments: syncAttachments2 } = await import("./index-PQkbePWV.js");
949
+ const { syncAttachments: syncAttachments2 } = await import("./index-k67fQbe4.js");
950
950
  return syncAttachments2(this.library, options);
951
951
  }
952
952
  async attachOpen(options) {
953
- const { openAttachment: openAttachment2 } = await import("./index-PQkbePWV.js");
953
+ const { openAttachment: openAttachment2 } = await import("./index-k67fQbe4.js");
954
954
  return openAttachment2(this.library, options);
955
955
  }
956
956
  }
@@ -1806,7 +1806,7 @@ function getAttachExitCode(result) {
1806
1806
  }
1807
1807
  async function executeInteractiveSelect$2(context, config2) {
1808
1808
  const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
1809
- const { selectReferencesOrExit } = await import("./reference-select-Qpgt9cbN.js");
1809
+ const { selectReferencesOrExit } = await import("./reference-select-i1Cnmc16.js");
1810
1810
  const allReferences = await context.library.getAll();
1811
1811
  const identifiers = await withAlternateScreen2(
1812
1812
  () => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
@@ -2312,9 +2312,12 @@ function buildCheckOptions(options, appConfig) {
2312
2312
  if (options.days !== void 0) {
2313
2313
  opOptions.skipDays = options.days;
2314
2314
  }
2315
- if (options.noSave) {
2315
+ if (options.save === false) {
2316
2316
  opOptions.save = false;
2317
2317
  }
2318
+ if (options.metadata === false) {
2319
+ opOptions.metadata = false;
2320
+ }
2318
2321
  if (appConfig) {
2319
2322
  const pubmed = {};
2320
2323
  if (appConfig.pubmed.email) pubmed.email = appConfig.pubmed.email;
@@ -2332,45 +2335,109 @@ async function executeCheck(options, context, appConfig) {
2332
2335
  function getStatusLabel(result) {
2333
2336
  if (result.status === "skipped") return "[SKIPPED]";
2334
2337
  if (result.status === "ok") return "[OK]";
2335
- const finding = result.findings[0];
2336
- if (!finding) return "[WARNING]";
2337
- switch (finding.type) {
2338
+ if (result.findings.length === 0) return "[WARNING]";
2339
+ const priorityOrder = {
2340
+ retracted: 0,
2341
+ concern: 1,
2342
+ version_changed: 2,
2343
+ metadata_mismatch: 3,
2344
+ metadata_outdated: 4
2345
+ };
2346
+ let highestPriority = Number.MAX_SAFE_INTEGER;
2347
+ let highestType = "unknown";
2348
+ for (const finding of result.findings) {
2349
+ const priority = priorityOrder[finding.type] ?? 99;
2350
+ if (priority < highestPriority) {
2351
+ highestPriority = priority;
2352
+ highestType = finding.type;
2353
+ }
2354
+ }
2355
+ switch (highestType) {
2338
2356
  case "retracted":
2339
2357
  return "[RETRACTED]";
2340
2358
  case "concern":
2341
2359
  return "[CONCERN]";
2342
2360
  case "version_changed":
2343
2361
  return "[VERSION]";
2344
- case "metadata_changed":
2345
- return "[METADATA]";
2362
+ case "metadata_mismatch":
2363
+ return "[MISMATCH]";
2364
+ case "metadata_outdated":
2365
+ return "[OUTDATED]";
2346
2366
  default:
2347
2367
  return "[WARNING]";
2348
2368
  }
2349
2369
  }
2350
- function formatFindingDetails(finding) {
2370
+ function formatFieldDiff(diff) {
2371
+ const local = diff.local ?? "(none)";
2372
+ const remote = diff.remote ?? "(none)";
2373
+ return ` ${diff.field}: "${local}" → "${remote}"`;
2374
+ }
2375
+ function formatFindingDetails(finding, refId) {
2351
2376
  const lines = [];
2352
- lines.push(` ${finding.message}`);
2353
- if (finding.details?.retractionDoi) {
2354
- lines.push(` Retraction notice: https://doi.org/${finding.details.retractionDoi}`);
2377
+ if (finding.details?.fieldDiffs && finding.details.fieldDiffs.length > 0) {
2378
+ for (const diff of finding.details.fieldDiffs) {
2379
+ lines.push(formatFieldDiff(diff));
2380
+ }
2355
2381
  }
2356
- if (finding.details?.newDoi) {
2357
- lines.push(` New DOI: https://doi.org/${finding.details.newDoi}`);
2382
+ if (finding.type === "metadata_mismatch" || finding.type === "metadata_outdated") {
2383
+ const icon = finding.type === "metadata_mismatch" ? "⚠" : "ℹ";
2384
+ lines.push(` ${icon} ${finding.message}`);
2385
+ lines.push(` → Run: ref update ${refId}`);
2386
+ } else {
2387
+ lines.push(` ${finding.message}`);
2388
+ if (finding.details?.retractionDoi) {
2389
+ lines.push(` Retraction notice: https://doi.org/${finding.details.retractionDoi}`);
2390
+ }
2391
+ if (finding.details?.newDoi) {
2392
+ lines.push(` New DOI: https://doi.org/${finding.details.newDoi}`);
2393
+ }
2358
2394
  }
2359
2395
  return lines;
2360
2396
  }
2397
+ const FINDING_TYPE_KEYS = {
2398
+ retracted: "retracted",
2399
+ concern: "concern",
2400
+ metadata_mismatch: "mismatch",
2401
+ metadata_outdated: "outdated",
2402
+ version_changed: "versionChanged"
2403
+ };
2404
+ function countFindingTypes(result) {
2405
+ const counts = {};
2406
+ const allFindings = result.results.flatMap((r) => r.findings);
2407
+ for (const f of allFindings) {
2408
+ const key = FINDING_TYPE_KEYS[f.type] ?? f.type;
2409
+ counts[key] = (counts[key] ?? 0) + 1;
2410
+ }
2411
+ return counts;
2412
+ }
2361
2413
  function formatCheckTextOutput(result) {
2362
2414
  const lines = [];
2363
2415
  for (const r of result.results) {
2364
2416
  const label = getStatusLabel(r);
2365
2417
  lines.push(`${label} ${r.id}`);
2366
2418
  for (const finding of r.findings) {
2367
- lines.push(...formatFindingDetails(finding));
2419
+ lines.push(...formatFindingDetails(finding, r.id));
2368
2420
  }
2369
2421
  lines.push("");
2370
2422
  }
2371
2423
  const { summary } = result;
2372
2424
  const parts = [`${summary.total} checked`];
2373
- if (summary.warnings > 0) parts.push(`${summary.warnings} warning(s)`);
2425
+ const fc = countFindingTypes(result);
2426
+ const summaryItems = [
2427
+ ["retracted", "retracted"],
2428
+ ["concern", "concern"],
2429
+ ["mismatch", "mismatch"],
2430
+ ["outdated", "outdated"],
2431
+ ["versionChanged", "version changed"]
2432
+ ];
2433
+ const knownKeys = new Set(summaryItems.map(([key]) => key));
2434
+ for (const [key, label] of summaryItems) {
2435
+ const count = fc[key] ?? 0;
2436
+ if (count > 0) parts.push(`${count} ${label}`);
2437
+ }
2438
+ for (const [key, count] of Object.entries(fc)) {
2439
+ if (!knownKeys.has(key) && count > 0) parts.push(`${count} ${key}`);
2440
+ }
2374
2441
  if (summary.ok > 0) parts.push(`${summary.ok} ok`);
2375
2442
  if (summary.skipped > 0) parts.push(`${summary.skipped} skipped`);
2376
2443
  lines.push(`Summary: ${parts.join(", ")}`);
@@ -2404,7 +2471,7 @@ async function handleCheckAction(identifiers, options, globalOpts) {
2404
2471
  const jsonOptions = buildJsonOptionsFromRefs(options, outputFormat, result, allRefs);
2405
2472
  outputCheckResult(result, outputFormat, jsonOptions);
2406
2473
  if (options.fix && result.summary.warnings > 0 && allRefs) {
2407
- const { runFixInteraction } = await import("./fix-interaction-BpfMLRNY.js");
2474
+ const { runFixInteraction } = await import("./fix-interaction-DNXbmlPr.js");
2408
2475
  const findItem = (id2) => allRefs.find((item) => item.id === id2);
2409
2476
  const fixResult = await runFixInteraction(result.results, context.library, findItem);
2410
2477
  const removedSuffix = fixResult.removed.length > 0 ? `, ${fixResult.removed.length} removed` : "";
@@ -2472,7 +2539,7 @@ function outputCheckError(error, format2) {
2472
2539
  }
2473
2540
  async function selectReferencesInteractively(context, config2) {
2474
2541
  const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
2475
- const { selectReferenceItemsOrExit } = await import("./reference-select-Qpgt9cbN.js");
2542
+ const { selectReferenceItemsOrExit } = await import("./reference-select-i1Cnmc16.js");
2476
2543
  const allReferences = await context.library.getAll();
2477
2544
  if (allReferences.length === 0) {
2478
2545
  process.stderr.write("No references in library.\n");
@@ -2540,8 +2607,8 @@ function getCiteExitCode(result) {
2540
2607
  }
2541
2608
  async function executeInteractiveCite(options, context, config2) {
2542
2609
  const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
2543
- const { runCiteFlow } = await import("./index-CYEise6v.js");
2544
- const { buildStyleChoices, listCustomStyles } = await import("./style-select-mEMoWbM2.js");
2610
+ const { runCiteFlow } = await import("./index-tdmbNN9b.js");
2611
+ const { buildStyleChoices, listCustomStyles } = await import("./style-select-COnY01qb.js");
2545
2612
  const { search } = await import("./file-watcher-Dlx0PolG.js").then((n) => n.B);
2546
2613
  const { tokenize } = await import("./file-watcher-Dlx0PolG.js").then((n) => n.A);
2547
2614
  const { checkTTY } = await import("./tty-BMyaEOhX.js");
@@ -7142,7 +7209,7 @@ function formatEditOutput(result) {
7142
7209
  }
7143
7210
  async function executeInteractiveEdit(options, context, config2) {
7144
7211
  const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
7145
- const { selectReferencesOrExit } = await import("./reference-select-Qpgt9cbN.js");
7212
+ const { selectReferencesOrExit } = await import("./reference-select-i1Cnmc16.js");
7146
7213
  const allReferences = await context.library.getAll();
7147
7214
  const identifiers = await withAlternateScreen2(
7148
7215
  () => selectReferencesOrExit(allReferences, { multiSelect: true }, config2.cli.tui)
@@ -10683,7 +10750,7 @@ function getFulltextExitCode(result) {
10683
10750
  }
10684
10751
  async function executeInteractiveSelect$1(context, config2) {
10685
10752
  const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
10686
- const { selectReferencesOrExit } = await import("./reference-select-Qpgt9cbN.js");
10753
+ const { selectReferencesOrExit } = await import("./reference-select-i1Cnmc16.js");
10687
10754
  const allReferences = await context.library.getAll();
10688
10755
  const identifiers = await withAlternateScreen2(
10689
10756
  () => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
@@ -31561,7 +31628,8 @@ function registerCheckTool(server, getLibraryOperations) {
31561
31628
  ids: z.array(z.string()).optional().describe("Array of reference IDs to check. Omit if using 'all'."),
31562
31629
  all: z.boolean().optional().describe("Check all references in library"),
31563
31630
  skipDays: z.number().optional().describe("Skip references checked within n days (default: 7)"),
31564
- save: z.boolean().optional().describe("Whether to save results to library (default: true)")
31631
+ save: z.boolean().optional().describe("Whether to save results to library (default: true)"),
31632
+ metadata: z.boolean().optional().describe("Compare metadata against remote sources (default: true)")
31565
31633
  }
31566
31634
  },
31567
31635
  async (args) => {
@@ -31571,6 +31639,7 @@ function registerCheckTool(server, getLibraryOperations) {
31571
31639
  if (args.all) options.all = true;
31572
31640
  if (args.skipDays !== void 0) options.skipDays = args.skipDays;
31573
31641
  if (args.save !== void 0) options.save = args.save;
31642
+ if (args.metadata !== void 0) options.metadata = args.metadata;
31574
31643
  const result = await libraryOps.check(options);
31575
31644
  const text = formatCheckResult(result);
31576
31645
  return {
@@ -32031,7 +32100,7 @@ async function mcpStart(options) {
32031
32100
  async function executeRemove(options, context) {
32032
32101
  const { identifier, idType = "id", fulltextDirectory, deleteFulltext = false } = options;
32033
32102
  if (context.mode === "local" && deleteFulltext && fulltextDirectory) {
32034
- const { removeReference } = await import("./index-D2HsxXnK.js").then((n) => n.x);
32103
+ const { removeReference } = await import("./index-of6eJn8N.js").then((n) => n.x);
32035
32104
  return removeReference(context.library, {
32036
32105
  identifier,
32037
32106
  idType,
@@ -32086,7 +32155,7 @@ Continue?`;
32086
32155
  }
32087
32156
  async function executeInteractiveRemove(context, config2) {
32088
32157
  const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
32089
- const { selectReferenceItemsOrExit } = await import("./reference-select-Qpgt9cbN.js");
32158
+ const { selectReferenceItemsOrExit } = await import("./reference-select-i1Cnmc16.js");
32090
32159
  const allReferences = await context.library.getAll();
32091
32160
  const selectedItems = await withAlternateScreen2(
32092
32161
  () => selectReferenceItemsOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
@@ -32311,7 +32380,7 @@ async function executeInteractiveSearch(options, context, config2) {
32311
32380
  validateInteractiveOptions(options);
32312
32381
  const { checkTTY } = await import("./tty-BMyaEOhX.js");
32313
32382
  const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
32314
- const { runSearchFlow } = await import("./index-CYEise6v.js");
32383
+ const { runSearchFlow } = await import("./index-tdmbNN9b.js");
32315
32384
  const { search } = await import("./file-watcher-Dlx0PolG.js").then((n) => n.B);
32316
32385
  const { tokenize } = await import("./file-watcher-Dlx0PolG.js").then((n) => n.A);
32317
32386
  checkTTY();
@@ -32330,7 +32399,7 @@ async function executeInteractiveSearch(options, context, config2) {
32330
32399
  })
32331
32400
  );
32332
32401
  if (result.selectedItems && !result.cancelled) {
32333
- const { isSideEffectAction } = await import("./action-menu-DD0RtNVD.js");
32402
+ const { isSideEffectAction } = await import("./action-menu-DWdoHTFh.js");
32334
32403
  if (isSideEffectAction(result.action)) {
32335
32404
  await executeSideEffectAction(result.action, result.selectedItems, context, config2);
32336
32405
  return { output: "", cancelled: false, action: result.action };
@@ -32733,7 +32802,7 @@ function formatUpdateOutput(result, identifier) {
32733
32802
  }
32734
32803
  async function executeInteractiveUpdate(context, config2) {
32735
32804
  const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
32736
- const { selectReferencesOrExit } = await import("./reference-select-Qpgt9cbN.js");
32805
+ const { selectReferencesOrExit } = await import("./reference-select-i1Cnmc16.js");
32737
32806
  const allReferences = await context.library.getAll();
32738
32807
  const identifiers = await withAlternateScreen2(
32739
32808
  () => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
@@ -33028,7 +33097,7 @@ function getUrlExitCode(result) {
33028
33097
  }
33029
33098
  async function executeInteractiveSelect(context, config2) {
33030
33099
  const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
33031
- const { selectReferencesOrExit } = await import("./reference-select-Qpgt9cbN.js");
33100
+ const { selectReferencesOrExit } = await import("./reference-select-i1Cnmc16.js");
33032
33101
  const allReferences = await context.library.getAll();
33033
33102
  const identifiers = await withAlternateScreen2(
33034
33103
  () => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
@@ -33561,7 +33630,7 @@ function shouldAutoFetch(cliFlag, configEnabled) {
33561
33630
  return configEnabled;
33562
33631
  }
33563
33632
  async function performAutoFetch(addedItems, context, config2) {
33564
- const { fulltextFetch: fulltextFetch2 } = await import("./index-D2HsxXnK.js").then((n) => n.w);
33633
+ const { fulltextFetch: fulltextFetch2 } = await import("./index-of6eJn8N.js").then((n) => n.w);
33565
33634
  const fetchResults = await autoFetchFulltext(addedItems, context, {
33566
33635
  fulltextConfig: config2.fulltext,
33567
33636
  fulltextDirectory: config2.attachments.directory,
@@ -33642,7 +33711,9 @@ function registerEditCommand(program) {
33642
33711
  });
33643
33712
  }
33644
33713
  function registerCheckCommand(program) {
33645
- program.command("check").description("Check references for retractions, expressions of concern, and version changes").argument("[ids...]", "Citation keys or UUIDs to check (interactive selection if omitted)").option("--all", "Check all references in library").option("--search <query>", "Check references matching search query").option("--uuid", "Interpret identifiers as UUIDs").option("-o, --output <format>", "Output format: text|json", "text").option("--full", "Include full details in JSON output").option("--no-save", "Report only, do not save results to library").option("--days <n>", "Skip references checked within n days (default: 7)", Number.parseInt).option("--fix", "Interactive repair for findings (TTY only)").action(async (ids, options) => {
33714
+ program.command("check").description(
33715
+ "Check references for retractions, expressions of concern, version changes, and metadata drift"
33716
+ ).argument("[ids...]", "Citation keys or UUIDs to check (interactive selection if omitted)").option("--all", "Check all references in library").option("--search <query>", "Check references matching search query").option("--uuid", "Interpret identifiers as UUIDs").option("-o, --output <format>", "Output format: text|json", "text").option("--full", "Include full details in JSON output").option("--no-save", "Report only, do not save results to library").option("--days <n>", "Skip references checked within n days (default: 7)", Number.parseInt).option("--fix", "Interactive repair for findings (TTY only)").option("--no-metadata", "Skip metadata comparison against remote sources").action(async (ids, options) => {
33646
33717
  await handleCheckAction(ids, options, program.opts());
33647
33718
  });
33648
33719
  }
@@ -33845,4 +33916,4 @@ export {
33845
33916
  restoreStdinAfterInk as r,
33846
33917
  syncAttachments as s
33847
33918
  };
33848
- //# sourceMappingURL=index-QTYx5RaF.js.map
33919
+ //# sourceMappingURL=index-BEQ4YIXx.js.map