paperclipai/paperclip · error
Invalid wiki path
Error message
Invalid wiki path: ${path} What it means
Error "Invalid wiki path: ${path}" thrown in paperclipai/paperclip.
Solutions
- Fix the wiki path to a valid normalized path (no traversal, valid characters).
When it happens
Trigger: Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:1164 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@5716fe907e (2026-08-18).
Data as JSON: /api/errors/acb2ff6ad4577c87.
Report an issue: GitHub.
Appendix: source
Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:1163
{ space: defaultSpace, legacySettings: next },
);
await updateSpace(ctx, {
companyId: input.companyId,
wikiId: next.wikiId,
spaceSlug: DEFAULT_SPACE_SLUG,
settings: { paperclipIngestion: profile },
});
return next;
}
function assertWikiPath(path: string, options: { allowMetadata?: boolean } = {}): string {
const trimmed = path.trim().replace(/^\/+/, "");
if (
!trimmed ||
trimmed.includes("\\") ||
trimmed.split("/").some((segment) => segment === "" || segment === "." || segment === "..")
) {
throw new Error(`Invalid wiki path: ${path}`);
}
if (
trimmed !== ".gitignore" &&
trimmed !== "WIKI.md" &&
trimmed !== "AGENTS.md" &&
trimmed !== "IDEA.md" &&
trimmed !== "index.md" &&
trimmed !== "log.md" &&
!trimmed.startsWith("raw/") &&
!trimmed.startsWith("wiki/") &&
!(options.allowMetadata && trimmed.startsWith(".paperclip/"))
) {
throw new Error(`Wiki path must stay inside AGENTS.md, IDEA.md, raw/, or wiki/: ${path}`);
}
return trimmed;
}
function assertPagePath(path: string): string {View on GitHub (pinned to 5716fe907e)