#!/usr/bin/env node
import {c,e as e$1,b as b$1,d}from'./chunk-HXGYVS2N.js';import'./chunk-5TAVYPOV.js';import*as f from'path';import e from'chalk';async function b(t,r){let s=t?f.resolve(t):process.cwd();if(r.set){try{await c(r.set,s),r.json?console.log(JSON.stringify({success:!0,provider:r.set})):(console.log(e.green(`
\u2713 Provider set to: ${r.set}
`)),r.set==="auto"?console.log(e.gray(`Will auto-detect best available provider.
`)):console.log(e.gray(`Will use ${r.set} if available, otherwise fall back.
`)));}catch(o){r.json?console.log(JSON.stringify({error:o instanceof Error?o.message:String(o)})):console.log(e.red(`
Error: ${o instanceof Error?o.message:o}
`));}return}let i=await e$1(s),a=b$1(s),l=await d(s);if(r.json){console.log(JSON.stringify({configured:a,selected:l.name,reason:l.reason,providers:i},null,2));return}console.log(),console.log(e.blue("\u2501".repeat(60))),console.log(e.blue("  Agent Providers")),console.log(e.blue("\u2501".repeat(60))),console.log(),console.log(e.cyan("  Configuration:")),console.log(a==="auto"?e.gray("    agent-provider: auto (auto-detect)"):e.white(`    agent-provider: ${a}`)),console.log(e.gray("    Set via: PARADIGM_AGENT_PROVIDER env or .paradigm/config.yaml")),console.log(),console.log(e.cyan("  Available Providers:")),console.log();for(let o of i){let m=o.available?e.green("\u2713"):e.gray("\u2717"),v=o.name===l.name?e.yellow(" \u2190 active"):"",p=o.name===a?e.cyan(" (configured)"):"";console.log(`  ${m}  ${e.white(o.name.padEnd(12))}${v}${p}`),console.log(e.gray(`      ${o.reason}`));let n=[];o.features.parallel&&n.push("parallel"),o.features.mcp&&n.push("MCP"),n.push(o.features.billing==="api"?"API billing":o.features.billing==="subscription"?"Max/subscription":"free"),console.log(e.gray(`      ${n.join(" \xB7 ")}`)),console.log();}console.log(e.gray("\u2500".repeat(60))),console.log(),console.log(e.cyan("  Active Provider:")),console.log(e.white(`    ${l.name}`)),console.log(e.gray(`    ${l.reason}`)),console.log(),console.log(e.gray("\u2500".repeat(60))),console.log(),console.log(e.cyan("  Set Provider Preference:")),console.log(e.gray("    paradigm team providers --set auto      # Auto-detect (default)")),console.log(e.gray("    paradigm team providers --set claude    # Always use API")),console.log(e.gray("    paradigm team providers --set claude-code  # Use Max subscription")),console.log(e.gray("    paradigm team providers --set manual    # Manual handoffs only")),console.log(),console.log(e.gray("  Or set environment variable:")),console.log(e.gray("    export PARADIGM_AGENT_PROVIDER=claude-code")),console.log();}export{b as teamProvidersCommand};