Skip to content
25 linesCodeBlameRaw
1import type { WorkspaceAgent } from "@g1t/contracts";
2
3import { Mark } from "./logo";
4
5/**
6 * Whether an agent is `@g1t`, the orchestrator every workspace has
7 * (docs/WORKSPACE.md, "g1t, the orchestrator"): built in, first in the
8 * agents service's list. Its handle is never another agent's.
9 */
10export function isOrchestrator(agent: Pick<WorkspaceAgent, "handle"> & { builtin?: boolean | null }): boolean {
11 return agent.builtin === true || agent.handle === "g1t";
12}
13
14/** g1t's face: the pixel 1 of the logo on a dark square, where agents wear the sparkle. */
15export function G1tMark({ size = 20 }: { size?: number }) {
16 return (
17 <span
18 aria-hidden="true"
19 className="inline-flex shrink-0 items-center justify-center bg-[#0b0b0d] ring-1 ring-line-strong ring-inset"
20 style={{ width: size, height: size, borderRadius: Math.round(size * 0.26) }}
21 >
22 <Mark className="size-full" />
23 </span>
24 );
25}