diff --git a/CLAUDE.md b/CLAUDE.md index 32ecde3..47b1306 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -547,7 +547,7 @@ branch → PR. CI (fmt, clippy, test) must pass before merge. ### Phase 7: neuron scaffold and discovery ✅ Completed. Deleted `cortex-agent`, created `crates/neuron/` (binary: -`cortex-neuron`). Added shared types to cortex-core: `discovery.rs` +`neuron`). Added shared types to cortex-core: `discovery.rs` (DeviceInfo, DiscoveryResponse, DeviceHealth, HealthResponse) and `harness.rs` (Harness async trait, HarnessConfig, ModelSpec, ModelInfo). @@ -598,7 +598,7 @@ grenade COPR repo. **Steps:** 1. `neuron.spec` — RPM spec file for the neuron binary. Install to `/usr/libexec/cortex/neuron`. Systemd unit - `cortex-neuron.service`. Config at `/etc/cortex/neuron.toml`. + `neuron.service`. Config at `/etc/cortex/neuron.toml`. 2. Update `cortex.spec` — ensure the cortex binary, config, and `models.toml` are packaged correctly. 3. Gitea Actions CI job: on tag push, build SRPM, submit to COPR. @@ -608,12 +608,12 @@ grenade COPR repo. # on the gateway host: dnf install cortex # on each GPU node: - dnf install cortex-neuron + dnf install neuron ``` -**Done when:** `dnf install cortex-neuron` on a Fedora 43 host drops -the binary, config, and systemd unit. `systemctl start cortex-neuron` -runs discovery and serves `/discovery`. +**Done when:** `dnf install neuron` on a Fedora 43 host drops the +binary, config, and systemd unit. `systemctl start neuron` runs +discovery and serves `/discovery`. ### Phase 11: llama.cpp harness stub diff --git a/Cargo.lock b/Cargo.lock index bc757c2..b1f5f1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -404,25 +404,6 @@ dependencies = [ "urlencoding", ] -[[package]] -name = "cortex-neuron" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "axum", - "clap", - "cortex-core", - "figment", - "reqwest", - "serde", - "serde_json", - "tokio", - "toml", - "tracing", - "tracing-subscriber", -] - [[package]] name = "crossbeam-epoch" version = "0.9.18" @@ -1201,6 +1182,25 @@ dependencies = [ "tempfile", ] +[[package]] +name = "neuron" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "axum", + "clap", + "cortex-core", + "figment", + "reqwest", + "serde", + "serde_json", + "tokio", + "toml", + "tracing", + "tracing-subscriber", +] + [[package]] name = "nom" version = "7.1.3" diff --git a/crates/neuron/Cargo.toml b/crates/neuron/Cargo.toml index 25a264d..284a936 100644 --- a/crates/neuron/Cargo.toml +++ b/crates/neuron/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "cortex-neuron" +name = "neuron" version.workspace = true edition.workspace = true license.workspace = true [lib] -name = "cortex_neuron" +name = "neuron" path = "src/lib.rs" [[bin]] -name = "cortex-neuron" +name = "neuron" path = "src/main.rs" [dependencies] diff --git a/crates/neuron/src/main.rs b/crates/neuron/src/main.rs index b706876..8d70c7f 100644 --- a/crates/neuron/src/main.rs +++ b/crates/neuron/src/main.rs @@ -1,13 +1,13 @@ use anyhow::Result; use clap::Parser; -use cortex_neuron::{api, config::NeuronConfig, discovery, harness::HarnessRegistry, health}; +use neuron::{api, config::NeuronConfig, discovery, harness::HarnessRegistry, health}; use std::sync::Arc; use std::time::Instant; use tokio::sync::RwLock; use tracing_subscriber::EnvFilter; #[derive(Parser)] -#[command(name = "cortex-neuron")] +#[command(name = "neuron")] #[command(about = "Per-node daemon for cortex inference clusters")] #[command(version)] struct Args { @@ -25,7 +25,7 @@ async fn main() -> Result<()> { tracing_subscriber::fmt() .with_env_filter( EnvFilter::try_from_default_env() - .unwrap_or_else(|_| EnvFilter::new("info,cortex_neuron=debug")), + .unwrap_or_else(|_| EnvFilter::new("info,neuron=debug")), ) .init(); @@ -69,7 +69,7 @@ async fn main() -> Result<()> { let app = api::neuron_routes().with_state(state); let addr: std::net::SocketAddr = format!("0.0.0.0:{port}").parse()?; - tracing::info!("cortex-neuron listening on {addr}"); + tracing::info!("neuron listening on {addr}"); let listener = tokio::net::TcpListener::bind(addr).await?; axum::serve(listener, app).await?; diff --git a/crates/neuron/tests/api.rs b/crates/neuron/tests/api.rs index 9f00d8f..f5f5434 100644 --- a/crates/neuron/tests/api.rs +++ b/crates/neuron/tests/api.rs @@ -1,7 +1,7 @@ use cortex_core::discovery::{DeviceInfo, DiscoveryResponse}; -use cortex_neuron::api::{self, NeuronState}; -use cortex_neuron::harness::HarnessRegistry; -use cortex_neuron::health::HealthCache; +use neuron::api::{self, NeuronState}; +use neuron::harness::HarnessRegistry; +use neuron::health::HealthCache; use serde_json::json; use std::sync::Arc; use tokio::sync::RwLock;