Module session

Module session 

Source
Expand description

Session management for ACP Agent

This module handles:

  • Session lifecycle (create, get, remove)
  • Token usage tracking
  • Permission handling
  • Session state management
  • Interactive permission requests
  • Background process management

Structs§

BackgroundProcessManager
Manager for background terminal processes
PendingPermissionRequest
Pending permission request from hook
PermissionHandler
Permission handler for tool execution
PermissionManager
Permission Manager - handles permission requests in background tasks
PermissionRequestBuilder
Builder for creating permission requests
PromptManager
Prompt manager
PromptTask
Prompt task wrapper
Session
An active Claude session
SessionManager
Manager for active sessions
UsageTracker
Tracks token usage across a session
WrappedChild
Wrapper around Box that provides a stable interface compatible with Arc<Mutex<>>

Enums§

BackgroundTerminal
Background terminal state
ChildHandle
Child process handle that can be either wrapped or unwrapped
PermissionManagerDecision
Permission decision result
PermissionMode
Permission mode for tool execution
PermissionOutcome
Permission request outcome after user interaction
TerminalExitStatus
Terminal exit status
ToolPermissionResult
Permission check result from the handler

Functions§

stable_cache_key
Generate a stable cache key from JSON value

Type Aliases§

PromptId
Prompt task identifier