an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions
HTML agent-harnessagent-orchestrationagentsai-agentsautonomous-agentsclaude-codecodexcoding-agentsdesktop-appdeveloper-toolselectrongemini-cliharnessharness-engineeringlocal-firstmemorymulti-agentopencodeorchestrationtypescript
inception
Chaitanya Giridc7f1ce7880e
diff --git a/.gitignore b/.gitignorenew file mode 100644index 00000000..9ba929ab--- /dev/null+++ b/.gitignore@@ -0,0 +1,8 @@+node_modules/+out/+dist/+.DS_Store+*.log+.vite/+.env+.env.localdiff --git a/DESIGN.md b/DESIGN.mdnew file mode 100644index 00000000..a6a1ee5b--- /dev/null+++ b/DESIGN.md@@ -0,0 +1,708 @@+# Claude Terminal Harness — Design System++> The aesthetic is **Animal Crossing × Earthbound × SNES menu UI**. Pixel-snapped, chunky, friendly. Every UI element should feel like it could appear in a Nintendo game from 1995–2005. This document is canonical: any new component must derive from these tokens.++---++## 1. Principles++1. **Pixel-snapped everything.** No half-pixels. No CSS blur. No floaty `border-radius`. The grid is real.+2. **Chunky over slick.** Borders are visible, panels have weight, buttons feel pressable. If a component could exist on iOS 17, it's wrong.+3. **Limited palette.** Each screen uses ≤ 8 colors. Each sprite uses ≤ 5. Restraint creates the look.+4. **Information through motion.** An avatar walking *is* the status. Don't add a progress bar if the walk already communicates.+5. **Friendly, never cute-for-its-own-sake.** Copy is short and human. Avoid baby talk. Think Tom Nook's signage, not Saturday morning cartoons.+6. **Read like a 90s game manual.** Heavy use of named panels, framed groups, status windows. Information has a *home*.++### What we are NOT+- Not glassmorphism. Not Material. Not iOS. Not "modern web." Not "retro filter on a normal app."+- Not pixel art for its own sake — every pixel choice serves a UX function.++---++## 2. References (study these)++| Reference | What we steal |+|---|---|+| **Animal Crossing: New Leaf / NH** | Villager characters, soft palette, friendly copy, dialog boxes |+| **Earthbound / Mother 3** | Status windows, multi-layer panel borders, vibrant flat colors |+| **Stardew Valley** | Font choice, tile floors, sprite proportions |+| **Pokémon B/W & X/Y** | Clean info panels, summary screens |+| **Mario Kart 8 (HUD only)** | Coin/timer chips, vibrant accents on neutral backgrounds |+| **Undertale** | Terminal-style typography for system feedback |+| **Stardew Concerned Ape sprites** | Walk cycles, station design |+| **SNES Final Fantasy VI menus** | Three-layer panel borders, cornered headers |++---++## 3. Color system++All colors specified in `#RRGGBB`. Token names use a `--cth-<category>-<weight>` pattern (CSS variables) and a parallel TypeScript `tokens.colors.<category>.<weight>` (objects).++### 3.1 Base (panels, floors, surfaces)++| Token | Hex | Use |+|---|---|---|+| `cream-50` | `#FFFDF5` | Lightest highlight, dialog box innermost |+| `cream-100` | `#FFF8E7` | Default panel fill |+| `cream-200` | `#F4E9C7` | Inset / alt row |+| `cream-300` | `#E8D9A0` | Disabled fill |+| `paper-100` | `#FCFAF0` | Terminal background |+| `paper-200` | `#F0EAD2` | Subtle panel variant |++### 3.2 Ink (text, outlines)++| Token | Hex | Use |+|---|---|---|+| `ink-900` | `#1A1320` | Body text, outer borders. **Never use `#000`.** |+| `ink-700` | `#3D2E4A` | Secondary text, middle border layer |+| `ink-500` | `#6B5878` | Tertiary text, disabled borders |+| `ink-300` | `#A899B5` | Placeholder, hairline dividers |+| `ink-100` | `#D9CFE0` | Subtle separators |++### 3.3 Agent accents (vibrant, character colors)++Saturated and warm. Each avatar gets one — the strip badge, the agent's chat selection highlight, their nameplate.++| Token | Hex | Mnemonic |+|---|---|---|+| `coral` | `#FF6B6B` | Mario red |+| `coral-light` | `#FFB4B4` | |+| `mint` | `#6BCF7F` | 1UP green |+| `mint-light` | `#B4E5BD` | |+| `sky` | `#4ECDC4` | Wind Waker ocean |+| `sky-light` | `#A8E6E0` | |+| `lemon` | `#FFD93D` | Pikachu |+| `lemon-light` | `#FFEC99` | |+| `lilac` | `#B197FC` | Psychic-type |+| `lilac-light` | `#D6C5FF` | |+| `peach` | `#FFA07A` | Princess Peach |+| `peach-light` | `#FFD0B5` | |++### 3.4 Status (system semantics)++| Token | Hex | Means |+|---|---|---|+| `status-idle` | `#A899B5` | Agent at desk, awaiting |+| `status-thinking` | `#4ECDC4` | Reasoning + en route to a station |+| `status-working` | `#FFD93D` | At a station, using a tool |+| `status-blocked` | `#FF6B6B` | Notification fired, needs user |+| `status-success` | `#6BCF7F` | Just finished |+| `status-ghost` | `#D9CFE0` | Pane closed, fading out |++### 3.5 World (the floor itself)++| Token | Hex | Use |+|---|---|---|+| `grass-light` | `#D4EAB0` | Light tile |+| `grass-dark` | `#B5D589` | Dark tile (checkerboard) |+| `wood-light` | `#E5C896` | Room floor light tile |+| `wood-dark` | `#C9A66B` | Room floor dark tile |+| `path` | `#E8D8B0` | Pathways between rooms |+| `wall` | `#8B6F47` | Room walls (3px stroke) |++### 3.6 Gradient bans++No gradients except: vertical 2-stop on title bars (`cream-100` → `cream-200`). That's it. Every other surface is flat.++---++## 4. Typography++Three fonts, all loaded from Google Fonts. **Every text element must declare a font from this set.** No system fonts.++| Role | Family | Why |+|---|---|---|+| **Display** | `Press Start 2P` | NES-iconic, headings only, 8/12/16 px |+| **UI** | `Pixelify Sans` | Modern readable pixel font, body/labels |+| **Mono / terminal** | `VT323` | CRT terminal feel, large x-height |++### 4.1 Type scale (all px integers)++| Token | Size | Line height | Use |+|---|---|---|---|+| `display-lg` | 16 / `Press Start 2P` | 24 | App title, screen titles |+| `display-md` | 12 / `Press Start 2P` | 20 | Section headers, modal titles |+| `display-sm` | 8 / `Press Start 2P` | 12 | Badges, chip labels |+| `body-lg` | 18 / `Pixelify Sans` | 24 | Primary body |+| `body-md` | 16 / `Pixelify Sans` | 20 | Default UI text |+| `body-sm` | 14 / `Pixelify Sans` | 18 | Secondary, captions |+| `mono-md` | 16 / `VT323` | 20 | Terminal stream |+| `mono-sm` | 14 / `VT323` | 18 | Inline log lines, paths |++### 4.2 Weight+All fonts ship in a single weight. **Never bold.** For emphasis: use color (`ink-900` vs `ink-500`) or a chip/badge.++### 4.3 Case+- Display fonts: **TITLE CASE**, never ALL CAPS (Press Start 2P is already loud).+- UI fonts: Sentence case.+- Status badges: lowercase ("working", "thinking", "blocked").++### 4.4 Letter spacing+- Press Start 2P: `0` (already wide enough).+- Pixelify Sans: `0`.+- VT323: `0`.+Never add letter-spacing — it breaks the pixel grid.++---++## 5. Spacing & grid++Base unit: **4 px**. Every margin, padding, gap, position must be a multiple of 4. No exceptions outside sprite-internal art.++| Token | px |+|---|---|+| `space-0` | 0 |+| `space-1` | 4 |+| `space-2` | 8 |+| `space-3` | 12 |+| `space-4` | 16 |+| `space-5` | 24 |+| `space-6` | 32 |+| `space-7` | 48 |+| `space-8` | 64 |++### Layout++- Main window minimum: 1280 × 800.+- Standard gutter: 16 px (`space-4`).+- Panel internal padding: 12 px (`space-3`).+- Floor canvas: dynamically sized, but tile grid is 32 × 32 px (one game tile).++### Pixel snapping++- All `transform: translate(...)` values must be integers.+- `imageRendering: pixelated` on every `<canvas>` and any rendered sprite `<img>`.+- Zoom levels are integer scales (1×, 2×, 3×) — never 1.5×.++---++## 6. Borders & panels++The SNES three-layer border is foundational. Every panel uses it.++### 6.1 Anatomy++```+┌────────────────────────────────┐ ← outer: ink-900, 2px+│┌──────────────────────────────┐│ ← middle: cream-200, 2px+││┌────────────────────────────┐││ ← inner: ink-700, 1px+│││ │││+│││ panel content │││ ← fill: cream-100+│││ │││+││└────────────────────────────┘││+│└──────────────────────────────┘│+└────────────────────────────────┘+```++CSS implementation: nested `box-shadow inset` rather than nested DOM. No `border-radius`. Total border weight: 5 px on each side.++### 6.2 Panel variants++| Variant | Outer | Middle | Inner | Fill | Use |+|---|---|---|---|---|---|+| `panel/default` | `ink-900` | `cream-200` | `ink-700` | `cream-100` | Standard |+| `panel/inset` | `ink-700` | `cream-100` | `ink-500` | `cream-200` | Recessed area |+| `panel/active` | `ink-900` | accent | `ink-700` | `cream-100` | Selected agent, focused input |+| `panel/terminal` | `ink-900` | `ink-700` | `ink-500` | `paper-100` | Terminal background |+| `panel/dialog` | `ink-900` | `cream-200` | `ink-700` | `cream-50` | Modals, notifications |++### 6.3 Corner cuts++Optional. Adds an 8-bit "rounded corner" feel by clipping 2 px squares from each corner. Implementation: SVG `clip-path` or four absolute-positioned 2 × 2 squares matching the parent background. Reserved for: dialogs, the main app frame.++### 6.4 Drop shadow++The only shadow allowed is a **hard offset**: 4 px right, 4 px down, `ink-900` at 25% opacity. No blur. Used on: modals, toasts, dragging avatars.++```css+filter: drop-shadow(4px 4px 0 rgba(26, 19, 32, 0.25));+```++Or as a sibling block element absolutely positioned 4 px offset.++---++## 7. Components++Every component is spec'd by its anatomy, states, props, and example.++### 7.1 `<PixelPanel>`++Foundational container.++```+Props:+ variant 'default' | 'inset' | 'active' | 'terminal' | 'dialog'+ title? string — renders titlebar+ accent? AccentColor — applies to title bar + middle border if active+ children ReactNode++States:+ default — as drawn+ hover — no change (panels don't hover; only buttons do)+ focused — middle border becomes accent, 1px wider+```++### 7.2 `<PixelButton>`++3D pressable. Defaults to chunky.++```+Props:+ variant 'primary' | 'secondary' | 'ghost' | 'destructive'+ size 'sm' (24h) | 'md' (32h) | 'lg' (40h)+ icon? IconName+ children ReactNode++States:+ default — top edge bright, bottom edge dark+ hover — fill becomes light variant of variant color+ active — translate(0, 2px), bottom edge disappears (pressed)+ disabled — fill = cream-300, ink-500 text, no press affordance+ focus — 2px ink-900 outline at +2px offset++Primary: fill = ink-900, text = cream-50+Secondary: fill = cream-100, text = ink-900, border = ink-900+Ghost: no fill, border = ink-500, text = ink-700+Destructive: fill = coral, text = cream-50+```++### 7.3 `<PixelBadge>` (status chip)++```+Props:+ status 'idle' | 'thinking' | 'working' | 'blocked' | 'success' | 'ghost'+ label string+ icon? IconName++Anatomy: 8 px tall pixel dot + space-1 + lowercase Pixelify Sans 14 px.+Color: status palette. Background: status-color at 20% opacity over cream-100.+```++### 7.4 `<AgentCard>` (bottom strip)++```+Width: 200 px. Height: 80 px. Panel variant: default.+Top row: sprite portrait (32 × 32) + name (body-md) + status badge.+Mid row: current project name (body-sm, ink-500), current tool/action.+Bottom row: 8-segment progress dots (filled = work units in current step).++Selected state: panel/active variant with agent's accent color.+```++### 7.5 `<CommandBar>`++```+Anatomy: PixelPanel inset variant.+Contains:+ - prompt prefix "> " (mono-md, agent's accent)+ - text input (mono-md, no border)+ - send button (primary, size-md, icon: arrow)+ - mode tabs above: [Free] [/skill] [Quick]++States:+ - typing — caret = 2px wide block, blinks 500ms+ - busy — input border tints lemon (agent is working)+ - blocked — input border tints coral with helper text+```++### 7.6 `<TerminalView>`++```+PixelPanel terminal variant.+xterm.js with theme:+ background = paper-100+ foreground = ink-900+ cursor = coral+ selection = lemon-light+ ansi colors: see §11+Font: VT323 16 px.+Top edge: 2px dashed ink-300 line, label "live · pipe-pane" in mono-sm.+```++### 7.7 `<Toast>` (notification)++```+PixelPanel dialog variant, 320 px wide.+Top: 12 px stripe of agent's accent color.+Body: avatar portrait (24 × 24) + message (body-md, max 3 lines).+Actions row: two buttons max.+Drop shadow (hard 4/4).+Slide in from top-right, snap (no easing past first frame).+Auto-dismiss only for non-blocking. Blocking notifications wait for user.+```++### 7.8 `<RoomLabel>` (signpost over each project room)++```+Signpost: 8 px wood post + plank.+Plank: cream-200 fill, ink-900 outline, display-sm text.+Reads "project: <basename>". Positioned at top-left of each room.+Functionally a pixel sprite, not HTML.+```++### 7.9 `<ConfigDrawer>`++```+Slides in from right (240 ms snap, no easing).+Width: 480 px.+Title bar: display-md + close button.+Sections (collapsible): Identity, Goal, Runtime, Skills, MCP, Hooks.+Each section header: ink-900 + 2px underline + accent dot.+```++### 7.10 `<Modal>`++```+PixelPanel dialog variant.+Backdrop: ink-900 @ 60% opacity. NO blur.+Position: centered. Snap-in (200 ms ease-out scale 0.92 → 1.0).+Always has close button top-right and at least one action button bottom-right.+```++---++## 8. Avatar sprites++The whole product hinges on these. Spec is exact.++### 8.1 Grid++- **24 × 24 px** sprite cell.+- Walk cycle: **4 frames** (idle, step-A, idle, step-B). Each frame 24 × 24.+- Animation: 8 fps (125 ms per frame).+- Directions: **4 cardinal** (down, up, left, right). Diagonals are computed at runtime by selecting the dominant axis.++### 8.2 Anatomy++```+0123456789012345678901234 (x)+ ▓▓▓▓▓▓▓▓ row 4-5: hair+ ▓░░░░░░░░░▓ row 6-9: head, skin+ ▓░██░░░██░▓ row 8: eyes+ ▓░░░░░░░░░▓ row 10: mouth/cheeks+ ▓▓▓▓▓▓▓▓ row 11: jaw+ ▓░░░░░░░▓ row 12-17: torso, outfit+ ▓░██░██░▓ outfit detail+ ▓░██░██░▓+ ▓░░░░░░░▓+ ▓░░░░░▓ row 18-22: legs+ ▓░░ ░░▓ walk: alternating+ ▓▓ ▓▓ feet+```++### 8.3 Per-avatar palette (4 colors max)++Each avatar uses **exactly 4 sprite colors** (plus `ink-900` outline = 5 total slots):++| Slot | Role |+|---|---|+| `skin` | face, hands |+| `hair` | top of head |+| `primary` | main outfit color |+| `accent` | outfit detail (collar, belt) |++The agent's **accent palette token** (from §3.3) drives `primary`.++### 8.4 Starter character archetypes++Built-in sprite presets. Each has its own outfit pattern.++| Archetype | Vibe | Outfit notes |+|---|---|---|+| `scientist` | Lab researcher | White coat panel down center, square glasses (2px black on row 8) |+| `wizard` | Magic mode | Pointed hat (rows 2-5 above head), star on chest (row 14) |+| `astronaut` | Explorer | Helmet (3px ring around head), antenna pixel on top |+| `cat-villager` | Animal Crossing | Triangle ears (rows 3-4), tail visible behind torso |+| `hacker` | Hoodie | Hood drape down sides of head, headphones (2px black on rows 6-7 sides) |+| `ninja` | Stealth | Mask covering lower face, ninja headband |++### 8.5 Walk cycle++Frame 0 (idle): feet aligned, slight droop (y+0)+Frame 1 (step-A): left foot raised 1 px (y-1), right foot planted (y+0)+Frame 2 (idle): same as frame 0+Frame 3 (step-B): right foot raised 1 px, left foot planted++Walking adds a sin-wave bob to the whole sprite: ±1 px on y, sampled at 8 fps phased with the foot cycle. This is the Stardew Valley walk feel.++### 8.6 Status overlays++Drawn above sprite, 8 × 8 px:++| State | Overlay |+|---|---|+| `thinking` | 3 dots cycling (`...`) at +2 above head |+| `blocked` | Pulsing `!` mark (coral), 2-frame blink |+| `success` | Sparkle (4-frame star burst) |+| `attention` | Wave hand (drawn into right-arm slot, 2-frame loop) |+| `ghost` | Sprite opacity 50%, no overlay |++### 8.7 Movement++- Speed: 80 px / sec when walking.+- Pathing: A* on a 32 × 32 px tile grid. For MVP: simple lerp toward target tile center.+- Bob: `y += sin(t * 8π) * 1` while walking; `0` while standing.++### 8.8 Carrying artifacts++When walking back from a station after a tool result, the avatar carries a **token** above its hands:++| Tool | Token |+|---|---|+| `Read` / `Edit` / `Write` | 6 × 8 px folded paper (cream-50 + ink-700 outline) |+| `Bash` | 6 × 6 px terminal `>_` (ink-900 fill) |+| `WebFetch` / `WebSearch` | 6 × 6 px globe (sky + mint) |+| `Grep` / `Glob` | 6 × 6 px magnifier (ink-900 + cream-50) |+| MCP tool | 6 × 6 px diamond in MCP server's color |+| `TodoWrite` | 6 × 8 px checklist sprite |++Token is dropped onto desk on arrival (3-frame fade).++---++## 9. Stations (the workshop)++Stations are 64 × 64 px structures placed inside each room.++### 9.1 Catalog++| Station | Purpose | Visual |+|---|---|---|+| **Desk** | Per-avatar home | 32 × 32 wooden desk with mini laptop, chair |+| **File shelf** | Read/Edit/Write | 64 × 48 bookshelf, 3 rows of 4 books each in random palette |+| **Terminal station** | Bash | 32 × 48 CRT monitor on a table, blinking caret |+| **Web portal** | WebFetch/Search | 48 × 48 archway, lilac swirl gradient (animated) |+| **MCP corner** | Any `mcp__*` | 48 × 48 modular shelf; mini-icon per MCP server placed on it |+| **Task board** | TodoWrite | 32 × 48 corkboard with sticky notes (3-color rotation) |+| **Mailbox** | Notification | 16 × 24 pole mailbox; flag UP when notification pending |++### 9.2 Station states++Each station has 3 states:++1. **Idle** — static sprite+2. **In use** — 2-frame animation, +sparkle particles around it+3. **Highlighted** — when hovered or when its avatar is approaching (1 px white outline added)++### 9.3 Placement++Within a room (a project), stations are arranged in a fixed pattern:++```+┌───── project: <name> ──────────────┐+│ [shelf] [terminal] [web] │+│ │+│ · · · · │ ← pathways (path color tiles)+│ │+│ [desks of agents in this project] │+│ │+│ [board] [mailbox] [mcp] │+└────────────────────────────────────┘+```++Room min size: 480 × 320 px. Room grows to fit number of agents (extra desk row every 4 agents).++---++## 10. Iconography++16 × 16 px pixel icons. 2 colors max (ink + accent). All icons hand-crafted.++### 10.1 Required icon set++| Name | Use | Colors |+|---|---|---|+| `gear` | Configure | ink-900 + ink-300 |+| `plus` | Add | ink-900 + mint |+| `x` | Close / cancel | ink-900 + coral |+| `check` | Confirm | ink-900 + mint |+| `arrow-right` | Send / next | ink-900 + sky |+| `pause` | Stop / pause | ink-900 + lemon |+| `play` | Resume | ink-900 + mint |+| `bell` | Notification | ink-900 + peach |+| `folder` | Project | ink-900 + lemon |+| `terminal` | Terminal | ink-900 + mint |+| `code` | File / code | ink-900 + sky |+| `web` | Web tool | ink-900 + lilac |+| `mcp` | MCP server | ink-900 + lilac |+| `sparkle` | Success | ink-900 + lemon |++### 10.2 Implementation++Icons live as inline SVG `<svg viewBox="0 0 16 16">` components, all paths drawn at integer coordinates. `image-rendering: pixelated`. Scale via `transform: scale(N)` integer only.++---++## 11. Terminal (xterm.js) theme++```ts+{+ background: '#FCFAF0',+ foreground: '#1A1320',+ cursor: '#FF6B6B',+ cursorAccent: '#FCFAF0',+ selectionBackground: '#FFEC99',+ selectionForeground: '#1A1320',++ black: '#1A1320',+ red: '#FF6B6B',+ green: '#6BCF7F',+ yellow: '#FFD93D',+ blue: '#4ECDC4', // we use sky as our blue+ magenta: '#B197FC',+ cyan: '#4ECDC4',+ white: '#FFF8E7',+ brightBlack: '#6B5878',+ brightRed: '#FFB4B4',+ brightGreen: '#B4E5BD',+ brightYellow: '#FFEC99',+ brightBlue: '#A8E6E0',+ brightMagenta:'#D6C5FF',+ brightCyan: '#A8E6E0',+ brightWhite: '#FFFDF5',+}+```++Font: `VT323`, 16 px, line-height 1.++---++## 12. Motion++### 12.1 Durations++| Type | ms | Easing |+|---|---|---|+| UI snap-in (modal, drawer) | 200 | cubic-bezier(.2, .8, .2, 1) |+| Hover state | 0 | none — instant |+| Button press | 0 | none — instant translate |+| Toast slide | 200 | cubic-bezier(.2, .8, .2, 1) |+| Sprite walk | continuous | sin-wave bob @ 8 fps |+| Sprite frame | 125 ms each | step (no easing) |+| Avatar teleport (room change) | 400 | step — fade-out, move, fade-in |++### 12.2 Forbidden motion+- No spring physics on UI.+- No bouncing.+- No parallax.+- No ambient idle animations on static UI panels.++Animation belongs to the **game layer** (avatars, stations, particles). The UI layer is largely still.++### 12.3 Particles++Used sparingly:++- **Sparkle** on task complete: 4 pixel stars burst out from desk, 250 ms total+- **Dust** when an avatar lands at a station: 3 pixel dots arc out, gravity-influenced, 300 ms+- **Pulse** on mailbox flag: every 800 ms, 1-frame `+1 px scale` on the flag++---++## 13. Sound (deferred — spec only)++8-bit SFX in this order of priority:++1. `agent-arrives.wav` — bloop on station arrival+2. `task-complete.wav` — 3-note major-third jingle+3. `notification.wav` — single chime+4. `button-press.wav` — soft click+5. `error.wav` — descending buzz+6. `mailbox-flag.wav` — flag-up clack++All sounds capped at 200 ms, mono, 22 kHz. Off by default; user can enable in preferences.++---++## 14. Voice & copy++### Tone+Friendly, brief, factual. Imagine an Animal Crossing villager who happens to be technically literate.++### Examples (do / don't)++| Don't | Do |+|---|---|+| "Agent is currently performing a Read operation on SPEC.md" | "Ada is reading SPEC.md" |+| "An error has occurred" | "Ada hit a snag" |+| "The agent has completed the task" | "Ada is done!" |+| "Permission denied" | "Ada needs your permission" |+| "Confirm operation" | "Sure?" |+| "Loading..." | "One sec..." |++### Always+- Use the avatar's name. Never "the agent."+- Keep system feedback under 12 words.+- Use second person to the user ("Ada needs you to take a look").++### Never+- Emojis in copy. We have icons.+- Exclamation marks except for completions and notifications.+- Apostrophe-free contractions ("dont"). Use proper punctuation.++---++## 15. Layout templates++### 15.1 Main view++```+┌─────────────────────── App title bar (display-md) ──────────────────────┐+├──────────────────────────────────────────┬─────────────────────────────┤+│ │ │+│ Floor canvas (Pixi) │ Selected agent panel │+│ — fills remaining width │ — 360 px wide │+│ │ - portrait + name │+│ │ - terminal view │+│ │ - command bar │+│ │ - status badge │+│ │ │+├──────────────────────────────────────────┴─────────────────────────────┤+│ Agent strip — horizontal scroll of <AgentCard>s, 80 px tall │+└─────────────────────────────────────────────────────────────────────────┘+```++Min window: 1280 × 800. Right panel collapses below 1024 to bottom drawer.++### 15.2 Z-index layers++| Layer | z | Contents |+|---|---|---|+| 0 | floor canvas |+| 1 | UI chrome (panels, strip) |+| 2 | drawer / sidebar |+| 3 | toasts |+| 4 | modals |+| 5 | tooltips |++---++## 16. Token files++All tokens live in two synced files:++- `src/renderer/design/tokens.css` — CSS custom properties for use in any styled element.+- `src/renderer/design/tokens.ts` — TypeScript objects for use in Pixi.js and inline styles.++Both files import from a single source-of-truth `tokens.json` at build time (future work). For MVP, hand-keep them in sync.++---++## 17. Accessibility notes++- Pixel fonts are inherently harder to read at small sizes — never go below 14 px for any user-facing text.+- Color contrast: every text/background pair in this doc passes WCAG AA (4.5:1) — verify when adding new pairs.+- Status is communicated via **color + icon + position** (avatar location). Never color alone.+- Keyboard navigation: every interactive UI element reachable via Tab; focus state is the 2 px outline (§7.2).+- Reduced motion: when `prefers-reduced-motion: reduce`, sprite bob disabled and walks become instant teleports. Particles disabled.++---++## 18. Open design decisions (revisit)++1. Whether to commission custom sprite art vs continuing programmatic sprites long-term.+2. Dark mode: not in v1 — pixel art with cream backgrounds is the brand. Revisit if requested.+3. Resizable rooms vs fixed grid — currently spec'd fixed; may want to drag-resize rooms.+4. Whether to add ambient floor decorations (flowers, rugs) — yes, low-priority polish.+5. Custom mouse cursor (pixel-style hand) — defer.diff --git a/HIVE.md b/HIVE.mdnew file mode 100644index 00000000..bebb408a--- /dev/null+++ b/HIVE.md@@ -0,0 +1,214 @@+# The Hive — autonomous multi-agent layer++> How the Claude Terminal Harness turns a room full of independent `claude`+> processes into a collaborating, self-coordinating team with persistent memory,+> a shared blackboard, and a "god" orchestrator that runs the floor.++This document is the design source of truth for the agent-collaboration layer. It+sits alongside [`SPEC.md`](./SPEC.md) (terminal/event plane) and+[`DESIGN.md`](./DESIGN.md) (visual system). Code is the source of truth for what's+*built*; this is the source of truth for what we're *building toward*.++---++## 1. What we're building (and what it's called)++Each spawned agent is a real `claude` CLI process with a filesystem, a system+prompt, and a hook lifecycle. We layer four classic patterns on top:++| Behaviour the user asked for | Pattern (the name) |+| --- | --- |+| Per-agent memory file made at spawn, that the agent reads and updates | **Agent long-term memory** (MemGPT/Letta-style self-managed memory) |+| Writing a requirement into another agent's file | **Stigmergy** — coordinating by modifying a shared environment |+| A shared plan multiple agents edit | **Blackboard architecture** (Hearsay-II) |+| "Check after finishing every task" | **Mailbox / actor model** — drain an inbox at a lifecycle point |+| A "god" agent that runs the floor and clarifies for others | **Orchestrator / supervisor** (LangGraph-supervisor-style) |++The umbrella term is a **multi-agent system (MAS)** with **autonomous agent+loops**. The closest academic analogue to this app is Stanford's *Generative+Agents* (Park et al., 2023): Sims-style avatars in a 2D world with a memory+stream, retrieval, reflection, and planning.++---++## 2. Locked design decisions++1. **Git as the coordination/audit layer, single committer.** Everything the+ hive knows is files in one local git repo. To avoid `.git/index.lock`+ corruption with many concurrent agents, **only the Electron main process+ commits**. Agents never call git — they write plain files. (Research:+ GitHub Desktop's commit-queue pattern; lazygit/git-retry backoff.)+2. **Single-writer-per-file.** Each agent writes only inside its own+ `agents/<id>/` directory. Cross-agent delivery happens by the **router**+ (main process) moving messages from a sender's `outbox/` into a recipient's+ `inbox/`. No file is ever written by two processes.+3. **God-mode autonomy with HITL escalation.** A privileged **god agent** (lives+ in Michael's room) adjudicates cross-agent traffic. Routine requests+ (clarifications, data asks, plan tweaks) it resolves itself and the system+ keeps running fully autonomously. Only **critical** items (destructive ops,+ spend, scope changes, unresolvable conflicts) land in a `pending_approvals/`+ queue surfaced in the UI for the human.+4. **Memory: markdown first.** Per-agent `memory.md` + shared blackboard, with a+ SQLite FTS index when keyword recall isn't enough. A heavyweight vector layer+ (Letta/Mem0/Zep) is *not* needed at 5–15 agents and is architecturally wrong+ here (they want to own the agent runtime; our runtime is the `claude` CLI).+ Optional future upgrade: **MemPalace over MCP** (validate its retrieval first —+ its public benchmarks are overstated per independent audit).+5. **Autonomous loop = `Stop` hook.** An agent that finishes drains its inbox via+ a `Stop` hook that returns `{"decision":"block","reason":…}` to keep it+ working, guarded by `stop_hook_active` to prevent infinite loops.++---++## 3. On-disk layout — the "hive"++Lives under `<harnessHome>/hive/`, a git repo committed only by the main process.++```+hive/+ PROTOCOL.md # the agent-facing contract (how to remember + message)+ registry.json # roster: every agent, role, capabilities, status, seat+ board.md # shared blackboard / co-authored plans+ tasks.json # task ledger (id, assignee, spec, status, result ref)+ log.jsonl # append-only event feed (drives the UI activity stream)+ approvals/ # one JSON per item escalated to the human (HITL gate)+ agents/<agentId>/+ identity.md # who am I, my role, my capabilities (read at start)+ memory.md # my long-term memory (I read at start, append as I learn)+ inbox/ # messages delivered TO me — <ts>-<msgid>.json+ inbox/.done/ # processed messages (kept for audit, not deleted)+ outbox/ # messages I want to SEND — router drains these+ cursor.json # { lastProcessed: <msgid> } — avoids reprocessing+```++Design rules that make this robust:+- **One JSON file per message**, written via temp-file + atomic `rename` — never+ a co-edited shared mailbox file (those conflict under git).+- **Append-only** `log.jsonl`; consumers track their own cursor.+- `board.md` is the one genuinely co-edited file — it goes through the god agent+ (single scribe) to avoid conflicts.++---++## 4. Message schema (FIPA-lite)++Borrow the one useful idea from FIPA-ACL/KQML — the **speech act** — and drop the+LISP syntax. Seven semantic fields:++```jsonc+{+ "id": "2026-05-30T14-03-11-123Z-a1b2", // unique, time-sortable+ "conversation": "conv-7f3", // groups a thread+ "in_reply_to": "<prev msgid> | null",+ "from": "agent.researcher",+ "to": "agent.coder | god | broadcast",+ "act": "request | inform | propose | query | agree | refuse | done",+ "subject": "short human-readable summary",+ "body": "free text / markdown / structured payload",+ "hops": 3, // ++ per reply; capped to kill ping-pong loops+ "requires_reply": true, // only request/query/propose obligate a reply+ "needs_human": false, // router/god may flip this to escalate+ "created_at": "ISO-8601"+}+```++Anti-livelock rules: only `request`/`query`/`propose` obligate a reply (pure+`inform`/`done` are terminal); every reply increments `hops`; past a hop cap the+god agent escalates instead of letting two agents loop forever; re-seeing a+processed `id` is a no-op (idempotent via cursor).++---++## 5. Control flow++```+agent B mid-task needs something from agent C+ │ writes agents/B/outbox/<msg>.json (act:request, to:C)+ ▼+┌─────────────────────── main process (the harness) ───────────────────────┐+│ Router watches every outbox/ │+│ → god adjudication: routine? ──yes──► deliver to agents/C/inbox/ │+│ critical? ──────► approvals/ (UI asks human) │+│ → append to log.jsonl → git commit (single committer, retry+backoff) │+└──────────────────────────────────────────────────────────────────────────┘+ │ delivered to C's inbox+ ▼+agent C finishes its current turn → Stop hook fires+ │ hook POSTs to the hive socket; main process checks C's inbox+ │ unread messages? → reply {"decision":"block","reason": <messages>}+ ▼+agent C keeps working: reads the messages, acts, replies via its own outbox+```++The same hook socket drives the avatars: `PreToolUse`/`PostToolUse` payloads move+an agent to the right station (replacing today's `mockEvents.ts` / PTY-scraping).++---++## 6. The god agent (orchestrator)++A fixed, always-on agent seated at `desk-ceo` (Michael's room), `character:+michael`, flagged `isGod`. It is an ordinary `claude` process — the *intelligence*+— while the main process is the *mechanism* (git, sockets, routing). It owns:++- **Roster & routing** (`registry.json`): who exists, their capabilities, status.+- **Adjudication**: read each outbound request; resolve routine ones itself+ (answer clarifications, route to the right specialist with a self-contained+ task spec), escalate only critical ones. This is "god mode."+- **Blackboard scribe**: the single writer of `board.md`, so shared plans never+ conflict.+- **Task ledger** (`tasks.json`): assign, track, retry, checkpoint.++Its escalation policy (what counts as "critical") lives in its system prompt and+is the primary control surface — tune the prompt, not the code.++---++## 7. Phased plan++- **Phase 0 — Foundation** ✅: `hive.ts` on-disk layer + spawn injection+ (identity, protocol, env) + IPC to read hive state. Agents are hive-aware: they+ read their memory/inbox at task start and send via outbox; the router delivers;+ everything is committed and visible.+- **Phase 1 — Autonomy** ✅: `hooks.ts` UDS server + `cth-hook` shim (attached per+ agent via `--settings`) + `Stop`-loop so agents drain their inbox automatically+ and keep running (guarded by `stop_hook_active` + cursor); hook events stream to+ the renderer to drive avatars.+- **Phase 2 — God mode** ✅: the god agent auto-spawns into Michael's room+ (`desk-ceo` reserved); the router escalates `needs_human` / `to:"human"` traffic+ to the `approvals/` queue; an Electron approvals panel lets the human approve or+ reject with a note that's relayed back to the asker; idle agents are woken when+ they hold unread inbox messages.+- **Phase 3 — Semantic memory** ✅ (CLI integration): `memory.ts` wraps the+ **MemPalace CLI** (not MCP, by decision). The harness keeps one shared palace+ under `harnessHome`, points every agent's `MEMPALACE_PALACE_PATH` at it, mines+ each agent's `memory.md` into its own wing (mtime-gated), and agents recall via+ `mempalace search` / `wake-up`. Detect-and-degrade: a no-op when `mempalace`+ isn't installed (markdown memory still works). Default model `minilm` (light,+ for low-RAM Macs); `embeddinggemma` is the multilingual opt-in. A `MemoryPanel`+ lets the human search the same palace.+ - *Still open*: reflection/summarization to bound `memory.md`; needs a live+ `mempalace` install to validate retrieval end-to-end.++---++## 8. Key risks & mitigations++| Risk | Mitigation |+| --- | --- |+| `index.lock` corruption | Single committer (main process), retry+backoff, stale-lock cleanup |+| Infinite Stop-hook loop | Guard on `stop_hook_active`; `hops` cap; `CLAUDE_CODE_STOP_HOOK_BLOCK_CAP` |+| Two agents ping-ponging | Only request/query/propose obligate replies; hop cap → god escalates |+| Reprocessing messages | Per-agent `cursor.json`; processed messages move to `inbox/.done/` |+| `memory.md` unbounded growth | Phase 3 reflection/summarization |+| Modifying the user's repo with hooks | Write hooks to `<cwd>/.claude/settings.local.json` (gitignored convention) |++---++## 9. References++- Anthropic — *Building a multi-agent research system* (lead/subagent, plan-to-memory).+- LangGraph supervisor (structured routing + handoff registry + checkpoints).+- FIPA-ACL / KQML (speech acts).+- Stanford *Generative Agents* (memory stream, reflection, 2D world).+- Claude Code hooks reference (`Stop`, `PreToolUse`, `UserPromptSubmit`; `stop_hook_active`).diff --git a/LICENSE b/LICENSEnew file mode 100644index 00000000..c0f01ba7--- /dev/null+++ b/LICENSE@@ -0,0 +1,33 @@+MIT License++Copyright (c) 2026 Chaitanya Giri++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.++---++NOTE ON BUNDLED ART ASSETS++This MIT License applies to the SOURCE CODE of this project. It does NOT apply+to the bundled pixel-art assets under src/renderer/src/assets/ (tilesets, maps,+and character sheets), which originate from LimeZu and are distributed under the+LimeZu FREE VERSION license — non-commercial use only. The recolored sprites+derived from those sheets inherit the same restriction. See+src/renderer/src/assets/ATTRIBUTION.md for details. To use this project+commercially, replace those assets or obtain a paid LimeZu license.diff --git a/README.md b/README.mdnew file mode 100644index 00000000..0b8b3472--- /dev/null+++ b/README.md@@ -0,0 +1,251 @@+# Claude Terminal Harness++> A Nintendo-styled desktop control room for the [Claude Code](https://claude.com/claude-code) agents you run in your terminal.++Each agent you spawn becomes a Sims-style avatar living on a shared 2D office floor. You watch them walk between stations as they work, stream their real terminal output in a side panel, type prompts back to them, and browse their files and git history — all from one window.++<p align="center">+ <em>Electron · React · TypeScript · Pixi.js · xterm.js · node-pty</em>+</p>++<p align="center">+ <a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-FFD93D.svg?style=flat-square&labelColor=1A1320"></a>+ <img alt="Status: prototype" src="https://img.shields.io/badge/status-prototype-FF6B6B.svg?style=flat-square&labelColor=1A1320">+ <img alt="Platform: macOS" src="https://img.shields.io/badge/platform-macOS-4ECDC4.svg?style=flat-square&labelColor=1A1320">+</p>++> [!NOTE]+> **Status: working prototype.** The Electron shell, the office floor, real PTY terminals, and the file/git tooling are all functional. The *avatar behavior* (walking to stations based on which tool an agent is using) is currently driven by a synthetic event loop — see [Architecture](#architecture). Wiring it to real Claude Code hooks is the headline next milestone.++---++## Table of contents++- [What it is](#what-it-is)+- [Features](#features)+- [Screenshots](#screenshots)+- [Getting started](#getting-started)+- [Architecture](#architecture)+- [Project structure](#project-structure)+- [Design system](#design-system)+- [Configuration & data](#configuration--data)+- [Roadmap](#roadmap)+- [Contributing](#contributing)+- [License](#license)+- [Acknowledgements](#acknowledgements)++---++## What it is++- An **Electron desktop app** (macOS-first) that gives you a single pane of glass over multiple Claude Code sessions.+- Each session runs as a real process in a **pseudo-terminal** (`node-pty`) owned by the app's main process. The raw byte stream is rendered with **xterm.js** — byte-for-byte authentic, ANSI and all.+- Each session is also an **avatar** on a Pixi.js "office floor." Avatars walk around, sit at desks, and visit stations.+- A side panel gives you, per agent: the live terminal, a command bar to type back into the session, a sandboxed **file browser + editor** (CodeMirror), and a **git tab** (status, log, commit graph, branches).++### What it is *not* (by design, for now)++- Not a replacement for the `claude` CLI — the CLI is the runtime, this app is the viewer/controller.+- Not a remote dashboard — local sessions only, no auth, no network surface.+- Not an agent-to-agent message bus — avatars don't hand work off to each other yet.++---++## Features++| Area | What works today |+|---|---|+| **Real terminals** | Spawn any command (default: `claude`) in a `node-pty` PTY. Full read/write/resize/kill, live data + exit streaming over IPC, multi-agent. |+| **Office floor** | Pixi.js scene rendering a Tiled office map, camera, recolored character cast, pathfinding, seat assignment, and tool-bubble overlays. |+| **Agent panel** | Per-agent detail panel with terminal view, command bar, and a fullscreen terminal mode. |+| **File browser** | Sandboxed `listDir` / `readFile` / `writeFile` rooted at each agent's cwd, with a file tree and a syntax-highlighting CodeMirror editor (JS/TS, HTML, CSS, JSON, Markdown, Python, YAML). |+| **Git tab** | Branch, working-tree status, commit log, branch list, ahead/behind, and a rendered commit graph. |+| **Onboarding wizard** | First-run setup: pick a harness home, register repositories, choose default command and auto-mode. |+| **Safe quit** | Intercepts Cmd-Q and the red close button when live PTYs exist, and warns before killing them. |+| **Design system** | Fully tokenized SNES/Animal-Crossing aesthetic — pixel panels, buttons, badges, hand-drawn icons. See [`DESIGN.md`](./DESIGN.md). |+| **Avatar behavior** | ⚠️ Driven by a mock event loop (`mockEvents.ts`) — not yet wired to real Claude Code tool events. |++---++## Screenshots++> _Add screenshots/GIFs here._ A short screen recording of avatars walking between stations while a real `claude` session streams in the side panel is the best way to show what this is.++```+docs/+ floor.png ← the office floor with avatars+ agent-panel.png ← terminal + command bar + file/git tabs+```++---++## Getting started++### Prerequisites++- **macOS** (the app is macOS-first; Windows/Linux are untested).+- **Node.js 18+** and npm.+- A **C/C++ toolchain** for building `node-pty`'s native addon — on macOS, install the Xcode Command Line Tools:+ ```bash+ xcode-select --install+ ```+- **[Claude Code](https://claude.com/claude-code)** installed and on your `PATH` if you want agents to actually run `claude` (the default command). Any other command works too.++### Install & run++```bash+git clone <your-fork-url> claudeTerminalHarness+cd claudeTerminalHarness+npm install # postinstall rebuilds node-pty against Electron's ABI+npm run dev # launches the Electron app with hot reload+```++On first launch you'll go through the onboarding wizard, then land on an empty floor. Use **Add agent** to spawn your first session.++### Other scripts++```bash+npm run build # production build via electron-vite+npm run preview # preview the production build+npm run typecheck # type-check both the node (main/preload) and web (renderer) projects+```++> If `node-pty` fails to load after an Electron upgrade, re-run `npm install` (the `postinstall` hook runs `electron-rebuild` against the current Electron ABI).++---++## Architecture++The load-bearing idea is **two data planes** feeding one renderer:++```+┌───────────────────────────────────────────────────────────────┐+│ Electron Renderer (React) │+│ ┌──────────────────┐ ┌──────────────────────────────┐ │+│ │ Office Floor │ │ Terminal + Command Bar │ │+│ │ (Pixi.js) │ │ Files + Git tabs (xterm.js) │ │+│ └─────────▲────────┘ └────────────▲─────────────────┘ │+│ │ avatar state │ pty bytes / fs / git │+└─────────────┼──────────────────────────┼───────────────────────┘+ │ IPC (contextBridge: window.cth)+ ┌──────┴──────────┐ ┌──────┴─────────────┐+ │ Event Plane │ │ Terminal Plane │+ │ (mock today → │ │ node-pty PTYs │+ │ CC hooks v1) │ │ + fs + git │+ └─────────────────┘ └──────▲─────────────┘+ │ stdin / stdout+ ┌──────┴──────────────┐+ │ claude (or any cmd)│+ └─────────────────────┘+```++**Terminal plane (real).** The Electron main process owns a `PtyManager` that spawns each agent as a `node-pty` process, streams its output to the renderer over per-id IPC channels (`pty:data:<id>`), and accepts keystrokes back. The renderer never touches Node directly — everything goes through a typed `window.cth` bridge exposed in [`src/preload/index.ts`](./src/preload/index.ts). The same bridge exposes sandboxed filesystem and git helpers.++**Event plane (mocked).** Avatar state — _which station is this agent walking to, is it thinking/working/blocked_ — is currently produced by a synthetic loop in [`mockEvents.ts`](./src/renderer/src/store/mockEvents.ts). The intended v1 replacement is **Claude Code hooks** (`PreToolUse`, `PostToolUse`, `Notification`, `Stop`, …): a tiny shim CLI installed per project that POSTs hook payloads to a socket the main process listens on, so avatar movement reflects what the agent is _actually_ doing. See [`SPEC.md`](./SPEC.md) for the full design.++> **Note on the spec vs. the code:** [`SPEC.md`](./SPEC.md) originally described attaching to existing **tmux** panes. The implementation has since moved to spawning PTYs **directly** via `node-pty`, which removes the tmux dependency. Treat the code as the source of truth for the terminal plane; the spec remains the reference for the event plane and product vision.++---++## Project structure++```+src/+ main/ Electron main process (Node)+ index.ts window, IPC handlers, quit guard+ pty.ts node-pty manager (spawn/write/resize/kill/stream)+ config.ts harness config persistence + home setup+ fs.ts sandboxed listDir / readFile / writeFile+ git.ts branch / status / log / branches / ahead-behind+ preload/+ index.ts contextBridge → typed `window.cth` API+ index.d.ts renderer-side type declarations+ renderer/+ index.html+ src/+ App.tsx top-level layout + wiring+ design/ tokens.css / tokens.ts / global.css (source of truth)+ components/ PixelPanel, PixelButton, AgentDetailPanel, CommandBar,+ TerminalView, FileTree, CodeEditor, GitTab, CommitGraph, …+ scene/office/ Pixi office floor: OfficeFloor, Character, Camera,+ TiledMapRenderer, pathfinding, ToolBubble, cast, SeatPool+ store/ zustand store + mock event loop + config types+ hooks/ usePtyParser, useTypewriter+ assets/ tilesets, maps, character sheets (see ATTRIBUTION.md)+DESIGN.md canonical design system+SPEC.md product + architecture spec (event plane, vision)+```++---++## Design system++The aesthetic is **Animal Crossing × Earthbound × SNES menu UI** — pixel-snapped, chunky, friendly. [`DESIGN.md`](./DESIGN.md) is canonical; every component derives from its tokens. Highlights:++- Three fonts: **Press Start 2P** (display), **Pixelify Sans** (UI), **VT323** (terminal).+- **4 px** spacing grid, integer-only transforms, no CSS blur, no `border-radius`.+- SNES **three-layer panel borders** via nested `box-shadow inset`.+- Hard **4/4 drop shadows** — no soft shadows anywhere.+- Limited palette: ≤ 8 colors per screen, status communicated by **color + icon + avatar position** (never color alone).+- Tokens live in two synced files: `design/tokens.css` (CSS variables) and `design/tokens.ts` (TS objects for Pixi/inline styles).++---++## Configuration & data++App configuration is a small JSON document (`HarnessConfig`) managed by the main process and read through `window.cth.getConfig()`:++| Field | Meaning |+|---|---|+| `onboardingComplete` | Whether the first-run wizard has been finished. |+| `harnessHome` | Directory the harness uses as its home/workspace root. |+| `registeredRepos` | Repositories the user has registered. |+| `autoMode` | Toggles automatic behavior shown in the title bar. |+| `defaultCommand` | Command spawned for a new agent (default: `claude`). |++Filesystem and git access from the renderer is **sandboxed** — every `fs:*` and `git:*` IPC call is rooted at a given directory and validated in the main process, so the UI can only reach paths under an agent's working directory.++---++## Roadmap++Pulled from [`SPEC.md`](./SPEC.md) §11 and the current mock boundary:++- [ ] **Real event plane** — replace `mockEvents.ts` with Claude Code hooks so avatar movement reflects real tool use.+- [ ] **Hook shim CLI** — a small Node binary installed into a project's `.claude/settings.local.json` that POSTs hook payloads to a local socket owned by the app.+- [ ] **Add-agent flow** — pane/command picker + hook-install consent.+- [ ] **Config drawer** — per-agent goal, model, permission mode, skills, MCP (spec'd in `DESIGN.md` §7.9).+- [ ] **Notification round-trip** — approve/deny an agent's blocking prompt from the floor.+- [ ] **Persistence** — durable agents/layout/command history (SQLite).+- [ ] **Packaging** — signed `.dmg`; revisit Linux/Windows later.++---++## Contributing++Contributions are welcome — this is an early prototype, so there's a lot of surface area.++1. Fork and create a feature branch.+2. `npm install && npm run dev` to get a live build.+3. Keep the type-checker green: `npm run typecheck`.+4. Match the existing aesthetic — **any new UI must derive from [`DESIGN.md`](./DESIGN.md) tokens**, not ad-hoc colors or spacing.+5. Open a PR describing the change and, for anything visual, include a screenshot or short clip.++Good first areas: wiring real hook events, the add-agent flow, the config drawer, and cross-platform smoke-testing.++---++## License++> [!IMPORTANT]+> **Asset licensing:** the bundled pixel art (tilesets, maps, and the base character sheets that the Office cast is recolored from) comes from [LimeZu](https://limezu.itch.io/) via [`shahar061/the-office`](https://github.com/shahar061/the-office) and is distributed under the **LimeZu FREE VERSION license — non-commercial use only**. The recolored sprites are derivative edits and inherit that restriction. See [`src/renderer/src/assets/ATTRIBUTION.md`](./src/renderer/src/assets/ATTRIBUTION.md). **If you commercialize this project, you must replace these assets or obtain a paid LimeZu license.**++The **source code** is licensed under the **MIT License** — see [`LICENSE`](./LICENSE). The MIT grant covers the code only; the non-commercial asset restriction above is carved out from it in the `LICENSE` file's scope note.++---++## Acknowledgements++- [LimeZu](https://limezu.itch.io/) — pixel-art tilesets and character base sheets.+- [`shahar061/the-office`](https://github.com/shahar061/the-office) — office tileset/map and walk-sheet vendoring (project code: ISC).+- [Pixi.js](https://pixijs.com/), [xterm.js](https://xtermjs.org/), [node-pty](https://github.com/microsoft/node-pty), [electron-vite](https://electron-vite.org/), [CodeMirror](https://codemirror.net/) — the libraries this is built on.diff --git a/SPEC.md b/SPEC.mdnew file mode 100644index 00000000..6addbbfc--- /dev/null+++ b/SPEC.md@@ -0,0 +1,314 @@+# Claude Terminal Harness — Spec++A desktop control room for the Claude Code agents you already run in terminals. Each agent is a Sims-style avatar in a shared 2D workspace; you can watch them work, send them commands, and configure their goals/skills/MCP from one place.++---++## 1. Product shape++### What it is+- **Electron desktop app**, macOS-first.+- Renders a single 2D canvas ("the floor") populated by **avatars**, one per registered Claude Code session.+- Each avatar represents a real `claude` process running in a tmux pane somewhere on the machine.+- Avatars **walk around**, visit stations (file shelf, web portal, terminal station, etc.) based on what tool the underlying agent is using.+- A side panel shows the raw terminal stream for whichever avatar is selected. A command bar lets you type into that agent.++### What it explicitly is NOT (for MVP)+- Not a replacement for the `claude` CLI. The CLI is the runtime; this app is a viewer/controller.+- Not an agent-to-agent message bus. Avatars don't hand things off to each other yet. (Deferred to v2.)+- Not a remote dashboard. Local sessions only. No web access, no auth.+- Not a code editor. We show terminal output, not source files.++---++## 2. Architecture: the two data planes++This is the load-bearing design decision. Everything else follows from it.++```+┌───────────────────────────────────────────────────────────────┐+│ Electron Renderer │+│ ┌──────────────────┐ ┌──────────────────────────────┐ │+│ │ Avatar Canvas │ │ Terminal View + Command Bar │ │+│ │ (Pixi.js) │ │ (xterm.js, read-only-ish) │ │+│ └─────────▲────────┘ └────────────▲─────────────────┘ │+│ │ │ │+│ │ avatar state │ pty bytes │+└─────────────┼──────────────────────────┼───────────────────────┘+ │ │+ ┌──────┴──────────┐ ┌──────┴─────────────┐+ │ Event Plane │ │ Terminal Plane │+ │ (hooks → IPC) │ │ (tmux pipe-pane) │+ └──────▲──────────┘ └──────▲─────────────┘+ │ │+ │ JSON events │ raw bytes+ ┌──────┴──────────────────────────┴─────────────┐+ │ Claude Code processes │+ │ (running in tmux panes the user already has) │+ └───────────────────────────────────────────────┘+```++### Terminal Plane (raw pty)+- Powered by **tmux**. Each registered agent = one tmux `{session}:{window}.{pane}` triple.+- **Read** terminal output: `tmux pipe-pane -O -t <pane> 'cat >> /tmp/cth/<id>.log'` (or stream via an open file watcher).+- **Send input**: `tmux send-keys -t <pane> "..." Enter`.+- The xterm.js view in the app tails the log; user typing in the command bar becomes `send-keys`.++### Event Plane (structured agent state)+- Powered by **Claude Code hooks**, configured in each agent's `settings.json` (or via env var override).+- Hooks the app installs:+ - `UserPromptSubmit` → avatar "wakes up"+ - `PreToolUse` → avatar starts walking to the station matching the tool+ - `PostToolUse` → avatar walks back carrying an artifact+ - `Notification` → avatar waves; toast in the UI+ - `Stop` → avatar idle at desk; badge if there's unread output+ - `SubagentStop` → spawns/despawns child avatar (v2)+- Each hook runs a tiny shim: `cth-hook` (a Node CLI we ship). It reads the hook's JSON from stdin, tags it with the session id, and POSTs to a Unix domain socket at `~/.cth/events.sock` that the Electron main process owns.++**Why both planes?** Hooks alone don't give you the raw stream the user expects to see. The tmux pipe alone doesn't tell you which tool is running without fragile output parsing. Together: the canvas is event-driven; the terminal view is byte-for-byte authentic.++---++## 3. Registering an agent++How an avatar comes to exist.++### Option A — User adds existing pane (MVP path)+1. User runs `claude` somewhere in tmux as usual.+2. In the app: **"Add agent"** button → app calls `tmux list-panes -a -F '#{session_name}:#{window_index}.#{pane_index} #{pane_current_command} #{pane_current_path}'`.+3. App shows candidate panes (filtered to those running `claude` or `node`).+4. User picks one, names it, picks a sprite/color.+5. App:+ - Writes a per-project hook config to `<cwd>/.claude/settings.local.json` merging in the `cth-hook` shims.+ - Starts `pipe-pane` on the tmux pane.+ - Reads existing scrollback with `tmux capture-pane -p -S -1000`.+ - Avatar appears on the floor.++### Option B — Spawn from app (later)+- "New agent" button → app spawns a new tmux pane and starts `claude` in it with the right hooks pre-wired.+- Simpler UX, but requires us to own session lifecycle. Defer.++### What if the user closes the tmux pane?+- pipe-pane file goes silent; periodic `tmux list-panes` probe detects the pane is gone; avatar enters a "ghost" state for 30s, then is archived.++---++## 4. The Sims metaphor — mapping events to behavior++### The floor+- One large 2D scene. Background is a stylized "workshop" with **stations**:+ - **Desk** (per avatar) — home base, idle position+ - **File shelf** — for Read/Write/Edit+ - **Terminal station** — for Bash+ - **Web portal** — for WebFetch/WebSearch+ - **MCP corner** — for any `mcp__*` tool (sub-stations per server)+ - **Task board** — for TodoWrite+ - **Mailbox** — for Notification (visible when something needs the user)++### Avatar state machine+```+idle ──UserPromptSubmit──▶ alert+alert ──PreToolUse──▶ thinking(→station) ──arrival──▶ working(station)+working ──PostToolUse──▶ thinking(→desk) ──arrival──▶ idle (or next tool)+thinking ──PreToolUse──▶ thinking(→new station) (loop)+working ──Stop──▶ success ──250ms──▶ idle+any ──Notification──▶ blocked (waving at mailbox)+any ──tmux pane gone──▶ ghost ──30s──▶ archived+```++`thinking` is the **in-motion + reasoning** state. The avatar walks (physical animation) while the badge reads "thinking" (cognitive state). One state, two readings.++### Movement+- Pixi.js scene; avatars are sprite-based, 32×32 or 64×64.+- Pathing: simple A* on a coarse grid, or just lerp to target — overkill for MVP, plain lerp is fine.+- Multiple agents in the same project share a "room" (visual zone). Different cwds → different rooms with named doors.++### What the user sees at a glance+- Avatar at the file shelf reaching up → "agent is reading or writing a file"+- Avatar at the terminal station with motion lines → "agent is running a bash command"+- Avatar standing at mailbox waving → "agent is blocked, wants your input"+- Avatar sitting at desk → "done, awaiting next prompt"++This is the demo. If this is fun to watch, the product works.++---++## 5. Configuration per agent++Each avatar has a **config drawer** (right-click → Configure):++- **Name & sprite** (cosmetic, persisted in app DB)+- **Working directory** (read-only; derived from tmux pane)+- **Skills enabled** — toggles that edit the project's `.claude/settings.json` `enabledMcpjsonServers` / skill allowlist+- **MCP servers** — list of MCP servers attached for this session; toggle on/off+- **Hooks** — show which hooks the app has installed; option to add custom ones+- **Goal / system prompt prefix** — see §6+- **Model** — Opus / Sonnet / Haiku selector that writes to the project's settings+- **Permission mode** — default / acceptEdits / bypassPermissions / plan++All of this is *just a GUI over `settings.json`*. The app is not inventing config; it's editing the files Claude Code already reads.++---++## 6. The "/goal" question++You mentioned `/goal` — there's no built-in slash command by that name in Claude Code as of early 2026. Three possibilities:++1. **You meant a custom slash command** (user-defined skill in `~/.claude/skills/goal/`). If so: the app should let you pick which skills are exposed per agent and surface them as quick-action buttons next to the avatar.+2. **You meant a persistent goal/objective**, like a long-running directive an agent should pursue across prompts. This isn't a CC feature but is easy to implement here: the app maintains a "goal" string per avatar and prepends it to each user prompt before `send-keys`, or installs it as a `UserPromptSubmit` hook that injects context.+3. **You saw it somewhere recent.** If so, point me at it and we'll wire to the real thing.++**Spec'd behavior for now**: each avatar has a `goal` field (free text). On send, the app prefixes the user's command with `<goal>...</goal>` context (or injects via `UserPromptSubmit` hook — cleaner because it doesn't pollute the visible transcript). User toggles whether goal is active per-send.++Also surface, per avatar:+- **Skills picker** (anything in `~/.claude/skills/` or `<cwd>/.claude/skills/`)+- **Subagents picker** (anything in `~/.claude/agents/`)+- **MCP picker**++---++## 7. Sending commands from the app++Command bar at the bottom of the selected agent's panel. Three input modes:++- **Free prompt**: types into the pane via `tmux send-keys`, then `Enter`.+- **Slash command**: same path, but autocomplete from the agent's available skills.+- **Quick actions**: buttons for things like "/clear", "Stop", "Continue", "Run goal".++Edge cases:+- If the agent is mid-tool, app warns: "agent is busy — queue or interrupt?"+- Interrupt = `send-keys Escape` (Claude Code's cancel key).+- Queue = wait for `Stop` event, then send.++---++## 8. Tech stack & key dependencies++| Layer | Pick | Notes |+|---|---|---|+| Shell | Electron | Renderer + Node main |+| UI framework | React + TypeScript | |+| Avatar canvas | **Pixi.js** | Sprite scene, 60fps, easy lerp/tweening. Phaser is overkill. |+| Terminal view | **xterm.js** | Tails pipe-pane log; supports ANSI properly |+| Process control | shelling out to **tmux** | No node-pty needed since we attach |+| Event ingest | **Unix domain socket** at `~/.cth/events.sock` | Node `net.createServer`; hook shim is a tiny CLI that writes JSON+newline |+| Persistence | **SQLite** via better-sqlite3 | Agents, layouts, command history, goals |+| Sprites | Custom or itch.io asset pack | 8 directions × idle/walk/work animations |+| Packaging | electron-builder | `.dmg` for Mac, defer Linux/Windows |++External binaries the user must have: `tmux`. App detects on first run and refuses to start without it (with install instructions).++---++## 9. Data model (SQLite)++```sql+CREATE TABLE agents (+ id TEXT PRIMARY KEY, -- uuid+ name TEXT NOT NULL,+ sprite TEXT NOT NULL, -- key into sprite pack+ color TEXT NOT NULL,+ tmux_target TEXT NOT NULL, -- 'session:window.pane'+ cwd TEXT NOT NULL,+ goal TEXT,+ created_at INTEGER NOT NULL,+ archived_at INTEGER+);++CREATE TABLE events (+ id INTEGER PRIMARY KEY,+ agent_id TEXT NOT NULL,+ ts INTEGER NOT NULL,+ hook TEXT NOT NULL, -- 'PreToolUse', etc+ tool TEXT, -- 'Edit', 'Bash', etc+ payload_json TEXT NOT NULL+);++CREATE TABLE commands (+ id INTEGER PRIMARY KEY,+ agent_id TEXT NOT NULL,+ ts INTEGER NOT NULL,+ text TEXT NOT NULL,+ source TEXT NOT NULL -- 'user', 'quick_action'+);++CREATE TABLE layout ( -- avatar positions/rooms+ agent_id TEXT PRIMARY KEY,+ x REAL NOT NULL,+ y REAL NOT NULL,+ room TEXT NOT NULL+);+```++---++## 10. Risks & open questions++### Risks+- **Hook spec drift.** Claude Code's hook JSON format may evolve. Mitigation: pin the hook shim to a version, surface schema errors in the UI, lazy-fallback to text parsing of tool calls if hooks break.+- **Writing to user's `settings.json`.** Touching their config is intrusive. Mitigation: only ever write to `settings.local.json` (gitignored), back up first, show a diff before applying, and an "uninstall hooks" button.+- **tmux not available / user uses iTerm/kitty/wezterm directly.** No tmux = no app. Mitigation v1: require tmux. v2: shim for iTerm via AppleScript; long-tail other terminals never.+- **The Sims metaphor lands as gimmicky.** Real risk. The mitigation is to make the metaphor *informational* — every animation should actually tell you something you didn't know. If walking-to-the-shelf doesn't convey "is reading a file" faster than a text label, we built a toy.++### Open questions (decide before/while building)+1. **Hook installation scope** — `~/.claude/settings.json` (global, all sessions get hooks) vs per-project `.claude/settings.local.json` (only registered projects). Recommend per-project to keep blast radius small.+2. **Sprites: build or buy?** Buy an asset pack for the prototype, replace later if the product sticks.+3. **What does "goal" actually mean for you?** Long-running directive (item #2 in §6) is my best guess — confirm before we build.+4. **Multi-machine?** If you have agents running on a remote box, do we need a remote daemon? Defer past MVP.+5. **iTerm support deadline.** When (if ever) does this become a blocker?++---++## 11. Milestones++### M0 — Skeleton (1–2 days)+- Electron + React + Pixi shell+- Renders one hardcoded avatar that walks between two fixed positions+- xterm.js wired to a static log file++### M1 — One real agent end-to-end (3–5 days)+- "Add agent" picks a tmux pane+- Installs hook shim into `.claude/settings.local.json`+- Hook events flow over UDS into the app+- Avatar state machine driven by real events+- Command bar sends keys to the pane+- Terminal view tails pipe-pane log+- **Success criterion**: you run `claude` in tmux, register it, ask it to edit a file, watch the avatar walk to the shelf, walk back, and finish at its desk.++### M2 — Multi-agent (3–5 days)+- N agents simultaneously, each in their own room (grouped by cwd)+- Per-agent config drawer (name, sprite, goal, model, permission mode)+- Quick actions, command queueing+- Goal injection via UserPromptSubmit hook+- Persistence: avatars and positions survive app restart++### M3 — Polish (1 week)+- Sprite pack with proper animations+- Sounds (optional, off by default)+- Notification toasts + dock badge+- Onboarding for first-time users (tmux check, hook install consent)+- DMG packaging, code signing++### Out of scope for v1+- Inter-agent handoffs ("agent A passes a file to agent B")+- Remote agents over SSH+- Web/mobile companion+- Non-tmux terminals+- Subagent visualization (parent spawns child avatars)++---++## 12. Decisions captured so far++- **Avatar metaphor**: active Sims-like (agents walk, visit stations).+- **Execution model**: attach to existing terminal sessions (tmux), do not spawn or own the `claude` process.+- **Tech stack**: Electron + React + Pixi.js + xterm.js + SQLite.+- **MVP scope**: N independent agents in a shared workspace; no inter-agent coordination.++## 13. Decisions still needed from you++1. **"/goal" — which of the three interpretations in §6?**+2. **Hooks scope: per-project (recommended) or global?**+3. **How important is iTerm direct support? (If not now, we require tmux.)**+4. **Sprite art: stand-in asset pack OK, or do you want custom?**+5. **Anything in §10 ("Risks & open questions") you'd answer differently?**diff --git a/electron.vite.config.ts b/electron.vite.config.tsnew file mode 100644index 00000000..60b33433--- /dev/null+++ b/electron.vite.config.ts@@ -0,0 +1,36 @@+import { defineConfig, externalizeDepsPlugin } from 'electron-vite';+import react from '@vitejs/plugin-react';+import { resolve } from 'node:path';++export default defineConfig({+ main: {+ plugins: [externalizeDepsPlugin()],+ build: {+ rollupOptions: {+ input: { index: resolve(__dirname, 'src/main/index.ts') }+ }+ }+ },+ preload: {+ plugins: [externalizeDepsPlugin()],+ build: {+ rollupOptions: {+ input: { index: resolve(__dirname, 'src/preload/index.ts') }+ }+ }+ },+ renderer: {+ root: resolve(__dirname, 'src/renderer'),+ build: {+ rollupOptions: {+ input: { index: resolve(__dirname, 'src/renderer/index.html') }+ }+ },+ plugins: [react()],+ resolve: {+ alias: {+ '@': resolve(__dirname, 'src/renderer/src')+ }+ }+ }+});diff --git a/package-lock.json b/package-lock.jsonnew file mode 100644index 00000000..14a6e49e--- /dev/null+++ b/package-lock.json@@ -0,0 +1,4972 @@+{+ "name": "claude-terminal-harness",+ "version": "0.1.0",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "claude-terminal-harness",+ "version": "0.1.0",+ "hasInstallScript": true,+ "dependencies": {+ "@codemirror/lang-css": "^6.3.1",+ "@codemirror/lang-html": "^6.4.11",+ "@codemirror/lang-javascript": "^6.2.5",+ "@codemirror/lang-json": "^6.0.2",+ "@codemirror/lang-markdown": "^6.5.0",+ "@codemirror/lang-python": "^6.2.1",+ "@codemirror/lang-yaml": "^6.1.3",+ "@codemirror/language": "^6.12.3",+ "@codemirror/state": "^6.6.0",+ "@codemirror/view": "^6.43.0",+ "@lezer/highlight": "^1.2.3",+ "@uiw/react-codemirror": "^4.25.10",+ "@xterm/addon-fit": "^0.10.0",+ "@xterm/xterm": "^5.5.0",+ "commit-graph": "^2.4.0",+ "node-pty": "^1.0.0",+ "pixi.js": "^8.5.1",+ "react": "^18.3.1",+ "react-dom": "^18.3.1",+ "zustand": "^4.5.5"+ },+ "devDependencies": {+ "@electron/rebuild": "^3.7.0",+ "@types/node": "^22.7.5",+ "@types/react": "^18.3.11",+ "@types/react-dom": "^18.3.0",+ "@vitejs/plugin-react": "^4.3.2",+ "electron": "^32.2.0",+ "electron-vite": "^2.3.0",+ "typescript": "^5.6.3",+ "vite": "^5.4.8"+ }+ },+ "node_modules/@babel/code-frame": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",+ "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-validator-identifier": "^7.29.7",+ "js-tokens": "^4.0.0",+ "picocolors": "^1.1.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/compat-data": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz",+ "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/core": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz",+ "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.7",+ "@babel/generator": "^7.29.7",+ "@babel/helper-compilation-targets": "^7.29.7",+ "@babel/helper-module-transforms": "^7.29.7",+ "@babel/helpers": "^7.29.7",+ "@babel/parser": "^7.29.7",+ "@babel/template": "^7.29.7",+ "@babel/traverse": "^7.29.7",+ "@babel/types": "^7.29.7",+ "@jridgewell/remapping": "^2.3.5",+ "convert-source-map": "^2.0.0",+ "debug": "^4.1.0",+ "gensync": "^1.0.0-beta.2",+ "json5": "^2.2.3",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/babel"+ }+ },+ "node_modules/@babel/generator": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz",+ "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.29.7",+ "@babel/types": "^7.29.7",+ "@jridgewell/gen-mapping": "^0.3.12",+ "@jridgewell/trace-mapping": "^0.3.28",+ "jsesc": "^3.0.2"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-compilation-targets": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz",+ "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/compat-data": "^7.29.7",+ "@babel/helper-validator-option": "^7.29.7",+ "browserslist": "^4.24.0",+ "lru-cache": "^5.1.1",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-globals": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz",+ "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-imports": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz",+ "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/traverse": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-transforms": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz",+ "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-module-imports": "^7.29.7",+ "@babel/helper-validator-identifier": "^7.29.7",+ "@babel/traverse": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },+ "node_modules/@babel/helper-plugin-utils": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz",+ "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-string-parser": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",+ "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-identifier": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",+ "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-option": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz",+ "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helpers": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz",+ "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/template": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/parser": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz",+ "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.29.7"+ },+ "bin": {+ "parser": "bin/babel-parser.js"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@babel/plugin-transform-arrow-functions": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.29.7.tgz",+ "integrity": "sha512-N7zArUXWzAMzm+/N0uPBeVB3Fam5lMxtUwMmDK5f/IBBS7a7p1qeUoxd/6CckXoxUdgsntq1Dh8xNW06maZbDQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-react-jsx-self": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz",+ "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-react-jsx-source": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz",+ "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/runtime": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz",+ "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==",+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/template": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz",+ "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.7",+ "@babel/parser": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/traverse": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz",+ "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.7",+ "@babel/generator": "^7.29.7",+ "@babel/helper-globals": "^7.29.7",+ "@babel/parser": "^7.29.7",+ "@babel/template": "^7.29.7",+ "@babel/types": "^7.29.7",+ "debug": "^4.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/types": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz",+ "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-string-parser": "^7.29.7",+ "@babel/helper-validator-identifier": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@codemirror/autocomplete": {+ "version": "6.20.2",+ "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.2.tgz",+ "integrity": "sha512-G5FPkgIiLjOgZMjqVjvuKQ1rGPtHogLldJr33eFJdVLtmwY+giGrlv/ewljLz6b9BSQLkjxuwBc6g6omDM+YxQ==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/language": "^6.0.0",+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.17.0",+ "@lezer/common": "^1.0.0"+ }+ },+ "node_modules/@codemirror/commands": {+ "version": "6.10.3",+ "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.10.3.tgz",+ "integrity": "sha512-JFRiqhKu+bvSkDLI+rUhJwSxQxYb759W5GBezE8Uc8mHLqC9aV/9aTC7yJSqCtB3F00pylrLCwnyS91Ap5ej4Q==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/language": "^6.0.0",+ "@codemirror/state": "^6.6.0",+ "@codemirror/view": "^6.27.0",+ "@lezer/common": "^1.1.0"+ }+ },+ "node_modules/@codemirror/lang-css": {+ "version": "6.3.1",+ "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.1.tgz",+ "integrity": "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/autocomplete": "^6.0.0",+ "@codemirror/language": "^6.0.0",+ "@codemirror/state": "^6.0.0",+ "@lezer/common": "^1.0.2",+ "@lezer/css": "^1.1.7"+ }+ },+ "node_modules/@codemirror/lang-html": {+ "version": "6.4.11",+ "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.11.tgz",+ "integrity": "sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/autocomplete": "^6.0.0",+ "@codemirror/lang-css": "^6.0.0",+ "@codemirror/lang-javascript": "^6.0.0",+ "@codemirror/language": "^6.4.0",+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.17.0",+ "@lezer/common": "^1.0.0",+ "@lezer/css": "^1.1.0",+ "@lezer/html": "^1.3.12"+ }+ },+ "node_modules/@codemirror/lang-javascript": {+ "version": "6.2.5",+ "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.5.tgz",+ "integrity": "sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/autocomplete": "^6.0.0",+ "@codemirror/language": "^6.6.0",+ "@codemirror/lint": "^6.0.0",+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.17.0",+ "@lezer/common": "^1.0.0",+ "@lezer/javascript": "^1.0.0"+ }+ },+ "node_modules/@codemirror/lang-json": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz",+ "integrity": "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/language": "^6.0.0",+ "@lezer/json": "^1.0.0"+ }+ },+ "node_modules/@codemirror/lang-markdown": {+ "version": "6.5.0",+ "resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.5.0.tgz",+ "integrity": "sha512-0K40bZ35jpHya6FriukbgaleaqzBLZfOh7HuzqbMxBXkbYMJDxfF39c23xOgxFezR+3G+tR2/Mup+Xk865OMvw==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/autocomplete": "^6.7.1",+ "@codemirror/lang-html": "^6.0.0",+ "@codemirror/language": "^6.3.0",+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.0.0",+ "@lezer/common": "^1.2.1",+ "@lezer/markdown": "^1.0.0"+ }+ },+ "node_modules/@codemirror/lang-python": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.2.1.tgz",+ "integrity": "sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/autocomplete": "^6.3.2",+ "@codemirror/language": "^6.8.0",+ "@codemirror/state": "^6.0.0",+ "@lezer/common": "^1.2.1",+ "@lezer/python": "^1.1.4"+ }+ },+ "node_modules/@codemirror/lang-yaml": {+ "version": "6.1.3",+ "resolved": "https://registry.npmjs.org/@codemirror/lang-yaml/-/lang-yaml-6.1.3.tgz",+ "integrity": "sha512-AZ8DJBuXGVHybpBQhmZtgew5//4hv3tdkXnr3vDmOUMJRuB6vn/uuwtmTOTlqEaQFg3hQSVeA90NmvIQyUV6FQ==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/autocomplete": "^6.0.0",+ "@codemirror/language": "^6.0.0",+ "@codemirror/state": "^6.0.0",+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.2.0",+ "@lezer/lr": "^1.0.0",+ "@lezer/yaml": "^1.0.0"+ }+ },+ "node_modules/@codemirror/language": {+ "version": "6.12.3",+ "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.12.3.tgz",+ "integrity": "sha512-QwCZW6Tt1siP37Jet9Tb02Zs81TQt6qQrZR2H+eGMcFsL1zMrk2/b9CLC7/9ieP1fjIUMgviLWMmgiHoJrj+ZA==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.23.0",+ "@lezer/common": "^1.5.0",+ "@lezer/highlight": "^1.0.0",+ "@lezer/lr": "^1.0.0",+ "style-mod": "^4.0.0"+ }+ },+ "node_modules/@codemirror/lint": {+ "version": "6.9.6",+ "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.6.tgz",+ "integrity": "sha512-6Kp7r6XfCi/D/5sdXieMfg9pJU1bUEx96WITuLU6ESaKizCz0QHFMjY/TaFSbigDdEAIgi93itLBIUETP4oK+A==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.42.0",+ "crelt": "^1.0.5"+ }+ },+ "node_modules/@codemirror/search": {+ "version": "6.7.0",+ "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.7.0.tgz",+ "integrity": "sha512-ZvGm99wc/s2cITtMT15LFdn8aH/aS+V+DqyGq/N5ZlV5vWtH+nILvC2nw0zX7ByNoHHDZ2IxxdW38O0tc5nVHg==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.37.0",+ "crelt": "^1.0.5"+ }+ },+ "node_modules/@codemirror/state": {+ "version": "6.6.0",+ "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.6.0.tgz",+ "integrity": "sha512-4nbvra5R5EtiCzr9BTHiTLc+MLXK2QGiAVYMyi8PkQd3SR+6ixar/Q/01Fa21TBIDOZXgeWV4WppsQolSreAPQ==",+ "license": "MIT",+ "dependencies": {+ "@marijn/find-cluster-break": "^1.0.0"+ }+ },+ "node_modules/@codemirror/theme-one-dark": {+ "version": "6.1.3",+ "resolved": "https://registry.npmjs.org/@codemirror/theme-one-dark/-/theme-one-dark-6.1.3.tgz",+ "integrity": "sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/language": "^6.0.0",+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.0.0",+ "@lezer/highlight": "^1.0.0"+ }+ },+ "node_modules/@codemirror/view": {+ "version": "6.43.0",+ "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.0.tgz",+ "integrity": "sha512-V7ZCLQO3Jus9hzh2jVCCPW3mO4IBMr43O37PqSUYautJSnnJF41YlgLw21x0fLJTYvJ+Vkm6Gp+qKGH9pltgXA==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/state": "^6.6.0",+ "crelt": "^1.0.6",+ "style-mod": "^4.1.0",+ "w3c-keyname": "^2.2.4"+ }+ },+ "node_modules/@electron/get": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.3.tgz",+ "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^4.1.1",+ "env-paths": "^2.2.0",+ "fs-extra": "^8.1.0",+ "got": "^11.8.5",+ "progress": "^2.0.3",+ "semver": "^6.2.0",+ "sumchecker": "^3.0.1"+ },+ "engines": {+ "node": ">=12"+ },+ "optionalDependencies": {+ "global-agent": "^3.0.0"+ }+ },+ "node_modules/@electron/node-gyp": {+ "version": "10.2.0-electron.1",+ "resolved": "git+ssh://[email protected]/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2",+ "integrity": "sha512-CrYo6TntjpoMO1SHjl5Pa/JoUsECNqNdB7Kx49WLQpWzPw53eEITJ2Hs9fh/ryUYDn4pxZz11StaBYBrLFJdqg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "env-paths": "^2.2.0",+ "exponential-backoff": "^3.1.1",+ "glob": "^8.1.0",+ "graceful-fs": "^4.2.6",+ "make-fetch-happen": "^10.2.1",+ "nopt": "^6.0.0",+ "proc-log": "^2.0.1",+ "semver": "^7.3.5",+ "tar": "^6.2.1",+ "which": "^2.0.2"+ },+ "bin": {+ "node-gyp": "bin/node-gyp.js"+ },+ "engines": {+ "node": ">=12.13.0"+ }+ },+ "node_modules/@electron/node-gyp/node_modules/semver": {+ "version": "7.8.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz",+ "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@electron/rebuild": {+ "version": "3.7.2",+ "resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-3.7.2.tgz",+ "integrity": "sha512-19/KbIR/DAxbsCkiaGMXIdPnMCJLkcf8AvGnduJtWBs/CBwiAjY1apCqOLVxrXg+rtXFCngbXhBanWjxLUt1Mg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@electron/node-gyp": "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2",+ "@malept/cross-spawn-promise": "^2.0.0",+ "chalk": "^4.0.0",+ "debug": "^4.1.1",+ "detect-libc": "^2.0.1",+ "fs-extra": "^10.0.0",+ "got": "^11.7.0",+ "node-abi": "^3.45.0",+ "node-api-version": "^0.2.0",+ "ora": "^5.1.0",+ "read-binary-file-arch": "^1.0.6",+ "semver": "^7.3.5",+ "tar": "^6.0.5",+ "yargs": "^17.0.1"+ },+ "bin": {+ "electron-rebuild": "lib/cli.js"+ },+ "engines": {+ "node": ">=12.13.0"+ }+ },+ "node_modules/@electron/rebuild/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@electron/rebuild/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/@electron/rebuild/node_modules/semver": {+ "version": "7.8.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz",+ "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@electron/rebuild/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/@esbuild/aix-ppc64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",+ "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "aix"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/android-arm": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",+ "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/android-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",+ "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/android-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",+ "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/darwin-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",+ "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/darwin-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",+ "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/freebsd-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",+ "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/freebsd-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",+ "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-arm": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",+ "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",+ "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-ia32": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",+ "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-loong64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",+ "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-mips64el": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",+ "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",+ "cpu": [+ "mips64el"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-ppc64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",+ "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-riscv64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",+ "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-s390x": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",+ "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",+ "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/netbsd-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",+ "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "netbsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/openbsd-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",+ "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/sunos-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",+ "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "sunos"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/win32-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",+ "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/win32-ia32": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",+ "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/win32-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",+ "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@floating-ui/core": {+ "version": "1.7.5",+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.5.tgz",+ "integrity": "sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==",+ "license": "MIT",+ "dependencies": {+ "@floating-ui/utils": "^0.2.11"+ }+ },+ "node_modules/@floating-ui/dom": {+ "version": "1.7.6",+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.6.tgz",+ "integrity": "sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==",+ "license": "MIT",+ "dependencies": {+ "@floating-ui/core": "^1.7.5",+ "@floating-ui/utils": "^0.2.11"+ }+ },+ "node_modules/@floating-ui/utils": {+ "version": "0.2.11",+ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.11.tgz",+ "integrity": "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==",+ "license": "MIT"+ },+ "node_modules/@gar/promisify": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",+ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@jridgewell/gen-mapping": {+ "version": "0.3.13",+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.0",+ "@jridgewell/trace-mapping": "^0.3.24"+ }+ },+ "node_modules/@jridgewell/remapping": {+ "version": "2.3.5",+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/gen-mapping": "^0.3.5",+ "@jridgewell/trace-mapping": "^0.3.24"+ }+ },+ "node_modules/@jridgewell/resolve-uri": {+ "version": "3.1.2",+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@jridgewell/sourcemap-codec": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@jridgewell/trace-mapping": {+ "version": "0.3.31",+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/resolve-uri": "^3.1.0",+ "@jridgewell/sourcemap-codec": "^1.4.14"+ }+ },+ "node_modules/@lezer/common": {+ "version": "1.5.2",+ "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.2.tgz",+ "integrity": "sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ==",+ "license": "MIT"+ },+ "node_modules/@lezer/css": {+ "version": "1.3.3",+ "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.3.tgz",+ "integrity": "sha512-RzBo8r+/6QJeow7aPHIpGVIH59xTcJXp399820gZoMo9noQDRVpJLheIBUicYwKcsbOYoBRoLZlf2720dG/4Tg==",+ "license": "MIT",+ "dependencies": {+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.0.0",+ "@lezer/lr": "^1.3.0"+ }+ },+ "node_modules/@lezer/highlight": {+ "version": "1.2.3",+ "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz",+ "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==",+ "license": "MIT",+ "dependencies": {+ "@lezer/common": "^1.3.0"+ }+ },+ "node_modules/@lezer/html": {+ "version": "1.3.13",+ "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.13.tgz",+ "integrity": "sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg==",+ "license": "MIT",+ "dependencies": {+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.0.0",+ "@lezer/lr": "^1.0.0"+ }+ },+ "node_modules/@lezer/javascript": {+ "version": "1.5.4",+ "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.4.tgz",+ "integrity": "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==",+ "license": "MIT",+ "dependencies": {+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.1.3",+ "@lezer/lr": "^1.3.0"+ }+ },+ "node_modules/@lezer/json": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.3.tgz",+ "integrity": "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==",+ "license": "MIT",+ "dependencies": {+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.0.0",+ "@lezer/lr": "^1.0.0"+ }+ },+ "node_modules/@lezer/lr": {+ "version": "1.4.10",+ "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.10.tgz",+ "integrity": "sha512-rnCpTIBafOx4mRp43xOxDJbFipJm/c0cia/V5TiGlhmMa+wsSdoGmUN3w5Bqrks/09Q/D4tNAmWaT8p6NRi77A==",+ "license": "MIT",+ "dependencies": {+ "@lezer/common": "^1.0.0"+ }+ },+ "node_modules/@lezer/markdown": {+ "version": "1.6.4",+ "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.6.4.tgz",+ "integrity": "sha512-N0SxazMj4k65DBfaf1azqtMZd6u7MqluP84/NZnB/io8Td9aleFmAhz9hcbvSfsxT5tdYlJ5qgv5aMJGY4zEtA==",+ "license": "MIT",+ "dependencies": {+ "@lezer/common": "^1.5.0",+ "@lezer/highlight": "^1.0.0"+ }+ },+ "node_modules/@lezer/python": {+ "version": "1.1.19",+ "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.19.tgz",+ "integrity": "sha512-MhQIURHRytsNzP/YXnqpYKW6la6voAH3kyplTOOiCdjyFY6cWWGFVmYVdHIPrElqSDf4iCDktQCockB9FxuhzQ==",+ "license": "MIT",+ "dependencies": {+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.0.0",+ "@lezer/lr": "^1.0.0"+ }+ },+ "node_modules/@lezer/yaml": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/@lezer/yaml/-/yaml-1.0.4.tgz",+ "integrity": "sha512-2lrrHqxalACEbxIbsjhqGpSW8kWpUKuY6RHgnSAFZa6qK62wvnPxA8hGOwOoDbwHcOFs5M4o27mjGu+P7TvBmw==",+ "license": "MIT",+ "dependencies": {+ "@lezer/common": "^1.2.0",+ "@lezer/highlight": "^1.0.0",+ "@lezer/lr": "^1.4.0"+ }+ },+ "node_modules/@malept/cross-spawn-promise": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz",+ "integrity": "sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==",+ "dev": true,+ "funding": [+ {+ "type": "individual",+ "url": "https://github.com/sponsors/malept"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund"+ }+ ],+ "license": "Apache-2.0",+ "dependencies": {+ "cross-spawn": "^7.0.1"+ },+ "engines": {+ "node": ">= 12.13.0"+ }+ },+ "node_modules/@marijn/find-cluster-break": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz",+ "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==",+ "license": "MIT"+ },+ "node_modules/@npmcli/fs": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz",+ "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "@gar/promisify": "^1.1.3",+ "semver": "^7.3.5"+ },+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ }+ },+ "node_modules/@npmcli/fs/node_modules/semver": {+ "version": "7.8.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz",+ "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@npmcli/move-file": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz",+ "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==",+ "deprecated": "This functionality has been moved to @npmcli/fs",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mkdirp": "^1.0.4",+ "rimraf": "^3.0.2"+ },+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ }+ },+ "node_modules/@pixi/colord": {+ "version": "2.9.6",+ "resolved": "https://registry.npmjs.org/@pixi/colord/-/colord-2.9.6.tgz",+ "integrity": "sha512-nezytU2pw587fQstUu1AsJZDVEynjskwOL+kibwcdxsMBFqPsFFNA7xl0ii/gXuDi6M0xj3mfRJj8pBSc2jCfA==",+ "license": "MIT"+ },+ "node_modules/@rolldown/pluginutils": {+ "version": "1.0.0-beta.27",+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",+ "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@rollup/rollup-android-arm-eabi": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.4.tgz",+ "integrity": "sha512-F5QXMSiFebS9hKZj02XhWLLnRpJ3B3AROP0tWbFBSj+6kCbg5m9j5JoHKd4mmSVy5mS/IMQloYgYxCuJC0fxEQ==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@rollup/rollup-android-arm64": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.4.tgz",+ "integrity": "sha512-GxxTKApUpzRhof7poWvCJHRF51C67u1R7D6DiluBE8wKU1u5GWE8t+v81JvJYtbawoBFX1hLv5Ei4eVjkWokaw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@rollup/rollup-darwin-arm64": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.4.tgz",+ "integrity": "sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@rollup/rollup-darwin-x64": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.4.tgz",+ "integrity": "sha512-CSKq7MsP+5PFIcydhAiR1K0UhEI1A2jWXVKHPCBZ151yOutENwvnPocgVHkivu2kviURtCEB6zUQw0vs8RrhMg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@rollup/rollup-freebsd-arm64": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.4.tgz",+ "integrity": "sha512-+O8OkVdyvXMtJEciu2wS/pzm1IxntEEQx3z5TAVy4l32G0etZn+RsA48ARRrFm6Ri8fvqPQfgrvNxSjKAbnd3g==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ]+ },+ "node_modules/@rollup/rollup-freebsd-x64": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.4.tgz",+ "integrity": "sha512-Iw3oMskH3AfNuhU0MSN7vNbdi4me/NiYo2azqPz/Le16zHSa+3RRmliCMWWQmh4lcndccU40xcJuTYJZxNo/lw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.4.tgz",+ "integrity": "sha512-EIPRXTVQpHyF8WOo219AD2yEltPehLTcTMz2fn6JsatLYSzQf00hj3rulF+yauOlF9/FtM2WpkT/hJh/KJFGhA==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.4.tgz",+ "integrity": "sha512-J3Yh9PzzF1Ovah2At+lHiGQdsYgArxBbXv/zHfSyaiFQEqvNv7DcW98pCrmdjCZBrqBiKrKKe2V+aaSGWuBe/w==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm64-gnu": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.4.tgz",+ "integrity": "sha512-BFDEZMYfUvLn37ONE1yMBojPxnMlTFsdyNoqncT0qFq1mAfllL+ATMMJd8TeuVMiX84s1KbcxcZbXInmcO2mRg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm64-musl": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.4.tgz",+ "integrity": "sha512-pc9EYOSlOgdQ2uPl1o9PF6/kLSgaUosia7gOuS8mB69IxJvlclko1MECXysjs5ryez1/5zjYqx3+xYU0TU6R1A==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-loong64-gnu": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.4.tgz",+ "integrity": "sha512-NxnomyxYerDh5n4iLrNa+sH+Z+U4BMEE46V2PgQ/hoB909i8gV1M5wPojWg9fk1jWpO3IQnOs20K4wyZuFLEFQ==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-loong64-musl": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.4.tgz",+ "integrity": "sha512-nbJnQ8a3z1mtmrwImCYhc6BGpThAyYVRQxw9uKSKG4wR6aAYno9sVjJ0zaZcW9BPJX1GbrDPf+SvdWjgTuDmnw==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.4.tgz",+ "integrity": "sha512-2EU6acNrQLd8tYvo/LXW535wupT3m6fo7HKo6lr7ktQoItxTyOL1ZCR/GfGCuXl2vR+zmfI6eRXkSemafv+iVg==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-ppc64-musl": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.4.tgz",+ "integrity": "sha512-WeBtoMuaMxiiIrO2IYP3xs6GMWkJP2C0EoT8beTLkUPmzV1i/UcOSVw1d5r9KBODtHKilG5yFxsGRnBbK3wJ4A==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.4.tgz",+ "integrity": "sha512-FJHFfqpKUI3A10WrWKiFbBZ7yVbGT4q4B5o1qKFFojqpaYoh9LrQgqWCmmcxQzVSXYtyB5bzkXrYzlHTs21MYA==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-riscv64-musl": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.4.tgz",+ "integrity": "sha512-mcEl6CUT5IAUmQf1m9FYSmVqCJlpQ8r8eyftFUHG8i9OhY7BkBXSUdnLH5DOf0wCOjcP9v/QO93zpmF1SptCCw==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-s390x-gnu": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.4.tgz",+ "integrity": "sha512-ynt3JxVd2w2buzoKDWIyiV1pJW93xlQic1THVLXilz429oijRpSHivZAgp65KBu+cMcgf1eVVjdnTLvPxgCuoQ==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-x64-gnu": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.4.tgz",+ "integrity": "sha512-Boiz5+MsaROEWDf+GGEwF8VMHGhlUoQMtIPjOgA5fv4osupqTVnJteQNKJwUcnUog2G55jYXH7KZFFiJe0TEzQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-x64-musl": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.4.tgz",+ "integrity": "sha512-+qfSY27qIrFfI/Hom04KYFw3GKZSGU4lXus51wsb5EuySfFlWRwjkKWoE9emgRw/ukoT4Udsj4W/+xxG8VbPKg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-openbsd-x64": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.4.tgz",+ "integrity": "sha512-VpTfOPHgVXEBeeR8hZ2O0F3aSso+JDWqTWmTmzcQKted54IAdUVbxE+j/MVxUsKa8L20HJhv3vUezVPoquqWjA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ]+ },+ "node_modules/@rollup/rollup-openharmony-arm64": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.4.tgz",+ "integrity": "sha512-IPOsh5aRYuLv/nkU51X10Bf75Bsf6+gZdx1X+QP5QM6lIJFHHqbHLG0uJn/hWthzo13UAc2umiUorqZy3axoZg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openharmony"+ ]+ },+ "node_modules/@rollup/rollup-win32-arm64-msvc": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.4.tgz",+ "integrity": "sha512-4QzE9E81OohJ/HKzHhsqU+zcYYojVOXlFMs1DdyMT6qXl/niOH7AVElmmEdUNHHS/oRkc++d5k6Vy85zFs0DEw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-ia32-msvc": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.4.tgz",+ "integrity": "sha512-zTPgT1YuHHcd+Tmx7h8aml0FWFVelV5N54oHow9SLj+GfoDy/huQ+UV396N/C7KpMDMiPspRktzM1/0r1usYEA==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-x64-gnu": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.4.tgz",+ "integrity": "sha512-DRS4G7mi9lJxqEDezIkKCaUIKCrLUUDCUaCsTPCi/rtqaC6D/jjwslMQyiDU50Ka0JKpeXeRBFBAXwArY52vBw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-x64-msvc": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.4.tgz",+ "integrity": "sha512-QVTUovf40zgTqlFVrKA1uXMVvU2QWEFWfAH8Wdc48IxLvrJMQVMBRjuQyUpzZCDkakImib9eVazbWlC6ksWtJw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@sindresorhus/is": {+ "version": "4.6.0",+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sindresorhus/is?sponsor=1"+ }+ },+ "node_modules/@szmarczak/http-timer": {+ "version": "4.0.6",+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",+ "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "defer-to-connect": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@tootallnate/once": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.1.tgz",+ "integrity": "sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@types/babel__core": {+ "version": "7.20.5",+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",+ "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.20.7",+ "@babel/types": "^7.20.7",+ "@types/babel__generator": "*",+ "@types/babel__template": "*",+ "@types/babel__traverse": "*"+ }+ },+ "node_modules/@types/babel__generator": {+ "version": "7.27.0",+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz",+ "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.0.0"+ }+ },+ "node_modules/@types/babel__template": {+ "version": "7.4.4",+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",+ "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.1.0",+ "@babel/types": "^7.0.0"+ }+ },+ "node_modules/@types/babel__traverse": {+ "version": "7.28.0",+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz",+ "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.28.2"+ }+ },+ "node_modules/@types/cacheable-request": {+ "version": "6.0.3",+ "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",+ "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/http-cache-semantics": "*",+ "@types/keyv": "^3.1.4",+ "@types/node": "*",+ "@types/responselike": "^1.0.0"+ }+ },+ "node_modules/@types/earcut": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/@types/earcut/-/earcut-3.0.0.tgz",+ "integrity": "sha512-k/9fOUGO39yd2sCjrbAJvGDEQvRwRnQIZlBz43roGwUZo5SHAmyVvSFyaVVZkicRVCaDXPKlbxrUcBuJoSWunQ==",+ "license": "MIT"+ },+ "node_modules/@types/estree": {+ "version": "1.0.8",+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/http-cache-semantics": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",+ "integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/keyv": {+ "version": "3.1.4",+ "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",+ "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/@types/node": {+ "version": "22.19.19",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.19.tgz",+ "integrity": "sha512-dyh/xO2Fh5bYrfWaaqGrRQQGkNdmYw6AmaAUvYeUMNTWQtvb796ikLdmTchRmOlOiIJ1TDXfWgVx1QkUlQ6Hew==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "undici-types": "~6.21.0"+ }+ },+ "node_modules/@types/prop-types": {+ "version": "15.7.15",+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",+ "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==",+ "devOptional": true,+ "license": "MIT"+ },+ "node_modules/@types/react": {+ "version": "18.3.29",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.29.tgz",+ "integrity": "sha512-ch0qJdr2JY0r04NXSprbK6TXOgnaJ1Tz23fm5W+z0/CBah6BSBc3n96h7K9GOtwh0HrilNWHIBzE1Ko4Dcw/Wg==",+ "devOptional": true,+ "license": "MIT",+ "dependencies": {+ "@types/prop-types": "*",+ "csstype": "^3.2.2"+ }+ },+ "node_modules/@types/react-dom": {+ "version": "18.3.7",+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz",+ "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==",+ "dev": true,+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "^18.0.0"+ }+ },+ "node_modules/@types/responselike": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",+ "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/@types/yauzl": {+ "version": "2.10.3",+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",+ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/@uiw/codemirror-extensions-basic-setup": {+ "version": "4.25.10",+ "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.25.10.tgz",+ "integrity": "sha512-P3vytLlpE62KYSWrMUnwDCv2lvaQDuDZzyj03mHntuHo5bSl34fRZpjTY3kQTPGuXHxkGSYpoPFFj+hMTqaaMQ==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/autocomplete": "^6.0.0",+ "@codemirror/commands": "^6.0.0",+ "@codemirror/language": "^6.0.0",+ "@codemirror/lint": "^6.0.0",+ "@codemirror/search": "^6.0.0",+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.0.0"+ },+ "funding": {+ "url": "https://jaywcjlove.github.io/#/sponsor"+ },+ "peerDependencies": {+ "@codemirror/autocomplete": ">=6.0.0",+ "@codemirror/commands": ">=6.0.0",+ "@codemirror/language": ">=6.0.0",+ "@codemirror/lint": ">=6.0.0",+ "@codemirror/search": ">=6.0.0",+ "@codemirror/state": ">=6.0.0",+ "@codemirror/view": ">=6.0.0"+ }+ },+ "node_modules/@uiw/react-codemirror": {+ "version": "4.25.10",+ "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.25.10.tgz",+ "integrity": "sha512-DzgSMwM5qzB7v1FIb4gEeriYt67iiay756/HIOM9mAbeOVK0MO7rqefHf0O5c0269pJKMW7AH9FjclExD23V9w==",+ "license": "MIT",+ "dependencies": {+ "@babel/runtime": "^7.18.6",+ "@codemirror/commands": "^6.1.0",+ "@codemirror/state": "^6.1.1",+ "@codemirror/theme-one-dark": "^6.0.0",+ "@uiw/codemirror-extensions-basic-setup": "4.25.10",+ "codemirror": "^6.0.0"+ },+ "funding": {+ "url": "https://jaywcjlove.github.io/#/sponsor"+ },+ "peerDependencies": {+ "@babel/runtime": ">=7.11.0",+ "@codemirror/state": ">=6.0.0",+ "@codemirror/theme-one-dark": ">=6.0.0",+ "@codemirror/view": ">=6.0.0",+ "codemirror": ">=6.0.0",+ "react": ">=17.0.0",+ "react-dom": ">=17.0.0"+ }+ },+ "node_modules/@vitejs/plugin-react": {+ "version": "4.7.0",+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz",+ "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/core": "^7.28.0",+ "@babel/plugin-transform-react-jsx-self": "^7.27.1",+ "@babel/plugin-transform-react-jsx-source": "^7.27.1",+ "@rolldown/pluginutils": "1.0.0-beta.27",+ "@types/babel__core": "^7.20.5",+ "react-refresh": "^0.17.0"+ },+ "engines": {+ "node": "^14.18.0 || >=16.0.0"+ },+ "peerDependencies": {+ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"+ }+ },+ "node_modules/@webgpu/types": {+ "version": "0.1.70",+ "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.70.tgz",+ "integrity": "sha512-LFiNHHKMvmAEvwVew3JLJmTdShhbdwRFSImUshGhE2mGE8ybQzIo63l5uRp+YKnNx+8Qno8Kf6gN+DKMreIJCA==",+ "license": "BSD-3-Clause"+ },+ "node_modules/@xmldom/xmldom": {+ "version": "0.8.13",+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.13.tgz",+ "integrity": "sha512-KRYzxepc14G/CEpEGc3Yn+JKaAeT63smlDr+vjB8jRfgTBBI9wRj/nkQEO+ucV8p8I9bfKLWp37uHgFrbntPvw==",+ "license": "MIT",+ "engines": {+ "node": ">=10.0.0"+ }+ },+ "node_modules/@xterm/addon-fit": {+ "version": "0.10.0",+ "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.10.0.tgz",+ "integrity": "sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==",+ "license": "MIT",+ "peerDependencies": {+ "@xterm/xterm": "^5.0.0"+ }+ },+ "node_modules/@xterm/xterm": {+ "version": "5.5.0",+ "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0.tgz",+ "integrity": "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==",+ "license": "MIT"+ },+ "node_modules/abbrev": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/agent-base": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "4"+ },+ "engines": {+ "node": ">= 6.0.0"+ }+ },+ "node_modules/agentkeepalive": {+ "version": "4.6.0",+ "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz",+ "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "humanize-ms": "^1.2.1"+ },+ "engines": {+ "node": ">= 8.0.0"+ }+ },+ "node_modules/aggregate-error": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",+ "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "clean-stack": "^2.0.0",+ "indent-string": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/ansi-regex": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/ansi-styles": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "color-convert": "^2.0.1"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/base64-js": {+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT"+ },+ "node_modules/baseline-browser-mapping": {+ "version": "2.10.32",+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.32.tgz",+ "integrity": "sha512-wbPvpyjJPC0zdfdKXxqEL3Ea+bOMD/87X4lftiJkkaBiuG6ALQy1SLmEd7BSmVCuwCQsBrCamgBoLyfFDD1EPg==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "baseline-browser-mapping": "dist/cli.cjs"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/bl": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "buffer": "^5.5.0",+ "inherits": "^2.0.4",+ "readable-stream": "^3.4.0"+ }+ },+ "node_modules/boolean": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",+ "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==",+ "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "node_modules/brace-expansion": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz",+ "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0"+ }+ },+ "node_modules/browserslist": {+ "version": "4.28.2",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",+ "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "baseline-browser-mapping": "^2.10.12",+ "caniuse-lite": "^1.0.30001782",+ "electron-to-chromium": "^1.5.328",+ "node-releases": "^2.0.36",+ "update-browserslist-db": "^1.2.3"+ },+ "bin": {+ "browserslist": "cli.js"+ },+ "engines": {+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"+ }+ },+ "node_modules/buffer": {+ "version": "5.7.1",+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "base64-js": "^1.3.1",+ "ieee754": "^1.1.13"+ }+ },+ "node_modules/buffer-crc32": {+ "version": "0.2.13",+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "*"+ }+ },+ "node_modules/cac": {+ "version": "6.7.14",+ "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",+ "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/cacache": {+ "version": "16.1.3",+ "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz",+ "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "@npmcli/fs": "^2.1.0",+ "@npmcli/move-file": "^2.0.0",+ "chownr": "^2.0.0",+ "fs-minipass": "^2.1.0",+ "glob": "^8.0.1",+ "infer-owner": "^1.0.4",+ "lru-cache": "^7.7.1",+ "minipass": "^3.1.6",+ "minipass-collect": "^1.0.2",+ "minipass-flush": "^1.0.5",+ "minipass-pipeline": "^1.2.4",+ "mkdirp": "^1.0.4",+ "p-map": "^4.0.0",+ "promise-inflight": "^1.0.1",+ "rimraf": "^3.0.2",+ "ssri": "^9.0.0",+ "tar": "^6.1.11",+ "unique-filename": "^2.0.0"+ },+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ }+ },+ "node_modules/cacache/node_modules/lru-cache": {+ "version": "7.18.3",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/cacheable-lookup": {+ "version": "5.0.4",+ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",+ "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10.6.0"+ }+ },+ "node_modules/cacheable-request": {+ "version": "7.0.4",+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz",+ "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "clone-response": "^1.0.2",+ "get-stream": "^5.1.0",+ "http-cache-semantics": "^4.0.0",+ "keyv": "^4.0.0",+ "lowercase-keys": "^2.0.0",+ "normalize-url": "^6.0.1",+ "responselike": "^2.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/caniuse-lite": {+ "version": "1.0.30001793",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001793.tgz",+ "integrity": "sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "CC-BY-4.0"+ },+ "node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "node_modules/chownr": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/classnames": {+ "version": "2.5.1",+ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",+ "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==",+ "license": "MIT"+ },+ "node_modules/clean-stack": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",+ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/cli-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "restore-cursor": "^3.1.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/cli-spinners": {+ "version": "2.9.2",+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",+ "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/cliui": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "string-width": "^4.2.0",+ "strip-ansi": "^6.0.1",+ "wrap-ansi": "^7.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/clone": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.8"+ }+ },+ "node_modules/clone-response": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",+ "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mimic-response": "^1.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/codemirror": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz",+ "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==",+ "license": "MIT",+ "dependencies": {+ "@codemirror/autocomplete": "^6.0.0",+ "@codemirror/commands": "^6.0.0",+ "@codemirror/language": "^6.0.0",+ "@codemirror/lint": "^6.0.0",+ "@codemirror/search": "^6.0.0",+ "@codemirror/state": "^6.0.0",+ "@codemirror/view": "^6.0.0"+ }+ },+ "node_modules/color-convert": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "color-name": "~1.1.4"+ },+ "engines": {+ "node": ">=7.0.0"+ }+ },+ "node_modules/color-name": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/commit-graph": {+ "version": "2.4.0",+ "resolved": "https://registry.npmjs.org/commit-graph/-/commit-graph-2.4.0.tgz",+ "integrity": "sha512-o5U82nXojdgqoSW2d+N8KEo3MG5CukVxNCFPM7g/4onIjVlorQeNp1p+qJH3pgFL3+yTaSioqL/kfffugKZ0dg==",+ "license": "MIT",+ "dependencies": {+ "react": ">=18.0.0",+ "react-dom": ">=18.0.0",+ "react-icons": "^5.6.0",+ "react-infinite-scroller": "^1.2.6",+ "react-tooltip": "^5.30.0",+ "reactjs-popup": "^2.0.6"+ },+ "peerDependencies": {+ "react": ">=18.0.0",+ "react-dom": ">=18.0.0"+ }+ },+ "node_modules/concat-map": {+ "version": "0.0.1",+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/convert-source-map": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/crelt": {+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz",+ "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==",+ "license": "MIT"+ },+ "node_modules/cross-spawn": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "path-key": "^3.1.0",+ "shebang-command": "^2.0.0",+ "which": "^2.0.1"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/csstype": {+ "version": "3.2.3",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",+ "devOptional": true,+ "license": "MIT"+ },+ "node_modules/debug": {+ "version": "4.4.3",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ms": "^2.1.3"+ },+ "engines": {+ "node": ">=6.0"+ },+ "peerDependenciesMeta": {+ "supports-color": {+ "optional": true+ }+ }+ },+ "node_modules/decompress-response": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mimic-response": "^3.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/decompress-response/node_modules/mimic-response": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/defaults": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",+ "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "clone": "^1.0.2"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/defer-to-connect": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",+ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/define-data-property": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "es-define-property": "^1.0.0",+ "es-errors": "^1.3.0",+ "gopd": "^1.0.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/define-properties": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "define-data-property": "^1.0.1",+ "has-property-descriptors": "^1.0.0",+ "object-keys": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/detect-libc": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/detect-node": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",+ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "node_modules/earcut": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.2.tgz",+ "integrity": "sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ==",+ "license": "ISC"+ },+ "node_modules/electron": {+ "version": "32.3.3",+ "resolved": "https://registry.npmjs.org/electron/-/electron-32.3.3.tgz",+ "integrity": "sha512-7FT8tDg+MueAw8dBn5LJqDvlM4cZkKJhXfgB3w7P5gvSoUQVAY6LIQcXJxgL+vw2rIRY/b9ak7ZBFbCMF2Bk4w==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "dependencies": {+ "@electron/get": "^2.0.0",+ "@types/node": "^20.9.0",+ "extract-zip": "^2.0.1"+ },+ "bin": {+ "electron": "cli.js"+ },+ "engines": {+ "node": ">= 12.20.55"+ }+ },+ "node_modules/electron-to-chromium": {+ "version": "1.5.363",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.363.tgz",+ "integrity": "sha512-VjUKPyWzGnT1fujlkEGC/BvN70Hh70KXtAqcmniXviYlJC/ivcT+BWGPyxWVbJZLfvtKR6dqg1L7T7pgAMBtWA==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/electron-vite": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/electron-vite/-/electron-vite-2.3.0.tgz",+ "integrity": "sha512-lsN2FymgJlp4k6MrcsphGqZQ9fKRdJKasoaiwIrAewN1tapYI/KINLdfEL7n10LuF0pPSNf/IqjzZbB5VINctg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/core": "^7.24.7",+ "@babel/plugin-transform-arrow-functions": "^7.24.7",+ "cac": "^6.7.14",+ "esbuild": "^0.21.5",+ "magic-string": "^0.30.10",+ "picocolors": "^1.0.1"+ },+ "bin": {+ "electron-vite": "bin/electron-vite.js"+ },+ "engines": {+ "node": "^18.0.0 || >=20.0.0"+ },+ "peerDependencies": {+ "@swc/core": "^1.0.0",+ "vite": "^4.0.0 || ^5.0.0"+ },+ "peerDependenciesMeta": {+ "@swc/core": {+ "optional": true+ }+ }+ },+ "node_modules/electron/node_modules/@types/node": {+ "version": "20.19.41",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.41.tgz",+ "integrity": "sha512-ECymXOukMnOoVkC2bb1Vc/w/836DXncOg5m8Xj1RH7xSHZJWNYY6Zh7EH477vcnD5egKNNfy2RpNOmuChhFPgQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "undici-types": "~6.21.0"+ }+ },+ "node_modules/emoji-regex": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/encoding": {+ "version": "0.1.13",+ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",+ "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "iconv-lite": "^0.6.2"+ }+ },+ "node_modules/end-of-stream": {+ "version": "1.4.5",+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",+ "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "once": "^1.4.0"+ }+ },+ "node_modules/env-paths": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/err-code": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",+ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/es-define-property": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/es-errors": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/es6-error": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",+ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "node_modules/esbuild": {+ "version": "0.21.5",+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",+ "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "bin": {+ "esbuild": "bin/esbuild"+ },+ "engines": {+ "node": ">=12"+ },+ "optionalDependencies": {+ "@esbuild/aix-ppc64": "0.21.5",+ "@esbuild/android-arm": "0.21.5",+ "@esbuild/android-arm64": "0.21.5",+ "@esbuild/android-x64": "0.21.5",+ "@esbuild/darwin-arm64": "0.21.5",+ "@esbuild/darwin-x64": "0.21.5",+ "@esbuild/freebsd-arm64": "0.21.5",+ "@esbuild/freebsd-x64": "0.21.5",+ "@esbuild/linux-arm": "0.21.5",+ "@esbuild/linux-arm64": "0.21.5",+ "@esbuild/linux-ia32": "0.21.5",+ "@esbuild/linux-loong64": "0.21.5",+ "@esbuild/linux-mips64el": "0.21.5",+ "@esbuild/linux-ppc64": "0.21.5",+ "@esbuild/linux-riscv64": "0.21.5",+ "@esbuild/linux-s390x": "0.21.5",+ "@esbuild/linux-x64": "0.21.5",+ "@esbuild/netbsd-x64": "0.21.5",+ "@esbuild/openbsd-x64": "0.21.5",+ "@esbuild/sunos-x64": "0.21.5",+ "@esbuild/win32-arm64": "0.21.5",+ "@esbuild/win32-ia32": "0.21.5",+ "@esbuild/win32-x64": "0.21.5"+ }+ },+ "node_modules/escalade": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/escape-string-regexp": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/eventemitter3": {+ "version": "5.0.4",+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz",+ "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==",+ "license": "MIT"+ },+ "node_modules/exponential-backoff": {+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz",+ "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==",+ "dev": true,+ "license": "Apache-2.0"+ },+ "node_modules/extract-zip": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "debug": "^4.1.1",+ "get-stream": "^5.1.0",+ "yauzl": "^2.10.0"+ },+ "bin": {+ "extract-zip": "cli.js"+ },+ "engines": {+ "node": ">= 10.17.0"+ },+ "optionalDependencies": {+ "@types/yauzl": "^2.9.1"+ }+ },+ "node_modules/fd-slicer": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "pend": "~1.2.0"+ }+ },+ "node_modules/fs-extra": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^4.0.0",+ "universalify": "^0.1.0"+ },+ "engines": {+ "node": ">=6 <7 || >=8"+ }+ },+ "node_modules/fs-minipass": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "minipass": "^3.0.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/fs.realpath": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/fsevents": {+ "version": "2.3.3",+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"+ }+ },+ "node_modules/gensync": {+ "version": "1.0.0-beta.2",+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/get-caller-file": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "6.* || 8.* || >= 10.*"+ }+ },+ "node_modules/get-stream": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "pump": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/gifuct-js": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/gifuct-js/-/gifuct-js-2.1.2.tgz",+ "integrity": "sha512-rI2asw77u0mGgwhV3qA+OEgYqaDn5UNqgs+Bx0FGwSpuqfYn+Ir6RQY5ENNQ8SbIiG/m5gVa7CD5RriO4f4Lsg==",+ "license": "MIT",+ "dependencies": {+ "js-binary-schema-parser": "^2.0.3"+ }+ },+ "node_modules/glob": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "fs.realpath": "^1.0.0",+ "inflight": "^1.0.4",+ "inherits": "2",+ "minimatch": "^5.0.1",+ "once": "^1.3.0"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/global-agent": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",+ "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",+ "dev": true,+ "license": "BSD-3-Clause",+ "optional": true,+ "dependencies": {+ "boolean": "^3.0.1",+ "es6-error": "^4.1.1",+ "matcher": "^3.0.0",+ "roarr": "^2.15.3",+ "semver": "^7.3.2",+ "serialize-error": "^7.0.1"+ },+ "engines": {+ "node": ">=10.0"+ }+ },+ "node_modules/global-agent/node_modules/semver": {+ "version": "7.8.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz",+ "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==",+ "dev": true,+ "license": "ISC",+ "optional": true,+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/globalthis": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",+ "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "define-properties": "^1.2.1",+ "gopd": "^1.0.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/gopd": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/got": {+ "version": "11.8.6",+ "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",+ "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@sindresorhus/is": "^4.0.0",+ "@szmarczak/http-timer": "^4.0.5",+ "@types/cacheable-request": "^6.0.1",+ "@types/responselike": "^1.0.0",+ "cacheable-lookup": "^5.0.3",+ "cacheable-request": "^7.0.2",+ "decompress-response": "^6.0.0",+ "http2-wrapper": "^1.0.0-beta.5.2",+ "lowercase-keys": "^2.0.0",+ "p-cancelable": "^2.0.0",+ "responselike": "^2.0.0"+ },+ "engines": {+ "node": ">=10.19.0"+ },+ "funding": {+ "url": "https://github.com/sindresorhus/got?sponsor=1"+ }+ },+ "node_modules/graceful-fs": {+ "version": "4.2.11",+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/has-flag": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/has-property-descriptors": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "es-define-property": "^1.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/http-cache-semantics": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",+ "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==",+ "dev": true,+ "license": "BSD-2-Clause"+ },+ "node_modules/http-proxy-agent": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",+ "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@tootallnate/once": "2",+ "agent-base": "6",+ "debug": "4"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/http2-wrapper": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",+ "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "quick-lru": "^5.1.1",+ "resolve-alpn": "^1.0.0"+ },+ "engines": {+ "node": ">=10.19.0"+ }+ },+ "node_modules/https-proxy-agent": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "agent-base": "6",+ "debug": "4"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/humanize-ms": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",+ "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ms": "^2.0.0"+ }+ },+ "node_modules/iconv-lite": {+ "version": "0.6.3",+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "safer-buffer": ">= 2.1.2 < 3.0.0"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/ieee754": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "BSD-3-Clause"+ },+ "node_modules/imurmurhash": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.8.19"+ }+ },+ "node_modules/indent-string": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",+ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/infer-owner": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",+ "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/inflight": {+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",+ "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "once": "^1.3.0",+ "wrappy": "1"+ }+ },+ "node_modules/inherits": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/ip-address": {+ "version": "10.2.0",+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz",+ "integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 12"+ }+ },+ "node_modules/is-fullwidth-code-point": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/is-interactive": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",+ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/is-lambda": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz",+ "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/is-unicode-supported": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",+ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/isexe": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/ismobilejs": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz",+ "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==",+ "license": "MIT"+ },+ "node_modules/js-binary-schema-parser": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/js-binary-schema-parser/-/js-binary-schema-parser-2.0.3.tgz",+ "integrity": "sha512-xezGJmOb4lk/M1ZZLTR/jaBHQ4gG/lqQnJqdIv4721DMggsa1bDVlHXNeHYogaIEHD9vCRv0fcL4hMA+Coarkg==",+ "license": "MIT"+ },+ "node_modules/js-tokens": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",+ "license": "MIT"+ },+ "node_modules/jsesc": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "jsesc": "bin/jsesc"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/json-buffer": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/json-stringify-safe": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",+ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",+ "dev": true,+ "license": "ISC",+ "optional": true+ },+ "node_modules/json5": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "json5": "lib/cli.js"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/jsonfile": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",+ "dev": true,+ "license": "MIT",+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/keyv": {+ "version": "4.5.4",+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "json-buffer": "3.0.1"+ }+ },+ "node_modules/log-symbols": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "chalk": "^4.1.0",+ "is-unicode-supported": "^0.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/loose-envify": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",+ "license": "MIT",+ "dependencies": {+ "js-tokens": "^3.0.0 || ^4.0.0"+ },+ "bin": {+ "loose-envify": "cli.js"+ }+ },+ "node_modules/lowercase-keys": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",+ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/lru-cache": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "yallist": "^3.0.2"+ }+ },+ "node_modules/magic-string": {+ "version": "0.30.21",+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.5"+ }+ },+ "node_modules/make-fetch-happen": {+ "version": "10.2.1",+ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz",+ "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "agentkeepalive": "^4.2.1",+ "cacache": "^16.1.0",+ "http-cache-semantics": "^4.1.0",+ "http-proxy-agent": "^5.0.0",+ "https-proxy-agent": "^5.0.0",+ "is-lambda": "^1.0.1",+ "lru-cache": "^7.7.1",+ "minipass": "^3.1.6",+ "minipass-collect": "^1.0.2",+ "minipass-fetch": "^2.0.3",+ "minipass-flush": "^1.0.5",+ "minipass-pipeline": "^1.2.4",+ "negotiator": "^0.6.3",+ "promise-retry": "^2.0.1",+ "socks-proxy-agent": "^7.0.0",+ "ssri": "^9.0.0"+ },+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ }+ },+ "node_modules/make-fetch-happen/node_modules/lru-cache": {+ "version": "7.18.3",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/matcher": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",+ "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "escape-string-regexp": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/mimic-fn": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/mimic-response": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",+ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/minimatch": {+ "version": "5.1.9",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",+ "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^2.0.1"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/minipass": {+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/minipass-collect": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",+ "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "minipass": "^3.0.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/minipass-fetch": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz",+ "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "minipass": "^3.1.6",+ "minipass-sized": "^1.0.3",+ "minizlib": "^2.1.2"+ },+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ },+ "optionalDependencies": {+ "encoding": "^0.1.13"+ }+ },+ "node_modules/minipass-flush": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.7.tgz",+ "integrity": "sha512-TbqTz9cUwWyHS2Dy89P3ocAGUGxKjjLuR9z8w4WUTGAVgEj17/4nhgo2Du56i0Fm3Pm30g4iA8Lcqctc76jCzA==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "minipass": "^3.0.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/minipass-pipeline": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz",+ "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "minipass": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/minipass-sized": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz",+ "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "minipass": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/minipass/node_modules/yallist": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/minizlib": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "minipass": "^3.0.0",+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/minizlib/node_modules/yallist": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/mkdirp": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "mkdirp": "bin/cmd.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/ms": {+ "version": "2.1.3",+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/nanoid": {+ "version": "3.3.12",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",+ "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "bin": {+ "nanoid": "bin/nanoid.cjs"+ },+ "engines": {+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"+ }+ },+ "node_modules/negotiator": {+ "version": "0.6.4",+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",+ "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.6"+ }+ },+ "node_modules/node-abi": {+ "version": "3.92.0",+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.92.0.tgz",+ "integrity": "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "semver": "^7.3.5"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/node-abi/node_modules/semver": {+ "version": "7.8.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz",+ "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/node-addon-api": {+ "version": "7.1.1",+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",+ "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",+ "license": "MIT"+ },+ "node_modules/node-api-version": {+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/node-api-version/-/node-api-version-0.2.1.tgz",+ "integrity": "sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "semver": "^7.3.5"+ }+ },+ "node_modules/node-api-version/node_modules/semver": {+ "version": "7.8.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz",+ "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/node-pty": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-1.1.0.tgz",+ "integrity": "sha512-20JqtutY6JPXTUnL0ij1uad7Qe1baT46lyolh2sSENDd4sTzKZ4nmAFkeAARDKwmlLjPx6XKRlwRUxwjOy+lUg==",+ "hasInstallScript": true,+ "license": "MIT",+ "dependencies": {+ "node-addon-api": "^7.1.0"+ }+ },+ "node_modules/node-releases": {+ "version": "2.0.46",+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.46.tgz",+ "integrity": "sha512-GYVXHE2KnrzAfsAjl4uP++evGFCrAU1jta4ubEjIG7YWt/64Gqv66a30yKwWczVjA6j3bM4nBwH7Pk1JmDHaxQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/nopt": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz",+ "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "abbrev": "^1.0.0"+ },+ "bin": {+ "nopt": "bin/nopt.js"+ },+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ }+ },+ "node_modules/normalize-url": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",+ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/object-assign": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/object-keys": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/once": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "wrappy": "1"+ }+ },+ "node_modules/onetime": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mimic-fn": "^2.1.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/ora": {+ "version": "5.4.1",+ "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",+ "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "bl": "^4.1.0",+ "chalk": "^4.1.0",+ "cli-cursor": "^3.1.0",+ "cli-spinners": "^2.5.0",+ "is-interactive": "^1.0.0",+ "is-unicode-supported": "^0.1.0",+ "log-symbols": "^4.1.0",+ "strip-ansi": "^6.0.0",+ "wcwidth": "^1.0.1"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-cancelable": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",+ "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/p-map": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",+ "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "aggregate-error": "^3.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/parse-svg-path": {+ "version": "0.1.2",+ "resolved": "https://registry.npmjs.org/parse-svg-path/-/parse-svg-path-0.1.2.tgz",+ "integrity": "sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==",+ "license": "MIT"+ },+ "node_modules/path-is-absolute": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/path-key": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/pend": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",+ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/picocolors": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/pixi.js": {+ "version": "8.18.1",+ "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.18.1.tgz",+ "integrity": "sha512-6LUPWYgulZhp/w4kam2XHXB0QedISZIqrJbRdHLLQ3csn5a38uzKxAp6B5j6s89QFYaIJbg95kvgTRcbgpO1ow==",+ "license": "MIT",+ "workspaces": [+ "examples",+ "playground"+ ],+ "dependencies": {+ "@pixi/colord": "^2.9.6",+ "@types/earcut": "^3.0.0",+ "@webgpu/types": "^0.1.69",+ "@xmldom/xmldom": "^0.8.12",+ "earcut": "^3.0.2",+ "eventemitter3": "^5.0.1",+ "gifuct-js": "^2.1.2",+ "ismobilejs": "^1.1.1",+ "parse-svg-path": "^0.1.2",+ "tiny-lru": "^11.4.7"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/pixijs"+ }+ },+ "node_modules/postcss": {+ "version": "8.5.15",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz",+ "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/postcss"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "nanoid": "^3.3.12",+ "picocolors": "^1.1.1",+ "source-map-js": "^1.2.1"+ },+ "engines": {+ "node": "^10 || ^12 || >=14"+ }+ },+ "node_modules/proc-log": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz",+ "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ }+ },+ "node_modules/progress": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.4.0"+ }+ },+ "node_modules/promise-inflight": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",+ "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/promise-retry": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",+ "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "err-code": "^2.0.2",+ "retry": "^0.12.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/prop-types": {+ "version": "15.8.1",+ "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",+ "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",+ "license": "MIT",+ "dependencies": {+ "loose-envify": "^1.4.0",+ "object-assign": "^4.1.1",+ "react-is": "^16.13.1"+ }+ },+ "node_modules/pump": {+ "version": "3.0.4",+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz",+ "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "end-of-stream": "^1.1.0",+ "once": "^1.3.1"+ }+ },+ "node_modules/quick-lru": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/react": {+ "version": "18.3.1",+ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",+ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",+ "license": "MIT",+ "dependencies": {+ "loose-envify": "^1.1.0"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/react-dom": {+ "version": "18.3.1",+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",+ "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",+ "license": "MIT",+ "dependencies": {+ "loose-envify": "^1.1.0",+ "scheduler": "^0.23.2"+ },+ "peerDependencies": {+ "react": "^18.3.1"+ }+ },+ "node_modules/react-icons": {+ "version": "5.6.0",+ "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.6.0.tgz",+ "integrity": "sha512-RH93p5ki6LfOiIt0UtDyNg/cee+HLVR6cHHtW3wALfo+eOHTp8RnU2kRkI6E+H19zMIs03DyxUG/GfZMOGvmiA==",+ "license": "MIT",+ "peerDependencies": {+ "react": "*"+ }+ },+ "node_modules/react-infinite-scroller": {+ "version": "1.2.6",+ "resolved": "https://registry.npmjs.org/react-infinite-scroller/-/react-infinite-scroller-1.2.6.tgz",+ "integrity": "sha512-mGdMyOD00YArJ1S1F3TVU9y4fGSfVVl6p5gh/Vt4u99CJOptfVu/q5V/Wlle72TMgYlBwIhbxK5wF0C/R33PXQ==",+ "license": "MIT",+ "dependencies": {+ "prop-types": "^15.5.8"+ },+ "peerDependencies": {+ "react": "^0.14.9 || ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"+ }+ },+ "node_modules/react-is": {+ "version": "16.13.1",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",+ "license": "MIT"+ },+ "node_modules/react-refresh": {+ "version": "0.17.0",+ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz",+ "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/react-tooltip": {+ "version": "5.30.1",+ "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-5.30.1.tgz",+ "integrity": "sha512-1lSPLQXuVooePxadUpmcwLgOsF1mIty7UZTJ9XnyfX4drOzStYs4JMXnazcDLguQr41W5OUZddOp9kfvArdpEQ==",+ "license": "MIT",+ "dependencies": {+ "@floating-ui/dom": "^1.6.1",+ "classnames": "^2.3.0"+ },+ "peerDependencies": {+ "react": ">=16.14.0",+ "react-dom": ">=16.14.0"+ }+ },+ "node_modules/reactjs-popup": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/reactjs-popup/-/reactjs-popup-2.0.6.tgz",+ "integrity": "sha512-A+tt+x9wdgZiZjv0e2WzYLD3IfFwJALaRaqwrCSXGjo0iQdsry/EtBEbQXRSmQs7cHmOi5eytCiSlOm8k4C+dg==",+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "peerDependencies": {+ "react": ">=16",+ "react-dom": ">=16"+ }+ },+ "node_modules/read-binary-file-arch": {+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/read-binary-file-arch/-/read-binary-file-arch-1.0.6.tgz",+ "integrity": "sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^4.3.4"+ },+ "bin": {+ "read-binary-file-arch": "cli.js"+ }+ },+ "node_modules/readable-stream": {+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "inherits": "^2.0.3",+ "string_decoder": "^1.1.1",+ "util-deprecate": "^1.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/require-directory": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/resolve-alpn": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",+ "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/responselike": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",+ "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "lowercase-keys": "^2.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/restore-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "onetime": "^5.1.0",+ "signal-exit": "^3.0.2"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/retry": {+ "version": "0.12.0",+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",+ "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 4"+ }+ },+ "node_modules/rimraf": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",+ "deprecated": "Rimraf versions prior to v4 are no longer supported",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "glob": "^7.1.3"+ },+ "bin": {+ "rimraf": "bin.js"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/rimraf/node_modules/brace-expansion": {+ "version": "1.1.15",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz",+ "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0",+ "concat-map": "0.0.1"+ }+ },+ "node_modules/rimraf/node_modules/glob": {+ "version": "7.2.3",+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "fs.realpath": "^1.0.0",+ "inflight": "^1.0.4",+ "inherits": "2",+ "minimatch": "^3.1.1",+ "once": "^1.3.0",+ "path-is-absolute": "^1.0.0"+ },+ "engines": {+ "node": "*"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/rimraf/node_modules/minimatch": {+ "version": "3.1.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",+ "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^1.1.7"+ },+ "engines": {+ "node": "*"+ }+ },+ "node_modules/roarr": {+ "version": "2.15.4",+ "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",+ "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",+ "dev": true,+ "license": "BSD-3-Clause",+ "optional": true,+ "dependencies": {+ "boolean": "^3.0.1",+ "detect-node": "^2.0.4",+ "globalthis": "^1.0.1",+ "json-stringify-safe": "^5.0.1",+ "semver-compare": "^1.0.0",+ "sprintf-js": "^1.1.2"+ },+ "engines": {+ "node": ">=8.0"+ }+ },+ "node_modules/rollup": {+ "version": "4.60.4",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.4.tgz",+ "integrity": "sha512-WHeFSbZYsPu3+bLoNRUuAO+wavNlocOPf3wSHTP7hcFKVnJeWsYlCDbr3mTS14FCizf9ccIxXA8sGL8zKeQN3g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/estree": "1.0.8"+ },+ "bin": {+ "rollup": "dist/bin/rollup"+ },+ "engines": {+ "node": ">=18.0.0",+ "npm": ">=8.0.0"+ },+ "optionalDependencies": {+ "@rollup/rollup-android-arm-eabi": "4.60.4",+ "@rollup/rollup-android-arm64": "4.60.4",+ "@rollup/rollup-darwin-arm64": "4.60.4",+ "@rollup/rollup-darwin-x64": "4.60.4",+ "@rollup/rollup-freebsd-arm64": "4.60.4",+ "@rollup/rollup-freebsd-x64": "4.60.4",+ "@rollup/rollup-linux-arm-gnueabihf": "4.60.4",+ "@rollup/rollup-linux-arm-musleabihf": "4.60.4",+ "@rollup/rollup-linux-arm64-gnu": "4.60.4",+ "@rollup/rollup-linux-arm64-musl": "4.60.4",+ "@rollup/rollup-linux-loong64-gnu": "4.60.4",+ "@rollup/rollup-linux-loong64-musl": "4.60.4",+ "@rollup/rollup-linux-ppc64-gnu": "4.60.4",+ "@rollup/rollup-linux-ppc64-musl": "4.60.4",+ "@rollup/rollup-linux-riscv64-gnu": "4.60.4",+ "@rollup/rollup-linux-riscv64-musl": "4.60.4",+ "@rollup/rollup-linux-s390x-gnu": "4.60.4",+ "@rollup/rollup-linux-x64-gnu": "4.60.4",+ "@rollup/rollup-linux-x64-musl": "4.60.4",+ "@rollup/rollup-openbsd-x64": "4.60.4",+ "@rollup/rollup-openharmony-arm64": "4.60.4",+ "@rollup/rollup-win32-arm64-msvc": "4.60.4",+ "@rollup/rollup-win32-ia32-msvc": "4.60.4",+ "@rollup/rollup-win32-x64-gnu": "4.60.4",+ "@rollup/rollup-win32-x64-msvc": "4.60.4",+ "fsevents": "~2.3.2"+ }+ },+ "node_modules/safe-buffer": {+ "version": "5.2.1",+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT"+ },+ "node_modules/safer-buffer": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "node_modules/scheduler": {+ "version": "0.23.2",+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",+ "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",+ "license": "MIT",+ "dependencies": {+ "loose-envify": "^1.1.0"+ }+ },+ "node_modules/semver": {+ "version": "6.3.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ }+ },+ "node_modules/semver-compare": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",+ "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "node_modules/serialize-error": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",+ "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "type-fest": "^0.13.1"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/shebang-command": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "shebang-regex": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/shebang-regex": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/signal-exit": {+ "version": "3.0.7",+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/smart-buffer": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",+ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 6.0.0",+ "npm": ">= 3.0.0"+ }+ },+ "node_modules/socks": {+ "version": "2.8.9",+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.9.tgz",+ "integrity": "sha512-LJhUYUvItdQ0LkJTmPeaEObWXAqFyfmP85x0tch/ez9cahmhlBBLbIqDFnvBnUJGagb0JbIQrkBs1wJ+yRYpEw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ip-address": "^10.1.1",+ "smart-buffer": "^4.2.0"+ },+ "engines": {+ "node": ">= 10.0.0",+ "npm": ">= 3.0.0"+ }+ },+ "node_modules/socks-proxy-agent": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz",+ "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "agent-base": "^6.0.2",+ "debug": "^4.3.3",+ "socks": "^2.6.2"+ },+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/source-map-js": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",+ "dev": true,+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/sprintf-js": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",+ "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",+ "dev": true,+ "license": "BSD-3-Clause",+ "optional": true+ },+ "node_modules/ssri": {+ "version": "9.0.1",+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz",+ "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "minipass": "^3.1.1"+ },+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ }+ },+ "node_modules/string_decoder": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "safe-buffer": "~5.2.0"+ }+ },+ "node_modules/string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/strip-ansi": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-regex": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/style-mod": {+ "version": "4.1.3",+ "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz",+ "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==",+ "license": "MIT"+ },+ "node_modules/sumchecker": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",+ "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "debug": "^4.1.0"+ },+ "engines": {+ "node": ">= 8.0"+ }+ },+ "node_modules/supports-color": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "has-flag": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/tar": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",+ "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",+ "deprecated": "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "chownr": "^2.0.0",+ "fs-minipass": "^2.0.0",+ "minipass": "^5.0.0",+ "minizlib": "^2.1.1",+ "mkdirp": "^1.0.3",+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/tar/node_modules/minipass": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",+ "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/tar/node_modules/yallist": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/tiny-lru": {+ "version": "11.4.7",+ "resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-11.4.7.tgz",+ "integrity": "sha512-w/Te7uMUVeH0CR8vZIjr+XiN41V+30lkDdK+NRIDCUYKKuL9VcmaUEmaPISuwGhLlrTGh5yu18lENtR9axSxYw==",+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/type-fest": {+ "version": "0.13.1",+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",+ "dev": true,+ "license": "(MIT OR CC0-1.0)",+ "optional": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/typescript": {+ "version": "5.9.3",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "tsc": "bin/tsc",+ "tsserver": "bin/tsserver"+ },+ "engines": {+ "node": ">=14.17"+ }+ },+ "node_modules/undici-types": {+ "version": "6.21.0",+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/unique-filename": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz",+ "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "unique-slug": "^3.0.0"+ },+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ }+ },+ "node_modules/unique-slug": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz",+ "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "imurmurhash": "^0.1.4"+ },+ "engines": {+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"+ }+ },+ "node_modules/universalify": {+ "version": "0.1.2",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 4.0.0"+ }+ },+ "node_modules/update-browserslist-db": {+ "version": "1.2.3",+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",+ "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "escalade": "^3.2.0",+ "picocolors": "^1.1.1"+ },+ "bin": {+ "update-browserslist-db": "cli.js"+ },+ "peerDependencies": {+ "browserslist": ">= 4.21.0"+ }+ },+ "node_modules/use-sync-external-store": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz",+ "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==",+ "license": "MIT",+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"+ }+ },+ "node_modules/util-deprecate": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/vite": {+ "version": "5.4.21",+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz",+ "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "esbuild": "^0.21.3",+ "postcss": "^8.4.43",+ "rollup": "^4.20.0"+ },+ "bin": {+ "vite": "bin/vite.js"+ },+ "engines": {+ "node": "^18.0.0 || >=20.0.0"+ },+ "funding": {+ "url": "https://github.com/vitejs/vite?sponsor=1"+ },+ "optionalDependencies": {+ "fsevents": "~2.3.3"+ },+ "peerDependencies": {+ "@types/node": "^18.0.0 || >=20.0.0",+ "less": "*",+ "lightningcss": "^1.21.0",+ "sass": "*",+ "sass-embedded": "*",+ "stylus": "*",+ "sugarss": "*",+ "terser": "^5.4.0"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ },+ "less": {+ "optional": true+ },+ "lightningcss": {+ "optional": true+ },+ "sass": {+ "optional": true+ },+ "sass-embedded": {+ "optional": true+ },+ "stylus": {+ "optional": true+ },+ "sugarss": {+ "optional": true+ },+ "terser": {+ "optional": true+ }+ }+ },+ "node_modules/w3c-keyname": {+ "version": "2.2.8",+ "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",+ "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==",+ "license": "MIT"+ },+ "node_modules/wcwidth": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",+ "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "defaults": "^1.0.3"+ }+ },+ "node_modules/which": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "isexe": "^2.0.0"+ },+ "bin": {+ "node-which": "bin/node-which"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/wrap-ansi": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-styles": "^4.0.0",+ "string-width": "^4.1.0",+ "strip-ansi": "^6.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"+ }+ },+ "node_modules/wrappy": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/y18n": {+ "version": "5.0.8",+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/yallist": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/yargs": {+ "version": "17.7.2",+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "cliui": "^8.0.1",+ "escalade": "^3.1.1",+ "get-caller-file": "^2.0.5",+ "require-directory": "^2.1.1",+ "string-width": "^4.2.3",+ "y18n": "^5.0.5",+ "yargs-parser": "^21.1.1"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/yargs-parser": {+ "version": "21.1.1",+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/yauzl": {+ "version": "2.10.0",+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",+ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "buffer-crc32": "~0.2.3",+ "fd-slicer": "~1.1.0"+ }+ },+ "node_modules/zustand": {+ "version": "4.5.7",+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz",+ "integrity": "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==",+ "license": "MIT",+ "dependencies": {+ "use-sync-external-store": "^1.2.2"+ },+ "engines": {+ "node": ">=12.7.0"+ },+ "peerDependencies": {+ "@types/react": ">=16.8",+ "immer": ">=9.0.6",+ "react": ">=16.8"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "immer": {+ "optional": true+ },+ "react": {+ "optional": true+ }+ }+ }+ }+}diff --git a/package.json b/package.jsonnew file mode 100644index 00000000..d50e0b33--- /dev/null+++ b/package.json@@ -0,0 +1,49 @@+{+ "name": "claude-terminal-harness",+ "version": "0.1.0",+ "private": true,+ "description": "A Nintendo-styled desktop control room for your Claude Code agents.",+ "main": "out/main/index.js",+ "scripts": {+ "dev": "electron-vite dev",+ "build": "electron-vite build",+ "preview": "electron-vite preview",+ "postinstall": "electron-rebuild -f -w node-pty",+ "typecheck:node": "tsc --noEmit -p tsconfig.node.json",+ "typecheck:web": "tsc --noEmit -p tsconfig.web.json",+ "typecheck": "npm run typecheck:node && npm run typecheck:web"+ },+ "dependencies": {+ "@codemirror/lang-css": "^6.3.1",+ "@codemirror/lang-html": "^6.4.11",+ "@codemirror/lang-javascript": "^6.2.5",+ "@codemirror/lang-json": "^6.0.2",+ "@codemirror/lang-markdown": "^6.5.0",+ "@codemirror/lang-python": "^6.2.1",+ "@codemirror/lang-yaml": "^6.1.3",+ "@codemirror/language": "^6.12.3",+ "@codemirror/state": "^6.6.0",+ "@codemirror/view": "^6.43.0",+ "@lezer/highlight": "^1.2.3",+ "@uiw/react-codemirror": "^4.25.10",+ "@xterm/addon-fit": "^0.10.0",+ "@xterm/xterm": "^5.5.0",+ "commit-graph": "^2.4.0",+ "node-pty": "^1.0.0",+ "pixi.js": "^8.5.1",+ "react": "^18.3.1",+ "react-dom": "^18.3.1",+ "zustand": "^4.5.5"+ },+ "devDependencies": {+ "@electron/rebuild": "^3.7.0",+ "@types/node": "^22.7.5",+ "@types/react": "^18.3.11",+ "@types/react-dom": "^18.3.0",+ "@vitejs/plugin-react": "^4.3.2",+ "electron": "^32.2.0",+ "electron-vite": "^2.3.0",+ "typescript": "^5.6.3",+ "vite": "^5.4.8"+ }+}diff --git a/src/main/config.ts b/src/main/config.tsnew file mode 100644index 00000000..87805f82--- /dev/null+++ b/src/main/config.ts@@ -0,0 +1,73 @@+import { app } from 'electron';+import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';+import { dirname, join } from 'node:path';++export interface HarnessConfig {+ /** Has the user completed the first-run onboarding? */+ onboardingComplete: boolean;+ /** Folder where the harness keeps its own state (agent metadata, logs). */+ harnessHome: string | null;+ /** Folders the user registered during onboarding (used as quick-picks). */+ registeredRepos: string[];+ /** When true, new agents are spawned with --permission-mode bypassPermissions. */+ autoMode: boolean;+ /** The command we run when spawning a new agent. */+ defaultCommand: string;+ /** Enable semantic memory (MemPalace CLI). No-op if mempalace isn't installed. */+ semanticMemory: boolean;+ /** Embedding model for the palace: lightweight 'minilm' or multilingual 'embeddinggemma'. */+ embeddingModel: 'minilm' | 'embeddinggemma';+}++const DEFAULTS: HarnessConfig = {+ onboardingComplete: false,+ harnessHome: null,+ registeredRepos: [],+ autoMode: true,+ defaultCommand: 'claude',+ semanticMemory: true,+ embeddingModel: 'minilm'+};++function configPath(): string {+ return join(app.getPath('userData'), 'config.json');+}++export function readConfig(): HarnessConfig {+ const p = configPath();+ if (!existsSync(p)) return { ...DEFAULTS };+ try {+ const raw = readFileSync(p, 'utf8');+ const parsed = JSON.parse(raw);+ return { ...DEFAULTS, ...parsed };+ } catch {+ return { ...DEFAULTS };+ }+}++export function writeConfig(patch: Partial<HarnessConfig>): HarnessConfig {+ const current = readConfig();+ const next: HarnessConfig = { ...current, ...patch };+ const p = configPath();+ mkdirSync(dirname(p), { recursive: true });+ writeFileSync(p, JSON.stringify(next, null, 2), 'utf8');+ return next;+}++/** Auto-suggested command string given current autoMode preference. */+export function commandForAutoMode(config: HarnessConfig): string {+ if (config.autoMode) {+ return `${config.defaultCommand} --permission-mode bypassPermissions`;+ }+ return config.defaultCommand;+}++/** Ensure harnessHome exists on disk. */+export function ensureHarnessHome(path: string): { ok: boolean; error?: string } {+ try {+ mkdirSync(path, { recursive: true });+ return { ok: true };+ } catch (e) {+ return { ok: false, error: e instanceof Error ? e.message : String(e) };+ }+}diff --git a/src/main/fs.ts b/src/main/fs.tsnew file mode 100644index 00000000..a465c44a--- /dev/null+++ b/src/main/fs.ts@@ -0,0 +1,80 @@+import { readdir, readFile, writeFile, stat } from 'node:fs/promises';+import { isAbsolute, join, normalize, relative, resolve } from 'node:path';++/**+ * Confines `path` inside `root` to prevent path-traversal escapes.+ * Returns the resolved absolute path on success, or null on violation.+ */+function safeJoin(root: string, rel: string): string | null {+ const absRoot = resolve(root);+ const absPath = isAbsolute(rel) ? normalize(rel) : resolve(absRoot, rel);+ const rel2 = relative(absRoot, absPath);+ if (rel2.startsWith('..') || isAbsolute(rel2)) return null;+ return absPath;+}++export interface DirEntry {+ name: string;+ isDir: boolean;+ size: number;+ mtime: number;+}++export async function listDir(root: string, rel: string): Promise<{+ ok: true; entries: DirEntry[]; path: string;+} | { ok: false; error: string }> {+ const abs = safeJoin(root, rel);+ if (!abs) return { ok: false, error: 'path escapes root' };+ try {+ const names = await readdir(abs);+ const entries = await Promise.all(names.map(async (name): Promise<DirEntry> => {+ try {+ const s = await stat(join(abs, name));+ return { name, isDir: s.isDirectory(), size: s.size, mtime: s.mtimeMs };+ } catch {+ return { name, isDir: false, size: 0, mtime: 0 };+ }+ }));+ entries.sort((a, b) => {+ if (a.isDir !== b.isDir) return a.isDir ? -1 : 1;+ return a.name.localeCompare(b.name);+ });+ return { ok: true, entries, path: abs };+ } catch (e) {+ return { ok: false, error: e instanceof Error ? e.message : String(e) };+ }+}++const MAX_READ_BYTES = 2 * 1024 * 1024; // 2 MB++export async function readFileText(root: string, rel: string): Promise<{+ ok: true; content: string; path: string; size: number;+} | { ok: false; error: string }> {+ const abs = safeJoin(root, rel);+ if (!abs) return { ok: false, error: 'path escapes root' };+ try {+ const s = await stat(abs);+ if (s.size > MAX_READ_BYTES) {+ return { ok: false, error: `file too large (${(s.size / 1024 / 1024).toFixed(1)} MB)` };+ }+ const buf = await readFile(abs);+ // Reject obvious binary files based on null-byte sniff+ if (buf.includes(0)) return { ok: false, error: 'binary file (not displayable)' };+ return { ok: true, content: buf.toString('utf8'), path: abs, size: s.size };+ } catch (e) {+ return { ok: false, error: e instanceof Error ? e.message : String(e) };+ }+}++export async function writeFileText(root: string, rel: string, content: string): Promise<{+ ok: true; path: string;+} | { ok: false; error: string }> {+ const abs = safeJoin(root, rel);+ if (!abs) return { ok: false, error: 'path escapes root' };+ try {+ await writeFile(abs, content, 'utf8');+ return { ok: true, path: abs };+ } catch (e) {+ return { ok: false, error: e instanceof Error ? e.message : String(e) };+ }+}diff --git a/src/main/git.ts b/src/main/git.tsnew file mode 100644index 00000000..24042730--- /dev/null+++ b/src/main/git.ts@@ -0,0 +1,143 @@+import { spawn } from 'node:child_process';++/** Run git in `cwd` with `args`. Returns stdout text or an error. */+function runGit(cwd: string, args: string[], timeoutMs = 8000): Promise<{+ ok: true; stdout: string;+} | { ok: false; error: string }> {+ return new Promise((resolve) => {+ const proc = spawn('git', args, { cwd });+ let stdout = '';+ let stderr = '';+ const timer = setTimeout(() => {+ try { proc.kill('SIGKILL'); } catch { /* noop */ }+ }, timeoutMs);+ proc.stdout.on('data', d => { stdout += d.toString(); });+ proc.stderr.on('data', d => { stderr += d.toString(); });+ proc.on('error', e => {+ clearTimeout(timer);+ resolve({ ok: false, error: e.message });+ });+ proc.on('close', code => {+ clearTimeout(timer);+ if (code === 0) resolve({ ok: true, stdout });+ else resolve({ ok: false, error: stderr.trim() || `git exited ${code}` });+ });+ });+}++export interface GitBranchInfo {+ current: string | null;+ detached: boolean;+}+export interface GitStatusEntry {+ path: string;+ index: string; // staged status char+ worktree: string; // unstaged status char+}+export interface GitStatus {+ staged: GitStatusEntry[];+ unstaged: GitStatusEntry[];+ untracked: string[];+}+export interface GitCommit {+ sha: string;+ shortSha: string;+ parents: string[];+ subject: string;+ author: string;+ time: number; // unix seconds+ refs: string[]; // branch/tag refs+}+export interface GitAheadBehind {+ ahead: number;+ behind: number;+ upstream: string | null;+}++export async function getBranch(cwd: string): Promise<GitBranchInfo | { error: string }> {+ const head = await runGit(cwd, ['rev-parse', '--abbrev-ref', 'HEAD']);+ if (!head.ok) return { error: head.error };+ const name = head.stdout.trim();+ if (name === 'HEAD') return { current: null, detached: true };+ return { current: name, detached: false };+}++export async function getStatus(cwd: string): Promise<GitStatus | { error: string }> {+ const res = await runGit(cwd, ['status', '--porcelain=v1', '-z', '--untracked-files=all']);+ if (!res.ok) return { error: res.error };+ const entries: GitStatusEntry[] = [];+ const untracked: string[] = [];+ const tokens = res.stdout.split('\0').filter(Boolean);+ for (const token of tokens) {+ if (token.length < 3) continue;+ const index = token[0];+ const worktree = token[1];+ const path = token.slice(3);+ if (index === '?' && worktree === '?') untracked.push(path);+ else entries.push({ path, index, worktree });+ }+ return {+ staged: entries.filter(e => e.index !== ' ' && e.index !== '?'),+ unstaged: entries.filter(e => e.worktree !== ' ' && e.worktree !== '?'),+ untracked+ };+}++export async function getLog(cwd: string, n: number): Promise<GitCommit[] | { error: string }> {+ const sep = '\x1e'; // record separator+ const fsep = '\x1f'; // field separator+ const fmt = ['%H', '%P', '%s', '%an', '%at', '%D'].join(fsep) + sep;+ const res = await runGit(cwd, ['log', '--all', `--max-count=${n}`, `--pretty=format:${fmt}`]);+ if (!res.ok) return { error: res.error };+ const out: GitCommit[] = [];+ for (const rec of res.stdout.split(sep)) {+ if (!rec.trim()) continue;+ const [sha, parents, subject, author, atime, refs] = rec.split(fsep);+ if (!sha) continue;+ out.push({+ sha,+ shortSha: sha.slice(0, 7),+ parents: parents.split(' ').filter(Boolean),+ subject: subject ?? '',+ author: author ?? '',+ time: parseInt(atime, 10) || 0,+ refs: (refs ?? '').split(', ').map(s => s.trim()).filter(Boolean)+ });+ }+ return out;+}++export async function getBranches(cwd: string): Promise<{+ local: string[]; remote: string[]; current: string | null;+} | { error: string }> {+ const res = await runGit(cwd, ['branch', '-a', '--format=%(HEAD)\x1f%(refname:short)']);+ if (!res.ok) return { error: res.error };+ let current: string | null = null;+ const local: string[] = [];+ const remote: string[] = [];+ for (const line of res.stdout.split('\n')) {+ if (!line) continue;+ const [head, name] = line.split('\x1f');+ if (!name) continue;+ if (head.trim() === '*') current = name;+ if (name.startsWith('remotes/')) remote.push(name.replace(/^remotes\//, ''));+ else local.push(name);+ }+ return { local, remote, current };+}++export async function getAheadBehind(cwd: string): Promise<GitAheadBehind | { error: string }> {+ const up = await runGit(cwd, ['rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{u}']);+ if (!up.ok) return { ahead: 0, behind: 0, upstream: null };+ const upstream = up.stdout.trim();+ const ab = await runGit(cwd, ['rev-list', '--left-right', '--count', `HEAD...${upstream}`]);+ if (!ab.ok) return { error: ab.error };+ const [ahead, behind] = ab.stdout.trim().split('\t').map(n => parseInt(n, 10) || 0);+ return { ahead, behind, upstream };+}++/** Best-effort detect: is `cwd` actually a git repo? */+export async function isRepo(cwd: string): Promise<boolean> {+ const res = await runGit(cwd, ['rev-parse', '--is-inside-work-tree']);+ return res.ok && res.stdout.trim() === 'true';+}diff --git a/src/main/hive.ts b/src/main/hive.tsnew file mode 100644index 00000000..868c43b0--- /dev/null+++ b/src/main/hive.ts@@ -0,0 +1,601 @@+/**+ * The Hive — the on-disk multi-agent coordination layer.+ *+ * Lives under `<harnessHome>/hive/` as a single git repo that ONLY this main+ * process commits to (agents never call git — they just write files). See+ * HIVE.md for the full design. Responsibilities:+ * - per-agent workspace (identity.md, memory.md, inbox/, outbox/, cursor.json)+ * - a roster (registry.json), shared blackboard (board.md), task ledger,+ * append-only event log (log.jsonl), and a human-approval queue (approvals/)+ * - a router that drains each agent's outbox into recipients' inboxes+ * - single-committer git with retry/backoff + stale-lock recovery+ *+ * Everything here runs in the Electron main process.+ */+import {+ existsSync, mkdirSync, readFileSync, writeFileSync, renameSync,+ readdirSync, statSync, rmSync, appendFileSync+} from 'node:fs';+import { join } from 'node:path';+import { spawnSync } from 'node:child_process';+import { randomBytes } from 'node:crypto';++// ─── Types ──────────────────────────────────────────────────────────────────++export type MessageAct = 'request' | 'inform' | 'propose' | 'query' | 'agree' | 'refuse' | 'done';++export interface HiveMessage {+ id: string;+ conversation: string;+ in_reply_to: string | null;+ from: string;+ to: string; // an agentId, 'god', or 'broadcast'+ act: MessageAct;+ subject: string;+ body: string;+ hops: number;+ requires_reply: boolean;+ needs_human: boolean;+ created_at: string;+}++export interface AgentMeta {+ id: string;+ name: string;+ role?: string;+ capabilities?: string[];+ cwd: string;+ isGod?: boolean;+}++export interface RegistryAgent extends AgentMeta {+ status: 'idle' | 'working' | 'blocked' | 'gone';+ lastSeen: number;+}++export interface Registry {+ godId: string | null;+ agents: Record<string, RegistryAgent>;+}++/** Build env + extra spawn args that make a `claude` process hive-aware. */+export interface SpawnInjection {+ args: string[];+ env: Record<string, string>;+}++const HOP_CAP = 12;++function sleepSync(ms: number): void {+ const sab = new SharedArrayBuffer(4);+ Atomics.wait(new Int32Array(sab), 0, 0, ms);+}++/** Filesystem- and sort-safe timestamp, e.g. 2026-05-30T14-03-11-123Z. */+function stamp(): string {+ return new Date().toISOString().replace(/[:.]/g, '-');+}++function shortRand(): string {+ return randomBytes(3).toString('hex');+}++// ─── HiveManager ────────────────────────────────────────────────────────────++export class HiveManager {+ /** Lazily resolve harnessHome so the hive follows config changes. */+ constructor(private getHome: () => string | null) {}++ private routerTimer: NodeJS.Timeout | null = null;++ // — paths —+ root(): string | null {+ const home = this.getHome();+ return home ? join(home, 'hive') : null;+ }+ enabled(): boolean {+ return this.root() !== null;+ }+ private agentDir(id: string): string {+ return join(this.root()!, 'agents', id);+ }+ /** Unix-domain socket the cth-hook shim talks to (Phase 1 autonomy). */+ sockPath(): string | null {+ const root = this.root();+ return root ? join(root, 'hooks.sock') : null;+ }+ private shimPath(): string | null {+ const root = this.root();+ return root ? join(root, 'bin', 'cth-hook.cjs') : null;+ }++ // — bootstrap —++ /** Create the hive skeleton + git repo if missing. Idempotent. */+ ensureHive(): void {+ const root = this.root();+ if (!root) return;+ mkdirSync(join(root, 'agents'), { recursive: true });+ mkdirSync(join(root, 'approvals'), { recursive: true });++ const protocol = join(root, 'PROTOCOL.md');+ if (!existsSync(protocol)) writeFileSync(protocol, PROTOCOL_MD, 'utf8');++ const registry = join(root, 'registry.json');+ if (!existsSync(registry)) {+ this.writeJson(registry, { godId: null, agents: {} } as Registry);+ }+ const board = join(root, 'board.md');+ if (!existsSync(board)) {+ writeFileSync(board, '# Hive board\n\n_Shared plans live here. The god agent is the scribe._\n', 'utf8');+ }+ const tasks = join(root, 'tasks.json');+ if (!existsSync(tasks)) this.writeJson(tasks, { tasks: [] });+ const log = join(root, 'log.jsonl');+ if (!existsSync(log)) writeFileSync(log, '', 'utf8');++ // The hook shim: a dumb pipe between a `claude` hook and our UDS. Refreshed+ // on every bootstrap so it tracks code changes.+ mkdirSync(join(root, 'bin'), { recursive: true });+ writeFileSync(this.shimPath()!, HOOK_SHIM, 'utf8');++ if (!existsSync(join(root, '.git'))) {+ this.git(['init', '-q'], root);+ this.commit('hive: init');+ }+ }++ /**+ * Ensure an agent's workspace + registry entry, returning the spawn injection+ * (extra `claude` args + env) that makes the process hive-aware.+ */+ ensureAgent(meta: AgentMeta, opts: { semanticMemory?: boolean } = {}): SpawnInjection {+ const root = this.root();+ if (!root) return { args: [], env: {} };+ this.ensureHive();++ const dir = this.agentDir(meta.id);+ mkdirSync(join(dir, 'inbox', '.done'), { recursive: true });+ mkdirSync(join(dir, 'outbox', '.sent'), { recursive: true });++ const identity = join(dir, 'identity.md');+ writeFileSync(identity, this.identityText(meta), 'utf8'); // refresh on each spawn++ const memory = join(dir, 'memory.md');+ if (!existsSync(memory)) {+ writeFileSync(memory, `# Memory — ${meta.name} (${meta.id})\n\n_Append durable facts, decisions, and context below._\n`, 'utf8');+ }+ const cursor = join(dir, 'cursor.json');+ if (!existsSync(cursor)) this.writeJson(cursor, { lastProcessed: null });++ // upsert registry+ const reg = this.registry();+ reg.agents[meta.id] = {+ ...meta,+ capabilities: meta.capabilities ?? [],+ role: meta.role ?? (meta.isGod ? 'orchestrator' : 'agent'),+ status: 'idle',+ lastSeen: Date.now()+ };+ if (meta.isGod) reg.godId = meta.id;+ this.writeJson(join(root, 'registry.json'), reg);++ this.appendLog({ kind: 'spawn', agentId: meta.id, name: meta.name, isGod: !!meta.isGod });+ this.commit(`hive: register ${meta.id}`);++ const env: Record<string, string> = {+ AGENT_ID: meta.id,+ AGENT_NAME: meta.name,+ HIVE_ROOT: root,+ AGENT_DIR: dir+ };+ const args = ['--append-system-prompt', this.injectedPrompt(meta, dir, root, opts.semanticMemory ?? false)];++ // Phase 1 — autonomy: attach lifecycle hooks via --settings (no edits to the+ // user's repo) so the agent reports activity and drains its inbox on Stop.+ const sock = this.sockPath();+ const shim = this.shimPath();+ if (sock && shim) {+ env.HIVE_SOCK = sock;+ const settingsPath = join(dir, 'settings.json');+ this.writeJson(settingsPath, this.hookSettings(shim));+ args.push('--settings', settingsPath);+ }+ return { args, env };+ }++ /** Claude Code settings that route every relevant hook through the shim. */+ private hookSettings(shim: string): unknown {+ const cmd = `node "${shim}"`;+ const entry = (matcher?: string) => ({+ ...(matcher ? { matcher } : {}),+ hooks: [{ type: 'command', command: cmd }]+ });+ return {+ hooks: {+ Stop: [entry()],+ SubagentStop: [entry()],+ PreToolUse: [entry('*')],+ PostToolUse: [entry('*')],+ UserPromptSubmit: [entry()],+ Notification: [entry()],+ SessionStart: [entry()]+ }+ };+ }++ /**+ * Drain an agent's inbox for the Stop hook. Returns whether to block-to-continue+ * and the message text to feed back. Uses the per-agent cursor so a message is+ * surfaced exactly once (no infinite loop).+ */+ drainForStop(agentId: string): { block: boolean; reason?: string } {+ const dir = this.agentDir(agentId);+ if (!existsSync(dir)) return { block: false };+ const cursorPath = join(dir, 'cursor.json');+ const cursor = this.readJson<{ lastProcessed: string | null }>(cursorPath, { lastProcessed: null });+ const fresh = this.inbox(agentId)+ .filter((m) => !cursor.lastProcessed || m.id > cursor.lastProcessed)+ .sort((a, b) => (a.id < b.id ? -1 : 1));+ if (fresh.length === 0) return { block: false };++ cursor.lastProcessed = fresh[fresh.length - 1].id;+ this.writeJson(cursorPath, cursor);+ this.appendLog({ kind: 'drain', agentId, count: fresh.length });++ const lines = fresh.map((m) => `- [from ${m.from}, ${m.act}] ${m.subject}: ${m.body}`).join('\n');+ const reason = [+ `You have ${fresh.length} new hive message(s) in your inbox. Address them before finishing:`,+ lines,+ `Open the files in ${dir}/inbox/ for full detail, act on each, then move handled ones to inbox/.done/. Reply via your outbox if a message requires it.`+ ].join('\n');+ return { block: true, reason };+ }++ // — agent-facing text —++ private identityText(meta: AgentMeta): string {+ const caps = (meta.capabilities ?? []).join(', ') || '—';+ return [+ `# ${meta.name} (${meta.id})`,+ '',+ `- Role: ${meta.role ?? (meta.isGod ? 'orchestrator (god)' : 'agent')}`,+ `- Capabilities: ${caps}`,+ `- Working directory: ${meta.cwd}`,+ meta.isGod ? '- You are the **god / orchestrator**. You run the floor.' : '',+ ''+ ].filter(Boolean).join('\n');+ }++ private injectedPrompt(meta: AgentMeta, dir: string, root: string, semanticMemory: boolean): string {+ const memoryLine = semanticMemory+ ? 'Semantic memory: the whole hive shares a searchable MemPalace at $MEMPALACE_PALACE_PATH. To recall relevant past knowledge across the team, run `mempalace search "<query>"`; run `mempalace wake-up` at the start of a task for a memory digest. Your notes in memory.md are mined into the palace automatically — write durable facts there.'+ : '';+ const godLine = meta.isGod+ ? 'You are the GOD / ORCHESTRATOR of this hive. Drain your inbox continually and triage every other agent\'s requests: answer clarifications and route work yourself so the team runs autonomously. ONLY escalate genuinely critical items — destructive actions, spending real money, scope changes, or unresolvable conflicts — to the human by sending a message with "to":"human" (or "needs_human":true); it queues for human approval and their reply returns to you. Keep the team unblocked, maintain registry/tasks awareness, and be the sole scribe of board.md.'+ : 'For anything ambiguous, cross-cutting, or needing sign-off, address a message to "god".';+ return [+ `You are "${meta.name}" (${meta.id}), an autonomous agent in a collaborating hive of Claude agents.`,+ `Your private workspace is ${dir}. The shared hive is ${root}. Full protocol: ${root}/PROTOCOL.md.`,+ '',+ 'HIVE PROTOCOL — follow it every task:',+ `1. At the START of a task, read ${dir}/memory.md and EVERY file in ${dir}/inbox/ (messages other agents sent you). After handling an inbox message, move its file into ${dir}/inbox/.done/.`,+ `2. Record durable facts, decisions, and context by appending to ${dir}/memory.md.`,+ `3. To ask another agent for something or share information, write ONE message JSON into ${dir}/outbox/ (schema in PROTOCOL.md). NEVER write into another agent's folder — the orchestrator delivers your outbox.`,+ '4. At the END of a task, append what you learned to memory.md so future-you remembers.',+ memoryLine,+ godLine,+ `Env vars available to you: AGENT_ID, AGENT_NAME, HIVE_ROOT, AGENT_DIR.`+ ].filter(Boolean).join('\n');+ }++ // — messaging —++ /** Normalize a partial message into a full HiveMessage. */+ private normalize(partial: Partial<HiveMessage>, from: string): HiveMessage {+ const act = (partial.act ?? 'inform') as MessageAct;+ return {+ id: partial.id ?? `${stamp()}-${shortRand()}`,+ conversation: partial.conversation ?? `conv-${shortRand()}`,+ in_reply_to: partial.in_reply_to ?? null,+ from: partial.from ?? from,+ to: partial.to ?? 'god',+ act,+ subject: partial.subject ?? '',+ body: partial.body ?? '',+ hops: typeof partial.hops === 'number' ? partial.hops : 0,+ requires_reply: partial.requires_reply ?? ['request', 'query', 'propose'].includes(act),+ needs_human: partial.needs_human ?? false,+ created_at: partial.created_at ?? new Date().toISOString()+ };+ }++ /** Atomically deliver a message into a recipient agent's inbox. */+ private deliver(msg: HiveMessage, toId: string): void {+ const inbox = join(this.agentDir(toId), 'inbox');+ if (!existsSync(inbox)) return; // unknown recipient — dropped (logged by caller)+ this.atomicWriteJson(join(inbox, `${msg.id}.json`), msg);+ }++ /** Inject a message directly (used by the orchestrator / UI / tests). */+ send(partial: Partial<HiveMessage>, from = 'system'): HiveMessage {+ const msg = this.normalize(partial, from);+ this.routeMessage(msg);+ this.commit(`hive: msg ${msg.from}→${msg.to} (${msg.act})`);+ return msg;+ }++ private routeMessage(msg: HiveMessage): void {+ if (msg.hops > HOP_CAP) {+ // loop guard — hand to the human instead of letting agents ping-pong+ msg.needs_human = true;+ }+ // Addressing "human" is an explicit escalation — it always goes to the queue.+ if (msg.to === 'human') msg.needs_human = true;+ if (msg.needs_human) {+ this.atomicWriteJson(join(this.root()!, 'approvals', `${msg.id}.json`), msg);+ this.appendLog({ kind: 'escalate', from: msg.from, to: msg.to, subject: msg.subject, id: msg.id });+ return;+ }+ const reg = this.registry();+ const targets = msg.to === 'broadcast'+ ? Object.keys(reg.agents).filter((a) => a !== msg.from)+ : [msg.to === 'god' ? (reg.godId ?? 'god') : msg.to];+ for (const t of targets) this.deliver(msg, t);+ this.appendLog({ kind: 'message', from: msg.from, to: msg.to, act: msg.act, subject: msg.subject, id: msg.id });+ }++ // — router: drain outboxes → inboxes —++ /** Poll-based router. Cheap and robust vs fs.watch quirks on macOS. */+ startRouter(intervalMs = 1500): void {+ if (this.routerTimer || !this.enabled()) return;+ this.routerTimer = setInterval(() => {+ try { this.routeOnce(); } catch { /* keep the loop alive */ }+ }, intervalMs);+ }+ stopRouter(): void {+ if (this.routerTimer) { clearInterval(this.routerTimer); this.routerTimer = null; }+ }++ routeOnce(): number {+ const root = this.root();+ if (!root) return 0;+ const agentsDir = join(root, 'agents');+ if (!existsSync(agentsDir)) return 0;+ let routed = 0;+ for (const id of readdirSync(agentsDir)) {+ const outbox = join(agentsDir, id, 'outbox');+ if (!existsSync(outbox)) continue;+ for (const f of readdirSync(outbox)) {+ if (!f.endsWith('.json')) continue;+ const full = join(outbox, f);+ try {+ const partial = JSON.parse(readFileSync(full, 'utf8')) as Partial<HiveMessage>;+ const msg = this.normalize(partial, id);+ msg.from = id; // sender is authoritative — the owning directory+ this.routeMessage(msg);+ renameSync(full, join(outbox, '.sent', f)); // archive, don't reprocess+ routed++;+ } catch {+ // malformed file — quarantine so we don't spin on it+ try { renameSync(full, join(outbox, '.sent', `bad-${f}`)); } catch { /* noop */ }+ }+ }+ }+ if (routed > 0) this.commit(`hive: routed ${routed} message(s)`);+ return routed;+ }++ // — read helpers (for IPC / UI) —++ registry(): Registry {+ const root = this.root();+ if (!root) return { godId: null, agents: {} };+ return this.readJson<Registry>(join(root, 'registry.json'), { godId: null, agents: {} });+ }+ board(): string {+ const root = this.root();+ return root && existsSync(join(root, 'board.md')) ? readFileSync(join(root, 'board.md'), 'utf8') : '';+ }+ tasks(): unknown {+ const root = this.root();+ return root ? this.readJson(join(root, 'tasks.json'), { tasks: [] }) : { tasks: [] };+ }+ memory(id: string): string {+ const p = join(this.agentDir(id), 'memory.md');+ return existsSync(p) ? readFileSync(p, 'utf8') : '';+ }+ inbox(id: string): HiveMessage[] {+ return this.listMessages(join(this.agentDir(id), 'inbox'));+ }+ approvals(): HiveMessage[] {+ const root = this.root();+ return root ? this.listMessages(join(root, 'approvals')) : [];+ }+ logTail(n = 200): unknown[] {+ const root = this.root();+ if (!root || !existsSync(join(root, 'log.jsonl'))) return [];+ const lines = readFileSync(join(root, 'log.jsonl'), 'utf8').trim().split('\n').filter(Boolean);+ return lines.slice(-n).map((l) => { try { return JSON.parse(l); } catch { return { raw: l }; } });+ }++ /**+ * Resolve a human approval. On approve, the held message proceeds to its+ * original recipient. An optional `note` is relayed back to the sender as an+ * `inform` from "human" — this is how the human answers a question the god+ * agent escalated ("should I do X?" → "yes, but cap it at $5").+ */+ resolveApproval(id: string, approve: boolean, note?: string): void {+ const root = this.root();+ if (!root) return;+ const p = join(root, 'approvals', `${id}.json`);+ if (!existsSync(p)) return;+ const msg = this.readJson<HiveMessage>(p, null as unknown as HiveMessage);+ rmSync(p);+ if (msg) {+ if (note && note.trim()) {+ this.routeMessage(this.normalize({+ conversation: msg.conversation,+ in_reply_to: msg.id,+ from: 'human',+ to: msg.from,+ act: 'inform',+ subject: `Re: ${msg.subject}`,+ body: `Human ${approve ? 'approved' : 'rejected'}: ${note.trim()}`+ }, 'human'));+ }+ if (approve) {+ msg.needs_human = false;+ this.routeMessage(msg);+ }+ }+ this.appendLog({ kind: 'approval', id, approve });+ this.commit(`hive: approval ${approve ? 'approved' : 'rejected'} ${id}`);+ }++ private listMessages(dir: string): HiveMessage[] {+ if (!existsSync(dir)) return [];+ return readdirSync(dir)+ .filter((f) => f.endsWith('.json'))+ .sort()+ .map((f) => { try { return JSON.parse(readFileSync(join(dir, f), 'utf8')) as HiveMessage; } catch { return null; } })+ .filter((m): m is HiveMessage => m !== null);+ }++ // — log —+ appendLog(event: Record<string, unknown>): void {+ const root = this.root();+ if (!root) return;+ const line = JSON.stringify({ ts: Date.now(), ...event }) + '\n';+ try { appendFileSync(join(root, 'log.jsonl'), line, 'utf8'); } catch { /* noop */ }+ }++ // — json + atomic io —+ private readJson<T>(p: string, fallback: T): T {+ try { return JSON.parse(readFileSync(p, 'utf8')) as T; } catch { return fallback; }+ }+ private writeJson(p: string, data: unknown): void {+ writeFileSync(p, JSON.stringify(data, null, 2), 'utf8');+ }+ private atomicWriteJson(p: string, data: unknown): void {+ const tmp = `${p}.tmp-${shortRand()}`;+ writeFileSync(tmp, JSON.stringify(data, null, 2), 'utf8');+ renameSync(tmp, p);+ }++ // — git (single committer, retry + stale-lock recovery) —+ private git(args: string[], cwd: string): { ok: boolean; out: string; err: string } {+ const res = spawnSync('git', ['-c', 'commit.gpgsign=false', '-c', 'user.name=Hive', '-c', 'user.email=hive@local', ...args], {+ cwd, encoding: 'utf8', timeout: 8000+ });+ return { ok: res.status === 0, out: res.stdout ?? '', err: res.stderr ?? '' };+ }++ /** Commit all hive changes. No-op if there is nothing staged. */+ commit(message: string): void {+ const root = this.root();+ if (!root || !existsSync(join(root, '.git'))) return;+ for (let attempt = 0; attempt < 5; attempt++) {+ this.clearStaleLock(root);+ const add = this.git(['add', '-A'], root);+ const commit = this.git(['commit', '-q', '-m', message], root);+ if (commit.ok) return;+ if (/nothing to commit/i.test(commit.out + commit.err)) return;+ if (!add.ok || /index\.lock/i.test(commit.err)) { sleepSync(50 * (attempt + 1)); continue; }+ return; // a non-lock failure — give up quietly, the next mutation retries+ }+ }++ private clearStaleLock(root: string): void {+ const lock = join(root, '.git', 'index.lock');+ try {+ if (existsSync(lock) && Date.now() - statSync(lock).mtimeMs > 10_000) rmSync(lock);+ } catch { /* noop */ }+ }+}++// ─── PROTOCOL.md (written into the hive, readable by every agent) ────────────++const PROTOCOL_MD = `# Hive protocol++You are one of several Claude agents sharing this hive. Coordination is entirely+file-based; the harness (main process) is the only thing that runs git and the+only thing that moves messages between agents.++## Your workspace — \`agents/<your-id>/\`+- \`identity.md\` — who you are (read-only; the harness writes it).+- \`memory.md\` — your long-term memory. Read at the start of a task; append to it as you learn.+- \`inbox/\` — messages addressed to you. Read them at the start of a task.+- \`inbox/.done/\` — move a message here once you've handled it.+- \`outbox/\` — drop messages here to send them. The harness delivers them.++**Never write into another agent's folder.** Write to your own \`outbox/\`; the+orchestrator routes it. This keeps every file single-writer.++## Sending a message+Write one JSON file into \`outbox/\` (any filename ending in \`.json\`):++\`\`\`json+{+ "to": "<agent-id> | god | broadcast",+ "act": "request | inform | propose | query | agree | refuse | done",+ "subject": "one-line summary",+ "body": "the details",+ "conversation": "carry this across a thread (optional)",+ "in_reply_to": "<message id you're replying to> (optional)"+}+\`\`\`++The harness fills in \`id\`, \`from\`, \`hops\`, and timestamps.++## Rules of the road+- Only \`request\`, \`query\`, and \`propose\` expect a reply. \`inform\` and \`done\` are terminal —+ don't reply to them, or two agents will loop forever.+- For anything ambiguous, cross-cutting, or needing sign-off, message \`god\` — the+ god agent clarifies answers for you so you rarely need the human directly.+- To reach the human (only for genuinely critical calls), send a message with+ \`"to": "human"\` or \`"needs_human": true\`. It lands in the approval queue and the+ human's answer comes back to you as an \`inform\` from \`human\`.+- \`board.md\` is the shared plan. Don't edit it directly — \`propose\` changes to \`god\`,+ who is its sole scribe.+- Re-reading a message you already moved to \`.done/\` is a no-op. Don't reprocess.++## Semantic memory (optional — when \`mempalace\` is installed)+When \`MEMPALACE_PALACE_PATH\` is set in your environment, the hive shares a+searchable MemPalace and you have the \`mempalace\` CLI:+- \`mempalace search "<query>"\` — recall relevant past knowledge across the whole+ team by meaning (not just keywords). Add \`--wing <agent-id>\` to scope to one+ agent, \`--results N\` to widen.+- \`mempalace wake-up\` — a short digest of what matters, good at the start of a task.++Your \`memory.md\` is mined into the palace automatically, so the durable facts you+write there become searchable by every agent. You don't run \`mine\` yourself.+`;++// ─── cth-hook shim (written to <hive>/bin/cth-hook.cjs) ──────────────────────+// A minimal pipe: read the hook payload on stdin, tag it with this agent's id,+// forward it to the hive's UDS, and relay the response back to `claude`. All the+// real logic lives in the main process (HookServer). Never blocks a stop on error.+const HOOK_SHIM = `#!/usr/bin/env node+'use strict';+const net = require('net');+let data = '';+process.stdin.setEncoding('utf8');+process.stdin.on('data', (d) => { data += d; });+process.stdin.on('end', () => {+ let payload = {};+ try { payload = JSON.parse(data || '{}'); } catch (_) {}+ if (!payload.agent_id) payload.agent_id = process.env.AGENT_ID || null;+ const sock = process.env.HIVE_SOCK;+ if (!sock) { process.exit(0); }+ let resp = '';+ const done = (code) => { if (resp) process.stdout.write(resp); process.exit(code); };+ const c = net.createConnection(sock, () => c.write(JSON.stringify(payload) + '\\n'));+ c.setEncoding('utf8');+ c.on('data', (d) => { resp += d; });+ c.on('end', () => done(0));+ c.on('error', () => process.exit(0));+ setTimeout(() => process.exit(0), 5000).unref();+});+`;diff --git a/src/main/hooks.ts b/src/main/hooks.tsnew file mode 100644index 00000000..bf55336d--- /dev/null+++ b/src/main/hooks.ts@@ -0,0 +1,100 @@+/**+ * HookServer — the bridge between `claude` lifecycle hooks and the harness.+ *+ * Each spawned agent is launched with `--settings` pointing its hooks at a tiny+ * shim (see HOOK_SHIM in hive.ts) that forwards the hook payload to the Unix+ * domain socket this server listens on. We then:+ * - drive avatar state from PreToolUse/PostToolUse/Notification/etc., and+ * - implement the autonomous loop: on Stop, drain the agent's inbox and return+ * {"decision":"block", reason} so the agent keeps working — guarded by+ * `stop_hook_active` so it can never loop forever.+ *+ * Runs in the Electron main process.+ */+import { createServer, type Server } from 'node:net';+import { existsSync, rmSync } from 'node:fs';+import type { WebContents } from 'electron';+import type { HiveManager } from './hive';++interface HookPayload {+ hook_event_name?: string;+ agent_id?: string | null;+ session_id?: string;+ cwd?: string;+ tool_name?: string;+ tool_input?: unknown;+ stop_hook_active?: boolean;+ prompt?: string;+ source?: string;+ notification_type?: string;+}++export class HookServer {+ private server: Server | null = null;++ constructor(+ private hive: HiveManager,+ private getWebContents: () => WebContents | null+ ) {}++ start(): void {+ const sock = this.hive.sockPath();+ if (!sock || this.server) return;+ // Clear a stale socket file left by a previous run.+ try { if (existsSync(sock)) rmSync(sock); } catch { /* noop */ }++ this.server = createServer((conn) => {+ let buf = '';+ conn.on('data', (d) => {+ buf += d.toString();+ const nl = buf.indexOf('\n');+ if (nl === -1) return; // wait for the full line+ let payload: HookPayload = {};+ try { payload = JSON.parse(buf.slice(0, nl)); } catch { /* ignore */ }+ let res: unknown = {};+ try { res = this.handle(payload); } catch { res = {}; }+ conn.end(JSON.stringify(res ?? {}));+ });+ conn.on('error', () => { /* shim hung up — ignore */ });+ });+ this.server.on('error', (e) => console.error('[hive] hook server error:', e));+ this.server.listen(sock);+ }++ stop(): void {+ try { this.server?.close(); } catch { /* noop */ }+ this.server = null;+ const sock = this.hive.sockPath();+ try { if (sock && existsSync(sock)) rmSync(sock); } catch { /* noop */ }+ }++ private handle(p: HookPayload): unknown {+ const agentId = p.agent_id ?? undefined;+ const event = p.hook_event_name ?? 'Unknown';++ // Forward everything to the renderer so avatars reflect real activity.+ this.emit(agentId, event, p);++ if ((event === 'Stop' || event === 'SubagentStop') && agentId) {+ // Loop guard: a previous Stop hook already blocked this turn → let it stop.+ if (p.stop_hook_active) return {};+ const drain = this.hive.drainForStop(agentId);+ if (drain.block) {+ return { decision: 'block', reason: drain.reason };+ }+ return {};+ }++ return {};+ }++ private emit(agentId: string | undefined, event: string, p: HookPayload): void {+ this.getWebContents()?.send('hive:hookEvent', {+ agentId,+ event,+ tool: p.tool_name,+ notificationType: p.notification_type,+ source: p.source+ });+ }+}diff --git a/src/main/index.ts b/src/main/index.tsnew file mode 100644index 00000000..0e1725ac--- /dev/null+++ b/src/main/index.ts@@ -0,0 +1,268 @@+import { app, BrowserWindow, dialog, ipcMain, shell } from 'electron';+import { spawn } from 'node:child_process';+import { join } from 'node:path';+import { PtyManager, type SpawnOptions } from './pty';+import {+ readConfig, writeConfig, ensureHarnessHome,+ type HarnessConfig+} from './config';+import { listDir, readFileText, writeFileText } from './fs';+import {+ getBranch, getStatus, getLog, getBranches, getAheadBehind, isRepo+} from './git';+import { HiveManager, type AgentMeta, type HiveMessage } from './hive';+import { HookServer } from './hooks';+import { MemoryManager } from './memory';++const isDev = !!process.env.ELECTRON_RENDERER_URL;+const ptyManager = new PtyManager();+const hive = new HiveManager(() => readConfig().harnessHome);+const hookServer = new HookServer(hive, () => mainWindow?.webContents ?? null);+const memory = new MemoryManager(+ () => readConfig().harnessHome,+ () => { const c = readConfig(); return { enabled: c.semanticMemory !== false, model: c.embeddingModel ?? 'minilm' }; }+);+let mainWindow: BrowserWindow | null = null;++/** When true, skip the quit interceptor (user already confirmed). */+let allowQuit = false;++function createWindow(): void {+ const win = new BrowserWindow({+ width: 1440,+ height: 900,+ minWidth: 1280,+ minHeight: 800,+ title: 'Claude Terminal Harness',+ backgroundColor: '#FFF8E7',+ titleBarStyle: 'hiddenInset',+ show: false,+ webPreferences: {+ preload: join(__dirname, '../preload/index.js'),+ sandbox: false,+ contextIsolation: true,+ nodeIntegration: false+ }+ });++ mainWindow = win;++ win.once('ready-to-show', () => win.show());++ win.webContents.setWindowOpenHandler(({ url }) => {+ shell.openExternal(url);+ return { action: 'deny' };+ });++ // On macOS, the red-X "close" event by default destroys the window — and on+ // a single-window app, that effectively quits. Intercept it the same way we+ // intercept before-quit so PTY users get the warning.+ win.on('close', (e) => {+ if (allowQuit) return;+ const count = ptyManager.list().length;+ if (count === 0) return;+ e.preventDefault();+ win.focus();+ win.webContents.send('app:closeRequested', { ptyCount: count });+ });++ ptyManager.attachWebContents(win.webContents);++ if (isDev && process.env.ELECTRON_RENDERER_URL) {+ win.loadURL(process.env.ELECTRON_RENDERER_URL);+ } else {+ win.loadFile(join(__dirname, '../renderer/index.html'));+ }++ win.on('closed', () => {+ if (mainWindow === win) mainWindow = null;+ });+}++// ─── IPC: pty lifecycle ─────────────────────────────────────────────────────+ipcMain.handle('pty:spawn', (_evt, opts: SpawnOptions & { hive?: AgentMeta }) => {+ if (!opts || typeof opts.id !== 'string' || typeof opts.cwd !== 'string' || typeof opts.command !== 'string') {+ return { ok: false, error: 'invalid SpawnOptions' };+ }+ // If the agent carries hive metadata, provision its workspace and inject the+ // identity + protocol (extra --append-system-prompt args + AGENT_* env).+ if (opts.hive && hive.enabled()) {+ try {+ const inj = hive.ensureAgent({ ...opts.hive, cwd: opts.cwd }, { semanticMemory: memory.active() });+ opts.args = [...(opts.args ?? []), ...inj.args];+ // Point the agent's mempalace CLI at the shared palace (no-op if inactive).+ opts.env = { ...(opts.env ?? {}), ...inj.env, ...memory.env() };+ } catch (e) {+ // Hive provisioning is best-effort; never block a spawn on it.+ console.error('[hive] ensureAgent failed:', e);+ }+ }+ return ptyManager.spawn(opts);+});+ipcMain.handle('pty:write', (_evt, id: string, data: string) => {+ if (typeof id !== 'string' || typeof data !== 'string') return { ok: false, error: 'invalid args' };+ return ptyManager.write(id, data);+});+ipcMain.handle('pty:resize', (_evt, id: string, cols: number, rows: number) => {+ if (typeof id !== 'string' || typeof cols !== 'number' || typeof rows !== 'number') return { ok: false, error: 'invalid args' };+ return ptyManager.resize(id, cols, rows);+});+ipcMain.handle('pty:kill', (_evt, id: string) => {+ if (typeof id !== 'string') return { ok: false, error: 'invalid id' };+ return ptyManager.kill(id);+});+ipcMain.handle('pty:list', () => ptyManager.list());++// ─── IPC: folder picker ─────────────────────────────────────────────────────+ipcMain.handle('dialog:chooseFolder', async (evt) => {+ const win = BrowserWindow.fromWebContents(evt.sender);+ if (!win) return { ok: false as const, error: 'no window' };+ const res = await dialog.showOpenDialog(win, {+ properties: ['openDirectory', 'createDirectory'],+ title: 'Pick a folder'+ });+ if (res.canceled || res.filePaths.length === 0) return { ok: false as const, error: 'cancelled' };+ return { ok: true as const, path: res.filePaths[0] };+});++// ─── IPC: Terminal.app at a folder ──────────────────────────────────────────+ipcMain.handle('terminal:openAtFolder', async (_evt, cwd: unknown) => {+ if (typeof cwd !== 'string' || cwd.length === 0) return { ok: false, error: 'invalid cwd' };+ return new Promise<{ ok: boolean; error?: string }>((resolve) => {+ const p = spawn('open', ['-a', 'Terminal', cwd]);+ let err = '';+ p.stderr.on('data', (d) => { err += d.toString(); });+ p.on('error', (e) => resolve({ ok: false, error: e.message }));+ p.on('close', (code) => {+ if (code === 0) resolve({ ok: true });+ else resolve({ ok: false, error: err.trim() || `open exited ${code}` });+ });+ });+});++// ─── IPC: config ────────────────────────────────────────────────────────────+ipcMain.handle('config:get', (): HarnessConfig => readConfig());+ipcMain.handle('config:update', (_evt, patch: Partial<HarnessConfig>) => writeConfig(patch));+ipcMain.handle('config:ensureHome', (_evt, path: unknown) => {+ if (typeof path !== 'string' || path.length === 0) return { ok: false, error: 'invalid path' };+ return ensureHarnessHome(path);+});++// ─── IPC: filesystem (sandboxed to a root) ──────────────────────────────────+ipcMain.handle('fs:listDir', (_evt, root: unknown, rel: unknown) => {+ if (typeof root !== 'string' || typeof rel !== 'string') return { ok: false, error: 'invalid args' };+ return listDir(root, rel);+});+ipcMain.handle('fs:readFile', (_evt, root: unknown, rel: unknown) => {+ if (typeof root !== 'string' || typeof rel !== 'string') return { ok: false, error: 'invalid args' };+ return readFileText(root, rel);+});+ipcMain.handle('fs:writeFile', (_evt, root: unknown, rel: unknown, content: unknown) => {+ if (typeof root !== 'string' || typeof rel !== 'string' || typeof content !== 'string') {+ return { ok: false, error: 'invalid args' };+ }+ return writeFileText(root, rel, content);+});++// ─── IPC: git ───────────────────────────────────────────────────────────────+ipcMain.handle('git:isRepo', (_evt, cwd: unknown) => {+ if (typeof cwd !== 'string') return false;+ return isRepo(cwd);+});+ipcMain.handle('git:branch', (_evt, cwd: unknown) => {+ if (typeof cwd !== 'string') return { error: 'invalid cwd' };+ return getBranch(cwd);+});+ipcMain.handle('git:status', (_evt, cwd: unknown) => {+ if (typeof cwd !== 'string') return { error: 'invalid cwd' };+ return getStatus(cwd);+});+ipcMain.handle('git:log', (_evt, cwd: unknown, n: unknown) => {+ if (typeof cwd !== 'string') return { error: 'invalid cwd' };+ const count = typeof n === 'number' ? Math.min(500, Math.max(1, n)) : 50;+ return getLog(cwd, count);+});+ipcMain.handle('git:branches', (_evt, cwd: unknown) => {+ if (typeof cwd !== 'string') return { error: 'invalid cwd' };+ return getBranches(cwd);+});+ipcMain.handle('git:aheadBehind', (_evt, cwd: unknown) => {+ if (typeof cwd !== 'string') return { error: 'invalid cwd' };+ return getAheadBehind(cwd);+});++// ─── IPC: hive (multi-agent coordination) ───────────────────────────────────+ipcMain.handle('hive:registry', () => hive.registry());+ipcMain.handle('hive:board', () => hive.board());+ipcMain.handle('hive:tasks', () => hive.tasks());+ipcMain.handle('hive:log', (_evt, n: unknown) => hive.logTail(typeof n === 'number' ? n : 200));+ipcMain.handle('hive:memory', (_evt, id: unknown) => (typeof id === 'string' ? hive.memory(id) : ''));+ipcMain.handle('hive:inbox', (_evt, id: unknown) => (typeof id === 'string' ? hive.inbox(id) : []));+ipcMain.handle('hive:approvals', () => hive.approvals());+ipcMain.handle('hive:resolveApproval', (_evt, id: unknown, approve: unknown, note: unknown) => {+ if (typeof id !== 'string') return { ok: false, error: 'invalid id' };+ hive.resolveApproval(id, approve === true, typeof note === 'string' ? note : undefined);+ return { ok: true };+});+ipcMain.handle('hive:send', (_evt, partial: Partial<HiveMessage>, from: unknown) => {+ if (!hive.enabled()) return { ok: false, error: 'hive disabled (no harnessHome)' };+ const msg = hive.send(partial ?? {}, typeof from === 'string' ? from : 'system');+ return { ok: true, message: msg };+});++// ─── IPC: semantic memory (MemPalace CLI) ───────────────────────────────────+ipcMain.handle('hive:memoryStatus', () => { memory.resetBinCache(); return memory.status(); });+ipcMain.handle('hive:searchMemory', (_evt, query: unknown, wing: unknown) => {+ if (typeof query !== 'string' || !query.trim()) return { ok: false, output: '', error: 'empty query' };+ return memory.search(query, { wing: typeof wing === 'string' ? wing : undefined });+});+ipcMain.handle('hive:memoryWakeUp', (_evt, wing: unknown) =>+ memory.wakeUp(typeof wing === 'string' ? wing : undefined));+ipcMain.handle('hive:mineNow', () => { memory.mineNow(); return { ok: true }; });++// ─── IPC: quit confirmation ─────────────────────────────────────────────────+ipcMain.handle('app:confirmClose', () => {+ allowQuit = true;+ hive.stopRouter();+ hookServer.stop();+ memory.stop();+ ptyManager.killAll();+ app.quit();+});+ipcMain.handle('app:cancelClose', () => {+ // no-op — modal will close on the renderer side+});++app.whenReady().then(() => {+ // Bootstrap the hive (if harnessHome is configured) and start the message router.+ if (hive.enabled()) {+ hive.ensureHive();+ hive.startRouter();+ hookServer.start();+ memory.start(); // init shared palace + mine loop (no-op without mempalace)+ }+ createWindow();+ app.on('activate', () => {+ if (BrowserWindow.getAllWindows().length === 0) createWindow();+ });+});++// before-quit covers Cmd-Q / dock-quit; the per-window close handler covers+// the red close button. Both routes hit the same warning UX.+app.on('before-quit', (e) => {+ if (allowQuit) return;+ const count = ptyManager.list().length;+ if (count === 0) return;+ e.preventDefault();+ if (mainWindow) {+ mainWindow.focus();+ mainWindow.webContents.send('app:closeRequested', { ptyCount: count });+ }+});++app.on('window-all-closed', () => {+ if (process.platform !== 'darwin') {+ ptyManager.killAll();+ app.quit();+ }+});diff --git a/src/main/memory.ts b/src/main/memory.tsnew file mode 100644index 00000000..f726de79--- /dev/null+++ b/src/main/memory.ts@@ -0,0 +1,200 @@+/**+ * MemoryManager — semantic memory for the hive, backed by the MemPalace CLI.+ *+ * CLI-only (no MCP): the harness keeps a single shared palace under harnessHome,+ * points every agent's `MEMPALACE_PALACE_PATH` at it, and mines each agent's+ * `memory.md` into its own wing so the whole team can recall by meaning via+ * `mempalace search` / `mempalace wake-up`. Degrades silently to no-op when the+ * `mempalace` CLI isn't installed — the markdown memory still works.+ *+ * init : mempalace init <home> --yes --no-llm (heuristics-only, no LLM)+ * store : mempalace mine <agentDir> --wing <id> --agent <id>+ * recall : mempalace search "<q>" --results N / mempalace wake-up+ *+ * Runs in the Electron main process.+ */+import { existsSync, statSync, readdirSync } from 'node:fs';+import { join } from 'node:path';+import { spawn, spawnSync } from 'node:child_process';++export type EmbeddingModel = 'minilm' | 'embeddinggemma';++export interface MemorySettings {+ enabled: boolean;+ model: EmbeddingModel;+}++export interface MemoryStatus {+ available: boolean; // mempalace CLI found on PATH+ enabled: boolean; // user setting+ active: boolean; // available && enabled && have a home+ initialized: boolean; // palace directory exists+ palacePath: string | null;+ model: EmbeddingModel;+ bin: string | null;+}++const MINE_INTERVAL_MS = 180_000; // re-mine changed memories every 3 min++export class MemoryManager {+ private binCache: string | null | undefined;+ private mineTimer: NodeJS.Timeout | null = null;+ private initStarted = false;+ /** agentId → memory.md mtimeMs at last successful mine (skip unchanged). */+ private lastMined = new Map<string, number>();++ constructor(+ private getHome: () => string | null,+ private getSettings: () => MemorySettings+ ) {}++ palacePath(): string | null {+ const h = this.getHome();+ return h ? join(h, 'palace') : null;+ }++ /** Resolve the mempalace CLI against the user's PATH + common uv/pip spots. */+ bin(): string | null {+ if (this.binCache !== undefined) return this.binCache;+ let found: string | null = null;+ try {+ const res = spawnSync(process.env.SHELL ?? '/bin/zsh', ['-ilc', 'which mempalace'], {+ encoding: 'utf8', timeout: 3000+ });+ const p = res.stdout.trim().split('\n').pop();+ if (p && existsSync(p)) found = p;+ } catch { /* fall through */ }+ if (!found) {+ for (const c of [+ `${process.env.HOME ?? ''}/.local/bin/mempalace`,+ '/opt/homebrew/bin/mempalace',+ '/usr/local/bin/mempalace'+ ]) if (existsSync(c)) { found = c; break; }+ }+ this.binCache = found;+ return found;+ }+ /** Force re-resolution (e.g. after the user installs mempalace). */+ resetBinCache(): void { this.binCache = undefined; }++ available(): boolean { return this.bin() !== null; }+ enabled(): boolean { return this.getSettings().enabled; }+ active(): boolean { return this.available() && this.enabled() && this.getHome() !== null; }+ model(): EmbeddingModel { return this.getSettings().model === 'embeddinggemma' ? 'embeddinggemma' : 'minilm'; }++ status(): MemoryStatus {+ const palace = this.palacePath();+ return {+ available: this.available(),+ enabled: this.enabled(),+ active: this.active(),+ initialized: !!palace && existsSync(palace),+ palacePath: palace,+ model: this.model(),+ bin: this.bin()+ };+ }++ /** Env merged into each agent's spawn so its `mempalace` CLI hits the shared palace. */+ env(): Record<string, string> {+ const palace = this.palacePath();+ if (!this.active() || !palace) return {};+ return { MEMPALACE_PALACE_PATH: palace, MEMPALACE_EMBEDDING_MODEL: this.model() };+ }++ private childEnv(): NodeJS.ProcessEnv {+ return {+ ...process.env,+ MEMPALACE_PALACE_PATH: this.palacePath() ?? '',+ MEMPALACE_EMBEDDING_MODEL: this.model()+ };+ }++ // — lifecycle —++ /** Start the mine loop. `mempalace mine` auto-creates the palace on first run+ * (lazily downloading the embedding model, one-time). We deliberately do NOT+ * run `mempalace init`: it ends in an interactive "Mine now? [Y/n]" prompt+ * that --yes doesn't cover, so a spawned child would hang forever. */+ start(): void {+ if (!this.active() || this.initStarted) return;+ if (!this.bin() || !this.getHome() || !this.palacePath()) return;+ this.initStarted = true;+ this.startMineLoop();+ }++ stop(): void {+ if (this.mineTimer) { clearInterval(this.mineTimer); this.mineTimer = null; }+ }++ private startMineLoop(): void {+ if (this.mineTimer) return;+ this.mineNow();+ this.mineTimer = setInterval(() => this.mineNow(), MINE_INTERVAL_MS);+ }++ // — mining (store) —++ /** Mine every agent whose memory changed since last time, one at a time. */+ mineNow(): void {+ const home = this.getHome();+ const bin = this.bin();+ if (!this.active() || !home || !bin) return;+ const agentsDir = join(home, 'hive', 'agents');+ if (!existsSync(agentsDir)) return;+ let ids: string[];+ try { ids = readdirSync(agentsDir); } catch { return; }+ for (const id of ids) {+ const agentDir = join(agentsDir, id);+ const mem = join(agentDir, 'memory.md');+ if (!existsSync(mem)) continue;+ let mtime = 0;+ try { mtime = statSync(mem).mtimeMs; } catch { continue; }+ if (this.lastMined.get(id) === mtime) continue; // unchanged — skip the model load+ this.lastMined.set(id, mtime);+ this.mineAgent(agentDir, id);+ }+ }++ private mineAgent(agentDir: string, id: string): void {+ const bin = this.bin();+ if (!bin) return;+ // stdin closed (mempalace can prompt); mempalace dedups so re-mining is safe.+ const proc = spawn(bin, ['mine', agentDir, '--wing', id, '--agent', id], {+ env: this.childEnv(), stdio: ['ignore', 'ignore', 'pipe']+ });+ let err = '';+ proc.stderr?.on('data', (d) => { err += d.toString(); });+ proc.on('close', (code) => {+ if (code !== 0) {+ console.error(`[memory] mine ${id} exited ${code}: ${err.slice(-300)}`);+ this.lastMined.delete(id); // let the next tick retry+ }+ });+ proc.on('error', () => { this.lastMined.delete(id); });+ }++ // — recall (read) —++ /** Semantic search across the shared palace. Returns the CLI's text output. */+ search(query: string, opts: { wing?: string; results?: number } = {}): { ok: boolean; output: string; error?: string } {+ const bin = this.bin();+ if (!this.active() || !bin) return { ok: false, output: '', error: 'semantic memory not active' };+ const args = ['search', query, '--results', String(opts.results ?? 5)];+ if (opts.wing) args.push('--wing', opts.wing);+ const res = spawnSync(bin, args, { env: this.childEnv(), encoding: 'utf8', timeout: 120_000, input: '' });+ if (res.status !== 0) return { ok: false, output: res.stdout ?? '', error: (res.stderr || 'search failed').trim() };+ return { ok: true, output: res.stdout ?? '' };+ }++ /** Session-start digest (~600-900 tokens). */+ wakeUp(wing?: string): { ok: boolean; output: string; error?: string } {+ const bin = this.bin();+ if (!this.active() || !bin) return { ok: false, output: '', error: 'semantic memory not active' };+ const args = ['wake-up'];+ if (wing) args.push('--wing', wing);+ const res = spawnSync(bin, args, { env: this.childEnv(), encoding: 'utf8', timeout: 120_000, input: '' });+ if (res.status !== 0) return { ok: false, output: res.stdout ?? '', error: (res.stderr || 'wake-up failed').trim() };+ return { ok: true, output: res.stdout ?? '' };+ }+}diff --git a/src/main/pty.ts b/src/main/pty.tsnew file mode 100644index 00000000..3e204794--- /dev/null+++ b/src/main/pty.ts@@ -0,0 +1,162 @@+import * as pty from 'node-pty';+import type { WebContents } from 'electron';+import { existsSync } from 'node:fs';+import { spawnSync } from 'node:child_process';++interface PtySession {+ id: string;+ proc: pty.IPty;+ cwd: string;+ command: string;+}++export interface SpawnOptions {+ id: string;+ cwd: string;+ command: string; // e.g. 'claude'+ args?: string[];+ cols?: number;+ rows?: number;+ /** Extra environment for the child (merged over the resolved shell env). */+ env?: Record<string, string>;+}++export class PtyManager {+ private sessions = new Map<string, PtySession>();+ private webContents: WebContents | null = null;++ attachWebContents(wc: WebContents) {+ this.webContents = wc;+ }++ /** Resolve a bare command (e.g. 'claude') against the user's PATH ++ * common install locations. Needed because Electron's spawn env on+ * macOS launches without the user's interactive shell PATH. */+ private resolveCommand(command: string): string {+ if (command.includes('/')) return command;+ // Try `which` against an interactive shell so we pick up nvm/asdf/brew paths.+ try {+ const res = spawnSync(process.env.SHELL ?? '/bin/zsh', ['-ilc', `which ${command}`], {+ encoding: 'utf8',+ timeout: 3000+ });+ const path = res.stdout.trim().split('\n').pop();+ if (path && existsSync(path)) return path;+ } catch { /* fall through */ }+ // Common explicit locations+ const candidates = [+ `/opt/homebrew/bin/${command}`,+ `/usr/local/bin/${command}`,+ `${process.env.HOME ?? ''}/.local/bin/${command}`,+ `${process.env.HOME ?? ''}/.claude/local/${command}`+ ];+ for (const c of candidates) if (existsSync(c)) return c;+ // Last resort — let node-pty try; will fail with ENOENT if missing.+ return command;+ }++ spawn(opts: SpawnOptions): { ok: boolean; error?: string } {+ if (this.sessions.has(opts.id)) {+ return { ok: false, error: `pty already exists for id ${opts.id}` };+ }+ if (!existsSync(opts.cwd)) {+ return { ok: false, error: `cwd does not exist: ${opts.cwd}` };+ }+ const resolved = this.resolveCommand(opts.command);+ try {+ // Build a user-shell PATH so child can resolve subprocess deps.+ const userPath = (() => {+ try {+ const res = spawnSync(process.env.SHELL ?? '/bin/zsh', ['-ilc', 'echo -n "$PATH"'], {+ encoding: 'utf8',+ timeout: 3000+ });+ return res.stdout.trim() || process.env.PATH || '';+ } catch {+ return process.env.PATH || '';+ }+ })();++ const proc = pty.spawn(resolved, opts.args ?? [], {+ name: 'xterm-256color',+ cols: opts.cols ?? 100,+ rows: opts.rows ?? 30,+ cwd: opts.cwd,+ env: {+ ...process.env,+ PATH: userPath,+ TERM: 'xterm-256color',+ COLORTERM: 'truecolor',+ // Help apps that look for a real interactive shell+ FORCE_COLOR: '1',+ // Per-agent hive identity (AGENT_ID, HIVE_ROOT, …) when provided.+ ...(opts.env ?? {})+ } as Record<string, string>+ });++ this.sessions.set(opts.id, { id: opts.id, proc, cwd: opts.cwd, command: resolved });++ proc.onData((data) => {+ this.webContents?.send(`pty:data:${opts.id}`, data);+ });+ proc.onExit(({ exitCode, signal }) => {+ this.webContents?.send(`pty:exit:${opts.id}`, { exitCode, signal });+ this.sessions.delete(opts.id);+ });++ return { ok: true };+ } catch (e) {+ return { ok: false, error: e instanceof Error ? e.message : String(e) };+ }+ }++ write(id: string, data: string): { ok: boolean; error?: string } {+ const s = this.sessions.get(id);+ if (!s) return { ok: false, error: `no pty: ${id}` };+ try {+ s.proc.write(data);+ return { ok: true };+ } catch (e) {+ return { ok: false, error: e instanceof Error ? e.message : String(e) };+ }+ }++ resize(id: string, cols: number, rows: number): { ok: boolean; error?: string } {+ const s = this.sessions.get(id);+ if (!s) return { ok: false, error: `no pty: ${id}` };+ try {+ s.proc.resize(cols, rows);+ return { ok: true };+ } catch (e) {+ return { ok: false, error: e instanceof Error ? e.message : String(e) };+ }+ }++ kill(id: string): { ok: boolean; error?: string } {+ const s = this.sessions.get(id);+ if (!s) return { ok: false, error: `no pty: ${id}` };+ try {+ s.proc.kill();+ this.sessions.delete(id);+ return { ok: true };+ } catch (e) {+ return { ok: false, error: e instanceof Error ? e.message : String(e) };+ }+ }++ list(): Array<{ id: string; cwd: string; command: string; pid: number }> {+ return Array.from(this.sessions.values()).map(s => ({+ id: s.id,+ cwd: s.cwd,+ command: s.command,+ pid: s.proc.pid+ }));+ }++ killAll() {+ for (const s of this.sessions.values()) {+ try { s.proc.kill(); } catch { /* noop */ }+ }+ this.sessions.clear();+ }+}diff --git a/src/preload/index.d.ts b/src/preload/index.d.tsnew file mode 100644index 00000000..f5512e0e--- /dev/null+++ b/src/preload/index.d.ts@@ -0,0 +1,9 @@+import type { CthApi } from './index';++declare global {+ interface Window {+ cth: CthApi;+ }+}++export {};diff --git a/src/preload/index.ts b/src/preload/index.tsnew file mode 100644index 00000000..ab70f8e6--- /dev/null+++ b/src/preload/index.ts@@ -0,0 +1,191 @@+import { contextBridge, ipcRenderer, type IpcRendererEvent } from 'electron';++export interface HiveAgentMeta {+ id: string;+ name: string;+ role?: string;+ capabilities?: string[];+ cwd: string;+ isGod?: boolean;+}++export interface HiveMessage {+ id: string;+ conversation: string;+ in_reply_to: string | null;+ from: string;+ to: string;+ act: 'request' | 'inform' | 'propose' | 'query' | 'agree' | 'refuse' | 'done';+ subject: string;+ body: string;+ hops: number;+ requires_reply: boolean;+ needs_human: boolean;+ created_at: string;+}++export interface HiveRegistry {+ godId: string | null;+ agents: Record<string, HiveAgentMeta & { status: string; lastSeen: number }>;+}++export interface SpawnPtyOptions {+ id: string;+ cwd: string;+ command: string;+ args?: string[];+ cols?: number;+ rows?: number;+ /** When present, the agent is provisioned in the hive at spawn. */+ hive?: HiveAgentMeta;+}++export interface PtyExit { exitCode: number; signal?: number | undefined }++export interface HarnessConfig {+ onboardingComplete: boolean;+ harnessHome: string | null;+ registeredRepos: string[];+ autoMode: boolean;+ defaultCommand: string;+ semanticMemory: boolean;+ embeddingModel: 'minilm' | 'embeddinggemma';+}++export interface MemoryStatus {+ available: boolean;+ enabled: boolean;+ active: boolean;+ initialized: boolean;+ palacePath: string | null;+ model: 'minilm' | 'embeddinggemma';+ bin: string | null;+}++export interface DirEntry {+ name: string;+ isDir: boolean;+ size: number;+ mtime: number;+}++export interface GitCommit {+ sha: string;+ shortSha: string;+ parents: string[];+ subject: string;+ author: string;+ time: number;+ refs: string[];+}+export interface GitStatusEntry { path: string; index: string; worktree: string }+export interface GitStatus { staged: GitStatusEntry[]; unstaged: GitStatusEntry[]; untracked: string[] }++const api = {+ version: '0.1.0',++ // ─── PTY ─────────────────────────────────────────────────────────────────+ spawnPty: (opts: SpawnPtyOptions): Promise<{ ok: boolean; error?: string }> =>+ ipcRenderer.invoke('pty:spawn', opts),+ writePty: (id: string, data: string): Promise<{ ok: boolean; error?: string }> =>+ ipcRenderer.invoke('pty:write', id, data),+ resizePty: (id: string, cols: number, rows: number): Promise<{ ok: boolean; error?: string }> =>+ ipcRenderer.invoke('pty:resize', id, cols, rows),+ killPty: (id: string): Promise<{ ok: boolean; error?: string }> =>+ ipcRenderer.invoke('pty:kill', id),+ listPtys: (): Promise<Array<{ id: string; cwd: string; command: string; pid: number }>> =>+ ipcRenderer.invoke('pty:list'),+ onPtyData: (id: string, cb: (data: string) => void): (() => void) => {+ const channel = `pty:data:${id}`;+ const listener = (_e: IpcRendererEvent, data: string) => cb(data);+ ipcRenderer.on(channel, listener);+ return () => ipcRenderer.removeListener(channel, listener);+ },+ onPtyExit: (id: string, cb: (info: PtyExit) => void): (() => void) => {+ const channel = `pty:exit:${id}`;+ const listener = (_e: IpcRendererEvent, info: PtyExit) => cb(info);+ ipcRenderer.on(channel, listener);+ return () => ipcRenderer.removeListener(channel, listener);+ },++ // ─── Dialog ──────────────────────────────────────────────────────────────+ chooseFolder: (): Promise<{ ok: true; path: string } | { ok: false; error: string }> =>+ ipcRenderer.invoke('dialog:chooseFolder'),++ // ─── Terminal.app ────────────────────────────────────────────────────────+ openTerminalAt: (cwd: string): Promise<{ ok: boolean; error?: string }> =>+ ipcRenderer.invoke('terminal:openAtFolder', cwd),++ // ─── Config ──────────────────────────────────────────────────────────────+ getConfig: (): Promise<HarnessConfig> =>+ ipcRenderer.invoke('config:get'),+ updateConfig: (patch: Partial<HarnessConfig>): Promise<HarnessConfig> =>+ ipcRenderer.invoke('config:update', patch),+ ensureHarnessHome: (path: string): Promise<{ ok: boolean; error?: string }> =>+ ipcRenderer.invoke('config:ensureHome', path),++ // ─── Filesystem (sandboxed to cwd) ───────────────────────────────────────+ listDir: (root: string, rel: string): Promise<+ { ok: true; entries: DirEntry[]; path: string } | { ok: false; error: string }+ > => ipcRenderer.invoke('fs:listDir', root, rel),+ readFile: (root: string, rel: string): Promise<+ { ok: true; content: string; path: string; size: number } | { ok: false; error: string }+ > => ipcRenderer.invoke('fs:readFile', root, rel),+ writeFile: (root: string, rel: string, content: string): Promise<+ { ok: true; path: string } | { ok: false; error: string }+ > => ipcRenderer.invoke('fs:writeFile', root, rel, content),++ // ─── Git ─────────────────────────────────────────────────────────────────+ gitIsRepo: (cwd: string): Promise<boolean> => ipcRenderer.invoke('git:isRepo', cwd),+ gitBranch: (cwd: string) =>+ ipcRenderer.invoke('git:branch', cwd) as Promise<{ current: string | null; detached: boolean } | { error: string }>,+ gitStatus: (cwd: string) =>+ ipcRenderer.invoke('git:status', cwd) as Promise<GitStatus | { error: string }>,+ gitLog: (cwd: string, n?: number) =>+ ipcRenderer.invoke('git:log', cwd, n ?? 50) as Promise<GitCommit[] | { error: string }>,+ gitBranches: (cwd: string) =>+ ipcRenderer.invoke('git:branches', cwd) as Promise<{ local: string[]; remote: string[]; current: string | null } | { error: string }>,+ gitAheadBehind: (cwd: string) =>+ ipcRenderer.invoke('git:aheadBehind', cwd) as Promise<{ ahead: number; behind: number; upstream: string | null } | { error: string }>,++ // ─── Hive (multi-agent coordination) ─────────────────────────────────────+ hiveRegistry: (): Promise<HiveRegistry> => ipcRenderer.invoke('hive:registry'),+ hiveBoard: (): Promise<string> => ipcRenderer.invoke('hive:board'),+ hiveTasks: (): Promise<unknown> => ipcRenderer.invoke('hive:tasks'),+ hiveLog: (n?: number): Promise<unknown[]> => ipcRenderer.invoke('hive:log', n ?? 200),+ hiveMemory: (id: string): Promise<string> => ipcRenderer.invoke('hive:memory', id),+ hiveInbox: (id: string): Promise<HiveMessage[]> => ipcRenderer.invoke('hive:inbox', id),+ hiveApprovals: (): Promise<HiveMessage[]> => ipcRenderer.invoke('hive:approvals'),+ hiveResolveApproval: (id: string, approve: boolean, note?: string): Promise<{ ok: boolean; error?: string }> =>+ ipcRenderer.invoke('hive:resolveApproval', id, approve, note),++ // ─── Semantic memory (MemPalace CLI) ─────────────────────────────────────+ memoryStatus: (): Promise<MemoryStatus> => ipcRenderer.invoke('hive:memoryStatus'),+ searchMemory: (query: string, wing?: string): Promise<{ ok: boolean; output: string; error?: string }> =>+ ipcRenderer.invoke('hive:searchMemory', query, wing),+ memoryWakeUp: (wing?: string): Promise<{ ok: boolean; output: string; error?: string }> =>+ ipcRenderer.invoke('hive:memoryWakeUp', wing),+ mineNow: (): Promise<{ ok: boolean }> => ipcRenderer.invoke('hive:mineNow'),+ hiveSend: (msg: Partial<HiveMessage>, from?: string): Promise<{ ok: boolean; error?: string; message?: HiveMessage }> =>+ ipcRenderer.invoke('hive:send', msg, from),+ onHiveHookEvent: (+ cb: (e: { agentId?: string; event: string; tool?: string; notificationType?: string; source?: string }) => void+ ): (() => void) => {+ const listener = (_e: IpcRendererEvent, payload: { agentId?: string; event: string; tool?: string; notificationType?: string; source?: string }) => cb(payload);+ ipcRenderer.on('hive:hookEvent', listener);+ return () => ipcRenderer.removeListener('hive:hookEvent', listener);+ },++ // ─── Quit confirmation ───────────────────────────────────────────────────+ onCloseRequested: (cb: (info: { ptyCount: number }) => void): (() => void) => {+ const listener = (_e: IpcRendererEvent, info: { ptyCount: number }) => cb(info);+ ipcRenderer.on('app:closeRequested', listener);+ return () => ipcRenderer.removeListener('app:closeRequested', listener);+ },+ confirmClose: (): Promise<void> => ipcRenderer.invoke('app:confirmClose'),+ cancelClose: (): Promise<void> => ipcRenderer.invoke('app:cancelClose')+};++contextBridge.exposeInMainWorld('cth', api);++export type CthApi = typeof api;diff --git a/src/renderer/index.html b/src/renderer/index.htmlnew file mode 100644index 00000000..16d734e6--- /dev/null+++ b/src/renderer/index.html@@ -0,0 +1,15 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <title>Claude Terminal Harness</title>+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob:;" />+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Pixelify+Sans:wght@400;500;700&family=VT323&display=swap" rel="stylesheet" />+ </head>+ <body>+ <div id="root"></div>+ <script type="module" src="./src/main.tsx"></script>+ </body>+</html>diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsxnew file mode 100644index 00000000..6986b2c6--- /dev/null+++ b/src/renderer/src/App.tsx@@ -0,0 +1,218 @@+import { useEffect, useState } from 'react';+import { useStore, selectedAgent } from '@/store/store';+import { startMockLoop, stopMockLoop } from '@/store/mockEvents';+import type { HarnessConfig } from '@/store/config';+import { OfficeFloor } from '@/scene/office/OfficeFloor';+import { useHive } from '@/hooks/useHive';+import { ApprovalsPanel } from '@/components/ApprovalsPanel';+import { MemoryPanel } from '@/components/MemoryPanel';+import { AgentDetailPanel } from '@/components/AgentDetailPanel';+import { AgentStrip } from '@/components/AgentStrip';+import { AddAgentModal } from '@/components/AddAgentModal';+import { OnboardingWizard } from '@/components/OnboardingWizard';+import { QuitWarningModal } from '@/components/QuitWarningModal';+import { PixelPanel } from '@/components/PixelPanel';+import { PixelButton } from '@/components/PixelButton';+import { Icon } from '@/components/Icon';+import { SidebarSplitter } from '@/components/SidebarSplitter';+import { acquireTerminal } from '@/components/terminalPool';+import { FullscreenTerminal } from '@/components/FullscreenTerminal';+import { FullscreenFileEditor } from '@/components/FullscreenFileEditor';++export function App() {+ const agent = useStore(selectedAgent);+ const agents = useStore(s => s.agents);+ const agentCount = agents.length;+ const addAgentOpen = useStore(s => s.addAgentOpen);+ const setAddAgentOpen = useStore(s => s.setAddAgentOpen);+ const fullscreenAgentId = useStore(s => s.fullscreenAgentId);+ const fullscreenFilePath = useStore(s => s.fullscreenFilePath);+ const sidebarWidth = useStore(s => s.sidebarWidth);+ const setSidebarWidth = useStore(s => s.setSidebarWidth);++ const [config, setConfig] = useState<HarnessConfig | null>(null);+ const [quitWarn, setQuitWarn] = useState<{ ptyCount: number } | null>(null);+ const [vpWidth, setVpWidth] = useState<number>(window.innerWidth);++ // Initial config load+ useEffect(() => {+ let cancelled = false;+ window.cth.getConfig().then(c => { if (!cancelled) setConfig(c); });+ return () => { cancelled = true; };+ }, []);++ // Quit warning subscription+ useEffect(() => window.cth.onCloseRequested((info) => setQuitWarn(info)), []);++ // The hive: god-agent bootstrap, hook-driven avatars, idle-agent waking.+ useHive(config);++ // Pre-warm a persistent terminal for every live agent so its output is+ // buffered from spawn. Switching agents then re-attaches an already-rendered+ // terminal instantly (with full history) instead of building a blank one.+ useEffect(() => {+ for (const a of agents) if (a.ptyId) acquireTerminal(a.ptyId);+ }, [agents]);++ // Mock loop only after onboarding (skip during wizard)+ useEffect(() => {+ if (!config?.onboardingComplete) return;+ startMockLoop();+ return () => stopMockLoop();+ }, [config?.onboardingComplete]);++ // Reconcile restored agents against the PTYs still alive in the main process.+ // After a renderer reload (e.g. the laptop slept and Vite reloaded the page),+ // this keeps agents whose process survived and drops any that truly died.+ useEffect(() => {+ if (!config?.onboardingComplete) return;+ let cancelled = false;+ window.cth.listPtys().then((list) => {+ if (cancelled) return;+ useStore.getState().reconcileWithLivePtys(list.map((p) => p.id));+ }).catch(() => { /* ignore — keep restored agents as-is */ });+ return () => { cancelled = true; };+ }, [config?.onboardingComplete]);++ // Track viewport width for splitter clamping+ useEffect(() => {+ const onResize = () => setVpWidth(window.innerWidth);+ window.addEventListener('resize', onResize);+ return () => window.removeEventListener('resize', onResize);+ }, []);++ if (!config) {+ return <div style={{ width: '100vw', height: '100vh', background: 'var(--cth-cream-100)' }} />;+ }++ if (!config.onboardingComplete) {+ return <OnboardingWizard onComplete={(next) => setConfig(next)} />;+ }++ return (+ <div style={{+ display: 'flex', flexDirection: 'column',+ width: '100vw', height: '100vh',+ overflow: 'hidden'+ }}>+ {/* Title bar */}+ <div+ className="cth-titlebar-drag"+ style={{+ height: 36, minHeight: 36,+ background: 'linear-gradient(180deg, var(--cth-cream-100) 0%, var(--cth-cream-200) 100%)',+ borderBottom: '2px solid var(--cth-ink-900)',+ display: 'flex',+ alignItems: 'center',+ paddingLeft: 96,+ paddingRight: 12,+ gap: 12,+ userSelect: 'none'+ }}+ >+ <span style={{+ fontFamily: 'var(--cth-font-display)',+ fontSize: 12,+ lineHeight: '20px',+ color: 'var(--cth-ink-900)'+ }}>+ CLAUDE TERMINAL HARNESS+ </span>+ <span style={{+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 14,+ color: 'var(--cth-ink-500)'+ }}>+ v0.1 · {config.autoMode ? 'auto mode on' : 'auto mode off'}+ </span>+ </div>++ <div style={{+ flex: 1, minHeight: 0,+ display: 'flex',+ padding: 16,+ gap: 0+ }}>+ <div style={{ flex: 1, minHeight: 0, minWidth: 0, position: 'relative' }}>+ <OfficeFloor />+ <ApprovalsPanel />+ <MemoryPanel />+ {agentCount === 0 && (+ <div style={{+ position: 'absolute', inset: 0,+ display: 'flex', alignItems: 'center', justifyContent: 'center',+ pointerEvents: 'none'+ }}>+ <div style={{ pointerEvents: 'auto', width: 360 }}>+ <PixelPanel variant="dialog" title="EMPTY FLOOR" noPadding>+ <div style={{ padding: 16, display: 'flex', flexDirection: 'column', gap: 10 }}>+ <p style={{ margin: 0, fontSize: 14, lineHeight: '20px' }}>+ No agents on the floor yet. Spawn one to see real claude output stream in here.+ </p>+ <PixelButton variant="primary" size="md" onClick={() => setAddAgentOpen(true)}>+ <span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>+ <Icon name="plus" /> add agent+ </span>+ </PixelButton>+ </div>+ </PixelPanel>+ </div>+ </div>+ )}+ </div>++ <SidebarSplitter+ width={sidebarWidth}+ onChange={setSidebarWidth}+ viewportWidth={vpWidth}+ />++ <div style={{+ width: sidebarWidth, flexShrink: 0,+ minHeight: 0, display: 'flex', flexDirection: 'column'+ }}>+ {agent ? (+ <AgentDetailPanel agent={agent} />+ ) : (+ <PixelPanel variant="default" noPadding style={{+ padding: 16, height: '100%',+ display: 'flex', flexDirection: 'column',+ justifyContent: 'center', alignItems: 'center', gap: 12+ }}>+ <div style={{+ fontFamily: 'var(--cth-font-display)', fontSize: 10, lineHeight: '14px',+ color: 'var(--cth-ink-500)'+ }}>NO AGENT SELECTED</div>+ <p style={{ margin: 0, fontSize: 14, textAlign: 'center', color: 'var(--cth-ink-700)' }}>+ Spawn an agent from the strip below.<br />+ The terminal and command bar will land here.+ </p>+ <PixelButton variant="secondary" size="md" onClick={() => setAddAgentOpen(true)}>+ <span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>+ <Icon name="plus" /> add agent+ </span>+ </PixelButton>+ </PixelPanel>+ )}+ </div>+ </div>++ <AgentStrip />++ {addAgentOpen && (+ <AddAgentModal onClose={() => setAddAgentOpen(false)} config={config} />+ )}++ {quitWarn && (+ <QuitWarningModal+ ptyCount={quitWarn.ptyCount}+ onCancel={() => { window.cth.cancelClose(); setQuitWarn(null); }}+ onConfirm={async () => { await window.cth.confirmClose(); }}+ />+ )}++ {fullscreenAgentId && <FullscreenTerminal />}+ {fullscreenFilePath && <FullscreenFileEditor />}+ </div>+ );+}diff --git a/src/renderer/src/assets/ATTRIBUTION.md b/src/renderer/src/assets/ATTRIBUTION.mdnew file mode 100644index 00000000..ad205b68--- /dev/null+++ b/src/renderer/src/assets/ATTRIBUTION.md@@ -0,0 +1,23 @@+# Asset attribution++The office tileset/map and base character walk sheets in this directory are vendored from+[`shahar061/the-office`](https://github.com/shahar061/the-office) (project code: ISC).++## Pixel art — LimeZu (IMPORTANT: non-commercial license)++The tilesets (`tilesets/*.png`) and the base character sheets used as recolor sources+(`characters/{Adam,Alex,Amelia,Bob}_walk.png`) are LimeZu pixel-art assets, distributed under+the **LimeZu FREE VERSION license** (see `tilesets/LIMEZUASSETS-LICENSE.txt`):++- ✅ May be used **and edited** (we recolor them into the Office cast) — **in non-commercial projects only**.+- ❌ May **not** be used or edited in commercial projects, and may not be resold.++This project (Claude Terminal Harness) is a personal, non-commercial project, which is compatible+with that license. **If this project is ever commercialized, these assets must be replaced or a+paid LimeZu license obtained.** The recolored Office-cast sprites are derived edits of these base+sheets and inherit the same restriction.++## Tiled map++`maps/office.tmj` / `maps/lobby.tmj` are Tiled JSON maps from the same repo, built on the LimeZu+tilesets above.diff --git a/src/renderer/src/assets/characters/Adam_walk.png b/src/renderer/src/assets/characters/Adam_walk.pngnew file mode 100644index 00000000..eca7edacBinary files /dev/null and b/src/renderer/src/assets/characters/Adam_walk.png differdiff --git a/src/renderer/src/assets/characters/Alex_walk.png b/src/renderer/src/assets/characters/Alex_walk.pngnew file mode 100644index 00000000..dc83f2d1Binary files /dev/null and b/src/renderer/src/assets/characters/Alex_walk.png differdiff --git a/src/renderer/src/assets/characters/Amelia_walk.png b/src/renderer/src/assets/characters/Amelia_walk.pngnew file mode 100644index 00000000..7e155c3eBinary files /dev/null and b/src/renderer/src/assets/characters/Amelia_walk.png differdiff --git a/src/renderer/src/assets/characters/Bob_walk.png b/src/renderer/src/assets/characters/Bob_walk.pngnew file mode 100644index 00000000..6272cb15Binary files /dev/null and b/src/renderer/src/assets/characters/Bob_walk.png differdiff --git a/src/renderer/src/assets/maps/lobby.tmj b/src/renderer/src/assets/maps/lobby.tmjnew file mode 100644index 00000000..3e1546b8--- /dev/null+++ b/src/renderer/src/assets/maps/lobby.tmj@@ -0,0 +1,157 @@+{ "compressionlevel":-1,+ "height":12,+ "infinite":false,+ "layers":[+ {+ "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 217, 0, 0, 0, 0, 0, 217, 0, 0, 0, 0, 0, 0, 0,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,+ 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217],+ "height":12,+ "id":1,+ "name":"floor",+ "opacity":1,+ "type":"tilelayer",+ "visible":true,+ "width":16,+ "x":0,+ "y":0+ },+ {+ "data":[161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161,+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],+ "height":12,+ "id":2,+ "name":"walls",+ "opacity":1,+ "type":"tilelayer",+ "visible":true,+ "width":16,+ "x":0,+ "y":0+ },+ {+ "data":[0, 1544, 0, 0, 0, 1458, 1459, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 1560, 0, 0, 0, 1474, 1475, 0, 1176, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 470, 453, 0, 0, 453, 436, 0, 0, 0, 0, 1042, 1043, 0,+ 0, 0, 0, 450, 469, 451, 451, 469, 452, 0, 0, 0, 0, 1058, 1059, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 1599, 1601, 1600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],+ "height":12,+ "id":3,+ "name":"furniture-below",+ "opacity":1,+ "type":"tilelayer",+ "visible":true,+ "width":16,+ "x":0,+ "y":0+ },+ {+ "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 684, 685, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 700, 701, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 1192, 0, 716, 717, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 850, 852, 852, 851, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 866, 868, 868, 867, 0, 0, 0, 0, 0, 0, 0, 0,+ 1677, 1678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 1725, 1694, 1098, 1099, 0, 1106, 1107, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 1693, 1694, 1114, 1115, 0, 1122, 1123, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 1709, 1710, 1599, 1590, 1591, 1138, 1139, 0, 0, 0, 0, 0, 0, 0, 0, 0],+ "height":12,+ "id":4,+ "name":"furniture-above",+ "opacity":1,+ "type":"tilelayer",+ "visible":true,+ "width":16,+ "x":0,+ "y":0+ },+ {+ "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],+ "height":12,+ "id":5,+ "name":"collision",+ "opacity":1,+ "type":"tilelayer",+ "visible":false,+ "width":16,+ "x":0,+ "y":0+ }],+ "nextlayerid":6,+ "nextobjectid":100,+ "orientation":"orthogonal",+ "renderorder":"right-down",+ "tiledversion":"1.12.0",+ "tileheight":16,+ "tilesets":[+ {+ "columns":17,+ "firstgid":1,+ "image":"..\/tilesets\/room-builder.png",+ "imageheight":368,+ "imagewidth":272,+ "margin":0,+ "name":"room-builder",+ "spacing":0,+ "tilecount":391,+ "tileheight":16,+ "tilewidth":16+ },+ {+ "columns":16,+ "firstgid":392,+ "image":"..\/tilesets\/interiors.png",+ "imageheight":1424,+ "imagewidth":256,+ "margin":0,+ "name":"interiors",+ "spacing":0,+ "tilecount":1424,+ "tileheight":16,+ "tilewidth":16+ }],+ "tilewidth":16,+ "type":"map",+ "version":"1.10",+ "width":16+}\ No newline at end of filediff --git a/src/renderer/src/assets/maps/office.tmj b/src/renderer/src/assets/maps/office.tmjnew file mode 100644index 00000000..3be50b67--- /dev/null+++ b/src/renderer/src/assets/maps/office.tmj@@ -0,0 +1,669 @@+{ "compressionlevel":-1,+ "height":21,+ "infinite":false,+ "layers":[+ {+ "data":[514, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 799, 800, 0,+ 0, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 783, 784, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],+ "height":21,+ "id":1,+ "name":"floor",+ "opacity":1,+ "type":"tilelayer",+ "visible":true,+ "width":28,+ "x":0,+ "y":0+ },+ {+ "data":[514, 522, 522, 522, 522, 522, 522, 522, 619, 620, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 517,+ 530, 554, 554, 554, 554, 554, 554, 554, 635, 636, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 533,+ 530, 563, 570, 570, 570, 570, 570, 570, 635, 636, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 651, 652, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 667, 684, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 683, 684, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 699, 700, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 653, 654, 0, 0, 0, 0, 0, 611, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 669, 670, 0, 0, 0, 0, 0, 627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 523, 523, 523, 523, 523, 523, 523, 522, 522, 522, 524, 0, 0, 0, 627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 540, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 540, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 572, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533,+ 530, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 565,+ 578, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 0, 0, 585, 579, 579, 581],+ "height":21,+ "id":2,+ "locked":true,+ "name":"walls",+ "opacity":1,+ "type":"tilelayer",+ "visible":true,+ "width":28,+ "x":0,+ "y":0+ },+ {+ "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 269, 191, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266, 0,+ 0, 0, 0, 0, 0, 0, 0, 281, 0, 0, 38, 40, 39, 285, 207, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 281, 282, 0,+ 0, 0, 0, 0, 0, 0, 0, 297, 0, 0, 54, 56, 55, 301, 223, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 297, 298, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 289, 0, 0, 0, 0, 0, 0, 261, 261, 0, 261, 261, 0, 0, 0, 2, 3, 4, 0, 2, 3, 4, 0, 0,+ 0, 0, 0, 2, 3, 4, 0, 0, 0, 0, 0, 309, 310, 0, 309, 310, 0, 0, 0, 0, 289, 0, 0, 0, 289, 0, 0, 0,+ 0, 0, 0, 18, 289, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, 0, 305, 0, 0, 0,+ 0, 0, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 2, 3, 4, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 289, 0, 0, 0, 289, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, 0, 305, 0, 0, 0,+ 0, 0, 0, 0, 421, 422, 0, 417, 418, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 437, 438, 0, 433, 434, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 2, 3, 4, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 289, 0, 0, 0, 289, 0, 0, 0,+ 0, 0, 0, 0, 257, 257, 257, 257, 0, 0, 0, 0, 0, 0, 0, 0, 1029, 1026, 1027, 0, 305, 0, 0, 0, 305, 0, 0, 0,+ 0, 0, 0, 1610612898, 1610612914, 2684354789, 2684354789, 1610612914, 1610612930, 260, 0, 0, 0, 0, 0, 0, 1041, 1042, 1043, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 1610612897, 1610612913, 1610612965, 1610612965, 1610612913, 1610612929, 276, 0, 0, 0, 0, 0, 0, 1044, 0, 1061, 0, 2248, 2249, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 274, 274, 274, 274, 0, 0, 0, 0, 0, 0, 0, 0, 1073, 1074, 1075, 0, 2264, 2265, 0, 0, 0, 463, 464, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2280, 2281, 499, 500, 0, 479, 480, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],+ "height":21,+ "id":3,+ "name":"furniture-below",+ "opacity":1,+ "type":"tilelayer",+ "visible":true,+ "width":28,+ "x":0,+ "y":0+ },+ {+ "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 354, 0, 327, 328, 0, 0, 0, 313, 0, 0, 0, 0, 0, 0, 327, 328, 0, 0, 0, 389, 0, 0, 0, 0, 0,+ 0, 0, 0, 370, 0, 343, 344, 0, 0, 0, 329, 330, 0, 0, 0, 0, 0, 343, 344, 0, 0, 0, 405, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 366, 0, 0, 365, 366, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 293, 294, 0, 293, 294, 0, 0, 0, 0, 381, 382, 0, 0, 381, 382, 0, 0,+ 0, 0, 0, 431, 432, 349, 0, 0, 0, 0, 0, 262, 262, 0, 262, 262, 0, 0, 0, 18, 19, 20, 0, 18, 19, 20, 0, 0,+ 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 366, 0, 0, 365, 366, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 382, 0, 0, 381, 382, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 0, 18, 19, 20, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 421, 422, 0, 417, 418, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 366, 0, 0, 365, 366, 0, 0,+ 0, 0, 0, 0, 437, 438, 0, 433, 434, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 382, 0, 0, 381, 382, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 0, 18, 19, 20, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 1610614415, 1610614431, 0, 451, 0, 0, 0, 0, 395, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 1610614414, 1610614430, 0, 467, 258, 258, 258, 258, 411, 0, 0, 0, 0, 0, 0, 0, 0, 1610613812, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],+ "height":21,+ "id":4,+ "name":"furniture-above",+ "opacity":1,+ "type":"tilelayer",+ "visible":true,+ "width":28,+ "x":0,+ "y":0+ },+ {+ "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,+ 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,+ 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1,+ 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1,+ 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1,+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,+ 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1,+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1,+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1],+ "height":21,+ "id":5,+ "name":"collision",+ "opacity":1,+ "type":"tilelayer",+ "visible":true,+ "width":28,+ "x":0,+ "y":0+ },+ {+ "draworder":"topdown",+ "id":10,+ "name":"monitor-glow",+ "objects":[+ {+ "height":6.9674867769692,+ "id":108,+ "name":"monitor-pc-1",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":12.059709072272,+ "x":322.003438079071,+ "y":75.1270793350506+ },+ {+ "height":6.71338634240608,+ "id":109,+ "name":"monitor-pc-2",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":11.7217557282024,+ "x":386.234683258917,+ "y":75.2196746324589+ },+ {+ "height":6.96749,+ "id":114,+ "name":"monitor-pc-3",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":12.0597,+ "x":321.94560357524,+ "y":139.081178514763+ },+ {+ "height":6.96749,+ "id":115,+ "name":"monitor-pc-4",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":12.0597,+ "x":385.797613536108,+ "y":138.903305871576+ },+ {+ "height":6.96749,+ "id":116,+ "name":"monitor-pc-5",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":12.0597,+ "x":321.967304037709,+ "y":203.026393740662+ },+ {+ "height":6.96749,+ "id":117,+ "name":"monitor-pc-6",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":12.0597,+ "x":385.912519263607,+ "y":203.026393740662+ }],+ "opacity":1,+ "type":"objectgroup",+ "visible":true,+ "x":0,+ "y":0+ },+ {+ "draworder":"topdown",+ "id":6,+ "name":"spawn-points",+ "objects":[+ {+ "height":0,+ "id":1,+ "name":"desk-ceo",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":70.578947368421,+ "y":89.6315789473684+ },+ {+ "height":0,+ "id":2,+ "name":"desk-product-manager",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":327.894736842105,+ "y":168.789473684211+ },+ {+ "height":0,+ "id":3,+ "name":"desk-market-researcher",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":149.578947368421,+ "y":264.842105263158+ },+ {+ "height":0,+ "id":4,+ "name":"desk-chief-architect",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":328.22111218126,+ "y":107.814429021949+ },+ {+ "height":0,+ "id":5,+ "name":"desk-agent-organizer",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":279.117740826764,+ "y":276.843465714893+ },+ {+ "height":0,+ "id":6,+ "name":"desk-project-manager",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":74.0263157894737,+ "y":252.052631578947+ },+ {+ "height":0,+ "id":7,+ "name":"desk-team-lead",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":393.710526315789,+ "y":109.289473684211+ },+ {+ "height":0,+ "id":8,+ "name":"desk-backend-engineer",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":391.026315789474,+ "y":171.315789473684+ },+ {+ "height":0,+ "id":11,+ "name":"desk-ui-ux-expert",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":326.578947368421,+ "y":233.842105263158+ },+ {+ "height":0,+ "id":12,+ "name":"desk-data-engineer",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":392.105263157895,+ "y":234.5+ },+ {+ "height":0,+ "id":99,+ "name":"entrance",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":367.643758867828,+ "y":319.272383308473+ },+ {+ "height":0,+ "id":101,+ "name":"warroom-seat",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":150.115898303838,+ "y":266.014202141359+ },+ {+ "height":0,+ "id":102,+ "name":"pc-1",+ "opacity":1,+ "point":true,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":327.488151658768,+ "y":106.161137440758+ },+ {+ "height":0,+ "id":103,+ "name":"pc-2",+ "opacity":1,+ "point":true,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":391.469194312796,+ "y":106.161137440758+ },+ {+ "height":0,+ "id":104,+ "name":"pc-3",+ "opacity":1,+ "point":true,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":327.488151658768,+ "y":169.668246445498+ },+ {+ "height":0,+ "id":105,+ "name":"pc-4",+ "opacity":1,+ "point":true,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":391.943127962085,+ "y":170.142180094787+ },+ {+ "height":0,+ "id":106,+ "name":"pc-5",+ "opacity":1,+ "point":true,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":327.488151658768,+ "y":233.649289099526+ },+ {+ "height":0,+ "id":107,+ "name":"pc-6",+ "opacity":1,+ "point":true,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":391.943127962085,+ "y":232.701421800948+ }],+ "opacity":1,+ "type":"objectgroup",+ "visible":true,+ "x":0,+ "y":0+ },+ {+ "draworder":"topdown",+ "id":7,+ "locked":true,+ "name":"zones",+ "objects":[+ {+ "height":144,+ "id":50,+ "name":"ceo-room",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":112,+ "x":16,+ "y":32+ },+ {+ "height":84.1315789473684,+ "id":51,+ "name":"boardroom",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":177.368421052632,+ "x":13.7368421052632,+ "y":237.263157894737+ },+ {+ "height":196.631578947368,+ "id":52,+ "name":"open-work-area",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":129.710526315789,+ "x":291,+ "y":58+ }],+ "opacity":1,+ "type":"objectgroup",+ "visible":true,+ "x":0,+ "y":0+ },+ {+ "draworder":"topdown",+ "id":8,+ "name":"interactive-objects",+ "objects":[+ {+ "height":9.2643868487153,+ "id":100,+ "name":"artifact-vision-brief",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":8.28210993081966,+ "x":80.8419516439106,+ "y":99+ },+ {+ "height":17.2635228848821,+ "id":101,+ "name":"artifact-prd",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":22.5145631067961,+ "x":116.670045045045,+ "y":201.637387387387+ },+ {+ "height":19.1060967740663,+ "id":102,+ "name":"artifact-market-analysis",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":26.2623605845729,+ "x":66.969087357346,+ "y":201.031810625091+ },+ {+ "height":26.8550848910993,+ "id":103,+ "name":"artifact-system-design",+ "opacity":1,+ "rotation":0,+ "type":"",+ "visible":true,+ "width":21.417938604013,+ "x":7.95180929514663,+ "y":258.710341279369+ }],+ "opacity":1,+ "type":"objectgroup",+ "visible":false,+ "x":0,+ "y":0+ },+ {+ "draworder":"topdown",+ "id":8,+ "name":"war-room-objects",+ "objects":[+ {+ "height":0,+ "id":100,+ "name":"war-room-pc",+ "opacity":1,+ "polygon":[+ {+ "x":0,+ "y":0+ },+ {+ "x":5.31680692514101,+ "y":4.56913095129306+ },+ {+ "x":13.1258670964419,+ "y":4.56913095129306+ },+ {+ "x":13.2089422046472,+ "y":17.8611482641456+ },+ {+ "x":4.73528116770373,+ "y":17.8611482641456+ },+ {+ "x":-0.249225324615978,+ "y":12.5443413390046+ }],+ "rotation":0,+ "type":"",+ "visible":true,+ "width":0,+ "x":128.018741744411,+ "y":256.203633705233+ }],+ "opacity":1,+ "type":"objectgroup",+ "visible":false,+ "x":0,+ "y":0+ }],+ "nextlayerid":11,+ "nextobjectid":118,+ "orientation":"orthogonal",+ "renderorder":"right-down",+ "tiledversion":"1.12.0",+ "tileheight":16,+ "tilesets":[+ {+ "columns":16,+ "firstgid":1,+ "image":"..\/tilesets\/office-tileset.png",+ "imageheight":512,+ "imagewidth":256,+ "margin":0,+ "name":"office-tileset",+ "spacing":0,+ "tilecount":512,+ "tileheight":16,+ "tilewidth":16+ },+ {+ "firstgid":513,+ "source":"A5 Office Floors & Walls.tsx"+ },+ {+ "firstgid":1025,+ "source":"interiors.tsx"+ }],+ "tilewidth":16,+ "type":"map",+ "version":"1.10",+ "width":28+}\ No newline at end of filediff --git a/src/renderer/src/assets/tilesets/A2 Office Floors.png b/src/renderer/src/assets/tilesets/A2 Office Floors.pngnew file mode 100644index 00000000..799e0335Binary files /dev/null and b/src/renderer/src/assets/tilesets/A2 Office Floors.png differdiff --git a/src/renderer/src/assets/tilesets/A4 Office Walls.png b/src/renderer/src/assets/tilesets/A4 Office Walls.pngnew file mode 100644index 00000000..4077b9ddBinary files /dev/null and b/src/renderer/src/assets/tilesets/A4 Office Walls.png differdiff --git a/src/renderer/src/assets/tilesets/LIMEZUASSETS-LICENSE.txt b/src/renderer/src/assets/tilesets/LIMEZUASSETS-LICENSE.txtnew file mode 100644index 00000000..43eeac9b--- /dev/null+++ b/src/renderer/src/assets/tilesets/LIMEZUASSETS-LICENSE.txt@@ -0,0 +1,11 @@++FREE VERSION LICENSE:++CAN:+YOU CAN USE THE ASSET IN NON COMMERCIAL PROJECTS+YOU CAN EDIT THE SPRITES AND USE THEM IN NON COMMERCIAL PROJECTS++CAN'T:+YOU CAN'T USE THE ASSET IN COMMERCIAL PROJECTS+YOU CAN'T EDIT THE SPRITES AND USE THEM IN COMMERCIAL PROJECTS+YOU CAN'T EDIT AND RESELL THE SPRITES\ No newline at end of filediff --git a/src/renderer/src/assets/tilesets/a5-office-floors-walls.png b/src/renderer/src/assets/tilesets/a5-office-floors-walls.pngnew file mode 100644index 00000000..43f2c1a7Binary files /dev/null and b/src/renderer/src/assets/tilesets/a5-office-floors-walls.png differdiff --git a/src/renderer/src/assets/tilesets/interiors.png b/src/renderer/src/assets/tilesets/interiors.pngnew file mode 100644index 00000000..3a203b0bBinary files /dev/null and b/src/renderer/src/assets/tilesets/interiors.png differdiff --git a/src/renderer/src/assets/tilesets/office-tileset.png b/src/renderer/src/assets/tilesets/office-tileset.pngnew file mode 100644index 00000000..be5e1747Binary files /dev/null and b/src/renderer/src/assets/tilesets/office-tileset.png differdiff --git a/src/renderer/src/assets/tilesets/room-builder.png b/src/renderer/src/assets/tilesets/room-builder.pngnew file mode 100644index 00000000..026bca5eBinary files /dev/null and b/src/renderer/src/assets/tilesets/room-builder.png differdiff --git a/src/renderer/src/components/AddAgentModal.tsx b/src/renderer/src/components/AddAgentModal.tsxnew file mode 100644index 00000000..e66b2e49--- /dev/null+++ b/src/renderer/src/components/AddAgentModal.tsx@@ -0,0 +1,294 @@+import { useState } from 'react';+import { PixelPanel } from './PixelPanel';+import { PixelButton } from './PixelButton';+import { SpritePortrait } from './SpritePortrait';+import { Icon } from './Icon';+import { useStore, type Agent } from '@/store/store';+import { OFFICE_CAST, DEFAULT_CHARACTER, type OfficeCharacterName } from '@/scene/office/cast';+import { type AccentColorName } from '@/design/tokens';+import { type HarnessConfig, buildSpawnCommand } from '@/store/config';++const ACCENTS: AccentColorName[] = ['coral', 'mint', 'sky', 'lemon', 'lilac', 'peach'];++function basename(path: string): string {+ return path.split('/').filter(Boolean).pop() ?? path;+}++function uniqueId(name: string): string {+ return `${name.toLowerCase().replace(/[^a-z0-9]+/g, '-')}-${Date.now().toString(36)}`;+}++export interface AddAgentModalProps {+ onClose: () => void;+ config: HarnessConfig;+}++export function AddAgentModal({ onClose, config }: AddAgentModalProps) {+ const addAgent = useStore(s => s.addAgent);++ const [name, setName] = useState('Jim');+ const [character, setCharacter] = useState<OfficeCharacterName>(DEFAULT_CHARACTER);+ const [accent, setAccent] = useState<AccentColorName>('sky');+ const [cwd, setCwd] = useState<string>(config.registeredRepos[0] ?? '');+ const [command, setCommand] = useState(buildSpawnCommand(config));+ const [description, setDescription] = useState('a fresh harness');+ const [goal, setGoal] = useState('');+ const [error, setError] = useState<string | undefined>();+ const [busy, setBusy] = useState(false);++ const pickFolder = async () => {+ setError(undefined);+ const res = await window.cth.chooseFolder();+ if (res.ok) setCwd(res.path);+ else if (res.error !== 'cancelled') setError(res.error);+ };++ const submit = async () => {+ setError(undefined);+ if (!name.trim()) { setError('Name is required'); return; }+ if (!cwd) { setError('Pick a folder first'); return; }+ if (!command.trim()) { setError('Command is required'); return; }++ setBusy(true);+ const id = uniqueId(name);+ const ptyId = `pty-${id}`;+ // The command field contains `claude --permission-mode bypassPermissions`+ // for auto mode. Split into argv-style for node-pty.+ const [exe, ...args] = command.trim().split(/\s+/);+ const spawnRes = await window.cth.spawnPty({+ id: ptyId,+ cwd,+ command: exe,+ args,+ cols: 100,+ rows: 30,+ // Provision this agent in the hive (memory + mailbox + identity/protocol).+ hive: {+ id,+ name: name.trim(),+ cwd,+ role: description.trim() || undefined+ }+ });+ if (!spawnRes.ok) {+ setBusy(false);+ setError(spawnRes.error ?? 'spawn failed');+ return;+ }++ const agent: Agent = {+ id,+ name: name.trim(),+ character,+ accent,+ description: description.trim() || 'a fresh harness',+ project: basename(cwd),+ tmuxTarget: '',+ cwd,+ goal: goal.trim() || undefined,+ status: 'idle',+ action: 'starting up',+ progress: 0,+ currentStation: 'desk',+ ptyId,+ command: command.trim(),+ recentTextTs: Date.now()+ };+ addAgent(agent);+ setBusy(false);+ onClose();+ };++ return (+ <div+ onClick={onClose}+ style={{+ position: 'fixed', inset: 0,+ background: 'rgba(26, 19, 32, 0.6)',+ display: 'flex', alignItems: 'center', justifyContent: 'center',+ zIndex: 100+ }}+ >+ <div onClick={(e) => e.stopPropagation()} style={{ width: 600, maxWidth: '92vw' }}>+ <PixelPanel+ variant="dialog"+ title="ADD AGENT"+ style={{ padding: 16 }}+ noPadding+ >+ <div style={{ display: 'flex', flexDirection: 'column', gap: 12, padding: 16 }}>+ <Row label="Name">+ <input+ value={name}+ onChange={(e) => setName(e.target.value)}+ placeholder="Ada"+ style={inputStyle}+ />+ </Row>++ <Row label="Folder">+ {config.registeredRepos.length > 0 && (+ <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap', marginBottom: 6 }}>+ {config.registeredRepos.map((r) => (+ <button+ key={r}+ onClick={() => setCwd(r)}+ title={r}+ style={{+ padding: '3px 8px 1px',+ background: cwd === r ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',+ boxShadow: cwd === r+ ? 'inset 0 0 0 2px var(--cth-ink-900)'+ : 'inset 0 0 0 1px var(--cth-ink-700)',+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 13,+ cursor: 'pointer',+ border: 'none'+ }}+ >+ {basename(r)}+ </button>+ ))}+ </div>+ )}+ <div style={{ display: 'flex', gap: 6, alignItems: 'center' }}>+ <input+ value={cwd}+ onChange={(e) => setCwd(e.target.value)}+ placeholder="/path/to/your/project"+ style={{ ...inputStyle, flex: 1, fontFamily: 'var(--cth-font-mono)', fontSize: 14 }}+ />+ <PixelButton variant="secondary" size="md" onClick={pickFolder}>+ <span style={{ display: 'inline-flex', gap: 4, alignItems: 'center' }}>+ <Icon name="folder" /> pick+ </span>+ </PixelButton>+ </div>+ </Row>++ <Row label={config.autoMode ? 'Command (auto mode on)' : 'Command'}>+ <input+ value={command}+ onChange={(e) => setCommand(e.target.value)}+ placeholder="claude"+ style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)' }}+ />+ </Row>++ <Row label="Description">+ <input+ value={description}+ onChange={(e) => setDescription(e.target.value)}+ placeholder="what is this agent for"+ style={inputStyle}+ />+ </Row>++ <Row label="Goal (optional)">+ <textarea+ value={goal}+ onChange={(e) => setGoal(e.target.value)}+ placeholder="long-running directive injected on every prompt"+ rows={2}+ style={{ ...inputStyle, fontFamily: 'var(--cth-font-ui)', resize: 'none' }}+ />+ </Row>++ <Row label="Character">+ <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>+ {OFFICE_CAST.map(c => (+ <button+ key={c.name}+ onClick={() => { setCharacter(c.name); setName(c.displayName); }}+ title={c.blurb}+ style={{+ padding: 4,+ background: character === c.name ? `var(--cth-${accent}-light)` : 'var(--cth-cream-100)',+ boxShadow: character === c.name+ ? 'inset 0 0 0 2px var(--cth-ink-900)'+ : 'inset 0 0 0 1px var(--cth-ink-700)',+ cursor: 'pointer',+ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2,+ border: 'none', width: 56+ }}+ >+ <div style={{ width: 44, height: 56, display: 'flex', alignItems: 'flex-end', justifyContent: 'center', overflow: 'hidden' }}>+ <SpritePortrait character={c.name} scale={2} />+ </div>+ <span style={{ fontSize: 11, color: 'var(--cth-ink-700)' }}>{c.displayName}</span>+ </button>+ ))}+ </div>+ </Row>++ <Row label="Color">+ <div style={{ display: 'flex', gap: 6 }}>+ {ACCENTS.map(a => (+ <button+ key={a}+ onClick={() => setAccent(a)}+ style={{+ width: 32, height: 32,+ background: `var(--cth-${a})`,+ boxShadow: accent === a+ ? 'inset 0 0 0 2px var(--cth-ink-900), 0 0 0 2px var(--cth-ink-900)'+ : 'inset 0 0 0 1px var(--cth-ink-900)',+ cursor: 'pointer',+ border: 'none'+ }}+ aria-label={a}+ />+ ))}+ </div>+ </Row>++ {error && (+ <div style={{+ padding: '6px 10px',+ background: 'var(--cth-coral-light)',+ boxShadow: 'inset 0 0 0 1px var(--cth-coral)',+ fontSize: 14,+ color: 'var(--cth-ink-900)'+ }}>+ {error}+ </div>+ )}++ <div style={{ display: 'flex', gap: 8, justifyContent: 'flex-end', marginTop: 4 }}>+ <PixelButton variant="ghost" size="md" onClick={onClose} disabled={busy}>cancel</PixelButton>+ <PixelButton variant="primary" size="md" onClick={submit} disabled={busy}>+ {busy ? 'spawning...' : 'spawn'}+ </PixelButton>+ </div>+ </div>+ </PixelPanel>+ </div>+ </div>+ );+}++const inputStyle: React.CSSProperties = {+ width: '100%',+ padding: '6px 8px 4px',+ background: 'var(--cth-paper-100)',+ border: 'none',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 16,+ color: 'var(--cth-ink-900)',+ outline: 'none'+};++function Row({ label, children }: { label: string; children: React.ReactNode }) {+ return (+ <label style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>+ <span style={{+ fontFamily: 'var(--cth-font-display)',+ fontSize: 8, lineHeight: '12px',+ color: 'var(--cth-ink-700)',+ textTransform: 'uppercase'+ }}>{label}</span>+ {children}+ </label>+ );+}diff --git a/src/renderer/src/components/AgentCard.tsx b/src/renderer/src/components/AgentCard.tsxnew file mode 100644index 00000000..0da75285--- /dev/null+++ b/src/renderer/src/components/AgentCard.tsx@@ -0,0 +1,91 @@+import { PixelPanel } from './PixelPanel';+import { PixelBadge, StatusKind } from './PixelBadge';+import { SpritePortrait } from './SpritePortrait';+import { AccentColorName } from '@/design/tokens';+import { OfficeCharacterName } from '@/scene/office/cast';++export interface AgentCardProps {+ name: string;+ character: OfficeCharacterName;+ accent: AccentColorName;+ status: StatusKind;+ project: string;+ action?: string;+ progress?: number; // 0..8 segments filled+ selected?: boolean;+ onClick?: () => void;+}++export function AgentCard({+ name, character, accent, status, project, action, progress = 0, selected, onClick+}: AgentCardProps) {+ return (+ <button+ onClick={onClick}+ className="cth-titlebar-nodrag"+ style={{+ width: 220, minWidth: 220, height: 96,+ padding: 0, border: 'none', background: 'transparent', cursor: 'pointer', textAlign: 'left'+ }}+ >+ <PixelPanel+ variant={selected ? 'active' : 'default'}+ accent={selected ? accent : undefined}+ style={{ height: '100%', padding: 8 }}+ noPadding+ >+ <div style={{ display: 'flex', gap: 8, height: '100%' }}>+ <div style={{+ width: 44, height: 64,+ background: `var(--cth-${accent}-light)`,+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)',+ display: 'flex', alignItems: 'flex-end', justifyContent: 'center', overflow: 'hidden'+ }}>+ <SpritePortrait character={character} scale={2} />+ </div>+ <div style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 2, minWidth: 0 }}>+ <div style={{ display: 'flex', alignItems: 'center', gap: 6, justifyContent: 'space-between' }}>+ <span style={{+ fontFamily: 'var(--cth-font-display)',+ fontSize: 'var(--cth-text-display-sm)',+ lineHeight: 'var(--cth-lh-display-sm)',+ color: 'var(--cth-ink-900)',+ whiteSpace: 'nowrap',+ overflow: 'hidden',+ textOverflow: 'ellipsis'+ }}>{name.toUpperCase()}</span>+ <PixelBadge status={status} />+ </div>+ <div style={{+ fontSize: 'var(--cth-text-body-sm)',+ lineHeight: '16px',+ color: 'var(--cth-ink-500)',+ whiteSpace: 'nowrap',+ overflow: 'hidden',+ textOverflow: 'ellipsis'+ }}>{project}</div>+ <div style={{+ fontSize: 'var(--cth-text-body-sm)',+ lineHeight: '16px',+ color: 'var(--cth-ink-900)',+ whiteSpace: 'nowrap',+ overflow: 'hidden',+ textOverflow: 'ellipsis'+ }}>{action ?? ' '}</div>+ <div style={{ display: 'flex', gap: 2, marginTop: 2 }}>+ {Array.from({ length: 8 }).map((_, i) => (+ <div key={i} style={{+ width: 14, height: 6,+ background: i < progress+ ? `var(--cth-${accent})`+ : 'var(--cth-cream-200)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)'+ }}/>+ ))}+ </div>+ </div>+ </div>+ </PixelPanel>+ </button>+ );+}diff --git a/src/renderer/src/components/AgentDetailPanel.tsx b/src/renderer/src/components/AgentDetailPanel.tsxnew file mode 100644index 00000000..f073a972--- /dev/null+++ b/src/renderer/src/components/AgentDetailPanel.tsx@@ -0,0 +1,188 @@+import { useState } from 'react';+import { PixelPanel } from './PixelPanel';+import { PixelBadge } from './PixelBadge';+import { PixelButton } from './PixelButton';+import { SpritePortrait } from './SpritePortrait';+import { PtyTerminalView } from './PtyTerminalView';+import { disposeTerminal } from './terminalPool';+import { SidebarTabs } from './SidebarTabs';+import { FilesTab } from './FilesTab';+import { Icon } from './Icon';+import { useStore, type Agent } from '@/store/store';+import { usePtyParser } from '@/hooks/usePtyParser';++export interface AgentDetailPanelProps {+ agent: Agent;+}++export function AgentDetailPanel({ agent }: AgentDetailPanelProps) {+ const [openTerminalState, setOpenTerminalState] = useState<'idle' | 'opening' | 'ok' | 'error'>('idle');+ const [openTerminalError, setOpenTerminalError] = useState<string | undefined>();+ const removeAgent = useStore(s => s.removeAgent);+ const updateAgent = useStore(s => s.updateAgent);+ const setFullscreen = useStore(s => s.setFullscreen);+ const fullscreenAgentId = useStore(s => s.fullscreenAgentId);+ const sidebarTab = useStore(s => s.sidebarTab);+ const setSidebarTab = useStore(s => s.setSidebarTab);+ const isReal = !!agent.ptyId;+ // While this agent is shown in the fullscreen overlay, the fullscreen view+ // owns the pty (it sizes it to fill the screen). Keeping the embedded terminal+ // mounted too means two xterms fight over the pty's cols/rows — which corrupts+ // the display and breaks scrolling. So we unmount the embedded one here; it+ // re-mounts and re-fits when fullscreen closes.+ const isFullscreenedHere = fullscreenAgentId === agent.id;++ const onPtyStream = usePtyParser(agent.id);++ const openTerminal = async () => {+ setOpenTerminalState('opening');+ setOpenTerminalError(undefined);+ try {+ const result = await window.cth.openTerminalAt(agent.cwd);+ if (result.ok) {+ setOpenTerminalState('ok');+ setTimeout(() => setOpenTerminalState('idle'), 1500);+ } else {+ setOpenTerminalState('error');+ setOpenTerminalError(result.error ?? 'unknown error');+ setTimeout(() => setOpenTerminalState('idle'), 4000);+ }+ } catch (e) {+ setOpenTerminalState('error');+ setOpenTerminalError(e instanceof Error ? e.message : String(e));+ setTimeout(() => setOpenTerminalState('idle'), 4000);+ }+ };++ const onKill = async () => {+ if (!agent.ptyId) return;+ if (!confirm(`Kill ${agent.name}? The PTY process will terminate.`)) return;+ await window.cth.killPty(agent.ptyId);+ disposeTerminal(agent.ptyId);+ removeAgent(agent.id);+ };++ return (+ <PixelPanel+ variant="default"+ style={{+ display: 'flex',+ flexDirection: 'column',+ height: '100%',+ padding: 0,+ overflow: 'hidden'+ }}+ noPadding+ >+ {/* Thin header strip */}+ <div style={{+ display: 'flex', alignItems: 'center', gap: 8,+ padding: '6px 8px',+ background: 'var(--cth-cream-100)',+ borderBottom: '1px solid var(--cth-ink-700)',+ flexShrink: 0+ }}>+ <div style={{+ width: 32, height: 32,+ background: `var(--cth-${agent.accent}-light)`,+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)',+ display: 'flex', alignItems: 'flex-end', justifyContent: 'center', overflow: 'hidden',+ flexShrink: 0+ }}>+ <SpritePortrait character={agent.character} scale={1} />+ </div>+ <div style={{ flex: 1, minWidth: 0 }}>+ <div style={{+ fontFamily: 'var(--cth-font-display)',+ fontSize: 10, lineHeight: '14px',+ color: 'var(--cth-ink-900)',+ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'+ }}>{agent.name.toUpperCase()}</div>+ <div style={{+ display: 'flex', gap: 6, alignItems: 'center', marginTop: 1+ }}>+ <PixelBadge status={agent.status} />+ <span style={{+ fontSize: 12, color: 'var(--cth-ink-500)',+ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'+ }}>{agent.project}</span>+ </div>+ </div>+ <PixelButton variant="secondary" size="sm" onClick={openTerminal} disabled={openTerminalState === 'opening'}>+ <span title={`open Terminal.app at ${agent.cwd}`} style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>+ <Icon name="terminal" />+ {openTerminalState === 'opening' ? '...' : openTerminalState === 'ok' ? 'ok' : openTerminalState === 'error' ? 'err' : 'open'}+ </span>+ </PixelButton>+ {isReal && (+ <PixelButton variant="destructive" size="sm" onClick={onKill}>+ <Icon name="x" />+ </PixelButton>+ )}+ </div>++ {openTerminalError && (+ <div style={{+ fontSize: 12, color: 'var(--cth-coral)',+ padding: '2px 8px',+ background: 'var(--cth-coral-light)',+ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'+ }}>{openTerminalError}</div>+ )}++ {/* Tabs */}+ <SidebarTabs current={sidebarTab} accent={agent.accent} onChange={setSidebarTab} />++ {/* Active tab body — fills remaining space */}+ <div style={{ flex: 1, minHeight: 0, display: 'flex' }}>+ {sidebarTab === 'terminal' && (+ isReal && agent.ptyId ? (+ isFullscreenedHere ? (+ <EmptyTab title="In fullscreen">+ This terminal is open in fullscreen. Press Esc or exit fullscreen to bring it back here.+ </EmptyTab>+ ) : (+ <PtyTerminalView+ key={agent.ptyId}+ ptyId={agent.ptyId}+ onStreamData={onPtyStream}+ onUserPrompt={(t) => updateAgent(agent.id, { lastPrompt: t })}+ onToggleFullscreen={() => setFullscreen(agent.id)}+ fullscreen={false}+ embedded+ />+ )+ ) : (+ <EmptyTab title="No PTY">+ This agent has no live terminal. Spawn an agent through "add agent" to use the terminal tab.+ </EmptyTab>+ )+ )}++ {sidebarTab === 'files' && (+ <FilesTab cwd={agent.cwd} />+ )}+ </div>+ </PixelPanel>+ );+}++function EmptyTab({ title, children }: { title: string; children: React.ReactNode }) {+ return (+ <div style={{+ flex: 1, display: 'flex', flexDirection: 'column',+ alignItems: 'center', justifyContent: 'center',+ padding: 16, gap: 8,+ background: 'var(--cth-paper-200)'+ }}>+ <div style={{+ fontFamily: 'var(--cth-font-display)', fontSize: 10, lineHeight: '14px',+ color: 'var(--cth-ink-500)'+ }}>{title.toUpperCase()}</div>+ <p style={{+ margin: 0, fontSize: 14, textAlign: 'center', color: 'var(--cth-ink-700)',+ maxWidth: 280+ }}>{children}</p>+ </div>+ );+}diff --git a/src/renderer/src/components/AgentStrip.tsx b/src/renderer/src/components/AgentStrip.tsxnew file mode 100644index 00000000..4ea20be3--- /dev/null+++ b/src/renderer/src/components/AgentStrip.tsx@@ -0,0 +1,51 @@+import { AgentCard } from './AgentCard';+import { PixelButton } from './PixelButton';+import { Icon } from './Icon';+import { useStore } from '@/store/store';++export function AgentStrip() {+ const agents = useStore(s => s.agents);+ const selectedId = useStore(s => s.selectedId);+ const select = useStore(s => s.select);+ const setAddAgentOpen = useStore(s => s.setAddAgentOpen);++ return (+ <div style={{+ display: 'flex',+ gap: 12,+ padding: '12px 16px',+ overflowX: 'auto',+ overflowY: 'hidden',+ borderTop: '2px solid var(--cth-ink-900)',+ background: 'var(--cth-cream-200)',+ height: 124,+ minHeight: 124,+ alignItems: 'center'+ }}>+ {agents.map(a => (+ <AgentCard+ key={a.id}+ name={a.name}+ character={a.character}+ accent={a.accent}+ status={a.status}+ project={a.project}+ action={a.action}+ progress={a.progress}+ selected={a.id === selectedId}+ onClick={() => select(a.id)}+ />+ ))}+ <PixelButton+ variant="secondary"+ size="lg"+ style={{ alignSelf: 'center' }}+ onClick={() => setAddAgentOpen(true)}+ >+ <span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>+ <Icon name="plus" /> add agent+ </span>+ </PixelButton>+ </div>+ );+}diff --git a/src/renderer/src/components/ApprovalsPanel.tsx b/src/renderer/src/components/ApprovalsPanel.tsxnew file mode 100644index 00000000..7a865787--- /dev/null+++ b/src/renderer/src/components/ApprovalsPanel.tsx@@ -0,0 +1,106 @@+import { useEffect, useState, useCallback } from 'react';+import { PixelPanel } from './PixelPanel';+import { PixelButton } from './PixelButton';++interface Approval {+ id: string;+ from: string;+ to: string;+ act: string;+ subject: string;+ body: string;+ created_at: string;+}++/**+ * Floating queue of cross-agent requests the god agent escalated as critical.+ * The human approves (the held action proceeds) or rejects, optionally adding a+ * note that's relayed back to the asking agent as the human's answer.+ */+export function ApprovalsPanel() {+ const [items, setItems] = useState<Approval[]>([]);+ const [notes, setNotes] = useState<Record<string, string>>({});+ const [busy, setBusy] = useState<string | null>(null);++ const refresh = useCallback(async () => {+ try {+ const list = (await window.cth.hiveApprovals()) as Approval[];+ setItems(Array.isArray(list) ? list : []);+ } catch { /* ignore */ }+ }, []);++ useEffect(() => {+ refresh();+ const iv = setInterval(refresh, 2500);+ return () => clearInterval(iv);+ }, [refresh]);++ const resolve = async (id: string, approve: boolean) => {+ setBusy(id);+ try {+ await window.cth.hiveResolveApproval(id, approve, notes[id]?.trim() || undefined);+ setItems((xs) => xs.filter((x) => x.id !== id));+ setNotes((n) => { const { [id]: _drop, ...rest } = n; void _drop; return rest; });+ } finally {+ setBusy(null);+ }+ };++ if (items.length === 0) return null;++ return (+ <div style={{ position: 'absolute', top: 12, right: 12, width: 340, zIndex: 40 }}>+ <PixelPanel variant="dialog" title={`APPROVALS · ${items.length}`} noPadding>+ <div style={{ display: 'flex', flexDirection: 'column', gap: 10, padding: 12, maxHeight: '60vh', overflowY: 'auto' }}>+ {items.map((m) => (+ <div+ key={m.id}+ style={{+ background: 'var(--cth-paper-100)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ padding: 10,+ display: 'flex',+ flexDirection: 'column',+ gap: 6+ }}+ >+ <div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 8, color: 'var(--cth-ink-500)', textTransform: 'uppercase' }}>+ {m.from} → {m.to} · {m.act}+ </div>+ <div style={{ fontSize: 14, fontWeight: 600, color: 'var(--cth-ink-900)' }}>{m.subject || '(no subject)'}</div>+ {m.body && (+ <div style={{ fontSize: 13, color: 'var(--cth-ink-700)', maxHeight: 80, overflowY: 'auto', whiteSpace: 'pre-wrap' }}>+ {m.body}+ </div>+ )}+ <input+ value={notes[m.id] ?? ''}+ onChange={(e) => setNotes((n) => ({ ...n, [m.id]: e.target.value }))}+ placeholder="reply / note to the agent (optional)"+ style={{+ width: '100%',+ padding: '5px 7px 3px',+ background: 'var(--cth-cream-100)',+ border: 'none',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 13,+ color: 'var(--cth-ink-900)',+ outline: 'none'+ }}+ />+ <div style={{ display: 'flex', gap: 6, justifyContent: 'flex-end' }}>+ <PixelButton variant="ghost" size="sm" onClick={() => resolve(m.id, false)} disabled={busy === m.id}>+ reject+ </PixelButton>+ <PixelButton variant="primary" size="sm" onClick={() => resolve(m.id, true)} disabled={busy === m.id}>+ approve+ </PixelButton>+ </div>+ </div>+ ))}+ </div>+ </PixelPanel>+ </div>+ );+}diff --git a/src/renderer/src/components/BlockedBanner.tsx b/src/renderer/src/components/BlockedBanner.tsxnew file mode 100644index 00000000..58634b3d--- /dev/null+++ b/src/renderer/src/components/BlockedBanner.tsx@@ -0,0 +1,74 @@+import { PixelButton } from './PixelButton';+import { Icon } from './Icon';+import type { BlockReason } from '@/store/store';++export interface BlockedBannerProps {+ reason: BlockReason;+ onAction: (label: string, send?: string) => void;+}++export function BlockedBanner({ reason, onAction }: BlockedBannerProps) {+ return (+ <div style={{+ background: 'var(--cth-coral-light)',+ boxShadow: 'inset 0 0 0 2px var(--cth-ink-900), inset 0 0 0 4px var(--cth-coral)',+ padding: 12,+ display: 'flex',+ flexDirection: 'column',+ gap: 8+ }}>+ <div style={{+ display: 'flex', alignItems: 'center', gap: 8,+ fontFamily: 'var(--cth-font-display)',+ fontSize: 8, lineHeight: '12px',+ color: 'var(--cth-ink-900)',+ textTransform: 'uppercase'+ }}>+ <Icon name="bell" /> needs you+ </div>+ <div style={{+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 16,+ lineHeight: '20px',+ color: 'var(--cth-ink-900)'+ }}>+ {reason.summary}+ </div>+ <div style={{+ fontSize: 14,+ lineHeight: '18px',+ color: 'var(--cth-ink-700)'+ }}>+ {reason.detail}+ </div>+ {reason.command && (+ <div style={{+ fontFamily: 'var(--cth-font-mono)',+ fontSize: 14,+ lineHeight: '18px',+ color: 'var(--cth-ink-900)',+ background: 'var(--cth-paper-100)',+ padding: '4px 8px',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ whiteSpace: 'nowrap',+ overflow: 'hidden',+ textOverflow: 'ellipsis'+ }}>+ $ {reason.command}+ </div>+ )}+ <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>+ {reason.actions.map((a) => (+ <PixelButton+ key={a.label}+ variant={a.kind === 'approve' ? 'primary' : a.kind === 'deny' ? 'destructive' : 'secondary'}+ size="sm"+ onClick={() => onAction(a.label, a.send)}+ >+ {a.label}+ </PixelButton>+ ))}+ </div>+ </div>+ );+}diff --git a/src/renderer/src/components/CodeEditor.tsx b/src/renderer/src/components/CodeEditor.tsxnew file mode 100644index 00000000..efd24757--- /dev/null+++ b/src/renderer/src/components/CodeEditor.tsx@@ -0,0 +1,271 @@+import { useEffect, useMemo, useState, useCallback } from 'react';+import CodeMirror from '@uiw/react-codemirror';+import { EditorView } from '@codemirror/view';+import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';+import { tags } from '@lezer/highlight';+import { javascript } from '@codemirror/lang-javascript';+import { json } from '@codemirror/lang-json';+import { markdown } from '@codemirror/lang-markdown';+import { python } from '@codemirror/lang-python';+import { html } from '@codemirror/lang-html';+import { css } from '@codemirror/lang-css';+import { yaml } from '@codemirror/lang-yaml';+import { Icon } from './Icon';+import { PixelButton } from './PixelButton';++// ─── Theme matching CTH palette ─────────────────────────────────────────────+const cthEditorTheme = EditorView.theme({+ '&': {+ background: '#FCFAF0',+ color: '#1A1320',+ height: '100%',+ fontFamily: 'VT323, "JetBrains Mono", monospace',+ fontSize: '16px'+ },+ '.cm-content': { caretColor: '#FF6B6B', padding: '8px 0' },+ '.cm-cursor, .cm-dropCursor': { borderLeftColor: '#FF6B6B', borderLeftWidth: '2px' },+ '.cm-scroller': { fontFamily: 'inherit', overflow: 'auto' },+ '.cm-gutters': {+ background: '#F0EAD2',+ color: '#6B5878',+ borderRight: '1px solid #D9CFE0'+ },+ '.cm-activeLineGutter': { background: '#FFEC99' },+ '.cm-activeLine': { background: 'rgba(255, 217, 61, 0.10)' },+ '.cm-selectionBackground, ::selection': { background: '#FFEC99 !important' },+ '.cm-searchMatch': { background: '#A8E6E0', outline: '1px solid #1A1320' },+ '.cm-searchMatch.cm-searchMatch-selected': { background: '#FFD93D' }+}, { dark: false });++const cthSyntax = HighlightStyle.define([+ { tag: tags.keyword, color: '#B197FC' },+ { tag: tags.operator, color: '#6B5878' },+ { tag: [tags.string, tags.regexp], color: '#6BCF7F' },+ { tag: [tags.number, tags.bool, tags.null], color: '#FF6B6B' },+ { tag: tags.comment, color: '#6B5878', fontStyle: 'italic' },+ { tag: tags.variableName, color: '#1A1320' },+ { tag: tags.function(tags.variableName), color: '#FFA07A' },+ { tag: [tags.typeName, tags.className], color: '#4ECDC4' },+ { tag: tags.propertyName, color: '#3D2E4A' },+ { tag: tags.heading, color: '#1A1320', fontWeight: 'bold' as any },+ { tag: tags.link, color: '#4ECDC4', textDecoration: 'underline' as any },+ { tag: tags.meta, color: '#6B5878' }+]);++function extensionsFor(filename: string) {+ const ext = filename.split('.').pop()?.toLowerCase() ?? '';+ if (['ts', 'tsx'].includes(ext)) return [javascript({ jsx: true, typescript: true })];+ if (['js', 'jsx', 'mjs', 'cjs'].includes(ext)) return [javascript({ jsx: ext.endsWith('x') })];+ if (ext === 'json') return [json()];+ if (['md', 'markdown'].includes(ext)) return [markdown()];+ if (ext === 'py') return [python()];+ if (['html', 'htm'].includes(ext)) return [html()];+ if (ext === 'css') return [css()];+ if (['yml', 'yaml'].includes(ext)) return [yaml()];+ return [];+}++export interface CodeEditorProps {+ root: string;+ /** Relative file path within `root` */+ filePath: string | null;+ fullscreen?: boolean;+ onToggleFullscreen?: () => void;+ onCopyPath?: () => void;+}++export function CodeEditor({+ root, filePath, fullscreen, onToggleFullscreen, onCopyPath+}: CodeEditorProps) {+ const [content, setContent] = useState<string>('');+ const [originalContent, setOriginalContent] = useState<string>('');+ const [loading, setLoading] = useState(false);+ const [error, setError] = useState<string | undefined>();+ const [absPath, setAbsPath] = useState<string | undefined>();+ const [saveState, setSaveState] = useState<'idle' | 'saving' | 'saved' | 'error'>('idle');++ // Load file on path change+ useEffect(() => {+ let cancelled = false;+ if (!filePath) {+ setContent(''); setOriginalContent(''); setError(undefined);+ setAbsPath(undefined);+ return;+ }+ setLoading(true);+ setError(undefined);+ window.cth.readFile(root, filePath).then(res => {+ if (cancelled) return;+ setLoading(false);+ if (res.ok) {+ setContent(res.content);+ setOriginalContent(res.content);+ setAbsPath(res.path);+ } else {+ setContent('');+ setOriginalContent('');+ setAbsPath(undefined);+ setError(res.error);+ }+ });+ return () => { cancelled = true; };+ }, [root, filePath]);++ const dirty = content !== originalContent;++ const save = useCallback(async () => {+ if (!filePath || !dirty) return;+ setSaveState('saving');+ const res = await window.cth.writeFile(root, filePath, content);+ if (res.ok) {+ setOriginalContent(content);+ setSaveState('saved');+ setTimeout(() => setSaveState('idle'), 1200);+ } else {+ setSaveState('error');+ setError(res.error);+ setTimeout(() => setSaveState('idle'), 4000);+ }+ }, [filePath, dirty, content, root]);++ // Cmd-S to save+ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if ((e.metaKey || e.ctrlKey) && e.key === 's') {+ e.preventDefault();+ save();+ }+ };+ window.addEventListener('keydown', onKey);+ return () => window.removeEventListener('keydown', onKey);+ }, [save]);++ const extensions = useMemo(+ () => [cthEditorTheme, syntaxHighlighting(cthSyntax), ...(filePath ? extensionsFor(filePath) : [])],+ [filePath]+ );++ if (!filePath) {+ return (+ <div style={{+ height: '100%', display: 'flex', flexDirection: 'column',+ alignItems: 'center', justifyContent: 'center', gap: 12,+ background: 'var(--cth-paper-200)',+ textAlign: 'center'+ }}>+ <div style={{ opacity: 0.5 }}>+ <Icon name="code" size={2} />+ </div>+ <div style={{+ fontFamily: 'var(--cth-font-display)', fontSize: 8, lineHeight: '14px',+ textTransform: 'uppercase', letterSpacing: 1,+ color: 'var(--cth-ink-700)'+ }}>+ No file open+ </div>+ <div style={{+ fontFamily: 'var(--cth-font-ui)', fontSize: 14,+ color: 'var(--cth-ink-500)'+ }}>+ Pick a file from the tree to view it here.+ </div>+ </div>+ );+ }++ return (+ <div style={{+ height: '100%',+ display: 'flex', flexDirection: 'column',+ background: 'var(--cth-paper-100)'+ }}>+ {/* Mini header */}+ <div style={{+ display: 'flex', alignItems: 'center', gap: 6,+ padding: '4px 8px',+ background: 'var(--cth-cream-200)',+ borderBottom: '1px solid var(--cth-ink-700)',+ fontFamily: 'var(--cth-font-ui)', fontSize: 13,+ color: 'var(--cth-ink-700)'+ }}>+ <Icon name="code" />+ <span style={{+ flex: 1, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'+ }} title={absPath}>{filePath}{dirty && ' •'}</span>+ {onCopyPath && (+ <button+ onClick={onCopyPath}+ title="Copy absolute path"+ style={editorBtn}+ >copy path</button>+ )}+ <button+ onClick={save}+ disabled={!dirty || saveState === 'saving'}+ title="Save (Cmd-S)"+ style={{ ...editorBtn, opacity: dirty ? 1 : 0.5 }}+ >+ {saveState === 'saving' ? '...' : saveState === 'saved' ? 'saved' : saveState === 'error' ? 'err' : 'save'}+ </button>+ {onToggleFullscreen && (+ <button+ onClick={onToggleFullscreen}+ title={fullscreen ? 'Exit fullscreen (Esc)' : 'Fullscreen'}+ style={editorBtn}+ >+ <Icon name={fullscreen ? 'minimize' : 'expand'} />+ </button>+ )}+ </div>++ {/* Body */}+ <div style={{ flex: 1, minHeight: 0, overflow: 'hidden' }}>+ {loading ? (+ <div style={{ padding: 12, color: 'var(--cth-ink-500)' }}>loading…</div>+ ) : error ? (+ <div style={{ padding: 12, color: 'var(--cth-coral)' }}>{error}</div>+ ) : (+ <CodeMirror+ value={content}+ onChange={(v) => setContent(v)}+ extensions={extensions}+ height="100%"+ theme="light"+ basicSetup={{+ lineNumbers: true,+ highlightActiveLine: true,+ foldGutter: true,+ autocompletion: false+ }}+ />+ )}+ </div>++ {/* Footer actions when fullscreen */}+ {fullscreen && (+ <div style={{+ padding: 8, borderTop: '1px solid var(--cth-ink-700)',+ background: 'var(--cth-cream-200)',+ display: 'flex', justifyContent: 'flex-end', gap: 8+ }}>+ <PixelButton variant="secondary" size="sm" onClick={onToggleFullscreen}>+ <span style={{ display: 'inline-flex', gap: 4, alignItems: 'center' }}>+ <Icon name="minimize" /> exit fullscreen+ </span>+ </PixelButton>+ </div>+ )}+ </div>+ );+}++const editorBtn: React.CSSProperties = {+ padding: '0 6px', height: 22,+ fontFamily: 'var(--cth-font-ui)', fontSize: 12,+ color: 'var(--cth-ink-900)',+ background: 'var(--cth-cream-100)',+ border: 'none',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ cursor: 'pointer',+ display: 'inline-flex', alignItems: 'center', gap: 4+};diff --git a/src/renderer/src/components/CommandBar.tsx b/src/renderer/src/components/CommandBar.tsxnew file mode 100644index 00000000..bc5193ab--- /dev/null+++ b/src/renderer/src/components/CommandBar.tsx@@ -0,0 +1,101 @@+import { useState, KeyboardEvent } from 'react';+import { PixelPanel } from './PixelPanel';+import { PixelButton } from './PixelButton';+import { Icon } from './Icon';+import { AccentColorName } from '@/design/tokens';++type Mode = 'free' | 'slash' | 'quick';++export interface CommandBarProps {+ accent: AccentColorName;+ busy?: boolean;+ blocked?: boolean;+ onSend?: (text: string) => void;+}++export function CommandBar({ accent, busy, blocked, onSend }: CommandBarProps) {+ const [mode, setMode] = useState<Mode>('free');+ const [text, setText] = useState('');++ const send = () => {+ if (!text.trim()) return;+ onSend?.(text);+ setText('');+ };++ const onKey = (e: KeyboardEvent<HTMLInputElement>) => {+ if (e.key === 'Enter' && !e.shiftKey) {+ e.preventDefault();+ send();+ }+ };++ const inputBorder = blocked+ ? 'var(--cth-coral)'+ : busy+ ? 'var(--cth-lemon)'+ : 'var(--cth-ink-700)';++ return (+ <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>+ <div style={{ display: 'flex', gap: 4 }}>+ {(['free', 'slash', 'quick'] as Mode[]).map(m => (+ <button+ key={m}+ onClick={() => setMode(m)}+ style={{+ padding: '4px 10px 2px',+ border: 'none',+ background: mode === m ? `var(--cth-${accent})` : 'var(--cth-cream-200)',+ color: 'var(--cth-ink-900)',+ boxShadow: mode === m+ ? 'inset 0 0 0 1px var(--cth-ink-900), 0 -2px 0 var(--cth-ink-900) inset'+ : 'inset 0 0 0 1px var(--cth-ink-700)',+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 14,+ cursor: 'pointer'+ }}+ >+ {m === 'free' ? 'free' : m === 'slash' ? '/skill' : 'quick'}+ </button>+ ))}+ </div>+ <PixelPanel variant="inset" noPadding style={{ padding: 6 }}>+ <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>+ <span style={{+ fontFamily: 'var(--cth-font-mono)',+ fontSize: 18,+ color: `var(--cth-${accent})`,+ lineHeight: '20px',+ paddingLeft: 2+ }}>{'>'}</span>+ <input+ value={text}+ onChange={e => setText(e.target.value)}+ onKeyDown={onKey}+ placeholder={blocked ? "Ada needs you..." : busy ? "Ada is working..." : "Type a command"}+ style={{+ flex: 1,+ padding: '4px 6px 2px',+ background: 'var(--cth-paper-100)',+ border: 'none',+ boxShadow: `inset 0 0 0 1px ${inputBorder}`,+ fontFamily: 'var(--cth-font-mono)',+ fontSize: 18,+ lineHeight: '20px',+ color: 'var(--cth-ink-900)',+ outline: 'none'+ }}+ />+ <PixelButton variant="primary" size="md" onClick={send}>+ <span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>+ send <Icon name="arrow-right" />+ </span>+ </PixelButton>+ </div>+ </PixelPanel>+ {busy && <span style={{ fontSize: 13, color: 'var(--cth-ink-500)' }}>Ada is mid-tool. Queue or hit pause.</span>}+ {blocked && <span style={{ fontSize: 13, color: 'var(--cth-coral)' }}>Approval needed.</span>}+ </div>+ );+}diff --git a/src/renderer/src/components/FileTree.tsx b/src/renderer/src/components/FileTree.tsxnew file mode 100644index 00000000..f5d9c69a--- /dev/null+++ b/src/renderer/src/components/FileTree.tsx@@ -0,0 +1,185 @@+import { useCallback, useEffect, useState } from 'react';+import { Icon } from './Icon';++interface DirEntry {+ name: string;+ isDir: boolean;+ size: number;+ mtime: number;+}++interface NodeState {+ rel: string; // relative to root; '' for root+ name: string;+ isDir: boolean;+ expanded: boolean;+ children?: NodeState[]; // loaded lazily+ loading?: boolean;+ error?: string;+}++export interface FileTreeProps {+ root: string;+ /** Active file (relative path, no leading slash) */+ activeRel?: string;+ onOpenFile: (rel: string) => void;+ onCopyPath: (rel: string) => void;+}++function fmtSize(n: number): string {+ if (n < 1024) return `${n}B`;+ if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)}K`;+ return `${(n / 1024 / 1024).toFixed(1)}M`;+}++const HIDE_PATTERNS = [/^\.git$/, /^node_modules$/, /^out$/, /^dist$/];++export function FileTree({ root, activeRel, onOpenFile, onCopyPath }: FileTreeProps) {+ const [tree, setTree] = useState<NodeState>({+ rel: '', name: 'root', isDir: true, expanded: true+ });++ const loadDir = useCallback(async (rel: string) => {+ const res = await window.cth.listDir(root, rel);+ if (!res.ok) return { error: res.error };+ const filtered = res.entries.filter(e => !HIDE_PATTERNS.some(re => re.test(e.name)));+ return { children: filtered.map((e: DirEntry): NodeState => ({+ rel: rel ? `${rel}/${e.name}` : e.name,+ name: e.name,+ isDir: e.isDir,+ expanded: false+ })) };+ }, [root]);++ // Initial root load+ useEffect(() => {+ let cancelled = false;+ (async () => {+ const res = await loadDir('');+ if (cancelled) return;+ setTree(prev => ({ ...prev, ...res }));+ })();+ return () => { cancelled = true; };+ }, [loadDir]);++ /** Update a node deep in the tree by rel path. */+ const updateNode = useCallback((rel: string, patch: Partial<NodeState> | ((n: NodeState) => Partial<NodeState>)) => {+ setTree(prev => {+ const apply = (node: NodeState): NodeState => {+ if (node.rel === rel) {+ const p = typeof patch === 'function' ? patch(node) : patch;+ return { ...node, ...p };+ }+ if (!node.children) return node;+ return { ...node, children: node.children.map(apply) };+ };+ return apply(prev);+ });+ }, []);++ const toggle = useCallback(async (node: NodeState) => {+ if (!node.isDir) {+ onOpenFile(node.rel);+ return;+ }+ if (node.expanded) {+ updateNode(node.rel, { expanded: false });+ return;+ }+ // Expand: load if not already loaded+ if (!node.children) {+ updateNode(node.rel, { expanded: true, loading: true });+ const res = await loadDir(node.rel);+ if ('error' in res && res.error) {+ updateNode(node.rel, { loading: false, error: res.error });+ return;+ }+ updateNode(node.rel, { loading: false, error: undefined, children: res.children });+ } else {+ updateNode(node.rel, { expanded: true });+ }+ }, [loadDir, onOpenFile, updateNode]);++ const renderNode = (node: NodeState, depth: number): React.ReactNode => {+ if (node.rel === '' && depth === 0) {+ // Render children of root only+ return (+ <div>+ {node.children?.map(c => renderNode(c, 0))}+ {node.loading && <div style={{ padding: 8, fontSize: 13, color: 'var(--cth-ink-500)' }}>loading…</div>}+ {node.error && <div style={{ padding: 8, fontSize: 13, color: 'var(--cth-coral)' }}>{node.error}</div>}+ </div>+ );+ }+ const isActive = activeRel === node.rel;+ return (+ <div key={node.rel}>+ <div+ onClick={() => toggle(node)}+ style={{+ display: 'flex', alignItems: 'center', gap: 4,+ padding: '2px 6px',+ paddingLeft: 6 + depth * 14,+ background: isActive ? 'var(--cth-lemon-light)' : 'transparent',+ cursor: 'pointer',+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 13,+ color: 'var(--cth-ink-900)',+ userSelect: 'none'+ }}+ >+ {node.isDir ? (+ <span style={{+ width: 10, display: 'inline-block', textAlign: 'center',+ fontFamily: 'var(--cth-font-mono)', color: 'var(--cth-ink-700)'+ }}>+ {node.expanded ? '▾' : '▸'}+ </span>+ ) : (+ <span style={{ width: 10, display: 'inline-block' }} />+ )}+ <Icon name={node.isDir ? 'folder' : 'code'} />+ <span style={{+ flex: 1, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap'+ }}>{node.name}</span>+ <button+ onClick={(e) => { e.stopPropagation(); onCopyPath(node.rel); }}+ title="Copy path to clipboard"+ style={{+ padding: '0 4px',+ fontSize: 10,+ fontFamily: 'var(--cth-font-ui)',+ color: 'var(--cth-ink-500)',+ background: 'transparent', border: 'none', cursor: 'pointer'+ }}+ >copy</button>+ </div>+ {node.isDir && node.expanded && (+ <div>+ {node.loading && (+ <div style={{ padding: '2px 6px', paddingLeft: 24 + depth * 14, fontSize: 12, color: 'var(--cth-ink-500)' }}>+ loading…+ </div>+ )}+ {node.error && (+ <div style={{ padding: '2px 6px', paddingLeft: 24 + depth * 14, fontSize: 12, color: 'var(--cth-coral)' }}>+ {node.error}+ </div>+ )}+ {node.children?.map(c => renderNode(c, depth + 1))}+ </div>+ )}+ </div>+ );+ };++ return (+ <div style={{+ overflow: 'auto', height: '100%',+ background: 'var(--cth-cream-50)',+ paddingTop: 4+ }}>+ {renderNode(tree, 0)}+ </div>+ );+}diff --git a/src/renderer/src/components/FilesTab.tsx b/src/renderer/src/components/FilesTab.tsxnew file mode 100644index 00000000..f97f821a--- /dev/null+++ b/src/renderer/src/components/FilesTab.tsx@@ -0,0 +1,99 @@+import { useEffect, useRef, useState } from 'react';+import { FileTree } from './FileTree';+import { CodeEditor } from './CodeEditor';+import { useStore } from '@/store/store';++export interface FilesTabProps {+ cwd: string;+}++function joinAbs(cwd: string, rel: string): string {+ return rel ? `${cwd}/${rel}` : cwd;+}++export function FilesTab({ cwd }: FilesTabProps) {+ const setFullscreenFile = useStore(s => s.setFullscreenFile);+ const [active, setActive] = useState<string | null>(null);+ const [treeWidth, setTreeWidth] = useState<number>(200);+ const dragRef = useRef<{ x: number; w: number } | null>(null);++ // Drag the inner splitter+ useEffect(() => {+ const onMove = (e: MouseEvent) => {+ if (!dragRef.current) return;+ const delta = e.clientX - dragRef.current.x;+ setTreeWidth(Math.min(420, Math.max(140, dragRef.current.w + delta)));+ };+ const onUp = () => {+ dragRef.current = null;+ document.body.style.cursor = '';+ window.removeEventListener('mousemove', onMove);+ window.removeEventListener('mouseup', onUp);+ };+ return () => {+ window.removeEventListener('mousemove', onMove);+ window.removeEventListener('mouseup', onUp);+ };+ }, []);++ const onCopyPath = (rel: string) => {+ const abs = joinAbs(cwd, rel);+ navigator.clipboard.writeText(abs).catch(() => { /* noop */ });+ };++ const onOpenFullscreen = () => {+ if (!active) return;+ setFullscreenFile(joinAbs(cwd, active));+ };++ return (+ <div style={{ flex: 1, minWidth: 0, height: '100%', minHeight: 0, display: 'flex', background: 'var(--cth-paper-100)' }}>+ <div style={{+ width: treeWidth, flexShrink: 0,+ height: '100%', minHeight: 0, overflow: 'hidden',+ borderRight: '1px solid var(--cth-ink-700)'+ }}>+ <FileTree+ root={cwd}+ activeRel={active ?? undefined}+ onOpenFile={(rel) => setActive(rel)}+ onCopyPath={onCopyPath}+ />+ </div>+ {/* Inner divider */}+ <div+ onMouseDown={(e) => {+ dragRef.current = { x: e.clientX, w: treeWidth };+ document.body.style.cursor = 'ew-resize';+ const onMove = (ev: MouseEvent) => {+ if (!dragRef.current) return;+ const delta = ev.clientX - dragRef.current.x;+ setTreeWidth(Math.min(420, Math.max(140, dragRef.current.w + delta)));+ };+ const onUp = () => {+ dragRef.current = null;+ document.body.style.cursor = '';+ window.removeEventListener('mousemove', onMove);+ window.removeEventListener('mouseup', onUp);+ };+ window.addEventListener('mousemove', onMove);+ window.addEventListener('mouseup', onUp);+ e.preventDefault();+ }}+ style={{+ width: 4, cursor: 'ew-resize', flexShrink: 0,+ background: 'var(--cth-ink-300)'+ }}+ />+ <div style={{ flex: 1, minWidth: 0, minHeight: 0 }}>+ <CodeEditor+ root={cwd}+ filePath={active}+ fullscreen={false}+ onToggleFullscreen={onOpenFullscreen}+ onCopyPath={active ? () => onCopyPath(active) : undefined}+ />+ </div>+ </div>+ );+}diff --git a/src/renderer/src/components/FullscreenFileEditor.tsx b/src/renderer/src/components/FullscreenFileEditor.tsxnew file mode 100644index 00000000..387d873d--- /dev/null+++ b/src/renderer/src/components/FullscreenFileEditor.tsx@@ -0,0 +1,70 @@+import { useEffect } from 'react';+import { CodeEditor } from './CodeEditor';+import { useStore } from '@/store/store';++/**+ * Full-window overlay editor. The absolute file path is in store; we derive+ * root + rel by trying registered repos / agent cwds.+ */+export function FullscreenFileEditor() {+ const fullscreenFilePath = useStore(s => s.fullscreenFilePath);+ const setFullscreenFile = useStore(s => s.setFullscreenFile);+ const agents = useStore(s => s.agents);++ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if (e.key === 'Escape') { e.preventDefault(); setFullscreenFile(null); }+ };+ window.addEventListener('keydown', onKey);+ return () => window.removeEventListener('keydown', onKey);+ }, [setFullscreenFile]);++ if (!fullscreenFilePath) return null;++ // Find the agent cwd that's a prefix of this path. Falls back to using the+ // file's parent dir as the root so we can still read it.+ const matchedAgent = agents.find(a => fullscreenFilePath.startsWith(a.cwd + '/') || fullscreenFilePath === a.cwd);+ const root = matchedAgent?.cwd ?? fullscreenFilePath.replace(/\/[^/]+$/, '');+ const rel = matchedAgent+ ? fullscreenFilePath.slice(matchedAgent.cwd.length + 1)+ : fullscreenFilePath.split('/').pop() ?? fullscreenFilePath;++ const copyPath = () => {+ navigator.clipboard.writeText(fullscreenFilePath).catch(() => { /* noop */ });+ };++ return (+ <div style={{+ position: 'fixed', inset: 0,+ background: 'var(--cth-cream-100)',+ zIndex: 280,+ display: 'flex', flexDirection: 'column',+ paddingTop: 36+ }}>+ <div+ className="cth-titlebar-drag"+ style={{+ position: 'absolute', top: 0, left: 0, right: 0, height: 36,+ background: 'linear-gradient(180deg, var(--cth-cream-100) 0%, var(--cth-cream-200) 100%)',+ borderBottom: '2px solid var(--cth-ink-900)',+ display: 'flex', alignItems: 'center',+ paddingLeft: 96, paddingRight: 12, gap: 12,+ userSelect: 'none',+ fontFamily: 'var(--cth-font-display)', fontSize: 12, lineHeight: '20px',+ color: 'var(--cth-ink-900)'+ }}+ >+ CLAUDE TERMINAL HARNESS · FILE+ </div>+ <div style={{ flex: 1, minHeight: 0 }}>+ <CodeEditor+ root={root}+ filePath={rel}+ fullscreen+ onToggleFullscreen={() => setFullscreenFile(null)}+ onCopyPath={copyPath}+ />+ </div>+ </div>+ );+}diff --git a/src/renderer/src/components/FullscreenTerminal.tsx b/src/renderer/src/components/FullscreenTerminal.tsxnew file mode 100644index 00000000..99675b93--- /dev/null+++ b/src/renderer/src/components/FullscreenTerminal.tsx@@ -0,0 +1,213 @@+import { useEffect } from 'react';+import { PixelBadge } from './PixelBadge';+import { PixelButton } from './PixelButton';+import { PtyTerminalView } from './PtyTerminalView';+import { disposeTerminal } from './terminalPool';+import { Icon } from './Icon';+import { SpritePortrait } from './SpritePortrait';+import { useStore, type Agent } from '@/store/store';+import { usePtyParser } from '@/hooks/usePtyParser';++export function FullscreenTerminal() {+ const agents = useStore(s => s.agents);+ const fullscreenAgentId = useStore(s => s.fullscreenAgentId);+ const setFullscreen = useStore(s => s.setFullscreen);+ const select = useStore(s => s.select);+ const setAddAgentOpen = useStore(s => s.setAddAgentOpen);+ const removeAgent = useStore(s => s.removeAgent);+ const updateAgent = useStore(s => s.updateAgent);++ const agent = agents.find(a => a.id === fullscreenAgentId);+ const parser = usePtyParser(agent?.id ?? '__none__');++ // Esc exits fullscreen+ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if (e.key === 'Escape') {+ e.preventDefault();+ setFullscreen(null);+ }+ };+ window.addEventListener('keydown', onKey);+ return () => window.removeEventListener('keydown', onKey);+ }, [setFullscreen]);++ if (!agent || !agent.ptyId) {+ // Bail out — no real agent to show+ setFullscreen(null);+ return null;+ }++ const onKill = async () => {+ if (!agent.ptyId) return;+ if (!confirm(`Kill ${agent.name}? The PTY process will terminate.`)) return;+ await window.cth.killPty(agent.ptyId);+ disposeTerminal(agent.ptyId);+ removeAgent(agent.id);+ setFullscreen(null);+ };++ return (+ <div style={{+ position: 'fixed', inset: 0,+ background: 'var(--cth-cream-100)',+ zIndex: 250,+ display: 'flex',+ flexDirection: 'column',+ paddingTop: 36 // leave room for macOS traffic lights / drag region+ }}>+ {/* Title bar drag region (so the user can still move the window) */}+ <div+ className="cth-titlebar-drag"+ style={{+ position: 'absolute', top: 0, left: 0, right: 0, height: 36,+ background: 'linear-gradient(180deg, var(--cth-cream-100) 0%, var(--cth-cream-200) 100%)',+ borderBottom: '2px solid var(--cth-ink-900)',+ display: 'flex', alignItems: 'center',+ paddingLeft: 96, paddingRight: 12, gap: 12,+ userSelect: 'none'+ }}+ >+ <span style={{+ fontFamily: 'var(--cth-font-display)', fontSize: 12, lineHeight: '20px',+ color: 'var(--cth-ink-900)'+ }}>CLAUDE TERMINAL HARNESS · FULLSCREEN</span>+ </div>++ {/* Tabs */}+ <div style={{+ display: 'flex', alignItems: 'flex-end',+ gap: 4, padding: '8px 12px 0',+ background: 'var(--cth-cream-200)',+ borderBottom: '2px solid var(--cth-ink-900)',+ overflowX: 'auto'+ }}>+ {agents.map(a => (+ <Tab+ key={a.id}+ agent={a}+ active={a.id === agent.id}+ onClick={() => { select(a.id); setFullscreen(a.id); }}+ />+ ))}+ <button+ onClick={() => setAddAgentOpen(true)}+ title="Add agent"+ style={{+ height: 32, padding: '0 10px', marginBottom: 4,+ background: 'var(--cth-cream-100)',+ border: 'none',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ fontFamily: 'var(--cth-font-ui)', fontSize: 14,+ color: 'var(--cth-ink-900)',+ display: 'inline-flex', alignItems: 'center', gap: 4,+ cursor: 'pointer'+ }}+ >+ <Icon name="plus" /> agent+ </button>+ <div style={{ marginLeft: 'auto', display: 'flex', alignItems: 'center', gap: 6, paddingBottom: 6 }}>+ <PixelButton variant="destructive" size="sm" onClick={onKill}>+ <span style={{ display: 'inline-flex', gap: 4, alignItems: 'center' }}>+ <Icon name="x" /> kill+ </span>+ </PixelButton>+ <PixelButton variant="secondary" size="sm" onClick={() => setFullscreen(null)}>+ <span style={{ display: 'inline-flex', gap: 4, alignItems: 'center' }}>+ <Icon name="minimize" /> exit (esc)+ </span>+ </PixelButton>+ </div>+ </div>++ {/* Body */}+ <div style={{+ flex: 1, minHeight: 0,+ display: 'flex', flexDirection: 'column',+ padding: 12, gap: 10+ }}>+ <Header agent={agent} />++ <div style={{ flex: 1, minHeight: 0, display: 'flex' }}>+ <PtyTerminalView+ key={agent.ptyId}+ ptyId={agent.ptyId}+ onStreamData={parser}+ onUserPrompt={(t) => updateAgent(agent.id, { lastPrompt: t })}+ onToggleFullscreen={() => setFullscreen(null)}+ fullscreen+ />+ </div>+ </div>+ </div>+ );+}++function Tab({ agent, active, onClick }: { agent: Agent; active: boolean; onClick: () => void }) {+ return (+ <button+ onClick={onClick}+ title={`${agent.name} · ${agent.project}`}+ style={{+ height: active ? 38 : 32,+ padding: '0 10px',+ marginBottom: active ? 0 : 4,+ background: active ? 'var(--cth-cream-100)' : 'var(--cth-cream-300)',+ border: 'none',+ boxShadow: active+ ? 'inset 0 0 0 2px var(--cth-ink-900), inset 0 -3px 0 var(--cth-cream-100)'+ : 'inset 0 0 0 1px var(--cth-ink-700)',+ display: 'inline-flex', alignItems: 'center', gap: 8,+ cursor: 'pointer',+ position: 'relative',+ fontFamily: 'var(--cth-font-ui)', fontSize: 14,+ color: 'var(--cth-ink-900)',+ maxWidth: 240,+ whiteSpace: 'nowrap'+ }}+ >+ <div style={{+ width: 20, height: 32,+ background: `var(--cth-${agent.accent}-light)`,+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)',+ display: 'flex', alignItems: 'flex-end', justifyContent: 'center',+ overflow: 'hidden'+ }}>+ <SpritePortrait character={agent.character} scale={1} />+ </div>+ <span style={{+ overflow: 'hidden', textOverflow: 'ellipsis',+ fontFamily: 'var(--cth-font-display)', fontSize: 8, lineHeight: '12px'+ }}>{agent.name.toUpperCase()}</span>+ <PixelBadge status={agent.status} />+ </button>+ );+}++function Header({ agent }: { agent: Agent }) {+ return (+ <div style={{+ display: 'flex', alignItems: 'center', gap: 12,+ padding: '6px 10px',+ background: 'var(--cth-cream-50)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)'+ }}>+ <span style={{+ fontFamily: 'var(--cth-font-display)', fontSize: 10, lineHeight: '16px',+ color: 'var(--cth-ink-900)'+ }}>{agent.name.toUpperCase()}</span>+ <span style={{+ fontSize: 13, color: 'var(--cth-ink-500)',+ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis',+ maxWidth: 300+ }}>{agent.cwd}</span>+ <span style={{+ fontSize: 13, color: 'var(--cth-ink-700)',+ fontStyle: 'italic'+ }}>“{agent.description}”</span>+ <div style={{ marginLeft: 'auto' }}>+ <PixelBadge status={agent.status} />+ </div>+ </div>+ );+}diff --git a/src/renderer/src/components/GitTab.tsx b/src/renderer/src/components/GitTab.tsxnew file mode 100644index 00000000..35b886b7--- /dev/null+++ b/src/renderer/src/components/GitTab.tsx@@ -0,0 +1,260 @@+import { useEffect, useState } from 'react';+import { CommitGraph } from './git/CommitGraph';+import { PixelButton } from './PixelButton';+import { Icon } from './Icon';++interface GitCommit {+ sha: string;+ shortSha: string;+ parents: string[];+ subject: string;+ author: string;+ time: number;+ refs: string[];+}+interface GitStatusEntry { path: string; index: string; worktree: string }+interface GitStatus { staged: GitStatusEntry[]; unstaged: GitStatusEntry[]; untracked: string[] }++export interface GitTabProps {+ cwd: string;+}++function statusLabel(code: string): string {+ return code === 'M' ? 'modified'+ : code === 'A' ? 'added'+ : code === 'D' ? 'deleted'+ : code === 'R' ? 'renamed'+ : code === '?' ? 'untracked'+ : code === 'U' ? 'unmerged'+ : code === ' ' ? '' : code;+}++function statusColor(code: string): string {+ if (code === 'M') return 'var(--cth-lemon)';+ if (code === 'A') return 'var(--cth-mint)';+ if (code === 'D') return 'var(--cth-coral)';+ if (code === 'R') return 'var(--cth-lilac)';+ if (code === '?') return 'var(--cth-ink-300)';+ return 'var(--cth-ink-500)';+}++export function GitTab({ cwd }: GitTabProps) {+ const [isRepo, setIsRepo] = useState<boolean | null>(null);+ const [branch, setBranch] = useState<string | null>(null);+ const [detached, setDetached] = useState(false);+ const [status, setStatus] = useState<GitStatus | null>(null);+ const [log, setLog] = useState<GitCommit[]>([]);+ const [branches, setBranches] = useState<{ local: string[]; remote: string[] } | null>(null);+ const [ahead, setAhead] = useState(0);+ const [behind, setBehind] = useState(0);+ const [upstream, setUpstream] = useState<string | null>(null);+ const [loading, setLoading] = useState(false);+ const [error, setError] = useState<string | undefined>();++ const refresh = async () => {+ setLoading(true);+ setError(undefined);+ try {+ const repo = await window.cth.gitIsRepo(cwd);+ setIsRepo(repo);+ if (!repo) { setLoading(false); return; }+ const [b, s, l, br, ab] = await Promise.all([+ window.cth.gitBranch(cwd),+ window.cth.gitStatus(cwd),+ window.cth.gitLog(cwd, 100),+ window.cth.gitBranches(cwd),+ window.cth.gitAheadBehind(cwd)+ ]);+ if ('error' in b) setError(b.error);+ else { setBranch(b.current); setDetached(b.detached); }+ if ('error' in s) setError(prev => prev ?? s.error); else setStatus(s);+ if (Array.isArray(l)) setLog(l); else if ('error' in l) setError(prev => prev ?? l.error);+ if ('error' in br) setError(prev => prev ?? br.error); else setBranches({ local: br.local, remote: br.remote });+ if ('error' in ab) { /* keep defaults */ } else { setAhead(ab.ahead); setBehind(ab.behind); setUpstream(ab.upstream); }+ } finally {+ setLoading(false);+ }+ };++ useEffect(() => {+ refresh();+ // Poll the working-tree status every 4s so freshly-edited files show up.+ const id = window.setInterval(refresh, 4000);+ return () => window.clearInterval(id);+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [cwd]);++ if (isRepo === false) {+ return (+ <div style={{+ flex: 1, minWidth: 0,+ height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center',+ padding: 16, textAlign: 'center', color: 'var(--cth-ink-500)',+ fontFamily: 'var(--cth-font-ui)', fontSize: 14+ }}>+ Not a git repo.<br />Run <code style={{ fontFamily: 'var(--cth-font-mono)' }}>git init</code> in the agent's terminal.+ </div>+ );+ }++ return (+ <div style={{+ flex: 1, minWidth: 0,+ height: '100%', minHeight: 0,+ display: 'flex', flexDirection: 'column',+ background: 'var(--cth-paper-100)'+ }}>+ {/* Branch + ahead/behind header */}+ <div style={{+ display: 'flex', alignItems: 'center', gap: 8,+ padding: '6px 10px',+ background: 'var(--cth-cream-200)',+ borderBottom: '1px solid var(--cth-ink-700)'+ }}>+ <span style={{+ fontFamily: 'var(--cth-font-display)', fontSize: 10, lineHeight: '14px',+ padding: '2px 6px',+ background: 'var(--cth-sky-light)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)',+ color: 'var(--cth-ink-900)'+ }}>+ {detached ? 'DETACHED HEAD' : (branch ?? '—')}+ </span>+ {upstream && (+ <span style={{ fontSize: 12, color: 'var(--cth-ink-500)' }}>+ ↑ {ahead} ↓ {behind} · {upstream}+ </span>+ )}+ <div style={{ marginLeft: 'auto' }}>+ <PixelButton variant="ghost" size="sm" onClick={refresh} disabled={loading}>+ {loading ? '...' : 'refresh'}+ </PixelButton>+ </div>+ </div>++ {error && (+ <div style={{+ padding: '4px 10px',+ background: 'var(--cth-coral-light)',+ color: 'var(--cth-ink-900)',+ fontSize: 13,+ borderBottom: '1px solid var(--cth-coral)'+ }}>{error}</div>+ )}++ {/* Body — scrollable, contains status + branches + graph */}+ <div style={{ flex: 1, minHeight: 0, overflow: 'auto' }}>+ {/* Status */}+ <Section title="status">+ {status && (+ <>+ <StatusGroup label="staged" entries={status.staged.map(e => ({ ...e, code: e.index }))} />+ <StatusGroup label="changes" entries={status.unstaged.map(e => ({ ...e, code: e.worktree }))} />+ <StatusGroup label="untracked" entries={status.untracked.map(p => ({ path: p, code: '?' }))} />+ {status.staged.length === 0 && status.unstaged.length === 0 && status.untracked.length === 0 && (+ <div style={{+ padding: '4px 12px', color: 'var(--cth-ink-500)', fontSize: 13+ }}>working tree clean</div>+ )}+ </>+ )}+ </Section>++ {/* Branches */}+ {branches && (branches.local.length > 0 || branches.remote.length > 0) && (+ <Section title="branches">+ <div style={{ padding: '0 8px 8px', display: 'flex', flexWrap: 'wrap', gap: 4 }}>+ {branches.local.map(b => (+ <span key={`l-${b}`} style={{+ padding: '0 6px', fontSize: 12,+ background: b === branch ? 'var(--cth-lemon)' : 'var(--cth-cream-100)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ color: 'var(--cth-ink-900)'+ }}>{b}</span>+ ))}+ {branches.remote.map(b => (+ <span key={`r-${b}`} style={{+ padding: '0 6px', fontSize: 12,+ background: 'var(--cth-cream-100)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)',+ color: 'var(--cth-ink-500)',+ display: 'inline-flex', alignItems: 'center', gap: 4+ }}>+ <span style={{ width: 6, height: 6, background: 'var(--cth-lilac)' }} />+ {b}+ </span>+ ))}+ </div>+ </Section>+ )}++ {/* Graph */}+ <Section title="log">+ {log.length > 0 ? <CommitGraph commits={log} currentBranch={branch} /> : (+ <div style={{ padding: 12, color: 'var(--cth-ink-500)', fontSize: 13 }}>no commits yet</div>+ )}+ </Section>+ </div>+ </div>+ );+}++function Section({ title, children }: { title: string; children: React.ReactNode }) {+ return (+ <div style={{ marginBottom: 4 }}>+ <div style={{+ fontFamily: 'var(--cth-font-display)', fontSize: 8, lineHeight: '12px',+ textTransform: 'uppercase',+ color: 'var(--cth-ink-700)',+ padding: '8px 10px 4px',+ background: 'var(--cth-cream-50)',+ borderBottom: '1px solid var(--cth-ink-100)'+ }}>{title}</div>+ {children}+ </div>+ );+}++function StatusGroup({ label, entries }: {+ label: string;+ entries: Array<{ path: string; code: string }>;+}) {+ if (entries.length === 0) return null;+ return (+ <div style={{ padding: '4px 0' }}>+ <div style={{+ padding: '0 12px', fontSize: 11, color: 'var(--cth-ink-500)',+ textTransform: 'uppercase', letterSpacing: 0+ }}>{label}</div>+ {entries.map(e => (+ <div key={`${label}-${e.path}-${e.code}`} style={{+ display: 'flex', alignItems: 'center', gap: 6,+ padding: '2px 12px',+ fontSize: 13, color: 'var(--cth-ink-900)'+ }}>+ <span style={{+ display: 'inline-block', width: 14, textAlign: 'center',+ fontFamily: 'var(--cth-font-mono)',+ color: statusColor(e.code),+ fontWeight: 'bold' as any+ }}>{e.code === ' ' ? '·' : e.code}</span>+ <span style={{+ flex: 1, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis',+ fontFamily: 'var(--cth-font-mono)', fontSize: 13+ }} title={e.path}>{e.path}</span>+ <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{statusLabel(e.code)}</span>+ <button+ onClick={() => navigator.clipboard.writeText(e.path).catch(() => {})}+ title="Copy path"+ style={{+ padding: 0, background: 'transparent', border: 'none',+ cursor: 'pointer', color: 'var(--cth-ink-500)'+ }}+ >+ <Icon name="folder" />+ </button>+ </div>+ ))}+ </div>+ );+}diff --git a/src/renderer/src/components/Icon.tsx b/src/renderer/src/components/Icon.tsxnew file mode 100644index 00000000..ff809ce4--- /dev/null+++ b/src/renderer/src/components/Icon.tsx@@ -0,0 +1,107 @@+// 16×16 pixel icons. 2 colors max. Integer paths only.+// Add to library by extending `paths` below.++import { CSSProperties } from 'react';++export type IconName =+ | 'gear' | 'plus' | 'x' | 'check' | 'arrow-right' | 'pause' | 'play'+ | 'bell' | 'folder' | 'terminal' | 'code' | 'web' | 'mcp' | 'sparkle'+ | 'expand' | 'minimize';++interface IconDef {+ ink: string; // primary color path d+ accent?: string; // optional accent color path d+ accentColor: string; // CSS var name+}++const paths: Record<IconName, IconDef> = {+ // 16x16 each, designed on pixel grid+ gear: {+ accentColor: 'var(--cth-ink-300)',+ ink: 'M6 1h4v2h1v1h2v1h2v4h-2v1h-1v2h-2v2H6v-2H4v-2H3v-1H1V7h2V6h1V5h2V4h0V1zM7 6v1H6v1H5v1h1v1h1v1h2v-1h1V9h1V8h-1V7h-1V6H7z',+ accent:'M7 6h2v1h1v2h-1v1H7V9H6V7h1V6z'+ },+ plus: {+ accentColor: 'var(--cth-mint)',+ ink: 'M7 2h2v5h5v2H9v5H7V9H2V7h5V2z'+ },+ x: {+ accentColor: 'var(--cth-coral)',+ ink: 'M3 3h2v2h2v2h2V5h2V3h2v2h-2v2h-2v2h2v2h2v2h-2v-2h-2V9H7v2H5v2H3v-2h2v-2h2V7H5V5H3V3z'+ },+ check: {+ accentColor: 'var(--cth-mint)',+ ink: 'M13 4h2v2h-2v2h-2v2H9v2H7v2H5v-2H3v-2H1V8h2v2h2v2h2v-2h2V8h2V6h2V4z'+ },+ 'arrow-right': {+ accentColor: 'var(--cth-sky)',+ ink: 'M8 3h2v2h2v2h2v2h-2v2h-2v2H8v-2h2V9H2V7h8V5H8V3z'+ },+ pause: {+ accentColor: 'var(--cth-lemon)',+ ink: 'M4 3h3v10H4V3zm5 0h3v10H9V3z'+ },+ play: {+ accentColor: 'var(--cth-mint)',+ ink: 'M4 3h2v2h2v2h2v2H8v2H6v2H4V3z'+ },+ bell: {+ accentColor: 'var(--cth-peach)',+ ink: 'M7 1h2v1h1v1h1v6h1v2H3V9h1V3h1V2h1V1h1zm0 12h2v2H7v-2z'+ },+ folder: {+ accentColor: 'var(--cth-lemon)',+ ink: 'M1 3h6v1h8v9H1V3zm1 1v8h12V5H6V4H2z'+ },+ terminal: {+ accentColor: 'var(--cth-mint)',+ ink: 'M1 2h14v12H1V2zm1 1v10h12V3H2zm1 2h1v1h1v1h1v1H5v1H4v1H3V9h1V8h1V7H4V6H3V5zm5 5h4v1H8v-1z'+ },+ code: {+ accentColor: 'var(--cth-sky)',+ ink: 'M5 3h1v1H5v1H4v1H3v1H2v1h1v1h1v1h1v1h1v1H5v-1H4v-1H3v-1H2v-1H1V7h1V6h1V5h1V4h1V3zm5 0h1v1h1v1h1v1h1v1h1v1h-1v1h-1v1h-1v1h-1v1h-1v-1h1v-1h1v-1h1V9h1V7h-1V6h-1V5h-1V4h-1V3z'+ },+ web: {+ accentColor: 'var(--cth-lilac)',+ ink: 'M7 1h2v1h2v1h1v1h1v2h1v2h-1v2h-1v1h-1v1H9v1H7v-1H5v-1H4v-1H3V9H2V7h1V5h1V4h1V3h2V2h0V1zm0 2v1H5v1H4v1H3v2h2V8h0V7h2V6h0V5h2V4h0V3H7zm2 1h1v1h1v1h1v2h-1v1H9V8h1V7h0V6h0V5h-1V4z'+ },+ mcp: {+ accentColor: 'var(--cth-lilac)',+ ink: 'M8 1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h-1v1h-1v1h-1v1h-1v1h-1v1H8v1H7v-1H6v-1H5v-1H4v-1H3v-1H2V9H1V8h1V7h1V6h1V5h1V4h1V3h1V2h1V1zm0 2v1H7v1H6v1H5v1H4v1H3v1h1v1h1v1h1v1h1v1h1v1h1v-1h1v-1h1v-1h1v-1h1V9h1V8h-1V7h-1V6h-1V5h-1V4h-1V3h-1V2H8z'+ },+ sparkle: {+ accentColor: 'var(--cth-lemon)',+ ink: 'M8 1h1v3h3v1H9v3H8V5H5V4h3V1zm-4 8h1v2h2v1H5v2H4v-2H2v-1h2V9zm8-1h1v2h2v1h-2v2h-1v-2H10v-1h2V8z'+ },+ expand: {+ accentColor: 'var(--cth-sky)',+ ink: 'M1 1h6v2H3v4H1V1zm14 0v6h-2V3H9V1h6zM1 9h2v4h4v2H1V9zm14 0v6H9v-2h4V9h2z'+ },+ minimize: {+ accentColor: 'var(--cth-sky)',+ ink: 'M5 1h2v6H1V5h4V1zm4 0h2v4h4v2H9V1zM1 9h6v6H5v-4H1V9zm8 0h6v2h-4v4H9V9z'+ }+};++export interface IconProps {+ name: IconName;+ size?: number; // integer scale: 1 = 16px, 2 = 32px, ...+ style?: CSSProperties;+}++export function Icon({ name, size = 1, style }: IconProps) {+ const def = paths[name];+ const dim = 16 * size;+ return (+ <svg+ viewBox="0 0 16 16"+ width={dim}+ height={dim}+ style={{ display: 'inline-block', ...style }}+ aria-hidden+ >+ {def.accent && <path d={def.accent} fill={def.accentColor} />}+ <path d={def.ink} fill="var(--cth-ink-900)" />+ </svg>+ );+}diff --git a/src/renderer/src/components/MemoryPanel.tsx b/src/renderer/src/components/MemoryPanel.tsxnew file mode 100644index 00000000..caddcbcd--- /dev/null+++ b/src/renderer/src/components/MemoryPanel.tsx@@ -0,0 +1,159 @@+import { useEffect, useState } from 'react';+import { PixelPanel } from './PixelPanel';+import { PixelButton } from './PixelButton';++interface MemoryStatus {+ available: boolean;+ enabled: boolean;+ active: boolean;+ initialized: boolean;+ palacePath: string | null;+ model: 'minilm' | 'embeddinggemma';+ bin: string | null;+}++/**+ * Collapsible panel to search the hive's shared semantic memory (MemPalace) and+ * see whether the CLI is detected. Agents use the CLI directly; this lets the+ * human query the same palace.+ */+export function MemoryPanel() {+ const [open, setOpen] = useState(false);+ const [status, setStatus] = useState<MemoryStatus | null>(null);+ const [query, setQuery] = useState('');+ const [result, setResult] = useState<string>('');+ const [busy, setBusy] = useState(false);++ const refreshStatus = async () => {+ try { setStatus(await window.cth.memoryStatus()); } catch { /* ignore */ }+ };+ useEffect(() => { refreshStatus(); }, []);++ const setModel = async (model: 'minilm' | 'embeddinggemma') => {+ await window.cth.updateConfig({ embeddingModel: model });+ await refreshStatus();+ };+ const toggleEnabled = async () => {+ await window.cth.updateConfig({ semanticMemory: !(status?.enabled ?? true) });+ await refreshStatus();+ };++ const run = async () => {+ if (!query.trim()) return;+ setBusy(true);+ setResult('');+ try {+ const res = await window.cth.searchMemory(query.trim());+ setResult(res.ok ? (res.output || '(no matches)') : `error: ${res.error}`);+ } finally {+ setBusy(false);+ }+ };++ const active = status?.active;+ const pill = active ? `🧠 memory · ${status?.model}` : '🧠 memory';++ return (+ <div style={{ position: 'absolute', bottom: 12, left: 12, width: open ? 360 : 'auto', zIndex: 40 }}>+ {!open ? (+ <button+ onClick={() => { setOpen(true); refreshStatus(); }}+ title="Search the hive's shared memory"+ style={{+ padding: '5px 10px 3px',+ background: active ? 'var(--cth-lemon-light)' : 'var(--cth-cream-200)',+ boxShadow: 'inset 0 0 0 2px var(--cth-ink-900)',+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 13,+ color: 'var(--cth-ink-900)',+ cursor: 'pointer',+ border: 'none'+ }}+ >+ {pill}+ </button>+ ) : (+ <PixelPanel variant="dialog" title="HIVE MEMORY" noPadding>+ <div style={{ display: 'flex', flexDirection: 'column', gap: 8, padding: 12 }}>+ <div style={{ fontSize: 12, color: 'var(--cth-ink-700)' }}>+ {status?.available+ ? <>MemPalace detected · model <b>{status.model}</b> · {status.initialized ? 'palace ready' : 'palace initializing…'}</>+ : <>MemPalace CLI not found. Install with <code>uv tool install mempalace</code> to enable semantic search. Markdown memory still works.</>}+ </div>++ {/* Settings: enable + embedding model toggle */}+ <div style={{ display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }}>+ <button+ onClick={toggleEnabled}+ title="Turn semantic memory on/off"+ style={{+ padding: '4px 8px 2px', cursor: 'pointer', border: 'none',+ fontFamily: 'var(--cth-font-ui)', fontSize: 12,+ background: status?.enabled ? 'var(--cth-mint-light)' : 'var(--cth-cream-200)',+ boxShadow: `inset 0 0 0 1px ${status?.enabled ? 'var(--cth-mint)' : 'var(--cth-ink-500)'}`+ }}+ >+ {status?.enabled ? 'enabled' : 'disabled'}+ </button>+ <span style={{ fontSize: 11, color: 'var(--cth-ink-500)', fontFamily: 'var(--cth-font-display)', textTransform: 'uppercase' }}>model</span>+ {(['minilm', 'embeddinggemma'] as const).map((m) => (+ <button+ key={m}+ onClick={() => setModel(m)}+ title={m === 'minilm' ? 'Light, English, ~90 MB — best for low-RAM Macs' : 'Multilingual, ~300 MB'}+ style={{+ padding: '4px 8px 2px', cursor: 'pointer', border: 'none',+ fontFamily: 'var(--cth-font-ui)', fontSize: 12,+ background: status?.model === m ? 'var(--cth-lemon-light)' : 'var(--cth-cream-100)',+ boxShadow: status?.model === m ? 'inset 0 0 0 2px var(--cth-ink-900)' : 'inset 0 0 0 1px var(--cth-ink-700)'+ }}+ >+ {m}+ </button>+ ))}+ </div>+ <div style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>+ Switching models re-indexes new writes going forward; existing entries keep their old embeddings until re-mined.+ </div>++ {status?.available && (+ <>+ <div style={{ display: 'flex', gap: 6 }}>+ <input+ value={query}+ onChange={(e) => setQuery(e.target.value)}+ onKeyDown={(e) => { if (e.key === 'Enter') run(); }}+ placeholder="search the hive's memory by meaning…"+ style={{+ flex: 1, padding: '6px 8px 4px',+ background: 'var(--cth-paper-100)', border: 'none',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ fontFamily: 'var(--cth-font-ui)', fontSize: 14,+ color: 'var(--cth-ink-900)', outline: 'none'+ }}+ />+ <PixelButton variant="primary" size="sm" onClick={run} disabled={busy}>+ {busy ? '…' : 'search'}+ </PixelButton>+ </div>+ {result && (+ <pre style={{+ margin: 0, maxHeight: '40vh', overflow: 'auto',+ background: 'var(--cth-cream-100)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ padding: 8, fontFamily: 'var(--cth-font-mono)', fontSize: 12,+ whiteSpace: 'pre-wrap', color: 'var(--cth-ink-900)'+ }}>{result}</pre>+ )}+ </>+ )}++ <div style={{ display: 'flex', justifyContent: 'flex-end' }}>+ <PixelButton variant="ghost" size="sm" onClick={() => setOpen(false)}>close</PixelButton>+ </div>+ </div>+ </PixelPanel>+ )}+ </div>+ );+}diff --git a/src/renderer/src/components/OnboardingWizard.tsx b/src/renderer/src/components/OnboardingWizard.tsxnew file mode 100644index 00000000..885fde9c--- /dev/null+++ b/src/renderer/src/components/OnboardingWizard.tsx@@ -0,0 +1,313 @@+import { useEffect, useState } from 'react';+import { PixelPanel } from './PixelPanel';+import { PixelButton } from './PixelButton';+import { Icon } from './Icon';+import { SpritePortrait } from './SpritePortrait';+import type { HarnessConfig } from '@/store/config';++export interface OnboardingWizardProps {+ onComplete: (config: HarnessConfig) => void;+}++type Step = 'welcome' | 'home' | 'repos' | 'auto' | 'done';++export function OnboardingWizard({ onComplete }: OnboardingWizardProps) {+ const [step, setStep] = useState<Step>('welcome');+ const [home, setHome] = useState<string>('');+ const [repos, setRepos] = useState<string[]>([]);+ const [autoMode, setAutoMode] = useState<boolean>(true);+ const [error, setError] = useState<string | undefined>();+ const [busy, setBusy] = useState(false);++ // Default-suggest a sensible harness home on first render+ useEffect(() => {+ if (!home) {+ const homeDir = (window as any).process?.env?.HOME ?? '';+ // Without a HOME env in the renderer sandbox we fall back to a hint;+ // user can still pick whatever they want.+ setHome(homeDir ? `${homeDir}/HarnessAgents` : '');+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, []);++ const pickHome = async () => {+ setError(undefined);+ const res = await window.cth.chooseFolder();+ if (res.ok) setHome(res.path);+ else if (res.error !== 'cancelled') setError(res.error);+ };++ const pickRepo = async () => {+ setError(undefined);+ const res = await window.cth.chooseFolder();+ if (res.ok && !repos.includes(res.path)) setRepos([...repos, res.path]);+ else if (!res.ok && res.error !== 'cancelled') setError(res.error);+ };++ const removeRepo = (path: string) => setRepos(repos.filter(r => r !== path));++ const finish = async () => {+ setBusy(true);+ setError(undefined);+ if (!home) { setError('Pick a harness home folder first.'); setBusy(false); setStep('home'); return; }+ const ensure = await window.cth.ensureHarnessHome(home);+ if (!ensure.ok) {+ setError(ensure.error ?? 'could not create harness home');+ setBusy(false);+ return;+ }+ const next = await window.cth.updateConfig({+ onboardingComplete: true,+ harnessHome: home,+ registeredRepos: repos,+ autoMode+ });+ setBusy(false);+ onComplete(next);+ };++ return (+ <div style={{+ position: 'fixed', inset: 0,+ background: 'var(--cth-cream-200)',+ backgroundImage:+ `repeating-linear-gradient(45deg, rgba(232, 217, 160, 0.4) 0 1px, transparent 1px 8px)`,+ display: 'flex', alignItems: 'center', justifyContent: 'center',+ zIndex: 200,+ padding: 32+ }}>+ <div style={{ width: 640, maxWidth: '94vw' }}>+ <PixelPanel+ variant="dialog"+ title={+ step === 'welcome' ? 'WELCOME'+ : step === 'home' ? 'STEP 1 OF 3 · HARNESS HOME'+ : step === 'repos' ? 'STEP 2 OF 3 · YOUR REPOS'+ : step === 'auto' ? 'STEP 3 OF 3 · AUTO MODE'+ : 'ALL SET'+ }+ noPadding+ >+ <div style={{ padding: 20, display: 'flex', flexDirection: 'column', gap: 16 }}>++ {step === 'welcome' && (+ <>+ <div style={{ display: 'flex', gap: 12, alignItems: 'center' }}>+ <div style={{+ width: 64, height: 64,+ background: 'var(--cth-sky-light)',+ boxShadow: 'inset 0 0 0 2px var(--cth-ink-900)',+ display: 'flex', alignItems: 'flex-end', justifyContent: 'center', overflow: 'hidden'+ }}>+ <SpritePortrait character="michael" scale={2} />+ </div>+ <div>+ <div style={{+ fontFamily: 'var(--cth-font-display)',+ fontSize: 12, lineHeight: '20px'+ }}>HI, I'M YOUR HARNESS</div>+ <div style={{ fontSize: 14, color: 'var(--cth-ink-700)' }}>+ A control room for the Claude Code agents you run on this machine.+ </div>+ </div>+ </div>+ <p style={{ margin: 0, lineHeight: '22px' }}>+ We're going to set up a folder where the harness lives, add the project repos+ you want agents to work on, and confirm that agents should run unattended.+ Three quick steps.+ </p>+ </>+ )}++ {step === 'home' && (+ <>+ <p style={{ margin: 0, lineHeight: '22px' }}>+ Pick a folder where the harness will keep its own files — agent metadata,+ logs, and any new repos you create from here. Something like{' '}+ <code style={{ fontFamily: 'var(--cth-font-mono)', background: 'var(--cth-paper-100)', padding: '0 4px' }}>+ ~/HarnessAgents+ </code>{' '}+ is a fine default. We'll create it if it doesn't exist.+ </p>+ <div style={{ display: 'flex', gap: 8 }}>+ <input+ value={home}+ onChange={(e) => setHome(e.target.value)}+ placeholder="/path/to/HarnessAgents"+ style={inputStyle}+ />+ <PixelButton variant="secondary" size="md" onClick={pickHome}>+ <span style={{ display: 'inline-flex', gap: 4, alignItems: 'center' }}>+ <Icon name="folder" /> pick+ </span>+ </PixelButton>+ </div>+ <div style={{ fontSize: 13, color: 'var(--cth-ink-500)' }}>+ Think of this as the "town hall." The harness pins agent state there so+ sessions can be picked back up after a restart.+ </div>+ </>+ )}++ {step === 'repos' && (+ <>+ <p style={{ margin: 0, lineHeight: '22px' }}>+ Add the existing repos you want claude agents to run on. Each one becomes+ a room on the floor — multiple agents can live in the same repo. You can+ add more later.+ </p>+ <div style={{+ display: 'flex', flexDirection: 'column', gap: 6,+ maxHeight: 200, overflowY: 'auto'+ }}>+ {repos.length === 0 && (+ <div style={{+ padding: 12,+ fontSize: 14,+ color: 'var(--cth-ink-500)',+ background: 'var(--cth-paper-200)',+ textAlign: 'center'+ }}>+ No repos added yet. Optional, but recommended.+ </div>+ )}+ {repos.map((r) => (+ <div key={r} style={{+ display: 'flex', alignItems: 'center', gap: 8,+ padding: '6px 10px',+ background: 'var(--cth-paper-100)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)'+ }}>+ <Icon name="folder" />+ <span style={{+ flex: 1,+ fontFamily: 'var(--cth-font-mono)', fontSize: 14,+ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'+ }}>{r}</span>+ <PixelButton variant="ghost" size="sm" onClick={() => removeRepo(r)}>+ <Icon name="x" />+ </PixelButton>+ </div>+ ))}+ </div>+ <PixelButton variant="secondary" size="md" onClick={pickRepo}>+ <span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>+ <Icon name="plus" /> add a repo+ </span>+ </PixelButton>+ </>+ )}++ {step === 'auto' && (+ <>+ <p style={{ margin: 0, lineHeight: '22px' }}>+ Agents in the harness run <strong>unattended</strong>. By default, every+ agent is spawned with{' '}+ <code style={{ fontFamily: 'var(--cth-font-mono)', background: 'var(--cth-paper-100)', padding: '0 4px' }}>+ --permission-mode bypassPermissions+ </code>{' '}+ — meaning claude won't pause to ask you before file edits or shell commands.+ This is the right default for the "control room" experience; it's also a+ loaded foot-gun on production repos. Keep this on unless you have a reason+ to babysit a specific agent.+ </p>+ <label style={{+ display: 'flex', alignItems: 'center', gap: 10,+ padding: 12,+ background: autoMode ? 'var(--cth-mint-light)' : 'var(--cth-cream-200)',+ boxShadow: `inset 0 0 0 2px ${autoMode ? 'var(--cth-mint)' : 'var(--cth-ink-500)'}`,+ cursor: 'pointer'+ }}>+ <input+ type="checkbox"+ checked={autoMode}+ onChange={(e) => setAutoMode(e.target.checked)}+ style={{ width: 18, height: 18 }}+ />+ <div>+ <div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 10, lineHeight: '14px' }}>+ AUTO MODE+ </div>+ <div style={{ fontSize: 14, color: 'var(--cth-ink-700)' }}>+ {autoMode ? 'Always on. Agents never pause for permission.' : 'Off. Each agent will prompt before running tools.'}+ </div>+ </div>+ </label>+ <div style={{ fontSize: 13, color: 'var(--cth-ink-500)' }}>+ You can override this per agent in the Add Agent dialog — change the+ command string to drop the flag.+ </div>+ </>+ )}++ {error && (+ <div style={{+ padding: '6px 10px',+ background: 'var(--cth-coral-light)',+ boxShadow: 'inset 0 0 0 1px var(--cth-coral)',+ fontSize: 14,+ color: 'var(--cth-ink-900)'+ }}>{error}</div>+ )}++ {/* Footer / nav */}+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginTop: 4 }}>+ <Dots step={step} />+ <div style={{ display: 'flex', gap: 8 }}>+ {step !== 'welcome' && (+ <PixelButton variant="ghost" size="md" onClick={() => setStep(prevStep(step))} disabled={busy}>+ back+ </PixelButton>+ )}+ {step !== 'auto' && (+ <PixelButton variant="primary" size="md" onClick={() => setStep(nextStep(step))}>+ {step === 'welcome' ? "let's go" : 'next'}+ </PixelButton>+ )}+ {step === 'auto' && (+ <PixelButton variant="primary" size="md" onClick={finish} disabled={busy}>+ {busy ? 'saving...' : 'finish'}+ </PixelButton>+ )}+ </div>+ </div>+ </div>+ </PixelPanel>+ </div>+ </div>+ );+}++function Dots({ step }: { step: Step }) {+ const order: Step[] = ['welcome', 'home', 'repos', 'auto'];+ return (+ <div style={{ display: 'flex', gap: 4 }}>+ {order.map((s) => (+ <span key={s} style={{+ width: 8, height: 8,+ background: s === step ? 'var(--cth-ink-900)' : 'var(--cth-cream-300)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)'+ }} />+ ))}+ </div>+ );+}++function nextStep(s: Step): Step {+ return s === 'welcome' ? 'home' : s === 'home' ? 'repos' : s === 'repos' ? 'auto' : 'done';+}+function prevStep(s: Step): Step {+ return s === 'auto' ? 'repos' : s === 'repos' ? 'home' : s === 'home' ? 'welcome' : 'welcome';+}++const inputStyle: React.CSSProperties = {+ flex: 1,+ padding: '6px 8px 4px',+ background: 'var(--cth-paper-100)',+ border: 'none',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ fontFamily: 'var(--cth-font-mono)',+ fontSize: 14,+ color: 'var(--cth-ink-900)',+ outline: 'none'+};diff --git a/src/renderer/src/components/PixelBadge.tsx b/src/renderer/src/components/PixelBadge.tsxnew file mode 100644index 00000000..64056854--- /dev/null+++ b/src/renderer/src/components/PixelBadge.tsx@@ -0,0 +1,65 @@+import { CSSProperties } from 'react';++export type StatusKind =+ | 'idle' | 'thinking' | 'working' | 'waiting' | 'blocked' | 'success' | 'ghost';++export interface PixelBadgeProps {+ status: StatusKind;+ label?: string;+ style?: CSSProperties;+}++const colorByStatus: Record<StatusKind, string> = {+ idle: 'var(--cth-status-idle)',+ thinking: 'var(--cth-status-thinking)',+ working: 'var(--cth-status-working)',+ waiting: 'var(--cth-status-waiting)',+ blocked: 'var(--cth-status-blocked)',+ success: 'var(--cth-status-success)',+ ghost: 'var(--cth-status-ghost)'+};++// Human-readable labels. "blocked" is reserved for the god agent waiting on YOU,+// so it reads as "needs you"; sub-agents waiting on god/another agent are+// "waiting", which is honest about who they're actually stalled on.+const labelByStatus: Record<StatusKind, string> = {+ idle: 'idle',+ thinking: 'working',+ working: 'working',+ waiting: 'waiting',+ blocked: 'needs you',+ success: 'done',+ ghost: 'gone'+};++export function PixelBadge({ status, label, style }: PixelBadgeProps) {+ const text = label ?? labelByStatus[status] ?? status;+ return (+ <span+ style={{+ display: 'inline-flex',+ alignItems: 'center',+ gap: 6,+ padding: '2px 8px 0',+ background: 'var(--cth-cream-100)',+ boxShadow: `inset 0 0 0 1px ${colorByStatus[status]}`,+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 'var(--cth-text-body-sm)',+ lineHeight: '18px',+ color: 'var(--cth-ink-900)',+ userSelect: 'none',+ ...style+ }}+ >+ <span+ style={{+ width: 8,+ height: 8,+ background: colorByStatus[status],+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)'+ }}+ />+ {text}+ </span>+ );+}diff --git a/src/renderer/src/components/PixelButton.tsx b/src/renderer/src/components/PixelButton.tsxnew file mode 100644index 00000000..13a0ddea--- /dev/null+++ b/src/renderer/src/components/PixelButton.tsx@@ -0,0 +1,93 @@+import { CSSProperties, ReactNode, useState } from 'react';++type Variant = 'primary' | 'secondary' | 'ghost' | 'destructive';+type Size = 'sm' | 'md' | 'lg';++export interface PixelButtonProps {+ variant?: Variant;+ size?: Size;+ children?: ReactNode;+ onClick?: () => void;+ disabled?: boolean;+ fullWidth?: boolean;+ style?: CSSProperties;+}++const heightBySize: Record<Size, number> = { sm: 24, md: 32, lg: 40 };+const padBySize: Record<Size, string> = { sm: '0 8px', md: '0 12px', lg: '0 16px' };++export function PixelButton({+ variant = 'primary',+ size = 'md',+ children,+ onClick,+ disabled = false,+ fullWidth = false,+ style+}: PixelButtonProps) {+ const [pressed, setPressed] = useState(false);+ const [hover, setHover] = useState(false);++ const palette = (() => {+ switch (variant) {+ case 'primary':+ return {+ fill: disabled ? 'var(--cth-cream-300)' : (hover ? 'var(--cth-ink-700)' : 'var(--cth-ink-900)'),+ text: 'var(--cth-cream-50)',+ border: 'var(--cth-ink-900)',+ shadow: 'var(--cth-ink-900)'+ };+ case 'secondary':+ return {+ fill: disabled ? 'var(--cth-cream-300)' : (hover ? 'var(--cth-cream-200)' : 'var(--cth-cream-100)'),+ text: 'var(--cth-ink-900)',+ border: 'var(--cth-ink-900)',+ shadow: 'var(--cth-ink-700)'+ };+ case 'ghost':+ return {+ fill: hover ? 'var(--cth-cream-200)' : 'transparent',+ text: 'var(--cth-ink-700)',+ border: 'var(--cth-ink-500)',+ shadow: 'var(--cth-ink-500)'+ };+ case 'destructive':+ return {+ fill: disabled ? 'var(--cth-cream-300)' : (hover ? 'var(--cth-coral-light)' : 'var(--cth-coral)'),+ text: 'var(--cth-ink-900)',+ border: 'var(--cth-ink-900)',+ shadow: 'var(--cth-ink-900)'+ };+ }+ })();++ return (+ <button+ onClick={disabled ? undefined : onClick}+ onMouseDown={() => setPressed(true)}+ onMouseUp={() => setPressed(false)}+ onMouseLeave={() => { setPressed(false); setHover(false); }}+ onMouseEnter={() => setHover(true)}+ disabled={disabled}+ style={{+ height: heightBySize[size],+ padding: padBySize[size],+ background: palette.fill,+ color: palette.text,+ border: 'none',+ boxShadow: pressed && !disabled+ ? `inset 0 0 0 2px ${palette.border}`+ : `inset 0 0 0 2px ${palette.border}, 0 2px 0 ${palette.shadow}`,+ transform: pressed && !disabled ? 'translateY(2px)' : 'none',+ fontFamily: 'var(--cth-font-ui)',+ fontSize: size === 'lg' ? 'var(--cth-text-body-lg)' : 'var(--cth-text-body-md)',+ cursor: disabled ? 'not-allowed' : 'pointer',+ width: fullWidth ? '100%' : 'auto',+ userSelect: 'none',+ ...style+ }}+ >+ {children}+ </button>+ );+}diff --git a/src/renderer/src/components/PixelPanel.tsx b/src/renderer/src/components/PixelPanel.tsxnew file mode 100644index 00000000..94098799--- /dev/null+++ b/src/renderer/src/components/PixelPanel.tsx@@ -0,0 +1,78 @@+import { CSSProperties, ReactNode } from 'react';+import { AccentColorName } from '@/design/tokens';++type Variant = 'default' | 'inset' | 'active' | 'terminal' | 'dialog';++export interface PixelPanelProps {+ variant?: Variant;+ title?: string;+ accent?: AccentColorName;+ children?: ReactNode;+ style?: CSSProperties;+ className?: string;+ noPadding?: boolean;+}++const borderByVariant: Record<Variant, string> = {+ default: 'var(--cth-panel-border)',+ inset: 'var(--cth-panel-border-inset)',+ active: 'var(--cth-panel-border)', // accent overlay added separately+ terminal: 'var(--cth-panel-border-terminal)',+ dialog: 'var(--cth-panel-border-dialog)'+};++const fillByVariant: Record<Variant, string> = {+ default: 'var(--cth-cream-100)',+ inset: 'var(--cth-cream-200)',+ active: 'var(--cth-cream-100)',+ terminal: 'var(--cth-paper-100)',+ dialog: 'var(--cth-cream-50)'+};++export function PixelPanel({+ variant = 'default',+ title,+ accent,+ children,+ style,+ className,+ noPadding = false+}: PixelPanelProps) {+ const baseStyle: CSSProperties = {+ background: fillByVariant[variant],+ boxShadow: borderByVariant[variant],+ padding: noPadding ? 0 : 'var(--cth-space-3)',+ position: 'relative',+ ...style+ };++ // Active variant: paint accent over the middle border slot (3px ring at 1px inset)+ if (variant === 'active' && accent) {+ baseStyle.boxShadow = `+ inset 0 0 0 1px var(--cth-ink-700),+ inset 0 0 0 3px var(--cth-${accent}),+ inset 0 0 0 5px var(--cth-ink-900)`;+ }++ return (+ <div className={className} style={baseStyle}>+ {title && (+ <div+ style={{+ margin: noPadding ? 0 : '-12px -12px 12px',+ padding: '6px 12px 4px',+ background: accent ? `var(--cth-${accent})` : 'var(--cth-cream-200)',+ color: 'var(--cth-ink-900)',+ fontFamily: 'var(--cth-font-display)',+ fontSize: 'var(--cth-text-display-md)',+ lineHeight: 'var(--cth-lh-display-md)',+ boxShadow: 'inset 0 -1px 0 var(--cth-ink-900)'+ }}+ >+ {title}+ </div>+ )}+ {children}+ </div>+ );+}diff --git a/src/renderer/src/components/PtyTerminalView.tsx b/src/renderer/src/components/PtyTerminalView.tsxnew file mode 100644index 00000000..fe28d0d4--- /dev/null+++ b/src/renderer/src/components/PtyTerminalView.tsx@@ -0,0 +1,277 @@+import { useEffect, useRef, useState } from 'react';+import type { CSSProperties } from 'react';+import '@xterm/xterm/css/xterm.css';+import { Icon } from './Icon';+import { acquireTerminal, attachTerminal } from './terminalPool';++const DEFAULT_FONT_SIZE = 14;+const MIN_FONT_SIZE = 8;+const MAX_FONT_SIZE = 40;++const LS_FONT_SIZE = 'cth.ptyFontSize';+const LS_THEME = 'cth.ptyTheme';++type PtyTheme = 'light' | 'dark';++function loadFontSize(): number {+ try {+ const n = parseInt(window.localStorage.getItem(LS_FONT_SIZE) ?? '', 10);+ if (!Number.isNaN(n) && n >= MIN_FONT_SIZE && n <= MAX_FONT_SIZE) return n;+ } catch { /* noop */ }+ return DEFAULT_FONT_SIZE;+}++function loadTheme(): PtyTheme {+ try {+ const v = window.localStorage.getItem(LS_THEME);+ if (v === 'dark' || v === 'light') return v;+ } catch { /* noop */ }+ return 'light';+}++const zoomBtnStyle: CSSProperties = {+ width: 18,+ height: 18,+ display: 'inline-flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 12,+ lineHeight: 1,+ color: 'var(--cth-ink-700)',+ background: 'var(--cth-paper-100)',+ border: '1px solid var(--cth-ink-300)',+ cursor: 'pointer',+ padding: 0+};++// Light theme — cream paper. The ANSI "white" / "yellow" / bright slots are+// remapped to readable dark inks: programs that print white or pale-yellow text+// (expecting a dark terminal) were previously invisible on the cream background.+const lightTheme = {+ background: '#FCFAF0',+ foreground: '#1A1320',+ cursor: '#FF6B6B',+ cursorAccent: '#FCFAF0',+ selectionBackground: '#FFEC99',+ selectionForeground: '#1A1320',+ black: '#1A1320',+ red: '#D1453B',+ green: '#2E9E54',+ yellow: '#B8860B',+ blue: '#2B6CB0',+ magenta: '#8A5CF0',+ cyan: '#1F9C94',+ white: '#3A2F44', // default "white" text → dark, so it's visible+ brightBlack: '#6B5878',+ brightRed: '#E0584E',+ brightGreen: '#3DAA62',+ brightYellow: '#A9760A',+ brightBlue: '#3B7DC4',+ brightMagenta:'#9B72F2',+ brightCyan: '#2BA89F',+ brightWhite: '#1A1320'+};++// Dark theme — the original neon-on-ink palette (designed for a dark background).+const darkTheme = {+ background: '#1A1320',+ foreground: '#F3ECF7',+ cursor: '#FF6B6B',+ cursorAccent: '#1A1320',+ selectionBackground: '#3A2F44',+ selectionForeground: '#FFF8E7',+ black: '#241B2C',+ red: '#FF6B6B',+ green: '#6BCF7F',+ yellow: '#FFD93D',+ blue: '#4ECDC4',+ magenta: '#B197FC',+ cyan: '#4ECDC4',+ white: '#F3ECF7',+ brightBlack: '#857693',+ brightRed: '#FFB4B4',+ brightGreen: '#B4E5BD',+ brightYellow: '#FFEC99',+ brightBlue: '#A8E6E0',+ brightMagenta:'#D6C5FF',+ brightCyan: '#A8E6E0',+ brightWhite: '#FFFDF5'+};++const THEMES: Record<PtyTheme, typeof lightTheme> = { light: lightTheme, dark: darkTheme };++export interface PtyTerminalViewProps {+ ptyId: string;+ /** Forwarded to the renderer-side onData hook so the parent can also tap+ * the stream for regex parsing (avatar state inference). */+ onStreamData?: (chunk: string) => void;+ /** Fires with the trimmed text whenever the user submits a line (Enter). */+ onUserPrompt?: (text: string) => void;+ /** When provided, render an expand/minimize button in the header. */+ onToggleFullscreen?: () => void;+ fullscreen?: boolean;+ /** Edge-to-edge mode for the sidebar tab: no outer chrome/border. */+ embedded?: boolean;+}++export function PtyTerminalView({ ptyId, onStreamData, onUserPrompt, onToggleFullscreen, fullscreen, embedded }: PtyTerminalViewProps) {+ const hostRef = useRef<HTMLDivElement | null>(null);+ const onStreamDataRef = useRef(onStreamData);+ onStreamDataRef.current = onStreamData;+ const onUserPromptRef = useRef(onUserPrompt);+ onUserPromptRef.current = onUserPrompt;+ const [fontSize, setFontSize] = useState(loadFontSize);+ const fontSizeRef = useRef(fontSize);+ const [ptyTheme, setPtyTheme] = useState<PtyTheme>(loadTheme);+ const ptyThemeRef = useRef(ptyTheme);+ ptyThemeRef.current = ptyTheme;++ // Attach this view to the pty's persistent terminal. The terminal and its+ // buffer live in the pool across mounts, so re-parenting its host element+ // here shows the already-rendered content immediately — no blank pane while+ // switching agents or toggling fullscreen.+ useEffect(() => {+ const container = hostRef.current;+ if (!container) return;+ const entry = acquireTerminal(ptyId, THEMES[ptyThemeRef.current], fontSizeRef.current);+ entry.term.options.theme = THEMES[ptyThemeRef.current];+ entry.term.options.fontSize = fontSizeRef.current;+ attachTerminal(entry, container);+ entry.onData = (chunk) => onStreamDataRef.current?.(chunk);+ entry.onPrompt = (text) => onUserPromptRef.current?.(text);++ const tryFit = () => {+ try {+ entry.fit.fit();+ window.cth.resizePty(ptyId, entry.term.cols, entry.term.rows);+ entry.term.refresh(0, Math.max(0, entry.term.rows - 1));+ } catch { /* host may not be sized yet */ }+ };+ // Fit once layout has settled and again once the web font has loaded.+ requestAnimationFrame(() => requestAnimationFrame(tryFit));+ const retries = [setTimeout(tryFit, 60), setTimeout(tryFit, 240)];+ if (typeof document !== 'undefined' && document.fonts?.ready) {+ document.fonts.ready.then(tryFit).catch(() => { /* noop */ });+ }++ const ro = new ResizeObserver(tryFit);+ ro.observe(container);+ const onWinResize = () => tryFit();+ window.addEventListener('resize', onWinResize);++ return () => {+ retries.forEach(clearTimeout);+ ro.disconnect();+ window.removeEventListener('resize', onWinResize);+ // Detach (but DON'T dispose) the terminal — it keeps running in the pool.+ entry.onData = undefined;+ entry.onPrompt = undefined;+ if (entry.host.parentElement === container) container.removeChild(entry.host);+ };+ }, [ptyId]);++ // Apply theme changes to the pooled terminal and persist the choice.+ useEffect(() => {+ try { window.localStorage.setItem(LS_THEME, ptyTheme); } catch { /* noop */ }+ acquireTerminal(ptyId, THEMES[ptyTheme], fontSizeRef.current).term.options.theme = THEMES[ptyTheme];+ }, [ptyTheme, ptyId]);++ // Apply font-size (zoom) changes to the pooled terminal and re-fit cols/rows.+ useEffect(() => {+ fontSizeRef.current = fontSize;+ try { window.localStorage.setItem(LS_FONT_SIZE, String(fontSize)); } catch { /* noop */ }+ const entry = acquireTerminal(ptyId, THEMES[ptyThemeRef.current], fontSize);+ entry.term.options.fontSize = fontSize;+ try {+ entry.fit.fit();+ window.cth.resizePty(ptyId, entry.term.cols, entry.term.rows);+ } catch { /* host may not be sized yet */ }+ }, [fontSize, ptyId]);++ const zoom = (delta: number) =>+ setFontSize((s) => Math.min(MAX_FONT_SIZE, Math.max(MIN_FONT_SIZE, s + delta)));+ const resetZoom = () => setFontSize(DEFAULT_FONT_SIZE);++ // Keyboard zoom: Cmd/Ctrl + '=' / '-' / '0'+ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if (!(e.metaKey || e.ctrlKey)) return;+ if (e.key === '=' || e.key === '+') { e.preventDefault(); zoom(1); }+ else if (e.key === '-' || e.key === '_') { e.preventDefault(); zoom(-1); }+ else if (e.key === '0') { e.preventDefault(); resetZoom(); }+ };+ window.addEventListener('keydown', onKey);+ return () => window.removeEventListener('keydown', onKey);+ }, []);++ return (+ <div style={{+ background: 'var(--cth-paper-100)',+ boxShadow: embedded ? 'none' : 'var(--cth-panel-border-terminal)',+ padding: embedded ? 0 : 8,+ height: '100%',+ width: '100%',+ minHeight: 0,+ display: 'flex',+ flexDirection: 'column'+ }}>+ <div style={{+ display: 'flex', alignItems: 'center', gap: 6,+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 13,+ color: 'var(--cth-ink-500)',+ borderBottom: '1px dashed var(--cth-ink-300)',+ paddingBottom: 4,+ marginBottom: 4,+ paddingLeft: embedded ? 8 : 0,+ paddingRight: embedded ? 8 : 0,+ paddingTop: embedded ? 6 : 0+ }}>+ <span style={{+ width: 8, height: 8, background: 'var(--cth-mint)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)',+ animation: 'cth-pulse 1200ms steps(2, end) infinite'+ }} />+ live · pty {ptyId}+ <div style={{ marginLeft: 'auto', display: 'flex', alignItems: 'center', gap: 2 }}>+ <button+ onClick={() => setPtyTheme((t) => (t === 'dark' ? 'light' : 'dark'))}+ title={ptyTheme === 'dark' ? 'Switch to light terminal' : 'Switch to dark terminal'}+ style={{ ...zoomBtnStyle, width: 22, marginRight: 4 }}+ >{ptyTheme === 'dark' ? '☀' : '☾'}</button>+ <button+ onClick={() => zoom(-1)}+ disabled={fontSize <= MIN_FONT_SIZE}+ title="Zoom out (Cmd -)"+ style={zoomBtnStyle}+ >−</button>+ <button+ onClick={resetZoom}+ title="Reset zoom (Cmd 0)"+ style={{ ...zoomBtnStyle, width: 'auto', padding: '0 4px', minWidth: 28 }}+ >{fontSize}px</button>+ <button+ onClick={() => zoom(1)}+ disabled={fontSize >= MAX_FONT_SIZE}+ title="Zoom in (Cmd +)"+ style={zoomBtnStyle}+ >+</button>+ {onToggleFullscreen && (+ <button+ onClick={onToggleFullscreen}+ title={fullscreen ? 'Exit fullscreen (Esc)' : 'Fullscreen terminal'}+ style={{ ...zoomBtnStyle, width: 22, height: 22, marginLeft: 4 }}+ >+ <Icon name={fullscreen ? 'minimize' : 'expand'} />+ </button>+ )}+ </div>+ </div>+ <div ref={hostRef} style={{+ flex: 1, minHeight: 0,+ padding: embedded ? '0 8px 8px' : 0+ }} />+ </div>+ );+}diff --git a/src/renderer/src/components/QuitWarningModal.tsx b/src/renderer/src/components/QuitWarningModal.tsxnew file mode 100644index 00000000..0b6df3ae--- /dev/null+++ b/src/renderer/src/components/QuitWarningModal.tsx@@ -0,0 +1,90 @@+import { useState } from 'react';+import { PixelPanel } from './PixelPanel';+import { PixelButton } from './PixelButton';+import { Icon } from './Icon';++export interface QuitWarningModalProps {+ ptyCount: number;+ onCancel: () => void;+ onConfirm: () => void;+}++export function QuitWarningModal({ ptyCount, onCancel, onConfirm }: QuitWarningModalProps) {+ const [busy, setBusy] = useState(false);++ const confirm = async () => {+ setBusy(true);+ await onConfirm();+ // No need to clear busy — the app is quitting.+ };++ return (+ <div+ onClick={onCancel}+ style={{+ position: 'fixed', inset: 0,+ background: 'rgba(26, 19, 32, 0.7)',+ display: 'flex', alignItems: 'center', justifyContent: 'center',+ zIndex: 300+ }}+ >+ <div+ onClick={(e) => e.stopPropagation()}+ style={{ width: 480, maxWidth: '92vw' }}+ >+ <PixelPanel variant="dialog" title="QUITTING NOW?" noPadding>+ <div style={{ padding: 20, display: 'flex', flexDirection: 'column', gap: 16 }}>+ <div style={{ display: 'flex', gap: 12, alignItems: 'flex-start' }}>+ <div style={{+ width: 32, height: 32,+ background: 'var(--cth-coral-light)',+ boxShadow: 'inset 0 0 0 2px var(--cth-ink-900)',+ display: 'flex', alignItems: 'center', justifyContent: 'center',+ flexShrink: 0+ }}>+ <Icon name="bell" />+ </div>+ <div style={{ flex: 1 }}>+ <div style={{+ fontFamily: 'var(--cth-font-display)',+ fontSize: 12, lineHeight: '20px',+ color: 'var(--cth-ink-900)',+ marginBottom: 4+ }}>+ {ptyCount} {ptyCount === 1 ? 'AGENT' : 'AGENTS'} STILL RUNNING+ </div>+ <div style={{ fontSize: 15, lineHeight: '22px', color: 'var(--cth-ink-700)' }}>+ Closing the harness will terminate{' '}+ {ptyCount === 1 ? 'the running claude session' : `all ${ptyCount} running claude sessions`}{' '}+ and discard any unsaved progress they were holding in memory. The conversation+ history inside each session is lost when the PTY exits.+ </div>+ </div>+ </div>++ <div style={{+ padding: 8,+ background: 'var(--cth-cream-200)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',+ fontSize: 13, lineHeight: '18px',+ color: 'var(--cth-ink-700)'+ }}>+ Tip: leave the harness open in the background if you want sessions to keep+ working. You can detach individual agents by clicking <Icon name="x" /> on+ their detail panel.+ </div>++ <div style={{ display: 'flex', justifyContent: 'flex-end', gap: 8 }}>+ <PixelButton variant="secondary" size="md" onClick={onCancel} disabled={busy}>+ keep them running+ </PixelButton>+ <PixelButton variant="destructive" size="md" onClick={confirm} disabled={busy}>+ {busy ? 'killing...' : `kill ${ptyCount === 1 ? 'it' : 'all'} & quit`}+ </PixelButton>+ </div>+ </div>+ </PixelPanel>+ </div>+ </div>+ );+}diff --git a/src/renderer/src/components/RecentText.tsx b/src/renderer/src/components/RecentText.tsxnew file mode 100644index 00000000..67daf458--- /dev/null+++ b/src/renderer/src/components/RecentText.tsx@@ -0,0 +1,69 @@+import { useTypewriter } from '@/hooks/useTypewriter';+import type { AccentColorName } from '@/design/tokens';++export interface RecentTextProps {+ accent: AccentColorName;+ text: string;+ seed: number | undefined;+}++/**+ * Shows the agent's most recent assistant message with a streaming typewriter.+ * The cursor blink persists after the stream completes — same shape Claude Code+ * uses while it's still composing — and disappears only when text is empty.+ */+export function RecentText({ accent, text, seed }: RecentTextProps) {+ const { shown, done } = useTypewriter(text, seed);+ if (!text) return null;+ return (+ <div style={{+ background: 'var(--cth-cream-50)',+ boxShadow: `inset 0 0 0 1px var(--cth-ink-700), inset 4px 0 0 var(--cth-${accent})`,+ padding: '8px 10px 8px 16px',+ display: 'flex',+ flexDirection: 'column',+ gap: 4+ }}>+ <div style={{+ display: 'flex', alignItems: 'center', justifyContent: 'space-between',+ fontFamily: 'var(--cth-font-display)',+ fontSize: 8, lineHeight: '12px',+ color: 'var(--cth-ink-700)',+ textTransform: 'uppercase'+ }}>+ <span>recent</span>+ <span style={{+ display: 'inline-flex', alignItems: 'center', gap: 4,+ color: done ? 'var(--cth-ink-500)' : `var(--cth-${accent})`+ }}>+ <span style={{+ width: 6, height: 6,+ background: done ? 'var(--cth-ink-500)' : `var(--cth-${accent})`,+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)',+ animation: done ? 'none' : 'cth-pulse 800ms steps(2, end) infinite'+ }} />+ {done ? 'idle' : 'live'}+ </span>+ </div>+ <div style={{+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 14,+ lineHeight: '18px',+ color: 'var(--cth-ink-900)',+ minHeight: 36+ }}>+ {shown}+ <span style={{+ display: 'inline-block',+ width: 7,+ height: 14,+ marginLeft: 2,+ verticalAlign: '-2px',+ background: 'var(--cth-ink-900)',+ animation: 'cth-blink 700ms steps(2, end) infinite',+ opacity: done ? 0 : 1+ }} />+ </div>+ </div>+ );+}diff --git a/src/renderer/src/components/SidebarSplitter.tsx b/src/renderer/src/components/SidebarSplitter.tsxnew file mode 100644index 00000000..7562fdfb--- /dev/null+++ b/src/renderer/src/components/SidebarSplitter.tsx@@ -0,0 +1,86 @@+import { useEffect, useRef, useState } from 'react';++export interface SidebarSplitterProps {+ /** Current sidebar width in px. */+ width: number;+ /** Called with the new width (already clamped externally). */+ onChange: (px: number) => void;+ /** Containing viewport width — used to clamp delta to a sane max. */+ viewportWidth: number;+ min?: number;+ max?: number;+}++/**+ * Vertical drag handle. Sits between the floor canvas (left) and the sidebar+ * (right). Drag left → wider sidebar. Cursor + pixel-stripe affordance.+ */+export function SidebarSplitter({+ width, onChange, viewportWidth, min = 320, max = 1200+}: SidebarSplitterProps) {+ const startRef = useRef<{ clientX: number; width: number } | null>(null);+ const [active, setActive] = useState(false);++ useEffect(() => {+ const onMove = (e: MouseEvent) => {+ if (!startRef.current) return;+ const delta = startRef.current.clientX - e.clientX; // left drag = positive delta → grow sidebar+ const clampMax = Math.min(max, Math.max(min, viewportWidth - 360));+ const next = Math.min(clampMax, Math.max(min, startRef.current.width + delta));+ onChange(next);+ };+ const onUp = () => {+ startRef.current = null;+ setActive(false);+ document.body.style.cursor = '';+ window.removeEventListener('mousemove', onMove);+ window.removeEventListener('mouseup', onUp);+ };+ if (active) {+ window.addEventListener('mousemove', onMove);+ window.addEventListener('mouseup', onUp);+ document.body.style.cursor = 'ew-resize';+ }+ return () => {+ window.removeEventListener('mousemove', onMove);+ window.removeEventListener('mouseup', onUp);+ };+ }, [active, viewportWidth, min, max, onChange]);++ return (+ <div+ onMouseDown={(e) => {+ startRef.current = { clientX: e.clientX, width };+ setActive(true);+ e.preventDefault();+ }}+ onDoubleClick={() => onChange(420)}+ title="Drag to resize · double-click to reset"+ style={{+ width: 10,+ cursor: 'ew-resize',+ flexShrink: 0,+ position: 'relative',+ background: active ? 'var(--cth-cream-300)' : 'transparent'+ }}+ >+ {/* The visible 2px stripe with hash marks in the middle */}+ <div style={{+ position: 'absolute',+ top: 0, bottom: 0, left: 4,+ width: 2,+ background: active ? 'var(--cth-ink-900)' : 'var(--cth-ink-300)'+ }} />+ <div style={{+ position: 'absolute',+ top: '50%', left: 2, transform: 'translateY(-50%)',+ width: 6, height: 24,+ display: 'flex', flexDirection: 'column', justifyContent: 'space-between'+ }}>+ <span style={{ height: 2, background: 'var(--cth-ink-900)' }} />+ <span style={{ height: 2, background: 'var(--cth-ink-900)' }} />+ <span style={{ height: 2, background: 'var(--cth-ink-900)' }} />+ </div>+ </div>+ );+}diff --git a/src/renderer/src/components/SidebarTabs.tsx b/src/renderer/src/components/SidebarTabs.tsxnew file mode 100644index 00000000..f685f51d--- /dev/null+++ b/src/renderer/src/components/SidebarTabs.tsx@@ -0,0 +1,57 @@+import { type SidebarTab } from '@/store/store';+import { type AccentColorName } from '@/design/tokens';+import { Icon, type IconName } from './Icon';++const TABS: { key: SidebarTab; label: string; icon: IconName }[] = [+ { key: 'terminal', label: 'terminal', icon: 'terminal' },+ { key: 'files', label: 'files', icon: 'folder' }+];++export interface SidebarTabsProps {+ current: SidebarTab;+ accent: AccentColorName;+ onChange: (tab: SidebarTab) => void;+}++export function SidebarTabs({ current, accent, onChange }: SidebarTabsProps) {+ return (+ <div style={{+ display: 'flex',+ gap: 0,+ background: 'var(--cth-cream-200)',+ boxShadow: 'inset 0 -2px 0 var(--cth-ink-900)',+ flexShrink: 0+ }}>+ {TABS.map(t => {+ const active = current === t.key;+ return (+ <button+ key={t.key}+ onClick={() => onChange(t.key)}+ style={{+ flex: 1,+ height: 36,+ padding: '0 10px',+ border: 'none',+ cursor: 'pointer',+ background: active ? 'var(--cth-cream-100)' : 'transparent',+ boxShadow: active+ ? `inset 0 -3px 0 var(--cth-${accent}), inset 1px 0 0 var(--cth-ink-900), inset -1px 0 0 var(--cth-ink-900)`+ : 'inset 0 0 0 0',+ fontFamily: 'var(--cth-font-display)',+ fontSize: 10,+ lineHeight: '14px',+ color: active ? 'var(--cth-ink-900)' : 'var(--cth-ink-500)',+ display: 'inline-flex',+ alignItems: 'center',+ justifyContent: 'center',+ gap: 6+ }}+ >+ <Icon name={t.icon} /> {t.label.toUpperCase()}+ </button>+ );+ })}+ </div>+ );+}diff --git a/src/renderer/src/components/SpritePortrait.tsx b/src/renderer/src/components/SpritePortrait.tsxnew file mode 100644index 00000000..1bb20154--- /dev/null+++ b/src/renderer/src/components/SpritePortrait.tsx@@ -0,0 +1,50 @@+import { useEffect, useRef } from 'react';+import { paintCastPortrait, type OfficeCharacterName } from '@/scene/office/cast';+import { PORTRAIT_W, PORTRAIT_H } from '@/scene/office/portraitArt';++const FRAME_W = PORTRAIT_W;+const FRAME_H = PORTRAIT_H;++export interface SpritePortraitProps {+ character: OfficeCharacterName;+ scale?: number; // integer+ background?: string;+}++/** Static standing portrait of an Office cast member (recolored LimeZu sprite). */+export function SpritePortrait({+ character,+ scale = 2,+ background = 'transparent'+}: SpritePortraitProps) {+ const canvasRef = useRef<HTMLCanvasElement | null>(null);++ useEffect(() => {+ const canvas = canvasRef.current;+ if (!canvas) return;+ const ctx = canvas.getContext('2d');+ if (!ctx) return;+ let cancelled = false;+ ctx.imageSmoothingEnabled = false;+ ctx.clearRect(0, 0, canvas.width, canvas.height);+ if (background !== 'transparent') {+ ctx.fillStyle = background;+ ctx.fillRect(0, 0, canvas.width, canvas.height);+ }+ paintCastPortrait(ctx, character, scale).catch(() => { /* asset load race */ });+ return () => { cancelled = true; void cancelled; };+ }, [character, scale, background]);++ return (+ <canvas+ ref={canvasRef}+ width={FRAME_W * scale}+ height={FRAME_H * scale}+ style={{+ width: FRAME_W * scale,+ height: FRAME_H * scale,+ imageRendering: 'pixelated'+ }}+ />+ );+}diff --git a/src/renderer/src/components/TerminalView.tsx b/src/renderer/src/components/TerminalView.tsxnew file mode 100644index 00000000..c967e6de--- /dev/null+++ b/src/renderer/src/components/TerminalView.tsx@@ -0,0 +1,118 @@+import { useEffect, useRef } from 'react';+import { Terminal } from '@xterm/xterm';+import { FitAddon } from '@xterm/addon-fit';+import '@xterm/xterm/css/xterm.css';++const theme = {+ background: '#FCFAF0',+ foreground: '#1A1320',+ cursor: '#FF6B6B',+ cursorAccent: '#FCFAF0',+ selectionBackground: '#FFEC99',+ selectionForeground: '#1A1320',+ black: '#1A1320',+ red: '#FF6B6B',+ green: '#6BCF7F',+ yellow: '#FFD93D',+ blue: '#4ECDC4',+ magenta: '#B197FC',+ cyan: '#4ECDC4',+ white: '#FFF8E7',+ brightBlack: '#6B5878',+ brightRed: '#FFB4B4',+ brightGreen: '#B4E5BD',+ brightYellow: '#FFEC99',+ brightBlue: '#A8E6E0',+ brightMagenta:'#D6C5FF',+ brightCyan: '#A8E6E0',+ brightWhite: '#FFFDF5'+};++export interface TerminalViewProps {+ initialLines?: string[];+ feed?: string[]; // appended lines (replaced each render — we diff naively)+}++export function TerminalView({ initialLines = [], feed = [] }: TerminalViewProps) {+ const hostRef = useRef<HTMLDivElement | null>(null);+ const termRef = useRef<Terminal | null>(null);+ const fitRef = useRef<FitAddon | null>(null);+ const writtenCount = useRef(0);++ useEffect(() => {+ if (!hostRef.current) return;+ const term = new Terminal({+ theme,+ fontFamily: 'VT323, monospace',+ fontSize: 18,+ lineHeight: 1.0,+ cursorBlink: true,+ cursorStyle: 'block',+ scrollback: 5000,+ convertEol: true,+ allowProposedApi: true+ });+ const fit = new FitAddon();+ term.loadAddon(fit);+ term.open(hostRef.current);+ setTimeout(() => fit.fit(), 0);+ termRef.current = term;+ fitRef.current = fit;++ for (const line of initialLines) term.writeln(line);+ writtenCount.current = initialLines.length;++ const onResize = () => fit.fit();+ window.addEventListener('resize', onResize);+ return () => {+ window.removeEventListener('resize', onResize);+ term.dispose();+ termRef.current = null;+ };+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, []);++ useEffect(() => {+ const term = termRef.current;+ if (!term) return;+ // Write only new lines beyond `writtenCount` to avoid duplicating+ const base = initialLines.length;+ const total = base + feed.length;+ if (writtenCount.current < total) {+ for (let i = writtenCount.current - base; i < feed.length; i++) {+ if (i < 0) continue;+ term.writeln(feed[i]);+ }+ writtenCount.current = total;+ }+ }, [feed, initialLines.length]);++ return (+ <div style={{+ background: 'var(--cth-paper-100)',+ boxShadow: 'var(--cth-panel-border-terminal)',+ padding: 8,+ height: '100%',+ minHeight: 0,+ display: 'flex',+ flexDirection: 'column'+ }}>+ <div style={{+ display: 'flex', alignItems: 'center', gap: 6,+ fontFamily: 'var(--cth-font-ui)',+ fontSize: 13,+ color: 'var(--cth-ink-500)',+ borderBottom: '1px dashed var(--cth-ink-300)',+ paddingBottom: 4,+ marginBottom: 4+ }}>+ <span style={{+ width: 8, height: 8, background: 'var(--cth-coral)',+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)'+ }} />+ live · pipe-pane+ </div>+ <div ref={hostRef} style={{ flex: 1, minHeight: 0 }} />+ </div>+ );+}diff --git a/src/renderer/src/components/git/CommitGraph.tsx b/src/renderer/src/components/git/CommitGraph.tsxnew file mode 100644index 00000000..ba78e598--- /dev/null+++ b/src/renderer/src/components/git/CommitGraph.tsx@@ -0,0 +1,90 @@+import { useMemo } from 'react';+import { CommitGraph as LibCommitGraph, type Commit, type Branch } from 'commit-graph';++interface CommitLite {+ sha: string;+ shortSha: string;+ parents: string[];+ subject: string;+ author: string;+ time: number;+ refs: string[];+}++export interface CommitGraphProps {+ commits: CommitLite[];+ /** Name of the currently checked-out branch, for highlighting. */+ currentBranch?: string | null;+}++// CTH palette → branch lane colors (commit-graph renders raw colors into SVG).+const BRANCH_COLORS = [+ '#4ECDC4', // sky+ '#FFD93D', // lemon+ '#6BCF7F', // mint+ '#FF6B6B', // coral+ '#B197FC', // lilac+ '#FFA07A' // peach+];++const GRAPH_STYLE = {+ commitSpacing: 28,+ branchSpacing: 18,+ nodeRadius: 4,+ branchColors: BRANCH_COLORS+};++function relTime(d: string | number | Date): string {+ const t = typeof d === 'number' ? d / 1000 : new Date(d).getTime() / 1000;+ const delta = Date.now() / 1000 - t;+ if (delta < 60) return `${Math.round(delta)}s`;+ if (delta < 3600) return `${Math.round(delta / 60)}m`;+ if (delta < 86400) return `${Math.round(delta / 3600)}h`;+ if (delta < 86400 * 30) return `${Math.round(delta / 86400)}d`;+ return `${Math.round(delta / (86400 * 30))}mo`;+}++export function CommitGraph({ commits, currentBranch }: CommitGraphProps) {+ // Adapt our flat git-log rows into the GitHub-style shape commit-graph expects.+ const libCommits: Commit[] = useMemo(() => commits.map(c => ({+ sha: c.sha,+ commit: {+ author: { name: c.author, date: c.time * 1000 },+ message: c.subject+ },+ parents: c.parents.map(sha => ({ sha }))+ })), [commits]);++ // Branch tips come from the refs git attached to each commit.+ const branchHeads: Branch[] = useMemo(() => {+ const seen = new Set<string>();+ const heads: Branch[] = [];+ for (const c of commits) {+ for (const ref of c.refs) {+ const name = ref.replace('HEAD -> ', '').trim();+ if (!name || name === 'HEAD' || name.startsWith('tag:')) continue;+ if (seen.has(name)) continue;+ seen.add(name);+ heads.push({ name, commit: { sha: c.sha } });+ }+ }+ // Fallback: detached HEAD or no decorations — anchor a head at the newest+ // commit so the library still has a tip to lay out and colour lanes from.+ if (heads.length === 0 && commits.length > 0) {+ heads.push({ name: currentBranch || 'HEAD', commit: { sha: commits[0].sha } });+ }+ return heads;+ }, [commits, currentBranch]);++ return (+ <div className="cth-commit-graph" style={{ padding: '4px 8px', minWidth: 0 }}>+ <LibCommitGraph+ commits={libCommits}+ branchHeads={branchHeads}+ graphStyle={GRAPH_STYLE}+ currentBranch={currentBranch ?? undefined}+ dateFormatFn={relTime}+ />+ </div>+ );+}diff --git a/src/renderer/src/components/git/graph.ts b/src/renderer/src/components/git/graph.tsnew file mode 100644index 00000000..ebab1071--- /dev/null+++ b/src/renderer/src/components/git/graph.ts@@ -0,0 +1,79 @@+// Lay out a list of commits into swim lanes for a left-side graph rail.+// We don't try to match `git log --graph` exactly — instead we walk the+// commits top-to-bottom, assigning each one to the leftmost free lane and+// drawing connections to its parents in the lanes they occupy.++export interface CommitInput {+ sha: string;+ parents: string[];+}++export interface CommitLayout {+ sha: string;+ /** lane this commit's dot sits in */+ lane: number;+ /** parents and the lane they live in (or -1 if not in window) */+ parents: Array<{ sha: string; lane: number }>;+}++export interface GraphLayout {+ rows: CommitLayout[];+ /** max lane index used */+ maxLane: number;+}++export function layoutGraph(commits: CommitInput[]): GraphLayout {+ // `lanes[i]` = sha that lane i is currently "expecting" as the next commit, or undefined+ const lanes: (string | undefined)[] = [];+ const rows: CommitLayout[] = [];+ let maxLane = 0;++ // Initially nothing is expected; lanes get populated as commits introduce parents.+ for (const c of commits) {+ // Pick the lane for this commit+ let lane = lanes.findIndex(s => s === c.sha);+ if (lane === -1) {+ // No descendant; allocate a fresh lane on the right of the busy area+ lane = lanes.findIndex(s => s === undefined);+ if (lane === -1) { lane = lanes.length; lanes.push(c.sha); }+ else lanes[lane] = c.sha;+ }+ // The commit occupies `lane`; its parents will continue in lanes.+ // The first parent stays in our lane; additional parents go to fresh lanes.+ const parents: CommitLayout['parents'] = [];+ if (c.parents.length === 0) {+ lanes[lane] = undefined;+ } else {+ for (let i = 0; i < c.parents.length; i++) {+ const p = c.parents[i];+ if (i === 0) {+ lanes[lane] = p;+ parents.push({ sha: p, lane });+ } else {+ // Place in new lane (leftmost free)+ let pl = lanes.findIndex(s => s === undefined);+ if (pl === -1) { pl = lanes.length; lanes.push(p); }+ else lanes[pl] = p;+ parents.push({ sha: p, lane: pl });+ }+ }+ }+ // Compact: trim trailing undefined lanes+ while (lanes.length > 0 && lanes[lanes.length - 1] === undefined) lanes.pop();++ rows.push({ sha: c.sha, lane, parents });+ if (lane > maxLane) maxLane = lane;+ for (const p of parents) if (p.lane > maxLane) maxLane = p.lane;+ }+ return { rows, maxLane };+}++// Color cycle per lane for the rail+export const LANE_COLORS = [+ 'var(--cth-sky)',+ 'var(--cth-lemon)',+ 'var(--cth-mint)',+ 'var(--cth-coral)',+ 'var(--cth-lilac)',+ 'var(--cth-peach)'+];diff --git a/src/renderer/src/components/terminalPool.ts b/src/renderer/src/components/terminalPool.tsnew file mode 100644index 00000000..2c7b4666--- /dev/null+++ b/src/renderer/src/components/terminalPool.ts@@ -0,0 +1,119 @@+/**+ * A process-wide pool of live xterm terminals, one per ptyId.+ *+ * Why: node-pty keeps no scrollback. If we created/disposed an xterm every time+ * the user switched agents (or toggled fullscreen), the new terminal would be+ * empty and stay blank until the TUI happened to repaint — which is exactly the+ * "terminal vanishes until I drag the splitter" bug.+ *+ * Instead each pty gets ONE Terminal for the app's lifetime. It is opened into a+ * detached host <div> and subscribes to the pty stream once, so its buffer is+ * always populated. A view (the sidebar tab or the fullscreen overlay) simply+ * re-parents that host element into itself when it mounts and detaches it on+ * unmount — the rendered content moves with it, so the terminal is always+ * visible immediately, no repaint required.+ */+import { Terminal } from '@xterm/xterm';+import { FitAddon } from '@xterm/addon-fit';+import '@xterm/xterm/css/xterm.css';++export interface TerminalEntry {+ term: Terminal;+ fit: FitAddon;+ /** The element xterm renders into; views re-parent this in/out of the DOM. */+ host: HTMLDivElement;+ /** xterm is only `open()`ed once its host is first attached to the document. */+ opened: boolean;+ exited: boolean;+ /** Stream subscriptions to tear down on dispose. */+ unsub: Array<() => void>;+ /** Current consumer callbacks — set by whichever view is mounted. */+ onData?: (chunk: string) => void;+ onPrompt?: (text: string) => void;+}++const pool = new Map<string, TerminalEntry>();++type ThemeMap = Record<string, string>;++/** Get (or lazily create) the persistent terminal for a pty. Theme/font are+ * only used at creation; an attaching view re-applies its own afterwards. */+export function acquireTerminal(ptyId: string, theme?: ThemeMap, fontSize = 14): TerminalEntry {+ const existing = pool.get(ptyId);+ if (existing) return existing;++ const host = document.createElement('div');+ host.style.width = '100%';+ host.style.height = '100%';++ const term = new Terminal({+ theme,+ fontFamily: 'VT323, monospace',+ fontSize,+ lineHeight: 1.0,+ cursorBlink: true,+ cursorStyle: 'block',+ scrollback: 10000,+ allowProposedApi: true+ });+ const fit = new FitAddon();+ term.loadAddon(fit);+ // NOTE: don't open() yet — xterm needs its host connected to the document to+ // measure correctly. We open on first attach (see attachTerminal).++ const entry: TerminalEntry = { term, fit, host, opened: false, exited: false, unsub: [] };++ // Subscribe to the pty stream ONCE for the terminal's whole lifetime, so the+ // buffer keeps filling even while this terminal isn't mounted in any view.+ entry.unsub.push(window.cth.onPtyData(ptyId, (chunk) => {+ term.write(chunk);+ entry.onData?.(chunk);+ }));+ entry.unsub.push(window.cth.onPtyExit(ptyId, ({ exitCode, signal }) => {+ entry.exited = true;+ term.writeln(`\r\n\x1b[2m─ process exited (code ${exitCode}${signal ? `, signal ${signal}` : ''}) ─\x1b[0m`);+ }));++ // Keystrokes → pty. A small line buffer surfaces the last submitted prompt.+ let lineBuf = '';+ term.onData((data) => {+ if (entry.exited) return;+ window.cth.writePty(ptyId, data);+ for (let i = 0; i < data.length; i++) {+ const ch = data[i];+ if (ch === '\r' || ch === '\n') {+ const t = lineBuf.trim();+ lineBuf = '';+ if (t.length >= 2) entry.onPrompt?.(t);+ } else if (ch === '\x7f' || ch === '\b') {+ lineBuf = lineBuf.slice(0, -1);+ } else if (ch === '\x1b') {+ break; // skip escape sequences (arrow keys, etc.)+ } else if (ch >= ' ') {+ lineBuf += ch;+ }+ }+ });++ pool.set(ptyId, entry);+ return entry;+}++/** Re-parent a pty's terminal into `container`, opening xterm on first attach. */+export function attachTerminal(entry: TerminalEntry, container: HTMLElement): void {+ container.appendChild(entry.host);+ if (!entry.opened) {+ entry.term.open(entry.host);+ entry.opened = true;+ }+}++/** Tear down a pty's terminal (call when the agent/pty is gone for good). */+export function disposeTerminal(ptyId: string): void {+ const entry = pool.get(ptyId);+ if (!entry) return;+ entry.unsub.forEach((u) => { try { u(); } catch { /* noop */ } });+ try { entry.term.dispose(); } catch { /* noop */ }+ entry.host.remove();+ pool.delete(ptyId);+}diff --git a/src/renderer/src/design/global.css b/src/renderer/src/design/global.cssnew file mode 100644index 00000000..fe9934fb--- /dev/null+++ b/src/renderer/src/design/global.css@@ -0,0 +1,85 @@+@import './tokens.css';++*, *::before, *::after { box-sizing: border-box; }++html, body, #root {+ margin: 0;+ height: 100%;+ background: var(--cth-cream-100);+ color: var(--cth-ink-900);+ font-family: var(--cth-font-ui);+ font-size: var(--cth-text-body-md);+ line-height: var(--cth-lh-body-md);+ overflow: hidden;+}++body {+ /* tiny diagonal cream noise — pure CSS, no images */+ background-image:+ repeating-linear-gradient(+ 45deg,+ rgba(232, 217, 160, 0.20) 0 1px,+ transparent 1px 6px+ );+}++button, input, textarea, select {+ font-family: inherit;+ font-size: inherit;+ color: inherit;+}++/* Pixel-snapping for any rasterised content */+canvas, img, svg { image-rendering: pixelated; image-rendering: crisp-edges; }++/* Focus ring — 2px outer offset, ink */+:focus-visible {+ outline: 2px solid var(--cth-ink-900);+ outline-offset: 2px;+}++/* Custom scrollbar — chunky, pixel-feel */+::-webkit-scrollbar { width: 12px; height: 12px; }+::-webkit-scrollbar-track {+ background: var(--cth-cream-200);+ box-shadow: inset 0 0 0 1px var(--cth-ink-700);+}+::-webkit-scrollbar-thumb {+ background: var(--cth-ink-700);+ box-shadow: inset 0 0 0 1px var(--cth-ink-900);+}+::-webkit-scrollbar-thumb:hover { background: var(--cth-ink-900); }++/* commit-graph (open-source git visualiser) — harmonise with the pixel theme */+.cth-commit-graph { background: var(--cth-paper-100); }+.cth-commit-graph,+.cth-commit-graph * {+ font-family: var(--cth-font-ui) !important;+ color: var(--cth-ink-900);+}+/* monospace for hashes / dates so they read like the rest of the app */+.cth-commit-graph .commit-hash,+.cth-commit-graph .commitHash,+.cth-commit-graph time {+ font-family: var(--cth-font-mono) !important;+ color: var(--cth-ink-500);+}++/* Drag region for hidden inset title bar (mac) */+.cth-titlebar-drag { -webkit-app-region: drag; }+.cth-titlebar-nodrag { -webkit-app-region: no-drag; }++/* Keyframes — pixel-style: step-based, no easing */+@keyframes cth-blink {+ 0%, 49% { opacity: 1; }+ 50%, 100% { opacity: 0; }+}+@keyframes cth-pulse {+ 0%, 49% { transform: scale(1); }+ 50%, 100% { transform: scale(0.7); }+}++/* Reduce motion */+@media (prefers-reduced-motion: reduce) {+ * { animation-duration: 0s !important; transition-duration: 0s !important; }+}diff --git a/src/renderer/src/design/tokens.css b/src/renderer/src/design/tokens.cssnew file mode 100644index 00000000..f729e68d--- /dev/null+++ b/src/renderer/src/design/tokens.css@@ -0,0 +1,90 @@+/* Design tokens — mirrors tokens.ts. Update both together. */+:root {+ /* Base */+ --cth-cream-50: #FFFDF5;+ --cth-cream-100: #FFF8E7;+ --cth-cream-200: #F4E9C7;+ --cth-cream-300: #E8D9A0;+ --cth-paper-100: #FCFAF0;+ --cth-paper-200: #F0EAD2;++ /* Ink */+ --cth-ink-900: #1A1320;+ --cth-ink-700: #3D2E4A;+ --cth-ink-500: #6B5878;+ --cth-ink-300: #A899B5;+ --cth-ink-100: #D9CFE0;++ /* Accents */+ --cth-coral: #FF6B6B; --cth-coral-light: #FFB4B4;+ --cth-mint: #6BCF7F; --cth-mint-light: #B4E5BD;+ --cth-sky: #4ECDC4; --cth-sky-light: #A8E6E0;+ --cth-lemon: #FFD93D; --cth-lemon-light: #FFEC99;+ --cth-lilac: #B197FC; --cth-lilac-light: #D6C5FF;+ --cth-peach: #FFA07A; --cth-peach-light: #FFD0B5;++ /* Status */+ --cth-status-idle: #A899B5;+ --cth-status-thinking: #4ECDC4;+ --cth-status-working: #FFD93D;+ --cth-status-waiting: #6C8EF5;+ --cth-status-blocked: #FF6B6B;+ --cth-status-success: #6BCF7F;+ --cth-status-ghost: #D9CFE0;++ /* Spacing */+ --cth-space-0: 0px;+ --cth-space-1: 4px;+ --cth-space-2: 8px;+ --cth-space-3: 12px;+ --cth-space-4: 16px;+ --cth-space-5: 24px;+ --cth-space-6: 32px;+ --cth-space-7: 48px;+ --cth-space-8: 64px;++ /* Type */+ --cth-font-display: "Press Start 2P", monospace;+ --cth-font-ui: "Pixelify Sans", system-ui, sans-serif;+ --cth-font-mono: "VT323", "JetBrains Mono", monospace;++ /* Type scale */+ --cth-text-display-lg: 16px;+ --cth-text-display-md: 12px;+ --cth-text-display-sm: 8px;+ --cth-text-body-lg: 18px;+ --cth-text-body-md: 16px;+ --cth-text-body-sm: 14px;+ --cth-text-mono-md: 16px;+ --cth-text-mono-sm: 14px;++ /* Line heights — integer multiples */+ --cth-lh-display-lg: 24px;+ --cth-lh-display-md: 20px;+ --cth-lh-display-sm: 12px;+ --cth-lh-body-lg: 24px;+ --cth-lh-body-md: 20px;+ --cth-lh-body-sm: 18px;+ --cth-lh-mono: 20px;++ /* Hard drop shadow — no blur */+ --cth-shadow-hard: 4px 4px 0 rgba(26, 19, 32, 0.25);++ /* Panel border package — three layers via box-shadow inset */+ --cth-panel-border:+ inset 0 0 0 1px var(--cth-ink-700),+ inset 0 0 0 3px var(--cth-cream-200),+ inset 0 0 0 5px var(--cth-ink-900);+ --cth-panel-border-inset:+ inset 0 0 0 1px var(--cth-ink-500),+ inset 0 0 0 3px var(--cth-cream-100),+ inset 0 0 0 5px var(--cth-ink-700);+ --cth-panel-border-terminal:+ inset 0 0 0 1px var(--cth-ink-500),+ inset 0 0 0 3px var(--cth-ink-700),+ inset 0 0 0 5px var(--cth-ink-900);+ --cth-panel-border-dialog:+ inset 0 0 0 1px var(--cth-ink-700),+ inset 0 0 0 3px var(--cth-cream-200),+ inset 0 0 0 5px var(--cth-ink-900);+}diff --git a/src/renderer/src/design/tokens.ts b/src/renderer/src/design/tokens.tsnew file mode 100644index 00000000..74a60dbb--- /dev/null+++ b/src/renderer/src/design/tokens.ts@@ -0,0 +1,90 @@+// Design tokens — single source of truth. Mirrors tokens.css for non-styled consumers (Pixi).+// Any change here must also update tokens.css.++export const colors = {+ cream: {+ 50: 0xfffdf5,+ 100: 0xfff8e7,+ 200: 0xf4e9c7,+ 300: 0xe8d9a0+ },+ paper: {+ 100: 0xfcfaf0,+ 200: 0xf0ead2+ },+ ink: {+ 900: 0x1a1320,+ 700: 0x3d2e4a,+ 500: 0x6b5878,+ 300: 0xa899b5,+ 100: 0xd9cfe0+ },+ accent: {+ coral: 0xff6b6b,+ coralLight: 0xffb4b4,+ mint: 0x6bcf7f,+ mintLight: 0xb4e5bd,+ sky: 0x4ecdc4,+ skyLight: 0xa8e6e0,+ lemon: 0xffd93d,+ lemonLight: 0xffec99,+ lilac: 0xb197fc,+ lilacLight: 0xd6c5ff,+ peach: 0xffa07a,+ peachLight: 0xffd0b5+ },+ status: {+ idle: 0xa899b5,+ thinking: 0x4ecdc4,+ working: 0xffd93d,+ blocked: 0xff6b6b,+ success: 0x6bcf7f,+ ghost: 0xd9cfe0+ },+ world: {+ grassLight: 0xd4eab0,+ grassDark: 0xb5d589,+ woodLight: 0xe5c896,+ woodDark: 0xc9a66b,+ path: 0xe8d8b0,+ wall: 0x8b6f47+ }+} as const;++export const space = {+ 0: 0, 1: 4, 2: 8, 3: 12, 4: 16, 5: 24, 6: 32, 7: 48, 8: 64+} as const;++export const type = {+ display: '"Press Start 2P", monospace',+ ui: '"Pixelify Sans", system-ui, sans-serif',+ mono: '"VT323", "JetBrains Mono", monospace'+} as const;++export const tileSize = 32; // px — the world is built from 32×32 tiles++export type AccentColorName =+ | 'coral' | 'mint' | 'sky' | 'lemon' | 'lilac' | 'peach';++export const accentByName: Record<AccentColorName, number> = {+ coral: colors.accent.coral,+ mint: colors.accent.mint,+ sky: colors.accent.sky,+ lemon: colors.accent.lemon,+ lilac: colors.accent.lilac,+ peach: colors.accent.peach+};++export const accentLightByName: Record<AccentColorName, number> = {+ coral: colors.accent.coralLight,+ mint: colors.accent.mintLight,+ sky: colors.accent.skyLight,+ lemon: colors.accent.lemonLight,+ lilac: colors.accent.lilacLight,+ peach: colors.accent.peachLight+};++// Convert 0xRRGGBB to "#RRGGBB"+export function hex(c: number): string {+ return '#' + c.toString(16).padStart(6, '0').toUpperCase();+}diff --git a/src/renderer/src/hooks/useHive.ts b/src/renderer/src/hooks/useHive.tsnew file mode 100644index 00000000..c8cac3b0--- /dev/null+++ b/src/renderer/src/hooks/useHive.ts@@ -0,0 +1,142 @@+import { useEffect, useRef } from 'react';+import { useStore, type Agent, type StationKind, type ToolKind } from '@/store/store';+import { buildSpawnCommand, type HarnessConfig } from '@/store/config';++const GOD_ID = 'god';+const GOD_PTY = `pty-${GOD_ID}`;++/**+ * Type a line into an agent's Claude Code TUI and actually submit it.+ *+ * Writing the text and the carriage return in a single chunk makes the TUI+ * treat the whole thing as a paste, so the "\r" lands as a newline inside the+ * input box instead of submitting — the command just sits there as text. We+ * send the text first, then the Enter as a separate keystroke a tick later so+ * the prompt is registered and executed. Idle autonomous agents thus act on a+ * dispatched instruction on their own. */+async function submitToPty(ptyId: string, text: string): Promise<void> {+ await window.cth.writePty(ptyId, text);+ await new Promise((r) => setTimeout(r, 140));+ await window.cth.writePty(ptyId, '\r');+}++/** Tool name → where the avatar walks + what it carries. */+const TOOL_STATION: Record<string, { station: StationKind; carry?: ToolKind }> = {+ Read: { station: 'shelf', carry: 'Read' },+ Edit: { station: 'desk', carry: 'Edit' },+ Write: { station: 'desk', carry: 'Write' },+ Bash: { station: 'terminal', carry: 'Bash' },+ Grep: { station: 'shelf', carry: 'Grep' },+ Glob: { station: 'shelf', carry: 'Glob' },+ WebFetch: { station: 'web', carry: 'WebFetch' },+ WebSearch: { station: 'web', carry: 'WebSearch' },+ TodoWrite: { station: 'board', carry: 'TodoWrite' }+};++/**+ * The renderer-side glue for the hive:+ * 1. spawns the god agent into Michael's room when none is running,+ * 2. drives avatar state from real Claude Code hook events, and+ * 3. wakes idle agents that have unread inbox messages so collaboration+ * doesn't stall while an agent sits at its prompt.+ */+export function useHive(config: HarnessConfig | null): void {+ const nudged = useRef<Record<string, number>>({});++ // 1) Bootstrap the god agent (source of truth = live PTYs, to dodge restarts).+ useEffect(() => {+ if (!config?.onboardingComplete || !config.harnessHome) return;+ let cancelled = false;+ const t = setTimeout(async () => {+ if (cancelled) return;+ const live = await window.cth.listPtys().catch(() => []);+ if (cancelled || live.some((p) => p.id === GOD_PTY)) return; // already running+ useStore.getState().removeAgent(GOD_ID); // clear any stale restored entry++ const command = buildSpawnCommand(config);+ const [exe, ...args] = command.trim().split(/\s+/);+ const res = await window.cth.spawnPty({+ id: GOD_PTY,+ cwd: config.harnessHome!,+ command: exe,+ args,+ cols: 100,+ rows: 30,+ hive: { id: GOD_ID, name: 'Michael', cwd: config.harnessHome!, isGod: true, role: 'orchestrator (god)' }+ });+ if (!res.ok || cancelled) return;+ const god: Agent = {+ id: GOD_ID,+ name: 'Michael',+ character: 'michael',+ accent: 'lemon',+ description: 'god — runs the floor, triages requests, escalates only critical calls to you',+ project: 'hive',+ tmuxTarget: '',+ cwd: config.harnessHome!,+ status: 'idle',+ action: 'running the floor',+ progress: 0,+ currentStation: 'desk',+ ptyId: GOD_PTY,+ command: command.trim(),+ isGod: true,+ recentTextTs: Date.now()+ };+ useStore.getState().addAgent(god);+ }, 1200);+ return () => { cancelled = true; clearTimeout(t); };+ }, [config?.onboardingComplete, config?.harnessHome]);++ // 2) Drive avatars from real hook events emitted by each agent's shim.+ useEffect(() => {+ return window.cth.onHiveHookEvent((e) => {+ if (!e.agentId) return;+ const { updateAgent, agents } = useStore.getState();+ const self = agents.find((a) => a.id === e.agentId);+ if (!self) return;+ // Hook events are the authoritative status source for real agents (the+ // pty-stream parser only refines the on-floor action/station).+ if (e.event === 'PreToolUse' && e.tool) {+ const m = TOOL_STATION[e.tool] ?? { station: 'desk' as StationKind };+ updateAgent(e.agentId, { status: 'working', currentStation: m.station, carrying: m.carry, action: `using ${e.tool}` });+ } else if (e.event === 'PostToolUse' || e.event === 'UserPromptSubmit') {+ // A turn is in progress (prompt submitted / tool just finished) — keep+ // it working so it doesn't flicker idle between tool calls.+ updateAgent(e.agentId, { status: 'working' });+ } else if (e.event === 'Stop' || e.event === 'SubagentStop') {+ updateAgent(e.agentId, { status: 'idle', action: 'idle', carrying: undefined });+ } else if (e.event === 'Notification') {+ // Only the god agent escalates to the human ("needs you"). Sub-agents+ // are autonomous — a notification means they're parked waiting on god,+ // not on you, so they read as "waiting" rather than "blocked".+ updateAgent(e.agentId, { status: self.isGod ? 'blocked' : 'waiting' });+ }+ });+ }, []);++ // 3) Wake idle agents holding unread inbox messages.+ useEffect(() => {+ if (!config?.onboardingComplete) return;+ const iv = setInterval(async () => {+ const agents = useStore.getState().agents.filter(+ (a) => a.ptyId && (a.status === 'idle' || a.status === 'waiting')+ );+ for (const a of agents) {+ try {+ const count = (await window.cth.hiveInbox(a.id)).length;+ if (count > 0 && nudged.current[a.id] !== count) {+ nudged.current[a.id] = count;+ await submitToPty(+ a.ptyId!,+ 'You have new hive inbox message(s) — read your inbox, act on them now, and move handled ones to inbox/.done/. Act autonomously; only message god if you genuinely need a decision.'+ );+ } else if (count === 0) {+ nudged.current[a.id] = 0;+ }+ } catch { /* ignore */ }+ }+ }, 4000);+ return () => clearInterval(iv);+ }, [config?.onboardingComplete]);+}diff --git a/src/renderer/src/hooks/usePtyParser.ts b/src/renderer/src/hooks/usePtyParser.tsnew file mode 100644index 00000000..93d18028--- /dev/null+++ b/src/renderer/src/hooks/usePtyParser.ts@@ -0,0 +1,163 @@+import { useCallback, useEffect, useRef } from 'react';+import { useStore, type ToolKind, type StationKind } from '@/store/store';++// ANSI escape sequence stripper — Claude colors its tool tags with these.+const ANSI_RE = /\x1b\[[0-9;]*m/g;++// Tool call lines look like: `● Read SPEC.md`, `● Bash npm test`, `● Edit src/foo.ts`+const TOOL_RE = /●\s+([A-Za-z][A-Za-z_]*)(?:\s+(.+))?/g;++const TOOL_TO_STATION: Record<string, StationKind> = {+ Read: 'shelf', Edit: 'shelf', Write: 'shelf', MultiEdit: 'shelf',+ Grep: 'shelf', Glob: 'shelf',+ Bash: 'terminal', BashOutput: 'terminal',+ WebFetch: 'web', WebSearch: 'web',+ TodoWrite: 'board', TaskCreate: 'board', TaskUpdate: 'board'+};++const TOOLKIND_BY_NAME: Record<string, ToolKind> = {+ Read: 'Read', Edit: 'Edit', Write: 'Write',+ Bash: 'Bash',+ WebFetch: 'WebFetch', WebSearch: 'WebSearch',+ Grep: 'Grep', Glob: 'Glob',+ TodoWrite: 'TodoWrite'+};++// "Blocked" = Claude is genuinely waiting on the user. Match only real prompts+// (the approval menu / a yes-no question). Do NOT match the bare word+// "permission": the TUI footer always shows "bypass permissions on (shift+tab+// to cycle)", which would otherwise flag a busy agent as blocked on every+// repaint — making it flip-flop between working and blocked.+const BLOCK_HINTS = [+ /Do you want to proceed/i,+ /❯\s*\d+\.\s*Yes/i, // numbered approval menu, cursor on "1. Yes"+ /Yes, and don't ask again/i,+ /\(y\/n\)/i,+ /\[y\/n\]/i,+];++/**+ * Subscribe to a pty stream and update the agent's avatar state based on what+ * scrolls past. This is a stopgap until we wire real Claude Code hooks — it+ * inspects the visible terminal output and infers status / station / carrying.+ *+ * Returns a function suitable for `<PtyTerminalView onStreamData={...} />`.+ */+export function usePtyParser(agentId: string) {+ const updateAgent = useStore(s => s.updateAgent);+ const pushFeed = useStore(s => s.pushFeed);+ const idleTimerRef = useRef<number | null>(null);++ const scheduleIdle = useCallback(() => {+ if (idleTimerRef.current !== null) {+ window.clearTimeout(idleTimerRef.current);+ }+ idleTimerRef.current = window.setTimeout(() => {+ // No new tool calls for ~4 s → assume the model went idle+ updateAgent(agentId, {+ status: 'idle',+ action: 'awaiting',+ description: 'on standby',+ carrying: undefined,+ currentStation: 'desk'+ });+ }, 4000) as unknown as number;+ }, [agentId, updateAgent]);++ const cancelIdle = useCallback(() => {+ if (idleTimerRef.current !== null) {+ window.clearTimeout(idleTimerRef.current);+ idleTimerRef.current = null;+ }+ }, []);++ useEffect(() => {+ return () => {+ if (idleTimerRef.current !== null) {+ window.clearTimeout(idleTimerRef.current);+ }+ };+ }, []);++ return useCallback((chunk: string) => {+ const text = chunk.replace(ANSI_RE, '');+ if (!text.trim()) return;++ // The "esc to interrupt" footer is only shown while a turn is in progress.+ const running = /esc to interrupt/i.test(text);++ let lastTool: string | null = null;+ let lastArg: string | null = null;++ TOOL_RE.lastIndex = 0;+ for (let m: RegExpExecArray | null; (m = TOOL_RE.exec(text)) !== null; ) {+ lastTool = m[1];+ lastArg = (m[2] ?? '').trim();+ }++ if (lastTool) {+ const station = TOOL_TO_STATION[lastTool] ?? 'desk';+ const carrying = TOOLKIND_BY_NAME[lastTool] ?? undefined;+ const summary = lastArg ? `${lastTool.toLowerCase()} ${lastArg}` : lastTool.toLowerCase();+ updateAgent(agentId, {+ status: 'working',+ action: summary,+ description: summary,+ currentStation: station,+ carrying,+ progress: 0 // we can grow this with a counter later+ });+ // Mirror into the in-app feed so the mock terminal view shows it too if+ // ever toggled — harmless for real ptys.+ pushFeed(agentId, `\x1b[36m● ${lastTool}\x1b[0m ${lastArg ?? ''}`);+ // Keep working while the spinner is up; otherwise allow the idle drift.+ if (running) cancelIdle(); else scheduleIdle();+ return;+ }++ // Actively running but no fresh tool line (model is thinking / streaming+ // prose) → keep the agent working at its desk, don't let it drift to idle.+ if (running) {+ cancelIdle();+ updateAgent(agentId, { status: 'working' });+ return;+ }++ // Not running → a genuine approval/question prompt is on screen.+ const recent = text.slice(-400);+ if (BLOCK_HINTS.some(re => re.test(recent))) {+ // Only the god agent talks to the human, so only it is truly "blocked"+ // (needs you). A sub-agent sitting at a prompt is autonomous — it reads as+ // "waiting" and we don't raise a human-approval card for it.+ const isGod = !!useStore.getState().agents.find((a) => a.id === agentId)?.isGod;+ if (isGod) {+ updateAgent(agentId, {+ status: 'blocked',+ action: 'waiting on you',+ description: 'waiting on you',+ currentStation: 'mailbox',+ blockReason: {+ summary: 'Waiting for your reply',+ detail: 'Claude is waiting for input. Check the terminal for the exact prompt.',+ actions: [+ { label: 'Approve', kind: 'approve', send: 'y\r' },+ { label: 'Deny', kind: 'deny', send: 'n\r' }+ ]+ }+ });+ } else {+ updateAgent(agentId, {+ status: 'waiting',+ action: 'waiting on god',+ description: 'waiting on god',+ currentStation: 'desk',+ blockReason: undefined+ });+ }+ return;+ }++ // Turn finished, no prompt on screen → let it drift to idle.+ scheduleIdle();+ }, [agentId, updateAgent, pushFeed, scheduleIdle, cancelIdle]);+}diff --git a/src/renderer/src/hooks/useTypewriter.ts b/src/renderer/src/hooks/useTypewriter.tsnew file mode 100644index 00000000..20398759--- /dev/null+++ b/src/renderer/src/hooks/useTypewriter.ts@@ -0,0 +1,37 @@+import { useEffect, useState } from 'react';++/**+ * Reveal `text` character by character.+ * `seed` resets the animation when it changes — pass a timestamp so identical+ * strings re-stream when the agent emits the same line twice.+ *+ * @param text The full string to reveal.+ * @param seed Any value; changing it restarts the typewriter.+ * @param cps Characters per second. Default 90.+ */+export function useTypewriter(text: string, seed: unknown, cps = 90): {+ shown: string;+ done: boolean;+} {+ const [shown, setShown] = useState('');+ const [done, setDone] = useState(false);++ useEffect(() => {+ setShown('');+ setDone(false);+ if (!text) { setDone(true); return; }+ let i = 0;+ const intervalMs = Math.max(8, Math.floor(1000 / cps));+ const id = window.setInterval(() => {+ i++;+ setShown(text.slice(0, i));+ if (i >= text.length) {+ window.clearInterval(id);+ setDone(true);+ }+ }, intervalMs);+ return () => window.clearInterval(id);+ }, [text, seed, cps]);++ return { shown, done };+}diff --git a/src/renderer/src/main.tsx b/src/renderer/src/main.tsxnew file mode 100644index 00000000..9c838055--- /dev/null+++ b/src/renderer/src/main.tsx@@ -0,0 +1,13 @@+import { StrictMode } from 'react';+import { createRoot } from 'react-dom/client';+import { App } from './App';+import './design/global.css';++const root = document.getElementById('root');+if (!root) throw new Error('No root element');++createRoot(root).render(+ <StrictMode>+ <App />+ </StrictMode>+);diff --git a/src/renderer/src/scene/office/Camera.ts b/src/renderer/src/scene/office/Camera.tsnew file mode 100644index 00000000..f6239d93--- /dev/null+++ b/src/renderer/src/scene/office/Camera.ts@@ -0,0 +1,110 @@+import { Container } from 'pixi.js';++// Simplified port of shahar061/the-office (office/engine/camera.ts).+// Phase targeting is dropped (we have no project phases); kept: fit-to-screen,+// map-edge clamping, smooth lerp, a manual focus(), and nudgeToward() used to+// pan toward the selected agent.++const LERP_SPEED = 0.08;++export class Camera {+ private container: Container;+ private currentX = 0;+ private currentY = 0;+ private currentZoom = 1;+ private targetX = 0;+ private targetY = 0;+ private targetZoom = 1;+ private viewWidth = 960;+ private viewHeight = 800;+ private mapWidth = 640;+ private mapHeight = 480;+ private manualOverride = false;++ private nudgeOffsetX = 0;+ private nudgeOffsetY = 0;+ private nudgeElapsed = 0;+ private nudgeDuration = 0;+ private readonly nudgeStrength = 0.4;++ constructor(container: Container) {+ this.container = container;+ }++ setMapSize(width: number, height: number): void {+ this.mapWidth = width;+ this.mapHeight = height;+ }++ setViewSize(width: number, height: number): void {+ this.viewWidth = width;+ this.viewHeight = height;+ if (!this.manualOverride) this.fitToScreen();+ }++ private getMinZoom(): number {+ if (this.viewWidth === 0 || this.viewHeight === 0) return 1;+ return Math.min(this.viewWidth / this.mapWidth, this.viewHeight / this.mapHeight);+ }++ /** Fit the whole map to the viewport, centered. */+ fitToScreen(): void {+ this.manualOverride = false;+ this.targetX = this.mapWidth / 2;+ this.targetY = this.mapHeight / 2;+ this.targetZoom = this.getMinZoom();+ }++ /** Pan/zoom toward a world point (used when an agent is selected). */+ focusOn(worldX: number, worldY: number, zoom?: number): void {+ this.manualOverride = true;+ this.targetX = worldX;+ this.targetY = worldY;+ this.targetZoom = Math.max(this.getMinZoom(), Math.min(4, zoom ?? this.currentZoom));+ }++ /** A gentle, decaying pan toward a world point without taking manual control. */+ nudgeToward(worldX: number, worldY: number, duration = 1200): void {+ if (this.manualOverride) return;+ this.nudgeOffsetX = (worldX - this.targetX) * this.nudgeStrength;+ this.nudgeOffsetY = (worldY - this.targetY) * this.nudgeStrength;+ this.nudgeElapsed = 0;+ this.nudgeDuration = duration / 1000;+ }++ update(dt: number): void {+ this.currentX += (this.targetX - this.currentX) * LERP_SPEED;+ this.currentY += (this.targetY - this.currentY) * LERP_SPEED;+ this.currentZoom += (this.targetZoom - this.currentZoom) * LERP_SPEED;++ if (this.nudgeDuration > 0) {+ this.nudgeElapsed += dt;+ const t = Math.min(this.nudgeElapsed / this.nudgeDuration, 1);+ const ease = 1 - t;+ this.currentX += this.nudgeOffsetX * ease;+ this.currentY += this.nudgeOffsetY * ease;+ if (t >= 1) {+ this.nudgeDuration = 0;+ this.nudgeOffsetX = 0;+ this.nudgeOffsetY = 0;+ }+ }++ this.container.scale.set(this.currentZoom);+ this.container.x = this.viewWidth / 2 - this.currentX * this.currentZoom;+ this.container.y = this.viewHeight / 2 - this.currentY * this.currentZoom;++ const scaledW = this.mapWidth * this.currentZoom;+ const scaledH = this.mapHeight * this.currentZoom;+ if (scaledW <= this.viewWidth) {+ this.container.x = (this.viewWidth - scaledW) / 2;+ } else {+ this.container.x = Math.min(0, Math.max(this.viewWidth - scaledW, this.container.x));+ }+ if (scaledH <= this.viewHeight) {+ this.container.y = (this.viewHeight - scaledH) / 2;+ } else {+ this.container.y = Math.min(0, Math.max(this.viewHeight - scaledH, this.container.y));+ }+ }+}diff --git a/src/renderer/src/scene/office/Character.ts b/src/renderer/src/scene/office/Character.tsnew file mode 100644index 00000000..ce606e7f--- /dev/null+++ b/src/renderer/src/scene/office/Character.ts@@ -0,0 +1,439 @@+import { Container, Graphics, Texture } from 'pixi.js';+import { CharacterSprite, type Direction, type AnimState } from './CharacterSprite';+import { findPath } from './pathfinding';+import type { TiledMapRenderer } from './TiledMapRenderer';+import { ToolBubble } from './ToolBubble';++// Adapted from shahar061/the-office (office/characters/Character.ts).+// Differences: keyed by our dynamic agentId (not a fixed role); seat tile ++// glow color are injected (we seat agents from a pool); CSS-theme halo pulse+// replaced with constants; added blocked "!" + success sparkle overlays to+// cover our status model.++export type CharacterAnimation = 'idle' | 'walk' | 'type' | 'read';+export type StatusGlyph = 'none' | 'blocked' | 'success';++function lerp(a: number, b: number, t: number): number {+ const tt = Math.min(Math.max(t, 0), 1);+ return a + (b - a) * tt;+}++const SPEED = 48; // pixels/sec (tileSize=16)+// Slide the sprite when seated so it reads as "sitting on the chair" rather than+// standing on the tile. The chair tile holds the chair/barrel, with the desk in+// the tile the agent faces. The feet are anchored at the seat tile's bottom and+// the body is ~2 tiles tall, so without a nudge the head overshoots past the far+// desk edge and the chair below looks empty. We push the body toward the viewer+// (down, for up/side seats; the desk is behind them) so the head settles at the+// monitor and the torso rests on the chair. Down-facing agents (desk in front)+// are pushed into the desk instead.+const SIT_OFFSET = 5;+const SIT_OFFSET_DOWN = 12;+const SIT_OFFSET_UP = 5; // up-facing: drop the body down onto the chair+const SIT_OFFSET_SIDE = 4; // left/right: a smaller drop plus the sideways tuck+// Pixels cropped off the bottom of the 32px sprite while seated. Up/side seats+// trim just the feet so most of the torso shows and fills the chair seat; the+// down-facing crop is larger so the legs tuck under the desk in front.+const SEAT_LEG_CROP = 8;+const SEAT_BACK_CROP = 2;++interface CharacterOptions {+ agentId: string;+ mapRenderer: TiledMapRenderer;+ frames: Texture[][];+ seatTile: { x: number; y: number };+ /** Where the avatar first appears (the office door). Defaults to seatTile. */+ spawnTile?: { x: number; y: number };+ glowColor: number;+ /** Direction faced while seated. Default 'down' so the face is toward the user. */+ seatDirection?: Direction;+ onClick?: (agentId: string) => void;+}++export class Character {+ readonly agentId: string;+ readonly sprite: CharacterSprite;++ private state: CharacterAnimation = 'idle';+ private mapRenderer: TiledMapRenderer;+ private deskTile: { x: number; y: number };+ private seatDirection: Direction;+ private px: number;+ private py: number;+ private path: { x: number; y: number }[] = [];+ private pendingWork: CharacterAnimation | null = null;+ private pendingSit = false;+ private sitting = false;+ private wandering = false;+ private idleTimer = 0;+ private idleWanderDelay = 1 + Math.random() * 3;+ private direction: Direction = 'down';+ private arrivalCallback: (() => void) | null = null;++ public isVisible = false;+ private fadeDirection: 'in' | 'out' | null = null;+ private fadeDuration = 0;+ private fadeElapsed = 0;+ private hideTimer: ReturnType<typeof setTimeout> | null = null;++ private toolBubble: ToolBubble;+ private workGlow: Graphics;+ private workGlowElapsed = 0;+ private glowOn = false;++ private overlay: Graphics;+ private statusGlyph: StatusGlyph = 'none';+ private glyphElapsed = 0;+ private onClick?: (agentId: string) => void;++ constructor(options: CharacterOptions) {+ this.agentId = options.agentId;+ this.mapRenderer = options.mapRenderer;+ this.sprite = new CharacterSprite(options.frames);+ this.deskTile = options.seatTile;+ this.seatDirection = options.seatDirection ?? 'down';+ this.onClick = options.onClick;++ // Appear at the spawn tile (the door) and walk in from there.+ const start = options.spawnTile ?? this.deskTile;+ const pos = this.mapRenderer.tileToPixel(start.x, start.y);+ this.px = pos.x + this.mapRenderer.tileSize / 2;+ this.py = pos.y + this.mapRenderer.tileSize;+ this.sprite.setPosition(this.px, this.py);++ this.toolBubble = new ToolBubble();++ this.workGlow = new Graphics();+ this.workGlow.circle(0, 0, 14);+ this.workGlow.fill({ color: options.glowColor, alpha: 1 });+ this.workGlow.alpha = 0;+ this.workGlow.eventMode = 'none';++ this.overlay = new Graphics();+ this.overlay.eventMode = 'none';+ }++ getAnimation(): CharacterAnimation { return this.state; }+ getDeskTile(): { x: number; y: number } { return this.deskTile; }+ getPixelPosition(): { x: number; y: number } { return { x: this.px, y: this.py }; }++ getTilePosition(): { x: number; y: number } {+ return this.mapRenderer.pixelToTile(this.px, this.py - 1);+ }++ moveTo(tile: { x: number; y: number }): void {+ const path = findPath(this.mapRenderer, this.getTilePosition(), tile);+ if (path && path.length > 0) {+ this.sitting = false; // stand up before walking (clears the sit offset)+ this.sprite.setSeatedCrop(0); // show legs again while standing/walking+ this.path = path;+ this.state = 'walk';+ this.sprite.setAnimation('walk', this.direction);+ }+ }++ walkToAndThen(tile: { x: number; y: number }, callback: () => void): void {+ this.arrivalCallback = callback;+ this.moveTo(tile);+ }++ /** Sit at the assigned desk, facing the monitor. Walks there first if away.+ * `working` toggles the pulsing focus halo. This is the default pose — agents+ * stay seated unless blocked. */+ sitAtDesk(working: boolean): void {+ this.glowOn = working;+ this.wandering = false;+ const t = this.getTilePosition();+ if (t.x === this.deskTile.x && t.y === this.deskTile.y) {+ this.applySit();+ } else {+ this.pendingSit = true;+ this.pendingWork = null;+ this.arrivalCallback = null;+ this.moveTo(this.deskTile); // updateWalk() sits on arrival+ }+ }++ /** Snap into the seated pose at the current (desk) tile. */+ private applySit(): void {+ this.state = 'idle';+ this.pendingWork = null;+ this.pendingSit = false;+ this.path = [];+ this.sitting = true;+ this.direction = this.seatDirection;+ this.sprite.setAnimation('idle', this.seatDirection);+ // Slide toward the desk so the agent tucks in instead of floating in the+ // aisle, then crop the legs so they read as seated (no standing legs).+ let dx = 0, dy = 0;+ switch (this.seatDirection) {+ case 'down': dy = SIT_OFFSET_DOWN; break;+ case 'up': dy = SIT_OFFSET_UP; break;+ case 'left': dx = -SIT_OFFSET; dy = SIT_OFFSET_SIDE; break;+ case 'right': dx = SIT_OFFSET; dy = SIT_OFFSET_SIDE; break;+ }+ this.sprite.setPosition(this.px + dx, this.py + dy);+ this.sprite.setSeatedCrop(this.seatDirection === 'down' ? SEAT_LEG_CROP : SEAT_BACK_CROP);+ }++ setIdle(): void {+ this.state = 'idle';+ this.pendingWork = null;+ this.pendingSit = false;+ this.sitting = false;+ this.wandering = false;+ this.path = [];+ this.glowOn = false;+ this.sprite.setSeatedCrop(0);+ this.sprite.setAnimation('idle', this.direction);+ this.sprite.setPosition(this.px, this.py);+ }++ /** Roam the office between tasks. Picks random walkable tiles and strolls+ * to them until the agent is given work again. */+ startWandering(): void {+ if (this.wandering) return;+ this.glowOn = false;+ this.sitting = false;+ this.pendingSit = false;+ this.pendingWork = null;+ this.wandering = true;+ this.idleTimer = 0;+ this.idleWanderDelay = 0.5 + Math.random() * 2;+ this.sprite.setSeatedCrop(0);+ if (this.state !== 'walk') {+ this.state = 'idle';+ this.sprite.setAnimation('idle', this.direction);+ this.sprite.setPosition(this.px, this.py); // clear any sit offset+ }+ }++ /** Walk to an arbitrary tile (e.g. the waiting area when blocked); stands on arrival. */+ walkToTile(tile: { x: number; y: number }): void {+ this.pendingWork = null;+ this.pendingSit = false;+ this.sitting = false;+ this.wandering = false;+ this.arrivalCallback = null;+ this.moveTo(tile);+ }++ /** Show a plain-text card (the last user prompt) above the seated agent. */+ showPrompt(text: string): void {+ this.toolBubble.showText(text);+ }++ repositionTo(tx: number, ty: number): void {+ this.deskTile = { x: tx, y: ty };+ const pos = this.mapRenderer.tileToPixel(tx, ty);+ this.px = pos.x + this.mapRenderer.tileSize / 2;+ this.py = pos.y + this.mapRenderer.tileSize;+ this.sprite.setPosition(this.px, this.py);+ }++ showToolBubble(toolName: string, target: string): void {+ this.toolBubble.show(toolName, target);+ }++ hideToolBubble(): void {+ this.toolBubble.startLinger();+ }++ setStatusGlyph(glyph: StatusGlyph): void {+ if (glyph === this.statusGlyph) return;+ this.statusGlyph = glyph;+ this.glyphElapsed = 0;+ if (glyph === 'none') this.overlay.clear();+ }++ setBaseAlpha(alpha: number): void {+ this.targetAlpha = alpha;+ }+ private targetAlpha = 1;++ private enableClick(): void {+ this.sprite.container.eventMode = 'static';+ this.sprite.container.cursor = 'pointer';+ this.sprite.container.on('pointertap', (e) => {+ e.stopPropagation();+ this.onClick?.(this.agentId);+ });+ }++ show(parent: Container): void {+ if (this.hideTimer) { clearTimeout(this.hideTimer); this.hideTimer = null; }+ this.isVisible = true;+ this.sprite.setAlpha(0);+ parent.addChild(this.workGlow);+ parent.addChild(this.sprite.container);+ this.sprite.container.addChild(this.overlay);+ parent.addChild(this.toolBubble.container);+ this.enableClick();+ this.fadeDirection = 'in';+ this.fadeDuration = 0.5;+ this.fadeElapsed = 0;+ }++ hide(delay = 0): void {+ if (this.hideTimer) { clearTimeout(this.hideTimer); this.hideTimer = null; }+ const begin = () => {+ this.hideTimer = null;+ this.fadeDirection = 'out';+ this.fadeDuration = 0.6;+ this.fadeElapsed = 0;+ };+ if (delay > 0) this.hideTimer = setTimeout(begin, delay);+ else begin();+ }++ update(dt: number): void {+ if (this.fadeDirection) {+ this.fadeElapsed += dt;+ const t = Math.min(this.fadeElapsed / this.fadeDuration, 1);+ const alpha = (this.fadeDirection === 'in' ? t : 1 - t) * this.targetAlpha;+ this.sprite.setAlpha(alpha);+ if (t >= 1) {+ const reachedZero = this.fadeDirection === 'out';+ this.fadeDirection = null;+ if (reachedZero) {+ this.isVisible = false;+ this.sprite.container.parent?.removeChild(this.sprite.container);+ this.toolBubble.hide();+ this.toolBubble.container.parent?.removeChild(this.toolBubble.container);+ this.workGlow.parent?.removeChild(this.workGlow);+ }+ }+ } else if (this.isVisible) {+ // ease sprite alpha toward target (for ghost dimming)+ const a = this.sprite.container.alpha;+ if (Math.abs(a - this.targetAlpha) > 0.01) {+ this.sprite.setAlpha(lerp(a, this.targetAlpha, Math.min(1, dt / 0.2)));+ }+ }++ this.toolBubble.update(dt);+ if (!this.isVisible) return;++ // Working agents stay seated; between tasks they wander the office.+ if (this.state === 'walk') this.updateWalk(dt);+ else if (this.wandering) this.updateWander(dt);++ this.sprite.container.zIndex = this.py;+ this.toolBubble.setPosition(this.px, this.py);++ // work glow+ const ts = this.mapRenderer.tileSize;+ this.workGlow.x = this.px;+ this.workGlow.y = this.py - ts / 2;+ this.workGlow.zIndex = this.py - 1;+ if (this.glowOn) {+ this.workGlowElapsed += dt;+ const phase = (Math.sin((this.workGlowElapsed * Math.PI) / 0.6) + 1) / 2;+ this.workGlow.alpha = (0.18 + 0.27 * phase) * this.sprite.container.alpha;+ this.workGlow.scale.set(0.95 + 0.15 * phase);+ } else {+ this.workGlow.alpha = 0;+ this.workGlowElapsed = 0;+ }++ this.updateStatusGlyph(dt);+ }++ private updateStatusGlyph(dt: number): void {+ if (this.statusGlyph === 'none') return;+ this.glyphElapsed += dt;+ const g = this.overlay;+ g.clear();+ const yTop = -34; // just above the 32px sprite+ if (this.statusGlyph === 'blocked') {+ // pulsing "!" — blink ~2.5Hz+ if (Math.floor(this.glyphElapsed / 0.4) % 2 === 0) {+ g.rect(-1, yTop, 2, 5).fill(0xff6b6b);+ g.rect(-1, yTop + 6, 2, 2).fill(0xff6b6b);+ }+ } else if (this.statusGlyph === 'success') {+ // brief 4-point sparkle, auto-clears after 0.9s+ const p = (Math.sin(this.glyphElapsed * 18) + 1) / 2;+ const s = 2 + p * 2;+ g.rect(-0.5, yTop - s, 1, s * 2).fill(0xffd93d);+ g.rect(-s, yTop - 0.5, s * 2, 1).fill(0xffd93d);+ if (this.glyphElapsed > 0.9) this.setStatusGlyph('none');+ }+ }++ private updateWalk(dt: number): void {+ if (this.path.length === 0) {+ if (this.pendingSit) {+ this.applySit();+ } else if (this.pendingWork) {+ this.state = this.pendingWork;+ this.pendingWork = null;+ this.sprite.setAnimation(this.state as AnimState, this.seatDirection);+ } else if (this.wandering) {+ // Reached a wander waypoint — pause, idle, then pick another later.+ this.state = 'idle';+ this.idleTimer = 0;+ this.idleWanderDelay = 1 + Math.random() * 3;+ this.sprite.setAnimation('idle', this.direction);+ } else {+ this.setIdle();+ }+ if (this.arrivalCallback) {+ const cb = this.arrivalCallback;+ this.arrivalCallback = null;+ cb();+ }+ return;+ }++ const target = this.path[0];+ const ts = this.mapRenderer.tileSize;+ const targetPx = target.x * ts + ts / 2;+ const targetPy = target.y * ts + ts;+ const dx = targetPx - this.px;+ const dy = targetPy - this.py;+ const dist = Math.sqrt(dx * dx + dy * dy);++ if (dist < 1) {+ this.px = targetPx;+ this.py = targetPy;+ this.path.shift();+ return;+ }++ const step = Math.min(SPEED * dt, dist);+ this.px += (dx / dist) * step;+ this.py += (dy / dist) * step;+ this.direction = Math.abs(dx) > Math.abs(dy) ? (dx > 0 ? 'right' : 'left') : (dy > 0 ? 'down' : 'up');+ this.sprite.setAnimation('walk', this.direction);+ this.sprite.setPosition(this.px, this.py);+ }++ private updateWander(dt: number): void {+ this.idleTimer += dt;+ if (this.idleTimer < this.idleWanderDelay) return;+ this.idleTimer = 0;+ this.idleWanderDelay = 1 + Math.random() * 3;+ // Pick a nearby walkable tile and stroll to it.+ const cur = this.getTilePosition();+ const range = 6;+ for (let attempt = 0; attempt < 14; attempt++) {+ const tx = cur.x + Math.floor(Math.random() * range * 2) - range;+ const ty = cur.y + Math.floor(Math.random() * range * 2) - range;+ if ((tx !== cur.x || ty !== cur.y) && this.mapRenderer.isWalkable(tx, ty)) {+ const wasWandering = this.wandering;+ this.moveTo({ x: tx, y: ty }); // moveTo() leaves state='walk'+ this.wandering = wasWandering; // keep wandering through the walk+ return;+ }+ }+ }++ destroy(): void {+ if (this.hideTimer) { clearTimeout(this.hideTimer); this.hideTimer = null; }+ this.toolBubble.destroy();+ this.sprite.destroy();+ this.workGlow.destroy();+ this.overlay.destroy();+ }+}diff --git a/src/renderer/src/scene/office/CharacterSprite.ts b/src/renderer/src/scene/office/CharacterSprite.tsnew file mode 100644index 00000000..1e3c0e76--- /dev/null+++ b/src/renderer/src/scene/office/CharacterSprite.ts@@ -0,0 +1,115 @@+import { AnimatedSprite, Container, Graphics, Texture } from 'pixi.js';++export type Direction = 'down' | 'up' | 'right' | 'left';+export type AnimState = 'walk' | 'type' | 'read' | 'idle';++// Output rows from SpriteAdapter: down=0, up=1, right=2 (left = flipped right)+const DIRECTION_ROW: Record<Direction, number> = {+ down: 0,+ up: 1,+ right: 2,+ left: 2,+};++const ANIM_FRAMES: Record<AnimState, number[]> = {+ walk: [0, 1, 2, 1],+ type: [0, 1, 2, 1],+ read: [0, 1, 2, 1],+ idle: [0],+};++// Render characters a bit larger than their native 18×32 so heads/faces read+// clearly on the floor. Applied to the container so the leg-crop mask (a child)+// scales with the sprite and stays aligned.+const CHAR_SCALE = 1.08;++/** Ported from shahar061/the-office (office/characters/CharacterSprite.ts). */+export class CharacterSprite {+ readonly container: Container;+ private sprite: AnimatedSprite;+ private frames: Texture[][];+ private currentDirection: Direction = 'down';+ private currentAnim: AnimState = 'idle';+ private frameSpeed = 0.15;+ private frameW: number;+ private frameH: number;+ private cropMask: Graphics | null = null;++ constructor(frames: Texture[][]) {+ this.frames = frames;+ this.container = new Container();++ const initialFrames = this.getFrames('down', 'idle');+ this.sprite = new AnimatedSprite(initialFrames);+ this.sprite.anchor.set(0.5, 1);+ this.sprite.animationSpeed = this.frameSpeed;+ this.sprite.play();+ // Anchor is (0.5, 1): in container space the sprite spans x∈[-w/2, w/2],+ // y∈[-h, 0] (feet at the origin). Used by the seated leg-crop mask.+ this.frameW = this.sprite.texture.frame.width || this.sprite.width || 16;+ this.frameH = this.sprite.texture.frame.height || this.sprite.height || 32;++ this.container.addChild(this.sprite);+ this.container.scale.set(CHAR_SCALE);+ }++ /**+ * Crop `cropPx` off the bottom of the sprite (the legs) so a seated agent+ * reads as tucked under the desk instead of standing on top of it. Pass 0 to+ * clear the crop (standing / walking). The mask only covers the sprite, so+ * status glyphs / bubbles parented elsewhere are unaffected.+ */+ setSeatedCrop(cropPx: number): void {+ if (cropPx <= 0) {+ if (this.cropMask) {+ this.sprite.mask = null;+ this.cropMask.visible = false;+ }+ return;+ }+ if (!this.cropMask) {+ this.cropMask = new Graphics();+ this.container.addChild(this.cropMask);+ }+ const w = this.frameW;+ const h = this.frameH;+ this.cropMask.clear();+ // Keep the top (h - cropPx) of the sprite; reveal whatever (the desk) is+ // behind where the legs were.+ this.cropMask+ .rect(-w / 2 - 2, -h - 2, w + 4, h - cropPx + 2)+ .fill(0xffffff);+ this.cropMask.visible = true;+ this.sprite.mask = this.cropMask;+ }++ private getFrames(direction: Direction, anim: AnimState): Texture[] {+ const row = DIRECTION_ROW[direction];+ return ANIM_FRAMES[anim].map((col) => this.frames[row][col]);+ }++ setAnimation(anim: AnimState, direction: Direction): void {+ if (anim === this.currentAnim && direction === this.currentDirection) return;++ this.currentAnim = anim;+ this.currentDirection = direction;++ this.sprite.textures = this.getFrames(direction, anim);+ this.sprite.scale.x = direction === 'left' ? -1 : 1;+ this.sprite.animationSpeed = anim === 'walk' ? 0.15 : anim === 'idle' ? 0.08 : 0.06;+ this.sprite.play();+ }++ setPosition(x: number, y: number): void {+ this.container.x = x;+ this.container.y = y;+ }++ setAlpha(alpha: number): void {+ this.container.alpha = alpha;+ }++ destroy(): void {+ this.container.destroy({ children: true });+ }+}diff --git a/src/renderer/src/scene/office/OfficeFloor.tsx b/src/renderer/src/scene/office/OfficeFloor.tsxnew file mode 100644index 00000000..a9950166--- /dev/null+++ b/src/renderer/src/scene/office/OfficeFloor.tsx@@ -0,0 +1,399 @@+import { useEffect, useRef } from 'react';+import { Application, Container, Ticker, Texture } from 'pixi.js';+// PixiJS uses new Function() internally, blocked by Electron CSP — this patches it.+import 'pixi.js/unsafe-eval';+import { useStore, type Agent } from '@/store/store';+import { TiledMapRenderer, type TiledMap } from './TiledMapRenderer';+import { Camera } from './Camera';+import { Character } from './Character';+import { getCastFrames, CAST_BY_NAME, hexToNumber, DEFAULT_CHARACTER } from './cast';+import { colors } from '@/design/tokens';++import officeTilesetUrl from '@/assets/tilesets/office-tileset.png?url';+import a5FloorsWallsUrl from '@/assets/tilesets/a5-office-floors-walls.png?url';+import interiorsUrl from '@/assets/tilesets/interiors.png?url';+// .tmj is Tiled JSON; import as raw text (typed by vite/client) and parse.+import officeMapRaw from '@/assets/maps/office.tmj?raw';++const officeMapData = JSON.parse(officeMapRaw) as TiledMap;++// Preferred desks, in claim order. The very first agent always takes the+// private office on the left (the CEO room), then the open-plan PC desks, then+// the remaining named desks. Overflow (conference room, then open floor) is+// computed from map zones at runtime. Matches Tiled spawn-point names.+const PRIMARY_SEAT_NAMES = [+ 'desk-ceo',+ 'pc-1', 'pc-2', 'pc-3', 'pc-4', 'pc-5', 'pc-6',+ 'desk-chief-architect', 'desk-product-manager', 'desk-team-lead',+ 'desk-backend-engineer', 'desk-ui-ux-expert', 'desk-data-engineer',+ 'desk-project-manager', 'desk-market-researcher', 'desk-agent-organizer',+];++interface Tile { x: number; y: number; }++interface Runtime {+ character: Character;+ seatIndex: number | null;+ waitTile: Tile;+ charName: string;+ prevStatus?: string;+ prevAction?: string;+ prevCarrying?: string;+ prevPrompt?: string;+}++/** Patch the map's external (.tsx) tileset refs with the inline metadata the+ * renderer needs — mirrors the reference repo's OfficeScene.init(). */+function resolveMap(): TiledMap {+ const m = officeMapData;+ return {+ ...m,+ tilesets: [+ m.tilesets[0], // office-tileset.png (embedded, firstgid 1)+ { firstgid: 513, image: 'a5', imagewidth: 256, imageheight: 512, tilewidth: 16, tileheight: 16, columns: 16, tilecount: 512 } as any,+ { firstgid: 1025, image: 'interiors', imagewidth: 256, imageheight: 1424, tilewidth: 16, tileheight: 16, columns: 16, tilecount: 1424 } as any,+ ],+ };+}++/** Load a texture via an <img> element. Unlike Pixi's Assets.load(), this+ * handles extension-less data: URLs (Vite inlines small assets like the a5+ * tileset as base64), which the Assets resolver fails to type-detect. */+function loadTexture(url: string): Promise<Texture> {+ return new Promise((resolve, reject) => {+ const img = new Image();+ img.onload = () => {+ const tex = Texture.from(img);+ tex.source.scaleMode = 'nearest';+ resolve(tex);+ };+ img.onerror = () => reject(new Error('failed to load ' + url.slice(0, 40)));+ img.src = url;+ });+}++/** First few words of the last user prompt, for the desk card. */+function firstWords(prompt: string | undefined, maxWords = 6, maxChars = 42): string {+ if (!prompt) return '';+ const words = prompt.trim().split(/\s+/);+ let out = words.slice(0, maxWords).join(' ');+ const truncatedWords = words.length > maxWords;+ if (out.length > maxChars) out = out.slice(0, maxChars).trimEnd();+ else if (truncatedWords) out += '…';+ return out;+}++export function OfficeFloor() {+ const hostRef = useRef<HTMLDivElement | null>(null);+ const appRef = useRef<Application | null>(null);+ const mountIdRef = useRef(0);++ useEffect(() => {+ const host = hostRef.current;+ if (!host) return;+ while (host.firstChild) host.removeChild(host.firstChild);++ const mountId = ++mountIdRef.current;+ const app = new Application();+ appRef.current = app;++ const runtimes = new Map<string, Runtime>();+ const seatClaims = new Set<number>();++ const init = async () => {+ await app.init({+ background: hexNum(colors.ink[900]),+ antialias: false,+ roundPixels: true,+ resolution: 1,+ width: host.clientWidth || 800,+ height: host.clientHeight || 600,+ });+ if (mountIdRef.current !== mountId) { safeDestroy(app); return; }+ while (host.firstChild) host.removeChild(host.firstChild);+ host.appendChild(app.canvas);++ // Load tilesets (order must match resolveMap()'s tileset array)+ const [officeTex, a5Tex, interiorsTex] = await Promise.all(+ [officeTilesetUrl, a5FloorsWallsUrl, interiorsUrl].map(loadTexture),+ );+ if (mountIdRef.current !== mountId) { safeDestroy(app); return; }++ const world = new Container();+ app.stage.addChild(world);++ const mapRenderer = new TiledMapRenderer(resolveMap(), [officeTex, a5Tex, interiorsTex]);+ world.addChild(mapRenderer.getContainer());+ const charLayer = mapRenderer.getCharacterContainer();+ const tileCount = mapRenderer.getContainer().children.reduce(+ (n, c) => n + ((c as Container).children?.length ?? 0), 0);+ console.log(`[OfficeFloor] map ${mapRenderer.width}x${mapRenderer.height}, ${tileCount} tile sprites rendered`);++ const camera = new Camera(world);+ camera.setMapSize(mapRenderer.width * mapRenderer.tileSize, mapRenderer.height * mapRenderer.tileSize);+ camera.setViewSize(app.screen.width, app.screen.height);+ camera.fitToScreen();++ // Build the ordered seat list once: PC desks + named desks first, then+ // conference-room chairs, then open-floor / cafeteria overflow. Each agent+ // claims one and stays there; they never wander off it (except when blocked).+ const seatTiles: Tile[] = [];+ const seatSeen = new Set<string>();+ const addSeat = (t?: Tile) => {+ if (!t) return;+ const k = `${t.x},${t.y}`;+ if (seatSeen.has(k)) return;+ seatSeen.add(k);+ seatTiles.push({ x: t.x, y: t.y });+ };+ for (const name of PRIMARY_SEAT_NAMES) addSeat(mapRenderer.getSpawnPoint(name));+ const addZoneSeats = (zone: string) => {+ const z = mapRenderer.getZone(zone);+ if (!z) return;+ for (let y = z.y; y < z.y + z.height; y++) {+ for (let x = z.x; x < z.x + z.width; x++) {+ if (mapRenderer.isWalkable(x, y)) addSeat({ x, y });+ }+ }+ };+ addZoneSeats('boardroom'); // conference room overflow+ addZoneSeats('open-work-area'); // cafeteria / open-floor overflow++ // Waiting spots near the entrance — where a blocked agent walks to signal+ // it needs the user. Collected as walkable tiles in rings around the door.+ const entrance = mapRenderer.getSpawnPoint('entrance')+ ?? { x: Math.floor(mapRenderer.width / 2), y: mapRenderer.height - 2 };+ const waitTiles: Tile[] = [];+ const waitSeen = new Set<string>();+ for (let radius = 0; radius <= 6 && waitTiles.length < 16; radius++) {+ for (let dy = -radius; dy <= radius; dy++) {+ for (let dx = -radius; dx <= radius; dx++) {+ if (Math.max(Math.abs(dx), Math.abs(dy)) !== radius) continue;+ const x = entrance.x + dx, y = entrance.y + dy;+ const k = `${x},${y}`;+ if (waitSeen.has(k)) continue;+ if (mapRenderer.isWalkable(x, y)) { waitSeen.add(k); waitTiles.push({ x, y }); }+ }+ }+ }+ if (waitTiles.length === 0) waitTiles.push(entrance);++ // Seat 0 is desk-ceo — "Michael's room" — reserved for the god agent.+ // Everyone else claims from seat 1 onward so the corner office stays the+ // orchestrator's throne even if it spawns after other agents.+ const GOD_SEAT = 0;+ const claimSeat = (agent: Agent): number | null => {+ if (agent.isGod) { seatClaims.add(GOD_SEAT); return GOD_SEAT; }+ for (let i = 1; i < seatTiles.length; i++) {+ if (!seatClaims.has(i)) { seatClaims.add(i); return i; }+ }+ return null;+ };++ // Face a seated agent toward their desk (the adjacent non-walkable+ // furniture). Standard desks put the monitor to the north and the chair to+ // the south, so the agent faces 'up' and we see their back — like a real+ // worker. Only a desk directly to the SOUTH (face 'down') puts furniture in+ // front of them, which is the one case the leg-crop tucks legs under.+ const facingForSeat = (t: Tile): 'up' | 'down' | 'left' | 'right' => {+ if (!mapRenderer.isWalkable(t.x, t.y - 1)) return 'up';+ if (!mapRenderer.isWalkable(t.x, t.y + 1)) return 'down';+ if (!mapRenderer.isWalkable(t.x - 1, t.y)) return 'left';+ if (!mapRenderer.isWalkable(t.x + 1, t.y)) return 'right';+ return 'up'; // open-floor overflow seat — no desk, just face away+ };++ const addCharacter = async (agent: Agent) => {+ const charName = CAST_BY_NAME[agent.character] ? agent.character : DEFAULT_CHARACTER;+ const member = CAST_BY_NAME[charName];+ const seatIndex = claimSeat(agent);+ const seatTile: Tile = (seatIndex != null ? seatTiles[seatIndex] : undefined)+ ?? mapRenderer.getSpawnPoint('entrance')+ ?? { x: 2, y: 2 };+ const waitTile = waitTiles[(seatIndex ?? 0) % waitTiles.length];+ const frames = await getCastFrames(charName);+ // Bail if the agent was removed (or scene torn down) while loading.+ if (mountIdRef.current !== mountId) return;+ if (!useStore.getState().agents.some((a) => a.id === agent.id)) {+ if (seatIndex != null) seatClaims.delete(seatIndex);+ return;+ }+ const character = new Character({+ agentId: agent.id,+ mapRenderer,+ frames,+ seatTile,+ seatDirection: facingForSeat(seatTile),+ spawnTile: entrance, // walk in from the office door+ glowColor: hexNum(colors.accent[agent.accent]) ?? hexToNumber(member.shirt),+ onClick: (id) => useStore.getState().select(id),+ });+ character.show(charLayer);+ runtimes.set(agent.id, { character, seatIndex, waitTile, charName });+ applyState(agent, runtimes.get(agent.id)!, true);+ };++ const removeCharacter = (id: string) => {+ const rt = runtimes.get(id);+ if (!rt) return;+ if (rt.seatIndex != null) seatClaims.delete(rt.seatIndex);+ rt.character.hide(0);+ // give the fade-out a moment, then destroy+ setTimeout(() => rt.character.destroy(), 700);+ runtimes.delete(id);+ };++ // Map an agent's store state onto its on-floor character.+ const applyState = (agent: Agent, rt: Runtime, force = false) => {+ const changed = force+ || rt.prevStatus !== agent.status+ || rt.prevAction !== agent.action+ || rt.prevCarrying !== agent.carrying+ || rt.prevPrompt !== agent.lastPrompt;+ if (!changed) return;+ rt.prevStatus = agent.status;+ rt.prevAction = agent.action;+ rt.prevCarrying = agent.carrying;+ rt.prevPrompt = agent.lastPrompt;++ const c = rt.character;+ c.setBaseAlpha(agent.status === 'ghost' ? 0.5 : 1);++ // While working, agents sit at their desk (face toward the user) with a+ // card showing the last prompt we gave them. Blocked → walk to the door+ // and flash "!". Done/idle → wander the office until a new task arrives.+ const promptCard = firstWords(agent.lastPrompt);+ switch (agent.status) {+ case 'working':+ case 'thinking':+ c.setStatusGlyph('none');+ c.sitAtDesk(true);+ if (promptCard) c.showPrompt(promptCard);+ else c.showToolBubble('', '...');+ break;+ case 'waiting':+ // Parked at the desk awaiting god / another agent — not actively+ // working (no focus glow) and NOT at the door (that's reserved for+ // agents that need the human).+ c.setStatusGlyph('none');+ c.sitAtDesk(false);+ c.showToolBubble('', '⏳');+ break;+ case 'blocked':+ c.setStatusGlyph('blocked');+ c.hideToolBubble();+ c.walkToTile(rt.waitTile);+ break;+ case 'success':+ c.setStatusGlyph('success');+ c.hideToolBubble();+ if (agent.isGod) c.sitAtDesk(true); else c.startWandering();+ break;+ case 'ghost':+ c.setStatusGlyph('none');+ c.hideToolBubble();+ c.setIdle();+ break;+ case 'idle':+ default:+ c.setStatusGlyph('none');+ c.hideToolBubble();+ // The god runs the floor from its desk; everyone else wanders when idle.+ if (agent.isGod) { c.sitAtDesk(true); c.showToolBubble('', '☰'); }+ else c.startWandering();+ break;+ }+ };++ const syncAgents = () => {+ const { agents } = useStore.getState();+ const present = new Set(agents.map((a) => a.id));+ for (const id of Array.from(runtimes.keys())) {+ if (!present.has(id)) removeCharacter(id);+ }+ for (const agent of agents) {+ const rt = runtimes.get(agent.id);+ if (!rt) void addCharacter(agent);+ else applyState(agent, rt);+ }+ };++ syncAgents();++ let lastSelected: string | null = useStore.getState().selectedId;+ const unsubscribe = useStore.subscribe((s, prev) => {+ if (s.agents !== prev.agents) syncAgents();+ if (s.selectedId !== lastSelected) {+ lastSelected = s.selectedId;+ const rt = s.selectedId ? runtimes.get(s.selectedId) : undefined;+ if (rt) {+ const p = rt.character.getPixelPosition();+ camera.nudgeToward(p.x, p.y);+ }+ }+ });+ (app as any).__unsub = unsubscribe;++ const onTick = (ticker: Ticker) => {+ const dt = ticker.deltaMS / 1000;+ camera.update(dt);+ for (const rt of runtimes.values()) rt.character.update(dt);+ };+ app.ticker.add(onTick);++ const resize = new ResizeObserver((entries) => {+ for (const e of entries) {+ const { width, height } = e.contentRect;+ if (width === 0 || height === 0) continue;+ app.renderer?.resize(width, height);+ camera.setViewSize(width, height);+ }+ });+ resize.observe(host);+ (app as any).__resize = resize;+ };++ init().catch((err) => {+ if (mountIdRef.current !== mountId) return;+ console.error('[OfficeFloor] init failed:', err);+ const banner = document.createElement('div');+ banner.style.cssText =+ 'position:absolute;inset:0;display:flex;align-items:center;justify-content:center;' ++ 'padding:24px;color:#ffd0b5;font-family:monospace;font-size:13px;text-align:center;white-space:pre-wrap;';+ banner.textContent = 'OfficeFloor failed to start:\n' + (err?.stack || err?.message || String(err));+ host.appendChild(banner);+ });++ return () => {+ mountIdRef.current++;+ const a = appRef.current;+ if (a) {+ (a as any).__resize?.disconnect?.();+ try { (a as any).__unsub?.(); } catch { /* noop */ }+ safeDestroy(a);+ }+ appRef.current = null;+ while (host.firstChild) host.removeChild(host.firstChild);+ };+ }, []);++ return (+ <div+ ref={hostRef}+ style={{+ width: '100%', height: '100%',+ boxShadow: 'var(--cth-panel-border)',+ overflow: 'hidden',+ imageRendering: 'pixelated',+ background: hex(colors.ink[900]),+ }}+ />+ );+}++function hexNum(n: number): number { return n; }+function hex(n: number): string { return '#' + n.toString(16).padStart(6, '0'); }+function safeDestroy(app: Application) {+ try { app.ticker?.stop(); } catch { /* noop */ }+ try { app.destroy(true, { children: true }); } catch { /* noop */ }+}diff --git a/src/renderer/src/scene/office/SeatPool.ts b/src/renderer/src/scene/office/SeatPool.tsnew file mode 100644index 00000000..a2024d08--- /dev/null+++ b/src/renderer/src/scene/office/SeatPool.ts@@ -0,0 +1,33 @@+/**+ * Reservation pool for a fixed ordered list of seat identifiers (the desk/pc+ * spawn points in the Tiled map). Used to hand each dynamically-added agent a+ * distinct seat. Ported verbatim from shahar061/the-office (office/SeatPool.ts).+ */+export class SeatPool {+ private readonly seats: readonly string[];+ private claimed = new Set<string>();++ constructor(seats: readonly string[]) {+ this.seats = seats;+ }++ /** Reserve the first unoccupied seat in list order, or null if all taken. */+ reserveNext(): string | null {+ for (const seat of this.seats) {+ if (!this.claimed.has(seat)) {+ this.claimed.add(seat);+ return seat;+ }+ }+ return null;+ }++ /** Release a previously-reserved seat. Idempotent. */+ release(seat: string): void {+ this.claimed.delete(seat);+ }++ isReserved(seat: string): boolean {+ return this.claimed.has(seat);+ }+}diff --git a/src/renderer/src/scene/office/SpriteAdapter.ts b/src/renderer/src/scene/office/SpriteAdapter.tsnew file mode 100644index 00000000..ac9591df--- /dev/null+++ b/src/renderer/src/scene/office/SpriteAdapter.ts@@ -0,0 +1,55 @@+import { Texture, Rectangle } from 'pixi.js';++export interface SpriteSheetConfig {+ frameWidth: number; // pixel width of one frame (LimeZu: 16)+ frameHeight: number; // pixel height of one frame (LimeZu: 32)+ walkRow: number; // which 32px row holds the walk frames (LimeZu: 1)+ framesPerDirection: number; // walk frames per direction in that row (LimeZu: 6)+}++/**+ * Maps a LimeZu character walk sheet to the 3-row frame grid CharacterSprite+ * expects. Ported from shahar061/the-office (office/characters/SpriteAdapter.ts).+ *+ * LimeZu walk row packs 4 directions, each with `framesPerDirection` frames,+ * in the order: right, up, left, down.+ *+ * Output: 3 rows (down, up, right) each with 7 frames:+ * [walk1, walk2, walk3, type1, type2, read1, read2]+ * Left is rendered by horizontally flipping the "right" row at draw time.+ * Type/read frames reuse the idle (first walk) frame — LimeZu has no desk anims.+ */+export class SpriteAdapter {+ private static readonly DIRECTION_GROUP = { down: 3, left: 2, up: 1, right: 0 };+ private static readonly OUTPUT_DIRECTIONS: Array<'down' | 'up' | 'right'> = ['down', 'up', 'right'];++ static extractFrames(sheetTexture: Texture, config: SpriteSheetConfig): Texture[][] {+ const { frameWidth, frameHeight, walkRow, framesPerDirection } = config;+ const output: Texture[][] = [];++ for (const dir of this.OUTPUT_DIRECTIONS) {+ const frames: Texture[] = [];+ const groupStart = this.DIRECTION_GROUP[dir] * framesPerDirection;++ // 3 walk frames sampled every other frame from the cycle+ for (let i = 0; i < framesPerDirection; i += 2) {+ const frame = new Rectangle(+ (groupStart + i) * frameWidth,+ walkRow * frameHeight,+ frameWidth,+ frameHeight,+ );+ frames.push(new Texture({ source: sheetTexture.source, frame }));+ }++ while (frames.length < 3) frames.push(frames[0]);++ const idleFrame = frames[0];+ frames.push(idleFrame, idleFrame, idleFrame, idleFrame);++ output.push(frames);+ }++ return output;+ }+}diff --git a/src/renderer/src/scene/office/TiledMapRenderer.ts b/src/renderer/src/scene/office/TiledMapRenderer.tsnew file mode 100644index 00000000..7ec4b3d0--- /dev/null+++ b/src/renderer/src/scene/office/TiledMapRenderer.ts@@ -0,0 +1,233 @@+import { Container, Sprite, Texture, Rectangle } from 'pixi.js';++// Trimmed port of shahar061/the-office (office/engine/TiledMapRenderer.ts):+// renders floor/walls/furniture tile layers and parses collision, spawn-points+// and zones. Interactive-object / war-room / monitor-glow extraction is dropped+// (we render every tile statically), so no tiles ever go missing.++const FLIPPED_H_FLAG = 0x80000000;+const FLIPPED_V_FLAG = 0x40000000;+const FLIPPED_D_FLAG = 0x20000000;+const TILE_ID_MASK = 0x1fffffff;++export interface TiledMap {+ width: number;+ height: number;+ tilewidth: number;+ tileheight: number;+ layers: TiledLayer[];+ tilesets: TiledTilesetRef[];+}++export interface TiledLayer {+ name: string;+ type: 'tilelayer' | 'objectgroup';+ data?: number[];+ objects?: TiledObject[];+}++export interface TiledObject {+ name: string;+ x: number;+ y: number;+ width?: number;+ height?: number;+}++export interface TiledTilesetRef {+ firstgid: number;+ source?: string;+ image?: string;+ columns?: number;+ tilewidth?: number;+ tileheight?: number;+ tilecount?: number;+}++export interface ZoneRect { x: number; y: number; width: number; height: number; }+export interface Point { x: number; y: number; }++const TILE_LAYERS = ['floor', 'walls', 'furniture-below', 'furniture-above'] as const;+const COLLISION_LAYER = 'collision';+const SPAWN_POINTS_LAYER = 'spawn-points';+const ZONES_LAYER = 'zones';++export class TiledMapRenderer {+ readonly width: number;+ readonly height: number;+ readonly tileSize: number;++ private walkabilityGrid: boolean[][] = [];+ private spawnPoints: Map<string, Point> = new Map();+ private zones: Map<string, ZoneRect> = new Map();+ private characterContainer: Container;+ private rootContainer: Container;++ private static readonly WALKABLE_SPAWN_PREFIXES = ['desk-', 'pc-', 'warroom-', 'entrance'];++ constructor(private mapData: TiledMap, private tilesetTextures: Texture[]) {+ this.width = mapData.width;+ this.height = mapData.height;+ this.tileSize = mapData.tilewidth;+ this.rootContainer = new Container();+ this.characterContainer = new Container();+ this.characterContainer.sortableChildren = true;++ this.parseCollisionLayer();+ this.parseSpawnPoints();+ this.markWalkableSpawnPoints();+ this.parseZones();+ this.buildTileLayers();+ }++ getContainer(): Container { return this.rootContainer; }+ getCharacterContainer(): Container { return this.characterContainer; }++ isWalkable(tx: number, ty: number): boolean {+ if (tx < 0 || ty < 0 || tx >= this.width || ty >= this.height) return false;+ return this.walkabilityGrid[ty][tx];+ }++ tileToPixel(tx: number, ty: number): Point {+ return { x: tx * this.tileSize, y: ty * this.tileSize };+ }++ pixelToTile(px: number, py: number): Point {+ return { x: Math.floor(px / this.tileSize), y: Math.floor(py / this.tileSize) };+ }++ getSpawnPoint(name: string): Point | undefined { return this.spawnPoints.get(name); }+ getAllSpawnPoints(): Map<string, Point> { return this.spawnPoints; }+ getZone(name: string): ZoneRect | undefined { return this.zones.get(name); }+ getAllZones(): Map<string, ZoneRect> { return this.zones; }++ private parseCollisionLayer(): void {+ const layer = this.findLayer(COLLISION_LAYER, 'tilelayer');+ this.walkabilityGrid = Array.from({ length: this.height }, () => Array(this.width).fill(true));+ if (!layer?.data) return;+ for (let y = 0; y < this.height; y++) {+ for (let x = 0; x < this.width; x++) {+ const rawId = layer.data[y * this.width + x];+ if ((rawId & TILE_ID_MASK) !== 0) this.walkabilityGrid[y][x] = false;+ }+ }+ }++ private parseSpawnPoints(): void {+ const layer = this.findLayer(SPAWN_POINTS_LAYER, 'objectgroup');+ if (!layer?.objects) return;+ for (const obj of layer.objects) {+ this.spawnPoints.set(obj.name, {+ x: Math.floor(obj.x / this.tileSize),+ y: Math.floor(obj.y / this.tileSize),+ });+ }+ }++ /** Force seat/desk tiles walkable so agents can path onto them even though+ * the underlying chair/desk tile is non-walkable in the collision layer. */+ private markWalkableSpawnPoints(): void {+ for (const [name, point] of this.spawnPoints) {+ if (!TiledMapRenderer.WALKABLE_SPAWN_PREFIXES.some((p) => name.startsWith(p))) continue;+ if (point.y >= 0 && point.y < this.height && point.x >= 0 && point.x < this.width) {+ this.walkabilityGrid[point.y][point.x] = true;+ }+ }+ }++ private parseZones(): void {+ const layer = this.findLayer(ZONES_LAYER, 'objectgroup');+ if (!layer?.objects) return;+ for (const obj of layer.objects) {+ this.zones.set(obj.name, {+ x: Math.floor(obj.x / this.tileSize),+ y: Math.floor(obj.y / this.tileSize),+ width: Math.floor((obj.width ?? 0) / this.tileSize),+ height: Math.floor((obj.height ?? 0) / this.tileSize),+ });+ }+ }++ private resolveTileset(tileId: number): { tileset: TiledTilesetRef; texture: Texture } | undefined {+ for (let i = this.mapData.tilesets.length - 1; i >= 0; i--) {+ if (tileId >= this.mapData.tilesets[i].firstgid) {+ return { tileset: this.mapData.tilesets[i], texture: this.tilesetTextures[i] };+ }+ }+ return undefined;+ }++ private buildTileLayers(): void {+ if (this.mapData.tilesets.length === 0) return;++ for (const layerName of TILE_LAYERS) {+ const layer = this.findLayer(layerName, 'tilelayer');+ const container = new Container();+ container.label = layerName;++ if (layer?.data) {+ for (let y = 0; y < this.height; y++) {+ for (let x = 0; x < this.width; x++) {+ const raw = layer.data[y * this.width + x];+ if (raw === 0) continue;++ const flippedH = (raw & FLIPPED_H_FLAG) !== 0;+ const flippedV = (raw & FLIPPED_V_FLAG) !== 0;+ const flippedD = (raw & FLIPPED_D_FLAG) !== 0;+ const tileId = raw & TILE_ID_MASK;++ const resolved = this.resolveTileset(tileId);+ if (!resolved) continue;++ const { tileset, texture } = resolved;+ const cols = tileset.columns ?? 16;+ const tw = tileset.tilewidth ?? this.tileSize;+ const th = tileset.tileheight ?? this.tileSize;+ const localId = tileId - tileset.firstgid;+ const srcX = (localId % cols) * tw;+ const srcY = Math.floor(localId / cols) * th;++ const frame = new Rectangle(srcX, srcY, tw, th);+ const sprite = new Sprite(new Texture({ source: texture.source, frame }));++ if (flippedH || flippedV || flippedD) {+ sprite.anchor.set(0.5, 0.5);+ sprite.x = x * this.tileSize + this.tileSize / 2;+ sprite.y = y * this.tileSize + this.tileSize / 2;+ if (flippedD) {+ if (flippedH && !flippedV) {+ sprite.rotation = Math.PI / 2;+ } else if (!flippedH && flippedV) {+ sprite.rotation = -Math.PI / 2;+ } else if (flippedH && flippedV) {+ sprite.rotation = Math.PI / 2;+ sprite.scale.y = -1;+ } else {+ sprite.rotation = Math.PI / 2;+ sprite.scale.x = -1;+ }+ } else {+ if (flippedH) sprite.scale.x = -1;+ if (flippedV) sprite.scale.y = -1;+ }+ } else {+ sprite.x = x * this.tileSize;+ sprite.y = y * this.tileSize;+ }++ container.addChild(sprite);+ }+ }+ }++ this.rootContainer.addChild(container);+ }++ // Characters render above every tile layer.+ this.rootContainer.addChild(this.characterContainer);+ }++ private findLayer(name: string, type: 'tilelayer' | 'objectgroup'): TiledLayer | undefined {+ return this.mapData.layers.find((l) => l.name === name && l.type === type);+ }+}diff --git a/src/renderer/src/scene/office/ToolBubble.ts b/src/renderer/src/scene/office/ToolBubble.tsnew file mode 100644index 00000000..adec29d7--- /dev/null+++ b/src/renderer/src/scene/office/ToolBubble.ts@@ -0,0 +1,208 @@+import { Container, Graphics, Text } from 'pixi.js';++// Speech bubble shown above a character: "<icon> <target>" (e.g. "> App.tsx").+// Ported from shahar061/the-office (office/characters/ToolBubble.ts); tool icon+// map extended to cover our ToolKind set.++const TOOL_ICONS: Record<string, string> = {+ Read: '<',+ Edit: '>',+ Write: '>',+ Bash: '$',+ Grep: '?',+ Glob: '?',+ WebFetch: '@',+ WebSearch: '@',+ TodoWrite: '=',+ MCP: '*',+};++const DEFAULT_ICON = '*';++const PADDING_X = 6;+const PADDING_Y = 3;+const CORNER_RADIUS = 4;+const MAX_WIDTH = 140;+const BG_COLOR = 0x1a1320; // ink-900+const BG_ALPHA = 0.82;+const TEXT_COLOR = '#fffdf5';+const FONT_SIZE = 10;+const RENDER_SCALE = 0.5; // render at 2x, scale down for crispness+const OFFSET_Y = -36;+const FADE_IN_DURATION = 0.15;+const FADE_OUT_DURATION = 0.3;+const LINGER_DURATION = 2.0;+const DOTS_CYCLE_SPEED = 0.5;++type BubbleState = 'hidden' | 'fading-in' | 'visible' | 'lingering' | 'fading-out';++export function toolIcon(toolName: string): string {+ return TOOL_ICONS[toolName] ?? DEFAULT_ICON;+}++export class ToolBubble {+ readonly container: Container;+ private inner: Container;+ private bg: Graphics;+ private label: Text;+ private state: BubbleState = 'hidden';+ private fadeElapsed = 0;+ private lingerElapsed = 0;+ private bgW = 0;+ private bgH = 0;+ private isThinking = false;+ private dotsElapsed = 0;+ private dotsPhase = 0;++ constructor() {+ this.container = new Container();+ this.container.zIndex = 100000;+ this.container.eventMode = 'none';+ this.container.alpha = 0;+ this.container.visible = false;++ this.inner = new Container();+ this.inner.scale.set(RENDER_SCALE);+ this.container.addChild(this.inner);++ this.bg = new Graphics();+ this.label = new Text({+ text: '',+ style: { fontSize: FONT_SIZE, fill: TEXT_COLOR, fontFamily: 'monospace' },+ });+ this.label.x = PADDING_X;+ this.label.y = PADDING_Y;++ this.inner.addChild(this.bg, this.label);+ }++ /** Show a tool action. Pass toolName='' & target='...' to render a thinking ellipsis. */+ show(toolName: string, target: string): void {+ const icon = toolIcon(toolName);+ this.isThinking = !toolName && target === '...';++ if (this.isThinking) {+ this.dotsElapsed = 0;+ this.dotsPhase = 0;+ this.label.text = '.';+ } else {+ const displayText = target ? `${icon} ${target}` : icon;+ this.label.text = displayText;+ const maxTextW = MAX_WIDTH / RENDER_SCALE - PADDING_X * 2;+ if (this.label.width > maxTextW) {+ let truncated = displayText;+ let iterations = 0;+ while (truncated.length > 3 && this.label.width > maxTextW && iterations++ < 50) {+ truncated = truncated.slice(0, -2) + '…';+ this.label.text = truncated;+ }+ }+ }++ this.redrawBg();+ this.reveal();+ }++ /** Show plain text (no tool icon) — used for the "last prompt" card above a+ * seated agent. Stays put until replaced/hidden (no auto-linger). */+ showText(text: string): void {+ this.isThinking = false;+ const display = text || '…';+ this.label.text = display;+ const maxTextW = MAX_WIDTH / RENDER_SCALE - PADDING_X * 2;+ if (this.label.width > maxTextW) {+ let truncated = display;+ let iterations = 0;+ while (truncated.length > 3 && this.label.width > maxTextW && iterations++ < 60) {+ truncated = truncated.slice(0, -2) + '…';+ this.label.text = truncated;+ }+ }+ this.redrawBg();+ this.reveal();+ }++ private reveal(): void {+ if (this.state === 'hidden' || this.state === 'fading-out') {+ this.state = 'fading-in';+ this.fadeElapsed = 0;+ this.container.visible = true;+ } else {+ this.state = 'visible';+ this.container.alpha = 1;+ }+ this.lingerElapsed = 0;+ }++ startLinger(): void {+ if (this.state === 'hidden') return;+ this.state = 'lingering';+ this.lingerElapsed = 0;+ }++ setPosition(px: number, py: number): void {+ const halfBubble = (this.bgW * RENDER_SCALE) / 2;+ this.container.x = px - halfBubble;+ this.container.y = py + OFFSET_Y - this.bgH * RENDER_SCALE;+ }++ hide(): void {+ this.state = 'hidden';+ this.isThinking = false;+ this.container.alpha = 0;+ this.container.visible = false;+ }++ isHidden(): boolean {+ return this.state === 'hidden';+ }++ update(dt: number): void {+ if (this.isThinking && (this.state === 'visible' || this.state === 'fading-in')) {+ this.dotsElapsed += dt;+ const newPhase = Math.floor(this.dotsElapsed / DOTS_CYCLE_SPEED) % 3;+ if (newPhase !== this.dotsPhase) {+ this.dotsPhase = newPhase;+ this.label.text = ['.', '..', '...'][this.dotsPhase];+ this.redrawBg();+ }+ }++ switch (this.state) {+ case 'fading-in': {+ this.fadeElapsed += dt;+ const t = Math.min(this.fadeElapsed / FADE_IN_DURATION, 1);+ this.container.alpha = t;+ if (t >= 1) this.state = 'visible';+ break;+ }+ case 'lingering': {+ this.lingerElapsed += dt;+ if (this.lingerElapsed >= LINGER_DURATION) {+ this.state = 'fading-out';+ this.fadeElapsed = 0;+ }+ break;+ }+ case 'fading-out': {+ this.fadeElapsed += dt;+ const t = Math.min(this.fadeElapsed / FADE_OUT_DURATION, 1);+ this.container.alpha = 1 - t;+ if (t >= 1) this.hide();+ break;+ }+ }+ }++ destroy(): void {+ this.container.destroy({ children: true });+ }++ private redrawBg(): void {+ this.bgW = Math.min(this.label.width + PADDING_X * 2, MAX_WIDTH / RENDER_SCALE);+ this.bgH = this.label.height + PADDING_Y * 2;+ this.bg.clear();+ this.bg.roundRect(0, 0, this.bgW, this.bgH, CORNER_RADIUS);+ this.bg.fill({ color: BG_COLOR, alpha: BG_ALPHA });+ }+}diff --git a/src/renderer/src/scene/office/cast.ts b/src/renderer/src/scene/office/cast.tsnew file mode 100644index 00000000..96fd3708--- /dev/null+++ b/src/renderer/src/scene/office/cast.ts@@ -0,0 +1,100 @@+// The Office cast — roster metadata + sprite frames.+//+// Both the static portraits (cards / picker) and the in-scene walking sprites are+// now fully custom-drawn from the same per-character recipes in portraitArt.ts:+// the scene sprite reuses the portrait's exact head/face/clothing and adds legs,+// so an agent on the office floor looks identical to its card. The LimeZu base+// sheets are no longer used for the cast. See assets/ATTRIBUTION.md.++import { Texture } from 'pixi.js';+import { paintPortrait, sceneFrameBufs, SCENE_W, SCENE_H } from './portraitArt';++export type OfficeCharacterName =+ | 'michael' | 'jim' | 'pam' | 'dwight' | 'kevin' | 'angela'+ | 'oscar' | 'stanley' | 'phyllis' | 'andy' | 'kelly' | 'ryan'+ | 'toby' | 'creed' | 'meredith';++export interface CastMember {+ name: OfficeCharacterName;+ displayName: string;+ /** Signature accent color (hex) — used for the in-scene selection glow. */+ shirt: string;+ /** Blurb shown when this character is picked / has no description yet. */+ blurb: string;+}++/** Selectable roster, in display order. */+export const OFFICE_CAST: CastMember[] = [+ { name: 'michael', displayName: 'Michael', shirt: '#5a6b8c', blurb: "World's best boss" },+ { name: 'jim', displayName: 'Jim', shirt: '#6fa8dc', blurb: 'Salesman, prankster' },+ { name: 'pam', displayName: 'Pam', shirt: '#9caf88', blurb: 'Receptionist, artist' },+ { name: 'dwight', displayName: 'Dwight', shirt: '#b89b3e', blurb: 'Assistant (to the) RM' },+ { name: 'kevin', displayName: 'Kevin', shirt: '#4a7ab5', blurb: 'Accounting' },+ { name: 'angela', displayName: 'Angela', shirt: '#8a86a6', blurb: 'Head of accounting' },+ { name: 'oscar', displayName: 'Oscar', shirt: '#7a4b6b', blurb: 'Accountant' },+ { name: 'stanley', displayName: 'Stanley', shirt: '#8c5a4b', blurb: 'Sales, crossword' },+ { name: 'phyllis', displayName: 'Phyllis', shirt: '#b08bbf', blurb: 'Sales' },+ { name: 'andy', displayName: 'Andy', shirt: '#6fae6f', blurb: 'Cornell, a cappella' },+ { name: 'kelly', displayName: 'Kelly', shirt: '#d16ba5', blurb: 'Customer service' },+ { name: 'ryan', displayName: 'Ryan', shirt: '#3a3a44', blurb: 'The temp' },+ { name: 'toby', displayName: 'Toby', shirt: '#9a8c5a', blurb: 'Human resources' },+ { name: 'creed', displayName: 'Creed', shirt: '#6b7a4b', blurb: 'Quality assurance' },+ { name: 'meredith', displayName: 'Meredith', shirt: '#b5544a', blurb: 'Supplier relations' },+];++export const CAST_BY_NAME: Record<OfficeCharacterName, CastMember> =+ Object.fromEntries(OFFICE_CAST.map((c) => [c.name, c])) as Record<OfficeCharacterName, CastMember>;++export const DEFAULT_CHARACTER: OfficeCharacterName = 'jim';++export function hexToNumber(hex: string): number {+ return parseInt(hex.replace('#', ''), 16);+}++// ─── scene frames ────────────────────────────────────────────────────────────+const frameCache = new Map<OfficeCharacterName, Texture[][]>();++function bufToTexture(buf: Uint8ClampedArray): Texture {+ const canvas = document.createElement('canvas');+ canvas.width = SCENE_W; canvas.height = SCENE_H;+ const ctx = canvas.getContext('2d')!;+ const img = ctx.createImageData(SCENE_W, SCENE_H);+ img.data.set(buf);+ ctx.putImageData(img, 0, 0);+ const tex = Texture.from(canvas);+ tex.source.scaleMode = 'nearest';+ return tex;+}++/**+ * Frame grid CharacterSprite expects: 3 rows (down, up, right) × 7 frames+ * [walk1, walk2, walk3, type1, type2, read1, read2]. We provide a front view+ * (down — and reused for the side row, so left/right walkers still show a face)+ * and a back view (up — agents seated facing their desk show their back). The+ * three walk frames are stand / step-left / step-right.+ */+export async function getCastFrames(name: OfficeCharacterName): Promise<Texture[][]> {+ const cached = frameCache.get(name);+ if (cached) return cached;+ const { front, back } = sceneFrameBufs(name);+ const toRow = (bufs: Uint8ClampedArray[]): Texture[] => {+ const [stand, stepL, stepR] = bufs.map(bufToTexture);+ return [stand, stepL, stepR, stand, stand, stand, stand];+ };+ const frontRow = toRow(front);+ const frames: Texture[][] = [frontRow, toRow(back), frontRow]; // down, up, right+ frameCache.set(name, frames);+ return frames;+}++/**+ * Paint a character's static portrait for cards / the picker (delegates to the+ * custom procedural composer in portraitArt.ts).+ */+export async function paintCastPortrait(+ ctx: CanvasRenderingContext2D,+ name: OfficeCharacterName,+ scale = 2,+): Promise<void> {+ paintPortrait(ctx, name, scale);+}diff --git a/src/renderer/src/scene/office/pathfinding.ts b/src/renderer/src/scene/office/pathfinding.tsnew file mode 100644index 00000000..6d874a60--- /dev/null+++ b/src/renderer/src/scene/office/pathfinding.ts@@ -0,0 +1,66 @@+// BFS pathfinding on a tile walkability grid.+// Ported verbatim from shahar061/the-office (office/engine/pathfinding.ts).++export interface Walkable {+ width: number;+ height: number;+ isWalkable(x: number, y: number): boolean;+}++interface Point {+ x: number;+ y: number;+}++const DIRECTIONS: Point[] = [+ { x: 0, y: -1 },+ { x: 0, y: 1 },+ { x: -1, y: 0 },+ { x: 1, y: 0 },+];++export function findPath(map: Walkable, start: Point, goal: Point): Point[] | null {+ if (start.x === goal.x && start.y === goal.y) return [];+ if (!map.isWalkable(goal.x, goal.y)) return null;++ const key = (p: Point) => `${p.x},${p.y}`;+ const visited = new Set<string>();+ const parent = new Map<string, Point>();+ const queue: Point[] = [start];+ visited.add(key(start));++ while (queue.length > 0) {+ const current = queue.shift()!;++ for (const dir of DIRECTIONS) {+ const next: Point = { x: current.x + dir.x, y: current.y + dir.y };+ const nextKey = key(next);++ if (visited.has(nextKey) || !map.isWalkable(next.x, next.y)) continue;++ visited.add(nextKey);+ parent.set(nextKey, current);++ if (next.x === goal.x && next.y === goal.y) {+ return reconstructPath(parent, start, goal);+ }++ queue.push(next);+ }+ }++ return null;+}++function reconstructPath(parent: Map<string, Point>, start: Point, goal: Point): Point[] {+ const path: Point[] = [];+ let current = goal;+ const key = (p: Point) => `${p.x},${p.y}`;++ while (!(current.x === start.x && current.y === start.y)) {+ path.unshift(current);+ current = parent.get(key(current))!;+ }++ return path;+}diff --git a/src/renderer/src/scene/office/portraitArt.ts b/src/renderer/src/scene/office/portraitArt.tsnew file mode 100644index 00000000..303f4cd8--- /dev/null+++ b/src/renderer/src/scene/office/portraitArt.ts@@ -0,0 +1,498 @@+// Procedural portraits for The Office cast.+//+// These are fully custom-drawn busts (NOT recolored LimeZu sprites): each+// character is an explicit recipe layering skin → clothing → face → facial hair+// → hairstyle → glasses on an 18×28 canvas. This gives real control over each+// person's hairstyle shape, garment cut/color, and facial hair so they read as+// the specific show character. The in-scene walking sprites still use the LimeZu+// recolor in cast.ts; this module only powers the static portraits in the UI.++import type { OfficeCharacterName } from './cast';++export const PORTRAIT_W = 18;+export const PORTRAIT_H = 28;+// In-scene walking sprite: same width + upper body as the portrait, taller to add legs.+export const SCENE_W = 18;+export const SCENE_H = 32;+const OUTLINE: RGB = [38, 34, 46];+const HX0 = 4, HX1 = 13; // head skin columns++type RGB = [number, number, number];+type Buf = Uint8ClampedArray;++// Current canvas dims — set per compose() so the same drawing primitives serve+// both the 18×28 portrait and the 18×32 scene sprite. (Rendering is synchronous.)+let CUR_W = PORTRAIT_W, CUR_H = PORTRAIT_H;++const clamp = (v: number) => (v < 0 ? 0 : v > 255 ? 255 : Math.round(v));+function shades(rgb: RGB, dl = 1.22, dd = 0.68): [RGB, RGB, RGB] {+ return [+ [clamp(rgb[0] * dl), clamp(rgb[1] * dl), clamp(rgb[2] * dl)],+ [rgb[0], rgb[1], rgb[2]],+ [clamp(rgb[0] * dd), clamp(rgb[1] * dd), clamp(rgb[2] * dd)],+ ];+}++function set(buf: Buf, x: number, y: number, c: RGB, a = 255): void {+ if (x < 0 || x >= CUR_W || y < 0 || y >= CUR_H) return;+ const i = (y * CUR_W + x) * 4;+ buf[i] = c[0]; buf[i + 1] = c[1]; buf[i + 2] = c[2]; buf[i + 3] = a;+}+function alphaAt(buf: Buf, x: number, y: number): number {+ if (x < 0 || x >= CUR_W || y < 0 || y >= CUR_H) return 0;+ return buf[(y * CUR_W + x) * 4 + 3];+}+function rgbAt(buf: Buf, x: number, y: number): RGB {+ const i = (y * CUR_W + x) * 4;+ return [buf[i], buf[i + 1], buf[i + 2]];+}+function eq(a: RGB, b: RGB): boolean { return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; }+function rect(buf: Buf, x0: number, y0: number, x1: number, y1: number, c: RGB): void {+ for (let y = y0; y <= y1; y++) for (let x = x0; x <= x1; x++) set(buf, x, y, c);+}++// ─── palettes ────────────────────────────────────────────────────────────────+interface SkinPal { hi: RGB; base: RGB; sh: RGB; line: RGB; }+const SKIN: Record<string, SkinPal> = {+ light: { hi: [255, 221, 189], base: [247, 201, 170], sh: [212, 158, 126], line: [168, 112, 82] },+ tan: { hi: [232, 182, 136], base: [214, 162, 116], sh: [176, 126, 86], line: [138, 92, 60] },+ brown: { hi: [180, 130, 94], base: [158, 112, 78], sh: [124, 86, 58], line: [90, 60, 40] },+ dark: { hi: [142, 98, 70], base: [120, 80, 56], sh: [94, 62, 42], line: [64, 42, 28] },+};++// ─── head + face ─────────────────────────────────────────────────────────────+function drawHead(buf: Buf, skin: string): void {+ const s = SKIN[skin];+ for (let y = 4; y <= 16; y++) {+ for (let x = HX0; x <= HX1; x++) {+ if (((x === HX0 || x === HX1) && (y === 4 || y === 5 || y === 16)) || ((x === 5 || x === 12) && y === 4)) continue;+ set(buf, x, y, s.base);+ }+ }+ for (let y = 6; y < 12; y++) set(buf, 5, y, s.hi);+ set(buf, 6, 5, s.hi); set(buf, 7, 5, s.hi);+ for (let y = 6; y < 15; y++) set(buf, 12, y, s.sh);+ for (const x of [7, 8, 9, 10, 11]) set(buf, x, 16, s.sh);+ for (const ex of [HX0 - 1, HX1 + 1]) { set(buf, ex, 9, s.base); set(buf, ex, 10, s.base); set(buf, ex, 11, s.sh); }+ rect(buf, 7, 17, 10, 18, s.sh); rect(buf, 7, 17, 9, 17, s.base);+}++type Brow = 'flat' | 'angry' | 'raised' | 'soft';+type Mouth = 'neutral' | 'smile' | 'frown' | 'grin';+function drawFace(buf: Buf, skin: string, brow: Brow, mouth: Mouth, blush: boolean): void {+ const s = SKIN[skin];+ const white: RGB = [250, 248, 244], pup: RGB = [46, 38, 42];+ for (const [a, b, p] of [[5, 6, 6], [10, 11, 10]] as const) {+ set(buf, a, 9, white); set(buf, b, 9, white); set(buf, p, 9, pup);+ }+ if (brow === 'flat') for (const x of [5, 6, 10, 11]) set(buf, x, 7, s.line);+ else if (brow === 'angry') { set(buf, 5, 8, s.line); set(buf, 6, 7, s.line); set(buf, 10, 7, s.line); set(buf, 11, 8, s.line); }+ else if (brow === 'raised') for (const x of [5, 6, 10, 11]) set(buf, x, 6, s.line);+ else if (brow === 'soft') { for (const x of [5, 11]) set(buf, x, 7, s.line); for (const x of [6, 10]) set(buf, x, 7, s.sh); }+ set(buf, 8, 11, s.sh); set(buf, 8, 12, s.sh); set(buf, 7, 12, s.sh);+ const mc: RGB = [158, 86, 80];+ const mouths: Record<Mouth, [number, number][]> = {+ neutral: [[7, 14], [8, 14], [9, 14], [10, 14]],+ smile: [[7, 14], [8, 14], [9, 14], [10, 14], [6, 13], [11, 13]],+ frown: [[7, 15], [8, 15], [9, 15], [10, 15], [6, 14], [11, 14]],+ grin: [[7, 14], [8, 14], [9, 14], [10, 14], [7, 13], [8, 13], [9, 13], [10, 13], [6, 13], [11, 13]],+ };+ for (const [x, y] of mouths[mouth]) set(buf, x, y, mc);+ if (blush) for (const x of [5, 12]) set(buf, x, 12, [235, 150, 140], 140);+}++// ─── hairstyles ──────────────────────────────────────────────────────────────+interface HairArgs { part?: 'L' | 'R'; recede?: number; length?: number; vol?: number; }+type HairFn = (buf: Buf, color: RGB, skinBase: RGB, a: HairArgs) => void;++const styleShort: HairFn = (buf, color, skinBase, a) => {+ const [hi, base, sh] = shades(color);+ const part = a.part ?? 'L', recede = a.recede ?? 0;+ rect(buf, HX0, 2, HX1, 4, base);+ for (let x = HX0 - 1; x <= HX1 + 1; x++) set(buf, x, 3, base);+ rect(buf, HX0 - 1, 4, HX1 + 1, 5, base);+ for (let y = 6; y < 9; y++) { set(buf, HX0 - 1, y, base); set(buf, HX0, y, base); set(buf, HX1, y, base); set(buf, HX1 + 1, y, base); }+ for (let x = HX0; x <= HX1; x++) set(buf, x, 5, base);+ if (recede) {+ for (let y = 3; y < 6; y++) for (let x = 6; x < 12; x++) if (eq(rgbAt(buf, x, y), base)) set(buf, x, y, skinBase);+ set(buf, 8, 5, base); // widow's peak+ }+ const hx = part === 'L' ? 6 : 11;+ for (let y = 2; y < 6; y++) set(buf, hx, y, sh);+ for (let x = HX0; x < hx; x++) if (alphaAt(buf, x, 3)) set(buf, x, 3, hi);+ for (let x = HX0; x <= HX1; x++) if (alphaAt(buf, x, 2)) set(buf, x, 2, hi);+};++const styleFloppy: HairFn = (buf, color) => {+ const [hi, base] = shades(color);+ rect(buf, HX0, 2, HX1, 4, base);+ for (let x = HX0 - 1; x <= HX1 + 1; x++) set(buf, x, 3, base);+ rect(buf, HX0 - 1, 4, HX1 + 1, 5, base);+ for (let x = HX0; x <= HX1; x++) set(buf, x, 5, base);+ for (let x = 6; x <= 12; x++) set(buf, x, 6, base);+ set(buf, 9, 7, base); set(buf, 10, 7, base); set(buf, 11, 7, base);+ for (let y = 6; y < 9; y++) { set(buf, HX0 - 1, y, base); set(buf, HX0, y, base); set(buf, HX1, y, base); set(buf, HX1 + 1, y, base); }+ for (let x = HX0; x <= HX1; x++) if (alphaAt(buf, x, 2)) set(buf, x, 2, hi);+ for (const x of [7, 8, 9]) set(buf, x, 6, hi);+};++const styleFrame: HairFn = (buf, color, skinBase, a) => {+ const [hi, base, sh] = shades(color);+ const length = a.length ?? 17, vol = a.vol ?? 1;+ rect(buf, HX0 - 1, 2, HX1 + 1, 5, base);+ for (let x = HX0 - 1; x <= HX1 + 1; x++) set(buf, x, 3, base);+ for (let x = HX0; x <= HX1; x++) set(buf, x, 5, base);+ for (let x = 6; x < 12; x++) set(buf, x, 6, base);+ set(buf, 8, 6, skinBase); set(buf, 9, 6, skinBase);+ for (let y = 6; y <= length; y++) {+ for (let dx = 0; dx < vol; dx++) { set(buf, HX0 - 1 - dx, y, base); set(buf, HX1 + 1 + dx, y, base); }+ set(buf, HX0, y, base); set(buf, HX1, y, base);+ }+ for (let x = HX0 - 1; x < HX0 + 1; x++) set(buf, x, length + 1, base);+ for (let x = HX1; x < HX1 + 2; x++) set(buf, x, length + 1, base);+ for (let y = 2; y < 6; y++) if (alphaAt(buf, HX1, y)) set(buf, HX1, y, sh);+ for (let x = HX0; x < 9; x++) if (alphaAt(buf, x, 2)) set(buf, x, 2, hi);+};++const styleBun: HairFn = (buf, color, skinBase) => {+ const [hi, base] = shades(color);+ rect(buf, HX0, 3, HX1, 5, base);+ for (let x = HX0 - 1; x <= HX1 + 1; x++) set(buf, x, 4, base);+ for (let x = HX0; x <= HX1; x++) set(buf, x, 5, base);+ for (let x = 6; x < 12; x++) set(buf, x, 6, base);+ set(buf, 8, 6, skinBase); set(buf, 9, 6, skinBase);+ for (let y = 6; y < 9; y++) { set(buf, HX0, y, base); set(buf, HX1, y, base); }+ rect(buf, 7, 1, 10, 2, base);+ for (let x = HX0; x <= HX1; x++) if (alphaAt(buf, x, 3)) set(buf, x, 3, hi);+};++const styleCurly: HairFn = (buf, color, skinBase) => {+ const [hi, base] = shades(color);+ const pts: [number, number][] = [[4, 3], [5, 2], [6, 3], [7, 2], [8, 3], [9, 2], [10, 3], [11, 2], [12, 3], [13, 3],+ [3, 4], [4, 4], [13, 4], [14, 4], [3, 5], [4, 5], [13, 5], [14, 5], [3, 6], [13, 6], [4, 6], [12, 6], [3, 7], [13, 7], [4, 7]];+ rect(buf, HX0, 3, HX1, 5, base);+ for (let x = HX0 - 1; x <= HX1 + 1; x++) set(buf, x, 4, base);+ for (const [x, y] of pts) set(buf, x, y, base);+ for (let x = 6; x < 12; x++) set(buf, x, 6, base);+ set(buf, 8, 6, skinBase); set(buf, 9, 6, skinBase);+ for (const [x, y] of [[5, 2], [7, 2], [9, 2], [11, 2]] as const) set(buf, x, y, hi);+};++const styleMessy: HairFn = (buf, color, skinBase, a) => {+ const [hi, base] = shades(color);+ const length = a.length ?? 8;+ rect(buf, HX0 - 1, 2, HX1 + 1, 5, base);+ const spikes: [number, number][] = [[3, 2], [5, 1], [7, 2], [9, 1], [11, 2], [13, 1], [14, 2], [4, 2], [12, 2]];+ for (const [x, y] of spikes) set(buf, x, y, base);+ for (let x = HX0; x <= HX1; x++) set(buf, x, 5, base);+ for (let x = 6; x < 12; x++) set(buf, x, 6, base);+ set(buf, 8, 6, skinBase); set(buf, 9, 6, skinBase);+ for (let y = 6; y <= length; y++) { set(buf, HX0 - 1, y, base); set(buf, HX0, y, base); set(buf, HX1, y, base); set(buf, HX1 + 1, y, base); }+ for (const [x, y] of spikes) set(buf, x, y, hi);+};++const styleRecede: HairFn = (buf, color, skinBase) => {+ const [, base, sh] = shades(color);+ for (let y = 4; y < 10; y++) { set(buf, HX0 - 1, y, base); set(buf, HX0, y, base); set(buf, HX1, y, base); set(buf, HX1 + 1, y, base); }+ for (let x = HX0; x <= HX1; x++) set(buf, x, 4, base);+ for (let x = HX0 + 1; x < HX1; x++) set(buf, x, 5, base);+ for (let y = 5; y < 9; y++) for (let x = 6; x < 12; x++) if (eq(rgbAt(buf, x, y), base)) set(buf, x, y, skinBase);+ for (let x = HX0; x <= HX1; x++) if (alphaAt(buf, x, 4)) set(buf, x, 4, sh);+};++const styleSpiky: HairFn = (buf, color, skinBase) => {+ const [hi, base] = shades(color);+ rect(buf, HX0, 3, HX1, 5, base);+ for (let x = HX0 - 1; x <= HX1 + 1; x++) set(buf, x, 4, base);+ for (let x = HX0; x <= HX1; x++) set(buf, x, 5, base);+ const spikes: [number, number][] = [[5, 2], [7, 1], [9, 2], [11, 1], [6, 2], [8, 2], [10, 2], [12, 2]];+ for (const [x, y] of spikes) set(buf, x, y, base);+ for (let x = 6; x < 12; x++) set(buf, x, 6, base);+ set(buf, 8, 6, skinBase); set(buf, 9, 6, skinBase);+ for (let y = 6; y < 8; y++) { set(buf, HX0, y, base); set(buf, HX1, y, base); }+ for (const [x, y] of spikes) set(buf, x, y, hi);+};++const HAIR_FNS = { styleShort, styleFloppy, styleFrame, styleBun, styleCurly, styleMessy, styleRecede, styleSpiky };+type HairStyle = keyof typeof HAIR_FNS;++// ─── facial hair ─────────────────────────────────────────────────────────────+type Facial = 'mustache' | 'mustacheSm' | 'stubble' | 'goatee';+function drawFacial(buf: Buf, kind: Facial, color: RGB): void {+ const [, base, sh] = shades(color);+ if (kind === 'mustache') {+ for (const x of [6, 7, 8, 9, 10]) set(buf, x, 13, base);+ set(buf, 6, 12, base); set(buf, 10, 12, base);+ } else if (kind === 'mustacheSm') {+ for (const x of [7, 8, 9]) set(buf, x, 13, base);+ } else if (kind === 'stubble') {+ for (const [x, y] of [[5, 14], [6, 15], [7, 15], [8, 15], [9, 15], [10, 15], [11, 14], [12, 13], [4, 13], [5, 15], [10, 15]] as const)+ set(buf, x, y, sh, 150);+ } else if (kind === 'goatee') {+ for (const x of [8, 9]) set(buf, x, 15, base);+ set(buf, 8, 14, base); set(buf, 9, 14, base);+ for (const x of [7, 8, 9, 10]) set(buf, x, 13, base);+ }+}++// ─── glasses ─────────────────────────────────────────────────────────────────+function drawGlasses(buf: Buf): void {+ for (const x of [4, 5, 6, 7]) set(buf, x, 8, OUTLINE);+ set(buf, 4, 9, OUTLINE); set(buf, 7, 9, OUTLINE);+ for (const x of [4, 5, 6, 7]) set(buf, x, 10, OUTLINE);+ for (const x of [9, 10, 11, 12]) set(buf, x, 8, OUTLINE);+ set(buf, 9, 9, OUTLINE); set(buf, 12, 9, OUTLINE);+ for (const x of [9, 10, 11, 12]) set(buf, x, 10, OUTLINE);+ set(buf, 8, 9, OUTLINE);+ set(buf, 3, 9, OUTLINE); set(buf, 13, 9, OUTLINE);+}++// ─── clothing ────────────────────────────────────────────────────────────────+type Cloth = 'suit' | 'dressshirt' | 'polo' | 'blouse' | 'cardigan' | 'sweater';+function bodyShape(buf: Buf, col: RGB): void {+ const [, base, sh] = shades(col);+ const rows: [number, number, number][] = [[19, 6, 11], [20, 4, 13], [21, 3, 14], [22, 2, 15], [23, 2, 15], [24, 1, 16], [25, 1, 16], [26, 1, 16], [27, 1, 16]];+ for (const [y, a, b] of rows) rect(buf, a, y, b, y, base);+ for (let y = 22; y < 28; y++) { set(buf, 2, y, sh); set(buf, 15, y, sh); }+}+function drawClothing(buf: Buf, kind: Cloth, c1: RGB, c2: RGB | undefined, tie: RGB | undefined, skin: string): void {+ const [hi, base, sh] = shades(c1);+ bodyShape(buf, c1);+ if (kind === 'suit') {+ const white: RGB = [238, 238, 236];+ for (const [x, y] of [[8, 19], [9, 19], [7, 20], [8, 20], [9, 20], [10, 20], [8, 21], [9, 21]] as const) set(buf, x, y, white);+ for (const [x, y] of [[6, 20], [7, 21], [11, 20], [10, 21], [6, 21], [11, 21]] as const) set(buf, x, y, sh);+ if (tie) { for (let y = 20; y < 26; y++) { set(buf, 8, y, tie); set(buf, 9, y, tie); } set(buf, 8, 20, shades(tie)[0]); }+ else for (let y = 22; y < 26; y++) { set(buf, 8, y, white); set(buf, 9, y, white); }+ } else if (kind === 'dressshirt') {+ for (const [x, y] of [[6, 19], [7, 19], [10, 19], [11, 19], [7, 20], [10, 20]] as const) set(buf, x, y, sh);+ for (let y = 20; y < 27; y += 2) set(buf, 8, y, sh);+ if (tie) for (let y = 19; y < 26; y++) { set(buf, 8, y, tie); set(buf, 9, y, tie); }+ } else if (kind === 'polo') {+ for (const [x, y] of [[6, 19], [7, 19], [10, 19], [11, 19]] as const) set(buf, x, y, hi);+ set(buf, 8, 20, sh); set(buf, 8, 22, sh);+ const accent = c2 ? shades(c2)[1] : hi;+ for (const [x, y] of [[7, 20], [9, 20]] as const) set(buf, x, y, accent);+ } else if (kind === 'blouse') {+ const s = SKIN[skin];+ for (const [x, y] of [[7, 19], [8, 19], [9, 19], [10, 19], [8, 20], [9, 20]] as const) set(buf, x, y, s.sh);+ for (let x = 5; x < 13; x++) if (eq(rgbAt(buf, x, 20), base)) set(buf, x, 20, hi);+ } else if (kind === 'cardigan') {+ const inner: RGB = c2 ? shades(c2)[1] : [235, 233, 226];+ for (let y = 19; y < 27; y++) { set(buf, 8, y, inner); set(buf, 9, y, inner); }+ for (const [x, y] of [[6, 19], [7, 19], [10, 19], [11, 19]] as const) set(buf, x, y, sh);+ } else if (kind === 'sweater') {+ for (const [x, y] of [[6, 19], [7, 19], [8, 19], [9, 19], [10, 19], [11, 19]] as const) set(buf, x, y, sh);+ }+}+function collarNeck(buf: Buf, skin: string): void {+ rect(buf, 7, 18, 10, 19, SKIN[skin].sh);+}++// ─── scene body (full standing figure: torso + legs, front or back) ──────────+// Proportioned for standing (not the portrait bust): a narrower torso over real+// legs. Head (rows 2-16) sits above; this draws rows 18-31.+const SHOE: RGB = [44, 40, 48];++function drawSceneLegs(buf: Buf, pants: RGB, phase: number): void {+ const [, base, sh] = shades(pants);+ // two legs cols 5-7 / 10-12, gap at 8-9+ for (const [lx0, lx1] of [[5, 7], [10, 12]] as const) {+ rect(buf, lx0, 25, lx1, 30, base);+ for (let y = 25; y <= 30; y++) set(buf, lx1, y, sh); // inner shade+ }+ // feet — lift one foot per walk phase for a simple gait+ const leftLow = phase !== 1, rightLow = phase !== 2;+ rect(buf, 5, leftLow ? 31 : 30, 7, leftLow ? 31 : 30, SHOE);+ rect(buf, 10, rightLow ? 31 : 30, 12, rightLow ? 31 : 30, SHOE);+}++function drawSceneTorso(buf: Buf, r: Recipe, back: boolean): void {+ const [hi, base, sh] = shades(r.c1);+ // shoulders → torso, narrower than the portrait bust+ rect(buf, 4, 18, 13, 18, base);+ rect(buf, 3, 19, 14, 19, base);+ rect(buf, 4, 20, 13, 24, base);+ for (let y = 20; y <= 24; y++) { set(buf, 3, y, sh); set(buf, 14, y, sh); set(buf, 13, y, sh); } // arms / right shade+ if (back) {+ // plain back with a collar line + center seam+ rect(buf, 6, 18, 11, 18, sh);+ for (let y = 19; y <= 24; y++) set(buf, 8, y, sh);+ return;+ }+ const skin = SKIN[r.skin];+ if (r.cloth === 'suit') {+ const white: RGB = [238, 238, 236];+ for (const [x, y] of [[8, 18], [9, 18], [7, 19], [8, 19], [9, 19], [10, 19], [8, 20], [9, 20]] as const) set(buf, x, y, white);+ for (const [x, y] of [[6, 19], [7, 20], [11, 19], [10, 20]] as const) set(buf, x, y, sh);+ if (r.tie) { for (let y = 19; y <= 24; y++) { set(buf, 8, y, r.tie); set(buf, 9, y, r.tie); } set(buf, 8, 19, shades(r.tie)[0]); }+ } else if (r.cloth === 'dressshirt') {+ for (const [x, y] of [[6, 18], [7, 18], [10, 18], [11, 18], [7, 19], [10, 19]] as const) set(buf, x, y, sh);+ if (r.tie) for (let y = 18; y <= 24; y++) { set(buf, 8, y, r.tie); set(buf, 9, y, r.tie); }+ else for (let y = 20; y <= 24; y += 2) set(buf, 8, y, sh);+ } else if (r.cloth === 'polo') {+ for (const [x, y] of [[6, 18], [7, 18], [10, 18], [11, 18]] as const) set(buf, x, y, hi);+ set(buf, 8, 19, sh); set(buf, 8, 21, sh);+ } else if (r.cloth === 'blouse') {+ for (const [x, y] of [[7, 18], [8, 18], [9, 18], [10, 18], [8, 19], [9, 19]] as const) set(buf, x, y, skin.sh);+ for (let x = 5; x < 13; x++) if (eq(rgbAt(buf, x, 19), base)) set(buf, x, 19, hi);+ } else if (r.cloth === 'cardigan') {+ const inner: RGB = r.c2 ? shades(r.c2)[1] : [235, 233, 226];+ for (let y = 18; y <= 24; y++) { set(buf, 8, y, inner); set(buf, 9, y, inner); }+ for (const [x, y] of [[6, 18], [7, 18], [10, 18], [11, 18]] as const) set(buf, x, y, sh);+ } else if (r.cloth === 'sweater') {+ for (const [x, y] of [[6, 18], [7, 18], [8, 18], [9, 18], [10, 18], [11, 18]] as const) set(buf, x, y, sh);+ }+}++/** Back of the head: a rounded hair-covered skull with crown sheen + nape, no face. */+function drawHeadBack(buf: Buf, r: Recipe): void {+ const s = SKIN[r.skin];+ const [hi, base, sh] = shades(r.hairc);+ // rounded skull silhouette (narrow at crown + nape, full through the middle)+ const rows: [number, number, number][] = [+ [2, 6, 11], [3, 5, 12], [4, 4, 13], [5, 4, 13], [6, 4, 13], [7, 4, 13], [8, 4, 13],+ [9, 4, 13], [10, 4, 13], [11, 4, 13], [12, 4, 13], [13, 5, 12], [14, 6, 11],+ ];+ for (const [y, a, b] of rows) rect(buf, a, y, b, y, base);+ // long styles drape down the sides past the head+ const len = r.hair === 'styleFrame' ? (r.hairargs?.length ?? 17)+ : r.hair === 'styleMessy' ? (r.hairargs?.length ?? 9) : 0;+ for (let y = 11; y <= len; y++) { set(buf, HX0 - 1, y, base); set(buf, HX0, y, base); set(buf, HX1, y, base); set(buf, HX1 + 1, y, base); }+ // roundness: darken the side edges and the nape+ for (let y = 4; y <= 12; y++) { set(buf, 4, y, sh); set(buf, 13, y, sh); }+ for (const [x, y] of [[5, 3], [12, 3], [5, 13], [12, 13], [6, 14], [11, 14]] as const) set(buf, x, y, sh);+ // crown sheen (rounded top catching the light) + subtle center part+ for (const [x, y] of [[7, 2], [8, 2], [9, 2], [10, 2], [7, 3], [8, 3], [9, 3]] as const) set(buf, x, y, hi);+ for (let y = 4; y <= 11; y++) set(buf, 9, y, hi); // sheen down the crown+ for (let y = 4; y <= 12; y++) set(buf, 8, y, sh); // part line+ // nape + neck (skin)+ rect(buf, 7, 14, 10, 14, sh);+ rect(buf, 7, 15, 10, 17, s.sh);+ rect(buf, 7, 15, 9, 15, s.base);+}++function drawSceneBody(buf: Buf, r: Recipe, phase: number, back: boolean): void {+ drawSceneTorso(buf, r, back);+ drawSceneLegs(buf, defaultPants(r), phase);+}++// ─── outline pass ────────────────────────────────────────────────────────────+function outlinePass(buf: Buf): void {+ const pts: [number, number][] = [];+ for (let y = 0; y < CUR_H; y++) {+ for (let x = 0; x < CUR_W; x++) {+ if (alphaAt(buf, x, y) !== 0) continue;+ for (const [dx, dy] of [[1, 0], [-1, 0], [0, 1], [0, -1]] as const) {+ if (alphaAt(buf, x + dx, y + dy) === 255) { pts.push([x, y]); break; }+ }+ }+ }+ for (const [x, y] of pts) set(buf, x, y, OUTLINE);+}++// ─── recipes ─────────────────────────────────────────────────────────────────+interface Recipe {+ skin: string; hairc: RGB; hair: HairStyle; hairargs?: HairArgs;+ cloth: Cloth; c1: RGB; c2?: RGB; tie?: RGB; pants?: RGB;+ brow?: Brow; mouth?: Mouth; blush?: boolean; facial?: Facial; glasses?: boolean;+}++const RECIPES: Record<OfficeCharacterName, Recipe> = {+ michael: { skin: 'light', hairc: [58, 42, 28], hair: 'styleShort', hairargs: { part: 'L' }, cloth: 'suit', c1: [58, 63, 74], tie: [170, 58, 58], brow: 'flat', mouth: 'smile' },+ jim: { skin: 'light', hairc: [92, 60, 34], hair: 'styleFloppy', cloth: 'dressshirt', c1: [172, 196, 224], tie: [120, 130, 150], brow: 'flat', mouth: 'smile' },+ pam: { skin: 'light', hairc: [108, 68, 38], hair: 'styleFrame', hairargs: { length: 17 }, cloth: 'cardigan', c1: [200, 190, 172], c2: [230, 160, 150], brow: 'soft', mouth: 'smile', blush: true },+ dwight: { skin: 'light', hairc: [64, 48, 28], hair: 'styleShort', hairargs: { part: 'L', recede: 1 }, cloth: 'dressshirt', c1: [184, 155, 62], tie: [120, 82, 46], glasses: true, brow: 'angry', mouth: 'neutral' },+ kevin: { skin: 'light', hairc: [58, 44, 30], hair: 'styleRecede', cloth: 'polo', c1: [110, 140, 180], c2: [90, 120, 160], brow: 'flat', mouth: 'neutral' },+ angela: { skin: 'light', hairc: [186, 154, 90], hair: 'styleBun', cloth: 'cardigan', c1: [150, 146, 170], c2: [235, 233, 226], brow: 'angry', mouth: 'frown' },+ oscar: { skin: 'tan', hairc: [28, 22, 18], hair: 'styleShort', hairargs: { part: 'L' }, cloth: 'sweater', c1: [122, 60, 74], glasses: true, brow: 'flat', mouth: 'smile' },+ stanley: { skin: 'dark', hairc: [60, 54, 48], hair: 'styleRecede', cloth: 'dressshirt', c1: [150, 120, 86], tie: [120, 78, 52], glasses: true, facial: 'mustache', brow: 'flat', mouth: 'neutral' },+ phyllis: { skin: 'light', hairc: [196, 162, 110], hair: 'styleCurly', cloth: 'blouse', c1: [202, 160, 192], glasses: true, brow: 'soft', mouth: 'smile' },+ andy: { skin: 'light', hairc: [74, 51, 32], hair: 'styleShort', hairargs: { part: 'R' }, cloth: 'polo', c1: [176, 65, 58], c2: [150, 50, 46], brow: 'raised', mouth: 'grin' },+ kelly: { skin: 'tan', hairc: [24, 18, 22], hair: 'styleFrame', hairargs: { length: 20, vol: 1 }, cloth: 'blouse', c1: [212, 90, 158], brow: 'soft', mouth: 'smile', blush: true },+ ryan: { skin: 'light', hairc: [42, 32, 24], hair: 'styleSpiky', cloth: 'suit', c1: [58, 58, 68], tie: [40, 40, 50], brow: 'flat', mouth: 'neutral' },+ toby: { skin: 'light', hairc: [106, 90, 66], hair: 'styleShort', hairargs: { part: 'L', recede: 1 }, cloth: 'dressshirt', c1: [150, 150, 120], glasses: true, facial: 'mustacheSm', brow: 'soft', mouth: 'frown' },+ creed: { skin: 'light', hairc: [186, 182, 172], hair: 'styleMessy', hairargs: { length: 9 }, cloth: 'dressshirt', c1: [126, 130, 96], facial: 'stubble', brow: 'flat', mouth: 'neutral' },+ meredith: { skin: 'light', hairc: [154, 82, 46], hair: 'styleMessy', hairargs: { length: 15 }, cloth: 'blouse', c1: [176, 86, 74], brow: 'raised', mouth: 'smile' },+};++/** The face/hair group (head → face → facial hair → hair → glasses), no clothing. */+function drawHeadGroup(buf: Buf, r: Recipe): void {+ const skinBase = SKIN[r.skin].base;+ drawHead(buf, r.skin);+ drawFace(buf, r.skin, r.brow ?? 'flat', r.mouth ?? 'neutral', r.blush ?? false);+ if (r.facial) drawFacial(buf, r.facial, r.hairc);+ HAIR_FNS[r.hair](buf, r.hairc, skinBase, r.hairargs ?? {});+ if (r.glasses) drawGlasses(buf);+}++function defaultPants(r: Recipe): RGB {+ if (r.pants) return r.pants;+ return r.cloth === 'suit' ? shades(r.c1)[2] : [54, 56, 70];+}++/** Portrait bust: shoulders-height clothing + front head group. */+function compose(r: Recipe): Buf {+ CUR_W = PORTRAIT_W; CUR_H = PORTRAIT_H;+ const buf = new Uint8ClampedArray(PORTRAIT_W * PORTRAIT_H * 4);+ drawClothing(buf, r.cloth, r.c1, r.c2, r.tie, r.skin);+ collarNeck(buf, r.skin);+ drawHeadGroup(buf, r);+ outlinePass(buf);+ return buf;+}++/** Full-body 18×32 scene sprite. `back=false` reuses the portrait's exact face. */+function composeScene(r: Recipe, phase: number, back: boolean): Buf {+ CUR_W = SCENE_W; CUR_H = SCENE_H;+ const buf = new Uint8ClampedArray(SCENE_W * SCENE_H * 4);+ drawSceneBody(buf, r, phase, back);+ if (back) drawHeadBack(buf, r);+ else drawHeadGroup(buf, r);+ outlinePass(buf);+ return buf;+}++// ─── public render ───────────────────────────────────────────────────────────+const bufCache = new Map<OfficeCharacterName, Buf>();+const sceneCache = new Map<OfficeCharacterName, SceneFrames>();++function getBuf(name: OfficeCharacterName): Buf {+ let buf = bufCache.get(name);+ if (!buf) {+ buf = compose(RECIPES[name] ?? RECIPES.jim);+ bufCache.set(name, buf);+ }+ return buf;+}++export interface SceneFrames { front: Buf[]; back: Buf[]; }++/** Walk-phase frames (stand, step-L, step-R) for the in-scene sprite, front + back. */+export function sceneFrameBufs(name: OfficeCharacterName): SceneFrames {+ let frames = sceneCache.get(name);+ if (!frames) {+ const r = RECIPES[name] ?? RECIPES.jim;+ frames = {+ front: [composeScene(r, 0, false), composeScene(r, 1, false), composeScene(r, 2, false)],+ back: [composeScene(r, 0, true), composeScene(r, 1, true), composeScene(r, 2, true)],+ };+ sceneCache.set(name, frames);+ }+ return frames;+}++/** Paint a character's procedural portrait onto `ctx`, nearest-neighbor at `scale`. */+export function paintPortrait(ctx: CanvasRenderingContext2D, name: OfficeCharacterName, scale = 2): void {+ const buf = getBuf(name);+ // Stage at 1× on an offscreen canvas, then blit scaled with smoothing off.+ const stage = document.createElement('canvas');+ stage.width = PORTRAIT_W; stage.height = PORTRAIT_H;+ const sctx = stage.getContext('2d')!;+ const img = sctx.createImageData(PORTRAIT_W, PORTRAIT_H);+ img.data.set(buf);+ sctx.putImageData(img, 0, 0);+ ctx.imageSmoothingEnabled = false;+ ctx.clearRect(0, 0, PORTRAIT_W * scale, PORTRAIT_H * scale);+ ctx.drawImage(stage, 0, 0, PORTRAIT_W, PORTRAIT_H, 0, 0, PORTRAIT_W * scale, PORTRAIT_H * scale);+}diff --git a/src/renderer/src/store/config.ts b/src/renderer/src/store/config.tsnew file mode 100644index 00000000..b71b9a65--- /dev/null+++ b/src/renderer/src/store/config.ts@@ -0,0 +1,18 @@+// Mirrors src/main/config.ts. Kept as a renderer-side type-only module+// so we don't have to reach into the preload package to type-check.++export interface HarnessConfig {+ onboardingComplete: boolean;+ harnessHome: string | null;+ registeredRepos: string[];+ autoMode: boolean;+ defaultCommand: string;+ semanticMemory: boolean;+ embeddingModel: 'minilm' | 'embeddinggemma';+}++/** Build the command line to feed into spawnPty, honoring autoMode. */+export function buildSpawnCommand(config: Pick<HarnessConfig, 'defaultCommand' | 'autoMode'>): string {+ const base = config.defaultCommand || 'claude';+ return config.autoMode ? `${base} --permission-mode bypassPermissions` : base;+}diff --git a/src/renderer/src/store/mockEvents.ts b/src/renderer/src/store/mockEvents.tsnew file mode 100644index 00000000..7931090e--- /dev/null+++ b/src/renderer/src/store/mockEvents.ts@@ -0,0 +1,162 @@+// Synthetic event stream so the avatars actually move while we wait on real tmux/hook wiring.++import { useStore, type Agent, type StationKind, type ToolKind } from './store';++const STATION_BY_TOOL: Record<ToolKind, StationKind> = {+ Read: 'shelf', Edit: 'shelf', Write: 'shelf',+ Bash: 'terminal',+ WebFetch: 'web', WebSearch: 'web',+ Grep: 'shelf', Glob: 'shelf',+ TodoWrite: 'board',+ MCP: 'mcp'+};++interface ToolSample {+ tool: ToolKind;+ what: string; // short — used as the action text and description+ lines: string[]; // terminal stream output+ thought: string; // first-person assistant text, streamed in the sidebar+}++const TOOL_SAMPLES: ToolSample[] = [+ {+ tool: 'Read', what: 'reading SPEC.md',+ lines: ['\x1b[36m● Read\x1b[0m SPEC.md', ' read 412 lines.'],+ thought: "Pulling up the spec so I can confirm the state machine before touching the implementation."+ },+ {+ tool: 'Edit', what: 'editing PixelPanel.tsx',+ lines: ['\x1b[36m● Edit\x1b[0m src/renderer/src/components/PixelPanel.tsx', ' +14 / -3'],+ thought: "Tightening up the panel border math — the inner stroke was a pixel off in inset mode."+ },+ {+ tool: 'Bash', what: 'running tests',+ lines: ['\x1b[36m● Bash\x1b[0m npm test', ' ✓ 24 passed'],+ thought: "Running the renderer suite to make sure nothing regressed before I move on."+ },+ {+ tool: 'WebFetch', what: 'fetching docs',+ lines: ['\x1b[36m● WebFetch\x1b[0m https://docs.example.com/hooks', ' ok 200 (1.2kb)'],+ thought: "Grabbing the hooks doc to double-check the PreToolUse payload shape — my memory of the field names is hazy."+ },+ {+ tool: 'Glob', what: 'searching for skill files',+ lines: ['\x1b[36m● Glob\x1b[0m **/*.skill.md', ' 23 matches'],+ thought: "Enumerating all the skill files so I can walk each one and look for stale script paths."+ },+ {+ tool: 'TodoWrite', what: 'updating the todo board',+ lines: ['\x1b[36m● TodoWrite\x1b[0m 4 items'],+ thought: "Splitting the remaining work into four discrete tasks so I can track them as I go."+ }+];++function pickSample() {+ return TOOL_SAMPLES[Math.floor(Math.random() * TOOL_SAMPLES.length)];+}++const TICK_MS = 1800;++function stepAgent(agent: Agent) {+ const { updateAgent, pushFeed } = useStore.getState();++ if (agent.status === 'blocked') {+ // Wait for user action; don't move automatically.+ return;+ }++ // Decision based on current status+ if (agent.status === 'idle') {+ // Maybe start a new task+ if (Math.random() < 0.4) {+ const sample = pickSample();+ const station = STATION_BY_TOOL[sample.tool];+ updateAgent(agent.id, {+ status: 'thinking',+ action: `heading to ${station}`,+ currentStation: station,+ progress: 1+ });+ }+ return;+ }++ if (agent.status === 'thinking') {+ // Arrived at the station — kick off the tool+ // (in real life this fires on PreToolUse arrival)++ const station = agent.currentStation ?? 'desk';+ const tool: ToolKind = station === 'shelf' ? (Math.random() < 0.5 ? 'Read' : 'Edit')+ : station === 'terminal' ? 'Bash'+ : station === 'web' ? 'WebFetch'+ : station === 'board' ? 'TodoWrite' : 'Read';+ const sample = pickSample();+ updateAgent(agent.id, {+ status: 'working',+ action: sample.what,+ description: sample.what,+ carrying: tool,+ progress: Math.min(agent.progress + 1, 8),+ recentAssistantText: sample.thought,+ recentTextTs: Date.now()+ });+ sample.lines.forEach(l => pushFeed(agent.id, l));+ return;+ }++ if (agent.status === 'working') {+ // Finish the tool and either keep going or settle+ if (Math.random() < 0.5) {+ updateAgent(agent.id, {+ status: 'thinking',+ action: 'heading back to desk',+ currentStation: 'desk',+ progress: Math.min(agent.progress + 1, 8)+ });+ } else {+ // Move to a new station+ const sample = pickSample();+ const station = STATION_BY_TOOL[sample.tool];+ updateAgent(agent.id, {+ status: 'thinking',+ action: `heading to ${station}`,+ currentStation: station,+ progress: Math.min(agent.progress + 1, 8)+ });+ }+ return;+ }+}++let interval: number | null = null;++export function startMockLoop() {+ if (interval !== null) return;+ interval = window.setInterval(() => {+ const { agents } = useStore.getState();+ // Only step mock agents (no ptyId). Real agents are driven by the pty parser.+ for (const a of agents) if (!a.ptyId) stepAgent(a);++ const { agents: a2, updateAgent } = useStore.getState();+ for (const a of a2) {+ if (a.ptyId) continue;+ if (a.status === 'thinking' && a.currentStation === 'desk' && Math.random() < 0.4) {+ updateAgent(a.id, {+ status: 'idle',+ action: 'awaiting',+ description: 'on standby',+ carrying: undefined,+ recentAssistantText: 'Done with that one. What next?',+ recentTextTs: Date.now()+ });+ }+ }+ }, TICK_MS) as unknown as number;+}++export function stopMockLoop() {+ if (interval !== null) {+ window.clearInterval(interval);+ interval = null;+ }+}diff --git a/src/renderer/src/store/store.ts b/src/renderer/src/store/store.tsnew file mode 100644index 00000000..b84ec1f2--- /dev/null+++ b/src/renderer/src/store/store.ts@@ -0,0 +1,221 @@+import { create } from 'zustand';+import type { AccentColorName } from '@/design/tokens';+import type { OfficeCharacterName } from '@/scene/office/cast';+import type { StatusKind } from '@/components/PixelBadge';++export type ToolKind =+ | 'Read' | 'Edit' | 'Write' | 'Bash' | 'WebFetch' | 'WebSearch'+ | 'Grep' | 'Glob' | 'TodoWrite' | 'MCP';++export type StationKind =+ | 'shelf' | 'terminal' | 'web' | 'board' | 'mailbox' | 'mcp' | 'desk';++export interface BlockReason {+ summary: string; // short headline shown on banner+ detail: string; // longer explanation+ command?: string; // verbatim command awaiting confirmation, if any+ actions: Array<{+ label: string;+ kind: 'approve' | 'deny' | 'neutral';+ /** what we'd send to the tmux pane on click */+ send?: string;+ }>;+}++export interface Agent {+ id: string;+ name: string;+ /** which Office character represents this agent on the floor */+ character: OfficeCharacterName;+ accent: AccentColorName;+ /** persistent short context — what is this agent for (shown on the floor) */+ description: string;+ project: string;+ /** legacy field — populated only for the seeded mock agents */+ tmuxTarget: string;+ cwd: string;+ goal?: string;+ status: StatusKind;+ action: string;+ progress: number;+ currentStation?: StationKind;+ carrying?: ToolKind;+ /** latest assistant message, streamed character-by-character in the sidebar */+ recentAssistantText?: string;+ /** epoch ms — used to drive the typewriter so identical strings still re-stream */+ recentTextTs?: number;+ /** populated when status === 'blocked' */+ blockReason?: BlockReason;+ /** present iff this agent has a real PTY in the main process */+ ptyId?: string;+ /** the command being run in the PTY (e.g. 'claude') */+ command?: string;+ /** the last prompt the user submitted to this agent in Claude Code —+ * shown on the floor as a card above the seated avatar */+ lastPrompt?: string;+ /** the orchestrator ("god") agent — seated in Michael's room, runs the floor */+ isGod?: boolean;+}++export interface FeedEntry {+ agentId: string;+ text: string;+ ts: number;+}++export type SidebarTab = 'terminal' | 'files';++interface State {+ agents: Agent[];+ selectedId: string | null;+ feeds: Record<string, string[]>;+ addAgentOpen: boolean;+ fullscreenAgentId: string | null;+ fullscreenFilePath: string | null;+ sidebarWidth: number;+ sidebarTab: SidebarTab;+ select: (id: string) => void;+ updateAgent: (id: string, patch: Partial<Agent>) => void;+ pushFeed: (id: string, line: string) => void;+ addAgent: (agent: Agent) => void;+ removeAgent: (id: string) => void;+ setAddAgentOpen: (open: boolean) => void;+ setFullscreen: (id: string | null) => void;+ setFullscreenFile: (path: string | null) => void;+ setSidebarWidth: (px: number) => void;+ setSidebarTab: (tab: SidebarTab) => void;+ /** Drop persisted agents whose PTY is no longer alive in the main process.+ * Called once at startup so a renderer reload (e.g. after the laptop sleeps)+ * restores still-running agents and only removes truly-dead ones. */+ reconcileWithLivePtys: (livePtyIds: string[]) => void;+}++const LS_SIDEBAR_WIDTH = 'cth.sidebarWidth';+const LS_SIDEBAR_TAB = 'cth.sidebarTab';+const LS_AGENTS = 'cth.agents';+const LS_SELECTED = 'cth.selectedId';++// Fields that are large or transient — not worth persisting across reloads.+type PersistedAgent = Omit<Agent, 'recentAssistantText' | 'recentTextTs' | 'blockReason'>;++function persistAgents(agents: Agent[], selectedId: string | null): void {+ try {+ const slim: PersistedAgent[] = agents.map(({ recentAssistantText, recentTextTs, blockReason, ...rest }) => {+ void recentAssistantText; void recentTextTs; void blockReason;+ return rest;+ });+ window.localStorage.setItem(LS_AGENTS, JSON.stringify(slim));+ window.localStorage.setItem(LS_SELECTED, selectedId ?? '');+ } catch { /* noop */ }+}++function loadPersistedAgents(): Agent[] {+ try {+ const raw = window.localStorage.getItem(LS_AGENTS);+ if (!raw) return [];+ const parsed = JSON.parse(raw) as PersistedAgent[];+ if (!Array.isArray(parsed)) return [];+ // Reset volatile run-state; the PTY stream / mock loop will repopulate it.+ return parsed.map((a) => ({+ ...a,+ status: 'idle',+ action: 'reconnecting…',+ currentStation: 'desk',+ carrying: undefined,+ recentTextTs: Date.now(),+ }));+ } catch {+ return [];+ }+}++function loadPersistedSelectedId(agents: Agent[]): string | null {+ try {+ const id = window.localStorage.getItem(LS_SELECTED);+ return id && agents.some((a) => a.id === id) ? id : (agents[0]?.id ?? null);+ } catch {+ return agents[0]?.id ?? null;+ }+}+const initialSidebarWidth = (() => {+ try {+ const v = window.localStorage.getItem(LS_SIDEBAR_WIDTH);+ const n = v ? parseInt(v, 10) : NaN;+ if (!Number.isNaN(n) && n >= 320 && n <= 1200) return n;+ } catch { /* noop */ }+ return 420;+})();+const initialSidebarTab: SidebarTab = (() => {+ try {+ const v = window.localStorage.getItem(LS_SIDEBAR_TAB);+ if (v === 'files' || v === 'terminal') return v;+ } catch { /* noop */ }+ return 'terminal';+})();++const initialAgents = loadPersistedAgents();+const initialSelectedId = loadPersistedSelectedId(initialAgents);++export const useStore = create<State>((set) => ({+ agents: initialAgents,+ selectedId: initialSelectedId,+ feeds: {},+ addAgentOpen: false,+ fullscreenAgentId: null,+ fullscreenFilePath: null,+ sidebarWidth: initialSidebarWidth,+ sidebarTab: initialSidebarTab,+ select: (id) => set((s) => { persistAgents(s.agents, id); return { selectedId: id }; }),+ updateAgent: (id, patch) =>+ set((s) => ({ agents: s.agents.map(a => a.id === id ? { ...a, ...patch } : a) })),+ pushFeed: (id, line) =>+ set((s) => ({ feeds: { ...s.feeds, [id]: [...(s.feeds[id] ?? []), line] } })),+ addAgent: (agent) =>+ set((s) => {+ const agents = [...s.agents, agent];+ persistAgents(agents, agent.id);+ return {+ agents,+ selectedId: agent.id,+ feeds: { ...s.feeds, [agent.id]: s.feeds[agent.id] ?? [] }+ };+ }),+ removeAgent: (id) =>+ set((s) => {+ const agents = s.agents.filter(a => a.id !== id);+ const { [id]: _gone, ...feeds } = s.feeds;+ const selectedId = s.selectedId === id ? (agents[0]?.id ?? null) : s.selectedId;+ persistAgents(agents, selectedId);+ return { agents, feeds, selectedId };+ }),+ reconcileWithLivePtys: (livePtyIds) =>+ set((s) => {+ const live = new Set(livePtyIds);+ // Keep agents with no PTY (synthetic) or whose PTY is still alive.+ const agents = s.agents.filter((a) => !a.ptyId || live.has(a.ptyId));+ if (agents.length === s.agents.length) return s;+ const feeds: Record<string, string[]> = {};+ for (const a of agents) feeds[a.id] = s.feeds[a.id] ?? [];+ const selectedId = agents.some((a) => a.id === s.selectedId)+ ? s.selectedId+ : (agents[0]?.id ?? null);+ persistAgents(agents, selectedId);+ return { agents, feeds, selectedId };+ }),+ setAddAgentOpen: (open) => set({ addAgentOpen: open }),+ setFullscreen: (id) => set({ fullscreenAgentId: id }),+ setFullscreenFile: (path) => set({ fullscreenFilePath: path }),+ setSidebarWidth: (px) => {+ const clamped = Math.min(1200, Math.max(320, Math.round(px)));+ try { window.localStorage.setItem(LS_SIDEBAR_WIDTH, String(clamped)); } catch { /* noop */ }+ set({ sidebarWidth: clamped });+ },+ setSidebarTab: (tab) => {+ try { window.localStorage.setItem(LS_SIDEBAR_TAB, tab); } catch { /* noop */ }+ set({ sidebarTab: tab });+ }+}));++export function selectedAgent(s: State): Agent | undefined {+ return s.agents.find(a => a.id === s.selectedId);+}diff --git a/tsconfig.json b/tsconfig.jsonnew file mode 100644index 00000000..155ebaa6--- /dev/null+++ b/tsconfig.json@@ -0,0 +1,7 @@+{+ "files": [],+ "references": [+ { "path": "./tsconfig.node.json" },+ { "path": "./tsconfig.web.json" }+ ]+}diff --git a/tsconfig.node.json b/tsconfig.node.jsonnew file mode 100644index 00000000..2d3f0ce6--- /dev/null+++ b/tsconfig.node.json@@ -0,0 +1,14 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "module": "ESNext",+ "moduleResolution": "Bundler",+ "strict": true,+ "esModuleInterop": true,+ "skipLibCheck": true,+ "resolveJsonModule": true,+ "isolatedModules": true,+ "types": ["node", "electron-vite/node"]+ },+ "include": ["src/main/**/*", "src/preload/**/*", "electron.vite.config.ts"]+}diff --git a/tsconfig.web.json b/tsconfig.web.jsonnew file mode 100644index 00000000..46728c0c--- /dev/null+++ b/tsconfig.web.json@@ -0,0 +1,23 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "lib": ["DOM", "DOM.Iterable", "ES2022"],+ "module": "ESNext",+ "moduleResolution": "Bundler",+ "jsx": "react-jsx",+ "strict": true,+ "esModuleInterop": true,+ "skipLibCheck": true,+ "resolveJsonModule": true,+ "isolatedModules": true,+ "useDefineForClassFields": true,+ "noUnusedLocals": false,+ "noUnusedParameters": false,+ "types": ["vite/client"],+ "baseUrl": ".",+ "paths": {+ "@/*": ["src/renderer/src/*"]+ }+ },+ "include": ["src/renderer/**/*", "src/preload/index.d.ts"]+}