Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ Changelog tracking starts with 0.2.0. Prior versions were not tracked.

### Changed

- **The SDK now owns its capsule-facing IPC and LLM Rust types.** The existing
`astrid_sdk::types::{ipc,llm}` paths and direct re-exports are preserved, but
`astrid-sdk` no longer depends on core's separately published `astrid-types`
crate. Canonical WIT and serialized wire shapes remain the compatibility
boundary; golden tests pin the legacy capsule-facing JSON forms. (#66)

- **Bumped the `contracts` submodule to `278dbca`** (canonical wit `main` with #14 un-stubbed
persistent stdin, #17 `astrid:http@1.1.0`, #16 session 1.1.0, and #20 — process file-injection
moved off the frozen `astrid:process@1.0.0` onto a new additive `astrid:process@1.1.0`). #20
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ rust-version = "1.94"
astrid-sdk = { path = "astrid-sdk", version = "0.7.1" }
astrid-sdk-macros = { path = "astrid-sdk-macros", version = "0.7.1" }
astrid-sys = { path = "astrid-sys", version = "0.7.1" }
astrid-types = { version = "0.7" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "2.0"
Expand Down
4 changes: 2 additions & 2 deletions astrid-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ include = ["src/**/*", "wit/**/*", "Cargo.toml", "LICENSE-*", "README.md"]
[dependencies]
astrid-sdk-macros = { workspace = true, optional = true }
astrid-sys = { workspace = true }
astrid-types = { workspace = true }
borsh = { version = "1.0.0", features = ["derive"] }
chrono = { workspace = true }
schemars = "0.8"
serde = { workspace = true }
serde_json = { workspace = true }
Expand All @@ -22,7 +22,7 @@ thiserror = { workspace = true }
# routes v4 through `getrandom`, which astrid-sys configures with a
# custom backend on `wasm32-unknown-unknown` that calls
# `astrid:sys.random-bytes`.
uuid = { version = "1.10", default-features = false, features = ["v4", "rng-getrandom"] }
uuid = { version = "1.10", default-features = false, features = ["v4", "serde", "rng-getrandom"] }

[features]
default = ["derive"]
Expand Down
40 changes: 2 additions & 38 deletions astrid-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,44 +63,8 @@ use borsh::{BorshDeserialize, BorshSerialize};
use serde::{Deserialize, Serialize, de::DeserializeOwned};
use thiserror::Error;

/// Shared Astrid data types (IPC payloads, LLM schemas, kernel API).
///
/// Re-exported from [`astrid_types`]. SDK-specific types like [`CallerContext`]
/// are also available here.
pub mod types {
use serde::{Deserialize, Serialize};

// Sub-modules (re-exported for `astrid_sdk::types::ipc::*` access).
//
// `kernel`/`kernel_api` is intentionally NOT re-exported here —
// those CLI ↔ daemon RPC types now live in `astrid_core::kernel_api`
// (post-PR#752 decoupling) and don't belong in capsule space.
// Capsules use `ipc` and `llm` types only.
pub use astrid_types::ipc;
pub use astrid_types::llm;

// IPC types
pub use astrid_types::ipc::{
IpcMessage, IpcPayload, OnboardingField, OnboardingFieldType, SelectionOption,
};

// LLM types
pub use astrid_types::llm::{
ContentPart, LlmResponse, LlmToolDefinition, Message, MessageContent, MessageRole,
StopReason, StreamEvent, ToolCall, ToolCallResult, Usage,
};

/// Identifies the caller that triggered the current capsule execution.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CallerContext {
/// UUID of the capsule that originated the IPC message.
pub source_id: String,
/// The acting principal (user ID), if available.
pub principal: Option<String>,
/// ISO 8601 timestamp of the originating message.
pub timestamp: String,
}
}
/// Capsule-facing IPC and LLM wire types owned by this SDK.
pub mod types;
pub use borsh;
pub use serde;
pub use serde_json;
Expand Down
Loading
Loading