@tuteliq/mcp 3.3.1 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -168,7 +168,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
168
168
|
line-height: 1.5;
|
|
169
169
|
padding: 16px;
|
|
170
170
|
}
|
|
171
|
-
`,RT={display:"flex",alignItems:"center",gap:10,marginBottom:16,paddingBottom:12,borderBottom:`1px solid ${ne.border}`},AT={width:28,height:28,borderRadius:6,background:`linear-gradient(135deg, ${ne.brand.primary}, ${ne.brand.primaryLight})`,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:700,fontSize:14},LT={fontSize:16,fontWeight:600,color:ne.text.primary},MT={fontSize:11,color:ne.text.muted,marginLeft:"auto"};function sg({title:e,children:t}){return U.jsxs("div",{style:{fontFamily:hp,maxWidth:600,margin:"0 auto"},children:[U.jsxs("div",{style:RT,children:[U.jsx("div",{style:AT,children:"T"}),U.jsx("span",{style:LT,children:e}),U.jsx("span",{style:MT,children:"Powered by Tuteliq AI"})]}),t]})}function FT({score:e,level:t}){const i=Math.round(e*100),a=QS(t),n=40,s=8,l=2*Math.PI*n,f=l*(1-e);return U.jsx("div",{style:{textAlign:"center",padding:"8px 0"},children:U.jsxs("svg",{width:100,height:100,viewBox:"0 0 100 100",children:[U.jsx("circle",{cx:50,cy:50,r:n,fill:"none",stroke:ne.bg.tertiary,strokeWidth:s}),U.jsx("circle",{cx:50,cy:50,r:n,fill:"none",stroke:a,strokeWidth:s,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:f,transform:"rotate(-90 50 50)",style:{transition:"stroke-dashoffset 0.6s ease"}}),U.jsxs("text",{x:50,y:46,textAnchor:"middle",fontSize:22,fontWeight:700,fill:a,children:[i,"%"]}),U.jsx("text",{x:50,y:62,textAnchor:"middle",fontSize:10,fill:ne.text.secondary,children:"Risk Score"})]})})}function JT({level:e,label:t}){const i=QS(e);return U.jsx("span",{style:{display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:12,fontWeight:600,color:"#fff",background:i,textTransform:"capitalize"},children:t||e})}function qT({value:e,label:t="Confidence"}){const i=Math.round(e*100);return U.jsxs("div",{style:{marginBottom:8},children:[U.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,color:ne.text.secondary,marginBottom:4},children:[U.jsx("span",{children:t}),U.jsxs("span",{children:[i,"%"]})]}),U.jsx("div",{style:{height:6,borderRadius:3,background:ne.bg.tertiary},children:U.jsx("div",{style:{height:"100%",borderRadius:3,background:ne.brand.primary,width:`${i}%`,transition:"width 0.4s ease"}})})]})}function WT({categories:e}){return e.length===0?null:U.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,margin:"8px 0"},children:e.map((t,i)=>{const a=typeof t=="string"?t:t.label||t.tag;return U.jsx("span",{style:{display:"inline-block",padding:"2px 8px",borderRadius:10,fontSize:11,fontWeight:500,color:ne.brand.primaryDark,background:"#EEF2FF",border:"1px solid #C7D2FE"},children:a},i)})})}function BT({evidence:e}){const[t,i]=Un.useState(!1);if(!e||e.length===0)return null;const a=t?e:e.slice(0,2);return U.jsxs("div",{style:{margin:"12px 0"},children:[U.jsx("div",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:ne.text.primary},children:"Evidence"}),a.map((n,s)=>U.jsxs("div",{style:{padding:"8px 12px",marginBottom:6,borderRadius:8,background:ne.bg.secondary,borderLeft:`3px solid ${ne.brand.primary}`},children:[U.jsxs("div",{style:{fontSize:12,fontStyle:"italic",color:ne.text.secondary,marginBottom:4},children:['"',n.text,'"']}),U.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:11,color:ne.text.muted},children:[U.jsx("span",{style:{fontWeight:600},children:n.tactic}),U.jsxs("span",{children:["weight: ",n.weight.toFixed(2)]})]})]},s)),e.length>2&&U.jsx("button",{onClick:()=>i(!t),style:{background:"none",border:"none",color:ne.brand.primary,fontSize:12,cursor:"pointer",padding:"4px 0"},children:t?"Show less":`Show ${e.length-2} more`})]})}function VT({action:e}){return U.jsxs("div",{style:{padding:"10px 14px",borderRadius:8,background:"#ECFDF5",border:"1px solid #A7F3D0",margin:"8px 0"},children:[U.jsx("div",{style:{fontSize:11,fontWeight:600,color:ne.severity.safe,marginBottom:4},children:"Recommended Action"}),U.jsx("div",{style:{fontSize:13,color:"#065F46"},children:e})]})}function HT({calibration:e}){return e!=null&&e.applied?U.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:6,fontSize:11,color:ne.brand.primaryDark,background:"#EEF2FF"},children:[U.jsx("span",{style:{fontWeight:600},children:"Age:"}),U.jsx("span",{children:e.age_group}),e.multiplier&&U.jsxs("span",{children:["(",e.multiplier,"x)"]})]}):null}const KT=[{label:"tuteliq.ai",href:"https://tuteliq.ai"},{label:"Trust Center",href:"https://trust.tuteliq.ai"},{label:"Documentation",href:"https://docs.tuteliq.ai"}];function ug(){return U.jsx("div",{style:{display:"flex",justifyContent:"center",gap:16,marginTop:20,paddingTop:12,borderTop:`1px solid ${ne.border}`},children:KT.map(e=>U.jsx("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",style:{fontSize:11,color:ne.brand.primary,textDecoration:"none",fontWeight:500},children:e.label},e.href))})}const jc={self_harm:"You're not alone. Reaching out is a sign of strength, and help is always available.",mental_health:"It's okay to not be okay. Support is just a call away — you matter.",eating_disorder:"Recovery is possible, and you deserve support on this journey.",substance_abuse:"Asking for help takes courage. There are people who care and want to help.",violence:"You deserve to feel safe. Confidential support is available right now.",sexual_abuse:"What happened is not your fault. Trained professionals are here to listen.",bullying:"Nobody deserves to be treated this way. You have the right to feel safe.",grooming:"Trust your instincts. If something feels wrong, it's important to talk to someone you trust.",default:"If you or someone you know needs support, help is available. You are not alone."};function GT(e){return e&&jc[e]?jc[e]:jc.default}function XT({support:e}){var a;const t=(a=e.response_guide)==null?void 0:a.category,i=GT(t);return U.jsxs("div",{style:{margin:"12px 0",borderRadius:10,border:"1px solid #BFDBFE",background:"linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 100%)",overflow:"hidden"},children:[U.jsxs("div",{style:{padding:"14px 16px",background:"linear-gradient(135deg, #3B82F6 0%, #2563EB 100%)",color:"#fff"},children:[U.jsxs("div",{style:{fontSize:13,fontWeight:600,marginBottom:4,display:"flex",alignItems:"center",gap:6},children:[U.jsx("span",{style:{fontSize:16},children:"💙"})," You Are Not Alone"]}),U.jsx("div",{style:{fontSize:12,lineHeight:1.5,opacity:.95},children:i})]}),U.jsxs("div",{style:{padding:"12px 16px"},children:[e.emergency_number&&U.jsxs("div",{style:{marginBottom:10,display:"flex",alignItems:"center",gap:8},children:[U.jsx("span",{style:{fontSize:14},children:"🚨"}),U.jsxs("div",{style:{fontSize:12,color:ne.text.secondary},children:["Emergency:"," ",U.jsx("a",{href:`tel:${e.emergency_number}`,style:{color:"#DC2626",fontWeight:700,fontSize:14,textDecoration:"none"},children:e.emergency_number}),e.country_name&&U.jsxs("span",{style:{color:ne.text.muted},children:[" (",e.country_name,")"]})]})]}),e.helplines.length>0&&U.jsxs("div",{children:[U.jsx("div",{style:{fontSize:11,fontWeight:600,color:"#1E40AF",marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Crisis Helplines"}),e.helplines.map((n,s)=>U.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 10px",borderRadius:6,background:s%2===0?"#fff":"#F8FAFC",border:"1px solid #E2E8F0",marginBottom:4},children:[U.jsxs("div",{style:{flex:1},children:[U.jsx("div",{style:{fontSize:13,fontWeight:500,color:ne.text.primary},children:n.name}),n.description&&U.jsx("div",{style:{fontSize:11,color:ne.text.muted,marginTop:1},children:n.description}),n.available&&U.jsxs("div",{style:{fontSize:10,color:ne.text.muted,marginTop:1},children:["⏰ ",n.available]})]}),U.jsxs("a",{href:`tel:${n.number}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"6px 12px",borderRadius:6,background:"#2563EB",color:"#fff",fontSize:13,fontWeight:600,textDecoration:"none",whiteSpace:"nowrap"},children:["📞 ",n.number]})]},s))]}),e.response_guide&&e.response_guide.immediateActions.length>0&&U.jsxs("div",{style:{marginTop:10},children:[U.jsx("div",{style:{fontSize:11,fontWeight:600,color:"#1E40AF",marginBottom:4,textTransform:"uppercase",letterSpacing:"0.05em"},children:"What You Can Do Now"}),U.jsx("ul",{style:{margin:0,paddingLeft:18,fontSize:12,color:ne.text.secondary,lineHeight:1.7},children:e.response_guide.immediateActions.map((n,s)=>U.jsx("li",{children:n},s))})]}),e.response_guide&&e.response_guide.resources.length>0&&U.jsxs("div",{style:{marginTop:10},children:[U.jsx("div",{style:{fontSize:11,fontWeight:600,color:"#1E40AF",marginBottom:4,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Helpful Resources"}),e.response_guide.resources.map((n,s)=>U.jsxs("div",{style:{fontSize:12,color:ne.text.secondary,marginBottom:3},children:[n.url?U.jsx("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",style:{color:"#2563EB",fontWeight:500,textDecoration:"none"},children:n.name}):U.jsx("span",{style:{fontWeight:500},children:n.name}),n.description&&U.jsxs("span",{children:[" — ",n.description]})]},s))]})]})]})}function QT({message:e}){const t=e||"This feature requires a plan upgrade or additional credits.";return U.jsxs("div",{style:{border:`1px solid ${ne.brand.primary}`,borderRadius:12,padding:20,textAlign:"center",background:`linear-gradient(135deg, ${ne.bg.secondary}, #EEF2FF)`},children:[U.jsx("div",{style:{fontSize:28,marginBottom:8},children:"🚀"}),U.jsx("div",{style:{fontSize:14,fontWeight:600,color:ne.text.primary,marginBottom:6},children:"Upgrade Your Plan"}),U.jsx("div",{style:{fontSize:13,color:ne.text.secondary,lineHeight:1.6,marginBottom:16},children:t}),U.jsx("a",{href:"https://tuteliq.ai/dashboard",target:"_blank",rel:"noopener noreferrer",style:{display:"inline-block",padding:"10px 24px",borderRadius:8,background:`linear-gradient(135deg, ${ne.brand.primary}, ${ne.brand.primaryDark})`,color:"#fff",fontSize:13,fontWeight:600,textDecoration:"none"},children:"Upgrade on Tuteliq Dashboard"}),U.jsx("div",{style:{marginTop:12,fontSize:11,color:ne.text.muted},children:"Manage your plan and credits at tuteliq.ai/dashboard"})]})}function YT(e){return e.replace(/^detect_/,"").replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function ej({data:e}){const{toolName:t,result:i}=e,a=YT(t);if(i.error&&(i.upgrade||i.tier_restricted))return U.jsxs(sg,{title:a,children:[U.jsx(QT,{message:i.message||i.error}),U.jsx(ug,{})]});const n=typeof i.severity=="number",s=i.risk_score??(n?i.severity:0),l=i.confidence??0,f=i.level||(n?null:i.severity)||i.grooming_risk||i.risk_level||"none",m=i.detected??i.is_bullying??i.unsafe??(i.grooming_risk&&i.grooming_risk!=="none")??!1,v=i.rationale||i.summary||"",g=i.recommended_action||"",y=i.categories||i.bullying_type||i.flags||[],k=i.evidence||[],N=i.age_calibration,T=i.support;return U.jsxs(sg,{title:a,children:[U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12},children:[U.jsx(FT,{score:s,level:f}),U.jsxs("div",{children:[U.jsx(JT,{level:f,label:m?`${f} Risk`:"Safe"}),U.jsx("div",{style:{fontSize:12,color:ne.text.muted,marginTop:4},children:m?"Threat detected":"No threat detected"}),N&&U.jsx(HT,{calibration:N})]})]}),U.jsx(qT,{value:l}),y.length>0&&U.jsx(WT,{categories:y}),v&&U.jsx("div",{style:{margin:"12px 0",fontSize:13,color:ne.text.secondary,lineHeight:1.6},children:v}),k.length>0&&U.jsx(BT,{evidence:k}),g&&U.jsx(VT,{action:g}),T&&T.helplines&&T.helplines.length>0&&U.jsx(XT,{support:T}),U.jsx(ug,{})]})}function tj({message:e="Analyzing..."}){return U.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"32px 16px",fontFamily:hp},children:[U.jsx("div",{style:{position:"relative",width:48,height:48,marginBottom:16},children:U.jsxs("svg",{width:48,height:48,viewBox:"0 0 48 48",children:[U.jsx("circle",{cx:24,cy:24,r:20,fill:"none",stroke:ne.bg.tertiary,strokeWidth:4}),U.jsx("circle",{cx:24,cy:24,r:20,fill:"none",stroke:"url(#tuteliq-gradient)",strokeWidth:4,strokeLinecap:"round",strokeDasharray:"80 45",style:{animation:"tuteliq-spin 1s linear infinite"}}),U.jsx("defs",{children:U.jsxs("linearGradient",{id:"tuteliq-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[U.jsx("stop",{offset:"0%",stopColor:ne.brand.primary}),U.jsx("stop",{offset:"100%",stopColor:ne.brand.primaryLight})]})})]})}),U.jsx("div",{style:{fontSize:13,fontWeight:600,color:ne.text.secondary,marginBottom:4},children:e}),U.jsx("div",{style:{fontSize:11,color:ne.text.muted},children:"Powered by Tuteliq AI"}),U.jsx("style",{children:`
|
|
171
|
+
`,RT={display:"flex",alignItems:"center",gap:10,marginBottom:16,paddingBottom:12,borderBottom:`1px solid ${ne.border}`},AT={width:28,height:28,borderRadius:6,background:`linear-gradient(135deg, ${ne.brand.primary}, ${ne.brand.primaryLight})`,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:700,fontSize:14},LT={fontSize:16,fontWeight:600,color:ne.text.primary},MT={fontSize:11,color:ne.text.muted,marginLeft:"auto"};function sg({title:e,children:t}){return U.jsxs("div",{style:{fontFamily:hp,maxWidth:600,margin:"0 auto"},children:[U.jsxs("div",{style:RT,children:[U.jsx("div",{style:AT,children:"T"}),U.jsx("span",{style:LT,children:e}),U.jsx("span",{style:MT,children:"Powered by Tuteliq AI"})]}),t]})}function FT({score:e,level:t}){const i=Math.round(e*100),a=QS(t),n=40,s=8,l=2*Math.PI*n,f=l*(1-e);return U.jsx("div",{style:{textAlign:"center",padding:"8px 0"},children:U.jsxs("svg",{width:100,height:100,viewBox:"0 0 100 100",children:[U.jsx("circle",{cx:50,cy:50,r:n,fill:"none",stroke:ne.bg.tertiary,strokeWidth:s}),U.jsx("circle",{cx:50,cy:50,r:n,fill:"none",stroke:a,strokeWidth:s,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:f,transform:"rotate(-90 50 50)",style:{transition:"stroke-dashoffset 0.6s ease"}}),U.jsxs("text",{x:50,y:46,textAnchor:"middle",fontSize:22,fontWeight:700,fill:a,children:[i,"%"]}),U.jsx("text",{x:50,y:62,textAnchor:"middle",fontSize:10,fill:ne.text.secondary,children:"Risk Score"})]})})}function JT({level:e,label:t}){const i=QS(e);return U.jsx("span",{style:{display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:12,fontWeight:600,color:"#fff",background:i,textTransform:"capitalize"},children:t||e})}function qT({value:e,label:t="Confidence"}){const i=Math.round(e*100);return U.jsxs("div",{style:{marginBottom:8},children:[U.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,color:ne.text.secondary,marginBottom:4},children:[U.jsx("span",{children:t}),U.jsxs("span",{children:[i,"%"]})]}),U.jsx("div",{style:{height:6,borderRadius:3,background:ne.bg.tertiary},children:U.jsx("div",{style:{height:"100%",borderRadius:3,background:ne.brand.primary,width:`${i}%`,transition:"width 0.4s ease"}})})]})}function WT({categories:e}){return e.length===0?null:U.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,margin:"8px 0"},children:e.map((t,i)=>{const a=typeof t=="string"?t:t.label||t.tag;return U.jsx("span",{style:{display:"inline-block",padding:"2px 8px",borderRadius:10,fontSize:11,fontWeight:500,color:ne.brand.primaryDark,background:"#EEF2FF",border:"1px solid #C7D2FE"},children:a},i)})})}function BT({evidence:e}){const[t,i]=Un.useState(!1);if(!e||e.length===0)return null;const a=t?e:e.slice(0,2);return U.jsxs("div",{style:{margin:"12px 0"},children:[U.jsx("div",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:ne.text.primary},children:"Evidence"}),a.map((n,s)=>U.jsxs("div",{style:{padding:"8px 12px",marginBottom:6,borderRadius:8,background:ne.bg.secondary,borderLeft:`3px solid ${ne.brand.primary}`},children:[U.jsxs("div",{style:{fontSize:12,fontStyle:"italic",color:ne.text.secondary,marginBottom:4},children:['"',n.text,'"']}),U.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:11,color:ne.text.muted},children:[U.jsx("span",{style:{fontWeight:600},children:n.tactic}),U.jsxs("span",{children:["weight: ",n.weight.toFixed(2)]})]})]},s)),e.length>2&&U.jsx("button",{onClick:()=>i(!t),style:{background:"none",border:"none",color:ne.brand.primary,fontSize:12,cursor:"pointer",padding:"4px 0"},children:t?"Show less":`Show ${e.length-2} more`})]})}function VT({action:e}){return U.jsxs("div",{style:{padding:"10px 14px",borderRadius:8,background:"#ECFDF5",border:"1px solid #A7F3D0",margin:"8px 0"},children:[U.jsx("div",{style:{fontSize:11,fontWeight:600,color:ne.severity.safe,marginBottom:4},children:"Recommended Action"}),U.jsx("div",{style:{fontSize:13,color:"#065F46"},children:e})]})}function HT({calibration:e}){return e!=null&&e.applied?U.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:6,fontSize:11,color:ne.brand.primaryDark,background:"#EEF2FF"},children:[U.jsx("span",{style:{fontWeight:600},children:"Age:"}),U.jsx("span",{children:e.age_group}),e.multiplier&&U.jsxs("span",{children:["(",e.multiplier,"x)"]})]}):null}const KT=[{label:"tuteliq.ai",href:"https://tuteliq.ai"},{label:"Trust Center",href:"https://trust.tuteliq.ai"},{label:"Documentation",href:"https://docs.tuteliq.ai"}];function ug(){return U.jsx("div",{style:{display:"flex",justifyContent:"center",gap:16,marginTop:20,paddingTop:12,borderTop:`1px solid ${ne.border}`},children:KT.map(e=>U.jsx("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",style:{fontSize:11,color:ne.brand.primary,textDecoration:"none",fontWeight:500},children:e.label},e.href))})}const jc={self_harm:"You're not alone. Reaching out is a sign of strength, and help is always available.",mental_health:"It's okay to not be okay. Support is just a call away — you matter.",eating_disorder:"Recovery is possible, and you deserve support on this journey.",substance_abuse:"Asking for help takes courage. There are people who care and want to help.",violence:"You deserve to feel safe. Confidential support is available right now.",sexual_abuse:"What happened is not your fault. Trained professionals are here to listen.",bullying:"Nobody deserves to be treated this way. You have the right to feel safe.",grooming:"Trust your instincts. If something feels wrong, it's important to talk to someone you trust.",default:"If you or someone you know needs support, help is available. You are not alone."};function GT(e){return e&&jc[e]?jc[e]:jc.default}function XT({support:e}){var a;const t=(a=e.response_guide)==null?void 0:a.category,i=GT(t);return U.jsxs("div",{style:{margin:"12px 0",borderRadius:10,border:"1px solid #BFDBFE",background:"linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 100%)",overflow:"hidden"},children:[U.jsxs("div",{style:{padding:"14px 16px",background:"linear-gradient(135deg, #3B82F6 0%, #2563EB 100%)",color:"#fff"},children:[U.jsxs("div",{style:{fontSize:13,fontWeight:600,marginBottom:4,display:"flex",alignItems:"center",gap:6},children:[U.jsx("span",{style:{fontSize:16},children:"💙"})," You Are Not Alone"]}),U.jsx("div",{style:{fontSize:12,lineHeight:1.5,opacity:.95},children:i})]}),U.jsxs("div",{style:{padding:"12px 16px"},children:[e.emergency_number&&U.jsxs("div",{style:{marginBottom:10,display:"flex",alignItems:"center",gap:8},children:[U.jsx("span",{style:{fontSize:14},children:"🚨"}),U.jsxs("div",{style:{fontSize:12,color:ne.text.secondary},children:["Emergency:"," ",U.jsx("a",{href:`tel:${e.emergency_number}`,style:{color:"#DC2626",fontWeight:700,fontSize:14,textDecoration:"none"},children:e.emergency_number}),e.country_name&&U.jsxs("span",{style:{color:ne.text.muted},children:[" (",e.country_name,")"]})]})]}),e.helplines.length>0&&U.jsxs("div",{children:[U.jsx("div",{style:{fontSize:11,fontWeight:600,color:"#1E40AF",marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Crisis Helplines"}),e.helplines.map((n,s)=>U.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 10px",borderRadius:6,background:s%2===0?"#fff":"#F8FAFC",border:"1px solid #E2E8F0",marginBottom:4},children:[U.jsxs("div",{style:{flex:1},children:[U.jsx("div",{style:{fontSize:13,fontWeight:500,color:ne.text.primary},children:n.name}),n.description&&U.jsx("div",{style:{fontSize:11,color:ne.text.muted,marginTop:1},children:n.description}),n.available&&U.jsxs("div",{style:{fontSize:10,color:ne.text.muted,marginTop:1},children:["⏰ ",n.available]})]}),U.jsxs("a",{href:`tel:${n.number}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"6px 12px",borderRadius:6,background:"#2563EB",color:"#fff",fontSize:13,fontWeight:600,textDecoration:"none",whiteSpace:"nowrap"},children:["📞 ",n.number]})]},s))]}),e.response_guide&&e.response_guide.immediateActions.length>0&&U.jsxs("div",{style:{marginTop:10},children:[U.jsx("div",{style:{fontSize:11,fontWeight:600,color:"#1E40AF",marginBottom:4,textTransform:"uppercase",letterSpacing:"0.05em"},children:"What You Can Do Now"}),U.jsx("ul",{style:{margin:0,paddingLeft:18,fontSize:12,color:ne.text.secondary,lineHeight:1.7},children:e.response_guide.immediateActions.map((n,s)=>U.jsx("li",{children:n},s))})]}),e.response_guide&&e.response_guide.resources.length>0&&U.jsxs("div",{style:{marginTop:10},children:[U.jsx("div",{style:{fontSize:11,fontWeight:600,color:"#1E40AF",marginBottom:4,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Helpful Resources"}),e.response_guide.resources.map((n,s)=>U.jsxs("div",{style:{fontSize:12,color:ne.text.secondary,marginBottom:3},children:[n.url?U.jsx("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",style:{color:"#2563EB",fontWeight:500,textDecoration:"none"},children:n.name}):U.jsx("span",{style:{fontWeight:500},children:n.name}),n.description&&U.jsxs("span",{children:[" — ",n.description]})]},s))]})]})]})}function QT({message:e}){const t=e||"This feature requires a plan upgrade or additional credits.";return U.jsxs("div",{style:{border:`1px solid ${ne.brand.primary}`,borderRadius:12,padding:20,textAlign:"center",background:`linear-gradient(135deg, ${ne.bg.secondary}, #EEF2FF)`},children:[U.jsx("div",{style:{fontSize:28,marginBottom:8},children:"🚀"}),U.jsx("div",{style:{fontSize:14,fontWeight:600,color:ne.text.primary,marginBottom:6},children:"Upgrade Your Plan"}),U.jsx("div",{style:{fontSize:13,color:ne.text.secondary,lineHeight:1.6,marginBottom:16},children:t}),U.jsx("a",{href:"https://tuteliq.ai/dashboard",target:"_blank",rel:"noopener noreferrer",style:{display:"inline-block",padding:"10px 24px",borderRadius:8,background:`linear-gradient(135deg, ${ne.brand.primary}, ${ne.brand.primaryDark})`,color:"#fff",fontSize:13,fontWeight:600,textDecoration:"none"},children:"Upgrade on Tuteliq Dashboard"}),U.jsx("div",{style:{marginTop:12,fontSize:11,color:ne.text.muted},children:"Manage your plan and credits at tuteliq.ai/dashboard"})]})}function YT(e){return e.replace(/^detect_/,"").replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function ej({data:e}){var j;const{toolName:t,result:i}=e,a=YT(t);if(i.error&&(i.upgrade||i.tier_restricted))return U.jsxs(sg,{title:a,children:[U.jsx(QT,{message:i.message||i.error}),U.jsx(ug,{})]});const n=typeof i.severity=="number",s=i.risk_score??(n?i.severity:0),l=i.confidence??0,f=i.level||(n?null:i.severity)||i.grooming_risk||i.risk_level||"none",m=i.detected??i.is_bullying??i.unsafe??(i.grooming_risk&&i.grooming_risk!=="none")??!1,v=i.rationale||i.summary||"",g=i.recommended_action||"",y=i.categories||i.bullying_type||i.flags||[],k=i.evidence||[],N=i.age_calibration,T=i.support;return U.jsxs(sg,{title:a,children:[U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12},children:[U.jsx(FT,{score:s,level:f}),U.jsxs("div",{children:[U.jsx(JT,{level:f,label:m?`${f} Risk`:"Safe"}),U.jsx("div",{style:{fontSize:12,color:ne.text.muted,marginTop:4},children:m?"Threat detected":"No threat detected"}),N&&U.jsx(HT,{calibration:N})]})]}),U.jsx(qT,{value:l}),y.length>0&&U.jsx(WT,{categories:y}),v&&U.jsx("div",{style:{margin:"12px 0",fontSize:13,color:ne.text.secondary,lineHeight:1.6},children:v}),k.length>0&&U.jsx(BT,{evidence:k}),g&&U.jsx(VT,{action:g}),T&&(((j=T.helplines)==null?void 0:j.length)>0||T.response_guide||T.emergency_number)&&U.jsx(XT,{support:T}),U.jsx(ug,{})]})}function tj({message:e="Analyzing..."}){return U.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"32px 16px",fontFamily:hp},children:[U.jsx("div",{style:{position:"relative",width:48,height:48,marginBottom:16},children:U.jsxs("svg",{width:48,height:48,viewBox:"0 0 48 48",children:[U.jsx("circle",{cx:24,cy:24,r:20,fill:"none",stroke:ne.bg.tertiary,strokeWidth:4}),U.jsx("circle",{cx:24,cy:24,r:20,fill:"none",stroke:"url(#tuteliq-gradient)",strokeWidth:4,strokeLinecap:"round",strokeDasharray:"80 45",style:{animation:"tuteliq-spin 1s linear infinite"}}),U.jsx("defs",{children:U.jsxs("linearGradient",{id:"tuteliq-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[U.jsx("stop",{offset:"0%",stopColor:ne.brand.primary}),U.jsx("stop",{offset:"100%",stopColor:ne.brand.primaryLight})]})})]})}),U.jsx("div",{style:{fontSize:13,fontWeight:600,color:ne.text.secondary,marginBottom:4},children:e}),U.jsx("div",{style:{fontSize:11,color:ne.text.muted},children:"Powered by Tuteliq AI"}),U.jsx("style",{children:`
|
|
172
172
|
@keyframes tuteliq-spin {
|
|
173
173
|
from { transform: rotate(0deg); transform-origin: 24px 24px; }
|
|
174
174
|
to { transform: rotate(360deg); transform-origin: 24px 24px; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuteliq/mcp",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "MCP App server for Tuteliq - AI-powered child safety analysis with interactive UI widgets for Claude, ChatGPT, and other MCP hosts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/src/index.js",
|