Commit Graph
22 Commits
Author SHA1 Message Date
Juan 9377730de4 algunas soluciones 2026-05-11 17:30:44 +02:00
JuanandClaude Opus 4.7 c860984ae4 fix(api): /executions incluye también las ejecuciones HITL pendientes
`GET /executions` solo leía `executions.jsonl`, donde nunca se escribe una ejecución
en `awaiting_approval` (esas viven solo en el checkpointer). La página de Aprobaciones
del dashboard hace `[e for e in list_executions() if e.status=="awaiting_approval"]`,
así que nunca encontraba aprobaciones pendientes. Ahora `list_executions` reconstruye
las no-terminales desde `execution_index.json` + `orchestrator.snapshot()` y las
fusiona con las del JSONL. Añade `test_list_executions_incluye_la_awaiting`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 14:38:52 +02:00
JuanandClaude Opus 4.7 09ec79a464 feat(api): implementa routers /policies y /violations (listado + filtros)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 15:40:09 +02:00
JuanandClaude Opus 4.7 8927b192f8 feat(api): implementa /executions con invoke + HITL approve/reject + persistencia
- POST /agents/{name}/invoke, GET /executions, GET /executions/{trace_id},
  POST /executions/{trace_id}/{approve,reject}.
- execution_index.json persiste trace_id → (agent_name, version) para reconstruir
  el contexto en approve/reject tras un reinicio.
- Refactor del orchestrator: split _snapshot → _build_execution + _snapshot, nuevo
  método público snapshot() (lee estado sin avanzar). Sustituye a los helpers
  _snapshot_execution/_build_graph_for_snapshot del plan, incompatibles con el
  checkpointer por-llamada.
- Aliases Annotated[...] de dependencias movidos a deps.py.
- Fixture mínima tests/fixtures/policies/default/.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 15:38:44 +02:00
JuanandClaude Opus 4.7 13ba1f7826 feat(api): implementa router /agents (list, get, versions, get_version, diff)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 15:33:27 +02:00
JuanandClaude Opus 4.7 1c763d26d8 feat(api): scaffolding FastAPI con TraceIdMiddleware, /health y routers stub
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 15:30:38 +02:00
JuanandClaude Opus 4.7 38d81252c6 feat(api): añade persistencia JSONL append-only y DI con factories cacheadas
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 15:29:23 +02:00
JuanandClaude Opus 4.7 5738bd3118 feat(runtime): añade AgentOrchestrator (invoke + resume HITL + snapshot)
Punto único de entrada al runtime. Cada llamada abre su propio AsyncSqliteSaver
sobre data_dir/checkpoints.sqlite, así que un awaiting_approval sobrevive a un
reinicio del proceso (verificado en test_estado_persiste_entre_instancias).
El plan no incluía tests del orchestrator; se añaden 5 (invoke feliz, pausa HITL +
resume aprobar/rechazar, bloqueo por guardrail, persistencia entre instancias).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 15:19:42 +02:00
JuanandClaude Opus 4.7 d56624c90e feat(runtime): añade build_graph (StateGraph + routing condicional + interrupt HITL)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 15:15:35 +02:00
JuanandClaude Opus 4.7 683cc69edc feat(runtime): añade AgentState y nodos LangGraph (validate, llm, propose, approve, finalize)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:56:25 +02:00
JuanandClaude Opus 4.7 af8036c2d2 feat(guardrails): añade NeMo stub, CompositeEngine paralelo y factory
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:51:17 +02:00
JuanandClaude Opus 4.7 79c6fe32ff feat(guardrails): añade GuardrailsAIEngine + 8 validadores (PII, injection, schema, telco)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:50:25 +02:00
JuanandClaude Opus 4.7 5cbec0d5d8 feat(registry): añade FileSystemAgentRegistry con versionado tipo Git y diff
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:39:50 +02:00
JuanandClaude Opus 4.7 85906de832 feat(registry): añade FileSystemPolicyStore con carga YAML versionada
Incluye 'yaml' en los overrides de mypy (PyYAML no trae type stubs).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:37:53 +02:00
JuanandClaude Opus 4.7 d774a6b509 feat(llm): añade factory que selecciona proveedor según settings
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:30:40 +02:00
JuanandClaude Opus 4.7 45b2b9367c feat(llm): añade MockProvider determinista con 3 escenarios canónicos
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:28:40 +02:00
JuanandClaude Opus 4.7 bc16059738 feat(llm): añade Protocol LLMProvider con Message y CompletionResult
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:28:40 +02:00
JuanandClaude Opus 4.7 55d65b68bf feat(observability): logging JSON estructurado con structlog y trace_id
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:16:07 +02:00
JuanandClaude Opus 4.7 60c2bff322 feat(config): añade Settings con Pydantic Settings y .env loading
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:16:07 +02:00
JuanandClaude Opus 4.7 ad77efe366 feat(domain): añade modelos GuardrailViolation, PolicyDefinition y AgentExecution
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:14:13 +02:00
JuanandClaude Opus 4.7 73114f6731 feat(domain): añade modelo AgentDefinition + LLMConfig + AgentVersionMeta
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:10:21 +02:00
JuanandClaude Opus 4.7 62536766e6 chore: scaffolding inicial del repo (pyproject, requirements, Makefile)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:08:48 +02:00