Skip to main content

foundry_mcp/types/
project.rs

1//! Project-related type definitions
2
3use serde::{Deserialize, Serialize};
4use std::path::PathBuf;
5
6use crate::core::backends::ResourceLocator;
7
8/// Core project structure
9#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct Project {
11    pub name: String,
12    pub created_at: String,
13    pub path: PathBuf, // Keep for backward compatibility (deprecated)
14
15    // New optional fields for backend abstraction
16    #[serde(skip_serializing_if = "Option::is_none")]
17    pub location_hint: Option<String>,
18    #[serde(skip_serializing_if = "Option::is_none")]
19    pub locator: Option<ResourceLocator>,
20
21    // Existing fields
22    pub vision: Option<String>,
23    pub tech_stack: Option<String>,
24    pub summary: Option<String>,
25}
26
27/// Project creation parameters
28#[derive(Debug, Clone, Serialize, Deserialize)]
29pub struct ProjectConfig {
30    pub name: String,
31    pub vision: String,
32    pub tech_stack: String,
33    pub summary: String,
34}
35
36/// Project metadata for listing operations
37#[derive(Debug, Clone, Serialize, Deserialize)]
38pub struct ProjectMetadata {
39    pub name: String,
40    pub created_at: String,
41    pub spec_count: usize,
42    pub last_modified: String,
43}