paperclipai/paperclip · error
path is required
Error message
path is required
What it means
Thrown by the llm-wiki plugin's `page-content` data source (worker.ts:847) when `params.path` is missing or empty. Unlike the sibling `template` data source which defaults path to `"AGENTS.md"`, `page-content` requires an explicit wiki page path because there is no sensible default page to read.
Source
Thrown at packages/plugins/plugin-llm-wiki/src/worker.ts:847
return listPages(ctx, {
companyId,
wikiId: stringField(params.wikiId),
spaceSlug: stringField(params.spaceSlug),
pageType: stringField(params.pageType),
includeRaw: params.includeRaw === true || params.includeRaw === "true",
limit: typeof params.limit === "number" ? params.limit : null,
});
});
ctx.data.register("sources", async (params) => {
const companyId = readCompanyIdFromParams(params);
return listSources(ctx, { companyId, wikiId: stringField(params.wikiId), spaceSlug: stringField(params.spaceSlug), limit: typeof params.limit === "number" ? params.limit : null });
});
ctx.data.register("page-content", async (params) => {
const companyId = readCompanyIdFromParams(params);
const path = stringField(params.path);
if (!path) throw new Error("path is required");
return readWikiPage(ctx, { companyId, wikiId: stringField(params.wikiId), spaceSlug: stringField(params.spaceSlug), path });
});
ctx.data.register("template", async (params) => {
const companyId = readCompanyIdFromParams(params);
const path = stringField(params.path) ?? "AGENTS.md";
return readTemplate(ctx, { companyId, path });
});
ctx.data.register("operations", async (params) => {
const companyId = readCompanyIdFromParams(params);
return listOperations(ctx, {
companyId,
wikiId: stringField(params.wikiId),
spaceSlug: stringField(params.spaceSlug),
operationType: stringField(params.operationType),
status: stringField(params.status),
limit: typeof params.limit === "number" ? params.limit : null,View on GitHub (pinned to 67001ec6eb)
Solutions
- Pass a non-empty `path` string identifying the wiki page (e.g. `"spaces/engineering/pages/architecture.md"`).
- If you want the AGENTS.md template instead, query the `template` data source which defaults path to `"AGENTS.md"`.
- Guard the data-source call site: only fetch page-content once a page selection (`path`) is known.
Example fix
// before
ctx.data.fetch("page-content", { companyId, wikiId });
// after
ctx.data.fetch("page-content", { companyId, wikiId, path: selectedPage.path }); Defensive patterns
Strategy: validation
Validate before calling
function requirePagePath(params) {
const path = typeof params?.path === "string" ? params.path.trim() : "";
if (!path) throw new TypeError("page-content requires a non-empty 'path'");
return path;
} Type guard
function hasWikiPath(p): p is { path: string } {
return typeof p?.path === "string" && p.path.trim().length > 0;
} Prevention
- Only fetch page-content after a page selection resolves.
- Remember the sibling 'template' data source defaults path to AGENTS.md if you need a default.
- Use the same param key the plugin expects: 'path'.
When it happens
Trigger: Querying the `page-content` data source without a `path` param, with an empty `path`, or after a caller mistakenly passes `pagePath`/`page` instead of `path`.
Common situations: A board card or agent fetches rendered wiki page content but builds the query from an object whose `path` field was undefined (e.g. a selected-page state that has not loaded yet), or a typo in the param key.
Related errors
- status is required
- workspaceId and companyId are required
- projectId is required for project workspace diffs
- Ingest operation did not return an issue id; the dropped fil
- ${name} is required
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/8e36eb876fe06edf.
Report an issue: GitHub.