scratchpad

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name                   = "scratchpad"
	EnvScratchpadURI       = "AGENTLY_SCRATCHPAD_URI"
	DefaultRootURITemplate = "mem://localhost/scratchpad/${userID}"
)

Variables

This section is empty.

Functions

func ResolveRootURI

func ResolveRootURI(ctx context.Context, template string) (string, string, error)

Types

type AppendInput

type AppendInput struct {
	Key         string `json:"key" description:"Exact scratchpad key to append to."`
	Body        string `json:"body" description:"Scratchpad note body to append."`
	Description string `` /* 148-byte string literal not displayed */
}

type AppendOutput

type AppendOutput struct {
	Key         string `json:"key,omitempty"`
	Description string `json:"description,omitempty"`
	UpdatedAt   string `json:"updatedAt,omitempty"`
	Created     bool   `json:"created,omitempty"`
	Status      string `json:"status,omitempty"`
	Error       string `json:"error,omitempty"`
}

type Entry

type Entry struct {
	Key         string `json:"key"`
	Description string `json:"description"`
	UpdatedAt   string `json:"updatedAt,omitempty"`
}

type FetchInput

type FetchInput struct {
	Key string `json:"key" description:"Exact scratchpad key to fetch."`
}

type FetchOutput

type FetchOutput struct {
	Key         string `json:"key,omitempty"`
	Description string `json:"description,omitempty"`
	Body        string `json:"body,omitempty"`
	UpdatedAt   string `json:"updatedAt,omitempty"`
	Status      string `json:"status,omitempty"`
	Error       string `json:"error,omitempty"`
}

type ListInput

type ListInput struct{}

type ListOutput

type ListOutput struct {
	Entries []Entry `json:"entries"`
	Status  string  `json:"status,omitempty"`
	Error   string  `json:"error,omitempty"`
}

type MemorizeInput

type MemorizeInput struct {
	Key         string `json:"key" description:"Exact scratchpad key to create or replace."`
	Description string `json:"description" description:"Short description shown by list."`
	Body        string `json:"body" description:"Scratchpad note body."`
}

type MemorizeOutput

type MemorizeOutput struct {
	Key         string `json:"key,omitempty"`
	Description string `json:"description,omitempty"`
	UpdatedAt   string `json:"updatedAt,omitempty"`
	Status      string `json:"status,omitempty"`
	Error       string `json:"error,omitempty"`
}

type Option

type Option func(*Service)

func WithAFS

func WithAFS(fs afs.Service) Option

func WithNow

func WithNow(now func() time.Time) Option

func WithRootURI

func WithRootURI(template string) Option

type Service

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

func New

func New(opts ...Option) *Service

func (*Service) Method

func (s *Service) Method(name string) (svc.Executable, error)

func (*Service) Methods

func (s *Service) Methods() svc.Signatures

func (*Service) Name

func (s *Service) Name() string

Jump to

Keyboard shortcuts

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