Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
1340382
Merge pull request #20 from usetheodev/develop
usetheodev May 12, 2026
ca6ae6c
Merge pull request #21 from usetheodev/develop
usetheodev May 12, 2026
73c946e
docs(plans): theo-desktop bridge refactor plan v1.1 (WIP)
paulohenriquevn May 14, 2026
3a24640
Merge branch 'develop' into worktree-bright-frolicking-charm
paulohenriquevn May 14, 2026
431aef4
docs(plans): theo-desktop bridge refactor plan v1.2 (post-merge rebase)
paulohenriquevn May 14, 2026
dbbe21d
feat(theo-desktop): T0.1 — replace eprintln! with tracing + PII fix
paulohenriquevn May 14, 2026
ee4359d
ci(theo-desktop): T0.2 — wire desktop tests into CI gate
paulohenriquevn May 14, 2026
7c6e705
feat(theo-desktop): T0.3 — extract map_event + UTF-8 fix + 16 unit tests
paulohenriquevn May 14, 2026
75849d4
feat(theo-desktop): T1.1 — typed DTOs (auth/chat/catalog) with 11 uni…
paulohenriquevn May 14, 2026
a6f6329
feat(theo-desktop): T1.2 + T1.3 — migrate auth/chat commands to typed…
paulohenriquevn May 14, 2026
c497b5a
feat(theo-infra-llm): T2.1 — move model catalog out of theo-desktop
paulohenriquevn May 14, 2026
1a92280
feat(theo-application): T2.2 — apply_oauth use case for 3 OAuth provi…
paulohenriquevn May 14, 2026
42bddb8
feat(theo-desktop): T2.3 + T3.1 + T5.1 + T5.2 — encapsulate state, ad…
paulohenriquevn May 14, 2026
cd5525e
feat(theo-desktop): T4.2 + T5.3 — collapse 3 OAuth files into command…
paulohenriquevn May 14, 2026
d502a92
docs(log): record theo-desktop-bridge-refactor v1.2 implementation co…
paulohenriquevn May 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .claude/knowledge-base/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
type: index
updated_at: 2026-05-13
updated_at: 2026-05-14
---

# Wiki Index — theo-code
Expand All @@ -10,6 +10,9 @@ updated_at: 2026-05-13
- [Log](log.md) — Registro cronologico de operacoes
- [Overview](overview.md) — Visao geral do estado do projeto

## Plans
- [theo-desktop Bridge Refactor](plans/theo-desktop-bridge-refactor-plan.md) — Reorganiza apps/theo-desktop em ponte fina (Hexagonal + Strategy); empurra regras de negocio para theo-application e theo-infra-llm

## Architecture
### Context Domain
- [Context README](architecture/context/README.md) — Visao geral do dominio Context
Expand Down
85 changes: 85 additions & 0 deletions .claude/knowledge-base/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,91 @@ Registro cronologico de todas as operacoes no wiki. Append-only.

---

## [2026-05-14] implementation | theo-desktop Bridge Refactor v1.2 — COMPLETE

- **By:** claude-opus-4-7 (via ralph-loop)
- **Action:** Plano theo-desktop-bridge-refactor v1.2 implementado e validado integralmente
- **Commits (9, sequenciais):**
- 431aef4 docs(plans): baseline v1.2
- dbbe21d feat(theo-desktop): T0.1 — eprintln → tracing + PII fix EC-4
- ee4359d ci(theo-desktop): T0.2 — wire desktop tests into CI gate
- 7c6e705 feat(theo-desktop): T0.3 — map_event + UTF-8 fix EC-1 + 16 tests
- 75849d4 feat(theo-desktop): T1.1 — typed DTOs (auth/chat/catalog) + 11 tests
- a6f6329 feat(theo-desktop): T1.2 + T1.3 — migrate commands to DTOs
- c497b5a feat(theo-infra-llm): T2.1 — move model catalog out of desktop
- 1a92280 feat(theo-application): T2.2 — apply_oauth use case + 14 tests
- 42bddb8 feat(theo-desktop): T2.3 + T3.1 + T5.1 + T5.2 — encapsulate state + adapter + slim shims
- cd5525e feat(theo-desktop): T4.2 + T5.3 — collapse 3 OAuth files into oauth.rs
- **DoD verification (all green):**
- rg "eprintln!" apps/theo-desktop/src/ → 0 production hits (2 comment refs)
- rg "serde_json::json!" apps/theo-desktop/src/commands/ → 0
- rg "\.lock\(\)\.await" apps/theo-desktop/src/commands/ → 0
- rg byte-slice UTF-8 hazards → 0 production (3 comment refs explaining the fix)
- rg "skip_serializing_if" apps/theo-desktop/src/dto/ → 0 (1 comment in mod.rs)
- make check-arch → OK, 0 violations
- cargo test -p theo-code-desktop --lib → 39 passed
- cargo test -p theo-application --lib auth_apply → 14 passed
- cargo test -p theo-infra-llm --lib catalog → 22 passed (5 new for T2.1)
- cargo clippy -p theo-application -p theo-code-desktop --all-targets -- -D warnings → 0 warnings
- **Phase 6 dogfood (mandatory OAuth Codex Phase 0):**
- OAuth Codex token valid (21+h remaining at run time)
- target/release/theo agent -p "..." → success:true, provider="ChatGPT Codex (OAuth)", iterations:1, duration 4228ms, input_tokens=7482, output_tokens=39
- Phase 0 PASS — LLM pipeline end-to-end functional
- **Pre-existing failures (NOT caused by this plan):**
- theo-tooling sandbox::bwrap tests fail with "loopback: Operation not permitted" — environment limitation, sandbox tests need privileged netns. Unrelated to desktop refactor.

