persistence

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package persistence provides abstract persistence layer for Runtime components.

This package implements the Repository Pattern to decouple Runtime from storage implementations. It provides interfaces for loading prompts, tools, and fragments from various backends (YAML files, JSON files, memory, packs, etc.).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PromptRepository

type PromptRepository interface {
	// LoadPrompt loads a prompt configuration by task type
	LoadPrompt(taskType string) (*prompt.Config, error)

	// LoadFragment loads a fragment by name and optional path
	LoadFragment(name string, relativePath string, baseDir string) (*prompt.Fragment, error)

	// ListPrompts returns all available prompt task types
	ListPrompts() ([]string, error)

	// SavePrompt saves a prompt configuration (for future write support)
	SavePrompt(config *prompt.Config) error
}

PromptRepository provides abstract access to prompt configurations

type ToolRepository

type ToolRepository interface {
	// LoadTool loads a tool descriptor by name
	LoadTool(name string) (*tools.ToolDescriptor, error)

	// ListTools returns all available tool names
	ListTools() ([]string, error)

	// SaveTool saves a tool descriptor (for future write support)
	SaveTool(descriptor *tools.ToolDescriptor) error
}

ToolRepository provides abstract access to tool descriptors

Directories

Path Synopsis
Package common provides shared functionality for persistence repositories.
Package common provides shared functionality for persistence repositories.
Package json provides JSON file-based implementations of persistence repositories.
Package json provides JSON file-based implementations of persistence repositories.
Package memory provides in-memory implementations of persistence repositories.
Package memory provides in-memory implementations of persistence repositories.
Package yaml provides YAML file-based implementations of persistence repositories.
Package yaml provides YAML file-based implementations of persistence repositories.

Jump to

Keyboard shortcuts

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