agent

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ID              string    `yaml:"id"`
	ProjectID       string    `yaml:"project_id"`
	Name            string    `yaml:"name"`
	Description     string    `yaml:"description"`
	Prompt          string    `yaml:"prompt"`
	Tools           []string  `yaml:"tools"`
	DisallowedTools []string  `yaml:"disallowed_tools"`
	Model           string    `yaml:"model"`
	PermissionMode  string    `yaml:"permission_mode"`
	Skills          []string  `yaml:"skills"`
	Memory          string    `yaml:"memory"`
	IsSynced        bool      `yaml:"is_synced"`
	CreatedAt       time.Time `yaml:"created_at"`
	UpdatedAt       time.Time `yaml:"updated_at"`
}

type ChangeNotifier

type ChangeNotifier interface {
	NotifyAgentChange(projectID string)
}

ChangeNotifier is called after agent CRUD operations to notify connected agents that they should re-sync their local agent definitions.

type Repository

type Repository interface {
	Create(ctx context.Context, a *Agent) error
	Get(ctx context.Context, id string) (*Agent, error)
	List(ctx context.Context, projectID string, limit, offset int) ([]*Agent, int, error)
	FindByName(ctx context.Context, projectID, name string) (*Agent, error)
	Update(ctx context.Context, a *Agent) error
	Delete(ctx context.Context, id string) error
}

type Server

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

func NewServer

func NewServer(repo Repository, notifier ChangeNotifier) *Server

func (*Server) SyncAgentsFromDir

SyncAgentsFromDir scans a directory for .claude/agents/*.md files and syncs them.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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