{"record":{"id":"80dba6545526bf65","repo":"paperclipai/paperclip","slug":"source-path-must-stay-inside-raw-path","errorCode":null,"errorMessage":"Source path must stay inside raw/: ${path}","messagePattern":"Source path must stay inside raw/: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/wiki/core.ts","lineNumber":1201,"sourceCode":"  if (normalized !== \"index.md\" && normalized !== \"log.md\" && normalized !== \"WIKI.md\" && normalized !== \"AGENTS.md\" && normalized !== \"IDEA.md\" && !normalized.startsWith(\"wiki/\")) {\n    throw new Error(`Wiki page writes must target AGENTS.md, IDEA.md, or wiki/: ${path}`);\n  }\n  if (!normalized.endsWith(\".md\")) {\n    throw new Error(`Wiki page path must be a markdown file: ${path}`);\n  }\n  return normalized;\n}\n\nfunction assertPageWriteAllowed(path: string, writer: WritePageInput[\"writer\"] = \"agent_tool\"): void {\n  if (writer !== \"board_ui\" && PROTECTED_WIKI_CONTROL_FILES.has(path)) {\n    throw new Error(`Refusing to overwrite protected wiki control file ${path}; board-managed edits must use the wiki UI.`);\n  }\n}\n\nfunction assertRawPath(path: string): string {\n  const normalized = assertWikiPath(path);\n  if (!normalized.startsWith(\"raw/\")) {\n    throw new Error(`Source path must stay inside raw/: ${path}`);\n  }\n  return normalized;\n}\n\nfunction tableName(namespace: string, table: string): string {\n  return `${namespace}.${table}`;\n}\n\nfunction spaceTable(ctx: PluginContext): string {\n  return tableName(ctx.db.namespace, \"wiki_spaces\");\n}\n\nfunction bindingTable(ctx: PluginContext): string {\n  return tableName(ctx.db.namespace, \"wiki_resource_bindings\");\n}\n\nfunction distillationCursorTable(ctx: PluginContext): string {\n  return tableName(ctx.db.namespace, \"paperclip_distillation_cursors\");","sourceCodeStart":1183,"sourceCodeEnd":1219,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/plugins/plugin-llm-wiki/src/wiki/core.ts#L1183-L1219","documentation":"Error \"Source path must stay inside raw/: ${path}\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:1202 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep source paths inside the raw/ directory."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}