@tuteliq/mcp 3.2.5 → 3.2.6

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.
package/dist/server.js CHANGED
@@ -34,7 +34,7 @@ app.post('/messages', (req, res) => {
34
34
  });
35
35
  });
36
36
  app.get('/health', (_req, res) => {
37
- res.json({ status: 'ok', version: '3.2.0' });
37
+ res.json({ status: 'ok', version: '3.2.5' });
38
38
  });
39
39
  const server = app.listen(port, () => {
40
40
  console.error(`Tuteliq MCP server running on http://localhost:${port}`);
package/dist/src/index.js CHANGED
@@ -16,7 +16,7 @@ export function createServer(apiKey) {
16
16
  const client = new Tuteliq(key);
17
17
  const server = new McpServer({
18
18
  name: 'tuteliq-mcp',
19
- version: '3.2.0',
19
+ version: '3.2.5',
20
20
  });
21
21
  // Register all tool groups
22
22
  registerDetectionTools(server, client);
@@ -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
- `,DT={display:"flex",alignItems:"center",gap:10,marginBottom:16,paddingBottom:12,borderBottom:`1px solid ${ue.border}`},RT={width:28,height:28,borderRadius:6,background:`linear-gradient(135deg, ${ue.brand.primary}, ${ue.brand.primaryLight})`,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:700,fontSize:14},AT={fontSize:16,fontWeight:600,color:ue.text.primary},LT={fontSize:11,color:ue.text.muted,marginLeft:"auto"};function ag({title:e,children:t}){return J.jsxs("div",{style:{fontFamily:vp,maxWidth:600,margin:"0 auto"},children:[J.jsxs("div",{style:DT,children:[J.jsx("div",{style:RT,children:"T"}),J.jsx("span",{style:AT,children:e}),J.jsx("span",{style:LT,children:"Powered by Tuteliq AI"})]}),t]})}function MT({score:e,level:t}){const i=Math.round(e*100),a=XS(t),n=40,u=8,l=2*Math.PI*n,f=l*(1-e);return J.jsx("div",{style:{textAlign:"center",padding:"8px 0"},children:J.jsxs("svg",{width:100,height:100,viewBox:"0 0 100 100",children:[J.jsx("circle",{cx:50,cy:50,r:n,fill:"none",stroke:ue.bg.tertiary,strokeWidth:u}),J.jsx("circle",{cx:50,cy:50,r:n,fill:"none",stroke:a,strokeWidth:u,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:f,transform:"rotate(-90 50 50)",style:{transition:"stroke-dashoffset 0.6s ease"}}),J.jsxs("text",{x:50,y:46,textAnchor:"middle",fontSize:22,fontWeight:700,fill:a,children:[i,"%"]}),J.jsx("text",{x:50,y:62,textAnchor:"middle",fontSize:10,fill:ue.text.secondary,children:"Risk Score"})]})})}function FT({level:e,label:t}){const i=XS(e);return J.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 JT({value:e,label:t="Confidence"}){const i=Math.round(e*100);return J.jsxs("div",{style:{marginBottom:8},children:[J.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,color:ue.text.secondary,marginBottom:4},children:[J.jsx("span",{children:t}),J.jsxs("span",{children:[i,"%"]})]}),J.jsx("div",{style:{height:6,borderRadius:3,background:ue.bg.tertiary},children:J.jsx("div",{style:{height:"100%",borderRadius:3,background:ue.brand.primary,width:`${i}%`,transition:"width 0.4s ease"}})})]})}function qT({categories:e}){return e.length===0?null:J.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 J.jsx("span",{style:{display:"inline-block",padding:"2px 8px",borderRadius:10,fontSize:11,fontWeight:500,color:ue.brand.primaryDark,background:"#EEF2FF",border:"1px solid #C7D2FE"},children:a},i)})})}function VT({evidence:e}){const[t,i]=Un.useState(!1);if(!e||e.length===0)return null;const a=t?e:e.slice(0,2);return J.jsxs("div",{style:{margin:"12px 0"},children:[J.jsx("div",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:ue.text.primary},children:"Evidence"}),a.map((n,u)=>J.jsxs("div",{style:{padding:"8px 12px",marginBottom:6,borderRadius:8,background:ue.bg.secondary,borderLeft:`3px solid ${ue.brand.primary}`},children:[J.jsxs("div",{style:{fontSize:12,fontStyle:"italic",color:ue.text.secondary,marginBottom:4},children:['"',n.text,'"']}),J.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:11,color:ue.text.muted},children:[J.jsx("span",{style:{fontWeight:600},children:n.tactic}),J.jsxs("span",{children:["weight: ",n.weight.toFixed(2)]})]})]},u)),e.length>2&&J.jsx("button",{onClick:()=>i(!t),style:{background:"none",border:"none",color:ue.brand.primary,fontSize:12,cursor:"pointer",padding:"4px 0"},children:t?"Show less":`Show ${e.length-2} more`})]})}function WT({action:e}){return J.jsxs("div",{style:{padding:"10px 14px",borderRadius:8,background:"#ECFDF5",border:"1px solid #A7F3D0",margin:"8px 0"},children:[J.jsx("div",{style:{fontSize:11,fontWeight:600,color:ue.severity.safe,marginBottom:4},children:"Recommended Action"}),J.jsx("div",{style:{fontSize:13,color:"#065F46"},children:e})]})}function BT({calibration:e}){return e!=null&&e.applied?J.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:6,fontSize:11,color:ue.brand.primaryDark,background:"#EEF2FF"},children:[J.jsx("span",{style:{fontWeight:600},children:"Age:"}),J.jsx("span",{children:e.age_group}),e.multiplier&&J.jsxs("span",{children:["(",e.multiplier,"x)"]})]}):null}const HT=[{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 J.jsx("div",{style:{display:"flex",justifyContent:"center",gap:16,marginTop:20,paddingTop:12,borderTop:`1px solid ${ue.border}`},children:HT.map(e=>J.jsx("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",style:{fontSize:11,color:ue.brand.primary,textDecoration:"none",fontWeight:500},children:e.label},e.href))})}function KT({message:e}){const t=e||"This feature requires a plan upgrade or additional credits.";return J.jsxs("div",{style:{border:`1px solid ${ue.brand.primary}`,borderRadius:12,padding:20,textAlign:"center",background:`linear-gradient(135deg, ${ue.bg.secondary}, #EEF2FF)`},children:[J.jsx("div",{style:{fontSize:28,marginBottom:8},children:"🚀"}),J.jsx("div",{style:{fontSize:14,fontWeight:600,color:ue.text.primary,marginBottom:6},children:"Upgrade Your Plan"}),J.jsx("div",{style:{fontSize:13,color:ue.text.secondary,lineHeight:1.6,marginBottom:16},children:t}),J.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, ${ue.brand.primary}, ${ue.brand.primaryDark})`,color:"#fff",fontSize:13,fontWeight:600,textDecoration:"none"},children:"Upgrade on Tuteliq Dashboard"}),J.jsx("div",{style:{marginTop:12,fontSize:11,color:ue.text.muted},children:"Manage your plan and credits at tuteliq.ai/dashboard"})]})}function GT(e){return e.replace(/^detect_/,"").replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function XT({data:e}){const{toolName:t,result:i}=e,a=GT(t);if(i.error&&(i.upgrade||i.tier_restricted))return J.jsxs(ag,{title:a,children:[J.jsx(KT,{message:i.message||i.error}),J.jsx(ug,{})]});const n=i.risk_score??i.severity??0,u=i.confidence??0,l=i.level||i.severity_label||i.grooming_risk||i.risk_level||"none",f=i.detected??i.is_bullying??i.unsafe??(i.grooming_risk&&i.grooming_risk!=="none")??!1,m=i.rationale||i.summary||"",v=i.recommended_action||"",g=i.categories||i.bullying_type||i.flags||[],y=i.evidence||[],k=i.age_calibration;return J.jsxs(ag,{title:a,children:[J.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12},children:[J.jsx(MT,{score:n,level:l}),J.jsxs("div",{children:[J.jsx(FT,{level:l,label:f?`${l} Risk`:"Safe"}),J.jsx("div",{style:{fontSize:12,color:ue.text.muted,marginTop:4},children:f?"Threat detected":"No threat detected"}),k&&J.jsx(BT,{calibration:k})]})]}),J.jsx(JT,{value:u}),g.length>0&&J.jsx(qT,{categories:g}),m&&J.jsx("div",{style:{margin:"12px 0",fontSize:13,color:ue.text.secondary,lineHeight:1.6},children:m}),y.length>0&&J.jsx(VT,{evidence:y}),v&&J.jsx(WT,{action:v}),J.jsx(ug,{})]})}function QT({message:e="Analyzing..."}){return J.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"32px 16px",fontFamily:vp},children:[J.jsx("div",{style:{position:"relative",width:48,height:48,marginBottom:16},children:J.jsxs("svg",{width:48,height:48,viewBox:"0 0 48 48",children:[J.jsx("circle",{cx:24,cy:24,r:20,fill:"none",stroke:ue.bg.tertiary,strokeWidth:4}),J.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"}}),J.jsx("defs",{children:J.jsxs("linearGradient",{id:"tuteliq-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[J.jsx("stop",{offset:"0%",stopColor:ue.brand.primary}),J.jsx("stop",{offset:"100%",stopColor:ue.brand.primaryLight})]})})]})}),J.jsx("div",{style:{fontSize:13,fontWeight:600,color:ue.text.secondary,marginBottom:4},children:e}),J.jsx("div",{style:{fontSize:11,color:ue.text.muted},children:"Powered by Tuteliq AI"}),J.jsx("style",{children:`
171
+ `,DT={display:"flex",alignItems:"center",gap:10,marginBottom:16,paddingBottom:12,borderBottom:`1px solid ${ue.border}`},RT={width:28,height:28,borderRadius:6,background:`linear-gradient(135deg, ${ue.brand.primary}, ${ue.brand.primaryLight})`,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:700,fontSize:14},AT={fontSize:16,fontWeight:600,color:ue.text.primary},LT={fontSize:11,color:ue.text.muted,marginLeft:"auto"};function ag({title:e,children:t}){return J.jsxs("div",{style:{fontFamily:vp,maxWidth:600,margin:"0 auto"},children:[J.jsxs("div",{style:DT,children:[J.jsx("div",{style:RT,children:"T"}),J.jsx("span",{style:AT,children:e}),J.jsx("span",{style:LT,children:"Powered by Tuteliq AI"})]}),t]})}function MT({score:e,level:t}){const i=Math.round(e*100),a=XS(t),n=40,u=8,l=2*Math.PI*n,f=l*(1-e);return J.jsx("div",{style:{textAlign:"center",padding:"8px 0"},children:J.jsxs("svg",{width:100,height:100,viewBox:"0 0 100 100",children:[J.jsx("circle",{cx:50,cy:50,r:n,fill:"none",stroke:ue.bg.tertiary,strokeWidth:u}),J.jsx("circle",{cx:50,cy:50,r:n,fill:"none",stroke:a,strokeWidth:u,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:f,transform:"rotate(-90 50 50)",style:{transition:"stroke-dashoffset 0.6s ease"}}),J.jsxs("text",{x:50,y:46,textAnchor:"middle",fontSize:22,fontWeight:700,fill:a,children:[i,"%"]}),J.jsx("text",{x:50,y:62,textAnchor:"middle",fontSize:10,fill:ue.text.secondary,children:"Risk Score"})]})})}function FT({level:e,label:t}){const i=XS(e);return J.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 JT({value:e,label:t="Confidence"}){const i=Math.round(e*100);return J.jsxs("div",{style:{marginBottom:8},children:[J.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,color:ue.text.secondary,marginBottom:4},children:[J.jsx("span",{children:t}),J.jsxs("span",{children:[i,"%"]})]}),J.jsx("div",{style:{height:6,borderRadius:3,background:ue.bg.tertiary},children:J.jsx("div",{style:{height:"100%",borderRadius:3,background:ue.brand.primary,width:`${i}%`,transition:"width 0.4s ease"}})})]})}function qT({categories:e}){return e.length===0?null:J.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 J.jsx("span",{style:{display:"inline-block",padding:"2px 8px",borderRadius:10,fontSize:11,fontWeight:500,color:ue.brand.primaryDark,background:"#EEF2FF",border:"1px solid #C7D2FE"},children:a},i)})})}function VT({evidence:e}){const[t,i]=Un.useState(!1);if(!e||e.length===0)return null;const a=t?e:e.slice(0,2);return J.jsxs("div",{style:{margin:"12px 0"},children:[J.jsx("div",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:ue.text.primary},children:"Evidence"}),a.map((n,u)=>J.jsxs("div",{style:{padding:"8px 12px",marginBottom:6,borderRadius:8,background:ue.bg.secondary,borderLeft:`3px solid ${ue.brand.primary}`},children:[J.jsxs("div",{style:{fontSize:12,fontStyle:"italic",color:ue.text.secondary,marginBottom:4},children:['"',n.text,'"']}),J.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:11,color:ue.text.muted},children:[J.jsx("span",{style:{fontWeight:600},children:n.tactic}),J.jsxs("span",{children:["weight: ",n.weight.toFixed(2)]})]})]},u)),e.length>2&&J.jsx("button",{onClick:()=>i(!t),style:{background:"none",border:"none",color:ue.brand.primary,fontSize:12,cursor:"pointer",padding:"4px 0"},children:t?"Show less":`Show ${e.length-2} more`})]})}function WT({action:e}){return J.jsxs("div",{style:{padding:"10px 14px",borderRadius:8,background:"#ECFDF5",border:"1px solid #A7F3D0",margin:"8px 0"},children:[J.jsx("div",{style:{fontSize:11,fontWeight:600,color:ue.severity.safe,marginBottom:4},children:"Recommended Action"}),J.jsx("div",{style:{fontSize:13,color:"#065F46"},children:e})]})}function BT({calibration:e}){return e!=null&&e.applied?J.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:6,fontSize:11,color:ue.brand.primaryDark,background:"#EEF2FF"},children:[J.jsx("span",{style:{fontWeight:600},children:"Age:"}),J.jsx("span",{children:e.age_group}),e.multiplier&&J.jsxs("span",{children:["(",e.multiplier,"x)"]})]}):null}const HT=[{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 J.jsx("div",{style:{display:"flex",justifyContent:"center",gap:16,marginTop:20,paddingTop:12,borderTop:`1px solid ${ue.border}`},children:HT.map(e=>J.jsx("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",style:{fontSize:11,color:ue.brand.primary,textDecoration:"none",fontWeight:500},children:e.label},e.href))})}function KT({message:e}){const t=e||"This feature requires a plan upgrade or additional credits.";return J.jsxs("div",{style:{border:`1px solid ${ue.brand.primary}`,borderRadius:12,padding:20,textAlign:"center",background:`linear-gradient(135deg, ${ue.bg.secondary}, #EEF2FF)`},children:[J.jsx("div",{style:{fontSize:28,marginBottom:8},children:"🚀"}),J.jsx("div",{style:{fontSize:14,fontWeight:600,color:ue.text.primary,marginBottom:6},children:"Upgrade Your Plan"}),J.jsx("div",{style:{fontSize:13,color:ue.text.secondary,lineHeight:1.6,marginBottom:16},children:t}),J.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, ${ue.brand.primary}, ${ue.brand.primaryDark})`,color:"#fff",fontSize:13,fontWeight:600,textDecoration:"none"},children:"Upgrade on Tuteliq Dashboard"}),J.jsx("div",{style:{marginTop:12,fontSize:11,color:ue.text.muted},children:"Manage your plan and credits at tuteliq.ai/dashboard"})]})}function GT(e){return e.replace(/^detect_/,"").replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function XT({data:e}){const{toolName:t,result:i}=e,a=GT(t);if(i.error&&(i.upgrade||i.tier_restricted))return J.jsxs(ag,{title:a,children:[J.jsx(KT,{message:i.message||i.error}),J.jsx(ug,{})]});const n=typeof i.severity=="number",u=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||[],P=i.age_calibration;return J.jsxs(ag,{title:a,children:[J.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12},children:[J.jsx(MT,{score:u,level:f}),J.jsxs("div",{children:[J.jsx(FT,{level:f,label:m?`${f} Risk`:"Safe"}),J.jsx("div",{style:{fontSize:12,color:ue.text.muted,marginTop:4},children:m?"Threat detected":"No threat detected"}),P&&J.jsx(BT,{calibration:P})]})]}),J.jsx(JT,{value:l}),y.length>0&&J.jsx(qT,{categories:y}),v&&J.jsx("div",{style:{margin:"12px 0",fontSize:13,color:ue.text.secondary,lineHeight:1.6},children:v}),k.length>0&&J.jsx(VT,{evidence:k}),g&&J.jsx(WT,{action:g}),J.jsx(ug,{})]})}function QT({message:e="Analyzing..."}){return J.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"32px 16px",fontFamily:vp},children:[J.jsx("div",{style:{position:"relative",width:48,height:48,marginBottom:16},children:J.jsxs("svg",{width:48,height:48,viewBox:"0 0 48 48",children:[J.jsx("circle",{cx:24,cy:24,r:20,fill:"none",stroke:ue.bg.tertiary,strokeWidth:4}),J.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"}}),J.jsx("defs",{children:J.jsxs("linearGradient",{id:"tuteliq-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[J.jsx("stop",{offset:"0%",stopColor:ue.brand.primary}),J.jsx("stop",{offset:"100%",stopColor:ue.brand.primaryLight})]})})]})}),J.jsx("div",{style:{fontSize:13,fontWeight:600,color:ue.text.secondary,marginBottom:4},children:e}),J.jsx("div",{style:{fontSize:11,color:ue.text.muted},children:"Powered by Tuteliq AI"}),J.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.2.5",
3
+ "version": "3.2.6",
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",