skrills_intelligence/context/
mod.rs1mod dependencies;
4mod detector;
5mod git_context;
6
7pub use dependencies::{parse_cargo_toml, parse_package_json, parse_pyproject_toml};
8pub use detector::{
9 analyze_project, analyze_project_with_options, detect_frameworks, detect_languages,
10 AnalyzeProjectOptions,
11};
12pub use git_context::extract_git_keywords;
13
14use serde::{Deserialize, Serialize};
15use std::collections::HashMap;
16use std::path::PathBuf;
17
18#[derive(Debug, Clone, Default, Serialize, Deserialize)]
20pub struct ProjectProfile {
21 pub languages: HashMap<String, LanguageInfo>,
23 pub dependencies: HashMap<String, Vec<DependencyInfo>>,
25 pub description: Option<String>,
27 pub keywords: Vec<String>,
29 pub git_keywords: Vec<String>,
31 pub frameworks: Vec<String>,
33 pub project_type: ProjectType,
35 pub root: PathBuf,
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
41pub struct LanguageInfo {
42 pub file_count: usize,
44 pub extensions: Vec<String>,
46 pub primary: bool,
48}
49
50#[derive(Debug, Clone, Serialize, Deserialize)]
52pub struct DependencyInfo {
53 pub name: String,
55 pub version: Option<String>,
57 pub dev: bool,
59}
60
61#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
63pub enum ProjectType {
64 #[default]
66 Unknown,
67 Library,
69 Application,
71 Plugin,
73 Monorepo,
75 Service,
77}