// SME profile ↔ ActionBoard AI Pod integration — flow stages, governance, legend.
const ITG_META = {
  eyebrow: "ACTIONBOARD.AI · ARCHITECTURE",
  title: "How your AI ActionBoard is wired",
  lede: "Two views of one system. See your personal ActionBoard spanning the Voltron Castle desktop app, an always-on cloud pod, and mobile — then follow the secure path an SME profile takes to plug into a pod. Switch views below.",
  mcpUri: "mcp://actionboard.ai/pro/jarjis",
};

// The seven-hop flow. Drives the walkthrough cards; mirrors the animated diagram.
const ITG_STAGES = [
  {
    n: "01", key: "public", icon: "globe", accent: "#a78bfa",
    title: "Public profile, secured at the edge",
    detail: "The SME profile is published for public access on its own subdomain. You keep DNS control and switch on data-security controls — WAF, rate limits, and field redaction — before any request reaches a pod.",
    tags: ["DNS control", "Data security controls", "Public MCP endpoint"],
  },
  {
    n: "02", key: "call", icon: "shield", accent: "#a78bfa",
    title: "Profile calls its Secure MCP Gateway",
    detail: "The profile app never touches a pod directly. Every action is signed and routed through the Profile Secure MCP Gateway — your private edge in front of the pod network.",
    tags: ["Signed calls", "Private edge", "mcp:// route"],
  },
  {
    n: "03", key: "handshake", icon: "lock", accent: "#a78bfa",
    title: "Handshake with the ActionBoard Gateway",
    detail: "The Profile gateway completes an mTLS handshake with the ActionBoard MCP Gateway to establish a trusted route, then posts the request into your SME AI Pod.",
    tags: ["mTLS handshake", "Trusted route", "Posts to pod"],
  },
  {
    n: "04", key: "acquire", icon: "clock", accent: "#34D399",
    title: "Green Lion runs the 25-minute acquire loop",
    detail: "Inside the pod, the Voltron Green Lion runs a batch acquire loop on a 25-minute cycle — pulling every incoming SME-assist request, deduping it, and enriching each with knowledge-base context.",
    tags: ["Green Lion", "Batch acquire", "25-min cycle"],
  },
  {
    n: "05", key: "actionlist", icon: "layers", accent: "#34D399",
    title: "Priority classification builds the ActionList",
    detail: "Green Lion sorts the batch into a priority classification (P1–P3) and assembles the ActionList that the rest of the Voltron Lion agents execute against.",
    tags: ["Priority P1–P3", "ActionList", "Voltron agents"],
  },
  {
    n: "06", key: "plan", icon: "spark", accent: "#a78bfa",
    title: "Office hour turns requests into a feature plan",
    detail: "The SME runs a G-Stack office hour and turns each request into a feature plan. Run it on your own custom model as the core action model, or use the run as data to train one.",
    tags: ["G-Stack office hour", "Feature plan", "Core or training model"],
  },
  {
    n: "07", key: "board", icon: "board", accent: "#a78bfa",
    title: "Ship a new ActionBoard — scheduled & paid",
    detail: "Every request becomes a new ActionBoard with its KB and analysis already inside. The SME sets the schedule, builds the complete vision board, and wires payment agents to the shared wallet link.",
    tags: ["KB + analysis", "Schedule + vision board", "Payment agents · wallet"],
  },
];

// Cross-cutting security / compliance / audit — the guarantees around the flow.
const ITG_GOV = [
  { icon: "globe", accent: "#a78bfa", title: "DNS control", body: "You own the subdomain and its DNS. Point it, lock it, or pull it — the profile only resolves where you allow it to." },
  { icon: "shield", accent: "#38bdf8", title: "Data security controls", body: "WAF, rate limiting, and field-level redaction sit at the edge, so raw requests are filtered before a pod ever sees them." },
  { icon: "scrub", accent: "#34D399", title: "Compliance scrub", body: "When a customer shares data, it is scrubbed against your compliance and governance policy before it is stored or routed onward." },
  { icon: "lock", accent: "#F5B301", title: "Yellow Lion audit trail", body: "Every hop from the user's AI pod to the SME pod is written to an immutable, Merkle-attested trail owned by the Voltron Yellow Lion." },
];

const ITG_LEGEND = [
  { c: "#a78bfa", label: "Secure data flow" },
  { c: "#34D399", label: "Green Lion · acquire loop" },
  { c: "#F5B301", label: "Yellow Lion · audit trail" },
  { c: "#38bdf8", label: "Compliance scrub" },
];

