local

package
v0.1.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMessageStorage

func NewMessageStorage() api.MessageStorage

Types

type FileStorage

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

func NewFileStorage

func NewFileStorage(dir string) (*FileStorage, error)

func OpenFileStorage

func OpenFileStorage(base string) (*FileStorage, error)

func (*FileStorage) FileCommit

func (l *FileStorage) FileCommit(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string) error

func (*FileStorage) FileDelete

func (l *FileStorage) FileDelete(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string) error

func (*FileStorage) FileDeleteAll

func (l *FileStorage) FileDeleteAll(ctx context.Context, threadID api.ThreadID) error

func (*FileStorage) FileDiscardDrafts

func (l *FileStorage) FileDiscardDrafts(ctx context.Context, threadID api.ThreadID, origin api.Origin, keep []string) error

func (*FileStorage) FileList

func (l *FileStorage) FileList(ctx context.Context, threadID api.ThreadID, origin api.Origin) iter.Seq2[api.File, error]

func (*FileStorage) FilePut

func (l *FileStorage) FilePut(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string, mime string, r io.Reader, draft bool) (api.File, error)

func (*FileStorage) FileRead

func (l *FileStorage) FileRead(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string, off int64, n int64) (io.ReadCloser, error)

func (*FileStorage) FileStat

func (l *FileStorage) FileStat(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string) (api.File, error)

func (*FileStorage) Remove

func (l *FileStorage) Remove() error

func (*FileStorage) WorkspaceDelete

func (l *FileStorage) WorkspaceDelete(threadID api.ThreadID) error

func (*FileStorage) WorkspaceOpen

func (l *FileStorage) WorkspaceOpen(threadID api.ThreadID) (api.Workspace, error)

type MessageStorage

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

func (*MessageStorage) CompactionCreate

func (l *MessageStorage) CompactionCreate(ctx context.Context, thread api.ThreadID, seq api.Seq, compaction api.Compaction) (api.Seq, error)

func (*MessageStorage) CompactionGet

func (l *MessageStorage) CompactionGet(ctx context.Context, thread api.ThreadID, beforeTail api.RoundID) (api.Compaction, error)

func (*MessageStorage) RecordAdd

func (l *MessageStorage) RecordAdd(ctx context.Context, thread api.ThreadID, seq api.Seq, origin api.RoundID, kind string, attrs map[string]any, data any) (api.RecordID, api.Seq, error)

func (*MessageStorage) RecordList

func (l *MessageStorage) RecordList(ctx context.Context, thread api.ThreadID) ([]api.Record, error)

func (*MessageStorage) RecordPin

func (l *MessageStorage) RecordPin(ctx context.Context, thread api.ThreadID, seq api.Seq, pin api.RoundID, records []api.RecordID) (api.Seq, error)

func (*MessageStorage) RoundAbort

func (l *MessageStorage) RoundAbort(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, usage api.EventUsage, content api.Indexed[api.Content]) (api.Seq, error)

func (*MessageStorage) RoundAfter

func (l *MessageStorage) RoundAfter(ctx context.Context, thread api.ThreadID, start api.RoundID, limit int) ([]api.Round, error)

func (*MessageStorage) RoundBefore

func (l *MessageStorage) RoundBefore(ctx context.Context, thread api.ThreadID, start api.RoundID, limit int) ([]api.Round, error)

func (*MessageStorage) RoundError

func (l *MessageStorage) RoundError(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, err string, usage api.EventUsage, content api.Indexed[api.Content]) (api.Seq, error)

func (*MessageStorage) RoundInput

func (l *MessageStorage) RoundInput(ctx context.Context, thread api.ThreadID, seq api.Seq, input api.Input) (api.RoundID, api.Seq, error)

func (*MessageStorage) RoundOk

func (l *MessageStorage) RoundOk(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, usage api.EventUsage, content api.Indexed[api.Content]) (api.Seq, error)

func (*MessageStorage) RoundRange

func (l *MessageStorage) RoundRange(ctx context.Context, thread api.ThreadID, start api.RoundID, end api.RoundID) iter.Seq2[api.Round, error]

func (*MessageStorage) RoundRefuse

func (l *MessageStorage) RoundRefuse(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, usage api.EventUsage, content api.Indexed[api.Content]) (api.Seq, error)

func (*MessageStorage) RoundResult

func (l *MessageStorage) RoundResult(ctx context.Context, thread api.ThreadID, seq api.Seq, round api.RoundID, result map[string]api.ContentToolResult) (api.Seq, error)

func (*MessageStorage) RoundSearch

func (l *MessageStorage) RoundSearch(ctx context.Context, thread api.ThreadID, exclude bool, query string, from *api.Cursor, inclusive bool, asc bool, limit int) ([]api.Hit, error)

func (*MessageStorage) ThreadBump

func (l *MessageStorage) ThreadBump(ctx context.Context, thread api.ThreadID) (api.Thread, error)

func (*MessageStorage) ThreadClone

func (l *MessageStorage) ThreadClone(ctx context.Context, source api.ThreadID, target api.ThreadID) (api.Thread, error)

func (*MessageStorage) ThreadCreate

func (l *MessageStorage) ThreadCreate(ctx context.Context, id api.ThreadID) (api.Thread, error)

func (*MessageStorage) ThreadCut

func (l *MessageStorage) ThreadCut(ctx context.Context, id api.ThreadID, seq api.Seq, round api.RoundID) (api.Seq, error)

func (*MessageStorage) ThreadDelete

func (l *MessageStorage) ThreadDelete(ctx context.Context, id api.ThreadID) error

func (*MessageStorage) ThreadGet

func (l *MessageStorage) ThreadGet(ctx context.Context, thread api.ThreadID) (api.Thread, error)

func (*MessageStorage) ThreadList

func (l *MessageStorage) ThreadList(ctx context.Context, from, to time.Time, asc bool, limit int, name string) ([]api.Thread, error)

func (*MessageStorage) ThreadRename

func (l *MessageStorage) ThreadRename(ctx context.Context, id api.ThreadID, seq api.Seq, name string) (api.Seq, error)

Jump to

Keyboard shortcuts

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