Skip to main content

ta_changeset/
lib.rs

1//! # ta-changeset
2//!
3//! The universal "staged mutation" data model for Trusted Autonomy.
4//!
5//! A [`ChangeSet`] represents any pending change — a file patch, email draft,
6//! DB mutation, or social media post. All changes are collected (staged) by
7//! default and bundled into a [`DraftPackage`] for human review.
8//!
9//! The data model aligns with `schema/draft_package.schema.json`.
10
11pub mod artifact_kind;
12pub mod artifact_type;
13pub mod asset_diff;
14pub mod changeset;
15pub mod channel_registry;
16pub mod diff;
17pub mod diff_handlers;
18pub mod draft_package;
19pub mod draft_resolver;
20pub mod error;
21pub mod explanation;
22pub mod interaction;
23pub mod interactive_session_store;
24pub mod milestone_draft;
25pub mod multi_channel;
26pub mod output_adapters;
27pub mod plugin;
28pub mod plugin_resolver;
29pub mod pr_package;
30pub mod project_manifest;
31pub mod registry_client;
32pub mod review_channel;
33pub mod review_session;
34pub mod review_session_store;
35pub mod secret_scan;
36pub mod session_channel;
37pub mod sources;
38pub mod supervisor;
39pub mod supervisor_review;
40pub mod terminal_channel;
41pub mod uri_pattern;
42pub mod webhook_channel;
43
44pub use artifact_kind::ArtifactKind;
45pub use artifact_type::ArtifactType;
46pub use asset_diff::{
47    run_asset_diff, AssetDiffConfig, AssetDiffResult, AssetDiffSummary, AssetSupervisorVerdict,
48    ChangeType as AssetChangeType, VisualDiffOutput, VisualDiffType,
49};
50pub use changeset::{ChangeKind, ChangeSet, CommitIntent};
51pub use channel_registry::{
52    ChannelCapabilitySet, ChannelFactory, ChannelRegistry, ChannelRouteConfig,
53    ChannelRoutingConfig, EscalationRouteConfig, NotifyRouteConfig, ReviewRouteConfig, TaConfig,
54};
55pub use diff::DiffContent;
56pub use diff_handlers::{DiffHandlerError, DiffHandlersConfig, HandlerRule};
57pub use draft_package::{
58    ActionKind, ApplyProvenance, ApprovalRecord, DesignAlternative, DraftPackage, DraftStatus,
59    ExplanationTiers, IgnoredArtifact, PendingAction, ValidationEntry, VcsTrackingInfo,
60};
61pub use draft_resolver::{draft_canonical_id, resolve_draft, DraftResolveError};
62pub use error::ChangeSetError;
63pub use explanation::ExplanationSidecar;
64pub use interaction::{
65    ChannelCapabilities, Decision, InteractionKind, InteractionRequest, InteractionResponse,
66    Notification, NotificationLevel, Urgency,
67};
68pub use interactive_session_store::InteractiveSessionStore;
69pub use multi_channel::{MultiChannelStrategy, MultiReviewChannel};
70pub use output_adapters::{DetailLevel, OutputAdapter, OutputFormat, RenderContext};
71pub use review_channel::{build_channel, ReviewChannel, ReviewChannelConfig, ReviewChannelError};
72pub use review_session::{
73    ArtifactReview, Comment, CommentThread, DispositionCounts, ReviewReasoning, ReviewSession,
74    ReviewState, SessionNote,
75};
76pub use review_session_store::ReviewSessionStore;
77pub use session_channel::{
78    HumanInput, InteractiveConfig, InteractiveSession, InteractiveSessionState, OutputStream,
79    SessionChannel, SessionChannelError, SessionEvent, SessionMessage,
80};
81pub use sources::{
82    CachedItem, ExternalSource, LockEntry, Lockfile, PackageManifest, SourceCache, SourceError,
83};
84pub use supervisor::{
85    DependencyGraph, SupervisorAgent, ValidationError, ValidationResult, ValidationWarning,
86};
87pub use supervisor_review::{
88    build_supervisor_prompt, fallback_supervisor_review, invoke_supervisor_agent,
89    load_constitution, SupervisorReview, SupervisorRunConfig, SupervisorVerdict,
90};
91pub use terminal_channel::{AutoApproveChannel, TerminalChannel, TerminalSessionChannel};
92pub use uri_pattern::{filter_uris, matches_uri};
93pub use webhook_channel::WebhookChannel;
94
95pub use milestone_draft::{MilestoneDraft, PhaseSummary};
96
97// Backwards compatibility: export old names as aliases
98pub use draft_package::DraftPackage as PRPackage;
99pub use draft_package::DraftStatus as PRStatus;