Scaffold inicial: workspace Rust + SDDs completos
Arranque del proyecto hammer (distro AI-nativa: laboratorio funcional en el sótano, terminal mutable clásica arriba, integración de IA programadora). - Workspace Rust (compila, tests verdes): hammer-core, hammer-build, hammer-cli (bin `hammer`), hammerd. - SDDs 00-10 + 6 ADRs en docs/ con toda la arquitectura. - Esqueletos navegables mapeados a las fases del roadmap; Fase 0/1 listas para implementar el sandbox real. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "hammerd"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
repository.workspace = true
|
||||
description = "Daemon de hammer: bus de agente (/run/agent.sock) y diario de mutaciones (fanotify)."
|
||||
|
||||
[[bin]]
|
||||
name = "hammerd"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
hammer-core.workspace = true
|
||||
anyhow.workspace = true
|
||||
clap.workspace = true
|
||||
tracing.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
@@ -0,0 +1,44 @@
|
||||
//! `hammerd` — daemon de hammer. Dos responsabilidades:
|
||||
//! 1. Bus de agente: /run/agent.sock (JSON-líneas, SO_PEERCRED). Ver `docs/07-agent-bus.md`.
|
||||
//! 2. Diario de mutaciones: fanotify sobre /bin,/sbin,/lib,/etc. Ver `docs/05-journal.md`.
|
||||
//!
|
||||
//! Esqueleto de arranque. Las dos subsistemas (Fases 3 y 5) se implementarán por separado;
|
||||
//! aquí queda el binario navegable y el cableado básico de logging/argumentos.
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(name = "hammerd", version, about = "Daemon de hammer: bus de agente + diario.")]
|
||||
struct Args {
|
||||
/// Socket del bus de agente.
|
||||
#[arg(long, default_value = "/run/agent.sock")]
|
||||
agent_sock: String,
|
||||
/// FIFO de control humano del init.
|
||||
#[arg(long, default_value = "/run/init.control")]
|
||||
init_control: String,
|
||||
/// Directorio del diario de mutaciones.
|
||||
#[arg(long, default_value = "/var/lib/hammer/journal")]
|
||||
journal: String,
|
||||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter(
|
||||
tracing_subscriber::EnvFilter::try_from_default_env()
|
||||
.unwrap_or_else(|_| "info".into()),
|
||||
)
|
||||
.init();
|
||||
|
||||
let args = Args::parse();
|
||||
tracing::info!(
|
||||
agent_sock = %args.agent_sock,
|
||||
init_control = %args.init_control,
|
||||
journal = %args.journal,
|
||||
"hammerd: arranque (esqueleto)"
|
||||
);
|
||||
|
||||
// TODO(fase-3): iniciar el watcher fanotify → diario.
|
||||
// TODO(fase-5): servir el bus de agente en agent_sock (JSON-líneas, SO_PEERCRED).
|
||||
tracing::warn!("subsistemas pendientes: diario (Fase 3) y bus de agente (Fase 5)");
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user