systemprompt_models/services/external_agent.rs
1//! External-agent ("super-agent") catalog config.
2//!
3//! External agents are native apps and CLI tools that run **off** our
4//! infrastructure (Claude Desktop, Codex CLI, Claude Code) and connect to the
5//! gateway via the systemprompt-bridge binary
6//! (`systemprompt-core/bin/bridge`). They are intentionally distinct from
7//! [`AgentConfig`](super::AgentConfig), which describes server-side A2A agents
8//! we run.
9//!
10//! The bridge owns its own static `HostApp` registry; this gateway-side YAML
11//! is the catalog the admin UI lists and the operator's `enabled` flag.
12//! The `id` field MUST equal the bridge's `HostApp::id()` for the same host
13//! (e.g. `claude_desktop`, `codex_cli`).
14
15use serde::{Deserialize, Serialize};
16use systemprompt_identifiers::ExternalAgentId;
17
18#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
19#[serde(rename_all = "snake_case")]
20pub enum ExternalAgentKind {
21 DesktopApp,
22 CliTool,
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize)]
26#[serde(deny_unknown_fields)]
27pub struct ExternalAgentConfig {
28 pub id: ExternalAgentId,
29 pub display_name: String,
30 pub kind: ExternalAgentKind,
31 pub enabled: bool,
32 #[serde(default)]
33 pub description: String,
34 #[serde(default)]
35 pub platforms: Vec<String>,
36 #[serde(default)]
37 pub docs_url: Option<String>,
38}