// @bun
var l=Object.defineProperty;var n=(o)=>o;function c(o,r){this[o]=n.bind(null,r)}var m=(o,r)=>{for(var i in r)l(o,i,{get:r[i],enumerable:!0,configurable:!0,set:c.bind(r,i)})};var u=(o,r)=>()=>(o&&(r=o(o=0)),r);import{CodeBlock as a,InstallCommand as p}from"@contractspec/lib.design-system";import s from"@contractspec/lib.ui-link";import{ChevronRight as d}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function b(){return t("div",{className:"space-y-8",children:[t("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.support-bot"}),e("p",{className:"text-lg text-muted-foreground",children:"Build AI-first support flows using drop-in classifiers, knowledge-grounded resolvers, and tone-aware responders\u2014all wired into the agent runner."})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Installation"}),e(p,{package:"@contractspec/lib.support-bot"})]}),t("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Wire the primitives"}),e(a,{language:"typescript",code:`import { TicketClassifier, TicketResolver, AutoResponder } from '@contractspec/lib.support-bot';

const classifier = new TicketClassifier();
const resolver = new TicketResolver({ knowledge });
const responder = new AutoResponder();

const classification = await classifier.classify(ticket);
const resolution = await resolver.resolve(ticket);
const draft = await responder.draft(ticket, resolution, classification);`})]}),t("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Expose as agent tools"}),e(a,{language:"typescript",code:`import { createSupportTools } from '@contractspec/lib.support-bot/bot';

const tools = createSupportTools({ resolver, classifier, responder });
// Pass these tools into your host runtime or agent adapter.`})]}),t("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Included modules"}),t("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:[e("strong",{children:"TicketClassifier"}),": heuristics + optional LLM validation for category/priority."]}),t("li",{children:[e("strong",{children:"TicketResolver"}),": RAG resolver that can plug into any knowledge retriever."]}),t("li",{children:[e("strong",{children:"AutoResponder"}),": generates drafts, citations, and tone-aware copy."]}),t("li",{children:[e("strong",{children:"SupportFeedbackLoop"}),": track auto-resolution rates and sentiment trends."]})]})]}),t("div",{className:"flex items-center gap-4 pt-4",children:[e(s,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),t(s,{href:"/docs/libraries/growth",className:"btn-primary",children:["Next: Growth ",e(d,{size:16})]})]})]})}export{b as LibrariesSupportBotPage};
