[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109673":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":12,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":12,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":16,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":23,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},109673,"CapriDesktop","nunezValen\u002FCapriDesktop","nunezValen","Capri is a desktop companion using the character capri from the series cyberpunk edgerunners",null,"TypeScript",94,9,5,0,34,4,50.9,"MIT License",false,"main",true,[],"2026-11-16 06:00:17","2026-11-21 20:16:47","\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fko-fi.com\u002Fcapridesktop\" target=\"_blank\">\n    \u003Cimg src=\"https:\u002F\u002Fko-fi.com\u002Fimg\u002Fgithubbutton_sm.svg\" alt=\"Support me on Ko-fi\" \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n# Capri Desktop\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"src\u002Frenderer\u002Fsrc\u002Fassets\u002Fcapri\u002Fwalking\u002Fwalking.gif\" alt=\"Capri walking\" width=\"260\">\n\u003C\u002Fp>\n\n**Capri Desktop** is a cyberpunk desktop companion for Windows built with **Electron**, **Vite**, **React**, **TypeScript** and **TailwindCSS**. It puts **Capri**, an animated netrunner inspired by *Cyberpunk: Edgerunners*, on your desktop: she walks around your screen, talks to you with a neural voice, listens to you, controls Spotify and your apps, comments on your **League of Legends** and **Cyberpunk 2077** matches in real time, runs voice macros, builds small coding projects for you, and even draws in Paint. Everything AI-related runs **locally** (Ollama + Whisper).\n\n---\n\n## Table of Contents\n\nValorant live reactions and limitations: [supported games](#supported-game-reactions).\nContributors: [adding a read-only adapter](docs\u002Fgame-adapters.md).\n\n1. [Who is Capri?](#1-who-is-capri)\n2. [Voice: speaking and listening](#2-voice-speaking-and-listening)\n3. [How it works](#3-how-it-works)\n4. [Components](#4-components)\n5. [What Capri stores](#5-what-capri-stores)\n6. [Languages](#6-languages)\n7. [Commands and examples](#7-commands-and-examples)\n8. [Autonomous drawing in Paint](#8-autonomous-drawing-in-paint)\n9. [Live game integrations (LoL & Cyberpunk 2077)](#9-live-game-integrations-lol--cyberpunk-2077)\n10. [Permissions and system access](#10-permissions-and-system-access)\n11. [Installation and development](#11-installation-and-development)\n12. [License and credits](#12-license-and-credits)\n\n---\n\n## 1. Who is Capri?\n\nCapri is a netrunner companion inspired by *Cyberpunk: Edgerunners*: playful, mischievous and very confident, she lives on your desktop and helps you out (and teases you) while you work and play. On first launch she asks **what she should call you** and uses that name everywhere.\n\n**To talk to her:** press `↓` and speak, then `↓` again when you're done, or `Ctrl + Click` on her and type. All the keys and commands are in [Commands and examples](#7-commands-and-examples).\n\n---\n\n## 2. Voice: speaking and listening\n\n### A. Voice providers (Edge-TTS \u002F Fish Audio \u002F ElevenLabs)\nThe provider is picked in **TTS CONFIG** in the Dev Deck:\n- **Edge-TTS** (default, free): Microsoft neural voices, e.g. `en-US-AriaNeural` for English and `es-AR-ElenaNeural` for Spanish, plus Japanese, French, German, Portuguese, Italian, Russian and Chinese voices.\n- **Fish Audio** \u002F **ElevenLabs** (optional, API key required): more expressive voices. With Fish Audio you can use any voice model ID from its library or your own.\n\nConfiguration is split in two files:\n- `voice_config.json`: public settings (voices, pitch, preset).\n- `voice_config.local.json`: **API keys** and the active provider. Git-ignored, takes precedence over the first one (see `voice_config.example.json`).\n\n### B. Acoustic post-processing (FFmpeg)\n`scripts\u002Fcapri_voice.py` applies FFmpeg filter chains to give Capri a cybernetic sound:\n- `cyber_android`: multi-tap stereo delay + subtle flanger + presence EQ at 3.2 kHz.\n- `synth_hologram`: soft analog phaser + light reverb.\n- `robot_vocoder`: resonant modulation for emergency-comms style speech.\n\n### C. Disk cache\nEvery synthesized line is cached under a hash of `provider + text + voice + pitch + rate + preset + Fish voice`, so recurring lines play instantly and offline. Cached lines are kept for **30 days**.\n- If the selected provider (Fish Audio \u002F ElevenLabs) fails and Edge-TTS is used as a fallback, that audio is **never cached**, so the next attempt uses the real voice again.\n- Fish Audio retries up to 3 times on transient errors (rate limits, timeouts, 5xx).\n- When Cyberpunk 2077 is detected, Capri **pre-generates all quickhack lines** with the selected voice so they play instantly in combat.\n\n### D. Laughter and voice actions\nThe LLM can write voice actions in brackets, e.g. `[laugh]`, `[giggles]`, `[laughs hard]`, `[teasing]`, `[excited]`:\n- **Fish Audio**: tags are sent as-is and Capri **actually laughs**.\n- **Edge-TTS**: can't laugh, so `[laugh]` \u002F `[laughs hard]` become written laughter (`jajaja` with Spanish voices, `hahaha` otherwise), `[giggles]` becomes `jiji` \u002F `hehe`, and other tags are dropped.\n\n### E. Speech recognition (local Whisper)\nTranscription uses **faster-whisper** on your GPU (falls back to the CPU automatically), model `small` by default, with a vocabulary of Capri, Cyberpunk and LoL terms. Set the `CAPRI_WHISPER_MODEL` environment variable (e.g. `medium`, `large-v3-turbo`) for more accuracy at the cost of more VRAM. In automatic mode it decides between Spanish and English only, which avoids accented English being transcribed as Spanish.\n\n### F. Always listening (\"OÍDO\")\nPress the **Right arrow (→)** and Capri listens all the time, but **only answers when you talk to her**:\n- The mic stays open with a local voice-activity detector: audio is only transcribed when someone speaks (it learns the background noise level and keeps half a second of pre-roll so the start of the sentence isn't cut).\n- She answers when she hears her name anywhere in the sentence (`\"Capri, what's next?\"`, `\"che Capri, qué hacemos?\"`), including common Whisper mishearings like *Kapri*, *Cabri* or *Capricornio*.\n- Your **voice macro** phrases work without saying her name.\n- After she answers you have **8 seconds** to keep talking without repeating her name.\n- It pauses while she speaks, while you use push-to-talk (↓) and while she runs a task, so she never hears herself.\n- The state is remembered between sessions; the **OÍDO** button on her toolbar shows whether it's on.\n\n---\n\n## 3. How it works\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│ 1. USER INPUT (chat text, push-to-talk or always-listening) │\n└──────────────────────────────┬──────────────────────────────┘\n                               ▼\n┌─────────────────────────────────────────────────────────────┐\n│ 2. SPEECH-TO-TEXT (voice only)                              │\n│    WebAudio \u002F MediaRecorder -> local faster-whisper         │\n│    always-listening: wake word or macro phrase filter       │\n└──────────────────────────────┬──────────────────────────────┘\n                               ▼\n┌─────────────────────────────────────────────────────────────┐\n│ 3. ROUTING (CapriLocalAgent)                                │\n│ ├─ Voice macros                                             │\n│ ├─ Coding agent (\"build me a landing page\")                 │\n│ ├─ Language switching                                       │\n│ ├─ Spotify \u002F YouTube \u002F web search                           │\n│ ├─ Screen context (what you're watching \u002F listening to)     │\n│ ├─ Paint drawing (LLM-planned)                              │\n│ ├─ League of Legends (LCU + Live Client Data API)           │\n│ ├─ Cyberpunk 2077 (CET mod telemetry)                       │\n│ ├─ Launch \u002F close games and apps                            │\n│ ├─ Fast-path answers                                        │\n│ └─ Local LLM (Ollama: capri \u002F qwen2.5-coder) with tools     │\n└──────────────────────────────┬──────────────────────────────┘\n                               ▼\n┌─────────────────────────────────────────────────────────────┐\n│ 4. TOOLS (ToolExecutor \u002F Win32)                             │\n│    paint_drawer.ps1 · media_controller.ps1 · LCU REST API · │\n│    Cyberpunk telemetry server (port 2077) · files \u002F shell   │\n└──────────────────────────────┬──────────────────────────────┘\n                               ▼\n┌─────────────────────────────────────────────────────────────┐\n│ 5. VOICE + VISUAL FEEDBACK                                  │\n│    TTS (Edge \u002F Fish \u002F ElevenLabs) -> FFmpeg -> playback     │\n│    synced with Capri's animations and speech bubble         │\n└─────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## 4. Components\n\n### Supported game reactions\n\n| Game | Live observations |\n| :--- | :--- |\n| League of Legends | Existing Live Client Data API match events and commentary. |\n| Cyberpunk 2077 | Existing CET mod telemetry, including combat, driving and cyberware events. |\n| Valorant | Observed locked agent, match start\u002Fmap, single-round team wins\u002Flosses and streaks, match point, overtime, score-derived win\u002Floss, and local spectator-HUD death transitions. |\n| Other detected games | Occasional generic presence commentary; no live match facts. |\n\n**Valorant prerequisites and limits:** run the Windows Riot Client and Valorant, signed in as the current local user. Capri reads the Riot Client lockfile under `%LOCALAPPDATA%\\Riot Games\\Riot Client\\Config`, its local HTTPS entitlement\u002Fpresence\u002Fsession endpoints, and the head\u002Ftail of `%LOCALAPPDATA%\\VALORANT\\Saved\\Logs\\ShooterGame.log` for region\u002Fshard and client version. It uses authenticated **GET-only, unofficial Riot endpoints**, including regional pregame\u002Fcore-game player and match metadata. These are not a public supported integration; availability and formats may change. This project does not claim Riot approval or endorsement.\n\nThere is no Valorant agent selection\u002Flock-in automation, game input, memory reading, injection or process manipulation. Observing an already locked agent does not select one. Death observation uses only pixels from the foreground game window's spectator portrait\u002Fname HUD. Pixels stay local and are not sent to a vision model; only event facts can be sent to the configured commentary LLM. A visible 16:9 game window, known team scores and a prior non-spectator observation in that round are required. Other aspect ratios are skipped. Obscured HUDs, death animations, last-player deaths without a spectator panel, focus changes and missed polling samples can prevent detection. No kills, damage, abilities or teammate life state are inferred.\n\nRound results require a one-round score delta. Match point\u002Fresults cover competitive, premier, unrated, newmap and swiftplay according to their score rules. A decisive score can yield a win\u002Floss; unsupported queues, draws, surrender\u002Fearly termination and missing final scores may remain unknown and are not announced as a result. Starting mid-match does not reconstruct past rounds. Polls run sequentially with a 2.5-second delay after each attempt; network\u002Fcapture latency adds to that interval.\n\nValorant reactions use all ten supported text languages, including localized fallbacks when narration is unavailable or rejected by the language check. They respect silence, frequency, priority and cooldown settings; a result can be skipped during a cooldown. Pending narration is discarded after session\u002Fsettings\u002Flanguage changes or when stale. Gaming Mode uses the existing process detection, including when Capri starts while Valorant is already open.\n\nThe fork's Valorant support was **manually tested by the user on Windows 11**. This standalone port has offline regression coverage; no live game test was performed in this implementation session. **Windows 10, Linux and macOS have not been tested for Valorant.** Detection\u002Fcapture currently target Windows; this is not a claim of full cross-platform game support.\n\nAdapter contributors can follow the [short guide](docs\u002Fgame-adapters.md).\n\n| Component | File \u002F location | Responsibility |\n| :--- | :--- | :--- |\n| **Electron main process** | `src\u002Fmain\u002Findex.ts` | App lifecycle, transparent frameless windows, global shortcuts and the IPC bridge. |\n| **Capri Local Agent** | `src\u002Fmain\u002Fagents\u002Fcapri-local-agent.ts` | Capri's brain: intent routing, fast-path answers, system prompts and personality. |\n| **Coding Agent** | `src\u002Fmain\u002Fagents\u002Fcoding-agent.ts` | Multi-step plan → write → verify → fix loop for \"build me X\" requests. |\n| **Macro Service** | `src\u002Fmain\u002Fservices\u002Fmacro-service.ts` | Voice macros created from natural language, fuzzy trigger matching. |\n| **Wake word** | `src\u002Fmain\u002Fservices\u002Fwake-word.ts` | Decides whether an always-listening utterance was addressed to Capri. |\n| **Setup Service** | `src\u002Fmain\u002Fservices\u002Fsetup-service.ts` | First-run installation of the voice engine, FFmpeg, Ollama and the models. |\n| **User profile** | `src\u002Fmain\u002Fservices\u002Fuser-profile.ts` | How Capri calls you: fills the `{name}` placeholder in every line and prompt. |\n| **App paths** | `src\u002Fmain\u002Fservices\u002Fapp-paths.ts` | Resolves scripts, assets, the Python environment and writable data in dev and installed mode. |\n| **LLM drawing planner** | `src\u002Fmain\u002Fservices\u002Fpaint\u002Fllm-drawing-planner.ts` | Plans drawings with the local LLM on a 100x100 grid, validation and retries. |\n| **Paint drawer** | `scripts\u002Fpaint_drawer.ps1` | Win32 `SendInput` \u002F `SetCursorPos` drawing with human-like motion and an `Esc` panic key. |\n| **LCU Service** | `src\u002Fmain\u002Fservices\u002Flol\u002Flcu-service.ts` | Local HTTPS connection to the League client: auto-accept, picks and bans. |\n| **LoL Live Adapter + Commentator** | `src\u002Fmain\u002Fservices\u002Fgame\u002Fadapters\u002Flol\u002F` | Live Client Data API (port 2999) polling, counter-item advice and LLM-written commentary. |\n| **Cyberpunk Adapter** | `src\u002Fmain\u002Fservices\u002Fgame\u002Fadapters\u002Fcyberpunk\u002F` | Local telemetry server (port 2077) fed by the CET mod. |\n| **Reaction Engine** | `src\u002Fmain\u002Fservices\u002Fgame\u002Freaction-engine.ts` | Game event bus with priorities, cooldowns and in-character reactions. |\n| **Tool Executor** | `src\u002Fmain\u002Fagents\u002Ftools\u002Ftool-executor.ts` | Launch\u002Fclose apps, files, shell commands, media keys, web search. |\n| **Voice Service** | `src\u002Fmain\u002Fservices\u002Fvoice-service.ts` | Runs the Python voice engine (TTS, STT worker, translation for spoken language). |\n| **Python voice engine** | `scripts\u002Fcapri_voice.py` | `edge-tts` \u002F Fish Audio \u002F ElevenLabs TTS, faster-whisper STT and FFmpeg filters. |\n| **Media controller** | `scripts\u002Fmedia_controller.ps1` | Native Win32 (`PostMessage`, `WM_APPCOMMAND`) Spotify control in the background. |\n| **Consciousness Service** | `src\u002Fmain\u002Fservices\u002Fconsciousness-service.ts` | Persistent memory: boots\u002Fshutdowns, user name, language settings, learned drawings. |\n| **Roaming Manager** | `src\u002Fmain\u002Froaming\u002Froaming-manager.ts` | Capri walking around the screen and perching on browser tabs. |\n| **Renderer** | `src\u002Frenderer\u002Fsrc\u002F` | React UI: animated sprites, speech bubble, Dev Deck, code editor, onboarding wizard. |\n\n---\n\n## 5. What Capri stores\n\nEverything lives on your PC, in `%APPDATA%\\Capri Desktop` (or `%APPDATA%\\Cyber Companion`, if you installed her before the rename):\n\n- **`capri_consciousness.json`**: boot\u002Fshutdown counters (she comments on them), your name (change it in Dev Deck → **Capri \u002F\u002F Brain**), the apps she knows by name, language settings and onboarding state.\n- **`capri_macros.json`**: your voice macros.\n- **`capri_memory.json`**: what she remembers about you and the latest conversation, so she can pick it up after a restart. You can see, delete or turn off her memory in Dev Deck → **Capri \u002F\u002F Brain**.\n- **`capri_voice\u002F`**: voice configuration, API keys (`voice_config.local.json`) and the audio cache.\n- **`python-env\u002F`**: the Python environment of the voice engine (installed by the first-run wizard).\n- **`learned_drawings\u002F`**: drawings Capri learned through the scanner.\n\nIn development (`npm run dev`) the voice configuration and learned drawings stay in the repository's `assets\u002F` folder instead.\n\n---\n\n## 6. Languages\n\n### Language panel (Dev Deck → **IDIOMA**)\nThree independent settings, remembered between sessions:\n\n| Setting | What it controls | `Automatic` |\n| :--- | :--- | :--- |\n| **Capri's text** | Language she writes in: chat, bubbles and game reactions (LoL, Cyberpunk). | She answers in the language you talk to her in. |\n| **Capri's voice** | Language she speaks in. If it differs from the text, each line is translated by the local LLM (keeping `[laugh]` and other tags) before being spoken: she can write in Spanish and speak in English. | Same as the text. |\n| **Microphone** | Language Whisper expects. Fixing it is more accurate than auto-detection. | Whisper picks between Spanish and English. |\n\nAvailable languages: Spanish, English, Portuguese, French, German, Italian, Japanese, Korean, Chinese and Russian.\n\n> Spoken-language translation uses `qwen2.5-coder:7b`. The model is warmed up when you pick a voice language (and when the app starts). If it's still loading, the first line is spoken in the original language and the translation is ready for the next one.\n\n### Voice commands\n- `Hey Capri, talk in Spanish` \u002F `Capri, habla en español` (also English, Japanese, French, German, Portuguese)\n- `Hey Capri, talk in auto language` \u002F `Capri, habla en cualquier idioma` returns to automatic mode.\n\n---\n\n## 7. Commands and examples\n\nCapri understands commands in both English and Spanish.\n\n### Global hotkeys\n| Key | Action |\n| :--- | :--- |\n| `↓` (Down arrow) \u002F `Ctrl+Alt+V` | Push-to-talk: start \u002F stop talking to Capri. |\n| `Esc` while she's listening | Cancels what you were saying. |\n| `→` (Right arrow) | Toggle always-listening mode. |\n| `←` (Left arrow) | Open \u002F close Capri's chat (same as `Ctrl + Click` on her). |\n| `Ctrl+Alt+S` | Open the optical scanner \u002F scan. |\n| `Ctrl+Alt+M` | Gaming Mode on \u002F off. Works inside games too. |\n| Hold `Ctrl` in Game Mode | In Game Mode Capri lets clicks pass through to the game; hold `Ctrl` over her to move or touch her. |\n| `Ctrl+Alt+G` in Game Mode (Linux) | Same as holding `Ctrl`, which Linux can't detect in that mode. |\n\n> **Note:** while another app has the focus, those arrows are reserved for her. You can change those keys, and the Gaming Mode one, or turn the arrows off in the voice settings; `Ctrl+Alt+V` and the Gaming Mode key always work. In her own windows the arrows work normally in text fields.\n\n### Mouse\n| Action | What it does |\n| :--- | :--- |\n| `Click` on Capri | Opens the Dev Deck. |\n| `Ctrl + Click` | Opens \u002F closes her chat. |\n| `Shift + Drag` | Moves her around the screen. |\n| `Shift + Right Click` | Gives her a headpat. |\n\n### General\n| Command | Action |\n| :--- | :--- |\n| `show me your red eye` \u002F `mostrame tu ojo rojo` | Changes her look. Also `your eye` \u002F `tu ojo` and `your big eyes` \u002F `tus ojos`. |\n| `why did you pick that?` \u002F `¿por qué elegiste eso?` | She answers about what she just said or did on her own. |\n| `what's new?` \u002F `¿qué hay de nuevo?` | Reads the notes of this version. |\n| `what version are you on?` \u002F `¿en qué versión estás?` | Tells you her version. |\n| `update yourself` \u002F `actualizate` | Looks for a new version and installs it. A `.deb` asks for your password. |\n| `clip that` \u002F `clipeá eso` | Saves the last moments of your game with ShadowPlay (`F8`). |\n| `are you bored?` \u002F `¿estás aburrida?` | She finds something to do: music, a video or a search. |\n| `exit gaming mode` \u002F `salí del modo gaming` | Brings her back from Gaming Mode. Also from the tray icon menu. |\n\n### Memory\n| Command | Action |\n| :--- | :--- |\n| `remember that I main Jinx` \u002F `acordate de que juego de Jinx` | She saves it and can bring it up later, even after a restart. |\n| `forget that I main Jinx` \u002F `olvidate de que juego de Jinx` | She deletes what matches. |\n| `what do you remember about me?` \u002F `¿qué recordás de mí?` | She tells you what she has saved. |\n\nShe also picks up lasting facts from your chats on her own, in the background, when the conversation goes quiet. What is on your screen is never saved, and anything that looks like a password, number or address is dropped. To wipe everything, use **Clear all** in Dev Deck → **Capri \u002F\u002F Brain**. With a cloud model, the memories she uses in each reply go to that provider.\n\nThe drawing, League of Legends and Cyberpunk 2077 commands are in [section 8](#8-autonomous-drawing-in-paint) and [section 9](#9-live-game-integrations-lol--cyberpunk-2077).\n\n### Voice macros\n| Command | Action |\n| :--- | :--- |\n| `when I say \"it's game time\", open League, play phonk on Spotify and turn on game mode` \u002F `cuando yo diga \"its game time\", abrí el lol...` | Creates a macro. The local LLM turns the sentence into actions: open\u002Fclose apps, Spotify, URLs, media controls, game mode, say something, wait, or run a command. |\n| `it's game time` | Runs the macro (tolerates Whisper variations like *\"Capri, it's game time!\"*). |\n| `list macros` \u002F `mis macros` | Lists saved macros. |\n| `delete the \"it's game time\" macro` \u002F `borrá el macro its game time` | Deletes a macro. |\n\n### Coding agent\n| Command | Action |\n| :--- | :--- |\n| `build me a landing page on my desktop for a cyberpunk coffee shop with html, css and javascript` | Plans the project, writes the files, verifies them, fixes problems and opens the result in your browser. |\n| `make a calculator in javascript` \u002F `build me a todo app` | Same for any small web project. |\n\n- Runs a multi-step loop with the largest *coder* model you have in Ollama (e.g. `qwen2.5-coder:14b`).\n- Checks for missing referenced files, incomplete HTML, JavaScript syntax (`node --check`) and unbalanced CSS braces.\n- Projects are created in a new Desktop folder; it can't write outside that folder and blocks destructive commands.\n\n### Music and Spotify\n| Command | Action |\n| :--- | :--- |\n| `play bohemian rhapsody on spotify` \u002F `pon bohemian rhapsody en spotify` | Opens Spotify if needed, searches the song and plays it. |\n| `skip song` \u002F `cambia la canción` | Next track. |\n| `previous track` \u002F `canción anterior` | Previous track. |\n| `pause the music` \u002F `pausa la música` | Pause. |\n| `resume the music` \u002F `play` | Resume. |\n\n### Web and YouTube\n| Command | Action |\n| :--- | :--- |\n| `search the web for what Soulkiller is` \u002F `busca en el navegador qué es Soulkiller` | Opens your browser with a Google search. |\n| `open youtube and play cyberpunk edgerunners ost` | Opens YouTube with the matching video. |\n\n### Games and apps\n| Command | Action |\n| :--- | :--- |\n| `open league of legends` \u002F `abrí el lol` | Starts the Riot client \u002F League of Legends. |\n| `open cyberpunk` | Launches Cyberpunk 2077 through Steam or GOG. |\n| `open steam` \u002F `open discord` \u002F `open obs` | Launches Steam, Discord or OBS Studio. |\n| `open blender` \u002F `abrí la epic games store` | Opens any installed app. If she can't find it, she asks you where it is and remembers it. |\n| `what apps do you know?` \u002F `¿qué apps conocés?` | She lists the apps she knows by name. |\n\nDev Deck → **Apps** lists the apps she knows by name: add any program, rename it to whatever you call it, open or remove it. Ask her to open one by that name, even said a little differently (\"abrí el editor de Valen\").\n| `close league` \u002F `close chrome` \u002F `cerrá discord` | Closes the process. |\n\n### Desktop interaction\n| Command | Action |\n| :--- | :--- |\n| `sit on tabs` \u002F `sentate en la pestaña` | Capri perches on your browser tabs. |\n| `sit on the desktop` \u002F `sentate en el escritorio` | She goes back to the desktop. |\n| `stay still` \u002F `quedate quieta` | She stays where she is until you tell her she can move, even after a restart. Dragging her only changes where she stays. |\n| `you can move` \u002F `podés moverte` | She goes back to wandering around. |\n| `what are you doing?` | She tells you how she feels and what she's up to. |\n\n---\n\n## 8. Autonomous drawing in Paint\n\nCapri can draw in **MS Paint** by moving your mouse, with drawings planned on the fly by the local LLM.\n\n### A. Style and planning\n- Loose, clean cyber-sketch style: stick figures, simple silhouettes, logos and geometric outlines, each element drawn once without repeated strokes.\n- Apart from a few calibration tests, every drawing is planned live by the LLM by breaking the subject into simple shapes.\n\n### B. Stroke language (100x100 grid)\nThe LLM describes the drawing on a normalized grid from `0` to `100` (`(0,0)` top-left, `(100,100)` bottom-right):\n- **`line`**: `{ type: \"line\", x1, y1, x2, y2 }`\n- **`polyline`**: `{ type: \"polyline\", points: [[x, y], ...], closed?: boolean }`\n- **`circle`**: `{ type: \"circle\", cx, cy, r }`\n- **`ellipse`**: `{ type: \"ellipse\", cx, cy, rx, ry }`\n- **`arc`**: `{ type: \"arc\", cx, cy, rx, ry, startAngle, endAngle }` (degrees, 0 to 360)\n- **`curve`**: `{ type: \"curve\", p0: [x,y], p1: [x,y], p2: [x,y], p3?: [x,y] }` (quadratic \u002F cubic Bézier)\n\n### C. Validation and retries\n- **`StrokeValidator`** clamps out-of-range coordinates, drops invalid \u002F `NaN` values and limits drawings to 25 shapes.\n- If the LLM returns broken JSON or invalid coordinates, it retries up to twice with the exact errors so the model can fix them.\n- If Ollama isn't running, Capri falls back to a procedural plan (cat, house, sun or stick figure) and tells you she improvised.\n\n### D. Win32 executor and human-like strokes\n- `scripts\u002Fpaint_drawer.ps1` finds the Paint window (`EnumWindows`, `GetWindowRect`), restores and focuses it.\n- It computes the safe canvas area, avoiding the ribbon and the status bar.\n- `SetCursorPos` + `mouse_event` with interpolated points, ease-in\u002Fease-out and ~1px micro-jitter emulate a human hand.\n- It uses the active tool and default color to stay robust across DPI scaling (100%, 125%, 150%).\n\n### E. Safety and panic key (`Escape`)\n- Before touching the mouse Capri warns you by voice and waits 1.8 seconds.\n- If Paint loses focus the drawing is aborted.\n- Pressing **`Escape`** at any time releases the mouse button immediately (`MOUSEEVENTF_LEFTUP`), cancels the task and hands control back to you.\n\n### F. Learning drawings with the optical scanner\n1. Open the scanner: `Capri, open the scanner` \u002F `Capri, abrí el escáner`, or `Ctrl+Alt+S`.\n2. Place the translucent frame over the sketch or logo you want to teach.\n3. Say `Capri, learn how to draw X` \u002F `Capri, aprendé a dibujar X`.\n4. Capri captures that region and uses a local vision model (LLaVA or similar) to extract the main lines and proportions as shapes on the 100x100 grid.\n5. The technique is saved in her memory and in `learned_drawings\u002F\u003Csubject>.json`.\n6. Next time you ask `Capri, draw X`, she uses what you taught her.\n\n### G. Drawing commands\n- **Teach through the scanner**: `Capri, look at this logo`, `Capri, learn how to draw a cat`, `Capri, aprendé el logo de Arasaka`.\n- **Calibration tests**: `Capri, probá dibujo monigote` \u002F `casa` \u002F `sol`.\n- **LLM-planned (or learned) drawings**: `Capri, draw a cute robot`, `Capri, draw the Arasaka logo`, `Capri, dibujá un gato`, `Capri, draw the last logo I showed you`.\n\n---\n\n## 9. Live game integrations (LoL & Cyberpunk 2077)\n\n### A. League of Legends (LCU & Live Client Data API)\n\n#### 1. Champion select (LCU)\nCapri connects to the local Riot client API (`LeagueClientUx.exe`) over authenticated HTTPS:\n- **Auto-accept**: `Capri, turn on auto accept` \u002F `activá el auto aceptar`, and `turn off auto accept`.\n- **Queue**: `Capri, find a match` \u002F `busca partida`, `accept the match`, `cancel the queue`.\n- **Picks and bans**: `Capri, ban Blitzcrank`, `Capri, pick Caitlyn`.\n- **Combined plans**: `Capri, find a match, ban Zed and pick Ahri` chains everything in one command.\n\n#### 2. In game\nCapri polls Riot's official local API (`https:\u002F\u002F127.0.0.1:2999\u002Fliveclientdata\u002Fallgamedata`):\n- **Counter-item advice**: reads enemy items (Spanish or English names, or item IDs), checks `assets\u002Fgame_data\u002Flol_item_advice.json` and tells you what to buy (e.g. armor penetration against heavy armor stacking). At the start of every match she gives you a tip about your lane opponent and the enemy jungler.\n- **LLM-written commentary**: every event (kills, deaths, multikills, objectives, KDA, fed or feeding players, match start\u002Fend) is sent to the local LLM with real match facts (champions, roles, KDA, level, CS, item gold, whether it was a jungle gank) and Capri writes her own line with emotions (`[excited]`, `[laugh]`, `[teasing]`...). Fixed lines are only used as a fallback if the LLM takes longer than ~4 seconds, and lines in the wrong language are discarded.\n- **\"Can we beat that Garen?\"**: compares level, item gold and KDA against that champion and gives a verdict (*\"we're so fed, LET'S GO!\"*, *\"don't even think about it\"* or *\"coin flip\"*). She remembers it: if you kill him she says *\"told you so\"*, if he kills you she rubs it in, and if minutes pass without you going for it she asks what you're waiting for.\n- **Kill streaks**: celebrates Killing Spree, Rampage, Unstoppable... and reacts when your streak gets shut down.\n- **Roasts**: mocks whoever is feeding, warns you about fed enemies and hypes teammates who carry (at most one comment per player every few minutes).\n- **Verified objectives**: impossible events (e.g. a dragon before minute 5) are ignored.\n- **Recommended model**: `qwen2.5-coder:7b` (~1 s per line), warmed up on the GPU when the match starts.\n- **Game Mode**: Capri docks in a corner and doesn't block game clicks (hold `Ctrl` over her to move her).\n\n### B. Cyberpunk 2077 (CET mod telemetry)\n- **Local telemetry server** on port `2077`, fed by Capri's own mod for **Cyber Engine Tweaks**, `assets\u002Fgame_data\u002Fcyberpunk_mod\u002Finit.lua`. See [Installing the Cyberpunk 2077 mod](#installing-the-cyberpunk-2077-mod).\n- **Events**: combat start\u002Fend, low health, wanted level, kills, civilian kills, driving speed and crashes, cyberware (Sandevistan, Kerenzikov, Berserk...).\n- **Real locations read from the map**: ripperdocs, gun shops, bars, gigs, tarot cards, NCPD hustles and cyberpsychos are read from the game's own map icons when you open the map (`M`) and cached in `capri_locations.json`. No made-up coordinates.\n  - `mark the nearest ripperdoc`, `take me to Lizzie's bar`, `mark the nearest tarot card`, `find me a cyberpsycho`, `mark a gang hustle`.\n- **\"What should we do next?\"**: suggests your tracked quest, a nearby gig from the map or an activity (races, clearing gangs, cyberpsychos, fighting MaxTac).\n- **Quickhacks**: recognizes the quickhack you upload (Overheat, Short Circuit, Contagion, Synapse Burnout...) and the one an enemy netrunner is uploading to you, and reacts to each.\n- **HUD banner**: markers show `[CAPRI] RIPPERDOC \u002F\u002F name (distance)` in the middle of the screen.\n- **Crash safety**: the mod never enumerates the quest journal (that native call crashes the game) and keeps a breadcrumb file (`capri_crumb.txt` \u002F `capri_unsafe.json`) to automatically disable any call that crashed.\n- **Only CET is required**: the mod doesn't use RED4ext, redscript, Codeware or any other framework.\n- **CET console**: `GetMod(\"capri\").dump()` writes `capri_debug.json` with the detected icons; `GetMod(\"capri\").remember(\"bar\", \"Lizzie's Bar\")` saves your current position with a name.\n\n---\n\n## 10. Permissions and system access\n\n| Feature | Privileges | APIs \u002F resources | Binaries | Network | Safety |\n| :--- | :--- | :--- | :--- | :--- | :--- |\n| **Optical scanner** | Standard user | Capture of the scanner frame region (`desktopCapturer`), local multimodal inference | Electron, `ollama.exe` | Loopback `127.0.0.1:11434` | Only the scanner rectangle is captured; images are processed locally and discarded. |\n| **Paint drawing** | Standard user | Win32 `SetCursorPos`, `mouse_event`, `EnumWindows`, `GetWindowRect`, `GetAsyncKeyState` | `powershell.exe`, `mspaint.exe` | Loopback (Ollama) | **`Escape` panic key**; only draws while Paint is focused. |\n| **LoL champion select** | Standard user | Reads `LeagueClientUx.exe` command line for the local token and port | `LeagueClientUx.exe` | Local HTTPS to the LCU port | Standard champion-select actions only. |\n| **LoL in-game** | Standard user | Riot's official Live Client Data API | `League of Legends.exe` | Local HTTPS `127.0.0.1:2999` | Read-only official API, no memory access. |\n| **Cyberpunk telemetry** | Standard user | Local TCP listener | Capri + CET Lua mod | `127.0.0.1:2077` | Listens on localhost only. |\n| **Spotify control** | Standard user | Win32 `PostMessage` with `WM_APPCOMMAND` | `Spotify.exe`, `powershell.exe` | None | No code injection; standard media commands. |\n| **Speech recognition** | Microphone permission | WebAudio \u002F `MediaRecorder` | `python.exe` (`faster-whisper`) | None (100% local) | Revocable in Windows privacy settings. |\n| **Always listening** | Microphone permission | WebAudio with a local voice-activity detector | `python.exe` (`faster-whisper`) | None | Toggled with `→`. Anything not addressed to Capri is discarded and never stored. |\n| **Voice macros** | Standard user | `capri_macros.json` in the app data folder | Apps the macro opens or closes | Loopback (Ollama) | Only runs the actions you defined. |\n| **Coding agent** | Standard user | Writes files in a new Desktop folder, `node --check` | `cmd.exe`, `node.exe` | Loopback (Ollama) | Can't write outside the project folder; destructive commands are blocked. |\n| **Text-to-speech** | Standard user | Child processes (`child_process.spawn`) | `python.exe` (`edge-tts`), `ffmpeg.exe` | HTTPS to Microsoft Edge TTS, Fish Audio or ElevenLabs depending on the provider | Frequent lines are cached locally. |\n| **Local LLM** | Standard user | HTTP to the Ollama daemon | `ollama.exe` | Loopback `127.0.0.1:11434` | Fully local: conversations never leave your PC. |\n| **Roaming on screen** | Standard user | Transparent frameless window, Win32 `GetForegroundWindow` | Electron | None | Click-through (`setIgnoreMouseEvents`) except over Capri. |\n\n---\n\n## 11. Installation and development\n\n### Install (Windows)\n\n1. Download `CapriDesktop-Setup-x.y.z.exe` from the repository's **Releases** page and run it.\n2. Pick the installer language and the install folder.\n3. When it finishes, Capri opens the **first-run wizard**:\n   - the language you'll speak;\n   - **what she should call you**;\n   - component setup: Python + Whisper + Edge-TTS (voice and hearing), FFmpeg, Ollama, the `qwen2.5-coder:7b` model and the `capri` personality (built with your name). Everything is downloaded with `winget` \u002F `pip` and runs locally.\n\nComponents can be installed later; features that depend on them (voice, local AI) start working once they're ready.\n\n### Install (Linux)\n\n1. Download the `.deb` from **Releases**. It works on Debian-based distros (Debian, Ubuntu, Mint, Kali).\n2. Install it with its helpers: `sudo apt install .\u002FCapriDesktop-x.y.z.deb python3-venv zstd xdotool wmctrl playerctl`.\n   On other distributions, extract the `.tar.gz` and run `capridesktop`, with the same helpers from your package manager.\n3. Open Capri and follow the same first-run wizard. Use an X11 session.\n\nPaint drawing isn't available on Linux. Everything that differs from Windows is listed in [REQUIREMENTS.md](REQUIREMENTS.md#13-linux).\n\n### Requirements\n- **OS**: Windows 10 or 11 (64-bit), or Linux x64 with X11. macOS is not supported yet.\n- **Minimum PC**: 6-core CPU, 16 GB of RAM and 10 GB of free disk. It works without a GPU, but replies are slow.\n- **Recommended PC**: the same, plus an NVIDIA GPU with 6 GB+ VRAM and 20 GB of free disk. To play a game at the same time, 12 GB+ VRAM. See [REQUIREMENTS.md](REQUIREMENTS.md) for the measurements.\n- **Internet**: for the first-run setup and for the Edge-TTS voice.\n- **Spotify Desktop (optional)**: native media control.\n- **Cyber Engine Tweaks (optional)**: live Cyberpunk 2077 telemetry, together with Capri's mod. See [Installing the Cyberpunk 2077 mod](#installing-the-cyberpunk-2077-mod).\n- **Fish Audio \u002F ElevenLabs (optional)**: API key in `voice_config.local.json` (see `voice_config.example.json`).\n\n### Choosing a disk\n\nIf you install her on a disk other than the system's, her requirements go there too, in a `CapriData` folder: Python, the voice environment, Whisper, FFmpeg, Ollama and its models. Models you already have stay where they are. You can pick another folder in the first-run setup, under **Where to install**.\n\nIf she's already installed, the same option moves everything to the new folder: it shows what's moving and how much it weighs, copies it, and only deletes the old files at the end. Python stays where it is, and the Ollama program is downloaded again by its own installer. To move Capri herself, run her installer again and pick another folder.\n\n### If she doesn't hear you\n\nOpen the voice settings and press **Test** next to the microphone: it records a few seconds and shows what she understood.\n\n- **No sound coming in:** pick another microphone in the same place, or check that the system isn't blocking it.\n- **Sound, but no words:** run the setup again from the model settings. Her hearing may be incomplete.\n- **The first time** she also downloads her hearing, about 500 MB, and tells you while it's loading.\n\n### Uninstalling\n\nYour memories, settings and API keys are kept apart from the program, so a new install finds them. On Windows the uninstaller asks whether to delete them too. On Linux, `sudo apt remove capridesktop` keeps them; to delete them, remove `~\u002F.config\u002Fcapridesktop`. In both cases Ollama's models stay.\n\nTo run the first-run setup again, or finish a step you skipped: **model settings > Run setup again**.\n\n### Installing the Cyberpunk 2077 mod\n\nTwo pieces are needed: **Cyber Engine Tweaks (CET)**, which loads mods, and **Capri's mod**, which sends the game's events to her.\n\n1. Close the game.\n2. Install CET from [GitHub](https:\u002F\u002Fgithub.com\u002Fmaximegmd\u002FCyberEngineTweaks\u002Freleases) or [Nexus Mods](https:\u002F\u002Fwww.nexusmods.com\u002Fcyberpunk2077\u002Fmods\u002F107), in the version that matches your copy of the game, and extract it into the game folder. You should end up with `Cyberpunk 2077\\bin\\x64\\plugins\\cyber_engine_tweaks`. If CET doesn't start, install the [Visual C++ Redistributable](https:\u002F\u002Faka.ms\u002Fvs\u002F17\u002Frelease\u002Fvc_redist.x64.exe).\n3. Open the game once. CET asks you to choose a key for its overlay. Close the game.\n4. Open Capri. When she finds CET in your Steam libraries (wherever Steam is installed) or in the default GOG and Epic folders, she installs her mod and keeps it up to date. She also learns the game's folder while it's running.\n5. Check that this file exists: `Cyberpunk 2077\\bin\\x64\\plugins\\cyber_engine_tweaks\\mods\\capri\\init.lua`.\n6. Open Capri first, then the game, and load a save. She reacts when you get into a fight.\n\n**If the game is in another folder**, open Dev Deck → **Apps** and, under **Cyberpunk 2077**, choose the game's folder (the one with `bin`). It shows whether CET and her mod are there and whether events are arriving.\n\n**With Mod Organizer 2**, the game sees a virtual folder, so Capri can't put her mod in the real one:\n\n1. Install CET as a mod in Mod Organizer, as usual.\n2. Add `CapriCyberpunkMod-1.0.0.zip` from [Releases](https:\u002F\u002Fgithub.com\u002FnunezValen\u002FCapriDesktop\u002Freleases\u002Flatest) as another mod (**Install a new mod from an archive**) and enable it.\n3. Launch the game from Mod Organizer.\n4. If your instance isn't in the default place (`%LOCALAPPDATA%\\ModOrganizer`), choose its folder in Dev Deck → **Apps** → **Cyberpunk 2077**. What the mod writes lands in the instance's `overwrite` folder, and that's where she reads it.\n\n**Manual install**, if the file from step 5 isn't there (Windows didn't let her write there): download `CapriCyberpunkMod-1.0.0.zip` from [Releases](https:\u002F\u002Fgithub.com\u002FnunezValen\u002FCapriDesktop\u002Freleases\u002Flatest) and extract it into the `Cyberpunk 2077` folder, so `bin` merges with the one already there. CET is still needed.\n\n**On Linux**, the game runs through Proton and CET needs this in the game's Steam launch options:\n\n```\nWINEDLLOVERRIDES=\"version=n,b\" %command%\n```\n\n### Development\n\n```powershell\ngit clone https:\u002F\u002Fgithub.com\u002FnunezValen\u002FCapriDesktop.git\ncd CapriDesktop\nnpm install\n\n# Voice environment (Python 3.10 - 3.13)\npy -3.11 -m venv .venv\n.venv\\Scripts\\python -m pip install -r scripts\u002Frequirements.txt\n\n# Ollama + models\nollama pull qwen2.5-coder:7b\nollama create capri -f scripts\u002FModelfile.capri   # replace {name} with your name first, or create it from the wizard\n\nnpm run dev\n```\n\nOn Linux, create the environment with `python3 -m venv .venv` and `.venv\u002Fbin\u002Fpython -m pip install -r scripts\u002Frequirements.txt`.\n\nIn development the app uses the repository's `scripts\u002F`, `assets\u002F` and `.venv\u002F`. Installed, it uses the bundled resources and keeps everything writable (voice settings, cache, Python environment, learned drawings) in `%APPDATA%\\Capri Desktop`, or `~\u002F.config\u002FCapri Desktop` on Linux. An older install keeps using its `Cyber Companion` folder.\n\n### Build the installer\n\n```powershell\nnpm run dist:win     # -> release\u002FCapriDesktop-Setup-\u003Cversion>.exe\nnpm run dist:linux   # -> release\u002FCapriDesktop-\u003Cversion>.deb (run it on Linux)\n```\n\n### Dev Deck\nClicking on Capri opens the **Dev Deck**:\n- **chat & vision**: chat with the agent over Capri's eyes (*new chat* button to start over).\n- **code editor**: real folder tree (lazy-loaded, per-type file icons), CodeMirror editor with syntax highlighting, tabs with unsaved markers, `Ctrl+S` to save and a collapsible Capri panel with *Explain*, *Find bugs* and *Refactor* for the open file.\n- The model picker only lists models installed in Ollama.\n\n### Type checking and builds\n\n```powershell\nnpm run typecheck   # main + renderer\nnpm run build       # main, preload and renderer bundles\n```\n\n---\n\n## 12. License and credits\n\n- **Author**: [nunezValen](https:\u002F\u002Fgithub.com\u002FnunezValen).\n- **License**: code released under the [MIT](LICENSE) license.\n- **Inspiration**: a fan project inspired by *Cyberpunk 2077* and *Cyberpunk: Edgerunners*. Not affiliated with or endorsed by CD PROJEKT RED or Studio Trigger; trademarks and characters belong to their respective owners.\n","Capri Desktop 是一款基于 Cyberpunk 风格的本地化桌面 AI 助手应用，将动画角色 Capri（源自《赛博朋克：边缘行者》）以可交互形式部署在 Windows 桌面。核心功能包括本地语音识别与合成（集成 Whisper + Ollama）、实时游戏状态感知（支持《英雄联盟》《赛博朋克2077》等）、Spotify\u002F应用控制、语音命令执行、Paint 自主绘图及轻量代码辅助。所有 AI 推理均离线运行，不依赖云端服务。适用于追求个性化桌面体验、隐私敏感的游戏玩家、动漫文化爱好者及希望尝试本地化 AI 交互的普通用户。",2,"2026-11-24 04:37:08","CREATED_QUERY"]