Skip to main content

astrid_types/
lib.rs

1//! Shared data types for the Astrid secure agent runtime.
2//!
3//! This crate provides the canonical definitions for:
4//! - IPC payload schemas (cross-boundary messaging between WASM guests and host)
5//! - LLM message, tool, and streaming types
6//! - Kernel management API request/response types
7//!
8//! It has minimal dependencies (serde, uuid) and is WASM-compatible, making it
9//! suitable for use in both the kernel runtime and user-space capsule SDKs.
10
11#![deny(unsafe_code)]
12#![deny(missing_docs)]
13#![deny(clippy::all)]
14#![deny(unreachable_pub)]
15#![deny(clippy::unwrap_used)]
16#![cfg_attr(test, allow(clippy::unwrap_used))]
17
18pub mod ipc;
19pub mod kernel;
20pub mod llm;
21
22pub use ipc::{IpcMessage, IpcPayload, OnboardingField, OnboardingFieldType, SelectionOption};
23pub use kernel::{
24    CapsuleMetadataEntry, CommandInfo, DaemonStatus, KernelRequest, KernelResponse,
25    SYSTEM_SESSION_UUID,
26};
27pub use llm::{
28    ContentPart, LlmResponse, LlmToolDefinition, Message, MessageContent, MessageRole, StopReason,
29    StreamEvent, ToolCall, ToolCallResult, Usage,
30};