diff --git a/README.md b/README.md index 2d22f05..a961bb3 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ These are **not bundled with `hermes-agent`**. The core repo ships only the plug | [`plugin-llm-async-example`](./plugin-llm-async-example) | `ctx.llm.acomplete()` + `asyncio.gather()` | Async LLM lane — concurrent forward + sentiment + back-translation pass for `/translate` | | [`example-dashboard`](./example-dashboard) | `dashboard/manifest.json` | Bare-minimum dashboard plugin — a tab, a slot injection, a backend route | | [`strike-freedom-cockpit`](./strike-freedom-cockpit) | dashboard theme + slot plugin | Complete custom-skin reskin — palette, layout variant, asset slots, sidebar HUD | +| [`theme-forge`](./theme-forge) | desktop plugin SDK + dashboard backend | Full theme editor — wallpapers, extended palette, bold, markdown accent colors, matrix rain — applied through Hermes' native skin path | ## Installing an example as a user plugin @@ -26,6 +27,11 @@ cp -r hermes-example-plugins/plugin-llm-async-example ~/.hermes/plugins/ cp -r hermes-example-plugins/example-dashboard ~/.hermes/plugins/ cp -r hermes-example-plugins/strike-freedom-cockpit ~/.hermes/plugins/ +# theme-forge is a *desktop* plugin: the JS goes in desktop-plugins/, only the +# backend (dashboard/) goes in plugins/. See theme-forge/README.md. +cp -r hermes-example-plugins/theme-forge ~/.hermes/desktop-plugins/ +mkdir -p ~/.hermes/plugins/theme-forge && cp -r hermes-example-plugins/theme-forge/dashboard ~/.hermes/plugins/theme-forge/ + # enable any with a slash command surface hermes plugins enable plugin-llm-example hermes plugins enable plugin-llm-async-example diff --git a/theme-forge/LICENSE b/theme-forge/LICENSE new file mode 100644 index 0000000..08f19bd --- /dev/null +++ b/theme-forge/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Theme Forge contributors + +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. diff --git a/theme-forge/README.md b/theme-forge/README.md new file mode 100644 index 0000000..1f0303f --- /dev/null +++ b/theme-forge/README.md @@ -0,0 +1,126 @@ +# Theme Forge — tema seu Hermes Desktop + +**Plugin para o Hermes Desktop que faz o que o app não faz nativamente: temas +com imagem de fundo ou vídeo animado, paleta estendida, bold, tamanho de fonte, +cores de destaque no markdown e fundos animados (matrix rain, scanlines).** + +- ✅ Sem build, sem tocar no código do app — um arquivo ESM + um backend Python opcional +- ✅ Aplicação em **1 clique** ("Aplicar") via o mecanismo nativo de skins do Hermes +- ✅ Edição ao vivo: as mudanças repintam na hora com o tema ativo +- ✅ 13 temas prontos, incluindo uma linha inspirada em filmes + +## Temas incluídos + +| Tema | Visual | Extras | +|---|---|---| +| **Forge Matrix** | Preto + verde fósforo | 🌧️ **Chuva digital animada** | +| **Forge Hacker** | Verde limão / roxo / amarelo, terminal | 📺 Scanlines CRT | +| **Forge Terminator** | HUD vermelho sobre gunmetal | 📺 Scanlines CRT | +| **Forge Spider-Man** | Preto + vermelho aranha | — | +| **Forge Wolverine** | Adamantium amarelo-mostarda + vermelho | — | +| **Forge Deadpool** | Vermelho mercenário sobre preto | — | +| **Forge Iron Man** | Vermelho arc-reactor + dourado | — | +| **Forge Batman** | Preto Gotham + amarelo bat-sinal | — | +| **Forge Dune** | Areia de Arrakis + âmbar de especiaria | — | +| **Forge Sith** | Preto imperial + sabre vermelho | — | +| Forge Cyber / Glass / Paper | Presets clássicos do Hermes | — | +| **Forge Custom** | Seu tema editável (persiste) | Tudo | + +## O que ele faz que o Hermes não faz + +| Recurso | Por que não existe nativamente | +|---|---| +| **Fundo com imagem ou vídeo animado** + overlay/blur | O modelo `DesktopTheme` só tem cores sólidas | +| **Paleta estendida** — `--ui-red/green/blue/purple/yellow/cyan/orange/warm` | Essas cores são fixas no `styles.css` do app | +| **Bold no texto** (3 níveis) | Sem controle de peso tipográfico por tema | +| **Tamanho da fonte da conversa** (11–18px) | Token existe mas sem UI | +| **Cores de destaque** (títulos, links, código no chat) | Não configurável | +| **Matrix rain animada** / scanlines CRT | Impossível no modelo de tema | +| **Aplicar tema com 1 clique** | O desktop não expõe `setTheme` a plugins | + +## Instalação + +### 1. Plugin desktop (obrigatório) + +Copie a pasta para o diretório de plugins do Hermes Desktop: + +```bash +mkdir -p ~/.hermes/desktop-plugins +cp -R theme-forge ~/.hermes/desktop-plugins/ +``` + +(com perfil nomeado: `~/.hermes/profiles//desktop-plugins/`) + +### 2. Backend Python (recomendado — habilita o botão "Aplicar") + +```bash +mkdir -p ~/.hermes/plugins +cp -R theme-forge ~/.hermes/plugins/ # usa dashboard/manifest.json + plugin_api.py +hermes plugins enable theme-forge 2>/dev/null || true +# garanta plugins.enabled no config.yaml: +hermes config set plugins.enabled '["theme-forge"]' +hermes gateway restart +``` + +> O backend monta `POST /api/plugins/theme-forge/activate` — grava o tema como +> skin Hermes real (`~/.hermes/skins/.yaml`) e ativa em ~1s em **todas as +> superfícies** (CLI, TUI, desktop). Sem ele, use ⌘K → Themes para ativar +> manualmente (os temas do forge aparecem na grade). + +### 3. Ative o plugin no app + +No Hermes Desktop: **⌘K → Reload desktop plugins**. A entrada **Theme Forge** +aparece na sidebar (ao lado de Capabilities/Messaging/Artifacts) e o painel +editor na barra lateral direita. + +## Uso + +1. **Aplicar um tema**: no painel, escolha o tema no seletor e clique **Aplicar** + — ou selecione em **⌘K → Themes** (a grade nativa). +2. **Editar**: abas **Cores** (núcleo + paleta estendida), **Fundo** (imagem ou + vídeo animado — URL ou "Procurar no Mac…", overlay 0–90%, blur 0–12px), + **Texto** (fonte, tamanho, bold, cores de destaque para títulos/links/código). +3. **Persistência**: tudo é salvo automaticamente; o Custom persiste entre + sessões. O tema ativo repinta ao vivo enquanto você edita. **O tema também + sobrevive a updates do Hermes**: no boot, o plugin re-afirma o skin + configurado (re-escreve `display.skin` → o watcher do gateway re-emite + `skin.changed` → o desktop re-aplica o tema mesmo quando o update reseta o + armazenamento local do app). + +## Arquitetura + +- `plugin.js` — contribui 13 temas (`THEMES_AREA`), painel + página + (`ROUTES_AREA` + `SIDEBAR_NAV_AREA`) e um **CSS injection engine**: um + `MutationObserver` no `` detecta o tema ativo (`data-hermes-theme`) e + injeta `