diegosouzapw/OmniRoute · error · Error

Local corpus root is not accessible

Error message

Local corpus root is not accessible

What it means

Error "Local corpus root is not accessible" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/localCorpus/index.ts:279

  const start = Math.max(0, matchIndex - half);
  const end = Math.min(content.length, start + MAX_SNIPPET_CHARS);
  const prefix = start > 0 ? "…" : "";
  const suffix = end < content.length ? "…" : "";
  return `${prefix}${content.slice(start, end).trim()}${suffix}`;
}

export async function canonicalizeLocalCorpusRoot(inputPath: string): Promise<string> {
  if (!path.isAbsolute(inputPath)) {
    throw new Error("Local corpus root must be an absolute directory path");
  }

  let canonical: string;
  let stat;
  try {
    canonical = await fs.realpath(path.resolve(inputPath));
    stat = await fs.stat(canonical);
  } catch {
    throw new Error("Local corpus root is not accessible");
  }
  if (!stat.isDirectory()) {
    throw new Error("Local corpus root must point to a directory");
  }
  return canonical;
}

export class LocalCorpusIndex {
  private readonly configuredRoot: string;
  private readonly limits: ResolvedLimits;
  private canonicalRoot: string | null = null;
  private files = new Map<string, IndexedCorpusFile>();
  private lastIndexedAt: number | null = null;
  private truncated = false;
  private refreshPromise: Promise<LocalCorpusRefreshResult> | null = null;

  constructor(rootPath: string, limits: LocalCorpusLimits = {}) {
    this.configuredRoot = rootPath;

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/localCorpus/index.ts:279 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/4b8ff516412ec8b7. Report an issue: GitHub.