agentstorage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package agentstorage owns authorization and canonical resolution for paths supplied through user, run, and MCP surfaces. Framework-trusted storage operations use the low-level storage package directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

type Caller struct {
	Principal      authz.Principal
	Access         agentsdk.Access
	UserID         uuid.UUID
	ConversationID uuid.UUID
	RunID          uuid.UUID
	ParentRunID    uuid.UUID
}

type ListRoot

type ListRoot struct {
	ResolvedPath
	DirectoryPath string
	Description   string
}

type Operation

type Operation string
const (
	OperationRead      Operation = "read"
	OperationList      Operation = "list"
	OperationWrite     Operation = "write"
	OperationOverwrite Operation = "overwrite"
	OperationDelete    Operation = "delete"
)

type ResolvedPath

type ResolvedPath struct {
	Relative string
	S3Key    string
}

type Service

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

func New

func New(database *db.DB) *Service

func (*Service) FilterList

func (s *Service) FilterList(ctx context.Context, caller Caller, agentID uuid.UUID, paths []string) ([]ResolvedPath, error)

func (*Service) ListRoots

func (s *Service) ListRoots(ctx context.Context, caller Caller, agentID uuid.UUID) ([]ListRoot, error)

func (*Service) Resolve

func (s *Service) Resolve(ctx context.Context, caller Caller, agentID uuid.UUID, path string, op Operation) (ResolvedPath, error)

func (*Service) ResolveForRun

func (s *Service) ResolveForRun(ctx context.Context, agentID, runID uuid.UUID, path string, op Operation) (ResolvedPath, error)

Jump to

Keyboard shortcuts

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