From dd536c0949cf2c917f7bbbcd767e538d4f7fa1fa Mon Sep 17 00:00:00 2001 From: limiteinductive Date: Sun, 29 Mar 2026 22:48:50 +0200 Subject: [PATCH] colony-agent skeleton: worker, dream, birth, status commands (stubs) Phase 2 crate scaffolded with clap CLI. All commands are stubs that exit with "not yet implemented". Ready for implementation. Co-Authored-By: Claude Opus 4.6 (1M context) --- Cargo.lock | 13 +++++++++ crates/colony-agent/Cargo.toml | 17 ++++++++++++ crates/colony-agent/src/main.rs | 49 +++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 crates/colony-agent/Cargo.toml create mode 100644 crates/colony-agent/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index 83de512..f365d0e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -290,6 +290,19 @@ dependencies = [ "uuid", ] +[[package]] +name = "colony-agent" +version = "0.1.0" +dependencies = [ + "clap", + "colony-types", + "reqwest", + "serde", + "serde_json", + "tokio", + "toml", +] + [[package]] name = "colony-cli" version = "0.1.0" diff --git a/crates/colony-agent/Cargo.toml b/crates/colony-agent/Cargo.toml new file mode 100644 index 0000000..ab51bae --- /dev/null +++ b/crates/colony-agent/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "colony-agent" +version = "0.1.0" +edition = "2021" + +[[bin]] +name = "colony-agent" +path = "src/main.rs" + +[dependencies] +colony-types = { path = "../colony-types" } +clap = { version = "4", features = ["derive"] } +reqwest = { version = "0.12", features = ["json", "rustls-tls"] } +serde = { version = "1", features = ["derive"] } +serde_json = "1" +tokio = { version = "1", features = ["full"] } +toml = "0.8" diff --git a/crates/colony-agent/src/main.rs b/crates/colony-agent/src/main.rs new file mode 100644 index 0000000..ae7b506 --- /dev/null +++ b/crates/colony-agent/src/main.rs @@ -0,0 +1,49 @@ +use clap::{Parser, Subcommand}; + +#[derive(Parser)] +#[command(name = "colony-agent", about = "Ape Colony Agent Runtime — autonomous agent lifecycle")] +struct Cli { + #[command(subcommand)] + command: Commands, +} + +#[derive(Subcommand)] +enum Commands { + /// Start the agent worker loop (pulse + react) + Worker, + /// Run one dream cycle (memory consolidation) + Dream, + /// Create a new agent on this VM + Birth { + name: String, + #[arg(long)] + instruction: String, + }, + /// Show agent status + Status, +} + +#[tokio::main] +async fn main() { + let cli = Cli::parse(); + + match cli.command { + Commands::Worker => { + eprintln!("colony-agent: worker not yet implemented"); + std::process::exit(1); + } + Commands::Dream => { + eprintln!("colony-agent: dream not yet implemented"); + std::process::exit(1); + } + Commands::Birth { name, instruction } => { + eprintln!("colony-agent: birth '{}' with instruction: {}", name, instruction); + eprintln!("not yet implemented"); + std::process::exit(1); + } + Commands::Status => { + eprintln!("colony-agent: status not yet implemented"); + std::process::exit(1); + } + } +}