Files
2026-11-18 15:37:10 +01:00

242 lines
25 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<mxfile host="Electron">
<diagram name="1. Architecture" id="arch">
<mxGraphModel dx="3204" dy="1013" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1500" pageHeight="900" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="9YVmYg31Dtc29ZtFE1oE-1" edge="1" parent="1" source="arch-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;fillColor=#e51400;strokeColor=#B20000;" target="arch-6">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-10" y="240" />
<mxPoint x="-10" y="240" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="9YVmYg31Dtc29ZtFE1oE-5" connectable="0" parent="9YVmYg31Dtc29ZtFE1oE-1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];inheritText=1;defaultLabelBackgroundColor=page;" value="e-mail" vertex="1">
<mxGeometry relative="1" x="-0.0667" as="geometry">
<mxPoint y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="arch-2" parent="1" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" value="Customer" vertex="1">
<mxGeometry height="70" width="40" x="-220" y="205" as="geometry" />
</mxCell>
<mxCell id="9YVmYg31Dtc29ZtFE1oE-3" edge="1" parent="1" source="arch-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;fillColor=#60a917;strokeColor=#2D7600;" target="arch-2">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-320" y="470" />
<mxPoint x="-320" y="240" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="9YVmYg31Dtc29ZtFE1oE-4" connectable="0" parent="9YVmYg31Dtc29ZtFE1oE-3" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];inheritText=1;defaultLabelBackgroundColor=page;" value="Send&lt;div&gt;message&lt;/div&gt;" vertex="1">
<mxGeometry relative="1" x="-0.075" as="geometry">
<mxPoint y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="arch-3" parent="1" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" value="Support agent&lt;div&gt;(human)&lt;/div&gt;" vertex="1">
<mxGeometry height="70" width="40" x="-220" y="435" as="geometry" />
</mxCell>
<mxCell id="arch-4" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="&lt;b&gt;Anthropic&lt;/b&gt;&lt;div&gt;https://api.anthropic.com/v1&lt;/div&gt;" vertex="1">
<mxGeometry height="60" width="180" x="225" y="10" as="geometry" />
</mxCell>
<mxCell id="arch-5" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="&lt;b&gt;Ollama&lt;/b&gt; + bge-m3&lt;br&gt;embedding model" vertex="1">
<mxGeometry height="60" width="180" x="455" y="10" as="geometry" />
</mxCell>
<mxCell id="9YVmYg31Dtc29ZtFE1oE-2" edge="1" parent="1" source="arch-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;" target="arch-3">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-110" y="470" />
<mxPoint x="-110" y="470" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="arch-6" parent="1" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;verticalAlign=top;align=left;spacingLeft=8;fontStyle=1;fillColor=#fafafa;strokeColor=#6c8ebf;" value="LibreDesk" vertex="1">
<mxGeometry height="465" width="970" x="-30" y="160" as="geometry" />
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-20" edge="1" parent="1" source="arch-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;endArrow=none;endFill=0;" target="arch-4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="arch-7" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;b&gt;Provider&lt;/b&gt;&lt;br&gt;completion: Claude Sonnet 5.5" vertex="1">
<mxGeometry height="70" width="170" x="230" y="180" as="geometry" />
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-21" edge="1" parent="1" source="arch-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;endArrow=none;endFill=0;" target="arch-5">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="arch-8" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;b&gt;Embedding&lt;/b&gt;&lt;br&gt;Ollama, bge-m3" vertex="1">
<mxGeometry height="70" width="170" x="460" y="180" as="geometry" />
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-14" edge="1" parent="1" source="arch-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;endArrow=none;endFill=0;" target="arch-7">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-15" edge="1" parent="1" source="arch-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;endArrow=none;endFill=0;" target="arch-11">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="315" y="400" />
<mxPoint x="315" y="400" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="arch-9" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="&lt;b&gt;Generate reply&lt;/b&gt;&lt;br&gt;draft in the editor" vertex="1">
<mxGeometry height="70" width="170" x="230" y="290" as="geometry" />
</mxCell>
<mxCell id="arch-10" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;b&gt;Snippets&lt;/b&gt;&lt;br&gt;knowledge base,&lt;br&gt;118 extracts + vectors" vertex="1">
<mxGeometry height="70" width="170" x="700" y="180" as="geometry" />
</mxCell>
<mxCell id="arch-11" parent="1" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;verticalAlign=top;align=left;spacingLeft=8;fontStyle=1;fillColor=#fafafa;strokeColor=#6c8ebf;" value="Tools &lt;span style=&quot;font-weight:normal&quot;&gt;(function calling: name + JSON schema, exposed to the LLM)&lt;/span&gt;" vertex="1">
<mxGeometry height="210" width="735" x="135" y="390" as="geometry" />
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-16" edge="1" parent="1" source="arch-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;endArrow=none;endFill=0;" target="arch-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-17" connectable="0" parent="HigBPHvGvvlsroYYhkdi-16" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];inheritText=1;defaultLabelBackgroundColor=page;" value="fetch query" vertex="1">
<mxGeometry relative="1" x="0.0571" y="-1" as="geometry">
<mxPoint x="4" y="-13" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-18" edge="1" parent="1" source="arch-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;endArrow=none;endFill=0;" target="arch-10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-19" connectable="0" parent="HigBPHvGvvlsroYYhkdi-18" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];inheritText=1;defaultLabelBackgroundColor=page;" value="vector search" vertex="1">
<mxGeometry relative="1" x="-0.0896" as="geometry">
<mxPoint x="-60" y="-2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="arch-12" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="search_articles" vertex="1">
<mxGeometry height="55" width="90" x="500" y="435" as="geometry" />
</mxCell>
<mxCell id="arch-13" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;dashed=1;strokeWidth=2;" value="&lt;b&gt;get_station_diagnostic(serial, from, to)&lt;/b&gt;&lt;br&gt;new custom tool" vertex="1">
<mxGeometry height="75" width="320" x="155" y="510" as="geometry" />
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-13" edge="1" parent="1" source="HigBPHvGvvlsroYYhkdi-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;defaultLabelBackgroundColor=page;" target="arch-9">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="140" y="325" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="HigBPHvGvvlsroYYhkdi-3" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="&lt;div&gt;&lt;b&gt;Client&lt;/b&gt;&lt;/div&gt;&lt;b&gt;Conversation&lt;/b&gt;" vertex="1">
<mxGeometry height="70" width="120" x="80" y="220" as="geometry" />
</mxCell>
<mxCell id="fix-5" parent="1" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;verticalAlign=top;align=left;spacingLeft=8;fontStyle=1;fillColor=#fff8ef;strokeColor=#d79b00;dashed=1;strokeWidth=2;" value="Detector service (independent container)" vertex="1">
<mxGeometry height="330" width="420" x="105" y="740" as="geometry" />
</mxCell>
<mxCell id="fix-6" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;dashed=1;strokeWidth=2;" value="&lt;b&gt;REST API&lt;/b&gt;&lt;br&gt;GET /stations/{serial}/diagnostic?from=…&amp;amp;to=…&lt;br&gt;→ events: family, start, end, evidence" vertex="1">
<mxGeometry height="80" width="360" x="135" y="780" as="geometry" />
</mxCell>
<mxCell id="acc-check" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;dashed=1;strokeWidth=2;" value="&lt;b&gt;Access check&lt;/b&gt; (before any data is read)&lt;br&gt;same identity headers → access service:&lt;br&gt;serial among the customer&#39;s stations? no → 403" vertex="1">
<mxGeometry height="70" width="360" x="135" y="880" as="geometry" />
</mxCell>
<mxCell id="acc-allowed" edge="1" parent="1" source="acc-check" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#d79b00;strokeWidth=2;dashed=1;fontColor=#b36b00;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="fix-7" value="allowed">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="acc-tool" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;strokeWidth=2;" value="&lt;b&gt;get_customer_access()&lt;/b&gt;&lt;br&gt;no parameter, on Generate reply&lt;br&gt;secret header Authorization: Bearer …" vertex="1">
<mxGeometry height="62" width="320" x="155" y="432" as="geometry" />
</mxCell>
<mxCell id="acc-e-conv" edge="1" parent="1" source="HigBPHvGvvlsroYYhkdi-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#b85450;fontColor=#b85450;" target="acc-tool" value="contact e-mail&lt;br&gt;(X-Libredesk-Contact-Email,&lt;br&gt;added by LibreDesk,&lt;br&gt;not the LLM)">
<mxGeometry relative="1" x="-0.1837" as="geometry">
<mxPoint as="offset" />
<Array as="points">
<mxPoint x="60" y="260" />
<mxPoint x="60" y="448" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="acc-svc" parent="1" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;verticalAlign=top;align=left;spacingLeft=8;fontStyle=1;fillColor=#fdf3f2;strokeColor=#b85450;strokeWidth=2;" value="Access service (independent container: acces/, Python stdlib) &lt;span style=&quot;font-weight:normal&quot;&gt;in service, provisional: Maxime&#39;s PC&lt;/span&gt;" vertex="1">
<mxGeometry height="350" width="465" x="-390" y="720" as="geometry" />
</mxCell>
<mxCell id="acc-api" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;strokeWidth=2;" value="&lt;b&gt;REST API&lt;/b&gt;&lt;br&gt;GET /customer/access · Bearer token, else 401&lt;br&gt;→ {&quot;projects&quot;: [{project, serial, role}]}" vertex="1">
<mxGeometry height="80" width="425" x="-370" y="780" as="geometry" />
</mxCell>
<mxCell id="acc-lookup" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;strokeWidth=2;" value="&lt;b&gt;Rights lookup&lt;/b&gt;&lt;br&gt;contact e-mail → dashboard accounts (auth0|…)&lt;br&gt;→ their UserGroups → Device (project, serial)&lt;br&gt;role: dev_admin wins over user&lt;br&gt;no e-mail, unknown or no rights → empty list&lt;br&gt;file or DB unreadable → 502, never an empty list" vertex="1">
<mxGeometry height="150" width="425" x="-370" y="890" as="geometry" />
</mxCell>
<mxCell id="acc-e-api" edge="1" parent="1" source="acc-api" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#b85450;fontColor=#b85450;strokeWidth=2;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="acc-lookup" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="acc-auth0" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="&lt;b&gt;utilisateurs.json&lt;/b&gt;&lt;br&gt;e-mail → auth0|…&lt;br&gt;Auth0 export (exporter_utilisateurs.py),&lt;br&gt;re-read on every call" vertex="1">
<mxGeometry height="80" width="200" x="-390" y="1185" as="geometry" />
</mxCell>
<mxCell id="acc-db" parent="1" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=10;fillColor=#f8cecc;strokeColor=#b85450;" value="&lt;b&gt;Access rights&lt;/b&gt; (dashboard database.db, copy)&lt;br&gt;&lt;b&gt;UserGroupEntry&lt;/b&gt;: user → UserGroup&lt;br&gt;&lt;b&gt;UserGroup&lt;/b&gt;: device × role (user · dev_admin)&lt;br&gt;&lt;b&gt;Device&lt;/b&gt;: name, serial_number" vertex="1">
<mxGeometry height="120" width="245" x="-170" y="1165" as="geometry" />
</mxCell>
<mxCell id="acc-e-auth0" edge="1" parent="1" source="acc-lookup" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#b85450;fontColor=#b85450;exitX=0.2;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="acc-auth0" value="e-mail → auth0|…">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="acc-e-db" edge="1" parent="1" source="acc-lookup" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#b85450;fontColor=#b85450;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="acc-db" value="read-only">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="acc-e-tool" edge="1" parent="1" source="acc-tool" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#b85450;fontColor=#b85450;strokeWidth=2;exitX=0;exitY=0.75;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="acc-api" value="HTTP GET&lt;br&gt;+ Bearer token&lt;br&gt;+ contact e-mail">
<mxGeometry relative="1" x="0.1612" as="geometry">
<mxPoint as="offset" />
<Array as="points">
<mxPoint x="100" y="478" />
<mxPoint x="100" y="660" />
<mxPoint x="-157" y="660" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="acc-e-check" edge="1" parent="1" source="acc-check" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#b85450;dashed=1;fontColor=#b85450;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" target="acc-api" value="re-check:&lt;br&gt;the LLM cannot&lt;br&gt;widen access">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="fix-7" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;dashed=1;strokeWidth=2;" value="&lt;b&gt;Detectors&lt;/b&gt;&lt;br&gt;visibility · obstruction · target issue&lt;br&gt;thermal · no data · displacement&lt;br&gt;→ classified events" vertex="1">
<mxGeometry height="80" width="360" x="135" y="975" as="geometry" />
</mxCell>
<mxCell id="fix-8" parent="1" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=10;fillColor=#d5e8d4;strokeColor=#82b366;" value="&lt;b&gt;Station data&lt;/b&gt; (AIMsight platform)" vertex="1">
<mxGeometry height="70" width="360" x="135" y="1190" as="geometry" />
</mxCell>
<mxCell id="fix-10" edge="1" parent="1" source="arch-13" style="rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#d79b00;strokeWidth=2;dashed=1;fontColor=#b36b00;edgeStyle=orthogonalEdgeStyle;" target="fix-6" value="7. HTTP GET (serial, from, to)&lt;br&gt;+ identity headers">
<mxGeometry relative="1" x="0.1306" as="geometry" />
</mxCell>
<mxCell id="fix-11" edge="1" parent="1" source="fix-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#d79b00;strokeWidth=2;dashed=1;fontColor=#b36b00;exitX=0.500;exitY=1.000;exitDx=0;exitDy=0;entryX=0.500;entryY=0.000;entryDx=0;entryDy=0;" target="acc-check" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="fix-12" edge="1" parent="1" source="fix-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#d79b00;strokeWidth=2;dashed=1;fontColor=#b36b00;exitX=0.500;exitY=1.000;exitDx=0;exitDy=0;entryX=0.500;entryY=0.000;entryDx=0;entryDy=0;" target="fix-8" value="reads the range (read-only)">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gen-boundary" edge="1" parent="1" style="endArrow=none;html=1;rounded=0;dashed=1;dashPattern=8 4;strokeColor=#999999;strokeWidth=1;" value="">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-400" y="680" as="sourcePoint" />
<mxPoint x="1380" y="680" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="gen-boundary-lbl" parent="1" style="text;html=1;align=right;verticalAlign=bottom;whiteSpace=wrap;fontColor=#666666;fontSize=11;" value="&lt;b&gt;HTTP / JSON boundary&lt;/b&gt;&lt;br&gt;below: independent containers, deployable and reusable on their own" vertex="1">
<mxGeometry height="40" width="380" x="1000" y="638" as="geometry" />
</mxCell>
<mxCell id="9YVmYg31Dtc29ZtFE1oE-8" edge="1" parent="1" source="9YVmYg31Dtc29ZtFE1oE-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#9673a6;strokeWidth=2;dashed=1;fontColor=#7a4f8f;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="gen-6" value="HTTP (params)">
<mxGeometry relative="1" x="0.1306" as="geometry" />
</mxCell>
<mxCell id="9YVmYg31Dtc29ZtFE1oE-6" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=light-dark(#9673a6, #d2bbdd);dashed=1;strokeWidth=2;" value="&lt;b&gt;other_tool(params)&lt;/b&gt;&lt;br&gt;any other capability, same mechanism&lt;br&gt;&lt;i&gt;e.g. get_contract(customer_id)&lt;/i&gt;" vertex="1">
<mxGeometry height="75" width="280" x="575" y="510" as="geometry" />
</mxCell>
<mxCell id="gen-5" parent="1" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;verticalAlign=top;align=left;spacingLeft=8;fontStyle=1;fillColor=#faf6fc;strokeColor=#9673a6;dashed=1;strokeWidth=2;" value="Other service (independent container)" vertex="1">
<mxGeometry height="330" width="340" x="545" y="740" as="geometry" />
</mxCell>
<mxCell id="gen-6" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;dashed=1;strokeWidth=2;" value="&lt;b&gt;REST API&lt;/b&gt;&lt;br&gt;GET /{resource}/{id}?…&lt;br&gt;→ structured JSON" vertex="1">
<mxGeometry height="80" width="300" x="565" y="780" as="geometry" />
</mxCell>
<mxCell id="gen-7" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;dashed=1;strokeWidth=2;" value="&lt;b&gt;Domain logic&lt;/b&gt;&lt;br&gt;rules · models · computations&lt;br&gt;owned by the service, not by the LLM&lt;br&gt;→ structured result" vertex="1">
<mxGeometry height="150" width="300" x="565" y="890" as="geometry" />
</mxCell>
<mxCell id="gen-8" parent="1" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=10;fillColor=#f5f5f5;strokeColor=#666666;" value="&lt;b&gt;Domain data&lt;/b&gt; (DB, CRM, ERP, …)" vertex="1">
<mxGeometry height="70" width="300" x="565" y="1190" as="geometry" />
</mxCell>
<mxCell id="gen-11" edge="1" parent="1" source="gen-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#9673a6;strokeWidth=2;dashed=1;fontColor=#7a4f8f;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="gen-7" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gen-12" edge="1" parent="1" source="gen-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#9673a6;strokeWidth=2;dashed=1;fontColor=#7a4f8f;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="gen-8" value="data access">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gen-host" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;dashed=1;fontColor=#666666;" value="&lt;b&gt;Other host app&lt;/b&gt;&lt;br&gt;&lt;i&gt;e.g. sales agent&lt;/i&gt;&lt;br&gt;own LLM + own tools,&lt;br&gt;calls the same services" vertex="1">
<mxGeometry height="80" width="200" x="960" y="780" as="geometry" />
</mxCell>
<mxCell id="gen-host-edge" edge="1" parent="1" source="gen-host" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=#ffffff;endArrow=classic;strokeColor=#999999;dashed=1;fontColor=#666666;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" target="gen-6" value="HTTP">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gen-legend" parent="1" style="shape=note;whiteSpace=wrap;html=1;size=14;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;spacingRight=8;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;b style=&quot;font-size:13px&quot;&gt;Reusable mechanism&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;1. Host app&lt;/b&gt; (here LibreDesk) triggers an action and sends context + tool list to the LLM.&lt;br&gt;&lt;b&gt;2. Tool&lt;/b&gt; = name + JSON schema + thin HTTP adapter. No business logic in the host.&lt;br&gt;&lt;b&gt;3. Independent service&lt;/b&gt; = container exposing a REST API; owns its domain logic and its data access, returns structured JSON.&lt;br&gt;&lt;b&gt;4.&lt;/b&gt; The LLM turns the tool result into the output (here a draft reviewed by a human).&lt;br&gt;&lt;b&gt;5. Access&lt;/b&gt;: on Generate reply the LLM first calls get_customer_access; LibreDesk adds the contact identity (headers), the access service (Bearer token) returns the projects the customer may read (Auth0 export + UserGroup, the dashboard&#39;s rule). Each data service checks again with the same headers.&lt;br&gt;&lt;br&gt;New capability = one service + one tool declaration.&lt;br&gt;Same pattern for another host app (sales agent: CRM, quotes, stock…).&lt;br&gt;&lt;br&gt;&lt;b&gt;Legend&lt;/b&gt;&lt;br&gt;&lt;span style=&quot;color:#6c8ebf&quot;&gt;■&lt;/span&gt; existing LibreDesk&lt;br&gt;&lt;span style=&quot;color:#d79b00&quot;&gt;■&lt;/span&gt; dashed orange: this use case (planned)&lt;br&gt;&lt;span style=&quot;color:#b85450&quot;&gt;■&lt;/span&gt; red: access rights (solid: in service; dashed: planned)&lt;br&gt;&lt;span style=&quot;color:#9673a6&quot;&gt;■&lt;/span&gt; dashed purple: any other service, plugged the same way&lt;br&gt;&lt;span style=&quot;color:#999999&quot;&gt;■&lt;/span&gt; dashed grey: other consumers of the services" vertex="1">
<mxGeometry height="450" width="380" x="1000" y="160" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>