fix: ensure retry-config and success-criteria are populated in openapi spec (#3575)
This commit is contained in:
@@ -393,6 +393,8 @@ derive_utoipa!(Annotations as AnnotationsSchema);
|
||||
goose::recipe::RecipeParameterRequirement,
|
||||
goose::recipe::Response,
|
||||
goose::recipe::SubRecipe,
|
||||
goose::agents::types::RetryConfig,
|
||||
goose::agents::types::SuccessCheck,
|
||||
))
|
||||
)]
|
||||
pub struct ApiDoc;
|
||||
|
||||
@@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::{mpsc, Mutex};
|
||||
use utoipa::ToSchema;
|
||||
|
||||
/// Type alias for the tool result channel receiver
|
||||
pub type ToolResultReceiver = Arc<Mutex<mpsc::Receiver<(String, ToolResult<Vec<Content>>)>>>;
|
||||
@@ -16,7 +17,7 @@ pub const DEFAULT_RETRY_TIMEOUT_SECONDS: u64 = 300;
|
||||
pub const DEFAULT_ON_FAILURE_TIMEOUT_SECONDS: u64 = 600;
|
||||
|
||||
/// Configuration for retry logic in recipe execution
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
pub struct RetryConfig {
|
||||
/// Maximum number of retry attempts before giving up
|
||||
pub max_retries: u32,
|
||||
@@ -59,7 +60,7 @@ impl RetryConfig {
|
||||
}
|
||||
|
||||
/// A single success check to validate recipe completion
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
#[serde(tag = "type")]
|
||||
pub enum SuccessCheck {
|
||||
/// Execute a shell command and check its exit status
|
||||
|
||||
Reference in New Issue
Block a user