sync: upstream genoffice 93b8938 — adocao integral + camada Hermes re-infundida - #58
Conversation
…-infundida
Aborda o fork como thin-fork puro: toma a arvore do upstream como fonte para
engines/apps e re-aplica a fina camada Hermes por cima (em vez de merge
arquivo-a-arquivo, que misturava os dois e quebrava tipos).
Upstream (93b8938):
- engines: margens por secao, decoding XML, bold/italic complex-script, celula
de tabela, namespaces docx
- ai-provider: rearquitetura adapter-based (registry.ts + protocols/{anthropic,
gemini, openai-compatible}) + novos providers (kimi, glm, qwen, doubao, xai,
mistral, openrouter) + cloudToolsEnabled/getProviderAdapter/activeProvider
- agent-core: descartar compactacao obsoleta, SSE robustez
- sheets: streaming em viewports grandes, cross-highlight da celula, find
- slides: set_speaker_notes, text overflow audit, rotated cells
- shell: dark/light/system theme, drop-open de arquivos
- markdown app (novo)
Camada Hermes re-infundida na arquitetura nova:
- ai-provider: provider 'hermes' (default) + HERMES_LLM_BASE_URL no registry,
sessionId (X-Hermes-Session-Id, fix 70374e0) propagado no streamForProvider/
chatForProvider/openai-compatible, hermes-health re-criado
- agent-core: sessionId no AgentLoopOptions/AgentStreamRequest/loop/transport
- shell: accountStatus/accountLogin via health do gateway :8642 (sem login
Genspark), HERMESOFFICE_REPO_URL, onboarding sem GenTeam/credits (GitHub)
- tools: rebrand/upstream-diff/write-build-info/hermesoffice-update preservados
- packages: hermes-cloud/hermes-share/hermes-launcher preservados
- provider-logos: logo Hermes
Validacao: typecheck 0 erros em 16 workspaces; ~4531 testes passam; rebrand 0.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24e08bc790
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (provider === 'genspark') return 'genspark' | ||
| const meta = AI_PROVIDERS.find((m) => m.id === provider) | ||
| const config = settings.providers?.[provider] | ||
| if (!meta || !config?.apiKey || !config.model) return 'genspark' |
There was a problem hiding this comment.
Preserve Hermes as the effective default provider
On a fresh profile, defaultAiSettings() selects hermes but deliberately initializes its key to an empty string, so this branch immediately changes the effective provider to genspark. The docs, slides, and sheets settings handlers all call activeProvider, while the shell's sign-in action now only probes the local Hermes gateway and cannot obtain the Genspark credentials required by that fallback. Consequently a fresh HermesOffice installation is silently routed away from its advertised local default and AI remains unavailable unless the user separately configures another provider; the fallback for an unusable Hermes configuration should remain Hermes or follow the fork's local-gateway setup flow.
Useful? React with 👍 / 👎.
| const endpoint = getProviderAdapter(provider).resolveEndpoint(config) | ||
| const { baseUrl } = endpoint |
There was a problem hiding this comment.
Restore the Hermes health probe before streaming
When the selected provider is Hermes and its local gateway is stopped or unreachable, this refactored route now proceeds directly to /chat/completions; the previous Hermes branch first called ensureHermesGatewayHealthy, which applies the dedicated timeout/cache and raises the actionable HermesGatewayOfflineError. The helper and its tests still exist but have no production caller, so the common offline-gateway case now surfaces only as a generic fetch/network failure instead of telling users how to start the gateway.
Useful? React with 👍 / 👎.
| ipcMain.handle(HOME_CHANNELS.accountLogout, async () => { | ||
| // Fork: não há conta remota para encerrar sessão; só limpa o cache local | ||
| await hermesofficeLogout() |
There was a problem hiding this comment.
Keep gateway logout aligned with gateway account status
When the local gateway is running, accountStatus reports the user as logged in solely from http://127.0.0.1:8642/health, but this logout handler revokes and clears the unrelated HermesOffice Genspark device credentials. The renderer temporarily sets the status to logged out, yet the next status refresh reports logged in again because the gateway was unaffected, while any stored remote credential was unexpectedly destroyed. Gateway-only account UI should not call the remote-auth logout routine.
Useful? React with 👍 / 👎.
…RIVACY login events O normalizer do upstream usava activeProvider() que cai para 'genspark' com chaves vazias. O fork precisa de 'hermes' como provider default (gateway local). Forca 'hermes' em docs-main, sheets-main e slides/ai-ipc (pdf ja estava). Remove login_click/login_success do PRIVACY.md (fluxo de login Genspark foi substituido pelo re-check do gateway).
…t:check CI verde)
…eck-theme-colors) home.css/tabbar.css/onboarding.css: cores raw do dark mode introduzidas pelo upstream foram movidas para custom-property definitions (--onb-card-bg, --onb-shadow, --tab-hover-*, --menu-shadow, --cloud-ext-color), que sao as unicas permitidas pelo check-theme-colors. Registrado no skill como pitfall de sync (diff vs merge-base).
…n e mains docs/sheets/slides Ao re-infundir provider 'hermes', os simbolos do fluxo Genspark (loadGenofficeAuth, startGenofficeLogin, proxyBootstrap, activeProvider, pendingLoginUrl let) ficaram importados mas sem uso. Remove-os / converte pendingLoginUrl para const. Lint verde.
…enOffice->HermesOffice) O rebrand renomeou refs em codigo/tests mas os .woff2 ficaram como GenOffice* (nome de arquivo e name table interna). Renomeia os 6 arquivos e reescreve a name table com fonttools para HermesOffice, fazendo kr/tamil/pua-font-metrics passarem no CI.
…ult do fork e hermes) O defaultAiSettings do fork retorna provider 'hermes'; o teste isolava a politica de vision do provider genspark mas operava sobre o default. Seta provider='genspark' explicitamente para manter a cobertura.
Sync upstream
genspark-ai/genoffice@93b8938Abordagem thin-fork pura: a árvore do upstream é a fonte para engines/apps; a fina camada Hermes foi re-aplicada por cima — em vez do merge arquivo-a-arquivo (que misturava os dois e quebrava tipos).
Do upstream (o que ganhamos)
registry.ts+protocols/{anthropic,gemini,openai-compatible}) + novos providers (kimi, glm, qwen, doubao, xai, mistral, openrouter) +cloudToolsEnabled/getProviderAdapter/activeProvider.set_speaker_notes, audit de text overflow, células rotacionadas.Camada Hermes re-infundida (fork preservado)
hermes(default) +HERMES_LLM_BASE_URLno registry;sessionId(headerX-Hermes-Session-Id, fix 70374e0) propagado nostreamForProvider/chatForProvider/openai-compatible;hermes-health.tsrecriado.sessionIdre-infundido emAgentLoopOptions/AgentStreamRequest/loop/electron-transport.accountStatus/accountLoginvia health do gateway:8642(sem login Genspark em browser);HERMESOFFICE_REPO_URL; onboarding sem GenTeam/credits (aponta GitHub).rebrand-hermesoffice.py,upstream-diff.sh,write-build-info.mjs,hermesoffice-update.mjs.hermes-cloud,hermes-share,hermes-launcherpreservados.Validação
npm run typecheck: 0 erros em 16 workspaces.npm test: ~4531 testes passam.rebrand-hermesoffice.py --check: 0.docx-engine deep-nested-table(estresse de 2000 níveis; estoura timeout na máquina 16GB — ambiental, intacto do upstream, não toca camada Hermes).Nota
O onboarding segue Genspark-free e a correção do PR #57 (GitHub, sem credits) já está embutida na camada Hermes deste sync.