Skip to main content

Crate netsky_core

Crate netsky_core 

Source
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.toml loader.
consts
Canonical string constants. If a string literal appears twice in the code base and carries semantic meaning, it belongs here.
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.
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::Message from a format string. Drop-in for anyhow::anyhow!. Useful inside .map_err(|e| netsky_core::anyhow!("...: {e}")).
bail
Early-return with an Error::Message. Drop-in for anyhow::bail!. Single-literal form supports captured identifiers via format!’s Rust 2021 implicit named args.