Files
harmony/docs/diagrams/fleet-score-references.svg
2026-07-15 17:55:48 -04:00

101 lines
6.5 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1400" height="790" viewBox="0 0 1400 790" role="img" aria-labelledby="title desc">
<title id="title">Fleet reference implementation contract map</title>
<desc id="desc">A three-column map lists reusable Fleet functionality, the concrete Ref types it produces, and the Score types that consume each Ref.</desc>
<style>
.sans { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.mono { font-family: "JetBrains Mono", Consolas, monospace; }
.header { fill: #64748b; font-size: 13px; font-weight: 750; letter-spacing: 1.4px; }
.function { fill: #0f172a; font-size: 20px; font-weight: 720; }
.detail { fill: #64748b; font-size: 14px; }
.ref { fill: #115e59; font-size: 14px; font-weight: 650; }
.score { fill: #ffffff; font-size: 13px; font-weight: 650; }
</style>
<rect width="1400" height="790" fill="#ffffff"/>
<g class="sans">
<text x="40" y="52" fill="#0f172a" font-size="30" font-weight="750">Fleet reference implementation</text>
<text x="40" y="80" fill="#64748b" font-size="17">Read each contract left to right. The map shows type compatibility, not execution order.</text>
<text x="40" y="122" class="header">FUNCTIONALITY</text>
<text x="360" y="122" class="header">PRODUCES REF TYPE</text>
<text x="740" y="122" class="header">CONSUMED BY SCORE TYPE</text>
<line x1="40" y1="135" x2="1360" y2="135" stroke="#94a3b8" stroke-width="1.5"/>
<!-- Identity contracts -->
<rect x="40" y="150" width="280" height="190" rx="12" fill="#eef2ff"/>
<rect x="40" y="150" width="6" height="190" rx="3" fill="#6366f1"/>
<text x="65" y="190" class="function">Identity</text>
<text x="65" y="218" class="detail mono">PostgreSQLScore</text>
<text x="65" y="240" class="detail">+</text>
<text x="65" y="262" class="detail mono">ZitadelScore</text>
<rect x="360" y="158" width="300" height="42" rx="21" fill="#f0fdfa" stroke="#0f766e"/>
<text x="510" y="184" text-anchor="middle" class="mono ref">OidcProviderRef</text>
<rect x="360" y="218" width="300" height="42" rx="21" fill="#f0fdfa" stroke="#0f766e"/>
<text x="510" y="244" text-anchor="middle" class="mono ref">OidcApplicationRef</text>
<rect x="360" y="278" width="300" height="42" rx="21" fill="#f0fdfa" stroke="#0f766e"/>
<text x="510" y="304" text-anchor="middle" class="mono ref">OidcMachineIdentityRef</text>
<rect x="740" y="158" width="170" height="42" rx="10" fill="#172554"/>
<text x="825" y="184" text-anchor="middle" class="mono score">OpenBaoScore</text>
<rect x="920" y="158" width="210" height="42" rx="10" fill="#172554"/>
<text x="1025" y="184" text-anchor="middle" class="mono score" style="font-size:12px">NatsAuthCalloutScore</text>
<rect x="1140" y="158" width="220" height="42" rx="10" fill="#172554"/>
<text x="1250" y="184" text-anchor="middle" class="mono score" style="font-size:11px">FleetDeviceEnrollmentScore</text>
<rect x="740" y="218" width="220" height="42" rx="10" fill="#172554"/>
<text x="850" y="244" text-anchor="middle" class="mono score">FleetOperatorScore</text>
<rect x="740" y="278" width="220" height="42" rx="10" fill="#172554"/>
<text x="850" y="304" text-anchor="middle" class="mono score">FleetOperatorScore</text>
<line x1="330" y1="210" x2="1360" y2="210" stroke="#e2e8f0"/>
<line x1="330" y1="270" x2="1360" y2="270" stroke="#e2e8f0"/>
<!-- Messaging contract -->
<rect x="40" y="360" width="280" height="75" rx="12" fill="#ecfeff"/>
<rect x="40" y="360" width="6" height="75" rx="3" fill="#06b6d4"/>
<text x="65" y="390" class="function">Messaging</text>
<text x="65" y="415" class="detail mono" style="font-size:12px">NatsScore + NatsAuthCalloutScore</text>
<rect x="360" y="376" width="300" height="42" rx="21" fill="#f0fdfa" stroke="#0f766e"/>
<text x="510" y="402" text-anchor="middle" class="mono ref">NatsClientRef</text>
<rect x="740" y="376" width="220" height="42" rx="10" fill="#172554"/>
<text x="850" y="402" text-anchor="middle" class="mono score">FleetOperatorScore</text>
<rect x="975" y="376" width="205" height="42" rx="10" fill="#172554"/>
<text x="1077" y="402" text-anchor="middle" class="mono score">FleetDeviceScore</text>
<!-- Secret contracts -->
<rect x="40" y="455" width="280" height="130" rx="12" fill="#f0fdf4"/>
<rect x="40" y="455" width="6" height="130" rx="3" fill="#22c55e"/>
<text x="65" y="495" class="function">Secrets</text>
<text x="65" y="523" class="detail mono">OpenBaoScore</text>
<rect x="360" y="463" width="300" height="42" rx="21" fill="#f0fdfa" stroke="#0f766e"/>
<text x="510" y="489" text-anchor="middle" class="mono ref">OpenBaoRef</text>
<rect x="360" y="523" width="300" height="42" rx="21" fill="#f0fdfa" stroke="#0f766e"/>
<text x="510" y="549" text-anchor="middle" class="mono ref">OpenBaoJwtAuthRef</text>
<rect x="740" y="463" width="220" height="42" rx="10" fill="#172554"/>
<text x="850" y="489" text-anchor="middle" class="mono score">FleetOperatorScore</text>
<rect x="740" y="523" width="205" height="42" rx="10" fill="#172554"/>
<text x="842" y="549" text-anchor="middle" class="mono score">FleetDeviceScore</text>
<line x1="330" y1="515" x2="1360" y2="515" stroke="#e2e8f0"/>
<!-- Device identity contract -->
<rect x="40" y="605" width="280" height="75" rx="12" fill="#fff7ed"/>
<rect x="40" y="605" width="6" height="75" rx="3" fill="#f97316"/>
<text x="65" y="635" class="function">Device identity</text>
<text x="65" y="660" class="detail mono" style="font-size:12px">FleetDeviceEnrollmentScore</text>
<rect x="360" y="621" width="300" height="42" rx="21" fill="#f0fdfa" stroke="#0f766e"/>
<text x="510" y="647" text-anchor="middle" class="mono ref">DeviceIdentityRef</text>
<rect x="740" y="621" width="205" height="42" rx="10" fill="#172554"/>
<text x="842" y="647" text-anchor="middle" class="mono score">FleetDeviceScore</text>
<line x1="40" y1="705" x2="1360" y2="705" stroke="#cbd5e1"/>
<rect x="40" y="730" width="120" height="36" rx="9" fill="#172554"/>
<text x="100" y="753" text-anchor="middle" fill="#bfdbfe" font-size="12" font-weight="750" letter-spacing="1.2">SCORE TYPE</text>
<text x="178" y="753" fill="#64748b" font-size="14">owns behavior</text>
<rect x="320" y="728" width="145" height="40" rx="20" fill="#f0fdfa" stroke="#0f766e"/>
<text x="392" y="753" text-anchor="middle" class="mono ref">SomeRef</text>
<text x="485" y="753" fill="#64748b" font-size="14">carries typed desired state, not readiness</text>
</g>
</svg>