{"record":{"id":"227fa6e6091ec101","repo":"paperclipai/paperclip","slug":"projectid-or-rootissueid-is-required","errorCode":null,"errorMessage":"projectId or rootIssueId is required","messagePattern":"projectId or rootIssueId is required","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/wiki/core.ts","lineNumber":3336,"sourceCode":"export function getDistillationAutoApplyRestriction(): DistillationAutoApplyRestriction {\n  const rawMode = process.env.PAPERCLIP_DEPLOYMENT_MODE;\n  const rawExposure = process.env.PAPERCLIP_DEPLOYMENT_EXPOSURE;\n  const deploymentMode =\n    rawMode === \"local_trusted\" || rawMode === \"authenticated\" ? rawMode : null;\n  const deploymentExposure =\n    rawExposure === \"private\" || rawExposure === \"public\" ? rawExposure : null;\n  const blocked = deploymentMode === \"authenticated\" && deploymentExposure === \"public\";\n  return {\n    autoApplyAllowed: !blocked,\n    autoApplyRestriction: blocked ? PUBLIC_DISTILLATION_AUTO_APPLY_RESTRICTION : null,\n    deploymentMode,\n    deploymentExposure,\n  };\n}\n\nexport async function distillPaperclipProjectPage(ctx: PluginContext, input: PaperclipProjectPageDistillationInput) {\n  if (!input.projectId && !input.rootIssueId) {\n    throw new Error(\"projectId or rootIssueId is required\");\n  }\n  const wikiId = normalizeWikiId(input.wikiId);\n  assertPaperclipSourceScopePayload(input);\n  const space = await requirePaperclipIngestionPolicy(ctx, { companyId: input.companyId, wikiId, spaceSlug: input.spaceSlug }, \"execute\", { requireEnabledProfile: true });\n  const scope = paperclipCursorScopeMetadata(input);\n  const issues = await listPaperclipBundleIssues(ctx, input);\n  const project = scope.projectId ? await ctx.projects.get(scope.projectId, input.companyId) : null;\n  const rootIssue = scope.rootIssueId ? await ctx.issues.get(scope.rootIssueId, input.companyId) : null;\n  const slug = projectPageSlug({ project, rootIssue });\n  const projectDir = `wiki/projects/${slug}`;\n  const standupPath = assertPagePath(`${projectDir}/standup.md`);\n  const pagePath = assertPagePath(`${projectDir}/index.md`);\n  const run = await createPaperclipDistillationRun(ctx, input);\n  const bundle = run.bundle;\n  const current = await readCurrentWithHash(ctx, input.companyId, pagePath, space);\n  assertExpectedHash(input.expectedProjectPageHash, current.hash, pagePath);\n\n  if (!hasDurableSignal(bundle, issues)) {","sourceCodeStart":3318,"sourceCodeEnd":3354,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/plugins/plugin-llm-wiki/src/wiki/core.ts#L3318-L3354","documentation":"Error \"projectId or rootIssueId is required\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:3338 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass projectId or rootIssueId to scope the operation."],"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"}