diegosouzapw/OmniRoute · error

Missing required field: path

Error message

Missing required field: path

What it means

Error "Missing required field: path" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/skills/builtins.ts:204

function normalizeArgs(args: unknown): string[] {
  if (args === undefined) return [];
  if (!Array.isArray(args)) throw new Error("Field args must be an array");
  return args.map((arg) => {
    if (typeof arg !== "string" && typeof arg !== "number" && typeof arg !== "boolean") {
      throw new Error("Command arguments must be strings, numbers, or booleans");
    }
    return String(arg);
  });
}

export const builtinSkills: Record<string, SkillHandler> = {
  file_read: async (input, context) => {
    const { path: inputPath, encoding = "utf8" } = input as {
      path: string;
      encoding?: BufferEncoding;
    };
    if (!inputPath || typeof inputPath !== "string") {
      throw new Error("Missing required field: path");
    }
    if (encoding !== "utf8" && encoding !== "base64") {
      throw new Error("Unsupported encoding. Use utf8 or base64.");
    }

    const { resolved, relative } = resolveWorkspacePath(inputPath, context);
    const stat = await fs.stat(resolved);
    if (!stat.isFile()) throw new Error("Skill file path must point to a file");
    if (stat.size > MAX_FILE_BYTES) {
      throw new Error(`Skill file exceeds the ${MAX_FILE_BYTES} byte read limit`);
    }

    return {
      success: true,
      path: relative,
      content: await fs.readFile(resolved, encoding),
      bytesRead: stat.size,
      encoding,

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/skills/builtins.ts:204 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/98bd63d058273f10. Report an issue: GitHub.