{"record":{"id":"ae670803999f27e3","repo":"paperclipai/paperclip","slug":"invalid-include-value-use-one-or-more-of-compa-ae6708","errorCode":null,"errorMessage":"Invalid --include value. Use one or more of: company,agents,projects,issues,tasks,skills","messagePattern":"Invalid --include value\\. Use one or more of: company,agents,projects,issues,tasks,skills","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/secrets.ts","lineNumber":125,"sourceCode":"  company: true,\n  agents: true,\n  projects: true,\n  issues: false,\n  skills: false,\n};\n\nexport function parseSecretsInclude(input: string | undefined): CompanyPortabilityInclude {\n  if (!input?.trim()) return { ...DEFAULT_DECLARATION_INCLUDE };\n  const values = input.split(\",\").map((part) => part.trim().toLowerCase()).filter(Boolean);\n  const include = {\n    company: values.includes(\"company\"),\n    agents: values.includes(\"agents\"),\n    projects: values.includes(\"projects\"),\n    issues: values.includes(\"issues\") || values.includes(\"tasks\"),\n    skills: values.includes(\"skills\"),\n  };\n  if (!Object.values(include).some(Boolean)) {\n    throw new Error(\"Invalid --include value. Use one or more of: company,agents,projects,issues,tasks,skills\");\n  }\n  return include;\n}\n\nexport function isSensitiveEnvKey(key: string): boolean {\n  return SENSITIVE_ENV_KEY_RE.test(key);\n}\n\nexport function toPlainEnvValue(binding: unknown): string | null {\n  if (typeof binding === \"string\") return binding;\n  if (typeof binding !== \"object\" || binding === null || Array.isArray(binding)) return null;\n  const record = binding as Record<string, unknown>;\n  if (record.type === \"plain\" && typeof record.value === \"string\") return record.value;\n  return null;\n}\n\nexport function buildInlineMigrationSecretName(agentId: string, key: string): string {\n  return `agent_${agentId.slice(0, 8)}_${key.toLowerCase()}`;","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/client/secrets.ts#L107-L143","documentation":"`parseSecretsInclude` splits the `--include` value on commas, lowercases, and checks membership against the allowed set {company, agents, projects, issues, tasks, skills} (tasks is aliased to issues). If after filtering no token matched any allowed value, it throws. An empty/blank input returns the default include set, so this error only fires when a non-empty but wholly-unrecognized value is supplied.","triggerScenarios":"Passing `--include foo`, `--include company,bar`, or `--include ,,,` (commas with no valid tokens). The check uses `.some(Boolean)` over the include flags, so all-false triggers the throw.","commonSituations":"Typo in a token (e.g. `agent` instead of `agents`, `issue` instead of `issues`); passing a free-form string instead of the documented set; copy-paste that introduced a stray character.","solutions":["Use only documented tokens: `company`, `agents`, `projects`, `issues` (or `tasks`), `skills` — comma-separated","Omit `--include` to accept the default (`company,agents,projects`)","Double-check plurals: it is `agents`/`projects`/`issues`/`skills`, not singular"],"exampleFix":"# before\npaperclipai secrets declarations -C comp-1 --include agent,issu\n# after\npaperclipai secrets declarations -C comp-1 --include agents,issues","handlingStrategy":"validation","validationCode":"const ALLOWED_INCLUDE = new Set([\"company\", \"agents\", \"projects\", \"issues\", \"tasks\", \"skills\"]);\nfunction validateInclude(input: string | undefined): string[] {\n  const tokens = (input ?? \"\").split(\",\").map((s) => s.trim().toLowerCase()).filter(Boolean);\n  const bad = tokens.filter((t) => !ALLOWED_INCLUDE.has(t));\n  if (tokens.length > 0 && bad.length === tokens.length) {\n    throw new Error(`Invalid --include tokens: ${bad.join(\", \")}`);\n  }\n  return tokens;\n}","typeGuard":"const INCLUDE_TOKENS = [\"company\", \"agents\", \"projects\", \"issues\", \"tasks\", \"skills\"] as const;\ntype IncludeToken = typeof INCLUDE_TOKENS[number];\nfunction isIncludeToken(v: unknown): v is IncludeToken {\n  return typeof v === \"string\" && (INCLUDE_TOKENS as readonly string[]).includes(v);\n}","tryCatchPattern":null,"preventionTips":["Use only documented tokens; mind plurals (agents/projects/issues/skills)","Omit --include to take the default","Validate tokens against the allowed set in wrapper scripts"],"tags":["cli","validation","secrets","export","input"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}