{"record":{"id":"f22d0c2b41e801a5","repo":"paperclipai/paperclip","slug":"missing-required-name","errorCode":null,"errorMessage":"Missing required --${name}","messagePattern":"Missing required --(.+?)","errorType":"validation","errorClass":"UsageError","httpStatus":null,"severity":"error","filePath":"packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs","lineNumber":89,"sourceCode":"    if (!next || next.startsWith(\"--\")) {\n      out[key] = true;\n      continue;\n    }\n    out[key] = next;\n    i += 1;\n  }\n  return out;\n}\n\nfunction readStringFlag(args, name) {\n  const value = args[name];\n  if (typeof value !== \"string\" || value.trim().length === 0) return null;\n  return value;\n}\n\nfunction requireStringFlag(args, name) {\n  const value = readStringFlag(args, name);\n  if (!value) throw new UsageError(`Missing required --${name}`);\n  return value;\n}\n\nfunction boolFlag(args, name) {\n  return args[name] === true;\n}\n\nfunction normalizeApiBaseUrl(raw) {\n  if (!raw || typeof raw !== \"string\" || raw.trim().length === 0) {\n    throw new UsageError(\"PAPERCLIP_API_URL is required\");\n  }\n  const trimmed = raw.trim().replace(/\\/+$/, \"\");\n  return trimmed.endsWith(\"/api\") ? trimmed : `${trimmed}/api`;\n}\n\nfunction getConfig() {\n  const apiKey = process.env.PAPERCLIP_BRIDGE_API_KEY?.trim() || process.env.PAPERCLIP_API_KEY?.trim();\n  if (!apiKey) throw new UsageError(\"PAPERCLIP_BRIDGE_API_KEY is required\");","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs#L71-L107","documentation":"CLI usage validation in the paperclip-task bridge skill: a required --flag was absent or had no value (a following token starting with -- is treated as the next flag, so --key --other yields key=true). The UsageError tells the operator which flag is missing; supply the required string value and rerun.","triggerScenarios":"Thrown at packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the required --<name> flag with a value when invoking the command."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}