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>
This commit is contained in:
Juan
2026-05-10 15:38:44 +02:00
co-authored by Claude Opus 4.7
parent 13ba1f7826
commit 8927b192f8
9 changed files with 420 additions and 39 deletions
+8
View File
@@ -0,0 +1,8 @@
name: default
versions:
- id: v1
hash: testhashp1
author: Juan
message: fixture mínima
created_at: 2026-04-01T00:00:00Z
active_version: v1
+6
View File
@@ -0,0 +1,6 @@
name: default
version: v1
description: Política mínima para tests del core (sin validadores)
input_validators: []
output_validators: []
on_validator_error: fail_closed