projects

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = errors.New("project not found")
	ErrInvalid       = errors.New("invalid project")
	ErrAlreadyExists = errors.New("project already exists")
)

Functions

This section is empty.

Types

type ContextSource

type ContextSource struct {
	ID             string
	Kind           string
	Title          string
	Path           string
	Enabled        bool
	Format         string
	Scope          string
	TrustLabel     string
	SourceCategory string
	Metadata       map[string]string
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

type MemoryStore

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

func NewMemoryStore

func NewMemoryStore() *MemoryStore

func (*MemoryStore) Backend

func (s *MemoryStore) Backend() string

func (*MemoryStore) Create

func (s *MemoryStore) Create(_ context.Context, project Project) (Project, error)

func (*MemoryStore) Delete

func (s *MemoryStore) Delete(_ context.Context, id string) error

func (*MemoryStore) Get

func (s *MemoryStore) Get(_ context.Context, id string) (Project, bool, error)

func (*MemoryStore) List

func (s *MemoryStore) List(_ context.Context) ([]Project, error)

func (*MemoryStore) Update

func (s *MemoryStore) Update(_ context.Context, id string, update func(*Project)) (Project, error)

type Project

type Project struct {
	ID                       string
	Name                     string
	Description              string
	Roots                    []Root
	ContextSources           []ContextSource
	DefaultRootID            string
	DefaultProvider          string
	DefaultModel             string
	DefaultAgentProfile      string
	DefaultToolsEnabled      *bool
	DefaultWorkspaceMode     string
	DefaultSystemPrompt      string
	DefaultCompactToolOutput *bool
	CreatedAt                time.Time
	UpdatedAt                time.Time
	LastOpenedAt             time.Time
}

type Root

type Root struct {
	ID        string
	Path      string
	Kind      string
	GitRemote string
	GitBranch string
	Active    bool
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Store

type Store interface {
	Backend() string
	Create(ctx context.Context, project Project) (Project, error)
	Get(ctx context.Context, id string) (Project, bool, error)
	List(ctx context.Context) ([]Project, error)
	Update(ctx context.Context, id string, update func(*Project)) (Project, error)
	Delete(ctx context.Context, id string) error
}

Jump to

Keyboard shortcuts

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