| Crates.io | miyabi-approval |
| lib.rs | miyabi-approval |
| version | 0.1.2 |
| created_at | 2025-11-22 08:28:40.819066+00 |
| updated_at | 2025-11-22 08:28:40.819066+00 |
| description | Miyabi Approval System - Human-in-the-Loop workflow approval gates |
| homepage | |
| repository | https://github.com/ShunsukeHayashi/Miyabi |
| max_upload_size | |
| id | 1945076 |
| size | 150,913 |
Status: Stable Category: Infrastructure
Human-in-the-Loop workflow approval gates system. Provides multi-approver support, state persistence, timeout handling, and notification integration for workflow orchestration.
miyabi-workflowuse miyabi_approval::{ApprovalGate, ApprovalStore};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create approval gate
let gate = ApprovalGate::builder("deploy-production")
.required_approvers(vec!["tech-lead".to_string(), "ciso".to_string()])
.timeout_seconds(86400) // 24 hours
.build()?;
// Pause workflow at approval gate
let approval_id = gate.create_approval("workflow-123").await?;
// Later: approve the workflow
gate.approve(&approval_id, "tech-lead", Some("LGTM".to_string())).await?;
// Check if all approvals received
if gate.is_approved(&approval_id).await? {
println!("Workflow approved!");
}
Ok(())
}
Central approval gate manager with builder pattern for configuration.
Persistent storage for approval states using Sled embedded database.
Notification system supporting Discord and Slack integrations.
tokio: Async runtimeserde, serde_json: Serializationsled: Embedded database for state persistencereqwest: HTTP client for notificationschrono: Timestamp managementmiyabi-workflow: Workflow integrationmiyabi-workflow: Workflow orchestration frameworkmiyabi-core: Core utilitiesmiyabi-types: Shared type definitionsApache-2.0