// ============================================================================
// PERSONAL AI ACTIONBOARD — the components of your own stack (drives PersonalDiagram tab).
const ITG_PERSONAL_STAGES = [
  {
    n: "01", key: "desktop", icon: "desktop", accent: "#a78bfa",
    title: "Voltron Castle — Local Desktop App",
    detail: "Run the full Voltron stack on your own machine. Serve a local model for private, offline work, or switch to hybrid mode and let the board split each action between your desktop and the cloud.",
    tags: ["Local model", "Hybrid mode", "Runs offline"],
  },
  {
    n: "02", key: "cloud", icon: "cloud", accent: "#34D399",
    title: "ActionBoard.ai Cloud AI Pod",
    detail: "Your always-on pod runs the Voltron Lion agents against 150+ tools in the cloud — no machine to keep awake. Long jobs, scheduled loops, and heavy tool use live here.",
    tags: ["150+ tools", "Voltron agents", "Always-on"],
  },
  {
    n: "03", key: "mobile", icon: "phone", accent: "#38bdf8",
    title: "Mobile client — manage both",
    detail: "Drive the whole system from your phone. The mobile client manages both the cloud pod and your local desktop app, so you can kick off, pause, or review any action from anywhere.",
    tags: ["Cloud + local", "Approve on the go", "Push updates"],
  },
  {
    n: "04", key: "providers", icon: "plug", accent: "#a78bfa",
    title: "Integrate models & MCP — nothing to host",
    detail: "Bring or switch any model, and connect multiple MCP providers without standing up a single endpoint. The provider mesh is hosted for you as a community gateway — you just pick what to use.",
    tags: ["Multiple models", "Multiple MCP providers", "Community-hosted"],
  },
  {
    n: "05", key: "sme", icon: "mail", accent: "#F5B301",
    title: "Reach SMEs through their profile",
    detail: "Send a mission briefing or a meeting request straight to an SME through their profile. Each SME profile is the public front door to their expertise — and to their pod.",
    tags: ["Mission briefing", "Meeting request", "Via SME profile"],
  },
  {
    n: "06", key: "loop", icon: "loop", accent: "#F5B301",
    title: "SME profile as your AI backend",
    detail: "An SME profile is an AI-powered backend to your ActionBoard. Point the board at it and it runs an auto action loop for you — acquiring, planning, and shipping against the board without babysitting.",
    tags: ["AI backend", "Auto action loop", "Runs from the board"],
  },
];

const ITG_PERSONAL_LEGEND = [
  { c: "#a78bfa", label: "Your ActionBoard · control plane" },
  { c: "#38bdf8", label: "Clients · mobile & desktop" },
  { c: "#34D399", label: "Cloud AI Pod · 150+ tools" },
  { c: "#F5B301", label: "SME profiles · briefings & auto-loop" },
];

// Tabbed views for the architecture section.
const ITG_VIEWS = {
  personal: {
    key: "personal", tab: "Your Personal AI ActionBoard", icon: "board",
    eyebrow: "YOUR AI ACTIONBOARD · PERSONAL ARCHITECTURE",
    diagTitle: "One board across desktop, cloud, and mobile.",
    diagLede: "Your ActionBoard is the control plane. Run it locally on the Voltron Castle desktop app, in an always-on cloud pod, or hybrid across both — manage all of it from mobile, plug in any model and community-hosted MCP tools with nothing to self-host, and let SME profiles run auto action loops on your behalf.",
    legend: ITG_PERSONAL_LEGEND,
    flowEyebrow: "THE PIECES",
    flowTitle: "Six parts of your personal AIOps stack.",
    stages: ITG_PERSONAL_STAGES,
  },
  pod: {
    key: "pod", tab: "SME profile ↔ Pod", icon: "shield",
    eyebrow: "LIVE ARCHITECTURE",
    diagTitle: "One signed path, edge to pod to board.",
    diagLede: "Data flows top to bottom: a public request is scrubbed and signed at the edge, handshakes into the pod, and the Green Lion’s 25-minute loop turns it into a scheduled ActionBoard — every hop tapped by the Yellow Lion audit rail.",
    legend: ITG_LEGEND,
    flowEyebrow: "THE FLOW · STEP BY STEP",
    flowTitle: "Seven hops from public request to shipped board.",
    stages: ITG_STAGES,
    governance: ITG_GOV,
  },
};

Object.assign(window, { ITG_META, ITG_STAGES, ITG_GOV, ITG_LEGEND, ITG_PERSONAL_STAGES, ITG_PERSONAL_LEGEND, ITG_VIEWS });