---

## [2026-05-14] plan-revision | theo-desktop Bridge Refactor v1.2 (post-merge rebase)

- **By:** claude-opus-4-7
- **Action:** Rebase do plano contra 46 commits incorporados pelo merge de origin/develop
- **Changes:**
- Header bumped: v1.1 -> v1.2; nova entrada explicando rebase
- D2 (Strategy ADR) — clarifica escopo: 3 OAuth providers (OpenAI/Copilot/Anthropic), os 5 novos (Bedrock/GitLab/GoogleVertex/SAP + MCP/WellKnown) sao API-key-based, surfaceados pelo CLI nao pelo desktop. Out of scope para v1.2.
- D5 (Catalog ADR) — escopo claro: catalogo suporta lookup para 26 providers; user_visible_models inicialmente populado para 3 (OAuth-surfaced).
- T1.1 DTOs — DeviceCodeDto.expires_in: Option<u64> -> u64 (mandatorio agora apos d7c2aea feat(auth))
- T2.2 use_cases::auth_apply — usa theo_infra_auth::error::AuthError tipado em vez de String
- T4.2 — preservar literal expires_in: 900 no copilot poll dispatch (vem do merge)
- T0.1 — nota que tracing.workspace = true ja esta em theo-infra-auth
- Phase 6 (Dogfood) — pre-condicao mandatoria: OAuth Codex Phase 0. T2.1 toca theo-infra-llm -> LLM pipeline -> dogfood-golden-rule.md aplica. Sem OAuth Codex valido = verdict INVALID @ 49/100.
- Global DoD — adicionados 3 gates novos (check-deprecated, check-duplication, check-wiring); audit agora roda 10 tecnicas
- Coverage Matrix — nova secao "Develop-Merge Impact" com 10 itens validados
- **Context:** Apos /to-plan (v1.0) e /edge-case-plan (v1.1), o usuario fez merge de origin/develop que trouxe mudancas de auth, tooling, dogfood e gates. Plano refeito linha-a-linha contra arvore merged. Escopo do refactor permanece o mesmo (3 OAuth providers); o crescimento foi em pre-condicoes (dogfood Phase 0) e gates de DoD.

---

## [2026-05-14] plan-revision | theo-desktop Bridge Refactor v1.1 (edge-case review)

- **By:** claude-opus-4-7 (via /edge-case-plan)
- **Action:** Aplicadas 11 correcoes ao plano apos edge-case review
- **Changes:**
- Inserida nova T0.2 (Wire Desktop Tests into CI) — EC-3 MUST FIX: testes nao gateavam PRs (audit.yml exclui theo-code-desktop)
- Antiga T0.2 (map_event) renumerada para T0.3
- T0.3 ganha fix de UTF-8 boundary panic em truncacao (EC-1 MUST FIX): &output[..5000] panicava em multi-byte; substituido por char_indices().nth(5000)
- T1.1 DTOs removeu skip_serializing_if (EC-2 MUST FIX): preservaria shape null vs absent que quebra contrato com FE
- T0.1 endurecido contra PII leak (EC-4): account_id via has_account=bool, nunca ?Debug
- T1.3 + T2.2 + T4.1 ganharam testes SHOULD TEST (EC-5/6/7)
- T2.3 asserts ordem explicita dos eventos Error/Done (EC-8)
- T3.1 + T4.1 ganharam doc-comments DOCUMENT (EC-9/10/11)
- Coverage Matrix expandido com tabela de Edge Case Coverage
- Global DoD ganhou 4 novas verificacoes grep-based
- Plan version: 1.0 → 1.1
- **Context:** Edge case review apontou 3 MUST FIX que invalidariam premissas do plano (UTF-8 panic latente, breaking JSON contract, testes invisiveis ao CI). Todas as 11 correcoes aplicadas inline conforme aprovacao do usuario. Total tasks: 12 → 13. Total test target: 60 → 70.

---

## [2026-05-14] plan | theo-desktop Bridge Refactor

- **By:** claude-opus-4-7 (via /to-plan)
- **Action:** Plano de refatoracao de apps/theo-desktop saved to plans/theo-desktop-bridge-refactor-plan.md
- **Pages created:**
- plans/theo-desktop-bridge-refactor-plan.md — 6 fases, 12 tasks, 9 issues cobertos
- **Context:** Diagnostico identificou 10 problemas; 1 invalidado apos verificacao (tauri-plugin-shell e usado via capabilities/default.json). Plano aplica Hexagonal (Ports & Adapters) + Strategy para OAuth providers. Movimentos chave: catalogo de modelos vai para theo-infra-llm; apply_to_config vai para theo-application::use_cases::auth_apply; 3 arquivos OAuth colapsam em 1; AppState encapsulado; DTOs tipados substituem serde_json::json! ad-hoc. Frontend contract preservado (mesmos nomes de comando, mesmo shape JSON).
- **Architecture-docs BEFORE:** Skipped — desktop surface nao e dominio SOTA tracked.

---

## [2026-05-11] lint | Revisao completa do sistema .claude/

- **By:** claude-opus (revisao de sistema)
Expand Down
Loading
Loading