local

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package local provides offline default adapters for the engine ports (Lifecycle, Retriever, MemoryStore). They let the engine run with zero ForestHub account: no-op registration, no-op RAG, and filesystem-backed durable memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStore

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

MemoryStore is a filesystem-backed engine.memoryStore. The durable copy is a directory of <uid>.json files, so declared memory survives engine restarts with no backend.

func NewMemoryStore

func NewMemoryStore(dir string) *MemoryStore

NewMemoryStore returns a filesystem MemoryStore rooted at dir.

func (*MemoryStore) Snapshot

func (s *MemoryStore) Snapshot(_ context.Context) ([]workflow.MemoryFile, error)

Snapshot reads every <uid>.json under dir. A missing dir is "no memory yet".

func (*MemoryStore) Upsert

func (s *MemoryStore) Upsert(_ context.Context, uid, content string) error

Upsert writes content for uid, preserving any existing metadata.

type NoopLifecycle

type NoopLifecycle struct{}

NoopLifecycle satisfies engine.Lifecycle with no-ops — there is no control plane to register with offline.

func (NoopLifecycle) Heartbeat

func (NoopLifecycle) Register

type NoopRetriever

type NoopRetriever struct{}

NoopRetriever satisfies engine.Retriever with empty results — no RAG backend offline. Retriever nodes degrade to "no context" instead of panicking.

func (NoopRetriever) QueryRAG

Jump to

Keyboard shortcuts

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