Expand description
netsky core: agent model, prompt loader, spawner, config.
All canonical string constants (session names, state paths, env var
names, MCP server names, CLI flags) live in consts. Magic strings
in this crate are a bug — promote them to consts.
Re-exports§
pub use agent::AgentId;pub use error::Error;pub use error::Result;pub use prompt::PromptContext;pub use prompt::render_prompt;pub use runtime::Runtime;
Modules§
- agent
- Agent identity model.
- config
- Per-machine
netsky.tomlloader. - consts
- Canonical string constants. If a string literal appears twice in the code base and carries semantic meaning, it belongs here.
- cron
- Durable cron entry storage under
~/.netsky/cron.toml. - envelope
- Shared agent-bus envelope: the on-disk shape, filename convention, and atomic-with-create-new write used by every producer on the bus. Consumers read envelopes with their own deserializer; writers MUST go through this module so every inbox file agrees on filename shape.
- error
- The netsky error taxonomy.
- jsonl
- paths
- Filesystem paths used across the netsky runtime.
- process
- Bounded subprocess execution.
- prompt
- Prompt loading, templating, and addendum layering.
- runtime
- Agent runtime: the underlying model + CLI a spawned agent executes.
- spawn
- Agent spawn orchestration.
Macros§
- anyhow
- Construct an
Error::Messagefrom a format string. Drop-in foranyhow::anyhow!. Useful inside.map_err(|e| netsky_core::anyhow!("...: {e}")). - bail
- Early-return with an
Error::Message. Drop-in foranyhow::bail!. Single-literal form supports captured identifiers viaformat!’s Rust 2021 implicit named args.