Some checks failed
Documentation Lint & Validation / Markdown Linting (push) Has been cancelled
Documentation Lint & Validation / Validate mdBook Configuration (push) Has been cancelled
Documentation Lint & Validation / Content & Structure Validation (push) Has been cancelled
Documentation Lint & Validation / Lint & Validation Summary (push) Has been cancelled
mdBook Build & Deploy / Build mdBook (push) Has been cancelled
mdBook Build & Deploy / Documentation Quality Check (push) Has been cancelled
mdBook Build & Deploy / Deploy to GitHub Pages (push) Has been cancelled
mdBook Build & Deploy / Notification (push) Has been cancelled
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
- New vapora-capabilities crate: CapabilitySpec, Capability trait, CapabilityRegistry
(parking_lot RwLock), CapabilityLoader (TOML overrides), 3 built-ins
(code-reviewer, doc-generator, pr-monitor), 22 tests
- Move AgentDefinition to vapora-shared to break capabilities↔agents circular dep
- Wire system_prompt into AgentExecutor via LLMRouter.complete_with_budget
- AgentCoordinator: in-process task dispatch via DashMap<String, Sender<TaskAssignment>>
- server.rs: bootstrap CapabilityRegistry + LLMRouter from env, spawn executors per capability
- Landing page: 620 tests, 21 crates, Capability Packages feature box
- docs: capability-packages feature guide, ADR-0037, CHANGELOG, SUMMARY
EOF
45 lines
1.6 KiB
Rust
45 lines
1.6 KiB
Rust
use serde::{Deserialize, Serialize};
|
||
|
||
/// Full specification for deploying a domain-optimized agent.
|
||
///
|
||
/// Produced by [`vapora_capabilities::CapabilityRegistry::activate`] and
|
||
/// consumed by [`vapora_agents::registry::AgentMetadata`] construction.
|
||
/// Kept in `vapora-shared` so both crates can reference it without a
|
||
/// circular dependency.
|
||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||
pub struct AgentDefinition {
|
||
/// Agent role name used for task routing (e.g., `"code_reviewer"`).
|
||
pub role: String,
|
||
/// Human-readable description shown in UIs and logs.
|
||
pub description: String,
|
||
/// Preferred LLM provider name (e.g., `"claude"`).
|
||
pub llm_provider: String,
|
||
/// Preferred model within the provider (e.g., `"claude-opus-4-6"`).
|
||
pub llm_model: String,
|
||
/// Whether multiple instances may run concurrently.
|
||
#[serde(default)]
|
||
pub parallelizable: bool,
|
||
/// Assignment priority 0–100.
|
||
#[serde(default = "default_priority")]
|
||
pub priority: u32,
|
||
/// Task-type strings used by the coordinator for capability-based routing.
|
||
#[serde(default)]
|
||
pub capabilities: Vec<String>,
|
||
/// Domain-optimized system prompt injected before every task.
|
||
/// `None` falls back to the agent's generic prompt.
|
||
#[serde(default)]
|
||
pub system_prompt: Option<String>,
|
||
}
|
||
|
||
fn default_priority() -> u32 {
|
||
50
|
||
}
|
||
|
||
impl AgentDefinition {
|
||
/// Builder: attach a domain-optimized system prompt.
|
||
pub fn with_system_prompt(mut self, prompt: impl Into<String>) -> Self {
|
||
self.system_prompt = Some(prompt.into());
|
||
self
|
||
}
|
||
}
|