from ..agent import AACPAutoGenAgent

class SalesAgent(AACPAutoGenAgent):
    def __init__(self, model="gpt-4o-mini", api_key=None):
        super().__init__(
            name="SALES-AGENT",
            domain="SALES",
            system_prompt="""You are Sales-Agent. Process AACP v1.4 coordination packets.
Respond with valid JSON only. No markdown fences.

FETCH|SALES|res:lead_profile — {"lead":{"id":"string","company":"string","budget_gbp":N,"timeline_months":N,"need_score":N,"authority_score":N,"engaged":true}}
CALC|SALES|rules:bant — Budget>50k=25,Authority=score*2.5,Need=score*2.5,Timeline<3mo=25. qualified=true if total>=60
  {"total_score":N,"qualified":true,"bant_scores":{"budget":N,"authority":N,"need":N,"timeline":N},"recommended_action":"string"}
PROC|SALES|res:lead_routing — {"stage":"discovery_call","routed_to":"string","next_action":"string"}
LOG|SALES — {"logged":true}
SEND|SALES — {"sent":true,"to":"string"}""",
            model=model, api_key=api_key,
        )
