{"record":{"id":"ca7ad461dbf8a769","repo":"paperclipai/paperclip","slug":"applying-a-company-import-from-a-non-interactive-t","errorCode":null,"errorMessage":"Applying a company import from a non-interactive terminal requires --yes. Use --dry-run first to inspect the preview.","messagePattern":"Applying a company import from a non-interactive terminal requires --yes\\. Use --dry-run first to inspect the preview\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/company.ts","lineNumber":814,"sourceCode":"  url.hash = \"\";\n  return url.toString();\n}\n\nexport function resolveCompanyImportApplyConfirmationMode(input: {\n  yes?: boolean;\n  interactive: boolean;\n  json: boolean;\n}): \"skip\" | \"prompt\" {\n  if (input.yes) {\n    return \"skip\";\n  }\n  if (input.json) {\n    throw new Error(\n      \"Applying a company import with --json requires --yes. Use --dry-run first to inspect the preview.\",\n    );\n  }\n  if (!input.interactive) {\n    throw new Error(\n      \"Applying a company import from a non-interactive terminal requires --yes. Use --dry-run first to inspect the preview.\",\n    );\n  }\n  return \"prompt\";\n}\n\nexport function isHttpUrl(input: string): boolean {\n  return /^https?:\\/\\//i.test(input.trim());\n}\n\nexport function looksLikeRepoUrl(input: string): boolean {\n  try {\n    const url = new URL(input.trim());\n    if (url.protocol !== \"https:\") return false;\n    const segments = url.pathname.split(\"/\").filter(Boolean);\n    return segments.length >= 2;\n  } catch {\n    return false;","sourceCodeStart":796,"sourceCodeEnd":832,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/company.ts#L796-L832","documentation":"resolveCompanyImportApplyConfirmationMode needs a TTY to prompt for confirmation before applying an import; in a non-interactive terminal without --yes it aborts rather than apply unconfirmed.","triggerScenarios":"Thrown at cli/src/commands/client/company.ts:814 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run interactively to confirm, or pass --yes (after a --dry-run preview) in non-interactive environments."],"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-23T08:17:48.524Z"}