files

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 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 Storage

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

Storage persists run state snapshots and append-only message history on disk.

func NewStorage

func NewStorage(root string) *Storage

NewStorage creates a filesystem-backed agentcore storage rooted at root.

func (*Storage) AppendMessages

func (s *Storage) AppendMessages(_ context.Context, runID string, msgs ...api.Message) error

AppendMessages appends new messages to the authoritative jsonl log.

func (*Storage) LoadArtifacts

func (s *Storage) LoadArtifacts(_ context.Context, runID string) ([]api.Artifact, error)

LoadArtifacts loads the latest artifact index for a run.

func (*Storage) LoadMessages

func (s *Storage) LoadMessages(_ context.Context, runID string) ([]api.Message, error)

LoadMessages loads the append-only authoritative message history from messages.jsonl.

func (*Storage) LoadRun

func (s *Storage) LoadRun(_ context.Context, runID string) (*api.RunState, error)

LoadRun loads the latest run snapshot from state.json.

func (*Storage) SaveArtifacts

func (s *Storage) SaveArtifacts(_ context.Context, runID string, artifacts []api.Artifact) error

SaveArtifacts persists the latest artifact index for a run.

func (*Storage) SaveRun

func (s *Storage) SaveRun(_ context.Context, state *api.RunState) error

SaveRun writes the current run snapshot to state.json and initializes the base layout.

Jump to

Keyboard shortcuts

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