diff options
| author | soryu <soryu@soryu.co> | 2026-01-25 04:39:37 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-25 04:39:37 +0000 |
| commit | cb4f2fc40dbabb40de948512eee74c7e46264665 (patch) | |
| tree | 0a4f142609dceaf6cf6eafa4fa6a59beff4b1f80 /makima/src/server/handlers/templates.rs | |
| parent | c908854e7e3571c99cce9f46497ce5337ea0aed1 (diff) | |
| download | soryu-cb4f2fc40dbabb40de948512eee74c7e46264665.tar.gz soryu-cb4f2fc40dbabb40de948512eee74c7e46264665.zip | |
Add automatic phase transitions and fix PR creation
Diffstat (limited to 'makima/src/server/handlers/templates.rs')
| -rw-r--r-- | makima/src/server/handlers/templates.rs | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/makima/src/server/handlers/templates.rs b/makima/src/server/handlers/templates.rs index 5cad44f..6d95e86 100644 --- a/makima/src/server/handlers/templates.rs +++ b/makima/src/server/handlers/templates.rs @@ -7,76 +7,6 @@ use utoipa::ToSchema; use crate::llm::templates; use crate::llm::templates::ContractTypeTemplate; -// ============================================================================= -// Contract Type Templates -// ============================================================================= - -/// Contract type template for API response -#[derive(Debug, Serialize, ToSchema)] -#[serde(rename_all = "camelCase")] -pub struct ContractTypeTemplate { - /// Template identifier (e.g., "simple", "specification") - pub id: String, - /// Display name - pub name: String, - /// Description of the contract type workflow - pub description: String, - /// Ordered list of phases for this contract type - pub phases: Vec<String>, - /// Default starting phase - pub default_phase: String, - /// Whether this is a built-in type (always available) - pub is_builtin: bool, -} - -/// Response for listing contract types -#[derive(Debug, Serialize, ToSchema)] -pub struct ListContractTypesResponse { - pub types: Vec<ContractTypeTemplate>, -} - -/// List available contract type templates -#[utoipa::path( - get, - path = "/api/v1/contract-types", - responses( - (status = 200, description = "Contract types retrieved successfully", body = ListContractTypesResponse) - ), - tag = "contract-types" -)] -pub async fn list_contract_types() -> impl IntoResponse { - let types = vec![ - ContractTypeTemplate { - id: "simple".to_string(), - name: "Simple".to_string(), - description: "Plan \u{2192} Execute: Simple workflow with a plan document".to_string(), - phases: vec!["plan".to_string(), "execute".to_string()], - default_phase: "plan".to_string(), - is_builtin: true, - }, - ContractTypeTemplate { - id: "specification".to_string(), - name: "Specification".to_string(), - description: "Research \u{2192} Specify \u{2192} Plan \u{2192} Execute \u{2192} Review: Full specification-driven development with TDD".to_string(), - phases: vec![ - "research".to_string(), - "specify".to_string(), - "plan".to_string(), - "execute".to_string(), - "review".to_string(), - ], - default_phase: "research".to_string(), - is_builtin: true, - }, - ]; - - ( - StatusCode::OK, - Json(ListContractTypesResponse { types }), - ) - .into_response() -} - /// Query parameters for listing templates #[derive(Debug, Deserialize, ToSchema)] pub struct ListTemplatesQuery { |
