Skip to content

sync: upstream genoffice 93b8938 — adocao integral + camada Hermes re-infundida - #58

Merged
criptogus merged 8 commits into
mainfrom
sync/upstream-93b8938
Sep 2, 2026
Merged

sync: upstream genoffice 93b8938 — adocao integral + camada Hermes re-infundida#58
criptogus merged 8 commits into
mainfrom
sync/upstream-93b8938

Conversation

@criptogus

Copy link
Copy Markdown
Owner

Sync upstream genspark-ai/genoffice @ 93b8938

Abordagem 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)

  • Engines: margens por seção + largura de tabela %, decodificação de XML, bold/itálico em script complexo, propriedades de célula de tabela, namespaces docx.
  • ai-provider: re-arquitetura adapter-based (registry.ts + protocols/{anthropic,gemini,openai-compatible}) + novos providers (kimi, glm, qwen, doubao, xai, mistral, openrouter) + cloudToolsEnabled/getProviderAdapter/activeProvider.
  • agent-core: descarta compactação obsoleta, robustez de SSE.
  • sheets: streaming em viewports grandes, cross-highlight da célula ativa, find além da janela.
  • slides: set_speaker_notes, audit de text overflow, células rotacionadas.
  • shell: dark/light/system theme, abrir arquivos arrastados.
  • markdown: app novo.

Camada Hermes re-infundida (fork preservado)

  • ai-provider: provider hermes (default) + HERMES_LLM_BASE_URL no registry; sessionId (header X-Hermes-Session-Id, fix 70374e0) propagado no streamForProvider/chatForProvider/openai-compatible; hermes-health.ts recriado.
  • agent-core: sessionId re-infundido em AgentLoopOptions/AgentStreamRequest/loop/electron-transport.
  • shell: accountStatus/accountLogin via health do gateway :8642 (sem login Genspark em browser); HERMESOFFICE_REPO_URL; onboarding sem GenTeam/credits (aponta GitHub).
  • tooling fork preservado: rebrand-hermesoffice.py, upstream-diff.sh, write-build-info.mjs, hermesoffice-update.mjs.
  • packages: hermes-cloud, hermes-share, hermes-launcher preservados.
  • provider-logos: logo Hermes adicionado.

Validação

  • npm run typecheck: 0 erros em 16 workspaces.
  • npm test: ~4531 testes passam.
  • rebrand-hermesoffice.py --check: 0.
  • Único teste que falha: 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.

…-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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T18:29:42.866693Z 24e08bc PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +26 to +27
const endpoint = getProviderAdapter(provider).resolveEndpoint(config)
const { baseUrl } = endpoint

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines 2867 to +2868
ipcMain.handle(HOME_CHANNELS.accountLogout, async () => {
// Fork: não há conta remota para encerrar sessão; só limpa o cache local
await hermesofficeLogout()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Gustavo Caetano added 7 commits September 2, 2026 18:45
…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).
…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.
@criptogus
criptogus merged commit 5387ea3 into main Sep 2, 2026
2 checks passed
@criptogus
criptogus deleted the sync/upstream-93b8938 branch September 2, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant