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): Skill Forge, Relay Tower and Terminal Cantina stand in the ring with their drawers

rubenluetke10-beepa30cec46c43b
diff --git a/jarvis/ui/web/frontend/src/components/society/world/HubDrawer.tsx b/jarvis/ui/web/frontend/src/components/society/world/HubDrawer.tsx
new file mode 100644
index 0000000000..e1ff630a04
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/society/world/HubDrawer.tsx
@@ -0,0 +1,193 @@
+/**
+ * What a click on a hub building opens: the things that hub stands for, as a
+ * drawer over the island (one-viewer doctrine — the world keeps living behind
+ * it), with a link to the app section. Data comes from the endpoints the
+ * sections already use; nothing is invented. The drawer is app chrome, so it
+ * wears the theme tokens; only the family swatches echo the buildings.
+ */
+import { useEffect } from "react";
+import { useQuery } from "@tanstack/react-query";
+import { ExternalLink, X } from "lucide-react";
+
+import { useT } from "@/i18n";
+import { useEventStore, type SectionId } from "@/store/events";
+import type { KitPlace } from "./islandLayout";
+
+interface Group {
+ /** Locale key suffix under `society.world.` */
+ labelKey: string;
+ color: string;
+ items: string[];
+}
+
+interface HubConfig {
+ titleKey: string;
+ hintKey: string;
+ section: SectionId;
+ /** Absent for hubs that list nothing (the Foundry explains itself). */
+ load?: () => Promise<Group[]>;
+ bodyKey?: string;
+}
+
+const PLUGIN_FAMILIES: ReadonlyArray<{ group: string; key: string; color: string }> = [
+ { group: "jarvis.brain", key: "plugin_group_brain", color: "#9b5de5" },
+ { group: "jarvis.tool", key: "plugin_group_tool", color: "#2ec4b6" },
+ { group: "jarvis.stt", key: "plugin_group_stt", color: "#ff6f61" },
+ { group: "jarvis.tts", key: "plugin_group_tts", color: "#ffb703" },
+ { group: "jarvis.channel", key: "plugin_group_channel", color: "#06d6a0" },
+ { group: "jarvis.realtime", key: "plugin_group_realtime", color: "#4cc9f0" },
+ { group: "jarvis.wakeword", key: "plugin_group_wakeword", color: "#c9c2b2" },
+ { group: "jarvis.harness", key: "plugin_group_harness", color: "#8b8f9c" },
+];
+
+async function getJson<T>(url: string): Promise<T> {
+ const res = await fetch(url);
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
+ return (await res.json()) as T;
+}
+
+const HUBS: Record<KitPlace, HubConfig> = {
+ plugins: {
+ titleKey: "drawer_plugins_title",
+ hintKey: "drawer_plugins_hint",
+ section: "plugins",
+ load: async () => {
+ const data = await getJson<Record<string, string[]>>("/api/plugins");
+ return PLUGIN_FAMILIES.map((f) => ({
+ labelKey: f.key,
+ color: f.color,
+ items: [...(data[f.group] ?? [])].sort(),
+ }));
+ },
+ },
+ skills: {
+ titleKey: "drawer_skills_title",
+ hintKey: "drawer_skills_hint",
+ section: "skills",
+ load: async () => {
+ const data = await getJson<{
+ skills: Array<{ name: string; state: string; is_builtin: boolean }>;
+ }>("/api/skills");
+ const skills = data.skills ?? [];
+ const by = (pred: (s: { state: string; is_builtin: boolean }) => boolean) =>
+ skills.filter(pred).map((s) => s.name).sort();
+ return [
+ { labelKey: "skills_group_draft", color: "#ff9f1c", items: by((s) => s.state === "draft") },
+ { labelKey: "skills_group_custom", color: "#ffd166", items: by((s) => !s.is_builtin && s.state !== "draft") },
+ { labelKey: "skills_group_builtin", color: "#c9c2b2", items: by((s) => s.is_builtin && s.state !== "draft") },
+ ];
+ },
+ },
+ mcp: {
+ titleKey: "drawer_mcp_title",
+ hintKey: "drawer_mcp_hint",
+ section: "mcps",
+ load: async () => {
+ const data = await getJson<{ servers: Array<{ name: string; display?: string; transport?: string }> }>(
+ "/api/mcps",
+ );
+ const servers = data.servers ?? [];
+ const label = (s: { name: string; display?: string }) => s.display || s.name;
+ return [
+ { labelKey: "mcp_group_stdio", color: "#4cc9f0", items: servers.filter((s) => s.transport !== "http").map(label).sort() },
+ { labelKey: "mcp_group_http", color: "#9b5de5", items: servers.filter((s) => s.transport === "http").map(label).sort() },
+ ];
+ },
+ },
+ cli: {
+ titleKey: "drawer_cli_title",
+ hintKey: "drawer_cli_hint",
+ section: "clis",
+ load: async () => {
+ const data = await getJson<{
+ clis: Array<{ name: string; display_name?: string; installed: boolean; connected: boolean }>;
+ }>("/api/clis");
+ const clis = data.clis ?? [];
+ const label = (c: { name: string; display_name?: string }) => c.display_name || c.name;
+ return [
+ { labelKey: "cli_group_connected", color: "#2ec4b6", items: clis.filter((c) => c.connected).map(label).sort() },
+ { labelKey: "cli_group_installed", color: "#ffd166", items: clis.filter((c) => c.installed && !c.connected).map(label).sort() },
+ { labelKey: "cli_group_missing", color: "#c9c2b2", items: clis.filter((c) => !c.installed).map(label).sort() },
+ ];
+ },
+ },
+};
+
+export function HubDrawer({ hub, onClose }: { hub: KitPlace; onClose: () => void }) {
+ const t = useT();
+ const setActiveSection = useEventStore((s) => s.setActiveSection);
+ const cfg = HUBS[hub];
+ const groups = useQuery({
+ queryKey: ["society", "hub", hub],
+ queryFn: cfg.load ?? (async () => []),
+ enabled: Boolean(cfg.load),
+ staleTime: 60_000,
+ });
+
+ useEffect(() => {
+ const onKey = (e: KeyboardEvent) => {
+ if (e.key === "Escape") onClose();
+ };
+ window.addEventListener("keydown", onKey);
+ return () => window.removeEventListener("keydown", onKey);
+ }, [onClose]);
+
+ const total = groups.data ? groups.data.reduce((n, g) => n + g.items.length, 0) : 0;
+
+ return (
+ <aside
+ className="absolute inset-y-3 right-3 z-30 flex w-[340px] max-w-[85%] flex-col overflow-hidden rounded-lg border border-border bg-popover text-foreground shadow-float"
+ role="dialog"
+ aria-label={t(`society.world.${cfg.titleKey}`)}
+ >
+ <header className="flex items-start justify-between gap-3 border-b border-border px-4 py-3">
+ <div className="min-w-0">
+ <h2 className="font-display text-base font-semibold tracking-tight">{t(`society.world.${cfg.titleKey}`)}</h2>
+ <p className="mt-0.5 text-xs text-muted-foreground">{t(`society.world.${cfg.hintKey}`)}</p>
+ </div>
+ <button
+ type="button"
+ onClick={onClose}
+ aria-label={t("society.world.drawer_close")}
+ className="rounded-md p-1 text-muted-foreground hover:bg-muted hover:text-foreground"
+ >
+ <X size={16} />
+ </button>
+ </header>
+ <div className="min-h-0 flex-1 overflow-y-auto px-4 py-3">
+ {cfg.bodyKey && <p className="text-sm text-foreground">{t(`society.world.${cfg.bodyKey}`)}</p>}
+ {cfg.load && groups.isLoading && <p className="text-sm text-muted-foreground">{t("society.world.drawer_loading")}</p>}
+ {groups.isError && <p className="text-sm text-destructive">{String(groups.error)}</p>}
+ {cfg.load && groups.data && total === 0 && <p className="text-sm text-muted-foreground">{t("society.world.drawer_empty")}</p>}
+ {groups.data
+ ?.filter((g) => g.items.length > 0)
+ .map((g) => (
+ <section key={g.labelKey} className="mb-4">
+ <h3 className="mb-1.5 flex items-center gap-2 text-xs font-medium uppercase tracking-wide text-muted-foreground">
+ <span className="inline-block h-2.5 w-2.5 rounded-sm" style={{ background: g.color }} aria-hidden />
+ {t(`society.world.${g.labelKey}`)}
+ <span className="tabular-nums">{g.items.length}</span>
+ </h3>
+ <ul className="flex flex-wrap gap-1.5">
+ {g.items.map((n) => (
+ <li key={n} className="rounded-md bg-secondary px-2 py-1 font-mono text-xs text-foreground">
+ {n}
+ </li>
+ ))}
+ </ul>
+ </section>
+ ))}
+ </div>
+ <footer className="border-t border-border px-4 py-3">
+ <button
+ type="button"
+ onClick={() => setActiveSection(cfg.section)}
+ className="inline-flex h-8 items-center gap-2 rounded-md bg-secondary px-3 text-sm font-medium text-foreground hover:bg-muted"
+ >
+ <ExternalLink size={14} />
+ {t("society.world.drawer_open_section")}
+ </button>
+ </footer>
+ </aside>
+ );
+}
diff --git a/jarvis/ui/web/frontend/src/components/society/world/KitBuilding.tsx b/jarvis/ui/web/frontend/src/components/society/world/KitBuilding.tsx
index cacf9d4cc8..b6238c1613 100644
--- a/jarvis/ui/web/frontend/src/components/society/world/KitBuilding.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/world/KitBuilding.tsx
@@ -14,6 +14,9 @@ import { Color, Mesh, MeshBasicMaterial, MeshStandardMaterial, MeshToonMaterial,
import * as SkeletonUtils from "three/examples/jsm/utils/SkeletonUtils.js";
import pluginDocksUrl from "@/assets/society/world/kit/plugin-docks.glb";
+import relayTowerUrl from "@/assets/society/world/kit/relay-tower.glb";
+import skillForgeUrl from "@/assets/society/world/kit/skill-forge.glb";
+import terminalCantinaUrl from "@/assets/society/world/kit/terminal-cantina.glb";
import { useCameraStore } from "./cameraStore";
import { buildIsland, groundY, type KitPlace } from "./islandLayout";
import { createToonRamp } from "./worldMaterials";
@@ -21,14 +24,28 @@ import { createToonRamp } from "./worldMaterials";
/** Every kit file the registry knows. Adding a building = adding a row. */
export const KIT_URLS = {
"plugin-docks": pluginDocksUrl,
+ "skill-forge": skillForgeUrl,
+ "relay-tower": relayTowerUrl,
+ "terminal-cantina": terminalCantinaUrl,
} as const;
export type KitId = keyof typeof KIT_URLS;
/** Which kit file stands at which kit place; the pose comes from the island layout. */
export const KIT_PLACEMENTS: ReadonlyArray<{ kit: KitId; place: KitPlace }> = [
{ kit: "plugin-docks", place: "plugins" },
+ { kit: "skill-forge", place: "skills" },
+ { kit: "relay-tower", place: "mcp" },
+ { kit: "terminal-cantina", place: "cli" },
];
+/** Radius of the hover/selection ring drawn under each kit, in metres. */
+const KIT_RING_R: Record<KitId, number> = {
+ "plugin-docks": 9.9,
+ "skill-forge": 8.6,
+ "relay-tower": 6.4,
+ "terminal-cantina": 8.8,
+};
+
/** Emission above this strength renders unlit (a lamp, a neon tube), below it stays a lit toon. */
const GLOW_STRENGTH = 1.5;
@@ -117,7 +134,7 @@ export function KitBuilding({
<primitive object={instance} />
{(hover || selected) && (
<mesh position={[0, 0.06, 0]} rotation={[-Math.PI / 2, 0, 0]}>
- <ringGeometry args={[9.6, 10.2, 48]} />
+ <ringGeometry args={[KIT_RING_R[kit] - 0.3, KIT_RING_R[kit] + 0.3, 48]} />
<meshBasicMaterial color={selected ? "#ffd166" : "#fffaf0"} transparent opacity={0.85} />
</mesh>
)}
@@ -125,4 +142,4 @@ export function KitBuilding({
);
}
-useGLTF.preload(pluginDocksUrl);
+for (const url of Object.values(KIT_URLS)) useGLTF.preload(url);
diff --git a/jarvis/ui/web/frontend/src/components/society/world/PlaceLabels.tsx b/jarvis/ui/web/frontend/src/components/society/world/PlaceLabels.tsx
index e07e441442..57c8bfbefe 100644
--- a/jarvis/ui/web/frontend/src/components/society/world/PlaceLabels.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/world/PlaceLabels.tsx
@@ -19,6 +19,9 @@ const LABEL_Y: Record<PlaceId, number> = {
gardens: 6,
solar: 5,
plugins: 13,
+ skills: 9,
+ mcp: 12,
+ cli: 7,
};
export function PlaceLabels() {
diff --git a/jarvis/ui/web/frontend/src/components/society/world/PluginStoreDrawer.tsx b/jarvis/ui/web/frontend/src/components/society/world/PluginStoreDrawer.tsx
deleted file mode 100644
index 12b2d5a2fe..0000000000
--- a/jarvis/ui/web/frontend/src/components/society/world/PluginStoreDrawer.tsx
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * What a click on the Plugin Docks opens: every plugin installed in this app,
- * grouped by family, as a drawer over the island (one-viewer doctrine — the
- * world keeps living behind it). Data: `/api/plugins`, the entry-point
- * catalog the backend already serves. The drawer is app chrome, so it wears
- * the theme tokens; only the family swatches echo the building's bay colours.
- */
-import { useEffect } from "react";
-import { useQuery } from "@tanstack/react-query";
-import { ExternalLink, X } from "lucide-react";
-
-import { useT } from "@/i18n";
-import { useEventStore } from "@/store/events";
-
-/** Entry-point group → family key, label key and the bay colour it wears. */
-const FAMILIES: ReadonlyArray<{ group: string; key: string; color: string }> = [
- { group: "jarvis.brain", key: "brain", color: "#9b5de5" },
- { group: "jarvis.tool", key: "tool", color: "#2ec4b6" },
- { group: "jarvis.stt", key: "stt", color: "#ff6f61" },
- { group: "jarvis.tts", key: "tts", color: "#ffb703" },
- { group: "jarvis.channel", key: "channel", color: "#06d6a0" },
- { group: "jarvis.realtime", key: "realtime", color: "#4cc9f0" },
- { group: "jarvis.wakeword", key: "wakeword", color: "#c9c2b2" },
- { group: "jarvis.harness", key: "harness", color: "#8b8f9c" },
-];
-
-async function fetchPlugins(): Promise<Record<string, string[]>> {
- const res = await fetch("/api/plugins");
- if (!res.ok) throw new Error(`HTTP ${res.status}`);
- return (await res.json()) as Record<string, string[]>;
-}
-
-export function PluginStoreDrawer({ onClose }: { onClose: () => void }) {
- const t = useT();
- const setActiveSection = useEventStore((s) => s.setActiveSection);
- const plugins = useQuery({ queryKey: ["plugins", "catalog"], queryFn: fetchPlugins, staleTime: 60_000 });
-
- useEffect(() => {
- const onKey = (e: KeyboardEvent) => {
- if (e.key === "Escape") onClose();
- };
- window.addEventListener("keydown", onKey);
- return () => window.removeEventListener("keydown", onKey);
- }, [onClose]);
-
- const total = plugins.data ? Object.values(plugins.data).reduce((n, v) => n + v.length, 0) : 0;
-
- return (
- <aside
- className="absolute inset-y-3 right-3 z-30 flex w-[340px] max-w-[85%] flex-col overflow-hidden rounded-lg border border-border bg-popover text-foreground shadow-float"
- role="dialog"
- aria-label={t("society.world.drawer_plugins_title")}
- >
- <header className="flex items-start justify-between gap-3 border-b border-border px-4 py-3">
- <div className="min-w-0">
- <h2 className="font-display text-base font-semibold tracking-tight">{t("society.world.drawer_plugins_title")}</h2>
- <p className="mt-0.5 text-xs text-muted-foreground">{t("society.world.drawer_plugins_hint")}</p>
- </div>
- <button
- type="button"
- onClick={onClose}
- aria-label={t("society.world.drawer_close")}
- className="rounded-md p-1 text-muted-foreground hover:bg-muted hover:text-foreground"
- >
- <X size={16} />
- </button>
- </header>
- <div className="min-h-0 flex-1 overflow-y-auto px-4 py-3">
- {plugins.isLoading && <p className="text-sm text-muted-foreground">{t("society.world.drawer_loading")}</p>}
- {plugins.isError && <p className="text-sm text-destructive">{String(plugins.error)}</p>}
- {plugins.data && total === 0 && <p className="text-sm text-muted-foreground">{t("society.world.drawer_empty")}</p>}
- {plugins.data &&
- FAMILIES.filter((f) => (plugins.data?.[f.group]?.length ?? 0) > 0).map((f) => {
- const names = [...(plugins.data?.[f.group] ?? [])].sort();
- return (
- <section key={f.group} className="mb-4">
- <h3 className="mb-1.5 flex items-center gap-2 text-xs font-medium uppercase tracking-wide text-muted-foreground">
- <span className="inline-block h-2.5 w-2.5 rounded-sm" style={{ background: f.color }} aria-hidden />
- {t(`society.world.plugin_group_${f.key}`)}
- <span className="tabular-nums">{names.length}</span>
- </h3>
- <ul className="flex flex-wrap gap-1.5">
- {names.map((n) => (
- <li key={n} className="rounded-md bg-secondary px-2 py-1 font-mono text-xs text-foreground">
- {n}
- </li>
- ))}
- </ul>
- </section>
- );
- })}
- </div>
- <footer className="border-t border-border px-4 py-3">
- <button
- type="button"
- onClick={() => setActiveSection("plugins")}
- className="inline-flex h-8 items-center gap-2 rounded-md bg-secondary px-3 text-sm font-medium text-foreground hover:bg-muted"
- >
- <ExternalLink size={14} />
- {t("society.world.drawer_open_section")}
- </button>
- </footer>
- </aside>
- );
-}
diff --git a/jarvis/ui/web/frontend/src/components/society/world/WorldStage.tsx b/jarvis/ui/web/frontend/src/components/society/world/WorldStage.tsx
index 1b428428ba..3d119d0ed9 100644
--- a/jarvis/ui/web/frontend/src/components/society/world/WorldStage.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/world/WorldStage.tsx
@@ -31,7 +31,7 @@ import { useCameraStore } from "./cameraStore";
import { Clouds } from "./Clouds";
import { Landmarks } from "./Landmarks";
import { PlaceLabels } from "./PlaceLabels";
-import { PluginStoreDrawer } from "./PluginStoreDrawer";
+import { HubDrawer } from "./HubDrawer";
import { Shadowed } from "./Shadowed";
import { SunRig } from "./SunRig";
import { Terrain, Water } from "./Terrain";
@@ -43,7 +43,12 @@ import { WorldCameraRig } from "./WorldCameraRig";
import { WorldComposer } from "./WorldComposer";
import { WorldHud } from "./WorldHud";
import { WorldKitProvider } from "./WorldKit";
-import type { PlaceId } from "./islandLayout";
+import { RING_KIT_SLOTS, type KitPlace, type PlaceId } from "./islandLayout";
+
+/** Only ring hubs open a drawer; other places are scenery. */
+function asHub(place: PlaceId): KitPlace | null {
+ return place in RING_KIT_SLOTS ? (place as KitPlace) : null;
+}
import { cameraOffset } from "./worldCamera";
import { SKY } from "./worldPalette";
import { useWorldSettings } from "./worldSettings";
@@ -73,7 +78,7 @@ export function WorldStage({ topRight, onOpenLedger, onSelectAgent }: WorldStage
const agents = roster.data?.agents ?? [];
const sample = roster.data?.sample ?? true;
const [selected, setSelected] = useState<string | null>(null);
- const [openHub, setOpenHub] = useState<PlaceId | null>(null);
+ const [openHub, setOpenHub] = useState<KitPlace | null>(null);
useWorldControls(hostRef, webgl);
@@ -138,7 +143,14 @@ export function WorldStage({ topRight, onOpenLedger, onSelectAgent }: WorldStage
<Water paused={reduced} />
<Shadowed>
<Village paused={reduced} />
- <Landmarks paused={reduced} onHubClick={(p) => setOpenHub((cur) => (cur === p ? null : p))} openHub={openHub} />
+ <Landmarks
+ paused={reduced}
+ onHubClick={(p) => {
+ const hub = asHub(p);
+ if (hub) setOpenHub((cur) => (cur === hub ? null : hub));
+ }}
+ openHub={openHub}
+ />
<Trees />
<Walkers agents={agents} paused={reduced} selectedId={selected} onSelect={select} />
</Shadowed>
@@ -152,7 +164,7 @@ export function WorldStage({ topRight, onOpenLedger, onSelectAgent }: WorldStage
{ready && (
<WorldHud agents={agents} sample={sample} awake={awake} reducedMotion={reduced} topRight={topRight} />
)}
- {ready && openHub === "plugins" && <PluginStoreDrawer onClose={() => setOpenHub(null)} />}
+ {ready && openHub && <HubDrawer hub={openHub} onClose={() => setOpenHub(null)} />}
</div>
);
}
diff --git a/jarvis/ui/web/frontend/src/components/society/world/islandLayout.test.ts b/jarvis/ui/web/frontend/src/components/society/world/islandLayout.test.ts
index 919e921b35..805c21dff7 100644
--- a/jarvis/ui/web/frontend/src/components/society/world/islandLayout.test.ts
+++ b/jarvis/ui/web/frontend/src/components/society/world/islandLayout.test.ts
@@ -13,6 +13,7 @@ import {
MARKET_HALF_TILES,
PLATEAU_LEVEL,
PLAZA_RADIUS_TILES,
+ RING_KIT_SLOTS,
TileKind,
buildIsland,
findPath,
@@ -86,7 +87,7 @@ describe("islandLayout", () => {
it("opens a paved square in the middle with a ring of houses around it", () => {
const { map, content } = island;
expect(map.kind[tileIndex(map, CENTER_TILE + 5, CENTER_TILE + 5)]).toBe(TileKind.plaza);
- expect(content.houses.length).toBe(10); // 12 slots, two taken by the Plugin Docks
+ expect(content.houses.length).toBe(7); // 12 slots, five taken by the four ring hubs
for (const h of content.houses) {
const r = Math.hypot(h.x, h.z) / 2;
expect(r).toBeGreaterThan(PLAZA_RADIUS_TILES);
@@ -100,17 +101,21 @@ describe("islandLayout", () => {
}
});
- it("puts the Plugin Docks on the house ring, facing the square, with a reachable stand", () => {
+ it("puts every ring hub on the house ring, facing the square, with a reachable stand", () => {
const { map, content } = island;
- const pose = content.kitPoses.plugins;
- expect(Math.hypot(pose.x, pose.z) / 2).toBeCloseTo(HOUSE_RING_TILES, 5);
- const fx = Math.sin(pose.rotation);
- const fz = Math.cos(pose.rotation);
- expect(fx * -pose.x + fz * -pose.z).toBeGreaterThan(0); // the front points at the centre
- const [sx, sz] = content.places.plugins.standTile;
- expect(isWalkable(map, sx, sz)).toBe(true);
- const [bx, bz] = worldToTile(pose.x, pose.z);
- expect(isWalkable(map, bx, bz)).toBe(false); // the footprint is blocked
+ for (const [id, pose] of Object.entries(content.kitPoses)) {
+ expect(Math.hypot(pose.x, pose.z) / 2, id).toBeCloseTo(HOUSE_RING_TILES, 5);
+ const fx = Math.sin(pose.rotation);
+ const fz = Math.cos(pose.rotation);
+ expect(fx * -pose.x + fz * -pose.z, id).toBeGreaterThan(0); // the front points at the centre
+ const [sx, sz] = content.places[id as keyof typeof content.places].standTile;
+ expect(isWalkable(map, sx, sz), id).toBe(true);
+ const [bx, bz] = worldToTile(pose.x, pose.z);
+ expect(isWalkable(map, bx, bz), id).toBe(false); // the footprint is blocked
+ }
+ // No two hubs share a slot.
+ const slots = Object.values(RING_KIT_SLOTS).flat();
+ expect(new Set(slots).size).toBe(slots.length);
});
it("leaves the four gates open in the hedge ring", () => {
diff --git a/jarvis/ui/web/frontend/src/components/society/world/islandLayout.ts b/jarvis/ui/web/frontend/src/components/society/world/islandLayout.ts
index 7525acf292..6902e27540 100644
--- a/jarvis/ui/web/frontend/src/components/society/world/islandLayout.ts
+++ b/jarvis/ui/web/frontend/src/components/society/world/islandLayout.ts
@@ -104,7 +104,10 @@ export type PlaceId =
| "lighthouse"
| "gardens"
| "solar"
- | "plugins";
+ | "plugins"
+ | "skills"
+ | "mcp"
+ | "cli";
export interface Place {
id: PlaceId;
@@ -168,7 +171,7 @@ export interface IslandContent {
}
/** Places that are World Kit buildings sitting IN the house ring (world-masterplan-v2.md §5). */
-export type KitPlace = "plugins";
+export type KitPlace = "plugins" | "skills" | "mcp" | "cli";
export interface KitPose {
x: number;
@@ -181,7 +184,29 @@ export interface KitPose {
* Docks are 16 m wide, a house slot is ~15 m of arc, so the docks take two
* neighbouring north-west slots and stand centred between them.
*/
-export const RING_KIT_SLOTS: Record<KitPlace, readonly number[]> = { plugins: [13, 14] };
+export const RING_KIT_SLOTS: Record<KitPlace, readonly number[]> = {
+ // Hubs sit on the north and west of the ring so their fronts face the camera
+ // (it looks from the south-east); houses take the slots whose backs it sees.
+ plugins: [13, 14], // north-west, two slots (16 m wide)
+ skills: [15], // north, beside the docks: the Skill Forge
+ mcp: [1], // north-east: the Relay Tower
+ cli: [11], // west: the Terminal Cantina
+};
+
+/** Footprints (tiles) of the kit buildings, for blocking the walk grid. */
+export const KIT_FOOTPRINTS: Record<KitPlace, [number, number]> = {
+ plugins: [8, 5],
+ skills: [7, 5],
+ mcp: [5, 5],
+ cli: [7, 5],
+};
+
+const KIT_PLACES = Object.keys(RING_KIT_SLOTS) as KitPlace[];
+
+function kitTile(place: KitPlace): [number, number] {
+ const p = ringPose(RING_KIT_SLOTS[place]);
+ return [Math.floor(p.x / TILE_M + CENTER_TILE), Math.floor(p.z / TILE_M + CENTER_TILE)];
+}
/** Pose of a building centred on the given ring slots, front toward the square. */
export function ringPose(slots: readonly number[], radiusTiles = HOUSE_RING_TILES): KitPose {
@@ -308,14 +333,11 @@ const PLACE_TILES: Record<PlaceId, [number, number]> = {
lighthouse: [CENTER_TILE + 62, CENTER_TILE],
gardens: [CENTER_TILE + 30, CENTER_TILE + 34],
solar: [CENTER_TILE - 32, CENTER_TILE - 32],
- // The Plugin Docks stand in the house ring (RING_KIT_SLOTS); this tile is the ring pose's tile.
- plugins: (() => {
- const p = ringPose(RING_KIT_SLOTS.plugins);
- return [Math.floor(p.x / TILE_M + CENTER_TILE), Math.floor(p.z / TILE_M + CENTER_TILE)] as [
- number,
- number,
- ];
- })(),
+ // Kit hubs stand in the house ring (RING_KIT_SLOTS); these are their ring poses' tiles.
+ plugins: kitTile("plugins"),
+ skills: kitTile("skills"),
+ mcp: kitTile("mcp"),
+ cli: kitTile("cli"),
};
/** Half extents (tiles) of the flat plots each place is built on. */
@@ -328,7 +350,11 @@ const PLOT_HALF: Record<PlaceId, [number, number]> = {
lighthouse: [3, 3],
gardens: [9, 7],
solar: [8, 6],
- plugins: [0, 0], // no flat plot of its own: it sits on the village plateau
+ // Ring hubs have no flat plot of their own: they sit on the village plateau.
+ plugins: [0, 0],
+ skills: [0, 0],
+ mcp: [0, 0],
+ cli: [0, 0],
};
/** Building footprints (half extents, tiles) that block walking. */
@@ -677,14 +703,16 @@ function buildPlaces(map: IslandMap): Record<PlaceId, Place> {
lighthouse: place("lighthouse", [PLACE_TILES.lighthouse[0] - 3, C], Math.PI / 2),
gardens: place("gardens", [PLACE_TILES.gardens[0], PLACE_TILES.gardens[1]], 0),
solar: place("solar", [PLACE_TILES.solar[0] + 1, PLACE_TILES.solar[1] + 8], Math.PI),
- // In front of the docks' bays (7.5 m toward the square), facing the building.
- plugins: (() => {
- const p = ringPose(RING_KIT_SLOTS.plugins);
- const fx = Math.sin(p.rotation);
- const fz = Math.cos(p.rotation);
- const tile = worldToTile(p.x + fx * 7.5, p.z + fz * 7.5);
- return place("plugins", tile, p.rotation + Math.PI);
- })(),
+ // Ring hubs: 7.5 m in front of the doors, toward the square, facing the building.
+ ...(Object.fromEntries(
+ KIT_PLACES.map((id) => {
+ const p = ringPose(RING_KIT_SLOTS[id]);
+ const fx = Math.sin(p.rotation);
+ const fz = Math.cos(p.rotation);
+ const tile = worldToTile(p.x + fx * 7.5, p.z + fz * 7.5);
+ return [id, place(id, tile, p.rotation + Math.PI)];
+ }),
+ ) as Record<KitPlace, Place>),
};
void facingCentre;
// Make sure every stand tile is walkable — a place nobody can reach is a bug.
@@ -726,9 +754,20 @@ export function buildIsland(): Island {
buildVillage(map);
const houses = placeHouses();
blockHouses(map, houses);
- const kitPoses: Record<KitPlace, KitPose> = { plugins: ringPose(RING_KIT_SLOTS.plugins) };
- // The docks' footprint (8 x 5 tiles) blocks walking like a house does.
- blockHouses(map, [{ ...kitPoses.plugins, w: 8, d: 5, variant: "glass-loft", seed: 0 }]);
+ const kitPoses = Object.fromEntries(
+ KIT_PLACES.map((id) => [id, ringPose(RING_KIT_SLOTS[id])]),
+ ) as Record<KitPlace, KitPose>;
+ // Kit footprints block walking like houses do.
+ blockHouses(
+ map,
+ KIT_PLACES.map((id) => ({
+ ...kitPoses[id],
+ w: KIT_FOOTPRINTS[id][0],
+ d: KIT_FOOTPRINTS[id][1],
+ variant: "glass-loft" as const,
+ seed: 0,
+ })),
+ );
blockSquareFurniture(map);
const { hedges, lamps } = placeRingFurniture(map);
const { panels, greenhouses } = placeQuarterFurniture(map);
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 2077807479..b7a5d3bddb 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/society/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/de.json
@@ -32,6 +32,23 @@
"plugin_group_realtime": "Echtzeit-Stimme",
"plugin_group_wakeword": "Weckwörter",
"plugin_group_harness": "Harnesse",
+ "place_skills": "Skill-Schmiede",
+ "place_mcp": "Relais-Turm",
+ "place_cli": "Terminal-Cantina",
+ "drawer_skills_title": "Skill-Schmiede",
+ "drawer_skills_hint": "Alle Skills, die diese App kennt. Entwürfe, die ein Agent gelernt hat, warten hier auf deine Freigabe.",
+ "skills_group_draft": "Entwürfe, warten auf Freigabe",
+ "skills_group_custom": "Deine",
+ "skills_group_builtin": "Eingebaut",
+ "drawer_mcp_title": "Relais-Turm",
+ "drawer_mcp_hint": "Die MCP-Server, die diese App erreicht. Die Schüssel dreht sich, während ein Agent einen aufruft.",
+ "mcp_group_stdio": "Lokal (stdio)",
+ "mcp_group_http": "Entfernt (HTTP)",
+ "drawer_cli_title": "Terminal-Cantina",
+ "drawer_cli_hint": "Die Coding-CLIs und Sitze. Ein Agent sitzt hier am Terminal, solange eine Coding-Sitzung läuft.",
+ "cli_group_connected": "Verbunden",
+ "cli_group_installed": "Installiert, nicht verbunden",
+ "cli_group_missing": "Nicht installiert",
"place_market": "Marktplatz",
"place_hub": "Jarvis-Hub",
"place_workshop": "Werkstatt",
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 897c7491a3..413f52d852 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/society/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/en.json
@@ -32,6 +32,23 @@
"plugin_group_realtime": "Realtime voice",
"plugin_group_wakeword": "Wake words",
"plugin_group_harness": "Harnesses",
+ "place_skills": "Skill Forge",
+ "place_mcp": "Relay Tower",
+ "place_cli": "Terminal Cantina",
+ "drawer_skills_title": "Skill Forge",
+ "drawer_skills_hint": "Every skill this app knows. Drafts an agent learned wait here for your approval.",
+ "skills_group_draft": "Drafts awaiting approval",
+ "skills_group_custom": "Yours",
+ "skills_group_builtin": "Built-in",
+ "drawer_mcp_title": "Relay Tower",
+ "drawer_mcp_hint": "The MCP servers this app can reach. The dish turns while an agent calls one.",
+ "mcp_group_stdio": "Local (stdio)",
+ "mcp_group_http": "Remote (HTTP)",
+ "drawer_cli_title": "Terminal Cantina",
+ "drawer_cli_hint": "The coding CLIs and seats. An agent sits at a terminal here while a coding session runs.",
+ "cli_group_connected": "Connected",
+ "cli_group_installed": "Installed, not connected",
+ "cli_group_missing": "Not installed",
"place_market": "Market Square",
"place_hub": "Jarvis Hub",
"place_workshop": "Workshop",
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 6e350cef67..ca4822c139 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/society/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/society/es.json
@@ -32,6 +32,23 @@
"plugin_group_realtime": "Voz en tiempo real",
"plugin_group_wakeword": "Palabras de activación",
"plugin_group_harness": "Arneses",
+ "place_skills": "Forja de Skills",
+ "place_mcp": "Torre de Relé",
+ "place_cli": "Cantina de Terminales",
+ "drawer_skills_title": "Forja de Skills",
+ "drawer_skills_hint": "Todas las skills que conoce esta app. Los borradores que aprendió un agente esperan aquí tu aprobación.",
+ "skills_group_draft": "Borradores pendientes de aprobación",
+ "skills_group_custom": "Tuyas",
+ "skills_group_builtin": "Integradas",
+ "drawer_mcp_title": "Torre de Relé",
+ "drawer_mcp_hint": "Los servidores MCP que alcanza esta app. La antena gira mientras un agente llama a uno.",
+ "mcp_group_stdio": "Local (stdio)",
+ "mcp_group_http": "Remoto (HTTP)",
+ "drawer_cli_title": "Cantina de Terminales",
+ "drawer_cli_hint": "Las CLIs de programación y sus asientos. Un agente se sienta aquí en un terminal mientras corre una sesión.",
+ "cli_group_connected": "Conectadas",
+ "cli_group_installed": "Instaladas, sin conectar",
+ "cli_group_missing": "No instaladas",
"place_market": "Plaza del Mercado",
"place_hub": "Centro Jarvis",
"place_workshop": "Taller",