Skip to main content

ag_session/
lib.rs

1//! Frontend-neutral session management, selection catalog, and 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 agent;
9mod error;
10mod message;
11mod model;
12mod orchestration;
13mod personality;
14mod project;
15mod question;
16mod review;
17mod service;
18mod setting;
19mod transcript_notice;
20
21pub use ag_runtime::{ReasoningLevel, SessionDiffState, SessionStats};
22pub use agent::{
23    AgentKind, AgentModel, AgentSelection, AgentSelectionMetadata,
24    parse_persisted_session_agent_model, resolve_agent_kind_for_model,
25    resolve_agent_selection_for_model, resolve_model_for_available_agent_kinds,
26    resolve_prompt_model_agent_kind, selectable_models_for_agent_kinds,
27};
28pub use error::SessionError;
29pub use message::{
30    SessionMessage, SessionMessageKind, SessionMessageKindParseError, SessionTranscript,
31    normalized_message_content, stored_message_content,
32};
33pub use model::{
34    ForgeKind, PermissionMode, ResponseStyle, ReviewRequest, ReviewRequestState,
35    ReviewRequestSummary, Session, SessionId, SessionRole, SessionSettings, SessionStatus,
36    SpeedMode, activity_day_key_with_offset, session_branch,
37};
38pub use orchestration::{
39    IntegrationApproach, MAX_AUTOMATED_REVIEW_ITERATIONS, OrchestrationPlanTask,
40    OrchestrationPolicy, OrchestrationScheduleDecision, OrchestrationStatus, OrchestrationTaskKind,
41    OrchestrationTaskStatus, validate_subtasks,
42};
43pub use personality::{
44    PERSONALITY_PROMPT_MAX_BYTES, Personality, PersonalityParseError, PersonalitySummary,
45    parse_agent_definition, parse_agent_summary,
46};
47pub use project::{
48    Project, ProjectListItem, mru_project_order, ordered_project_items, project_name_from_path,
49};
50pub use question::{QuestionItem, default_option_index};
51pub use review::{
52    FocusedReviewStatus, build_apply_review_prompt, has_actionable_review_suggestions,
53    review_suggestions,
54};
55pub use service::{
56    AnswerQuestionsRequest, CoordinatorMessageRequest, CoordinatorMessageVisibility,
57    CreateSessionMode, CreateSessionRequest, QuestionAnswer, SessionBackend, SessionService,
58};
59pub use setting::{
60    DEFAULT_AUTO_APPROVE_ORCHESTRATION_RESEARCH, DEFAULT_ORCHESTRATION_PARALLELISM,
61    MAX_ORCHESTRATION_PARALLELISM, SettingName,
62};
63pub use transcript_notice::TranscriptNotice;