role

package
v0.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependentRolesError

type DependentRolesError struct {
	RoleID     string
	Dependents []string
}

DependentRolesError indicates a role cannot be deleted because other roles extend it.

func (*DependentRolesError) Error

func (e *DependentRolesError) Error() string

type RoleInUseError

type RoleInUseError struct {
	RoleID string
}

RoleInUseError indicates a role cannot be deleted because one or more workspaces currently have it assigned.

func (*RoleInUseError) Error

func (e *RoleInUseError) Error() string

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service handles agent role CRUD, inheritance resolution, and validation.

func New

func New(store roleStore) *Service

func (*Service) CheckDelete

func (s *Service) CheckDelete(ctx context.Context, roleID string) error

CheckDelete validates that a role can be safely deleted. (Stress test 3.2: dependent-role check + workspace usage check)

func (*Service) ResolveEffective

func (s *Service) ResolveEffective(ctx context.Context, roleID string) (*types.EffectiveAgentRole, error)

ResolveEffective walks the extends chain from leaf to root and merges configs. Returns the fully resolved role with the merged config.

func (*Service) ValidateExtends

func (s *Service) ValidateExtends(ctx context.Context, scope, orgID string, extendsID string) error

ValidateExtends checks that the extends target is valid for the given scope/org. (Stress test 1.2: cross-org extends guard)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL