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//!
7//! It has zero dependency on `astrid-core` and minimal dependencies overall
8//! (serde, uuid, chrono with serde-only features), so it compiles on
9//! `wasm32-unknown-unknown` for capsule SDK consumption without dragging
10//! in the kernel.
11//!
12//! Kernel-management RPC types (CLI ↔ daemon: `KernelRequest`,
13//! `KernelResponse`, etc.) live in `astrid_core::kernel_api`. They depend
14//! on `PrincipalId` and `Quotas` and therefore cannot live here.
15
16#![deny(unsafe_code)]
17#![deny(missing_docs)]
18#![deny(clippy::all)]
19#![deny(unreachable_pub)]
20#![deny(clippy::unwrap_used)]
21#![cfg_attr(test, allow(clippy::unwrap_used))]
22
23pub mod ipc;
24pub mod llm;
25
26pub use ipc::{IpcMessage, IpcPayload, OnboardingField, OnboardingFieldType, SelectionOption};
27pub use llm::{
28    ContentPart, LlmResponse, LlmToolDefinition, Message, MessageContent, MessageRole, StopReason,
29    StreamEvent, ToolCall, ToolCallResult, Usage,
30};