mars_agents/target/
agents.rs1use crate::lock::ItemKind;
11use crate::types::DestPath;
12
13use super::TargetAdapter;
14
15#[derive(Debug)]
16pub struct AgentsAdapter;
17
18impl TargetAdapter for AgentsAdapter {
19 fn name(&self) -> &str {
20 ".agents"
21 }
22
23 fn skill_variant_key(&self) -> Option<&str> {
24 None
25 }
26
27 fn default_dest_path(&self, kind: ItemKind, name: &str) -> Option<DestPath> {
28 let path = match kind {
29 ItemKind::Agent => format!("agents/{name}.md"),
30 ItemKind::Skill => format!("skills/{name}"),
31 ItemKind::Hook => format!("hooks/{name}"),
32 ItemKind::McpServer => format!("mcp/{name}"),
33 ItemKind::BootstrapDoc => format!("bootstrap/{name}/BOOTSTRAP.md"),
34 };
35 Some(DestPath::from(path.as_str()))
36 }
37}