Skip to main content

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;
27pub mod jobs;
28
29// Experimental APIs — landing as `experimental_*` per the design lesson:
30// never stabilize a trait surface before a real consumer has used it in
31// production. Promote to stable once their first plugin ships.
32pub mod experimental_diff_renderer;
33pub mod experimental_fragments;
34
35// Re-export everything from core
36pub use core::*;
37
38// Re-export integration types
39pub use integration::{
40    AuthType,
41    ConflictResolution,
42    ExternalLink,
43    FieldMappings,
44    IntegrationInfo,
45    IntegrationPlugin,
46    SyncResult,
47    SyncStatus,
48};
49
50// Re-export analytics types
51pub use analytics::{
52    AnalyticsPlugin,
53    AnalyticsQuery,
54    DataPoint,
55    DateRange,
56    ExportFormat,
57    IssueSnapshot,
58    MetricType,
59    MetricValue,
60    Report,
61    ReportType,
62    Sprint,
63    StatusTransition,
64    Trend,
65    TrendDirection,
66};