{"version":3,"file":"user-agent-vdHYF3QL.mjs","names":[],"sources":["../src/cli/shared/user-agent.ts"],"sourcesContent":["import { readPackageJson } from \"./package-json\";\n\n/**\n * Build the User-Agent string from an already-known SDK version, without\n * touching the filesystem. Use this when the caller has resolved the version\n * (e.g. crash reporting already reads `package.json`) to avoid a redundant read.\n * @param version - SDK version string\n * @returns User-Agent header value\n */\nexport function userAgentFromVersion(version: string): string {\n  return `tailor/${version}`;\n}\n\n/**\n * Build the User-Agent string for CLI requests.\n *\n * Lives in its own module (rather than `client.ts`) so callers that only need\n * the UA — e.g. crash reporting — do not pull in the operator client's heavy\n * OAuth2/Connect/Protobuf dependencies, and so importing it never forms a cycle.\n * @returns User-Agent header value\n */\nexport async function userAgent() {\n  const packageJson = await readPackageJson();\n  return userAgentFromVersion(packageJson.version ?? \"unknown\");\n}\n"],"mappings":"gDASA,SAAgB,qBAAqB,EAAyB,CAC5D,MAAO,UAAU,GACnB,CAUA,eAAsB,WAAY,CAEhC,OAAO,sBAAqB,MADF,EAAgB,EAAA,CACF,SAAW,SAAS,CAC9D"}