Skip to content

Commit b4fd1e8

Browse files
Alex HolmbergAlex Holmberg
authored andcommitted
feat: vendor ag-ui-core and ag-ui-server crates
Move AG-UI protocol crates into the repository to fix release-plz dependency resolution issues. These crates enable frontend connectivity for agent mode.
1 parent 6e50cc7 commit b4fd1e8

20 files changed

Lines changed: 7523 additions & 2 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ futures-util = "0.3"
8585
rig-core = { version = "0.28", features = ["derive", "image"] }
8686

8787
# AG-UI Protocol - enables frontend connectivity for agent mode
88-
ag-ui-core = { path = "../ag-ui-sdk/crates/ag-ui-core" }
89-
ag-ui-server = { path = "../ag-ui-sdk/crates/ag-ui-server" }
88+
ag-ui-core = { path = "crates/ag-ui-core" }
89+
ag-ui-server = { path = "crates/ag-ui-server" }
9090
axum = { version = "0.8", features = ["ws"] }
9191
tower-http = { version = "0.6", features = ["cors"] }
9292
tokio-stream = { version = "0.1", features = ["sync"] }

crates/ag-ui-core/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "ag-ui-core"
3+
version = "0.1.0"
4+
edition = "2024"
5+
rust-version = "1.88"
6+
license = "MIT"
7+
description = "Core type library for AG-UI protocol - Syncable SDK"
8+
readme = "README.md"
9+
10+
[dependencies]
11+
thiserror = "2"
12+
serde = { version = "1", features = ["derive"] }
13+
serde_json = "1"
14+
json-patch = "3"
15+
jsonptr = "0.6"
16+
uuid = { version = "1", features = ["v4", "serde"] }

crates/ag-ui-core/src/error.rs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//! Error types for AG-UI core operations.
2+
3+
use thiserror::Error;
4+
5+
/// Errors that can occur in AG-UI core operations.
6+
#[derive(Debug, Error)]
7+
pub enum AgUiError {
8+
/// Error during JSON serialization/deserialization
9+
#[error("Serialization error: {0}")]
10+
Serialization(#[from] serde_json::Error),
11+
12+
/// Validation error for event or message data
13+
#[error("Validation error: {0}")]
14+
Validation(String),
15+
16+
/// Invalid event format or structure
17+
#[error("Invalid event: {0}")]
18+
InvalidEvent(String),
19+
20+
/// Invalid message format or content
21+
#[error("Invalid message: {0}")]
22+
InvalidMessage(String),
23+
24+
/// State operation error
25+
#[error("State error: {0}")]
26+
State(String),
27+
}
28+
29+
/// Result type alias using AgUiError
30+
pub type Result<T> = std::result::Result<T, AgUiError>;

0 commit comments

Comments
 (0)