diff --git a/lat.md/lat.md b/lat.md/lat.md index 3e103331d..8c1635da7 100644 --- a/lat.md/lat.md +++ b/lat.md/lat.md @@ -25,4 +25,5 @@ This directory defines the high-level concepts, business logic, and architecture - [[office-3d-interiors]] — enterable office/bank/showroom interiors: per-location conditional mounting (city unmounts while indoors), camera fly-in rig, interactable objects (ATM → wallet, desk → agent, car → spec card), and idle-agent walking trips between buildings. - [[office-3d-walk-mode]] — GTA-style walk mode: glass roofs over the enterable buildings, the user's own third-person avatar (WASD + chase camera, shared crowd/collision), doorway-driven interior loading, and proximity Press-E interactions. - [[office-interactions]] — space representatives: interactive bank tellers whose menu runs account status, balances, and account creation against the hermes-one backend for a chosen agent; the extensible pattern for future spaces (showroom sales, building space). +- [[office-world-actions]] — chat-commanded errands: the agent's LLM emits world-action blocks from the office chat, its avatar walks the trip route to the bank/showroom, and the rep modal auto-opens running the requested action on arrival. - [[mcp-servers]] — add / edit / remove / enable / test MCP servers from the Capabilities → MCP tab; the shared add+edit modal and the in-place atomic `updateMcpServer` upsert (config.yaml locally, gateway REST in Remote/SSH). diff --git a/lat.md/office-3d-interiors.md b/lat.md/office-3d-interiors.md index 0f865b947..2c21d8771 100644 --- a/lat.md/office-3d-interiors.md +++ b/lat.md/office-3d-interiors.md @@ -56,6 +56,8 @@ Everything lives in [[src/renderer/src/screens/Office/office3d/core/collision.ts Blocked walkers wall-follow: when the push-out cancels a step, the walker commits to a short slide along the blocking face's tangent — signed toward its goal, re-derived at corners — with goal steering suspended for the burst. (A per-frame perpendicular nudge is not enough: the goal pull re-pins the walker against the face each frame, walking in place forever — the original stuck-at-desk bug.) The static resolver exposes its push normal for this via `resolveStaticColliders`' `pushOut`. +Wall-follow handles convex obstacles only — in a concave pocket (a wall corner plus furniture) the two faces re-derive opposite slides every frame and the walker deadlocks in place. Doorways are therefore routed explicitly: [[src/renderer/src/screens/Office/office3d/core/routing.ts#routeTarget]] makes every room crossing a two-hop "door gate" (near-side gate point first, then the far side), so the wall-crossing hop passes through the door gap from any start position. The CEO office's own doorway is routed before the divider — a CEO→east walk that aims at the partition door first pins against the glass (the stuck-in-the-corner bug, exposed when [[office-world-actions|chat-commanded missions]] started walks from arbitrary desks). [[src/renderer/src/screens/Office/office3d/core/routing.test.ts]] walks the previously-deadlocking routes hop by hop and asserts no hop segment crosses an interior wall. + Desk seats add a structural rule: agents approach the chair from the open side — up the desk-free aisle between desk columns, then across at seat height (`deskApproachByAgent` in AgentsLayer) — so the everyday sit-down never depends on obstacle avoidance at all. Trip/NPC waypoints sit clear of all colliders with looser arrival radii so a crowded waypoint can't strand anyone. Pedestrians register in the same crowd as visiting agents, so the two populations avoid each other too; standing staff participate as static circles. ## Agent trips @@ -64,6 +66,6 @@ Idle agents occasionally walk out of the office to the bank or showroom, wander The canvas↔world mapping ([[src/renderer/src/screens/Office/office3d/core/geometry.ts#worldToCanvas]]) is linear, so waypoints far outside the office's 0..1800 rectangle work unchanged — no second coordinate system. -The controller in [[src/renderer/src/screens/Office/office3d/objects/AgentsLayer.tsx#AgentsLayer]] adds a "trip" mode (phases out → wander → back) beside toSeat/seated. Only idle (non-working) seated agents start trips, capped at `TRIP_MAX_TRAVELLERS`; if an agent's gateway starts mid-trip it walks the route home in reverse rather than teleporting. Each agent's `place` ("office" | "bank" | "showroom" | "outside") is derived from route progress. +The controller in [[src/renderer/src/screens/Office/office3d/objects/AgentsLayer.tsx#AgentsLayer]] adds a "trip" mode (phases out → wander → back) beside toSeat/seated. Only idle (non-working) seated agents start trips, capped at `TRIP_MAX_TRAVELLERS`; if an agent's gateway starts mid-trip it walks the route home in reverse rather than teleporting. Each agent's `place` ("office" | "bank" | "showroom" | "outside") is derived from route progress. Trips can also be commanded from the office chat — a mission replaces the wander with a "visit" at a named interaction stop; see [[office-world-actions#Office World Actions#Commanded trips]]. The simulation always runs for every agent; the `visiblePlace` prop only toggles per-agent wrapper-group visibility each frame, so each interior view shows exactly the agents actually in that building and the city view shows everyone, including walkers on the street. diff --git a/lat.md/office-interactions.md b/lat.md/office-interactions.md index 48f588151..2b36e3bc8 100644 --- a/lat.md/office-interactions.md +++ b/lat.md/office-interactions.md @@ -2,7 +2,7 @@ Interactables in the Office tab's bank that agents do business with. Clicking the bank teller or the self-service ATM opens a shared action modal (balances, account status, and more) run against the hermes-one backend for the chosen agent. -The bank is the first transaction space; future spaces (car showroom sales, building space) reuse the same pieces: a registry entry, an [[src/renderer/src/screens/Office/office3d/objects/Interactable.tsx#Interactable]] hookup in the interior, and action wiring in the panel. Coming-soon actions (the ATM's withdraw/deposit) are registered with a `disabled` flag and render as muted "Soon" chips until their flows land. +The bank is the first transaction space; future spaces (car showroom sales, building space) reuse the same pieces: a registry entry, an [[src/renderer/src/screens/Office/office3d/objects/Interactable.tsx#Interactable]] hookup in the interior, and action wiring in the panel. Coming-soon actions (the ATM's withdraw/deposit) are registered with a `disabled` flag and render as muted "Soon" chips until their flows land. Beyond clicking, the panel can also be opened by an agent itself: a chat-commanded errand walks the agent to the rep and auto-opens the panel with the requested action — see [[office-world-actions]]. ## Representative Registry @@ -22,6 +22,8 @@ A centered modal shared by every representative (bank teller, ATM): a dimmed bac [[src/renderer/src/screens/Office/RepInteractionPanel.tsx#RepInteractionPanel]] takes the rep, the agent list, and an initial agent. Office passes `selectedId ?? defaultAgentId`, where `defaultAgentId` is the active profile (the `profile` prop, matched by agent id) or the first agent — so the picker opens pre-selected on the current profile instead of an empty "Choose an agent…". It renders a fixed inset-0 backdrop (dismiss on backdrop click or Escape) centering the card; the card fades/scales in on mount and its layout is self-contained inline styles (not Tailwind classes) so positioning can't break. The header identity is per-representative: a `REP_ICONS` glyph (bank landmark for the teller, card for the ATM), the rep's name, a live status line with a green dot (teller "Open · serving {agent}", ATM "Online · {agent}") and an agent-picker chip (an avatar + native `