Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(society): Jarvis is Gigi - the mascot as a 3D lead figure, only agent by default, with its own plain chat

rubenluetke10-beep47e7c9d66a9e
diff --git a/jarvis/society/runtime.py b/jarvis/society/runtime.py
index e95f41d183..86128da649 100644
--- a/jarvis/society/runtime.py
+++ b/jarvis/society/runtime.py
@@ -27,9 +27,11 @@ from .approvals import Approvals
from .bridge import MissionBridge
from .browser.session import BrowserJobs
from .capabilities import CapabilityRow, build_catalog
+from .checkpoints import CheckpointEngine
from .events import MsgType, RoomState, SocietyEnvelope, Tier
from .focus import derive_approval_rules, derive_focus
from .learning import AgentSkills, LearningPass, TurnDigest, default_creator_factory
+from .memory import SocietyMemory
from .rooms import Rooms
from .roster import LEAD_AGENT_ID, AgentRecord, Roster
from .scheduler import DeliverHook, SocietyScheduler
@@ -82,7 +84,9 @@ class SocietyRuntime:
deliver: DeliverHook | None = None,
chat_service: Callable[[], Any | None] | None = None,
cfg: Callable[[], Any] | None = None,
- seed_starter_team: bool = True,
+ # Only Jarvis is on the roster by default (maintainer, 2026-09-02); the
+ # starter team is offered as seed proposals instead.
+ seed_starter_team: bool = False,
) -> None:
self._data_dir = Path(data_dir)
self._get_manager = mission_manager or (lambda: None)
@@ -111,6 +115,10 @@ class SocietyRuntime:
self.store, owner_of=self.owner_of, on_run_ended=self.scheduler.note_run_ended
)
self._owners: dict[str, str] = {}
+ #: Where an agent is on the island, derived from the board (memory-house.md §3.4).
+ self.checkpoints = CheckpointEngine(self)
+ #: The society's one memory service; every touch moves the figure to the Memory House.
+ self.memory = SocietyMemory(self, on_activity=self.checkpoints.note_memory_activity)
#: Roster rows the society surface read for a turn - the sync tool
#: filter reads them here (the briefing fills the cache first).
self._agent_cache: dict[str, AgentRecord] = {}
@@ -133,6 +141,7 @@ class SocietyRuntime:
bus = self._get_mission_bus()
if bus is not None:
self.bridge.attach(bus)
+ self.checkpoints.attach()
await self.seed_lead()
if self._seed_starter_team:
created = await seed_first_run(self.roster, self.store)
@@ -154,6 +163,7 @@ class SocietyRuntime:
self._watchers.clear()
self.scheduler.detach()
self.bridge.detach()
+ self.checkpoints.detach()
await self.store.close()
self._started = False
if current_runtime() is self:
@@ -198,6 +208,8 @@ class SocietyRuntime:
"The voice-steered lead of the society. Delegates, never does the work itself."
),
tier=Tier.LEAD,
+ # Jarvis is Gigi, the app's own mascot (character-pipeline.md, spirit archetype).
+ avatar={"contract": 1, "archetype": "spirit", "base": "gigi", "parts": {}},
)
return lead
diff --git a/jarvis/ui/web/frontend/src/assets/society/figures/SOURCES.md b/jarvis/ui/web/frontend/src/assets/society/figures/SOURCES.md
index 7e8b6e73f9..6d6c34d41f 100644
--- a/jarvis/ui/web/frontend/src/assets/society/figures/SOURCES.md
+++ b/jarvis/ui/web/frontend/src/assets/society/figures/SOURCES.md
@@ -12,6 +12,7 @@ into `scripts/figures/cache/` and verified by sha256 before the build touches th
| `biped-knight.glb` | KayKit Character Pack: Adventurers 1.0 / Knight | CC0-1.0 | body meshes joined; IK/control bones dropped; 23 deform bones renamed; clips kept/renamed, root XZ zeroed, loops closed; faces re-UV'd onto the palette strip; hair as its own primitive; FWD marker; extras |
| `biped-mage.glb` | KayKit Character Pack: Adventurers 1.0 / Mage | CC0-1.0 | body meshes joined; IK/control bones dropped; 23 deform bones renamed; clips kept/renamed, root XZ zeroed, loops closed; faces re-UV'd onto the palette strip; hair as its own primitive; FWD marker; extras |
| `biped-rogue.glb` | KayKit Character Pack: Adventurers 1.0 / Rogue | CC0-1.0 | body meshes joined; IK/control bones dropped; 23 deform bones renamed; clips kept/renamed, root XZ zeroed, loops closed; faces re-UV'd onto the palette strip; hair as its own primitive; FWD marker; extras |
+| `spirit-gigi.glb` | Gigi mascot (first-party) / Gigi | first-party | body meshes joined; IK/control bones dropped; 23 deform bones renamed; clips kept/renamed, root XZ zeroed, loops closed; faces re-UV'd onto the palette strip; hair as its own primitive; FWD marker; extras |
| `back-fur-cape.glb` | KayKit Character Pack: Adventurers 1.0 / Barbarian_Cape | CC0-1.0 | unparented at rest, skinned to `chest` with weight 1; re-UV'd onto the palette strip; no clips; extras |
| `back-knight-cape.glb` | KayKit Character Pack: Adventurers 1.0 / Knight_Cape | CC0-1.0 | unparented at rest, skinned to `chest` with weight 1; re-UV'd onto the palette strip; no clips; extras |
| `back-mage-cape.glb` | KayKit Character Pack: Adventurers 1.0 / Mage_Cape | CC0-1.0 | unparented at rest, skinned to `chest` with weight 1; re-UV'd onto the palette strip; no clips; extras |
@@ -33,5 +34,6 @@ into `scripts/figures/cache/` and verified by sha256 before the build touches th
- `Knight.glb` sha256 `60428e3abc09ba83e595d256e3af8c5c976b46cdae599f0802fc82b4a3445168`
- `Mage.glb` sha256 `cf898585da33fab50c724d31605fb931eb2912e6d2280092141e98ca81ad507d`
- `Barbarian.glb` sha256 `cefc311a0e10c7858b6141f5ada7e33268727564fb8ac1347aab97d000669cc6`
+- **Gigi mascot (first-party)** — Personal Jarvis, first-party (); files:
Licenses recorded at fetch time. CC0 needs no attribution; credit is given anyway.
diff --git a/jarvis/ui/web/frontend/src/assets/society/figures/spirit-gigi.glb b/jarvis/ui/web/frontend/src/assets/society/figures/spirit-gigi.glb
new file mode 100644
index 0000000000..9e3299c9e1
Binary files /dev/null and b/jarvis/ui/web/frontend/src/assets/society/figures/spirit-gigi.glb differ
diff --git a/jarvis/ui/web/frontend/src/components/society/card/AgentCardOverlay.tsx b/jarvis/ui/web/frontend/src/components/society/card/AgentCardOverlay.tsx
index a2074520bf..50192d7a14 100644
--- a/jarvis/ui/web/frontend/src/components/society/card/AgentCardOverlay.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/card/AgentCardOverlay.tsx
@@ -13,22 +13,25 @@
* of inventing a transcript.
*/
import * as Dialog from "@radix-ui/react-dialog";
-import { MessageSquareDashed, X } from "lucide-react";
+import { X } from "lucide-react";
import { Badge } from "@/components/ui/badge";
import { useT } from "@/i18n";
import { AgentSwatch } from "../AgentSwatch";
import type { SocietyAgent } from "../data";
+import { AgentChatPanel } from "../chat/AgentChatPanel";
import { AgentFigureViewer } from "../figures/AgentFigureViewer";
import { AgentSpecSheet } from "./AgentSpecSheet";
export interface AgentCardOverlayProps {
agent: SocietyAgent | null;
+ /** Every agent, for @mentions in the chat. */
+ roster: SocietyAgent[];
onClose: () => void;
}
-export function AgentCardOverlay({ agent, onClose }: AgentCardOverlayProps) {
+export function AgentCardOverlay({ agent, roster, onClose }: AgentCardOverlayProps) {
const t = useT();
const open = agent !== null;
return (
@@ -66,13 +69,8 @@ export function AgentCardOverlay({ agent, onClose }: AgentCardOverlayProps) {
<section className="society-figure-column relative min-h-0" aria-label={t("society.card.figure")}>
<AgentFigureViewer recipe={agent.figure} />
</section>
- <section
- className="flex min-h-0 flex-col items-center justify-center gap-2 border-l border-border p-6 text-center"
- aria-label={t("society.card.chat")}
- >
- <MessageSquareDashed className="h-6 w-6 text-muted-foreground" aria-hidden />
- <p className="text-sm font-medium text-foreground">{t("society.card.chat_empty_title")}</p>
- <p className="max-w-[30ch] text-xs text-muted-foreground">{t("society.card.chat_empty_hint")}</p>
+ <section className="flex min-h-0 flex-col border-l border-border" aria-label={t("society.card.chat")}>
+ <AgentChatPanel agent={agent} roster={roster} />
</section>
</div>
</>
diff --git a/jarvis/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx b/jarvis/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx
new file mode 100644
index 0000000000..822775f94e
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx
@@ -0,0 +1,696 @@
+/**
+ * The model card's chat column, kept deliberately plain (maintainer,
+ * 2026-09-02): bubbles, a time stamp, one pill-shaped composer with a "+"
+ * for files and voice, the model and the thinking effort — and nothing else.
+ *
+ * For Jarvis the column speaks to the SAME store the front page and the
+ * voice stage use (`useAgentChatStore`, the "jarvis" surface): one history,
+ * whatever a person said or typed anywhere. A "@Name" in the message hands
+ * the task to that agent — Jarvis delegates through its router tool and
+ * reports back here. The reasoning trail stays readable: a folded
+ * "Thinking · 4 s" line above the answer, never a second wall of text.
+ */
+import { useCallback, useEffect, useMemo, useRef, useState } from "react";
+import { Mic, MicOff, Paperclip, Plus, RotateCcw, Send, Square } from "lucide-react";
+import ReactMarkdown from "react-markdown";
+import remarkGfm from "remark-gfm";
+
+import { AgentChatStoreProvider, useAgentChat } from "@/components/agentchat/AgentChatStoreContext";
+import { ChatAttachmentStrip } from "@/components/agentchat/ChatAttachmentStrip";
+import { useChatAttachments } from "@/components/agentchat/useChatAttachments";
+import { useComposerDictation } from "@/components/agentchat/useComposerDictation";
+import type { ReasoningBlock, TimelineItem, ToolBlock, TurnItem, UserItem } from "@/components/agentchat/reduce";
+import { ProviderLogo } from "@/components/providers/ProviderLogo";
+import { useT } from "@/i18n";
+import { cn } from "@/lib/utils";
+import { useAgentChatStore } from "@/store/agentChat";
+
+import { AgentSwatch } from "../AgentSwatch";
+import type { SocietyAgent } from "../data";
+
+/** A gap this long between messages earns a fresh time stamp. */
+const STAMP_GAP_MS = 30 * 60_000;
+
+/** The line appended to a message that names an agent; Jarvis delegates on it. */
+const DELEGATE_MARK = "[to jarvis]";
+
+export interface AgentChatPanelProps {
+ agent: SocietyAgent;
+ roster: SocietyAgent[];
+}
+
+export function AgentChatPanel({ agent, roster }: AgentChatPanelProps) {
+ if (agent.tier !== "lead") return <NotBoundYet />;
+ return (
+ <AgentChatStoreProvider store={useAgentChatStore}>
+ <JarvisChat agent={agent} roster={roster} />
+ </AgentChatStoreProvider>
+ );
+}
+
+function NotBoundYet() {
+ const t = useT();
+ return (
+ <div className="flex h-full flex-col items-center justify-center gap-2 p-6 text-center">
+ <p className="text-sm font-medium text-foreground">{t("society.card.chat_empty_title")}</p>
+ <p className="max-w-[30ch] text-xs text-muted-foreground">{t("society.card.chat_empty_hint")}</p>
+ </div>
+ );
+}
+
+// ---------------------------------------------------------------------------
+// the chat
+// ---------------------------------------------------------------------------
+
+function JarvisChat({ agent, roster }: AgentChatPanelProps) {
+ const t = useT();
+ const items = useAgentChat((s) => s.timeline.items);
+ const sessions = useAgentChat((s) => s.sessions);
+ const activeSessionId = useAgentChat((s) => s.activeSessionId);
+ const busy = useAgentChat((s) => s.busy);
+ const lastError = useAgentChat((s) => s.lastError);
+ const draft = useAgentChat((s) => s.draft);
+ const loadCatalog = useAgentChat((s) => s.loadCatalog);
+ const loadSessions = useAgentChat((s) => s.loadSessions);
+ const openSession = useAgentChat((s) => s.openSession);
+ const newChat = useAgentChat((s) => s.newChat);
+ const send = useAgentChat((s) => s.send);
+ const cancel = useAgentChat((s) => s.cancel);
+ const decide = useAgentChat((s) => s.decide);
+
+ useEffect(() => {
+ void loadCatalog();
+ void loadSessions();
+ }, [loadCatalog, loadSessions]);
+
+ // The front page's current conversation, or the latest one when the card
+ // opens before the front page ever did.
+ useEffect(() => {
+ if (activeSessionId || sessions.length === 0) return;
+ openSession(sessions[0].session_id);
+ }, [activeSessionId, sessions, openSession]);
+
+ const mentionable = useMemo(() => roster.filter((a) => a.tier !== "lead"), [roster]);
+
+ return (
+ <div className="flex h-full min-h-0 flex-col" data-testid="society-chat">
+ <div className="flex shrink-0 items-center gap-2 border-b border-border px-3 py-2">
+ <ModelPicker />
+ <EffortPicker />
+ <button
+ type="button"
+ onClick={newChat}
+ title={t("society.chat.new_chat")}
+ aria-label={t("society.chat.new_chat")}
+ className="ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground"
+ >
+ <RotateCcw className="h-3.5 w-3.5" aria-hidden />
+ </button>
+ </div>
+ <Transcript items={items} agent={agent} busy={busy} onDecide={decide} />
+ {lastError ? (
+ <p role="alert" className="px-4 pb-1 text-[11px] text-destructive">
+ {lastError}
+ </p>
+ ) : null}
+ <Composer
+ agent={agent}
+ mentionable={mentionable}
+ busy={busy}
+ sessionId={activeSessionId}
+ cwd={draft.cwd}
+ provider={draft.provider}
+ onSend={send}
+ onCancel={cancel}
+ />
+ </div>
+ );
+}
+
+// ---------------------------------------------------------------------------
+// pickers
+// ---------------------------------------------------------------------------
+
+function ModelPicker() {
+ const t = useT();
+ const draft = useAgentChat((s) => s.draft);
+ const providerOptions = useAgentChat((s) => s.providerOptions);
+ const providerById = useAgentChat((s) => s.providerById);
+ const liveModels = useAgentChat((s) => s.liveModels);
+ const loadModels = useAgentChat((s) => s.loadModels);
+ const setDraft = useAgentChat((s) => s.setDraft);
+ const locks = useAgentChat((s) => s.locks);
+ const [open, setOpen] = useState(false);
+ const [providerId, setProviderId] = useState<string | null>(null);
+ const ref = useRef<HTMLDivElement>(null);
+
+ const current = providerById(draft.provider);
+ const chosen = providerId ? providerById(providerId) : current;
+ const providers = providerOptions();
+ const models = useMemo(() => {
+ if (!chosen) return [];
+ const seen = new Set<string>();
+ return [...(liveModels[chosen.id] ?? []), ...chosen.curated_models].filter((m) => {
+ if (seen.has(m.id)) return false;
+ seen.add(m.id);
+ return true;
+ });
+ }, [chosen, liveModels]);
+
+ useEffect(() => {
+ if (open && chosen && chosen.models_source === "live") void loadModels(chosen.id);
+ }, [open, chosen, loadModels]);
+
+ useEffect(() => {
+ if (!open) return;
+ const onDown = (e: MouseEvent) => {
+ if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false);
+ };
+ document.addEventListener("mousedown", onDown);
+ return () => document.removeEventListener("mousedown", onDown);
+ }, [open]);
+
+ const label = current ? current.label : t("society.chat.model_default");
+ const modelLabel = draft.model || t("society.chat.model_provider_default");
+ const locked = locks?.provider ?? locks?.model;
+
+ return (
+ <div ref={ref} className="relative">
+ <button
+ type="button"
+ disabled={Boolean(locked)}
+ title={locked ?? t("society.chat.model")}
+ onClick={() => {
+ setProviderId(current?.id ?? providers[0]?.id ?? null);
+ setOpen((v) => !v);
+ }}
+ className="flex max-w-[260px] items-center gap-1.5 rounded-full border border-border px-2 py-1 text-[12px] text-foreground hover:bg-secondary disabled:opacity-60"
+ >
+ {current ? <ProviderLogo providerId={current.id} label={current.label} size="sm" /> : null}
+ <span className="truncate">{label}</span>
+ <span className="truncate font-mono text-[11px] text-muted-foreground">{modelLabel}</span>
+ </button>
+ {open ? (
+ <div className="absolute left-0 top-full z-20 mt-1 flex w-[440px] max-w-[80vw] overflow-hidden rounded-lg border border-border bg-popover shadow-float">
+ <ul className="max-h-72 w-1/2 overflow-y-auto border-r border-border py-1">
+ {providers.map((p) => (
+ <li key={p.id}>
+ <button
+ type="button"
+ onClick={() => setProviderId(p.id)}
+ className={cn(
+ "flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-[12px] hover:bg-secondary",
+ chosen?.id === p.id && "bg-secondary",
+ !p.connected && "opacity-50",
+ )}
+ title={p.connected ? p.label : t("society.card.not_connected")}
+ >
+ <ProviderLogo providerId={p.id} label={p.label} size="sm" />
+ <span className="truncate">{p.label}</span>
+ </button>
+ </li>
+ ))}
+ </ul>
+ <ul className="max-h-72 w-1/2 overflow-y-auto py-1">
+ {chosen ? (
+ <li>
+ <button
+ type="button"
+ onClick={() => {
+ void setDraft({ provider: chosen.id, model: "" });
+ setOpen(false);
+ }}
+ className={cn(
+ "w-full px-2.5 py-1.5 text-left text-[12px] hover:bg-secondary",
+ draft.provider === chosen.id && !draft.model && "bg-secondary",
+ )}
+ >
+ {t("society.chat.model_provider_default")}
+ </button>
+ </li>
+ ) : null}
+ {models.map((m) => (
+ <li key={m.id}>
+ <button
+ type="button"
+ onClick={() => {
+ void setDraft({ provider: chosen?.id ?? draft.provider, model: m.id });
+ setOpen(false);
+ }}
+ title={m.note}
+ className={cn(
+ "w-full px-2.5 py-1.5 text-left text-[12px] hover:bg-secondary",
+ draft.provider === chosen?.id && draft.model === m.id && "bg-secondary",
+ )}
+ >
+ <span className="block truncate">{m.label}</span>
+ {m.note ? <span className="block truncate text-[10px] text-muted-foreground">{m.note}</span> : null}
+ </button>
+ </li>
+ ))}
+ {chosen && models.length === 0 ? (
+ <li className="px-2.5 py-1.5 text-[11px] text-muted-foreground">{t("society.chat.models_loading")}</li>
+ ) : null}
+ </ul>
+ </div>
+ ) : null}
+ </div>
+ );
+}
+
+function EffortPicker() {
+ const t = useT();
+ const draft = useAgentChat((s) => s.draft);
+ const providerById = useAgentChat((s) => s.providerById);
+ const setDraft = useAgentChat((s) => s.setDraft);
+ const locks = useAgentChat((s) => s.locks);
+ const provider = providerById(draft.provider);
+ const levels = provider?.effort_levels ?? [];
+ if (levels.length === 0) return null;
+ return (
+ <div role="radiogroup" aria-label={t("society.chat.effort")} className="inline-flex rounded-full border border-border p-0.5">
+ {levels.map((level) => {
+ const value = level || "";
+ const on = (draft.effort || "") === value;
+ return (
+ <button
+ key={level || "default"}
+ type="button"
+ role="radio"
+ aria-checked={on}
+ disabled={Boolean(locks?.effort)}
+ onClick={() => void setDraft({ effort: value })}
+ className={cn(
+ "rounded-full px-2 py-0.5 text-[11px] capitalize transition-colors disabled:opacity-60",
+ on ? "bg-secondary text-foreground" : "text-muted-foreground hover:text-foreground",
+ )}
+ >
+ {level || t("society.chat.effort_default")}
+ </button>
+ );
+ })}
+ </div>
+ );
+}
+
+// ---------------------------------------------------------------------------
+// transcript
+// ---------------------------------------------------------------------------
+
+function Transcript({
+ items,
+ agent,
+ busy,
+ onDecide,
+}: {
+ items: TimelineItem[];
+ agent: SocietyAgent;
+ busy: boolean;
+ onDecide: (approvalId: string, decision: "allow" | "deny") => Promise<void>;
+}) {
+ const t = useT();
+ const bottom = useRef<HTMLDivElement>(null);
+ useEffect(() => {
+ bottom.current?.scrollIntoView({ block: "end" });
+ }, [items.length, busy]);
+
+ if (items.length === 0) {
+ return (
+ <div className="flex min-h-0 flex-1 flex-col items-center justify-center gap-3 p-6 text-center">
+ <AgentSwatch agent={agent} size={56} />
+ <p className="text-sm font-medium text-foreground">{t("society.chat.empty_title").replace("{0}", agent.name)}</p>
+ <p className="max-w-[32ch] text-xs text-muted-foreground">{t("society.chat.empty_hint")}</p>
+ </div>
+ );
+ }
+
+ let lastStamp = 0;
+ return (
+ <div className="min-h-0 flex-1 overflow-y-auto px-4 py-3">
+ <div className="flex flex-col gap-2">
+ {items.map((item) => {
+ const ts = item.type === "user" ? item.tsMs : item.type === "turn" ? item.startedMs : 0;
+ const stamp = ts && ts - lastStamp > STAMP_GAP_MS ? ts : 0;
+ if (stamp) lastStamp = ts;
+ return (
+ <div key={item.id} className="flex flex-col gap-2">
+ {stamp ? <TimeStamp ms={stamp} /> : null}
+ {item.type === "user" ? (
+ <UserBubble item={item} />
+ ) : item.type === "turn" ? (
+ <TurnBubble item={item} onDecide={onDecide} />
+ ) : (
+ <p className="self-start rounded-2xl bg-destructive/10 px-3 py-2 text-[12px] text-destructive">{item.text}</p>
+ )}
+ </div>
+ );
+ })}
+ <div ref={bottom} />
+ </div>
+ </div>
+ );
+}
+
+function TimeStamp({ ms }: { ms: number }) {
+ const t = useT();
+ const date = new Date(ms);
+ const today = new Date().toDateString() === date.toDateString();
+ const time = date.toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" });
+ const day = today ? t("society.chat.today") : date.toLocaleDateString(undefined, { day: "2-digit", month: "short" });
+ return <p className="my-1 text-center text-[11px] text-muted-foreground">{`${day} ${time}`}</p>;
+}
+
+/** What the person typed, without the delegation line the composer added. */
+function visibleUserText(text: string): string {
+ return text
+ .split("\n")
+ .filter((line) => !line.trimStart().startsWith(DELEGATE_MARK))
+ .join("\n")
+ .trimEnd();
+}
+
+function UserBubble({ item }: { item: UserItem }) {
+ return (
+ <div className="flex max-w-[85%] flex-col items-end gap-1 self-end">
+ <div className="whitespace-pre-wrap rounded-2xl rounded-br-md bg-secondary px-3.5 py-2 text-[13px] leading-relaxed text-foreground">
+ {visibleUserText(item.text)}
+ </div>
+ {item.attachments.length > 0 ? (
+ <div className="flex flex-wrap justify-end gap-1">
+ {item.attachments.map((a) => (
+ <span key={a.name} className="rounded-full border border-border px-2 py-0.5 text-[10px] text-muted-foreground">
+ {a.name}
+ </span>
+ ))}
+ </div>
+ ) : null}
+ </div>
+ );
+}
+
+function TurnBubble({
+ item,
+ onDecide,
+}: {
+ item: TurnItem;
+ onDecide: (approvalId: string, decision: "allow" | "deny") => Promise<void>;
+}) {
+ const t = useT();
+ const running = item.status === "running";
+ return (
+ <div className="flex max-w-[88%] flex-col gap-1.5 self-start">
+ {item.blocks.map((block) => {
+ if (block.kind === "reasoning") return <Thinking key={block.id} block={block} />;
+ if (block.kind === "tool") return <ToolLine key={block.callId} block={block} onDecide={onDecide} />;
+ if (!block.text.trim()) return null;
+ return (
+ <div
+ key={block.id}
+ className="society-prose rounded-2xl rounded-bl-md bg-popover px-3.5 py-2 text-[13px] leading-relaxed text-foreground"
+ >
+ <ReactMarkdown remarkPlugins={[remarkGfm]}>{block.text}</ReactMarkdown>
+ </div>
+ );
+ })}
+ {running && item.blocks.every((b) => b.kind !== "text") ? (
+ <div className="flex items-center gap-1 rounded-2xl rounded-bl-md bg-popover px-3.5 py-2.5" aria-label={t("society.chat.thinking")}>
+ <span className="h-1.5 w-1.5 animate-pulse rounded-full bg-muted-foreground" />
+ <span className="h-1.5 w-1.5 animate-pulse rounded-full bg-muted-foreground [animation-delay:150ms]" />
+ <span className="h-1.5 w-1.5 animate-pulse rounded-full bg-muted-foreground [animation-delay:300ms]" />
+ </div>
+ ) : null}
+ {item.error ? <p className="text-[12px] text-destructive">{item.error}</p> : null}
+ </div>
+ );
+}
+
+function Thinking({ block }: { block: ReasoningBlock }) {
+ const t = useT();
+ const seconds = block.durationMs !== null ? Math.max(1, Math.round(block.durationMs / 1000)) : null;
+ const label = block.live
+ ? t("society.chat.thinking")
+ : seconds !== null
+ ? t("society.chat.thought_for").replace("{0}", String(seconds))
+ : t("society.chat.thought");
+ return (
+ <details className="group text-[12px] text-muted-foreground">
+ <summary className="cursor-pointer select-none list-none px-1 hover:text-foreground">
+ <span className={cn(block.live && "animate-pulse")}>{label}</span>
+ </summary>
+ {block.text.trim() ? (
+ <div className="mt-1 whitespace-pre-wrap rounded-xl border border-border px-3 py-2 text-[12px] leading-relaxed">
+ {block.text}
+ </div>
+ ) : (
+ <p className="px-3 py-1 text-[11px] italic">{t("society.chat.thought_hidden")}</p>
+ )}
+ </details>
+ );
+}
+
+function ToolLine({
+ block,
+ onDecide,
+}: {
+ block: ToolBlock;
+ onDecide: (approvalId: string, decision: "allow" | "deny") => Promise<void>;
+}) {
+ const t = useT();
+ const pending = block.approval && block.approval.decision === null;
+ const state = block.isError
+ ? t("society.chat.tool_failed")
+ : block.output === null && !pending
+ ? t("society.chat.tool_running")
+ : pending
+ ? t("society.chat.tool_waiting")
+ : t("society.chat.tool_done");
+ return (
+ <div className="flex flex-wrap items-center gap-2 px-1 text-[11px] text-muted-foreground">
+ <span className="font-mono">{block.name}</span>
+ <span>· {state}</span>
+ {pending && block.approval ? (
+ <span className="flex items-center gap-1">
+ <button
+ type="button"
+ onClick={() => void onDecide(block.approval!.approvalId, "allow")}
+ className="rounded-full border border-border px-2 py-0.5 text-foreground hover:bg-secondary"
+ >
+ {t("society.chat.approve")}
+ </button>
+ <button
+ type="button"
+ onClick={() => void onDecide(block.approval!.approvalId, "deny")}
+ className="rounded-full border border-border px-2 py-0.5 hover:bg-secondary"
+ >
+ {t("society.chat.deny")}
+ </button>
+ </span>
+ ) : null}
+ </div>
+ );
+}
+
+// ---------------------------------------------------------------------------
+// composer
+// ---------------------------------------------------------------------------
+
+interface ComposerProps {
+ agent: SocietyAgent;
+ mentionable: SocietyAgent[];
+ busy: boolean;
+ sessionId: string | null;
+ cwd: string;
+ provider: string;
+ onSend: (text: string, attachments?: ReturnType<typeof useChatAttachments>["attachments"]) => Promise<void>;
+ onCancel: () => Promise<void>;
+}
+
+function Composer({ agent, mentionable, busy, sessionId, cwd, provider, onSend, onCancel }: ComposerProps) {
+ const t = useT();
+ const [value, setValue] = useState("");
+ const [plusOpen, setPlusOpen] = useState(false);
+ const [problem, setProblem] = useState<string | null>(null);
+ const [mention, setMention] = useState<{ query: string; start: number } | null>(null);
+ const textarea = useRef<HTMLTextAreaElement>(null);
+ const fileInput = useRef<HTMLInputElement>(null);
+ const attachments = useChatAttachments({ sessionId, cwd, provider, surface: "jarvis" }, (message) => setProblem(message));
+ const dictation = useComposerDictation(value, setValue);
+
+ const resize = useCallback(() => {
+ const el = textarea.current;
+ if (!el) return;
+ el.style.height = "0px";
+ el.style.height = `${Math.min(el.scrollHeight, 180)}px`;
+ }, []);
+ useEffect(resize, [value, resize]);
+
+ const onChange = (next: string, caret: number) => {
+ setValue(next);
+ const before = next.slice(0, caret);
+ const m = /(?:^|\s)@([^\s@]*)$/.exec(before);
+ setMention(m && mentionable.length > 0 ? { query: m[1].toLowerCase(), start: caret - m[1].length - 1 } : null);
+ };
+
+ const matches = useMemo(
+ () => (mention ? mentionable.filter((a) => a.name.toLowerCase().startsWith(mention.query)).slice(0, 6) : []),
+ [mention, mentionable],
+ );
+
+ const insertMention = (name: string) => {
+ if (!mention) return;
+ const el = textarea.current;
+ const caret = el?.selectionStart ?? value.length;
+ const next = `${value.slice(0, mention.start)}@${name} ${value.slice(caret)}`;
+ setValue(next);
+ setMention(null);
+ requestAnimationFrame(() => el?.focus());
+ };
+
+ const submit = async () => {
+ const text = value.trim();
+ if (!text || busy) return;
+ const named = mentionable.filter((a) => text.includes(`@${a.name}`));
+ const hint = named
+ .map((a) => `${DELEGATE_MARK} ${t("society.chat.delegate_line").replace("{0}", a.name).replace("{1}", a.agentId)}`)
+ .join("\n");
+ setValue("");
+ setMention(null);
+ setProblem(null);
+ try {
+ await onSend(hint ? `${text}\n\n${hint}` : text, attachments.attachments);
+ attachments.clear();
+ } catch (err) {
+ setProblem(err instanceof Error ? err.message : String(err));
+ }
+ };
+
+ return (
+ <div className="shrink-0 border-t border-border px-3 pb-3 pt-2">
+ {problem ? <p className="mb-1 px-1 text-[11px] text-destructive">{problem}</p> : null}
+ <ChatAttachmentStrip attachments={attachments.attachments} analyzing={attachments.analyzing} onRemove={attachments.remove} />
+ {matches.length > 0 ? (
+ <ul className="mb-1 flex flex-wrap gap-1 px-1" role="listbox" aria-label={t("society.chat.mention_hint")}>
+ {matches.map((a) => (
+ <li key={a.agentId}>
+ <button
+ type="button"
+ role="option"
+ aria-selected={false}
+ onClick={() => insertMention(a.name)}
+ className="flex items-center gap-1.5 rounded-full border border-border px-2 py-0.5 text-[11px] text-foreground hover:bg-secondary"
+ >
+ <AgentSwatch agent={a} size={16} />
+ {a.name}
+ </button>
+ </li>
+ ))}
+ </ul>
+ ) : null}
+ <div
+ className={cn(
+ "relative flex items-end gap-1 rounded-[22px] border border-border bg-background px-1.5 py-1",
+ attachments.dragging && "border-border-strong",
+ )}
+ {...attachments.dragHandlers}
+ >
+ <div className="relative">
+ <button
+ type="button"
+ onClick={() => setPlusOpen((v) => !v)}
+ aria-label={t("society.chat.more")}
+ aria-expanded={plusOpen}
+ className="flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground hover:bg-secondary hover:text-foreground"
+ >
+ <Plus className={cn("h-4 w-4 transition-transform", plusOpen && "rotate-45")} aria-hidden />
+ </button>
+ {plusOpen ? (
+ <div className="absolute bottom-full left-0 z-20 mb-1 w-52 overflow-hidden rounded-lg border border-border bg-popover py-1 shadow-float">
+ <button
+ type="button"
+ onClick={() => {
+ setPlusOpen(false);
+ fileInput.current?.click();
+ }}
+ className="flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12px] text-foreground hover:bg-secondary"
+ >
+ <Paperclip className="h-3.5 w-3.5" aria-hidden />
+ {t("society.chat.attach")}
+ </button>
+ <button
+ type="button"
+ onClick={() => {
+ setPlusOpen(false);
+ dictation.toggle();
+ }}
+ className="flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12px] text-foreground hover:bg-secondary"
+ >
+ <Mic className="h-3.5 w-3.5" aria-hidden />
+ {dictation.dictating ? t("society.chat.stop_recording") : t("society.chat.record")}
+ </button>
+ </div>
+ ) : null}
+ <input
+ ref={fileInput}
+ type="file"
+ multiple
+ className="hidden"
+ onChange={(e) => {
+ const files = Array.from(e.target.files ?? []);
+ if (files.length) void attachments.attachFiles(files);
+ e.target.value = "";
+ }}
+ />
+ </div>
+ <textarea
+ ref={textarea}
+ value={value}
+ rows={1}
+ placeholder={t("society.chat.placeholder").replace("{0}", agent.name)}
+ onChange={(e) => onChange(e.target.value, e.target.selectionStart ?? e.target.value.length)}
+ onPaste={attachments.onPaste}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" && !e.shiftKey) {
+ e.preventDefault();
+ if (matches.length > 0 && mention) insertMention(matches[0].name);
+ else void submit();
+ }
+ if (e.key === "Escape" && mention) setMention(null);
+ }}
+ className="max-h-[180px] min-h-[32px] flex-1 resize-none bg-transparent px-1 py-1.5 text-[13px] leading-relaxed text-foreground placeholder:text-muted-foreground focus:outline-none"
+ />
+ <button
+ type="button"
+ onClick={dictation.toggle}
+ aria-label={dictation.dictating ? t("society.chat.stop_recording") : t("society.chat.record")}
+ aria-pressed={dictation.dictating}
+ className={cn(
+ "flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground hover:bg-secondary hover:text-foreground",
+ dictation.dictating && "bg-destructive/15 text-destructive",
+ )}
+ >
+ {dictation.dictating ? <MicOff className="h-4 w-4" aria-hidden /> : <Mic className="h-4 w-4" aria-hidden />}
+ </button>
+ {busy ? (
+ <button
+ type="button"
+ onClick={() => void onCancel()}
+ aria-label={t("society.chat.stop")}
+ className="flex h-8 w-8 items-center justify-center rounded-full bg-secondary text-foreground hover:bg-popover"
+ >
+ <Square className="h-3.5 w-3.5" aria-hidden />
+ </button>
+ ) : (
+ <button
+ type="button"
+ onClick={() => void submit()}
+ disabled={!value.trim()}
+ aria-label={t("society.chat.send")}
+ className="flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground disabled:opacity-40"
+ >
+ <Send className="h-3.5 w-3.5" aria-hidden />
+ </button>
+ )}
+ </div>
+ </div>
+ );
+}
diff --git a/jarvis/ui/web/frontend/src/components/society/data.ts b/jarvis/ui/web/frontend/src/components/society/data.ts
index 7f4d507974..359b538359 100644
--- a/jarvis/ui/web/frontend/src/components/society/data.ts
+++ b/jarvis/ui/web/frontend/src/components/society/data.ts
@@ -143,7 +143,8 @@ const LOCAL_ROSTER: SocietyAgent[] = [];
/** A default look for a backend row that never chose one: deterministic per id, so it stays. */
export function defaultFigureFor(agentId: string, tier: AgentTier): FigureRecipe {
if (tier === "lead") {
- return SAMPLE_ROSTER[0].figure ?? { contract: 1, archetype: "biped", base: "rogue", parts: {} };
+ // The lead is Jarvis, and Jarvis is Gigi — the app's own mascot.
+ return { contract: 1, archetype: "spirit", base: "gigi", parts: {}, style: "spirit" };
}
let h = 0;
for (let i = 0; i < agentId.length; i++) h = (h * 31 + agentId.charCodeAt(i)) | 0;
diff --git a/jarvis/ui/web/frontend/src/components/society/figures/AgentFigureViewer.tsx b/jarvis/ui/web/frontend/src/components/society/figures/AgentFigureViewer.tsx
index c15919bd10..1766e53167 100644
--- a/jarvis/ui/web/frontend/src/components/society/figures/AgentFigureViewer.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/figures/AgentFigureViewer.tsx
@@ -42,7 +42,7 @@ const ZOOM_MIN = 0.55;
const ZOOM_MAX = 2.4;
/** The look a fresh open starts from: a little above eye level, three-quarter turned. */
-const REST_VIEW = { yaw: -0.45, pitch: 0.18, zoom: 1 };
+const REST_VIEW = { yaw: -0.45, pitch: 0.1, zoom: 1 };
interface OrbitState {
yaw: number;
@@ -116,6 +116,13 @@ export function AgentFigureViewer({ recipe, clip = "idle", quiet = false, classN
drag.current ? "cursor-grabbing" : "cursor-grab",
className,
)}
+ // The figure stage is the island's own bright space, not the app's ink
+ // (MASTERPLAN §4.3): warm light in both themes, so a dark figure — Gigi
+ // is near-black with white marks — reads instead of vanishing.
+ style={{
+ background:
+ "radial-gradient(120% 90% at 50% 38%, #fbf6ee 0%, #ebe2d2 52%, #d9cdb9 100%)",
+ }}
onPointerDown={onPointerDown}
onPointerMove={onPointerMove}
onPointerUp={onPointerUp}
@@ -130,7 +137,7 @@ export function AgentFigureViewer({ recipe, clip = "idle", quiet = false, classN
dpr={1}
frameloop={frameloop}
gl={{ antialias: false, alpha: true, powerPreference: "low-power" }}
- camera={{ fov: 26, near: 0.1, far: 40, position: [0, heightM * 0.55, heightM * 2.6] }}
+ camera={{ fov: 26, near: 0.1, far: 40, position: [0, heightM * 0.55, heightM * 2.4] }}
onCreated={({ gl }) => {
gl.setClearColor(0x000000, 0);
}}
@@ -155,7 +162,7 @@ export function AgentFigureViewer({ recipe, clip = "idle", quiet = false, classN
) : (
<PaletteTile palette={palette} label={t("society.figure.no_figure")} />
)}
- <p className="pointer-events-none absolute inset-x-0 bottom-2 text-center text-[11px] text-white/70 [text-shadow:0_1px_2px_rgba(0,0,0,.45)]">
+ <p className="pointer-events-none absolute inset-x-0 bottom-2 text-center text-[11px] text-[#5b5245]/80">
{reduced ? t("society.figure.reduced_motion") : t("society.figure.drag_hint")}
</p>
</div>
@@ -225,8 +232,10 @@ function FigureScene({ recipe, look, palette, heightM, clip, quiet, paused, orbi
const group = groupRef.current;
const o = orbit.current;
if (group) group.rotation.y = o.yaw;
- const mid = heightM * 0.52;
- const distance = (heightM * 2.6) / o.zoom;
+ // 2.4 heights of distance: larger than the 2.6 it opened with (maintainer:
+ // "about a fifth"), with the crown and the hem still inside the frame.
+ const mid = heightM * 0.5;
+ const distance = (heightM * 2.4) / o.zoom;
camera.position.set(0, mid + Math.sin(o.pitch) * distance, Math.cos(o.pitch) * distance);
camera.lookAt(0, mid, 0);
camera.updateProjectionMatrix();
diff --git a/jarvis/ui/web/frontend/src/components/society/figures/assembleFigure.ts b/jarvis/ui/web/frontend/src/components/society/figures/assembleFigure.ts
index 3143096a66..5aa7fb3ad3 100644
--- a/jarvis/ui/web/frontend/src/components/society/figures/assembleFigure.ts
+++ b/jarvis/ui/web/frontend/src/components/society/figures/assembleFigure.ts
@@ -126,10 +126,11 @@ export function assembleFigure(
| THREE.MeshBasicMaterial;
const map = original.map ?? null;
if (map && !painted) painted = paintPalette(map, palette);
- const material = new THREE.MeshLambertMaterial({
- map: painted ?? map,
- color: 0xffffff,
- });
+ // A "-marks" slot (Gigi's eyes, mouth, scanlines) glows: unlit, so it
+ // reads white on the dark body under any light, like the mascot in 2D.
+ const material = original.name.endsWith("-marks")
+ ? new THREE.MeshBasicMaterial({ map: painted ?? map, color: 0xffffff })
+ : new THREE.MeshLambertMaterial({ map: painted ?? map, color: 0xffffff });
material.name = original.name;
node.material = material;
// A skinned mesh's bounds ignore its bones; culling it by the rest pose
diff --git a/jarvis/ui/web/frontend/src/components/society/figures/catalog.json b/jarvis/ui/web/frontend/src/components/society/figures/catalog.json
index 7d71a4c283..55dd36409c 100644
--- a/jarvis/ui/web/frontend/src/components/society/figures/catalog.json
+++ b/jarvis/ui/web/frontend/src/components/society/figures/catalog.json
@@ -190,6 +190,48 @@
"work"
],
"height_m": 2.187
+ },
+ {
+ "id": "spirit/gigi",
+ "file": "spirit-gigi.glb",
+ "archetype": "spirit",
+ "variant": "default",
+ "base": "gigi",
+ "label": "Gigi",
+ "styles": [
+ "spirit"
+ ],
+ "heightM": 1.9,
+ "palette": {
+ "skin": "#f4b68f",
+ "skin_shade": "#d99a75",
+ "hair": "#9e5d47",
+ "eyes": "#050505",
+ "primary": "#0e0e0e",
+ "primary_shade": "#5a5a5a",
+ "secondary": "#ffffff",
+ "secondary_shade": "#c9c9c9",
+ "accent": "#ffd166",
+ "metal": "#919da2",
+ "leather": "#9a5944",
+ "fur": "#b87556",
+ "fur_shade": "#8d4c39",
+ "shoes": "#4a2e22",
+ "eye_white": "#ffffff",
+ "emissive": "#ffffff"
+ },
+ "source": "Gigi mascot (first-party) / Gigi",
+ "license": "first-party",
+ "triangles": 3540,
+ "clips": [
+ "celebrate",
+ "idle",
+ "sleep",
+ "talk",
+ "walk",
+ "wave"
+ ],
+ "height_m": 1.8967
}
],
"parts": [
diff --git a/jarvis/ui/web/frontend/src/components/society/figures/faceCrop.ts b/jarvis/ui/web/frontend/src/components/society/figures/faceCrop.ts
index 7455906ee5..80feaa1926 100644
--- a/jarvis/ui/web/frontend/src/components/society/figures/faceCrop.ts
+++ b/jarvis/ui/web/frontend/src/components/society/figures/faceCrop.ts
@@ -17,7 +17,7 @@ import { assembleFigure, type LoadedGltf } from "./assembleFigure";
import { recipeKey, resolvePalette, type FigureRecipe } from "./figureRecipe";
import { figureAssetFor, partAssetsFor } from "./figureRegistry";
-const SIZE = 96;
+const SIZE = 128;
const IDLE_RELEASE_MS = 4000;
const crops = new Map<string, Promise<string | null>>();
@@ -86,14 +86,17 @@ async function renderCrop(recipe: FigureRecipe): Promise<string | null> {
if (!figure) return null;
const { renderer, scene, camera } = acquireStage();
try {
- // Turn the figure three-quarters toward the light, frame the head.
- figure.root.rotation.y = -0.35;
+ // Turn the figure a little toward the light and frame head and shoulders:
+ // a face fills the circle, a whole figure would be a stripe. A spirit
+ // carries its face lower on the body than a biped carries its head.
+ figure.root.rotation.y = -0.25;
scene.add(figure.root);
figure.actions.idle?.play();
figure.mixer.update(0.4);
- const headY = height * 0.8;
- camera.position.set(0.12, headY + height * 0.02, height * 0.62);
- camera.lookAt(0, headY, 0);
+ const spirit = figure.extras.archetype === "spirit";
+ const headY = height * (spirit ? 0.66 : 0.78);
+ camera.position.set(0.06, headY + height * 0.03, height * (spirit ? 0.95 : 0.72));
+ camera.lookAt(0, headY - height * 0.02, 0);
camera.updateProjectionMatrix();
renderer.render(scene, camera);
return renderer.domElement.toDataURL("image/png");
diff --git a/jarvis/ui/web/frontend/src/components/society/mockRoster.ts b/jarvis/ui/web/frontend/src/components/society/mockRoster.ts
index 3f2f750d01..f47f6568bf 100644
--- a/jarvis/ui/web/frontend/src/components/society/mockRoster.ts
+++ b/jarvis/ui/web/frontend/src/components/society/mockRoster.ts
@@ -18,22 +18,13 @@ import type { FigureRecipe } from "./figures/figureRecipe";
const SAMPLE_LAST_ACTIVE_MS = Date.UTC(2026, 7, 20, 12, 0, 0);
const SAMPLE_CREATED_MS = Date.UTC(2026, 7, 1, 9, 0, 0);
+/** Jarvis is Gigi — the app's own pixel-ghost mascot, built as the spirit base. */
const LEAD_FIGURE: FigureRecipe = {
contract: 1,
- archetype: "biped",
- base: "rogue",
- parts: { hand_r: "hand_r-mug" },
- palette: {
- skin: "#f1c4a0",
- hair: "#3b2a20",
- primary: "#1f2a44",
- secondary: "#f2f2ee",
- accent: "#c9a227",
- metal: "#c9a227",
- leather: "#2b2b2b",
- shoes: "#1a1a1a",
- },
- heightM: 1.82,
+ archetype: "spirit",
+ base: "gigi",
+ parts: {},
+ style: "spirit",
};
const SCOUT_FIGURE: FigureRecipe = {
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index bcf341e0c1..11b413a467 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -132,6 +132,7 @@
"reset": "Leeren",
"reset_done": "Anweisungen geleert",
"load_template": "Mit Vorlage starten",
+ "write_from_scratch": "Selbst schreiben",
"applies_next_turn": "Gilt ab der nächsten Antwort deines Assistenten — kein Neustart nötig."
},
"extensions": {
@@ -5098,6 +5099,37 @@
"mode_pipeline": "Stimme rein und raus"
},
"society": {
+ "chat": {
+ "placeholder": "Nachricht an {0}",
+ "more": "Mehr",
+ "attach": "Datei anhängen",
+ "record": "Sprachnachricht aufnehmen",
+ "stop_recording": "Aufnahme beenden",
+ "send": "Senden",
+ "stop": "Stopp",
+ "new_chat": "Neue Unterhaltung",
+ "model": "Modell",
+ "model_default": "Gehirn von Jarvis",
+ "model_provider_default": "Anbieter-Standard",
+ "models_loading": "Modelle werden geladen…",
+ "effort": "Denkaufwand",
+ "effort_default": "auto",
+ "today": "Heute",
+ "empty_title": "Sprich mit {0}",
+ "empty_hint": "Tippen, sprechen oder einen anderen Agenten mit @ nennen — Jarvis gibt die Aufgabe weiter und meldet sich zurück.",
+ "thinking": "Denkt nach…",
+ "thought_for": "{0} s nachgedacht",
+ "thought": "Nachgedacht",
+ "thought_hidden": "Das Modell hält sein Denken privat; es hat hier nachgedacht.",
+ "tool_running": "läuft",
+ "tool_done": "fertig",
+ "tool_failed": "fehlgeschlagen",
+ "tool_waiting": "wartet auf deine Freigabe",
+ "approve": "Erlauben",
+ "deny": "Ablehnen",
+ "mention_hint": "Agenten",
+ "delegate_line": "Hand this to the agent '{0}' (id {1}) with delegate-to-agent and report back here when it is done."
+ },
"world": {
"minimap_label": "Inselkarte",
"mode_world": "Die Insel",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 48c64ffe56..ed6edb81e0 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -132,6 +132,7 @@
"reset": "Clear",
"reset_done": "Instructions cleared",
"load_template": "Start from template",
+ "write_from_scratch": "Write from scratch",
"applies_next_turn": "Applies on your assistant's next message — no restart needed."
},
"extensions": {
@@ -5098,6 +5099,37 @@
"mode_pipeline": "voice in and out"
},
"society": {
+ "chat": {
+ "placeholder": "Message {0}",
+ "more": "More",
+ "attach": "Attach a file",
+ "record": "Record a voice message",
+ "stop_recording": "Stop recording",
+ "send": "Send",
+ "stop": "Stop",
+ "new_chat": "New conversation",
+ "model": "Model",
+ "model_default": "Jarvis' brain",
+ "model_provider_default": "provider default",
+ "models_loading": "Loading models…",
+ "effort": "Thinking effort",
+ "effort_default": "auto",
+ "today": "Today",
+ "empty_title": "Talk to {0}",
+ "empty_hint": "Type, speak, or name another agent with @ — Jarvis hands the task over and reports back.",
+ "thinking": "Thinking…",
+ "thought_for": "Thought for {0} s",
+ "thought": "Thought",
+ "thought_hidden": "The model keeps its reasoning private; it did think here.",
+ "tool_running": "running",
+ "tool_done": "done",
+ "tool_failed": "failed",
+ "tool_waiting": "waiting for your approval",
+ "approve": "Allow",
+ "deny": "Deny",
+ "mention_hint": "Agents",
+ "delegate_line": "Hand this to the agent '{0}' (id {1}) with delegate-to-agent and report back here when it is done."
+ },
"world": {
"minimap_label": "Island map",
"mode_world": "The island",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 5074d47f0f..5a3705baf1 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -132,6 +132,7 @@
"reset": "Vaciar",
"reset_done": "Instrucciones vaciadas",
"load_template": "Empezar con plantilla",
+ "write_from_scratch": "Escribir desde cero",
"applies_next_turn": "Se aplica en el próximo mensaje de tu asistente — sin reinicio."
},
"extensions": {
@@ -5098,6 +5099,37 @@
"mode_pipeline": "voz de entrada y salida"
},
"society": {
+ "chat": {
+ "placeholder": "Mensaje a {0}",
+ "more": "Más",
+ "attach": "Adjuntar un archivo",
+ "record": "Grabar un mensaje de voz",
+ "stop_recording": "Detener la grabación",
+ "send": "Enviar",
+ "stop": "Parar",
+ "new_chat": "Nueva conversación",
+ "model": "Modelo",
+ "model_default": "Cerebro de Jarvis",
+ "model_provider_default": "predeterminado del proveedor",
+ "models_loading": "Cargando modelos…",
+ "effort": "Esfuerzo de razonamiento",
+ "effort_default": "auto",
+ "today": "Hoy",
+ "empty_title": "Habla con {0}",
+ "empty_hint": "Escribe, habla o nombra a otro agente con @: Jarvis le pasa la tarea e informa aquí.",
+ "thinking": "Pensando…",
+ "thought_for": "Pensó {0} s",
+ "thought": "Pensó",
+ "thought_hidden": "El modelo mantiene privado su razonamiento; aquí sí pensó.",
+ "tool_running": "en curso",
+ "tool_done": "hecho",
+ "tool_failed": "falló",
+ "tool_waiting": "esperando tu aprobación",
+ "approve": "Permitir",
+ "deny": "Denegar",
+ "mention_hint": "Agentes",
+ "delegate_line": "Hand this to the agent '{0}' (id {1}) with delegate-to-agent and report back here when it is done."
+ },
"world": {
"minimap_label": "Mapa de la isla",
"mode_world": "La isla",
diff --git a/jarvis/ui/web/frontend/src/views/society/SocietyView.tsx b/jarvis/ui/web/frontend/src/views/society/SocietyView.tsx
index 48eb77c4fe..10a35932b1 100644
--- a/jarvis/ui/web/frontend/src/views/society/SocietyView.tsx
+++ b/jarvis/ui/web/frontend/src/views/society/SocietyView.tsx
@@ -64,7 +64,7 @@ export function SocietyView() {
onOpen={setOpenAgentId}
onCreate={() => setCreating(true)}
/>
- <AgentCardOverlay agent={openAgent} onClose={() => setOpenAgentId(null)} />
+ <AgentCardOverlay agent={openAgent} roster={agents} onClose={() => setOpenAgentId(null)} />
<CreateAgentDialog open={creating} onClose={() => setCreating(false)} onCreated={onCreated} />
</div>
);
diff --git a/scripts/figures/build_figures.py b/scripts/figures/build_figures.py
index db7f90540f..4ceddbfeae 100644
--- a/scripts/figures/build_figures.py
+++ b/scripts/figures/build_figures.py
@@ -573,6 +573,8 @@ def build_target(target: dict, out_dir: Path, ledger: Path) -> tuple[dict, list[
source = load_source(target["source"])
character = source["characters"][target["character"]]
part_specs = character.get("parts", [])
+ if source.get("procedural") == "gigi":
+ return build_procedural_gigi(target, source, archetype, out_dir)
src_file = fetch_source_file(source, f"{target['character']}.glb")
log(f"building {target['id']} from {src_file.name}")
@@ -660,6 +662,42 @@ def build_target(target: dict, out_dir: Path, ledger: Path) -> tuple[dict, list[
return base_entry, part_entries
+def build_procedural_gigi(
+ target: dict, source: dict, archetype: dict, out_dir: Path
+) -> tuple[dict, list[dict]]:
+ """The mascot: modelled and keyed by gigi_builder.py, finished like any base."""
+ import gigi_builder # noqa: PLC0415 — Blender-only module beside this file
+
+ log(f"building {target['id']} procedurally")
+ reset_scene()
+ bpy.context.scene.render.fps = gigi_builder.FPS
+ character = source["characters"][target["character"]]
+ sheet_path = CACHE / f"{target['id']}-sheet.png"
+ write_sheet(sheet_path, character["default_palette"])
+ img = load_sheet(sheet_path)
+ arm, body, uv_report = gigi_builder.build_gigi(CONTRACT["sheet"], img, sheet_material)
+ fwd = add_forward_marker(arm)
+ out_dir.mkdir(parents=True, exist_ok=True)
+ base_path = out_dir / f"{target['id']}.glb"
+ export_glb(base_path, [body, arm, fwd], animations=True)
+ facts = finish_base(base_path, target, source, archetype, uv_report)
+ entry = {
+ "id": f"{target['archetype']}/{target['base']}",
+ "file": base_path.name,
+ "archetype": target["archetype"],
+ "variant": target["variant"],
+ "base": target["base"],
+ "label": target["label"],
+ "styles": target.get("styles", []),
+ "heightM": archetype["variants"][target["variant"]]["height_m"],
+ "palette": character["default_palette"],
+ "source": f"{source['name']} / {target['character']}",
+ "license": source["license"],
+ **facts,
+ }
+ return entry, []
+
+
def write_ledger(
path: Path, bases: list[dict], parts: list[dict], sources: dict[str, dict]
) -> None:
diff --git a/scripts/figures/contract.json b/scripts/figures/contract.json
index 0f0d64c764..ecd089f2f7 100644
--- a/scripts/figures/contract.json
+++ b/scripts/figures/contract.json
@@ -61,35 +61,122 @@
"foot_r",
"toes_r"
],
- "feet": ["toes_l", "toes_r"],
+ "feet": [
+ "toes_l",
+ "toes_r"
+ ],
"slots": {
- "hair": { "attach": "head" },
- "headgear": { "attach": "head" },
- "face_extra": { "attach": "head" },
- "torso_over": { "attach": "chest" },
- "belt": { "attach": "hips" },
- "back": { "attach": "chest" },
- "hand_l": { "attach": "handslot_l" },
- "hand_r": { "attach": "handslot_r" },
- "feet": { "attach": "hips" }
+ "hair": {
+ "attach": "head"
+ },
+ "headgear": {
+ "attach": "head"
+ },
+ "face_extra": {
+ "attach": "head"
+ },
+ "torso_over": {
+ "attach": "chest"
+ },
+ "belt": {
+ "attach": "hips"
+ },
+ "back": {
+ "attach": "chest"
+ },
+ "hand_l": {
+ "attach": "handslot_l"
+ },
+ "hand_r": {
+ "attach": "handslot_r"
+ },
+ "feet": {
+ "attach": "hips"
+ }
},
"clips": {
- "idle": { "loop": true, "duration": [0.8, 6.0] },
- "walk": { "loop": true, "duration": [0.8, 1.2], "stride": true },
- "run": { "loop": true, "duration": [0.5, 0.9], "stride": true },
- "work": { "loop": true, "duration": [0.5, 4.0] },
- "talk": { "loop": true, "duration": [0.8, 3.0] },
- "sit": { "loop": true, "duration": [1.0, 6.0] },
- "sleep": { "loop": true, "duration": [1.0, 6.0] },
- "celebrate": { "loop": false, "duration": [0.5, 4.0] },
- "wave": { "loop": false, "duration": [0.5, 3.0] }
+ "idle": {
+ "loop": true,
+ "duration": [
+ 0.8,
+ 6.0
+ ]
+ },
+ "walk": {
+ "loop": true,
+ "duration": [
+ 0.8,
+ 1.2
+ ],
+ "stride": true
+ },
+ "run": {
+ "loop": true,
+ "duration": [
+ 0.5,
+ 0.9
+ ],
+ "stride": true
+ },
+ "work": {
+ "loop": true,
+ "duration": [
+ 0.5,
+ 4.0
+ ]
+ },
+ "talk": {
+ "loop": true,
+ "duration": [
+ 0.8,
+ 3.0
+ ]
+ },
+ "sit": {
+ "loop": true,
+ "duration": [
+ 1.0,
+ 6.0
+ ]
+ },
+ "sleep": {
+ "loop": true,
+ "duration": [
+ 1.0,
+ 6.0
+ ]
+ },
+ "celebrate": {
+ "loop": false,
+ "duration": [
+ 0.5,
+ 4.0
+ ]
+ },
+ "wave": {
+ "loop": false,
+ "duration": [
+ 0.5,
+ 3.0
+ ]
+ }
},
"variants": {
- "small": { "height_m": 1.15 },
- "medium": { "height_m": 1.75 },
- "large": { "height_m": 2.3 }
+ "small": {
+ "height_m": 1.15
+ },
+ "medium": {
+ "height_m": 1.75
+ },
+ "large": {
+ "height_m": 2.3
+ }
},
- "budget": { "triangles": 4500, "materials": 2, "primitives": 2 }
+ "budget": {
+ "triangles": 4500,
+ "materials": 2,
+ "primitives": 2
+ }
},
"quadruped": {
"bones": [
@@ -115,44 +202,169 @@
"lower_leg_br",
"foot_br"
],
- "optional_bones": ["ear_l", "ear_r", "wing_l", "wing_r"],
- "feet": ["foot_fl", "foot_fr", "foot_bl", "foot_br"],
+ "optional_bones": [
+ "ear_l",
+ "ear_r",
+ "wing_l",
+ "wing_r"
+ ],
+ "feet": [
+ "foot_fl",
+ "foot_fr",
+ "foot_bl",
+ "foot_br"
+ ],
"slots": {
- "headgear": { "attach": "head" },
- "collar": { "attach": "neck" },
- "back": { "attach": "chest" },
- "tail_extra": { "attach": "tail_2" }
+ "headgear": {
+ "attach": "head"
+ },
+ "collar": {
+ "attach": "neck"
+ },
+ "back": {
+ "attach": "chest"
+ },
+ "tail_extra": {
+ "attach": "tail_2"
+ }
},
"clips": {
- "idle": { "loop": true, "duration": [0.8, 6.0] },
- "walk": { "loop": true, "duration": [0.6, 1.4], "stride": true },
- "run": { "loop": true, "duration": [0.4, 0.9], "stride": true },
- "talk": { "loop": true, "duration": [0.8, 3.0] },
- "sit": { "loop": true, "duration": [1.0, 6.0] },
- "sleep": { "loop": true, "duration": [1.0, 6.0] },
- "celebrate": { "loop": false, "duration": [0.5, 4.0] }
+ "idle": {
+ "loop": true,
+ "duration": [
+ 0.8,
+ 6.0
+ ]
+ },
+ "walk": {
+ "loop": true,
+ "duration": [
+ 0.6,
+ 1.4
+ ],
+ "stride": true
+ },
+ "run": {
+ "loop": true,
+ "duration": [
+ 0.4,
+ 0.9
+ ],
+ "stride": true
+ },
+ "talk": {
+ "loop": true,
+ "duration": [
+ 0.8,
+ 3.0
+ ]
+ },
+ "sit": {
+ "loop": true,
+ "duration": [
+ 1.0,
+ 6.0
+ ]
+ },
+ "sleep": {
+ "loop": true,
+ "duration": [
+ 1.0,
+ 6.0
+ ]
+ },
+ "celebrate": {
+ "loop": false,
+ "duration": [
+ 0.5,
+ 4.0
+ ]
+ }
},
- "variants": { "default": { "height_m": 0.9 } },
- "budget": { "triangles": 4500, "materials": 2, "primitives": 2 }
+ "variants": {
+ "default": {
+ "height_m": 0.9
+ }
+ },
+ "budget": {
+ "triangles": 4500,
+ "materials": 2,
+ "primitives": 2
+ }
},
"spirit": {
- "bones": ["root", "body", "face"],
+ "bones": [
+ "root",
+ "body",
+ "face"
+ ],
"feet": [],
"slots": {
- "headgear": { "attach": "body" },
- "hand_l": { "attach": "body" },
- "hand_r": { "attach": "body" }
+ "headgear": {
+ "attach": "body"
+ },
+ "hand_l": {
+ "attach": "body"
+ },
+ "hand_r": {
+ "attach": "body"
+ }
},
"clips": {
- "idle": { "loop": true, "duration": [0.8, 6.0] },
- "walk": { "loop": true, "duration": [0.6, 2.0], "stride": false },
- "talk": { "loop": true, "duration": [0.8, 3.0] },
- "sleep": { "loop": true, "duration": [1.0, 6.0] },
- "celebrate": { "loop": false, "duration": [0.5, 4.0] },
- "wave": { "loop": false, "duration": [0.5, 3.0] }
+ "idle": {
+ "loop": true,
+ "duration": [
+ 0.8,
+ 6.0
+ ]
+ },
+ "walk": {
+ "loop": true,
+ "duration": [
+ 0.6,
+ 2.0
+ ],
+ "stride": false
+ },
+ "talk": {
+ "loop": true,
+ "duration": [
+ 0.8,
+ 3.0
+ ]
+ },
+ "sleep": {
+ "loop": true,
+ "duration": [
+ 1.0,
+ 6.0
+ ]
+ },
+ "celebrate": {
+ "loop": false,
+ "duration": [
+ 0.5,
+ 4.0
+ ]
+ },
+ "wave": {
+ "loop": false,
+ "duration": [
+ 0.5,
+ 3.0
+ ]
+ }
},
- "variants": { "default": { "height_m": 1.9 } },
- "budget": { "triangles": 1200, "materials": 3, "primitives": 3 }
+ "variants": {
+ "default": {
+ "height_m": 1.9
+ }
+ },
+ "budget": {
+ "triangles": 4000,
+ "materials": 3,
+ "primitives": 3
+ }
}
},
"limits": {
@@ -176,7 +388,10 @@
"source": "kaykit-adventurers",
"character": "Rogue",
"label": "Ranger",
- "styles": ["modern", "fantasy"]
+ "styles": [
+ "modern",
+ "fantasy"
+ ]
},
{
"id": "biped-knight",
@@ -186,7 +401,9 @@
"source": "kaykit-adventurers",
"character": "Knight",
"label": "Knight",
- "styles": ["fantasy"]
+ "styles": [
+ "fantasy"
+ ]
},
{
"id": "biped-mage",
@@ -196,7 +413,9 @@
"source": "kaykit-adventurers",
"character": "Mage",
"label": "Mage",
- "styles": ["fantasy"]
+ "styles": [
+ "fantasy"
+ ]
},
{
"id": "biped-barbarian",
@@ -206,7 +425,21 @@
"source": "kaykit-adventurers",
"character": "Barbarian",
"label": "Barbarian",
- "styles": ["fantasy"]
+ "styles": [
+ "fantasy"
+ ]
+ },
+ {
+ "id": "spirit-gigi",
+ "archetype": "spirit",
+ "variant": "default",
+ "base": "gigi",
+ "source": "gigi-mascot",
+ "character": "Gigi",
+ "label": "Gigi",
+ "styles": [
+ "spirit"
+ ]
}
]
}
diff --git a/scripts/figures/gigi_builder.py b/scripts/figures/gigi_builder.py
new file mode 100644
index 0000000000..d95ca944e2
--- /dev/null
+++ b/scripts/figures/gigi_builder.py
@@ -0,0 +1,357 @@
+"""Gigi — the pixel-ghost mascot — modelled and animated by script, inside Blender.
+
+The deck room already draws the mascot in 3D by extruding its SVG outline
+(``components/deck/room/GigiFigure.tsx``); this module builds the same figure
+as a contract figure of the ``spirit`` archetype (character-pipeline.md §3):
+one mesh with two material slots (the lit body, the unlit marks — eyes,
+mouth, scanlines, glitch pixels), a three-bone rig (``root`` → ``body`` →
+``face``) and six clips keyed here, so nothing about Jarvis' own face depends
+on a download.
+
+Coordinates: the SVG box is 256 wide; the figure runs from y=36 (top) to
+y=208 (hem). Blender is Z-up and the front faces −Y; the exporter maps that
+to glTF +Y up / +Z forward (contract §4.1).
+"""
+
+from __future__ import annotations
+
+import math
+
+import bmesh # type: ignore[import-not-found]
+import bpy # type: ignore[import-not-found]
+from mathutils import Vector # type: ignore[import-not-found]
+
+HEIGHT_M = 1.9
+SVG_TOP, SVG_HEM = 36.0, 208.0
+S = HEIGHT_M / (SVG_HEM - SVG_TOP)
+DEPTH = 0.34
+HOVER = 0.0 # geometry stands on the origin; the clips lift the ghost (HOVER_LIFT)
+HOVER_LIFT = 0.12 # how high the body bone floats above its ground blob, in every clip
+FPS = 30
+
+# Cells of the 16-cell strip (contract sheet) each part is painted with.
+CELL_BODY = "primary"
+CELL_SLICE = "primary_shade"
+CELL_MARK = "secondary"
+CELL_MARK_DIM = "secondary_shade"
+CELL_PUPIL = "eyes"
+CELL_GLOW = "emissive"
+
+BODY_OUTLINE = [
+ # (x, y) in SVG units — the quadratic curves sampled, then the zigzag hem.
+ *[
+ (58 + (128 - 58) * t, 90 - (90 - 36) * (1 - (1 - t) ** 2))
+ for t in [i / 12 for i in range(13)]
+ ],
+ *[(128 + (198 - 128) * t, 36 + (90 - 36) * t * t) for t in [i / 12 for i in range(1, 13)]],
+ (198, 208),
+ (180, 186),
+ (160, 208),
+ (140, 186),
+ (120, 208),
+ (100, 186),
+ (80, 208),
+ (58, 186),
+]
+
+
+def svg_to_blender(x: float, y: float, depth_y: float = 0.0) -> Vector:
+ return Vector(((x - 128.0) * S, depth_y, (SVG_HEM - y) * S))
+
+
+def _new_mesh_object(name: str, bm: bmesh.types.BMesh) -> bpy.types.Object:
+ mesh = bpy.data.meshes.new(name)
+ bm.to_mesh(mesh)
+ bm.free()
+ obj = bpy.data.objects.new(name, mesh)
+ bpy.context.scene.collection.objects.link(obj)
+ return obj
+
+
+def build_body() -> bpy.types.Object:
+ bm = bmesh.new()
+ front = [bm.verts.new(svg_to_blender(x, y, -DEPTH / 2)) for x, y in BODY_OUTLINE]
+ bm.verts.ensure_lookup_table()
+ face = bm.faces.new(front)
+ face.normal_update()
+ if face.normal.y > 0: # the front must face −Y
+ bmesh.ops.reverse_faces(bm, faces=[face])
+ res = bmesh.ops.extrude_face_region(bm, geom=[face])
+ moved = [g for g in res["geom"] if isinstance(g, bmesh.types.BMVert)]
+ bmesh.ops.translate(bm, verts=moved, vec=Vector((0, DEPTH, 0)))
+ bmesh.ops.recalc_face_normals(bm, faces=bm.faces)
+ obj = _new_mesh_object("GigiBody", bm)
+ bevel = obj.modifiers.new("Bevel", "BEVEL")
+ bevel.width = 0.03
+ bevel.segments = 2
+ bevel.limit_method = "ANGLE"
+ return obj
+
+
+def build_disc(
+ name: str, cx: float, cy: float, rx: float, ry: float, z_off: float
+) -> bpy.types.Object:
+ bm = bmesh.new()
+ centre = svg_to_blender(cx, cy, -DEPTH / 2 - z_off)
+ verts = []
+ for i in range(20):
+ a = i / 20 * math.tau
+ verts.append(bm.verts.new(centre + Vector((math.cos(a) * rx * S, 0, math.sin(a) * ry * S))))
+ face = bm.faces.new(verts)
+ face.normal_update()
+ if face.normal.y > 0:
+ bmesh.ops.reverse_faces(bm, faces=[face])
+ return _new_mesh_object(name, bm)
+
+
+def build_box(
+ name: str, x: float, y: float, w: float, h: float, z_off: float, thick: float = 0.04
+) -> bpy.types.Object:
+ bm = bmesh.new()
+ centre = svg_to_blender(x + w / 2, y + h / 2, -DEPTH / 2 - z_off)
+ bmesh.ops.create_cube(bm, size=1.0)
+ bmesh.ops.scale(bm, vec=Vector((w * S, thick, h * S)), verts=bm.verts)
+ bmesh.ops.translate(bm, vec=centre, verts=bm.verts)
+ return _new_mesh_object(name, bm)
+
+
+def build_arm(name: str, pts: tuple[float, ...]) -> bpy.types.Object:
+ ax, ay, cx, cy, bx, by = pts
+ curve = bpy.data.curves.new(f"{name}Curve", "CURVE")
+ curve.dimensions = "3D"
+ curve.bevel_depth = 2.75 * S
+ curve.bevel_resolution = 3
+ spline = curve.splines.new("BEZIER")
+ spline.bezier_points.add(1)
+ p0, p1 = spline.bezier_points
+ a = svg_to_blender(ax, ay, 0.0)
+ c = svg_to_blender(cx, cy, 0.0)
+ b = svg_to_blender(bx, by, 0.0)
+ p0.co, p1.co = a, b
+ p0.handle_left, p0.handle_right = a, a + (c - a) * 0.66
+ p1.handle_left, p1.handle_right = b + (c - b) * 0.66, b
+ obj = bpy.data.objects.new(name, curve)
+ bpy.context.scene.collection.objects.link(obj)
+ bpy.context.view_layer.objects.active = obj
+ obj.select_set(True)
+ bpy.ops.object.convert(target="MESH")
+ return bpy.context.view_layer.objects.active
+
+
+def build_parts() -> tuple[list[tuple[bpy.types.Object, str, str]], list[str]]:
+ """Every piece as (object, cell, bone). Returns the pieces and the mark-cell names."""
+ front = 0.01
+ pieces: list[tuple[bpy.types.Object, str, str]] = [(build_body(), CELL_BODY, "body")]
+ # scanlines and chromatic slices
+ pieces.append((build_box("Scan1", 58, 131, 140, 2.4, front), CELL_MARK, "body"))
+ pieces.append((build_box("Scan2", 58, 159.5, 140, 1.4, front), CELL_MARK_DIM, "body"))
+ pieces.append((build_box("SliceL", 64, 118, 18, 10, front), CELL_SLICE, "body"))
+ pieces.append((build_box("SliceR", 170, 118, 18, 10, front), CELL_SLICE, "body"))
+ # glitch pixels floating beside the body
+ for i, (x, y, w, h) in enumerate(
+ [(200, 104, 6, 6), (208, 128, 4, 4), (202, 146, 9, 3), (197, 168, 3, 5), (206, 176, 5, 3)]
+ ):
+ pieces.append((build_box(f"GlitchR{i}", x, y, w, h, -0.06, thick=0.05), CELL_GLOW, "body"))
+ for i, (x, y, w, h) in enumerate(
+ [(44, 96, 6, 4), (48, 124, 4, 6), (40, 148, 8, 3), (50, 170, 3, 5)]
+ ):
+ pieces.append(
+ (build_box(f"GlitchL{i}", x, y, w, h, -0.06, thick=0.05), CELL_MARK_DIM, "body")
+ )
+ # eyes, pupils, highlights, mouth — the face bone moves these
+ pieces.append((build_disc("EyeL", 102, 108, 10, 14, front), CELL_MARK, "face"))
+ pieces.append((build_disc("EyeR", 154, 108, 10, 14, front), CELL_MARK, "face"))
+ pieces.append((build_disc("PupilL", 104, 112, 4, 6, front + 0.012), CELL_PUPIL, "face"))
+ pieces.append((build_disc("PupilR", 156, 112, 4, 6, front + 0.012), CELL_PUPIL, "face"))
+ pieces.append((build_disc("ShineL", 106, 105, 2, 2, front + 0.02), CELL_GLOW, "face"))
+ pieces.append((build_disc("ShineR", 158, 105, 2, 2, front + 0.02), CELL_GLOW, "face"))
+ pieces.append((build_disc("Mouth", 128, 146, 7, 10, front), CELL_MARK, "face"))
+ pieces.append((build_disc("MouthIn", 128, 146, 3, 5, front + 0.012), CELL_PUPIL, "face"))
+ # arms
+ pieces.append((build_arm("ArmL", (58, 140, 40, 148, 42, 162)), CELL_MARK, "body"))
+ pieces.append((build_arm("ArmR", (198, 140, 216, 148, 214, 162)), CELL_MARK, "body"))
+ marks = [CELL_MARK, CELL_MARK_DIM, CELL_PUPIL, CELL_GLOW]
+ return pieces, marks
+
+
+def build_armature() -> bpy.types.Object:
+ arm_data = bpy.data.armatures.new("GigiRig")
+ arm = bpy.data.objects.new("Rig", arm_data)
+ bpy.context.scene.collection.objects.link(arm)
+ bpy.context.view_layer.objects.active = arm
+ arm.select_set(True)
+ bpy.ops.object.mode_set(mode="EDIT")
+ root = arm_data.edit_bones.new("root")
+ root.head, root.tail = Vector((0, 0, 0)), Vector((0, 0, 0.2))
+ body = arm_data.edit_bones.new("body")
+ body.head, body.tail = Vector((0, 0, 0.0)), Vector((0, 0, HEIGHT_M * 0.55))
+ body.parent = root
+ face = arm_data.edit_bones.new("face")
+ face.head = svg_to_blender(128, 130, 0.0)
+ face.tail = face.head + Vector((0, 0, 0.3))
+ face.parent = body
+ bpy.ops.object.mode_set(mode="OBJECT")
+ return arm
+
+
+def assemble(
+ pieces, cells: list[str], sheet: dict, img, sheet_material
+) -> tuple[bpy.types.Object, dict]:
+ """Join every piece into one mesh: UVs on the cell strip, material slots body/marks."""
+ n_cells = len(sheet["cells"])
+ cv = 1.0 - (sheet["cell_height"] / 2) / sheet["size"]
+ body_cells = {CELL_BODY, CELL_SLICE}
+ used: dict[str, int] = {}
+ for obj, cell, bone in pieces:
+ mesh = obj.data
+ if not mesh.uv_layers:
+ mesh.uv_layers.new(name="UVMap")
+ uv = mesh.uv_layers.active
+ cu = (cells.index(cell) + 0.5) / n_cells
+ for poly in mesh.polygons:
+ for li in poly.loop_indices:
+ uv.data[li].uv = (cu, cv)
+ poly.material_index = 0 if cell in body_cells else 1
+ used[cell] = used.get(cell, 0) + len(mesh.polygons)
+ # Two slots on every piece so the join keeps indices aligned.
+ mesh.materials.clear()
+ mesh.materials.append(sheet_material("spirit-gigi-sheet", img))
+ mesh.materials.append(sheet_material("spirit-gigi-marks", img))
+ vg = obj.vertex_groups.new(name=bone)
+ vg.add([v.index for v in mesh.vertices], 1.0, "REPLACE")
+ for obj in bpy.data.objects:
+ obj.select_set(False)
+ objs = [p[0] for p in pieces]
+ for obj in objs:
+ obj.select_set(True)
+ bpy.context.view_layer.objects.active = objs[0]
+ bpy.ops.object.join()
+ body = bpy.context.view_layer.objects.active
+ body.name = "Body"
+ body.data.name = "Body"
+ # Every material slot but the first two came in duplicated by the join.
+ while len(body.data.materials) > 2:
+ body.data.materials.pop(index=len(body.data.materials) - 1)
+ return body, {"used": used, "unmapped": {}, "hair_faces": []}
+
+
+def rig(body: bpy.types.Object, arm: bpy.types.Object) -> None:
+ body.parent = arm
+ mod = body.modifiers.new("Armature", "ARMATURE")
+ mod.object = arm
+
+
+# ---------------------------------------------------------------------------
+# clips
+# ---------------------------------------------------------------------------
+
+
+def _key(arm, bone: str, frame: int, *, loc=None, rot=None) -> None:
+ pb = arm.pose.bones[bone]
+ if loc is not None:
+ lifted = (loc[0], loc[1] + (HOVER_LIFT if bone == "body" else 0.0), loc[2])
+ pb.location = Vector(lifted)
+ pb.keyframe_insert("location", frame=frame)
+ if rot is not None:
+ pb.rotation_mode = "XYZ"
+ pb.rotation_euler = tuple(math.radians(v) for v in rot)
+ pb.keyframe_insert("rotation_euler", frame=frame)
+
+
+def _action(arm, name: str, seconds: float):
+ action = bpy.data.actions.new(name)
+ action.use_fake_user = True
+ if arm.animation_data is None:
+ arm.animation_data_create()
+ arm.animation_data.action = action
+ try: # slotted actions (Blender 4.4+)
+ if not action.slots:
+ slot = action.slots.new("OBJECT", arm.name)
+ else:
+ slot = action.slots[0]
+ arm.animation_data.action_slot = slot
+ except AttributeError:
+ pass
+ frames = max(2, round(seconds * FPS))
+ action.frame_range = (1, frames + 1)
+ return action, frames
+
+
+def _sampled(arm, name: str, seconds: float, fn) -> None:
+ """Key every frame of a loop from ``fn(t)`` → {bone: (loc, rot)}, first == last."""
+ action, frames = _action(arm, name, seconds)
+ for f in range(frames + 1):
+ t = f / frames
+ for bone, (loc, rot) in fn(t if f < frames else 0.0).items():
+ _key(arm, bone, f + 1, loc=loc, rot=rot)
+ action.use_frame_range = True
+ action.frame_range = (1, frames + 1)
+
+
+def _oneshot(arm, name: str, seconds: float, fn) -> None:
+ action, frames = _action(arm, name, seconds)
+ for f in range(frames + 1):
+ t = f / frames
+ for bone, (loc, rot) in fn(t).items():
+ _key(arm, bone, f + 1, loc=loc, rot=rot)
+ action.use_frame_range = True
+ action.frame_range = (1, frames + 1)
+
+
+def key_clips(arm: bpy.types.Object) -> None:
+ two_pi = math.tau
+
+ def idle(t):
+ return {
+ "body": ((0, math.sin(t * two_pi) * 0.03, 0), (0, math.sin(t * two_pi + 1) * 1.5, 0)),
+ "face": ((0, 0, 0), (0, 0, 0)),
+ }
+
+ def walk(t): # the glide: leaning forward, bobbing quicker
+ return {
+ "body": ((0, math.sin(t * two_pi * 2) * 0.04, 0), (-9, math.sin(t * two_pi) * 2, 0)),
+ "face": ((0, 0, 0), (0, 0, 0)),
+ }
+
+ def talk(t):
+ return {
+ "body": ((0, math.sin(t * two_pi) * 0.02, 0), (0, 0, 0)),
+ "face": ((0, abs(math.sin(t * two_pi * 3)) * 0.03, 0), (0, 0, 0)),
+ }
+
+ def sleep(t):
+ return {
+ "body": ((0, -0.08 + math.sin(t * two_pi) * 0.012, 0), (10, 0, 6)),
+ "face": ((0, -0.02, 0), (0, 0, 0)),
+ }
+
+ def celebrate(t): # a hop and a full spin
+ hop = math.sin(min(t * 2, 1.0) * math.pi) * 0.25
+ return {
+ "body": ((0, hop, 0), (0, t * 360, 0)),
+ "face": ((0, 0, 0), (0, 0, 0)),
+ }
+
+ def wave(t): # sway twice, like a friendly wobble
+ return {
+ "body": ((0, 0, 0), (0, 0, math.sin(t * two_pi * 2) * 14)),
+ "face": ((0, 0, 0), (0, 0, 0)),
+ }
+
+ _sampled(arm, "idle", 2.0, idle)
+ _sampled(arm, "walk", 1.0, walk)
+ _sampled(arm, "talk", 1.2, talk)
+ _sampled(arm, "sleep", 4.0, sleep)
+ _oneshot(arm, "celebrate", 1.2, celebrate)
+ _oneshot(arm, "wave", 1.0, wave)
+ arm.animation_data.action = None
+
+
+def build_gigi(sheet: dict, img, sheet_material) -> tuple[bpy.types.Object, bpy.types.Object, dict]:
+ """Build the whole figure into the current (empty) scene. Returns (armature, body, uv_report)."""
+ pieces, _marks = build_parts()
+ body, report = assemble(pieces, sheet["cells"], sheet, img, sheet_material)
+ arm = build_armature()
+ rig(body, arm)
+ key_clips(arm)
+ return arm, body, report
diff --git a/scripts/figures/sources/gigi-mascot.json b/scripts/figures/sources/gigi-mascot.json
new file mode 100644
index 0000000000..235ed683c5
--- /dev/null
+++ b/scripts/figures/sources/gigi-mascot.json
@@ -0,0 +1,31 @@
+{
+ "$comment": "Gigi, the app's own pixel-ghost mascot, as the society's lead figure (spirit archetype). No external file: gigi_builder.py models the figure from the same SVG outline the deck room extrudes (components/deck/room/GigiFigure.tsx, wiki-video/public/gigi.svg) and keys its clips by script, so the whole character is first-party and reproducible.",
+ "name": "Gigi mascot (first-party)",
+ "author": "Personal Jarvis",
+ "license": "first-party",
+ "license_url": "",
+ "procedural": "gigi",
+ "files": {},
+ "characters": {
+ "Gigi": {
+ "default_palette": {
+ "skin": "#f4b68f",
+ "skin_shade": "#d99a75",
+ "hair": "#9e5d47",
+ "eyes": "#050505",
+ "primary": "#0e0e0e",
+ "primary_shade": "#5a5a5a",
+ "secondary": "#ffffff",
+ "secondary_shade": "#c9c9c9",
+ "accent": "#ffd166",
+ "metal": "#919da2",
+ "leather": "#9a5944",
+ "fur": "#b87556",
+ "fur_shade": "#8d4c39",
+ "shoes": "#4a2e22",
+ "eye_white": "#ffffff",
+ "emissive": "#ffffff"
+ }
+ }
+ }
+}
diff --git a/tests/unit/society/test_seeds.py b/tests/unit/society/test_seeds.py
index 6e1f1818c0..aebe625c23 100644
--- a/tests/unit/society/test_seeds.py
+++ b/tests/unit/society/test_seeds.py
@@ -33,20 +33,23 @@ async def test_starter_team_is_seeded_once(tmp_path: Path):
await store.close()
-async def test_runtime_seeds_lead_and_team_by_default(tmp_path: Path):
+async def test_runtime_seeds_only_the_lead_by_default(tmp_path: Path):
+ """Only Jarvis is on the roster out of the box (maintainer, 2026-09-02); the
+ starter team is a seed PROPOSAL, seeded only when asked for."""
runtime = SocietyRuntime(tmp_path)
await runtime.ensure_started()
try:
- ids = [a.agent_id for a in await runtime.roster.list()]
- assert ids == ["jarvis", "scout", "archivist"]
+ lead = await runtime.roster.list()
+ assert [a.agent_id for a in lead] == ["jarvis"]
+ assert lead[0].avatar["archetype"] == "spirit" and lead[0].avatar["base"] == "gigi"
finally:
await runtime.close()
- quiet = SocietyRuntime(tmp_path / "quiet", seed_starter_team=False)
- await quiet.ensure_started()
+ team = SocietyRuntime(tmp_path / "team", seed_starter_team=True)
+ await team.ensure_started()
try:
- assert [a.agent_id for a in await quiet.roster.list()] == ["jarvis"]
+ assert [a.agent_id for a in await team.roster.list()] == ["jarvis", "scout", "archivist"]
finally:
- await quiet.close()
+ await team.close()
def test_proposals_follow_connected_capabilities():