feat(agents): advertise declared agent variables in agent__list_available

This commit is contained in:
Dark-Alex-17 committed 2026-09-12 01:37:20 -06:00
1 parent eb7d1421da
commit 1ec7916816
4 files changed
+84 -10

No files matched your search

+1 -1
View File
@@ -1258,7 +1258,7 @@ fn load_agent_description(name: &str) -> String {
String::new()
}
fn load_agent_variables(name: &str) -> Vec<AgentVariable> {
pub fn load_agent_variables(name: &str) -> Vec<AgentVariable> {
if let Ok(config) = AgentConfig::load(&paths::agent_config_file(name)) {
return config.variables;
}
+1 -1
View File
@@ -28,7 +28,7 @@ pub(crate) use self::agent::AgentConfig;
pub(crate) use self::agent::default_max_agent_depth;
pub use self::agent::{
Agent, AgentVariable, AgentVariables, complete_agent_variables, list_agents,
list_agents_with_descriptions,
list_agents_with_descriptions, load_agent_variables,
};
#[allow(unused_imports)]
pub use self::app_config::AppConfig;
+1 -1
View File
@@ -87,7 +87,7 @@ pub(in crate::config) const DEFAULT_SPAWN_INSTRUCTIONS: &str = indoc! {"
| `agent__spawn` | Spawn a subagent in the background. Returns an `id` immediately. Optional `variables` (string map) sets the target agent's declared variables, overriding inherited values. |
| `agent__check` | Non-blocking status probe: running or finished. Never returns/consumes the result — use `agent__collect`. |
| `agent__collect` | Blocking wait: wait for an agent to finish, return its output. |
| `agent__list_available` | List all agent types you can spawn (name + description). Use this to discover specialists before calling `agent__spawn`. |
| `agent__list_available` | List all agent types you can spawn (name + description + declared variables). Use this to discover specialists and the `variables` they accept before calling `agent__spawn`. |
| `agent__list_running` | List all subagents YOU have spawned, with their status. |
| `agent__cancel` | Cancel a running agent by ID. |
| `agent__task_create` | Create a task in the dependency-aware task queue. Optional `variables` (string map) is passed to the auto-dispatched agent. |