Skip to main content

agentstategraph_core/
lib.rs

1//! agentstategraph-core — Core types and algorithms for AgentStateGraph.
2//!
3//! This crate contains the foundational types with zero I/O dependencies:
4//! - Objects (Atom, Node) with content-addressing via BLAKE3
5//! - Commits with intent, authority, and provenance metadata
6//! - Path addressing for navigating state trees
7//! - Error types
8//!
9//! All types are serializable and designed for both agent and human use.
10
11pub mod commit;
12pub mod diff;
13pub mod epoch;
14pub mod error;
15pub mod intent;
16pub mod lifecycle;
17pub mod merge;
18pub mod namespace;
19pub mod object;
20pub mod path;
21pub mod query;
22pub mod schema;
23pub mod session;
24
25// Re-export primary types for convenience
26pub use commit::{Commit, CommitBuilder};
27pub use diff::{DiffOp, DiffValue, ObjectResolver};
28pub use epoch::{
29    CrossRefType, CrossReference, Epoch, EpochEntry, EpochError, EpochScope, EpochStatus, Registry,
30};
31pub use error::CoreError;
32pub use intent::{
33    AgentId, AuthScope, Authority, DelegationLink, Deviation, DeviationImpact, FormatHint, Intent,
34    IntentCategory, IntentId, IntentLifecycle, IntentStatus, NotificationPolicy, Outcome,
35    Principal, Resolution, SessionId, TAG_GIT_REVISION, TAG_PIN_STATE, ToolCall, Urgency,
36};
37pub use lifecycle::{LifecycleError, is_valid_transition, transition};
38pub use merge::{Conflict, ConflictValue, MergeResult};
39pub use namespace::{MAX_NAMESPACE_LEN, Namespace, NamespaceError};
40pub use object::{Atom, Node, Object, ObjectId};
41pub use path::{PathComponent, PathError, StatePath};
42pub use query::{BlameEntry, Query, QueryFilters, QueryOptions, QueryTarget, filter_commits};
43pub use schema::{EnforcementMode, MergeHint, Schema, ValidationResult};
44pub use session::{Session, SessionStatus};