statespace-tool-runtime
Core tool execution runtime for Statespace - an open-source AI tool execution platform.
This crate provides the foundational types and execution logic for AI tools:
- Tool parsing: Parse commands into typed
BuiltinToolvariants - Frontmatter: Parse YAML/TOML frontmatter from markdown files
- Specification validation: Validate commands against tool specifications
- Execution: Execute tools in a sandboxed environment with limits
- Security: SSRF protection, path traversal prevention
Usage
use ;
use PathBuf;
// Parse a command
let tool = from_command?;
// Execute with limits
let executor = new;
let output = executor.execute.await?;
Architecture
This crate follows FP-Rust patterns:
- Pure modules (no I/O):
frontmatter,spec,security,protocol,validation,tools - Effectful edge:
executor(filesystem, subprocess, HTTP)
License
MIT