{orchestrator.code}
---
// FleetDiagram — orchestrator card, an arrow, and a 1-up of worker cards.
//
// Static shell: the captain renders literally, the workers render as toggle
// buttons with the `data-worker` hook asserted by `scripts/verify.mjs`. The
// `initial` worker is marked active and pressed.
//
// The source uses `gap:1px` over a coloured parent background to fake
// hairlines between worker cards; the parent background is an off-token seam
// colour marked inline with `token-gap`.
type Localized = { en: string; pt: string };
interface Worker {
/** Used as the `data-worker` hook and the key in the source. */
id: string;
/** Short label rendered uppercase, e.g. "UI". */
label: string | Localized;
/** Body copy describing the worker's remit. */
strong: string | Localized;
/** Path label, e.g. "agent/ui". */
code: string;
}
interface Props {
orchestrator: {
eyebrow: string | Localized;
/** May contain inline `
`; rendered with `set:html`. */
title: string | Localized;
code: string;
};
workers: Worker[];
initial?: string;
}
const { orchestrator, workers, initial = workers[0]?.id } = Astro.props;
---
{orchestrator.code}