Skip to main content

Crate ag_session

Crate ag_session 

Source
Expand description

Frontend-neutral session management API and shared session models.

Host applications implement SessionBackend to connect the stable programmatic API to their persistence, agent, Git, and forge workflows. Callers such as future orchestrator sessions use SessionService without depending on terminal UI state.

Structs§

AnswerQuestionsRequest
Structured input for resuming one session from clarification questions.
CoordinatorMessageRequest
Durable coordinator-owned turn submitted to one controller session.
CreateSessionRequest
Explicit input for creating one session.
OrchestrationPlanTask
Protocol-independent snapshot of one task proposed by an orchestration controller.
OrchestrationPolicy
Pure orchestration policy over typed task observations.
OrchestrationScheduleDecision
Pure scheduling decision derived from one orchestration task snapshot.
Personality
One enabled personality loaded from a workspace agent definition.
PersonalitySummary
Lightweight personality metadata stored in prompt-composer state.
Project
Persisted project metadata used for multi-project management.
ProjectListItem
Aggregated project snapshot for list and switcher views.
QuestionAnswer
One structured response to a persisted clarification question.
QuestionItem
One extracted question with predefined answer choices.
ReviewRequest
Persisted forge linkage for one session.
ReviewRequestSummary
Normalized remote summary for one linked review request.
Session
Complete persisted session aggregate returned by the programmatic API.
SessionId
Shared stable identifier for one session.
SessionMessage
One persisted transcript message for a session.
SessionMessageKindParseError
Error returned when a stored session message kind is unknown.
SessionService
Stable programmatic facade for session lifecycle operations.
SessionSettings
Complete session-scoped execution settings returned by the API.
SessionTranscript
Ordered transcript view assembled from persisted session messages.

Enums§

CoordinatorMessageVisibility
Transcript treatment for one coordinator-owned prompt.
CreateSessionMode
Creation strategy for a new session.
FocusedReviewStatus
Durable state of one focused-review generation attempt.
ForgeKind
Shared forge family enum reused by persistence and forge adapters.
IntegrationApproach
User-selected destination for verified orchestration task branches.
OrchestrationStatus
Lifecycle state for one controller-owned orchestration.
OrchestrationTaskKind
Execution behavior for one persisted orchestration task.
OrchestrationTaskStatus
Lifecycle state for one orchestration task and its child session.
PersonalityParseError
Error returned when one agent definition cannot be parsed safely.
ReviewRequestState
Normalized remote lifecycle state for one linked review request.
SessionError
Stable error returned by crate::SessionService operations.
SessionMessageKind
Durable category for one saved session transcript message.
SessionRole
Role one session plays in a multi-session workflow.
SessionStatus
High-level lifecycle state for one session.
SettingName
Stable keys used in the setting and project_setting tables.
SpeedMode
Response-speed preference applied to one agent session.
TranscriptNotice
Canonical labels for bracketed workflow notices appended to a session transcript.

Constants§

DEFAULT_AUTO_APPROVE_ORCHESTRATION_RESEARCH
Whether temporary read-only research waves start without plan approval.
DEFAULT_ORCHESTRATION_PARALLELISM
Default number of orchestration children allowed to run concurrently.
MAX_AUTOMATED_REVIEW_ITERATIONS
Maximum number of automatic focused-review remediation turns per managed worker settlement wave.
MAX_ORCHESTRATION_PARALLELISM
Maximum orchestration concurrency exposed by the settings selector.
PERSONALITY_PROMPT_MAX_BYTES
Maximum UTF-8 byte length retained for one personality prompt.

Traits§

SessionBackend
Host implementation boundary for session persistence and workflows.

Functions§

activity_day_key_with_offset
Converts Unix timestamp seconds to a day key after applying a UTC offset.
default_option_index
Returns the initial highlighted option for a clarification question.
has_actionable_review_suggestions
Returns whether focused-review markdown contains suggestions that /apply can act on.
mru_project_order
Returns indices into project_items ordered most-recently-opened first.
normalized_message_content
Returns raw persisted message content with only outer whitespace removed.
ordered_project_items
Returns the project rows named by project_order, skipping stale indices.
parse_agent_definition
Parses one .agents agent definition.
parse_agent_summary
Parses lightweight picker metadata from one .agents agent definition.
project_name_from_path
Derives a readable project name from its filesystem path.
review_suggestions
Extracts actionable suggestion content from focused-review markdown.
stored_message_content
Returns the durable message content for one kind.
validate_subtasks
Validates one proposed subtask set before application code persists it.