Skip to main content

zeph_core/agent/
skill_commands.rs

1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! [`zeph_commands::SkillAccess`] implementation for [`Agent<C>`]: `/skill`, `/skills`, and
5//! `/feedback`.
6//!
7//! Not to be confused with [`super::learning::skill_commands`], which holds the underlying
8//! `handle_skill_command_as_string` helper this impl delegates to.
9//!
10//! [`Agent<C>`]: super::Agent
11
12use std::future::Future;
13use std::pin::Pin;
14
15use zeph_commands::{CommandError, SkillAccess};
16
17use super::Agent;
18use super::command_macros::delegate_cmd;
19use crate::channel::Channel;
20
21impl<C: Channel + Send + 'static> SkillAccess for Agent<C> {
22    // ----- /skill -----
23
24    delegate_cmd!(handle_skill, handle_skill_command_as_string, args: &'a str => String);
25
26    // ----- /skills -----
27
28    delegate_cmd!(handle_skills, handle_skills_as_string, args: &'a str => String);
29
30    // ----- /feedback -----
31
32    delegate_cmd!(handle_feedback_command, handle_feedback_as_string, args: &'a str => String);
33}