//! Agent-profile use cases & reference catalogue (ARCHITECTURE ยง6, L5). //! //! This module owns the *profile* side of the AI runtime: detecting which CLIs //! are installed, persisting the chosen/edited/custom profiles, and exposing the //! pre-filled reference catalogue that seeds the first-run wizard. It talks only //! to the [`domain::ports::AgentRuntime`] and [`domain::ports::ProfileStore`] //! ports. Launching an agent (PTY + injection) is L6. mod catalogue; mod inspect; mod lifecycle; mod provider_catalogue; mod resume; mod session_limit; mod structured; mod usecases; pub(crate) use lifecycle::unique_md_path; pub(crate) use lifecycle::ReattachDecision; pub use session_limit::{AgentResumer, SessionLimitService, RESUME_PROMPT}; pub use structured::{ drain_reply_stream_with_readiness, drain_with_readiness, drain_with_readiness_and_announcements, drain_with_readiness_and_announcements_outcome, drain_with_readiness_outcome, send_blocking, AnnouncementPublisher, TurnOutcome, }; pub use catalogue::{ reference_profile_id, reference_profiles, selectable_reference_profiles, CODEX_SUBMIT_DELAY_MS, }; pub use inspect::{InspectConversation, InspectConversationInput, InspectConversationOutput}; pub use provider_catalogue::{ opencode_provider_catalogue, ListOpenCodeProviders, ListOpenCodeProvidersOutput, OpenCodeProviderCatalogEntry, }; pub use lifecycle::{ ChangeAgentProfile, ChangeAgentProfileInput, ChangeAgentProfileOutput, CreateAgentFromScratch, CreateAgentInput, CreateAgentOutput, DeleteAgent, DeleteAgentInput, HandoffProvider, InjectedLiveRow, LaunchAgent, LaunchAgentInput, LaunchAgentOutput, ListAgents, ListAgentsInput, ListAgentsOutput, LiveStateLeanProvider, McpRuntime, PermissionProjectorRegistry, ProviderSessionProvider, ReadAgentContext, ReadAgentContextInput, ReadAgentContextOutput, StructuredRoutingMode, StructuredSessionDescriptor, UpdateAgentContext, UpdateAgentContextInput, DEFAULT_OPENCODE_MCP_TIMEOUT_MS, AGENT_MEMORY_RECALL_BUDGET, LIVE_STATE_INJECT_MAX, resolve_opencode_mcp_timeout_ms, }; pub use resume::{ ListResumableAgents, ListResumableAgentsInput, ListResumableAgentsOutput, ResumableAgent, }; pub use usecases::{ CloneOpenCodeProfileFromSeed, CloneOpenCodeProfileFromSeedInput, CloneOpenCodeProfileFromSeedOutput, ConfigureProfiles, ConfigureProfilesInput, ConfigureProfilesOutput, DeleteProfile, DeleteProfileInput, DetectProfiles, DetectProfilesInput, DetectProfilesOutput, FirstRunState, FirstRunStateOutput, ListProfiles, ListProfilesOutput, ProfileAvailability, ReferenceProfiles, ReferenceProfilesOutput, SaveOpenCodeProviderProfile, SaveOpenCodeProviderProfileInput, SaveOpenCodeProviderProfileOutput, SaveProfile, SaveProfileInput, SaveProfileOutput, };