Skip to main content

ag_forge/
lib.rs

1//! Forge review-request adapters, normalized types, and remote detection.
2
3mod adapter_common;
4mod client;
5mod command;
6mod github;
7mod gitlab;
8mod model;
9mod remote;
10
11/// Crate-wide span capture for telemetry tests.
12#[cfg(test)]
13#[path = "telemetry_support_test.rs"]
14mod telemetry_support;
15
16pub(crate) use adapter_common::{
17    ReviewRequestMetadataEdit, ReviewRequestOperations, SyncReviewRequestMetadataConfig,
18    map_parse_error, normalize_provider_label, operation_failed, status_summary_parts,
19};
20#[cfg(any(test, feature = "test-utils"))]
21pub use client::MockReviewRequestClient;
22pub(crate) use client::ReviewRequestAdapter;
23pub use client::{RealReviewRequestClient, ReviewRequestClient};
24pub(crate) use command::{
25    ForgeCommand, ForgeCommandError, ForgeCommandOutput, ForgeCommandRunner, ForgeCommandSpan,
26    ForgeOperation, RealForgeCommandRunner, command_output_detail,
27};
28pub(crate) use github::GitHubReviewRequestAdapter;
29pub(crate) use gitlab::GitLabReviewRequestAdapter;
30pub use model::{
31    AGENTTY_REVIEW_REPLY_MARKER_PREFIX, CreateReviewRequestInput, ForgeFuture, ForgeKind,
32    ForgeRemote, ReviewCheckFailure, ReviewComment, ReviewCommentAnchorSide, ReviewCommentSnapshot,
33    ReviewCommentThread, ReviewRequestAttention, ReviewRequestError, ReviewRequestMetadata,
34    ReviewRequestMetadataFieldUpdate, ReviewRequestState, ReviewRequestSummary,
35    UpdateReviewRequestInput, is_gitlab_host,
36};
37pub use remote::{detect_remote, remote_repository_path};
38pub(crate) use remote::{parse_remote_url, strip_port};