Expand description
Shared task-store primitives for AgentStateGraph consumers.
This crate establishes the pattern for how AgentStateGraph handles
opinionated-but-shared primitives: they live in sibling crates under
crates/agentstategraph-<name>, built on top of the primitive
Repository API. Consumers that don’t need tasks don’t depend on this
crate; the core stays minimal.
§Example
use agentstategraph::Repository;
use agentstategraph_storage::SqliteStorage;
use agentstategraph_tasks::{Priority, Proof, TaskStore};
use std::sync::Arc;
let repo = Arc::new(Repository::new(Box::new(SqliteStorage::in_memory().expect("in-memory sqlite"))));
repo.init().unwrap();
let store = TaskStore::new(repo, "/plans", "claude-code");
store
.create_plan("main", "website-v2", Some("Brand pivot".into()))
.unwrap();
let task = store
.add_task(
"main",
"website-v2",
"Rewrite hero",
Priority::High,
None,
vec![],
None,
)
.unwrap();
store.start_task("main", "website-v2", &task.id).unwrap();
store
.complete_task(
"main",
"website-v2",
&task.id,
Proof::commit("abc123"),
)
.unwrap();Re-exports§
pub use error::TaskStoreError;pub use renumber::Renumbering;pub use state::Transition;pub use store::AddTaskOptions;pub use store::TaskStore;pub use types::MAX_NOTES_BYTES;pub use types::OnCompleteHook;pub use types::Plan;pub use types::PlanStatus;pub use types::Priority;pub use types::Proof;pub use types::ProofKind;pub use types::Task;pub use types::TaskId;pub use types::TaskStatus;pub use verifier::NoopVerifier;pub use verifier::Verifier;pub use verifier::VerifyEntry;pub use verifier::VerifyReport;pub use verifier::VerifyResult;
Modules§
- error
- Error type for
TaskStoreoperations. - paths
- Path construction helpers.
- renumber
- Merge-safe task ids (DESIGN.md Plan G t-010).
- state
- Task state-machine validation.
- store
TaskStore— handle bound to aRepository+ path prefix.- types
- Public data types for plans, tasks, and proofs.
- verifier
- Proof verification surface.