mirror of
https://github.com/hoshikawa2/compass_backoffice.git
synced 2026-07-09 13:54:20 +00:00
first commit
This commit is contained in:
55
docs/CORRECAO_IMPORTS_AGENT_FRAMEWORK_7.md
Normal file
55
docs/CORRECAO_IMPORTS_AGENT_FRAMEWORK_7.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Correção de compatibilidade com agent_framework(7)
|
||||
|
||||
Esta versão remove referências a módulos que não existem no `agent_framework(7).zip`, principalmente:
|
||||
|
||||
- `agent_framework.core`
|
||||
- `agent_framework.components`
|
||||
- `agent_framework.llm.factory`
|
||||
- `agent_framework.observer.application_log`
|
||||
- `agent_framework.observer.publishers`
|
||||
- `agent_framework.observer.types`
|
||||
|
||||
## LLM
|
||||
|
||||
O provider de LLM do backoffice agora usa o ponto real do framework:
|
||||
|
||||
```python
|
||||
from agent_framework.llm.providers import create_llm
|
||||
from agent_framework.config.settings import settings as fw_settings
|
||||
```
|
||||
|
||||
Assim, `LLM_PROVIDER=oci_openai` passa a operar pelo provider oficial do framework:
|
||||
|
||||
```python
|
||||
agent_framework.llm.providers.OCICompatibleOpenAIProvider
|
||||
```
|
||||
|
||||
## Exceptions
|
||||
|
||||
Como o framework atual não possui `agent_framework.core.exceptions`, as exceções HTTP/de domínio do backoffice foram isoladas em:
|
||||
|
||||
```text
|
||||
src/core/exceptions.py
|
||||
```
|
||||
|
||||
Isso mantém o tratamento de erro do backoffice sem inventar módulos inexistentes no framework.
|
||||
|
||||
## Logging
|
||||
|
||||
A dependência inexistente de `observer.application_log.StructuredLogger` foi removida. O backoffice usa um helper local mínimo apenas para compatibilidade do formatter.
|
||||
|
||||
## Validação
|
||||
|
||||
O script abaixo agora falha se algum import proibido reaparecer em `app/` ou `src/`:
|
||||
|
||||
```bash
|
||||
python tools/validate_parity.py
|
||||
```
|
||||
|
||||
Validações executadas nesta versão:
|
||||
|
||||
```text
|
||||
OK: backoffice framework-native structural validation passed
|
||||
OK: no forbidden agent_framework imports
|
||||
COMPILE_OK
|
||||
```
|
||||
Reference in New Issue
Block a user