memory

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package memory is the public SDK facade over Harbor's internal/memory package — the session-scoped memory store, its strategies, and the LLM-context patch vocabulary (RFC §3.6, §6.6; D-204). Alias-based re-exports only: no behavior lives here. Driver factories, event emission helpers, and Protocol wire projections are deliberately private.

Index

Constants

View Source
const (
	// HealthHealthy — the store is fully operational.
	HealthHealthy = internal.HealthHealthy
	// HealthRetry — transient failures; retrying.
	HealthRetry = internal.HealthRetry
	// HealthDegraded — the store is degraded.
	HealthDegraded = internal.HealthDegraded
	// HealthRecovering — the store is recovering.
	HealthRecovering = internal.HealthRecovering
)

Health values.

View Source
const (
	// StrategyNone — no compaction.
	StrategyNone = internal.StrategyNone
	// StrategyTruncation — drop-oldest truncation.
	StrategyTruncation = internal.StrategyTruncation
	// StrategyRollingSummary — LLM-backed rolling summarisation.
	StrategyRollingSummary = internal.StrategyRollingSummary
)

Strategy values.

View Source
const DefaultDriver = internal.DefaultDriver

DefaultDriver is the driver name Open resolves when the config names none.

View Source
const OverflowDropOldest = internal.OverflowDropOldest

OverflowDropOldest is the default bounded-buffer overflow policy.

Variables

View Source
var (
	// ErrNotFound — no record under that key.
	ErrNotFound = internal.ErrNotFound
	// ErrIdentityRequired — the identity triple is incomplete.
	ErrIdentityRequired = internal.ErrIdentityRequired
	// ErrUnknownDriver — the named memory driver is not registered.
	ErrUnknownDriver = internal.ErrUnknownDriver
	// ErrStoreClosed — the store has been closed.
	ErrStoreClosed = internal.ErrStoreClosed
	// ErrInvalidSnapshot — the snapshot does not fit the strategy.
	ErrInvalidSnapshot = internal.ErrInvalidSnapshot
)

Re-exported sentinel errors callers compare via errors.Is.

From extracts the store from ctx, reporting presence.

View Source
var MustFrom = internal.MustFrom

MustFrom extracts the store from ctx, panicking when absent.

Open resolves the configured memory driver and opens it.

View Source
var OpenDriver = internal.OpenDriver

OpenDriver opens a memory driver by explicit name.

View Source
var RegisteredDrivers = internal.RegisteredDrivers

RegisteredDrivers lists the seated memory driver names (blank-import sdk/drivers/prod to seat the production set).

View Source
var SnapshotFromConfig = internal.SnapshotFromConfig

SnapshotFromConfig projects the operator config block into the resolved ConfigSnapshot Open consumes.

View Source
var WithStore = internal.WithStore

WithStore returns a child context carrying the store.

Functions

This section is empty.

Types

type ConfigSnapshot

type ConfigSnapshot = internal.ConfigSnapshot

ConfigSnapshot is the resolved memory configuration.

type ConversationTurn

type ConversationTurn = internal.ConversationTurn

ConversationTurn is one conversational turn in a snapshot.

type Deps

type Deps = internal.Deps

Deps carries shared dependencies (bus, summarizer, logger).

type Health

type Health = internal.Health

Health is the store's degradation state.

type LLMContextPatch

type LLMContextPatch = internal.LLMContextPatch

LLMContextPatch is the planner-visible memory projection.

type MemoryStore

type MemoryStore = internal.MemoryStore

MemoryStore is the identity-mandatory memory store interface.

type OverflowPolicy

type OverflowPolicy = internal.OverflowPolicy

OverflowPolicy names the bounded-buffer overflow behavior.

type Record

type Record = internal.Record

Record is one stored memory record.

type Snapshot

type Snapshot = internal.Snapshot

Snapshot is a strategy-shaped memory snapshot.

type Strategy

type Strategy = internal.Strategy

Strategy names the memory compaction strategy.

type SummarizeRequest

type SummarizeRequest = internal.SummarizeRequest

SummarizeRequest is the summarizer input.

type SummarizeResponse

type SummarizeResponse = internal.SummarizeResponse

SummarizeResponse is the summarizer output.

type Summarizer

type Summarizer = internal.Summarizer

Summarizer produces rolling summaries for the strategy.

type TrajectoryDigest

type TrajectoryDigest = internal.TrajectoryDigest

TrajectoryDigest is a compacted prior-trajectory digest.

Jump to

Keyboard shortcuts

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