550c98f275
Reorganización física de crates/: - core/ (mezclaba 6 propósitos) se divide en protocol/, init/, runtime/, compat/ - shared/ (3 crates) se redistribuye en protocol/ e init/ - lapaloma (sub-módulo de ui_engine) se promueve a modules/pineal/ Renames de proyectos: - shipote → shuma (runtime de sandboxes) - nouser → akasha (explorador de Mónadas) - yahweh → nahual (motor GPUI, antes ui_engine/) - lapaloma → pineal (data-viz agnóstica) Fraccionamiento UI → core agnóstico: - vista-core (DeckState + snap, 175 LOC, 5 tests verdes) - barra-core (Task + render_html + sanitize, 90 LOC, 5 tests verdes) - vista-web y barra-web ahora son thin DOM bindings Documentación nueva: - 16 SDDs por subdirectorio (≤80 LOC c/u): protocol/init/runtime/compat + 10 módulos + apps/ - docs/STATUS.md con cifras reales por proyecto - docs/ROADMAP.md con plan a finalización (6 hitos, ~6-8 semanas) - CHANGELOG.md particionado en docs/changelog/<proyecto>.md (7 buckets) Automatización: - scripts/reorg.py — script idempotente que: git mv directorios, renombra package names, recomputa path = refs, reescribe imports rust, actualiza workspace Cargo.toml. Soporta --dry-run. - scripts/split-changelog.py — particiona CHANGELOG por componente. Validación: - cargo check --workspace pasa (124 crates + 2 nuevos cores). - 10 tests adicionales (5 en vista-core + 5 en barra-core) verdes. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
57 lines
1.6 KiB
Rust
57 lines
1.6 KiB
Rust
//! Card de nahual-shell + spawn del sidecar brahman compartido.
|
|
//!
|
|
//! La lógica de thread + tokio + ping-loop vive en `brahman-sidecar`;
|
|
//! aquí sólo declaramos la identidad de nahual como módulo Widget.
|
|
|
|
use std::collections::BTreeSet;
|
|
|
|
use brahman_card::{
|
|
Card, Flow, Flows, FsPolicy, IpcPolicy, Lifecycle, Payload, Permissions, Priority, Supervision,
|
|
TypeRef, CARD_SCHEMA_VERSION,
|
|
};
|
|
use ulid::Ulid;
|
|
|
|
/// Spawn del sidecar con la Card de nahual.
|
|
pub fn spawn() {
|
|
brahman_sidecar::spawn(build_card());
|
|
}
|
|
|
|
fn build_card() -> Card {
|
|
Card {
|
|
schema_version: CARD_SCHEMA_VERSION,
|
|
id: Ulid::new(),
|
|
lineage: None,
|
|
label: "brahman.ui_engine".into(),
|
|
provides: BTreeSet::new(),
|
|
requires: BTreeSet::new(),
|
|
payload: Payload::Virtual,
|
|
supervision: Supervision::Delegate,
|
|
lifecycle: Lifecycle::Widget,
|
|
priority: Priority::Normal,
|
|
permissions: Permissions {
|
|
filesystem: FsPolicy::ReadWrite,
|
|
ipc: IpcPolicy {
|
|
allow: vec!["wit-v1".into()],
|
|
},
|
|
..Default::default()
|
|
},
|
|
flow: Flows {
|
|
input: vec![Flow {
|
|
name: "render-data".into(),
|
|
ty: TypeRef::Primitive {
|
|
name: "json".into(),
|
|
},
|
|
pin_to: None,
|
|
}],
|
|
output: vec![Flow {
|
|
name: "user-intent".into(),
|
|
ty: TypeRef::Primitive {
|
|
name: "json".into(),
|
|
},
|
|
pin_to: None,
|
|
}],
|
|
},
|
|
..Default::default()
|
|
}
|
|
}
|