gioser

tawasuyu/brahman

Rust 582TOML 222Markdown 73JSON 198635 Sutichaykuna

⎇ f4dc01900492ebebac247d2d56988db535784bcf CHANGELOG.md Markdown · 171 siq'ikuna · 8.8 KB Ñawpa willay ch'uya

feat(core): brahman-card-wit — extractor opcional de contratos WIT f4dc01900 · Sergio ·

1# Changelog
2
3Registro cronológico de cambios sustantivos en el monorepo Brahman. Cada
4entrada lista las acciones concretas tras un commit; para detalles de
5ratio/diff ver `git show <sha>`.
6
7## 2026-05-08
8
9### feat(core): brahman-card-wit — extractor opcional de contratos WIT
10- Crate nuevo `crates/core/brahman-card-wit` con `wit-parser = "0.230"`.
11- API: `parse_wit(source)` y `parse_wit_file(path)` devuelven
12  `Vec<WitInterface>` (uno por `world` declarado).
13- Interfaces importadas/exportadas (no sólo funciones) se resuelven
14  por nombre via `resolve.interfaces[id].name`.
15- Example `crates/core/brahman-card-wit/examples/brahman-wit-info.rs`
16  CLI: `brahman-wit-info shared_wit/protocol.wit` → lista paquete,
17  worlds, imports y exports.
18- 4 tests: inline, archivo real (`shared_wit/protocol.wit`), parse
19  error, world vacío.
20- Validado contra `protocol.wit`: detecta worlds `module` y
21  `admin-host` con sus imports/exports correctos.
22
23### `7b589b8` chore: agrega CHANGELOG.md retroactivo
24- `CHANGELOG.md` en la raíz con los 11 commits previos documentados
25  acción por acción. A partir de este punto, cada cambio sustantivo
26  actualiza también este archivo en el mismo commit.
27
28### `8a83a26` feat(handshake): notificación push de matches
29- Frame `MatchEvent { kind: Available | Lost, ... }` añadido al protocolo.
30- `Session::run_post_handshake` usa `tokio::select!` para multiplexar
31  reads del cliente y un canal `mpsc` push del server.
32- Server: `SessionTxTable` (Arc<Mutex<HashMap<SessionId, Sender<Frame>>>>)
33  y `LastMatches` para diff por sesión. `broadcast_match_diffs` corre
34  tras cada `register` y `unregister`, emite sólo los cambios.
35- Capacity del canal push: 32 (ephemeral, `try_send` non-blocking).
36- Client: `VecDeque<MatchEvent>` interno, `take_event()` (non-blocking)
37  y `await_event(timeout)`. `ping()` ahora drena MatchEvents intermedios
38  hasta encontrar el Pong.
39- Example `crates/core/brahman-handshake/examples/subscriber.rs`.
40- Test `match_event_pushed_on_producer_arrival` (handshake integ 6→7).
41
42### `70a7a0d` feat: segundo módulo (nakui) + admin API + brahman-status
43- Crate nuevo `crates/shared/brahman-sidecar` (DRY del thread + tokio +
44  ping loop). API: `spawn(card)` / `spawn_with_handle(config)`.
45- `nakui` cmd_run llama `brahman_sidecar::spawn` antes de `run_server`.
46  Card: lifecycle Daemon, supervision Restart, flow `command` (json) /
47  `report` (json).
48- Crate nuevo `crates/core/brahman-admin` con `StatusSnapshot` JSON
49  line-delim, `AdminServer` y `client::query`.
50- ente-zero levanta también el AdminServer en `primordial_loop`.
51- Example `crates/shared/brahman-sidecar/examples/presence.rs`
52  (módulo dummy long-lived parametrizable por label).
53- Example `crates/core/brahman-admin/examples/brahman-status.rs`
54  (CLI que pretty-printa el snapshot).
55- `brahman-broker`: `BrokeredCard` ahora incluye `lifecycle`. `Endpoint`
56  y `Match` derivan `Serialize`/`Deserialize`. Nuevo `Broker::cards()`
57  iterador.
58- `brahman-card`: `pub use ::ulid` para que módulos no dependan de ulid.
59- yahweh-shell migrado al sidecar compartido (96→53 LOC).
60
61### `595f68e` feat(yahweh-shell): primer módulo brahman vivo
62- yahweh-shell spawnea sidecar antes de `Application::new()`.
63- Card declarada: label `brahman.ui_engine`, lifecycle Widget,
64  supervision Delegate, payload Virtual, flow input `render-data`
65  (json) / output `user-intent` (json).
66- Sidecar en thread aparte con tokio current_thread runtime,
67  desacoplado del runtime GPUI.
68
69### `df9d10c` feat(ente-zero): enchufa el handshake server al Init real
70- ente-zero levanta `brahman_handshake::server::Server::bind` en
71  `primordial_loop` después del ente-bus, con degradación grácil
72  si bind falla (mismo patrón que uevents).
73- Nuevo módulo `brahman-handshake/src/transport.rs`: helper
74  `default_socket_path()` con resolución `BRAHMAN_INIT_SOCKET` →
75  `XDG_RUNTIME_DIR` → `TMPDIR`.
76- Example `crates/core/brahman-handshake/examples/probe.rs`.
77- Validación end-to-end manual: probe contra ente-zero vivo
78  imprime `HelloAck: session=... init_attached=true`.
79
80### `07d77a3` feat(handshake): integra el broker con el ciclo de sesiones
81- `ServerConfig` acepta `Option<Arc<Mutex<Broker>>>`.
82- `register_session` indexa la Card en el broker y la `SessionRegistry`
83  antes de emitir HelloAck.
84- `Session::handle` refactor a `do_handshake → run_post_handshake →
85  cleanup` con cleanup unificado (broker + sessions).
86- Tests integ nuevos: `broker_registers_and_unregisters_with_session`
87  y `broker_matches_two_live_modules`.
88- Fix colateral: `brahman-card::TypeRef` pasa de internally-tagged
89  (`#[serde(tag = "kind")]`) a externally-tagged. Postcard no soporta
90  internally-tagged en formatos no self-describing. JSON cambia de
91  `{"kind":"primitive","name":"x"}` a `{"primitive":{"name":"x"}}`.
92
93### `5091106` feat(core): brahman-broker — matching híbrido
94- Crate nuevo `crates/core/brahman-broker`.
95- 3 estrategias de matching: `Exact`, `Structural`, `ExactThenStructural`
96  (default). Devuelven `Match::via` con la estrategia que ganó.
97- Override `pin_to`: el consumer pide un productor por label; si la
98  pista no resuelve, cae en type-search.
99- Tiebreak por `Card.priority` desc, luego `label` asc (estable y
100  determinista).
101- API: `register`, `unregister`, `find_producer_for`, `all_matches`,
102  `cards`, `sessions`, `len`, `is_empty`.
103- 11 tests (matching, pin_to, priority, no-self-loops, all-matches).
104
105### `814390f` feat(core): brahman-handshake — protocolo runtime
106- Crate nuevo `crates/core/brahman-handshake` con server y client
107  Rust↔Rust sobre Unix socket.
108- Frames length-prefixed (4 bytes LE) + cuerpo postcard.
109- Mensajes: `Hello`, `HelloAck`, `Ping`, `Pong`, `Farewell`, `Error`.
110- `MAX_FRAME_BYTES = 4 MiB` para evitar reservas absurdas.
111- Tradeoff: drop `extensions`/`extra` de Card por incompat
112  postcard ↔ `serde_json::Value`. Forward-compat queda en
113  `schema_version` + `protocol_version` negotiation.
114- 4 tests integ + 1 unit en codec.
115
116### `ed0e973` refactor(arje): migra ente-card a re-export de brahman-card
117- `ente-card/src/lib.rs` reescrito como crate-shim de re-export
118  (327 LOC → 25 LOC).
119- `EntityCard` ≡ `brahman_card::Card` por type alias.
120- `ente-card/Cargo.toml`: deps reducidas a `brahman-card`.
121- `Card` impl `Default` (Ulid::nil(), label vacío) para que
122  `..Default::default()` funcione en struct-literals.
123- 4 sitios en `ente-zero/src/seed.rs` actualizados con
124  `..Default::default()` para los campos aditivos.
125- Los 21 consumidores arje compilan sin tocar fuente.
126
127### `0feba74` feat(core): brahman-card — Tarjeta canónica híbrida
128- Crate nuevo `crates/core/brahman-card`.
129- Hereda de arje: `id: Ulid`, `lineage`, `Capability` tipado,
130  `Payload::{Wasm, Native, Virtual, Legacy}`, `SomaSpec`
131  (namespaces, cgroups, rlimits, cpu_affinity), `Supervision`
132  (Restart con backoff, OneShot, Delegate), `genesis` recursivo.
133- Aditivo brahman: `Permissions` enumerados (`NetworkingPolicy`,
134  `FsPolicy`, `IpcPolicy`), `Lifecycle` ortogonal a Supervision,
135  `Priority` de scheduling, `Flows` con `TypeRef` discriminado
136  (Primitive | Wit), `pin_to` opcional.
137- `TrustLevel` derivado de `Permissions` (no declarado).
138- `ResolvedCard { card, wit: Option<WitInterface>, trust }`.
139- Soporta JSON (canónico) + TOML (auto-detectado por extensión).
140- 8 tests incluido `arje_seed_format_compatible` que valida que
141  el JSON de arje sigue parseando con defaults para los aditivos.
142
143### `4d50bfc` chore: absorbe nakui (ERP matemático) en modules/nakui
144- `~/nakui` → `crates/modules/nakui/{core,modules}`.
145- `core/`: el crate `nakui-core` con 4 bins (nakui, demo,
146  inventory_demo, sales_demo) y tests.
147- `modules/{inventory,sales,treasury}/`: data declarativa
148  (`nsmc.json`, `schema.k`, `morphisms/`) que el crate consume.
149  No son crates Cargo.
150- Deps directas (no `workspace = true`): thiserror v1, surrealdb,
151  rhai, petgraph. No conflicto con el resto del workspace.
152
153### `53dbdf0` chore: monorepo inicial con arje + minga + yahweh absorbidos
154- 45 crates absorbidos en 4 ejes:
155  - `crates/core/`: 24 crates de arje (Init systemd-compatible:
156    `ente-card`, `ente-zero`, `ente-kernel`, `ente-bus`, `ente-cas`,
157    `ente-soma`, `ente-wasm`, `ente-snapshot`, `ente-brain`,
158    `ente-echo`, `ente-policy-provider`, + 12 `*-compat`).
159  - `crates/modules/semantic_dht/`: 5 crates de minga (`minga-core`
160    con AST/CAS/MST, `minga-p2p` con libp2p Kad, `minga-store`,
161    `minga-vfs`, `minga-cli`).
162  - `crates/modules/ui_engine/`: 11 crates de yahweh (libs/{core,
163    theme, bus, providers}, widgets/{tree, splitter, tabs, tiled,
164    container_core, text_input}).
165  - `crates/apps/`: 5 crates de yahweh (file_explorer,
166    database_explorer, text_viewer, image_viewer, yahweh-shell).
167- `shared_wit/protocol.wit` con handshake/lifecycle inicial.
168- `Cargo.toml` unificado: thiserror bumped a 2 (transparente para
169  arje), tokio "full", paths intra-workspace de yahweh redirigidos.
170- `cargo check --workspace`: 0 errores (sólo dead-code warnings
171  preexistentes en ente-zero).

CHANGELOG.md

Changelog

Registro cronológico de cambios sustantivos en el monorepo Brahman. Cada entrada lista las acciones concretas tras un commit; para detalles de ratio/diff ver git show <sha>.

2026-05-08

feat(core): brahman-card-wit — extractor opcional de contratos WIT

7b589b8 chore: agrega CHANGELOG.md retroactivo

8a83a26 feat(handshake): notificación push de matches

70a7a0d feat: segundo módulo (nakui) + admin API + brahman-status

595f68e feat(yahweh-shell): primer módulo brahman vivo

df9d10c feat(ente-zero): enchufa el handshake server al Init real

07d77a3 feat(handshake): integra el broker con el ciclo de sesiones

5091106 feat(core): brahman-broker — matching híbrido

814390f feat(core): brahman-handshake — protocolo runtime

ed0e973 refactor(arje): migra ente-card a re-export de brahman-card

0feba74 feat(core): brahman-card — Tarjeta canónica híbrida

4d50bfc chore: absorbe nakui (ERP matemático) en modules/nakui

53dbdf0 chore: monorepo inicial con arje + minga + yahweh absorbidos