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(office): prompt coding agents from their card and add Mission Control

rubenluetke10-beepd1aaccf019c4
diff --git a/jarvis/ui/web/frontend/src/components/society/office/CheckpointMarker.tsx b/jarvis/ui/web/frontend/src/components/society/office/CheckpointMarker.tsx
index b3c67bdab7..f0bb333db2 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/CheckpointMarker.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/office/CheckpointMarker.tsx
@@ -17,7 +17,7 @@ import { cachedCanvasTexture } from "./canvasMaterials";
import type { Checkpoint, CheckpointKind } from "./officeLayout";
import { CHECKPOINT_GOLD } from "./officePalette";
-export type CheckpointIcon = "plus" | "list" | "team" | "shirt" | "star" | "coffee" | "updown";
+export type CheckpointIcon = "plus" | "list" | "team" | "shirt" | "star" | "coffee" | "updown" | "target";
/** Stroke-only icons in a 24 × 24 box (round caps and joins). */
export const CHECKPOINT_ICON_PATHS: Record<CheckpointIcon, string> = {
@@ -29,11 +29,13 @@ export const CHECKPOINT_ICON_PATHS: Record<CheckpointIcon, string> = {
coffee: "M4 9h12v5a5 5 0 0 1-5 5H9a5 5 0 0 1-5-5V9zM16 10h1.5a2.5 2.5 0 0 1 0 5H16M8 3.5c0 1 1 1 1 2M12 3.5c0 1 1 1 1 2",
// The elevator: an up arrow beside a down arrow.
updown: "M8 20V4M4 8l4-4 4 4M16 4v16M12 16l4 4 4-4",
+ // Mission Control: a target with crosshairs.
+ target: "M12 3a9 9 0 1 1 0 18a9 9 0 1 1 0-18zM12 8a4 4 0 1 1 0 8a4 4 0 1 1 0-8zM12 1v4M12 19v4M1 12h4M19 12h4",
};
/** The icon each checkpoint wears, on its floor token and in the reception's list of places. */
export const CHECKPOINT_ICON: Record<CheckpointKind, CheckpointIcon> = {
- create: "plus", manage: "list", team: "team", wardrobe: "shirt", lead: "star", break: "coffee", elevator: "updown",
+ create: "plus", manage: "list", team: "team", wardrobe: "shirt", lead: "star", break: "coffee", elevator: "updown", mission: "target",
};
const TOKEN_RADIUS = 0.36;
diff --git a/jarvis/ui/web/frontend/src/components/society/office/MissionConsole.tsx b/jarvis/ui/web/frontend/src/components/society/office/MissionConsole.tsx
new file mode 100644
index 0000000000..0ba3839e3d
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/society/office/MissionConsole.tsx
@@ -0,0 +1,100 @@
+/**
+ * Mission Control's console ring on the coding floor: six slanted consoles
+ * facing outwards around a projector that holds a slowly turning holo-globe.
+ *
+ * Built in local space centred on the origin and kept inside the
+ * `missionConsole` footprint (3.2 m × 3.2 m, 2.2 m high) that navigation
+ * walks around. Geometries and materials are module-level singletons.
+ */
+import { useRef } from "react";
+import { useFrame } from "@react-three/fiber";
+import { useReducedMotion } from "framer-motion";
+import { CylinderGeometry, MeshStandardMaterial, SphereGeometry, TorusGeometry, type Group } from "three";
+import { Box, matte, Rounded } from "./OfficeFurniture";
+import type { Furniture, FurnitureKind } from "./officeLayout";
+
+const HOLO = "#38bdf8";
+
+const MM = {
+ base: matte("#2b3446", { roughness: 0.55, metalness: 0.35 }),
+ trim: matte("#1b2130", { roughness: 0.45, metalness: 0.4 }),
+ body: matte("#dfe4ec", { roughness: 0.6 }),
+ bezel: matte("#1f2533", { roughness: 0.5 }),
+ screen: new MeshStandardMaterial({ color: "#0b1a2e", emissive: HOLO, emissiveIntensity: 0.45, roughness: 0.3 }),
+ bar: new MeshStandardMaterial({ color: "#7dd3fc", emissive: "#7dd3fc", emissiveIntensity: 0.9 }),
+ barWarm: new MeshStandardMaterial({ color: "#fbbf24", emissive: "#fbbf24", emissiveIntensity: 0.8 }),
+ holo: new MeshStandardMaterial({ color: HOLO, emissive: HOLO, emissiveIntensity: 1.1, wireframe: true, transparent: true, opacity: 0.75 }),
+ holoCore: new MeshStandardMaterial({ color: HOLO, emissive: HOLO, emissiveIntensity: 0.8, transparent: true, opacity: 0.18, depthWrite: false }),
+ lens: new MeshStandardMaterial({ color: "#bae6fd", emissive: HOLO, emissiveIntensity: 1.4 }),
+};
+
+const GEO = {
+ base: new CylinderGeometry(1.55, 1.58, 0.1, 48),
+ ring: new CylinderGeometry(1.2, 1.2, 0.02, 48, 1, true),
+ pillar: new CylinderGeometry(0.16, 0.22, 1.0, 20),
+ lens: new CylinderGeometry(0.24, 0.24, 0.05, 24),
+ globe: new SphereGeometry(0.46, 14, 10),
+ core: new SphereGeometry(0.4, 20, 14),
+ orbit: new TorusGeometry(0.62, 0.012, 6, 48),
+};
+
+/** Consoles around the ring; each faces away from the centre, towards someone standing outside. */
+const CONSOLES = Array.from({ length: 6 }, (_, i) => (i * Math.PI) / 3 + Math.PI / 6);
+const CONSOLE_RADIUS = 1.08;
+
+function Console({ angle }: { angle: number }) {
+ // Local +z is the console's front; rotate so the front points outwards along `angle`.
+ const x = Math.sin(angle) * CONSOLE_RADIUS;
+ const z = Math.cos(angle) * CONSOLE_RADIUS;
+ return (
+ <group position={[x, 0, z]} rotation={[0, angle, 0]}>
+ <Rounded size={[0.92, 0.78, 0.46]} radius={0.05} position={[0, 0.49, -0.02]} material={MM.body} />
+ <Box size={[0.94, 0.04, 0.5]} position={[0, 0.9, 0]} material={MM.trim} />
+ <group position={[0, 1.14, -0.08]} rotation={[-0.5, 0, 0]}>
+ <Rounded size={[0.86, 0.5, 0.06]} radius={0.02} position={[0, 0, 0]} material={MM.bezel} />
+ <Box size={[0.78, 0.42, 0.01]} position={[0, 0, 0.031]} material={MM.screen} cast={false} />
+ {[-0.24, -0.12, 0, 0.12, 0.24].map((bx, i) => {
+ const h = 0.08 + ((i * 37 + Math.round(angle * 10)) % 5) * 0.05;
+ return <Box key={bx} size={[0.07, h, 0.004]} position={[bx, -0.18 + h / 2, 0.038]} material={i === 3 ? MM.barWarm : MM.bar} cast={false} />;
+ })}
+ </group>
+ </group>
+ );
+}
+
+function Hologram() {
+ const spin = useRef<Group>(null);
+ const reduced = useReducedMotion() ?? false;
+ useFrame((_, delta) => {
+ if (reduced || !spin.current) return;
+ spin.current.rotation.y += delta * 0.35;
+ });
+ return (
+ <group position={[0, 1.68, 0]}>
+ <group ref={spin}>
+ <mesh geometry={GEO.globe} material={MM.holo} />
+ <mesh geometry={GEO.orbit} material={MM.holo} rotation={[Math.PI / 2.6, 0, 0]} />
+ </group>
+ <mesh geometry={GEO.core} material={MM.holoCore} />
+ </group>
+ );
+}
+
+/** The whole hub: base disc, glowing floor ring, six consoles, the projector and its globe. */
+export function MissionConsole() {
+ return (
+ <group>
+ <mesh geometry={GEO.base} material={MM.base} position={[0, 0.05, 0]} receiveShadow />
+ <mesh geometry={GEO.ring} material={MM.lens} position={[0, 0.105, 0]} />
+ {CONSOLES.map((angle) => <Console key={angle} angle={angle} />)}
+ <mesh geometry={GEO.pillar} material={MM.trim} position={[0, 0.6, 0]} castShadow />
+ <mesh geometry={GEO.lens} material={MM.lens} position={[0, 1.12, 0]} />
+ <Hologram />
+ </group>
+ );
+}
+
+/** Mission Control's renderers; merged into OfficeProps' exhaustive table. */
+export const MISSION_RENDERERS = {
+ missionConsole: () => <MissionConsole />,
+} satisfies Partial<Record<FurnitureKind, (props: { item: Furniture }) => JSX.Element>>;
diff --git a/jarvis/ui/web/frontend/src/components/society/office/MissionControlPanel.tsx b/jarvis/ui/web/frontend/src/components/society/office/MissionControlPanel.tsx
new file mode 100644
index 0000000000..af50456115
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/society/office/MissionControlPanel.tsx
@@ -0,0 +1,301 @@
+/**
+ * Mission Control, the coding floor's centre hub: start new coding agents and
+ * brief several of them at once.
+ *
+ * "New agents" opens panes through the IDE's own `POST /terminals` (workspace,
+ * CLI, how many) and, when a first task is given, waits for each pane to come
+ * up and hands it the task through `/terminals/{name}/prompt` — the path voice
+ * and the grid use, so every prompt is recorded and receipted the same way.
+ * "Brief the floor" sends one message to every picked session. The office adds
+ * no backend contract of its own.
+ */
+import { useCallback, useEffect, useId, useMemo, useState, type KeyboardEvent } from "react";
+import { Radio, Rocket } from "lucide-react";
+import { useT } from "@/i18n";
+import {
+ fetchIdeAgents, fetchIdeState, fetchWorkspacePanes, interruptTerminal, openTerminal, promptTerminal,
+ type AgentStatus, type WorkspaceCard,
+} from "@/lib/agenticIdeApi";
+import { useEventStore } from "@/store/events";
+import { useWorkspacePanesStore } from "@/store/workspacePanes";
+import { paneOccupants, type PaneOccupant } from "./codingFloor";
+import "./missionControl.css";
+
+/** At most this many agents per launch; the IDE caps the workspace on its own too. */
+export const MAX_LAUNCH = 4;
+/** A new pane gets this long to start before its first task is given up on. */
+const START_TIMEOUT_MS = 30_000;
+const START_POLL_MS = 600;
+const START_JITTER_MS = 300;
+
+type Tab = "new" | "fleet";
+const TABS: readonly Tab[] = ["new", "fleet"];
+
+type LaunchLine = { name: string; tone: "busy" | "ok" | "warn" | "error"; text: string };
+
+/** Coding CLIs a new agent can run: installed, and not a plain shell. Pure. */
+export function launchableAgents(agents: readonly AgentStatus[]): AgentStatus[] {
+ return agents.filter((a) => a.installed && (a.kind ?? "cli") !== "shell");
+}
+
+/** Which sessions a fleet filter picks. Pure. */
+export function pickFleet(occupants: readonly PaneOccupant[], filter: "all" | "working" | "waiting" | "idle" | "none"): Set<string> {
+ if (filter === "none") return new Set();
+ return new Set(occupants.filter((o) => filter === "all" || o.agent.state === filter).map((o) => o.agent.agentId));
+}
+
+/** Wait until the pane `name` of `workspaceId` is live; false when it failed or the clock ran out. */
+async function waitLive(workspaceId: string, name: string): Promise<boolean> {
+ const deadline = Date.now() + START_TIMEOUT_MS;
+ for (;;) {
+ try {
+ const { panes } = await fetchWorkspacePanes();
+ const row = panes.find((p) => p.workspace_id === workspaceId && p.name === name);
+ if (row?.status === "live") return true;
+ if (row && row.status !== "pending") return false;
+ } catch (err) {
+ // One failed poll is not an answer; the next one decides.
+ console.warn("Mission Control: pane poll failed", err);
+ }
+ if (Date.now() >= deadline) return false;
+ await new Promise((resolve) => setTimeout(resolve, START_POLL_MS + Math.random() * START_JITTER_MS));
+ }
+}
+
+function errorText(err: unknown): string {
+ return err instanceof Error ? err.message : String(err);
+}
+
+function NewAgentsTab() {
+ const t = useT();
+ const [workspaces, setWorkspaces] = useState<WorkspaceCard[] | null>(null);
+ const [agents, setAgents] = useState<AgentStatus[] | null>(null);
+ const [loadError, setLoadError] = useState<string | null>(null);
+ const [workspaceId, setWorkspaceId] = useState("");
+ const [agentName, setAgentName] = useState("");
+ const [count, setCount] = useState(1);
+ const [task, setTask] = useState("");
+ const [sharpen, setSharpen] = useState(false);
+ const [running, setRunning] = useState(false);
+ const [lines, setLines] = useState<LaunchLine[]>([]);
+
+ useEffect(() => {
+ let alive = true;
+ Promise.all([fetchIdeState(), fetchIdeAgents(true)])
+ .then(([state, list]) => {
+ if (!alive) return;
+ setWorkspaces(state.workspaces);
+ setWorkspaceId((current) => current || state.active_id || state.workspaces[0]?.id || "");
+ const usable = launchableAgents(list.agents);
+ setAgents(usable);
+ setAgentName((current) => current || usable[0]?.name || "");
+ })
+ .catch((err) => { if (alive) setLoadError(errorText(err)); });
+ return () => { alive = false; };
+ }, []);
+
+ const setLine = (index: number, line: LaunchLine) =>
+ setLines((prev) => { const next = [...prev]; next[index] = line; return next; });
+
+ const launch = async () => {
+ if (running || !workspaceId || !agentName) return;
+ setRunning(true);
+ setLines([]);
+ const brief = task.trim();
+ for (let i = 0; i < count; i += 1) {
+ setLine(i, { name: "", tone: "busy", text: t("society.office.mission_opening") });
+ let name = "";
+ try {
+ name = (await openTerminal({ workspace_id: workspaceId, agent: agentName })).name;
+ } catch (err) {
+ setLine(i, { name: "", tone: "error", text: t("society.office.mission_failed").replace("{0}", errorText(err)) });
+ break;
+ }
+ void useWorkspacePanesStore.getState().load();
+ if (!brief) { setLine(i, { name, tone: "ok", text: t("society.office.mission_done_open").replace("{0}", name) }); continue; }
+ setLine(i, { name, tone: "busy", text: t("society.office.mission_waiting").replace("{0}", name) });
+ if (!(await waitLive(workspaceId, name))) {
+ setLine(i, { name, tone: "warn", text: t("society.office.mission_not_started").replace("{0}", name) });
+ continue;
+ }
+ setLine(i, { name, tone: "busy", text: t("society.office.mission_briefing").replace("{0}", name) });
+ try {
+ const result = await promptTerminal(name, brief, { compose: sharpen, workspaceId });
+ setLine(i, result.submitted === true
+ ? { name, tone: "ok", text: t("society.office.mission_done_briefed").replace("{0}", name) }
+ : { name, tone: "warn", text: result.detail || t("society.office.cmd_unconfirmed") });
+ } catch (err) {
+ setLine(i, { name, tone: "error", text: errorText(err) });
+ }
+ }
+ void useWorkspacePanesStore.getState().load();
+ setRunning(false);
+ };
+
+ if (loadError) return <p className="office-hint" role="alert">{loadError}</p>;
+ if (!workspaces || !agents) return <p className="office-hint" role="status">{t("society.office.mission_loading")}</p>;
+ if (workspaces.length === 0) {
+ return (
+ <>
+ <p>{t("society.office.mission_no_workspace")}</p>
+ <button type="button" className="office-action office-action-primary"
+ onClick={() => useEventStore.getState().setActiveSection("agentic-ide")}>{t("society.office.open_ide")}</button>
+ </>
+ );
+ }
+ return (
+ <div className="office-mc-form">
+ <p className="office-mc-intro">{t("society.office.mission_intro")}</p>
+ <label className="office-mc-field">
+ <span>{t("society.office.mission_workspace")}</span>
+ <select value={workspaceId} onChange={(e) => setWorkspaceId(e.target.value)} disabled={running}>
+ {workspaces.map((w) => <option key={w.id} value={w.id}>{w.name}{w.branch ? ` · ${w.branch}` : ""}</option>)}
+ </select>
+ </label>
+ <fieldset className="office-mc-field" disabled={running}>
+ <legend>{t("society.office.mission_agent")}</legend>
+ {agents.length === 0 ? <p className="office-hint">{t("society.office.mission_no_agents")}</p> : (
+ <div className="office-mc-chips">
+ {agents.map((a) => (
+ <button key={a.name} type="button" aria-pressed={agentName === a.name} title={a.description || a.display_name}
+ onClick={() => setAgentName(a.name)}>{a.display_name}</button>
+ ))}
+ </div>
+ )}
+ </fieldset>
+ <fieldset className="office-mc-field" disabled={running}>
+ <legend>{t("society.office.mission_count")}</legend>
+ <div className="office-mc-chips">
+ {Array.from({ length: MAX_LAUNCH }, (_, i) => i + 1).map((n) => (
+ <button key={n} type="button" aria-pressed={count === n} onClick={() => setCount(n)}>{n}</button>
+ ))}
+ </div>
+ </fieldset>
+ <label className="office-mc-field">
+ <span>{t("society.office.mission_task")}</span>
+ <textarea rows={3} value={task} maxLength={8000} disabled={running} placeholder={t("society.office.mission_task_placeholder")}
+ onChange={(e) => setTask(e.target.value)}
+ onKeyDown={(e) => { if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) { e.preventDefault(); void launch(); } }} />
+ </label>
+ <label className="office-cmd-check">
+ <input type="checkbox" checked={sharpen} disabled={running || !task.trim()} onChange={(e) => setSharpen(e.target.checked)} />
+ <span>{t("society.office.cmd_sharpen")}</span>
+ </label>
+ <button type="button" className="office-action office-action-primary office-mc-go" disabled={running || !workspaceId || !agentName}
+ onClick={() => void launch()}>
+ <Rocket aria-hidden />
+ {count === 1 ? t("society.office.mission_start_one") : t("society.office.mission_start_many").replace("{0}", String(count))}
+ </button>
+ {lines.length > 0 && (
+ <ul className="office-mc-log" aria-live="polite">
+ {lines.map((line, i) => <li key={i} data-tone={line.tone}>{line.text}</li>)}
+ </ul>
+ )}
+ </div>
+ );
+}
+
+function FleetTab() {
+ const t = useT();
+ const panes = useWorkspacePanesStore((s) => s.panes);
+ const occupants = useMemo(() => paneOccupants(panes), [panes]);
+ const [picked, setPicked] = useState<Set<string>>(() => new Set());
+ const [message, setMessage] = useState("");
+ const [sending, setSending] = useState(false);
+ const [result, setResult] = useState<{ tone: "ok" | "warn"; text: string } | null>(null);
+ const chosen = occupants.filter((o) => picked.has(o.agent.agentId));
+
+ const toggle = (id: string) => setPicked((prev) => {
+ const next = new Set(prev);
+ if (next.has(id)) next.delete(id); else next.add(id);
+ return next;
+ });
+
+ const broadcast = useCallback(async (kind: "send" | "stop") => {
+ const text = message.trim();
+ if (sending || chosen.length === 0 || (kind === "send" && !text)) return;
+ setSending(true);
+ setResult(null);
+ const targets = kind === "stop" ? chosen.filter((o) => o.dot === "working") : chosen;
+ const outcomes = await Promise.allSettled(targets.map(async (o) => {
+ if (kind === "stop") { await interruptTerminal(o.pane.name, o.pane.workspace_id); return true; }
+ if (o.pane.status !== "live" || !o.pane.accepts_prompts) throw new Error(t("society.office.cmd_not_running"));
+ const res = await promptTerminal(o.pane.name, text, { workspaceId: o.pane.workspace_id });
+ if (res.submitted !== true) throw new Error(res.detail || t("society.office.cmd_unconfirmed"));
+ return true;
+ }));
+ const missed = targets.filter((_, i) => outcomes[i].status === "rejected").map((o) => o.agent.name);
+ const reached = targets.length - missed.length;
+ const summary = t("society.office.fleet_result").replace("{0}", String(reached)).replace("{1}", String(targets.length));
+ setResult({ tone: missed.length ? "warn" : "ok", text: missed.length ? `${summary} ${t("society.office.fleet_result_missed").replace("{0}", missed.join(", "))}` : summary });
+ if (kind === "send" && missed.length === 0) setMessage("");
+ void useWorkspacePanesStore.getState().load();
+ setSending(false);
+ }, [chosen, message, sending, t]);
+
+ if (occupants.length === 0) return <p>{t("society.office.fleet_empty")}</p>;
+ return (
+ <div className="office-mc-form">
+ <p className="office-mc-intro">{t("society.office.fleet_intro")}</p>
+ <div className="office-mc-chips" role="group" aria-label={t("society.office.fleet_pick")}>
+ {(["all", "working", "waiting", "idle", "none"] as const).map((filter) => (
+ <button key={filter} type="button" onClick={() => setPicked(pickFleet(occupants, filter))}>{t(`society.office.fleet_pick_${filter}`)}</button>
+ ))}
+ </div>
+ <ul className="office-mc-fleet">
+ {occupants.map((o) => (
+ <li key={o.agent.agentId}>
+ <label>
+ <input type="checkbox" checked={picked.has(o.agent.agentId)} onChange={() => toggle(o.agent.agentId)} />
+ <i className="office-dot" data-state={o.agent.state} data-dot={o.dot} aria-hidden />
+ <span className="office-mc-fleet-name" title={o.pane.recap || o.pane.last_prompt}>{o.agent.name}</span>
+ <span className="office-mc-fleet-state">{t(`society.office.pane_state_${o.stateKey}`)} · {o.agent.providerLabel}</span>
+ </label>
+ </li>
+ ))}
+ </ul>
+ <textarea className="office-mc-message" rows={3} value={message} maxLength={8000} disabled={sending}
+ placeholder={t("society.office.fleet_placeholder")} aria-label={t("society.office.fleet_placeholder")}
+ onChange={(e) => setMessage(e.target.value)}
+ onKeyDown={(e: KeyboardEvent<HTMLTextAreaElement>) => { if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) { e.preventDefault(); void broadcast("send"); } }} />
+ <div className="office-actions">
+ <button type="button" className="office-action office-action-primary" disabled={sending || chosen.length === 0 || !message.trim()}
+ onClick={() => void broadcast("send")}>
+ <Radio aria-hidden />{t("society.office.fleet_send").replace("{0}", String(chosen.length))}
+ </button>
+ <button type="button" className="office-action" disabled={sending || !chosen.some((o) => o.dot === "working")}
+ onClick={() => void broadcast("stop")}>
+ {t("society.office.fleet_stop").replace("{0}", String(chosen.filter((o) => o.dot === "working").length))}
+ </button>
+ </div>
+ {result && <p className="office-hint office-mc-result" role="status" data-tone={result.tone}>{result.text}</p>}
+ </div>
+ );
+}
+
+export function MissionControlPanel() {
+ const t = useT();
+ const baseId = useId();
+ const [tab, setTab] = useState<Tab>("new");
+ return (
+ <div className="office-mc">
+ <div className="office-mc-tabs" role="tablist" aria-label={t("society.office.cp_mission")}>
+ {TABS.map((id) => (
+ <button key={id} type="button" role="tab" id={`${baseId}-${id}`} aria-selected={tab === id} aria-controls={`${baseId}-${id}-panel`}
+ tabIndex={tab === id ? 0 : -1} onClick={() => setTab(id)}
+ onKeyDown={(e) => {
+ if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
+ e.preventDefault();
+ e.stopPropagation();
+ setTab(tab === "new" ? "fleet" : "new");
+ }}>
+ {t(`society.office.mission_tab_${id}`)}
+ </button>
+ ))}
+ </div>
+ <div role="tabpanel" id={`${baseId}-${tab}-panel`} aria-labelledby={`${baseId}-${tab}`}>
+ {tab === "new" ? <NewAgentsTab /> : <FleetTab />}
+ </div>
+ </div>
+ );
+}
diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeFullMap.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeFullMap.tsx
index 032dd8ed41..aa78196016 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeFullMap.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeFullMap.tsx
@@ -111,6 +111,7 @@ function FullMapDialog({ onClose, layout, agents, selectedId }: Omit<OfficeFullM
lead: t("society.office.cp_lead"),
break: t("society.office.cp_break"),
elevator: t("society.office.cp_elevator"),
+ mission: t("society.office.cp_mission"),
};
const roomLabels: Record<RoomKind, string> = {
lead: t("society.office.room_lead"),
diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeMinimap.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeMinimap.tsx
index da1eecf13b..594a39a1e3 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeMinimap.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeMinimap.tsx
@@ -218,6 +218,7 @@ export function OfficeMinimap({ layout, agents, selectedId, onOpenMap }: OfficeM
lead: t("society.office.cp_lead"),
break: t("society.office.cp_break"),
elevator: t("society.office.cp_elevator"),
+ mission: t("society.office.cp_mission"),
};
const roomLabels: Record<RoomKind, string> = {
lead: t("society.office.room_lead"),
diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficePanels.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficePanels.tsx
index f18243d54a..d739991c82 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/OfficePanels.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficePanels.tsx
@@ -1,7 +1,8 @@
/**
- * DOM panels for what the person selects in the office: an agent (or, on the
- * coding floor, an IDE session), or one of the checkpoints (reception, agent
- * board, team room, wardrobe, lead office, break room, elevator). Every action here uses an existing app path — create dialog,
+ * DOM panels for what the person selects in the office: an agent (an IDE
+ * session on the coding floor has its own PaneCommandPanel), or one of the
+ * checkpoints (reception, agent board, team room, wardrobe, lead office, break
+ * room, elevator, Mission Control). Every action here uses an existing app path — create dialog,
* agent card/chat, chat groups — the office adds no new backend contract.
*/
import { useEffect, useId, useRef, useState } from "react";
@@ -9,13 +10,13 @@ import { useT } from "@/i18n";
import type { SocietyAgent } from "../data";
import type { CheckpointKind, OfficeLayout, Point } from "./officeLayout";
import { player, useOfficeStore, type OfficeFloor } from "./officeStore";
-import type { PaneOccupant } from "./codingFloor";
import { agentPositions } from "./walkerRegistry";
import { AgentTalkPanel, CALL_MS } from "./AgentTalkPanel";
import type { PlayerProfile } from "./playerProfile";
import { WardrobePanel } from "./WardrobePanel";
import { ReceptionPanel } from "./ReceptionPanel";
import { TeamRoomPanel } from "./TeamRoomPanel";
+import { MissionControlPanel } from "./MissionControlPanel";
import { CHECKPOINT_ICON, IconSvg, type CheckpointIcon } from "./CheckpointMarker";
@@ -65,54 +66,6 @@ export function AgentPanel({ agent, actions, onClose }: { agent: SocietyAgent; a
return <AgentTalkPanel agent={agent} actions={actions} onClose={onClose} />;
}
-/** How long ago an epoch-seconds moment was, in the viewer's words ("" when unknown). */
-function sinceLabel(at: number | null, t: (key: string) => string): string {
- if (!at) return "";
- const seconds = Math.max(0, Date.now() / 1000 - at);
- if (seconds < 60) return t("society.office.since_now");
- if (seconds < 3600) return t("society.office.since_minutes").replace("{0}", String(Math.floor(seconds / 60)));
- if (seconds < 86400) return t("society.office.since_hours").replace("{0}", String(Math.floor(seconds / 3600)));
- return t("society.office.since_days").replace("{0}", String(Math.floor(seconds / 86400)));
-}
-
-/**
- * A coding session on the coding floor: what it is doing, where it lives and
- * what it was last asked. It has no chat or team — its home is the IDE pane.
- */
-export function PaneAgentPanel({ occupant, onOpen, onClose }: { occupant: PaneOccupant; onOpen: () => void; onClose: () => void }) {
- const t = useT();
- const store = useOfficeStore();
- const { agent, pane } = occupant;
- const since = sinceLabel(pane.activity_since || null, t);
- const prompt = pane.last_prompt.trim();
- const recap = pane.recap.trim();
- const place = () => agentPositions.get(agent.agentId);
- return (
- <PanelShell title={agent.name} subtitle={pane.display_name || pane.agent} onClose={onClose}>
- <p className="office-panel-status" data-pane-state={occupant.stateKey}>
- <i className="office-dot" data-state={agent.state} data-dot={occupant.dot} aria-hidden />
- {t(`society.office.pane_state_${occupant.stateKey}`)}{since ? <span className="office-hint"> · {since}</span> : null}
- </p>
- <dl className="office-facts">
- <dt>{t("society.office.pane_workspace")}</dt>
- <dd title={pane.folder}>{agent.providerLabel}</dd>
- {recap && recap !== prompt && (<><dt>{t("society.office.pane_recap")}</dt><dd>{recap}</dd></>)}
- {prompt && (<><dt>{t("society.office.pane_prompt")}</dt><dd className="office-facts-quote">{prompt}</dd></>)}
- </dl>
- {!recap && !prompt && <p className="office-note-inline">{t("society.office.pane_unasked")}</p>}
- <div className="office-actions">
- <button type="button" className="office-action office-action-primary" onClick={onOpen}>{t("society.office.pane_open")}</button>
- <button type="button" className="office-action" onClick={() => { const p = place(); if (p) store.focusOn(p); }}>
- {t("society.office.action_focus")}
- </button>
- <button type="button" className="office-action" onClick={() => { const p = place(); if (p) store.requestWalk(p); }}>
- {t("society.office.action_walk")}
- </button>
- </div>
- </PanelShell>
- );
-}
-
function ManagePanel({ agents, actions }: { agents: SocietyAgent[]; actions: OfficeActions }) {
const t = useT();
const store = useOfficeStore();
@@ -206,6 +159,7 @@ export function CheckpointPanel({ id, floor = "agents", agents, layout, sample,
{id === "wardrobe" && <WardrobePanel profile={profile} onProfile={onProfile} agents={agents} sample={sample} />}
{id === "lead" && <LeadPanel agents={agents} actions={actions} />}
{id === "break" && <BreakPanel agents={agents} layout={layout} />}
+ {id === "mission" && <MissionControlPanel />}
</PanelShell>
);
}
diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeProps.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeProps.tsx
index 8a0d37a020..20da7fd5ba 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeProps.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeProps.tsx
@@ -12,6 +12,7 @@ import { memo } from "react";
import { CylinderGeometry, MeshStandardMaterial, SphereGeometry } from "three";
import { canvasMaterial } from "./canvasMaterials";
import { LEAD_RENDERERS } from "./LeadSuite";
+import { MISSION_RENDERERS } from "./MissionConsole";
import { Bookshelf, Box, Couch, MAT, matte, Plant, Rounded, Rug } from "./OfficeFurniture";
import { FURNITURE_SIZE, type Furniture, type FurnitureKind } from "./officeLayout";
import { PROP_COLOURS as P } from "./officePalette";
@@ -619,6 +620,7 @@ export const PROP_RENDERERS: Record<FurnitureKind, (props: { item: Furniture })
},
elevator: () => <Elevator />,
...LEAD_RENDERERS,
+ ...MISSION_RENDERERS,
};
/** One furniture item, placed at (x, 0, z) and turned by `rotationY` (0 = front faces +z). */
diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeStage.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeStage.tsx
index d609bf5ae8..d920bad52e 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeStage.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeStage.tsx
@@ -32,7 +32,8 @@ import { useDprBudget } from "./useDprBudget";
import { knownOnFloor, noteArrivals } from "./officeFloors";
import { atElevator, CALL_PRESS_MS } from "./elevatorCall";
import { loadProfile, playerLook, saveProfile, type PlayerProfile } from "./playerProfile";
-import { AgentPanel, CheckpointPanel, PaneAgentPanel, type OfficeActions } from "./OfficePanels";
+import { AgentPanel, CheckpointPanel, type OfficeActions } from "./OfficePanels";
+import { PaneCommandPanel } from "./PaneCommandPanel";
import type { WalkerContext } from "./OfficeAgents";
import { ownsKeyboard } from "./OfficePlayer";
import { ArcadeCabinet } from "./ArcadeCabinet";
@@ -314,6 +315,7 @@ export function OfficeStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpen
const playerName = profile.name.trim() || t("society.office.you");
const showHintBar = useOfficeSettings((s) => s.showHintBar);
const receptionOpen = selection?.kind === "checkpoint" && selection.id === "create";
+ const missionOpen = selection?.kind === "checkpoint" && selection.id === "mission";
// A full-view office draws no more pixels than a side-panel one would afford.
const dpr = useDprBudget(hostRef);
@@ -373,9 +375,9 @@ export function OfficeStage({ onOpenLedger, onSelectAgent, onCreateAgent, onOpen
{selection?.kind === "arcade" && <ArcadeCabinet onClose={() => select(null)} />}
{selection && selection.kind !== "arcade" && (
- <div className="office-panel-slot" data-wide={receptionOpen || undefined}>
+ <div className="office-panel-slot" data-wide={receptionOpen || missionOpen || undefined}>
{selection.kind === "agent" && selectedAgent && (selectedPane
- ? <PaneAgentPanel occupant={selectedPane} onOpen={() => openPaneSession(selectedPane.pane)} onClose={() => select(null)} />
+ ? <PaneCommandPanel occupant={selectedPane} onOpen={() => openPaneSession(selectedPane.pane)} onClose={() => select(null)} />
: <AgentPanel agent={selectedAgent} actions={actions} onClose={() => select(null)} />)}
{selection.kind === "checkpoint" && (
<CheckpointPanel id={selection.id} floor={floor} agents={active} layout={layout} sample={!coding && (roster.data?.sample ?? false)}
diff --git a/jarvis/ui/web/frontend/src/components/society/office/PaneCommandPanel.tsx b/jarvis/ui/web/frontend/src/components/society/office/PaneCommandPanel.tsx
new file mode 100644
index 0000000000..e85f354863
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/society/office/PaneCommandPanel.tsx
@@ -0,0 +1,267 @@
+/**
+ * A coding session on the coding floor, as a command panel: the live terminal
+ * screen, a box to prompt the agent directly, one-tap orders, the recent
+ * prompts, and the session actions (open, stop, fork, close) next to the map
+ * actions (walk there, call over, show).
+ *
+ * Everything goes through the Agentic IDE's existing routes — the same
+ * `/terminals/{name}/prompt` the spoken path uses — so a prompt sent here is
+ * recorded, receipted and visible in the pane exactly like one typed there.
+ */
+import { useCallback, useEffect, useId, useRef, useState } from "react";
+import { ArrowUp, Footprints, GitFork, Hand, LocateFixed, Maximize2, Square, Trash2 } from "lucide-react";
+import { useT } from "@/i18n";
+import {
+ closeTerminal, fetchPromptHistory, forkTerminal, interruptTerminal, promptTerminal, type PromptHistoryItem,
+} from "@/lib/agenticIdeApi";
+import { fetchPaneScreens } from "@/lib/paneScreensApi";
+import { useWorkspacePanesStore } from "@/store/workspacePanes";
+import type { PaneOccupant } from "./codingFloor";
+import { player, useOfficeStore } from "./officeStore";
+import { agentPositions } from "./walkerRegistry";
+import { CALL_MS } from "./AgentTalkPanel";
+import "./officeTalk.css";
+import "./missionControl.css";
+
+/** The live screen refreshes this often while the panel is open (jittered, AP-33). */
+const SCREEN_MS = 1100;
+const SCREEN_JITTER_MS = 400;
+/** Terminal rows the panel shows: the bottom of the screen, where the agent writes. */
+const SCREEN_ROWS = 12;
+/** Recent prompts offered for re-use. */
+const HISTORY_ITEMS = 4;
+/** A second press within this window confirms closing the session. */
+const CONFIRM_MS = 4000;
+
+/** One-tap orders; the label is the chip, the text is what the agent receives. */
+export const QUICK_ORDERS = ["continue", "status", "tests", "commit"] as const;
+
+/** The bottom `rows` non-empty-trailing rows of a screen. Pure. */
+export function screenTail(lines: readonly string[], rows: number): string[] {
+ let end = lines.length;
+ while (end > 0 && !lines[end - 1].trim()) end -= 1;
+ return lines.slice(Math.max(0, end - rows), end);
+}
+
+function sinceLabel(at: number | null, t: (key: string) => string): string {
+ if (!at) return "";
+ const seconds = Math.max(0, Date.now() / 1000 - at);
+ if (seconds < 60) return t("society.office.since_now");
+ if (seconds < 3600) return t("society.office.since_minutes").replace("{0}", String(Math.floor(seconds / 60)));
+ if (seconds < 86400) return t("society.office.since_hours").replace("{0}", String(Math.floor(seconds / 3600)));
+ return t("society.office.since_days").replace("{0}", String(Math.floor(seconds / 86400)));
+}
+
+function useLiveScreen(workspaceId: string, key: string): string[] | null {
+ const [rows, setRows] = useState<string[] | null>(null);
+ useEffect(() => {
+ let alive = true;
+ let timer: ReturnType<typeof setTimeout>;
+ let failing = false;
+ setRows(null);
+ const tick = async () => {
+ try {
+ const [screen] = await fetchPaneScreens([{ workspaceId, key }]);
+ if (alive) setRows(screen ? screenTail(screen.lines, SCREEN_ROWS) : []);
+ failing = false;
+ } catch (err) {
+ // The last good screen stays up; only the first failure of a streak is worth a line.
+ if (!failing) console.warn("Pane screen unavailable", err);
+ failing = true;
+ }
+ if (alive) timer = setTimeout(() => void tick(), SCREEN_MS + Math.random() * SCREEN_JITTER_MS);
+ };
+ void tick();
+ return () => { alive = false; clearTimeout(timer); };
+ }, [workspaceId, key]);
+ return rows;
+}
+
+type Note = { tone: "ok" | "error"; text: string } | null;
+
+export function PaneCommandPanel({ occupant, onOpen, onClose }: { occupant: PaneOccupant; onOpen: () => void; onClose: () => void }) {
+ const t = useT();
+ const headingId = useId();
+ const office = useOfficeStore();
+ const { agent, pane } = occupant;
+ const panel = useRef<HTMLElement>(null);
+ const input = useRef<HTMLTextAreaElement>(null);
+ const [value, setValue] = useState("");
+ const [sharpen, setSharpen] = useState(false);
+ const [sending, setSending] = useState(false);
+ const [note, setNote] = useState<Note>(null);
+ const [confirmClose, setConfirmClose] = useState(false);
+ const [history, setHistory] = useState<PromptHistoryItem[]>([]);
+ const screen = useLiveScreen(pane.workspace_id, pane.key);
+ const where = agentPositions.get(agent.agentId);
+ const live = pane.status === "live";
+ const canPrompt = live && pane.accepts_prompts;
+ const working = occupant.dot === "working";
+ const since = sinceLabel(pane.activity_since || null, t);
+ const recap = pane.recap.trim();
+
+ useEffect(() => { panel.current?.focus({ preventScroll: true }); setValue(""); setNote(null); setConfirmClose(false); }, [agent.agentId]);
+ useEffect(() => {
+ if (!confirmClose) return;
+ const timer = setTimeout(() => setConfirmClose(false), CONFIRM_MS);
+ return () => clearTimeout(timer);
+ }, [confirmClose]);
+
+ const loadHistory = useCallback(() => {
+ fetchPromptHistory(pane.name, pane.workspace_id)
+ .then((res) => setHistory(res.items.slice(0, HISTORY_ITEMS)))
+ .catch((err) => console.warn("Prompt history unavailable", err));
+ }, [pane.name, pane.workspace_id]);
+ useEffect(() => { loadHistory(); }, [loadHistory]);
+
+ const refresh = () => { void useWorkspacePanesStore.getState().load(); };
+
+ const send = useCallback(async (text: string) => {
+ const content = text.trim();
+ if (!content || !canPrompt || sending) return;
+ setSending(true);
+ setNote(null);
+ try {
+ const result = await promptTerminal(pane.name, content, { compose: sharpen, workspaceId: pane.workspace_id });
+ setValue("");
+ setNote(result.submitted === true
+ ? { tone: "ok", text: t("society.office.cmd_sent").replace("{0}", agent.name) }
+ : { tone: "error", text: result.detail || t("society.office.cmd_unconfirmed") });
+ loadHistory();
+ refresh();
+ } catch (err) {
+ setNote({ tone: "error", text: err instanceof Error ? err.message : String(err) });
+ } finally {
+ setSending(false);
+ }
+ }, [agent.name, canPrompt, loadHistory, pane.name, pane.workspace_id, sending, sharpen, t]);
+
+ /** Run one session action; it answers with the line the panel shows once it is done. */
+ const run = async (action: () => Promise<string>) => {
+ setNote(null);
+ try {
+ setNote({ tone: "ok", text: await action() });
+ refresh();
+ } catch (err) {
+ setNote({ tone: "error", text: err instanceof Error ? err.message : String(err) });
+ }
+ };
+
+ const stop = () => void run(async () => {
+ await interruptTerminal(pane.name, pane.workspace_id);
+ return t("society.office.cmd_stopped").replace("{0}", agent.name);
+ });
+ const fork = () => void run(async () => {
+ const { terminal } = await forkTerminal(pane.name, { workspaceId: pane.workspace_id, worktree: false });
+ return t("society.office.cmd_forked").replace("{0}", terminal.name);
+ });
+ const close = () => {
+ if (!confirmClose) { setConfirmClose(true); return; }
+ setConfirmClose(false);
+ void run(async () => {
+ await closeTerminal(pane.name, pane.workspace_id);
+ return t("society.office.cmd_closed").replace("{0}", agent.name);
+ });
+ };
+
+ const status = !pane.accepts_prompts
+ ? t("society.office.cmd_no_prompts")
+ : !live ? t("society.office.cmd_not_running") : t("society.office.cmd_hint");
+
+ return (
+ <aside ref={panel} className="office-card office-panel office-talk office-cmd" data-office-ui aria-labelledby={headingId} tabIndex={-1}>
+ <header className="office-talk-head">
+ <span className="office-talk-avatar" style={{ background: agent.palette.primary }} aria-hidden>
+ {agent.name.slice(0, 1).toUpperCase()}
+ </span>
+ <div className="office-talk-who">
+ <h2 id={headingId}>{agent.name}</h2>
+ <span>
+ <i className="office-dot" data-state={agent.state} data-dot={occupant.dot} aria-hidden />
+ {t(`society.office.pane_state_${occupant.stateKey}`)}{since ? ` · ${since}` : ""} · {pane.display_name || pane.agent} · {agent.providerLabel}
+ </span>
+ </div>
+ <button type="button" className="office-icon-button" onClick={onClose} aria-label={t("society.office.close")}>×</button>
+ </header>
+
+ {recap && <p className="office-cmd-topic" title={recap}><strong>{t("society.office.pane_recap")}</strong> {recap}</p>}
+
+ <pre className="office-cmd-screen" aria-label={t("society.office.cmd_screen").replace("{0}", agent.name)} aria-live="off">
+ {screen === null ? t("society.office.cmd_screen_loading") : screen.length === 0 ? t("society.office.cmd_screen_empty") : screen.join("\n")}
+ </pre>
+
+ <div className="office-cmd-quick" role="group" aria-label={t("society.office.cmd_quick")}>
+ {QUICK_ORDERS.map((order) => (
+ <button key={order} type="button" disabled={!canPrompt || sending} title={t(`society.office.cmd_order_${order}_text`)}
+ onClick={() => void send(t(`society.office.cmd_order_${order}_text`))}>
+ {t(`society.office.cmd_order_${order}`)}
+ </button>
+ ))}
+ </div>
+
+ <div className="office-talk-composer">
+ <textarea ref={input} rows={1} value={value} maxLength={8000} disabled={!canPrompt}
+ placeholder={t("society.office.cmd_placeholder").replace("{0}", agent.name)}
+ aria-label={t("society.office.cmd_placeholder").replace("{0}", agent.name)}
+ onChange={(e) => setValue(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); void send(value); }
+ // Escape leaves the box so the arrow keys walk again; a second Escape closes the panel.
+ else if (e.key === "Escape") { e.preventDefault(); e.stopPropagation(); panel.current?.focus({ preventScroll: true }); }
+ }} />
+ {working && !value.trim()
+ ? <button type="button" className="office-talk-send" data-stop onClick={stop}
+ aria-label={t("society.office.cmd_stop")} title={t("society.office.cmd_stop")}><Square aria-hidden /></button>
+ : <button type="button" className="office-talk-send" disabled={!canPrompt || sending || !value.trim()} onClick={() => void send(value)}
+ aria-label={t("society.office.cmd_send")} title={t("society.office.cmd_send")}><ArrowUp aria-hidden /></button>}
+ </div>
+ <div className="office-cmd-row">
+ <label className="office-cmd-check">
+ <input type="checkbox" checked={sharpen} onChange={(e) => setSharpen(e.target.checked)} />
+ <span>{t("society.office.cmd_sharpen")}</span>
+ </label>
+ <span className="office-talk-status" role="status" data-tone={note?.tone}>{sending ? t("society.office.cmd_sending") : note?.text ?? status}</span>
+ </div>
+
+ {history.length > 0 && (
+ <details className="office-cmd-history">
+ <summary>{t("society.office.cmd_history").replace("{0}", String(history.length))}</summary>
+ <ul>
+ {history.map((item) => (
+ <li key={item.id}>
+ <button type="button" title={t("society.office.cmd_reuse")} onClick={() => { setValue(item.text); input.current?.focus(); }}>
+ {item.text}
+ </button>
+ </li>
+ ))}
+ </ul>
+ </details>
+ )}
+
+ <div className="office-talk-tools office-cmd-tools" role="toolbar" aria-label={t("society.office.talk_tools")}>
+ <button type="button" onClick={onOpen} title={t("society.office.pane_open")}>
+ <Maximize2 aria-hidden /><span>{t("society.office.tool_open")}</span>
+ </button>
+ <button type="button" disabled={!live || !working} onClick={stop} title={t("society.office.cmd_stop")}>
+ <Square aria-hidden /><span>{t("society.office.tool_stop")}</span>
+ </button>
+ <button type="button" disabled={!live} onClick={fork} title={t("society.office.cmd_fork")}>
+ <GitFork aria-hidden /><span>{t("society.office.tool_fork")}</span>
+ </button>
+ <button type="button" disabled={!where} onClick={() => where && office.requestWalk(where)} title={t("society.office.action_walk")}>
+ <Footprints aria-hidden /><span>{t("society.office.tool_walk")}</span>
+ </button>
+ <button type="button" onClick={() => office.summon([agent.agentId], { x: player.x, z: player.z }, CALL_MS)} title={t("society.office.action_call")}>
+ <Hand aria-hidden /><span>{t("society.office.tool_call")}</span>
+ </button>
+ <button type="button" disabled={!where} onClick={() => where && office.focusOn(where)} title={t("society.office.action_focus")}>
+ <LocateFixed aria-hidden /><span>{t("society.office.tool_focus")}</span>
+ </button>
+ <button type="button" data-danger aria-pressed={confirmClose} onClick={close}
+ title={t(confirmClose ? "society.office.cmd_close_confirm" : "society.office.cmd_close")}>
+ <Trash2 aria-hidden /><span>{t(confirmClose ? "society.office.tool_close_confirm" : "society.office.tool_close")}</span>
+ </button>
+ </div>
+ </aside>
+ );
+}
diff --git a/jarvis/ui/web/frontend/src/components/society/office/minimap.ts b/jarvis/ui/web/frontend/src/components/society/office/minimap.ts
index 4f0d3da8f7..60cb56f047 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/minimap.ts
+++ b/jarvis/ui/web/frontend/src/components/society/office/minimap.ts
@@ -314,7 +314,7 @@ const FURNITURE_PAINT: Partial<Record<FurnitureKind, string>> = {
kiosk: "#3a3f4b", lockers: "#5fa8a0", mirror: "#d6ecf8", coffeeBar: "#8a6240", waterCooler: "#6fb7ea", arcade: "#6a58b0",
beanbag: "#e27d60", bookshelf: "#8a6240", plant: MAP_PAINT.plant, rug: MAP_PAINT.rug, elevator: "#c9ced6",
leadWall: "#3a2416", executiveRug: "#26335a", guestChair: "#a9683c", chesterfield: "#7a2c22", loungeTable: "#d8ae52",
- executiveBar: "#5b3a25", globe: "#5f8f96", floorLamp: "#d8ae52",
+ executiveBar: "#5b3a25", globe: "#5f8f96", floorLamp: "#d8ae52", missionConsole: "#2b3446",
};
export const STATE_RING: Record<MinimapAgentState, string> = {
@@ -322,8 +322,8 @@ export const STATE_RING: Record<MinimapAgentState, string> = {
};
/** Checkpoint icon per checkpoint kind; the same pictures as the 3D tokens (CheckpointMarker). */
-export const CHECKPOINT_ICON_KEYS: Record<CheckpointKind, "plus" | "list" | "team" | "shirt" | "star" | "coffee" | "elevator"> = {
- create: "plus", manage: "list", team: "team", wardrobe: "shirt", lead: "star", break: "coffee", elevator: "elevator",
+export const CHECKPOINT_ICON_KEYS: Record<CheckpointKind, "plus" | "list" | "team" | "shirt" | "star" | "coffee" | "elevator" | "target"> = {
+ create: "plus", manage: "list", team: "team", wardrobe: "shirt", lead: "star", break: "coffee", elevator: "elevator", mission: "target",
};
/** Stroke-only icons in a 24 × 24 box; kept in sync with CheckpointMarker's paths. */
@@ -335,6 +335,7 @@ const ICON_PATHS: Record<(typeof CHECKPOINT_ICON_KEYS)[CheckpointKind], string>
star: "M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z",
coffee: "M4 9h12v5a5 5 0 0 1-5 5H9a5 5 0 0 1-5-5V9zM16 10h1.5a2.5 2.5 0 0 1 0 5H16M8 3.5c0 1 1 1 1 2M12 3.5c0 1 1 1 1 2",
elevator: "M5 3h14v18H5zM9 10l3-3 3 3M9 14l3 3 3-3",
+ target: "M12 3a9 9 0 1 1 0 18a9 9 0 1 1 0-18zM12 8a4 4 0 1 1 0 8a4 4 0 1 1 0-8zM12 1v4M12 19v4M1 12h4M19 12h4",
};
// ------------------------------------------------------------------ drawing
diff --git a/jarvis/ui/web/frontend/src/components/society/office/missionControl.css b/jarvis/ui/web/frontend/src/components/society/office/missionControl.css
new file mode 100644
index 0000000000..4758fcfb63
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/society/office/missionControl.css
@@ -0,0 +1,57 @@
+/* Coding floor command surfaces: the session command panel and Mission Control.
+ Theme tokens only, so both read in light and dark mode. */
+
+/* ---- session command panel -------------------------------------------- */
+.office-cmd-topic { margin:8px 12px 0; font-size:12px; line-height:1.4; color:hsl(var(--muted-foreground)); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
+.office-cmd-topic strong { color:hsl(var(--foreground)); font-weight:600; margin-right:4px; }
+.office-cmd-screen { margin:8px 10px 0; padding:8px 10px; min-height:72px; max-height:176px; overflow:auto; border-radius:10px; border:1px solid hsl(var(--border)); background:hsl(var(--muted)); color:hsl(var(--foreground)); font:11px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space:pre; text-shadow:none; }
+.office-cmd-quick { display:flex; flex-wrap:wrap; gap:5px; margin:8px 10px; }
+.office-cmd-quick button, .office-mc-chips button { padding:4px 10px; border:1px solid hsl(var(--border)); border-radius:999px; background:hsl(var(--background)); color:hsl(var(--foreground)); font-size:11px; font-weight:600; cursor:pointer; }
+.office-cmd-quick button:hover:not(:disabled), .office-mc-chips button:hover:not(:disabled) { background:hsl(var(--secondary)); }
+.office-cmd-quick button:disabled, .office-mc-chips button:disabled { opacity:.45; cursor:not-allowed; }
+.office-mc-chips button[aria-pressed="true"] { border-color:hsl(var(--primary)); background:hsl(var(--primary)); color:hsl(var(--primary-foreground)); text-shadow:none; }
+.office-cmd-quick button:focus-visible, .office-mc-chips button:focus-visible, .office-mc-tabs button:focus-visible { outline:2px solid hsl(var(--ring)); outline-offset:2px; }
+.office-cmd-row { display:flex; align-items:center; gap:8px; margin:5px 12px 0; min-width:0; }
+.office-cmd-row .office-talk-status { flex:1; margin:0; text-align:right; }
+.office-talk-status[data-tone="ok"] { color:hsl(var(--success)); }
+.office-talk-status[data-tone="error"] { color:hsl(var(--destructive)); white-space:normal; }
+.office-cmd-check { display:inline-flex; align-items:center; gap:6px; flex:none; font-size:11px; color:hsl(var(--muted-foreground)); cursor:pointer; }
+.office-cmd-check input { accent-color:hsl(var(--primary)); }
+.office-cmd-history { margin:8px 12px 0; font-size:12px; }
+.office-cmd-history summary { cursor:pointer; color:hsl(var(--muted-foreground)); font-weight:600; }
+.office-cmd-history ul { list-style:none; margin:6px 0 0; padding:0; display:flex; flex-direction:column; gap:4px; }
+.office-cmd-history button { width:100%; padding:5px 8px; border:0; border-radius:8px; background:hsl(var(--secondary)); color:hsl(var(--foreground)); font:inherit; font-size:11px; text-align:left; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
+.office-cmd-history button:hover { background:hsl(var(--secondary) / .7); }
+.office-cmd-tools { grid-template-columns:repeat(7, 1fr); }
+.office-cmd-tools button[data-danger]:hover:not(:disabled), .office-cmd-tools button[data-danger][aria-pressed="true"] { color:hsl(var(--destructive)); background:hsl(var(--destructive) / .1); }
+
+/* ---- Mission Control -------------------------------------------------- */
+.office-mc { display:flex; flex-direction:column; gap:10px; }
+.office-mc-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:3px; border-radius:10px; background:hsl(var(--secondary)); }
+.office-mc-tabs button { padding:6px 8px; border:0; border-radius:8px; background:none; color:hsl(var(--muted-foreground)); font-size:12px; font-weight:600; cursor:pointer; }
+.office-mc-tabs button[aria-selected="true"] { background:hsl(var(--background)); color:hsl(var(--foreground)); box-shadow:0 1px 3px rgb(0 0 0 / .12); }
+.office-mc-form { display:flex; flex-direction:column; gap:10px; }
+.office-mc-intro { margin:0; font-size:12px; line-height:1.45; color:hsl(var(--muted-foreground)); }
+.office-mc-field { display:flex; flex-direction:column; gap:5px; margin:0; padding:0; border:0; min-width:0; }
+.office-mc-field > span, .office-mc-field > legend { padding:0; font-size:11px; font-weight:700; color:hsl(var(--muted-foreground)); text-transform:uppercase; letter-spacing:.04em; }
+.office-mc-field select, .office-mc-field textarea, .office-mc-message { width:100%; padding:7px 9px; border:1px solid hsl(var(--border)); border-radius:9px; background:hsl(var(--background)); color:hsl(var(--foreground)); font:inherit; font-size:12px; }
+.office-mc-field textarea, .office-mc-message { resize:vertical; min-height:60px; }
+.office-mc-field select:focus-visible, .office-mc-field textarea:focus-visible, .office-mc-message:focus-visible { outline:2px solid hsl(var(--ring)); outline-offset:1px; }
+.office-mc-chips { display:flex; flex-wrap:wrap; gap:5px; }
+.office-mc-go { display:inline-flex; align-items:center; justify-content:center; gap:6px; }
+.office-mc-go svg, .office-mc .office-action svg { width:15px; height:15px; }
+.office-mc .office-action { display:inline-flex; align-items:center; gap:6px; }
+.office-mc-log { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; font-size:12px; }
+.office-mc-log li { padding:5px 8px; border-radius:8px; background:hsl(var(--secondary)); color:hsl(var(--foreground)); }
+.office-mc-log li[data-tone="busy"] { color:hsl(var(--muted-foreground)); font-style:italic; }
+.office-mc-log li[data-tone="ok"] { background:hsl(var(--success) / .14); }
+.office-mc-log li[data-tone="warn"] { background:hsl(var(--warning) / .16); }
+.office-mc-log li[data-tone="error"] { background:hsl(var(--destructive) / .12); color:hsl(var(--destructive)); }
+.office-mc-fleet { list-style:none; margin:0; padding:0; max-height:200px; overflow:auto; display:flex; flex-direction:column; gap:2px; }
+.office-mc-fleet label { display:flex; align-items:center; gap:7px; padding:4px 6px; border-radius:8px; cursor:pointer; font-size:12px; min-width:0; }
+.office-mc-fleet label:hover { background:hsl(var(--secondary)); }
+.office-mc-fleet input { accent-color:hsl(var(--primary)); flex:none; }
+.office-mc-fleet-name { font-weight:600; flex:none; max-width:45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
+.office-mc-fleet-state { flex:1; min-width:0; color:hsl(var(--muted-foreground)); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
+.office-mc-result[data-tone="ok"] { color:hsl(var(--success)); }
+.office-mc-result[data-tone="warn"] { color:hsl(var(--foreground)); }
diff --git a/jarvis/ui/web/frontend/src/components/society/office/missionControl.test.ts b/jarvis/ui/web/frontend/src/components/society/office/missionControl.test.ts
new file mode 100644
index 0000000000..5626315ada
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/society/office/missionControl.test.ts
@@ -0,0 +1,39 @@
+import { describe, expect, it } from "vitest";
+import type { AgentStatus } from "@/lib/agenticIdeApi";
+import type { PaneOccupant } from "./codingFloor";
+import { launchableAgents, pickFleet } from "./MissionControlPanel";
+import { QUICK_ORDERS, screenTail } from "./PaneCommandPanel";
+
+const cli = (name: string, extra: Partial<AgentStatus> = {}): AgentStatus => ({
+ name, display_name: name, installed: true, version: null, install_command: null, ...extra,
+} as AgentStatus);
+
+const occupant = (id: string, state: PaneOccupant["agent"]["state"]): PaneOccupant =>
+ ({ agent: { agentId: id, state } } as PaneOccupant);
+
+describe("pane command panel", () => {
+ it("shows the bottom of the terminal, without the blank rows under the cursor", () => {
+ expect(screenTail(["a", "b", "c", "", " "], 2)).toEqual(["b", "c"]);
+ expect(screenTail(["", ""], 5)).toEqual([]);
+ expect(screenTail(["one"], 12)).toEqual(["one"]);
+ });
+
+ it("offers the four one-tap orders", () => {
+ expect(QUICK_ORDERS).toEqual(["continue", "status", "tests", "commit"]);
+ });
+});
+
+describe("mission control", () => {
+ it("launches only installed coding CLIs, never a plain shell", () => {
+ const list = [cli("claude"), cli("codex", { installed: false }), cli("shell", { kind: "shell" }), cli("gemini", { kind: "cli" })];
+ expect(launchableAgents(list).map((a) => a.name)).toEqual(["claude", "gemini"]);
+ });
+
+ it("picks the fleet by run state", () => {
+ const floor = [occupant("a", "working"), occupant("b", "waiting"), occupant("c", "idle"), occupant("d", "working")];
+ expect([...pickFleet(floor, "all")]).toEqual(["a", "b", "c", "d"]);
+ expect([...pickFleet(floor, "working")]).toEqual(["a", "d"]);
+ expect([...pickFleet(floor, "waiting")]).toEqual(["b"]);
+ expect([...pickFleet(floor, "none")]).toEqual([]);
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.test.ts b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.test.ts
index ac345e7850..41ec108505 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.test.ts
+++ b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.test.ts
@@ -120,15 +120,33 @@ describe("office layout", () => {
expect(layout.variant).toBe("coding");
expect(layout.rooms.map((r) => r.kind)).toEqual(["focus", "team", "server", "reception", "break"]);
expect(layout.lead.desks).toEqual([]);
- expect(layout.checkpoints.map((c) => c.id)).toEqual(["elevator", "break"]);
+ expect(layout.checkpoints.map((c) => c.id)).toEqual(["mission", "elevator", "break"]);
expect(layout.departments.map((d) => d.label)).toEqual(["Personal Jarvis", "Website", "", ""]);
expect(layout.furniture.some((f) => f.room === "lead" || f.room === "wardrobe")).toBe(false);
expect(layout.spots.some((s) => s.room === "focus")).toBe(true);
expect(layout.spots.some((s) => s.room === "server")).toBe(true);
- // Same frame as the office below, so the elevator lands in the same place.
+ // The coding floor is wider (Mission Control's aisle), but the lobby is the
+ // same: the elevator stands at the same spot relative to the west edge.
const below = buildOfficeLayout(roster);
- expect(layout.spawn).toEqual(below.spawn);
- expect(layout.checkpoints.find((c) => c.id === "elevator")).toEqual(below.checkpoints.find((c) => c.id === "elevator"));
+ const lift = (l: typeof layout) => l.checkpoints.find((c) => c.id === "elevator")!;
+ expect(lift(layout).z).toBe(lift(below).z);
+ expect(lift(layout).x - layout.bounds.minX).toBeCloseTo(lift(below).x - below.bounds.minX);
+ expect(layout.spawn.x - layout.bounds.minX).toBeCloseTo(below.spawn.x - below.bounds.minX);
+ });
+
+ it("puts Mission Control in the middle of the coding floor, clear of every department", () => {
+ const layout = buildOfficeLayout([agent("p1", "Personal Jarvis"), agent("p2", "Website")], { variant: "coding" });
+ const hub = layout.furniture.find((f) => f.kind === "missionConsole")!;
+ const stop = layout.checkpoints.find((c) => c.id === "mission")!;
+ expect(hub.x).toBe(0);
+ const depts = layout.departments;
+ expect(hub.z).toBeCloseTo((Math.min(...depts.map((d) => d.minZ)) + Math.max(...depts.map((d) => d.maxZ))) / 2);
+ const box = footprint(hub);
+ for (const dept of depts) expect(box.maxX < dept.minX || box.minX > dept.maxX).toBe(true);
+ // The stop is in front of the console (south, towards the camera), outside its footprint.
+ expect(stop.x).toBe(0);
+ expect(stop.z - stop.radius).toBeGreaterThan(box.maxZ - 0.5);
+ expect(buildOfficeLayout([agent("a1", "codex")]).furniture.some((f) => f.kind === "missionConsole")).toBe(false);
});
it("counts states", () => {
diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts
index 7c8db368ab..25666b5bb3 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts
+++ b/jarvis/ui/web/frontend/src/components/society/office/officeLayout.ts
@@ -16,6 +16,9 @@
* holds a quiet focus zone · the team room · a server room instead of the lead
* office and the wardrobe. It has no lead desks and only the elevator and
* break-room checkpoints — nothing there creates or dresses society agents.
+ * Its centre aisle is wider and holds Mission Control: a round console hub
+ * between the two department columns where new coding agents are started and
+ * the whole fleet can be briefed.
*/
import type { AgentRunState, AgentTier } from "../data";
@@ -72,11 +75,14 @@ export interface Room extends Rect {
export interface WallSegment { x1: number; z1: number; x2: number; z2: number; room: RoomKind }
-/** "elevator" rides between the floors and stands in front of the lobby elevator on both of them. */
-export type CheckpointKind = "create" | "manage" | "team" | "wardrobe" | "lead" | "break" | "elevator";
+/**
+ * "elevator" rides between the floors and stands in front of the lobby elevator on both of them.
+ * "mission" is Mission Control, the coding floor's centre hub.
+ */
+export type CheckpointKind = "create" | "manage" | "team" | "wardrobe" | "lead" | "break" | "elevator" | "mission";
-/** A place the person can walk to (or click from afar) to act. */
-export interface Checkpoint extends Point { id: CheckpointKind; room: RoomKind; /** Walk-in radius in metres. */ radius: number }
+/** A place the person can walk to (or click from afar) to act. "floor" = the open office, outside every room. */
+export interface Checkpoint extends Point { id: CheckpointKind; room: RoomKind | "floor"; /** Walk-in radius in metres. */ radius: number }
export type FurnitureKind =
| "meetingTable" | "teamBoard" | "receptionDesk" | "kiosk" | "lockers" | "mirror"
@@ -84,7 +90,9 @@ export type FurnitureKind =
| "bookshelf" | "plant" | "rug" | "elevator"
// Lead office: the executive suite.
| "leadWall" | "executiveRug" | "guestChair" | "chesterfield" | "loungeTable" | "executiveBar" | "globe" | "floorLamp"
- | "dogBed";
+ | "dogBed"
+ // Coding floor: Mission Control's console ring.
+ | "missionConsole";
/**
* Footprint (x-extent × z-extent before rotation) and height of each piece.
@@ -118,6 +126,7 @@ export const FURNITURE_SIZE: Record<FurnitureKind, { w: number; d: number; h: nu
globe: { w: 0.92, d: 0.72, h: 1.2, solid: true },
floorLamp: { w: 0.46, d: 0.46, h: 1.8, solid: true },
dogBed: { w: 0.9, d: 0.72, h: 0.45, solid: true },
+ missionConsole: { w: 3.2, d: 3.2, h: 2.2, solid: true },
};
export interface Furniture extends Point {
@@ -176,6 +185,8 @@ const DEPT_MARGIN_X = 1.1;
const DEPT_HEADER_Z = 1.8;
const DEPT_FOOTER_Z = 0.8;
const AISLE = 3.2;
+/** The coding floor's centre aisle: wide enough for Mission Control with a walkway on both sides. */
+export const MISSION_AISLE = 8;
const EDGE = 1.6;
const NORTH_DEPTH = 7;
const SOUTH_DEPTH = 8;
@@ -339,7 +350,8 @@ export function buildOfficeLayout(agents: readonly OfficeAgentInput[], options:
if (groups.length === 1 && groups[0].members.length === 0) groups.length = 0;
while (groups.length < MIN_DEPARTMENTS) groups.push({ label: "", members: [] });
- const floorWidth = COLUMNS * DEPT_WIDTH + (COLUMNS - 1) * AISLE;
+ const centreAisle = coding ? MISSION_AISLE : AISLE;
+ const floorWidth = COLUMNS * DEPT_WIDTH + (COLUMNS - 1) * centreAisle;
const minX = -floorWidth / 2;
const maxX = floorWidth / 2;
const rows = Math.ceil(groups.length / COLUMNS);
@@ -374,7 +386,7 @@ export function buildOfficeLayout(agents: readonly OfficeAgentInput[], options:
const group = groups[index];
if (!group) continue;
const benches = benchCount(group.members.length);
- const dMinX = minX + col * (DEPT_WIDTH + AISLE);
+ const dMinX = minX + col * (DEPT_WIDTH + centreAisle);
const id = `dept-${index}`;
departments.push({
id, label: group.label, tint: index,
@@ -384,6 +396,9 @@ export function buildOfficeLayout(agents: readonly OfficeAgentInput[], options:
}
z += rowDepths[row] + AISLE;
}
+ // Mission Control sits in the middle of the department block, on the centre aisle.
+ const departmentsMinZ = northMaxZ + AISLE;
+ const missionZ = (departmentsMinZ + (z - AISLE)) / 2;
// South strip: an open reception/lobby in the west, a walled break room in the east.
const southMinZ = bottomZ - SOUTH_DEPTH;
@@ -482,6 +497,11 @@ export function buildOfficeLayout(agents: readonly OfficeAgentInput[], options:
{ id: "beanbag-b", kind: "beanbag", x: bx0 + 8.4, z: bz0 + 6.3, rotationY: 0, room: "break" },
{ id: "break-shelf", kind: "bookshelf", x: bx0 + 2.2, z: bz0 + 0.3, rotationY: 0, room: "break" },
{ id: "break-plant", kind: "plant", x: bx0 + 0.6, z: bottomZ - 0.6, rotationY: 0, room: "break" },
+ ...(coding ? [
+ // Mission Control: the console ring on a round-cornered rug, midway down the centre aisle.
+ { id: "mission-rug", kind: "rug", x: 0, z: missionZ, rotationY: 0, room: "floor", size: { w: 5.4, d: 5.4 } },
+ { id: "mission-console", kind: "missionConsole", x: 0, z: missionZ, rotationY: 0, room: "floor" },
+ ] satisfies Furniture[] : []),
];
for (const dept of departments) {
furniture.push({ id: `${dept.id}-plant-w`, kind: "plant", x: dept.minX + 0.45, z: dept.maxZ - 0.45, rotationY: 0, room: "floor" });
@@ -542,7 +562,9 @@ export function buildOfficeLayout(agents: readonly OfficeAgentInput[], options:
// The elevator's doors face east into the lobby; its checkpoint is the floor in front of them.
const elevatorStop: Checkpoint = { id: "elevator", room: "reception", x: elevator.x + 0.95, z: elevator.z, radius: 1.0 };
const breakStop: Checkpoint = { id: "break", room: "break", x: bx0 + 5.6, z: bz0 + 2.6, radius: 1.8 };
- const checkpoints: Checkpoint[] = coding ? [elevatorStop, breakStop] : [
+ // Mission Control's stop is the console's south side, the side that faces the camera.
+ const missionStop: Checkpoint = { id: "mission", room: "floor", x: 0, z: missionZ + FURNITURE_SIZE.missionConsole.d / 2 + 0.9, radius: 1.2 };
+ const checkpoints: Checkpoint[] = coding ? [missionStop, elevatorStop, breakStop] : [
{ id: "create", room: "reception", x: reception.x, z: reception.z + 1.7, radius: 1.2 },
{ id: "manage", room: "reception", x: kiosk.x, z: kiosk.z + 1.4, radius: 1.1 },
{ id: "team", room: "team", x: tcx + 2.2, z: northMaxZ - 1.05, radius: 0.95 },
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/de.json b/jarvis/ui/web/frontend/src/i18n/locales/society/de.json
index 7f6f2c9a4f..92db88a3e6 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/society/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/de.json
@@ -891,6 +891,76 @@
"pane_prompt": "Letzter Prompt",
"pane_unasked": "Noch nichts gefragt.",
"pane_open": "Session öffnen",
+ "cp_mission": "Mission Control",
+ "cp_mission_hint": "Neue Coding-Agents starten und die ganze Etage briefen",
+ "tool_open": "Öffnen",
+ "tool_stop": "Stopp",
+ "tool_fork": "Kopie",
+ "tool_close": "Schließen",
+ "tool_close_confirm": "Sicher?",
+ "cmd_sent": "An {0} gesendet.",
+ "cmd_unconfirmed": "Eingetippt, aber der Agent hat es noch nicht bestätigt.",
+ "cmd_stopped": "{0} gestoppt.",
+ "cmd_forked": "Kopie gestartet als {0}.",
+ "cmd_closed": "{0} geschlossen.",
+ "cmd_no_prompts": "Das ist ein einfaches Terminal; es nimmt keine Aufträge an.",
+ "cmd_not_running": "Diese Session läuft gerade nicht.",
+ "cmd_hint": "Enter sendet · Shift+Enter neue Zeile",
+ "cmd_screen": "Live-Bildschirm von {0}",
+ "cmd_screen_loading": "Bildschirm wird geladen…",
+ "cmd_screen_empty": "Noch nichts auf dem Bildschirm.",
+ "cmd_quick": "Schnellaufträge",
+ "cmd_order_continue": "Weiter",
+ "cmd_order_continue_text": "Mach weiter.",
+ "cmd_order_status": "Stand?",
+ "cmd_order_status_text": "Gib mir einen kurzen Stand: Was ist fertig, was fehlt noch, und blockiert dich etwas?",
+ "cmd_order_tests": "Tests",
+ "cmd_order_tests_text": "Führe die relevanten Tests aus und behebe, was fehlschlägt.",
+ "cmd_order_commit": "Commit",
+ "cmd_order_commit_text": "Committe deine fertige Arbeit mit einer klaren Commit-Nachricht.",
+ "cmd_placeholder": "Sag {0}, was zu tun ist…",
+ "cmd_stop": "Aktuellen Schritt stoppen",
+ "cmd_send": "Senden",
+ "cmd_sharpen": "Jarvis formuliert den Auftrag aus",
+ "cmd_sending": "Wird gesendet…",
+ "cmd_history": "Letzte Aufträge ({0})",
+ "cmd_reuse": "Zurück ins Eingabefeld",
+ "cmd_fork": "Eine Kopie dieser Session starten",
+ "cmd_close": "Diese Session schließen",
+ "cmd_close_confirm": "Nochmal klicken, um die Session zu schließen",
+ "mission_tab_new": "Neue Agents",
+ "mission_tab_fleet": "Etage briefen",
+ "mission_intro": "Wähle einen Workspace und einen Coding-Agent. Er bekommt einen freien Schreibtisch und legt mit einem ersten Auftrag sofort los.",
+ "mission_workspace": "Workspace",
+ "mission_no_workspace": "Kein Workspace ist offen. Öffne zuerst ein Projekt in der IDE.",
+ "mission_agent": "Coding-Agent",
+ "mission_no_agents": "Noch kein Coding-Agent installiert.",
+ "mission_count": "Wie viele",
+ "mission_task": "Erster Auftrag (optional)",
+ "mission_task_placeholder": "z. B. Finde und behebe die fehlschlagenden Tests",
+ "mission_start_one": "Agent starten",
+ "mission_start_many": "{0} Agents starten",
+ "mission_opening": "Neue Session wird geöffnet…",
+ "mission_waiting": "Warte, bis {0} gestartet ist…",
+ "mission_briefing": "{0} wird gebrieft…",
+ "mission_done_briefed": "{0} ist dran.",
+ "mission_done_open": "{0} ist bereit für einen Auftrag.",
+ "mission_not_started": "{0} ist offen, aber noch nicht gestartet. Öffne seinen Workspace in der IDE und brief ihn dann.",
+ "mission_failed": "Agent konnte nicht geöffnet werden: {0}",
+ "mission_loading": "Wird geladen…",
+ "fleet_intro": "Schick eine Nachricht an mehrere Coding-Agents gleichzeitig.",
+ "fleet_pick": "Sessions auswählen",
+ "fleet_pick_all": "Alle",
+ "fleet_pick_working": "Arbeiten",
+ "fleet_pick_waiting": "Warten",
+ "fleet_pick_idle": "Frei",
+ "fleet_pick_none": "Keine",
+ "fleet_empty": "Noch kein Coding-Agent auf der Etage. Starte einen unter „Neue Agents“.",
+ "fleet_placeholder": "Nachricht an die ausgewählten Agents",
+ "fleet_send": "An {0} senden",
+ "fleet_stop": "{0} stoppen",
+ "fleet_result": "{0} von {1} erreicht.",
+ "fleet_result_missed": "Nicht erreicht: {0}",
"elevator_press": "Knopf anklicken",
"elevator_up_count": "Gerade oben: {0}",
"elevator_down_count": "Gerade unten: {0}",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/en.json b/jarvis/ui/web/frontend/src/i18n/locales/society/en.json
index bd2b34c511..0363b2a3ee 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/society/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/en.json
@@ -891,6 +891,76 @@
"pane_prompt": "Last prompt",
"pane_unasked": "Nothing asked yet.",
"pane_open": "Open session",
+ "cp_mission": "Mission Control",
+ "cp_mission_hint": "Start new coding agents and brief the whole floor",
+ "tool_open": "Open",
+ "tool_stop": "Stop",
+ "tool_fork": "Copy",
+ "tool_close": "Close",
+ "tool_close_confirm": "Sure?",
+ "cmd_sent": "Sent to {0}.",
+ "cmd_unconfirmed": "Typed in, but the agent has not confirmed it yet.",
+ "cmd_stopped": "{0} stopped.",
+ "cmd_forked": "Copy started as {0}.",
+ "cmd_closed": "{0} closed.",
+ "cmd_no_prompts": "This is a plain terminal; it takes no prompts.",
+ "cmd_not_running": "This session is not running right now.",
+ "cmd_hint": "Enter sends · Shift+Enter adds a line",
+ "cmd_screen": "Live screen of {0}",
+ "cmd_screen_loading": "Loading the screen…",
+ "cmd_screen_empty": "Nothing on the screen yet.",
+ "cmd_quick": "Quick orders",
+ "cmd_order_continue": "Continue",
+ "cmd_order_continue_text": "Continue.",
+ "cmd_order_status": "Status?",
+ "cmd_order_status_text": "Give me a short status: what is done, what is left, and is anything blocking you?",
+ "cmd_order_tests": "Run tests",
+ "cmd_order_tests_text": "Run the relevant tests and fix whatever fails.",
+ "cmd_order_commit": "Commit",
+ "cmd_order_commit_text": "Commit your finished work with a clear commit message.",
+ "cmd_placeholder": "Tell {0} what to do…",
+ "cmd_stop": "Stop the current step",
+ "cmd_send": "Send",
+ "cmd_sharpen": "Let Jarvis sharpen the prompt",
+ "cmd_sending": "Sending…",
+ "cmd_history": "Recent prompts ({0})",
+ "cmd_reuse": "Put it back in the box",
+ "cmd_fork": "Start a copy of this session",
+ "cmd_close": "Close this session",
+ "cmd_close_confirm": "Click again to close the session",
+ "mission_tab_new": "New agents",
+ "mission_tab_fleet": "Brief the floor",
+ "mission_intro": "Pick a workspace and a coding agent. It takes a free desk and, with a first task, starts on it right away.",
+ "mission_workspace": "Workspace",
+ "mission_no_workspace": "No workspace is open. Open a project in the IDE first.",
+ "mission_agent": "Coding agent",
+ "mission_no_agents": "No coding agent is installed yet.",
+ "mission_count": "How many",
+ "mission_task": "First task (optional)",
+ "mission_task_placeholder": "e.g. Find and fix the failing tests",
+ "mission_start_one": "Start agent",
+ "mission_start_many": "Start {0} agents",
+ "mission_opening": "Opening a new session…",
+ "mission_waiting": "Waiting for {0} to start…",
+ "mission_briefing": "Briefing {0}…",
+ "mission_done_briefed": "{0} is on it.",
+ "mission_done_open": "{0} is ready for a task.",
+ "mission_not_started": "{0} is open but has not started yet. Open its workspace in the IDE, then brief it.",
+ "mission_failed": "Could not open an agent: {0}",
+ "mission_loading": "Loading…",
+ "fleet_intro": "Send one message to several coding agents at once.",
+ "fleet_pick": "Pick sessions",
+ "fleet_pick_all": "All",
+ "fleet_pick_working": "Working",
+ "fleet_pick_waiting": "Waiting",
+ "fleet_pick_idle": "Free",
+ "fleet_pick_none": "None",
+ "fleet_empty": "No coding agent is on the floor yet. Start one under “New agents”.",
+ "fleet_placeholder": "Message for the picked agents",
+ "fleet_send": "Send to {0}",
+ "fleet_stop": "Stop {0}",
+ "fleet_result": "Reached {0} of {1}.",
+ "fleet_result_missed": "Not reached: {0}",
"elevator_press": "Click the button",
"elevator_up_count": "Upstairs right now: {0}",
"elevator_down_count": "Downstairs right now: {0}",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/society/es.json b/jarvis/ui/web/frontend/src/i18n/locales/society/es.json
index db50cda7c1..ae9477819e 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/society/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/es.json
@@ -891,6 +891,76 @@
"pane_prompt": "Último prompt",
"pane_unasked": "Todavía no se le ha pedido nada.",
"pane_open": "Abrir sesión",
+ "cp_mission": "Mission Control",
+ "cp_mission_hint": "Inicia nuevos agentes de código e informa a toda la planta",
+ "tool_open": "Abrir",
+ "tool_stop": "Parar",
+ "tool_fork": "Copia",
+ "tool_close": "Cerrar",
+ "tool_close_confirm": "¿Seguro?",
+ "cmd_sent": "Enviado a {0}.",
+ "cmd_unconfirmed": "Escrito, pero el agente aún no lo ha confirmado.",
+ "cmd_stopped": "{0} detenido.",
+ "cmd_forked": "Copia iniciada como {0}.",
+ "cmd_closed": "{0} cerrado.",
+ "cmd_no_prompts": "Es una terminal simple; no acepta instrucciones.",
+ "cmd_not_running": "Esta sesión no está en marcha ahora.",
+ "cmd_hint": "Enter envía · Shift+Enter añade una línea",
+ "cmd_screen": "Pantalla en vivo de {0}",
+ "cmd_screen_loading": "Cargando la pantalla…",
+ "cmd_screen_empty": "Todavía no hay nada en la pantalla.",
+ "cmd_quick": "Órdenes rápidas",
+ "cmd_order_continue": "Continuar",
+ "cmd_order_continue_text": "Continúa.",
+ "cmd_order_status": "¿Estado?",
+ "cmd_order_status_text": "Dame un estado breve: qué está hecho, qué falta y si algo te bloquea.",
+ "cmd_order_tests": "Tests",
+ "cmd_order_tests_text": "Ejecuta los tests relevantes y corrige lo que falle.",
+ "cmd_order_commit": "Commit",
+ "cmd_order_commit_text": "Haz commit de tu trabajo terminado con un mensaje claro.",
+ "cmd_placeholder": "Dile a {0} qué hacer…",
+ "cmd_stop": "Detener el paso actual",
+ "cmd_send": "Enviar",
+ "cmd_sharpen": "Que Jarvis pula la instrucción",
+ "cmd_sending": "Enviando…",
+ "cmd_history": "Instrucciones recientes ({0})",
+ "cmd_reuse": "Volver a ponerla en el cuadro",
+ "cmd_fork": "Iniciar una copia de esta sesión",
+ "cmd_close": "Cerrar esta sesión",
+ "cmd_close_confirm": "Haz clic otra vez para cerrar la sesión",
+ "mission_tab_new": "Nuevos agentes",
+ "mission_tab_fleet": "Informar a la planta",
+ "mission_intro": "Elige un espacio de trabajo y un agente de código. Ocupa un escritorio libre y, con una primera tarea, empieza enseguida.",
+ "mission_workspace": "Espacio de trabajo",
+ "mission_no_workspace": "No hay ningún espacio de trabajo abierto. Abre primero un proyecto en el IDE.",
+ "mission_agent": "Agente de código",
+ "mission_no_agents": "Aún no hay ningún agente de código instalado.",
+ "mission_count": "Cuántos",
+ "mission_task": "Primera tarea (opcional)",
+ "mission_task_placeholder": "p. ej. Encuentra y corrige los tests que fallan",
+ "mission_start_one": "Iniciar agente",
+ "mission_start_many": "Iniciar {0} agentes",
+ "mission_opening": "Abriendo una sesión nueva…",
+ "mission_waiting": "Esperando a que {0} arranque…",
+ "mission_briefing": "Informando a {0}…",
+ "mission_done_briefed": "{0} está en ello.",
+ "mission_done_open": "{0} está listo para una tarea.",
+ "mission_not_started": "{0} está abierto pero aún no ha arrancado. Abre su espacio de trabajo en el IDE y luego infórmale.",
+ "mission_failed": "No se pudo abrir un agente: {0}",
+ "mission_loading": "Cargando…",
+ "fleet_intro": "Envía un mensaje a varios agentes de código a la vez.",
+ "fleet_pick": "Elegir sesiones",
+ "fleet_pick_all": "Todos",
+ "fleet_pick_working": "Trabajando",
+ "fleet_pick_waiting": "Esperando",
+ "fleet_pick_idle": "Libres",
+ "fleet_pick_none": "Ninguno",
+ "fleet_empty": "Todavía no hay agentes de código en la planta. Inicia uno en «Nuevos agentes».",
+ "fleet_placeholder": "Mensaje para los agentes elegidos",
+ "fleet_send": "Enviar a {0}",
+ "fleet_stop": "Detener {0}",
+ "fleet_result": "Alcanzados {0} de {1}.",
+ "fleet_result_missed": "No alcanzados: {0}",
"elevator_press": "Haz clic en el botón",
"elevator_up_count": "Arriba ahora mismo: {0}",
"elevator_down_count": "Abajo ahora mismo: {0}",
diff --git a/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts b/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts
index 28fe0bab54..5b46f51f5b 100644
--- a/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts
+++ b/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts
@@ -1361,6 +1361,23 @@ export async function addTerminal(payload: {
return body.state.session;
}
+/**
+ * Open one more terminal and answer with THAT terminal — the pane Mission
+ * Control goes on to brief. `addTerminal` answers with the front workspace,
+ * which is not where the pane went when another workspace was named.
+ */
+export async function openTerminal(
+ payload: Parameters<typeof addTerminal>[0],
+): Promise<TerminalState> {
+ const res = await fetch("/api/agentic-ide/terminals", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify(payload),
+ });
+ if (!res.ok) throw new Error(await detail(res));
+ return ((await res.json()) as { terminal: TerminalState }).terminal;
+}
+
/**
* Persist the pane sizes a seam drag produced.
*
@@ -2010,10 +2027,12 @@ export interface PromptResult {
export async function promptTerminal(
name: string,
prompt: string,
- options: { compose?: boolean; attachments?: DropAttachment[] } = {},
+ options: { compose?: boolean; attachments?: DropAttachment[]; workspaceId?: string } = {},
): Promise<PromptResult> {
+ // A call-sign is only unique inside its workspace; name it when the caller knows it.
+ const query = options.workspaceId ? `?workspace=${encodeURIComponent(options.workspaceId)}` : "";
const res = await fetch(
- `/api/agentic-ide/terminals/${encodeURIComponent(name)}/prompt`,
+ `/api/agentic-ide/terminals/${encodeURIComponent(name)}/prompt${query}`,
{
method: "POST",
headers: { "Content-Type": "application/json" },