Expand description
HTTP server for Statespace tool execution.
Serves markdown files with frontmatter-defined tools, validates commands, and executes them in a sandboxed environment.
ⓘ
use statespace_server::{ServerConfig, build_router, initialize_templates};
let config = ServerConfig::new(PathBuf::from("./toolsite"));
initialize_templates(&config.content_root, &config.base_url()).await?;
let router = build_router(&config)?;Re-exports§
pub use content::ContentResolver;pub use content::LocalContentResolver;pub use error::Result;pub use init::initialize_templates;pub use server::ServerConfig;pub use server::ServerState;pub use server::build_router;pub use templates::AGENTS_MD;pub use templates::FAVICON_SVG;pub use templates::render_index_html;
Modules§
- content
- Content resolution from a content root directory.
- error
- Error types with HTTP status code mapping.
- init
- Site initialization - writes template files if missing.
- server
- HTTP server and Axum router.
- templates
- Embedded templates (AGENTS.md, favicon.svg, index.html).