@autorag/librarian 2.13.9 → 2.13.10

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.
package/dist/index.js CHANGED
@@ -3668,20 +3668,30 @@ var init_bundle = __esm(() => {
3668
3668
  });
3669
3669
 
3670
3670
  // src/filesystem/path-exclusions.ts
3671
- import { posix as posix2, win32 as win322 } from "node:path";
3671
+ import { matchesGlob, posix as posix2, win32 as win322 } from "node:path";
3672
+ function isGlobExclusion(entry) {
3673
+ return /[*?[]/u.test(entry);
3674
+ }
3675
+ function matchesGlobExclusion(path, glob) {
3676
+ const slashed = path.replaceAll("\\", "/");
3677
+ if (matchesGlob(slashed, glob))
3678
+ return true;
3679
+ return glob.startsWith("**/") && matchesGlob(slashed, glob.slice(3));
3680
+ }
3672
3681
  function createPathExclusionMatcher(excludedPaths, platform = process.platform) {
3673
3682
  const paths = platform === "win32" ? win322 : posix2;
3674
3683
  const normalize = (path) => {
3675
3684
  const absolute = paths.resolve(path);
3676
3685
  return platform === "win32" ? absolute.toLowerCase() : absolute;
3677
3686
  };
3678
- const excluded = excludedPaths.map((path) => {
3687
+ const globs = excludedPaths.filter(isGlobExclusion).map((glob) => platform === "win32" ? glob.toLowerCase() : glob);
3688
+ const excluded = excludedPaths.filter((path) => !isGlobExclusion(path)).map((path) => {
3679
3689
  const absolute = normalize(path);
3680
3690
  return { absolute, prefix: absolute.endsWith(paths.sep) ? absolute : `${absolute}${paths.sep}` };
3681
3691
  });
3682
3692
  return (path) => {
3683
3693
  const absolute = normalize(path);
3684
- return excluded.some((entry) => absolute === entry.absolute || absolute.startsWith(entry.prefix));
3694
+ return excluded.some((entry) => absolute === entry.absolute || absolute.startsWith(entry.prefix)) || globs.some((glob) => matchesGlobExclusion(absolute, glob));
3685
3695
  };
3686
3696
  }
3687
3697
  var init_path_exclusions = () => {};
@@ -10333,7 +10343,7 @@ var init_cloud = __esm(() => {
10333
10343
  // src/mirror/sync.ts
10334
10344
  import { createHash as createHash11 } from "node:crypto";
10335
10345
  import { opendir, readFile, stat as stat3 } from "node:fs/promises";
10336
- import { basename as basename9, dirname as dirname12, extname as extname6, join as join27, resolve as resolve11, sep as sep6 } from "node:path";
10346
+ import { basename as basename9, dirname as dirname12, extname as extname6, join as join27, resolve as resolve11 } from "node:path";
10337
10347
  import { setTimeout as sleep3 } from "node:timers/promises";
10338
10348
  function errorCode(error) {
10339
10349
  if (!(error instanceof Error))
@@ -10880,13 +10890,14 @@ function normalizeExtension2(extension) {
10880
10890
  return lower.startsWith(".") ? lower : `.${lower}`;
10881
10891
  }
10882
10892
  function isPathExcluded(sourcePath, excluded) {
10883
- if (excluded === undefined)
10893
+ if (excluded === undefined || excluded.size === 0)
10884
10894
  return false;
10885
- for (const excludedPath of excluded) {
10886
- if (sourcePath === excludedPath || sourcePath.startsWith(`${excludedPath}${sep6}`))
10887
- return true;
10895
+ let matcher = matcherBySet.get(excluded);
10896
+ if (matcher === undefined) {
10897
+ matcher = createPathExclusionMatcher([...excluded]);
10898
+ matcherBySet.set(excluded, matcher);
10888
10899
  }
10889
- return false;
10900
+ return matcher(sourcePath);
10890
10901
  }
10891
10902
  function walkLimits(options) {
10892
10903
  return {
@@ -11053,10 +11064,11 @@ async function collectFiles(state, directory, depth) {
11053
11064
  warnDirectoryUnreadable(state, directory, code);
11054
11065
  }
11055
11066
  }
11056
- var DEFAULT_MAX_SOURCE_BYTES, DEFAULT_MAX_DELETE_RATIO = 0.3, MASS_DELETE_FLOOR = 100, DEFAULT_MAX_SCANNED_ENTRIES = 2000000, DEFAULT_MAX_WALK_DEPTH = 64, DEFAULT_MIRROR_BATCH_SIZE = 25, PRODUCT_ARTIFACT_FILE_NAMES, SKIP_DIR_NAMES, PARSER_FAILURE_MESSAGE = "The registered parser failed on this file; it was skipped during indexing.", PARSER_CRASH_MESSAGE = "The registered parser crashed unexpectedly on this file; it was skipped during indexing.", DEFAULT_TRANSIENT_RETRIES = 3, DEFAULT_TRANSIENT_BACKOFF_MS = 50, TRANSIENT_ERROR_CODES, WORKSPACE_ERROR_CODES, MirrorWorkspaceError, STANDALONE_OCR_IMAGE_EXTENSIONS, SEARCH_ROOT_UNAVAILABLE_MESSAGES;
11067
+ var DEFAULT_MAX_SOURCE_BYTES, DEFAULT_MAX_DELETE_RATIO = 0.3, MASS_DELETE_FLOOR = 100, DEFAULT_MAX_SCANNED_ENTRIES = 2000000, DEFAULT_MAX_WALK_DEPTH = 64, DEFAULT_MIRROR_BATCH_SIZE = 25, PRODUCT_ARTIFACT_FILE_NAMES, SKIP_DIR_NAMES, PARSER_FAILURE_MESSAGE = "The registered parser failed on this file; it was skipped during indexing.", PARSER_CRASH_MESSAGE = "The registered parser crashed unexpectedly on this file; it was skipped during indexing.", DEFAULT_TRANSIENT_RETRIES = 3, DEFAULT_TRANSIENT_BACKOFF_MS = 50, TRANSIENT_ERROR_CODES, WORKSPACE_ERROR_CODES, MirrorWorkspaceError, STANDALONE_OCR_IMAGE_EXTENSIONS, matcherBySet, SEARCH_ROOT_UNAVAILABLE_MESSAGES;
11057
11068
  var init_sync = __esm(() => {
11058
11069
  init_cli2();
11059
11070
  init_cloud_placeholder();
11071
+ init_path_exclusions();
11060
11072
  init_source_paths();
11061
11073
  init_binary();
11062
11074
  init_stage();
@@ -11115,6 +11127,7 @@ var init_sync = __esm(() => {
11115
11127
  }
11116
11128
  };
11117
11129
  STANDALONE_OCR_IMAGE_EXTENSIONS = new Set(KORDOC_IMAGE_EXTENSIONS);
11130
+ matcherBySet = new WeakMap;
11118
11131
  SEARCH_ROOT_UNAVAILABLE_MESSAGES = {
11119
11132
  gone: "A search root no longer exists; its previously indexed documents were left untouched.",
11120
11133
  "not-a-directory": "A search root is no longer a directory; its previously indexed documents were left untouched.",
@@ -16189,7 +16202,7 @@ var init_automation_profiles = __esm(() => {
16189
16202
 
16190
16203
  // src/automation/config.ts
16191
16204
  import { existsSync as existsSync19, readFileSync as readFileSync14, realpathSync as realpathSync7 } from "node:fs";
16192
- import { basename as basename10, dirname as dirname15, isAbsolute as isAbsolute8, join as join30, matchesGlob, relative as relative5, resolve as resolve12 } from "node:path";
16205
+ import { basename as basename10, dirname as dirname15, isAbsolute as isAbsolute8, join as join30, matchesGlob as matchesGlob2, relative as relative5, resolve as resolve12 } from "node:path";
16193
16206
  function automationsConfigPath(env = process.env) {
16194
16207
  return join30(resolveAutoRAGHome(env), "automations.json");
16195
16208
  }
@@ -16365,9 +16378,9 @@ function deleteAutomation(configPath, id) {
16365
16378
  function globMatches(relPosix, pattern) {
16366
16379
  if (pattern === "**")
16367
16380
  return true;
16368
- if (matchesGlob(relPosix, pattern))
16381
+ if (matchesGlob2(relPosix, pattern))
16369
16382
  return true;
16370
- if (pattern.startsWith("**/") && matchesGlob(relPosix, pattern.slice(3)))
16383
+ if (pattern.startsWith("**/") && matchesGlob2(relPosix, pattern.slice(3)))
16371
16384
  return true;
16372
16385
  return false;
16373
16386
  }
@@ -17164,7 +17177,7 @@ var init_permission_judgment = __esm(() => {
17164
17177
 
17165
17178
  // src/agent/permission-gate.ts
17166
17179
  import { statSync as statSync7 } from "node:fs";
17167
- import { isAbsolute as isAbsolute9, relative as relative6, sep as sep7 } from "node:path";
17180
+ import { isAbsolute as isAbsolute9, relative as relative6, sep as sep6 } from "node:path";
17168
17181
  import { matchesKey } from "@earendil-works/pi-tui";
17169
17182
  function pathExists(path) {
17170
17183
  try {
@@ -17227,7 +17240,7 @@ class PermissionController {
17227
17240
  if (path === root)
17228
17241
  return true;
17229
17242
  const rel = relative6(root, path);
17230
- if (rel !== "" && rel !== ".." && !rel.startsWith(`..${sep7}`) && !isAbsolute9(rel))
17243
+ if (rel !== "" && rel !== ".." && !rel.startsWith(`..${sep6}`) && !isAbsolute9(rel))
17231
17244
  return true;
17232
17245
  }
17233
17246
  return false;
@@ -18679,7 +18692,7 @@ var init_connector = () => {};
18679
18692
  // src/datasource/sidecar/config.ts
18680
18693
  import { readFileSync as readFileSync17 } from "node:fs";
18681
18694
  import { homedir as homedir5 } from "node:os";
18682
- import { dirname as dirname17, isAbsolute as isAbsolute10, join as join34, resolve as resolve14, sep as sep8 } from "node:path";
18695
+ import { dirname as dirname17, isAbsolute as isAbsolute10, join as join34, resolve as resolve14, sep as sep7 } from "node:path";
18683
18696
  import { parse as parseToml } from "smol-toml";
18684
18697
  function resolveSidecarOptions(input) {
18685
18698
  const { connector, workspaceRoot } = input;
@@ -18719,7 +18732,7 @@ function archivePathFromCrawlerConfig(input) {
18719
18732
  function expandHome(path) {
18720
18733
  if (path === "~")
18721
18734
  return homedir5();
18722
- const prefixed = path.startsWith("~/") || sep8 === "\\" && path.startsWith("~\\");
18735
+ const prefixed = path.startsWith("~/") || sep7 === "\\" && path.startsWith("~\\");
18723
18736
  return prefixed ? join34(homedir5(), path.slice(2)) : path;
18724
18737
  }
18725
18738
  var init_config3 = __esm(() => {
@@ -25973,7 +25986,7 @@ import {
25973
25986
  writeFileSync as writeFileSync13
25974
25987
  } from "node:fs";
25975
25988
  import { opendir as opendir2, stat as stat4 } from "node:fs/promises";
25976
- import { basename as basename11, dirname as dirname23, extname as extname8, join as join40, relative as relative7, sep as sep9 } from "node:path";
25989
+ import { basename as basename11, dirname as dirname23, extname as extname8, join as join40, relative as relative7, sep as sep8 } from "node:path";
25977
25990
  function errnoCode2(error) {
25978
25991
  const code = error instanceof Error ? error.code : undefined;
25979
25992
  return typeof code === "string" ? code : "UNKNOWN";
@@ -26043,7 +26056,7 @@ async function listVaultNotes(vaultPath) {
26043
26056
  return { notes, unreadableFolders, collisions };
26044
26057
  }
26045
26058
  function toRelative(vaultPath, path) {
26046
- return relative7(vaultPath, path).split(sep9).join("/").normalize("NFC");
26059
+ return relative7(vaultPath, path).split(sep8).join("/").normalize("NFC");
26047
26060
  }
26048
26061
  function loadStagingState2(statePath) {
26049
26062
  try {
@@ -26127,7 +26140,7 @@ function removeUnexpected(filesRoot, directory, wanted) {
26127
26140
  return removed;
26128
26141
  }
26129
26142
  function toStagedRelative(filesRoot, path) {
26130
- return relative7(filesRoot, path).split(sep9).join("/").normalize("NFC");
26143
+ return relative7(filesRoot, path).split(sep8).join("/").normalize("NFC");
26131
26144
  }
26132
26145
  var NOTE_EXTENSIONS, SKIPPED_DIRECTORIES, MAX_WALK_DEPTH = 64, VaultUnavailableError;
26133
26146
  var init_staging = __esm(() => {
@@ -28048,7 +28061,7 @@ function resolveExcludePaths(value, origin) {
28048
28061
  if (!Array.isArray(value) || value.some((path) => typeof path !== "string" || path.length === 0)) {
28049
28062
  throw new ConfigError("Config field 'excludePaths' must be a non-empty string array");
28050
28063
  }
28051
- return resolveSearchPaths(value, origin);
28064
+ return value.map((entry) => isGlobExclusion(entry) ? entry : resolvePersistedPath(entry, origin));
28052
28065
  }
28053
28066
  function resolvePersistedPath(path, origin) {
28054
28067
  return isAbsolute11(path) ? path : resolve15(origin, path);
@@ -29353,6 +29366,7 @@ var init_config5 = __esm(() => {
29353
29366
  init_factory();
29354
29367
  init_embedding();
29355
29368
  init_file_lock();
29369
+ init_path_exclusions();
29356
29370
  init_language();
29357
29371
  init_atomic_write();
29358
29372
  init_rerank();
@@ -38606,7 +38620,7 @@ var init_web_search_tool = __esm(() => {
38606
38620
  // src/agent/agent.ts
38607
38621
  import { randomUUID as randomUUID7 } from "node:crypto";
38608
38622
  import { existsSync as existsSync34, watch as fsWatch, mkdirSync as mkdirSync24, realpathSync as realpathSync8, statSync as statSync11, writeFileSync as writeFileSync17 } from "node:fs";
38609
- import { basename as basename15, dirname as dirname27, join as join55, relative as relative8, resolve as resolve18, sep as sep10 } from "node:path";
38623
+ import { basename as basename15, dirname as dirname27, join as join55, relative as relative8, resolve as resolve18, sep as sep9 } from "node:path";
38610
38624
  import { clampThinkingLevel } from "@earendil-works/pi-ai/compat";
38611
38625
  import { getAgentDir as getAgentDir6, keyText } from "@earendil-works/pi-coding-agent";
38612
38626
  function describeDecisionModel(status) {
@@ -41279,7 +41293,7 @@ ${this.discoveryHint((tools) => `When exploring local files and folders, activel
41279
41293
  return { ok: false, reason: "cloud-root-skipped", stdout: "", stderr: "", code: null };
41280
41294
  }
41281
41295
  const canonicalSourcePath = canonicalPath(sourcePath);
41282
- const exclude = scope.nestedCloudRoots.map((root) => relative8(canonicalSourcePath, root.path).split(sep10).join("/")).filter((pattern) => pattern !== "" && !pattern.startsWith(".."));
41296
+ const exclude = scope.nestedCloudRoots.map((root) => relative8(canonicalSourcePath, root.path).split(sep9).join("/")).filter((pattern) => pattern !== "" && !pattern.startsWith(".."));
41283
41297
  return client.prepare(sourcePath, { ...options, ...exclude.length === 0 ? {} : { exclude } });
41284
41298
  }));
41285
41299
  }
@@ -41793,6 +41807,8 @@ function toMinSyncReasonDiagnostic(reason) {
41793
41807
  };
41794
41808
  }
41795
41809
  function pinExcludedPath(path) {
41810
+ if (isGlobExclusion(path))
41811
+ return path;
41796
41812
  const resolvedPath = resolve18(path);
41797
41813
  try {
41798
41814
  return join55(realpathSync8(dirname27(resolvedPath)), basename15(resolvedPath));
@@ -41841,6 +41857,7 @@ var init_agent = __esm(() => {
41841
41857
  init_embedding();
41842
41858
  init_everything();
41843
41859
  init_cloud_placeholder();
41860
+ init_path_exclusions();
41844
41861
  init_fsearch();
41845
41862
  init_diagnostics();
41846
41863
  init_jikji();
@@ -42058,6 +42075,12 @@ class AutoRAGLite {
42058
42075
  getMemorySchema() {
42059
42076
  return structuredClone(this.memory.getSchema());
42060
42077
  }
42078
+ convertFiles(request, signal) {
42079
+ return this.agent.convertFiles(request, signal);
42080
+ }
42081
+ listFileConversions(from, signal) {
42082
+ return this.agent.listFileConversions(from, signal);
42083
+ }
42061
42084
  }
42062
42085
  function createAutoRAGLite(options = {}) {
42063
42086
  const input = { flags: options.flags ?? {} };
@@ -42927,7 +42950,7 @@ import { z as z4 } from "zod";
42927
42950
  // src/filesystem/name-search.ts
42928
42951
  import { realpathSync as realpathSync9 } from "node:fs";
42929
42952
  import { lstat as lstat2, readdir as readdir5 } from "node:fs/promises";
42930
- import { basename as basename16, dirname as dirname28, isAbsolute as isAbsolute14, join as join56, relative as relative9, resolve as resolve19, sep as sep11 } from "node:path";
42953
+ import { basename as basename16, dirname as dirname28, isAbsolute as isAbsolute14, join as join56, relative as relative9, resolve as resolve19, sep as sep10 } from "node:path";
42931
42954
  var SKIP_DIR_NAMES2 = {
42932
42955
  ".git": true,
42933
42956
  ".autorag": true,
@@ -42955,7 +42978,7 @@ function fsErrorCode(error) {
42955
42978
  return typeof code === "string" ? code : undefined;
42956
42979
  }
42957
42980
  function isContained(childReal, parentReal) {
42958
- const prefix = parentReal.endsWith(sep11) ? parentReal : `${parentReal}${sep11}`;
42981
+ const prefix = parentReal.endsWith(sep10) ? parentReal : `${parentReal}${sep10}`;
42959
42982
  return childReal === parentReal || childReal.startsWith(prefix);
42960
42983
  }
42961
42984
  function pinExcludedPath2(path) {
@@ -42968,14 +42991,14 @@ function pinExcludedPath2(path) {
42968
42991
  }
42969
42992
  function isExcluded2(absPath, excluded) {
42970
42993
  for (const excludedPath of excluded) {
42971
- const prefix = excludedPath.endsWith(sep11) ? excludedPath : `${excludedPath}${sep11}`;
42994
+ const prefix = excludedPath.endsWith(sep10) ? excludedPath : `${excludedPath}${sep10}`;
42972
42995
  if (absPath === excludedPath || absPath.startsWith(prefix))
42973
42996
  return true;
42974
42997
  }
42975
42998
  return false;
42976
42999
  }
42977
43000
  function matchesEntry(context, absPath, name) {
42978
- const haystackRaw = context.matchPath ? relative9(context.rootReal, absPath).split(sep11).join("/") : name;
43001
+ const haystackRaw = context.matchPath ? relative9(context.rootReal, absPath).split(sep10).join("/") : name;
42979
43002
  const haystack = context.matchCase ? haystackRaw : haystackRaw.toLowerCase();
42980
43003
  const needle = context.matchCase ? context.query : context.query.toLowerCase();
42981
43004
  return haystack.includes(needle);
@@ -43116,7 +43139,7 @@ async function filterFileNameSearchMatches(roots, candidates, excludePaths = [])
43116
43139
  continue;
43117
43140
  if (isExcluded2(real, excluded))
43118
43141
  continue;
43119
- const segments = real.split(sep11);
43142
+ const segments = real.split(sep10);
43120
43143
  if (segments.some((segment) => SKIP_DIR_NAMES2[segment] === true))
43121
43144
  continue;
43122
43145
  matches.push({ path: real, type: stat.isDirectory() ? "folder" : "file" });
@@ -43240,6 +43263,16 @@ var evidenceInput = z4.strictObject({
43240
43263
  sessionId: z4.string().trim().min(1),
43241
43264
  resultNumber: z4.number().int().positive().optional()
43242
43265
  });
43266
+ var convertInput = z4.strictObject({
43267
+ inputs: z4.array(z4.string().trim().min(1)).min(1).max(500),
43268
+ to: z4.string().trim().min(1),
43269
+ outputDir: z4.string().trim().min(1).optional(),
43270
+ recursive: z4.boolean().optional(),
43271
+ quality: z4.number().int().min(1).max(100).optional(),
43272
+ keepDates: z4.boolean().optional()
43273
+ });
43274
+ var convertFormatsInput = z4.strictObject({ from: z4.string().trim().min(1).optional() });
43275
+ var MAX_CONVERT_FILES = 200;
43243
43276
  function exactGroupsFromScan(scan) {
43244
43277
  const groups = new Map;
43245
43278
  for (const file of scan.files) {
@@ -43261,6 +43294,26 @@ function jsonResult(value, isError = false) {
43261
43294
  function toolError(code, message, extra = {}) {
43262
43295
  return jsonResult({ ok: false, errorCode: code, message, ...extra }, true);
43263
43296
  }
43297
+ function convertResult(details) {
43298
+ const { result, links } = details;
43299
+ const files = result.files.slice(0, MAX_CONVERT_FILES).map((file) => ({
43300
+ source: file.source,
43301
+ state: file.state,
43302
+ outputs: file.outputs,
43303
+ ...file.error !== undefined ? { error: file.error } : {},
43304
+ ...file.notice !== undefined ? { notice: file.notice } : {}
43305
+ }));
43306
+ const body = {
43307
+ target: result.target,
43308
+ converted: result.converted,
43309
+ skipped: result.skipped,
43310
+ failed: result.failed,
43311
+ files,
43312
+ ...result.files.length > files.length ? { omittedFiles: result.files.length - files.length } : {},
43313
+ links
43314
+ };
43315
+ return result.converted === 0 && result.failed > 0 ? toolError("convert-failed", "No file was converted.", body) : jsonResult({ ok: true, ...body });
43316
+ }
43264
43317
  function isToolEnabled(name, options) {
43265
43318
  return options.tools === undefined || options.tools.includes(name);
43266
43319
  }
@@ -43555,6 +43608,46 @@ function createAutoRAGMcpServer(lite, options = {}) {
43555
43608
  return datasource === undefined ? toolError("datasource-not-found", `No configured datasource named ${datasourceId}.`, { datasourceId }) : jsonResult({ ok: true, datasource });
43556
43609
  });
43557
43610
  }
43611
+ const convertEnabled = lite.config.filee?.enabled !== false;
43612
+ if (convertEnabled && !readOnly && isToolEnabled("autorag.convert", options)) {
43613
+ server.registerTool("autorag.convert", {
43614
+ title: "Convert Files",
43615
+ description: "Convert local files to another format offline with Filee: documents, spreadsheets, slides, HWP/HWPX, images, e-books, archives, audio, video, data. Writes new files next to each source (or into outputDir) and never replaces an existing file: a colliding name gets a number added. Each output is compared with its source by Dupey, so the result says whether the copy would count as a duplicate. Use autorag.convert.formats when unsure what a source can become.",
43616
+ inputSchema: convertInput,
43617
+ outputSchema: objectOutput,
43618
+ annotations: { readOnlyHint: false, idempotentHint: false, destructiveHint: false, openWorldHint: false }
43619
+ }, async ({ inputs, to, outputDir, recursive, quality, keepDates }, ctx) => {
43620
+ try {
43621
+ const details = await lite.convertFiles({
43622
+ inputs,
43623
+ to,
43624
+ ...outputDir !== undefined ? { outputDir } : {},
43625
+ ...recursive !== undefined ? { recursive } : {},
43626
+ ...quality !== undefined ? { quality } : {},
43627
+ ...keepDates !== undefined ? { keepDates } : {}
43628
+ }, ctx.mcpReq.signal);
43629
+ return convertResult(details);
43630
+ } catch (error) {
43631
+ return toolError("convert-failed", error instanceof Error ? error.message : String(error));
43632
+ }
43633
+ });
43634
+ }
43635
+ if (convertEnabled && isToolEnabled("autorag.convert.formats", options)) {
43636
+ server.registerTool("autorag.convert.formats", {
43637
+ title: "List Convertible Formats",
43638
+ description: "List the file formats Filee knows, or what one source format (heic, docx, hwp, mkv) can be converted to, including targets that need an optional engine. Read-only.",
43639
+ inputSchema: convertFormatsInput,
43640
+ outputSchema: objectOutput,
43641
+ annotations: { readOnlyHint: true, openWorldHint: false }
43642
+ }, async ({ from }, ctx) => {
43643
+ try {
43644
+ const formats = await lite.listFileConversions(from, ctx.mcpReq.signal);
43645
+ return jsonResult({ ok: true, ...from !== undefined ? { from } : {}, formats });
43646
+ } catch (error) {
43647
+ return toolError("convert-failed", error instanceof Error ? error.message : String(error));
43648
+ }
43649
+ });
43650
+ }
43558
43651
  if (!readOnly && isToolEnabled("autorag.report", options)) {
43559
43652
  server.registerTool("autorag.report", {
43560
43653
  title: "Persist AutoRAG Curated Report",