{"version":3,"file":"connect.mjs","names":[],"sources":["../src/connect/tools.ts"],"sourcesContent":["import { createGithubTools } from '../index'\nimport type { GithubConnectorInput } from './connector'\nimport { connectGithubToken } from './token'\nimport type { ConnectGithubToolsOptions } from './types'\n\n/**\n * Create GitHub tools backed by a Vercel Connect connector.\n * Scopes are derived from `preset` unless overridden in `connect.scopes`.\n *\n * `connector` may be a static name or a resolver function — e.g. to pick a\n * different connector per environment (production vs. preview) or tenant.\n */\nexport function connectGithubTools(\n  connector: GithubConnectorInput,\n  options: ConnectGithubToolsOptions = {},\n) {\n  const { connect, preset, ...rest } = options\n\n  return createGithubTools({\n    ...rest,\n    preset,\n    token: connectGithubToken(connector, { preset, params: connect }),\n  })\n}\n"],"mappings":";;;;;;;;;;AAYA,SAAgB,mBACd,WACA,UAAqC,CAAC,GACtC;CACA,MAAM,EAAE,SAAS,QAAQ,GAAG,SAAS;CAErC,OAAO,kBAAkB;EACvB,GAAG;EACH;EACA,OAAO,mBAAmB,WAAW;GAAE;GAAQ,QAAQ;EAAQ,CAAC;CAClE,CAAC;AACH"}