feat(sandokan-core): B1.1 — contrato del orquestador

Primer crate de la Fase B. Define SOLO el contrato del orquestador
sandokan (library horizontal embebible, no daemon supremo):

- Intent / ExecContext / IsolationLevel — qué orquestar
- ExecHandle — referencia a una entidad encarnada
- LifecycleEvent / TelemetryFrame — observabilidad (wire types)
- EngineError — taxonomía de fallas
- trait Engine — run/stop/list/status/telemetry (poll-based, sin
  streams sobre trait objects, para que las 3 impls lo cumplan
  uniformemente)

Las impls concretas (LocalEngine, DaemonEngine, RemoteEngine) vendrán
en crates separados (sandokan-local, sandokan-daemon, sandokan-remote).

3 tests verdes. cargo check --workspace verde.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
sergio
2026-05-20 00:38:22 +00:00
parent f8a2547b45
commit af5d4a1f22
8 changed files with 272 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
//! sandokan-core — el contrato del orquestador.
//!
//! `sandokan` es el orquestador del ecosistema brahman, diseñado como
//! **library horizontal embebible**, no como daemon supremo. Cualquier
//! binario (shuma, nahual-shell, matilda, un agente SSH) embebe un
//! `Engine` y decide si lo corre in-process o delega a otro.
//!
//! Este crate define SOLO el contrato:
//! - [`Intent`] — qué orquestar (una Card + contexto de ejecución).
//! - [`ExecHandle`] — referencia a una entidad encarnada.
//! - [`LifecycleEvent`] / [`TelemetryFrame`] — observabilidad.
//! - [`Engine`] — el trait que `LocalEngine`/`DaemonEngine`/`RemoteEngine`
//! implementan.
//!
//! Las implementaciones concretas viven en crates separados
//! (`sandokan-local`, `sandokan-daemon`, `sandokan-remote`).
pub mod engine;
pub mod error;
pub mod event;
pub mod intent;
pub use engine::Engine;
pub use error::EngineError;
pub use event::{LifecycleEvent, TelemetryFrame};
pub use intent::{ExecContext, ExecHandle, Intent, IsolationLevel};