Expand description
Grite integration library for Brat.
This crate provides a client for interacting with the Grite CLI to manage convoys and tasks.
§Example
ⓘ
use libbrat_grite::{GriteClient, TaskStatus};
let client = GriteClient::new("/path/to/repo");
// Create a convoy
let convoy = client.convoy_create("Feature: Dark mode", None)?;
// Create a task in the convoy
let task = client.task_create(&convoy.convoy_id, "Implement toggle", None)?;
// Update task status
client.task_update_status(&task.task_id, TaskStatus::Running)?;Re-exports§
pub use state_machine::State;pub use state_machine::StateMachine;pub use state_machine::Transition;pub use state_machine::TransitionError;
Modules§
- reconcile
- Session reconciliation for crash recovery.
- state_
machine - State machine validation for Brat entity lifecycles.
Structs§
- Context
Index Result - Result of context indexing operation.
- Convoy
- A parsed convoy from a Grit issue.
- File
Context - File context information.
- Grite
Client - Client for interacting with the Grite CLI.
- Grite
Issue - A Grit issue as returned by
grite issue show --json. - Grite
Issue Summary - Summary of a Grit issue from list command.
- Lock
Result - Result of a lock acquisition attempt.
- Project
Context Entry - Project context key-value entry.
- Session
- A parsed session from a task issue comment.
- Symbol
- A symbol extracted from a file.
- Symbol
Match - A symbol match from context query.
- Task
- A parsed task from a Grit issue.
- Task
Dependency - A dependency relationship between tasks.
Enums§
- Convoy
Status - Convoy status.
- Dependency
Type - Type of dependency relationship between issues/tasks.
- Grite
Error - Errors that can occur when interacting with Grite.
- Session
Role - Actor role for the session.
- Session
Status - Session lifecycle status.
- Session
Type - Session type: polecat (isolated worktree) or crew (shared).
- Task
Status - Task status.
Functions§
- generate_
convoy_ id - Generate a convoy ID: c-YYYYMMDD-<4hex>
- generate_
session_ id - Generate a session ID: s-YYYYMMDD-<4hex>
- generate_
task_ id - Generate a task ID: t-YYYYMMDD-<4hex>
- is_
valid_ convoy_ id - Check if a string is a valid convoy ID.
- is_
valid_ session_ id - Check if a string is a valid session ID.
- is_
valid_ task_ id - Check if a string is a valid task ID.
- parse_
convoy_ id - Parse a convoy ID, returning (date_str, hex_suffix) if valid.
- parse_
session_ id - Parse a session ID, returning (date_str, hex_suffix) if valid.
- parse_
task_ id - Parse a task ID, returning (date_str, hex_suffix) if valid.