Skip to main content

ag_session/
lib.rs

1//! Frontend-neutral session management API and shared session models.
2//!
3//! Host applications implement [`SessionBackend`] to connect the stable
4//! programmatic API to their persistence, agent, Git, and forge workflows.
5//! Callers such as future orchestrator sessions use [`SessionService`] without
6//! depending on terminal UI state.
7
8mod error;
9mod message;
10mod model;
11mod orchestration;
12mod personality;
13mod project;
14mod question;
15mod review;
16mod service;
17mod setting;
18mod transcript_notice;
19
20pub use error::SessionError;
21pub use message::{
22    SessionMessage, SessionMessageKind, SessionMessageKindParseError, SessionTranscript,
23    normalized_message_content, stored_message_content,
24};
25pub use model::{
26    ForgeKind, ReviewRequest, ReviewRequestState, ReviewRequestSummary, Session, SessionId,
27    SessionRole, SessionSettings, SessionStatus, SpeedMode, activity_day_key_with_offset,
28};
29pub use orchestration::{
30    IntegrationApproach, MAX_AUTOMATED_REVIEW_ITERATIONS, OrchestrationPlanTask,
31    OrchestrationPolicy, OrchestrationScheduleDecision, OrchestrationStatus, OrchestrationTaskKind,
32    OrchestrationTaskStatus, validate_subtasks,
33};
34pub use personality::{
35    PERSONALITY_PROMPT_MAX_BYTES, Personality, PersonalityParseError, PersonalitySummary,
36    parse_agent_definition, parse_agent_summary,
37};
38pub use project::{
39    Project, ProjectListItem, mru_project_order, ordered_project_items, project_name_from_path,
40};
41pub use question::{QuestionItem, default_option_index};
42pub use review::{FocusedReviewStatus, has_actionable_review_suggestions, review_suggestions};
43pub use service::{
44    AnswerQuestionsRequest, CoordinatorMessageRequest, CoordinatorMessageVisibility,
45    CreateSessionMode, CreateSessionRequest, QuestionAnswer, SessionBackend, SessionService,
46};
47pub use setting::{
48    DEFAULT_AUTO_APPROVE_ORCHESTRATION_RESEARCH, DEFAULT_ORCHESTRATION_PARALLELISM,
49    MAX_ORCHESTRATION_PARALLELISM, SettingName,
50};
51pub use transcript_notice::TranscriptNotice;