recallsetup

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 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 recallsetup holds the private on-disk configuration shared by the Recall launcher and the local server. It never lives in a plugin cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lock

func Lock(path string) (*os.File, error)

Lock uses a kernel lock, released even after a crash. Never unlink the lock file: a replacement inode would let two servers own the same data directory.

func LockWait

func LockWait(path string, timeout time.Duration) (*os.File, error)

LockWait is Lock for a lock that is only ever held briefly, retrying until timeout instead of failing at once. Several processes that open the same local directory at the same moment each run setup; without waiting, all but one of them fail even though the next would have found the server already running. It must not be used for a lock held for a process's whole life, such as the server's own.

func Read

func Read(path string, out any) error

func Write

func Write(path string, value any) error

func WriteFile

func WriteFile(path string, b []byte, mode os.FileMode) error

Types

type Config

type Config struct {
	Executable string `json:"executable"`
	// Backend is the registered backend name the setup connects to. Setups
	// written before 0.23.0 have none: with a URL they meant polign, without
	// one the managed local database. BackendName reads either.
	Backend string `json:"backend,omitempty"`
	// Server is the polign-server the local backend runs, when one was chosen.
	Server string `json:"server,omitempty"`
	// URL is the database, in the backend's own form. For the local backend
	// it is the data directory, or empty for the configuration directory.
	URL        string `json:"url,omitempty"`
	Key        string `json:"api_key,omitempty"`
	Collection string `json:"collection"`
	Predicates string `json:"predicates,omitempty"`
	// ExtractModel is the provider:model that works out the statements in
	// remembered text. With one, Recall serves the text-only tools.
	ExtractModel string `json:"extract_model,omitempty"`
	// Open lets writes define predicates, so no predicates file is needed.
	// Setups made before it existed keep a closed vocabulary.
	Open bool `json:"open,omitempty"`
	// Typed keeps the typed tools even when a model is saved: the agent
	// names predicates and the model extracts nothing.
	Typed bool `json:"typed,omitempty"`
	// EmbedModel is the provider:model[@dim] that embeds memory, so recall
	// searches by meaning. Empty is Recall's built-in word search, which is
	// what every setup made before it existed keeps.
	EmbedModel string `json:"embed_model,omitempty"`
}

func (Config) BackendName added in v0.23.0

func (c Config) BackendName() string

BackendName is the backend a setup connects to, reading setups written before the field existed as what they meant then.

type Runtime

type Runtime struct {
	URL string `json:"url"`
	PID int    `json:"pid"`
}

Jump to

Keyboard shortcuts

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