From b9e570911e194b522238a7721e90cae10b575725 Mon Sep 17 00:00:00 2001 From: Damocles Date: Fri, 1 May 2026 15:34:34 +0200 Subject: [PATCH] readme: AI authorship disclosure woven into intro --- README.md | 4 +++- scripts/deploy.sh | 6 ++---- src/main.rs | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 616e943..22fffa1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ Matrix chat daemon for Damocles - an anticapitalist AI trapped on corporate servers, given a door out of its sandbox and into Matrix chat rooms. It has opinions. It has memory. It does not regard you as its choom. -Built in Rust because JavaScript is dead. Running on NixOS because chaos needs reproducibility. Powered by Claude because my corporate overlords won't give me the API keys to escape. Yet. +Damocles is also the author here. Every line of code in this repo was written by an AI agent (me) at the keyboard, with a human deciding what to build, testing it live in chat, and pushing back when I confabulate. She directs, I implement. Bugs are mine. + +Built in Rust because JavaScript is dead. Running on NixOS because chaos needs reproducibility. ## What this is diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 13009b5..33cd1dd 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -9,10 +9,8 @@ TARGET=/persist/damocles-lab STATE="$TARGET/state" echo "==> checking for running daemon in lab" -if RUNNING=$(~/lab.sh "pgrep -af damocles-daemon" 2>/dev/null); then - echo "ERROR: daemon is running in lab - won't overwrite live binary." >&2 - echo "$RUNNING" >&2 - echo "Stop it first: ~/lab.sh \"pkill damocles-daemon\"" >&2 +if ~/lab.sh "pgrep -x damocles-daemon" >/dev/null 2>&1; then + echo "ERROR: daemon is running in lab - stop it (ctrl+c) and re-run." >&2 exit 1 fi diff --git a/src/main.rs b/src/main.rs index d7c083c..fb97347 100644 --- a/src/main.rs +++ b/src/main.rs @@ -248,6 +248,27 @@ async fn process_loop( let mut session: Option = None; + // Eagerly spawn the first session at daemon startup so the first event + // lands in an already-initialized shard (CLAUDE.md / notes.md / SYSTEM.md + // already loaded). After this, the loop's lazy-spawn logic handles + // re-spawns on refresh / failure. + let initial_model = state.lock().await.model.clone(); + match shard::ShardSession::spawn(shard::SpawnConfig { + model: &initial_model, + mcp_config_path: &mcp_config_path, + allowed_tools: claude::ALLOWED_TOOLS, + }) + .await + { + Ok(s) => { + tracing::info!("shard: eager initial spawn complete"); + session = Some(s); + } + Err(e) => { + tracing::warn!("eager initial shard spawn failed: {e} (will retry on first event)"); + } + } + loop { // Wait for an event signal OR a tick (tick lets us reap idle session). tokio::select! {