refactor(monorepo): reorganización lógica + renames + SDDs + split CHANGELOG

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>
This commit is contained in:
sergio
2026-05-19 14:48:34 +00:00
parent 86fb6ae20b
commit 550c98f275
375 changed files with 8512 additions and 7155 deletions
+11 -5056
View File
File diff suppressed because it is too large Load Diff
Generated
+590 -580
View File
File diff suppressed because it is too large Load Diff
+152 -136
View File
@@ -2,44 +2,56 @@
resolver = "2"
members = [
# ============================================================
# core/ — Init y compat (arje absorbido)
# protocol/ — Contratos canónicos + routing entre módulos
# ============================================================
"crates/core/brahman-card",
"crates/core/brahman-card-wit",
"crates/core/brahman-cards",
"crates/core/brahman-handshake",
"crates/core/brahman-broker",
"crates/core/brahman-admin",
"crates/shared/brahman-sidecar",
"crates/shared/brahman-net",
"crates/shared/ente-incarnate",
"crates/core/ente-card",
"crates/core/ente-bus",
"crates/core/ente-cas",
"crates/core/ente-kernel",
"crates/core/ente-soma",
"crates/core/ente-wasm",
"crates/core/ente-snapshot",
"crates/core/ente-brain",
"crates/core/ente-zero",
"crates/core/ente-echo",
"crates/core/ente-policy-provider",
"crates/core/ente-logind-compat",
"crates/core/ente-hostnamed-compat",
"crates/core/ente-timedated-compat",
"crates/core/ente-localed-compat",
"crates/core/ente-journald-compat",
"crates/core/ente-resolved-compat",
"crates/core/ente-polkit-compat",
"crates/core/ente-machined-compat",
"crates/core/ente-tmpfiles-compat",
"crates/core/ente-systemd1-compat",
"crates/core/ente-notify-compat",
"crates/core/ente-binfmt-compat",
"crates/core/ente-timer-compat",
"crates/protocol/brahman-card",
"crates/protocol/brahman-card-wit",
"crates/protocol/brahman-cards",
"crates/protocol/brahman-handshake",
"crates/protocol/brahman-broker",
"crates/protocol/brahman-admin",
"crates/protocol/brahman-sidecar",
"crates/protocol/brahman-net",
"crates/protocol/ente-card",
# ============================================================
# modules/semantic_dht/ — DHT semántico (minga absorbido)
# init/ — PID 1 + encarnación Linux (arje)
# ============================================================
"crates/init/ente-zero",
"crates/init/ente-kernel",
"crates/init/ente-soma",
"crates/init/ente-snapshot",
"crates/init/ente-incarnate",
# ============================================================
# runtime/ — Infraestructura de ejecución (bus + cas + wasm + brain)
# ============================================================
"crates/runtime/ente-bus",
"crates/runtime/ente-cas",
"crates/runtime/ente-wasm",
"crates/runtime/ente-brain",
"crates/runtime/ente-echo",
# ============================================================
# compat/ — Shims D-Bus para correr software systemd-aware
# ============================================================
"crates/compat/ente-policy-provider",
"crates/compat/ente-logind-compat",
"crates/compat/ente-hostnamed-compat",
"crates/compat/ente-timedated-compat",
"crates/compat/ente-localed-compat",
"crates/compat/ente-journald-compat",
"crates/compat/ente-resolved-compat",
"crates/compat/ente-polkit-compat",
"crates/compat/ente-machined-compat",
"crates/compat/ente-tmpfiles-compat",
"crates/compat/ente-systemd1-compat",
"crates/compat/ente-notify-compat",
"crates/compat/ente-binfmt-compat",
"crates/compat/ente-timer-compat",
# ============================================================
# modules/semantic_dht/ (minga) — DHT semántico de código
# ============================================================
"crates/modules/semantic_dht/minga-core",
"crates/modules/semantic_dht/minga-store",
@@ -48,68 +60,70 @@ members = [
"crates/modules/semantic_dht/minga-cli",
# ============================================================
# modules/ui_engine/ — Motor de widgets (yahweh libs+widgets)
# modules/nahual/ — Motor GPUI: libs + widgets (era yahweh)
# ============================================================
"crates/modules/ui_engine/libs/core",
"crates/modules/ui_engine/libs/theme",
"crates/modules/ui_engine/libs/launcher",
"crates/modules/ui_engine/libs/bus",
"crates/modules/ui_engine/libs/meta-schema",
"crates/modules/ui_engine/libs/meta-runtime",
"crates/modules/ui_engine/libs/providers/fs",
"crates/modules/ui_engine/libs/providers/sqlite",
"crates/modules/ui_engine/widgets/tree",
"crates/modules/ui_engine/widgets/container_core",
"crates/modules/ui_engine/widgets/splitter",
"crates/modules/ui_engine/widgets/tabs",
"crates/modules/ui_engine/widgets/tiled",
"crates/modules/ui_engine/widgets/text_input",
"crates/modules/ui_engine/widgets/meta-form",
"crates/modules/ui_engine/widgets/banner",
"crates/modules/ui_engine/widgets/card",
"crates/modules/ui_engine/widgets/stat-card",
"crates/modules/ui_engine/widgets/app-header",
"crates/modules/ui_engine/widgets/theme-switcher",
# --- lapaloma: módulo de gráficos data-viz (ver ARCHITECTURE.md fuente) ---
"crates/modules/ui_engine/libs/lapaloma-core",
"crates/modules/ui_engine/widgets/lapaloma-render",
"crates/modules/ui_engine/widgets/lapaloma-cartesian",
"crates/modules/ui_engine/widgets/lapaloma-stream",
"crates/modules/ui_engine/widgets/lapaloma-mesh",
"crates/modules/ui_engine/widgets/lapaloma-financial",
"crates/modules/ui_engine/widgets/lapaloma-polar",
"crates/modules/ui_engine/widgets/lapaloma-heatmap",
"crates/modules/ui_engine/widgets/lapaloma-treemap",
"crates/modules/ui_engine/widgets/lapaloma-flow",
"crates/modules/ui_engine/widgets/lapaloma-phosphor",
"crates/modules/ui_engine/widgets/lapaloma-export",
"crates/modules/ui_engine/widgets/lapaloma",
"crates/modules/nahual/libs/core",
"crates/modules/nahual/libs/theme",
"crates/modules/nahual/libs/launcher",
"crates/modules/nahual/libs/bus",
"crates/modules/nahual/libs/meta-schema",
"crates/modules/nahual/libs/meta-runtime",
"crates/modules/nahual/libs/providers/fs",
"crates/modules/nahual/libs/providers/sqlite",
"crates/modules/nahual/widgets/tree",
"crates/modules/nahual/widgets/container_core",
"crates/modules/nahual/widgets/splitter",
"crates/modules/nahual/widgets/tabs",
"crates/modules/nahual/widgets/tiled",
"crates/modules/nahual/widgets/text_input",
"crates/modules/nahual/widgets/meta-form",
"crates/modules/nahual/widgets/banner",
"crates/modules/nahual/widgets/card",
"crates/modules/nahual/widgets/stat-card",
"crates/modules/nahual/widgets/app-header",
"crates/modules/nahual/widgets/theme-switcher",
# ============================================================
# modules/nakui/ — ERP matemático (nakui absorbido)
# modules/pineal/ — Data-viz agnóstica con backends (era lapaloma)
# ============================================================
"crates/modules/pineal/core",
"crates/modules/pineal/render",
"crates/modules/pineal/cartesian",
"crates/modules/pineal/stream",
"crates/modules/pineal/mesh",
"crates/modules/pineal/financial",
"crates/modules/pineal/polar",
"crates/modules/pineal/heatmap",
"crates/modules/pineal/treemap",
"crates/modules/pineal/flow",
"crates/modules/pineal/phosphor",
"crates/modules/pineal/export",
"crates/modules/pineal/umbrella",
# ============================================================
# modules/nakui/ — ERP matemático (categórico)
# ============================================================
"crates/modules/nakui/core",
# ============================================================
# modules/nouser/ — explorador de Mónadas (nuevo)
# modules/akasha/ — Explorador semántico de Mónadas (era nouser)
# ============================================================
"crates/modules/nouser/card",
"crates/modules/nouser/core",
"crates/modules/nouser/nous",
"crates/modules/nouser/nous-mock",
"crates/modules/nouser/nous-real",
"crates/modules/akasha/card",
"crates/modules/akasha/core",
"crates/modules/akasha/nous",
"crates/modules/akasha/nous-mock",
"crates/modules/akasha/nous-real",
# ============================================================
# modules/shipote/ — runtime de espacios aislados con flujo tipado
# modules/shuma/ — Runtime de espacios aislados (era shipote)
# ============================================================
"crates/modules/shipote/shipote-card",
"crates/modules/shipote/shipote-protocol",
"crates/modules/shipote/shipote-discern",
"crates/modules/shipote/shipote-core",
"crates/modules/shuma/shuma-card",
"crates/modules/shuma/shuma-protocol",
"crates/modules/shuma/shuma-discern",
"crates/modules/shuma/shuma-core",
# ============================================================
# modules/gioser/ — landing WASM (chacana + 4 elementos)
# modules/gioser/ — Landing WASM (chacana + 4 elementos)
# ============================================================
"crates/modules/gioser/gioser-geom",
"crates/modules/gioser/gioser-physics",
@@ -118,23 +132,25 @@ members = [
"crates/modules/gioser/gioser-canvas-web",
# ============================================================
# modules/pluma/ — markdown agnóstico + visor web elegante
# modules/pluma/ — Markdown agnóstico + visor web
# ============================================================
"crates/modules/pluma/pluma-md",
"crates/modules/pluma/pluma-reader-web",
# ============================================================
# modules/vista/ — deck horizontal swipe estilo Flutter PageView
# modules/vista/ — Deck horizontal swipe (Flutter PageView)
# ============================================================
"crates/modules/vista/vista-core",
"crates/modules/vista/vista-web",
# ============================================================
# modules/barra/ — taskbar agnóstica estilo Windows
# modules/barra/ — Taskbar agnóstica estilo Windows
# ============================================================
"crates/modules/barra/barra-core",
"crates/modules/barra/barra-web",
# ============================================================
# modules/cosmobiologia/ — estudio de astrología profesional
# modules/cosmobiologia/ — Estudio de astrología profesional
# ============================================================
"crates/modules/cosmobiologia/cosmobiologia-card",
"crates/modules/cosmobiologia/cosmobiologia-model",
@@ -149,28 +165,28 @@ members = [
"crates/modules/cosmobiologia/cosmobiologia-web",
# ============================================================
# apps/ — apps que consumen el protocolo (yahweh modules+shell)
# apps/ — Binarios finales que consumen el protocolo
# ============================================================
"crates/apps/file_explorer",
"crates/apps/database_explorer",
"crates/apps/text_viewer",
"crates/apps/image_viewer",
"crates/apps/yahweh-shell",
"crates/apps/nouser-explorer",
"crates/apps/brahman-broker-explorer",
"crates/apps/brahman-demo",
"crates/apps/nahual-shell",
"crates/apps/nahual-file-explorer",
"crates/apps/nahual-database-explorer",
"crates/apps/nahual-text-viewer",
"crates/apps/nahual-image-viewer",
"crates/apps/akasha-explorer",
"crates/apps/nakui-explorer",
"crates/apps/nakui-ui",
"crates/apps/minga-explorer",
"crates/apps/brahman-broker-explorer",
"crates/apps/brahman-demo",
"crates/apps/shipote-daemon",
"crates/apps/shipote-cli",
"crates/apps/shipote-gateway",
"crates/apps/shipote-shell",
"crates/apps/shuma-daemon",
"crates/apps/shuma-cli",
"crates/apps/shuma-gateway",
"crates/apps/shuma-shell",
"crates/apps/gioser-web",
"crates/apps/lapaloma-demo",
"crates/apps/lapaloma-stream-demo",
"crates/apps/lapaloma-phosphor-demo",
"crates/apps/lapaloma-financial-demo",
"crates/apps/pineal-demo",
"crates/apps/pineal-stream-demo",
"crates/apps/pineal-phosphor-demo",
"crates/apps/pineal-financial-demo",
"crates/apps/cosmobiologia",
"crates/apps/cosmobiologia-cli",
"crates/apps/cosmobiologia-server",
@@ -257,7 +273,7 @@ zbus = { version = "4", default-features = false, features = ["tokio"] }
# === Tests ===
tempfile = "3"
# === GPUI (yahweh) ===
# === GPUI (nahual) ===
gpui = "0.2"
# === Filesystem helpers ===
@@ -274,40 +290,40 @@ glam = "0.30"
pulldown-cmark = { version = "0.12", default-features = false, features = ["html"] }
# ============================================================
# Intra-workspace deps de yahweh (referenciadas por workspace = true)
# Intra-workspace deps de nahual (referenciadas por workspace = true)
# ============================================================
yahweh-core = { path = "crates/modules/ui_engine/libs/core" }
yahweh-theme = { path = "crates/modules/ui_engine/libs/theme" }
yahweh-bus = { path = "crates/modules/ui_engine/libs/bus" }
yahweh-provider-fs = { path = "crates/modules/ui_engine/libs/providers/fs" }
yahweh-provider-sqlite = { path = "crates/modules/ui_engine/libs/providers/sqlite" }
yahweh-widget-tree = { path = "crates/modules/ui_engine/widgets/tree" }
yahweh-widget-container-core = { path = "crates/modules/ui_engine/widgets/container_core" }
yahweh-widget-splitter = { path = "crates/modules/ui_engine/widgets/splitter" }
yahweh-widget-tabs = { path = "crates/modules/ui_engine/widgets/tabs" }
yahweh-widget-tiled = { path = "crates/modules/ui_engine/widgets/tiled" }
yahweh-widget-text-input = { path = "crates/modules/ui_engine/widgets/text_input" }
yahweh-file-explorer = { path = "crates/apps/file_explorer" }
yahweh-database-explorer = { path = "crates/apps/database_explorer" }
yahweh-text-viewer = { path = "crates/apps/text_viewer" }
yahweh-image-viewer = { path = "crates/apps/image_viewer" }
nahual-core = { path = "crates/modules/nahual/libs/core" }
nahual-theme = { path = "crates/modules/nahual/libs/theme" }
nahual-bus = { path = "crates/modules/nahual/libs/bus" }
nahual-provider-fs = { path = "crates/modules/nahual/libs/providers/fs" }
nahual-provider-sqlite = { path = "crates/modules/nahual/libs/providers/sqlite" }
nahual-widget-tree = { path = "crates/modules/nahual/widgets/tree" }
nahual-widget-container-core = { path = "crates/modules/nahual/widgets/container_core" }
nahual-widget-splitter = { path = "crates/modules/nahual/widgets/splitter" }
nahual-widget-tabs = { path = "crates/modules/nahual/widgets/tabs" }
nahual-widget-tiled = { path = "crates/modules/nahual/widgets/tiled" }
nahual-widget-text-input = { path = "crates/modules/nahual/widgets/text_input" }
nahual-file-explorer = { path = "crates/apps/nahual-file-explorer" }
nahual-database-explorer = { path = "crates/apps/nahual-database-explorer" }
nahual-text-viewer = { path = "crates/apps/nahual-text-viewer" }
nahual-image-viewer = { path = "crates/apps/nahual-image-viewer" }
# ============================================================
# Intra-workspace deps de lapaloma (módulo de gráficos)
# Intra-workspace deps de pineal (módulo de gráficos)
# ============================================================
lapaloma-core = { path = "crates/modules/ui_engine/libs/lapaloma-core" }
lapaloma-render = { path = "crates/modules/ui_engine/widgets/lapaloma-render" }
lapaloma-cartesian = { path = "crates/modules/ui_engine/widgets/lapaloma-cartesian" }
lapaloma-stream = { path = "crates/modules/ui_engine/widgets/lapaloma-stream" }
lapaloma-mesh = { path = "crates/modules/ui_engine/widgets/lapaloma-mesh" }
lapaloma-financial = { path = "crates/modules/ui_engine/widgets/lapaloma-financial" }
lapaloma-polar = { path = "crates/modules/ui_engine/widgets/lapaloma-polar" }
lapaloma-heatmap = { path = "crates/modules/ui_engine/widgets/lapaloma-heatmap" }
lapaloma-treemap = { path = "crates/modules/ui_engine/widgets/lapaloma-treemap" }
lapaloma-flow = { path = "crates/modules/ui_engine/widgets/lapaloma-flow" }
lapaloma-phosphor = { path = "crates/modules/ui_engine/widgets/lapaloma-phosphor" }
lapaloma-export = { path = "crates/modules/ui_engine/widgets/lapaloma-export" }
lapaloma = { path = "crates/modules/ui_engine/widgets/lapaloma" }
pineal-core = { path = "crates/modules/pineal/core" }
pineal-render = { path = "crates/modules/pineal/render" }
pineal-cartesian = { path = "crates/modules/pineal/cartesian" }
pineal-stream = { path = "crates/modules/pineal/stream" }
pineal-mesh = { path = "crates/modules/pineal/mesh" }
pineal-financial = { path = "crates/modules/pineal/financial" }
pineal-polar = { path = "crates/modules/pineal/polar" }
pineal-heatmap = { path = "crates/modules/pineal/heatmap" }
pineal-treemap = { path = "crates/modules/pineal/treemap" }
pineal-flow = { path = "crates/modules/pineal/flow" }
pineal-phosphor = { path = "crates/modules/pineal/phosphor" }
pineal-export = { path = "crates/modules/pineal/export" }
pineal = { path = "crates/modules/pineal/umbrella" }
[profile.release]
lto = "thin"
+52
View File
@@ -0,0 +1,52 @@
# apps/ — Binarios finales
**Propósito.** Aplicaciones ejecutables que consumen el protocolo
brahman y los módulos. Cada app es un `[[bin]]` o `cdylib` standalone.
## Mapa
### Protocol / Init
- `brahman-broker-explorer` — probe GPUI del broker (matches + sessions)
- `brahman-demo` — bootstrap reproducible: broker + producer + consumer
### Nahual (GPUI suite)
- `nahual-shell` — shell standard de explorers (sidebar+main+status)
- `nahual-file-explorer`, `nahual-database-explorer`,
`nahual-text-viewer`, `nahual-image-viewer`
### Akasha
- `akasha-explorer` — descubre el daemon `akasha-core` y lista Mónadas
### Nakui (ERP)
- `nakui-ui` — MetaUi+MetaForm con event log + replay
- `nakui-explorer` — dashboard sobre stack nahual
### Minga
- `minga-explorer` — dashboard de DHT semántico + indexer status
### Shuma (sandboxes)
- `shuma-daemon` — dueño de Workspaces (postcard sobre Unix socket)
- `shuma-cli` — CLI admin (`shipote` binario por compat)
- `shuma-gateway` — HTTP/JSON ↔ postcard
- `shuma-shell` — GUI GPUI de Workspaces
### Pineal (demos data-viz)
- `pineal-demo`, `pineal-stream-demo`, `pineal-phosphor-demo`,
`pineal-financial-demo`
### Web targets (cdylib WASM)
- `gioser-web` — landing chacana
- `cosmobiologia-web` (en modules/, no apps/) — bridge SVG
### Cosmobiología
- `cosmobiologia` — app GPUI principal (tree + canvas + panel)
- `cosmobiologia-cli` — calcula cartas headless
- `cosmobiologia-server` — server HTTP single-user con CRUD
## Convenciones
- Cada app declara su `Card` y se anuncia al Init vía `brahman-sidecar`.
- Apps que viven dentro de GPUI consumen `nahual-shell` para el chrome.
- Apps headless usan `clap` para argv.
- Tests E2E: usar `gpui::TestAppContext` para GPUI; CLI tests via
`tempfile` + `assert_cmd`.
+21
View File
@@ -0,0 +1,21 @@
[package]
name = "akasha-explorer"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Explorador GPUI de Mónadas: panel que descubre al daemon nouser vía broker brahman y consulta sus Mónadas dinámicamente."
[dependencies]
brahman-card = { path = "../../protocol/brahman-card" }
brahman-sidecar = { path = "../../protocol/brahman-sidecar" }
akasha-card = { path = "../../modules/akasha/card" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
nahual-launcher = { path = "../../modules/nahual/libs/launcher" }
nahual-widget-banner = { path = "../../modules/nahual/widgets/banner" }
nahual-widget-card = { path = "../../modules/nahual/widgets/card" }
nahual-widget-app-header = { path = "../../modules/nahual/widgets/app-header" }
gpui = { workspace = true }
[[bin]]
name = "akasha-explorer"
path = "src/main.rs"
@@ -1,21 +1,21 @@
//! `nouser-explorer` — panel GPUI que descubre al daemon `nouser`
//! `akasha-explorer` — panel GPUI que descubre al daemon `akasha`
//! vía broker brahman y muestra sus Mónadas en vivo.
//!
//! Diseño: ventana standalone que cada N segundos consulta el query
//! socket del daemon (`nouser_core::engine_socket::client::list_monads`).
//! socket del daemon (`akasha_core::engine_socket::client::list_monads`).
//! El path del socket NO está hardcoded — se descubre vía
//! `brahman_sidecar::await_provider_blocking` para el flow
//! `monad-list:json`. Si el daemon cae, el socket cacheado se invalida
//! y la próxima iteración re-descubre.
//!
//! Sin integración con yahweh-shell — es su propio binario para que el
//! Sin integración con nahual-shell — es su propio binario para que el
//! ecosistema sea visible incluso sin la shell completa.
//!
//! Uso:
//! ```sh
//! cargo run -p nouser-explorer
//! cargo run -p akasha-explorer
//! # con override del init socket (heredado de brahman-handshake):
//! BRAHMAN_INIT_SOCKET=/tmp/init.sock cargo run -p nouser-explorer
//! BRAHMAN_INIT_SOCKET=/tmp/init.sock cargo run -p akasha-explorer
//! ```
use std::path::PathBuf;
@@ -25,14 +25,14 @@ use brahman_sidecar::{await_provider_blocking, build_consumer_card, ConsumerErro
use gpui::{
div, prelude::*, px, rgb, Context, IntoElement, Render, SharedString, Window,
};
use nouser_card::query::client as query_client;
use nouser_card::query::{transport, ListMonadsResponse, FLOW_MONAD_LIST, FLOW_TYPE_NAME};
use nouser_card::Lens;
use yahweh_launcher::launch_app;
use yahweh_theme::Theme;
use yahweh_widget_app_header::app_header;
use yahweh_widget_banner::{banner_themed, Banner};
use yahweh_widget_card::card_themed;
use akasha_card::query::client as query_client;
use akasha_card::query::{transport, ListMonadsResponse, FLOW_MONAD_LIST, FLOW_TYPE_NAME};
use akasha_card::Lens;
use nahual_launcher::launch_app;
use nahual_theme::Theme;
use nahual_widget_app_header::app_header;
use nahual_widget_banner::{banner_themed, Banner};
use nahual_widget_card::card_themed;
const REFRESH_INTERVAL: Duration = Duration::from_secs(2);
const DISCOVERY_TIMEOUT: Duration = Duration::from_secs(3);
@@ -176,7 +176,7 @@ fn resolve_socket() -> Result<(PathBuf, &'static str), String> {
/// Card con `flow.input = monad-list:json`, espera al primer
/// `MatchEvent::Available`, devuelve el `producer_service_socket`.
fn discover_via_broker() -> Result<PathBuf, ConsumerError> {
let card = build_consumer_card("nouser-explorer", FLOW_MONAD_LIST, FLOW_TYPE_NAME);
let card = build_consumer_card("akasha-explorer", FLOW_MONAD_LIST, FLOW_TYPE_NAME);
await_provider_blocking(card, DISCOVERY_TIMEOUT)
}
@@ -184,7 +184,7 @@ impl Render for Explorer {
fn render(&mut self, _w: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
// Chrome viene del Theme global; los acentos por kind
// (engine cyan, data purple) son señales semánticas del
// dominio nouser y se mantienen locales.
// dominio akasha y se mantienen locales.
let theme = Theme::global(cx).clone();
let bg = theme.bg_app.clone();
let text = theme.fg_text;
@@ -205,7 +205,7 @@ impl Render for Explorer {
.map(|w| format!(" · watching: {}", w))
.unwrap_or_default()
),
_ => "Buscando daemon nouser vía brahman-broker…".to_string(),
_ => "Buscando daemon akasha vía brahman-broker…".to_string(),
};
// Header standard via widget compartido.
@@ -6,16 +6,16 @@ license.workspace = true
description = "Probe GUI del broker brahman: conecta cada N segundos vía await_provider_blocking con un Card observer agnóstico, reporta 3 estados (down / up sin provider / up con provider)."
[dependencies]
brahman-broker = { path = "../../core/brahman-broker" }
brahman-card = { path = "../../core/brahman-card" }
brahman-handshake = { path = "../../core/brahman-handshake" }
brahman-sidecar = { path = "../../shared/brahman-sidecar" }
brahman-broker = { path = "../../protocol/brahman-broker" }
brahman-card = { path = "../../protocol/brahman-card" }
brahman-handshake = { path = "../../protocol/brahman-handshake" }
brahman-sidecar = { path = "../../protocol/brahman-sidecar" }
ulid = { workspace = true }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
yahweh-launcher = { path = "../../modules/ui_engine/libs/launcher" }
yahweh-widget-banner = { path = "../../modules/ui_engine/widgets/banner" }
yahweh-widget-stat-card = { path = "../../modules/ui_engine/widgets/stat-card" }
yahweh-widget-app-header = { path = "../../modules/ui_engine/widgets/app-header" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
nahual-launcher = { path = "../../modules/nahual/libs/launcher" }
nahual-widget-banner = { path = "../../modules/nahual/widgets/banner" }
nahual-widget-stat-card = { path = "../../modules/nahual/widgets/stat-card" }
nahual-widget-app-header = { path = "../../modules/nahual/widgets/app-header" }
gpui = { workspace = true }
[[bin]]
@@ -38,11 +38,11 @@ use ulid::Ulid;
use gpui::{
div, prelude::*, px, Context, IntoElement, Render, SharedString, Window,
};
use yahweh_launcher::launch_app;
use yahweh_theme::Theme;
use yahweh_widget_app_header::app_header;
use yahweh_widget_banner::{banner_themed, Banner};
use yahweh_widget_stat_card::stat_card;
use nahual_launcher::launch_app;
use nahual_theme::Theme;
use nahual_widget_app_header::app_header;
use nahual_widget_banner::{banner_themed, Banner};
use nahual_widget_stat_card::stat_card;
const POLL_INTERVAL: Duration = Duration::from_secs(5);
const PROBE_TIMEOUT: Duration = Duration::from_secs(1);
+4 -4
View File
@@ -6,10 +6,10 @@ license.workspace = true
description = "Demo binaries de brahman: broker standalone + producer/consumer dummy. Pensados para que `scripts/bootstrap-demo.sh` arranque un escenario reproducible donde los 5 explorers ven sesiones, matches, y timeline."
[dependencies]
brahman-broker = { path = "../../core/brahman-broker" }
brahman-card = { path = "../../core/brahman-card" }
brahman-handshake = { path = "../../core/brahman-handshake" }
brahman-sidecar = { path = "../../shared/brahman-sidecar" }
brahman-broker = { path = "../../protocol/brahman-broker" }
brahman-card = { path = "../../protocol/brahman-card" }
brahman-handshake = { path = "../../protocol/brahman-handshake" }
brahman-sidecar = { path = "../../protocol/brahman-sidecar" }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
+6 -6
View File
@@ -15,13 +15,13 @@ cosmobiologia-panel = { path = "../../modules/cosmobiologia/cosmobiologia-panel"
cosmobiologia-store = { path = "../../modules/cosmobiologia/cosmobiologia-store" }
cosmobiologia-theme = { path = "../../modules/cosmobiologia/cosmobiologia-theme" }
cosmobiologia-tree = { path = "../../modules/cosmobiologia/cosmobiologia-tree" }
brahman-sidecar = { path = "../../shared/brahman-sidecar" }
brahman-sidecar = { path = "../../protocol/brahman-sidecar" }
yahweh-core = { workspace = true }
yahweh-theme = { workspace = true }
yahweh-widget-theme-switcher = { path = "../../modules/ui_engine/widgets/theme-switcher" }
yahweh-widget-splitter = { workspace = true }
yahweh-widget-container-core = { workspace = true }
nahual-core = { workspace = true }
nahual-theme = { workspace = true }
nahual-widget-theme-switcher = { path = "../../modules/nahual/widgets/theme-switcher" }
nahual-widget-splitter = { workspace = true }
nahual-widget-container-core = { workspace = true }
gpui = { workspace = true }
directories = { workspace = true }
serde_json = { workspace = true }
+2 -2
View File
@@ -5,7 +5,7 @@
//! (fire-and-forget; si no hay Init, la app sigue standalone).
//! 2. Abre la DB SQLite en `$XDG_DATA_HOME/cosmobiologia/charts.db`
//! (fallback a `~/.local/share/cosmobiologia/charts.db`).
//! 3. Levanta GPUI con [`yahweh_theme::Theme::install_default`].
//! 3. Levanta GPUI con [`nahual_theme::Theme::install_default`].
//! 4. Compone el shell: [`Shell`] dueño del tree (izq), canvas (centro)
//! y panel (abajo). Cablea las suscripciones cross-widget.
//!
@@ -34,7 +34,7 @@ use gpui::{
};
use cosmobiologia_store::Store;
use yahweh_theme::Theme;
use nahual_theme::Theme;
use crate::shell::Shell;
+6 -6
View File
@@ -44,11 +44,11 @@ use cosmobiologia_store::Store;
use cosmobiologia_tree::{
parse_city_atlas_tsv, FreeChartEntry, TahuantinsuyuTree, TreeEvent,
};
use yahweh_core::{LayoutDirection, NodeId};
use yahweh_theme::Theme;
use yahweh_widget_container_core::ChildSlot;
use yahweh_widget_splitter::{SplitContainer, SplitEvent};
use yahweh_widget_theme_switcher::theme_switcher;
use nahual_core::{LayoutDirection, NodeId};
use nahual_theme::Theme;
use nahual_widget_container_core::ChildSlot;
use nahual_widget_splitter::{SplitContainer, SplitEvent};
use nahual_widget_theme_switcher::theme_switcher;
/// Posición del panel de control dentro del shell. `Bottom` mantiene
/// el layout histórico (tree+canvas arriba, panel abajo); las variantes
@@ -1671,7 +1671,7 @@ impl Shell {
/// Click llama a `apply_dock` que reorganiza splitters y persiste.
fn render_dock_switcher(
&self,
theme: &yahweh_theme::Theme,
theme: &nahual_theme::Theme,
cx: &mut Context<Self>,
) -> impl IntoElement {
let mut row = div()
-16
View File
@@ -1,16 +0,0 @@
[package]
name = "lapaloma-demo"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
publish = { workspace = true }
description = "Lapaloma — demo app: una serie sin(x) sobre ChartViewport rendereada con LapalomaChartElement. Valida la cadena core → render → cartesian → gpui en vivo."
[dependencies]
gpui = { workspace = true }
yahweh-launcher = { path = "../../modules/ui_engine/libs/launcher" }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
lapaloma-core = { path = "../../modules/ui_engine/libs/lapaloma-core" }
lapaloma-render = { path = "../../modules/ui_engine/widgets/lapaloma-render", features = ["gpui"] }
lapaloma-cartesian = { path = "../../modules/ui_engine/widgets/lapaloma-cartesian" }
@@ -1,16 +0,0 @@
[package]
name = "lapaloma-financial-demo"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
publish = { workspace = true }
description = "Lapaloma — demo de candlesticks OHLC. Random walk sintético de 120 días con pan + zoom."
[dependencies]
gpui = { workspace = true }
yahweh-launcher = { path = "../../modules/ui_engine/libs/launcher" }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
lapaloma-render = { path = "../../modules/ui_engine/widgets/lapaloma-render", features = ["gpui"] }
lapaloma-cartesian = { path = "../../modules/ui_engine/widgets/lapaloma-cartesian" }
lapaloma-financial = { path = "../../modules/ui_engine/widgets/lapaloma-financial" }
@@ -1,16 +0,0 @@
[package]
name = "lapaloma-phosphor-demo"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
publish = { workspace = true }
description = "Lapaloma — demo del trail CRT (phosphor) sobre un RingBuffer streaming a 60Hz. Compará con lapaloma-stream-demo para ver el contraste."
[dependencies]
gpui = { workspace = true }
yahweh-launcher = { path = "../../modules/ui_engine/libs/launcher" }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
lapaloma-core = { path = "../../modules/ui_engine/libs/lapaloma-core" }
lapaloma-render = { path = "../../modules/ui_engine/widgets/lapaloma-render", features = ["gpui"] }
lapaloma-phosphor = { path = "../../modules/ui_engine/widgets/lapaloma-phosphor" }
@@ -1,16 +0,0 @@
[package]
name = "lapaloma-stream-demo"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
publish = { workspace = true }
description = "Lapaloma — demo de streaming: RingBuffer + timer 60 Hz + sweep render. Showcase del zero-alloc en hot path."
[dependencies]
gpui = { workspace = true }
yahweh-launcher = { path = "../../modules/ui_engine/libs/launcher" }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
lapaloma-core = { path = "../../modules/ui_engine/libs/lapaloma-core" }
lapaloma-render = { path = "../../modules/ui_engine/widgets/lapaloma-render", features = ["gpui"] }
lapaloma-stream = { path = "../../modules/ui_engine/widgets/lapaloma-stream" }
+5 -5
View File
@@ -7,11 +7,11 @@ description = "Dashboard GPUI del repo Minga: counts de nodos AST, atestaciones,
[dependencies]
minga-store = { path = "../../modules/semantic_dht/minga-store" }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
yahweh-launcher = { path = "../../modules/ui_engine/libs/launcher" }
yahweh-widget-banner = { path = "../../modules/ui_engine/widgets/banner" }
yahweh-widget-stat-card = { path = "../../modules/ui_engine/widgets/stat-card" }
yahweh-widget-app-header = { path = "../../modules/ui_engine/widgets/app-header" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
nahual-launcher = { path = "../../modules/nahual/libs/launcher" }
nahual-widget-banner = { path = "../../modules/nahual/widgets/banner" }
nahual-widget-stat-card = { path = "../../modules/nahual/widgets/stat-card" }
nahual-widget-app-header = { path = "../../modules/nahual/widgets/app-header" }
gpui = { workspace = true }
[[bin]]
+8 -8
View File
@@ -12,9 +12,9 @@
//! (`minga status`) cuando hace falta el DID. El explorer foco es
//! observabilidad rápida.
//!
//! Stack visual: yahweh-theme + banner_themed + card_themed +
//! Stack visual: nahual-theme + banner_themed + card_themed +
//! theme_switcher. Mismo patrón que `nakui-explorer` /
//! `nouser-explorer`.
//! `akasha-explorer`.
//!
//! Uso:
//! ```sh
@@ -30,11 +30,11 @@ use gpui::{
div, prelude::*, px, Context, IntoElement, Render, SharedString, Window,
};
use minga_store::PersistentRepo;
use yahweh_launcher::launch_app;
use yahweh_theme::Theme;
use yahweh_widget_app_header::app_header;
use yahweh_widget_banner::{banner_themed, Banner};
use yahweh_widget_stat_card::stat_card;
use nahual_launcher::launch_app;
use nahual_theme::Theme;
use nahual_widget_app_header::app_header;
use nahual_widget_banner::{banner_themed, Banner};
use nahual_widget_stat_card::stat_card;
const REFRESH_INTERVAL: Duration = Duration::from_secs(2);
const REPO_DIRNAME: &str = "repo";
@@ -288,7 +288,7 @@ impl Render for Explorer {
}
}
// `stat_card` se promovió a `yahweh-widget-stat-card` y se importa
// `stat_card` se promovió a `nahual-widget-stat-card` y se importa
// arriba. La fn local fue eliminada en la iter 15 del refactor.
#[cfg(test)]
@@ -1,5 +1,5 @@
[package]
name = "yahweh-database-explorer"
name = "nahual-database-explorer"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
@@ -7,7 +7,7 @@ description = "Explorer de SQLite — composición TreeView + SqliteProvider con
[dependencies]
gpui = { workspace = true }
yahweh-core = { workspace = true }
yahweh-theme = { workspace = true }
yahweh-widget-tree = { workspace = true }
yahweh-provider-sqlite = { workspace = true }
nahual-core = { workspace = true }
nahual-theme = { workspace = true }
nahual-widget-tree = { workspace = true }
nahual-provider-sqlite = { workspace = true }
@@ -1,6 +1,6 @@
//! `yahweh_database_explorer` — explorer de SQLite.
//! `nahual_database_explorer` — explorer de SQLite.
//!
//! Mismo patrón que `yahweh_file_explorer` pero con `SqliteProvider`. La
//! Mismo patrón que `nahual_file_explorer` pero con `SqliteProvider`. La
//! UX es idéntica (TreeView con lazy load por chevron); cambia solo el
//! origen de los datos: filas de una tabla `items(id, parent_id, name,
//! display_type, content)` en lugar del filesystem.
@@ -13,10 +13,10 @@ use gpui::{
px,
};
use yahweh_core::{DataProvider, DisplayType, EntityNode};
use yahweh_provider_sqlite::SqliteDataProvider;
use yahweh_theme::Theme;
use yahweh_widget_tree::{RowId, RowKind, TreeEvent, TreeRow, TreeView};
use nahual_core::{DataProvider, DisplayType, EntityNode};
use nahual_provider_sqlite::SqliteDataProvider;
use nahual_theme::Theme;
use nahual_widget_tree::{RowId, RowKind, TreeEvent, TreeRow, TreeView};
#[derive(Clone, Debug)]
#[allow(dead_code)] // Consumido por el AppBus en Fase 4+.
@@ -1,5 +1,5 @@
[package]
name = "yahweh-file-explorer"
name = "nahual-file-explorer"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
@@ -7,8 +7,8 @@ description = "Explorer de filesystem — composición TreeView + FsProvider con
[dependencies]
gpui = { workspace = true }
yahweh-core = { workspace = true }
yahweh-theme = { workspace = true }
yahweh-widget-tree = { workspace = true }
yahweh-widget-text-input = { workspace = true }
yahweh-provider-fs = { workspace = true }
nahual-core = { workspace = true }
nahual-theme = { workspace = true }
nahual-widget-tree = { workspace = true }
nahual-widget-text-input = { workspace = true }
nahual-provider-fs = { workspace = true }
@@ -1,4 +1,4 @@
//! `yahweh_file_explorer` — explorer de filesystem con menú contextual.
//! `nahual_file_explorer` — explorer de filesystem con menú contextual.
//!
//! Composición canónica del patrón "explorer = TreeView + provider":
//!
@@ -42,11 +42,11 @@ use gpui::{
PromptLevel, Render, SharedString, Window, div, prelude::*, px,
};
use yahweh_core::{DataProvider, DisplayType, EntityNode};
use yahweh_provider_fs::FileDataProvider;
use yahweh_theme::Theme;
use yahweh_widget_text_input::{TextInput, TextInputEvent};
use yahweh_widget_tree::{RowId, RowKind, TreeEvent, TreeRow, TreeView};
use nahual_core::{DataProvider, DisplayType, EntityNode};
use nahual_provider_fs::FileDataProvider;
use nahual_theme::Theme;
use nahual_widget_text_input::{TextInput, TextInputEvent};
use nahual_widget_tree::{RowId, RowKind, TreeEvent, TreeRow, TreeView};
#[derive(Clone, Debug)]
#[allow(dead_code)]
@@ -1,5 +1,5 @@
[package]
name = "yahweh-image-viewer"
name = "nahual-image-viewer"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
@@ -7,5 +7,5 @@ description = "Visor de imágenes. Suscribe al AppBus y renderea con gpui::img(p
[dependencies]
gpui = { workspace = true }
yahweh-bus = { workspace = true }
yahweh-theme = { workspace = true }
nahual-bus = { workspace = true }
nahual-theme = { workspace = true }
@@ -1,4 +1,4 @@
//! `yahweh_image_viewer` — visor de imágenes.
//! `nahual_image_viewer` — visor de imágenes.
//!
//! Suscribe al `AppBus` y, en cada `EntitySelected` cuyo provider sea
//! `local_fs` y la extensión sugiera imagen (jpg, png, webp, gif), pasa el
@@ -17,8 +17,8 @@ use gpui::{
Context, Entity, IntoElement, Render, SharedString, Window, div, img, prelude::*, px,
};
use yahweh_bus::{AppBus, AppEvent};
use yahweh_theme::Theme;
use nahual_bus::{AppBus, AppEvent};
use nahual_theme::Theme;
const FS_PROVIDER: &str = "local_fs";
+36
View File
@@ -0,0 +1,36 @@
[package]
name = "nahual-shell"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Bootstrap GPUI + LayoutHost de Yahweh."
[dependencies]
nahual-core = { workspace = true }
nahual-theme = { workspace = true }
nahual-provider-fs = { workspace = true }
nahual-provider-sqlite = { workspace = true }
nahual-widget-tree = { workspace = true }
nahual-widget-container-core = { workspace = true }
nahual-widget-splitter = { workspace = true }
nahual-widget-tabs = { workspace = true }
nahual-widget-tiled = { workspace = true }
nahual-bus = { workspace = true }
nahual-file-explorer = { workspace = true }
nahual-database-explorer = { workspace = true }
nahual-text-viewer = { workspace = true }
nahual-image-viewer = { workspace = true }
gpui = { workspace = true }
tokio = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
notify = { workspace = true }
# Brahman protocol — sidecar thread que se presenta al Init.
brahman-card = { path = "../../protocol/brahman-card" }
brahman-sidecar = { path = "../../protocol/brahman-sidecar" }
ulid = { workspace = true }
[[bin]]
name = "nahual"
path = "src/main.rs"
@@ -1,7 +1,7 @@
//! Card de yahweh-shell + spawn del sidecar brahman compartido.
//! 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 yahweh como módulo Widget.
//! aquí sólo declaramos la identidad de nahual como módulo Widget.
use std::collections::BTreeSet;
@@ -11,7 +11,7 @@ use brahman_card::{
};
use ulid::Ulid;
/// Spawn del sidecar con la Card de yahweh.
/// Spawn del sidecar con la Card de nahual.
pub fn spawn() {
brahman_sidecar::spawn(build_card());
}
@@ -26,7 +26,7 @@ use std::time::Duration;
use gpui::{App, AsyncApp, Entity};
use notify::{RecommendedWatcher, RecursiveMode, Watcher};
use yahweh_core::LayerConfig;
use nahual_core::LayerConfig;
use crate::layout_model::LayoutModel;
@@ -26,16 +26,16 @@ use gpui::{
AnyView, Context, Entity, IntoElement, Render, SharedString, Window, div, prelude::*,
};
use yahweh_bus::{AppBus, AppEvent};
use yahweh_core::{LayerConfig, LayoutDirection, NodeId};
use yahweh_database_explorer::{DatabaseExplorer, DatabaseExplorerEvent};
use yahweh_file_explorer::{FileExplorer, FileExplorerEvent};
use yahweh_image_viewer::ImageViewer;
use yahweh_text_viewer::TextViewer;
use yahweh_widget_container_core::ChildSlot;
use yahweh_widget_splitter::{SplitContainer, SplitEvent};
use yahweh_widget_tabs::TabContainer;
use yahweh_widget_tiled::{TiledContainer, TiledEvent};
use nahual_bus::{AppBus, AppEvent};
use nahual_core::{LayerConfig, LayoutDirection, NodeId};
use nahual_database_explorer::{DatabaseExplorer, DatabaseExplorerEvent};
use nahual_file_explorer::{FileExplorer, FileExplorerEvent};
use nahual_image_viewer::ImageViewer;
use nahual_text_viewer::TextViewer;
use nahual_widget_container_core::ChildSlot;
use nahual_widget_splitter::{SplitContainer, SplitEvent};
use nahual_widget_tabs::TabContainer;
use nahual_widget_tiled::{TiledContainer, TiledEvent};
use crate::layout_model::{LayoutModel, LayoutModelEvent};
use crate::managed_tree::ManagedTree;
@@ -392,11 +392,11 @@ impl LayoutHost {
cfg: &LayerConfig,
cx: &mut Context<Self>,
) -> AnyView {
// Param `path` define el .sqlite. Default: "yahweh.db" en cwd.
// Param `path` define el .sqlite. Default: "nahual.db" en cwd.
let path = cfg
.get_param("path")
.cloned()
.unwrap_or_else(|| "yahweh.db".to_string());
.unwrap_or_else(|| "nahual.db".to_string());
let entity = match self.nodes.get(&id) {
Some(NodeSlot::DatabaseExplorer(e)) => e.clone(),
@@ -544,7 +544,7 @@ pub struct PlaceholderView {
impl PlaceholderView {
pub fn new(kind: String, cx: &mut Context<Self>) -> Self {
cx.observe_global::<yahweh_theme::Theme>(|_, cx| cx.notify())
cx.observe_global::<nahual_theme::Theme>(|_, cx| cx.notify())
.detach();
Self { kind }
}
@@ -552,7 +552,7 @@ impl PlaceholderView {
impl Render for PlaceholderView {
fn render(&mut self, _w: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let theme = yahweh_theme::Theme::global(cx).clone();
let theme = nahual_theme::Theme::global(cx).clone();
div()
.size_full()
.bg(theme.bg_panel.clone())
@@ -18,7 +18,7 @@
use gpui::{Context, EventEmitter};
use yahweh_core::{LayerConfig, NodeId};
use nahual_core::{LayerConfig, NodeId};
#[derive(Clone, Debug)]
pub enum LayoutModelEvent {
@@ -16,9 +16,9 @@ mod status_panel;
use gpui::{App, Application, Bounds, WindowBounds, WindowOptions, prelude::*, px, size};
use yahweh_bus::AppBus;
use yahweh_core::LayerConfig;
use yahweh_theme::Theme;
use nahual_bus::AppBus;
use nahual_core::LayerConfig;
use nahual_theme::Theme;
use crate::layout_host::LayoutHost;
use crate::layout_model::LayoutModel;
@@ -27,7 +27,7 @@ use crate::persister::Persister;
const LAYOUT_PATH: &str = "layout.json";
fn main() {
// Sidecar brahman: yahweh se presenta al Init antes de levantar GPUI.
// Sidecar brahman: nahual se presenta al Init antes de levantar GPUI.
// No bloquea: si el Init no está, el thread loggea y termina.
brahman_client::spawn();
@@ -16,7 +16,7 @@ use gpui::{
Context, Entity, EventEmitter, IntoElement, Render, SharedString, Window, div, prelude::*,
};
use yahweh_widget_tree::{RowId, RowKind, TreeEvent, TreeRow, TreeView};
use nahual_widget_tree::{RowId, RowKind, TreeEvent, TreeRow, TreeView};
// =====================================================================
// Datasets stub (Fase 3). En Fase 4 los reemplazan los providers reales.
@@ -57,7 +57,7 @@ pub fn dataset_for(key: &str) -> DemoNode {
fn yahweh_sources_tree() -> DemoNode {
DemoNode::branch(
"src-root",
"yahweh (src)",
"nahual (src)",
vec![
DemoNode::branch(
"shell",
@@ -30,7 +30,7 @@ impl Persister {
Self { path }
}
fn write(&self, tree: &yahweh_core::LayerConfig) {
fn write(&self, tree: &nahual_core::LayerConfig) {
let json = tree.serialize_json();
// Anti-loop: si el contenido en disco ya coincide, skip. Esto
// matters cuando el watcher está corriendo: persister write →
@@ -13,8 +13,8 @@ use gpui::{
ClickEvent, Context, Entity, IntoElement, Render, SharedString, Window, div, prelude::*, px,
};
use yahweh_core::{LayerConfig, NodeId};
use yahweh_theme::Theme;
use nahual_core::{LayerConfig, NodeId};
use nahual_theme::Theme;
use crate::layout_model::LayoutModel;
@@ -107,7 +107,7 @@ impl StatusPanel {
}
}
fn find_kind(node: &yahweh_core::LayerConfig, target: &str) -> Option<String> {
fn find_kind(node: &nahual_core::LayerConfig, target: &str) -> Option<String> {
if let Some(id) = &node.id {
if id == target {
return Some(node.kind.clone());
@@ -1,5 +1,5 @@
[package]
name = "yahweh-text-viewer"
name = "nahual-text-viewer"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
@@ -7,8 +7,8 @@ description = "Visor de texto plano. Suscribe al AppBus y carga contenido async.
[dependencies]
gpui = { workspace = true }
yahweh-core = { workspace = true }
yahweh-theme = { workspace = true }
yahweh-bus = { workspace = true }
yahweh-provider-fs = { workspace = true }
yahweh-provider-sqlite = { workspace = true }
nahual-core = { workspace = true }
nahual-theme = { workspace = true }
nahual-bus = { workspace = true }
nahual-provider-fs = { workspace = true }
nahual-provider-sqlite = { workspace = true }
@@ -1,4 +1,4 @@
//! `yahweh_text_viewer` — visor de texto plano.
//! `nahual_text_viewer` — visor de texto plano.
//!
//! Suscribe al `AppBus` y, en cada `EntitySelected` / `EntityOpened`,
//! decide si el `provider` corresponde a uno que sabe leer (por ahora
@@ -17,11 +17,11 @@ use gpui::{
Context, Entity, IntoElement, Render, SharedString, Window, div, prelude::*, px,
};
use yahweh_bus::{AppBus, AppEvent};
use yahweh_core::DataProvider;
use yahweh_provider_fs::{FileDataProvider, PROVIDER_ID as FS_PROVIDER_ID};
use yahweh_provider_sqlite::{PROVIDER_ID as SQL_PROVIDER_ID, SqliteDataProvider};
use yahweh_theme::Theme;
use nahual_bus::{AppBus, AppEvent};
use nahual_core::DataProvider;
use nahual_provider_fs::{FileDataProvider, PROVIDER_ID as FS_PROVIDER_ID};
use nahual_provider_sqlite::{PROVIDER_ID as SQL_PROVIDER_ID, SqliteDataProvider};
use nahual_theme::Theme;
const PREVIEW_HEX_BYTES: usize = 256;
const MAX_TEXT_BYTES: usize = 256 * 1024;
@@ -129,7 +129,7 @@ impl TextViewer {
gen: u64,
cx: &mut Context<Self>,
) {
let db_path = provider_path.unwrap_or_else(|| "yahweh.db".to_string());
let db_path = provider_path.unwrap_or_else(|| "nahual.db".to_string());
cx.spawn(async move |this, cx| {
// El SqliteDataProvider abre la DB en su constructor — si
// falla, reportamos error y salimos.
+6 -6
View File
@@ -7,12 +7,12 @@ description = "Explorador GPUI del event log de Nakui: timeline de seeds + morph
[dependencies]
nakui-core = { path = "../../modules/nakui/core" }
yahweh-meta-runtime = { path = "../../modules/ui_engine/libs/meta-runtime" }
yahweh-widget-banner = { path = "../../modules/ui_engine/widgets/banner" }
yahweh-widget-card = { path = "../../modules/ui_engine/widgets/card" }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
yahweh-launcher = { path = "../../modules/ui_engine/libs/launcher" }
yahweh-widget-app-header = { path = "../../modules/ui_engine/widgets/app-header" }
nahual-meta-runtime = { path = "../../modules/nahual/libs/meta-runtime" }
nahual-widget-banner = { path = "../../modules/nahual/widgets/banner" }
nahual-widget-card = { path = "../../modules/nahual/widgets/card" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
nahual-launcher = { path = "../../modules/nahual/libs/launcher" }
nahual-widget-app-header = { path = "../../modules/nahual/widgets/app-header" }
gpui = { workspace = true }
serde_json = { workspace = true }
uuid = { workspace = true, features = ["serde"] }
+10 -10
View File
@@ -10,7 +10,7 @@
//! producción que va escribiendo). Sin discovery dinámico vía broker
//! brahman porque nakui hoy es CLI/library/demos, no daemon — cuando
//! se daemonice, sustituir el lector de archivo por un sidecar
//! consumer (mismo patrón que `nouser-explorer`).
//! consumer (mismo patrón que `akasha-explorer`).
//!
//! ## Uso
//!
@@ -29,12 +29,12 @@ use gpui::{
div, prelude::*, px, rgb, Context, IntoElement, Render, SharedString, Window,
};
use nakui_core::event_log::{EventLog, LogEntry};
use yahweh_launcher::launch_app;
use yahweh_meta_runtime::{preview_value, short_hash, short_uuid};
use yahweh_theme::Theme;
use yahweh_widget_app_header::app_header;
use yahweh_widget_banner::{banner_themed, Banner};
use yahweh_widget_card::card_themed;
use nahual_launcher::launch_app;
use nahual_meta_runtime::{preview_value, short_hash, short_uuid};
use nahual_theme::Theme;
use nahual_widget_app_header::app_header;
use nahual_widget_banner::{banner_themed, Banner};
use nahual_widget_card::card_themed;
const REFRESH_INTERVAL: Duration = Duration::from_secs(2);
@@ -149,7 +149,7 @@ impl Render for Explorer {
self.last_load_ms,
);
// Header standard via widget compartido yahweh-widget-app-header
// Header standard via widget compartido nahual-widget-app-header
// (label flex_grow + theme switcher derecha + bg panel + border
// bottom + text styling consistente).
let header = app_header(cx, header_text);
@@ -351,7 +351,7 @@ impl Render for Explorer {
}
// Helpers `short_uuid`, `short_hash`, `preview_value` viven en
// `yahweh_meta_runtime::format`. Se usan acá via el `use` de arriba.
// `nahual_meta_runtime::format`. Se usan acá via el `use` de arriba.
#[cfg(test)]
mod tests {
@@ -418,7 +418,7 @@ mod tests {
}
// Tests de `short_uuid` / `short_hash` / `preview_value` viven
// en `yahweh-meta-runtime::format` tras la migración. Si esos se
// en `nahual-meta-runtime::format` tras la migración. Si esos se
// vuelven a romper, los tests específicos del crate runtime los
// capturan; acá no duplicamos.
}
+6 -6
View File
@@ -7,12 +7,12 @@ description = "Nakui — runtime GPUI de la metainterfaz: carga module.json desd
[dependencies]
nakui-core = { path = "../../modules/nakui/core" }
yahweh-meta-schema = { path = "../../modules/ui_engine/libs/meta-schema" }
yahweh-meta-runtime = { path = "../../modules/ui_engine/libs/meta-runtime" }
brahman-cards = { path = "../../core/brahman-cards" }
yahweh-widget-text-input = { path = "../../modules/ui_engine/widgets/text_input" }
yahweh-widget-meta-form = { path = "../../modules/ui_engine/widgets/meta-form" }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
nahual-meta-schema = { path = "../../modules/nahual/libs/meta-schema" }
nahual-meta-runtime = { path = "../../modules/nahual/libs/meta-runtime" }
brahman-cards = { path = "../../protocol/brahman-cards" }
nahual-widget-text-input = { path = "../../modules/nahual/widgets/text_input" }
nahual-widget-meta-form = { path = "../../modules/nahual/widgets/meta-form" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
gpui = { workspace = true }
serde_json = { workspace = true }
uuid = { workspace = true, features = ["serde"] }
+1 -1
View File
@@ -18,7 +18,7 @@ use nakui_core::event_log::{
};
use nakui_core::executor::Executor;
use nakui_core::store::{MemoryStore, Store};
use yahweh_meta_runtime::{MetaBackend, WriteOutcome};
use nahual_meta_runtime::{MetaBackend, WriteOutcome};
/// Path del snapshot sibling del log:
/// `nakui-ui-state.jsonl` ↔ `nakui-ui-state.snap.json`.
+6 -6
View File
@@ -1,7 +1,7 @@
//! `nakui-ui` — binario shell de la metainterfaz Nakui.
//!
//! Compone:
//! - **Yahweh widget** [`yahweh_widget_meta_form::MetaApp`] genérico
//! - **Yahweh widget** [`nahual_widget_meta_form::MetaApp`] genérico
//! sobre cualquier `MetaBackend` — toda la lógica de
//! render/edit/delete/morphism vive ahí.
//! - **Backend** [`backend::NakuiBackend`] — implementa el trait
@@ -31,9 +31,9 @@ use gpui::{
use brahman_cards::CardBody;
use nakui_core::executor::Executor;
use yahweh_meta_schema::Module;
use yahweh_theme::Theme;
use yahweh_widget_meta_form::MetaApp;
use nahual_meta_schema::Module;
use nahual_theme::Theme;
use nahual_widget_meta_form::MetaApp;
use crate::backend::NakuiBackend;
@@ -190,8 +190,8 @@ fn load_ui_modules(
mod tests {
//! Tests del shell. Los tests del backend impl viven en
//! `backend.rs`. Los tests del widget viven en
//! `yahweh-widget-meta-form`. Los helpers puros en
//! `yahweh-meta-runtime`.
//! `nahual-widget-meta-form`. Los helpers puros en
//! `nahual-meta-runtime`.
use super::*;
use serde_json::json;
-21
View File
@@ -1,21 +0,0 @@
[package]
name = "nouser-explorer"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Explorador GPUI de Mónadas: panel que descubre al daemon nouser vía broker brahman y consulta sus Mónadas dinámicamente."
[dependencies]
brahman-card = { path = "../../core/brahman-card" }
brahman-sidecar = { path = "../../shared/brahman-sidecar" }
nouser-card = { path = "../../modules/nouser/card" }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
yahweh-launcher = { path = "../../modules/ui_engine/libs/launcher" }
yahweh-widget-banner = { path = "../../modules/ui_engine/widgets/banner" }
yahweh-widget-card = { path = "../../modules/ui_engine/widgets/card" }
yahweh-widget-app-header = { path = "../../modules/ui_engine/widgets/app-header" }
gpui = { workspace = true }
[[bin]]
name = "nouser-explorer"
path = "src/main.rs"
+16
View File
@@ -0,0 +1,16 @@
[package]
name = "pineal-demo"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
publish = { workspace = true }
description = "Lapaloma — demo app: una serie sin(x) sobre ChartViewport rendereada con LapalomaChartElement. Valida la cadena core → render → cartesian → gpui en vivo."
[dependencies]
gpui = { workspace = true }
nahual-launcher = { path = "../../modules/nahual/libs/launcher" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
pineal-core = { path = "../../modules/pineal/core" }
pineal-render = { path = "../../modules/pineal/render", features = ["gpui"] }
pineal-cartesian = { path = "../../modules/pineal/cartesian" }
@@ -1,4 +1,4 @@
//! `lapaloma-demo` — demo visual de Lapaloma sobre yahweh.
//! `pineal-demo` — demo visual de Lapaloma sobre nahual.
//!
//! Ventana 900×560 con un chart cartesiano de **3 series**
//! simultáneas sobre 1024 muestras:
@@ -14,11 +14,11 @@ use gpui::{
MouseMoveEvent, MouseUpEvent, Point, Render, ScrollDelta, ScrollWheelEvent, Window,
};
use lapaloma_cartesian::{chart_cache, ChartCacheHandle, ChartViewport, LapalomaChartElement};
use lapaloma_core::buffer::DataBuffer;
use lapaloma_render::{Color, StrokeStyle};
use yahweh_launcher::launch_app;
use yahweh_theme::Theme;
use pineal_cartesian::{chart_cache, ChartCacheHandle, ChartViewport, LapalomaChartElement};
use pineal_core::buffer::DataBuffer;
use pineal_render::{Color, StrokeStyle};
use nahual_launcher::launch_app;
use nahual_theme::Theme;
const N_SAMPLES: usize = 1024;
const WHEEL_SENSITIVITY: f64 = 0.0015;
@@ -134,7 +134,7 @@ impl Demo {
}
}
/// Color helper para usar el mismo hex tanto en `lapaloma_render`
/// Color helper para usar el mismo hex tanto en `pineal_render`
/// como en el body de texto del header del demo.
const COLOR_SIN: u32 = 0x88c0d0; // azul nórdico
const COLOR_COS: u32 = 0xd08770; // naranja
@@ -171,7 +171,7 @@ impl Render for Demo {
};
div()
.id("lapaloma-demo-root")
.id("pineal-demo-root")
.size_full()
.bg(theme.bg_app.clone())
.p(px(16.))
@@ -217,7 +217,7 @@ impl Render for Demo {
)
.child(
div()
.id("lapaloma-chart-host")
.id("pineal-chart-host")
.w_full()
.flex_grow()
.child(chart)
@@ -0,0 +1,16 @@
[package]
name = "pineal-financial-demo"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
publish = { workspace = true }
description = "Lapaloma — demo de candlesticks OHLC. Random walk sintético de 120 días con pan + zoom."
[dependencies]
gpui = { workspace = true }
nahual-launcher = { path = "../../modules/nahual/libs/launcher" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
pineal-render = { path = "../../modules/pineal/render", features = ["gpui"] }
pineal-cartesian = { path = "../../modules/pineal/cartesian" }
pineal-financial = { path = "../../modules/pineal/financial" }
@@ -1,4 +1,4 @@
//! `lapaloma-financial-demo` — chart OHLC con random walk.
//! `pineal-financial-demo` — chart OHLC con random walk.
//!
//! Genera 120 "días" de bars con un random walk determinístico
//! (sin RNG runtime — derivado de un seed fijo + xorshift32 inline)
@@ -10,13 +10,13 @@ use gpui::{
MouseMoveEvent, MouseUpEvent, Point, Render, ScrollDelta, ScrollWheelEvent, Window,
};
use lapaloma_cartesian::ChartViewport;
use lapaloma_financial::{
use pineal_cartesian::ChartViewport;
use pineal_financial::{
lapaloma_candlestick, Bar, CandlestickStyle, OhlcBuffer,
};
use lapaloma_render::Color;
use yahweh_launcher::launch_app;
use yahweh_theme::Theme;
use pineal_render::Color;
use nahual_launcher::launch_app;
use nahual_theme::Theme;
const N_BARS: usize = 120;
const WHEEL_SENSITIVITY: f64 = 0.0015;
@@ -140,7 +140,7 @@ impl Render for FinancialDemo {
let drag_active = self.drag.is_some();
div()
.id("lapaloma-financial-root")
.id("pineal-financial-root")
.size_full()
.bg(theme.bg_app.clone())
.p(px(16.))
@@ -165,7 +165,7 @@ impl Render for FinancialDemo {
)
.child(
div()
.id("lapaloma-financial-chart")
.id("pineal-financial-chart")
.w_full()
.flex_grow()
.child(chart)
@@ -0,0 +1,16 @@
[package]
name = "pineal-phosphor-demo"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
publish = { workspace = true }
description = "Lapaloma — demo del trail CRT (phosphor) sobre un RingBuffer streaming a 60Hz. Compará con lapaloma-stream-demo para ver el contraste."
[dependencies]
gpui = { workspace = true }
nahual-launcher = { path = "../../modules/nahual/libs/launcher" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
pineal-core = { path = "../../modules/pineal/core" }
pineal-render = { path = "../../modules/pineal/render", features = ["gpui"] }
pineal-phosphor = { path = "../../modules/pineal/phosphor" }
@@ -1,6 +1,6 @@
//! `lapaloma-phosphor-demo` — osciloscopio con trail CRT.
//! `pineal-phosphor-demo` — osciloscopio con trail CRT.
//!
//! Igual setup que `lapaloma-stream-demo` (RingBuffer 512 +
//! Igual setup que `pineal-stream-demo` (RingBuffer 512 +
//! timer 60 Hz) pero el render usa `LapalomaPhosphorElement`:
//! el trail decae en alpha del cursor hacia atrás y arrastra un
//! halo (glow). Visualmente queda como un osciloscopio analógico
@@ -13,11 +13,11 @@ use std::time::Duration;
use gpui::{div, prelude::*, px, Context, IntoElement, Render, Window};
use lapaloma_core::ring::RingBuffer;
use lapaloma_phosphor::lapaloma_phosphor;
use lapaloma_render::{Color, StrokeStyle};
use yahweh_launcher::launch_app;
use yahweh_theme::Theme;
use pineal_core::ring::RingBuffer;
use pineal_phosphor::pineal_phosphor;
use pineal_render::{Color, StrokeStyle};
use nahual_launcher::launch_app;
use nahual_theme::Theme;
const RING_CAPACITY: usize = 512;
const SAMPLE_PERIOD: Duration = Duration::from_millis(16);
@@ -80,7 +80,7 @@ impl Render for PhosphorDemo {
let plot_bg = Color::rgba(0.03, 0.05, 0.04, 1.0);
let trace = StrokeStyle::new(1.6, Color::from_hex(0x9bff8c));
let phosphor = lapaloma_phosphor(self.buffer.clone(), trace)
let phosphor = pineal_phosphor(self.buffer.clone(), trace)
.background(plot_bg)
.y_range(-1.2, 1.2)
.trail_segments(24)
+16
View File
@@ -0,0 +1,16 @@
[package]
name = "pineal-stream-demo"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
publish = { workspace = true }
description = "Lapaloma — demo de streaming: RingBuffer + timer 60 Hz + sweep render. Showcase del zero-alloc en hot path."
[dependencies]
gpui = { workspace = true }
nahual-launcher = { path = "../../modules/nahual/libs/launcher" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
pineal-core = { path = "../../modules/pineal/core" }
pineal-render = { path = "../../modules/pineal/render", features = ["gpui"] }
pineal-stream = { path = "../../modules/pineal/stream" }
@@ -1,4 +1,4 @@
//! `lapaloma-stream-demo` — osciloscopio sintético.
//! `pineal-stream-demo` — osciloscopio sintético.
//!
//! Ventana con un `LapalomaStreamElement` montado sobre un
//! `RingBuffer` de 512 slots. Un timer en el background executor
@@ -19,11 +19,11 @@ use std::time::Duration;
use gpui::{div, prelude::*, px, Context, IntoElement, Render, Window};
use lapaloma_core::ring::RingBuffer;
use lapaloma_render::{Color, StrokeStyle};
use lapaloma_stream::lapaloma_stream;
use yahweh_launcher::launch_app;
use yahweh_theme::Theme;
use pineal_core::ring::RingBuffer;
use pineal_render::{Color, StrokeStyle};
use pineal_stream::pineal_stream;
use nahual_launcher::launch_app;
use nahual_theme::Theme;
const RING_CAPACITY: usize = 512;
const SAMPLE_PERIOD: Duration = Duration::from_millis(16);
@@ -89,7 +89,7 @@ impl Render for StreamDemo {
let plot_bg = Color::rgba(0.08, 0.10, 0.13, 1.0);
let stroke = StrokeStyle::new(1.8, Color::from_hex(0xa3be8c));
let stream = lapaloma_stream(self.buffer.clone(), stroke)
let stream = pineal_stream(self.buffer.clone(), stroke)
.background(plot_bg)
.y_range(-1.2, 1.2);
-25
View File
@@ -1,25 +0,0 @@
[package]
name = "shipote-shell"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
publish.workspace = true
description = "GUI de shipote: vista de Workspaces+comandos+capabilities. Conecta al daemon vía shipote-protocol."
[[bin]]
name = "shipote-shell"
path = "src/main.rs"
[dependencies]
shipote-card = { path = "../../modules/shipote/shipote-card" }
shipote-protocol = { path = "../../modules/shipote/shipote-protocol" }
yahweh-theme = { path = "../../modules/ui_engine/libs/theme" }
yahweh-launcher = { path = "../../modules/ui_engine/libs/launcher" }
yahweh-widget-banner = { path = "../../modules/ui_engine/widgets/banner" }
yahweh-widget-stat-card = { path = "../../modules/ui_engine/widgets/stat-card" }
yahweh-widget-app-header = { path = "../../modules/ui_engine/widgets/app-header" }
tokio = { workspace = true }
gpui = { workspace = true }
ulid = { workspace = true }
@@ -1,5 +1,5 @@
[package]
name = "shipote-cli"
name = "shuma-cli"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
@@ -9,13 +9,13 @@ publish.workspace = true
description = "CLI de administración de shipote-daemon."
[[bin]]
name = "shipote"
name = "shuma"
path = "src/main.rs"
[dependencies]
shipote-card = { path = "../../modules/shipote/shipote-card" }
shipote-protocol = { path = "../../modules/shipote/shipote-protocol" }
brahman-card = { path = "../../core/brahman-card" }
shuma-card = { path = "../../modules/shuma/shuma-card" }
shuma-protocol = { path = "../../modules/shuma/shuma-protocol" }
brahman-card = { path = "../../protocol/brahman-card" }
anyhow = { workspace = true }
clap = { workspace = true }
tokio = { workspace = true }
@@ -1,17 +1,17 @@
//! `shipote` — CLI de administración del daemon.
//! `shuma` — CLI de administración del daemon.
use anyhow::{anyhow, Context, Result};
use clap::{Parser, Subcommand};
use shipote_card::{load_pipeline_spec, load_workspace_spec, WorkspaceId};
use shipote_protocol::{default_socket_path, read_frame, write_frame, Request, Response};
use shuma_card::{load_pipeline_spec, load_workspace_spec, WorkspaceId};
use shuma_protocol::{default_socket_path, read_frame, write_frame, Request, Response};
use std::path::PathBuf;
use tokio::net::UnixStream;
use ulid::Ulid;
#[derive(Parser, Debug)]
#[command(name = "shipote", version, about = "Administración de shipote-daemon")]
#[command(name = "shuma", version, about = "Administración de shuma-daemon")]
struct Cli {
/// Path al socket del daemon. Default: $XDG_RUNTIME_DIR/shipote.sock.
/// Path al socket del daemon. Default: $XDG_RUNTIME_DIR/shuma.sock.
#[arg(long, global = true)]
socket: Option<PathBuf>,
@@ -1,5 +1,5 @@
[package]
name = "shipote-daemon"
name = "shuma-daemon"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
@@ -9,17 +9,17 @@ publish.workspace = true
description = "Daemon de shipote: dueño de los Workspaces, expone admin socket para shipote-cli."
[[bin]]
name = "shipote-daemon"
name = "shuma-daemon"
path = "src/main.rs"
[dependencies]
shipote-card = { path = "../../modules/shipote/shipote-card" }
shipote-protocol = { path = "../../modules/shipote/shipote-protocol" }
shipote-discern = { path = "../../modules/shipote/shipote-discern" }
shipote-core = { path = "../../modules/shipote/shipote-core" }
ente-incarnate = { path = "../../shared/ente-incarnate" }
brahman-card = { path = "../../core/brahman-card" }
brahman-sidecar = { path = "../../shared/brahman-sidecar" }
shuma-card = { path = "../../modules/shuma/shuma-card" }
shuma-protocol = { path = "../../modules/shuma/shuma-protocol" }
shuma-discern = { path = "../../modules/shuma/shuma-discern" }
shuma-core = { path = "../../modules/shuma/shuma-core" }
ente-incarnate = { path = "../../init/ente-incarnate" }
brahman-card = { path = "../../protocol/brahman-card" }
brahman-sidecar = { path = "../../protocol/brahman-sidecar" }
anyhow = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
@@ -1,21 +1,21 @@
//! `shipote-daemon` — punto de entrada del runtime de shipote.
//! `shuma-daemon` — punto de entrada del runtime de shuma.
//!
//! Responsabilidades:
//! - Escuchar el Unix socket admin (default: `$XDG_RUNTIME_DIR/shipote.sock`).
//! - Despachar mensajes del [`shipote_protocol`] al [`WorkspaceManager`].
//! - Escuchar el Unix socket admin (default: `$XDG_RUNTIME_DIR/shuma.sock`).
//! - Despachar mensajes del [`shuma_protocol`] al [`WorkspaceManager`].
//! - Reapear hijos periódicamente.
//!
//! Lo que NO hace en v1:
//! - Sidecar al broker / handshake con Init (futuro: cuando un workspace
//! exponga `service_socket`, anunciar al broker).
//! - GUI (futuro `shipote-shell` con yahweh_launcher).
//! - GUI (futuro `shuma-shell` con nahual_launcher).
use anyhow::Context;
use brahman_card::{Card, CardKind, Flow, Flows, Lifecycle, Payload, Supervision, TypeRef};
use ente_incarnate::IncarnatorConfig;
use shipote_core::WorkspaceManager;
use shipote_discern::{DiscernPipeline, Hint};
use shipote_protocol::{
use shuma_core::WorkspaceManager;
use shuma_discern::{DiscernPipeline, Hint};
use shuma_protocol::{
default_socket_path, read_frame, write_frame, CommandInfo as ProtoCommandInfo,
EdgeDiscernmentInfo, FlowInfo, FlowThroughputInfo, QuotaReportInfo, Request, Response,
WorkspaceStatsInfo, WorkspaceSummary,
@@ -37,7 +37,7 @@ async fn main() -> anyhow::Result<()> {
let _ = std::fs::create_dir_all(parent);
}
let listener = UnixListener::bind(&sock).with_context(|| format!("bind {}", sock.display()))?;
info!(socket = %sock.display(), "shipote-daemon listening");
info!(socket = %sock.display(), "shuma-daemon listening");
let daemon_started = std::time::Instant::now();
// Sidecar pool: una sesión global del daemon + N sesiones efímeras
@@ -67,12 +67,12 @@ async fn main() -> anyhow::Result<()> {
// Restaurar snapshot previo si existe. Workspaces se recrean; los
// pids de comandos viejos NO se recuperan (kernel los mató). Los
// pipelines vivos (con supervisor) se relanzan desde cero.
let snapshot_path = shipote_core::persist::default_snapshot_path();
let snapshot_path = shuma_core::persist::default_snapshot_path();
let restore = match mgr.restore_snapshot(&snapshot_path).await {
Ok(r) => r,
Err(e) => {
warn!(?e, "restore_snapshot falló — start fresh");
shipote_core::persist::RestoreOutcome::default()
shuma_core::persist::RestoreOutcome::default()
}
};
// Relauncher de live_pipelines: como necesita inc+disc del daemon,
@@ -85,7 +85,7 @@ async fn main() -> anyhow::Result<()> {
let ws_label = mgr.workspace_label(workspace).await.unwrap_or_default();
let tap = entry.tap;
let spec = entry.spec;
match shipote_core::pipeline::run_pipeline(
match shuma_core::pipeline::run_pipeline(
&spec, &ws_label, tap, disc, inc, Some(mgr.clone()),
)
.await
@@ -114,7 +114,7 @@ async fn main() -> anyhow::Result<()> {
_ = term.recv() => "SIGTERM",
_ = int.recv() => "SIGINT",
};
info!(signal = sig_name, "shipote-daemon shutdown: draining workspaces");
info!(signal = sig_name, "shuma-daemon shutdown: draining workspaces");
// 1) Snapshot ANTES del drain — preserva intención declarada
// (los workspace specs siguen vivos en el snapshot aunque
@@ -172,7 +172,7 @@ async fn main() -> anyhow::Result<()> {
// Escalar el backoff para la PRÓXIMA falla.
let next_backoff = (sup.current_backoff_ms * 2)
.min(new_spec.restart_max_backoff_ms);
match shipote_core::pipeline::run_pipeline(
match shuma_core::pipeline::run_pipeline(
&new_spec,
&ws_label,
tap,
@@ -288,7 +288,7 @@ async fn handle_client(
loop {
let req: Request = match read_frame(&mut stream).await {
Ok(r) => r,
Err(shipote_protocol::ProtocolError::Closed) => return Ok(()),
Err(shuma_protocol::ProtocolError::Closed) => return Ok(()),
Err(e) => return Err(e.into()),
};
audit_request(peer, &req);
@@ -297,16 +297,16 @@ async fn handle_client(
}
}
/// Path canónico del audit log: `$XDG_STATE_HOME/shipote/audit.log` o
/// fallback `$HOME/.local/state/shipote/audit.log`.
/// Path canónico del audit log: `$XDG_STATE_HOME/shuma/audit.log` o
/// fallback `$HOME/.local/state/shuma/audit.log`.
fn default_audit_log_path() -> std::path::PathBuf {
if let Ok(state) = std::env::var("XDG_STATE_HOME") {
return std::path::PathBuf::from(state).join("shipote/audit.log");
return std::path::PathBuf::from(state).join("shuma/audit.log");
}
if let Ok(home) = std::env::var("HOME") {
return std::path::PathBuf::from(home).join(".local/state/shipote/audit.log");
return std::path::PathBuf::from(home).join(".local/state/shuma/audit.log");
}
std::path::PathBuf::from("/tmp/shipote-audit.log")
std::path::PathBuf::from("/tmp/shuma-audit.log")
}
/// Cap del audit log antes de rotar a `audit.log.1`. 1 MiB.
@@ -450,14 +450,14 @@ async fn dispatch(
Request::PipelineRun { spec, tap, vars } => {
let vars_map: std::collections::HashMap<String, String> = vars.into_iter().collect();
let spec = match shipote_card::substitute_vars(&spec, &vars_map) {
let spec = match shuma_card::substitute_vars(&spec, &vars_map) {
Ok(s) => s,
Err(e) => return Response::Error { message: format!("template: {e}") },
};
let disc = DiscernPipeline::default_pipeline();
let inc = mgr.incarnator_handle();
let ws_label = mgr.workspace_label(spec.workspace).await.unwrap_or_default();
match shipote_core::pipeline::run_pipeline(
match shuma_core::pipeline::run_pipeline(
&spec,
&ws_label,
tap,
@@ -520,9 +520,9 @@ async fn dispatch(
Request::CommandLogs { workspace, command, tail_bytes, stream } => {
let s = match stream.as_str() {
"stdout" => shipote_core::LogStream::Stdout,
"stderr" => shipote_core::LogStream::Stderr,
_ => shipote_core::LogStream::Both,
"stdout" => shuma_core::LogStream::Stdout,
"stderr" => shuma_core::LogStream::Stderr,
_ => shuma_core::LogStream::Both,
};
match mgr.get_command_logs(workspace, command, tail_bytes, s).await {
Some(bytes) => Response::CommandLogs { bytes },
@@ -550,14 +550,14 @@ async fn dispatch(
Request::PipelineRunSaved { name, tap, vars } => match mgr.get_saved_pipeline(&name).await {
Some(spec) => {
let vars_map: std::collections::HashMap<String, String> = vars.into_iter().collect();
let spec = match shipote_card::substitute_vars(&spec, &vars_map) {
let spec = match shuma_card::substitute_vars(&spec, &vars_map) {
Ok(s) => s,
Err(e) => return Response::Error { message: format!("template: {e}") },
};
let disc = DiscernPipeline::default_pipeline();
let inc = mgr.incarnator_handle();
let ws_label = mgr.workspace_label(spec.workspace).await.unwrap_or_default();
match shipote_core::pipeline::run_pipeline(
match shuma_core::pipeline::run_pipeline(
&spec,
&ws_label,
tap,
@@ -740,7 +740,7 @@ async fn dispatch(
}
}
fn map_edge_to_info(e: shipote_core::pipeline::EdgeDiscernment) -> EdgeDiscernmentInfo {
fn map_edge_to_info(e: shuma_core::pipeline::EdgeDiscernment) -> EdgeDiscernmentInfo {
EdgeDiscernmentInfo {
from_label: e.from_label,
from_output: e.from_output,
@@ -757,17 +757,17 @@ fn map_edge_to_info(e: shipote_core::pipeline::EdgeDiscernment) -> EdgeDiscernme
/// Por cada edge con TypeRef detectado, spawneamos una Card efímera en el
/// SidecarPool que se anuncia al broker como producer del TypeRef
/// enriquecido. Esto permite a otros explorers (broker-explorer, etc.)
/// ver que shipote vio JSON/text/wasm/etc. saliendo de un pipeline.
/// ver que shuma vio JSON/text/wasm/etc. saliendo de un pipeline.
fn announce_edges_to_broker(
pool: Option<&brahman_sidecar::SidecarPool>,
pipeline: &ulid::Ulid,
edges: &[shipote_core::pipeline::EdgeDiscernment],
edges: &[shuma_core::pipeline::EdgeDiscernment],
) {
let Some(pool) = pool else { return };
for e in edges {
let Some(d) = &e.discernment else { continue };
let label = format!(
"shipote.flow.{}.{}.{}.{}",
"shuma.flow.{}.{}.{}.{}",
short_ulid(pipeline),
e.from_label,
e.from_output,
@@ -804,11 +804,11 @@ fn type_label(t: &TypeRef) -> String {
}
/// Card del daemon. La presentamos al broker así otras sesiones pueden
/// descubrir que shipote está corriendo y, eventualmente, conectarse
/// descubrir que shuma está corriendo y, eventualmente, conectarse
/// como consumidoras del flow `workspaces` (futuro: que la GUI o el
/// broker-explorer los listen vía broker en lugar de socket directo).
fn build_daemon_card(service_socket: &std::path::Path) -> Card {
let mut card = Card::new("shipote.daemon");
let mut card = Card::new("shuma.daemon");
card.kind = CardKind::Ente;
card.lifecycle = Lifecycle::Daemon;
card.payload = Payload::Virtual; // el daemon ya está corriendo (no es PID 1 quien lo encarna)
@@ -820,7 +820,7 @@ fn build_daemon_card(service_socket: &std::path::Path) -> Card {
Flow {
name: "workspaces".into(),
ty: TypeRef::Wit {
package: "shipote:admin".into(),
package: "shuma:admin".into(),
interface: None,
name: "workspace-list".into(),
},
@@ -829,7 +829,7 @@ fn build_daemon_card(service_socket: &std::path::Path) -> Card {
Flow {
name: "discern".into(),
ty: TypeRef::Wit {
package: "shipote:admin".into(),
package: "shuma:admin".into(),
interface: None,
name: "discernment".into(),
},
@@ -1,5 +1,5 @@
[package]
name = "shipote-gateway"
name = "shuma-gateway"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
@@ -9,11 +9,11 @@ publish.workspace = true
description = "HTTP/JSON gateway para shipote — traduce JSON ↔ postcard contra el admin socket."
[[bin]]
name = "shipote-gateway"
name = "shuma-gateway"
path = "src/main.rs"
[dependencies]
shipote-protocol = { path = "../../modules/shipote/shipote-protocol" }
shuma-protocol = { path = "../../modules/shuma/shuma-protocol" }
anyhow = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
@@ -1,6 +1,6 @@
//! `shipote-gateway` — HTTP/JSON adapter para el daemon.
//! `shuma-gateway` — HTTP/JSON adapter para el daemon.
//!
//! Acepta `POST /rpc` con body JSON serializado como `shipote_protocol::Request`,
//! Acepta `POST /rpc` con body JSON serializado como `shuma_protocol::Request`,
//! hace round-trip al admin socket via postcard, devuelve `Response` como JSON.
//!
//! Diseñado para clients no-Rust (curl, Python, web app) que no pueden
@@ -9,7 +9,7 @@
//!
//! Sin dep de axum/hyper: HTTP parser ad-hoc, suficiente para 1 endpoint.
use shipote_protocol::{default_socket_path, read_frame, write_frame, Request, Response};
use shuma_protocol::{default_socket_path, read_frame, write_frame, Request, Response};
use std::sync::Arc;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::{TcpListener, TcpStream, UnixStream};
@@ -23,7 +23,7 @@ async fn main() -> anyhow::Result<()> {
let listen = std::env::var("SHIPOTE_GATEWAY_LISTEN").unwrap_or_else(|_| DEFAULT_LISTEN.into());
let daemon_sock = Arc::new(default_socket_path());
let listener = TcpListener::bind(&listen).await?;
info!(listen = %listen, daemon = %daemon_sock.display(), "shipote-gateway listening");
info!(listen = %listen, daemon = %daemon_sock.display(), "shuma-gateway listening");
loop {
match listener.accept().await {
@@ -79,7 +79,7 @@ async fn handle_http(mut stream: TcpStream, daemon_sock: Arc<std::path::PathBuf>
// Rutas:
if method == "GET" && (path == "/" || path == "/health") {
return write_text(&mut stream, 200, "shipote-gateway ok\n").await;
return write_text(&mut stream, 200, "shuma-gateway ok\n").await;
}
if method != "POST" || path != "/rpc" {
return write_error(&mut stream, 404, "use POST /rpc").await;
+25
View File
@@ -0,0 +1,25 @@
[package]
name = "shuma-shell"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
publish.workspace = true
description = "GUI de shipote: vista de Workspaces+comandos+capabilities. Conecta al daemon vía shipote-protocol."
[[bin]]
name = "shuma-shell"
path = "src/main.rs"
[dependencies]
shuma-card = { path = "../../modules/shuma/shuma-card" }
shuma-protocol = { path = "../../modules/shuma/shuma-protocol" }
nahual-theme = { path = "../../modules/nahual/libs/theme" }
nahual-launcher = { path = "../../modules/nahual/libs/launcher" }
nahual-widget-banner = { path = "../../modules/nahual/widgets/banner" }
nahual-widget-stat-card = { path = "../../modules/nahual/widgets/stat-card" }
nahual-widget-app-header = { path = "../../modules/nahual/widgets/app-header" }
tokio = { workspace = true }
gpui = { workspace = true }
ulid = { workspace = true }
@@ -1,22 +1,22 @@
//! `shipote-shell` — GUI dashboard del daemon shipote.
//! `shuma-shell` — GUI dashboard del daemon shuma.
//!
//! Probe-style: conecta al socket del daemon cada 2s, pide
//! capabilities + workspace-list y los muestra en cards.
//! Si el daemon no está corriendo, marca DOWN.
use gpui::{div, prelude::*, px, Context, IntoElement, Render, SharedString, Window};
use shipote_protocol::{
use shuma_protocol::{
default_socket_path, read_frame, write_frame, CommandInfo, FlowInfo, FlowThroughputInfo,
QuotaReportInfo, Request, Response, WorkspaceStatsInfo, WorkspaceSummary,
};
use std::path::PathBuf;
use std::time::Duration;
use tokio::net::UnixStream;
use yahweh_launcher::launch_app;
use yahweh_theme::Theme;
use yahweh_widget_app_header::app_header;
use yahweh_widget_banner::{banner_themed, Banner};
use yahweh_widget_stat_card::stat_card;
use nahual_launcher::launch_app;
use nahual_theme::Theme;
use nahual_widget_app_header::app_header;
use nahual_widget_banner::{banner_themed, Banner};
use nahual_widget_stat_card::stat_card;
const POLL_INTERVAL: Duration = Duration::from_secs(2);
@@ -292,9 +292,9 @@ fn probe_blocking(path: &std::path::Path) -> Result<Snapshot, String> {
}
match best {
Some((ws_str, cmd)) => {
let ws_id: shipote_card::WorkspaceId = ws_str
let ws_id: shuma_card::WorkspaceId = ws_str
.parse::<ulid::Ulid>()
.map(shipote_card::WorkspaceId)
.map(shuma_card::WorkspaceId)
.map_err(|e| format!("ulid parse: {e}"))?;
write_frame(
&mut stream,
@@ -415,7 +415,7 @@ impl Render for Shell {
let (status_value, status_descr, status_accent) = match &self.state {
DaemonState::Pending => ("PENDING".to_string(), "primer probe…".to_string(), accent_pending),
DaemonState::Down { reason } => ("DOWN".to_string(), reason.clone(), accent_down),
DaemonState::Up => ("UP".to_string(), "shipote-daemon respondiendo".to_string(), accent_up),
DaemonState::Up => ("UP".to_string(), "shuma-daemon respondiendo".to_string(), accent_up),
};
let caps_items: Vec<String> = self
@@ -507,7 +507,7 @@ impl Render for Shell {
let saved_count = self.saved_pipelines.len().to_string();
let saved_items: Vec<String> = self.saved_pipelines.clone();
let saved_descr = if saved_items.is_empty() {
"shipote pipeline save <name> <file> para persistir".to_string()
"shuma pipeline save <name> <file> para persistir".to_string()
} else {
"definiciones reusables vía run-saved".to_string()
};
-36
View File
@@ -1,36 +0,0 @@
[package]
name = "yahweh-shell"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Bootstrap GPUI + LayoutHost de Yahweh."
[dependencies]
yahweh-core = { workspace = true }
yahweh-theme = { workspace = true }
yahweh-provider-fs = { workspace = true }
yahweh-provider-sqlite = { workspace = true }
yahweh-widget-tree = { workspace = true }
yahweh-widget-container-core = { workspace = true }
yahweh-widget-splitter = { workspace = true }
yahweh-widget-tabs = { workspace = true }
yahweh-widget-tiled = { workspace = true }
yahweh-bus = { workspace = true }
yahweh-file-explorer = { workspace = true }
yahweh-database-explorer = { workspace = true }
yahweh-text-viewer = { workspace = true }
yahweh-image-viewer = { workspace = true }
gpui = { workspace = true }
tokio = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
notify = { workspace = true }
# Brahman protocol — sidecar thread que se presenta al Init.
brahman-card = { path = "../../core/brahman-card" }
brahman-sidecar = { path = "../../shared/brahman-sidecar" }
ulid = { workspace = true }
[[bin]]
name = "yahweh"
path = "src/main.rs"
+44
View File
@@ -0,0 +1,44 @@
# compat/ — Shims D-Bus systemd
**Propósito.** Permitir que software systemd-aware (GNOME, KDE,
PolicyKit, NetworkManager, etc.) corra sobre `ente-zero` sin systemd.
Cada shim es un binario standalone que se anuncia con un nombre
well-known D-Bus y traduce las llamadas al bus interno.
## Crates
| binario | reemplaza | D-Bus name |
| --------------------------- | --------------------- | ----------------------------------- |
| `ente-logind-compat` | systemd-logind | `org.freedesktop.login1` |
| `ente-hostnamed-compat` | systemd-hostnamed | `org.freedesktop.hostname1` |
| `ente-timedated-compat` | systemd-timedated | `org.freedesktop.timedate1` |
| `ente-localed-compat` | systemd-localed | `org.freedesktop.locale1` |
| `ente-journald-compat` | systemd-journald | `org.freedesktop.LogControl1` |
| `ente-resolved-compat` | systemd-resolved | `org.freedesktop.resolve1` |
| `ente-polkit-compat` | polkitd | `org.freedesktop.PolicyKit1` |
| `ente-machined-compat` | systemd-machined | `org.freedesktop.machine1` |
| `ente-systemd1-compat` | systemd Manager | `org.freedesktop.systemd1` |
| `ente-notify-compat` | sd_notify socket | `/run/systemd/notify` (datagram) |
| `ente-timer-compat` | systemd timers | (cron-like, sin D-Bus) |
| `ente-tmpfiles-compat` | systemd-tmpfiles | (aplica tmpfiles.d al boot) |
| `ente-binfmt-compat` | systemd-binfmt | (registra handlers binfmt_misc) |
| `ente-policy-provider` | (interno) | provider de decisiones polkit |
## Dependencias
- Todos ← `zbus`, `ente-bus`, `protocol/brahman-card`. Sin tests
(esperado: stubs D-Bus que delegan al bus interno).
## Patrón común
Cada shim:
1. Se conecta a `/run/brahman/bus`.
2. Reclama un well-known name vía zbus.
3. Implementa los métodos de la interfaz mínima usada por el ecosistema.
4. Loggea eventos al audit log de `ente-brain`.
## Estado
LOC ~5K total (~300 LOC c/u). Suficiente para que `desktop-file-utils`,
`xdg-open`, login managers, y CLIs systemd-aware no rompan. Pendiente:
cobertura de métodos avanzados (Inhibit en logind, SetVariable en localed).
@@ -10,8 +10,8 @@ name = "ente-hostnamed-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
nix = { workspace = true }
libc = { workspace = true }
anyhow = { workspace = true }
@@ -14,9 +14,9 @@ name = "ente-journalctl"
path = "src/journalctl.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-cas = { path = "../ente-cas" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
ente-cas = { path = "../../runtime/ente-cas" }
nix = { workspace = true }
libc = { workspace = true }
anyhow = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-localed-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
anyhow = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-logind-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
anyhow = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-machined-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
anyhow = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-notify-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
nix = { workspace = true }
libc = { workspace = true }
anyhow = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-policy-provider"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
serde = { workspace = true }
serde_json = { workspace = true }
anyhow = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-polkit-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
anyhow = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-resolved-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
libc = { workspace = true }
anyhow = { workspace = true }
tokio = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-systemd1-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
anyhow = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-timedated-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
anyhow = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
@@ -10,8 +10,8 @@ name = "ente-timer-compat"
path = "src/main.rs"
[dependencies]
ente-card = { path = "../ente-card" }
ente-bus = { path = "../ente-bus" }
ente-card = { path = "../../protocol/ente-card" }
ente-bus = { path = "../../runtime/ente-bus" }
serde = { workspace = true }
serde_json = { workspace = true }
ulid = { workspace = true }
-100
View File
@@ -1,100 +0,0 @@
# `crates/core/` — Init Arje (absorbido) + Protocolo Brahman
El directorio agrupa **dos linajes** que se fusionaron al absorberse arje
dentro del workspace de brahman:
| linaje | prefijo | función |
| ----------- | ------------ | ------------------------------------------------ |
| `arje` | `ente-*` | Init (PID 1), encarnación Linux, compat systemd |
| `brahman` | `brahman-*` | Tarjeta canónica, handshake, broker, admin |
No están en sub-carpetas físicas porque el workspace declara los paths uno
a uno en `Cargo.toml` raíz y muchos `Cargo.toml` hijos usan `path =
"../ente-X"`. El agrupamiento siguiente es **lógico**: cada crate se
encuentra como `crates/core/<nombre>`.
---
## 1. Init / PID 1
| crate | tipo | resumen |
| --------------- | ---------- | ------------------------------------------------------------------ |
| `ente-zero` | binario | PID 1 del fractal. Bucle primordial (reap + bus + handshake). |
| `ente-kernel` | lib | `bootstrap_kernel_surface()`, subreaper, SIGCHLD/uevent streams. |
| `ente-soma` | lib (shim) | Re-export sobre `crates/shared/ente-incarnate` (clone+ns+cgroup). |
| `ente-snapshot` | lib | `FractalSnapshot` JSON — checkpoint/restore del grafo de Cards. |
## 2. Contratos canónicos
| crate | resumen |
| ------------------ | -------------------------------------------------------------------- |
| `brahman-card` | `Card { soma, payload, flow, permissions, supervision, genesis }`. |
| `brahman-card-wit` | Extracción de interfaces WIT de componentes WASM. |
| `brahman-cards` | Helpers para construir Cards típicas (consumer/producer/broker). |
| `ente-card` | Alias histórico — re-export de `brahman-card` con nombres legacy. |
## 3. Discovery / Routing
| crate | resumen |
| -------------------- | ------------------------------------------------------------------ |
| `brahman-handshake` | Protocolo Init↔módulo (Hello, Ping, ListSessions) postcard/Unix. |
| `brahman-broker` | Service locator: empareja `flow.input``flow.output` por tipo. |
| `brahman-admin` | Socket separado para snapshots de sesiones + matches. |
## 4. IPC interno + Storage
| crate | resumen |
| ------------- | ----------------------------------------------------------------------- |
| `ente-bus` | Unix SOCK_STREAM con framing postcard. `Announce`/`Invoke`/`ListEntes`. |
| `ente-cas` | Content-addressed storage SHA-256 (blobs Wasm, audit log). |
| `ente-wasm` | Encarna `Payload::Wasm` vía `wasmi` en thread dedicado. |
## 5. Cerebro / Observabilidad
| crate | resumen |
| ------------- | ------------------------------------------------------------------------ |
| `ente-brain` | Rule engine + observer estadístico + audit log con hash chain a CAS. |
| `ente-echo` | Ente de prueba — provee `Capability::Endpoint(echo)` para smoke tests. |
## 6. Compat systemd (shims D-Bus)
Cada shim es un binario que se anuncia con un nombre well-known
`org.freedesktop.X1` y traduce las llamadas al bus interno. Esto permite
que GNOME/KDE/aplicaciones legacy arranquen sobre arje sin systemd:
| binario | reemplaza | nombre D-Bus |
| --------------------------- | --------------------- | ----------------------------------- |
| `ente-logind-compat` | `systemd-logind` | `org.freedesktop.login1` |
| `ente-hostnamed-compat` | `systemd-hostnamed` | `org.freedesktop.hostname1` |
| `ente-timedated-compat` | `systemd-timedated` | `org.freedesktop.timedate1` |
| `ente-localed-compat` | `systemd-localed` | `org.freedesktop.locale1` |
| `ente-journald-compat` | `systemd-journald` | `org.freedesktop.LogControl1` |
| `ente-resolved-compat` | `systemd-resolved` | `org.freedesktop.resolve1` |
| `ente-polkit-compat` | `polkitd` | `org.freedesktop.PolicyKit1` |
| `ente-machined-compat` | `systemd-machined` | `org.freedesktop.machine1` |
| `ente-systemd1-compat` | `systemd` (Manager) | `org.freedesktop.systemd1` |
| `ente-notify-compat` | `sd_notify` socket | `/run/systemd/notify` (datagram) |
| `ente-timer-compat` | `systemd-timer` | (cron-like, sin D-Bus) |
| `ente-tmpfiles-compat` | `systemd-tmpfiles` | (aplica tmpfiles.d al boot) |
| `ente-binfmt-compat` | `systemd-binfmt` | (registra binfmt_misc handlers) |
| `ente-policy-provider` | (interno) | proveedor de decisiones polkit |
---
## Crates relacionados fuera de `core/`
Dependen del Init pero viven en `crates/shared/`:
- `ente-incarnate` — rutina pura de `clone(2) + namespaces + cgroup +
rlimits + cpu_affinity`. Reusable por shipote y supervisores no-PID-1.
- `brahman-net` — malla P2P opcional (libp2p) que extiende el handshake.
- `brahman-sidecar` — helper `spawn(card)` para que las apps se presenten
al Init sin reimplementar el cliente del handshake.
## Convención de uso
Para arrancar el Init y ejecutar Cards, ver:
- **Seeds estándar** en `seeds/`.
- **Build de initramfs** con `scripts/build-arje-initrd.sh`.
- **Boot en QEMU / bare metal** documentado en `docs/arje-boot.md`.
+36
View File
@@ -0,0 +1,36 @@
# init/ — Init (PID 1) y encarnación Linux
**Propósito.** `ente-zero` arranca como PID 1 del fractal. Provee el
bucle primordial (reap + bus + handshake), bootstrap del kernel
surface, encarnación de Cards en procesos aislados con namespaces +
cgroups, y snapshot/restore del grafo.
## Crates
| crate | tipo | rol |
| ---------------- | ------- | ----------------------------------------------------- |
| `ente-zero` | binario | PID 1: reap + handshake server + bus dispatcher |
| `ente-kernel` | lib | `bootstrap_kernel_surface`, subreaper, SIGCHLD/uevent |
| `ente-soma` | lib | Shim sobre `ente-incarnate` (compatibilidad legacy) |
| `ente-incarnate` | lib | `clone(2) + namespaces + cgroup + rlimits + cpu` |
| `ente-snapshot` | lib | `FractalSnapshot` JSON: checkpoint del grafo Cards |
## Dependencias
- `ente-kernel``nix`, `libc`, syscalls Linux puras.
- `ente-incarnate` reusable: shuma (sandboxes) y supervisores no-PID-1.
- Consume `protocol/` (handshake server, brahman-net opcional).
## Boot path
1. Kernel pasa control → `ente-zero` arranca como `/sbin/init`.
2. Levanta sockets: `/run/brahman/bus`, `/run/brahman/handshake`.
3. Lee `Card` semilla (`seeds/arje-{minimal,host,prod}.card.json`).
4. Para cada `genesis` child Card: `incarnate(card)` → spawn aislado.
5. Reap loop atiende SIGCHLD; bus loop atiende anuncios/invokes.
## Estado
Funciona bare metal + QEMU + initramfs (ver `docs/arje-boot.md`). LOC
~2.2K en init core. Pendiente: cobertura de tests sobre snapshot
restore en escenarios con stale fds.
@@ -9,7 +9,7 @@ publish.workspace = true
description = "Rutina extraída del Init para encarnar Cards en procesos aislados (clone+ns+cgroup+rlimits). Reusable por cualquier supervisor — no implica ser PID 1."
[dependencies]
brahman-card = { path = "../../core/brahman-card" }
brahman-card = { path = "../../protocol/brahman-card" }
nix = { workspace = true }
libc = { workspace = true }
anyhow = { workspace = true }
@@ -110,7 +110,7 @@ mod tests {
#[test]
fn relative_path_prefixed() {
let r = resolve_cgroup_path("shipote/ws-1");
assert!(r.ends_with("/shipote/ws-1") || r == "/shipote/ws-1");
let r = resolve_cgroup_path("shuma/ws-1");
assert!(r.ends_with("/shuma/ws-1") || r == "/shuma/ws-1");
}
}
@@ -3,7 +3,7 @@
//!
//! El núcleo histórico vivía en `ente-soma` con globals dependientes de PID 1.
//! Este crate elimina esos globals: se construye un [`Incarnator`] por
//! supervisor (Init, shipote, etc.), cada uno con su propio bus socket y su
//! supervisor (Init, shuma, etc.), cada uno con su propio bus socket y su
//! propia política de capacidades.
//!
//! ## Limitaciones que NO desaparecen al extraer
@@ -48,7 +48,7 @@ use std::os::fd::RawFd;
/// namespaced) o de dejar que `std::process::Command` los absorba (path
/// plain). **No los cierres en el caller** — habría doble-close.
///
/// Útil para conectar pipes entre procesos del pipeline de shipote sin
/// Útil para conectar pipes entre procesos del pipeline de shuma sin
/// romper la regla async-signal-safe del callback de clone(2).
#[derive(Debug, Clone, Copy, Default)]
pub struct ChildStdio {
@@ -124,7 +124,7 @@ impl Incarnator {
&self.cfg
}
/// Valida una Card sin ejecutar nada. Útil para que el caller (shipote,
/// Valida una Card sin ejecutar nada. Útil para que el caller (shuma,
/// admin, tests) sepa de antemano si va a poder encarnar tal cual o si
/// va a tener que aflojar el SomaSpec.
pub fn dry_run(&self, card: &Card) -> ValidationReport {
@@ -323,7 +323,7 @@ mod tests {
let card = make_card(
Payload::Native {
exec: "/bin/echo".into(),
argv: vec!["shipote-stdio".into()],
argv: vec!["shuma-stdio".into()],
envp: vec![],
},
NamespaceSet::default(),
@@ -353,7 +353,7 @@ mod tests {
let n = read(r_raw, &mut buf).expect("read");
assert!(n > 0);
let s = std::str::from_utf8(&buf[..n]).unwrap();
assert!(s.contains("shipote-stdio"), "got: {s:?}");
assert!(s.contains("shuma-stdio"), "got: {s:?}");
// r se cierra al drop del OwnedFd.
}

Some files were not shown because too many files have changed in this diff Show More