{"version":3,"file":"resolve-client-api-url.cjs","names":[],"sources":["../../../src/client/stream/resolve-client-api-url.ts"],"sourcesContent":["import type { AgentServerAdapter } from \"./transport.js\";\n\n/**\n * Resolve the LangGraph SDK `Client` base URL for hydration and history\n * reads when the caller uses a custom {@link AgentServerAdapter}.\n *\n * Explicit `apiUrl` wins; otherwise inherit from adapters that expose\n * `apiUrl` (e.g. {@link HttpAgentServerAdapter}).\n */\nexport function resolveClientApiUrl(options: {\n  apiUrl?: string;\n  transport?: \"sse\" | \"websocket\" | AgentServerAdapter;\n}): string | undefined {\n  if (options.apiUrl != null) return options.apiUrl;\n\n  const { transport } = options;\n  if (transport != null && typeof transport === \"object\") {\n    const candidate = (transport as { apiUrl?: unknown }).apiUrl;\n    if (typeof candidate === \"string\") return candidate;\n  }\n\n  return undefined;\n}\n"],"mappings":";;;;;;;;AASA,SAAgB,oBAAoB,SAGb;AACrB,KAAI,QAAQ,UAAU,KAAM,QAAO,QAAQ;CAE3C,MAAM,EAAE,cAAc;AACtB,KAAI,aAAa,QAAQ,OAAO,cAAc,UAAU;EACtD,MAAM,YAAa,UAAmC;AACtD,MAAI,OAAO,cAAc,SAAU,QAAO"}