Skip to main content

sac/commands/
mod.rs

1use std::collections::HashMap;
2use std::path::{Path, PathBuf};
3use std::sync::Arc;
4
5use anyhow::{Context, Result};
6use serde::Deserialize;
7
8use crate::paths::sac_home_dir;
9
10const MAX_SCAN_DEPTH: usize = 4;
11const MAX_SCAN_DIRS: usize = 500;
12
13mod discovery;
14mod frontmatter;
15mod registry;
16mod template;
17
18pub use registry::CommandRegistry;
19
20use discovery::*;
21use frontmatter::*;
22
23#[derive(Clone, Debug)]
24pub struct CommandRecord {
25    pub name: String,
26    pub description: String,
27    pub agent: Option<String>,
28    pub model: Option<String>,
29    pub subtask: bool,
30    pub template: String,
31    pub source_path: PathBuf,
32}
33
34#[derive(Clone, Debug)]
35pub struct CommandCatalogEntry {
36    pub name: String,
37    pub description: String,
38}