{"record":{"id":"618e09c85bcc71e2","repo":"paperclipai/paperclip","slug":"paperclip-adapters-failed-validation-result-err","errorCode":null,"errorMessage":"PAPERCLIP_ADAPTERS failed validation: ${result.error.issues.map((i) => `${i.path.join(\".\")}: ${i.message}`).join(\"; \")}","messagePattern":"PAPERCLIP_ADAPTERS failed validation: (.+?): (.+?)`\\)\\.join\\(\"; \"\\)\\}","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/src/services/adapter-registry-bootstrap.ts","lineNumber":56,"sourceCode":"    try {\n      rawText = fs.readFileSync(filePath as string, \"utf-8\");\n    } catch (err) {\n      throw new Error(\n        `PAPERCLIP_ADAPTERS_FILE could not be read at \"${filePath}\": ${(err as Error).message}`,\n      );\n    }\n  }\n\n  let parsed: unknown;\n  try {\n    parsed = JSON.parse(rawText);\n  } catch (err) {\n    throw new Error(`PAPERCLIP_ADAPTERS must be valid JSON: ${(err as Error).message}`);\n  }\n\n  const result = adapterRegistrySchema.safeParse(parsed);\n  if (!result.success) {\n    throw new Error(\n      `PAPERCLIP_ADAPTERS failed validation: ${result.error.issues\n        .map((i) => `${i.path.join(\".\")}: ${i.message}`)\n        .join(\"; \")}`,\n    );\n  }\n  return result.data;\n}\n\n/**\n * Reconcile availability: every known server adapter NOT enabled in the declared\n * registry is disabled; declared+enabled ones are enabled. Throws if a declared\n * adapterType has no installed adapter (cannot offer a harness with no\n * implementation). No-op when `registry` is null.\n */\nexport function reconcileAdapterAvailability(\n  registry: AdapterRegistryEntryParsed[] | null,\n): { enabled: string[]; disabled: string[] } {\n  if (!registry) return { enabled: [], disabled: [] };","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/adapter-registry-bootstrap.ts#L38-L74","documentation":"Schema failure in parseAdapterRegistryEnv: the JSON parsed but adapterRegistrySchema.safeParse rejected it. Zod issues are formatted as `path: message` pairs, naming exactly which adapter-registry entries are malformed.","triggerScenarios":"Thrown at server/src/services/adapter-registry-bootstrap.ts:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the fields listed in the validation issues in PAPERCLIP_ADAPTERS."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}