progit_plugin_sdk/traits/mod.rs
1// SPDX-License-Identifier: LSL-1.0
2// Copyright (c) 2025 Markus Maiwald
3
4//! Plugin trait definitions
5//!
6//! This module defines the contract between ProGit and plugins.
7//!
8//! ## Trait Hierarchy
9//!
10//! ```text
11//! Plugin (core trait)
12//! ├── IssuePlugin (issue lifecycle convenience)
13//! ├── SyncPlugin (sync operation convenience)
14//! ├── IntegrationPlugin (external system sync)
15//! └── AnalyticsPlugin (metrics and reporting)
16//! ```
17//!
18//! ## Usage
19//!
20//! Most plugins only need to implement the base `Plugin` trait.
21//! The specialized traits (`IntegrationPlugin`, `AnalyticsPlugin`) are
22//! for plugins that provide specific functionality.
23
24mod core;
25mod integration;
26mod analytics;
27
28// Experimental APIs — landing as `experimental_*` per the design lesson:
29// never stabilize a trait surface before a real consumer has used it in
30// production. Promote to stable once their first plugin ships.
31pub mod experimental_diff_renderer;
32pub mod experimental_fragments;
33
34// Re-export everything from core
35pub use core::*;
36
37// Re-export integration types
38pub use integration::{
39 AuthType,
40 ConflictResolution,
41 ExternalLink,
42 FieldMappings,
43 IntegrationInfo,
44 IntegrationPlugin,
45 SyncResult,
46 SyncStatus,
47};
48
49// Re-export analytics types
50pub use analytics::{
51 AnalyticsPlugin,
52 AnalyticsQuery,
53 DataPoint,
54 DateRange,
55 ExportFormat,
56 IssueSnapshot,
57 MetricType,
58 MetricValue,
59 Report,
60 ReportType,
61 Sprint,
62 StatusTransition,
63 Trend,
64 TrendDirection,
65};