Versions in this module Expand all Collapse all v0 v0.4.0 Oct 22, 2026 Changes in this version + const StatusAnswered + const StatusApproved + const StatusDenied + const StatusFailed + const StatusPendingApproval + const StatusRunning + const StatusTimedOut + var PolicyLoader func() (Policy, error) + func RenderPrompt(req *Request, target *session.Session, policy Policy) string + type Approval struct + CreatedAt time.Time + FromPath string + FromSession string + ToPath string + ToSession string + type ApprovalStore struct + Approvals []Approval + type ExecuteOptions struct + Policy Policy + Store *Store + type ExecutionMetadata struct + Command string + ExitCode int + FinishedAt *time.Time + LogPath string + PromptPath string + StartedAt *time.Time + type Policy struct + Args []string + Command string + Enabled bool + LoadErr error + Mode string + ReadOnly bool + Timeout time.Duration + func EffectivePolicy() Policy + type Request struct + CreatedAt time.Time + Error string + Execution *ExecutionMetadata + FromPath string + FromSession string + ID string + Question string + Response *Response + Status string + ToPath string + ToSession string + UpdatedAt time.Time + func Execute(ctx context.Context, req *Request, target *session.Session, ...) (*Request, error) + type Response struct + Body string + CreatedAt time.Time + Responder string + type Store struct + func NewStore() *Store + func NewStoreAt(dir string) *Store + func (s *Store) AllowFuture(fromSession, toSession, fromPath, toPath string) error + func (s *Store) Approvals() (*ApprovalStore, error) + func (s *Store) ApproveAlwaysAndExecute(ctx context.Context, id string, policy Policy) (*Request, error) + func (s *Store) ApproveAndExecute(ctx context.Context, id string, policy Policy) (*Request, error) + func (s *Store) Create(fromSession, toSession, fromPath, toPath, question string) (*Request, error) + func (s *Store) Deny(id string) (*Request, error) + func (s *Store) Dir() string + func (s *Store) Get(id string) (*Request, error) + func (s *Store) IsAllowed(fromSession, toSession, fromPath, toPath string) (bool, error) + func (s *Store) List() ([]*Request, error) + func (s *Store) Pending() ([]*Request, error) + func (s *Store) Save(req *Request) error